@nocobase/plugin-gantt 2.1.0-beta.38 → 2.1.0-beta.41

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.
Files changed (118) hide show
  1. package/dist/client/index.js +1 -1
  2. package/dist/client-v2/793.629d4cd39664b681.js +10 -0
  3. package/dist/client-v2/index.js +1 -1
  4. package/dist/client-v2/locale.d.ts +6 -0
  5. package/dist/client-v2/models/GanttBlockModel.d.ts +1 -1
  6. package/dist/client-v2/models/components/GanttBlock.helpers.d.ts +8 -0
  7. package/dist/client-v2/models/components/GanttBlock.styles.d.ts +2 -1
  8. package/dist/client-v2/models/components/GanttBlock.tree.d.ts +9 -6
  9. package/dist/{shared → client-v2/shared}/components/grid/style.d.ts +4 -3
  10. package/dist/{shared → client-v2/shared}/components/other/horizontal-scroll.d.ts +1 -1
  11. package/dist/externalVersion.js +6 -6
  12. package/dist/locale/en-US.json +4 -1
  13. package/dist/locale/zh-CN.json +4 -1
  14. package/package.json +2 -2
  15. package/dist/client-v2/143.1a8cf1cd5ce17b64.js +0 -10
  16. package/dist/node_modules/@ctrl/tinycolor/LICENSE +0 -7
  17. package/dist/node_modules/@ctrl/tinycolor/dist/bundles/tinycolor.umd.min.js +0 -2
  18. package/dist/node_modules/@ctrl/tinycolor/dist/conversion.d.ts +0 -61
  19. package/dist/node_modules/@ctrl/tinycolor/dist/conversion.js +0 -250
  20. package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.d.ts +0 -4
  21. package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.js +0 -157
  22. package/dist/node_modules/@ctrl/tinycolor/dist/format-input.d.ts +0 -37
  23. package/dist/node_modules/@ctrl/tinycolor/dist/format-input.js +0 -189
  24. package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.d.ts +0 -14
  25. package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.js +0 -30
  26. package/dist/node_modules/@ctrl/tinycolor/dist/index.d.ts +0 -207
  27. package/dist/node_modules/@ctrl/tinycolor/dist/index.js +0 -512
  28. package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.d.ts +0 -46
  29. package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.js +0 -2
  30. package/dist/node_modules/@ctrl/tinycolor/dist/module/conversion.js +0 -235
  31. package/dist/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +0 -154
  32. package/dist/node_modules/@ctrl/tinycolor/dist/module/format-input.js +0 -183
  33. package/dist/node_modules/@ctrl/tinycolor/dist/module/from-ratio.js +0 -25
  34. package/dist/node_modules/@ctrl/tinycolor/dist/module/index.js +0 -508
  35. package/dist/node_modules/@ctrl/tinycolor/dist/module/interfaces.js +0 -1
  36. package/dist/node_modules/@ctrl/tinycolor/dist/module/public_api.js +0 -12
  37. package/dist/node_modules/@ctrl/tinycolor/dist/module/random.js +0 -278
  38. package/dist/node_modules/@ctrl/tinycolor/dist/module/readability.js +0 -80
  39. package/dist/node_modules/@ctrl/tinycolor/dist/module/to-ms-filter.js +0 -16
  40. package/dist/node_modules/@ctrl/tinycolor/dist/module/umd_api.js +0 -20
  41. package/dist/node_modules/@ctrl/tinycolor/dist/module/util.js +0 -82
  42. package/dist/node_modules/@ctrl/tinycolor/dist/public_api.d.ts +0 -11
  43. package/dist/node_modules/@ctrl/tinycolor/dist/public_api.js +0 -1
  44. package/dist/node_modules/@ctrl/tinycolor/dist/random.d.ts +0 -24
  45. package/dist/node_modules/@ctrl/tinycolor/dist/random.js +0 -282
  46. package/dist/node_modules/@ctrl/tinycolor/dist/readability.d.ts +0 -46
  47. package/dist/node_modules/@ctrl/tinycolor/dist/readability.js +0 -86
  48. package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.d.ts +0 -5
  49. package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js +0 -20
  50. package/dist/node_modules/@ctrl/tinycolor/dist/umd_api.d.ts +0 -23
  51. package/dist/node_modules/@ctrl/tinycolor/dist/umd_api.js +0 -22
  52. package/dist/node_modules/@ctrl/tinycolor/dist/util.d.ts +0 -36
  53. package/dist/node_modules/@ctrl/tinycolor/dist/util.js +0 -92
  54. package/dist/node_modules/@ctrl/tinycolor/package.json +0 -1
  55. package/dist/shared/components/calendar/calendar.js +0 -417
  56. package/dist/shared/components/calendar/style.js +0 -79
  57. package/dist/shared/components/calendar/top-part-of-calendar.js +0 -57
  58. package/dist/shared/components/gantt/style.js +0 -74
  59. package/dist/shared/components/gantt/task-gantt-content.js +0 -337
  60. package/dist/shared/components/gantt/task-gantt.js +0 -128
  61. package/dist/shared/components/grid/grid-body.js +0 -114
  62. package/dist/shared/components/grid/grid.js +0 -50
  63. package/dist/shared/components/grid/style.js +0 -54
  64. package/dist/shared/components/other/arrow.js +0 -90
  65. package/dist/shared/components/other/horizontal-scroll.js +0 -64
  66. package/dist/shared/components/other/style.js +0 -125
  67. package/dist/shared/components/other/tooltip.js +0 -137
  68. package/dist/shared/components/other/vertical-scroll.js +0 -74
  69. package/dist/shared/components/task-item/bar/bar-date-handle.js +0 -62
  70. package/dist/shared/components/task-item/bar/bar-display.js +0 -98
  71. package/dist/shared/components/task-item/bar/bar-progress-handle.js +0 -49
  72. package/dist/shared/components/task-item/bar/bar-small.js +0 -85
  73. package/dist/shared/components/task-item/bar/bar.js +0 -113
  74. package/dist/shared/components/task-item/bar/style.js +0 -58
  75. package/dist/shared/components/task-item/milestone/milestone.js +0 -72
  76. package/dist/shared/components/task-item/milestone/style.js +0 -45
  77. package/dist/shared/components/task-item/project/project.js +0 -77
  78. package/dist/shared/components/task-item/project/style.js +0 -51
  79. package/dist/shared/components/task-item/style.js +0 -74
  80. package/dist/shared/components/task-item/task-item.js +0 -132
  81. package/dist/shared/helpers/bar-helper.js +0 -415
  82. package/dist/shared/helpers/date-helper.js +0 -231
  83. package/dist/shared/helpers/other-helper.js +0 -97
  84. package/dist/shared/types/bar-task.js +0 -24
  85. package/dist/shared/types/date-setup.js +0 -24
  86. package/dist/shared/types/gantt-task-actions.js +0 -24
  87. package/dist/shared/types/public-types.js +0 -46
  88. /package/dist/{shared → client-v2/shared}/components/calendar/calendar.d.ts +0 -0
  89. /package/dist/{shared → client-v2/shared}/components/calendar/style.d.ts +0 -0
  90. /package/dist/{shared → client-v2/shared}/components/calendar/top-part-of-calendar.d.ts +0 -0
  91. /package/dist/{shared → client-v2/shared}/components/gantt/style.d.ts +0 -0
  92. /package/dist/{shared → client-v2/shared}/components/gantt/task-gantt-content.d.ts +0 -0
  93. /package/dist/{shared → client-v2/shared}/components/gantt/task-gantt.d.ts +0 -0
  94. /package/dist/{shared → client-v2/shared}/components/grid/grid-body.d.ts +0 -0
  95. /package/dist/{shared → client-v2/shared}/components/grid/grid.d.ts +0 -0
  96. /package/dist/{shared → client-v2/shared}/components/other/arrow.d.ts +0 -0
  97. /package/dist/{shared → client-v2/shared}/components/other/style.d.ts +0 -0
  98. /package/dist/{shared → client-v2/shared}/components/other/tooltip.d.ts +0 -0
  99. /package/dist/{shared → client-v2/shared}/components/other/vertical-scroll.d.ts +0 -0
  100. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar-date-handle.d.ts +0 -0
  101. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar-display.d.ts +0 -0
  102. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar-progress-handle.d.ts +0 -0
  103. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar-small.d.ts +0 -0
  104. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar.d.ts +0 -0
  105. /package/dist/{shared → client-v2/shared}/components/task-item/bar/style.d.ts +0 -0
  106. /package/dist/{shared → client-v2/shared}/components/task-item/milestone/milestone.d.ts +0 -0
  107. /package/dist/{shared → client-v2/shared}/components/task-item/milestone/style.d.ts +0 -0
  108. /package/dist/{shared → client-v2/shared}/components/task-item/project/project.d.ts +0 -0
  109. /package/dist/{shared → client-v2/shared}/components/task-item/project/style.d.ts +0 -0
  110. /package/dist/{shared → client-v2/shared}/components/task-item/style.d.ts +0 -0
  111. /package/dist/{shared → client-v2/shared}/components/task-item/task-item.d.ts +0 -0
  112. /package/dist/{shared → client-v2/shared}/helpers/bar-helper.d.ts +0 -0
  113. /package/dist/{shared → client-v2/shared}/helpers/date-helper.d.ts +0 -0
  114. /package/dist/{shared → client-v2/shared}/helpers/other-helper.d.ts +0 -0
  115. /package/dist/{shared → client-v2/shared}/types/bar-task.d.ts +0 -0
  116. /package/dist/{shared → client-v2/shared}/types/date-setup.d.ts +0 -0
  117. /package/dist/{shared → client-v2/shared}/types/gantt-task-actions.d.ts +0 -0
  118. /package/dist/{shared → client-v2/shared}/types/public-types.d.ts +0 -0
