/*! * DevExpress Gantt (dx-gantt.min) * Version: 4.0.27 * Build date: Tue Jun 21 2022 * * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Gantt=t():(e.DevExpress=e.DevExpress||{},e.DevExpress.Gantt=t())}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=84)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return s})),n.d(t,"__decorate",(function(){return a})),n.d(t,"__param",(function(){return l})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return u})),n.d(t,"__generator",(function(){return d})),n.d(t,"__createBinding",(function(){return p})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return f})),n.d(t,"__read",(function(){return g})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__spreadArray",(function(){return v})),n.d(t,"__await",(function(){return T})),n.d(t,"__asyncGenerator",(function(){return k})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return I})),n.d(t,"__classPrivateFieldGet",(function(){return C})),n.d(t,"__classPrivateFieldSet",(function(){return D})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof T?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(e){u(o[0][3],e)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:T(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var w=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return w(t,e),t}function I(e){return e&&e.__esModule?e:{default:e}}function C(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function D(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(43);t.isDefined=function(e){return null!=e},t.boolToInt=function(e){return e?1:0},t.boolToString=function(e){return e?"1":"0"},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isNonNullString=function(e){return!!e},t.isEven=function(e){return e%2!=0},t.isOdd=function(e){return e%2==0},t.numberToStringBin=function(e,t){return void 0===t&&(t=0),r.StringUtils.padLeft(e.toString(2),t,"0")},t.numberToStringHex=function(e,t){return void 0===t&&(t=0),r.StringUtils.padLeft(e.toString(16),t,"0")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(1),o=n(56),s=n(43),a=function(){function e(){}return e.clearInnerHtml=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},e.setStylePosition=function(e,t){e.left=o.MathUtils.round(t.x,3)+"px",e.top=o.MathUtils.round(t.y,3)+"px"},e.setStyleSize=function(e,t){e.width=o.MathUtils.round(t.width,3)+"px",e.height=o.MathUtils.round(t.height,3)+"px"},e.setStyleSizeAndPosition=function(t,n){e.setStylePosition(t,n),e.setStyleSize(t,n)},e.hideNode=function(e){if(e){var t=e.parentNode;t&&t.removeChild(e)}},e.isHTMLElementNode=function(e){return e.nodeType===Node.ELEMENT_NODE},e.isTextNode=function(e){return e.nodeType===Node.TEXT_NODE},e.isElementNode=function(e){return e.nodeType===Node.ELEMENT_NODE},e.isHTMLTableRowElement=function(e){return"TR"===e.tagName},e.isItParent=function(e,t){if(!e||!t)return!1;for(;t;){if(t===e)return!0;if("BODY"===t.tagName)return!1;t=t.parentNode}return!1},e.getParentByTagName=function(e,t){for(t=t.toUpperCase();e;){if("BODY"===e.tagName)return null;if(e.tagName===t)return e;e=e.parentNode}return null},e.getDocumentScrollTop=function(){var t=r.Browser.IE&&"hidden"===e.getCurrentStyle(document.body).overflow&&document.body.scrollTop>0;return r.Browser.WebKitFamily||r.Browser.Edge||t?r.Browser.MacOSMobilePlatform?window.pageYOffset:r.Browser.WebKitFamily&&document.documentElement.scrollTop||document.body.scrollTop:document.documentElement.scrollTop},e.getDocumentScrollLeft=function(){var t=r.Browser.IE&&"hidden"===e.getCurrentStyle(document.body).overflow&&document.body.scrollLeft>0;return r.Browser.Edge||t?document.body?document.body.scrollLeft:document.documentElement.scrollLeft:r.Browser.WebKitFamily?document.documentElement.scrollLeft||document.body.scrollLeft:document.documentElement.scrollLeft},e.getCurrentStyle=function(e){if(e.currentStyle)return e.currentStyle;if(document.defaultView&&document.defaultView.getComputedStyle){var t=document.defaultView.getComputedStyle(e,null);if(!t&&r.Browser.Firefox&&window.frameElement){for(var n=[],o=window.frameElement;!(t=document.defaultView.getComputedStyle(e,null));)n.push([o,o.style.display]),o.style.setProperty("display","block","important"),o="BODY"===o.tagName?o.ownerDocument.defaultView.frameElement:o.parentNode;t=function(e){if("object"!=typeof e||!i.isDefined(e))return e;var t={};for(var n in e)t[n]=e[n];return t}(t);for(var s=void 0,a=0;s=n[a];a++)s[0].style.display=s[1];document.body.offsetWidth}return t}return window.getComputedStyle(e,null)},e.setFocus=function(e){function t(){try{e.focus(),r.Browser.IE&&document.activeElement!==e&&e.focus()}catch(e){}}r.Browser.MacOSMobilePlatform?t():setTimeout((function(){t()}),100)},e.hasClassName=function(e,t){try{var n=t.split(" "),r=e.classList;if(r){for(var i=n.length-1;i>=0;i--)if(!r.contains(n[i]))return!1}else{var o=e.getAttribute&&e.getAttribute("class");if(!o)return!1;var s=o.split(" ");for(i=n.length-1;i>=0;i--)if(s.indexOf(n[i])<0)return!1}return!0}catch(e){return!1}},e.addClassName=function(t,n){if(!e.hasClassName(t,n)){var r=t.getAttribute&&t.getAttribute("class");t.setAttribute("class",""===r?n:r+" "+n)}},e.removeClassName=function(e,t){var n=" "+(e.getAttribute&&e.getAttribute("class"))+" ",r=n.replace(" "+t+" "," ");n.length!==r.length&&e.setAttribute("class",s.StringUtils.trim(r))},e.toggleClassName=function(t,n,r){void 0===r?e.hasClassName(t,n)?e.removeClassName(t,n):e.addClassName(t,n):r?e.addClassName(t,n):e.removeClassName(t,n)},e.pxToInt=function(e){return l(e,parseInt)},e.pxToFloat=function(e){return l(e,parseFloat)},e.getAbsolutePositionY=function(t){function n(t){return Math.round(t.getBoundingClientRect().top+e.getDocumentScrollTop())}return t?r.Browser.IE?function(t){return r.Browser.IE&&null===t.parentNode?0:t.getBoundingClientRect().top+e.getDocumentScrollTop()}(t):r.Browser.Firefox&&r.Browser.Version>=3?n(t):r.Browser.Opera?function(t){var n=!0;t&&e.isHTMLTableRowElement(t)&&t.cells.length>0&&(t=t.cells[0]);for(var r=c(t,!1);null!=t;)r+=t.offsetTop,n||(r-=t.scrollTop),t=t.offsetParent,n=!1;return r+=document.body.scrollTop}(t):r.Browser.NetscapeFamily&&(!r.Browser.Firefox||r.Browser.Version<3)?function(t){for(var n=c(t,!1),i=!0;null!=t;){if(n+=t.offsetTop,i||null==t.offsetParent||(n-=t.scrollTop),!i&&r.Browser.Firefox){var o=e.getCurrentStyle(t);"DIV"===t.tagName&&"visible"!==o.overflow&&(n+=e.pxToInt(o.borderTopWidth))}i=!1,t=t.offsetParent}return n}(t):r.Browser.WebKitFamily||r.Browser.Edge?n(t):function(e){for(var t=0,n=!0;null!=e;)t+=e.offsetTop,n||null==e.offsetParent||(t-=e.scrollTop),n=!1,e=e.offsetParent;return t}(t):0},e.getAbsolutePositionX=function(t){function n(t){return Math.round(t.getBoundingClientRect().left+e.getDocumentScrollLeft())}return t?r.Browser.IE?function(t){return r.Browser.IE&&null===t.parentNode?0:t.getBoundingClientRect().left+e.getDocumentScrollLeft()}(t):r.Browser.Firefox&&r.Browser.Version>=3?n(t):r.Browser.Opera&&r.Browser.Version<=12?function(e){for(var t=!0,n=c(e,!0);null!=e;)n+=e.offsetLeft,t||(n-=e.scrollLeft),e=e.offsetParent,t=!1;return n+=document.body.scrollLeft}(t):r.Browser.NetscapeFamily&&(!r.Browser.Firefox||r.Browser.Version<3)?function(t){for(var n=c(t,!0),i=!0;null!=t;){if(n+=t.offsetLeft,i||null==t.offsetParent||(n-=t.scrollLeft),!i&&r.Browser.Firefox){var o=e.getCurrentStyle(t);"DIV"===t.tagName&&"visible"!==o.overflow&&(n+=e.pxToInt(o.borderLeftWidth))}i=!1,t=t.offsetParent}return n}(t):r.Browser.WebKitFamily||r.Browser.Edge?n(t):function(e){for(var t=0,n=!0;null!=e;)t+=e.offsetLeft,n||null==e.offsetParent||(t-=e.scrollLeft),n=!1,e=e.offsetParent;return t}(t):0},e.isInteractiveControl=function(e){return["A","INPUT","SELECT","OPTION","TEXTAREA","BUTTON","IFRAME"].indexOf(e.tagName)>-1},e.getClearClientHeight=function(t){return t.offsetHeight-(e.getTopBottomPaddings(t)+e.getVerticalBordersWidth(t))},e.getTopBottomPaddings=function(t,n){var r=n||e.getCurrentStyle(t);return e.pxToInt(r.paddingTop)+e.pxToInt(r.paddingBottom)},e.getVerticalBordersWidth=function(t,n){i.isDefined(n)||(n=r.Browser.IE&&9!==r.Browser.MajorVersion&&window.getComputedStyle?window.getComputedStyle(t):e.getCurrentStyle(t));var o=0;return"none"!==n.borderTopStyle&&(o+=e.pxToFloat(n.borderTopWidth)),"none"!==n.borderBottomStyle&&(o+=e.pxToFloat(n.borderBottomWidth)),o},e.getNodes=function(e,t){for(var n=e.all||e.getElementsByTagName("*"),r=[],i=0;i=9||r.Browser.Edge?t.textContent:t.innerText},e.html2PlainTextFilter=null,e.verticalScrollBarWidth=void 0,e}();function l(e,t){var n=0;if(i.isDefined(e)&&""!==e)try{var r=e.indexOf("px");r>-1&&(n=t(e.substr(0,r)))}catch(e){}return n}function c(e,t){for(var n=0,r=!0;null!=e&&"BODY"!==e.tagName;){var i=a.getCurrentStyle(e);if("absolute"===i.position)break;r||"DIV"!==e.tagName||""!==i.position&&"static"!==i.position||(n-=t?e.scrollLeft:e.scrollTop),e=e.parentNode,r=!1}return n}t.DomUtils=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaEventSource=t.TaskTitlePosition=t.Position=t.ViewType=void 0,function(e){e[e.TenMinutes=0]="TenMinutes",e[e.Hours=1]="Hours",e[e.SixHours=2]="SixHours",e[e.Days=3]="Days",e[e.Weeks=4]="Weeks",e[e.Months=5]="Months",e[e.Quarter=6]="Quarter",e[e.Years=7]="Years",e[e.FiveYears=8]="FiveYears"}(t.ViewType||(t.ViewType={})),function(e){e[e.Left=0]="Left",e[e.Top=1]="Top",e[e.Right=2]="Right",e[e.Bottom=3]="Bottom"}(t.Position||(t.Position={})),function(e){e[e.Inside=0]="Inside",e[e.Outside=1]="Outside",e[e.None=2]="None"}(t.TaskTitlePosition||(t.TaskTitlePosition={})),function(e){e[e.TaskArea=0]="TaskArea",e[e.TaskEdit_Frame=1]="TaskEdit_Frame",e[e.TaskEdit_Progress=2]="TaskEdit_Progress",e[e.TaskEdit_Start=3]="TaskEdit_Start",e[e.TaskEdit_End=4]="TaskEdit_End",e[e.TaskEdit_DependencyStart=5]="TaskEdit_DependencyStart",e[e.TaskEdit_DependencyFinish=6]="TaskEdit_DependencyFinish",e[e.Successor_Wrapper=7]="Successor_Wrapper",e[e.Successor_DependencyStart=8]="Successor_DependencyStart",e[e.Successor_DependencyFinish=9]="Successor_DependencyFinish"}(t.TaskAreaEventSource||(t.TaskAreaEventSource={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.x=e,this.y=t}return e.zero=function(){return new e(0,0)},e.fromNumber=function(t){return new e(t,t)},e.prototype.isZero=function(){return 0===this.x&&0===this.y},e.prototype.toString=function(){return JSON.stringify(this)},e.prototype.copyFrom=function(e){this.x=e.x,this.y=e.y},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(e){return this.x===e.x&&this.y===e.y},e.prototype.offset=function(e,t){return this.x+=e,this.y+=t,this},e.prototype.offsetByPoint=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.multiply=function(e,t){return this.x*=e,this.y*=t,this},e.prototype.negative=function(){return this.x*=-1,this.y*=-1,this},e.prototype.applyConverter=function(e){return this.x=e(this.x),this.y=e(this.y),this},e.plus=function(t,n){return new e(t.x+n.x,t.y+n.y)},e.minus=function(t,n){return new e(t.x-n.x,t.y-n.y)},e.xComparer=function(e,t){return e.x-t.x},e.yComparer=function(e,t){return e.y-t.y},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();t.Point=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommandBase=void 0;var r=function(){function e(e){this.control=e}return Object.defineProperty(e.prototype,"modelManipulator",{get:function(){return this.control.modelManipulator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"history",{get:function(){return this.control.history},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"validationController",{get:function(){return this.control.validationController},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state||(this._state=this.getState()),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(){for(var e=[],t=0;t0?t:e:t:null},e.getMinDate=function(e,t){return e||t?e?t?this.compareDates(e,t)>0?e:t:e:t:null},e.getDaysBetween=function(e,t){var n=Math.abs(t.getTime()-e.getTime());return Math.ceil(n/this.msInDay)},e.getWeeksBetween=function(e,t){var n=this.getDaysBetween(e,t),r=Math.floor(n/7);return e.getDay()>t.getDay()&&r++,r},e.getMonthsDifference=function(e,t){var n=this.compareDates(e,t),r=n>=0?e:t,i=n>=0?t:e;return 12*(i.getFullYear()-r.getFullYear())+(i.getMonth()-r.getMonth())},e.getYearsDifference=function(e,t){return Math.abs(t.getFullYear()-e.getFullYear())},e.getDayNumber=function(e){return Math.ceil(e.getTime()/this.msInDay)},e.getDateByDayNumber=function(e){var t=new Date(e*this.msInDay);return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t},e.addDays=function(e,t){return new Date(e.getTime()+t*this.msInDay)},e.checkDayOfMonth=function(e,t){return e==t.getDate()},e.checkDayOfWeek=function(e,t){return e==t.getDay()},e.checkMonth=function(e,t){return e==t.getMonth()},e.checkYear=function(e,t){return e==t.getFullYear()},e.checkDayOfWeekOccurrenceInMonth=function(e,t,n){var r=this.getSpecificDayOfWeekInMonthDates(t,e.getFullYear(),e.getMonth());return n==a.DayOfWeekMonthlyOccurrence.Last?this.areDatesEqual(e,r[r.length-1]):this.areDatesEqual(e,r[n])},e.getFirstDayOfWeekInMonth=function(e,t){return new Date(e,t,1).getDay()},e.getSpecificDayOfWeekInMonthDates=function(e,t,n){for(var r=this.getFirstDayOfWeekInMonth(t,n),i=e>=r?e-r:e+7-r,o=new Array,s=new Date(t,n,i+1);s.getMonth()==n;)o.push(s),s=this.addDays(s,7);return o},e.getSpecificDayOfWeekInMonthDate=function(e,t,n,r){var i=this.getSpecificDayOfWeekInMonthDates(e,t,n);return r==a.DayOfWeekMonthlyOccurrence.Last?i[i.length-1]:i[r]},e.checkValidDayInMonth=function(e,t,n){return!(n<1||n>31||new Date(e,t,n).getMonth()!=t)},e.getNextMonth=function(e,t){return void 0===t&&(t=1),(e+t)%12},e.convertToDate=function(e){if(e instanceof Date)return new Date(e);var t=Date.parse(e);return isNaN(t)?null:new Date(t)},e.convertTimeRangeToDateRange=function(e,t){var n=this.getDateByDayNumber(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=e.start,l=new Date(r,i,o,a.hour,a.min,a.sec,a.msec),c=e.end,u=new Date(r,i,o,c.hour,c.min,c.sec,c.msec);return new s.DateRange(l,u)},e.convertToTimeRanges=function(e){var t=this;return e instanceof Array?e.map((function(e){return t.convertToTimeRange(e)})):this.parseTimeRanges(e)},e.convertToTimeRange=function(e){return e?e instanceof i.TimeRange?e:(0,o.isDefined)(e.start)&&(0,o.isDefined)(e.end)?new i.TimeRange(this.convertToTime(e.start),this.convertToTime(e.end)):this.parseTimeRange(e):null},e.convertToTime=function(e){return e?e instanceof r.Time?e:e instanceof Date?this.getTimeGromJsDate(e):this.parseTime(e):null},e.parseTimeRanges=function(e){var t=this;return e?e.split(/;|,/).map((function(e){return t.parseTimeRange(e)})).filter((function(e){return!!e})):null},e.parseTimeRange=function(e){if(!e)return null;var t=e.split("-"),n=t[0],r=t[1];return(0,o.isDefined)(n)&&(0,o.isDefined)(r)?new i.TimeRange(this.parseTime(n),this.parseTime(r)):null},e.parseTime=function(e){if(!e)return null;var t=e.split(":"),n=parseInt(t[0])||0,i=parseInt(t[1])||0,o=parseInt(t[2])||0,s=parseInt(t[3])||0;return new r.Time(n,i,o,s)},e.getTimeGromJsDate=function(e){if(!e)return null;var t=e.getHours(),n=e.getMinutes(),i=e.getSeconds(),o=e.getMilliseconds();return new r.Time(t,n,i,o)},e.caclTimeDifference=function(e,t){return t.getTimeInMilleconds()-e.getTimeInMilleconds()},e.areTimesEqual=function(e,t){return 0==this.caclTimeDifference(e,t)},e.getMaxTime=function(e,t){return e||t?e?t&&this.caclTimeDifference(e,t)>0?t:e:t:null},e.getMinTime=function(e,t){return e||t?e?t?this.caclTimeDifference(e,t)>0?e:t:e:t:null},e.getLastTimeOfDay=function(){return new r.Time(23,59,59,999)},e.msInDay=864e5,e}();t.DateTimeUtils=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(1),o=n(2),s=n(189),a=function(){function e(){}return e.preventEvent=function(e){e.cancelable&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},e.getEventSource=function(t){return i.isDefined(t)?e.getEventSourceCore(t):null},e.getEventSourceByPosition=function(t){if(!i.isDefined(t))return null;if(!document.elementFromPoint)return e.getEventSourceCore(t);var n=e.getEventX(t),r=e.getEventY(t);return void 0===n||void 0===r?e.getEventSourceCore(t):document.elementFromPoint(n,r)},e.getEventSourceCore=function(e){return e.srcElement?e.srcElement:e.target},e.getMouseWheelEventName=function(){return r.Browser.Safari?"mousewheel":r.Browser.NetscapeFamily&&r.Browser.MajorVersion<17?"DOMMouseScroll":"wheel"},e.isLeftButtonPressed=function(t){return!!s.TouchUtils.isTouchEvent(t)||!!(t=r.Browser.IE&&i.isDefined(event)?event:t)&&(r.Browser.IE&&r.Browser.Version<11?!!r.Browser.MSTouchUI||t.button%2==1:r.Browser.WebKitFamily?"pointermove"===t.type?1===t.buttons:1===t.which:r.Browser.NetscapeFamily||r.Browser.Edge||r.Browser.IE&&r.Browser.Version>=11?e.isMoveEventName(t.type)?1===t.buttons:1===t.which:!r.Browser.Opera||0===t.button)},e.isMoveEventName=function(t){return t===s.TouchUtils.touchMouseMoveEventName||t===e.getMoveEventName()},e.getMoveEventName=function(){return window.PointerEvent?"pointermove":r.Browser.TouchUI?"touchmove":"mousemove"},e.preventEventAndBubble=function(t){e.preventEvent(t),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0},e.clientEventRequiresDocScrollCorrection=function(){var e=r.Browser.Safari&&r.Browser.Version<3,t=r.Browser.MacOSMobilePlatform&&r.Browser.Version<5.1;return r.Browser.AndroidDefaultBrowser||r.Browser.AndroidChromeBrowser||!(e||t)},e.getEventX=function(t){return s.TouchUtils.isTouchEvent(t)?s.TouchUtils.getEventX(t):t.clientX+(e.clientEventRequiresDocScrollCorrection()?o.DomUtils.getDocumentScrollLeft():0)},e.getEventY=function(t){return s.TouchUtils.isTouchEvent(t)?s.TouchUtils.getEventY(t):t.clientY+(e.clientEventRequiresDocScrollCorrection()?o.DomUtils.getDocumentScrollTop():0)},e.cancelBubble=function(e){e.cancelBubble=!0},e.getWheelDelta=function(e){var t;return t=r.Browser.NetscapeFamily&&r.Browser.MajorVersion<17?-e.detail:r.Browser.Safari?e.wheelDelta:-e.deltaY,r.Browser.Opera&&r.Browser.Version<9&&(t=-t),t},e}();t.EvtUtils=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.IdentUserAgent=function(t,n){void 0===n&&(n=!1);var r=["Mozilla","IE","Firefox","Netscape","Safari","Chrome","Opera","Opera10","Edge"],i={Safari:2,Chrome:.1,Mozilla:1.9,Netscape:8,Firefox:2,Opera:9,IE:6,Edge:12};if(t&&0!==t.length){t=t.toLowerCase(),e.indentPlatformMajorVersion(t);try{for(var o={Windows:"Win",Macintosh:"Mac","Mac OS":"Mac",Mac_PowerPC:"Mac","cpu os":"MacMobile","cpu iphone os":"MacMobile",Android:"Android","!Windows Phone":"WinPhone","!WPDesktop":"WinPhone","!ZuneWP":"WinPhone"},s="(?:(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?)?",a={Safari:"applewebkit(?:.*?(?:version/(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?[\\.\\w\\d]*?(?:\\s+mobile/\\S*)?\\s+safari))?",Chrome:"(?:chrome|crios)(?!frame)(?:/|\\s*)?"+s,Mozilla:"mozilla(?:.*rv:"+s+".*Gecko)?",Netscape:"(?:netscape|navigator)\\d*/?\\s*"+s,Firefox:"firefox(?:/|\\s*)?"+s,Opera:"(?:opera|\\sopr)(?:/|\\s*)?"+s,Opera10:"opera.*\\s*version(?:/|\\s*)?"+s,IE:"msie\\s*"+s,Edge:"edge(?:/|\\s*)?"+s},l=null,c=-1,u=0;u=0){if("IE"===l&&c>=11&&"Safari"===d)continue;"Opera10"===(l=d)&&(l="Opera");c=e.GetBrowserVersion(t,p,"trident(?:/|\\s*)?(?:(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?)?",e.getIECompatibleVersionString()),"Mozilla"===l&&c>=11&&(l="IE")}}l||(l="IE");var h=-1!==c;h||(c=i[l]);var f=null,g=Number.MAX_VALUE;for(var y in o)if(Object.prototype.hasOwnProperty.call(o,y)){var m="!"===y.substr(0,1),v=t.indexOf((m?y.substr(1):y).toLowerCase());v>=0&&(v0;"WinPhone"===f&&c<9&&(c=Math.floor(e.getVersionFromTrident(t,"trident(?:/|\\s*)?"+s))),!n&&"IE"===l&&c>7&&document.documentMode0},e.hasMsMaxTouchPoints=function(){return navigator.msMaxTouchPoints>0},e.hasNavigator=function(){return"undefined"!=typeof navigator},e.fillUserAgentInfo=function(t,n,r,i,o){void 0===o&&(o=!1);for(var s=0;s=15,e.NetscapeFamily=e.Netscape||e.Mozilla||e.Firefox,e.WebKitTouchUI=e.MacOSMobilePlatform||e.AndroidMobilePlatform;var l=e.IE&&e.MajorVersion>9&&e.WindowsPlatform&&e.UserAgent.toLowerCase().indexOf("touch")>=0;if(e.MSTouchUI=l||e.Edge&&!!window.navigator.maxTouchPoints,e.TouchUI=e.WebKitTouchUI||e.MSTouchUI,e.MobileUI=e.WebKitTouchUI||e.WindowsPhonePlatform,e.AndroidDefaultBrowser=e.AndroidMobilePlatform&&!e.Chrome,e.AndroidChromeBrowser=e.AndroidMobilePlatform&&e.Chrome,o&&(e.SamsungAndroidDevice=o),e.MSTouchUI){var c=e.UserAgent.toLowerCase().indexOf("arm;")>-1;e.VirtualKeyboardSupported=c||e.WindowsPhonePlatform}else e.VirtualKeyboardSupported=e.WebKitTouchUI;e.fillDocumentElementBrowserTypeClassNames(t)},e.indentPlatformMajorVersion=function(t){var n=/(?:(?:windows nt|macintosh|mac os|cpu os|cpu iphone os|android|windows phone|linux) )(\d+)(?:[-0-9_.])*/.exec(t);n&&(e.PlaformMajorVersion=n[1])},e.getVersionFromMatches=function(e){var t=-1,n="";return e&&(e[1]&&(n+=e[1],e[2]&&(n+="."+e[2])),""!==n&&(t=parseFloat(n),isNaN(t)&&(t=-1))),t},e.getVersionFromTrident=function(t,n){var r=new RegExp(n,"i").exec(t);return e.getVersionFromMatches(r)+4},e.fillDocumentElementBrowserTypeClassNames=function(t){for(var n="",r=t.concat(["WindowsPlatform","MacOSPlatform","MacOSMobilePlatform","AndroidMobilePlatform","WindowsPhonePlatform","WebKitFamily","WebKitTouchUI","MSTouchUI","TouchUI","AndroidDefaultBrowser"]),i=0;is)i.setTime(s);else if(this.needCorrectDate(e,o,n,r)){var a=this.getNearestLeftTickTime(e,o,n,r),l=this.getNextTickTime(a,n,r);Math.abs(e.getTime()-a)>Math.abs(e.getTime()-l)?i.setTime(l):i.setTime(a)}return i},e.needCorrectDate=function(e,t,n,i){return i==r.ViewType.Months?e.getTime()!==new Date(e.getFullYear(),e.getMonth(),1).getTime():(e.getTime()-t)%n!=0},e.getNearestLeftTickTime=function(e,t,n,i){return i==r.ViewType.Months?new Date(e.getFullYear(),e.getMonth(),1).getTime():t+Math.floor((e.getTime()-t)/n)*n},e.getNextTickTime=function(e,t,n){if(n==r.ViewType.Months){var i=new Date;return i.setTime(e),i.setMonth(i.getMonth()+1),i.getTime()}return e+t},e.adjustStartDateByViewType=function(e,t,n){switch(void 0===n&&(n=0),t){case r.ViewType.TenMinutes:return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case r.ViewType.SixHours:case r.ViewType.Hours:return new Date(e.getFullYear(),e.getMonth(),e.getDate());case r.ViewType.Days:case r.ViewType.Weeks:return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+n);case r.ViewType.Months:case r.ViewType.Quarter:case r.ViewType.Years:return new Date(e.getFullYear(),0,1);default:return new Date}},e.adjustEndDateByViewType=function(e,t,n){switch(void 0===n&&(n=0),t){case r.ViewType.TenMinutes:return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()+1);case r.ViewType.SixHours:case r.ViewType.Hours:return new Date(e.getFullYear(),e.getMonth(),e.getDate()+1);case r.ViewType.Days:case r.ViewType.Weeks:return new Date(e.getFullYear(),e.getMonth(),e.getDate()+7-e.getDay()+n);case r.ViewType.Months:case r.ViewType.Quarter:case r.ViewType.Years:return new Date(e.getFullYear()+1,0,1);default:return new Date}},e.roundStartDate=function(e,t){switch(t){case r.ViewType.TenMinutes:case r.ViewType.Hours:return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()-1);case r.ViewType.SixHours:case r.ViewType.Days:return new Date(e.getFullYear(),e.getMonth(),e.getDate()-1);case r.ViewType.Weeks:return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case r.ViewType.Months:return new Date(e.getFullYear(),e.getMonth()-1);case r.ViewType.Quarter:case r.ViewType.Years:return new Date(e.getFullYear()-1,0,1);default:return new Date}},e.getTickTimeSpan=function(t){switch(t){case r.ViewType.TenMinutes:return e.msPerHour/6;case r.ViewType.Hours:return e.msPerHour;case r.ViewType.SixHours:return 6*e.msPerHour;case r.ViewType.Days:return e.msPerDay;case r.ViewType.Weeks:return e.msPerWeek;case r.ViewType.Months:return e.msPerMonth;case r.ViewType.Quarter:return 3*e.msPerMonth;case r.ViewType.Years:return e.msPerYear}},e.getRangeTickCount=function(t,n,i){return i===r.ViewType.Months?this.getRangeTickCountInMonthsViewType(t,n):i===r.ViewType.Quarter?this.getRangeTickCountInQuarterViewType(t,n):e.getRangeMSPeriod(t,n)/e.getTickTimeSpan(i)},e.getRangeMSPeriod=function(t,n){return n.getTime()-e.getDSTDelta(t,n)-t.getTime()},e.getRangeTickCountInMonthsViewType=function(t,n){var r=new Date(t.getFullYear(),t.getMonth(),1),i=new Date(n.getFullYear(),n.getMonth(),1);return e.getOffsetInMonths(r,i)+(n.getTime()-i.getTime())/(e.getDaysInMonth(n.getMonth(),n.getFullYear())*e.msPerDay)-(t.getTime()-r.getTime())/(e.getDaysInMonth(t.getMonth(),t.getFullYear())*e.msPerDay)},e.getRangeTickCountInQuarterViewType=function(t,n){var r=new Date(t.getFullYear(),3*Math.floor(t.getMonth()/3),1),i=new Date(n.getFullYear(),3*Math.floor(n.getMonth()/3),1);return e.getOffsetInQuarters(r,i)+(n.getTime()-i.getTime())/(e.getDaysInQuarter(i)*e.msPerDay)-(t.getTime()-r.getTime())/(e.getDaysInQuarter(r)*e.msPerDay)},e.parse=function(e){return"function"==typeof e?new Date(e()):new Date(e)},e.getOrCreateUTCDate=function(e){var t=e.getTimezoneOffset();return t?new Date(e.valueOf()+6e4*t):e},e.getTimezoneOffsetDiff=function(e,t){return t.getTimezoneOffset()-e.getTimezoneOffset()},e.getDSTDelta=function(t,n){var r=e.getTimezoneOffsetDiff(t,n)*e.msPerMinute;return r>0?r:0},e.getDSTCorrectedDate=function(t,n){var r=t.getTime()+n,i=e.getDSTDelta(t,new Date(r));return new Date(r+i)},e.msPerMinute=6e4,e.msPerHour=36e5,e.msPerDay=24*e.msPerHour,e.msPerWeek=7*e.msPerDay,e.msPerMonth=30*e.msPerDay,e.msPerYear=365*e.msPerDay,e.ViewTypeToScaleMap=((t={})[r.ViewType.TenMinutes]=r.ViewType.Hours,t[r.ViewType.Hours]=r.ViewType.Days,t[r.ViewType.SixHours]=r.ViewType.Days,t[r.ViewType.Days]=r.ViewType.Weeks,t[r.ViewType.Weeks]=r.ViewType.Months,t[r.ViewType.Months]=r.ViewType.Years,t[r.ViewType.Quarter]=r.ViewType.Years,t[r.ViewType.Years]=r.ViewType.FiveYears,t),e}();t.DateUtils=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Color=void 0;var r=n(1),i=function(){function e(e){this._num=null,this._opacity=1,this._rgb=null,this.assign(e)}return Object.defineProperty(e.prototype,"opacity",{get:function(){return this._opacity},enumerable:!1,configurable:!0}),e.prototype.hasValue=function(){return(0,r.isDefined)(this._num)||!!this._rgb||0===this._opacity},e.prototype.getValue=function(){return!(0===this._opacity&&!this._rgb)&&((0,r.isDefined)(this._num)?this._num:this._rgb?this.getRBGColor():null)},e.prototype.assign=function(t){this.reset(),"string"==typeof t&&this.assignFromString(t),"number"==typeof t&&(this._num=t),t instanceof Array&&this.assignFromRgbArray(t),t instanceof e&&this.assignFromColor(t)},e.prototype.reset=function(){this._opacity=1,this._num=null,this._rgb=null},e.prototype.assignFromString=function(e){e&&("transparent"===e&&(this._opacity=0),0===e.indexOf("#")&&this.assignFromHexString(e),"rgb"===e.substr(0,3).toLowerCase()&&this.assignFromRgbString(e))},e.prototype.assignFromHexString=function(e){if(4===e.length&&(e="#"+e[1].repeat(2)+e[2].repeat(2)+e[3].repeat(2)),e.length>6){var t=parseInt(e.substr(1,2),16),n=parseInt(e.substr(3,2),16),r=parseInt(e.substr(5,2),16);this._rgb=[t,n,r]}},e.prototype.assignFromRgbString=function(t){var n="rgba"===t.substr(0,4).toLowerCase(),r=t.toLowerCase().match(n?e.rgbaRegexp:e.rgbRegexp);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),s=parseInt(r[3]);this._rgb=[i,o,s],n&&(this._opacity=parseFloat(r[4]))}},e.prototype.assignFromRgbArray=function(e){e&&e.length>2&&(this._rgb=[e[0],e[1],e[2]],(0,r.isDefined)(e[3])&&(this._opacity=e[3]))},e.prototype.assignFromColor=function(e){this._opacity=e._opacity,this._num=e._num,this._rgb=e._rgb},e.prototype.getRBGColor=function(){return this._rgb?this._rgb:[0,0,0]},e.prototype.applyOpacityToBackground=function(t){if(1!==this._opacity){var n=(t instanceof e?t:new e(t)).getValue();if(n instanceof Array){var r=this.opacity,i=Math.round((1-r)*n[0]+r*this._rgb[0]),o=Math.round((1-r)*n[1]+r*this._rgb[1]),s=Math.round((1-r)*n[2]+r*this._rgb[2]);this._rgb=[i,o,s]}}},e.rgbRegexp=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/,e.rgbaRegexp=/rgba?\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,?\s*([0-9]*\.?[0-9]*)\s*\)/,e}();t.Color=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseManipulator=void 0;var r=function(){function e(e,t){this.viewModel=e,this.dispatcher=t}return e.prototype.getErrorCallback=function(){return this.viewModel.getDataUpdateErrorCallback()},Object.defineProperty(e.prototype,"renderHelper",{get:function(){return this.viewModel.owner.renderHelper},enumerable:!1,configurable:!0}),e}();t.BaseManipulator=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskPropertyManipulator=void 0;var r=n(0),i=n(74),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.setValue=function(e,t){var n=this.viewModel.tasks.getItemById(e),r=new i.HistoryItemState(e,this.getPropertyValue(n));this.setPropertyValue(n,t);var o=this.viewModel.findItem(e);return o&&this.renderHelper.recreateTaskElement(o.visibleIndex),r},t.prototype.restoreValue=function(e){if(e){var t=this.viewModel.tasks.getItemById(e.id);this.setPropertyValue(t,e.value);var n=this.viewModel.findItem(e.id);n&&this.renderHelper.recreateTaskElement(n.visibleIndex)}},t}(n(19).BaseManipulator);t.TaskPropertyManipulator=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataObject=void 0;var r=n(1),i=n(56),o=function(){function e(){this.internalId=i.MathUtils.generateGuid()}return e.prototype.assignFromObject=function(e){(0,r.isDefined)(e)&&(0,r.isDefined)(e.id)&&(this.id=e.id,this.internalId=String(e.id))},e}();t.DataObject=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogBase=void 0;var r=n(0),i=n(5),o=n(6),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isApiCall=!1,t._canRefresh=!0,t}return r.__extends(t,e),t.prototype.execute=function(t,n){return void 0===t&&(t=void 0),void 0===n&&(n=!1),this.isApiCall=n,e.prototype.execute.call(this,t)},t.prototype.executeInternal=function(e){return this.options=e,this.showDialog(e)},Object.defineProperty(t.prototype,"canRefresh",{get:function(){return this._canRefresh},enumerable:!1,configurable:!0}),t.prototype.refresh=function(){this.showDialog(this.options)},t.prototype.showDialog=function(e){var n=this,r=this.createParameters(e),i=r.clone();return!!this.onBeforeDialogShow(r)&&(t.activeInstance=this,this.control.showDialog(this.getDialogName(),r,(function(e){e&&(n._canRefresh=!1,n.applyParameters(e,i),n._canRefresh=!0)}),(function(){delete t.activeInstance,n.afterClosing()})),!0)},t.prototype.onBeforeDialogShow=function(e){return!0},t.prototype.applyParameters=function(e,t){return!1},t.prototype.afterClosing=function(){},t.prototype.getState=function(){return new o.SimpleCommandState(this.isEnabled())},t.activeInstance=null,t}(i.CommandBase);t.DialogBase=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceCollection=void 0;var r=n(0),i=n(24),o=n(55),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.createItem=function(){return new o.Resource},t}(i.CollectionBase);t.ResourceCollection=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionBase=void 0;var r=n(1),i=n(91),o=function(){function e(){this._items=new Array,this._isGanttCollection=!0}return e.prototype.add=function(e){if((0,r.isDefined)(e)){if(this.getItemById(e.internalId))throw"The collection item with id ='"+e.internalId+"' already exists.";this._addItem(e)}},e.prototype.addRange=function(e){for(var t=0;t-1&&t-1&&e0){var t=this.createItem();t.assignFromObject(e),this.add(t)}},e.prototype.importFromArray=function(e){for(var t=0;t0&&this.control.validationController.updateParentsIfRequired(e.children[0].task.internalId)},t}(i.CommandBase);t.TaskCommandBase=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskPropertyCommandBase=void 0;var r=n(0),i=n(5),o=n(6),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getState=function(){return new o.SimpleCommandState(this.isEnabled())},t.prototype.isEnabled=function(){return e.prototype.isEnabled.call(this)&&this.control.settings.editing.allowTaskUpdate},t.prototype.getTask=function(e){return this.control.viewModel.tasks.getItemById(e)},t}(i.CommandBase);t.TaskPropertyCommandBase=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GridLayoutCalculator=void 0;var r=n(11),i=n(15),o=n(3),s=n(68),a=n(4),l=n(17),c=n(69),u=n(25),d=n(147),p=n(1),h=function(){function e(){this.tileToDependencyMap=[],this.tileToNoWorkingIntervalsMap=[],this.minLineLength=10,this.resourceMaxWidth=500,this.minTaskWidth=2,this._taskWrapperPoints=Array(),this._taskElementInfoList=Array(),this._scaleCalculator=new d.ScaleCalculator}return e.prototype.setSettings=function(e,t,n,i,o,s,a,c){void 0===a&&(a=0),void 0===c&&(c=0),this.visibleTaskAreaSize=e,this.tickSize=t,this._viewType=s,this.range=i,this.verticalTickCount=o.itemCount,this.viewModel=o,this.elementSizeValues=n,this.taskHeight=n.taskHeight,this.parentTaskHeight=n.parentTaskHeight,this.milestoneWidth=n.milestoneWidth,this.scaleHeight=n.scaleItemHeight,this.arrowSize=new r.Size(n.connectorArrowWidth,n.connectorArrowWidth),this.lineThickness=n.connectorLineThickness,this.minConnectorSpaceFromTask=(this.tickSize.height-this.taskHeight)/2,this.tickTimeSpan=l.DateUtils.getTickTimeSpan(s),this.scrollBarHeight=a,this.createTileToNonWorkingIntervalsMap(),this._scaleCalculator.setSettings(i,s,t,c),this.reset()},Object.defineProperty(e.prototype,"viewType",{get:function(){return this._viewType},set:function(e){this._viewType!==e&&(this._viewType=e,this._scaleCalculator.setViewType(e))},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this._taskWrapperPoints=new Array,this._taskElementInfoList=Array()},e.prototype.resetTaskInfo=function(e){delete this._taskWrapperPoints[e],delete this._taskElementInfoList[e]},e.prototype.getTaskAreaBorderInfo=function(e,t){var n=t?this.getVerticalGridLineHeight():this.getTotalWidth();return this.getGridBorderInfo(e,t,n)},e.prototype.getTotalWidth=function(){return this._scaleCalculator.scaleWidth},e.prototype.getScaleBorderInfo=function(e,t){var n=new s.GridElementInfo,i=this._scaleCalculator;return n.setPosition(new a.Point(i.getScaleBorderPosition(e,t),void 0)),n.setSize(new r.Size(0,this.scaleHeight)),n.className="dx-gantt-vb",n},e.prototype.getGridBorderInfo=function(e,t,n){var r=new s.GridElementInfo;return r.setPosition(this.getGridBorderPosition(e,t)),n&&r.setSize(this.getGridBorderSize(t,n)),r.className=t?"dx-gantt-vb":"dx-gantt-hb",r},e.prototype.getGridBorderPosition=function(e,t){var n=new a.Point(void 0,void 0),r=this._scaleCalculator,i=t?r.getScaleBorderPosition(e,this.viewType):(e+1)*this.tickSize.height;return t?n.x=i:n.y=i,n},e.prototype.getGridBorderSize=function(e,t){var n=new r.Size(0,0);return e?n.height=t:n.width=t,n},e.prototype.getScaleElementInfo=function(e,t){var n=new s.GridElementInfo,r=this.getScaleItemInfo(e,t);if(r){n.setPosition(r.position),n.setSize(r.size),n.className=this.getScaleItemClassName(t,n,this.getRenderedNoWorkingIntervals(n.position.x));var i=this._scaleCalculator.getScaleItems(t);(0===e||e===i.length-1)&&(n.style.overflowX="hidden",n.style.textOverflow="ellipsis")}return n},e.prototype.getScaleItemStart=function(e,t){return this._scaleCalculator.getScaleItemAdjustedStart(e,t)},e.prototype.getScaleItemClassName=function(e,t,n){var r="dx-gantt-si";return e.valueOf()==this.viewType.valueOf()&&this.isScaleItemInsideNoWorkingInterval(t,n)&&(r+=" dx-gantt-holiday-scaleItem"),r},e.prototype.getScaleItemInfo=function(e,t){return this._scaleCalculator.getScaleItem(e,t)},e.prototype.getScaleRangesInArea=function(e,t){var n=l.DateUtils.ViewTypeToScaleMap[this.viewType],r=this._scaleCalculator,i=Math.max(r.getScaleIndexByPos(e,n),0),o=r.getScaleIndexByPos(t,n);-1===o&&(o=r.topScaleItems.length-1);var s=Math.max(r.getScaleIndexByPos(e),0),a=r.getScaleIndexByPos(t);return-1===a&&(a=r.bottomScaleItems.length-1),[[i,o],[s,a]]},e.prototype.isScaleItemInsideNoWorkingInterval=function(e,t){for(var n=e.position.x,r=e.position.x+e.size.width,i=0;i=o&&r<=s)return!0}return!1},e.prototype.getScaleItemColSpan=function(e){return this._scaleCalculator.getScaleItemColSpan(e)},e.prototype.getTaskWrapperElementInfo=function(e){var t=new s.GridElementInfo;return t.className=this.getTaskWrapperClassName(e),t.setPosition(this.getTaskWrapperPoint(e)),t.setAttribute("task-index",e),t},e.prototype.getTaskWrapperClassName=function(e){var t="dx-gantt-taskWrapper",n=this.getViewItem(e);return n.task.isMilestone()&&!n.isCustom&&(t="dx-gantt-milestoneWrapper"),n.selected&&(t+=" dx-gantt-selectedTask"),t},e.prototype.getTaskWrapperPoint=function(e){if(!(0,p.isDefined)(this._taskWrapperPoints[e])){var t=this.getViewItem(e),n=this.getTaskHeight(e),r=e*this.tickSize.height+(this.tickSize.height-n)/2,i=new a.Point(this.getPosByDate(t.task.start),r);t.task.isMilestone()&&!t.isCustom&&(i.x-=n/2),this._taskWrapperPoints[e]=i}return this._taskWrapperPoints[e].clone()},e.prototype.getTaskElementInfo=function(e,t){if(void 0===t&&(t=!1),!(0,p.isDefined)(this._taskElementInfoList[e])){var n=new s.GridElementInfo,r=this.getTask(e),i=this.viewModel.parentAutoCalc&&this.viewModel.taskHasChildrenByIndex(e);if(!r.isMilestone()){var o=this.getTaskWidth(e);n.size.width=this.getCorrectedTaskWidthByRange(e,o),n.size.width=100&&(n+=" dx-gantt-cmpl"),n},e.prototype.getTaskPoint=function(e){var t=this.getTaskWrapperPoint(e);return this.getTask(e).isMilestone()||(t.y+=this.elementSizeValues.taskWrapperTopPadding),t},e.prototype.getTaskSize=function(e){return new r.Size(this.getTaskWidth(e),this.getTaskHeight(e))},e.prototype.getTaskWidth=function(e){var t=this.getViewItem(e);return t.isCustom&&t.size.width?t.size.width:t.task.isMilestone()&&!t.isCustom?this.getTaskHeight(e):Math.max(this.getWidthByDateRange(t.task.start,t.task.end),this.minTaskWidth)},e.prototype.getTaskHeight=function(e){var t=this.getViewItem(e);return t.task.isMilestone()&&!t.isCustom?this.milestoneWidth:this.viewModel.isTaskToCalculateByChildren(t.task.internalId)?this.parentTaskHeight:t.isCustom&&t.size.height?t.size.height:this.taskHeight},e.prototype.getTask=function(e){var t=this.getViewItem(e);return null==t?void 0:t.task},e.prototype.getViewItem=function(e){return this.viewModel.items[e]},e.prototype.getTaskProgressElementInfo=function(t){var n=new s.GridElementInfo;return n.className=e.taskProgressClassName,n.setSize(this.getTaskProgressSize(t)),n},e.prototype.getTaskProgressSize=function(e){var t=this.getTaskProgressWidth(e);return this.isTaskCutByRange(e)&&(t=this.getCorrectedTaskWidthByRange(e,t)),new r.Size(t,0)},e.prototype.getTaskProgressWidth=function(e){return this.getTaskWidth(e)*this.getTask(e).normalizedProgress/100},e.prototype.getTaskTextElementInfo=function(e,t){var n=new s.GridElementInfo;if(n.className=this.getTaskTextElementClassName(t),!t){var r=this.getTaskPoint(e).x;if(r0?n.margins.left=-i:n.additionalInfo.hidden=!0}}return n},e.prototype.getTaskTextElementClassName=function(t){return e.taskTitleClassName.concat(" ",t?e.titleInClassName:e.titleOutClassName)},e.prototype.getTaskResourcesWrapperElementInfo=function(e){var t=new s.GridElementInfo,n=this.getTaskSize(e).width;return t.className="dx-gantt-taskResWrapper",t.setPosition(this.getTaskWrapperPoint(e)),t.position.x=t.position.x+n,t},e.prototype.getTaskResourceElementInfo=function(){var t=new s.GridElementInfo;return t.className=e.taskResourceClassName,t},e.prototype.getSelectionElementInfo=function(e){return this.getRowElementInfo(e,"dx-gantt-sel")},e.prototype.getSelectionPosition=function(e){var t=new a.Point(void 0,void 0);return t.y=e*this.tickSize.height,t},e.prototype.getSelectionSize=function(){return new r.Size(this.getTotalWidth(),this.tickSize.height)},e.prototype.getHighlightRowInfo=function(e){return this.getRowElementInfo(e,"dx-gantt-altRow")},e.prototype.getRowElementInfo=function(e,t){var n=new s.GridElementInfo;return n.className=t,n.setPosition(this.getSelectionPosition(e)),n.setSize(this.getSelectionSize()),n},e.prototype.getNoWorkingIntervalInfo=function(e){var t=new s.GridElementInfo;return t.className="dx-gantt-nwi",t.setPosition(this.getNoWorkingIntervalPosition(e.start)),t.setSize(this.getNoWorkingIntervalSize(e)),t},e.prototype.getNoWorkingIntervalPosition=function(e){var t=new a.Point(void 0,void 0);return t.x=this.getPosByDate(e),t},e.prototype.getNoWorkingIntervalSize=function(e){return new r.Size(this.getWidthByDateRange(e.start,e.end),this.getVerticalGridLineHeight())},e.prototype.getVerticalGridLineHeight=function(){return Math.max(this.visibleTaskAreaSize.height-this.scrollBarHeight,this.tickSize.height*this.verticalTickCount)},e.prototype.getConnectorInfo=function(e,t,n,r){for(var i=new Array,o=this.getConnectorPoints(t,n,r),s=0;si.y?o.Position.Top:o.Position.Bottom:r.x>i.x?o.Position.Left:o.Position.Right},e.prototype.getArrowClassName=function(t){var n=e.arrowClassName;switch(t){case o.Position.Left:n=n.concat(" ",e.leftArrowClassName);break;case o.Position.Top:n=n.concat(" ",e.topArrowClassName);break;case o.Position.Right:n=n.concat(" ",e.rightArrowClassName);break;case o.Position.Bottom:n=n.concat(" ",e.bottomArrowClassName)}return n},e.prototype.getArrowPositionByClassName=function(t){return t.indexOf(e.leftArrowClassName)>-1?o.Position.Left:t.indexOf(e.topArrowClassName)>-1?o.Position.Top:t.indexOf(e.rightArrowClassName)>-1?o.Position.Right:t.indexOf(e.bottomArrowClassName)>-1?o.Position.Bottom:void 0},e.prototype.getArrowPoint=function(e,t){return new a.Point(this.getArrowX(e,t),this.getArrowY(e,t))},e.prototype.getArrowX=function(e,t){switch(t){case o.Position.Left:return e.position.x-this.arrowSize.width/2;case o.Position.Right:return e.position.x+e.size.width-this.arrowSize.width/2;case o.Position.Top:case o.Position.Bottom:return e.position.x-(this.arrowSize.width-this.lineThickness)/2}},e.prototype.getArrowY=function(e,t){switch(t){case o.Position.Top:return e.position.y-this.arrowSize.height/2;case o.Position.Bottom:return e.position.y+e.size.height-this.arrowSize.height/2;case o.Position.Left:case o.Position.Right:return e.position.y-(this.arrowSize.height-this.lineThickness)/2}},e.prototype.getPosByDate=function(e){return this.getWidthByDateRange(this.range.start,e)},e.prototype.getWidthByDateRange=function(e,t){return l.DateUtils.getRangeTickCount(e,t,this.viewType)*this.tickSize.width},e.prototype.getDateByPos=function(e){if(this.viewType===o.ViewType.Months||this.viewType===o.ViewType.Quarter)return this.getDateByPosInMonthBasedViewTypes(e);var t=e/this.tickSize.width,n=new Date(this.range.start);return l.DateUtils.getDSTCorrectedDate(n,t*this.tickTimeSpan)},e.prototype.getDateByPosInMonthBasedViewTypes=function(e){return this._scaleCalculator.getDateInScale(e)},e.prototype.getConnectorPoints=function(e,t,n){switch(n){case u.DependencyType.FS:return this.getFinishToStartConnectorPoints(e,t);case u.DependencyType.SF:return this.getStartToFinishConnectorPoints(e,t);case u.DependencyType.SS:return this.getStartToStartConnectorPoints(e,t);case u.DependencyType.FF:return this.getFinishToFinishConnectorPoints(e,t);default:return new Array}},e.prototype.getFinishToStartConnectorPoints=function(e,t){return e=this.getTask(t).end?this.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskTopSide(e,t,!0):this.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskRightSide(e,t,!1):this.getTask(e).start>=this.getTask(t).end?this.getConnectorPoints_FromTopTaskBottomSide_ToBottomTaskLeftSide(t,e,!0):this.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskLeftSide(t,e,!0)},e.prototype.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskTopSide=function(e,t,n){var r=new Array,i=this.getTaskPoint(e),o=this.getTaskPoint(t),s=this.getTaskRightCenter(i,e),l=this.getTask(t).isMilestone(),c=this.getTaskTopCenter(o,t),u=this.getHorizontalIndentFromTaskEdge(t,n);return r.push(new a.Point(Math.floor(s.x),Math.floor(s.y))),r.push(new a.Point(Math.floor(l?c.x:o.x+u),Math.floor(r[0].y))),r.push(new a.Point(Math.floor(r[1].x),Math.floor(c.y))),r},e.prototype.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskRightSide=function(e,t){var n=new Array,r=this.getTaskPoint(e),i=this.getTaskPoint(t),o=this.getTaskRightCenter(r,e),s=this.getTaskRightCenter(i,t);return n.push(new a.Point(Math.floor(o.x),Math.floor(o.y))),n.push(new a.Point(Math.floor(Math.max(o.x,s.x)+this.minLineLength),Math.floor(n[0].y))),n.push(new a.Point(Math.floor(n[1].x),Math.floor(s.y))),n.push(new a.Point(Math.floor(s.x),Math.floor(s.y))),n},e.prototype.getConnectorPoints_FromTopTaskRightSide_ToBottomTaskLeftSide=function(e,t,n){var r=new Array,i=this.getTaskPoint(e),o=this.getTaskPoint(t),s=this.getTaskRightCenter(i,e),l=this.getTaskBottomCenter(i,e),c=this.getTaskLeftCenter(o,t),u=this.getTaskTopCenter(o,t),d=n?this.getViewItem(e):this.getViewItem(t),p=d.isCustom?(this.tickSize.height-d.size.height)/2:this.minConnectorSpaceFromTask;return r.push(new a.Point(Math.floor(s.x),Math.floor(s.y))),r.push(new a.Point(Math.floor(r[0].x+this.minLineLength),Math.floor(r[0].y))),r.push(new a.Point(Math.floor(r[1].x),Math.floor(n?l.y+p:u.y-p))),r.push(new a.Point(Math.floor(c.x-this.minLineLength),Math.floor(r[2].y))),r.push(new a.Point(Math.floor(r[3].x),Math.floor(c.y))),r.push(new a.Point(Math.floor(c.x),Math.floor(c.y))),r},e.prototype.getConnectorPoints_FromTopTaskBottomSide_ToBottomTaskRightSide=function(e,t,n){var r=new Array,i=this.getTaskPoint(e),o=this.getTaskPoint(t),s=this.getTaskBottomCenter(i,e),l=this.getTask(e).isMilestone(),c=this.getTaskRightCenter(o,t),u=this.getHorizontalIndentFromTaskEdge(e,n);return r.push(new a.Point(Math.floor(l?s.x:i.x+u),Math.floor(s.y))),r.push(new a.Point(Math.floor(r[0].x),Math.floor(c.y))),r.push(new a.Point(Math.floor(c.x),Math.floor(c.y))),r},e.prototype.getConnectorPoints_FromTopTaskBottomSide_ToBottomTaskLeftSide=function(e,t,n){var r=new Array,i=this.getTaskPoint(e),o=this.getTaskPoint(t),s=this.getTaskBottomCenter(i,e),l=this.getTask(e).isMilestone(),c=this.getTaskLeftCenter(o,t),u=this.getHorizontalIndentFromTaskEdge(e,n);return r.push(new a.Point(Math.floor(l?s.x:i.x+u),Math.floor(s.y))),r.push(new a.Point(Math.floor(r[0].x),Math.floor(c.y))),r.push(new a.Point(Math.floor(c.x),Math.floor(c.y))),r},e.prototype.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskTopSide=function(e,t,n){var r=new Array,i=this.getTaskPoint(e),o=this.getTaskPoint(t),s=this.getTaskLeftCenter(i,e),l=this.getTaskTopCenter(o,t),c=this.getTask(t).isMilestone(),u=this.getHorizontalIndentFromTaskEdge(t,n);return r.push(new a.Point(Math.floor(s.x),Math.floor(s.y))),r.push(new a.Point(Math.floor(c?l.x:o.x+u),Math.floor(r[0].y))),r.push(new a.Point(Math.floor(r[1].x),Math.floor(l.y))),r},e.prototype.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskRightSide=function(e,t,n){var r=new Array,i=this.getTaskPoint(e),o=this.getTaskPoint(t),s=this.getTaskLeftCenter(i,e),l=this.getTaskBottomCenter(i,e),c=this.getTaskRightCenter(o,t),u=this.getTaskTopCenter(o,t),d=n?this.getViewItem(e):this.getViewItem(t),p=d.isCustom?(this.tickSize.height-d.size.height)/2:this.minConnectorSpaceFromTask;return r.push(new a.Point(Math.floor(s.x),s.y)),r.push(new a.Point(Math.floor(r[0].x-this.minLineLength),r[0].y)),r.push(new a.Point(Math.floor(r[1].x),Math.floor(n?l.y+p:u.y-p))),r.push(new a.Point(Math.floor(c.x+this.minLineLength),Math.floor(r[2].y))),r.push(new a.Point(Math.floor(r[3].x),Math.floor(c.y))),r.push(new a.Point(Math.floor(c.x),Math.floor(c.y))),r},e.prototype.getConnectorPoints_FromTopTaskLeftSide_ToBottomTaskLeftSide=function(e,t){var n=new Array,r=this.getTaskPoint(e),i=this.getTaskPoint(t),o=this.getTaskLeftCenter(r,e),s=this.getTaskLeftCenter(i,t);return n.push(new a.Point(Math.floor(o.x),Math.floor(o.y))),n.push(new a.Point(Math.floor(Math.min(o.x,s.x)-this.minLineLength),Math.floor(n[0].y))),n.push(new a.Point(Math.floor(n[1].x),Math.floor(s.y))),n.push(new a.Point(Math.floor(s.x),Math.floor(s.y))),n},e.prototype.getTaskSidePoints=function(e){var t=this.getTaskPoint(e);return[this.getTaskLeftCenter(t,e),this.getTaskTopCenter(t,e),this.getTaskRightCenter(t,e),this.getTaskBottomCenter(t,e)]},e.prototype.getTaskLeftCenter=function(e,t){return new a.Point(e.x-this.getTaskEdgeCorrection(t),e.y+this.getTaskHeight(t)/2)},e.prototype.getTaskRightCenter=function(e,t){return new a.Point(e.x+this.getTaskWidth(t)+this.getTaskEdgeCorrection(t),e.y+this.getTaskHeight(t)/2)},e.prototype.getTaskTopCenter=function(e,t){return new a.Point(e.x+this.getTaskWidth(t)/2,e.y-this.getTaskEdgeCorrection(t))},e.prototype.getTaskBottomCenter=function(e,t){return new a.Point(e.x+this.getTaskWidth(t)/2,e.y+this.getTaskHeight(t)+this.getTaskEdgeCorrection(t))},e.prototype.getTaskEdgeCorrection=function(e){var t=this.getViewItem(e);return t.task.isMilestone()&&!t.isCustom?this.getTaskHeight(e)*(Math.sqrt(2)-1)/2:0},e.prototype.getHorizontalIndentFromTaskEdge=function(e,t){void 0===t&&(t=!1);var n=this.getTaskWidth(e),r=this.minLineLength0}))[0];if(n){var r=n.dependencies.filter((function(t){return t.id===e}))[0];t=this.createConnecotInfo(r,n.visibleIndex)}return t},e.prototype.createConnecotInfo=function(e,t){var n=this,r=e.predecessor.visibleIndex,i=e.type,o=e.id,s=this.getConnectorInfo(o,r,t,i);return s.forEach((function(e){n.addElementInfoToTileMap(e,n.tileToDependencyMap,!0)})),s},e.prototype.createTileToNonWorkingIntervalsMap=function(){this.tileToNoWorkingIntervalsMap=[];for(var e=0;e0)for(var s=Math.floor(r/o),a=Math.floor((r+i)/o),l=s;l<=a;l++)t[l]||(t[l]=new Array),t[l].push(e)},e.prototype.getRenderedConnectorLines=function(e){return this.getElementsInRenderedTiles(this.tileToDependencyMap,!0,e)},e.prototype.getRenderedNoWorkingIntervals=function(e){return this.getElementsInRenderedTiles(this.tileToNoWorkingIntervalsMap,!1,e)},e.prototype.getRenderedStripLines=function(e){var t=new Array,n=e.stripLines.map((function(e){return e.clone()}));e.showCurrentTime&&n.push(new c.StripLine(new Date,null,e.currentTimeTitle,e.currentTimeCssClass,!0));for(var r=0,i=void 0;i=n[r];r++){var o=l.DateUtils.parse(i.start),a=i.end?l.DateUtils.parse(i.end):null;if(o>=this.range.start&&o<=this.range.end||a&&a>=this.range.start&&a<=this.range.end){var u=o>this.range.start?o:this.range.start,d=new s.GridElementInfo;d.size.height=this.getVerticalGridLineHeight(),d.position.x=this.getPosByDate(u),d.size.width=a?this.getWidthByDateRange(u,a0)for(var o=Math.floor(n/(2*i)),s=Math.floor((n+i)/(2*i)),a=o;a<=s;a++)e[a]&&e[a].forEach((function(e){-1===r.indexOf(e)&&r.push(e)}));return r},e.prototype.isTaskInRenderedRange=function(e){var t=this.getViewItem(e),n=this.getTaskPoint(e);return t.task.isMilestone()?n.x+this.getTaskWidth(e)this.getTotalWidth()&&(e.style.display="none")},e.prototype.checkAndCorrectArrowElementDisplayByRange=function(e){e.offsetLeft+e.offsetWidth>this.getTotalWidth()&&(e.style.display="none")},e.prototype.checkAndCorrectConnectorLinesByRange=function(e){if(null==e?void 0:e.length)for(var t=this.getTotalWidth(),n=0;nt?delete e[n]:!i&&r.position.x+r.size.width>t&&(r.size.width=t-r.position.x)}},e.prototype.getCorrectedTaskWidthByRange=function(e,t){var n=this.getTotalWidth()-this.getTaskPoint(e).x;return Math.min(n,t)},e.dxGanttPrefix="dx-gantt-",e.taskClassName=e.dxGanttPrefix+"task",e.milestoneClassName=e.dxGanttPrefix+"milestone",e.smallTaskClassName=e.dxGanttPrefix+"smallTask",e.parentTaskClassName=e.dxGanttPrefix+"parent",e.taskProgressClassName=e.dxGanttPrefix+"tPrg",e.taskTitleClassName=e.dxGanttPrefix+"taskTitle",e.titleInClassName=e.dxGanttPrefix+"titleIn",e.titleOutClassName=e.dxGanttPrefix+"titleOut",e.taskResourceClassName=e.dxGanttPrefix+"taskRes",e.arrowClassName=e.dxGanttPrefix+"arrow",e.leftArrowClassName=e.dxGanttPrefix+"LA",e.topArrowClassName=e.dxGanttPrefix+"TA",e.rightArrowClassName=e.dxGanttPrefix+"RA",e.bottomArrowClassName=e.dxGanttPrefix+"BA",e.CLASSNAMES={CONNECTOR_VERTICAL:"dx-gantt-conn-v",CONNECTOR_HORIZONTAL:"dx-gantt-conn-h"},e}();t.GridLayoutCalculator=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StyleDef=void 0;var r=n(1),i=n(2),o=n(18),s=n(49),a=n(41),l=n(72),c=function(){function e(e){this._fillColor=new o.Color,this._textColor=new o.Color,this._lineColor=new o.Color,this._cellWidth=new l.Width,this._cellPadding=new a.Margin,e&&this.assign(e)}return Object.defineProperty(e.prototype,"font",{get:function(){return this._fontFamily},set:function(e){this._fontFamily=s.PredefinedStyles.getPredefinedStringOrUndefined(e,s.PredefinedStyles.fontFamilies)||e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(e){this._fontStyle=s.PredefinedStyles.getPredefinedStringOrUndefined(e,s.PredefinedStyles.fontStyles)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(e){this._fontSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overflow",{get:function(){return this._overflow},set:function(e){this._overflow=s.PredefinedStyles.getPredefinedStringOrUndefined(e,s.PredefinedStyles.overflow)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"halign",{get:function(){return this._horizontalAlign},set:function(e){this._horizontalAlign=s.PredefinedStyles.getPredefinedStringOrUndefined(e,s.PredefinedStyles.horizontalAlign)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valign",{get:function(){return this._verticalAlign},set:function(e){this._verticalAlign=s.PredefinedStyles.getPredefinedStringOrUndefined(e,s.PredefinedStyles.verticalAlign)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fillColor",{get:function(){return this._fillColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineColor",{get:function(){return this._lineColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cellWidth",{get:function(){return this._cellWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cellPadding",{get:function(){return this._cellPadding},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineWidth",{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minCellWidth",{get:function(){return this._minCellWidth},set:function(e){this._minCellWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minCellHeight",{get:function(){return this._minCellHeight},set:function(e){this._minCellHeight=e},enumerable:!1,configurable:!0}),e.prototype.assign=function(t){t&&(t instanceof e?((0,r.isDefined)(t.font)&&(this.font=t.font),(0,r.isDefined)(t.fontStyle)&&(this.fontStyle=t.fontStyle),(0,r.isDefined)(t.overflow)&&(this.overflow=t.overflow),(0,r.isDefined)(t.halign)&&(this.halign=t.halign),(0,r.isDefined)(t.valign)&&(this.valign=t.valign),(0,r.isDefined)(t.fontSize)&&(this.fontSize=t.fontSize),(0,r.isDefined)(t.lineWidth)&&(this.lineWidth=t.lineWidth),(0,r.isDefined)(t.minCellWidth)&&(this.minCellWidth=t.minCellWidth),(0,r.isDefined)(t.minCellHeight)&&(this.minCellHeight=t.minCellHeight),(0,r.isDefined)(t.fillColor)&&this.fillColor.assign(t.fillColor),(0,r.isDefined)(t.textColor)&&this.textColor.assign(t.textColor),(0,r.isDefined)(t.lineColor)&&this.lineColor.assign(t.lineColor),(0,r.isDefined)(t.cellWidth)&&this.cellWidth.assign(t.cellWidth),(0,r.isDefined)(t.cellPadding)&&this.cellPadding.assign(t.cellPadding)):this.assignFromCssStyle(t))},e.prototype.assignFromCssStyle=function(e){if(e.fontFamily&&(this.font=this.getPdfFontFamily(e)),this.fontStyle=this.getPdfFontStyle(e),(0,r.isDefined)(e.fontSize)&&(this.fontSize=this.getPfrFontSize(e.fontSize)),e.textAlign&&(this.halign=e.textAlign),e.verticalAlign&&(this.valign=e.verticalAlign),(0,r.isDefined)(e.borderWidth)&&(this.lineWidth=e.borderWidth),(0,r.isDefined)(e.cellWidth)&&this.cellWidth.assign(e.cellWidth),(0,r.isDefined)(e.width)&&(this.minCellWidth="number"==typeof e.width?e.width:i.DomUtils.pxToInt(e.width)),(0,r.isDefined)(e.height)&&(this.minCellHeight="number"==typeof e.height?e.height:i.DomUtils.pxToInt(e.height)),e.backgroundColor&&this.fillColor.assign(e.backgroundColor),e.color&&this.textColor.assign(e.color),e.borderColor&&this.lineColor.assign(e.borderColor),(0,r.isDefined)(e.width)&&this.cellWidth.assign(e.width),this.assignPaddingFromCss(e),(0,r.isDefined)(e.extraLeftPadding)){var t=this._cellPadding.left;this._cellPadding.left=t?t+e.extraLeftPadding:e.extraLeftPadding}},e.prototype.getPdfFontStyle=function(e){var t=e.fontWeight,n=parseInt(t),r="bold"===t||!isNaN(n)&&n>500,i=r?"bold":"normal";return"italic"===e.fontStyle&&(i=r?"bolditalic":"italic"),i},e.prototype.getPdfFontFamily=function(e){var t=e.fontFamily&&e.fontFamily.toLowerCase(),n="helvetica";return t.indexOf("times")>-1&&(n="times"),t.indexOf("courier")>-1&&(n="courier"),n},e.prototype.getPfrFontSize=function(e){var t=i.DomUtils.pxToInt(e);if(!isNaN(t))return Math.ceil(t/96*72)},e.prototype.assignPaddingFromCss=function(e){if(e.padding)this._cellPadding.assign(e.padding);else{var t={};e.paddingLeft&&(t.left=i.DomUtils.pxToInt(e.paddingLeft)),e.paddingTop&&(t.top=i.DomUtils.pxToInt(e.paddingTop)),e.paddingRight&&(t.right=i.DomUtils.pxToInt(e.paddingRight)),e.paddingBottom&&(t.bottom=i.DomUtils.pxToInt(e.paddingBottom)),this._cellPadding.assign(t)}},e.prototype.hasValue=function(){return!0},e.prototype.getValue=function(){var e=this,t={};return(0,r.isDefined)(this.font)&&(t.font=this.font),(0,r.isDefined)(this.fontStyle)&&(t.fontStyle=this.fontStyle),(0,r.isDefined)(this.fontSize)&&(t.fontSize=this.fontSize),(0,r.isDefined)(this.overflow)&&(t.overflow=this.overflow),(0,r.isDefined)(this.halign)&&(t.halign=this.halign),(0,r.isDefined)(this.valign)&&(t.valign=this.valign),(0,r.isDefined)(this.lineWidth)&&(t.lineWidth=this.lineWidth),(0,r.isDefined)(this.minCellWidth)&&(t.minCellWidth=this.minCellWidth),(0,r.isDefined)(this.minCellHeight)&&(t.minCellHeight=this.minCellHeight),this.getJsPdfProviderProps().forEach((function(n){var r=e[n];r&&r.hasValue()&&(t[n]=r.getValue())})),t},e.prototype.getJsPdfProviderProps=function(){return["fillColor","textColor","lineColor","cellWidth","cellPadding"]},e}();t.StyleDef=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfPageTableNames=void 0;var r=function(){function e(){}return e.treeListHeader="treeListHeader",e.treeListMain="treeListMain",e.chartMain="chartMain",e.chartScaleTop="chartScaleTop",e.chartScaleBottom="chartScaleBottom",e}();t.PdfPageTableNames=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaDomHelper=void 0;var i=n(2),o=n(8),s=n(53),a=n(3),l=n(28),c=function(){function e(){}return e.getEventSource=function(t){var n,r=(t.nodeType===(null===(n=null===window||void 0===window?void 0:window.Node)||void 0===n?void 0:n.ELEMENT_NODE)?t:t.parentNode).classList[0];return e.classToSource[r]||a.TaskAreaEventSource.TaskArea},e.isConnectorLine=function(e){var t=o.EvtUtils.getEventSource(e);return i.DomUtils.hasClassName(t,l.GridLayoutCalculator.CLASSNAMES.CONNECTOR_HORIZONTAL)||i.DomUtils.hasClassName(t,l.GridLayoutCalculator.CLASSNAMES.CONNECTOR_VERTICAL)},e.isTaskElement=function(t){var n=o.EvtUtils.getEventSource(t),r=e.classToSource[n.classList[0]];return r===a.TaskAreaEventSource.TaskEdit_Frame||r===a.TaskAreaEventSource.TaskEdit_Progress||r===a.TaskAreaEventSource.TaskEdit_Start||r===a.TaskAreaEventSource.TaskEdit_End||r===a.TaskAreaEventSource.TaskEdit_DependencyStart||r===a.TaskAreaEventSource.TaskEdit_DependencyFinish},e.isMouseEvent=function(e){return e instanceof MouseEvent},e.isTouchEvent=function(e){return window.TouchEvent&&e instanceof TouchEvent},e.isPointerEvent=function(e){return window.PointerEvent&&e instanceof PointerEvent},e.isMousePointer=function(e){return this.isPointerEvent(e)&&"mouse"===e.pointerType},e.classToSource=((r={})[s.TaskEditController.CLASSNAMES.TASK_EDIT_PROGRESS]=a.TaskAreaEventSource.TaskEdit_Progress,r[s.TaskEditController.CLASSNAMES.TASK_EDIT_START]=a.TaskAreaEventSource.TaskEdit_Start,r[s.TaskEditController.CLASSNAMES.TASK_EDIT_END]=a.TaskAreaEventSource.TaskEdit_End,r[s.TaskEditController.CLASSNAMES.TASK_EDIT_FRAME]=a.TaskAreaEventSource.TaskEdit_Frame,r[s.TaskEditController.CLASSNAMES.TASK_EDIT_DEPENDENCY_RIGTH]=a.TaskAreaEventSource.TaskEdit_DependencyStart,r[s.TaskEditController.CLASSNAMES.TASK_EDIT_DEPENDENCY_LEFT]=a.TaskAreaEventSource.TaskEdit_DependencyFinish,r[s.TaskEditController.CLASSNAMES.TASK_EDIT_SUCCESSOR_DEPENDENCY_RIGTH]=a.TaskAreaEventSource.Successor_DependencyStart,r[s.TaskEditController.CLASSNAMES.TASK_EDIT_SUCCESSOR_DEPENDENCY_LEFT]=a.TaskAreaEventSource.Successor_DependencyFinish,r),e}();t.TaskAreaDomHelper=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaStateBase=void 0;var r=n(9),i=n(4),o=n(2),s=n(8),a=n(77),l=n(194),c=n(31),u=n(12),d=function(){function e(e,t,n){this.position=new i.Point(-1,-1),this.isCursorInArea=!1,this._listener=e,this._taskArea=t,this._cellSize=n}return e.prototype.start=function(){},e.prototype.finish=function(){},e.prototype.isTouchEvent=function(e){return c.TaskAreaDomHelper.isTouchEvent(e)},e.prototype.isPointerEvent=function(e){return c.TaskAreaDomHelper.isPointerEvent(e)},e.prototype.isMouseEvent=function(e){return c.TaskAreaDomHelper.isMouseEvent(e)},e.prototype.onMouseWheel=function(e){},e.prototype.onScroll=function(e){this.raiseEvent(u.TaskAreaStateEventNames.TASK_AREA_SCROLL)},e.prototype.onKeyDown=function(e){this.isCursorInArea&&this.raiseEvent(u.TaskAreaStateEventNames.TASK_AREA_KEY_DOWN,e,null,{code:this.getShortcutCode(e)})},e.prototype.onContextMenu=function(e){var t=this.getClickedRowIndex(e),n=c.TaskAreaDomHelper.isConnectorLine(e);n||this.raiseTaskSelection(e,t),e.stopPropagation(),e.preventDefault(),r.Browser.WebKitFamily&&(e.returnValue=!1),this.raiseEvent(u.TaskAreaStateEventNames.CONTEXTMENU_SHOW,e,t,{type:n?"dependency":"task"})},e.prototype.onTaskPointerEnter=function(e){this.onTaskPointerEnterBase(e)},e.prototype.onDocumentPointerMove=function(e){this.processPointerMove(e)},e.prototype.onDocumentPointerDown=function(e){this.processPointerDown(e)},e.prototype.onDocumentPointerUp=function(e){this.processPointerUp(e)},e.prototype.onTaskTouchStart=function(e){this.onTaskPointerEnterBase(e)},e.prototype.onTouchMove=function(e){this.processPointerMove(e)},e.prototype.onTouchStart=function(e){this.processPointerDown(e)},e.prototype.onTouchEnd=function(e){this.processPointerUp(e)},e.prototype.onMouseDown=function(e){this.processPointerDown(e)},e.prototype.onMouseUp=function(e){},e.prototype.onMouseMove=function(e){this.processPointerMove(e)},e.prototype.onTaskHover=function(e){this.onTaskPointerEnterBase(e)},e.prototype.onTaskLeave=function(e){this.raiseEvent(u.TaskAreaStateEventNames.TASK_LEAVE,e,this.getClickedRowIndex(e))},e.prototype.onClick=function(e){var t=this.getClickedRowIndex(e);this.raiseTaskSelection(e,t),this.raiseEvent(u.TaskAreaStateEventNames.TASK_AREA_CLICK,e,t)},e.prototype.onDblClick=function(e){e.preventDefault(),this.raiseEvent(u.TaskAreaStateEventNames.TASK_AREA_DBLCLICK,e,this.getClickedRowIndex(e))},e.prototype.onTaskAreaLeave=function(e){(!this.isPointerEvent(e)||c.TaskAreaDomHelper.isMousePointer(e))&&(this.isCursorInArea=!1,this.raiseEvent(u.TaskAreaStateEventNames.TASK_EDIT_END,e)),this.onTaskAreaLeaveInternal(e)},e.prototype.onTaskPointerEnterBase=function(e){this.isTouchEvent(e)||this.isPointerEvent(e)||e.preventDefault(),this.raiseEvent(u.TaskAreaStateEventNames.TASK_EDIT_START,e,this.getClickedRowIndex(e))},e.prototype.processPointerDown=function(e){var t=this.isTouchEvent(e),n=this.isPointerEvent(e);(t||n)&&this.checkAndProcessTouchOutsideArea(e)||(this.position=new i.Point(s.EvtUtils.getEventX(e),s.EvtUtils.getEventY(e)),(t||n)&&e.preventDefault(),t?this.onTouchStartInternal(e):n?this.onDocumentPointerDownInternal(e):this.onMouseDownInternal(e))},e.prototype.processPointerMove=function(e){var t,n=this.isTouchEvent(e),r=this.isPointerEvent(e);null!==(t=this.position)&&void 0!==t||(this.position=new i.Point(s.EvtUtils.getEventX(e),s.EvtUtils.getEventY(e)));var o=Math.abs(this.position.x-s.EvtUtils.getEventX(e))>2||Math.abs(this.position.y-s.EvtUtils.getEventY(e))>2;!((n||r)&&this.checkAndProcessTouchOutsideArea(e))&&o&&((n||r)&&e.preventDefault(),this.isTouchEvent(e)?this.onTouchMoveInternal(e):this.isPointerEvent(e)?this.onDocumentPointerMoveInternal(e):(this.isCursorInArea=!0,this.onMouseMoveInternal(e)))},e.prototype.processPointerUp=function(e){this.checkAndProcessTouchOutsideArea(e)||(e.preventDefault(),this.isTouchEvent(e)?this.onTouchEndInternal(e):this.onDocumentPointerUpInternal(e))},e.prototype.onMouseDownInternal=function(e){},e.prototype.onMouseMoveInternal=function(e){},e.prototype.onDocumentPointerUpInternal=function(e){},e.prototype.onDocumentPointerDownInternal=function(e){},e.prototype.onDocumentPointerMoveInternal=function(e){},e.prototype.onTouchStartInternal=function(e){},e.prototype.onTouchEndInternal=function(e){},e.prototype.onTouchMoveInternal=function(e){},e.prototype.onTaskAreaLeaveInternal=function(e){},e.prototype.checkAndProcessTouchOutsideArea=function(e){var t=!this.isInTaskArea(e);return t&&this.raiseEvent(u.TaskAreaStateEventNames.TASK_EDIT_END,e),this.isCursorInArea=!t,t},e.prototype.raiseEvent=function(e,t,n,r){var i=new l.TaskAreaEventArgs(e,t,n,r),o=this._listener.getHandler(e);return o&&o(i)},e.prototype.raiseDependencySelection=function(e,t){this.raiseEvent(u.TaskAreaStateEventNames.DEPENDENCY_SELECTION,e,null,{key:t})},e.prototype.raiseTaskSelection=function(e,t){o.DomUtils.isItParent(this._taskArea,s.EvtUtils.getEventSource(e))&&!c.TaskAreaDomHelper.isConnectorLine(e)&&this.raiseEvent(u.TaskAreaStateEventNames.TASK_SELECTION,e,t)},e.prototype.getClickedRowIndex=function(e){if(!e)return-1;var t=s.EvtUtils.getEventY(e)-o.DomUtils.getAbsolutePositionY(this._taskArea);return Math.floor(t/this._cellSize.height)},e.prototype.getRelativePos=function(e){var t=o.DomUtils.getAbsolutePositionX(this._taskArea),n=o.DomUtils.getAbsolutePositionY(this._taskArea);return new i.Point(e.x-t,e.y-n)},e.prototype.isInTaskArea=function(e){return o.DomUtils.isItParent(this._taskArea,s.EvtUtils.getEventSource(e))},e.prototype.getShortcutCode=function(e){var t=a.KeyUtils.getEventKeyCode(e),n=0;return e.altKey&&(n|=a.ModifierKey.Alt),e.ctrlKey&&(n|=a.ModifierKey.Ctrl),e.shiftKey&&(n|=a.ModifierKey.Shift),e.metaKey&&r.Browser.MacOSPlatform&&(n|=a.ModifierKey.Meta),n|t},e}();t.TaskAreaStateBase=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveDependencyHistoryItem=void 0;var r=n(0),i=function(e){function t(t,n){var r=e.call(this,t)||this;return r.dependencyId=n,r}return r.__extends(t,e),t.prototype.redo=function(){this.dependency=this.modelManipulator.dependency.removeDependency(this.dependencyId)},t.prototype.undo=function(){this.modelManipulator.dependency.insertDependency(this.dependency.predecessorId,this.dependency.successorId,this.dependency.type,this.dependencyId)},t}(n(13).HistoryItem);t.RemoveDependencyHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConstraintViolationOption=t.ConfirmationType=void 0,function(e){e[e.TaskDelete=0]="TaskDelete",e[e.DependencyDelete=1]="DependencyDelete",e[e.ResourcesDelete=2]="ResourcesDelete"}(t.ConfirmationType||(t.ConfirmationType={})),function(e){e[e.DoNothing=0]="DoNothing",e[e.RemoveDependency=1]="RemoveDependency",e[e.KeepDependency=2]="KeepDependency"}(t.ConstraintViolationOption||(t.ConstraintViolationOption={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogParametersBase=void 0;var r=function(){};t.DialogParametersBase=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeassignResourceHistoryItem=void 0;var r=n(0),i=function(e){function t(t,n){var r=e.call(this,t)||this;return r.assignmentId=n,r}return r.__extends(t,e),t.prototype.redo=function(){this.assignment=this.modelManipulator.resource.deassig(this.assignmentId)},t.prototype.undo=function(){this.modelManipulator.resource.assign(this.assignment.resourceId,this.assignment.taskId,this.assignmentId)},t}(n(13).HistoryItem);t.DeassignResourceHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEndHistoryItem=void 0;var r=n(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getPropertiesManipulator=function(){return this.modelManipulator.task.properties.end},t}(n(16).TaskPropertiesHistoryItemBase);t.TaskEndHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskProgressHistoryItem=void 0;var r=n(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getPropertiesManipulator=function(){return this.modelManipulator.task.properties.progress},t}(n(16).TaskPropertiesHistoryItemBase);t.TaskProgressHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskStartHistoryItem=void 0;var r=n(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getPropertiesManipulator=function(){return this.modelManipulator.task.properties.start},t}(n(16).TaskPropertiesHistoryItemBase);t.TaskStartHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceCommandBase=void 0;var r=n(0),i=n(5),o=n(6),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getState=function(){return new o.SimpleCommandState(this.isEnabled())},t}(i.CommandBase);t.ResourceCommandBase=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Margin=void 0;var r=n(1),i=n(2),o=function(){function e(e){this.assign(e)}return e.prototype.assign=function(e){if((0,r.isDefined)(e))if("string"==typeof e)this.assignFromString(e);else if("number"==typeof e||e instanceof Array)this.assignWithValues(e);else{var t=e||e;this.assignWithMargin(t)}},e.prototype.assignFromString=function(e){var t=e.split(" ").map((function(e){return i.DomUtils.pxToInt(e)}));this.assignWithValues(t)},e.prototype.assignWithMargin=function(e){(0,r.isDefined)(e.top)&&(this.top=e.top),(0,r.isDefined)(e.right)&&(this.right=e.right),(0,r.isDefined)(e.bottom)&&(this.bottom=e.bottom),(0,r.isDefined)(e.left)&&(this.left=e.left)},e.prototype.assignWithValues=function(e){var t=this.getCorrectedValues(e);this.top=t[0],this.right=t[1],this.bottom=t[2],this.left=t[3]},e.prototype.getCorrectedValues=function(e){var t=[this.top,this.right,this.bottom,this.left];if("number"==typeof e){t=[e,e,e,e]}else{var n=e;switch(n.length){case 1:t=[n[0],n[0],n[0],n[0]];break;case 2:t=[n[0],n[1],n[0],n[1]];break;case 3:t=[n[0],n[1],n[2],n[1]];break;default:n.forEach((function(e,n){return t[n]=e}))}}return t},e.prototype.hasValue=function(){return(0,r.isDefined)(this.top)||(0,r.isDefined)(this.left)||(0,r.isDefined)(this.right)||(0,r.isDefined)(this.bottom)},e.prototype.getValue=function(){if(!this.hasValue())return null;if(this.top===this.bottom&&this.left===this.right&&this.top===this.left)return this.top;var e={};return(0,r.isDefined)(this.top)&&(e.top=this.top),(0,r.isDefined)(this.left)&&(e.left=this.left),(0,r.isDefined)(this.right)&&(e.right=this.right),(0,r.isDefined)(this.bottom)&&(e.bottom=this.bottom),e},e}();t.Margin=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecurrenceBase=void 0;var r=n(0),i=n(225),o=n(67),s=n(226),a=n(1),l=n(7),c=n(82),u=function(e){function t(t,n,r,i){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=1),void 0===i&&(i=0);var o=e.call(this)||this;return o._start=null,o._end=null,o._interval=1,o._occurrenceCount=0,o._dayOfWeek=0,o._day=1,o._dayOfWeekOccurrence=0,o._month=0,o._calculateByDayOfWeek=!1,o.start=t,o.end=n,o.interval=r,o.occurrenceCount=i,o}return r.__extends(t,e),t.prototype.assignFromObject=function(t){(0,a.isDefined)(t)&&(e.prototype.assignFromObject.call(this,t),this.start=l.DateTimeUtils.convertToDate(t.start),this.end=l.DateTimeUtils.convertToDate(t.end),(0,a.isDefined)(t.interval)&&(this.interval=t.interval),(0,a.isDefined)(t.occurrenceCount)&&(this.occurrenceCount=t.occurrenceCount),(0,a.isDefined)(t.dayOfWeek)&&(this.dayOfWeekInternal=c.RecurrenceFactory.getEnumValue(i.DayOfWeek,t.dayOfWeek)),(0,a.isDefined)(t.day)&&(this.dayInternal=t.day),(0,a.isDefined)(t.dayOfWeekOccurrence)&&(this.dayOfWeekOccurrenceInternal=c.RecurrenceFactory.getEnumValue(o.DayOfWeekMonthlyOccurrence,t.dayOfWeekOccurrence)),(0,a.isDefined)(t.month)&&(this.monthInternal=c.RecurrenceFactory.getEnumValue(s.Month,t.month)),(0,a.isDefined)(t.calculateByDayOfWeek)&&(this._calculateByDayOfWeek=!!t.calculateByDayOfWeek))},t.prototype.calculatePoints=function(e,t){if(!e||!t)return new Array;var n=l.DateTimeUtils.getMaxDate(e,this._start),r=l.DateTimeUtils.getMinDate(t,this._end);return this._occurrenceCount>0?this.calculatePointsByOccurrenceCount(n,r):this.calculatePointsByDateRange(n,r)},t.prototype.calculatePointsByOccurrenceCount=function(e,t){for(var n=new Array,r=this.getFirstPoint(e);r&&n.length=0;)this.isRecurrencePoint(r)&&n.push(r),r=this.getNextPoint(r);return n},t.prototype.calculatePointsByDateRange=function(e,t){for(var n=new Array,r=this.getFirstPoint(e);r&&l.DateTimeUtils.compareDates(r,t)>=0;)this.isRecurrencePoint(r)&&n.push(r),r=this.getNextPoint(r);return n},t.prototype.getFirstPoint=function(e){return this.isRecurrencePoint(e)?e:this.getNextPoint(e)},t.prototype.isRecurrencePoint=function(e){return this.isDateInRange(e)&&this.checkDate(e)&&(!this.useIntervalInCalc()||this.checkInterval(e))},t.prototype.isDateInRange=function(e){return!!e&&(!(this._start&&l.DateTimeUtils.compareDates(this.start,e)<0)&&!(0==this._occurrenceCount&&this.end&&l.DateTimeUtils.compareDates(e,this.end)<0))},t.prototype.useIntervalInCalc=function(){return this.interval>1&&!!this._start},t.prototype.getNextPoint=function(e){return this.isDateInRange(e)?this.useIntervalInCalc()?this.calculatePointByInterval(e):this.calculateNearestPoint(e):null},t.prototype.getSpecDayInMonth=function(e,t){return this._calculateByDayOfWeek?l.DateTimeUtils.getSpecificDayOfWeekInMonthDate(this.dayOfWeekInternal,e,t,this.dayOfWeekOccurrenceInternal):new Date(e,t,this.dayInternal)},Object.defineProperty(t.prototype,"dayInternal",{get:function(){return this._day},set:function(e){e>0&&e<=31&&(this._day=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dayOfWeekInternal",{get:function(){return this._dayOfWeek},set:function(e){e>=i.DayOfWeek.Sunday&&e<=i.DayOfWeek.Saturday&&(this._dayOfWeek=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dayOfWeekOccurrenceInternal",{get:function(){return this._dayOfWeekOccurrence},set:function(e){e>=o.DayOfWeekMonthlyOccurrence.First&&e<=o.DayOfWeekMonthlyOccurrence.Last&&(this._dayOfWeekOccurrence=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"monthInternal",{get:function(){return this._month},set:function(e){e>=s.Month.January&&e<=s.Month.December&&(this._month=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this._start},set:function(e){e&&(this._start=e,this._end&&e>this._end&&(this._end=e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._end},set:function(e){e&&(this._end=e,this._start&&e0&&(this._interval=e)},enumerable:!1,configurable:!0}),t}(n(21).DataObject);t.RecurrenceBase=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.isAlpha=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"},e.isDigit=function(e){return e>="0"&&e<="9"},e.stringHashCode=function(e){var t=0;if(0===e.length)return t;for(var n=e.length,r=0;r=i;n--,r--)if(e[n]!==t[r])return!1;return!0},e.startsAt=function(e,t){return e.substr(0,t.length)===t},e.stringInLowerCase=function(e){return e.toLowerCase()===e},e.stringInUpperCase=function(e){return e.toUpperCase()===e},e.atLeastOneSymbolInUpperCase=function(t){for(var n=0,r=void 0;r=t[n];n++)if(e.stringInUpperCase(r)&&!e.stringInLowerCase(r))return!0;return!1},e.getSymbolFromEnd=function(e,t){return e[e.length-t]},e.trim=function(t,n){if(void 0===n)return e.trimInternal(t,!0,!0);var r=n.join("");return t.replace(new RegExp("(^["+r+"]*)|(["+r+"]*$)","g"),"")},e.trimStart=function(t,n){if(void 0===n)return e.trimInternal(t,!0,!1);var r=n.join("");return t.replace(new RegExp("^["+r+"]*","g"),"")},e.trimEnd=function(t,n){if(void 0===n)return e.trimInternal(t,!1,!0);var r=n.join("");return t.replace(new RegExp("["+r+"]*$","g"),"")},e.getDecimalSeparator=function(){return 1.1.toLocaleString().substr(1,1)},e.repeat=function(e,t){return new Array(t<=0?0:t+1).join(e)},e.isNullOrEmpty=function(e){return!e||!e.length},e.padLeft=function(t,n,r){return e.repeat(r,Math.max(0,n-t.length))+t},e.trimInternal=function(e,t,n){var r=e.length;if(!r)return e;if(r<764833){var i=e;return t&&(i=i.replace(/^\s+/,"")),n&&(i=i.replace(/\s+$/,"")),i}var o=0;if(n)for(;r>0&&/\s/.test(e[r-1]);)r--;if(t&&r>0)for(;o1&&0===o.length?this.executeCore.apply(this,t):(1===r.length&&this.control.commandManager.showConstraintViolationDialog.execute(new i.ConstraintViolationDialogParameters(r[0],(function(){e.executeCore.apply(e,t)}))),!1)},t.prototype.executeCore=function(){for(var e=[],t=0;t-1}))[0])},e.fontFamilies=["helvetica","times","courier"],e.fontStyles=["normal","bold","italic","bolditalic"],e.headerFooterVisibility=["everyPage","firstPage","never"],e.horizontalAlign=["left","center","right"],e.overflow=["linebreak","ellipsize","visible","hidden"],e.pageBreak=["auto","avoid","always"],e.rowPageBreak=["auto","avoid"],e.verticalAlign=["top","middle","bottom"],e.width=["auto","wrap"],e}();t.PredefinedStyles=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfTaskInfo=void 0;var r=n(4),i=n(18),o=n(29),s=function(){function e(){}return Object.defineProperty(e.prototype,"left",{get:function(){var e;return(null===(e=this.sidePoints)||void 0===e?void 0:e.length)>3?this.sidePoints[0].x:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){var e;return(null===(e=this.sidePoints)||void 0===e?void 0:e.length)>3?this.sidePoints[1].y:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){var e;return(null===(e=this.sidePoints)||void 0===e?void 0:e.length)>3?this.sidePoints[2].x:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){var e;return(null===(e=this.sidePoints)||void 0===e?void 0:e.length)>3?this.sidePoints[3].y:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var t=this.bottom-this.top;return this.isParent&&(t-=e.defaultParentHeightCorrection),t},enumerable:!1,configurable:!0}),e.prototype.assign=function(e){var t,n,r;this.isMilestone=e.isMilestone,this._copyPoints(e.sidePoints),this.progressWidth=e.progressWidth,this.isSmallTask=e.isSmallTask,this.text=e.text,this.textPosition=e.textPosition,null!==(t=this.progressColor)&&void 0!==t||(this.progressColor=new i.Color),this.progressColor.assign(e.progressColor),null!==(n=this.taskColor)&&void 0!==n||(this.taskColor=new i.Color),this.taskColor.assign(e.taskColor),null!==(r=this.textStyle)&&void 0!==r||(this.textStyle=new o.StyleDef),this.textStyle.assign(e.textStyle),this.isParent=e.isParent},e.prototype._copyPoints=function(e){var t=this;this.sidePoints=new Array,null==e||e.forEach((function(e){return t.sidePoints.push(new r.Point(e.x,e.y))}))},e.defaultParentHeightCorrection=4,e}();t.PdfTaskInfo=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CellDef=void 0;var r=n(1),i=n(29),o=function(){function e(e,t,n){this.content="","string"==typeof e?(this.content=e,this.colSpan=t,n&&this.appendStyles(n)):e&&this.assign(e)}return Object.defineProperty(e.prototype,"styles",{get:function(){return this._styles||(this._styles=new i.StyleDef),this._styles},enumerable:!1,configurable:!0}),e.prototype.assign=function(e){(0,r.isDefined)(e.content)&&(this.content=e.content),(0,r.isDefined)(e.colSpan)&&(this.colSpan=e.colSpan),e.styles&&this.appendStyles(e.styles)},e.prototype.appendStyles=function(e){e&&this.styles.assign(e)},e.prototype.hasValue=function(){return!0},e.prototype.getValue=function(){var e={};return e.content=this.content,this.colSpan>1&&(e.colSpan=this.colSpan),this._styles&&(e.styles=this._styles.getValue()),e},e}();t.CellDef=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GanttPdfExportProps=t.PdfDataRange=t.DataExportMode=t.ExportMode=void 0;var r,i,o=n(11),s=n(1),a=n(41);!function(e){e[e.all=0]="all",e[e.treeList=1]="treeList",e[e.chart=2]="chart"}(r=t.ExportMode||(t.ExportMode={})),function(e){e[e.all=0]="all",e[e.visible=1]="visible"}(i=t.DataExportMode||(t.DataExportMode={}));var l=function(){function e(e,t,n,r){var i=!e||e instanceof Date?{startDate:e,endDate:t,startIndex:n,endIndex:r}:e;i&&this.assign(i)}return e.prototype.assign=function(e){(0,s.isDefined)(e.startDate)&&(this.startDate=e.startDate instanceof Date?e.startDate:new Date(e.startDate)),(0,s.isDefined)(e.endDate)&&(this.endDate=e.endDate instanceof Date?e.endDate:new Date(e.endDate)),(0,s.isDefined)(e.startIndex)&&(this.startIndex=parseInt(e.startIndex)),(0,s.isDefined)(e.endIndex)&&(this.endIndex=parseInt(e.endIndex))},e}();t.PdfDataRange=l;var c=function(){function e(e){this.landscape=!1,this.margins=null,this.exportMode=r.all,this.exportDataMode=i.visible,e&&this.assign(e)}return e.prototype.assign=function(e){if(e){if((0,s.isDefined)(e.pdfDocument)&&(this.pdfDoc=e.pdfDocument),(0,s.isDefined)(e.pdfDoc)&&(this.pdfDoc=e.pdfDoc),this.docCreateMethod=e.docCreateMethod,(0,s.isDefined)(e.fileName)&&(this.fileName=e.fileName),this.landscape=!!e.landscape,(0,s.isDefined)(e.margins)&&(this.margins=new a.Margin(e.margins)),(0,s.isDefined)(e.format)){var t=e.format;if("string"==typeof t)this.format=t;else{var n=parseInt(t.width),c=parseInt(t.height);this.pageSize=new o.Size(n,c)}}else if((0,s.isDefined)(e.pageSize)){var u=e.pageSize;this.pageSize=u instanceof o.Size?u.clone():new o.Size(u.width,u.height)}if((0,s.isDefined)(e.exportMode)&&(this.exportMode=this.getEnumValue(r,e.exportMode)),(0,s.isDefined)(e.dateRange)){var d=e.dateRange;"number"==typeof d||"string"==typeof d?this.exportDataMode=this.getEnumValue(i,d):this.dateRange=new l(d)}}},e.prototype.getEnumValue=function(e,t){if(!(0,s.isDefined)(e[t]))return null;var n=parseInt(t);return isNaN(n)?e[t]:n},e.autoFormatKey="auto",e}();t.GanttPdfExportProps=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEditController=void 0;var r=n(3),i=n(15),o=n(2),s=n(9),a=n(191),l=n(76),c=n(17),u=function(){function e(e){this.showInfoDelay=1e3,this.taskIndex=-1,this.successorIndex=-1,this.isEditingInProgress=!1,this.disableTaskEditBox=!1,this.isTaskEditBoxShown=!1,this.settings=e,this.createElements()}return Object.defineProperty(e.prototype,"taskId",{get:function(){return this.viewModel.items[this.taskIndex].task.internalId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"successorId",{get:function(){return this.viewModel.items[this.successorIndex].task.internalId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"task",{get:function(){return this.viewItem.task},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewItem",{get:function(){return this.viewModel.items[this.taskIndex]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderHelper",{get:function(){return this.settings.getRenderHelper()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ganttSettings",{get:function(){return this.settings.getGanttSettings()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewModel",{get:function(){return this.settings.getViewModel()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"commandManager",{get:function(){return this.settings.getCommandManager()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"validationController",{get:function(){return this.settings.getValidationController()},enumerable:!1,configurable:!0}),e.prototype.raiseTaskMoving=function(e,t,n,r){return this.settings.getModelManipulator().dispatcher.raiseTaskMoving(e,t,n,r)},Object.defineProperty(e.prototype,"tooltip",{get:function(){var e;return null!==(e=this._tooltip)&&void 0!==e||(this._tooltip=new a.TaskEditTooltip(this.baseElement,this.tooltipSettings,this.renderHelper.elementTextHelperCultureInfo)),this._tooltip.tooltipSettings=this.tooltipSettings,this._tooltip},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipSettings",{get:function(){var e=this;return l.TooltipSettings.parse({getHeaderHeight:this.settings.getRenderHelper().header.clientHeight,getTaskProgressTooltipContentTemplate:this.ganttSettings.taskProgressTooltipContentTemplate,getTaskTimeTooltipContentTemplate:this.ganttSettings.taskTimeTooltipContentTemplate,getTaskTooltipContentTemplate:this.ganttSettings.taskTooltipContentTemplate,destroyTemplate:function(t){e.settings.destroyTemplate(t)},formatDate:function(t){return e.settings.formatDate(t)}})},enumerable:!1,configurable:!0}),e.prototype.show=function(t){if(!this.isEditingInProgress&&!this.disableTaskEditBox){this.taskIndex=t,this.hide(),this.changeWrapInfo(),this.baseElement.className=e.CLASSNAMES.TASK_EDIT_BOX,this.displayDependency(),this.task.isMilestone()&&!this.viewItem.isCustom?this.baseElement.className=this.baseElement.className+" milestone":(this.isTaskUpdateAllowed()||(this.baseElement.className=this.baseElement.className+" "+e.CLASSNAMES.TASK_EDIT_HIDE_UPDATING),this.viewItem.isCustom&&this.baseElement.classList.add(e.CLASSNAMES.TASK_EDIT_BOX_CUSTOM));var n=this.settings.getGanttSettings().editing.taskHoverDelay||0;this.taskDateRange=new i.DateRange(this.task.start,this.task.end),this.displayTaskEditBox(n),this.displayProgressEdit(),this.displayStartEndEditElements()}},e.prototype.displayStartEndEditElements=function(){!this.task.isMilestone()&&this.isTaskUpdateAllowed()&&this.canUpdateTask()?(this.startEdit.style.display="block",this.endEdit.style.display="block"):(this.startEdit.style.display="none",this.endEdit.style.display="none")},e.prototype.displayProgressEdit=function(){!this.viewItem.isCustom&&this.canUpdateTask()&&this.isTaskUpdateAllowed()&&this.wrapInfo.size.width>this.wrapInfo.size.height?(this.progressEdit.style.display="block",this.progressEdit.style.left=this.task.normalizedProgress/100*this.wrapInfo.size.width-this.progressEdit.offsetWidth/2+"px"):this.progressEdit.style.display="none"},e.prototype.displayDependency=function(){this.ganttSettings.editing.enabled&&this.ganttSettings.editing.allowDependencyInsert&&this.ganttSettings.showDependencies||(this.baseElement.className=this.baseElement.className+" hide-dependency")},e.prototype.changeWrapInfo=function(){this.updateWrapInfo(),this.wrapInfo.assignPosition(this.baseElement),this.wrapInfo.assignSize(this.baseElement)},e.prototype.displayTaskEditBox=function(e){var t=this;void 0===e&&(e=0);var n=function(){t.renderHelper.taskArea.appendChild(t.baseElement),t.isTaskEditBoxShown=!0};e?this.timerId=setTimeout(n,e):n()},e.prototype.endEditing=function(){this.isEditingInProgress=!1,this.hide()},e.prototype.hide=function(){this.isTaskEditBoxShown=!1;var e=this.baseElement.parentNode;e&&e.removeChild(this.baseElement),this.tooltip.hide(),clearTimeout(this.timerId)},e.prototype.cancel=function(){clearTimeout(this.timerId)},e.prototype.showTaskInfo=function(e,t){void 0===t&&(t=500),this.timerId&&(t=this.showInfoDelay),this.tooltip.showInfo(this.task,e,t)},e.prototype.updateWrapInfo=function(){this.wrapInfo=this.getTaskWrapperElementInfo(this.taskIndex),this.wrapInfo.position.x--},e.prototype.isAllowedToConnectTasks=function(e){var t,n=this.viewModel.items[e];return this.validationController.canCreateDependency(this.taskId,null===(t=n.task)||void 0===t?void 0:t.internalId)},e.prototype.showDependencySuccessor=function(e){if(this.isAllowedToConnectTasks(e)){this.successorIndex=e;var t=this.getTaskWrapperElementInfo(e);t.assignPosition(this.dependencySuccessorBaseElement),t.assignSize(this.dependencySuccessorBaseElement),t.assignSize(this.dependencySuccessorFrame),this.renderHelper.taskArea.appendChild(this.dependencySuccessorBaseElement)}},e.prototype.hideDependencySuccessor=function(){var e=this.dependencySuccessorBaseElement.parentNode;e&&e.removeChild(this.dependencySuccessorBaseElement),this.successorIndex=-1},e.prototype.processProgress=function(e){if(this.isTaskUpdateAllowed()){this.isEditingInProgress=!0;var t=e.x-this.wrapInfo.position.x,n=0;e.x>this.wrapInfo.position.x&&(n=e.xthis.wrapInfo.position.x?e.x:this.wrapInfo.position.x,n=t-this.wrapInfo.position.x;this.baseElement.style.width=(n<1?0:n)+"px";var r=this.task.start,i=this.renderHelper.gridLayoutCalculator.getDateByPos(t);i.setSeconds(0),ir||n<1?this.taskDateRange.start.setTime(r.getTime()):this.taskDateRange.start=this.getCorrectedDate(this.task.start,i),this.tooltip.showTime(this.taskDateRange.start,r,o.DomUtils.getAbsolutePositionX(this.baseElement))}},e.prototype.confirmStart=function(){this.isTaskUpdateAllowed()&&(this.baseElement.className=e.CLASSNAMES.TASK_EDIT_BOX,this.isEditingInProgress=!1,this.commandManager.changeTaskStartCommand.execute(this.taskId,this.taskDateRange.start),this.hide(),this.updateWrapInfo())},e.prototype.processMove=function(e){if(this.isTaskUpdateAllowed()&&this.isTaskEditBoxShown){this.baseElement.className=this.baseElement.className+" move";var t=this.baseElement.offsetLeft+e;this.baseElement.style.left=t+"px";var n=this.renderHelper.gridLayoutCalculator.getDateByPos(t);this.taskDateRange.start=this.getCorrectedDate(this.task.start,n);var r=c.DateUtils.getRangeMSPeriod(this.task.start,this.task.end);return this.taskDateRange.end=c.DateUtils.getDSTCorrectedDate(this.taskDateRange.start,r),this.isEditingInProgress=this.raiseTaskMoving(this.task,this.taskDateRange.start,this.taskDateRange.end,this.onTaskMovingCallback.bind(this)),this.isEditingInProgress&&this.tooltip.showTime(this.taskDateRange.start,this.taskDateRange.end,o.DomUtils.getAbsolutePositionX(this.baseElement)),this.isEditingInProgress}return!0},e.prototype.onTaskMovingCallback=function(e,t){if(this.taskDateRange.start!==e||this.taskDateRange.end!==t){var n=this.renderHelper.gridLayoutCalculator,r=n.getPosByDate(e),i=n.getPosByDate(t)-r;this.baseElement.style.left=r+"px",this.baseElement.style.width=(i<1?0:i)+"px",this.taskDateRange.start=e,this.taskDateRange.end=t}},e.prototype.confirmMove=function(){this.isTaskUpdateAllowed()&&(this.ganttSettings.editing.allowDependencyInsert||(this.baseElement.className=this.baseElement.className+" hide-dependency"),this.isEditingInProgress&&(this.baseElement.className=e.CLASSNAMES.TASK_EDIT_BOX,this.commandManager.taskMoveCommand.execute(this.taskId,this.taskDateRange.start,this.taskDateRange.end),this.updateWrapInfo(),this.hide(),this.isEditingInProgress=!1))},e.prototype.getCorrectedDate=function(e,t){if(this.ganttSettings.viewType>r.ViewType.SixHours){var n=t.getFullYear(),i=t.getMonth(),o=t.getDate(),s=this.ganttSettings.viewType===r.ViewType.Days?t.getHours():e.getHours(),a=e.getMinutes(),l=e.getSeconds(),c=e.getMilliseconds();return new Date(n,i,o,s,a,l,c)}return t},e.prototype.startDependency=function(t){this.dependencyLine=document.createElement("DIV"),this.dependencyLine.className=e.CLASSNAMES.TASK_EDIT_DEPENDENCY_LINE,this.renderHelper.taskArea.appendChild(this.dependencyLine),this.startPosition=t},e.prototype.processDependency=function(e){this.isEditingInProgress=!0,this.drawline(this.startPosition,e)},e.prototype.endDependency=function(e){this.isEditingInProgress=!1,null!=e&&this.commandManager.createDependencyCommand.execute(this.task.internalId,this.successorId,e);var t=this.dependencyLine.parentNode;t&&t.removeChild(this.dependencyLine),this.dependencyLine=null,this.hideDependencySuccessor(),this.hide()},e.prototype.selectDependency=function(e){this.ganttSettings.editing.allowDependencyDelete&&(this.dependencyId=e)},e.prototype.isDependencySelected=function(e){return this.dependencyId&&this.dependencyId===e},e.prototype.deleteSelectedDependency=function(){this.dependencyId&&this.commandManager.removeDependencyCommand.execute(this.dependencyId)},e.prototype.getTaskWrapperElementInfo=function(e){var t=this.renderHelper.gridLayoutCalculator,n=t.getTaskWrapperElementInfo(e);return n.size.width=t.getTaskWidth(e),n.size.height=t.getTaskHeight(e),n},e.prototype.createElements=function(){this.baseElement=document.createElement("DIV"),this.baseFrame=document.createElement("DIV"),this.baseFrame.className=e.CLASSNAMES.TASK_EDIT_FRAME,this.baseElement.appendChild(this.baseFrame),this.progressEdit=document.createElement("DIV"),this.progressEdit.className=e.CLASSNAMES.TASK_EDIT_PROGRESS,this.baseFrame.appendChild(this.progressEdit),this.progressEdit.appendChild(document.createElement("DIV")),this.dependencyFinish=document.createElement("DIV"),this.dependencyFinish.classList.add(e.CLASSNAMES.TASK_EDIT_DEPENDENCY_RIGTH),s.Browser.TouchUI&&this.dependencyFinish.classList.add(e.CLASSNAMES.TASK_EDIT_TOUCH),this.baseFrame.appendChild(this.dependencyFinish),this.dependencyStart=document.createElement("DIV"),this.dependencyStart.classList.add(e.CLASSNAMES.TASK_EDIT_DEPENDENCY_LEFT),s.Browser.TouchUI&&this.dependencyStart.classList.add(e.CLASSNAMES.TASK_EDIT_TOUCH),this.baseFrame.appendChild(this.dependencyStart),this.startEdit=document.createElement("DIV"),this.startEdit.className=e.CLASSNAMES.TASK_EDIT_START,this.baseFrame.appendChild(this.startEdit),this.endEdit=document.createElement("DIV"),this.endEdit.className=e.CLASSNAMES.TASK_EDIT_END,this.baseFrame.appendChild(this.endEdit),this.dependencySuccessorBaseElement=document.createElement("DIV"),this.dependencySuccessorBaseElement.className=e.CLASSNAMES.TASK_EDIT_BOX_SUCCESSOR,this.dependencySuccessorFrame=document.createElement("DIV"),this.dependencySuccessorFrame.className=e.CLASSNAMES.TASK_EDIT_FRAME_SUCCESSOR,this.dependencySuccessorBaseElement.appendChild(this.dependencySuccessorFrame),this.dependencySuccessorStart=document.createElement("DIV"),this.dependencySuccessorStart.classList.add(e.CLASSNAMES.TASK_EDIT_SUCCESSOR_DEPENDENCY_RIGTH),s.Browser.TouchUI&&this.dependencySuccessorStart.classList.add(e.CLASSNAMES.TASK_EDIT_TOUCH),this.dependencySuccessorFrame.appendChild(this.dependencySuccessorStart),this.dependencySuccessorFinish=document.createElement("DIV"),this.dependencySuccessorFinish.classList.add(e.CLASSNAMES.TASK_EDIT_SUCCESSOR_DEPENDENCY_LEFT),s.Browser.TouchUI&&this.dependencySuccessorFinish.classList.add(e.CLASSNAMES.TASK_EDIT_TOUCH),this.dependencySuccessorFrame.appendChild(this.dependencySuccessorFinish),this._tooltip=new a.TaskEditTooltip(this.baseElement,this.tooltipSettings,this.renderHelper.elementTextHelperCultureInfo),this.attachEvents()},e.prototype.attachEvents=function(){this.onMouseLeaveHandler=function(){this.isEditingInProgress||this.hide()}.bind(this),this.baseElement.addEventListener("mouseleave",this.onMouseLeaveHandler)},e.prototype.drawline=function(e,t){if(e.x>t.x){var n=t;t=e,e=n}var r=Math.atan((e.y-t.y)/(t.x-e.x));r=-(r=180*r/Math.PI);var i=Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y));this.dependencyLine.style.left=e.x+"px",this.dependencyLine.style.top=e.y+"px",this.dependencyLine.style.width=i+"px",this.dependencyLine.style.transform="rotate("+r+"deg)"},e.prototype.canUpdateTask=function(){return!this.viewModel.isTaskToCalculateByChildren(this.task.internalId)},e.prototype.isTaskUpdateAllowed=function(){var e=this.ganttSettings.editing;return e.enabled&&e.allowTaskUpdate},e.prototype.detachEvents=function(){var e;null===(e=this.baseElement)||void 0===e||e.removeEventListener("mouseleave",this.onMouseLeaveHandler)},e.CLASSNAMES={TASK_EDIT_BOX:"dx-gantt-task-edit-wrapper",TASK_EDIT_BOX_CUSTOM:"dx-gantt-task-edit-wrapper-custom",TASK_EDIT_FRAME:"dx-gantt-task-edit-frame",TASK_EDIT_PROGRESS:"dx-gantt-task-edit-progress",TASK_EDIT_DEPENDENCY_RIGTH:"dx-gantt-task-edit-dependency-r",TASK_EDIT_DEPENDENCY_LEFT:"dx-gantt-task-edit-dependency-l",TASK_EDIT_START:"dx-gantt-task-edit-start",TASK_EDIT_END:"dx-gantt-task-edit-end",TASK_EDIT_DEPENDENCY_LINE:"dx-gantt-task-edit-dependency-line",TASK_EDIT_BOX_SUCCESSOR:"dx-gantt-task-edit-wrapper-successor",TASK_EDIT_FRAME_SUCCESSOR:"dx-gantt-task-edit-frame-successor",TASK_EDIT_SUCCESSOR_DEPENDENCY_RIGTH:"dx-gantt-task-edit-successor-dependency-r",TASK_EDIT_SUCCESSOR_DEPENDENCY_LEFT:"dx-gantt-task-edit-successor-dependency-l",TASK_EDIT_TOUCH:"dx-gantt-edit-touch",TASK_EDIT_HIDE_UPDATING:"hide-updating"},e}();t.TaskEditController=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GanttView=void 0;var r=n(86),i=n(9),o=n(87),s=n(61),a=n(47),l=n(15),c=n(7),u=n(17),d=n(141),p=n(142),h=n(144),f=n(152),g=n(1),y=n(154),m=n(160),v=n(175),T=n(180),k=n(207),b=n(11),_=n(79),S=n(53),w=n(211),E=n(212),I=n(214),C=n(3),D=n(215),P=n(232),M=n(8),A=n(2),x=n(4),O=n(233),R=n(22),L=function(){function e(e,t,n){var i=this;this.currentSelectedTaskID="",this.isFocus=!1,this._updateWithModelReloadLocked=!1,this.scaleCount=2,this.tickSize=new b.Size(0,0),this.currentZoom=1,this.stripLinesUpdaterId=null,this.ganttOwner=t,this.settings=k.Settings.parse(n),this.initValidationController(),this.renderHelper=new T.RenderHelper(this),this.renderHelper.initMarkup(e),this.loadOptionsFromGanttOwner(),this.renderHelper.init(this.tickSize,this.range,this.settings.viewType,this.viewModel,this.settings.firstDayOfWeek),this.commandManager=new o.CommandManager(this),this.barManager=new r.BarManager(this.commandManager,this.ganttOwner.bars),this.initTaskEditController(),this.history=new f.History(this._getHistoryListener()),this.initFullScreenModeHelper(),this.updateView(),this._scrollTimeOut=setTimeout((function(){i.scrollLeftByViewType()}),0),this.initializeStripLinesUpdater(),this.initGanttViewApi()}return e.prototype.initGanttViewApi=function(){this.ganttViewApi=new P.GanttViewApi(this)},e.prototype._getHistoryListener=function(){return{onTransactionStart:this.onHistoryTransactionStart.bind(this),onTransactionEnd:this.onHistoryTransactionEnd.bind(this)}},e.prototype.onHistoryTransactionStart=function(){this._updateWithModelReloadLocked=!0},e.prototype.onHistoryTransactionEnd=function(){this._updateWithModelReloadLocked=!1,this._pendingUpdateInfo&&(this.updateWithDataReload(this._pendingUpdateInfo.keepExpandState),this._pendingUpdateInfo=null)},e.prototype.initValidationController=function(){var e=this,t=I.ValidationControllerSettings.parse({getViewModel:function(){return e.viewModel},getHistory:function(){return e.history},getModelManipulator:function(){return e.modelManipulator},getRange:function(){return e.range},getValidationSettings:function(){return e.settings.validation},updateOwnerInAutoParentMode:function(){e.updateOwnerInAutoParentMode()},getIsValidateDependenciesRequired:function(){return e.isValidateDependenciesRequired()}});this.validationController=new E.ValidationController(t)},e.prototype.initTaskEditController=function(){var e=this,t=w.TaskEditSettings.parse({destroyTemplate:function(t){e.destroyTemplate(t)},formatDate:function(t){return e.getDateFormat(t)},getRenderHelper:function(){return e.renderHelper},getGanttSettings:function(){return e.settings},getViewModel:function(){return e.viewModel},getCommandManager:function(){return e.commandManager},getModelManipulator:function(){return e.modelManipulator},getValidationController:function(){return e.validationController}});this.taskEditController=new S.TaskEditController(t)},Object.defineProperty(e.prototype,"taskAreaEventsListener",{get:function(){var e;return null!==(e=this._taskAreaEventsListener)&&void 0!==e||(this._taskAreaEventsListener=new O.TaskAreaEventsListener(this)),this._taskAreaEventsListener},enumerable:!1,configurable:!0}),e.prototype.initFullScreenModeHelper=function(){var e=this,t=d.FullScreenHelperSettings.parse({getMainElement:function(){return e.getOwnerControlMainElement()},adjustControl:function(){e.adjustOwnerControl()}});this.fullScreenModeHelper=new p.FullScreenModeHelper(t)},e.prototype.getDateRange=function(e,t){var n=this.getVisibleAreaTime(),r=this.settings.startDateRange||u.DateUtils.adjustStartDateByViewType(new Date(e.getTime()-n),this.settings.viewType,this.settings.firstDayOfWeek),i=this.settings.endDateRange||u.DateUtils.adjustEndDateByViewType(new Date(t.getTime()+n),this.settings.viewType,this.settings.firstDayOfWeek);return this.settings.startDateRange&&r>i?i=r:this.settings.endDateRange&&r>i&&(r=i),new l.DateRange(r,i)},e.prototype.getVisibleAreaTime=function(){return Math.ceil(this.renderHelper.getTaskAreaContainerWidth()/this.tickSize.width)*u.DateUtils.getTickTimeSpan(this.settings.viewType)},e.prototype.zoomIn=function(e){void 0===e&&(e=this.renderHelper.getTaskAreaContainerWidth()/2),this.ganttViewApi.zoomIn(e)},e.prototype.zoomOut=function(e){void 0===e&&(e=this.renderHelper.getTaskAreaContainerWidth()/2),this.ganttViewApi.zoomOut(e)},e.prototype.scrollToDate=function(e){if(e){var t=e instanceof Date?u.DateUtils.getOrCreateUTCDate(e):u.DateUtils.parse(e);this.scrollToDateCore(t,0)}},e.prototype.showDialog=function(e,t,n,r){this.ganttOwner.showDialog(e,t,n,r)},e.prototype.showPopupMenu=function(e){this.ganttOwner.showPopupMenu(e)},e.prototype.hidePopupMenu=function(){this.ganttOwner.hidePopupMenu&&this.ganttOwner.hidePopupMenu()},e.prototype.collapseAll=function(){this.ganttOwner.collapseAll()},e.prototype.expandAll=function(){this.ganttOwner.expandAll()},e.prototype.onGanttViewContextMenu=function(e,t,n){return this.ganttOwner.onGanttViewContextMenu(e,t,n)},e.prototype.changeGanttTaskSelection=function(e,t){this.ganttOwner.changeGanttTaskSelection(e,t)},e.prototype.hideTaskEditControl=function(){this.taskEditController.hide()},e.prototype.scrollLeftByViewType=function(){var e=u.DateUtils.roundStartDate(this.dataRange.start,this.settings.viewType);this.scrollToDateCore(e,1)},e.prototype.scrollToDateCore=function(e,t){this.renderHelper.setTaskAreaContainerScrollLeftToDate(e,t)},e.prototype.onVisualModelChanged=function(){this.resetAndUpdate()},e.prototype.initializeStripLinesUpdater=function(){var e=this;this.settings.stripLines.showCurrentTime&&(this.stripLinesUpdaterId=setInterval((function(){e.renderHelper.recreateStripLines()}),Math.max(this.settings.stripLines.currentTimeUpdateInterval,100)))},e.prototype.clearStripLinesUpdater=function(){this.stripLinesUpdaterId&&clearInterval(this.stripLinesUpdaterId),this.stripLinesUpdaterId=null},e.prototype.getGanttViewStartDate=function(e){if(!e)return new Date;var t=e.map((function(e){return"string"==typeof e.start?new Date(e.start):e.start})).filter((function(e){return(0,g.isDefined)(e)}));return t.length>0?t.reduce((function(e,t){return t0?t.reduce((function(e,t){return t>e?t:e}),t[0]):new Date},e.prototype.getTask=function(e){var t=this.getViewItem(e);return null==t?void 0:t.task},e.prototype.getViewItem=function(e){var t;return null===(t=this.viewModel)||void 0===t?void 0:t.items[e]},e.prototype.isValidateDependenciesRequired=function(){return this.settings.validation.validateDependencies&&this.settings.showDependencies},e.prototype.updateTickSizeWidth=function(){this.tickSize.width=this.renderHelper.etalonScaleItemWidths*this.currentZoom},e.prototype.updateView=function(){this.onBeginUpdateView(),this.renderHelper.setTimeScaleContainerScrollLeft(this.taskAreaContainerScrollLeft),this.processScroll(!1),this.processScroll(!0),this.ganttOwner.onGanttScroll(this.taskAreaContainerScrollTop),this.onEndUpdateView()},e.prototype.onBeginUpdateView=function(){this[e.taskAreaScrollTopKey]=this.renderHelper.taskAreaContainerScrollTop,this[e.taskAreaScrollLeftKey]=this.renderHelper.taskAreaContainerScrollLeft},e.prototype.onEndUpdateView=function(){delete this[e.taskAreaScrollTopKey],delete this[e.taskAreaScrollLeftKey],delete this[e.taskTextHeightKey]},Object.defineProperty(e.prototype,"taskAreaContainerScrollTop",{get:function(){var t;return null!==(t=this[e.taskAreaScrollTopKey])&&void 0!==t?t:this.renderHelper.taskAreaContainerScrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskAreaContainerScrollLeft",{get:function(){var t;return null!==(t=this[e.taskAreaScrollLeftKey])&&void 0!==t?t:this.renderHelper.taskAreaContainerScrollLeft},enumerable:!1,configurable:!0}),e.prototype.processScroll=function(e){this.hideTaskEditControl(),this.renderHelper.processScroll(e)},e.prototype.allowTaskAreaBorders=function(e){return e?this.settings.areHorizontalBordersEnabled:this.settings.areVerticalBordersEnabled},e.prototype.getScaleItemText=function(e,t){return this.renderHelper.getScaleItemText(e,t)},e.prototype.getTaskText=function(e){return this.renderHelper.getTaskText(e)},e.prototype.rowHasChildren=function(e){var t=this.getViewItem(e);return(null==t?void 0:t.children.length)>0},e.prototype.rowHasSelection=function(e){var t=this.getViewItem(e);return null==t?void 0:t.selected},e.prototype.getAllVisibleTaskIndices=function(e,t){return this.viewModel.getAllVisibleTaskIndices(e,t)},e.prototype.getVisibleDependencyKeysByTaskRange=function(e){var t=this.viewModel,n=e.map((function(e){return t.tasks.items[e].internalId}));return t.dependencies.items.filter((function(e){return n.indexOf(e.successorId)>-1||n.indexOf(e.predecessorId)>-1})).map((function(e){return e.internalId}))},e.prototype.getTreeListTableStyle=function(){var e,t;return null===(t=(e=this.ganttOwner).getTreeListTableStyle)||void 0===t?void 0:t.call(e)},e.prototype.getTreeListColCount=function(){var e,t;return null===(t=(e=this.ganttOwner).getTreeListColCount)||void 0===t?void 0:t.call(e)},e.prototype.getTreeListHeaderInfo=function(e){var t,n;return null===(n=(t=this.ganttOwner).getTreeListHeaderInfo)||void 0===n?void 0:n.call(t,e)},e.prototype.getTreeListCellInfo=function(e,t,n){var r,i;return null===(i=(r=this.ganttOwner).getTreeListCellInfo)||void 0===i?void 0:i.call(r,e,t,n)},e.prototype.exportToPdf=function(e){var t;return null!==(t=e.docCreateMethod)&&void 0!==t||(e.docCreateMethod=this.getDefaultPdfDocCreateMethod()),new v.PdfGanttExporter(new h.GanttExportCalculator(this,e)).export()},e.prototype.getDefaultPdfDocCreateMethod=function(){var e;return null===(e=window.jspdf)||void 0===e?void 0:e.jsPDF},e.prototype.getTaskDependencies=function(e){return this.viewModel.dependencies.items.filter((function(t){return t.predecessorId==e||t.successorId==e}))},e.prototype.isHighlightRowElementAllowed=function(e){var t=this.getViewItem(e);return e%2!=0&&this.settings.areAlternateRowsEnabled||t.children.length>0},e.prototype.calculateAutoViewType=function(e,t){var n=(t.getTime()-e.getTime())/36e5;return n>8760?C.ViewType.Years:n>720?C.ViewType.Months:n>168?C.ViewType.Weeks:n>24?C.ViewType.Days:n>6?C.ViewType.SixHours:n>1?C.ViewType.Hours:C.ViewType.TenMinutes},e.prototype.getExternalTaskAreaContainer=function(e){return this.ganttOwner.getExternalTaskAreaContainer(e)},e.prototype.prepareExternalTaskAreaContainer=function(e,t){return this.ganttOwner.prepareExternalTaskAreaContainer(e,t)},e.prototype.getHeaderHeight=function(){return this.ganttOwner.getHeaderHeight()},e.prototype.changeTaskExpanded=function(e,t){var n=this.getTaskByPublicId(e);n&&this.viewModel.changeTaskExpanded(n.internalId,t)},e.prototype.expandTask=function(e){this.viewModel.changeTaskExpanded(e,!0)},e.prototype.collapseTask=function(e){this.viewModel.changeTaskExpanded(e,!1)},e.prototype.showTask=function(e){this.viewModel.changeTaskVisibility(e,!0)},e.prototype.hideTask=function(e){this.viewModel.changeTaskVisibility(e,!1)},e.prototype.getTaskVisibility=function(e){return this.viewModel.getTaskVisibility(e)},e.prototype.unselectCurrentSelectedTask=function(){this.unselectTask(this.currentSelectedTaskID)},e.prototype.getTaskSelected=function(e){return this.viewModel.getTaskSelected(e)},e.prototype.setViewType=function(e,t){void 0===t&&(t=!0),this.ganttViewApi.setViewType(e,t)},e.prototype.setViewTypeRange=function(e,t){this.ganttViewApi.setViewTypeRange(e,t)},e.prototype.setTaskTitlePosition=function(e){this.settings.taskTitlePosition!==e&&(this.settings.taskTitlePosition=e,this.resetAndUpdate())},e.prototype.setShowResources=function(e){this.settings.showResources!==e&&(this.settings.showResources=e,this.resetAndUpdate())},e.prototype.toggleResources=function(){this.setShowResources(!this.settings.showResources)},e.prototype.setShowDependencies=function(e){this.settings.showDependencies!==e&&(this.settings.showDependencies=e,this.resetAndUpdate())},e.prototype.toggleDependencies=function(){this.setShowDependencies(!this.settings.showDependencies)},e.prototype.setFirstDayOfWeek=function(e){this.settings.firstDayOfWeek!==e&&(this.settings.firstDayOfWeek=e,this.resetAndUpdate())},e.prototype.setStartDateRange=function(e){c.DateTimeUtils.areDatesEqual(this.settings.startDateRange,e)||(this.settings.startDateRange=new Date(e),this.resetAndUpdate())},e.prototype.setEndDateRange=function(e){c.DateTimeUtils.areDatesEqual(this.settings.endDateRange,e)||(this.settings.endDateRange=new Date(e),this.resetAndUpdate())},e.prototype.loadOptionsFromGanttOwner=function(){var e,t=this;this.tickSize.height=this.ganttOwner.getRowHeight();var n=this.ganttOwner.getGanttTasksData();this.dataRange=new l.DateRange(this.getGanttViewStartDate(n),this.getGanttViewEndDate(n)),null==this.settings.viewType&&(this.settings.viewType=this.calculateAutoViewType(this.dataRange.start,this.dataRange.end)),this.updateTickSizeWidth(),this.range=this.getDateRange(this.dataRange.start,this.dataRange.end),this.dispatcher=new y.ModelChangesDispatcher;var r=this.ganttOwner.getModelChangesListener();r&&this.dispatcher.onModelChanged.add(r),this.viewModel=new D.ViewVisualModel(this,n,this.ganttOwner.getGanttDependenciesData(),this.ganttOwner.getGanttResourcesData(),this.ganttOwner.getGanttResourceAssignmentsData(),this.range,this.ganttOwner.getGanttWorkTimeRules()),this.modelManipulator=new m.ModelManipulator(this.viewModel,this.dispatcher),null===(e=this.history)||void 0===e||e.historyItems.forEach((function(e){return e.setModelManipulator(t.modelManipulator)}))},e.prototype.resetAndUpdate=function(){this.range=this.getDateRange(this.dataRange.start,this.dataRange.end),this.viewModel.updateRange(this.range),this.renderHelper.resetAndUpdate(this.tickSize,this.range,this.settings.viewType,this.viewModel,this.settings.firstDayOfWeek),i.Browser.IE&&this.taskEditController.createElements(),this.updateView()},e.prototype.cleanMarkup=function(){this.renderHelper.taskAreaManagerDetachEvents(),this.taskEditController.detachEvents(),this.clearStripLinesUpdater(),this.renderHelper.reset(),clearTimeout(this._scrollTimeOut)},e.prototype.checkAndProcessModelChanges=function(){var e=this.ganttOwner.getGanttTasksData(),t=this.viewModel.refreshTaskDataIfRequires(e);return t&&this.resetAndUpdate(),t},e.prototype.updateRowHeights=function(e){if(this.tickSize.height!==e){this.tickSize.height=e;var t=this.renderHelper.getTaskAreaContainerScrollLeft();this.resetAndUpdate(),this.renderHelper.setTaskAreaContainerScrollLeft(t)}},e.prototype.selectTask=function(e){this.selectDependency(null),this.viewModel.changeTaskSelected(e,!0),this.currentSelectedTaskID=e,this.updateBarManager()},e.prototype.unselectTask=function(e){this.viewModel.changeTaskSelected(e,!1),this.updateBarManager()},e.prototype.selectTaskById=function(e){this.unselectCurrentSelectedTask();var t=this.getTaskByPublicId(e);t&&this.selectTask(t.internalId)},e.prototype.selectDependency=function(e){this.taskEditController.selectDependency(e),this.renderHelper.createConnectorLines()},e.prototype.getTaskAreaContainer=function(){return this.renderHelper.taskAreaContainer},e.prototype.setWidth=function(e){this.renderHelper.setMainElementWidth(e)},e.prototype.setHeight=function(e){this.renderHelper.setMainElementHeight(e)},e.prototype.setAllowSelection=function(e){this.settings.allowSelectTask=e},e.prototype.setEditingSettings=function(e){this.settings.editing=e,this.updateBarManager()},e.prototype.setValidationSettings=function(e){this.settings.validation=e},e.prototype.setRowLinesVisible=function(e){this.settings.areHorizontalBordersEnabled=e,this.renderHelper.prepareTaskAreaContainer(),this.resetAndUpdate()},e.prototype.setStripLines=function(e){this.settings.stripLines=_.StripLineSettings.parse(e),this.clearStripLinesUpdater(),this.initializeStripLinesUpdater(),this.renderHelper.recreateStripLines()},e.prototype.deleteTask=function(e){var t=this.getTaskByPublicId(e.toString());t&&this.commandManager.removeTaskCommand.execute(t.internalId,!1,!0)},e.prototype.insertTask=function(e){if(e){var t=null!=e.parentId?String(e.parentId):null,n=this.getTaskByPublicId(t),r=this.viewModel.getRootTaskId(),i="string"==typeof e.start?new Date(e.start):e.start,o="string"==typeof e.end?new Date(e.end):e.end,s={parentId:r&&t===r?t:null==n?void 0:n.internalId,title:e.title,start:i,end:o,progress:parseInt(e.progress)||0,color:e.color};if(this.commandManager.createTaskCommand.execute(s))return this.getLastInsertedTaskId()}return""},e.prototype.updateTask=function(e,t){var n=this.getTaskByPublicId(e.toString()),r=this._getTaskDataForUpdate(t,n);r&&this.commandManager.updateTaskCommand.execute(n.internalId,r)},e.prototype.getTaskData=function(e){var t=this.getTaskByPublicId(e.toString());if(t)return this.viewModel.getTaskObjectForDataSource(t)},e.prototype.insertDependency=function(e){if(e){var t=String(e.predecessorId),n=this.getTaskByPublicId(t),r=String(e.successorId),i=this.getTaskByPublicId(r),o=e.type;n&&i&&this.validationController.canCreateDependency(t,r)&&this.commandManager.createDependencyCommand.execute(n.internalId,i.internalId,o)}},e.prototype.deleteDependency=function(e){var t=this.viewModel.convertPublicToInternalKey("dependency",e);(0,g.isDefined)(t)&&this.commandManager.removeDependencyCommand.execute(t)},e.prototype.getDependencyData=function(e){return this.viewModel.getDependencyObjectForDataSource(e)},e.prototype.insertResource=function(e,t){var n=this;if(e){this.commandManager.createResourceCommand.execute(String(e.text),e.color&&String(e.color),(function(e){if((0,g.isDefined)(t))for(var r=0;r-1?t.parent.children[n].task:t.parent.task},e.prototype.updateCreatedTaskIdAfterServerUpdate=function(e,t){var n=this.viewModel.findItem(e),r=n&&n.task;r&&(r.id=t)},e.prototype.getTaskIdByInternalId=function(e){var t=this.viewModel.findItem(e),n=t&&t.task;return n?n.id:null},e.prototype.isTaskHasChildren=function(e){var t=this.viewModel.findItem(e);return t&&t.children.length>0},e.prototype.requireFirstLoadParentAutoCalc=function(){var e=this.ganttOwner;return e.getRequireFirstLoadParentAutoCalc&&e.getRequireFirstLoadParentAutoCalc()},e.prototype.updateOwnerInAutoParentMode=function(){this.viewModel.parentAutoCalc&&this.dispatcher.notifyParentDataRecalculated(this.viewModel.getCurrentTaskData())},e.prototype.getOwnerControlMainElement=function(){var e=this.ganttOwner;return e.getMainElement&&e.getMainElement()},e.prototype.adjustOwnerControl=function(){var e=this.ganttOwner;e.adjustControl&&e.adjustControl()},e.prototype.applySettings=function(e,t){void 0===t&&(t=!1);var n=k.Settings.parse(e),r=t||this.settings.equal(n);this.settings=n,r||this.resetAndUpdate()},e.prototype.getDataUpdateErrorCallback=function(){var e=this,t=this.history,n=t.getCurrentProcessingItemInfo();return function(){e.dispatcher.lock(),t.rollBackAndRemove(n),e.dispatcher.unlock(),e.updateBarManager()}},e.prototype.setTaskTooltipContentTemplate=function(e){this.settings.taskTooltipContentTemplate=e},e.prototype.setTaskProgressTooltipContentTemplate=function(e){this.settings.taskProgressTooltipContentTemplate=e},e.prototype.setTaskTimeTooltipContentTemplate=function(e){this.settings.taskTimeTooltipContentTemplate=e},e.prototype.setTaskContentTemplate=function(e){this.settings.taskContentTemplate=e},e.prototype.updateBarManager=function(){this.barManager.updateItemsState([])},e.prototype.onTaskAreaClick=function(e,t){var n,r=this.viewModel.items[e];return r&&this.onTaskClick(null===(n=r.task)||void 0===n?void 0:n.id,t)},e.prototype.onTaskAreaDblClick=function(e,t){var n=this.viewModel.items[e];n&&this.onTaskDblClick(n.task.id,t)&&this.commandManager.showTaskEditDialog.execute(n.task)},e.prototype.onTaskAreaContextMenu=function(e,t,n){var r,i,o="dependency"===n,s=t,a=this.viewModel,l=o?a.convertInternalToPublicKey("dependency",M.EvtUtils.getEventSource(t).getAttribute("dependency-id")):null===(i=null===(r=a.items[e])||void 0===r?void 0:r.task)||void 0===i?void 0:i.id;if(this.onGanttViewContextMenu(t,l,n)){var c={event:t,type:n,key:l,position:new x.Point(M.EvtUtils.getEventX(s),M.EvtUtils.getEventY(s))};this.showPopupMenu(c)}},e.prototype.onTaskSelectionChanged=function(e,t){var n=this,r=this.viewModel.items[e];this.isFocus=A.DomUtils.isItParent(this.renderHelper.taskArea,M.EvtUtils.getEventSource(t)),r&&this.isFocus&&this.settings.allowSelectTask&&setTimeout((function(){n.changeGanttTaskSelection(r.task.id,!0)}),0)},e.prototype.onTaskClick=function(e,t){return!this.ganttOwner.onTaskClick||this.ganttOwner.onTaskClick(e,t)},e.prototype.onTaskDblClick=function(e,t){return!this.ganttOwner.onTaskDblClick||this.ganttOwner.onTaskDblClick(e,t)},e.prototype.getDateFormat=function(e){return this.ganttOwner.getFormattedDateText?this.ganttOwner.getFormattedDateText(e):this.getDefaultDateFormat(e)},e.prototype.getDefaultDateFormat=function(e){return("0"+e.getDate()).slice(-2)+"/"+("0"+(e.getMonth()+1)).slice(-2)+"/"+e.getFullYear()+" "+("0"+e.getHours()).slice(-2)+":"+("0"+e.getMinutes()).slice(-2)},e.prototype.destroyTemplate=function(e){this.ganttOwner.destroyTemplate?this.ganttOwner.destroyTemplate(e):e.innerHTML=""},e.prototype.onTaskAreaSizeChanged=function(e){this.ganttOwner.onTaskAreaSizeChanged&&this.ganttOwner.onTaskAreaSizeChanged(e)},e.prototype.showTaskEditDialog=function(){this.commandManager.showTaskEditDialog.execute()},e.prototype.showTaskDetailsDialog=function(e){var t=this.getTaskByPublicId(e);t&&this.commandManager.showTaskEditDialog.execute(t,!0)},e.prototype.showResourcesDialog=function(){this.commandManager.showResourcesDialog.execute()},e.prototype.getCommandByKey=function(e){return this.commandManager.getCommand(e)},e.prototype._getTaskDataForUpdate=function(e,t){var n={};return t&&e&&((0,g.isDefined)(e.title)&&e.title!==t.title&&(n.title=e.title),(0,g.isDefined)(e.progress)&&e.progress!==t.progress&&(n.progress=e.progress),(0,g.isDefined)(e.start)&&e.start!==t.start&&(n.start=e.start),(0,g.isDefined)(e.end)&&e.end!==t.end&&(n.end=e.end),(0,g.isDefined)(e.color)&&e.color!==t.color&&(n.color=e.color)),Object.keys(n).length>0?n:null},e.cachedPrefix="cached_",e.taskAreaScrollLeftKey=e.cachedPrefix+"taskAreaScrollLeft",e.taskAreaScrollTopKey=e.cachedPrefix+"taskAreaScrollTop",e.taskTextHeightKey=e.cachedPrefix+"taskTextHeight",e}();t.GanttView=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Resource=void 0;var r=n(0),i=n(1),o=function(e){function t(){var t=e.call(this)||this;return t.text="",t.color="",t}return r.__extends(t,e),t.prototype.assignFromObject=function(t){(0,i.isDefined)(t)&&(e.prototype.assignFromObject.call(this,t),this.text=t.text,(0,i.isDefined)(t.color)&&(this.color=t.color))},t}(n(21).DataObject);t.Resource=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(93),i=function(){function e(){}return e.round=function(t,n){void 0===n&&(n=0);var r=e.powFactor[n];return Math.round(t*r)/r},e.numberCloseTo=function(e,t,n){return void 0===n&&(n=1e-5),Math.abs(e-t)n?n:e=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof v?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(e){u(o[0][3],e)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function k(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return S(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceAssigningArguments=void 0;var r=n(0),i=function(e){function t(t,n){var r=e.call(this,null)||this;return r.values={resourceId:t,taskId:n},r}return r.__extends(t,e),Object.defineProperty(t.prototype,"resourceId",{get:function(){return this.values.resourceId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskId",{get:function(){return this.values.taskId},enumerable:!1,configurable:!0}),t}(n(10).BaseArguments);t.ResourceAssigningArguments=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AssignResourceHistoryItem=void 0;var r=n(0),i=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.resourceId=n,i.taskId=r,i}return r.__extends(t,e),t.prototype.redo=function(){this.assignment=this.modelManipulator.resource.assign(this.resourceId,this.taskId,this.assignment?this.assignment.internalId:null)},t.prototype.undo=function(){this.modelManipulator.resource.deassig(this.assignment.internalId)},t}(n(13).HistoryItem);t.AssignResourceHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DependencyCommandBase=void 0;var r=n(0),i=n(5),o=n(6),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getState=function(){return new o.SimpleCommandState(this.isEnabled())},t}(i.CommandBase);t.DependencyCommandBase=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateResourceHistoryItem=void 0;var r=n(0),i=function(e){function t(t,n,r,i){void 0===r&&(r="");var o=e.call(this,t)||this;return o.text=n,o.color=r,o.createCallback=i,o}return r.__extends(t,e),t.prototype.redo=function(){this.resource=this.modelManipulator.resource.create(this.text,this.color,this.resource?this.resource.internalId:null,this.createCallback)},t.prototype.undo=function(){this.modelManipulator.resource.remove(this.resource.internalId)},t}(n(13).HistoryItem);t.CreateResourceHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskInsertingArguments=void 0;var r=n(0),i=function(e){function t(t,n){var r=e.call(this,t)||this;return r.values=null!=n?n:{},r}return r.__extends(t,e),Object.defineProperty(t.prototype,"start",{get:function(){return this.values.start},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.values.end},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.values.title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{get:function(){return this.values.progress},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentId",{get:function(){return this.values.parentId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.values.color},enumerable:!1,configurable:!0}),t}(n(10).BaseArguments);t.TaskInsertingArguments=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskColorHistoryItem=void 0;var r=n(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getPropertiesManipulator=function(){return this.modelManipulator.task.properties.color},t}(n(16).TaskPropertiesHistoryItemBase);t.TaskColorHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskMoveHistoryItem=void 0;var r=n(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getPropertiesManipulator=function(){return this.modelManipulator.task.properties.move},t}(n(16).TaskPropertiesHistoryItemBase);t.TaskMoveHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Time=void 0;var r=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),this._hour=0,this._min=0,this._sec=0,this._msec=0,this._fullmsec=0,this.hour=e,this.min=t,this.sec=n,this.msec=r}return Object.defineProperty(e.prototype,"hour",{get:function(){return this._hour},set:function(e){e>=0&&e<24&&(this._hour=e,this.updateFullMilleconds())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){e>=0&&e<60&&(this._min=e,this.updateFullMilleconds())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sec",{get:function(){return this._sec},set:function(e){e>=0&&e<60&&(this._sec=e,this.updateFullMilleconds())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"msec",{get:function(){return this._msec},set:function(e){e>=0&&e<1e3&&(this._msec=e,this.updateFullMilleconds())},enumerable:!1,configurable:!0}),e.prototype.updateFullMilleconds=function(){var e=60*(60*this._hour+this._min)+this._sec;this._fullmsec=1e3*e+this._msec},e.prototype.getTimeInMilleconds=function(){return this._fullmsec},e}();t.Time=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeRange=void 0;var r=n(7),i=function(){function e(e,t){r.DateTimeUtils.caclTimeDifference(e,t)>=0?(this._start=e,this._end=t):(this._start=t,this._end=e)}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},set:function(e){e&&r.DateTimeUtils.caclTimeDifference(e,this._end)>=0&&(this._start=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},set:function(e){e&&r.DateTimeUtils.caclTimeDifference(this._start,e)>=0&&(this._end=e)},enumerable:!1,configurable:!0}),e.prototype.isTimeInRange=function(e){return r.DateTimeUtils.caclTimeDifference(this._start,e)>=0&&r.DateTimeUtils.caclTimeDifference(e,this._end)>=0},e.prototype.hasIntersect=function(e){return this.isTimeInRange(e.start)||this.isTimeInRange(e.end)||e.isTimeInRange(this.start)||e.isTimeInRange(this.end)},e.prototype.concatWith=function(e){return!!this.hasIntersect(e)&&(this.start=r.DateTimeUtils.getMinTime(this.start,e.start),this.end=r.DateTimeUtils.getMaxTime(this.end,e.end),!0)},e}();t.TimeRange=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DayOfWeekMonthlyOccurrence=void 0,function(e){e[e.First=0]="First",e[e.Second=1]="Second",e[e.Third=2]="Third",e[e.Forth=3]="Forth",e[e.Last=4]="Last"}(t.DayOfWeekMonthlyOccurrence||(t.DayOfWeekMonthlyOccurrence={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GridElementInfo=void 0;var r=n(4),i=n(11),o=n(145),s=function(){function e(t,n,s){this.id=e.id++,this.position=new r.Point(void 0,void 0),this.size=new i.Size(0,0),this.margins=new o.Margins(void 0,void 0,void 0,void 0),this.attr={},this.style={},this.additionalInfo={},t&&(this.className=t),n&&this.setPosition(n),s&&this.setSize(s)}return e.prototype.setSize=function(e){this.size.width=e.width,this.size.height=e.height},e.prototype.setPosition=function(e){this.position.x=e.x,this.position.y=e.y},e.prototype.assignToElement=function(e){this.assignPosition(e),this.assignSize(e),this.assignMargins(e),this.className&&(e.className=this.className)},e.prototype.assignPosition=function(e){null!=this.position.x&&(e.style.left=this.position.x+"px"),null!=this.position.y&&(e.style.top=this.position.y+"px")},e.prototype.assignSize=function(e){this.size.width&&(e.style.width=this.size.width+"px"),this.size.height&&(e.style.height=this.size.height+"px")},e.prototype.assignMargins=function(e){this.margins.left&&(e.style.marginLeft=this.margins.left+"px"),this.margins.top&&(e.style.marginTop=this.margins.top+"px"),this.margins.right&&(e.style.marginRight=this.margins.right+"px"),this.margins.bottom&&(e.style.marginBottom=this.margins.bottom+"px")},e.prototype.setAttribute=function(e,t){this.attr[e]=t},e.id=0,e}();t.GridElementInfo=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StripLine=void 0;var r=n(1),i=function(){function e(e,t,n,r,i){this.isCurrent=!1,this.start=e,this.end=t,this.title=n,this.cssClass=r,this.isCurrent=i}return e.parse=function(t){var n=new e;return t&&((0,r.isDefined)(t.start)&&(n.start=t.start),(0,r.isDefined)(t.end)&&(n.end=t.end),(0,r.isDefined)(t.title)&&(n.title=t.title),(0,r.isDefined)(t.cssClass)&&(n.cssClass=t.cssClass)),n},e.prototype.clone=function(){return new e(this.start,this.end,this.title,this.cssClass,this.isCurrent)},e.prototype.equal=function(e){var t=!0;return t=(t=(t=(t=t&&this.start==e.start)&&this.end==e.end)&&this.title==e.title)&&this.cssClass==e.cssClass},e}();t.StripLine=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfDependencyLineInfo=void 0;var r=n(4),i=n(18),o=function(){function e(){}return e.prototype.assign=function(e){var t;this._copyPoints(e.points),this.arrowInfo=e.arrowInfo,null!==(t=this.fillColor)&&void 0!==t||(this.fillColor=new i.Color),this.fillColor.assign(e.fillColor)},e.prototype._copyPoints=function(e){var t=this;this.points=new Array,null==e||e.forEach((function(e){return t.points.push(new r.Point(e.x,e.y))}))},e}();t.PdfDependencyLineInfo=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfTaskResourcesInfo=void 0;var r=n(1),i=n(29),o=function(){function e(e,t,n,o){e&&(this.text=e),t&&(this.style=new i.StyleDef(t)),(0,r.isDefined)(n)&&(this.x=n),(0,r.isDefined)(o)&&(this.y=o)}return e.prototype.assign=function(e){this.text=e.text,this.style=new i.StyleDef(e.style),this.x=e.x,this.y=e.y},e}();t.PdfTaskResourcesInfo=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Width=void 0;var r=n(49),i=n(2),o=function(){function e(e){this.assign(e)}return e.prototype.assign=function(t){if(t instanceof e)this._widthInternal=t._widthInternal;else{var n="number"==typeof t?t:parseInt(t);isNaN(n)?this.assignFromString(t):this._widthInternal=n}},e.prototype.assignFromString=function(e){if(e){var t=i.DomUtils.pxToInt(e);this._widthInternal=t||r.PredefinedStyles.getPredefinedStringOrUndefined(e,r.PredefinedStyles.width)}},e.prototype.hasValue=function(){return!!this._widthInternal},e.prototype.getValue=function(){return this._widthInternal},e}();t.Width=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfTimeMarkerInfo=void 0;var r=n(4),i=n(11),o=n(1),s=n(18),a=function(){function e(e,t,n,a,l){this.lineColor=new s.Color,this.color=new s.Color,e&&(this.start=new r.Point(e.x,e.y)),t&&(this.size=new i.Size(t.width,t.height)),n&&this.color.assign(n),a&&this.lineColor.assign(a),(0,o.isDefined)(l)&&(this.isStripLine=l)}return e.prototype.assign=function(e){var t,n,o,s;e&&(this.start=new r.Point(null===(t=e.start)||void 0===t?void 0:t.x,null===(n=e.start)||void 0===n?void 0:n.y),this.size=new i.Size(null===(o=e.size)||void 0===o?void 0:o.width,null===(s=e.size)||void 0===s?void 0:s.height),this.isStripLine=e.isStripLine,this.color.assign(e.color),this.lineColor.assign(e.lineColor))},e}();t.PdfTimeMarkerInfo=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryItemState=void 0;var r=function(e,t){this.id=e,this.value=t};t.HistoryItemState=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EllipsisHelper=void 0;var r=function(){function e(){}return e.limitPdfTextWithEllipsis=function(t,n,r){if(!(null==n?void 0:n.getTextWidth)||!r)return t;if(n.getTextWidth(t.toString())>r){for(var i=t,o=t.length-1;n.getTextWidth(i)>r&&o>0;)i=i.substring(0,o)+e.ellipsis,o--;return i}return t},e.ellipsis="...",e}();t.EllipsisHelper=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TooltipSettings=void 0;var r=n(1),i=function(){function e(){}return e.parse=function(t){var n=new e;return t&&((0,r.isDefined)(t.getHeaderHeight)&&(n.getHeaderHeight=t.getHeaderHeight),(0,r.isDefined)(t.getTaskTooltipContentTemplate)&&(n.getTaskTooltipContentTemplate=t.getTaskTooltipContentTemplate),(0,r.isDefined)(t.getTaskProgressTooltipContentTemplate)&&(n.getTaskProgressTooltipContentTemplate=t.getTaskProgressTooltipContentTemplate),(0,r.isDefined)(t.getTaskTimeTooltipContentTemplate)&&(n.getTaskTimeTooltipContentTemplate=t.getTaskTimeTooltipContentTemplate),(0,r.isDefined)(t.destroyTemplate)&&(n.destroyTemplate=t.destroyTemplate),(0,r.isDefined)(t.formatDate)&&(n.formatDate=t.formatDate)),n},e}();t.TooltipSettings=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,o=n(9),s=n(193),a=n(43),l=function(){function e(){}return e.getKeyModifiers=function(e){var t=0;return e.altKey&&(t|=r.Alt),e.ctrlKey&&(t|=r.Ctrl),e.shiftKey&&(t|=r.Shift),e.metaKey&&(t|=r.Meta),t},e.getShortcutCode=function(e,t,n,i,o){var s=e;return s|=t?r.Ctrl:0,s|=n?r.Shift:0,s|=i?r.Alt:0,s|=o?r.Meta:0},e.getShortcutCodeByEvent=function(t){return e.getShortcutCode(e.getEventKeyCode(t),t.ctrlKey,t.shiftKey,t.altKey,!!o.Browser.MacOSPlatform&&t.metaKey)},e.getEventKeyCode=function(e){return o.Browser.NetscapeFamily||o.Browser.Opera?e.which:e.keyCode},e.parseShortcutString=function(t){if(!t)return 0;var n=!1,r=!1,o=!1,l=!1,c=null,u=t.toString().split("+");if(u.length>0)for(var d=0;d=0&&e.splice(n,1)},e.removeBy=function(e,t){for(var n=e.length,r=0;r0;e--)n.push(t);return n},e.initByCallback=function(e,t){for(var n=[],r=0;r=n;r--)t(r)},e.reducedMap=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=e.length);for(var i=[],o=n;o=r;i--)if(t(e[i],i))return i;return-1},e.elementBy=function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=t.length);var o=e.indexBy(t,n,r,i);return o<0?null:t[o]},e.reverseElementBy=function(t,n,r,i){void 0===r&&(r=t.length-1),void 0===i&&(i=0);var o=e.reverseIndexBy(t,n,r,i);return o<0?null:t[o]},e.last=function(e){return e[e.length-1]},e.setLast=function(e,t){return e[e.length-1]=t},e.incLast=function(e){return++e[e.length-1]},e.decLast=function(e){return--e[e.length-1]},e.equals=function(t,n){return t.length===n.length&&e.allOf2(t,n,(function(e,t){return e.equals(t)}))},e.equalsByReference=function(e,t){var n=e.length;if(n!==e.length)return!1;for(var r=0;r=0;n--)t===e[n]?e.splice(n,1):t=e[n];return e},e.forEach=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=e.length);for(var i=n;i=r;i--)t(e[i],i)},e.reverseIndexOf=function(e,t,n,r){void 0===n&&(n=e.length-1),void 0===r&&(r=0);for(var i=n;i>=r;i--)if(e[i]===t)return i;return-1},e.accumulate=function(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=e.length);for(var o=t,s=r;s=r;i--)if(t(e[i],i))return!0;return!1},e.unsafeReverseAnyOf=function(e,t,n,r){void 0===n&&(n=e.length-1),void 0===r&&(r=0);for(var i=n;i>=r;i--){var o=t(e[i],i);if(o)return o}return null},e.anyOf2=function(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=e.length);for(var o=r;os&&(s=c,o=l)}return new r.ExtendedMax(o,s)},e.minMaxExtended=function(e,t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=e.length),0===e.length)return null;for(var o=e[n],s=o,a=t(o),l=a,c=n+1;cl&&(l=d,s=u)}return new r.ExtendedMinMax(o,a,s,l)},e.minByCmp=function(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=e.length),0===e.length)return null;for(var i=e[n],o=n+1;o0&&(i=s)}return i},e.minMaxByCmp=function(e,t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=e.length),0===e.length)return null;for(var o=e[n],s=o,a=n+1;a0?s=l:c<0&&(o=l)}return new r.MinMax(o,s)},e}();t.ListUtils=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(57),i=function(e,t){this.minElement=e,this.maxElement=t};t.MinMax=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this.maxElement-this.minElement},enumerable:!0,configurable:!0}),t}(i);t.MinMaxNumber=o;var s=function(e,t){this.minElement=e,this.minValue=t};t.ExtendedMin=s;var a=function(e,t){this.maxElement=e,this.maxValue=t};t.ExtendedMax=a;var l=function(e){function t(t,n,r,i){var o=e.call(this,t,r)||this;return o.minValue=n,o.maxValue=i,o}return r.__extends(t,e),t}(i);t.ExtendedMinMax=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.number=function(e,t){return e-t},e.string=function(e,t){return e===t?0:e>t?1:-1},e.stringIgnoreCase=function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1},e}();t.Comparers=r;var i=function(){function e(){}return e.simpleType=function(e,t){return e===t},e.object=function(e,t){return e&&t&&(e===t||e.equals(t))},e}();t.Equals=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourcesDialogParameters=void 0;var r=n(0),i=n(23),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.clone=function(){var e=new t;return e.resources=new i.ResourceCollection,e.resources.addRange(this.resources.items),e},t}(n(35).DialogParametersBase);t.ResourcesDialogParameters=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEditDialogCommand=void 0;var r=n(0),i=n(23),o=n(58),s=n(59),a=n(36),l=n(37),c=n(38),u=n(39),d=n(45),p=n(22),h=n(98),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.onBeforeDialogShow=function(e){return this.modelManipulator.dispatcher.raiseTaskTaskEditDialogShowing(e,(function(t){var n=t.values;e.start=n.start,e.end=n.end,e.progress=n.progress,e.title=n.title,e.readOnlyFields=t.readOnlyFields,e.hiddenFields=t.hiddenFields}))},t.prototype.applyParameters=function(e,t){this.history.beginTransaction();var n=this.control.modelManipulator.dispatcher.raiseTaskMultipleUpdating(this.control.viewModel.tasks.getItemById(t.id),e,(function(t){e.title=t.title?t.title:"",e.progress=t.progress,e.start="string"==typeof t.start?new Date(t.start):t.start||new Date(0),e.end="string"==typeof t.end?new Date(t.end):t.end||new Date(0)}));n&&(e.title!==t.title&&this.history.addAndRedo(new d.TaskTitleHistoryItem(this.modelManipulator,t.id,e.title)),e.progress!==t.progress&&this.history.addAndRedo(new c.TaskProgressHistoryItem(this.modelManipulator,t.id,e.progress)),e.end.getTime()0,this.tasks.length){var r=this.tasks.shift();this.pendingCallbacks++,this.modelManipulator.task.create(r,r.internalId,(function(){t.modelManipulator.task.properties.progress.setValue(r.internalId,r.progress),r.color&&t.modelManipulator.task.properties.color.setValue(r.internalId,r.color),t.tasks.length?t.undo():e.prototype.undo.call(t),t.pendingCallbacks--,n.lockChangesProcessing=t.pendingCallbacks>0}))}},t.prototype.undoItemsQuery=function(){for(;this.tasks.length;){var t=this.tasks.shift();this.modelManipulator.task.create(t,t.internalId,(function(){})),this.modelManipulator.task.properties.progress.setValue(t.internalId,t.progress),t.color&&this.modelManipulator.task.properties.color.setValue(t.internalId,t.color)}this.modelManipulator.task.viewModel.lockChangesProcessing=!1,this.pendingCallbacks=0,e.prototype.undo.call(this)},t.prototype.addTask=function(e){this.taskIds.push(e)},t.prototype.add=function(t){if(t instanceof o.RemoveDependencyHistoryItem){var n=t;this.historyItems.filter((function(e){return e instanceof o.RemoveDependencyHistoryItem&&e.dependencyId==n.dependencyId})).length||this.historyItems.push(n)}else e.prototype.add.call(this,t)},t}(i.CompositionHistoryItem);t.RemoveTaskHistoryItem=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAddContextItemCommand=void 0;var r=n(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getState=function(){var t=e.prototype.getState.call(this);return t.visible=t.visible&&this.control.settings.editing.allowTaskInsert,t},t.prototype.execute=function(){return!1},t}(n(26).TaskCommandBase);t.TaskAddContextItemCommand=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskColorCommand=void 0;var r=n(0),i=n(63),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.execute=function(t,n){return e.prototype.execute.call(this,t,n)},t.prototype.executeInternal=function(e,t){var n=this;return this.modelManipulator.dispatcher.raiseTaskColorUpdating(this.getTask(e),t,(function(t){n.history.addAndRedo(new i.TaskColorHistoryItem(n.modelManipulator,e,t))}))},t}(n(27).TaskPropertyCommandBase);t.TaskColorCommand=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskDescriptionCommand=void 0;var r=n(0),i=n(131),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.execute=function(t,n){return e.prototype.execute.call(this,t,n)},t.prototype.executeInternal=function(e,t){var n=this;return this.modelManipulator.dispatcher.raiseTaskDescriptionUpdating(this.getTask(e),t,(function(t){n.history.addAndRedo(new i.TaskDescriptionHistoryItem(n.modelManipulator,e,t))}))},t}(n(27).TaskPropertyCommandBase);t.TaskDescriptionCommand=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskDescriptionHistoryItem=void 0;var r=n(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getPropertiesManipulator=function(){return this.modelManipulator.task.properties.description},t}(n(16).TaskPropertiesHistoryItemBase);t.TaskDescriptionHistoryItem=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEndCommand=void 0;var r=n(0),i=n(37),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.execute=function(t,n){return this.modelManipulator.dispatcher.raiseTaskEndUpdating(this.getTask(t),n,(function(e){n=e}))&&e.prototype.execute.call(this,t,n)},t.prototype.executeInternal=function(t,n){return e.prototype.executeInternal.call(this,t,n)},t.prototype.executeCore=function(e,t){var n=this.control.viewModel.tasks.getItemById(e).end;if(n.getTime()===t.getTime())return!1;this.control.history.beginTransaction(),this.history.addAndRedo(new i.TaskEndHistoryItem(this.modelManipulator,e,t)),this.control.isValidateDependenciesRequired()&&this.control.validationController.moveEndDependTasks(e,n),this.validationController.updateParentsIfRequired(e),this.control.history.endTransaction();var r=this.control.viewModel.tasks.items.reduce((function(e,t){return t.isValid()?e.end.getTime()>t.end.getTime()?e:t:e}));return r.end>this.control.dataRange.end&&(this.control.dataRange.end=r.end,this.control.resetAndUpdate()),!0},t.prototype.validate=function(e,t){return this.control.validationController.checkEndDependencies(e,t)},t}(n(48).TaskPropertyCommandValidation);t.TaskEndCommand=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConstraintViolationDialogParameters=void 0;var r=n(0),i=function(e){function t(t,n){var r=e.call(this)||this;return r.validationError=t,r.callback=n,r}return r.__extends(t,e),t.prototype.clone=function(){var e=new t(this.validationError,this.callback);return e.option=this.option,e},t}(n(35).DialogParametersBase);t.ConstraintViolationDialogParameters=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskMoveCommand=void 0;var r=n(0),i=n(64),o=n(15),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.execute=function(t,n,r){return this.modelManipulator.dispatcher.raiseTaskStartAndEndUpdating(this.getTask(t),n,r,(function(e,t){n=e,r=t}))&&e.prototype.execute.call(this,t,n,r)},t.prototype.executeInternal=function(t,n,r){return e.prototype.executeInternal.call(this,t,n,r)},t.prototype.executeCore=function(e,t,n){var r=this.control.viewModel.tasks.getItemById(e),s=new o.DateRange(new Date(r.start.getTime()),new Date(r.end.getTime()));this.control.history.beginTransaction(),this.history.addAndRedo(new i.TaskMoveHistoryItem(this.modelManipulator,e,new o.DateRange(t,n))),this.validationController.correctParentsOnChildMoving(e,t.getTime()-s.start.getTime()),this.validationController.updateParentsIfRequired(e),this.control.isValidateDependenciesRequired()&&(this.control.validationController.moveStartDependTasks(e,s.start),this.control.validationController.moveEndDependTasks(e,s.end)),this.control.history.endTransaction();var a=this.control.viewModel.tasks.items.reduce((function(e,t){return t.isValid()?e.end.getTime()>t.end.getTime()?e:t:e}));a.end>this.control.dataRange.end&&(this.control.dataRange.end=a.end,this.control.resetAndUpdate());var l=this.control.viewModel.tasks.items.reduce((function(e,t){return t.isValid()?e.isValid()&&e.start.getTime()=11&&"src"===t.toLowerCase()&&e.setAttribute(t,""),e.setAttribute(t,n))},e.setStyleAttribute=function(e,t,n){e.setProperty&&e.setProperty(t,n,"")},e.getElementAttribute=function(e,t){return e.getAttribute(t)},e.getStyleAttribute=function(e,t){if(e.getPropertyValue){if(r.Browser.Firefox)try{return e.getPropertyValue(t)}catch(n){return e[t]}return e.getPropertyValue(t)}return null},e.removeElementAttribute=function(e,t){e.removeAttribute&&e.removeAttribute(t)},e.removeStyleAttribute=function(e,t){e.removeProperty&&e.removeProperty(t)},e.changeElementStyleAttribute=function(t,n,r){e.saveStyleAttributeInElement(t,n),e.setStyleAttribute(t.style,n,r)},e.restoreElementStyleAttribute=function(t,n){var r="saved"+n,i=t.style;if(e.isExistsAttributeInElement(t,r)){var o=e.getElementAttribute(t,r);return o===e.emptyObject||null===o?e.removeStyleAttribute(i,n):e.setStyleAttribute(i,n,o),e.removeElementAttribute(t,r),!0}return!1},e.saveStyleAttributeInElement=function(t,n){var r="saved"+n,i=t.style;if(!e.isExistsAttributeInElement(t,r)){var o=e.getStyleAttribute(i,n);e.setElementAttribute(t,r,e.isAttributeExists(o)?o:e.emptyObject)}},e.isExistsAttributeInElement=function(t,n){var r=e.getElementAttribute(t,n);return e.isAttributeExists(r)},e.isAttributeExists=function(e){return null!==e&&""!==e},e.emptyObject="DxEmptyValue",e}();t.AttrUtils=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GanttExportCalculator=void 0;var r=n(4),i=n(2),o=n(3),s=n(28),a=n(70),l=n(71),c=n(50),u=n(18),d=n(29),p=n(41),h=n(51),f=n(148),g=n(52),y=n(30),m=n(11),v=n(149),T=n(151),k=n(73),b=function(){function e(t,n){var r,i;this._owner=t,this._props=new g.GanttPdfExportProps(n),null!==(r=(i=this._props).margins)&&void 0!==r||(i.margins=new p.Margin(e._defaultPageMargin))}return Object.defineProperty(e.prototype,"chartTableScaleTopMatrix",{get:function(){var e;return null!==(e=this._chartTableScaleTopMatrix)&&void 0!==e||(this._chartTableScaleTopMatrix=this.calculateChartScaleMatrix(0)),this._chartTableScaleTopMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"chartTableScaleBottomMatrix",{get:function(){var e;return null!==(e=this._chartTableScaleBottomMatrix)&&void 0!==e||(this._chartTableScaleBottomMatrix=this.calculateChartScaleMatrix(1)),this._chartTableScaleBottomMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"chartTableBodyMatrix",{get:function(){return this._chartTableBodyMatrix||this.calculateChartTableBodyMatrix(),this._chartTableBodyMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"treeListHeaderMatrix",{get:function(){return this._treeListHeaderMatrix||this.calculateTreeListTableHeaderMatrix(),this._treeListHeaderMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"treeListBodyMatrix",{get:function(){return this._treeListBodyMatrix||this.calculateTreeListTableBodyMatrix(),this._treeListBodyMatrix},enumerable:!1,configurable:!0}),e.prototype.getPages=function(e){return new v.PdfGanttPaginator(e,this.settings,this.createGlobalInfo()).getPages()},Object.defineProperty(e.prototype,"settings",{get:function(){return this.settingsForPaging},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layoutCalculator",{get:function(){return this._taskAreaHelper.layoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskAreaHelper",{get:function(){var e;return null!==(e=this._taskAreaHelper)&&void 0!==e||(this._taskAreaHelper=new f.TaskAreaExportHelper(this._owner,this._props)),this._taskAreaHelper},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scalingHelper",{get:function(){var e,t;return null!==(e=this._scalingHelper)&&void 0!==e||(this._scalingHelper=new T.ScalingHelper(null===(t=this._props)||void 0===t?void 0:t.pdfDoc)),this._scalingHelper},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visibleTaskIndices",{get:function(){return this.taskAreaHelper.visibleTaskIndices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseCellWidth",{get:function(){return this.taskAreaHelper.baseCellSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseCellHeight",{get:function(){return this.taskAreaHelper.baseCellSize.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"chartScaleTableStyle",{get:function(){var e;return null!==(e=this._chartScaleTableStyle)&&void 0!==e||(this._chartScaleTableStyle=this.getChartScaleTableStyle()),this._chartScaleTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"chartMainTableStyle",{get:function(){var e;return null!==(e=this._chartMainTableStyle)&&void 0!==e||(this._chartMainTableStyle=this.getChartMainTableStyle()),this._chartMainTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"treeListTableStyle",{get:function(){return this._treeListTableStyle||this.calculateTreeListTableStyle(),this._treeListTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageTopMargin",{get:function(){return this._props.margins.top},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageLeftMargin",{get:function(){return this._props.margins.left},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageRightMargin",{get:function(){return this._props.margins.right},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageBottomMargin",{get:function(){return this._props.margins.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headerTableTop",{get:function(){var e;return null!==(e=this._headerTableTop)&&void 0!==e||(this._headerTableTop=this.pageTopMargin),this._headerTableTop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainTableTop",{get:function(){var e;return null!==(e=this._mainTableTop)&&void 0!==e||(this._mainTableTop=this.getMainTableTop()),this._mainTableTop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exportDataMode",{get:function(){return this._props.exportDataMode},enumerable:!1,configurable:!0}),e.prototype.getMainTableTop=function(){return this.headerTableTop+this.headerTableHeight-this.taskAreaHelper.offsetTop},Object.defineProperty(e.prototype,"chartLeft",{get:function(){var e;return null!==(e=this._chartLeft)&&void 0!==e||(this._chartLeft=this.getChartLeft()),this._chartLeft},enumerable:!1,configurable:!0}),e.prototype.getChartLeft=function(){var e;return(((null===(e=this._props)||void 0===e?void 0:e.exportMode)||g.ExportMode.all)===g.ExportMode.chart?this.pageLeftMargin:this.treeListLeft+this.treeListWidth)-this.taskAreaHelper.offsetLeft},Object.defineProperty(e.prototype,"treeListLeft",{get:function(){var e;return null!==(e=this._treeListLeft)&&void 0!==e||(this._treeListLeft=this.pageLeftMargin),this._treeListLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headerTableHeight",{get:function(){return 2*this.taskAreaHelper.headerRowHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainTableHeight",{get:function(){var e;return null!==(e=this._mainTableHeight)&&void 0!==e||(this._mainTableHeight=this.visibleTaskIndices.length*this.baseCellHeight),this._mainTableHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"treeListWidth",{get:function(){var e;return null!==(e=this._treeListWidth)&&void 0!==e||(this._treeListWidth=this.getTreeListTableWidth()),this._treeListWidth},enumerable:!1,configurable:!0}),e.prototype.getTreeListTableWidth=function(){var e,t=this,n=this.treeListHeaderMatrix[0].map((function(e,n){return t.getTreeListColumnWidth(n)}));return null!==(e=null==n?void 0:n.reduce((function(e,t){return e+t}),0))&&void 0!==e?e:0},Object.defineProperty(e.prototype,"chartWidth",{get:function(){var e=this;if(!this._chartWidth){var t=this.chartTableScaleBottomMatrix[0];this._chartWidth=t.reduce((function(t,n){return t+(n.styles.cellWidth.hasValue()?n.styles.cellWidth.getValue():e.baseCellWidth)}),0)}return this._chartWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"settingsForPaging",{get:function(){return this._settingsForPaging||(this._settingsForPaging=new g.GanttPdfExportProps(this._props),this.prepareAutoFormat(this._settingsForPaging),this.scalingHelper.scalePageMargins(this._settingsForPaging)),this._settingsForPaging},enumerable:!1,configurable:!0}),e.prototype.prepareAutoFormat=function(e){if(e.format===g.GanttPdfExportProps.autoFormatKey){e.format=null;var t=e.landscape,n=this.autoFormatWidth,r=this.autoFormatHeight;(t&&r>n||!t&&r0,t.isMilestone||(t.isSmallTask=n.className.indexOf(s.GridLayoutCalculator.smallTaskClassName)>0,t.isParent=n.className.indexOf(s.GridLayoutCalculator.parentTaskClassName)>0,this.appendTaskTitle(t,e),this.appendTaskProgress(t,e)),t},e.prototype.appendTaskTitle=function(e,t){var n=this._owner.settings.taskTitlePosition;e.isSmallTask&&n!==o.TaskTitlePosition.Outside||n===o.TaskTitlePosition.None||(e.text=this._owner.getTaskText(t),e.textPosition=n,e.textStyle=this.getTaskTextStyle(t))},e.prototype.appendTaskProgress=function(e,t){var n=this.layoutCalculator.getTaskProgressElementInfo(t);e.progressWidth=n.size.width,e.progressColor=this.getTaskProgressColor(t),e.progressColor.applyOpacityToBackground(e.taskColor)},e.prototype.getTaskSidePoints=function(e){var t=this,n=this.layoutCalculator.getTaskSidePoints(e);return n.forEach((function(e){e.x+=t.getObjectsLeftOffset(!0),e.y+=t.dataObjectTopDelta})),n},e.prototype.getTaskColor=function(e){var t=this.taskAreaHelper.getTaskElementBackColor(e,s.GridLayoutCalculator.taskClassName);return new u.Color(t)},e.prototype.getTaskProgressColor=function(e){return new u.Color(this.taskAreaHelper.getTaskElementBackColor(e,s.GridLayoutCalculator.taskProgressClassName))},e.prototype.getTaskTextStyle=function(e){var t=new d.StyleDef;return t.cellPadding.assign(0),t.assign(this.taskAreaHelper.getTaskElementStyle(e,s.GridLayoutCalculator.taskTitleClassName)),t},e.prototype.calculateDependenciesInfo=function(){var e=this,t=new Array,n=this.taskAreaHelper,r=new u.Color(n.dependencyColor);return n.connectorLines.forEach((function(i){return t.push(e.createLineInfo(i,r,n.arrowWidth))})),t},e.prototype.createLineInfo=function(e,t,n){var r=new a.PdfDependencyLineInfo;if(r.fillColor=t,e.className.indexOf(s.GridLayoutCalculator.arrowClassName)>-1){var i=this.layoutCalculator.getArrowPositionByClassName(e.className);r.arrowInfo={position:i,width:n},r.points=[this.getArrowTopCorner(e,i,n)]}else r.points=this.getLinePoints(e);return r},e.prototype.getArrowTopCorner=function(e,t,n){var i=e.position.x+this.getObjectsLeftOffset(),s=e.position.y+this.dataObjectTopDelta;switch(t){case o.Position.Left:i+=n;break;case o.Position.Top:s+=n}return new r.Point(i,s)},e.prototype.getLinePoints=function(e){var t=e.position.x+this.getObjectsLeftOffset(),n=e.position.y+this.dataObjectTopDelta,i=t+e.size.width,o=n+e.size.height;return[new r.Point(t,n),new r.Point(i,o)]},e.prototype.calculateResourcesInfo=function(){var e=this,t=new Array;return this.taskAreaHelper.resourcesElements.forEach((function(n){return t=t.concat(e.calculateResourcesInLine(n))})),t},e.prototype.calculateResourcesInLine=function(e){var t=new Array;if(e)for(var n=i.DomUtils.pxToInt(e.style.left)+this.getObjectsLeftOffset(),r=i.DomUtils.pxToInt(e.style.top)+this.dataObjectTopDelta,o=e.getElementsByClassName(s.GridLayoutCalculator.taskResourceClassName),a=0;a=t.position.x&&e<=t.position.x+t.size.width}));else{var i=n.filter((function(t){return e>=t.position.x&&e<=t.position.x+t.size.width}))[0];i&&(r=n.indexOf(i))}return r},e.prototype.getScaleBorderPosition=function(e,t){var n=this.getScaleItems(t)[e];if(n)return n.position.x+n.size.width},e.prototype.getScaleItems=function(e){return e===this.viewType?this.bottomScaleItems:e===o.DateUtils.ViewTypeToScaleMap[this.viewType]?this.topScaleItems:null},e.prototype.getScaleItem=function(e,t){return this.getScaleItems(t)[e]},e.prototype.getScaleItemAdjustedStart=function(e,t){var n=this.getScaleItems(t)[e];if(e>0)return n.start;var r=t!==this.viewType,i=r?o.DateUtils.adjustStartDateByViewType(this.range.start,this.viewType,this.firstDayOfWeek):this.getAdjustedBottomScaleItemStart(n.start,t,this.firstDayOfWeek);if(r&&t===s.ViewType.Months){var a=this.range.start;i=new Date(a.getFullYear(),a.getMonth(),1)}if(r&&t===s.ViewType.FiveYears){var l=5*Math.trunc(i.getFullYear()/5);i=new Date(l,i.getMonth(),i.getDate())}return i},Object.defineProperty(e.prototype,"topScaleItems",{get:function(){var e;return null!==(e=this._topScaleItems)&&void 0!==e||(this._topScaleItems=this.calculateTopScale(o.DateUtils.ViewTypeToScaleMap[this.viewType])),this._topScaleItems},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomScaleItems",{get:function(){var e;return null!==(e=this._bottomScaleItems)&&void 0!==e||(this._bottomScaleItems=this.calculateBottomScale(this.viewType)),this._bottomScaleItems},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleWidth",{get:function(){var e;return null!==(e=this._scaleWidth)&&void 0!==e||(this._scaleWidth=this.calculateScaleWidth()),this._scaleWidth},enumerable:!1,configurable:!0}),e.prototype.getFirstScaleIndexForRender=function(e){var t=this.getScaleIndexByPos(e);return t=Math.max(t-10,0)},e.prototype.getLastScaleIndexForRender=function(e){var t=this.getScaleIndexByPos(e);return t=-1===t?this.bottomScaleItems.length-1:Math.min(t+10,this.bottomScaleItems.length-1)},e.prototype.getTopScaleIndexByBottomIndex=function(e){var t=this.bottomScaleItems[e];return t?this.getScaleIndexByPos(t.position.x,o.DateUtils.ViewTypeToScaleMap[this.viewType]):-1},e.prototype.calculateBottomScale=function(e){for(var t=new Array,n=this.tickSize.width,o=this.range.start,s=0;o.getTime()=this.range.end.getTime(),d=c||u?this.getRangeTickCount(o,l)*n:n;t.push(new a(o,l,new r.Point(s,void 0),new i.Size(d,0))),o=l,s+=d}return t},e.prototype.calculateTopScale=function(e){for(var t=new Array,n=this.range.end.getTime(),o=this.range.start,s=0,l=0;o.getTime()=h&&u<=f){var g=(u-h)/(f-h)*p.size.width+p.position.x;t.push(new a(o,c,new r.Point(s,void 0),new i.Size(g-s,0))),l=d,s=g,o=c;break}}return t},e.prototype.getDateInScale=function(e){for(var t=0;t=i&&e<=i+r){var o=n.start.getTime(),s=(e-i)/r*(n.end.getTime()-o);return new Date(n.start.getTime()+s)}}return new Date(this.range.end)},e.prototype.getNextScaleDate=function(e,t){var n;switch(t){case s.ViewType.TenMinutes:n=this.getNextDateInTenMinutesScale(e);break;case s.ViewType.Hours:n=this.getNextDateInHoursScale(e);break;case s.ViewType.SixHours:n=this.getNextDateInSixHoursScale(e);break;case s.ViewType.Days:n=this.getNextDateInDaysScale(e);break;case s.ViewType.Weeks:n=this.getNextDateInWeeksScale(e,this.firstDayOfWeek);break;case s.ViewType.Months:n=this.getNextDateInMonthsScale(e);break;case s.ViewType.Quarter:n=this.getNextDateInQuartersScale(e);break;case s.ViewType.Years:n=this.getNextDateInYearsScale(e);break;case s.ViewType.FiveYears:n=this.getNextDateInFiveYearsScale(e)}return n.getTime()>this.range.end.getTime()&&(n=this.range.end),n},e.prototype.getNextTimeBySpan=function(e,t){return(Math.trunc(e/t)+1)*t},e.prototype.getNextDateInTenMinutesScale=function(e){var t=this.getNextTimeBySpan(e.getMinutes(),10);return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),t)},e.prototype.getNextDateInHoursScale=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()+1)},e.prototype.getNextDateInSixHoursScale=function(e){var t=this.getNextTimeBySpan(e.getHours(),6);return new Date(e.getFullYear(),e.getMonth(),e.getDate(),t)},e.prototype.getNextDateInDaysScale=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+1)},e.prototype.getNextDateInWeeksScale=function(e,t){return void 0===t&&(t=0),new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+t+7)},e.prototype.getNextDateInMonthsScale=function(e){return new Date(e.getFullYear(),e.getMonth()+1,1)},e.prototype.getNextDateInQuartersScale=function(e){var t=this.getNextTimeBySpan(e.getMonth(),3);return new Date(e.getFullYear(),t,1)},e.prototype.getNextDateInYearsScale=function(e){return new Date(e.getFullYear()+1,0,1)},e.prototype.getNextDateInFiveYearsScale=function(e){var t=this.getNextTimeBySpan(e.getFullYear(),5);return new Date(t,0,1)},e.prototype.getAdjustedBottomScaleItemStart=function(e,t,n){switch(void 0===n&&(n=0),t){case s.ViewType.TenMinutes:return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),10*Math.floor(e.getMinutes()/10));case s.ViewType.SixHours:return new Date(e.getFullYear(),e.getMonth(),e.getDate(),6*Math.floor(e.getHours()/6));case s.ViewType.Hours:return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case s.ViewType.Days:return new Date(e.getFullYear(),e.getMonth(),e.getDate());case s.ViewType.Weeks:return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+n);case s.ViewType.Months:return new Date(e.getFullYear(),e.getMonth(),1);case s.ViewType.Quarter:return new Date(e.getFullYear(),3*Math.floor(e.getMonth()/3),1);case s.ViewType.Years:return new Date(e.getFullYear(),0,1);default:return new Date}},e.prototype.calculateScaleWidth=function(){return this.bottomScaleItems.reduce((function(e,t){return e+t.size.width}),0)},e.prototype.getScaleItemColSpan=function(e){return e.valueOf()===this.viewType.valueOf()?1:this.viewType===s.ViewType.TenMinutes?6:this.viewType===s.ViewType.Hours?24:this.viewType===s.ViewType.SixHours?4:this.viewType===s.ViewType.Days?7:this.viewType===s.ViewType.Weeks?4.29:this.viewType===s.ViewType.Months?12:this.viewType===s.ViewType.Quarter?4:this.viewType===s.ViewType.Years?5:1},e.prototype.getRangeTickCount=function(e,t){return o.DateUtils.getRangeTickCount(e,t,this.viewType)},e}();t.ScaleCalculator=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaExportHelper=void 0;var r=n(2),i=n(15),o=n(28),s=n(17),a=n(52),l=n(18),c=function(){function e(e,t){this._owner=e,this._props=t}return Object.defineProperty(e.prototype,"customRangeLeftOffset",{get:function(){var e;return null!==(e=this._customRangeLeftOffset)&&void 0!==e||(this._customRangeLeftOffset=this.layoutCalculator.getWidthByDateRange(this.startDate,this.ownerStartDate)),this._customRangeLeftOffset},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseCellSize",{get:function(){return this._owner.tickSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"objectsLeftDelta",{get:function(){return this.renderedScaleLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"objectsTopDelta",{get:function(){var e=this.visibleTaskIndices[0];return this.getCellTop(e)+this.getTaskCellOffsetTop(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetLeft",{get:function(){var e;return null!==(e=this._offsetLeft)&&void 0!==e||(this._offsetLeft=Math.max(this.visibleLeft-this.renderedScaleLeft,0)),this._offsetLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetTop",{get:function(){var e;return null!==(e=this._offsetTop)&&void 0!==e||(this._offsetTop=this.getOffsetTop()),this._offsetTop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){var e=this.settings.viewType;return[s.DateUtils.ViewTypeToScaleMap[e],e]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleRanges",{get:function(){var e;return null!==(e=this._scaleRanges)&&void 0!==e||(this._scaleRanges=this.layoutCalculator.getScaleRangesInArea(this.scaleLeft,this.scaleRight)),this._scaleRanges},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleBottomStartIndex",{get:function(){return this.scaleRanges[1][0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleBottomEndIndex",{get:function(){return this.scaleRanges[1][1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleTopStartIndex",{get:function(){return this.scaleRanges[0][0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleTopEndIndex",{get:function(){return this.scaleRanges[0][1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleTopWidths",{get:function(){var e;return null!==(e=this._scaleTopWidths)&&void 0!==e||(this._scaleTopWidths=this.getScaleTopWidths()),this._scaleTopWidths},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleBottomWidths",{get:function(){var e;return null!==(e=this._scaleBottomWidths)&&void 0!==e||(this._scaleBottomWidths=this.getScaleBottomWidths()),this._scaleBottomWidths},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headerRowHeight",{get:function(){if(!this._headerRowHeight){var e=this.scaleElements[0].filter((function(e){return!!e}))[0];this._headerRowHeight=null==e?void 0:e.offsetHeight}return this._headerRowHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visibleTaskIndices",{get:function(){var e;return null!==(e=this._visibleTaskIndices)&&void 0!==e||(this._visibleTaskIndices=this.getTaskIndices()),this._visibleTaskIndices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleTableStyle",{get:function(){var e;return null!==(e=this._scaleTableStyle)&&void 0!==e||(this._scaleTableStyle=this.getScaleTableStyle()),this._scaleTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"chartMainTableStyle",{get:function(){var e;return null!==(e=this._chartMainTableStyle)&&void 0!==e||(this._chartMainTableStyle=this.getChartMainTableStyle()),this._chartMainTableStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentRowBackColor",{get:function(){var e;return null!==(e=this._parentRowBackColor)&&void 0!==e||(this._parentRowBackColor=this.getParentBackColor()),this._parentRowBackColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arrowWidth",{get:function(){var e;return null!==(e=this._arrowWidth)&&void 0!==e||(this._arrowWidth=this.getArrowWidth()),this._arrowWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dependencyColor",{get:function(){var e;return null!==(e=this._dependencyColor)&&void 0!==e||(this._dependencyColor=this.getDependencyColor()),this._dependencyColor},enumerable:!1,configurable:!0}),e.prototype.getTaskElementBackColor=function(e,t){var n=this.getTaskElementStyle(e,t);return null==n?void 0:n.backgroundColor},e.prototype.getTaskElementStyle=function(e,t){var n=this.getTaskWrapper(e);return this.getElementStyle(n.getElementsByClassName(t)[0])},Object.defineProperty(e.prototype,"visibleLeft",{get:function(){var e;return null!==(e=this._visibleLeft)&&void 0!==e||(this._visibleLeft=this.isVisibleMode?this.container.scrollLeft:0),this._visibleLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visibleTop",{get:function(){var e;return null!==(e=this._visibleTop)&&void 0!==e||(this._visibleTop=this.isVisibleMode?this.container.scrollTop:0),this._visibleTop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visibleRight",{get:function(){var e;return null!==(e=this._visibleRight)&&void 0!==e||(this._visibleRight=this.getVisibleRight()),this._visibleRight},enumerable:!1,configurable:!0}),e.prototype.getVisibleRight=function(){var e=this.container.getElement().offsetWidth;return this.visibleLeft+e},Object.defineProperty(e.prototype,"visibleBottom",{get:function(){var e;return null!==(e=this._visibleBottom)&&void 0!==e||(this._visibleBottom=this.getVisibleBottom()),this._visibleBottom},enumerable:!1,configurable:!0}),e.prototype.getVisibleBottom=function(){return this.isVisibleMode?this.visibleTop+this.container.getHeight():this.visibleTaskIndices.length*this.baseCellSize.height},Object.defineProperty(e.prototype,"scaleLeft",{get:function(){var e;return null!==(e=this._scaleLeft)&&void 0!==e||(this._scaleLeft=this.isVisibleMode?this.visibleLeft:this.getPosByDate(this.startDate)),this._scaleLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleRight",{get:function(){var e;return null!==(e=this._scaleRight)&&void 0!==e||(this._scaleRight=this.isVisibleMode?this.visibleRight:this.getPosByDate(this.endDate)-1),this._scaleRight},enumerable:!1,configurable:!0}),e.prototype.getScaleTopWidths=function(){var e=this.getScaleWidths(this.scaleTopStartIndex,this.scaleTopEndIndex,this.scales[0]),t=this.layoutCalculator,n=t.getScaleItemInfo(this.scaleBottomStartIndex,this.scales[1]),r=t.getScaleItemInfo(this.scaleTopStartIndex,this.scales[0]),i=Math.max(n.position.x-r.position.x,0);e[this.scaleTopStartIndex]-=i;var o=t.getScaleItemInfo(this.scaleTopEndIndex,this.scales[0]),s=t.getScaleItemInfo(this.scaleBottomEndIndex,this.scales[1]);return i=Math.max(o.position.x+o.size.width-s.position.x-s.size.width,0),e[this.scaleTopEndIndex]-=i,e},e.prototype.getScaleBottomWidths=function(){return this.getScaleWidths(this.scaleBottomStartIndex,this.scaleBottomEndIndex,this.scales[1])},e.prototype.getScaleWidths=function(e,t,n){for(var r=new Array,i=e;i<=t;i++)r[i]=this.layoutCalculator.getScaleItemInfo(i,n).size.width;return r},e.prototype.getOffsetTop=function(){return this.isVisibleMode?this.getTaskCellOffsetTop(this.visibleTaskIndices[0]):0},Object.defineProperty(e.prototype,"renderedScaleLeft",{get:function(){return this.getCellLeft(this.scaleBottomStartIndex)},enumerable:!1,configurable:!0}),e.prototype.getTaskCellOffsetTop=function(e){var t=this.getCellTop(e);return Math.max(this.visibleTop-t,0)},e.prototype.getCellTop=function(e){return this.layoutCalculator.getGridBorderPosition(e-1,!1).y},e.prototype.getCellLeft=function(e){return this.layoutCalculator.getScaleItemInfo(e,this.scales[1]).position.x},e.prototype.getTaskIndices=function(){var e,t;return this.dataMode===a.DataExportMode.all||this.exportRange?this._owner.getAllVisibleTaskIndices(null===(e=this.exportRange)||void 0===e?void 0:e.startIndex,null===(t=this.exportRange)||void 0===t?void 0:t.endIndex):this.getVisibleTaskIndices()},e.prototype.getVisibleTaskIndices=function(){var e=this,t=[];return this.taskElements.forEach((function(n,i){if(n){var o=r.DomUtils.pxToInt(n.style.top),s=o+n.offsetHeight,a=o>=e.visibleTop&&o<=e.visibleBottom,l=s>=e.visibleTop&&s<=e.visibleBottom;(a||l)&&t.push(i)}})),t},Object.defineProperty(e.prototype,"scaleElements",{get:function(){return this._owner.renderHelper.scaleElements.slice()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleBorders",{get:function(){return this._owner.renderHelper.scaleBorders.slice()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hlRowElements",{get:function(){return this._owner.renderHelper.hlRowElements.filter((function(e){return!!e}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectionElements",{get:function(){return this._owner.renderHelper.selectionElements.filter((function(e){return!!e}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskElements",{get:function(){return this._owner.renderHelper.taskElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"connectorLines",{get:function(){var e,t=this;return null!==(e=this._connectorLines)&&void 0!==e||(this._connectorLines=this._owner.renderHelper.allConnectorLines.filter((function(e){return t.isLineVisible(e)}))),this._connectorLines},enumerable:!1,configurable:!0}),e.prototype.isLineVisible=function(e){if(this.dataMode===a.DataExportMode.all)return!0;var t=e.attr["dependency-id"];return this.visibleDependencyKeys.indexOf(t)>-1},Object.defineProperty(e.prototype,"visibleDependencyKeys",{get:function(){var e;return null!==(e=this._visibleDependencyKeys)&&void 0!==e||(this._visibleDependencyKeys=this._owner.getVisibleDependencyKeysByTaskRange(this.visibleTaskIndices)),this._visibleDependencyKeys},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resourcesElements",{get:function(){var e,t=this;return null!==(e=this._resourcesElements)&&void 0!==e||(this._resourcesElements=this.visibleTaskIndices.map((function(e){return t._owner.renderHelper.resourcesElements[e]})).filter((function(e){return e&&e.parentElement}))),this._resourcesElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stripLinesElements",{get:function(){if(!this._stripLinesElements){var e=this._owner.renderHelper.stripLinesMap.filter((function(e){return!!e})).map((function(e){return e}));this._stripLinesElements=e.map((function(e){return e}))}return this._stripLinesElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noWorkingIntervalsElements",{get:function(){if(!this._noWorkingIntervalsElements){this._noWorkingIntervalsElements=[];var e=this._owner.renderHelper.noWorkingIntervalsToElementsMap;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this._noWorkingIntervalsElements.push(e[t])}return this._noWorkingIntervalsElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskArea",{get:function(){return this._owner.renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"settings",{get:function(){return this._owner.settings},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataMode",{get:function(){var e;return null===(e=this._props)||void 0===e?void 0:e.exportDataMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exportRange",{get:function(){var e;return null===(e=this._props)||void 0===e?void 0:e.dateRange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isVisibleMode",{get:function(){return this.dataMode===a.DataExportMode.visible&&!this.exportRange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownerStartDate",{get:function(){return this._owner.range.start},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownerEndDate",{get:function(){return this._owner.range.end},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startDate",{get:function(){var e,t,n,r;if((null===(e=this.exportRange)||void 0===e?void 0:e.startDate)&&(null===(t=this.exportRange)||void 0===t?void 0:t.endDate)){var i=Math.min(null===(n=this.exportRange)||void 0===n?void 0:n.startDate.getTime(),null===(r=this.exportRange)||void 0===r?void 0:r.endDate.getTime());return new Date(i)}return this.ownerStartDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endDate",{get:function(){var e,t,n,r;if((null===(e=this.exportRange)||void 0===e?void 0:e.startDate)&&(null===(t=this.exportRange)||void 0===t?void 0:t.endDate)){var i=Math.max(null===(n=this.exportRange)||void 0===n?void 0:n.startDate.getTime(),null===(r=this.exportRange)||void 0===r?void 0:r.endDate.getTime());return new Date(i)}return this.ownerEndDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCustomRangeOutOfRender",{get:function(){return this.startDate.getTime()!==this.ownerStartDate.getTime()||this.endDate.getTime()!==this.ownerEndDate.getTime()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layoutCalculator",{get:function(){if(!this._layoutCalculator){var e=this._owner.renderHelper.gridLayoutCalculator;this.hasCustomRangeOutOfRender?(this._layoutCalculator=new o.GridLayoutCalculator,this._layoutCalculator.setSettings(e.visibleTaskAreaSize,e.tickSize,e.elementSizeValues,new i.DateRange(this.startDate,this.endDate),e.viewModel,e.viewType,e.scrollBarHeight,this._owner.settings.firstDayOfWeek)):this._layoutCalculator=e}return this._layoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._owner.renderHelper.taskAreaContainer},enumerable:!1,configurable:!0}),e.prototype.getPosByDate=function(e){return this.layoutCalculator.getPosByDate(e)},e.prototype.getScaleTableStyle=function(){var e={},t=this.scaleElements[0].filter((function(e){return!!e}))[0],n=this.getElementStyle(t);return e.backgroundColor=this.findElementBackColor(t),e.borderColor=this.getChartTableBorderColor(),e.verticalAlign="middle",e.textAlign="center",e.fontSize=n.fontSize,e.fontFamily=n.fontFamily,e.fontWeight=n.fontWeight,e.fontStyle=n.fontStyle,e.color=n.color,e},e.prototype.getChartMainTableStyle=function(){var e={};return e.backgroundColor=this.findElementBackColor(this.taskArea),e.borderColor=this.getChartTableBorderColor(),e},e.prototype.findElementBackColor=function(e){if(!e)return null;for(var t=e,n=new l.Color("transparent");0===n.opacity&&t;){var r=this.getElementStyle(t);n.assign(r.backgroundColor),t=t.parentElement}return n},e.prototype.getChartTableBorderColor=function(){var e=this.getElementStyle(this.scaleBorders[0].filter((function(e){return!!e}))[0]);return null==e?void 0:e.borderColor},e.prototype.getParentBackColor=function(){var e=this.getElementStyle(this.hlRowElements[0]);return null==e?void 0:e.backgroundColor},e.prototype.getArrowWidth=function(){var e=this.getDependencyLineStyle(o.GridLayoutCalculator.arrowClassName),t=e.borderWidth||e.borderLeftWidth||e.borderRightWidth||e.borderTopWidth||e.borderBottomWidth;return e&&r.DomUtils.pxToInt(t)},e.prototype.getDependencyColor=function(){var e=this.getDependencyLineStyle(o.GridLayoutCalculator.CLASSNAMES.CONNECTOR_HORIZONTAL);return null==e?void 0:e.borderColor},e.prototype.getDependencyLineStyle=function(e){return this.getElementStyle(this.taskArea.getElementsByClassName(e)[0])},e.prototype.getElementStyle=function(e){return e&&getComputedStyle(e)},e.prototype.getTaskWrapper=function(e){return this.isTaskTemplateMode?this._owner.renderHelper.fakeTaskWrapper:(this.taskElements[e]||this._owner.renderHelper.createDefaultTaskElement(e),this.taskElements[e])},Object.defineProperty(e.prototype,"isTaskTemplateMode",{get:function(){return!!this._owner.settings.taskContentTemplate},enumerable:!1,configurable:!0}),e}();t.TaskAreaExportHelper=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfGanttPaginator=void 0;var r=n(4),i=n(11),o=n(70),s=n(50),a=n(71),l=n(73),c=n(30),u=n(51),d=n(150),p=function(e,t,n,r,i){this.pageVerIndex=t,this.pageHorIndex=e,this.cellRowIndexOnPage=n,this.cellColIndexOnPage=r,this.cell=i},h=function(){function e(e,t,n,r){this.pageIndex=e,this.globalCellIndex=t,this.pageOffset=n,this.cutSize=r}return Object.defineProperty(e.prototype,"isCutted",{get:function(){return this.cutSize>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cellIndexOnPage",{get:function(){return this.globalCellIndex-this.pageOffset},enumerable:!1,configurable:!0}),e}(),f=function(){function e(e,t,n){this._pdfDoc=e,this._props=t,this._globalInfo=n}return e.prototype.getPages=function(){return delete this._pages,this._paginateTables(),this._paginateObjects(),this.pageMatrixToArray},e.prototype._paginateTables=function(){this._paginateTable(c.PdfPageTableNames.treeListHeader),this._paginateTable(c.PdfPageTableNames.treeListMain),this._paginateTable(c.PdfPageTableNames.chartScaleBottom),this._paginateTable(c.PdfPageTableNames.chartScaleTop),this._paginateTable(c.PdfPageTableNames.chartMain)},e.prototype._paginateObjects=function(){this._paginateTasks(),this._paginateDependencies(),this._paginateResources(),this._paginateTimeMarkers()},Object.defineProperty(e.prototype,"pageMatrixToArray",{get:function(){var e,t=new Array;return null===(e=this._pages)||void 0===e||e.forEach((function(e){t=t.concat(e)})),t},enumerable:!1,configurable:!0}),e.prototype._paginateTasks=function(){var e,t,n=this;null===(t=null===(e=this._globalInfo.objects)||void 0===e?void 0:e.tasks)||void 0===t||t.forEach((function(e){return n._paginateTask(e)}))},e.prototype._paginateDependencies=function(){var e,t,n=this;null===(t=null===(e=this._globalInfo.objects)||void 0===e?void 0:e.dependencies)||void 0===t||t.forEach((function(e){e.arrowInfo?n._paginateArrow(e):n._paginateDependencyLine(e)}))},e.prototype._paginateResources=function(){var e,t,n=this;null===(t=null===(e=this._globalInfo.objects)||void 0===e?void 0:e.resources)||void 0===t||t.forEach((function(e){return n._paginateResource(e)}))},e.prototype._paginateTimeMarkers=function(){var e,t,n=this;null===(t=null===(e=this._globalInfo.objects)||void 0===e?void 0:e.timeMarkers)||void 0===t||t.forEach((function(e){return n._paginateTimeMarker(e)}))},e.prototype._paginateTable=function(e){var t,n=null===(t=this._globalInfo)||void 0===t?void 0:t.tables[e];if(n){for(var r=this._getTableStart(n),i=this._preparePagesNavigationMatrixForTable(r,n),o=i.length,s=0;sNumber.EPSILON},enumerable:!1,configurable:!0}),e.prototype.getScaledSize=function(t){return t*e._defaultScaleFactor/this._docScaleFactor},e.prototype.scalePageMargins=function(e){var t,n,r,i;this._correctScaleNeeded&&((null===(t=null==e?void 0:e.margins)||void 0===t?void 0:t.left)&&(e.margins.left=this.getScaledSize(e.margins.left)),(null===(n=null==e?void 0:e.margins)||void 0===n?void 0:n.right)&&(e.margins.right=this.getScaledSize(e.margins.right)),(null===(r=null==e?void 0:e.margins)||void 0===r?void 0:r.top)&&(e.margins.top=this.getScaledSize(e.margins.top)),(null===(i=null==e?void 0:e.margins)||void 0===i?void 0:i.bottom)&&(e.margins.bottom=this.getScaledSize(e.margins.bottom)))},e.prototype.scaleSizes=function(e){this._correctScaleNeeded&&(this.scaleTables(e),this.scaleObjects(e.objects))},e.prototype.scaleTables=function(e){(null==e?void 0:e.tables)&&(this.scaleTable(e.tables[r.PdfPageTableNames.treeListHeader]),this.scaleTable(e.tables[r.PdfPageTableNames.treeListMain]),this.scaleTable(e.tables[r.PdfPageTableNames.chartMain]),this.scaleTable(e.tables[r.PdfPageTableNames.chartScaleTop]),this.scaleTable(e.tables[r.PdfPageTableNames.chartScaleBottom]))},e.prototype.scaleTable=function(e){var t,n,r,i,o,s;if(e&&((null===(t=e.size)||void 0===t?void 0:t.width)&&(e.size.width=this.getScaledSize(e.size.width)),(null===(n=e.size)||void 0===n?void 0:n.height)&&(e.size.height=this.getScaledSize(e.size.height)),(null===(r=e.position)||void 0===r?void 0:r.x)&&(e.position.x=this.getScaledSize(e.position.x)),(null===(i=e.position)||void 0===i?void 0:i.y)&&(e.position.y=this.getScaledSize(e.position.y)),(null===(o=e.baseCellSize)||void 0===o?void 0:o.width)&&(e.baseCellSize.width=this.getScaledSize(e.baseCellSize.width)),(null===(s=e.baseCellSize)||void 0===s?void 0:s.height)&&(e.baseCellSize.height=this.getScaledSize(e.baseCellSize.height)),e.cells))for(var a=0;a=0)){var t=this.transaction.historyItems.length;t>1?this.addInternal(this.transaction):1==t&&this.addInternal(this.transaction.historyItems.pop()),this.transaction=null,null===(e=this._listener)||void 0===e||e.onTransactionEnd()}},e.prototype.addAndRedo=function(e){this.add(e),this.activateItem(e)},e.prototype.add=function(e){this.transactionLevel>=0?this.transaction.add(e):this.addInternal(e)},e.prototype.canUndo=function(){return this.currentIndex>=0},e.prototype.canRedo=function(){return this.currentIndex0&&this.currentIndex>t&&(this.historyItems.splice(0,t),this.currentIndex-=t)},e.prototype.clear=function(){this.currentIndex=-1,this.historyItems=[]},e.prototype.activateItem=function(e,t){void 0===t&&(t=!1),this.currentProcessingItemInfo=new r.HistoryItemInfo(e,t),t?e.undo():e.redo(),this.currentProcessingItemInfo=null},e.prototype.getCurrentProcessingItemInfo=function(){return this.currentProcessingItemInfo},e.prototype.rollBackAndRemove=function(e){var t=e.item;this.checkAndRemoveItem(t)&&(e.isUndo?t.redo():t instanceof i.CompositionHistoryItem?t.undoItemsQuery():t.undo())},e.prototype.checkAndRemoveItem=function(e){var t=this.historyItems.indexOf(e);return t>-1?(this.historyItems.splice(t,1),this.currentIndex--):this.transaction&&(t=this.transaction.historyItems.indexOf(e))>-1&&this.transaction.historyItems.splice(t,1),t>-1},e.MAX_HISTORY_ITEM_COUNT=100,e}();t.History=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryItemInfo=void 0;var r=function(e,t){void 0===t&&(t=!1),this.item=e,this.isUndo=t};t.HistoryItemInfo=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelChangesDispatcher=void 0;var r=n(155),i=n(156),o=n(157),s=n(158),a=n(159),l=function(){function e(){this.onModelChanged=new a.EventDispatcher,this.isLocked=!1}return e.prototype.notifyTaskCreating=function(e){this.isLocked||this.onModelChanged.raise("NotifyTaskCreating",e)},e.prototype.notifyTaskCreated=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyTaskCreated",e,t,n)},e.prototype.notifyTaskRemoving=function(e){this.isLocked||this.onModelChanged.raise("NotifyTaskRemoving",e)},e.prototype.notifyTaskRemoved=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyTaskRemoved",e,t,n)},e.prototype.notifyTaskUpdating=function(e){this.isLocked||this.onModelChanged.raise("NotifyTaskUpdating",e)},e.prototype.notifyTaskMoving=function(e){this.isLocked||this.onModelChanged.raise("NotifyTaskMoving",e)},e.prototype.notifyTaskEditDialogShowing=function(e){this.isLocked||this.onModelChanged.raise("NotifyTaskEditDialogShowing",e)},e.prototype.notifyResourceManagerDialogShowing=function(e){this.isLocked||this.onModelChanged.raise("NotifyResourceManagerDialogShowing",e)},e.prototype.notifyTaskTitleChanged=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyTaskTitleChanged",e,t,n)},e.prototype.notifyTaskDescriptionChanged=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyTaskDescriptionChanged",e,t,n)},e.prototype.notifyTaskStartChanged=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyTaskStartChanged",e,t,n)},e.prototype.notifyTaskEndChanged=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyTaskEndChanged",e,t,n)},e.prototype.notifyTaskProgressChanged=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyTaskProgressChanged",e,t,n)},e.prototype.notifyTaskColorChanged=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyTaskColorChanged",e,t,n)},e.prototype.notifyParentTaskUpdated=function(e,t){this.isLocked||this.onModelChanged.raise("NotifyParentTaskUpdated",e,t)},e.prototype.notifyDependencyInserting=function(e){this.isLocked||this.onModelChanged.raise("NotifyDependencyInserting",e)},e.prototype.notifyDependencyInserted=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyDependencyInserted",e,t,n)},e.prototype.notifyDependencyRemoving=function(e){this.isLocked||this.onModelChanged.raise("NotifyDependencyRemoving",e)},e.prototype.notifyDependencyRemoved=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyDependencyRemoved",e,t,n)},e.prototype.notifyResourceCreating=function(e){this.isLocked||this.onModelChanged.raise("NotifyResourceCreating",e)},e.prototype.notifyResourceCreated=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyResourceCreated",e,t,n)},e.prototype.notifyResourceRemoving=function(e){this.isLocked||this.onModelChanged.raise("NotifyResourceRemoving",e)},e.prototype.notifyResourceRemoved=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyResourceRemoved",e,t,n)},e.prototype.notifyResourceColorChanged=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyResourceColorChanged",e,t,n)},e.prototype.notifyResourceAssigning=function(e){this.isLocked||this.onModelChanged.raise("NotifyResourceAssigning",e)},e.prototype.notifyResourceAssigned=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyResourceAssigned",e,t,n)},e.prototype.notifyResourceUnassigning=function(e){this.isLocked||this.onModelChanged.raise("NotifyResourceUnassigning",e)},e.prototype.notifyResourceUnassigned=function(e,t,n){this.isLocked||this.onModelChanged.raise("NotifyResourceUnassigned",e,t,n)},e.prototype.notifyParentDataRecalculated=function(e){this.onModelChanged.raise("NotifyParentDataRecalculated",e)},e.prototype.fireResourceUnassigning=function(e){var t=new o.ResourceUnassigningArguments(e);return this.notifyResourceUnassigning(t),!t.cancel},e.prototype.raiseTaskTitleUpdating=function(e,t,n){return this.raiseTaskUpdating(e,"title",t,n)},e.prototype.raiseTaskDescriptionUpdating=function(e,t,n){return this.raiseTaskUpdating(e,"description",t,n)},e.prototype.raiseTaskProgressUpdating=function(e,t,n){return this.raiseTaskUpdating(e,"progress",t,n)},e.prototype.raiseTaskColorUpdating=function(e,t,n){return this.raiseTaskUpdating(e,"color",t,n)},e.prototype.raiseTaskStartUpdating=function(e,t,n){return this.raiseTaskUpdating(e,"start",t,n)},e.prototype.raiseTaskEndUpdating=function(e,t,n){return this.raiseTaskUpdating(e,"end",t,n)},e.prototype.raiseTaskStartAndEndUpdating=function(e,t,n,r){var i=new s.TaskUpdatingArguments(e,["start","end"],[t,n]);return this.notifyTaskUpdating(i),!i.cancel&&(r(i.start,i.end),!0)},e.prototype.raiseTaskUpdating=function(e,t,n,r){var i=e[t];if(i!==n){var o=new s.TaskUpdatingArguments(e,[t],[n]);if(this.notifyTaskUpdating(o),!o.cancel&&i!==o[t])return r(o[t]),!0}return!1},e.prototype.raiseTaskMultipleUpdating=function(e,t,n){var r=["title","progress","start","end","color"],i=r.map((function(e){return t[e]})),o=new s.TaskUpdatingArguments(e,r,i);return this.notifyTaskUpdating(o),!o.cancel&&(n(o.newValues),!0)},e.prototype.raiseTaskMoving=function(e,t,n,r){var i=new s.TaskUpdatingArguments(e,["start","end"],[t,n]);return this.notifyTaskMoving(i),!i.cancel&&(r(i.start,i.end),!0)},e.prototype.raiseTaskTaskEditDialogShowing=function(e,t){var n=new i.TaskEditDialogShowingArguments(e);return this.notifyTaskEditDialogShowing(n),!n.cancel&&(t(n),!0)},e.prototype.raiseResourceManagerDialogShowing=function(e,t){var n=new r.ResourceManagerDialogShowingArguments(e);return this.notifyResourceManagerDialogShowing(n),!n.cancel&&(t(n),!0)},e.prototype.lock=function(){this.isLocked=!0},e.prototype.unlock=function(){this.isLocked=!1},e}();t.ModelChangesDispatcher=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceManagerDialogShowingArguments=void 0;var r=n(0),i=function(e){function t(t){var n=e.call(this,void 0)||this;return n.values.resources=t.resources,n}return r.__extends(t,e),t}(n(10).BaseArguments);t.ResourceManagerDialogShowingArguments=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEditDialogShowingArguments=void 0;var r=n(0),i=function(e){function t(t){var n=e.call(this,t.id)||this;return n.values={start:t.start,end:t.end,title:t.title,progress:t.progress},n.hiddenFields=t.hiddenFields,n.readOnlyFields=t.readOnlyFields,n}return r.__extends(t,e),t}(n(10).BaseArguments);t.TaskEditDialogShowingArguments=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceUnassigningArguments=void 0;var r=n(0),i=function(e){function t(t){var n=e.call(this,t.internalId)||this;return n.values=t,n}return r.__extends(t,e),t}(n(10).BaseArguments);t.ResourceUnassigningArguments=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskUpdatingArguments=void 0;var r=n(0),i=function(e){function t(t,n,r){var i=e.call(this,t.id)||this;return i.values=t,i.createNewValues(n,r),i}return r.__extends(t,e),t.prototype.createNewValues=function(e,t){var n=this;this.newValues={};for(var r=function(r){var o=e[r];i.newValues[o]=t[r],Object.defineProperty(i,o,{get:function(){return n.newValues[o]}})},i=this,o=0;o100?100:t,e.progress=t,this.dispatcher.notifyTaskProgressChanged(e.id,t,this.getErrorCallback())},t}(n(20).TaskPropertyManipulator);t.TaskProgressManipulator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskStartDateManipulator=void 0;var r=n(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getPropertyValue=function(e){return e.start},t.prototype.setPropertyValue=function(e,t){e.start=t,this.dispatcher.notifyTaskStartChanged(e.id,t,this.getErrorCallback())},t}(n(20).TaskPropertyManipulator);t.TaskStartDateManipulator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskTitleManipulator=void 0;var r=n(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getPropertyValue=function(e){return e.title},t.prototype.setPropertyValue=function(e,t){e.title=t,this.dispatcher.notifyTaskTitleChanged(e.id,t,this.getErrorCallback())},t}(n(20).TaskPropertyManipulator);t.TaskTitleManipulator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfGanttExporter=void 0;var r=n(176),i=function(){function e(e){if(!e.settings.pdfDoc&&!e.settings.docCreateMethod)throw new Error("Cannot convert gantt to pdf without document instance!");this._info=e}return e.prototype.export=function(){for(var e,t,n=this.pdfDoc,i=this._info,o=new r.PdfGanttPageDrawer(n,i.settings),s=i.getPages(n),a=s.length,l=0;l0&&n.addPage(this.getDocumentFormat(),this.getOrientation());var c=s[l];o.drawPage(c)}return(null===(e=this.props)||void 0===e?void 0:e.fileName)&&n.save(null===(t=this.props)||void 0===t?void 0:t.fileName),n},Object.defineProperty(e.prototype,"pdfDoc",{get:function(){var e,t;return null!==(e=this._pdfDoc)&&void 0!==e||(this._pdfDoc=null!==(t=this._info.settings.pdfDoc)&&void 0!==t?t:this.createDoc()),this._pdfDoc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"props",{get:function(){return this._info.settings},enumerable:!1,configurable:!0}),e.prototype.createDoc=function(){var e=this.getJsPDFProps();return this._info.settings.docCreateMethod(e)},e.prototype.getJsPDFProps=function(){var e={putOnlyUsedFonts:!0,unit:"px",hotfixes:["px_scaling"]};return e.orientation=this.getOrientation(),e.format=this.getDocumentFormat(),e},e.prototype.getOrientation=function(){var e;return(null===(e=this.props)||void 0===e?void 0:e.landscape)?"l":"p"},e.prototype.getDocumentFormat=function(){var e,t,n,r;return(null===(e=this.props)||void 0===e?void 0:e.format)||(null===(t=this.props)||void 0===t?void 0:t.pageSize)?(null===(n=this.props)||void 0===n?void 0:n.pageSize)?[this.props.pageSize.height,this.props.pageSize.width]:null===(r=this.props)||void 0===r?void 0:r.format:"a4"},e}();t.PdfGanttExporter=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfGanttPageDrawer=void 0;var r=n(4),i=n(177),o=n(30),s=n(52),a=n(178),l=function(){function e(e,t){this._pdfDoc=e,this._props=t}return e.prototype.drawPage=function(e){var t=this._pdfDoc,n=new a.PdfGanttTableDrawer(t);this.needDrawChart()&&(n.drawTable(e.tables[o.PdfPageTableNames.chartMain]),new i.PdfObjectDrawer(t,e.objects).draw(),n.drawTable(e.tables[o.PdfPageTableNames.chartScaleTop]),n.drawTable(e.tables[o.PdfPageTableNames.chartScaleBottom]));return this.needDrawTreeList()&&(n.drawTable(e.tables[o.PdfPageTableNames.treeListMain]),n.drawTable(e.tables[o.PdfPageTableNames.treeListHeader])),this.drawMargins(e),t},e.prototype.needDrawChart=function(){return!this._props||this._props.exportMode===s.ExportMode.all||this._props.exportMode===s.ExportMode.chart},e.prototype.needDrawTreeList=function(){return!this._props||this._props.exportMode===s.ExportMode.all||this._props.exportMode===s.ExportMode.treeList},e.prototype.getContentRightBottom=function(e){var t=new r.Point(0,0);for(var n in e.tables)if(Object.prototype.hasOwnProperty.call(e.tables,n)){var i=e.tables[n];t.x=Math.max(t.x,i.position.x+i.size.width),t.y=Math.max(t.y,i.position.y+i.size.height)}return t},e.prototype.drawMargins=function(e){var t=this._pdfDoc,n=this._props,r=t.getPageWidth(),i=t.getPageHeight(),o=this.getContentRightBottom(e);t.setFillColor(255,255,255),t.rect(0,0,n.margins.left,i,"F"),t.rect(0,0,r,n.margins.top,"F"),t.rect(o.x,0,r,i,"F"),t.rect(0,o.y,r,i,"F")},e}();t.PdfGanttPageDrawer=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfObjectDrawer=void 0;var r=n(3),i=n(75),o=n(50),s=function(){function e(e,t){this._FONT_ROW_RATIO=1.15,this._info=t,this._pdfDoc=e}return e.prototype.draw=function(){this.drawTimeMarkers(),this.drawDependencies(),this.drawTasks(),this.drawResources()},e.prototype.drawTasks=function(){var e,t=this,n=null===(e=this._info)||void 0===e?void 0:e.tasks;n&&n.forEach((function(e){return t.drawTask(e)}))},e.prototype.drawTask=function(e){var t=this._pdfDoc;t.setFillColor.apply(t,e.taskColor.getRBGColor()),t.setDrawColor.apply(t,e.taskColor.getRBGColor()),e.isMilestone?this.drawMilestone(e):this.drawRegularTask(e)},e.prototype.drawMilestone=function(e){var t=this._pdfDoc,n=e.sidePoints[0].x,r=e.sidePoints[0].y,i=e.sidePoints[1].x,o=e.sidePoints[1].y,s=e.sidePoints[2].x,a=e.sidePoints[2].y,l=e.sidePoints[3].x,c=e.sidePoints[3].y;t.triangle(n,r,i,o,s,a,"FD"),t.triangle(n,r,l,c,s,a,"FD")},e.prototype.drawRegularTask=function(e){var t=this._pdfDoc;t.rect(e.left,e.top,e.width,e.height,"FD"),e.isParent&&this.drawParentBorder(e),e.progressWidth&&(t.setFillColor.apply(t,e.progressColor.getRBGColor()),t.rect(e.left,e.top,e.progressWidth,e.height,"F")),e.text&&this.printTaskTitle(e)},e.prototype.drawParentBorder=function(e){var t=this._pdfDoc,n=e.sidePoints[0].x,r=e.sidePoints[1].y,i=e.sidePoints[3].y,o=e.sidePoints[2].x,s=e.sidePoints[3].y-e.sidePoints[1].y,a=e.progressWidth>s?e.progressColor.getRBGColor():e.taskColor.getRBGColor();t.setFillColor.apply(t,a),t.triangle(n,r,n,i,n+s,r,"FD"),t.setFillColor.apply(t,e.taskColor.getRBGColor()),t.triangle(o,r,o,i,o-s,r,"FD")},e.prototype.printTaskTitle=function(e){var t,n=this._pdfDoc,s=e.textStyle,a=s&&s.textColor.getRBGColor(),l=s&&s.fontSize;n.setTextColor.apply(n,a),n.setFontSize(l);var c=e.top+l*this._FONT_ROW_RATIO/n.internal.scaleFactor;e.isParent&&(c-=o.PdfTaskInfo.defaultParentHeightCorrection);var u=s&&s.cellPadding.left||0,d=s&&s.cellPadding.right||0;if(e.textPosition===r.TaskTitlePosition.Inside){var p=e.width-u-d;t=e.left+u,n.text(i.EllipsisHelper.limitPdfTextWithEllipsis(e.text,n,p),t,c)}else t=e.left-d,n.text(e.text,t,c,{align:"right"})},e.prototype.drawDependencies=function(){var e,t=this,n=null===(e=this._info)||void 0===e?void 0:e.dependencies;n&&n.forEach((function(e){return t.drawDependencyLine(e)}))},e.prototype.drawDependencyLine=function(e){var t,n;if((t=this._pdfDoc).setFillColor.apply(t,e.fillColor.getRBGColor()),(n=this._pdfDoc).setDrawColor.apply(n,e.fillColor.getRBGColor()),e.arrowInfo)this.drawArrow(e);else{var r=e.points;this._pdfDoc.line(r[0].x,r[0].y,r[1].x,r[1].y)}},e.prototype.isValidLine=function(e){var t=e.points;return!(isNaN(t[0].x)||isNaN(t[0].y)||isNaN(t[1].x)||isNaN(t[1].y))},e.prototype.drawArrow=function(e){var t=e.arrowInfo.width||0,n=e.points[0].x,i=e.points[0].y;switch(e.arrowInfo.position){case r.Position.Left:this._pdfDoc.triangle(n,i+t,n+t,i,n+t,i+2*t,"FD");break;case r.Position.Right:this._pdfDoc.triangle(n,i,n,i+2*t,n+t,i+t,"FD");break;case r.Position.Top:this._pdfDoc.triangle(n,i+t,n+t,i,n+2*t,i+t,"FD");break;case r.Position.Bottom:this._pdfDoc.triangle(n,i,n+t,i+t,n+2*t,i,"FD")}},e.prototype.drawResources=function(){var e,t=this,n=this._pdfDoc,r=null===(e=this._info)||void 0===e?void 0:e.resources;r&&r.forEach((function(e){var r,i,o;n.setFontSize(null!==(r=e.style.fontSize)&&void 0!==r?r:11);var s=e.y+e.style.fontSize*t._FONT_ROW_RATIO/n.internal.scaleFactor,a=null!==(i=e.style.cellPadding.left)&&void 0!==i?i:0,l=null!==(o=e.style.cellPadding.right)&&void 0!==o?o:1,c=Math.max(e.style.cellWidth.getValue(),a+n.getTextWidth(e.text)+l);n.setFillColor.apply(n,e.style.fillColor.getRBGColor()),n.rect(e.x,e.y,c,e.style.minCellHeight,"F"),n.setTextColor.apply(n,e.style.textColor.getRBGColor()),n.text(e.text,e.x+a,s)}))},e.prototype.drawTimeMarkers=function(){var e,t=this,n=null===(e=this._info)||void 0===e?void 0:e.timeMarkers;null==n||n.forEach((function(e){return t.drawTimeMarker(e)}))},e.prototype.drawTimeMarker=function(e){var t,n,r=this._pdfDoc,i=e.size.width>1,o=e.start.x,s=e.start.y,a=e.size.width,l=e.size.height,c=e.isStripLine;i&&(r.setFillColor.apply(r,e.color.getRBGColor()),r.saveGraphicsState(),r.setGState(new r.GState({opacity:null!==(n=e.color.opacity)&&void 0!==n?n:1})),r.rect(o,s,a,l,"F"),r.restoreGraphicsState()),c&&(this._pdfDoc.setLineDashPattern([3]),(t=this._pdfDoc).setDrawColor.apply(t,e.lineColor.getRBGColor()),i&&this._pdfDoc.line(o+a,s,o+a,s+l,"S"),this._pdfDoc.line(o,s,o,s+l,"S"),this._pdfDoc.setLineDashPattern())},e}();t.PdfObjectDrawer=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PdfGanttTableDrawer=void 0;var r=n(1),i=n(30),o=n(75),s=n(179),a=function(){function e(e){this._pdfDoc=e}return e.prototype.drawTable=function(e){var t,n;if(e){var r=this.createTableOptions(e);(null===(t=e.style)||void 0===t?void 0:t.fontSize)&&this._pdfDoc.setFontSize(null===(n=e.style)||void 0===n?void 0:n.fontSize),this._pdfDoc.autoTable(r.getValue())}},e.prototype.createTableOptions=function(e){var t=this.createDefaultTableOptions();return this.addTableCommonSettings(e,t),this.addCommonTableStyles(e,t),this.prepareBodyCells(e),t.addBody(e.cells),e.hideRowLines&&this.hideRowLines(t),t},e.prototype.createDefaultTableOptions=function(){var e=new s.TableOptions;return e.pageBreak="auto",e.margin.assign(0),e.tableWidth.assign("auto"),e.styles.cellPadding.assign(0),e.styles.halign="center",e.styles.valign="middle",e.styles.lineWidth=1,e.styles.overflow="hidden",e},e.prototype.addTableCommonSettings=function(e,t){t.startY=e.position.y,t.margin.assign({left:e.position.x}),t.tableWidth.assign(e.size.width)},e.prototype.addCommonTableStyles=function(e,t){var n=t.styles;n.assign(e.style),0===n.fillColor.opacity&&n.fillColor.assign("#FFFFFF"),n.minCellHeight=e.baseCellSize.height,t.alternateRowStyles.minCellHeight=t.styles.minCellHeight,t.alternateRowStyles.fillColor.assign(t.styles.fillColor),(0,r.isDefined)(e.baseCellSize.width)&&n.cellWidth.assign(e.baseCellSize.width)},e.prototype.prepareBodyCells=function(t){var n,r,s;if(t.name===i.PdfPageTableNames.treeListMain||t.name===i.PdfPageTableNames.chartScaleTop||t.name===i.PdfPageTableNames.chartScaleBottom)for(var a=t.cells,l=0;l-1,o=r.RenderElementUtils.create(e,null,this.taskArea,this.connectorLinesToElementsMap);return n&&this.gridLayoutCalculator.checkAndCorrectArrowElementDisplayByRange(o),o}}},e.prototype.removeConnectorLineElement=function(e){r.RenderElementUtils.remove(e,null,this.taskArea,this.connectorLinesToElementsMap)},e.prototype.recreateConnectorLineElement=function(e,t){var n=this;void 0===t&&(t=!1);var r=[];this._renderedConnectorLines=this.renderedConnectorLines.filter((function(t){return t.attr["dependency-id"]!=e||(r.push(t),!1)}));var i=r.length>0;r.forEach((function(e){n.removeConnectorLineElement(e)})),r=this.gridLayoutCalculator.updateTileToConnectorLinesMap(e),(i||t)&&r.forEach((function(e){n.createConnectorLineElement(e),n.renderedConnectorLines.push(e)}))},e.prototype.recreateConnectorLineElements=function(){var e=this,t=this.gridLayoutCalculator.getRenderedConnectorLines(this.taskAreaContainerScrollTop);r.RenderElementUtils.recreate(this.renderedConnectorLines,t,(function(t){e.removeConnectorLineElement(t)}),(function(t){e.createConnectorLineElement(t)})),this._renderedConnectorLines=t},e}();t.ConnectorLinesRender=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtalonsHelper=void 0;var r=n(2),i=n(3),o=n(68),s=n(14),a=function(){function e(e){this._renderHelper=e}return Object.defineProperty(e.prototype,"mainElement",{get:function(){return this._renderHelper.mainElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"etalonSizeValues",{get:function(){return this._renderHelper.etalonSizeValues},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleCount",{get:function(){return this._renderHelper.scaleCount},enumerable:!1,configurable:!0}),e.prototype.getScaleItemTextTemplate=function(e){return this._renderHelper.getScaleItemTextTemplate(e)},e.prototype.getHeaderHeight=function(){return this._renderHelper.getHeaderHeight()},e.prototype.getSmallTaskWidth=function(e){return this._renderHelper.getSmallTaskWidth(e)},e.prototype.createEtalonElementsContainer=function(){var e=document.createElement("DIV");return e.style.visibility="hidden",e.style.position="absolute",e.style.left="-1000px",this.mainElement.appendChild(e),e},e.prototype.createEtalonElements=function(e){var t=[],n=s.RenderElementUtils.create(new o.GridElementInfo("dx-gantt-taskWrapper"),null,e),r=s.RenderElementUtils.create(new o.GridElementInfo("dx-gantt-task"),null,n);s.RenderElementUtils.create(new o.GridElementInfo("dx-gantt-taskTitle dx-gantt-titleIn"),null,r).innerText="WWW",t.push(n);var i=s.RenderElementUtils.create(new o.GridElementInfo("dx-gantt-taskWrapper"),null,e);s.RenderElementUtils.create(new o.GridElementInfo("dx-gantt-task dx-gantt-milestone"),null,i),t.push(i);for(var a=["dx-gantt-conn-h","dx-gantt-arrow","dx-gantt-si","dx-gantt-taskTitle dx-gantt-titleOut"],l=0;l5*s){var l=this.getScaleItemText(e,n);a.innerText=l,n===i.ViewType.Quarter&&(a.style.padding="0");var c=getComputedStyle(a);o.size.width-r.DomUtils.pxToInt(c.paddingLeft)-r.DomUtils.pxToInt(c.paddingRight)-1||e.indexOf("gesture")>-1)},e.isTouchEvent=function(e){return r.Browser.WebKitTouchUI&&i.isDefined(e.changedTouches)},e.getEventX=function(e){return r.Browser.IE?e.pageX:e.changedTouches[0].pageX},e.getEventY=function(e){return r.Browser.IE?e.pageY:e.changedTouches[0].pageY},e.touchMouseDownEventName=r.Browser.WebKitTouchUI?"touchstart":r.Browser.Edge&&r.Browser.MSTouchUI&&window.PointerEvent?"pointerdown":"mousedown",e.touchMouseUpEventName=r.Browser.WebKitTouchUI?"touchend":r.Browser.Edge&&r.Browser.MSTouchUI&&window.PointerEvent?"pointerup":"mouseup",e.touchMouseMoveEventName=r.Browser.WebKitTouchUI?"touchmove":r.Browser.Edge&&r.Browser.MSTouchUI&&window.PointerEvent?"pointermove":"mousemove",e.msTouchDraggableClassName="dxMSTouchDraggable",e.documentTouchHandlers={},e.documentEventAttachingAllowed=!0,e}();t.TouchUtils=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaStateController=void 0;var r=n(4),i=n(2),o=n(8),s=n(53),a=n(3),l=n(192),c=n(195),u=n(31),d=n(196),p=n(12),h=n(197),f=n(199),g=n(200),y=function(){function e(e,t,n){var i=this;this.position=new r.Point(-1,-1),this._pointers={},this._listener=e,this._listener.setHandler(p.TaskAreaStateEventNames.STATE_EXIT,(function(){i.switchToDefaultState()})),this._listener.setHandler(p.TaskAreaStateEventNames.GET_POINTERS_INFO,(function(e){return i.getPointersInfo(e.triggerEvent)})),this._taskArea=t,this._cellSize=n,this.switchToDefaultState()}return e.prototype.onKeyDown=function(e){this._state.onKeyDown(e)},e.prototype.onScroll=function(e){this._state.onScroll(e)},e.prototype.onContextMenu=function(e){this._state.onContextMenu(e)},e.prototype.onMouseWheel=function(e){e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),this.switchState(h.TaskAreaZoomState)),this._state.onMouseWheel(e)},Object.defineProperty(e.prototype,"currentState",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.onTaskPointerEnter=function(e){this._state.onTaskPointerEnter(e)},e.prototype.onTaskAreaPointerLeave=function(e){this._state.onTaskAreaLeave(e)},e.prototype.onDocumentPointerCancel=function(e){this._clearPointerInfo(e)},e.prototype.onDocumentPointerDown=function(e){this._updatePinterInfo(e),this.toggleStateOnPointerDown(e),this._state.onDocumentPointerDown(e)},e.prototype.onDocumentPointerMove=function(e){this._updatePinterInfo(e),this.toggleStateOnPointerMove(e),this._state.onDocumentPointerMove(e)},e.prototype.onDocumentPointerUp=function(e){this._clearPointerInfo(e),this._state.onDocumentPointerUp(e)},e.prototype.onTaskTouchStart=function(e){this._state.onTaskTouchStart(e)},e.prototype.onTouchStart=function(e){this.toggleStateOnPointerDown(e),this._state.onTouchStart(e)},e.prototype.onTouchEnd=function(e){this._state.onTouchEnd(e)},e.prototype.onTouchMove=function(e){this.toggleStateOnPointerMove(e),this._state.onTouchMove(e)},e.prototype.onClick=function(e){this._state.onClick(e)},e.prototype.onDblClick=function(e){this._state.onDblClick(e)},e.prototype.onTaskAreaMouseLeave=function(e){this._state.onTaskAreaLeave(e)},e.prototype.onTaskElementHover=function(e){this._state.onTaskHover(e)},e.prototype.onTaskElementLeave=function(e){this._state.onTaskLeave(e)},e.prototype.onMouseUp=function(e){this._state.onMouseUp(e)},e.prototype.onMouseMove=function(e){this._state.onMouseMove(e)},e.prototype.onMouseDown=function(e){switch(this.getTaskAreaEventSource(e)){case a.TaskAreaEventSource.TaskArea:this.processMouseDownOnTaskArea(e);break;case a.TaskAreaEventSource.TaskEdit_Frame:this.switchState(g.TaskMoveState);break;case a.TaskAreaEventSource.TaskEdit_Progress:case a.TaskAreaEventSource.TaskEdit_Start:case a.TaskAreaEventSource.TaskEdit_End:this.switchState(f.TaskEditState);break;case a.TaskAreaEventSource.TaskEdit_DependencyStart:case a.TaskAreaEventSource.TaskEdit_DependencyFinish:this.switchState(c.TaskAreaDependencyState)}this._state.onMouseDown(e)},Object.defineProperty(e.prototype,"taskArea",{get:function(){return this._taskArea},enumerable:!1,configurable:!0}),e.prototype.switchToDefaultState=function(){this._state=new l.TaskAreaDefaultState(this._listener,this.taskArea,this._cellSize)},e.prototype.switchState=function(e){this._state instanceof e||(this._state&&this._state.finish(),this._state=new e(this._listener,this.taskArea,this._cellSize),this._state.start())},e.prototype.processMouseDownOnTaskArea=function(e){o.EvtUtils.isLeftButtonPressed(e)&&!u.TaskAreaDomHelper.isConnectorLine(e)&&this.switchState(d.TaskAreaScrollState)},e.prototype.toggleStateOnPointerDown=function(e){var t=this.toggleStateWhenMultiOrOutsideTouch(e);if(this.position=new r.Point(o.EvtUtils.getEventX(e),o.EvtUtils.getEventY(e)),!t&&this._canStartDrag(e))switch(this.getTaskAreaEventSource(e)){case a.TaskAreaEventSource.TaskEdit_DependencyStart:case a.TaskAreaEventSource.TaskEdit_DependencyFinish:this.switchState(c.TaskAreaDependencyState);break;case a.TaskAreaEventSource.TaskEdit_Progress:case a.TaskAreaEventSource.TaskEdit_Start:case a.TaskAreaEventSource.TaskEdit_End:this.switchState(f.TaskEditState)}},e.prototype.toggleStateOnPointerMove=function(e){var t=this.toggleStateWhenMultiOrOutsideTouch(e),n=Math.abs(this.position.x-o.EvtUtils.getEventX(e))>1||Math.abs(this.position.y-o.EvtUtils.getEventY(e))>1;if(!t&&n&&this._canStartDrag(e)&&this._state instanceof l.TaskAreaDefaultState)switch(this.getTaskAreaEventSource(e)){case a.TaskAreaEventSource.TaskArea:this.checkEventInTaskEditFrameArea(e)?this.switchState(g.TaskMoveState):this.switchState(d.TaskAreaScrollState);break;case a.TaskAreaEventSource.TaskEdit_Frame:this.isTaskUpdateDisabled()?this.switchState(d.TaskAreaScrollState):this.switchState(g.TaskMoveState);break;case a.TaskAreaEventSource.TaskEdit_Progress:case a.TaskAreaEventSource.TaskEdit_Start:case a.TaskAreaEventSource.TaskEdit_End:this.switchState(f.TaskEditState)}},e.prototype.toggleStateWhenMultiOrOutsideTouch=function(e){var t=this._getActivePointersCount(e),n=!this.isInTaskArea(e),r=t>=2||n;return t>2||n?this.switchState(l.TaskAreaDefaultState):2===t&&this.switchState(h.TaskAreaZoomState),r},e.prototype.checkEventInTaskEditFrameArea=function(e){var t,n,r=this.getTaskEditFrameElement();if(this.isTaskUpdateDisabled()||!r)return!1;var i=(null==e?void 0:e.clientX)||(null===(t=null==e?void 0:e.touches[0])||void 0===t?void 0:t.clientX),o=(null==e?void 0:e.clientY)||(null===(n=null==e?void 0:e.touches[0])||void 0===n?void 0:n.clientY),s=r.getBoundingClientRect();return i>=s.left&&i<=s.left+s.width&&o>=s.top&&o<=s.top+s.height},e.prototype.isTaskUpdateDisabled=function(){return"false"===this._taskArea.getAttribute("task-edit-enabled")},e.prototype.isInTaskArea=function(e){return i.DomUtils.isItParent(this._taskArea,o.EvtUtils.getEventSource(e))},e.prototype.getTaskEditFrameElement=function(){return this._taskArea.getElementsByClassName(s.TaskEditController.CLASSNAMES.TASK_EDIT_FRAME)[0]},e.prototype._updatePinterInfo=function(e){var t=e.pointerId;this._pointers[t]={pageX:e.pageX,pageY:e.pageY,pointerType:e.pointerType}},e.prototype._clearPointerInfo=function(e){var t=e.pointerId;delete this._pointers[t]},e.prototype.isTouchEvent=function(e){return u.TaskAreaDomHelper.isTouchEvent(e)},e.prototype.isPointerEvent=function(e){return u.TaskAreaDomHelper.isPointerEvent(e)},e.prototype._getActivePointersCount=function(e){var t=this;return this.isTouchEvent(e)?e.touches.length:Object.keys(this._pointers).filter((function(n){return t._pointers[n].pointerType===e.pointerType})).length},e.prototype.getPointersInfo=function(e){var t=this,n=null==e?void 0:e.pointerType,r=Object.keys(this._pointers).map((function(e){return t._pointers[e]}));return n&&(r=r.filter((function(e){return e.pointerType===n}))),r},e.prototype._canStartDrag=function(e){return!(this._getActivePointersCount(e)>1)&&((!u.TaskAreaDomHelper.isMousePointer(e)||1===e.buttons)&&!u.TaskAreaDomHelper.isConnectorLine(e))},e.prototype.getTaskAreaEventSource=function(e){return u.TaskAreaDomHelper.getEventSource(o.EvtUtils.getEventSource(e))},e}();t.TaskAreaStateController=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEditTooltip=void 0;var r=n(2),i=function(){function e(e,t,n){this.parentElement=e,this.cultureInfo=n,this.tooltipSettings=t}return Object.defineProperty(e.prototype,"baseElement",{get:function(){return this._baseElement||this.createTooltipContainer(),this._baseElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headerHeight",{get:function(){return this.tooltipSettings.getHeaderHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskTooltipContentTemplate",{get:function(){return this.tooltipSettings.getTaskTooltipContentTemplate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskProgressTooltipContentTemplate",{get:function(){return this.tooltipSettings.getTaskProgressTooltipContentTemplate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskTimeTooltipContentTemplate",{get:function(){return this.tooltipSettings.getTaskTimeTooltipContentTemplate},enumerable:!1,configurable:!0}),e.prototype.destroyTemplate=function(e){this.tooltipSettings.destroyTemplate(e)},e.prototype.formatDate=function(e){return this.tooltipSettings.formatDate(e)},e.prototype.createTooltipContainer=function(){this._baseElement=document.createElement("DIV"),this._baseElement.className=e.CLASSNAMES.TASK_EDIT_PROGRESS_STATUS,this.parentElement.appendChild(this._baseElement)},e.prototype.setDefaultTooltip=function(t){this.defaultTooltip=document.createElement("DIV"),this.defaultTooltip.className=e.CLASSNAMES.TASK_EDIT_TOOLTIP_DEFAULT;var n=document.createElement("DIV");n.className=e.CLASSNAMES.TASK_EDIT_TASK_TITLE;var r=document.createElement("SPAN");if(n.appendChild(r),this.defaultTooltip.appendChild(n),r.innerText=t.title,this.defaultTooltip.appendChild(this.getTimeContent(t.start,t.end)),!isNaN(t.progress)){var i=document.createElement("DIV");i.className=e.CLASSNAMES.TASK_EDIT_PROGRESS_STATUS_TIME;var o=document.createElement("SPAN"),s=document.createElement("SPAN");i.appendChild(o),i.appendChild(s),this.defaultTooltip.appendChild(i),o.innerText=(this.cultureInfo.progress?this.cultureInfo.progress:"Progress")+": ",s.innerText=t.progress+"%"}this.baseElement.appendChild(this.defaultTooltip)},e.prototype.setDefaultProgressTooltip=function(t){this.defaultTooltip=document.createElement("DIV"),this.defaultTooltip.className=e.CLASSNAMES.TASK_EDIT_TOOLTIP_DEFAULT,this.defaultTooltip.innerText=t+"%",this.baseElement.appendChild(this.defaultTooltip)},e.prototype.setDefaultTimeTooltip=function(t,n){this.defaultTooltip=document.createElement("DIV"),this.defaultTooltip.className=e.CLASSNAMES.TASK_EDIT_TOOLTIP_DEFAULT,this.defaultTooltip.appendChild(this.getTimeContent(t,n)),this.baseElement.appendChild(this.defaultTooltip)},e.prototype.showInfo=function(e,t,n){var r=this;void 0===n&&(n=0);var i=this.taskTooltipContentTemplate;this.destroyTemplate(this.baseElement),i?i(this.baseElement,e,(function(){r.showTooltip(t,!1,n)})):(this.setDefaultTooltip(e),this.showTooltip(t,!1,n))},e.prototype.showProgress=function(e,t){var n=this,r=this.taskProgressTooltipContentTemplate;this.destroyTemplate(this.baseElement),r?r(this.baseElement,{progress:e},(function(){n.showTooltip(t)})):(this.setDefaultProgressTooltip(e),this.show(t))},e.prototype.showTime=function(e,t,n){var r=this,i=this.taskTimeTooltipContentTemplate;this.destroyTemplate(this.baseElement),i?i(this.baseElement,{start:e,end:t},(function(){r.showTooltip(n)})):(this.setDefaultTimeTooltip(e,t),this.show(n))},e.prototype.showTooltip=function(e,t,n){var r,i=this;if(void 0===t&&(t=!0),void 0===n&&(n=0),null===(r=this.baseElement)||void 0===r?void 0:r.innerHTML){var o=function(){i.show(e,t)};n?this.timerId=setTimeout(o,n):o()}},e.prototype.show=function(t,n){var i,o,s,a,l=this;void 0===n&&(n=!0);null===(i=this.defaultTooltip)||void 0===i||i.classList.remove(e.CLASSNAMES.TASK_EDIT_TOOLTIP_ARROW_AFTER),null===(o=this.defaultTooltip)||void 0===o||o.classList.remove(e.CLASSNAMES.TASK_EDIT_TOOLTIP_ARROW_BEFORE),this.baseElement.style.display="block";var c=r.DomUtils.getAbsolutePositionY(this.parentElement),u=t-r.DomUtils.getAbsolutePositionX(this.parentElement)-10,d=c-this.headerHeight-r.DomUtils.getDocumentScrollTop()-15,p=this.baseElement.clientHeight>d||this.baseElement.clientHeight>this.parentElement.offsetTop,h=-this.baseElement.clientHeight-5;p?(h=this.parentElement.clientHeight+5,null===(s=this.defaultTooltip)||void 0===s||s.classList.add(e.CLASSNAMES.TASK_EDIT_TOOLTIP_ARROW_AFTER)):null===(a=this.defaultTooltip)||void 0===a||a.classList.add(e.CLASSNAMES.TASK_EDIT_TOOLTIP_ARROW_BEFORE),this.baseElement.style.left=u+"px",this.baseElement.style.top=h+"px",n&&(this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){l.hide()}),1500))},e.prototype.hide=function(){this.baseElement.style.display="none",this.destroyTemplate(this.baseElement),clearTimeout(this.timerId)},e.prototype.getTimeContent=function(t,n){var r=document.createElement("TABLE");r.className=e.CLASSNAMES.TASK_EDIT_PROGRESS_STATUS_TIME;var i=document.createElement("TBODY");r.appendChild(i);var o=document.createElement("TR"),s=document.createElement("TD"),a=document.createElement("TD"),l=document.createElement("TR"),c=document.createElement("TD"),u=document.createElement("TD");return o.appendChild(s),o.appendChild(a),l.appendChild(c),l.appendChild(u),i.appendChild(o),i.appendChild(l),s.innerText=(this.cultureInfo.start?this.cultureInfo.start:"Start")+": ",a.innerText=this.formatDate(t),c.innerText=(this.cultureInfo.end?this.cultureInfo.end:"End")+": ",u.innerText=this.formatDate(n),r},e.CLASSNAMES={TASK_EDIT_PROGRESS_STATUS:"dx-gantt-task-edit-tooltip",TASK_EDIT_TOOLTIP_DEFAULT:"dx-gantt-task-edit-tooltip-default",TASK_EDIT_TASK_TITLE:"dx-gantt-task-title",TASK_EDIT_PROGRESS_STATUS_TIME:"dx-gantt-status-time",TASK_EDIT_TOOLTIP_ARROW_BEFORE:"dx-gantt-task-edit-tooltip-before",TASK_EDIT_TOOLTIP_ARROW_AFTER:"dx-gantt-task-edit-tooltip-after"},e}();t.TaskEditTooltip=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaDefaultState=void 0;var r=n(0),i=n(8),o=n(31),s=n(32),a=n(12),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.finish=function(){this.clearTimers(),this.raiseEvent(a.TaskAreaStateEventNames.CONTEXTMENU_HIDE)},t.prototype.onMouseDownInternal=function(e){this.onPointerDownBase(e)},t.prototype.onDocumentPointerDownInternal=function(e){this.onPointerDownBase(e)},t.prototype.onDocumentPointerUpInternal=function(e){this.onPointerUpBase(e)},t.prototype.onDocumentPointerMoveInternal=function(e){this.clearTimers()},t.prototype.onTouchStartInternal=function(e){this.onPointerDownBase(e)},t.prototype.onTouchEndInternal=function(e){this.onPointerUpBase(e)},t.prototype.onTouchMoveInternal=function(e){this.clearTimers()},t.prototype.onPointerDownBase=function(e){var n=this;e.preventDefault(),this._lastTouchRowIndex=this.getClickedRowIndex(e),(this.isPointerEvent(e)?o.TaskAreaDomHelper.isMousePointer(e):this.isMouseEvent(e))?this.changeSelectionOnTouchDown(e):(setTimeout((function(){o.TaskAreaDomHelper.isMousePointer(e)||n.raiseEvent(a.TaskAreaStateEventNames.CONTEXTMENU_HIDE,e),n.changeSelectionOnTouchDown(e)}),0),clearTimeout(this._contextMenuTimer),this._contextMenuTimer=setTimeout((function(){return n.showContextMenuOnTouchDown(e)}),t.defaultContextMenuTimeout))},t.prototype.onPointerUpBase=function(e){var n=this;if(clearTimeout(this._contextMenuTimer),e.preventDefault(),this.canToEmulateClick(e)){var r=this.getClickedRowIndex(e),i=new Date;if(this._lastEmulatedClickTime)i.getTime()-this._lastEmulatedClickTime.getTime()/g,">")},e.decodeHtml=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},e.prepareTextForRequest=function(e){return e.replace(/%/g,"%25").replace(/&/g,"%26amp;").replace(/\+/g,"%2B").replace(//g,"%26gt;").replace(/"/g,"%26quot;")},e.prepareTextForCallBackRequest=function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},e.decodeViaTextArea=function(e){var t=document.createElement("TEXTAREA");return t.innerHTML=e,t.value},e}();t.EncodeUtils=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaEventArgs=void 0;var r=n(1),i=function(e,t,n,i){this.rowIndex=-1,this.info={},this.eventName=e,this.triggerEvent=t,(0,r.isDefined)(n)&&(this.rowIndex=n),i&&(this.info=i)};t.TaskAreaEventArgs=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaDependencyState=t.dependencyMap=void 0;var r=n(0),i=n(4),o=n(2),s=n(8),a=n(25),l=n(3),c=n(31),u=n(32),d=n(12);t.dependencyMap=[],t.dependencyMap[l.TaskAreaEventSource.TaskEdit_DependencyStart]=[],t.dependencyMap[l.TaskAreaEventSource.TaskEdit_DependencyFinish]=[],t.dependencyMap[l.TaskAreaEventSource.TaskEdit_DependencyStart][l.TaskAreaEventSource.Successor_DependencyStart]=a.DependencyType.SS,t.dependencyMap[l.TaskAreaEventSource.TaskEdit_DependencyStart][l.TaskAreaEventSource.Successor_DependencyFinish]=a.DependencyType.SF,t.dependencyMap[l.TaskAreaEventSource.TaskEdit_DependencyFinish][l.TaskAreaEventSource.Successor_DependencyStart]=a.DependencyType.FS,t.dependencyMap[l.TaskAreaEventSource.TaskEdit_DependencyFinish][l.TaskAreaEventSource.Successor_DependencyFinish]=a.DependencyType.FF;var p=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(n,e),n.prototype.onMouseUp=function(e){this.onDependencyEndByMouse(e)},n.prototype.onMouseDownInternal=function(e){this.onDependencyStart(e)},n.prototype.onMouseMoveInternal=function(e){this.onDependencyMoveStep(e)},n.prototype.onTouchStartInternal=function(e){this.onDependencyStart(e)},n.prototype.onTouchEndInternal=function(e){this.onDependencyEndByTouch(e)},n.prototype.onTouchMoveInternal=function(e){this.onDependencyMoveStep(e)},n.prototype.onDocumentPointerDownInternal=function(e){this.onDependencyStart(e)},n.prototype.onDocumentPointerUpInternal=function(e){this.onDependencyEndByTouch(e)},n.prototype.onDocumentPointerMoveInternal=function(e){this.onDependencyMoveStep(e)},n.prototype.onDependencyStart=function(e){var t=s.EvtUtils.getEventSource(e);this.source=c.TaskAreaDomHelper.getEventSource(t);var n=this.getRelativePos(new i.Point(o.DomUtils.getAbsolutePositionX(t)+t.clientWidth/2,o.DomUtils.getAbsolutePositionY(t)+t.clientHeight/2));this.raiseEvent(d.TaskAreaStateEventNames.DEPENDENCY_START,e,null,{pos:n})},n.prototype.onDependencyMoveStep=function(e){e.preventDefault();var t=this.getRelativePos(new i.Point(s.EvtUtils.getEventX(e),s.EvtUtils.getEventY(e)));this.raiseEvent(d.TaskAreaStateEventNames.DEPENDENCY_PROCESS,e,this.getClickedRowIndex(e),{pos:t})},n.prototype.onDependencyEndByMouse=function(e){var n=c.TaskAreaDomHelper.getEventSource(s.EvtUtils.getEventSource(e)),r=n===l.TaskAreaEventSource.Successor_DependencyStart||n===l.TaskAreaEventSource.Successor_DependencyFinish?t.dependencyMap[this.source][n]:null;this.processEndDependency(e,r)},n.prototype.onDependencyEndByTouch=function(e){var n=this.raiseEvent(d.TaskAreaStateEventNames.GET_DEPENDENCY_POINTS,e),r=this.getRelativePos(n.successorStart),o=this.getRelativePos(n.successorFinish),a=this.getRelativePos(new i.Point(s.EvtUtils.getEventX(e),s.EvtUtils.getEventY(e))),c=this.isTouchNearby(a,r)?l.TaskAreaEventSource.Successor_DependencyStart:this.isTouchNearby(a,o)?l.TaskAreaEventSource.Successor_DependencyFinish:null,u=c===l.TaskAreaEventSource.Successor_DependencyStart||c===l.TaskAreaEventSource.Successor_DependencyFinish?t.dependencyMap[this.source][c]:null;this.processEndDependency(e,u)},n.prototype.onTaskAreaLeaveInternal=function(e){this.processEndDependency(e,null)},n.prototype.processEndDependency=function(e,t){this.raiseEvent(d.TaskAreaStateEventNames.DEPENDENCY_END,e,null,{type:t}),this.raiseEvent(d.TaskAreaStateEventNames.STATE_EXIT,e)},n.prototype.isTouchNearby=function(e,t){return Math.abs(t.x-e.x)<=20&&Math.abs(t.y-e.y)<=20},n}(u.TaskAreaStateBase);t.TaskAreaDependencyState=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaScrollState=void 0;var r=n(0),i=n(32),o=n(12),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isStarted=!1,t}return r.__extends(t,e),t.prototype.finish=function(){this.raiseEvent(o.TaskAreaStateEventNames.TASK_AREA_END_MOVE,null)},t.prototype.onMouseUp=function(e){this.onEnd(e)},t.prototype.onMouseDownInternal=function(e){this.onBeforeStart(e)},t.prototype.onMouseMoveInternal=function(e){this.onMove(e)},t.prototype.onDocumentPointerUpInternal=function(e){this.onEnd(e)},t.prototype.onDocumentPointerMoveInternal=function(e){this.onMoveByPointer(e)},t.prototype.onTouchEndInternal=function(e){this.onEnd(e)},t.prototype.onTouchMoveInternal=function(e){this.onMoveByPointer(e)},t.prototype.onBeforeStart=function(e){e.preventDefault(),this.raiseDependencySelection(e,null),this.raiseEvent(o.TaskAreaStateEventNames.TASK_EDIT_END,e),this.raiseEvent(o.TaskAreaStateEventNames.TASK_AREA_START_MOVE,e),this._isStarted=!0},t.prototype.onMoveByPointer=function(e){this._isStarted?this.onMove(e):this.onBeforeStart(e)},t.prototype.onMove=function(e){e.preventDefault(),this.raiseEvent(o.TaskAreaStateEventNames.TASK_AREA_PROCESS_MOVE,e)},t.prototype.onEnd=function(e){e.preventDefault(),this.raiseEvent(o.TaskAreaStateEventNames.TASK_AREA_END_MOVE,e),this.raiseEvent(o.TaskAreaStateEventNames.STATE_EXIT,e),this._isStarted=!1},t}(i.TaskAreaStateBase);t.TaskAreaScrollState=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaZoomState=void 0;var r=n(0),i=n(4),o=n(8),s=n(198),a=n(32),l=n(12),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isInZooming=!1,t}return r.__extends(t,e),t.prototype.onMouseWheel=function(e){e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),this._isInZooming||this.processZoom(e,o.EvtUtils.getWheelDelta(e)>0,50))},t.prototype.onDocumentPointerUpInternal=function(e){this.onEndZoom(e)},t.prototype.onDocumentPointerMoveInternal=function(e){this.onTouchZoom(e)},t.prototype.onTouchEndInternal=function(e){this.onEndZoom(e)},t.prototype.onTouchMoveInternal=function(e){this.onTouchZoom(e)},t.prototype.onTouchZoom=function(e){var t;if(e.stopPropagation(),e.preventDefault(),!this._isInZooming){var n=this.getTouchDistance(e);null!==(t=this.prevDistance)&&void 0!==t||(this.prevDistance=n);var r=this.prevDistance-n;Math.abs(r)>3&&(this.processZoom(e,r>0,1e3),this.prevDistance=n)}},t.prototype.processZoom=function(e,t,n){var r=this;this._isInZooming=!0,setTimeout((function(){r._isInZooming=!1}),n);var i=t?l.TaskAreaStateEventNames.TASK_AREA_ZOOM_IN:l.TaskAreaStateEventNames.TASK_AREA_ZOOM_OUT;this.raiseEvent(i,e,null,{leftPos:this.getLeftPosition(e)})},t.prototype.onEndZoom=function(e){this.prevDistance=null,this.raiseEvent(l.TaskAreaStateEventNames.STATE_EXIT,e)},t.prototype.getTouchDistance=function(e){var t=this.GetTouchPoints(e);return this.getDistance(t[0],t[1])},t.prototype.GetTouchPoints=function(e){var t,n,r,o;if(this.isTouchEvent(e)){var s=e.touches;return[new i.Point(s[0].pageX,s[0].pageY),new i.Point(s[1].pageX,s[1].pageY)]}var a=this.raiseEvent(l.TaskAreaStateEventNames.GET_POINTERS_INFO,e);return[new i.Point(null===(t=a[0])||void 0===t?void 0:t.pageX,null===(n=a[0])||void 0===n?void 0:n.pageY),new i.Point(null===(r=a[1])||void 0===r?void 0:r.pageX,null===(o=a[1])||void 0===o?void 0:o.pageY)]},t.prototype.getDistance=function(e,t){return s.Metrics.euclideanDistance(e,t)},t.prototype.getLeftPosition=function(e){var t=0;return this.isTouchEvent(e)||this.isPointerEvent(e)?t=this.getZoomMiddlePoint(e).x:this.isMouseEvent(e)&&(t=this.getMouseZoomLeftPos(e)),t},t.prototype.getMouseZoomLeftPos=function(e){var t=this.raiseEvent(l.TaskAreaStateEventNames.GET_COORDINATES_REF_POINT);return o.EvtUtils.getEventX(e)-t.x},t.prototype.getZoomMiddlePoint=function(e){var t=this.raiseEvent(l.TaskAreaStateEventNames.GET_COORDINATES_REF_POINT),n=this.GetTouchPoints(e),r=this.convertScreenToChartCoordinates(n[0],t),o=this.convertScreenToChartCoordinates(n[1],t);return new i.Point((r.x+o.x)/2,(r.y+o.y)/2)},t.prototype.convertScreenToChartCoordinates=function(e,t){return new i.Point(e.x-t.x,e.y-t.y)},t}(a.TaskAreaStateBase);t.TaskAreaZoomState=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.euclideanDistance=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)},e.manhattanDistance=function(e,t){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},e}();t.Metrics=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEditState=void 0;var r=n(0),i=n(8),o=n(3),s=n(31),a=n(12),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.onStartInternal=function(e){var t;null!==(t=this._source)&&void 0!==t||(this._source=s.TaskAreaDomHelper.getEventSource(i.EvtUtils.getEventSource(e)))},t.prototype.onEndInternal=function(e){this.raiseEvent(this.getEventOnEndKey(),e)},t.prototype.onDragInternal=function(e){var t=this.getRelativePos(e);this.raiseEvent(this.getEventOnDragKey(),null,null,{position:t})},t.prototype.getEventOnDragKey=function(){switch(this._source){case o.TaskAreaEventSource.TaskEdit_Start:return a.TaskAreaStateEventNames.TASK_PROCESS_START;case o.TaskAreaEventSource.TaskEdit_End:return a.TaskAreaStateEventNames.TASK_PROCESS_END;case o.TaskAreaEventSource.TaskEdit_Progress:return a.TaskAreaStateEventNames.TASK_PROCESS_PROGRESS}},t.prototype.getEventOnEndKey=function(){switch(this._source){case o.TaskAreaEventSource.TaskEdit_Start:return a.TaskAreaStateEventNames.TASK_CONFIRM_START;case o.TaskAreaEventSource.TaskEdit_End:return a.TaskAreaStateEventNames.TASK_CONFIRM_END;case o.TaskAreaEventSource.TaskEdit_Progress:return a.TaskAreaStateEventNames.TASK_END_PROGRESS}},t}(n(78).TaskDragBaseState);t.TaskEditState=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskMoveState=void 0;var r=n(0),i=n(12),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.onEndInternal=function(e){this.raiseEvent(i.TaskAreaStateEventNames.TASK_END_MOVE,e)},t.prototype.onDragInternal=function(e){this.raiseEvent(i.TaskAreaStateEventNames.TASK_PROCESS_MOVE,null,null,{delta:e.x-this.currentPosition.x})||this.raiseEvent(i.TaskAreaStateEventNames.STATE_EXIT)},t}(n(78).TaskDragBaseState);t.TaskMoveState=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaRender=void 0;var r=n(2),i=n(14),o=function(){function e(e){this._vertTaskAreaBorders=[],this._horTaskAreaBorders=[],this._isExternalTaskAreaContainer=!1,this._renderHelper=e}return Object.defineProperty(e.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainElement",{get:function(){return this._renderHelper.mainElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"etalonSizeValues",{get:function(){return this._renderHelper.etalonSizeValues},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleCount",{get:function(){return this._renderHelper.scaleCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tickSize",{get:function(){return this._renderHelper.tickSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskAreaContainerScrollTop",{get:function(){return this._renderHelper.ganttViewTaskAreaContainerScrollTop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskAreaContainerScrollLeft",{get:function(){return this._renderHelper.ganttTaskAreaContainerScrollLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"areHorizontalBordersEnabled",{get:function(){return this._renderHelper.areHorizontalBordersEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedRowIndices",{get:function(){return this._renderHelper.renderedRowIndices},set:function(e){this._renderHelper.renderedRowIndices=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedColIndices",{get:function(){return this._renderHelper.renderedColIndices},set:function(e){this._renderHelper.renderedColIndices=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vertTaskAreaBorders",{get:function(){return this._vertTaskAreaBorders},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horTaskAreaBorders",{get:function(){return this._horTaskAreaBorders},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hlRowElements",{get:function(){return this._renderHelper.hlRowElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskAreaContainer",{get:function(){return this._taskAreaContainer},enumerable:!1,configurable:!0}),e.prototype.getExternalTaskAreaContainer=function(e){return this._renderHelper.getExternalTaskAreaContainer(e)},e.prototype.prepareExternalTaskAreaContainer=function(e,t){return this._renderHelper.prepareExternalTaskAreaContainer(e,t)},e.prototype.isAllowTaskAreaBorders=function(e){return this._renderHelper.isAllowTaskAreaBorders(e)},e.prototype.getTaskAreaContainerElement=function(){return this._taskAreaContainer.getElement()},e.prototype.initTaskAreaContainer=function(e){this._renderHelper.createTaskArea(e),this._taskAreaContainer=this.getExternalTaskAreaContainer(e),this._isExternalTaskAreaContainer=!!this._taskAreaContainer,null==this.taskAreaContainer&&(this._taskAreaContainer=this._renderHelper.getTaskAreaContainer(e))},e.prototype.createTaskElement=function(e){this._renderHelper.createTaskElement(e)},e.prototype.removeTaskElement=function(e){this._renderHelper.removeTaskElement(e)},e.prototype.reset=function(){this._horTaskAreaBorders=[],this._vertTaskAreaBorders=[]},e.prototype.prepareTaskAreaContainer=function(){var e=this.getTaskAreaContainerElement();this.areHorizontalBordersEnabled?r.DomUtils.addClassName(e,"dx-gantt-tac-hb"):r.DomUtils.removeClassName(e,"dx-gantt-tac-hb");var t=parseInt(getComputedStyle(e).getPropertyValue("margin-top"))||0,n="calc(100% - ".concat(this.etalonSizeValues.scaleItemHeight*this.scaleCount+t,"px)");this._isExternalTaskAreaContainer?this.prepareExternalTaskAreaContainer(e,{height:n}):e.style.height=n},e.prototype.createTaskAreaContainer=function(){var e=document.createElement("DIV");e.className="dx-gantt-tac",this.mainElement.appendChild(e),this.initTaskAreaContainer(e),this.prepareTaskAreaContainer()},e.prototype.createTaskAreaBorder=function(e,t){var n=this.gridLayoutCalculator.getTaskAreaBorderInfo(e,t);i.RenderElementUtils.create(n,e,this.taskArea,this.getTaskAreaBordersDictionary(t))},e.prototype.createTaskArea=function(){var e=document.createElement("DIV");return e.id="dx-gantt-ta",e},e.prototype.removeTaskAreaBorder=function(e,t){i.RenderElementUtils.remove(null,e,this.taskArea,this.getTaskAreaBordersDictionary(t))},e.prototype.createTaskAreaBorderAndTaskElement=function(e,t){this.isAllowTaskAreaBorders(t)&&this.createTaskAreaBorder(e,!t),t&&this.createTaskElement(e)},e.prototype.removeTaskAreaBorderAndTaskElement=function(e,t){this.isAllowTaskAreaBorders(t)&&this.removeTaskAreaBorder(e,!t),t&&this.removeTaskElement(e)},e.prototype.recreateTaskAreaBordersAndTaskElements=function(e){var t=this,n=e?this.taskAreaContainerScrollTop:this.taskAreaContainerScrollLeft,r=this.gridLayoutCalculator.getRenderedRowColumnIndices(n,e),o=e?this.renderedRowIndices:this.renderedColIndices;i.RenderElementUtils.recreate(o,r,(function(n){t.removeTaskAreaBorderAndTaskElement(n,e)}),(function(n){t.createTaskAreaBorderAndTaskElement(n,e)})),e?this.renderedRowIndices=r:this.renderedColIndices=r,this.gridLayoutCalculator.createTileToConnectorLinesMap()},e.prototype.getTaskAreaBordersDictionary=function(e){return e?this.vertTaskAreaBorders:this.horTaskAreaBorders},e.prototype.setSizeForTaskArea=function(e,t){this.taskArea.style.width=e+"px",this.taskArea.style.height=t+"px"},e.prototype.createHighlightRowElement=function(e){var t=this.gridLayoutCalculator.getHighlightRowInfo(e);i.RenderElementUtils.create(t,e,this.taskArea,this.hlRowElements)},e}();t.TaskAreaRender=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskRender=void 0;var r=n(2),i=n(3),o=n(203),s=n(14),a=function(){function e(e){this._selectionElements=[],this._taskElements=[],this._renderHelper=e,this.customTaskRender=new o.CustomTaskRender(e,this)}return Object.defineProperty(e.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskElements",{get:function(){return this._taskElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectionElements",{get:function(){return this._selectionElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isExternalTaskAreaContainer",{get:function(){return this._renderHelper.isExternalTaskAreaContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resourcesElements",{get:function(){return this._renderHelper.resourcesElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hlRowElements",{get:function(){return this._renderHelper.hlRowElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedRowIndices",{get:function(){return this._renderHelper.renderedRowIndices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskTitlePosition",{get:function(){return this._renderHelper.taskTitlePosition},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showResources",{get:function(){return this._renderHelper.showResources},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"areHorizontalBordersEnabled",{get:function(){return this._renderHelper.areHorizontalBordersEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskTextHeightKey",{get:function(){return this._renderHelper.taskTextHeightKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewModelItems",{get:function(){return this._renderHelper.viewModelItems},enumerable:!1,configurable:!0}),e.prototype.isHighlightRowElementAllowed=function(e){return this._renderHelper.isHighlightRowElementAllowed(e)},e.prototype.getTaskVisibility=function(e){return this._renderHelper.getTaskVisibility(e)},e.prototype.getTaskText=function(e){return this._renderHelper.getTaskText(e)},Object.defineProperty(e.prototype,"invalidTaskDependencies",{get:function(){return this._renderHelper.invalidTaskDependencies},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fakeTaskWrapper",{get:function(){var e;return null!==(e=this._fakeTaskWrapper)&&void 0!==e||(this._fakeTaskWrapper=this.createFakeTaskWrapper()),this._fakeTaskWrapper},enumerable:!1,configurable:!0}),e.prototype.getViewItem=function(e){return this._renderHelper.getViewItem(e)},e.prototype.getTask=function(e){return this._renderHelper.getTask(e)},e.prototype.createHighlightRowElement=function(e){this._renderHelper.createHighlightRowElement(e)},e.prototype.getTaskDependencies=function(e){return this._renderHelper.getTaskDependencies(e)},e.prototype.addInvalidTaskDependencies=function(e){this._renderHelper.invalidTaskDependencies=this._renderHelper.invalidTaskDependencies.concat(e)},e.prototype.removeInvalidTaskDependencies=function(e){this._renderHelper.invalidTaskDependencies=this._renderHelper.invalidTaskDependencies.filter((function(t){return t.predecessorId!=e||t.successorId!=e}))},e.prototype.createResources=function(e){this.showResources&&this._renderHelper.createResources(e)},e.prototype.attachEventsOnTask=function(e){this._renderHelper.attachEventsOnTask(e)},e.prototype.detachEventsOnTask=function(e){this._renderHelper.detachEventsOnTask(e)},e.prototype.recreateConnectorLineElement=function(e,t){void 0===t&&(t=!1),this._renderHelper.recreateConnectorLineElement(e,t)},e.prototype.renderTaskElement=function(e){this._renderHelper.createTaskElement(e)},e.prototype.reset=function(){this._selectionElements=[],this._taskElements=[]},e.prototype.createTaskWrapperElement=function(e){var t=this.gridLayoutCalculator.getTaskWrapperElementInfo(e);s.RenderElementUtils.create(t,e,this.taskArea,this.taskElements),this.taskElements[e].style.display=this.getTaskVisibility(e)?"":"none"},e.prototype.createTaskElement=function(e,t){var n=this.getViewItem(e);if(t&&this.customTaskRender.createCustomTaskElement(e,t),n.task.isValid()&&n.visible)n.isCustom||this.createDefaultTaskElement(e);else{var r=this.getTaskDependencies(n.task.internalId);this.addInvalidTaskDependencies(r)}},e.prototype.createTaskVisualElement=function(e){var t=this.gridLayoutCalculator.getTaskElementInfo(e,this.taskTitlePosition!==i.TaskTitlePosition.Inside),n=s.RenderElementUtils.create(t,e,this.taskElements[e]);return this.attachEventsOnTask(e),n},e.prototype.createDefaultTaskElement=function(e){var t=this.getViewItem(e);this.isHighlightRowElementAllowed(e)&&this.createHighlightRowElement(e),t.selected&&this.createTaskSelectionElement(e),this.createTaskWrapperElement(e),this.taskTitlePosition===i.TaskTitlePosition.Outside&&this.createTaskTextElement(e,this.taskElements[e]);var n=this.createTaskVisualElement(e);t.task.isMilestone()||(this.taskTitlePosition===i.TaskTitlePosition.Inside&&this.createTaskTextElement(e,n),this.createTaskProgressElement(e,n)),this.createResources(e)},e.prototype.removeTaskElement=function(e){var t=this.getTask(e);this.removeInvalidTaskDependencies(t.id),this.detachEventsOnTask(e),s.RenderElementUtils.remove(null,e,this.taskArea,this.taskElements),s.RenderElementUtils.remove(null,e,this.taskArea,this.resourcesElements),s.RenderElementUtils.remove(null,e,this.taskArea,this.selectionElements),this.isHighlightRowElementAllowed(e)&&s.RenderElementUtils.remove(null,e,this.taskArea,this.hlRowElements),this.gridLayoutCalculator.resetTaskInfo(e)},e.prototype.recreateTaskElement=function(e){var t=this,n=this.renderedRowIndices.filter((function(t){return t===e})).length>0,r=this.getTask(e);if(r){n&&(this.removeTaskElement(e),this.renderTaskElement(e));var i=this.getTaskDependencies(r.internalId);i.length&&i.forEach((function(e){return t.recreateConnectorLineElement(e.internalId,!0)}))}},e.prototype.createFakeTaskWrapper=function(){var e,t,n=null!==(t=null===(e=this.viewModelItems.filter((function(e){return e.task&&!e.task.isMilestone}))[0])||void 0===e?void 0:e.visibleIndex)&&void 0!==t?t:0,r=this.gridLayoutCalculator,i=s.RenderElementUtils.create(r.getTaskWrapperElementInfo(n),null,this.taskArea),o=s.RenderElementUtils.create(r.getTaskElementInfo(n),null,i);return this.createTaskTextElement(n,o),this.createTaskProgressElement(n,o),i.style.display="none",i},e.prototype.createTaskProgressElement=function(e,t){var n=this.gridLayoutCalculator.getTaskProgressElementInfo(e);s.RenderElementUtils.create(n,e,t)},e.prototype.getTextWidth=function(e){return this._renderHelper.getTextWidth(e)},Object.defineProperty(e.prototype,"minTextWidth",{get:function(){var e;return null!==(e=this._minTextWidth)&&void 0!==e||(this._minTextWidth=5*this.getTextWidth("a")),this._minTextWidth},enumerable:!1,configurable:!0}),e.prototype.createTaskTextElement=function(t,n){var o,a,l=this.gridLayoutCalculator.getTaskTextElementInfo(t,this.taskTitlePosition===i.TaskTitlePosition.Inside);if(!l.additionalInfo.hidden){var c=s.RenderElementUtils.create(l,t,n),u=this.getTaskText(t);if(this.taskTitlePosition===i.TaskTitlePosition.Outside&&l.size.width>0){var d=getComputedStyle(c),p=l.size.width-r.DomUtils.pxToInt(d.paddingLeft);if(p>=this.minTextWidth){var h=r.DomUtils.pxToInt(d.paddingRight),f=u?this.getTextWidth(u):0;h&&f>p-h&&(h=Math.min(e.minTitleOutRightPadding,p-this.minTextWidth),c.style.paddingRight=h+"px"),f>p-h&&(c.style.overflowX="hidden",c.style.textOverflow="ellipsis")}else c.style.display="none"}u||(null!==(o=this[a=this.taskTextHeightKey])&&void 0!==o||(this[a]=this.getTaskTextHeight(c)),c.style.height=this[this.taskTextHeightKey]),c.innerText=u}},e.prototype.createTaskSelectionElement=function(e){var t=this.gridLayoutCalculator.getSelectionElementInfo(e);this.isExternalTaskAreaContainer&&!this.areHorizontalBordersEnabled&&t.size.height++,s.RenderElementUtils.create(t,e,this.taskArea,this.selectionElements)},e.prototype.getTaskTextHeight=function(e){e.innerText="WWW";var t=getComputedStyle(e).height;return e.innerText="",t},e.prototype.getSmallTaskWidth=function(e){var t=0;if(null!=e&&""!==e){var n=e.indexOf("rem");if(n>-1)try{t=parseFloat(e.substr(0,n))*parseFloat(getComputedStyle(document.documentElement).fontSize)}catch(e){}else t=r.DomUtils.pxToInt(e)}return 2*t},e.minTitleOutRightPadding=5,e}();t.TaskRender=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomTaskRender=void 0;var r=n(3),i=n(14),o=function(){function e(e,t){this._renderHelper=e,this._taskRender=t}return Object.defineProperty(e.prototype,"gridLayoutCalculator",{get:function(){return this._renderHelper.gridLayoutCalculator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tickSize",{get:function(){return this._renderHelper.tickSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskTitlePosition",{get:function(){return this._renderHelper.taskTitlePosition},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskElements",{get:function(){return this._taskRender.taskElements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taskArea",{get:function(){return this._renderHelper.taskArea},enumerable:!1,configurable:!0}),e.prototype.getViewItem=function(e){return this._renderHelper.getViewItem(e)},e.prototype.getTask=function(e){return this._renderHelper.getTask(e)},e.prototype.destroyTemplate=function(e){this._renderHelper.destroyTemplate(e)},e.prototype.getTaskDependencies=function(e){return this._renderHelper.getTaskDependencies(e)},e.prototype.getTaskResources=function(e){return this._renderHelper.getTaskResources(e)},e.prototype.attachEventsOnTask=function(e){this._renderHelper.attachEventsOnTask(e)},e.prototype.recreateConnectorLineElement=function(e,t){void 0===t&&(t=!1),this._renderHelper.recreateConnectorLineElement(e,t)},e.prototype.createTaskSelectionElement=function(e){this._taskRender.createTaskSelectionElement(e)},e.prototype.createCustomTaskElement=function(e,t){var n=this,r=this.getViewItem(e);r.isCustom=!1;var i=document.createElement("DIV"),o=this.createCustomTaskInformation(e);r.isCustom=!0,t(i,o,(function(e,t){n.drawCustomTask(e,t)}),e)},e.prototype.createCustomTaskWrapperElement=function(e,t){i.RenderElementUtils.create(t,e,this.taskArea,this.taskElements)},e.prototype.createCustomTaskVisualElement=function(e,t){return i.RenderElementUtils.create(t,e,this.taskElements[e])},e.prototype.drawCustomTask=function(e,t){var n=this;if(this.taskElements[t]){var r=this.getViewItem(t);if(r.visible=!!e.innerHTML,this.taskElements[t].innerHTML=e.innerHTML,r.size.height=this.taskElements[t].offsetHeight,r.size.width=this.taskElements[t].offsetWidth,this.destroyTemplate(this.taskElements[t]),this._taskRender.removeTaskElement(t),r.visible){var i=this.gridLayoutCalculator.getTaskWrapperElementInfo(t);this.createCustomTaskWrapperElement(t,i),this.taskElements[t].appendChild(e),this.attachEventsOnTask(t)}else{var o=this.getTaskDependencies(r.task.internalId);o.length&&(this._taskRender.addInvalidTaskDependencies(o),o.forEach((function(e){return n.recreateConnectorLineElement(e.internalId,!0)})))}this._taskRender.isHighlightRowElementAllowed(t)&&this._taskRender.createHighlightRowElement(t),r.selected&&this.createTaskSelectionElement(t)}},e.prototype.createCustomTaskInformation=function(e){var t=this.getTask(e),n=this.getViewItem(e),i=this.gridLayoutCalculator.getTaskWrapperElementInfo(e),o=this.gridLayoutCalculator.getTaskElementInfo(e,this.taskTitlePosition!==r.TaskTitlePosition.Inside);this.createCustomTaskWrapperElement(e,i);var s=this.createCustomTaskVisualElement(e,o);this._taskRender.createTaskTextElement(e,s);var a=this.getTaskResources(t.id);return{cellSize:this.tickSize,isMilestone:t.isMilestone(),isParent:!!(null==n?void 0:n.children.length),taskData:t,taskHTML:s,taskPosition:i.position,taskResources:a,taskSize:o.size}},e}();t.CustomTaskRender=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainElementsRender=void 0;var r=function(){function e(){}return e.prototype.createMainElement=function(e){var t=document.createElement("DIV");return t.style.width=e.offsetWidth+"px",t.style.height=e.offsetHeight+"px",t},e.prototype.createHeader=function(){var e=document.createElement("DIV");return e.className="dx-gantt-header",e},e}();t.MainElementsRender=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskAreaContainer=void 0;var r=function(){function e(e,t){this.element=e,this.onScrollHandler=function(){t.updateView()},this.element.addEventListener("scroll",this.onScrollHandler)}return Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.element.scrollTop},set:function(e){this.element.scrollTop=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollLeft",{get:function(){return this.element.scrollLeft},set:function(e){this.element.scrollLeft=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollWidth",{get:function(){return this.element.scrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this.element.scrollHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isExternal",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.getWidth=function(){return this.element.offsetWidth},e.prototype.getHeight=function(){return this.element.offsetHeight},e.prototype.getElement=function(){return this.element},e.prototype.detachEvents=function(){this.element.removeEventListener("scroll",this.onScrollHandler)},e}();t.TaskAreaContainer=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElementTextHelper=void 0;var r=n(2),i=n(3),o=n(17),s=function(){function e(e){this.longestAbbrMonthName=null,this.longestMonthName=null,this.longestAbbrDayName=null;var t=document.createElement("canvas");this.textMeasureContext=t.getContext("2d"),this.cultureInfo=e}return e.prototype.setFont=function(e){var t=r.DomUtils.getCurrentStyle(e),n=t.font?t.font:t.fontStyle+" "+t.fontVariant+" "+t.fontWeight+" "+t.fontSize+" / "+t.lineHeight+" "+t.fontFamily;this.textMeasureContext.font=n},e.prototype.setSettings=function(e,t,n){this.startTime=e,this.viewType=t,this.modelItems=n},e.prototype.getScaleItemText=function(e,t){var n=this.viewType.valueOf()===t.valueOf();switch(t){case i.ViewType.TenMinutes:return this.getTenMinutesScaleItemText(e);case i.ViewType.Hours:case i.ViewType.SixHours:return this.getHoursScaleItemText(e);case i.ViewType.Days:return this.getDaysScaleItemText(e,n);case i.ViewType.Weeks:return this.getWeeksScaleItemText(e,n);case i.ViewType.Months:return this.getMonthsScaleItemText(e,n);case i.ViewType.Quarter:return this.getQuarterScaleItemText(e,n);case i.ViewType.Years:return this.getYearsScaleItemText(e);case i.ViewType.FiveYears:return this.getFiveYearsScaleItemText(e)}},e.prototype.getTenMinutesScaleItemText=function(e){var t=e.getMinutes()+1;return(10*Math.ceil(t/10)).toString()},e.prototype.getThirtyMinutesScaleItemText=function(e){return e.getMinutes()<30?"30":"60"},e.prototype.getHoursScaleItemText=function(e){var t=e.getHours(),n=this.getHourDisplayText(t),r=t<12?this.getAmText():this.getPmText();return this.getHoursScaleItemTextCore(n,r)},e.prototype.getDaysScaleItemText=function(e,t){return this.getDayTotalText(e,!0,t,t,!t)},e.prototype.getWeeksScaleItemText=function(e,t){var n=o.DateUtils.getDSTCorrectedDate(e,o.DateUtils.msPerWeek-o.DateUtils.msPerDay);return this.getWeeksScaleItemTextCore(this.getDayTotalText(e,t,!0,t,!t),this.getDayTotalText(n,t,!0,t,!t))},e.prototype.getMonthsScaleItemText=function(e,t){var n=this.getMonthNames(),r=t?"":e.getFullYear().toString();return this.getMonthsScaleItemTextCore(n[e.getMonth()],r)},e.prototype.getQuarterScaleItemText=function(e,t){var n=this.getQuarterNames(),r=t?"":e.getFullYear().toString();return this.getMonthsScaleItemTextCore(n[Math.floor(e.getMonth()/3)],r)},e.prototype.getYearsScaleItemText=function(e){return e.getFullYear().toString()},e.prototype.getFiveYearsScaleItemText=function(e){return e.getFullYear().toString()+" - "+(e.getFullYear()+4).toString()},e.prototype.getHourDisplayText=function(e){return this.hasAmPm()?(0==e?12:e<=12?e:e-12).toString():e<10?"0"+e:e.toString()},e.prototype.getDayTotalText=function(e,t,n,r,i){var o=r?this.getAbbrMonthNames():this.getMonthNames(),s=n?this.getAbbrDayNames():this.getDayNames(),a=t?s[e.getDay()]:"",l=e.getDate(),c=o[e.getMonth()],u=i?e.getFullYear().toString():"";return this.getDayTotalTextCore(a,l.toString(),c,u)},e.prototype.getTaskText=function(e){var t=this.modelItems[e];return t?t.task.title:""},e.prototype.getTaskVisibility=function(e){var t=this.modelItems[e];return!!t&&t.getVisible()},e.prototype.hasAmPm=function(){return this.getAmText().length>0||this.getPmText().length>0},e.prototype.getScaleItemTextTemplate=function(e){switch(e){case i.ViewType.TenMinutes:return"00";case i.ViewType.Hours:case i.ViewType.SixHours:return this.getHoursScaleItemTextCore("00",this.getAmText());case i.ViewType.Days:return this.getDayTextTemplate();case i.ViewType.Weeks:return this.getWeekTextTemplate();case i.ViewType.Months:return this.getMonthsScaleItemTextCore(this.getLongestMonthName(),"");case i.ViewType.Quarter:return"Q4";case i.ViewType.Years:return"0000"}},e.prototype.getDayTextTemplate=function(){return this.getDayTotalTextCore(this.getLongestAbbrDayName(),"00",this.getLongestAbbrMonthName(),"")},e.prototype.getWeekTextTemplate=function(){var e=this.getDayTextTemplate();return this.getWeeksScaleItemTextCore(e,e)},e.prototype.getHoursScaleItemTextCore=function(e,t){return e+":00"+(this.hasAmPm()?" "+t:"")},e.prototype.getDayTotalTextCore=function(e,t,n,r){var i=e.length>0?e+", ":"";return i+=t+" "+n,i+=r.length>0?" "+r:""},e.prototype.getWeeksScaleItemTextCore=function(e,t){return e+" - "+t},e.prototype.getMonthsScaleItemTextCore=function(e,t){var n=e;return t.length>0&&(n+=" "+t),n},e.prototype.getLongestAbbrMonthName=function(){return null==this.longestAbbrMonthName&&(this.longestAbbrMonthName=this.getLongestText(this.getAbbrMonthNames())),this.longestAbbrMonthName},e.prototype.getLongestMonthName=function(){return null==this.longestMonthName&&(this.longestMonthName=this.getLongestText(this.getMonthNames())),this.longestMonthName},e.prototype.getLongestAbbrDayName=function(){return null==this.longestAbbrDayName&&(this.longestAbbrDayName=this.getLongestText(this.getAbbrDayNames())),this.longestAbbrDayName},e.prototype.getLongestText=function(e){var t=this,n="",r=0;return e.forEach((function(e){var i=t.getTextWidth(e);i>r&&(r=i,n=e)})),n},e.prototype.getTextWidth=function(e){return Math.round(this.textMeasureContext.measureText(e).width)},e.prototype.getAmText=function(){return this.cultureInfo.amText},e.prototype.getPmText=function(){return this.cultureInfo.pmText},e.prototype.getQuarterNames=function(){return this.cultureInfo.quarterNames},e.prototype.getMonthNames=function(){return this.cultureInfo.monthNames},e.prototype.getDayNames=function(){return this.cultureInfo.dayNames},e.prototype.getAbbrMonthNames=function(){return this.cultureInfo.abbrMonthNames},e.prototype.getAbbrDayNames=function(){return this.cultureInfo.abbrDayNames},e}();t.ElementTextHelper=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Settings=void 0;var r=n(1),i=n(7),o=n(3),s=n(208),a=n(79),l=n(209),c=n(210),u=function(){function e(){this.viewType=void 0,this.taskTitlePosition=o.TaskTitlePosition.Inside,this.showResources=!0,this.showDependencies=!0,this.areHorizontalBordersEnabled=!0,this.areVerticalBordersEnabled=!0,this.areAlternateRowsEnabled=!0,this.allowSelectTask=!0,this.firstDayOfWeek=0,this.editing=new s.EditingSettings,this.validation=new l.ValidationSettings,this.stripLines=new a.StripLineSettings,this.viewTypeRange=new c.ViewTypeRangeSettings}return e.parse=function(t){var n=new e;return t&&((0,r.isDefined)(t.viewType)&&(n.viewType=t.viewType),(0,r.isDefined)(t.taskTitlePosition)&&(n.taskTitlePosition=t.taskTitlePosition),(0,r.isDefined)(t.showResources)&&(n.showResources=t.showResources),(0,r.isDefined)(t.showDependencies)&&(n.showDependencies=t.showDependencies),(0,r.isDefined)(t.areHorizontalBordersEnabled)&&(n.areHorizontalBordersEnabled=t.areHorizontalBordersEnabled),(0,r.isDefined)(t.areVerticalBordersEnabled)&&(n.areHorizontalBordersEnabled=t.areHorizontalBordersEnabled),(0,r.isDefined)(t.areAlternateRowsEnabled)&&(n.areAlternateRowsEnabled=t.areAlternateRowsEnabled),(0,r.isDefined)(t.allowSelectTask)&&(n.allowSelectTask=t.allowSelectTask),(0,r.isDefined)(t.firstDayOfWeek)&&(n.firstDayOfWeek=t.firstDayOfWeek),(0,r.isDefined)(t.startDateRange)&&(n.startDateRange=new Date(t.startDateRange)),(0,r.isDefined)(t.endDateRange)&&(n.endDateRange=new Date(t.endDateRange)),(0,r.isDefined)(t.editing)&&(n.editing=s.EditingSettings.parse(t.editing)),(0,r.isDefined)(t.validation)&&(n.validation=l.ValidationSettings.parse(t.validation)),(0,r.isDefined)(t.stripLines)&&(n.stripLines=a.StripLineSettings.parse(t.stripLines)),(0,r.isDefined)(t.viewTypeRange)&&(n.viewTypeRange=c.ViewTypeRangeSettings.parse(t.viewTypeRange)),(0,r.isDefined)(t.taskTooltipContentTemplate)&&(n.taskTooltipContentTemplate=t.taskTooltipContentTemplate),(0,r.isDefined)(t.taskProgressTooltipContentTemplate)&&(n.taskProgressTooltipContentTemplate=t.taskProgressTooltipContentTemplate),(0,r.isDefined)(t.taskTimeTooltipContentTemplate)&&(n.taskTimeTooltipContentTemplate=t.taskTimeTooltipContentTemplate),(0,r.isDefined)(t.taskContentTemplate)&&(n.taskContentTemplate=t.taskContentTemplate),(0,r.isDefined)(t.cultureInfo)&&(n.cultureInfo=t.cultureInfo)),n},e.prototype.equal=function(e){var t=!0;return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t&&this.viewType===e.viewType)&&this.taskTitlePosition===e.taskTitlePosition)&&this.showResources===e.showResources)&&this.showDependencies===e.showDependencies)&&this.areHorizontalBordersEnabled===e.areHorizontalBordersEnabled)&&this.areAlternateRowsEnabled===e.areAlternateRowsEnabled)&&this.allowSelectTask===e.allowSelectTask)&&this.editing.equal(e.editing))&&this.validation.equal(e.validation))&&this.stripLines.equal(e.stripLines))&&i.DateTimeUtils.areDatesEqual(this.startDateRange,e.startDateRange))&&i.DateTimeUtils.areDatesEqual(this.endDateRange,e.endDateRange)},e}();t.Settings=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditingSettings=void 0;var r=n(1),i=function(){function e(){this.enabled=!1,this.allowDependencyDelete=!0,this.allowDependencyInsert=!0,this.allowTaskDelete=!0,this.allowTaskInsert=!0,this.allowTaskUpdate=!0,this.allowResourceDelete=!0,this.allowResourceInsert=!0,this.allowResourceUpdate=!0,this.allowTaskResourceUpdate=!0,this.taskHoverDelay=0}return e.parse=function(t){var n=new e;return t&&((0,r.isDefined)(t.enabled)&&(n.enabled=t.enabled),(0,r.isDefined)(t.allowDependencyDelete)&&(n.allowDependencyDelete=t.allowDependencyDelete),(0,r.isDefined)(t.allowDependencyInsert)&&(n.allowDependencyInsert=t.allowDependencyInsert),(0,r.isDefined)(t.allowTaskDelete)&&(n.allowTaskDelete=t.allowTaskDelete),(0,r.isDefined)(t.allowTaskInsert)&&(n.allowTaskInsert=t.allowTaskInsert),(0,r.isDefined)(t.allowTaskUpdate)&&(n.allowTaskUpdate=t.allowTaskUpdate),(0,r.isDefined)(t.allowResourceDelete)&&(n.allowResourceDelete=t.allowResourceDelete),(0,r.isDefined)(t.allowResourceInsert)&&(n.allowResourceInsert=t.allowResourceInsert),(0,r.isDefined)(t.allowResourceUpdate)&&(n.allowResourceUpdate=t.allowResourceUpdate),(0,r.isDefined)(t.allowTaskResourceUpdate)&&(n.allowTaskResourceUpdate=t.allowTaskResourceUpdate),(0,r.isDefined)(t.taskHoverDelay)&&(n.taskHoverDelay=t.taskHoverDelay)),n},e.prototype.equal=function(e){var t=!0;return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t&&this.enabled===e.enabled)&&this.allowDependencyDelete===e.allowDependencyDelete)&&this.allowDependencyInsert===e.allowDependencyInsert)&&this.allowTaskDelete===e.allowTaskDelete)&&this.allowTaskInsert===e.allowTaskInsert)&&this.allowTaskUpdate===e.allowTaskUpdate)&&this.allowResourceDelete===e.allowResourceDelete)&&this.allowResourceInsert===e.allowResourceInsert)&&this.allowResourceUpdate===e.allowResourceUpdate)&&this.allowTaskResourceUpdate===e.allowTaskResourceUpdate},e}();t.EditingSettings=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationSettings=void 0;var r=n(1),i=function(){function e(){this.validateDependencies=!1,this.autoUpdateParentTasks=!1,this.enablePredecessorGap=!1}return e.parse=function(t){var n=new e;return t&&((0,r.isDefined)(t.validateDependencies)&&(n.validateDependencies=t.validateDependencies),(0,r.isDefined)(t.autoUpdateParentTasks)&&(n.autoUpdateParentTasks=t.autoUpdateParentTasks),(0,r.isDefined)(t.enablePredecessorGap)&&(n.enablePredecessorGap=t.enablePredecessorGap)),n},e.prototype.equal=function(e){var t=!0;return t=(t=(t=t&&this.validateDependencies===e.validateDependencies)&&this.autoUpdateParentTasks===e.autoUpdateParentTasks)&&this.enablePredecessorGap===e.enablePredecessorGap},e}();t.ValidationSettings=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewTypeRangeSettings=void 0;var r=n(1),i=n(3),o=function(){function e(){this.min=i.ViewType.TenMinutes,this.max=i.ViewType.Years}return e.parse=function(t){var n=new e;return t&&((0,r.isDefined)(t.min)&&(n.min=t.min),(0,r.isDefined)(t.max)&&(n.max=t.max)),n},e.prototype.equal=function(e){var t=!0;return t=(t=t&&this.min===e.min)&&this.max===e.max},e}();t.ViewTypeRangeSettings=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEditSettings=void 0;var r=n(0),i=n(1),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.parse=function(e){var n=new t;return e&&((0,i.isDefined)(e.getCommandManager)&&(n.getCommandManager=e.getCommandManager),(0,i.isDefined)(e.getViewModel)&&(n.getViewModel=e.getViewModel),(0,i.isDefined)(e.getGanttSettings)&&(n.getGanttSettings=e.getGanttSettings),(0,i.isDefined)(e.getRenderHelper)&&(n.getRenderHelper=e.getRenderHelper),(0,i.isDefined)(e.destroyTemplate)&&(n.destroyTemplate=e.destroyTemplate),(0,i.isDefined)(e.formatDate)&&(n.formatDate=e.formatDate),(0,i.isDefined)(e.getModelManipulator)&&(n.getModelManipulator=e.getModelManipulator),(0,i.isDefined)(e.getValidationController)&&(n.getValidationController=e.getValidationController)),n},t}(n(76).TooltipSettings);t.TaskEditSettings=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationController=void 0;var r=n(0),i=n(1),o=n(25),s=n(37),a=n(64),l=n(38),c=n(39),u=n(15),d=n(7),p=n(213),h=function(){function e(e){this.lockPredecessorToSuccessor=!0,this.settings=e}return Object.defineProperty(e.prototype,"viewModel",{get:function(){return this.settings.getViewModel()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"history",{get:function(){return this.settings.getHistory()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modelManipulator",{get:function(){return this.settings.getModelManipulator()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return this.settings.getRange()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"validationSettings",{get:function(){return this.settings.getValidationSettings()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_parentAutoCalc",{get:function(){return this.viewModel.parentAutoCalc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enablePredecessorGap",{get:function(){return this.viewModel.enablePredecessorGap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isValidateDependenciesRequired",{get:function(){return this.settings.getIsValidateDependenciesRequired()},enumerable:!1,configurable:!0}),e.prototype.updateOwnerInAutoParentMode=function(){this.settings.updateOwnerInAutoParentMode()},e.prototype.checkStartDependencies=function(e,t){var n=this,r=[],i=this.viewModel.tasks.getItemById(e);return this.viewModel.dependencies.items.filter((function(t){return t.successorId===e})).forEach((function(e){var s=n.viewModel.tasks.getItemById(e.predecessorId);(e.type===o.DependencyType.FS&&s.end>t||e.type===o.DependencyType.SS&&s.start>t)&&r.push(new p.ValidationError(e.internalId,!0)),(e.type===o.DependencyType.FS&&s.end.valueOf()===i.start.valueOf()&&t>s.end||e.type===o.DependencyType.SS&&s.start.valueOf()===i.start.valueOf()&&t>s.start)&&r.push(new p.ValidationError(e.internalId))})),r},e.prototype.checkEndDependencies=function(e,t){var n=this,r=[],i=this.viewModel.tasks.getItemById(e);return this.viewModel.dependencies.items.filter((function(t){return t.successorId===e})).forEach((function(e){var s=n.viewModel.tasks.getItemById(e.predecessorId);(e.type===o.DependencyType.SF&&s.start>t||e.type===o.DependencyType.FF&&s.end>t)&&r.push(new p.ValidationError(e.internalId,!0)),(e.type===o.DependencyType.SF&&s.start.valueOf()===i.end.valueOf()&&t>s.start||e.type===o.DependencyType.FF&&s.end.valueOf()===i.end.valueOf()&&t>s.end)&&r.push(new p.ValidationError(e.internalId))})),r},e.prototype.moveEndDependTasks=function(e,t,n){var r=this;void 0===n&&(n=!1);var i=this.viewModel.dependencies.items.filter((function(t){return t.predecessorId===e&&!t.isStartDependency})),s=this.viewModel.tasks.getItemById(e);i.forEach((function(e){var i=r.viewModel.tasks.getItemById(e.successorId);if(!(!i||n&&s.parentId===i.parentId||i.parentId==s.id)){var l=new u.DateRange(new Date(i.start.getTime()),new Date(i.end.getTime())),c=new u.DateRange(new Date(i.start.getTime()),new Date(i.end.getTime())),d=s.end.getTime()-t.getTime(),p=r.enablePredecessorGap?s.end:t;e.type===o.DependencyType.FS&&(i.start0?Math.round(s/a):0)!==n.task.progress&&(l.progress=s),t(l),n=n.parent}},e.prototype.updateParentsRangeByChild=function(e){var t=this;this.recalculateParents(this.viewModel.findItem(e),(function(e){if((0,i.isDefined)(e.id)){var n=t.history,r=t.modelManipulator;(0,i.isDefined)(e.start)&&(n.addAndRedo(new c.TaskStartHistoryItem(r,e.id,e.start)),t.moveStartDependTasks(e.id,e.oldStart)),(0,i.isDefined)(e.end)&&(n.addAndRedo(new s.TaskEndHistoryItem(r,e.id,e.end)),t.moveEndDependTasks(e.id,e.oldEnd)),(0,i.isDefined)(e.progress)&&n.addAndRedo(new l.TaskProgressHistoryItem(r,e.id,e.progress))}}))},e.prototype.updateChildRangeByParent=function(e,t,n){var r=this.viewModel.findItem(e);if(r&&0!==r.children.length)for(var i=r.children,o=0;o-1&&this.renderHelper.recreateTaskElement(i)}},e.prototype.beginUpdate=function(){this._fLockCount++},e.prototype.endUpdate=function(){this._fLockCount--,0==this._fLockCount&&this.changed()},e.prototype.compareTaskOrder=function(e){var t=new i.TaskCollection;t.importFromObject(e);var n=t.items,r=this.tasks.items;if(n.length!==r.length)return!1;for(var o=0;o-1},e.prototype.getTaskTreeLine=function(e){var t=[e],n=this.findItem(e);if(n)for(n=n.parent;null==n?void 0:n.task;)t.push(null==n?void 0:n.task.internalId),n=n.parent;return t},e.prototype.getDependentTasksHash=function(){var e={};return this.dependencies.items.forEach((function(t){var n,r,i=t.predecessorId,o=t.successorId;null!==(n=e[i])&&void 0!==n||(e[i]=[]),e[i].indexOf(o)<0&&e[i].push(o),null!==(r=e[o])&&void 0!==r||(e[o]=[]),e[o].indexOf(i)<0&&e[o].push(i)})),e},e.prototype.checkTasksInterdependence=function(e,t,n){for(var r,i,o=this.getTaskTreeLine(e).reverse(),s=this.getTaskTreeLine(t).reverse(),a=0;a-1&&(r=o[a+1],i=s[c+1])}return r||i||(r=o[0],i=s[0]),this.checkDependencyChain(this.getBranchIds(r),this.getBranchIds(i),n,[])},e.prototype.checkDependencyChain=function(e,t,n,r){if(e.some((function(e){return t.indexOf(e)>-1})))return!0;r.push.apply(r,e);for(var i=0;i0},e.prototype.taskHasChildren=function(e){var t=this.findItem(e);return t&&t.children.length>0},Object.defineProperty(e.prototype,"enableDependencyValidation",{get:function(){var e,t=this.owner&&this.owner.settings;return null===(e=null==t?void 0:t.validation)||void 0===e?void 0:e.validateDependencies},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentAutoCalc",{get:function(){var e=this.owner&&this.owner.settings;return e&&e.validation&&e.validation.autoUpdateParentTasks},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enablePredecessorGap",{get:function(){var e=this.owner&&this.owner.settings;return e&&e.validation&&e.validation.enablePredecessorGap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requireFirstLoadParentAutoCalc",{get:function(){return this.parentAutoCalc&&this.owner.requireFirstLoadParentAutoCalc()},enumerable:!1,configurable:!0}),e.prototype.isTaskToCalculateByChildren=function(e){return this.parentAutoCalc&&this.taskHasChildren(e)},e.prototype.hasTasks=function(){return this.tasks.length>0},e.prototype.getDataUpdateErrorCallback=function(){return this.owner.getDataUpdateErrorCallback&&this.owner.getDataUpdateErrorCallback()},e.prototype.convertPublicToInternalKey=function(e,t){var n=this.getItemByPublicId(e,t);return n&&n.internalId},e.prototype.convertInternalToPublicKey=function(e,t){var n=this.getItemByInternalId(e,t);return n&&n.id},e.prototype.getItemByPublicId=function(e,t){var n=t.toString();switch(e){case"task":return this.tasks.getItemByPublicId(n);case"dependency":return this.dependencies.getItemByPublicId(n);case"resource":return this.resources.getItemByPublicId(n);case"assignment":return this.assignments.getItemByPublicId(n)}return null},e.prototype.getItemByInternalId=function(e,t){switch(e){case"task":return this.tasks.getItemById(t);case"dependency":return this.dependencies.getItemById(t);case"resource":return this.resources.getItemById(t);case"assignment":return this.assignments.getItemById(t)}return null},e.prototype.findAssignment=function(e,t){var n=this.convertPublicToInternalKey("resource",e),r=this.convertPublicToInternalKey("task",t);return this.assignments.items.filter((function(e){return e.resourceId===n&&e.taskId===r}))[0]},e.prototype.findAllTaskAssignments=function(e){return this.assignments.items.filter((function(t){return t.taskId===e}))},e.prototype.getAllVisibleTaskIndices=function(e,t){var n,r=[];null!=e||(e=0),null!=t||(t=this._viewItemList.length-1);for(var i=e;i<=t;i++){var o=this._viewItemList[i];o.getVisible()&&(null===(n=o.task)||void 0===n?void 0:n.isValid)&&r.push(i)}return r},e.prototype.getVisibleTasks=function(){var e=this;return this.tasks.items.filter((function(t){return t&&e.getTaskVisibility(t.internalId)&&t.isValid()}))},e.prototype.getVisibleDependencies=function(){var e=this.getVisibleTasks().map((function(e){return e.internalId}));return this.dependencies.items.filter((function(t){return t&&e.indexOf(t.successorId)>-1&&e.indexOf(t.predecessorId)>-1}))},e.prototype.getVisibleResourceAssignments=function(){var e=this.getVisibleTasks().map((function(e){return e.internalId}));return this.assignments.items.filter((function(t){return t&&e.indexOf(t.taskId)>-1}))},e.prototype.getVisibleResources=function(){for(var e=[],t=this.getVisibleResourceAssignments(),n=0;n-1&&this.children.splice(t,1)},e.prototype.getExpanded=function(){return!!this.task&&this.task.expanded},e.prototype.getVisible=function(){if(!this.visible)return!1;for(var e=this.parent;e;){if(!e.visible)return!1;e=e.parent}return!0},e.prototype.changeVisibility=function(e){this.visible=e},e.prototype.changeSelection=function(e){this.selected=e},e.prototype.setDependencies=function(e){e&&(this.dependencies=e.slice())},e}();t.ViewVisualModelItem=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewVisualModelDependencyInfo=void 0;var r=function(e,t,n){this.id=e,this.predecessor=t,this.type=n};t.ViewVisualModelDependencyInfo=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkingTimeCalculator=void 0;var r=n(223),i=n(231),o=n(7),s=function(){function e(e,t){this._workingRules=new r.WorkingDayRuleCollection,this._workDayList=new Array,this._calculationRange=e,this._workingRules.importFromObject(t)}return e.prototype.calculateWorkDayList=function(){if(this._calculationRange){this.clearList();for(var e=this._workingRules.items,t=0;t0&&o.DateTimeUtils.compareDates(t[t.length-1].end,r.start)<2?t[t.length-1].end=r.end:t.push(r)}return t},e.prototype.getNoWorkTimeRangesFromDay=function(e){return e.noWorkingIntervals.map((function(t){return o.DateTimeUtils.convertTimeRangeToDateRange(t,e.dayNumber)}))},Object.defineProperty(e.prototype,"noWorkingIntervals",{get:function(){return this._noWorkingIntervals||(this._noWorkingIntervals=this.calculateNoWorkTimeIntervals()),this._noWorkingIntervals.slice()},enumerable:!1,configurable:!0}),e.prototype.updateRange=function(e){this._calculationRange=e,this.invalidate()},e.prototype.invalidate=function(){this._noWorkingIntervals=null,this.clearList()},e}();t.WorkingTimeCalculator=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkingDayRuleCollection=void 0;var r=n(0),i=n(24),o=n(224),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.createItem=function(){return new o.WorkingTimeRule},t}(i.CollectionBase);t.WorkingDayRuleCollection=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkingTimeRule=void 0;var r=n(0),i=n(21),o=n(1),s=n(7),a=n(82),l=n(83),c=function(e){function t(t,n,r){void 0===t&&(t=null),void 0===n&&(n=!0),void 0===r&&(r=null);var i=e.call(this)||this;return i.isWorkDay=!0,i.workTimeRanges=new Array,i.recurrence=t,i.isWorkDay=n,r&&i.workTimeRanges.concat(r),i}return r.__extends(t,e),t.prototype.assignFromObject=function(t){if((0,o.isDefined)(t)){e.prototype.assignFromObject.call(this,t),this.recurrence=a.RecurrenceFactory.createRecurrenceByType(t.recurrenceType)||new l.Daily,(0,o.isDefined)(t.recurrence)&&this.recurrence.assignFromObject(t.recurrence),(0,o.isDefined)(t.isWorkDay)&&(this.isWorkDay=!!t.isWorkDay);var n=s.DateTimeUtils.convertToTimeRanges(t.workTimeRanges);n&&(this.workTimeRanges=n)}},t}(i.DataObject);t.WorkingTimeRule=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DayOfWeek=void 0,function(e){e[e.Sunday=0]="Sunday",e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday"}(t.DayOfWeek||(t.DayOfWeek={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Month=void 0,function(e){e[e.January=0]="January",e[e.February=1]="February",e[e.March=2]="March",e[e.April=3]="April",e[e.May=4]="May",e[e.June=5]="June",e[e.July=6]="July",e[e.August=7]="August",e[e.September=8]="September",e[e.October=9]="October",e[e.November=10]="November",e[e.December=11]="December"}(t.Month||(t.Month={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Weekly=void 0;var r=n(0),i=n(42),o=n(7),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.checkDate=function(e){return o.DateTimeUtils.checkDayOfWeek(this.dayOfWeekInternal,e)},t.prototype.checkInterval=function(e){return o.DateTimeUtils.getWeeksBetween(this.start,e)%this.interval==0},t.prototype.calculatePointByInterval=function(e){var t=o.DateTimeUtils.getWeeksBetween(this.start,e),n=Math.floor(t/this.interval);(t%this.interval>0||e.getDay()>=this.dayOfWeekInternal)&&n++;var r=n*this.interval;return this.calcNextPointWithWeekCount(this.start,r)},t.prototype.calculateNearestPoint=function(e){var t=this.dayOfWeekInternal-e.getDay();return t>0?o.DateTimeUtils.addDays(new Date(e),t):this.calcNextPointWithWeekCount(e,1)},t.prototype.calcNextPointWithWeekCount=function(e,t){void 0===t&&(t=1);var n=7*t+this.dayOfWeekInternal-e.getDay();return o.DateTimeUtils.addDays(new Date(e),n)},Object.defineProperty(t.prototype,"dayOfWeek",{get:function(){return this.dayOfWeekInternal},set:function(e){this.dayOfWeekInternal=e},enumerable:!1,configurable:!0}),t}(i.RecurrenceBase);t.Weekly=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Monthly=void 0;var r=n(0),i=n(42),o=n(7),s=n(229),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.checkDate=function(e){return this._calculateByDayOfWeek?o.DateTimeUtils.checkDayOfWeekOccurrenceInMonth(e,this.dayOfWeekInternal,this.dayOfWeekOccurrenceInternal):o.DateTimeUtils.checkDayOfMonth(this.dayInternal,e)},t.prototype.checkInterval=function(e){return o.DateTimeUtils.getMonthsDifference(this.start,e)%this.interval==0},t.prototype.calculatePointByInterval=function(e){var t=this.start,n=o.DateTimeUtils.getMonthsDifference(t,e),r=Math.floor(n/this.interval)*this.interval,i=new s.MonthInfo(t.getMonth(),t.getFullYear());i.addMonths(r);var a=this.getSpecDayInMonth(i.year,i.month);return o.DateTimeUtils.compareDates(a,e)>=0&&(i.addMonths(this.interval),a=this.getSpecDayInMonth(i.year,i.month)),a},t.prototype.calculateNearestPoint=function(e){var t=e.getMonth(),n=e.getFullYear(),r=this.getSpecDayInMonth(n,t);if(o.DateTimeUtils.compareDates(r,e)>=0){var i=new s.MonthInfo(t,n);i.addMonths(1),r=this.getSpecDayInMonth(i.year,i.month)}return r},Object.defineProperty(t.prototype,"day",{get:function(){return this.dayInternal},set:function(e){this.dayInternal=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dayOfWeek",{get:function(){return this.dayOfWeekInternal},set:function(e){this.dayOfWeekInternal=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dayOfWeekOccurrence",{get:function(){return this.dayOfWeekOccurrenceInternal},set:function(e){this.dayOfWeekOccurrenceInternal=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calculateByDayOfWeek",{get:function(){return this._calculateByDayOfWeek},set:function(e){this._calculateByDayOfWeek=e},enumerable:!1,configurable:!0}),t}(i.RecurrenceBase);t.Monthly=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonthInfo=void 0;var r=n(7),i=function(){function e(e,t){this.month=e,this.year=t}return e.prototype.addMonths=function(e){var t=r.DateTimeUtils.getNextMonth(this.month,e),n=Math.floor(e/12);t=0&&(r+=this.interval,i=this.getSpecDayInMonth(r,this.monthInternal)),i},t.prototype.calculateNearestPoint=function(e){var t=e.getFullYear(),n=this.getSpecDayInMonth(t,this.monthInternal);return o.DateTimeUtils.compareDates(n,e)>=0&&(n=this.getSpecDayInMonth(++t,this.monthInternal)),n},Object.defineProperty(t.prototype,"month",{get:function(){return this.monthInternal},set:function(e){this.monthInternal=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"day",{get:function(){return this.dayInternal},set:function(e){this.dayInternal=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dayOfWeek",{get:function(){return this.dayOfWeekInternal},set:function(e){this.dayOfWeekInternal=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dayOfWeekOccurrence",{get:function(){return this.dayOfWeekOccurrenceInternal},set:function(e){this.dayOfWeekOccurrenceInternal=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calculateByDayOfWeek",{get:function(){return this._calculateByDayOfWeek},set:function(e){this._calculateByDayOfWeek=e},enumerable:!1,configurable:!0}),t}(i.RecurrenceBase);t.Yearly=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DayWorkingTimeInfo=void 0;var r=n(66),i=n(7),o=n(65),s=function(){function e(e,t,n){void 0===e&&(e=0),void 0===t&&(t=!0),void 0===n&&(n=null),this._workingIntervals=new Array,this.dayNumber=e,this.isWorkDay=t,this.addWorkingIntervals(n)}return e.prototype.addWorkingIntervals=function(e){e&&(this._workingIntervals=this._workingIntervals.concat(e.filter((function(e){return!!e}))),this.rearrangeWorkingIntervals())},e.prototype.rearrangeWorkingIntervals=function(){for(var e=0;e-1&&tn&&(this.currentZoom=1,this.setViewType(this.settings.viewType-1,!1)),this.scrollToDateCore(t,-e)},e.prototype.zoomOut=function(e){void 0===e&&(e=this.renderHelper.getTaskAreaContainerWidth()/2);var t=this.renderHelper.getTargetDateByPos(e),n=this.settings.viewTypeRange.max;this.currentZoom>1?(this.currentZoom--,this.updateTickSizeWidth(),this.resetAndUpdate()):this.settings.viewTypei?this.setViewType(n):rl&&(r=l*s),Math.abs(o)>c&&(o=c*a);var u=this.movingInfo.scrollLeft-r,d=this.movingInfo.scrollTop-o,p=this.taskAreaContainer;p.scrollLeft!==u&&(p.scrollLeft=u),p.scrollTop!==d&&(p.scrollTop=d)},e.prototype.calcMovingInfo=function(e){var t=this.taskAreaContainer;return{eventX:i.EvtUtils.getEventX(e),eventY:i.EvtUtils.getEventY(e),scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,maxLeftDelta:t.scrollLeft,maxRightDelta:t.scrollWidth-t.scrollLeft-t.getElement().offsetWidth,maxTopDelta:t.scrollTop,maxBottomDelta:t.scrollHeight-t.scrollTop-t.getElement().offsetHeight}},e.prototype.updateGanttAreaCursor=function(e){var t=r.Browser.IE?"move":"grabbing";this.taskAreaContainer.getElement().style.cursor=e?t:"default"},e}();t.GanttMovingHelper=o}])}));