@@ -1,10 +0,0 @@
1
- /**
2
- * This file is part of the NocoBase (R) project.
3
- * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
- * Authors: NocoBase Team.
5
- *
6
- * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
- * For more information, please refer to: https://www.nocobase.com/agreement.
8
- */
9
-
10
- "use strict";(self.webpackChunk_nocobase_plugin_gantt_client_v2=self.webpackChunk_nocobase_plugin_gantt_client_v2||[]).push([["143"],{642:function(e,t,n){n.r(t),n.d(t,{GanttBlockModel:function(){return nb}});var r,o,a,l,i,c,u=n(375),s=n(485),d=n(694),f=n(59),p=n(155),h=n.n(p),g=n(619),b=n(773);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function m(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,i=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(i)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(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 S=function(e,t,n,r,o,a,l,i,c,u,s,d,f,p,h,g,b,y){var v=e.map(function(e,v){return x(e,v,t,n,r,o,a,l,i,c,u,s,d,f,p,h,g,b,y)});return v=v.map(function(e){for(var t=function(t){var r=v.findIndex(function(e){return e.id===n[t]});-1!==r&&v[r].barChildren.push(e)},n=e.dependencies||[],r=0;r<n.length;r++)t(r);return e})},x=function(e,t,n,r,o,a,l,i,c,u,s,d,f,p,h,g,b,y,v){var m;switch(e.type){case"milestone":m=O(e,t,n,r,o,a,l,i,y,v);break;case"project":m=k(e,t,n,r,o,.5*a,l,i,c,p,h,g,b);break;default:m=k(e,t,n,r,o,a,l,i,c,u,s,d,f)}return m},k=function(e,t,n,r,o,a,l,i,c,u,s,d,f){c?(h=P(e.start,n,r),p=P(e.end,n,r)):(p=T(e.start,n,r),h=T(e.end,n,r));var p,h,g=e.type;"task"===g&&h-p<2*i&&(g="smalltask",h=p>0?p+2*i:p);var b=w(j(p,h,e.progress,c),2),y=b[0],S=b[1],x="project"===e.type?E(t,o,a)+8:E(t,o,a),k="project"===e.type?e.hideChildren:void 0,O=v({backgroundColor:d,backgroundSelectedColor:f,progressColor:u,progressSelectedColor:s},e.styles);return m(v({},e),{typeInternal:g,x1:p,x2:h,y:x,index:t,progressX:S,progressWidth:y,barCornerRadius:l,handleWidth:i,hideChildren:k,height:a,barChildren:[],styles:O})},O=function(e,t,n,r,o,a,l,i,c,u){var s=T(e.start,n,r),d=E(t,o,a),f=s-.5*a,p=s+.5*a,h=a/1.414,g=v({backgroundColor:c,backgroundSelectedColor:u,progressColor:"",progressSelectedColor:""},e.styles);return m(v({},e),{end:e.start,x1:f,x2:p,y:d,index:t,progressX:0,progressWidth:0,barCornerRadius:l,handleWidth:i,typeInternal:e.type,progress:0,height:h,hideChildren:void 0,barChildren:[],styles:g})},T=function(e,t,n){var r,o,a,l=t.findIndex(function(t){return(null==t?void 0:t.getTime())>=(null==e?void 0:e.getTime())})-1,i=((null==e?void 0:e.getTime())-(null==(r=t[l])?void 0:r.getTime()))/((null==(o=t[l+1])?void 0:o.getTime())-(null==(a=t[l])?void 0:a.getTime())),c=l*n+i*n;return isNaN(c)?0:c},P=function(e,t,n){var r=T(e,t,n);return isNaN(r+=n)?0:r},E=function(e,t,n){var r=e*t+(t-n)/2;return isNaN(r)?0:r},j=function(e,t,n,r){var o,a=(t-e)*n*.01;return o=r?t-a:e,[a,o]},C=function(e,t){if(e>=t.x2)return 100;if(e<=t.x1)return 0;var n=t.x2-t.x1;return Math.round((e-t.x1)*100/n)},D=function(e,t){if(e>=t.x2)return 0;if(e<=t.x1)return 100;var n=t.x2-t.x1;return Math.round((t.x2-e)*100/n)},M=function(e,t,n){return[e-5,t+n,e+5,t+n,e,t+n-8.66].join(",")},A=function(e,t,n){e>=n.x2-2*n.handleWidth&&(e=n.x2-2*n.handleWidth);var r=Math.round((e-n.x1)/t);return n.x1+r*t},F=function(e,t,n){e<=n.x1+2*n.handleWidth&&(e=n.x1+2*n.handleWidth);var r=Math.round((e-n.x2)/t);return n.x2+r*t},R=function(e,t,n){var r=Math.round((e-n.x1)/t),o=n.x1+r*t,a=o+n.x2-n.x1;return[o,a]},N=function(e,t,n,r,o){var a,l,i=new Date((e-t)/r*o+(null==n||null==(a=n.getTime)?void 0:a.call(n)));return new Date((null==i||null==(l=i.getTime)?void 0:l.call(i))+((null==i?void 0:i.getTimezoneOffset())-(null==n?void 0:n.getTimezoneOffset()))*6e4)},z=function(e,t,n,r,o,a,l){return"milestone"===n.type?W(e,t,n,r,o,a):I(e,t,n,r,o,a,l)},I=function(e,t,n,r,o,a,l){var i=v({},n),c=!1;switch(t){case"progress":if(l?i.progress=D(e,n):i.progress=C(e,n),c=i.progress!==n.progress){var u=w(j(i.x1,i.x2,i.progress,l),2),s=u[0],d=u[1];i.progressWidth=s,i.progressX=d}break;case"start":var f=A(e,r,n);if(i.x1=f,c=i.x1!==n.x1){l?i.end=N(f,n.x1,n.end,r,o):i.start=N(f,n.x1,n.start,r,o);var p=w(j(i.x1,i.x2,i.progress,l),2),h=p[0],g=p[1];i.progressWidth=h,i.progressX=g}break;case"end":var b=F(e,r,n);if(i.x2=b,c=i.x2!==n.x2){l?i.start=N(b,n.x2,n.start,r,o):i.end=N(b,n.x2,n.end,r,o);var y=w(j(i.x1,i.x2,i.progress,l),2),m=y[0],S=y[1];i.progressWidth=m,i.progressX=S}break;case"move":var x=w(R(e-a,r,n),2),k=x[0],O=x[1];if(c=k!==n.x1){i.start=N(k,n.x1,n.start,r,o),i.end=N(O,n.x2,n.end,r,o),i.x1=k,i.x2=O;var T=w(j(i.x1,i.x2,i.progress,l),2),P=T[0],E=T[1];i.progressWidth=P,i.progressX=E}}return{isChanged:c,changedTask:i}},W=function(e,t,n,r,o,a){var l=v({},n),i=!1;if("move"===t){var c=w(R(e-a,r,n),2),u=c[0],s=c[1];(i=u!==n.x1)&&(l.start=N(u,n.x1,n.start,r,o),l.end=l.start,l.x1=u,l.x2=s)}return{isChanged:i,changedTask:l}},H=((a={}).Hour="hour",a.QuarterDay="quarterDay",a.HalfDay="halfDay",a.Day="day",a.Week="week",a.Month="month",a.QuarterYear="quarterYear",a.Year="year",a);Intl.DateTimeFormat,Intl.DateTimeFormatOptions;var B={},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=JSON.stringify([e,t]),r=B[n];return r||(r=new Intl.DateTimeFormat(e,t),B[n]=r),r},_=function(e,t,n){return new Date(e.getFullYear()+("year"===n?t:0),e.getMonth()+("month"===n?t:0),e.getDate()+("day"===n?t:0),e.getHours()+("hour"===n?t:0),e.getMinutes()+("minute"===n?t:0),e.getSeconds()+("second"===n?t:0),e.getMilliseconds()+("millisecond"===n?t:0))},G=function(e,t){var n=["millisecond","second","minute","hour","day","month","year"],r=function(e){var r=n.indexOf(t);return n.indexOf(e)<=r};return new Date(null==e?void 0:e.getFullYear(),r("year")?0:e.getMonth(),r("month")?1:e.getDate(),r("day")?0:e.getHours(),r("hour")?0:e.getMinutes(),r("minute")?0:e.getSeconds(),r("second")?0:e.getMilliseconds())},Y=function(e,t,n){var r=(null==(c=e[0])?void 0:c.start)||new Date,o=(null==(u=e[0])?void 0:u.start)||new Date,a=!0,l=!1,i=void 0;try{for(var c,u,s,d=e[Symbol.iterator]();!(a=(s=d.next()).done);a=!0){var f=s.value;f.start<r&&(r=f.start),f.end>o&&(o=f.end)}}catch(e){l=!0,i=e}finally{try{a||null==d.return||d.return()}finally{if(l)throw i}}switch(t){case H.Year:r=G(r=_(r,-1,"year"),"year"),o=G(o=_(o,1,"year"),"year");break;case H.QuarterYear:r=G(r=_(r,-3,"month"),"month"),o=G(o=_(o,3,"year"),"year");break;case H.Month:r=G(r=_(r,-1*n,"month"),"month"),o=G(o=_(o,1,"year"),"year");break;case H.Week:r=_(V(r=G(r,"day")),-7*n,"day"),o=_(o=G(o,"day"),1.5,"month");break;case H.Day:r=_(r=G(r,"day"),-1*n,"day"),o=_(o=G(o,"day"),19,"day");break;case H.QuarterDay:r=_(r=G(r,"day"),-1*n,"day"),o=_(o=G(o,"day"),66,"hour");break;case H.HalfDay:r=_(r=G(r,"day"),-1*n,"day"),o=_(o=G(o,"day"),108,"hour");break;case H.Hour:r=_(r=G(r,"hour"),-1*n,"hour"),o=_(o=G(o,"day"),1,"day")}return[r,o]},U=function(e,t,n){for(var r=new Date(e),o=[r];r<t;){switch(n){case H.Year:r=_(r,1,"year");break;case H.QuarterYear:r=_(r,3,"month");break;case H.Month:r=_(r,1,"month");break;case H.Week:r=_(r,7,"day");break;case H.Day:r=_(r,1,"day");break;case H.HalfDay:r=_(r,12,"hour");break;case H.QuarterDay:r=_(r,6,"hour");break;case H.Hour:r=_(r,1,"hour")}o.push(r)}return o},X=function(e,t){var n=L(t,{month:"long"}).format(e);return n.replace(n[0],n[0].toLocaleUpperCase())},K=function(e,t,n){var r=L(t,{weekday:n}).format(e);return r.replace(r[0],r[0].toLocaleUpperCase())},V=function(e){var t=e.getDay(),n=e.getDate()-t+(0===t?-6:1);return new Date(e.setDate(n))},Z=function(e){var t=new Date(e.valueOf()),n=(t.getDay()+6)%7;t.setDate(t.getDate()-n+3);var r=t.valueOf();t.setMonth(0,1),4!==t.getDay()&&t.setMonth(0,1+(4-t.getDay()+7)%7);var o=(1+Math.ceil((r-t.valueOf())/6048e5)).toString();return 1===o.length?"0".concat(o):o},q=n(477),Q=n(235);function $(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function J(){var e=$(["\n overflow: auto;\n position: absolute;\n bottom: 0;\n max-width: 100%;\n height: 16px;\n background: ",";\n scrollbar-color: "," ",";\n &::-webkit-scrollbar {\n width: 16px;\n height: 16px;\n }\n &::-webkit-scrollbar-corner {\n background: ",";\n }\n &::-webkit-scrollbar-track {\n background: ",";\n }\n &::-webkit-scrollbar-thumb {\n background: ",";\n border-radius: 100px;\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ",";\n }\n "]);return J=function(){return e},e}function ee(){var e=$(["\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: ","px;\n color: ",";\n }\n "]);return ee=function(){return e},e}function et(){var e=$(["\n position: absolute;\n display: flex;\n flex-shrink: 0;\n pointer-events: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n "]);return et=function(){return e},e}function en(){var e=$(["\n visibility: hidden;\n position: absolute;\n display: flex;\n pointer-events: none;\n "]);return en=function(){return e},e}function er(){var e=$(["\n .horizontalScroll {\n height: 1px;\n }\n\n .verticalScroll {\n overflow: hidden auto;\n width: 1rem;\n flex-shrink: 0;\n scrollbar-color: "," ",";\n &::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n &::-webkit-scrollbar-corner {\n background: ",";\n }\n &::-webkit-scrollbar-track {\n background: ",";\n }\n &::-webkit-scrollbar-thumb {\n background: ",";\n border-radius: 100px;\n }\n &::-webkit-scrollbar-thumb:hover {\n background: ",";\n }\n }\n "]);return er=function(){return e},e}var eo=(0,Q.createStyles)(function(e){var t=e.token,n=e.css;return{scrollWrapper:n(J(),t.colorSplit,t.colorTextPlaceholder,t.colorSplit,t.colorSplit,t.colorSplit,t.colorTextPlaceholder,t.colorTextHeading),tooltipDefaultContainer:n(ee(),t.colorBgElevated,t.borderRadius,t.boxShadow,t.marginXS,t.fontSizeSM,t.marginXS,t.colorText),tooltipDetailsContainer:n(et()),tooltipDetailsContainerHidden:n(en()),nbGridOther:n(er(),t.colorTextPlaceholder,t.colorSplit,t.colorSplit,t.colorSplit,t.colorTextPlaceholder,t.colorTextHeading)}}),ea=(0,p.forwardRef)(function(e,t){var n=e.svgWidth,r=(e.rtl,e.onScroll),o=eo().styles;return h().createElement("div",{dir:"ltr",className:(0,q.cx)(o.nbGridOther,o.scrollWrapper,"gantt-horizontal-scoll"),onScroll:r,ref:t},h().createElement("div",{style:{width:n,height:1},className:"horizontalScroll"}))});ea.displayName="HorizontalScroll";var el=function(e,t){var n=e.displayOrder||Number.MAX_VALUE,r=t.displayOrder||Number.MAX_VALUE;return n>r?1:n<r?-1:0},ei=function(e){var t;return isNaN(null==e||null==(t=e.getTime)?void 0:t.call(e))?0:e.getFullYear()+"/"+"".concat(e.getMonth()+1)+"/"+e.getDate()};function ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,i=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(i)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ec(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ec(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 es=function(e){var t=e.task,n=e.rowHeight,r=e.rtl,o=e.svgContainerHeight,a=e.svgContainerWidth,l=e.scrollX,i=e.scrollY,c=e.arrowIndent,u=e.fontSize,s=e.fontFamily,d=e.headerHeight,f=e.TooltipContent,g=eo().styles,b=(0,p.useRef)(null),y=eu((0,p.useState)(0),2),v=y[0],m=y[1],w=eu((0,p.useState)(0),2),S=w[0],x=w[1];return(0,p.useEffect)(function(){if(b.current){var e,u=1.1*b.current.offsetHeight,s=1.1*b.current.offsetWidth,f=t.index*n-i+d;r?((e=t.x1-1.5*c-s-l)<0&&(e=t.x2+1.5*c-l),s+e>a&&(e=a-s,f+=n)):(s+(e=t.x2+1.5*c-l)>a&&(e=t.x1-1.5*c-l-s),e<0&&(e=a-s,f+=n)),u+f-i>o-i&&(f=o-u),m(f),x(e)}},[b,t,c,l,i,d,n,o,a,r]),h().createElement("div",{ref:b,className:(0,q.cx)(S?g.tooltipDetailsContainer:g.tooltipDetailsContainerHidden,g.nbGridOther),style:{left:S,top:v}},h().createElement(f,{task:t,fontSize:u,fontFamily:s}))},ed=function(e){var t,n,r,o,a,l,i,c,u=e.task,s=e.fontSize,d=e.fontFamily,f=eo().styles;return h().createElement("div",{className:(0,q.cx)(f.nbGridOther,f.tooltipDefaultContainer),"aria-label":"nb-gantt-tooltip",style:{fontSize:s,fontFamily:d}},h().createElement("b",{style:{fontSize:s}},u.name,": ",ei(u.start)," ~ ",ei(u.end)),(null==(n=u.end)||null==(t=n.getTime)?void 0:t.call(n))-(null==(o=u.start)||null==(r=o.getTime)?void 0:r.call(o))!=0&&h().createElement("p",{className:"tooltipDefaultContainerParagraph"},"Duration: ".concat(Math.round(((null==(l=u.end)||null==(a=l.getTime)?void 0:a.call(l))-(null==(c=u.start)||null==(i=c.getTime)?void 0:i.call(c)))/864e5*10)/10||""," day(s)")),h().createElement("p",{className:"tooltipDefaultContainerParagraph"},!!u.progress&&"Progress: ".concat(u.progress,"%")))},ef=function(e){var t=e.scroll,n=e.ganttHeight,r=e.ganttFullHeight,o=e.headerHeight,a=e.rtl,l=e.onScroll,i=eo().styles,c=(0,p.useRef)(null);return(0,p.useEffect)(function(){c.current&&(c.current.scrollTop=t)},[t]),h().createElement("div",{style:{position:"absolute",top:o,bottom:0,right:a?void 0:0,left:a?0:void 0,maxHeight:n},className:(0,q.cx)(i.nbGridOther,"verticalScroll"),onScroll:l,ref:c},h().createElement("div",{style:{height:r,width:1}}))},ep=n(864);function eh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function eg(){var e=eh(["\n color: ",";\n fill: ",";\n stroke-width: 1.4;\n background: ",";\n border-bottom: 1px solid ",";\n "]);return eg=function(){return e},e}function eb(){var e=eh(["\n font-size: 12px;\n font-weight: 400;\n fill: ",";\n text-anchor: middle;\n user-select: none;\n pointer-events: none;\n "]);return eb=function(){return e},e}function ey(){var e=eh(["\n .calendarBottomText,\n .calendarbottomtext {\n font-size: 12px;\n font-weight: 400;\n fill: ",";\n text-anchor: middle;\n user-select: none;\n pointer-events: none;\n }\n .calendarTopTick,\n .calendartoptick {\n stroke: ",";\n stroke-width: 0;\n }\n .calendarTopText,\n .calendartoptext {\n font-size: ","px;\n font-weight: 600;\n fill: ",";\n text-anchor: middle;\n user-select: none;\n pointer-events: none;\n }\n "]);return ey=function(){return e},e}var ev=(0,Q.createStyles)(function(e){var t=e.token,n=e.css,r=new ep.q(t.colorFillAlter).onBackground(t.colorBgContainer).toHexShortString();return{calendarheader:n(eg(),t.colorText,r,r,t.colorBorderSecondary),calendarBottomText:n(eb(),t.colorTextSecondary),nbGanttCalendar:n(ey(),t.colorTextSecondary,t.colorBorderSecondary,t.fontSize,t.colorText)}}),em=function(e){var t=e.value,n=e.x1Line,r=e.y1Line,o=e.y2Line,a=e.xText,l=e.yText;return h().createElement("g",{className:"calendarTop"},h().createElement("line",{x1:n,y1:r,x2:n,y2:o,className:(0,q.cx)("calendarTopTick"),key:t+"line"}),h().createElement("text",{key:t+"text",y:l,x:a,className:(0,q.cx)("calendarTopText")},t))};function ew(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,i=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(i)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ew(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ew(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 ex=function(e){var t,n,r,o,a,l,i,c=e.dateSetup,u=e.locale,s=e.viewMode,d=e.rtl,f=e.headerHeight,p=e.columnWidth,g=e.fontFamily,b=e.fontSize,y=ev().styles,v=[],m=[];switch(c.viewMode){case H.Year:v=(t=eS(function(){for(var e=[],t=[],n=.5*f,r=0;r<c.dates.length;r++){var o=c.dates[r],a=o.getFullYear();if(t.push(h().createElement("text",{key:o.getTime(),y:.8*f,x:p*r+.5*p},a)),0===r||o.getFullYear()!==c.dates[r-1].getFullYear()){var l=o.getFullYear().toString(),i=void 0;i=d?(6+r+o.getFullYear()+1)*p:(6+r-o.getFullYear())*p,e.push(h().createElement(em,{key:l,value:l,x1Line:p*r,y1Line:0,y2Line:f,xText:i,yText:.9*n}))}}return[e,t]}(),2))[0],m=t[1];break;case H.QuarterYear:v=(n=eS(function(){for(var e=[],t=[],n=.5*f,r=0;r<c.dates.length;r++){var o=c.dates[r],a="Q"+Math.floor((o.getMonth()+3)/3);if(t.push(h().createElement("text",{key:o.getTime(),y:.8*f,x:p*r+.5*p,className:y.calendarBottomText},a)),0===r||o.getFullYear()!==c.dates[r-1].getFullYear()){var l=o.getFullYear().toString(),i=void 0;i=d?(6+r+o.getMonth()+1)*p:(6+r-o.getMonth())*p,e.push(h().createElement(em,{key:l,value:l,x1Line:p*r,y1Line:0,y2Line:n,xText:Math.abs(i)-200,yText:.9*n}))}}return[e,t]}(),2))[0],m=n[1];break;case H.Month:v=(r=eS(function(){for(var e=[],t=[],n=.5*f,r=0;r<c.dates.length;r++){var o=c.dates[r],a=X(o,u);if(t.push(h().createElement("text",{key:a+o.getFullYear(),y:.8*f,x:p*r+.5*p,className:y.calendarBottomText},a)),0===r||o.getFullYear()!==c.dates[r-1].getFullYear()){var l=o.getFullYear().toString(),i=void 0;i=d?(6+r+o.getMonth()+1)*p:(6+r-o.getMonth())*p,e.push(h().createElement(em,{key:l,value:l,x1Line:p*r,y1Line:0,y2Line:n,xText:i,yText:.9*n}))}}return[e,t]}(),2))[0],m=r[1];break;case H.Week:v=(o=eS(function(){for(var e=[],t=[],n=1,r=.5*f,o=c.dates,a=o.length-1;a>=0;a--){var l=o[a],i="";(0===a||l.getMonth()!==o[a-1].getMonth())&&(i="".concat(X(l,u),", ").concat(l.getFullYear()));var s="W".concat(Z(l));t.push(h().createElement("text",{key:l.getTime(),y:.8*f,x:p*(a+ +d),className:y.calendarBottomText},s)),i&&(a!==o.length-1&&e.push(h().createElement(em,{key:i,value:i,x1Line:p*a+n*p,y1Line:0,y2Line:r,xText:p*a+p*n*.5,yText:.9*r})),n=0),n++}return[e,t]}(),2))[0],m=o[1];break;case H.Day:v=(a=eS(function(){for(var e=[],t=[],n=.5*f,r=c.dates,o=0;o<r.length;o++){var a=r[o],l="".concat(a.getDate().toString());t.push(h().createElement("text",{key:a.getTime(),y:.8*f,x:p*o+.5*p,className:(0,q.cx)("calendarBottomText")},l))}for(var i=0,s=0;s<r.length;s++){var d=s+1===r.length,g=!d&&r[s].getMonth()!==r[s+1].getMonth();if(d||g){var b=r[i],y=g?s+1:r.length,v=X(b,u);e.push(h().createElement(em,{key:"".concat(v,"-").concat(b.getFullYear(),"-").concat(i),value:v,x1Line:p*i,y1Line:0,y2Line:n,xText:p*(i+(y-i)*.5),yText:.9*n})),i=s+1}}return[e,t]}(),2))[0],m=a[1];break;case H.QuarterDay:case H.HalfDay:v=(l=eS(function(){for(var e=[],t=[],n=s===H.HalfDay?2:4,r=.5*f,o=c.dates,a=0;a<o.length;a++){var l=o[a],i=L(u,{hour:"numeric"}).format(l).replace("时","");if(t.push(h().createElement("text",{key:l.getTime(),y:.8*f,x:p*(a+ +d),className:(0,q.cx)("calendarBottomText"),fontFamily:g},i)),0===a||l.getDate()!==o[a-1].getDate()){var b="".concat(K(l,u,"short"),", ").concat(l.getDate()," ").concat(X(l,u));e.push(h().createElement(em,{key:b+l.getFullYear(),value:b,x1Line:p*a+n*p,y1Line:0,y2Line:r,xText:p*a+n*p*.5,yText:.9*r}))}}return[e,t]}(),2))[0],m=l[1];break;case H.Hour:v=(i=eS(function(){for(var e=[],t=[],n=.5*f,r=c.dates,o=0;o<r.length;o++){var a,l=r[o],i=null==(a=L(u,{hour:"numeric"}).format(l))?void 0:a.replace("时","");if(t.push(h().createElement("text",{key:l.getTime(),y:.8*f,x:p*(o+ +d),className:(0,q.cx)("calendarBottomText"),fontFamily:g},i)),0!==o&&l.getDate()!==r[o-1].getDate()){var s=r[o-1],b="".concat(K(s,u,"long"),", ").concat(s.getDate()," ").concat(X(s,u)),y=(l.getHours()-24)/2;e.push(h().createElement(em,{key:b+s.getFullYear(),value:b,x1Line:p*o,y1Line:0,y2Line:n,xText:p*(o+y),yText:.9*n}))}}return[e,t]}(),2))[0],m=i[1]}return h().createElement("g",{className:y.nbGanttCalendar,fontSize:b,fontFamily:g},h().createElement("rect",{x:0,y:0,width:p*c.dates.length,height:f,className:y.calendarheader}),m," ",v)};function ek(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function eO(){var e=ek(["\n fill: ",";\n "]);return eO=function(){return e},e}function eT(){var e=ek(["\n fill: #e6f7ff;\n border-color: ",";\n "]);return eT=function(){return e},e}function eP(){var e=ek(["\n .gridrowline: {\n stroke: ",";\n stroke-width: 0;\n border-bottom: 1px solid ",";\n }\n .gridtick: {\n stroke: ",";\n }\n "]);return eP=function(){return e},e}var eE=(0,Q.createStyles)(function(e){var t=e.token,n=e.css;return{gridRow:n(eO(),t.colorBgContainer),gridHeightRow:n(eT(),t.colorBorder),nbGridbody:n(eP(),t.colorBorderSecondary,t.colorBorderSecondary,t.colorBorderSecondary)}}),ej=function(e){var t=e.tasks,n=e.dates,r=e.rowHeight,o=e.svgWidth,a=e.columnWidth,l=e.todayColor,i=e.rtl,c=e.selectedRowKeys,u=eE().styles,s=0,d=t.length*r,f=[],p=[h().createElement("line",{key:"RowLineFirst",x:"0",y1:0,x2:o,y2:0,className:(0,q.cx)("gridRowLine")})],g=!0,b=!1,y=void 0;try{for(var v,m=t[Symbol.iterator]();!(g=(v=m.next()).done);g=!0){var w=v.value;f.push(h().createElement("rect",{key:"Row"+w.id,x:"0",y:s,width:o,height:r,className:(null==c?void 0:c.includes(String(w.id)))?u.gridHeightRow:u.gridRow})),p.push(h().createElement("line",{key:"RowLine"+w.id,x:"0",y1:s+r,x2:o,y2:s+r,className:(0,q.cx)("gridRowLine")})),s+=r}}catch(e){b=!0,y=e}finally{try{g||null==m.return||m.return()}finally{if(b)throw y}}for(var S=new Date,x=0,k=[],O=h().createElement("rect",null),T=0;T<n.length;T++){var P=n[T];k.push(h().createElement("line",{key:P.getTime(),x1:x,y1:0,x2:x,y2:d,className:(0,q.cx)("gridTick")})),(T+1!==n.length&&P.getTime()<S.getTime()&&n[T+1].getTime()>=S.getTime()||0!==T&&T+1===n.length&&P.getTime()<S.getTime()&&_(P,P.getTime()-n[T-1].getTime(),"millisecond").getTime()>=S.getTime())&&(O=h().createElement("rect",{x:x,y:0,width:a,height:d,fill:l})),i&&T+1!==n.length&&P.getTime()>=S.getTime()&&n[T+1].getTime()<S.getTime()&&(O=h().createElement("rect",{x:x+a,y:0,width:a,height:d,fill:l})),x+=a}return h().createElement("g",{className:(0,q.cx)("gridBody",u.nbGridbody)},h().createElement("g",{className:"rows"},f),h().createElement("g",{className:"rowLines"},p),h().createElement("g",{className:"ticks"},k),h().createElement("g",{className:"today"},O))},eC=function(e){return h().createElement("g",{className:"grid"},h().createElement(ej,e))};function eD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eM(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,i=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(i)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eD(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){var t,n,r,o,a=e.taskFrom,l=e.taskTo,i=e.rowHeight,c=e.taskHeight,u=e.arrowIndent;return e.rtl?(t=(r=eM(eR(a,l,i,c,u),2))[0],n=r[1]):(t=(o=eM(eF(a,l,i,c,u),2))[0],n=o[1]),h().createElement("g",{className:"arrow"},h().createElement("path",{strokeWidth:"1.5",d:t,fill:"none"}),h().createElement("polygon",{points:n}))},eF=function(e,t,n,r,o){var a=e.index>t.index?-1:1,l=t.y+r/2,i=e.x2+2*o,c=i<t.x1?"":"H ".concat(t.x1-o),u=i>t.x1?o:t.x1-e.x2-o;return["M ".concat(e.x2," ").concat(e.y+r/2," \n h ").concat(o," \n v ").concat(a*n/2," \n ").concat(c,"\n V ").concat(l," \n h ").concat(u),"".concat(t.x1,",").concat(l," \n ").concat(t.x1-5,",").concat(l-5," \n ").concat(t.x1-5,",").concat(l+5)]},eR=function(e,t,n,r,o){var a=e.index>t.index?-1:1,l=t.y+r/2,i=e.x1-2*o,c=i>t.x2?"":"H ".concat(t.x2+o),u=i<t.x2?-o:t.x2-e.x1+o;return["M ".concat(e.x1," ").concat(e.y+r/2," \n h ").concat(-o," \n v ").concat(a*n/2," \n ").concat(c,"\n V ").concat(l," \n h ").concat(u),"".concat(t.x2,",").concat(l," \n ").concat(t.x2+5,",").concat(l+5," \n ").concat(t.x2+5,",").concat(l-5)]},eN=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,a=e.barCornerRadius,l=e.onMouseDown;return h().createElement("rect",{x:t,y:n,width:r,height:o,className:"barHandle",role:"button",ry:a,rx:a,onMouseDown:l})};function ez(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function eI(){var e=ez(["\n cursor: pointer;\n outline: none;\n .barHandle {\n fill: #ddd;\n cursor: ew-resize;\n opacity: 0;\n }\n &:hover .barHandle {\n opacity: 1;\n }\n &:hover .barProgressHandle {\n opacity: 1;\n }\n"]);return eI=function(){return e},e}function eW(){var e=ez(["\n user-select: none;\n stroke-width: 0;\n opacity: 0.6;\n"]);return eW=function(){return e},e}var eH=(0,q.css)(eI()),eB=(0,q.css)(eW()),eL=function(e){var t=e.x,n=e.y,r=e.color,o=e.width,a=e.height,l=e.isSelected,i=e.progressX,c=e.progressWidth,u=e.barCornerRadius,s=e.styles,d=e.onMouseDown;return h().createElement("g",{onMouseDown:d},h().createElement("rect",{x:t,width:o,y:n,height:a,ry:u,rx:u,fill:r||(l?s.backgroundSelectedColor:s.backgroundColor),className:(0,q.cx)(eB)}),h().createElement("rect",{x:i,width:c,y:n,height:a,ry:u,rx:u,fill:r||(l?s.progressSelectedColor:s.progressColor)}))},e_=function(e){var t=e.progressPoint,n=e.onMouseDown;return h().createElement("polygon",{className:"barHandle barProgressHandle",points:t,onMouseDown:n})},eG=function(e){var t=e.task,n=e.isProgressChangeable,r=e.isDateChangeable,o=e.rtl,a=e.onEventStart,l=e.isSelected,i=M(!o*t.progressWidth+t.progressX,t.y,t.height),c=t.height-2;return h().createElement("g",{className:(0,q.cx)(eH),"aria-label":"task-bar",tabIndex:0},h().createElement(eL,{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:l,onMouseDown:function(e){r&&a("move",t,e)}}),h().createElement("g",{className:"handleGroup"},r&&h().createElement("g",null,h().createElement(eN,{x:t.x1+1,y:t.y+1,width:t.handleWidth,height:c,barCornerRadius:t.barCornerRadius,onMouseDown:function(e){a("start",t,e)}}),h().createElement(eN,{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)}})),n&&h().createElement(e_,{progressPoint:i,onMouseDown:function(e){a("progress",t,e)}})))},eY=function(e){var t=e.task,n=e.isProgressChangeable,r=e.isDateChangeable,o=e.onEventStart,a=e.isSelected,l=M(t.progressWidth+t.x1+10,t.y,t.height);return h().createElement("g",{className:(0,q.cx)(eH),tabIndex:0},h().createElement(eL,{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){r&&o("move",t,e)}}),h().createElement("g",{className:"handleGroup"},n&&h().createElement(e_,{progressPoint:l,onMouseDown:function(e){o("progress",t,e)}})))};function eU(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function eX(){var e=eU(["\n cursor: pointer;\n outline: none;\n"]);return eX=function(){return e},e}function eK(){var e=eU(["\n user-select: none;\n"]);return eK=function(){return e},e}var eV=(0,q.css)(eX()),eZ=(0,q.css)(eK()),eq=function(e){var t=e.task,n=e.isDateChangeable,r=e.onEventStart,o=e.isSelected,a="rotate(45 ".concat(t.x1+.356*t.height," \n ").concat(t.y+.85*t.height,")");return h().createElement("g",{tabIndex:0,className:(0,q.cx)(eV)},h().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,q.cx)(eZ),onMouseDown:function(e){n&&r("move",t,e)}}))};function eQ(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function e$(){var e=eQ(["\n cursor: pointer;\n outline: none;\n"]);return e$=function(){return e},e}function eJ(){var e=eQ(["\n user-select: none;\n opacity: 0.6;\n"]);return eJ=function(){return e},e}function e0(){var e=eQ(["\n user-select: none;\n"]);return e0=function(){return e},e}var e1=(0,q.css)(e$()),e2=(0,q.css)(eJ());(0,q.css)(e0());var e5=function(e){var t=e.task,n=e.isSelected,r=n?t.styles.backgroundSelectedColor:t.styles.backgroundColor,o=n?t.styles.progressSelectedColor:t.styles.progressColor,a=t.x2-t.x1;return h().createElement("g",{tabIndex:0,className:(0,q.cx)(e1)},h().createElement("rect",{fill:t.color||r,x:t.x1,width:a,y:t.y,height:t.height,rx:t.barCornerRadius,ry:t.barCornerRadius,className:(0,q.cx)(e2)}),h().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 e6(){var e,t,n=(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 e6=function(){return n},n}var e3=(0,Q.createStyles)(function(e){var t=e.token;return{nbganttTaskitem:(0,e.css)(e6(),t.colorTextLightSolid,t.colorTextLabel)}});function e4(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var e8=function(e){var t,n,r,o=e3().styles,a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),l=a.task,i=a.arrowIndent,c=a.isDelete,u=a.taskHeight,s=a.rtl,d=a.onEventStart,f=(0,p.useRef)(null),g=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(!0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(t=r.next()).done)&&(o.push(t.value),2!==o.length);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return e4(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e4(e,2)}}(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.")}(),b=g[0],y=g[1],v="project"===l.typeInternal;return(0,p.useEffect)(function(){f.current&&y(f.current.getBBox().width<l.x2-l.x1)},[f,l]),h().createElement("g",{className:(0,q.cx)(o.nbganttTaskitem),onKeyDown:function(e){"Delete"===e.key&&c&&d("delete",l,e),e.stopPropagation()},onMouseEnter:function(e){d("mouseenter",l,e)},onMouseLeave:function(e){d("mouseleave",l,e)},onDoubleClick:function(e){d("dblclick",l,e)},onClick:function(e){d("click",l,e)},onFocus:function(){d("select",l)}},function(){switch(l.typeInternal){case"milestone":return h().createElement(eq,e);case"project":return h().createElement(e5,e);case"smalltask":return h().createElement(eY,e);default:return h().createElement(eG,e)}}(),h().createElement("text",{x:v?l.x1:(n=l.x2-l.x1,r=l.barChildren.length>0,b?l.x1+.5*n:s&&f.current?l.x1-f.current.getBBox().width-i*r-.2*i:l.x1+n+i*r+.2*i),y:v?l.y-8:l.y+.65*u,className:v?(0,q.cx)("projectLabel"):b?(0,q.cx)("barLabel"):(0,q.cx)("barLabelOutside"),ref:f},v&&ei(l.start)&&ei(l.end)?"".concat(l.name,": ").concat(ei(l.start)," ~ ").concat(ei(l.end)):l.name))};function e7(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function e9(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){n(e);return}i.done?t(c):Promise.resolve(c).then(r,o)}function te(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function l(e){e9(a,r,o,l,i,"next",e)}function i(e){e9(a,r,o,l,i,"throw",e)}l(void 0)})}}function tt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,i=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(i)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return e7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e7(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 tn(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(l,"next",{value:c(0)}),i(l,"throw",{value:c(1)}),i(l,"return",{value:c(2)}),"function"==typeof Symbol&&i(l,Symbol.iterator,{value:function(){return this}}),l;function c(i){return function(c){var u=[i,c];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var tr=function(e){var t=e.tasks,n=e.dates,r=e.ganttEvent,o=e.selectedTask,a=e.rowHeight,l=e.columnWidth,i=e.timeStep,c=e.svg,u=e.taskHeight,s=e.arrowColor,d=e.arrowIndent,f=e.fontFamily,g=e.fontSize,b=e.rtl,y=e.setGanttEvent,v=e.setFailedTask,m=e.setSelectedTask,w=e.onDateChange,S=e.onProgressChange,x=e.onDoubleClick,k=e.onClick,O=e.onDelete,T=e.enableDragToReschedule,P=void 0===T||T,E=tt((0,p.useState)(0),2),j=E[0],C=E[1],D=tt((0,p.useState)(0),2),M=D[0],A=D[1],F=(0,p.useRef)(null),R=(0,p.useRef)(null),N=(0,p.useRef)(r),I=(0,p.useRef)(j),W=(0,p.useRef)(M),H=(0,p.useRef)(b),B=(0,p.useRef)(null);N.current=r,I.current=j,W.current=M,H.current=b;var L=(0,p.useMemo)(function(){return new Map(t.map(function(e){return[String(e.id),e]}))},[t]),_=!!r.changedTask;(0,p.useEffect)(function(){return function(){B.current&&clearTimeout(B.current)}},[]),(0,p.useEffect)(function(){var e,t,r,o;C(i*l/((null==(e=n[1])?void 0:e.getTime())-(null==(t=n[0])?void 0:t.getTime())-(null==(r=n[1])?void 0:r.getTimezoneOffset())*6e4+(null==(o=n[0])?void 0:o.getTimezoneOffset())*6e4))},[l,n,i]);var G=(0,p.useCallback)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==c?void 0:c.current,n=null==t?void 0:t.getScreenCTM();if(!t||!n)return null;var r=t.createSVGPoint();return r.x=e.clientX,r.matrixTransform(n.inverse()).x},[c]);(0,p.useEffect)(function(){var e=null==c?void 0:c.current,t=function(t){return te(function(){var n,r,o,a,l;return tn(this,function(c){var u,s;return(n=N.current).changedTask&&e&&(t.preventDefault(),null!==(r=G(t,e)))?(a=(o=z(r,n.action,n.changedTask,I.current,i,W.current,H.current)).isChanged,l=o.changedTask,a&&y((u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},n),s=s={changedTask:l},Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(s)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(s)).forEach(function(e){Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(s,e))}),u)),[2]):[2]})})()},n=function(r){return te(function(){var o,a,l,c,u,s,d,f,p,h;return tn(this,function(g){switch(g.label){case 0:if(a=(o=N.current).action,l=o.originalSelectedTask,!(c=o.changedTask)||!e||!l||(r.preventDefault(),null===(u=G(r,e))))return window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n),y({action:""}),[2];if(s=z(u,a,c,I.current,i,W.current,H.current).changedTask,d=l.start!==s.start||l.end!==s.end||l.progress!==s.progress,window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n),y({action:""}),f=!0,!(("move"===a||"end"===a||"start"===a)&&w&&d))return[3,5];g.label=1;case 1:return g.trys.push([1,3,,4]),[4,w(s,s.barChildren)];case 2:return void 0!==(p=g.sent())&&(f=p),[3,4];case 3:return g.sent(),f=!1,[3,4];case 4:return[3,9];case 5:if(!(S&&d))return[3,9];g.label=6;case 6:return g.trys.push([6,8,,9]),[4,S(s,s.barChildren)];case 7:return void 0!==(h=g.sent())&&(f=h),[3,9];case 8:return g.sent(),f=!1,[3,9];case 9:return f||v(l),[2]}})})()};return("move"===r.action||"end"===r.action||"start"===r.action||"progress"===r.action)&&_&&e&&(window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)),function(){window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)}},[r.action,_,S,i,w,c,G,v,y]);var Y=function(e,t,n){return te(function(){var r,o,a,l;return tn(this,function(i){switch(i.label){case 0:if(n)return[3,1];return"select"===e&&m(t.id),[3,7];case 1:if(void 0===n.key)return[3,6];if("delete"!==e||!O)return[3,5];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,O(t)];case 3:return void 0!==(r=i.sent())&&r&&y({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)B.current&&(clearTimeout(B.current),B.current=null),(o=N.current).action&&"mouseenter"!==o.action||y({action:e,changedTask:t,originalSelectedTask:t});else if("mouseleave"===e)a=t.id,"mouseenter"===N.current.action&&(B.current&&clearTimeout(B.current),B.current=setTimeout(function(){var e,t=N.current;"mouseenter"===t.action&&(null==(e=t.changedTask)?void 0:e.id)===a&&y({action:""}),B.current=null},300));else if("dblclick"===e)x&&x(t);else if("click"===e)"rect"===n.target.tagName&&(y({action:""}),k&&k(t));else if("move"===e){if(null===(l=G(n)))return[2];A(l-t.x1),y({action:e,changedTask:t,originalSelectedTask:t})}else y({action:e,changedTask:t,originalSelectedTask:t});i.label=7;case 7:return[2]}})})()},U=function(e,t,n){["click"].includes(e)?(["start","end","progress"].includes(F.current)||R.current&&R.current!==t.start||Y(e,t,n),F.current=null,R.current=null):(["move","select"].includes(e)?R.current=t.start:(R.current=t.start,F.current=e),Y(e,t,n))};return h().createElement("g",{className:"content"},h().createElement("g",{className:"arrows",fill:s,stroke:s},t.map(function(e){return e.barChildren.map(function(t){var n=L.get(String(t.id));return n?h().createElement(eA,{key:"Arrow from ".concat(e.id," to ").concat(t.id),taskFrom:e,taskTo:n,rowHeight:a,taskHeight:u,arrowIndent:d,rtl:b}):null})})),h().createElement("g",{className:"bar",fontFamily:f,fontSize:g},t.map(function(e){return h().createElement(e8,{task:e,arrowIndent:d,taskHeight:u,isProgressChangeable:!!S&&!e.isDisabled,isDateChangeable:P&&!!w&&!e.isDisabled,isDelete:!e.isDisabled,onEventStart:U,key:e.id,isSelected:!!o&&e.id===o.id,rtl:b})})))};function to(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ta(){var e=to(["\n overflow: hidden;\n font-size: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n border-left: 2px solid ",";\n overflow-x: hidden;\n .ganttHeader {\n border-bottom: 1px solid ",";\n font-weight: normal;\n }\n .ganttBody {\n border-bottom: 1px solid ",";\n }\n "]);return ta=function(){return e},e}function tl(){var e=to(["\n margin: 0;\n padding: 0;\n overflow: hidden;\n "]);return tl=function(){return e},e}function ti(){var e=to(["\n display: flex;\n padding: 0;\n margin: 0;\n list-style: 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 ti=function(){return e},e}var tc=(0,Q.createStyles)(function(e){var t=e.token,n=e.css;return{ganttverticalcontainer:n(ta(),t.colorBorderSecondary,t.colorBorderSecondary,t.colorBorderSecondary),horizontalcontainer:n(tl()),wrapper:n(ti())}}),tu=(0,p.forwardRef)(function(e,t){var n,r,o=e.gridProps,a=e.calendarProps,l=e.barProps,i=e.ganttHeight,c=e.ganttFullHeight,u=e.scrollY,s=e.onHorizontalScroll,d=e.showLeftBorder,g=(0,p.useRef)(null),b=(0,p.useRef)(null),y=(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},l),r=r={svg:g},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n),v=tc().styles;return(0,p.useEffect)(function(){b.current&&(b.current.scrollTop=u)},[u]),(0,p.useEffect)(function(){var e=t.current;if(e&&s){var n=function(){s(e.scrollLeft)};return e.addEventListener("scroll",n),function(){e.removeEventListener("scroll",n)}}},[s,t]),h().createElement("div",{className:v.ganttverticalcontainer,ref:t,dir:"ltr",style:{borderLeft:void 0===d||d?void 0:"none"}},h().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:o.svgWidth,height:a.headerHeight,fontFamily:l.fontFamily,className:"ganttHeader"},h().createElement(ex,a)),h().createElement(f.Spin,{spinning:null==l?void 0:l.loading},h().createElement("div",{ref:b,className:v.horizontalcontainer,style:i?{maxHeight:i,width:o.svgWidth}:{width:o.svgWidth}},h().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:o.svgWidth,height:null!=c?c:l.rowHeight*l.tasks.length,fontFamily:l.fontFamily,ref:g,className:"ganttBody"},h().createElement(eC,o),h().createElement(tr,y)))))});tu.displayName="TaskGantt";var ts=function(e,t){var n,r,o=null==(r=e.collection)||null==(n=r.getFilterByTK)?void 0:n.call(r,t);return null!=o?(void 0===o?"undefined":o&&"u">typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)=="object"?JSON.stringify(o):String(o):String(null==t?void 0:t.id)},td=function(e){return(null==e?void 0:e.getBoundingClientRect().height)||0},tf=function(e){var t=[];return null==e||e.split(".").forEach(function(e){isNaN(Number(e))||t.push(String(Number(e)+1))}),t.join(".")},tp=function(e){var t=e.page,n=e.pageSize,r=e.rowIndex,o=e.rowPath;return o?tf(o):r+((t||1)-1)*(n||20)+1};function th(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tg(){var e=th(["\n .ant-table-container::after {\n box-shadow: none !important;\n }\n "]);return tg=function(){return e},e}function tb(){var e=th(["\n position: relative;\n display: flex;\n align-items: stretch;\n width: 100%;\n overflow: hidden;\n border: 1px solid ",";\n border-radius: ","px;\n "]);return tb=function(){return e},e}function ty(){var e=th(["\n flex: 0 0 min(","px, calc(100% - 160px));\n width: min(","px, calc(100% - 160px));\n max-width: calc(100% - 160px);\n min-width: ","px;\n background: ",";\n border-inline-end: 1px solid ",";\n overflow: hidden;\n ","\n "]);return ty=function(){return e},e}function tv(){var e=th(["\n .ant-table {\n background: ",";\n }\n .ant-table-cell {\n border-color: ",";\n white-space: nowrap;\n }\n .nb-gantt-table-index {\n opacity: 0;\n }\n .nb-gantt-row-selection:not(.checked) .nb-gantt-table-index {\n opacity: 1;\n }\n .nb-gantt-row-selection:hover .nb-gantt-table-index {\n opacity: 0;\n }\n .nb-gantt-origin-node {\n opacity: 0;\n pointer-events: none;\n }\n .nb-gantt-row-selection:hover .nb-gantt-origin-node,\n .nb-gantt-origin-node.checked {\n opacity: 1;\n pointer-events: auto;\n }\n ","\n "]);return tv=function(){return e},e}function tm(){var e=th(["\n flex: 1 1 auto;\n min-width: 0;\n position: relative;\n ","\n ","\n "]);return tm=function(){return e},e}function tw(){var e=th(["\n display: flex;\n justify-content: flex-end;\n padding-top: ","px;\n "]);return tw=function(){return e},e}var tS=function(e){var t=e.token,n=e.tableWidth,r=e.hasVerticalScroll,o=e.hasHorizontalScroll,a=e.hasHorizontalTableScroll;return{tableClass:(0,q.cx)((0,q.css)(tg())),contentClass:(0,q.cx)((0,q.css)(tb(),t.colorBorderSecondary,t.borderRadius)),actionsColumnClass:(0,q.cx)((0,q.css)(ty(),n,n,Math.min(n,120),t.colorBgContainer,t.colorBorderSecondary,o&&!a?"padding-bottom: 16px;":"")),actionsTableClass:(0,q.cx)((0,q.css)(tv(),t.colorBgContainer,t.colorSplit,r?"\n .ant-table-body,\n .ant-table-content {\n overflow-y: scroll !important;\n scrollbar-gutter: stable;\n }\n ":"")),chartClass:(0,q.cx)((0,q.css)(tm(),o?"padding-bottom: 16px;":"",r?"padding-inline-end: 1rem;":"")),paginationClass:(0,q.cx)((0,q.css)(tw(),t.paddingSM))}};function tx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tk(e,t){if(e){if("string"==typeof e)return tx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tx(e,t)}}var tO="__ganttChildren",tT=function(e){var t=e.project;return null==t?void 0:String(t)},tP=function(e){var t=new Map,n=new Map;return e.forEach(function(e){t.set(String(e.id),e)}),e.forEach(function(e){var r=tT(e);if(r&&t.has(r)){var o=n.get(r)||[];o.push(e),n.set(r,o)}}),{childrenByParent:n,getDepth:function(e){for(var n=0,r=tT(e),o=new Set;r&&!o.has(r);){o.add(r);var a=t.get(r);if(!a)break;n+=1,r=tT(a)}return n},roots:e.filter(function(e){var n=tT(e);return!n||!t.has(n)})}},tE=function(e){var t=e.expandedRowKeySet,n=e.tasks;if(!e.treeTableEnabled)return n;var r=tP(n),o=r.childrenByParent,a=r.roots,l=[],i=function(e){l.push(e);var n=o.get(String(e.id))||[];n.length&&t.has(String(e.id))&&n.forEach(i)};return a.forEach(i),l},tj=function(e){var t=tP(e).childrenByParent;return e.filter(function(e){return(t.get(String(e.id))||[]).length>0}).map(function(e){return String(e.id)})},tC=function(e){var t=e.tasks;return e.treeTableEnabled?t:((function(e){if(Array.isArray(e))return tx(e)})(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||tk(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(el)},tD=function(e){var t=e.tasks,n=e.treeTableEnabled,r=tC({tasks:t,treeTableEnabled:n}),o=tP(r),a=o.childrenByParent,l=o.getDepth,i=o.roots,c=0,u=function(e,t,r){var o,i,s=a.get(String(e.id))||[],d=r?"".concat(r,".children.").concat(t):"".concat(t),f=(o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e.record),i=i={__index:d,__ganttTaskId:e.id,__ganttTaskIndex:c++,__ganttTaskIndexPath:d,__ganttTaskDepth:l(e),__ganttHasChildren:s.length>0},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}),o);return n&&s.length&&(f[tO]=s.map(function(e,t){return u(e,t,d)})),f};return n?i.map(function(e,t){return u(e,t)}):r.map(function(e,t){return u(e,t)})},tM=function(e){var t,n=e.model,r=e.tasks,o=e.tableColumns,a=n.isTreeTableEnabled(),l=n.shouldDefaultExpandAllRows(),i=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)([]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(t=r.next()).done)&&(o.push(t.value),2!==o.length);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw n}}return o}}(t)||tk(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=i[0],u=i[1],s=(0,p.useMemo)(function(){return new Set(c.map(function(e){return String(e)}))},[c]),d=(0,p.useMemo)(function(){return tC({tasks:r,treeTableEnabled:a})},[r,a]),f=(0,p.useMemo)(function(){return tj(d)},[d]),h=(0,p.useMemo)(function(){return tE({expandedRowKeySet:s,tasks:d,treeTableEnabled:a})},[s,d,a]),g=(0,p.useMemo)(function(){return tD({tasks:d,treeTableEnabled:a})},[d,a]);(0,p.useEffect)(function(){if(!a){u([]),n.setTreeExpandFlag(!1);return}l&&u(f)},[l,f,n,a]),(0,p.useEffect)(function(){if(a){var e=function(){u(f)},t=function(){u([])};return n.emitter.on("expandAllTreeRows",e),n.emitter.on("collapseAllTreeRows",t),function(){n.emitter.off("expandAllTreeRows",e),n.emitter.off("collapseAllTreeRows",t)}}},[f,n,a]),(0,p.useEffect)(function(){var e=new Set(c.map(function(e){return String(e)})),t=a&&f.length>0&&f.every(function(t){return e.has(String(t))});n.setTreeExpandFlag(t)},[f,c,n,a]);var b=(0,p.useMemo)(function(){if(a)return{expandedRowKeys:c,onExpand:function(e,t){u(function(n){var r=String(t.__ganttTaskId),o=new Set(n.map(function(e){return String(e)}));return e?o.add(r):o.delete(r),Array.from(o)})}}},[c,a]);return{treeTableEnabled:a,visibleTasks:h,tableRecords:g,resolvedTableColumns:o,expandable:b}};function tA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tF(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){n(e);return}i.done?t(c):Promise.resolve(c).then(r,o)}function tR(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function l(e){tF(a,r,o,l,i,"next",e)}function i(e){tF(a,r,o,l,i,"throw",e)}l(void 0)})}}function tN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tz(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function tI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){tN(e,t,n[t])})}return e}function tW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,i=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(i)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tA(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 tH(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(l,"next",{value:c(0)}),i(l,"throw",{value:c(1)}),i(l,"return",{value:c(2)}),"function"==typeof Symbol&&i(l,Symbol.iterator,{value:function(){return this}}),l;function c(i){return function(c){var u=[i,c];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var tB=(0,d.observer)(function(e){var t,n,r,o,a,l,i,c,u,s=e.model,d=f.theme.useToken().token,g=s.props||{},y=g.ganttHeight,v=void 0===y?0:y,m=g.preStepsCount,w=void 0===m?1:m,x=g.barFill,k=void 0===x?60:x,O=g.barCornerRadius,T=void 0===O?d.borderRadiusXS:O,P=g.barProgressColor,E=void 0===P?d.colorPrimary:P,j=g.barProgressSelectedColor,C=void 0===j?d.colorPrimary:j,D=g.barBackgroundColor,M=void 0===D?d.colorPrimary:D,A=g.barBackgroundSelectedColor,F=void 0===A?d.colorPrimary:A,R=g.projectProgressColor,N=void 0===R?d.colorPrimary:R,z=g.projectProgressSelectedColor,I=void 0===z?d.colorPrimary:z,W=g.projectBackgroundColor,H=void 0===W?d.colorPrimary:W,B=g.projectBackgroundSelectedColor,L=void 0===B?d.colorPrimary:B,_=g.milestoneBackgroundColor,G=void 0===_?d.colorWarning:_,X=g.milestoneBackgroundSelectedColor,K=void 0===X?d.colorWarningActive:X,V=g.rtl,Z=void 0!==V&&V,q=g.handleWidth,Q=void 0===q?d.sizeXXS:q,$=g.timeStep,J=g.arrowColor,ee=void 0===J?d.colorTextSecondary:J,et=g.fontFamily,en=void 0===et?d.fontFamily:et,er=g.fontSize,eo=void 0===er?d.fontSize:er,el=g.arrowIndent,ei=void 0===el?d.margin:el,ec=g.todayColor,eu=void 0===ec?d.colorFillQuaternary:ec,ep=g.viewDate,eh=g.TooltipContent,eg=g.enableDragToReschedule,eb=d.controlHeight+d.paddingSM,ey=d.controlHeightLG+d.marginLG,ev=s.getFieldNames().range||"day",em=(0,p.useRef)(null),ew=(0,p.useRef)(null),eS=(0,p.useRef)(null),ex=(0,p.useRef)(null),ek=(0,p.useRef)(null),eO=(0,p.useRef)(null),eT=tW((0,p.useState)({headerHeight:eb,rowHeight:ey}),2),eP=eT[0],eE=eT[1],ej=tW((0,p.useState)(function(){return s.getTasks()}),2),eC=ej[0],eD=ej[1],eM=tW((0,p.useState)(function(){var e=tW(Y(eC,ev,w),2);return{viewMode:ev,dates:U(e[0],e[1],ev)}}),2),eA=eM[0],eF=eM[1],eR=tW((0,p.useState)(void 0),2),eN=eR[0],ez=eR[1],eI=tW((0,p.useState)(0),2),eW=eI[0],eH=eI[1],eB=tW((0,p.useState)(0),2),eL=eB[0],e_=eB[1],eG=tW((0,p.useState)(v),2),eY=eG[0],eU=eG[1],eX=tW((0,p.useState)([]),2),eK=eX[0],eV=eX[1],eZ=tW((0,p.useState)({action:""}),2),eq=eZ[0],eQ=eZ[1],e$=eP.headerHeight,eJ=eP.rowHeight,e0=(0,p.useMemo)(function(){return eJ*k/100},[eJ,k]),e1=tW((0,p.useState)(),2),e2=e1[0],e5=e1[1],e6=tW((0,p.useState)(null),2),e3=e6[0],e4=e6[1],e8=tW((0,p.useState)(0),2),e7=e8[0],e9=e8[1],te=(0,p.useRef)(!1),tt=(0,p.useRef)(-1),tn=(0,p.useMemo)(function(){return(0,b.debounce)(function(e){return tR(function(){var t,n,r;return tH(this,function(o){switch(o.label){case 0:return n=s.getFieldNames(),[4,s.resource.update(s.getRecordFilterByTk(e.record,e.id),(tN(r={},n.start,e.start),tN(r,n.end,e.end),r))];case 1:return o.sent(),null==(t=s.context.message)||t.success(s.context.t("Saved successfully")),[2]}})})()},300)},[s]),tr=(0,p.useMemo)(function(){return(0,b.debounce)(function(e){return tR(function(){var t,n;return tH(this,function(r){switch(r.label){case 0:return n=s.getFieldNames(),[4,s.resource.update(s.getRecordFilterByTk(e.record,e.id),tN({},n.progress,e.progress/100))];case 1:return r.sent(),null==(t=s.context.message)||t.success(s.context.t("Saved successfully")),[2]}})})()},300)},[s]),to=(t=eA.dates.length,(n=null==(a=ew.current)?void 0:a.clientWidth)/t>50?Math.floor(n/t)+20:60),ta=eA.dates.length*to,tl=eK.length*eJ,ti=v?Math.min(v,tl):void 0,tc=!!ti&&tl>ti,tf=s.resource.loading,th=s.resource.getData(),tg=null==(l=s.props)?void 0:l.fieldNames,tb=null==(i=s.props)?void 0:i.enableDragToReschedule,ty=(null==(c=s.props)?void 0:c.showTable)!==!1,tv=s.shouldShowRowNumbers(),tm=s.getColumns().filter(function(e){return(null==e?void 0:e.key)!=="empty"}),tw=ty&&tm.length>0,tx=s.isTreeTableEnabled(),tk=s.getAutoTableWidth(),tT=s.getTableWidth(),tP=tk>(eW||tT)+1,tE=eL||(null==(u=ek.current)?void 0:u.offsetWidth)||0,tj=tE>0&&ta>tE+1,tC=ti?tI({y:ti},tP?{x:tk}:{}):tP?{x:tk}:void 0,tD=tS({token:d,tableWidth:tT,hasVerticalScroll:tc,hasHorizontalScroll:tj,hasHorizontalTableScroll:tP}),tA=tD.tableClass,tF=tD.contentClass,tB=tD.actionsColumnClass,tL=tD.actionsTableClass,t_=tD.chartClass,tG=tD.paginationClass,tY=tM({model:s,tasks:eC,tableColumns:tm}),tU=tY.visibleTasks,tX=tY.tableRecords,tK=tY.resolvedTableColumns,tV=tY.expandable,tZ=s.resource.getSelectedRows().map(function(e){return ts(s,e)}),tq=s.pagination(),tQ=(0,p.useCallback)(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto",r=Math.max(0,e);if(!(1>=Math.abs(tt.current-r))){tt.current=r;var o=ew.current,a=eS.current;"chart"!==t&&o&&Math.abs(o.scrollLeft-r)>1&&("smooth"===n&&"function"==typeof o.scrollTo?o.scrollTo({left:r,behavior:n}):o.scrollLeft=r),"scrollbar"!==t&&a&&Math.abs(a.scrollLeft-r)>1&&("smooth"===n&&"function"==typeof a.scrollTo?a.scrollTo({left:r,behavior:n}):a.scrollLeft=r)}},[]),t$=(0,p.useCallback)(function(e){eS.current=e,e&&tt.current>=0&&tQ(tt.current)},[tQ]),tJ=(0,p.useCallback)(function(e){tQ(e,"chart")},[tQ]),t0=(0,p.useCallback)(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",r=(t=eA.dates).findIndex(function(n,r){return e.valueOf()>=n.valueOf()&&r+1!==t.length&&e.valueOf()<t[r+1].valueOf()});return -1!==r&&(tQ(to*r,void 0,n),!0)},[to,eA.dates,tQ]);(0,p.useEffect)(function(){eD(s.getTasks())},[s,th,tg,tb]),(0,p.useEffect)(function(){return function(){tn.cancel(),tr.cancel()}},[tr,tn]),(0,p.useEffect)(function(){var e=eO.current;if(e){var t=0,n=function(){cancelAnimationFrame(t),t=requestAnimationFrame(function(){var t=td(e.querySelector(".ant-table-thead > tr:not(.ant-table-measure-row)")||e.querySelector(".ant-table-thead > tr")||e.querySelector(".ant-table-thead")),n=td(e.querySelector(".ant-table-tbody > tr.ant-table-row")||e.querySelector(".ant-table-tbody > tr:not(.ant-table-measure-row)")||e.querySelector(".ant-table-row"));eH(e.clientWidth),eE(function(e){var r=t||e.headerHeight,o=n||e.rowHeight;return e.headerHeight===r&&e.rowHeight===o?e:{headerHeight:r,rowHeight:o}})})};n();var r=new ResizeObserver(n);return r.observe(e),e.querySelectorAll(".ant-table-thead, .ant-table-tbody, .ant-table-thead > tr, .ant-table-tbody > tr, .ant-table-row, .ant-table-body, .ant-table-content").forEach(function(e){return r.observe(e)}),function(){cancelAnimationFrame(t),r.disconnect()}}},[ti,tP,tm.length,tX.length]),(0,p.useEffect)(function(){var e=tW(Y(tU,ev,w),2),t=U(e[0],e[1],ev);Z&&(t=t.reverse(),-1===tt.current&&tQ(t.length*to)),eF({dates:t,viewMode:ev}),eV(S(tU,t,to,eJ,e0,T,Q,Z,E,C,M,F,N,I,H,L,G,K))},[tU,ev,w,eJ,T,to,e0,Q,E,C,M,F,N,I,H,L,G,K,Z,tx,tQ]),(0,p.useEffect)(function(){ev===eA.viewMode&&(ep&&!eN||ep&&(null==eN?void 0:eN.valueOf())!==ep.valueOf())&&t0(ep)&&ez(ep)},[ep,eA.viewMode,ev,eN,ez,t0]),(0,p.useEffect)(function(){var e=function(e){tz(e,Date)?t0(e):tz(null==e?void 0:e.date,Date)&&t0(e.date,e.behavior)};return s.emitter.on("scrollToDate",e),function(){s.emitter.off("scrollToDate",e)}},[s,t0]),(0,p.useEffect)(function(){var e=eq.changedTask,t=eq.action;if(e){if("delete"===t)eQ({action:""}),eV(eK.filter(function(t){return t.id!==e.id}));else if("move"===t||"end"===t||"start"===t||"progress"===t){var n=eK.find(function(t){return t.id===e.id});n&&n.start&&n.end&&(n.start.getTime()!==e.start.getTime()||n.end.getTime()!==e.end.getTime()||n.progress!==e.progress)&&(eV(eK.map(function(t){return t.id===e.id?e:t})),eD(function(t){return t.map(function(t){return t.id===e.id?e:t})}))}}},[eq,eK]),(0,p.useEffect)(function(){e3&&(eV(eK.map(function(e){return e.id!==e3.id?e:e3})),e4(null))},[e3,eK]),(0,p.useEffect)(function(){if(em.current){var e;e_((null==(e=ek.current)?void 0:e.offsetWidth)||em.current.offsetWidth)}},[em,tT]),(0,p.useEffect)(function(){v?eU((ti||0)+e$):eU(tl+e$)},[ti,v,tl,e$]),(0,p.useEffect)(function(){var e,t=null==(e=eO.current)?void 0:e.querySelector(".ant-table-body");t&&t.scrollTop!==e7&&(te.current=!0,t.scrollTop=e7,requestAnimationFrame(function(){te.current=!1}))},[e7]),(0,p.useEffect)(function(){var e,t=null==(e=eO.current)?void 0:e.querySelector(".ant-table-body");if(t){var n=function(){te.current||t.scrollTop!==e7&&e9(t.scrollTop)};return t.addEventListener("scroll",n),function(){t.removeEventListener("scroll",n)}}},[e7]),(0,p.useEffect)(function(){var e=em.current,t=function(e){if(e.shiftKey||e.deltaX){var t=e.deltaX?e.deltaX:e.deltaY,n=tt.current+t;n<0?n=0:n>ta&&(n=ta),tQ(n),e.preventDefault()}else if(v){var r=e7+e.deltaY;r<0?r=0:r>tl-v&&(r=tl-v),r!==e7&&(e9(r),e.preventDefault())}};return null==e||e.addEventListener("wheel",t,{passive:!1}),function(){null==e||e.removeEventListener("wheel",t)}},[em,e7,v,ta,Z,tl,tQ]);var t1=(0,p.useCallback)(function(e,t){return tR(function(){var n;return tH(this,function(r){switch(r.label){case 0:return n=s.normalizePageSize(t),s.resource.getPageSize()!==n?s.resource.setPage(1):s.resource.setPage(e),s.resource.loading=!0,s.resource.setPageSize(n),[4,s.resource.refresh()];case 1:return r.sent(),e9(0),[2]}})})()},[s]),t2=(0,p.useCallback)(function(e,t,n,r){if(!tv)return r;var o=Number.isFinite(Number(t.__ganttTaskIndex))?Number(t.__ganttTaskIndex):n,a=tp({page:s.resource.getPage(),pageSize:s.resource.getPageSize(),rowIndex:o,rowPath:t.__ganttTaskIndexPath});return h().createElement("div",{role:"button","aria-label":"table-index-".concat(a),className:"nb-gantt-row-selection".concat(e?" checked":""),style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",minHeight:16,paddingRight:0}},h().createElement("div",{className:"nb-gantt-table-index",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},a),h().createElement("div",{className:"nb-gantt-origin-node".concat(e?" checked":""),style:{position:"absolute",right:"50%",transform:"translateX(50%)"}},r))},[s.resource,tv]),t5=function(e){e5(eK.find(function(t){return t.id===e}))},t6={columnWidth:to,svgWidth:ta,tasks:eK,rowHeight:eJ,dates:eA.dates,todayColor:eu,rtl:Z,selectedRowKeys:tZ},t3={dateSetup:eA,locale:s.context.locale||"en-US",viewMode:ev,headerHeight:e$,columnWidth:to,fontFamily:en,fontSize:eo,rtl:Z},t4={tasks:eK,dates:eA.dates,ganttEvent:eq,selectedTask:e2,rowHeight:eJ,taskHeight:e0,columnWidth:to,arrowColor:ee,timeStep:void 0===$?3e5:$,fontFamily:en,fontSize:eo,arrowIndent:ei,svgWidth:ta,rtl:Z,setGanttEvent:eQ,setFailedTask:e4,setSelectedTask:t5,onDateChange:function(e){return tR(function(){return tH(this,function(t){switch(t.label){case 0:return[4,tn(e)];case 1:return t.sent(),[2]}})})()},onProgressChange:s.getFieldNames().progress&&function(e){return tR(function(){return tH(this,function(t){switch(t.label){case 0:return[4,tr(e)];case 1:return t.sent(),[2]}})})()},onClick:function(e){t5(e.id),s.openEvent(e.record)},enableDragToReschedule:void 0===eg||eg,loading:tf};return h().createElement("div",{className:tA,ref:ex},h().createElement("div",{onKeyDown:function(e){e.preventDefault();var t=e7,n=tt.current,r=!0;switch(e.key){case"Down":case"ArrowDown":t+=eJ,r=!1;break;case"Up":case"ArrowUp":t-=eJ,r=!1;break;case"Left":case"ArrowLeft":n-=to;break;case"Right":case"ArrowRight":n+=to}r?(n<0?n=0:n>ta&&(n=ta),tQ(n)):(t<0?t=0:t>tl-v&&(t=tl-v),e9(t))},tabIndex:0,ref:em},h().createElement("div",{className:tF},tw&&h().createElement("div",{className:tB,ref:eO},h().createElement(f.Table,{className:tL,columns:tK,dataSource:tX,pagination:!1,rowKey:function(e){return e.__ganttTaskId},rowSelection:{columnWidth:50,type:"checkbox",selectedRowKeys:s.resource.getSelectedRows().map(function(e){return ts(s,e)}),onChange:function(e,t){s.resource.setSelectedRows(t)},renderCell:t2},scroll:tC,expandable:tV,childrenColumnName:tO,indentSize:15,showSorterTooltip:!1})),h().createElement("div",{className:t_,ref:ek},h().createElement(tu,{gridProps:t6,calendarProps:t3,barProps:t4,ganttHeight:ti,ganttFullHeight:tl,scrollY:e7,onHorizontalScroll:tJ,showLeftBorder:tw,ref:ew}),eq.changedTask&&h().createElement(es,{arrowIndent:ei,rowHeight:eJ,svgContainerHeight:eY,svgContainerWidth:eL,fontFamily:en,fontSize:eo,scrollX:tt.current,scrollY:e7,task:eq.changedTask,headerHeight:e$,TooltipContent:void 0===eh?ed:eh,rtl:Z,svgWidth:ta}),tc&&h().createElement(ef,{ganttFullHeight:tl,ganttHeight:ti,headerHeight:e$,scroll:e7,onScroll:function(e){te.current||e7!==e.currentTarget.scrollTop&&e9(e.currentTarget.scrollTop)},rtl:Z}),h().createElement(ea,{svgWidth:ta,rtl:Z,onScroll:function(e){tQ(e.currentTarget.scrollLeft,"scrollbar")},ref:t$}))),h().createElement("div",{className:tG},h().createElement(f.Pagination,(r=tI({},tq),o=o={onChange:t1},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r)))))},{displayName:"GanttBlock"}),tL=n(768),t_=function(e){var t,n=(0,tL.getDefaultFormat)(e),r=(0,tL.str2moment)(e.value,e);return Array.isArray(t=r&&r.isValid()?r.format(n):e.value)?t.join("~"):t},tG=function(e,t){if(Array.isArray(null==e?void 0:e.enum)&&null!=t){var n,r,o,a=e.enum.find(function(e){return e.value===t});return null!=(o=null==a?void 0:a.label)?o:t}return(null==e?void 0:e["x-component"])!=="DatePicker"?t:t_((n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},null==e?void 0:e["x-component-props"]),r=r={value:t},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n))},tY=function(e){if(null==e)return"";if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);if(h().isValidElement(e)){var t,n;return String(null!=(t=null==(n=e.props)?void 0:n.children)?t:"")}return String(e)},tU=n(816);function tX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var tK=["date","datetime","dateOnly","datetimeNoTz","unixTimestamp","createdAt","updatedAt"],tV=["string"],tZ=["float"],tq=["select","color"],tQ=[{label:"Hour",value:"hour"},{label:"Quarter of day",value:"quarterDay"},{label:"Half of day",value:"halfDay"},{label:"Day",value:"day"},{label:"Week",value:"week"},{label:"Month",value:"month"},{label:"Year",value:"year"},{label:"QuarterYear",value:"quarterYear"}],t$=function(e){return tQ.map(function(t){var n,r;return n=tX({},t),r=r={label:e?e(t.label,{ns:[tU.CU,tU.IC,"client"],nsMode:"fallback"}):(0,tU.MZ)(t.label)},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n})},tJ=[{key:"drag-handler",component:d.DragHandler,sort:1}],t0=["quickEdit","tableDensity","dragSort","dragSortBy"],t1=new Set(["ExpandCollapseActionModel"]),t2=function(e,t){return e&&t.includes(e)},t5=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t6=function(e,t){var n,r,o=tX({},(null==(n=e.props)?void 0:n.fieldNames)||{}),a={},l=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r&&(null==n||""===n)){delete o[e],t[e]=null,a[e]=null;return}o[e]=n,a[e]=n};t5(t,"title")&&l("title",t.title),t5(t,"start")&&l("start",t.start),t5(t,"end")&&l("end",t.end),t5(t,"progress")&&l("progress",t.progress,!0),t5(t,"color")&&l("color",t.color,!0),t5(t,"range")&&l("range",t.range||"day"),e.setProps({fieldNames:o}),Object.keys(a).length&&(null==(r=e.setStepParams)||r.call(e,"ganttSettings","fields",a))},t3=function(e,t){if(!t)return 0;var n=Number(null==e?void 0:e[t]);if(!Number.isFinite(n))return 0;var r=Number((100*n).toFixed(2));return r>100?100:r||0},t4=function(e){if(null!=e&&""!==e){if((void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object")return e.hex||e.hexString||e.color||e.value;var t=String(e);return"default"===t?"#d9d9d9":f.theme.defaultSeed[t]||t}},t8=function(e,t){var n,r=t4(t);if(r){var o=(Array.isArray(null==e||null==(n=e.uiSchema)?void 0:n.enum)?e.uiSchema.enum:[]).find(function(e){var t,n,o;return String(null!=(t=null!=(n=null!=(o=null==e?void 0:e.value)?o:null==e?void 0:e.name)?n:null==e?void 0:e.id)?t:"")===String(r)});return t4(null==o?void 0:o.color)}};function t7(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){n(e);return}i.done?t(c):Promise.resolve(c).then(r,o)}function t9(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function l(e){t7(a,r,o,l,i,"next",e)}function i(e){t7(a,r,o,l,i,"throw",e)}l(void 0)})}}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function nt(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function nn(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(l,"next",{value:c(0)}),i(l,"throw",{value:c(1)}),i(l,"return",{value:c(2)}),"function"==typeof Symbol&&i(l,Symbol.iterator,{value:function(){return this}}),l;function c(i){return function(c){var u=[i,c];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var nr=function(e){return e.model},no=function(e){var t,n;return!nr(e).isTreeCollection()||(null==(n=e.view)||null==(t=n.inputArgs)?void 0:t.scene)==="select"};function na(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){n(e);return}i.done?t(c):Promise.resolve(c).then(r,o)}function nl(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function l(e){na(a,r,o,l,i,"next",e)}function i(e){na(a,r,o,l,i,"throw",e)}l(void 0)})}}function ni(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nu(e,t,n){return(nu="u">typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ns(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}})(e,t,n||e)}function ns(e){return(ns=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){nc(e,t,n[t])})}return e}function nf(e,t){return(nf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function np(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function nh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nh=function(){return!!e})()}function ng(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(l,"next",{value:c(0)}),i(l,"throw",{value:c(1)}),i(l,"return",{value:c(2)}),"function"==typeof Symbol&&i(l,Symbol.iterator,{value:function(){return this}}),l;function c(i){return function(c){var u=[i,c];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var nb=function(e){var t,n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=ns(t),nc(e=function(e,t){if(t&&("object"===np(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nh()?Reflect.construct(t,n||[],ns(this).constructor):t.apply(this,n)),"customModelClasses",{CollectionActionGroupModel:"GanttCollectionActionGroupModel",RecordActionGroupModel:"RecordActionGroupModel",TableColumnModel:"TableColumnModel",TableAssociationFieldGroupModel:"TableAssociationFieldGroupModel",TableCustomColumnModel:"TableCustomColumnModel"}),nc(e,"treeExpanded",!1),e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&nf(r,e),t=[{key:"resource",get:function(){return nu(ns(r.prototype),"resource",this)}},{key:"createResource",value:function(){var e,t,n,r,o=this.context.createResource(d.MultiRecordResource);o.setPageSize(this.getPageSize()),this.isTreeTableEnabled()&&o.setRequestParameters({tree:!0});var a=Array.isArray(null==(e=this.collection)?void 0:e.filterTargetKey)?this.collection.filterTargetKey[0]:(null==(t=this.collection)?void 0:t.filterTargetKey)||"id";return o.setSort((null==(r=this.props)||null==(n=r.globalSort)?void 0:n.length)?this.props.globalSort:[a]),o}},{key:"normalizePageSize",value:function(e){var t=Number(e);return Number.isFinite(t)&&t>0?t:20}},{key:"getPageSize",value:function(){var e,t,n;return this.normalizePageSize(null!=(e=null==(t=this.props)?void 0:t.pageSize)?e:null==(n=this.getStepParams("tableSettings","pageSize"))?void 0:n.pageSize)}},{key:"normalizeTableWidth",value:function(e){var t=Number(e);return Number.isFinite(t)&&t>0?Math.max(120,Math.round(t)):void 0}},{key:"getAutoTableWidth",value:function(){return(this.getColumns().filter(function(e){return(null==e?void 0:e.key)!=="empty"}).reduce(function(e,t){return e+("number"==typeof(null==t?void 0:t.width)?t.width:0)},0)||150)+50+42*!!this.isTreeTableEnabled()}},{key:"getTableWidth",value:function(){var e,t,n;return this.normalizeTableWidth(null!=(e=null==(t=this.props)?void 0:t.tableWidth)?e:null==(n=this.getStepParams("ganttSettings","tableWidth"))?void 0:n.tableWidth)||this.getAutoTableWidth()}},{key:"shouldShowRowNumbers",value:function(){var e,t,n;return(null!=(e=null==(t=this.props)?void 0:t.showIndex)?e:null==(n=this.getStepParams("tableSettings","showRowNumbers"))?void 0:n.showIndex)!==!1}},{key:"isTreeCollection",value:function(){try{var e,t,n,r;return(null==(e=this.collection)?void 0:e.template)==="tree"||(null==(n=this.collection)||null==(t=n.options)?void 0:t.template)==="tree"||!!(null==(r=this.collection)?void 0:r.tree)}catch(e){return!1}}},{key:"isTreeTableEnabled",value:function(){var e,t,n;return!!this.isTreeCollection()&&(null!=(e=null==(t=this.props)?void 0:t.treeTable)?e:null==(n=this.getStepParams("tableSettings","treeTable"))?void 0:n.treeTable)===!0}},{key:"shouldDefaultExpandAllRows",value:function(){var e,t,n;return(null!=(e=null==(t=this.props)?void 0:t.defaultExpandAllRows)?e:null==(n=this.getStepParams("tableSettings","defaultExpandAllRows"))?void 0:n.defaultExpandAllRows)===!0}},{key:"getTreeChildrenFieldName",value:function(){var e;return(null==(e=this.getCollectionFields().find(function(e){var t;return(null==e?void 0:e.treeChildren)||(null==e||null==(t=e.options)?void 0:t.treeChildren)}))?void 0:e.name)||"children"}},{key:"isTreeExpanded",value:function(){return this.treeExpanded}},{key:"setTreeExpandFlag",value:function(e){this.treeExpanded=e,this.mapSubModels("actions",function(t){(null==t?void 0:t.use)==="GanttExpandCollapseActionModel"&&"function"==typeof t.setExpandFlag&&t.setExpandFlag(e)})}},{key:"expandAllTreeRows",value:function(){this.emitter.emit("expandAllTreeRows")}},{key:"collapseAllTreeRows",value:function(){this.emitter.emit("collapseAllTreeRows")}},{key:"toggleAllTreeRows",value:function(){this.isTreeExpanded()?this.collapseAllTreeRows():this.expandAllTreeRows()}},{key:"scrollToDate",value:function(e,t){this.emitter.emit("scrollToDate",{date:e,behavior:null==t?void 0:t.behavior})}},{key:"scrollToToday",value:function(e){var t;this.scrollToDate(new Date,{behavior:null!=(t=null==e?void 0:e.behavior)?t:"smooth"})}},{key:"getCollectionFields",value:function(){var e,t;return(null==(t=this.collection)||null==(e=t.getFields)?void 0:e.call(t))||[]}},{key:"getFieldOptions",value:function(e){return this.getCollectionFields().filter(function(t){var n;return t2(t.type,e)||t2(t.interface,e)||t2(null==(n=t.uiSchema)?void 0:n.type,e)}).map(function(e){var t;return{label:e.title||(null==(t=e.uiSchema)?void 0:t.title)||e.name,value:e.name}})}},{key:"getDefaultTitleFieldName",value:function(){var e,t;return(null==(e=this.getFieldOptions(tV)[0])?void 0:e.value)||(null==(t=this.collection)?void 0:t.filterTargetKey)||"id"}},{key:"getDefaultStartFieldName",value:function(){var e,t,n=this.getFieldOptions(tK);return(null==(e=n.find(function(e){return"createdAt"===e.value}))?void 0:e.value)||(null==(t=n[0])?void 0:t.value)}},{key:"getDefaultEndFieldName",value:function(){var e,t=this.getDefaultStartFieldName();return(null==(e=this.getFieldOptions(tK).find(function(e){return e.value!==t}))?void 0:e.value)||t}},{key:"getFieldNames",value:function(){var e,t=(null==(e=this.props)?void 0:e.fieldNames)||{};return{title:t.title||this.getDefaultTitleFieldName(),start:t.start||this.getDefaultStartFieldName(),end:t.end||this.getDefaultEndFieldName(),progress:t.progress,color:t.color,range:t.range||"day"}}},{key:"getRecordFilterByTk",value:function(e,t){if(e){var n,r,o;return null!=(n=null==(o=this.collection)||null==(r=o.getFilterByTK)?void 0:r.call(o,e))?n:t}try{return JSON.parse(t)}catch(e){return t}}},{key:"getTaskId",value:function(e){var t,n,r=null==(n=this.collection)||null==(t=n.getFilterByTK)?void 0:t.call(n,e);return null!=r?(void 0===r?"undefined":np(r))==="object"?JSON.stringify(r):String(r):String(null==e?void 0:e.id)}},{key:"formatTitle",value:function(e,t){var n,r,o=null==(r=this.collection)||null==(n=r.getField)?void 0:n.call(r,t);return tY(tG(null==o?void 0:o.uiSchema,null==e?void 0:e[t]))}},{key:"getRecordColor",value:function(e,t){if(!t)return t4(null==e?void 0:e.color);var n,r,o=null==(r=this.collection)||null==(n=r.getField)?void 0:n.call(r,t),a=null==e?void 0:e[t],l=t4(null==e?void 0:e.color);return t2(null==o?void 0:o.interface,["select"])||t2(null==o?void 0:o.type,["select"])?t8(o,a)||l:t4(a)||l}},{key:"formatData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=this.getFieldNames();return t.forEach(function(t){var a=e.formatTitle(t,o.title),l=e.getTaskId(t),i=e.getTreeChildrenFieldName(),c=Array.isArray(t[i])?t[i]:[],u=t[o.start]?new Date(t[o.start]):void 0,s=t[o.end]?new Date(t[o.end]):u,d=e.getRecordColor(t,o.color);c.length?(n.push({start:u,end:s,name:a,id:l,type:o.end?"task":"milestone",progress:t3(t,o.progress),project:r,color:d,isDisabled:!1,record:t}),e.formatData(c,n,l)):n.push({start:u,end:s,name:a,id:l,type:o.end?"task":"milestone",progress:t3(t,o.progress),project:r,color:d,isDisabled:!1,record:t})}),n}},{key:"getTasks",value:function(){return this.formatData(this.resource.getData()||[])}},{key:"getEventViewAction",value:function(){var e;return null==(e=this.subModels)?void 0:e.eventViewAction}},{key:"getPopupActionUid",value:function(e){return"".concat(this.uid,"-").concat(e)}},{key:"getPopupSettingsDefaults",value:function(e){var t,n,r,o;return{mode:"modal"===(o=null==(t=this.props)?void 0:t.eventOpenMode)?"dialog":"page"===o?"embed":"dialog"===o||"embed"===o?o:"drawer",size:"medium",pageModelClass:"ChildPageModel",uid:e,collectionName:null==(n=this.collection)?void 0:n.name,dataSourceKey:null==(r=this.collection)?void 0:r.dataSourceKey}}},{key:"getStoredPopupSettings",value:function(){var e;return(null==(e=this.props)?void 0:e.eventPopupSettings)||{}}},{key:"normalizePopupSettings",value:function(e){var t=nd({},e||{}),n=Object.prototype.hasOwnProperty.call(t,"popupTemplateUid"),r="string"==typeof t.popupTemplateUid?t.popupTemplateUid.trim():t.popupTemplateUid;return n&&(null==r||""===r)&&(delete t.popupTemplateUid,delete t.popupTemplateContext,delete t.popupTemplateHasFilterByTk,delete t.popupTemplateHasSourceId,delete t.uid),t}},{key:"setPopupSettings",value:function(e){var t=this.normalizePopupSettings(e);return this.setProps({eventPopupSettings:t}),t}},{key:"getPopupSettings",value:function(e,t){var n,r,o=this.getPopupSettingsDefaults((null==e?void 0:e.uid)||t),a=this.getStoredPopupSettings();return n=nd({},o,a),r=r={uid:a.uid||o.uid,collectionName:a.collectionName||o.collectionName,dataSourceKey:a.dataSourceKey||o.dataSourceKey},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n}},{key:"syncPopupActionSettings",value:function(e){return nl(function(){var t,n;return ng(this,function(r){switch(r.label){case 0:if(!e||(n=this.getPopupSettings(e,null==e?void 0:e.uid),JSON.stringify((null==(t=e.getStepParams)?void 0:t.call(e,"popupSettings","openView"))||{})===JSON.stringify(n)))return[2];if(e.setStepParams("popupSettings","openView",n),!(this.context.flowSettingsEnabled&&(null==e?void 0:e.saveStepParams)))return[3,2];return[4,e.saveStepParams()];case 1:r.sent(),r.label=2;case 2:return[2]}})}).call(this)}},{key:"loadPopupAction",value:function(e){return nl(function(){var t,n;return ng(this,function(r){switch(r.label){case 0:t=this.getPopupActionUid(e),r.label=1;case 1:if(r.trys.push([1,4,,5]),n=this.flowEngine.getModel(t))return[3,3];return[4,this.flowEngine.loadModel({uid:t})];case 2:n=r.sent(),r.label=3;case 3:return[2,n];case 4:return r.sent(),[2,null];case 5:return[2]}})}).call(this)}},{key:"ensurePopupAction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"eventViewAction";return nl(function(){var t,n,r,o;return ng(this,function(a){switch(a.label){case 0:if(n=null==(t=this.subModels)?void 0:t[e])return[3,2];return[4,this.loadPopupAction(e)];case 1:(o=a.sent())?this.setSubModel(e,o):this.setSubModel(e,(0,g.createGanttEventViewActionOptions)(this.getPopupActionUid(e))),n=null==(r=this.subModels)?void 0:r[e],a.label=2;case 2:if(!(this.context.flowSettingsEnabled&&(null==n?void 0:n.save)))return[3,4];return[4,n.save()];case 3:a.sent(),a.label=4;case 4:return[4,this.syncPopupActionSettings(n)];case 5:return a.sent(),[2,n]}})}).call(this)}},{key:"openEvent",value:function(e){return nl(function(){var t,n,r,o,a,l;return ng(this,function(i){switch(i.label){case 0:return[4,this.ensurePopupAction("eventViewAction")];case 1:if(!(a=i.sent())||!e||!(l=null!=(t=null==(r=this.collection)||null==(n=r.getFilterByTK)?void 0:n.call(r,e))?t:null==e?void 0:e[(null==(o=this.collection)?void 0:o.filterTargetKey)||"id"]))return[2];return[4,a.dispatchEvent("click",{filterByTk:l},{debounce:!0})];case 2:return i.sent(),[2]}})}).call(this)}},{key:"getActionsColumn",value:function(){return this.findSubModel("columns",function(e){var t;return null!=(t=s.TableActionsColumnModel)&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t})}},{key:"renderConfigureActions",value:function(){var e="gantt-add-actions-".concat(this.isTreeTableEnabled()?"tree":"plain");return h().createElement(d.AddSubModelButton,{key:e,model:this,subModelBaseClass:this.getModelClassName("CollectionActionGroupModel"),subModelKey:"actions"},h().createElement(d.FlowSettingsButton,{icon:h().createElement(u.SettingOutlined,null)},this.translate("Actions")))}},{key:"getVisibleActionModels",value:function(){return this.mapSubModels("actions",function(e){return e}).filter(function(e){var t,n="string"==typeof e.use?e.use:null==(t=e.constructor)?void 0:t.name;return!t1.has(n)})}},{key:"renderActionBar",value:function(){var e=!!this.context.flowSettingsEnabled,t=this.getVisibleActionModels();return h().createElement(d.DndProvider,null,h().createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:this.context.themeToken.marginXXS}},h().createElement(f.Space,{wrap:!0},t.map(function(t){if(!t.hidden||e)return"left"!==t.props.position?null:h().createElement(d.FlowModelRenderer,{key:t.uid,model:t,showFlowSettings:{showBackground:!1,showBorder:!1,toolbarPosition:"above"},extraToolbarItems:tJ})}),h().createElement("span",null)),h().createElement(f.Space,{wrap:!0},t.map(function(t){if(!t.hidden||e){if("left"===t.props.position)return null;var n=h().createElement(d.FlowModelRenderer,{key:t.uid,model:t,showFlowSettings:{showBackground:!1,showBorder:!1,toolbarPosition:"above"},extraToolbarItems:tJ});return e?h().createElement(d.Droppable,{model:t,key:t.uid},n):n}}),this.renderConfigureActions())))}},{key:"renderComponent",value:function(){return h().createElement(f.Space,{direction:"vertical",size:this.context.themeToken.margin,style:{width:"100%"}},this.renderActionBar(),h().createElement(tB,{model:this}))}}],n=[{key:"filterCollection",value:function(e){var t;return!!nu(ns(r),"filterCollection",this).call(this,e)&&((null==e||null==(t=e.getFields)?void 0:t.call(e))||[]).some(function(e){var t;return t2(null==e?void 0:e.type,tK)||t2(null==e?void 0:e.interface,tK)||t2(null==e||null==(t=e.uiSchema)?void 0:t.type,tK)})}}],t&&ni(r.prototype,t),n&&ni(r,n),r}(s.TableBlockModel);nc(nb,"scene",s.BlockSceneEnum.many),nb.registerFlow({key:"ganttSettings",sort:500,title:(0,tU.MZ)("Gantt"),steps:{fields:{title:(0,tU.MZ)("Gantt fields"),preset:!0,hideInSettings:!0,uiSchema:function(e){var t=nr(e),n=t.getFieldOptions(tV),r=t.getFieldOptions(tK),o=t.getFieldOptions(tZ),a=t.getFieldOptions(tq),l=t$(e.t);return{title:{type:"string",title:(0,tU.MZ)("Title field"),required:!0,enum:n,"x-component":"Select","x-decorator":"FormItem","x-component-props":{options:n}},start:{type:"string",title:(0,tU.MZ)("Start date field"),required:!0,enum:r,"x-component":"Select","x-decorator":"FormItem","x-component-props":{options:r}},end:{type:"string",title:(0,tU.MZ)("End date field"),required:!0,enum:r,"x-component":"Select","x-decorator":"FormItem","x-component-props":{options:r}},progress:{type:"string",title:(0,tU.MZ)("Progress field"),enum:o,"x-component":"Select","x-decorator":"FormItem","x-component-props":{options:o,allowClear:!0}},color:{type:"string",title:(0,tU.MZ)("Color field"),enum:a,"x-component":"Select","x-decorator":"FormItem","x-component-props":{options:a,allowClear:!0}},range:{type:"string",title:(0,tU.MZ)("Time scale"),default:"day",enum:l,"x-component":"Select","x-decorator":"FormItem","x-component-props":{options:l}}}},defaultParams:function(){return{}},handler:function(e,t){t6(e.model,t)},beforeParamsSave:function(e,t){t6(e.model,t)}},titleField:{title:(0,tU.MZ)("Title field"),uiMode:function(e){return{type:"select",key:"title",props:{options:nr(e).getFieldOptions(tV)}}},defaultParams:function(e){return{title:nr(e).getFieldNames().title}},handler:function(e,t){t6(e.model,t)},beforeParamsSave:function(e,t){t6(e.model,t)}},timeScale:{title:(0,tU.MZ)("Time scale"),uiMode:function(e){return{type:"select",key:"range",props:{options:t$(e.t)}}},defaultParams:function(e){return{range:nr(e).getFieldNames().range}},handler:function(e,t){t6(e.model,t)},beforeParamsSave:function(e,t){t6(e.model,t)}},startDateField:{title:(0,tU.MZ)("Start date field"),uiMode:function(e){return{type:"select",key:"start",props:{options:nr(e).getFieldOptions(tK)}}},defaultParams:function(e){return{start:nr(e).getFieldNames().start}},handler:function(e,t){t6(e.model,t)},beforeParamsSave:function(e,t){t6(e.model,t)}},endDateField:{title:(0,tU.MZ)("End date field"),uiMode:function(e){return{type:"select",key:"end",props:{options:nr(e).getFieldOptions(tK)}}},defaultParams:function(e){return{end:nr(e).getFieldNames().end}},handler:function(e,t){t6(e.model,t)},beforeParamsSave:function(e,t){t6(e.model,t)}},processField:{title:(0,tU.MZ)("Progress field"),uiMode:function(e){return{type:"select",key:"progress",props:{options:nr(e).getFieldOptions(tZ),allowClear:!0}}},defaultParams:function(e){return{progress:nr(e).getFieldNames().progress}},handler:function(e,t){Object.prototype.hasOwnProperty.call(t,"progress")||(t.progress=null),t6(e.model,t)},beforeParamsSave:function(e,t){Object.prototype.hasOwnProperty.call(t,"progress")||(t.progress=null),t6(e.model,t)}},colorField:{title:(0,tU.MZ)("Color field"),uiMode:function(e){return{type:"select",key:"color",props:{options:nr(e).getFieldOptions(tq),allowClear:!0}}},defaultParams:function(e){return{color:nr(e).getFieldNames().color}},handler:function(e,t){Object.prototype.hasOwnProperty.call(t,"color")||(t.color=null),t6(e.model,t)},beforeParamsSave:function(e,t){Object.prototype.hasOwnProperty.call(t,"color")||(t.color=null),t6(e.model,t)}},showTable:{title:(0,tU.MZ)("Show table"),uiMode:{type:"switch",key:"showTable"},defaultParams:function(e){var t;return{showTable:(null==(t=nr(e).props)?void 0:t.showTable)!==!1}},handler:function(e,t){nr(e).setProps("showTable",!1!==t.showTable)},beforeParamsSave:function(e,t){nr(e).setProps("showTable",!1!==t.showTable)}},tableWidth:{title:(0,tU.MZ)("Table width"),hideInSettings:function(e){var t;return(null==(t=nr(e).props)?void 0:t.showTable)===!1},uiSchema:{tableWidth:{type:"number","x-component":f.InputNumber,"x-decorator":"FormItem","x-component-props":{min:120,precision:0,style:{width:"100%"}}}},defaultParams:function(e){return{tableWidth:nr(e).getTableWidth()}},handler:function(e,t){var n=nr(e),r=n.normalizeTableWidth(t.tableWidth)||n.getAutoTableWidth();t.tableWidth=r,n.setProps("tableWidth",r)},beforeParamsSave:function(e,t){var n=nr(e),r=n.normalizeTableWidth(t.tableWidth)||n.getAutoTableWidth();t.tableWidth=r,n.setProps("tableWidth",r)}},enableDragToReschedule:{title:(0,tU.MZ)("Enable drag to reschedule"),uiMode:{type:"switch",key:"enableDragToReschedule"},defaultParams:function(e){var t;return{enableDragToReschedule:(null==(t=nr(e).props)?void 0:t.enableDragToReschedule)!==!1}},handler:function(e,t){nr(e).setProps("enableDragToReschedule",!1!==t.enableDragToReschedule)},beforeParamsSave:function(e,t){nr(e).setProps("enableDragToReschedule",!1!==t.enableDragToReschedule)}},eventPopupSettings:{use:"openView",title:(0,tU.MZ)("Event popup settings"),defaultParams:function(e){return t9(function(){var t,n;return nn(this,function(r){switch(r.label){case 0:return[4,(t=nr(e)).ensurePopupAction("eventViewAction")];case 1:return n=r.sent(),[2,t.getPopupSettings(n,t.getPopupActionUid("eventViewAction"))]}})})()},handler:function(e,t){return t9(function(){var n,r;return nn(this,function(o){switch(o.label){case 0:return(n=nr(e)).setPopupSettings(t),[4,n.ensurePopupAction("eventViewAction")];case 1:return r=o.sent(),[4,n.syncPopupActionSettings(r)];case 2:return o.sent(),[2]}})})()}}}}),c=s.TableBlockModel.globalFlowRegistry.getFlow("tableSettings"),nb.registerFlow({key:"tableSettings",sort:null!=(l=null==c?void 0:c.sort)?l:500,title:null!=(i=null==c?void 0:c.title)?i:(0,tU.MZ)("Table settings"),steps:(o=ne({},(null==(r=s.TableBlockModel.globalFlowRegistry.getFlow("tableSettings"))?void 0:r.steps)||{}),t0.forEach(function(e){o[e]&&(o[e]=nt(ne({},o[e]),{hideInSettings:!0}))}),o.pageSize&&(o.pageSize=nt(ne({},o.pageSize),{defaultParams:function(e){return{pageSize:nr(e).getPageSize()}},handler:function(e,t){return t9(function(){var n,r;return nn(this,function(o){switch(o.label){case 0:return r=(n=nr(e)).normalizePageSize(t.pageSize),n.setProps("pageSize",r),n.resource.loading=!0,n.resource.setPage(1),n.resource.setPageSize(r),[4,n.resource.refresh()];case 1:return o.sent(),[2]}})})()},beforeParamsSave:function(e,t){var n=nr(e);n.setProps("pageSize",n.normalizePageSize(t.pageSize))}})),o.showRowNumbers&&(o.showRowNumbers=nt(ne({},o.showRowNumbers),{defaultParams:function(e){return{showIndex:nr(e).shouldShowRowNumbers()}}})),o.treeTable&&(o.treeTable=nt(ne({},o.treeTable),{hideInSettings:no,defaultParams:function(e){return{treeTable:nr(e).isTreeTableEnabled()}},handler:function(e,t){return t9(function(){var n,r;return nn(this,function(o){switch(o.label){case 0:return n=nr(e),r=!!t.treeTable,n.setProps("treeTable",r),n.resource.loading=!0,n.resource.setPage(1),n.resource.setRequestParameters({tree:r}),[4,n.resource.refresh()];case 1:return o.sent(),[2]}})})()},beforeParamsSave:function(e,t){nr(e).setProps("treeTable",!!t.treeTable)}})),o.defaultExpandAllRows&&(o.defaultExpandAllRows=nt(ne({},o.defaultExpandAllRows),{hideInSettings:no,defaultParams:function(e){return{defaultExpandAllRows:nr(e).shouldDefaultExpandAllRows()}},handler:function(e,t){nr(e).setProps("defaultExpandAllRows",!!t.defaultExpandAllRows)},beforeParamsSave:function(e,t){nr(e).setProps("defaultExpandAllRows",!!t.defaultExpandAllRows)}})),o)}),nb.define({label:(0,tU.MZ)("Gantt"),group:(0,tU.MZ)("Content"),searchable:!0,searchPlaceholder:(0,tU.MZ)("Search"),createModelOptions:{use:"GanttBlockModel",props:{enableDragToReschedule:!0,showTable:!0},subModels:{actions:[],columns:[{use:"TableActionsColumnModel",props:{title:(0,tU.MZ)("Actions"),width:150}}]}},sort:500})},619:function(e,t,n){n.r(t),n.d(t,{GanttEventViewActionModel:function(){return y},createGanttEventViewActionOptions:function(){return b}});var r=n(485),o=n(816);function a(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){n(e);return}i.done?t(c):Promise.resolve(c).then(r,o)}function l(e,t,n){return t=f(t),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,g()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t,n){return(d="u">typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}})(e,t,n||e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(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&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}var b=function(e){return{uid:e,use:"GanttEventViewActionModel"}},y=function(e){function t(){var e;return i(this,t),e=l(this,t,arguments),s(e,"defaultPopupTitle",(0,o.MZ)("Details")),e}return p(t,e),u(t,[{key:"getAclActionName",value:function(){return"view"}}]),t}(function(e){function t(){return i(this,t),l(this,t,arguments)}return p(t,e),u(t,[{key:"collection",get:function(){var e;return this.context.collection||(null==(e=this.context.blockModel)?void 0:e.collection)}},{key:"getInputArgs",value:function(){var e,n,r=d(f(t.prototype),"getInputArgs",this).call(this),o=this.collection;return e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){s(e,t,n[t])})}return e}({},r),n=n={dataSourceKey:null==o?void 0:o.dataSourceKey,collectionName:null==o?void 0:o.name},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e}}]),t}(r.PopupActionModel));s(y,"scene",r.ActionSceneEnum.record),y.define({hide:!0,createModelOptions:function(){var e;return(e=function(){return function(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(l,"next",{value:c(0)}),i(l,"throw",{value:c(1)}),i(l,"return",{value:c(2)}),"function"==typeof Symbol&&i(l,Symbol.iterator,{value:function(){return this}}),l;function c(i){return function(c){var u=[i,c];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(e){return[2,b()]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var l=e.apply(t,n);function i(e){a(l,r,o,i,c,"next",e)}function c(e){a(l,r,o,i,c,"throw",e)}i(void 0)})})()}})}}]);
@@ -1,7 +0,0 @@
1
- Copyright (c) Scott Cooper <scttcper@gmail.com>
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,2 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).tinycolor=e()}(this,(function(){"use strict";var t={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 e(t,e){(function(t){return"string"==typeof t&&-1!==t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!==t.indexOf("%")}(t);return t=360===e?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:t=360===e?(t<0?t%e+e:t%e)/parseFloat(String(e)):t%e/parseFloat(String(e))}function r(t){return Math.min(1,Math.max(0,t))}function n(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function a(t){return t<=1?"".concat(100*Number(t),"%"):t}function o(t){return 1===t.length?"0"+t:String(t)}function i(t,r,n){t=e(t,255),r=e(r,255),n=e(n,255);var a=Math.max(t,r,n),o=Math.min(t,r,n),i=0,s=0,h=(a+o)/2;if(a===o)s=0,i=0;else{var u=a-o;switch(s=h>.5?u/(2-a-o):u/(a+o),a){case t:i=(r-n)/u+(r<n?6:0);break;case r:i=(n-t)/u+2;break;case n:i=(t-r)/u+4}i/=6}return{h:i,s:s,l:h}}function s(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*r*(e-t):r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function h(t,r,n){t=e(t,255),r=e(r,255),n=e(n,255);var a=Math.max(t,r,n),o=Math.min(t,r,n),i=0,s=a,h=a-o,u=0===a?0:h/a;if(a===o)i=0;else{switch(a){case t:i=(r-n)/h+(r<n?6:0);break;case r:i=(n-t)/h+2;break;case n:i=(t-r)/h+4}i/=6}return{h:i,s:u,v:s}}function u(t,e,r,n){var a=[o(Math.round(t).toString(16)),o(Math.round(e).toString(16)),o(Math.round(r).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function f(t,e,r,n){return[o(c(n)),o(Math.round(t).toString(16)),o(Math.round(e).toString(16)),o(Math.round(r).toString(16))].join("")}function c(t){return Math.round(255*parseFloat(t)).toString(16)}function l(t){return d(t)/255}function d(t){return parseInt(t,16)}function g(t){var r,o,i,h={r:0,g:0,b:0},u=1,f=null,c=null,l=null,d=!1,g=!1;return"string"==typeof t&&(t=y(t)),"object"==typeof t&&(w(t.r)&&w(t.g)&&w(t.b)?(r=t.r,o=t.g,i=t.b,h={r:255*e(r,255),g:255*e(o,255),b:255*e(i,255)},d=!0,g="%"===String(t.r).substr(-1)?"prgb":"rgb"):w(t.h)&&w(t.s)&&w(t.v)?(f=a(t.s),c=a(t.v),h=function(t,r,n){t=6*e(t,360),r=e(r,100),n=e(n,100);var a=Math.floor(t),o=t-a,i=n*(1-r),s=n*(1-o*r),h=n*(1-(1-o)*r),u=a%6;return{r:255*[n,s,i,i,h,n][u],g:255*[h,n,n,s,i,i][u],b:255*[i,i,h,n,n,s][u]}}(t.h,f,c),d=!0,g="hsv"):w(t.h)&&w(t.s)&&w(t.l)&&(f=a(t.s),l=a(t.l),h=function(t,r,n){var a,o,i;if(t=e(t,360),r=e(r,100),n=e(n,100),0===r)o=n,i=n,a=n;else{var h=n<.5?n*(1+r):n+r-n*r,u=2*n-h;a=s(u,h,t+1/3),o=s(u,h,t),i=s(u,h,t-1/3)}return{r:255*a,g:255*o,b:255*i}}(t.h,f,l),d=!0,g="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(u=t.a)),u=n(u),{ok:d,format:t.format||g,r:Math.min(255,Math.max(h.r,0)),g:Math.min(255,Math.max(h.g,0)),b:Math.min(255,Math.max(h.b,0)),a:u}}var b="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),p="[\\s|\\(]+(".concat(b,")[,|\\s]+(").concat(b,")[,|\\s]+(").concat(b,")\\s*\\)?"),v="[\\s|\\(]+(".concat(b,")[,|\\s]+(").concat(b,")[,|\\s]+(").concat(b,")[,|\\s]+(").concat(b,")\\s*\\)?"),m={CSS_UNIT:new RegExp(b),rgb:new RegExp("rgb"+p),rgba:new RegExp("rgba"+v),hsl:new RegExp("hsl"+p),hsla:new RegExp("hsla"+v),hsv:new RegExp("hsv"+p),hsva:new RegExp("hsva"+v),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 y(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var r=!1;if(t[e])e=t[e],r=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=m.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=m.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=m.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=m.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=m.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=m.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=m.hex8.exec(e))?{r:d(n[1]),g:d(n[2]),b:d(n[3]),a:l(n[4]),format:r?"name":"hex8"}:(n=m.hex6.exec(e))?{r:d(n[1]),g:d(n[2]),b:d(n[3]),format:r?"name":"hex"}:(n=m.hex4.exec(e))?{r:d(n[1]+n[1]),g:d(n[2]+n[2]),b:d(n[3]+n[3]),a:l(n[4]+n[4]),format:r?"name":"hex8"}:!!(n=m.hex3.exec(e))&&{r:d(n[1]+n[1]),g:d(n[2]+n[2]),b:d(n[3]+n[3]),format:r?"name":"hex"}}function w(t){return Boolean(m.CSS_UNIT.exec(String(t)))}var M=function(){function a(t,e){var r;if(void 0===t&&(t=""),void 0===e&&(e={}),t instanceof a)return t;"number"==typeof t&&(t=function(t){return{r:t>>16,g:(65280&t)>>8,b:255&t}}(t)),this.originalInput=t;var n=g(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=null!==(r=e.format)&&void 0!==r?r:n.format,this.gradientType=e.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 a.prototype.isDark=function(){return this.getBrightness()<128},a.prototype.isLight=function(){return!this.isDark()},a.prototype.getBrightness=function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},a.prototype.getLuminance=function(){var t=this.toRgb(),e=t.r/255,r=t.g/255,n=t.b/255;return.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},a.prototype.getAlpha=function(){return this.a},a.prototype.setAlpha=function(t){return this.a=n(t),this.roundA=Math.round(100*this.a)/100,this},a.prototype.isMonochrome=function(){return 0===this.toHsl().s},a.prototype.toHsv=function(){var t=h(this.r,this.g,this.b);return{h:360*t.h,s:t.s,v:t.v,a:this.a}},a.prototype.toHsvString=function(){var t=h(this.r,this.g,this.b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.v);return 1===this.a?"hsv(".concat(e,", ").concat(r,"%, ").concat(n,"%)"):"hsva(".concat(e,", ").concat(r,"%, ").concat(n,"%, ").concat(this.roundA,")")},a.prototype.toHsl=function(){var t=i(this.r,this.g,this.b);return{h:360*t.h,s:t.s,l:t.l,a:this.a}},a.prototype.toHslString=function(){var t=i(this.r,this.g,this.b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.l);return 1===this.a?"hsl(".concat(e,", ").concat(r,"%, ").concat(n,"%)"):"hsla(".concat(e,", ").concat(r,"%, ").concat(n,"%, ").concat(this.roundA,")")},a.prototype.toHex=function(t){return void 0===t&&(t=!1),u(this.r,this.g,this.b,t)},a.prototype.toHexString=function(t){return void 0===t&&(t=!1),"#"+this.toHex(t)},a.prototype.toHex8=function(t){return void 0===t&&(t=!1),function(t,e,r,n,a){var i=[o(Math.round(t).toString(16)),o(Math.round(e).toString(16)),o(Math.round(r).toString(16)),o(c(n))];return 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("")}(this.r,this.g,this.b,this.a,t)},a.prototype.toHex8String=function(t){return void 0===t&&(t=!1),"#"+this.toHex8(t)},a.prototype.toHexShortString=function(t){return void 0===t&&(t=!1),1===this.a?this.toHexString(t):this.toHex8String(t)},a.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},a.prototype.toRgbString=function(){var t=Math.round(this.r),e=Math.round(this.g),r=Math.round(this.b);return 1===this.a?"rgb(".concat(t,", ").concat(e,", ").concat(r,")"):"rgba(".concat(t,", ").concat(e,", ").concat(r,", ").concat(this.roundA,")")},a.prototype.toPercentageRgb=function(){var t=function(t){return"".concat(Math.round(100*e(t,255)),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},a.prototype.toPercentageRgbString=function(){var t=function(t){return Math.round(100*e(t,255))};return 1===this.a?"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,")")},a.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+u(this.r,this.g,this.b,!1),r=0,n=Object.entries(t);r<n.length;r++){var a=n[r],o=a[0];if(e===a[1])return o}return!1},a.prototype.toString=function(t){var e=Boolean(t);t=null!=t?t:this.format;var r=!1,n=this.a<1&&this.a>=0;return e||!n||!t.startsWith("hex")&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this.a?this.toName():this.toRgbString()},a.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},a.prototype.clone=function(){return new a(this.toString())},a.prototype.lighten=function(t){void 0===t&&(t=10);var e=this.toHsl();return e.l+=t/100,e.l=r(e.l),new a(e)},a.prototype.brighten=function(t){void 0===t&&(t=10);var e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(-t/100*255))),e.g=Math.max(0,Math.min(255,e.g-Math.round(-t/100*255))),e.b=Math.max(0,Math.min(255,e.b-Math.round(-t/100*255))),new a(e)},a.prototype.darken=function(t){void 0===t&&(t=10);var e=this.toHsl();return e.l-=t/100,e.l=r(e.l),new a(e)},a.prototype.tint=function(t){return void 0===t&&(t=10),this.mix("white",t)},a.prototype.shade=function(t){return void 0===t&&(t=10),this.mix("black",t)},a.prototype.desaturate=function(t){void 0===t&&(t=10);var e=this.toHsl();return e.s-=t/100,e.s=r(e.s),new a(e)},a.prototype.saturate=function(t){void 0===t&&(t=10);var e=this.toHsl();return e.s+=t/100,e.s=r(e.s),new a(e)},a.prototype.greyscale=function(){return this.desaturate(100)},a.prototype.spin=function(t){var e=this.toHsl(),r=(e.h+t)%360;return e.h=r<0?360+r:r,new a(e)},a.prototype.mix=function(t,e){void 0===e&&(e=50);var r=this.toRgb(),n=new a(t).toRgb(),o=e/100;return new a({r:(n.r-r.r)*o+r.r,g:(n.g-r.g)*o+r.g,b:(n.b-r.b)*o+r.b,a:(n.a-r.a)*o+r.a})},a.prototype.analogous=function(t,e){void 0===t&&(t=6),void 0===e&&(e=30);var r=this.toHsl(),n=360/e,o=[this];for(r.h=(r.h-(n*t>>1)+720)%360;--t;)r.h=(r.h+n)%360,o.push(new a(r));return o},a.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new a(t)},a.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var e=this.toHsv(),r=e.h,n=e.s,o=e.v,i=[],s=1/t;t--;)i.push(new a({h:r,s:n,v:o})),o=(o+s)%1;return i},a.prototype.splitcomplement=function(){var t=this.toHsl(),e=t.h;return[this,new a({h:(e+72)%360,s:t.s,l:t.l}),new a({h:(e+216)%360,s:t.s,l:t.l})]},a.prototype.onBackground=function(t){var e=this.toRgb(),r=new a(t).toRgb(),n=e.a+r.a*(1-e.a);return new a({r:(e.r*e.a+r.r*r.a*(1-e.a))/n,g:(e.g*e.a+r.g*r.a*(1-e.a))/n,b:(e.b*e.a+r.b*r.a*(1-e.a))/n,a:n})},a.prototype.triad=function(){return this.polyad(3)},a.prototype.tetrad=function(){return this.polyad(4)},a.prototype.polyad=function(t){for(var e=this.toHsl(),r=e.h,n=[this],o=360/t,i=1;i<t;i++)n.push(new a({h:(r+i*o)%360,s:e.s,l:e.l}));return n},a.prototype.equals=function(t){return this.toRgbString()===new a(t).toRgbString()},a}();function x(t){t>=334&&t<=360&&(t-=360);for(var e=0,r=S;e<r.length;e++){var n=A(r[e]);if(n.hueRange&&t>=n.hueRange[0]&&t<=n.hueRange[1])return n}throw Error("Color not found")}function k(t,e){if(void 0===e)return Math.floor(t[0]+Math.random()*(t[1]+1-t[0]));var r=t[1]||1,n=t[0]||0,a=(e=(9301*e+49297)%233280)/233280;return Math.floor(n+a*(r-n))}function A(t){var e=t.lowerBounds[0][0],r=t.lowerBounds[t.lowerBounds.length-1][0],n=t.lowerBounds[t.lowerBounds.length-1][1],a=t.lowerBounds[0][1];return{name:t.name,hueRange:t.hueRange,lowerBounds:t.lowerBounds,saturationRange:[e,r],brightnessRange:[n,a]}}var S=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function R(t,e){var r=new M(t),n=new M(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)}var H=function(t,e){return void 0===t&&(t=""),void 0===e&&(e={}),new M(t,e)};return H.TinyColor=M,H.readability=R,H.mostReadable=function t(e,r,n){void 0===n&&(n={includeFallbackColors:!1,level:"AA",size:"small"});for(var a=null,o=0,i=n.includeFallbackColors,s=n.level,h=n.size,u=0,f=r;u<f.length;u++){var c=f[u],l=R(e,c);l>o&&(o=l,a=new M(c))}return function(t,e,r){var n,a;void 0===r&&(r={level:"AA",size:"small"});var o=R(t,e);switch((null!==(n=r.level)&&void 0!==n?n:"AA")+(null!==(a=r.size)&&void 0!==a?a:"small")){case"AAsmall":case"AAAlarge":return o>=4.5;case"AAlarge":return o>=3;case"AAAsmall":return o>=7;default:return!1}}(e,a,{level:s,size:h})||!i?a:(n.includeFallbackColors=!1,t(e,["#fff","#000"],n))},H.random=function t(e){if(void 0===e&&(e={}),void 0!==e.count&&null!==e.count){var r=e.count,n=[];for(e.count=void 0;r>n.length;)e.count=null,e.seed&&(e.seed+=1),n.push(t(e));return e.count=r,n}var a=function(t,e){var r=k(function(t){var e=parseInt(t,10);if(!Number.isNaN(e)&&e<360&&e>0)return[e,e];if("string"==typeof t){var r=S.find((function(e){return e.name===t}));if(r){var n=A(r);if(n.hueRange)return n.hueRange}var a=new M(t);if(a.isValid){var o=a.toHsv().h;return[o,o]}}return[0,360]}(t),e);r<0&&(r=360+r);return r}(e.hue,e.seed),o=function(t,e){if("monochrome"===e.hue)return 0;if("random"===e.luminosity)return k([0,100],e.seed);var r=x(t).saturationRange,n=r[0],a=r[1];switch(e.luminosity){case"bright":n=55;break;case"dark":n=a-10;break;case"light":a=55}return k([n,a],e.seed)}(a,e),i=function(t,e,r){var n=function(t,e){for(var r=x(t).lowerBounds,n=0;n<r.length-1;n++){var a=r[n][0],o=r[n][1],i=r[n+1][0],s=r[n+1][1];if(e>=a&&e<=i){var h=(s-o)/(i-a);return h*e+(o-h*a)}}return 0}(t,e),a=100;switch(r.luminosity){case"dark":a=n+20;break;case"light":n=(a+n)/2;break;case"random":n=0,a=100}return k([n,a],r.seed)}(a,o,e),s={h:a,s:o,v:i};return void 0!==e.alpha&&(s.a=e.alpha),new M(s)},H.names=t,H.fromRatio=function(t,e){var r={r:a(t.r),g:a(t.g),b:a(t.b)};return void 0!==t.a&&(r.a=Number(t.a)),new M(r,e)},H.legacyRandom=function(){return new M({r:Math.random(),g:Math.random(),b:Math.random()})},H.toMsFilter=function(t,e){var r=new M(t),n="#"+f(r.r,r.g,r.b,r.a),a=n,o=r.gradientType?"GradientType = 1, ":"";if(e){var i=new M(e);a="#"+f(i.r,i.g,i.b,i.a)}return"progid:DXImageTransform.Microsoft.gradient(".concat(o,"startColorstr=").concat(n,",endColorstr=").concat(a,")")},H.inputToRGB=g,H.stringInputToObject=y,H.isValidCSSUnit=w,H}));
2
- //# sourceMappingURL=tinycolor.umd.min.js.map
@@ -1,61 +0,0 @@
1
- import { HSL, HSV, Numberify, RGB } from './interfaces.js';
2
- /**
3
- * Handle bounds / percentage checking to conform to CSS color spec
4
- * <http://www.w3.org/TR/css3-color/>
5
- * *Assumes:* r, g, b in [0, 255] or [0, 1]
6
- * *Returns:* { r, g, b } in [0, 255]
7
- */
8
- export declare function rgbToRgb(r: number | string, g: number | string, b: number | string): Numberify<RGB>;
9
- /**
10
- * Converts an RGB color value to HSL.
11
- * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
12
- * *Returns:* { h, s, l } in [0,1]
13
- */
14
- export declare function rgbToHsl(r: number, g: number, b: number): Numberify<HSL>;
15
- /**
16
- * Converts an HSL color value to RGB.
17
- *
18
- * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
19
- * *Returns:* { r, g, b } in the set [0, 255]
20
- */
21
- export declare function hslToRgb(h: number | string, s: number | string, l: number | string): Numberify<RGB>;
22
- /**
23
- * Converts an RGB color value to HSV
24
- *
25
- * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
26
- * *Returns:* { h, s, v } in [0,1]
27
- */
28
- export declare function rgbToHsv(r: number, g: number, b: number): Numberify<HSV>;
29
- /**
30
- * Converts an HSV color value to RGB.
31
- *
32
- * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
33
- * *Returns:* { r, g, b } in the set [0, 255]
34
- */
35
- export declare function hsvToRgb(h: number | string, s: number | string, v: number | string): Numberify<RGB>;
36
- /**
37
- * Converts an RGB color to hex
38
- *
39
- * Assumes r, g, and b are contained in the set [0, 255]
40
- * Returns a 3 or 6 character hex
41
- */
42
- export declare function rgbToHex(r: number, g: number, b: number, allow3Char: boolean): string;
43
- /**
44
- * Converts an RGBA color plus alpha transparency to hex
45
- *
46
- * Assumes r, g, b are contained in the set [0, 255] and
47
- * a in [0, 1]. Returns a 4 or 8 character rgba hex
48
- */
49
- export declare function rgbaToHex(r: number, g: number, b: number, a: number, allow4Char: boolean): string;
50
- /**
51
- * Converts an RGBA color to an ARGB Hex8 string
52
- * Rarely used, but required for "toFilter()"
53
- */
54
- export declare function rgbaToArgbHex(r: number, g: number, b: number, a: number): string;
55
- /** Converts a decimal to a hex value */
56
- export declare function convertDecimalToHex(d: string | number): string;
57
- /** Converts a hex value to a decimal */
58
- export declare function convertHexToDecimal(h: string): number;
59
- /** Parse a base-16 hex value into a base-10 integer */
60
- export declare function parseIntFromHex(val: string): number;
61
- export declare function numberInputToObject(color: number): RGB;