UNPKG

devexpress-gantt

Version:

DevExpress Gantt Control

1,278 lines (1,225 loc) 945 kB
/*! * DevExpress Gantt (dx-gantt) * Version: 4.1.69 * Build date: Wed May 20 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["DevExpress"] = factory(); else root["DevExpress"] = root["DevExpress"] || {}, root["DevExpress"]["Gantt"] = factory(); })(this, () => { return /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ 8424 (__unused_webpack_module, exports) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Browser = exports.addBrowserClassNamesToHtml = void 0; var resolveBrowserClassNames = null; function addBrowserClassNamesToHtml() { if (resolveBrowserClassNames && typeof resolveBrowserClassNames === 'function') resolveBrowserClassNames(); } exports.addBrowserClassNamesToHtml = addBrowserClassNamesToHtml; var Browser = (function () { function Browser() { } Browser.IdentUserAgent = function (userAgent, ignoreDocumentMode) { if (ignoreDocumentMode === void 0) { ignoreDocumentMode = false; } var browserTypesOrderedList = ['Mozilla', 'IE', 'Firefox', 'Netscape', 'Safari', 'Chrome', 'Opera', 'Opera10', 'Edge']; var defaultBrowserType = 'IE'; var defaultPlatform = 'Win'; var defaultVersions = { Safari: 2, Chrome: 0.1, Mozilla: 1.9, Netscape: 8, Firefox: 2, Opera: 9, IE: 6, Edge: 12 }; if (!userAgent || userAgent.length === 0) { Browser.fillUserAgentInfo(browserTypesOrderedList, defaultBrowserType, defaultVersions[defaultBrowserType], defaultPlatform); return; } userAgent = userAgent.toLowerCase(); Browser.indentPlatformMajorVersion(userAgent); try { var platformIdentStrings = { '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' }; var optSlashOrSpace = '(?:/|\\s*)?'; var versionString = '(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?'; var optVersion = '(?:' + versionString + ')?'; var patterns = { Safari: 'applewebkit(?:.*?(?:version/' + versionString + '[\\.\\w\\d]*?(?:\\s+mobile/\\S*)?\\s+safari))?', Chrome: '(?:chrome|crios)(?!frame)' + optSlashOrSpace + optVersion, Mozilla: 'mozilla(?:.*rv:' + optVersion + '.*Gecko)?', Netscape: '(?:netscape|navigator)\\d*/?\\s*' + optVersion, Firefox: 'firefox' + optSlashOrSpace + optVersion, Opera: '(?:opera|\\sopr)' + optSlashOrSpace + optVersion, Opera10: 'opera.*\\s*version' + optSlashOrSpace + optVersion, IE: 'msie\\s*' + optVersion, Edge: 'edge' + optSlashOrSpace + optVersion }; var browserType = null; var version = -1; for (var i = 0; i < browserTypesOrderedList.length; i++) { var browserTypeCandidate = browserTypesOrderedList[i]; var regExp = new RegExp(patterns[browserTypeCandidate], 'i'); var matches = regExp.exec(userAgent); if (matches && matches.index >= 0) { if (browserType === 'IE' && version >= 11 && browserTypeCandidate === 'Safari') continue; browserType = browserTypeCandidate; if (browserType === 'Opera10') browserType = 'Opera'; var tridentPattern = 'trident' + optSlashOrSpace + optVersion; version = Browser.GetBrowserVersion(userAgent, matches, tridentPattern, Browser.getIECompatibleVersionString()); if (browserType === 'Mozilla' && version >= 11) browserType = 'IE'; } } if (!browserType) browserType = defaultBrowserType; var browserVersionDetected = version !== -1; if (!browserVersionDetected) version = defaultVersions[browserType]; var platform = null; var minOccurenceIndex = Number.MAX_VALUE; for (var identStr in platformIdentStrings) { if (!Object.prototype.hasOwnProperty.call(platformIdentStrings, identStr)) continue; var importantIdent = identStr.substr(0, 1) === '!'; var occurenceIndex = userAgent.indexOf((importantIdent ? identStr.substr(1) : identStr).toLowerCase()); if (occurenceIndex >= 0 && (occurenceIndex < minOccurenceIndex || importantIdent)) { minOccurenceIndex = importantIdent ? 0 : occurenceIndex; platform = platformIdentStrings[identStr]; } } var samsungPattern = 'SM-[A-Z]'; var m = userAgent.toUpperCase().match(samsungPattern); var isSamsungAndroidDevice = m && m.length > 0; if (platform === 'WinPhone' && version < 9) version = Math.floor(Browser.getVersionFromTrident(userAgent, 'trident' + optSlashOrSpace + optVersion)); if (!ignoreDocumentMode && browserType === 'IE' && version > 7 && document.documentMode < version) version = document.documentMode; if (platform === 'WinPhone') version = Math.max(9, version); if (!platform) platform = defaultPlatform; if (platform === platformIdentStrings['cpu os'] && !browserVersionDetected) version = 4; Browser.fillUserAgentInfo(browserTypesOrderedList, browserType, version, platform, isSamsungAndroidDevice); } catch (e) { Browser.fillUserAgentInfo(browserTypesOrderedList, defaultBrowserType, defaultVersions[defaultBrowserType], defaultPlatform); } }; Browser.GetBrowserVersion = function (userAgent, matches, tridentPattern, ieCompatibleVersionString) { var version = Browser.getVersionFromMatches(matches); if (ieCompatibleVersionString) { var versionFromTrident = Browser.getVersionFromTrident(userAgent, tridentPattern); if (ieCompatibleVersionString === 'edge' || parseInt(ieCompatibleVersionString) === versionFromTrident) return versionFromTrident; } return version; }; Browser.getIECompatibleVersionString = function () { if (document.compatible) { for (var i = 0; i < document.compatible.length; i++) { if (document.compatible[i].userAgent === 'IE' && document.compatible[i].version) return document.compatible[i].version.toLowerCase(); } } return ''; }; Browser.isTouchEnabled = function () { return Browser.hasTouchStart() || Browser.hasMaxTouchPoints() || Browser.hasMsMaxTouchPoints(); }; Browser.hasTouchStart = function () { return ('ontouchstart' in window); }; Browser.hasMaxTouchPoints = function () { return navigator['maxTouchPoints'] > 0; }; Browser.hasMsMaxTouchPoints = function () { return navigator['msMaxTouchPoints'] > 0; }; Browser.hasNavigator = function () { return typeof navigator !== 'undefined'; }; Browser.fillUserAgentInfo = function (browserTypesOrderedList, browserType, version, platform, isSamsungAndroidDevice) { if (isSamsungAndroidDevice === void 0) { isSamsungAndroidDevice = false; } for (var i = 0; i < browserTypesOrderedList.length; i++) { var type = browserTypesOrderedList[i]; Browser[type] = type === browserType; } Browser.Version = Math.floor(10.0 * version) / 10.0; Browser.MajorVersion = Math.floor(Browser.Version); Browser.WindowsPlatform = platform === 'Win' || platform === 'WinPhone'; Browser.MacOSMobilePlatform = platform === 'MacMobile' || (platform === 'Mac' && Browser.isTouchEnabled()); Browser.MacOSPlatform = platform === 'Mac' && !Browser.MacOSMobilePlatform; Browser.AndroidMobilePlatform = platform === 'Android'; Browser.WindowsPhonePlatform = platform === 'WinPhone'; Browser.WebKitFamily = Browser.Safari || Browser.Chrome || Browser.Opera && Browser.MajorVersion >= 15; Browser.NetscapeFamily = Browser.Netscape || Browser.Mozilla || Browser.Firefox; Browser.WebKitTouchUI = Browser.MacOSMobilePlatform || Browser.AndroidMobilePlatform; var isIETouchUI = Browser.IE && Browser.MajorVersion > 9 && Browser.WindowsPlatform && Browser.UserAgent.toLowerCase().indexOf('touch') >= 0; Browser.MSTouchUI = isIETouchUI || (Browser.Edge && !!window.navigator.maxTouchPoints); Browser.TouchUI = Browser.WebKitTouchUI || Browser.MSTouchUI; Browser.MobileUI = Browser.WebKitTouchUI || Browser.WindowsPhonePlatform; Browser.AndroidDefaultBrowser = Browser.AndroidMobilePlatform && !Browser.Chrome; Browser.AndroidChromeBrowser = Browser.AndroidMobilePlatform && Browser.Chrome; if (isSamsungAndroidDevice) Browser.SamsungAndroidDevice = isSamsungAndroidDevice; if (Browser.MSTouchUI) { var isARMArchitecture = Browser.UserAgent.toLowerCase().indexOf('arm;') > -1; Browser.VirtualKeyboardSupported = isARMArchitecture || Browser.WindowsPhonePlatform; } else Browser.VirtualKeyboardSupported = Browser.WebKitTouchUI; Browser.fillDocumentElementBrowserTypeClassNames(browserTypesOrderedList); }; Browser.indentPlatformMajorVersion = function (userAgent) { var regex = /(?:(?:windows nt|macintosh|mac os|cpu os|cpu iphone os|android|windows phone|linux) )(\d+)(?:[-0-9_.])*/; var matches = regex.exec(userAgent); if (matches) Browser.PlaformMajorVersion = matches[1]; }; Browser.getVersionFromMatches = function (matches) { var result = -1; var versionStr = ''; if (matches) { if (matches[1]) { versionStr += matches[1]; if (matches[2]) versionStr += '.' + matches[2]; } if (versionStr !== '') { result = parseFloat(versionStr); if (isNaN(result)) result = -1; } } return result; }; Browser.getVersionFromTrident = function (userAgent, tridentPattern) { var tridentDiffFromVersion = 4; var matches = new RegExp(tridentPattern, 'i').exec(userAgent); return Browser.getVersionFromMatches(matches) + tridentDiffFromVersion; }; Browser.fillDocumentElementBrowserTypeClassNames = function (browserTypesOrderedList) { var documentElementClassName = ''; var browserTypeslist = browserTypesOrderedList.concat(['WindowsPlatform', 'MacOSPlatform', 'MacOSMobilePlatform', 'AndroidMobilePlatform', 'WindowsPhonePlatform', 'WebKitFamily', 'WebKitTouchUI', 'MSTouchUI', 'TouchUI', 'AndroidDefaultBrowser']); for (var i = 0; i < browserTypeslist.length; i++) { var type = browserTypeslist[i]; if (Browser[type]) documentElementClassName += 'dx' + type + ' '; } documentElementClassName += 'dxBrowserVersion-' + Browser.MajorVersion; if (typeof document !== 'undefined' && document && document.documentElement) { if (document.documentElement.className !== '') documentElementClassName = ' ' + documentElementClassName; Browser.Info = documentElementClassName; Browser.applyClassNamesOnDemand(document.documentElement, documentElementClassName); } }; Browser.applyClassNamesOnDemand = function (documentElement, documentElementClassName) { return new Promise(function (resolve) { resolveBrowserClassNames = resolve; }).then(function () { documentElement.className += documentElementClassName; }); }; Browser.getUserAgent = function () { return Browser.hasNavigator() && navigator.userAgent ? navigator.userAgent.toLowerCase() : ''; }; Browser.UserAgent = Browser.getUserAgent(); Browser._foo = Browser.IdentUserAgent(Browser.UserAgent); return Browser; }()); exports.Browser = Browser; /***/ }, /***/ 3196 (__unused_webpack_module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ExtendedMinMax = exports.ExtendedMax = exports.ExtendedMin = exports.MinMaxNumber = exports.MinMax = void 0; var tslib_1 = __webpack_require__(5215); var MinMax = (function () { function MinMax(minElement, maxElement) { this.minElement = minElement; this.maxElement = maxElement; } return MinMax; }()); exports.MinMax = MinMax; var MinMaxNumber = (function (_super) { tslib_1.__extends(MinMaxNumber, _super); function MinMaxNumber() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(MinMaxNumber.prototype, "length", { get: function () { return this.maxElement - this.minElement; }, enumerable: false, configurable: true }); return MinMaxNumber; }(MinMax)); exports.MinMaxNumber = MinMaxNumber; var ExtendedMin = (function () { function ExtendedMin(minElement, minValue) { this.minElement = minElement; this.minValue = minValue; } return ExtendedMin; }()); exports.ExtendedMin = ExtendedMin; var ExtendedMax = (function () { function ExtendedMax(maxElement, maxValue) { this.maxElement = maxElement; this.maxValue = maxValue; } return ExtendedMax; }()); exports.ExtendedMax = ExtendedMax; var ExtendedMinMax = (function (_super) { tslib_1.__extends(ExtendedMinMax, _super); function ExtendedMinMax(minElement, minValue, maxElement, maxValue) { var _this = _super.call(this, minElement, maxElement) || this; _this.minValue = minValue; _this.maxValue = maxValue; return _this; } return ExtendedMinMax; }(MinMax)); exports.ExtendedMinMax = ExtendedMinMax; /***/ }, /***/ 5226 (__unused_webpack_module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Margins = void 0; var tslib_1 = __webpack_require__(5215); var offsets_1 = __webpack_require__(8601); var Margins = (function (_super) { tslib_1.__extends(Margins, _super); function Margins() { return _super !== null && _super.apply(this, arguments) || this; } Margins.empty = function () { return new Margins(0, 0, 0, 0); }; Margins.prototype.clone = function () { return new Margins(this.left, this.right, this.top, this.bottom); }; return Margins; }(offsets_1.Offsets)); exports.Margins = Margins; /***/ }, /***/ 4496 (__unused_webpack_module, exports) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Metrics = void 0; var Metrics = (function () { function Metrics() { } Metrics.euclideanDistance = function (a, b) { var xDist = a.x - b.x; var yDist = a.y - b.y; return Math.sqrt(xDist * xDist + yDist * yDist); }; Metrics.manhattanDistance = function (a, b) { return Math.abs(a.x - b.x) + Math.abs(a.y - b.y); }; return Metrics; }()); exports.Metrics = Metrics; /***/ }, /***/ 8601 (__unused_webpack_module, exports) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Offsets = void 0; var Offsets = (function () { function Offsets(left, right, top, bottom) { this.left = left; this.right = right; this.top = top; this.bottom = bottom; } Offsets.empty = function () { return new Offsets(0, 0, 0, 0); }; Object.defineProperty(Offsets.prototype, "horizontal", { get: function () { return this.left + this.right; }, enumerable: false, configurable: true }); Object.defineProperty(Offsets.prototype, "vertical", { get: function () { return this.top + this.bottom; }, enumerable: false, configurable: true }); Offsets.fromNumber = function (offset) { return new Offsets(offset, offset, offset, offset); }; Offsets.fromOffsets = function (offsets) { return new Offsets(offsets.left, offsets.right, offsets.top, offsets.bottom); }; Offsets.fromSide = function (horizontal, vertical) { return new Offsets(horizontal, horizontal, vertical, vertical); }; Offsets.prototype.normalize = function () { this.left = Math.max(0, this.left); this.right = Math.max(0, this.right); this.top = Math.max(0, this.top); this.bottom = Math.max(0, this.bottom); return this; }; Offsets.prototype.toString = function () { return JSON.stringify(this); }; Offsets.prototype.isEmpty = function () { return this.left === 0 && this.right === 0 && this.top === 0 && this.bottom === 0; }; Offsets.prototype.offset = function (offset) { this.left += offset.left; this.right += offset.right; this.top += offset.top; this.bottom += offset.bottom; return this; }; Offsets.prototype.multiply = function (multLeft, multRight, multTop, multBottom) { switch (arguments.length) { case 1: { this.left *= multLeft; this.right *= multLeft; this.top *= multLeft; this.bottom *= multLeft; return this; } case 2: { this.left *= multLeft; this.right *= multLeft; this.top *= multRight; this.bottom *= multRight; return this; } case 4: { this.left *= multLeft; this.right *= multRight; this.top *= multTop; this.bottom *= multBottom; return this; } } return this; }; Offsets.prototype.clone = function () { return new Offsets(this.left, this.right, this.top, this.bottom); }; Offsets.prototype.copyFrom = function (obj) { this.left = obj.left; this.right = obj.right; this.top = obj.top; this.bottom = obj.bottom; }; Offsets.prototype.equals = function (obj) { return this.top === obj.top && this.bottom === obj.bottom && this.right === obj.right && this.left === obj.left; }; Offsets.prototype.applyConverter = function (converter) { this.left = converter(this.left); this.right = converter(this.right); this.top = converter(this.top); this.bottom = converter(this.bottom); return this; }; return Offsets; }()); exports.Offsets = Offsets; /***/ }, /***/ 5327 (__unused_webpack_module, exports) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Point = void 0; var Point = (function () { function Point(x, y) { this.x = x; this.y = y; } Point.zero = function () { return new Point(0, 0); }; Point.fromNumber = function (num) { return new Point(num, num); }; Point.prototype.isZero = function () { return this.x === 0 && this.y === 0; }; Point.prototype.toString = function () { return JSON.stringify(this); }; Point.prototype.copyFrom = function (obj) { this.x = obj.x; this.y = obj.y; }; Point.prototype.clone = function () { return new Point(this.x, this.y); }; Point.prototype.equals = function (obj) { return this.x === obj.x && this.y === obj.y; }; Point.prototype.offset = function (offsetX, offsetY) { this.x += offsetX; this.y += offsetY; return this; }; Point.prototype.offsetByPoint = function (offset) { this.x += offset.x; this.y += offset.y; return this; }; Point.prototype.multiply = function (multiplierX, multiplierY) { this.x *= multiplierX; this.y *= multiplierY; return this; }; Point.prototype.negative = function () { this.x *= -1; this.y *= -1; return this; }; Point.prototype.applyConverter = function (converter) { this.x = converter(this.x); this.y = converter(this.y); return this; }; Point.plus = function (a, b) { return new Point(a.x + b.x, a.y + b.y); }; Point.minus = function (a, b) { return new Point(a.x - b.x, a.y - b.y); }; Point.xComparer = function (a, b) { return a.x - b.x; }; Point.yComparer = function (a, b) { return a.y - b.y; }; Point.equals = function (a, b) { return a.x === b.x && a.y === b.y; }; return Point; }()); exports.Point = Point; /***/ }, /***/ 3844 (__unused_webpack_module, exports) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Size = void 0; var Size = (function () { function Size(width, height) { this.width = width; this.height = height; } Size.empty = function () { return new Size(0, 0); }; Size.fromNumber = function (num) { return new Size(num, num); }; Size.initByCommonAction = function (action) { var widthAdp = function (s) { return s.width; }; var heightAdp = function (s) { return s.height; }; return new Size(action(widthAdp, heightAdp), action(heightAdp, widthAdp)); }; Size.prototype.isEmpty = function () { return this.width === 0 && this.height === 0; }; Size.prototype.toString = function () { return JSON.stringify(this); }; Size.prototype.nonNegativeSize = function () { if (this.width < 0) this.width = 0; if (this.height < 0) this.height = 0; return this; }; Size.prototype.offset = function (offsetWidth, offsetHeight) { this.width = this.width + offsetWidth; this.height = this.height + offsetHeight; return this; }; Size.prototype.multiply = function (multiplierW, multiplierH) { this.width *= multiplierW; this.height *= multiplierH; return this; }; Size.prototype.equals = function (obj) { return this.width === obj.width && this.height === obj.height; }; Size.prototype.clone = function () { return new Size(this.width, this.height); }; Size.prototype.copyFrom = function (obj) { this.width = obj.width; this.height = obj.height; }; Size.prototype.applyConverter = function (conv) { this.width = conv(this.width); this.height = conv(this.height); return this; }; Size.equals = function (a, b) { return a.width === b.width && a.height === b.height; }; return Size; }()); exports.Size = Size; /***/ }, /***/ 3887 (__unused_webpack_module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AttrUtils = void 0; var browser_1 = __webpack_require__(8424); var AttrUtils = (function () { function AttrUtils() { } AttrUtils.setElementAttribute = function (obj, attrName, value) { if (obj.setAttribute) { if (browser_1.Browser.IE && browser_1.Browser.MajorVersion >= 11 && attrName.toLowerCase() === 'src') obj.setAttribute(attrName, ''); obj.setAttribute(attrName, value); } }; AttrUtils.setStyleAttribute = function (obj, attrName, value) { if (obj.setProperty) obj.setProperty(attrName, value, ''); }; AttrUtils.getElementAttribute = function (obj, attrName) { return obj.getAttribute(attrName); }; AttrUtils.getStyleAttribute = function (obj, attrName) { if (obj.getPropertyValue) { if (browser_1.Browser.Firefox) { try { return obj.getPropertyValue(attrName); } catch (e) { return obj[attrName]; } } return obj.getPropertyValue(attrName); } return null; }; AttrUtils.removeElementAttribute = function (obj, attrName) { if (obj.removeAttribute) obj.removeAttribute(attrName); }; AttrUtils.removeStyleAttribute = function (obj, attrName) { if (obj.removeProperty) obj.removeProperty(attrName); }; AttrUtils.changeElementStyleAttribute = function (obj, attrName, newValue) { AttrUtils.saveStyleAttributeInElement(obj, attrName); AttrUtils.setStyleAttribute(obj.style, attrName, newValue); }; AttrUtils.restoreElementStyleAttribute = function (obj, attrName) { var savedAttrName = "dxwu_saved" + attrName; var style = obj.style; if (AttrUtils.isExistsAttributeInElement(obj, savedAttrName)) { var oldValue = AttrUtils.getElementAttribute(obj, savedAttrName); if (oldValue === AttrUtils.emptyObject || oldValue === null) AttrUtils.removeStyleAttribute(style, attrName); else AttrUtils.setStyleAttribute(style, attrName, oldValue); AttrUtils.removeElementAttribute(obj, savedAttrName); return true; } return false; }; AttrUtils.saveStyleAttributeInElement = function (obj, attrName) { var savedAttrName = "dxwu_saved" + attrName; var style = obj.style; if (!AttrUtils.isExistsAttributeInElement(obj, savedAttrName)) { var oldValue = AttrUtils.getStyleAttribute(style, attrName); AttrUtils.setElementAttribute(obj, savedAttrName, AttrUtils.isAttributeExists(oldValue) ? oldValue : AttrUtils.emptyObject); } }; AttrUtils.isExistsAttributeInElement = function (obj, attrName) { var value = AttrUtils.getElementAttribute(obj, attrName); return AttrUtils.isAttributeExists(value); }; AttrUtils.isAttributeExists = function (attrValue) { return attrValue !== null && attrValue !== ''; }; AttrUtils.emptyObject = 'DxEmptyValue'; return AttrUtils; }()); exports.AttrUtils = AttrUtils; /***/ }, /***/ 961 (__unused_webpack_module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.numberToStringHex = exports.numberToStringBin = exports.isOdd = exports.isEven = exports.isNonNullString = exports.isString = exports.isNumber = exports.boolToString = exports.boolToInt = exports.isDefined = void 0; var string_1 = __webpack_require__(4989); function isDefined(value) { return value !== undefined && value !== null; } exports.isDefined = isDefined; function boolToInt(value) { return value ? 1 : 0; } exports.boolToInt = boolToInt; function boolToString(value) { return value ? '1' : '0'; } exports.boolToString = boolToString; function isNumber(obj) { return typeof obj === 'number'; } exports.isNumber = isNumber; function isString(obj) { return typeof obj === 'string'; } exports.isString = isString; function isNonNullString(str) { return !!str; } exports.isNonNullString = isNonNullString; function isEven(num) { return (num % 2) !== 0; } exports.isEven = isEven; function isOdd(num) { return (num % 2) === 0; } exports.isOdd = isOdd; function numberToStringBin(num, minLength) { if (minLength === void 0) { minLength = 0; } return string_1.StringUtils.padLeft(num.toString(2), minLength, '0'); } exports.numberToStringBin = numberToStringBin; function numberToStringHex(num, minLength) { if (minLength === void 0) { minLength = 0; } return string_1.StringUtils.padLeft(num.toString(16), minLength, '0'); } exports.numberToStringHex = numberToStringHex; /***/ }, /***/ 3262 (__unused_webpack_module, exports) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Equals = exports.Comparers = void 0; var Comparers = (function () { function Comparers() { } Comparers.number = function (a, b) { return a - b; }; Comparers.string = function (a, b) { return ((a === b) ? 0 : ((a > b) ? 1 : -1)); }; Comparers.stringIgnoreCase = function (a, b) { a = a.toLowerCase(); b = b.toLowerCase(); return ((a === b) ? 0 : ((a > b) ? 1 : -1)); }; return Comparers; }()); exports.Comparers = Comparers; var Equals = (function () { function Equals() { } Equals.simpleType = function (a, b) { return a === b; }; Equals.object = function (a, b) { return a && b && (a === b || a.equals(b)); }; return Equals; }()); exports.Equals = Equals; /***/ }, /***/ 750 (__unused_webpack_module, exports, __webpack_require__) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DomUtils = void 0; var browser_1 = __webpack_require__(8424); var common_1 = __webpack_require__(961); var math_1 = __webpack_require__(594); var string_1 = __webpack_require__(4989); var DomUtils = (function () { function DomUtils() { } DomUtils.clearInnerHtml = function (element) { while (element.firstChild) element.removeChild(element.firstChild); }; DomUtils.setStylePosition = function (style, point) { style.left = math_1.MathUtils.round(point.x, 3) + 'px'; style.top = math_1.MathUtils.round(point.y, 3) + 'px'; }; DomUtils.setStyleSize = function (style, size) { style.width = math_1.MathUtils.round(size.width, 3) + 'px'; style.height = math_1.MathUtils.round(size.height, 3) + 'px'; }; DomUtils.setStyleSizeAndPosition = function (style, rectangle) { DomUtils.setStylePosition(style, rectangle); DomUtils.setStyleSize(style, rectangle); }; DomUtils.hideNode = function (node) { if (node) { var parentNode = node.parentNode; if (parentNode) parentNode.removeChild(node); } }; DomUtils.isHTMLElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; }; DomUtils.isTextNode = function (node) { return node.nodeType === Node.TEXT_NODE; }; DomUtils.isElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; }; DomUtils.isHTMLTableRowElement = function (element) { return element.tagName === 'TR'; }; DomUtils.isItParent = function (parentElement, element) { if (!parentElement || !element) return false; while (element) { if (element === parentElement) return true; if (element.tagName === 'BODY') return false; element = element.parentNode; } return false; }; DomUtils.getParentByTagName = function (element, tagName) { tagName = tagName.toUpperCase(); while (element) { if (element.tagName === 'BODY') return null; if (element.tagName === tagName) return element; element = element.parentNode; } return null; }; DomUtils.getDocumentScrollTop = function () { var isScrollBodyIE = browser_1.Browser.IE && DomUtils.getCurrentStyle(document.body).overflow === 'hidden' && document.body.scrollTop > 0; if (browser_1.Browser.WebKitFamily || browser_1.Browser.Edge || isScrollBodyIE) { if (browser_1.Browser.MacOSMobilePlatform) return window.pageYOffset; if (browser_1.Browser.WebKitFamily) return document.documentElement.scrollTop || document.body.scrollTop; return document.body.scrollTop; } else return document.documentElement.scrollTop; }; DomUtils.getDocumentScrollLeft = function () { var isScrollBodyIE = browser_1.Browser.IE && DomUtils.getCurrentStyle(document.body).overflow === 'hidden' && document.body.scrollLeft > 0; if (browser_1.Browser.Edge || isScrollBodyIE) return document.body ? document.body.scrollLeft : document.documentElement.scrollLeft; if (browser_1.Browser.WebKitFamily) return document.documentElement.scrollLeft || document.body.scrollLeft; return document.documentElement.scrollLeft; }; DomUtils.getCurrentStyle = function (element) { if (element.currentStyle) return element.currentStyle; else if (document.defaultView && document.defaultView.getComputedStyle) { var result = document.defaultView.getComputedStyle(element, null); if (!result && browser_1.Browser.Firefox && window.frameElement) { var changes = []; var curElement = window.frameElement; while (!(result = document.defaultView.getComputedStyle(element, null))) { changes.push([curElement, curElement.style.display]); curElement.style.setProperty('display', 'block', 'important'); curElement = curElement.tagName === 'BODY' ? curElement.ownerDocument.defaultView.frameElement : curElement.parentNode; } result = cloneObject(result); for (var ch = void 0, i = 0; ch = changes[i]; i++) ch[0].style.display = ch[1]; document.body.offsetWidth; } return result; } return window.getComputedStyle(element, null); }; DomUtils.setFocus = function (element, focusOptions) { function focusCore() { try { element.focus(focusOptions); if (browser_1.Browser.IE && document.activeElement !== element) element.focus(focusOptions); } catch (e) { } } if (browser_1.Browser.MacOSMobilePlatform) focusCore(); else { setTimeout(function () { focusCore(); }, 100); } }; DomUtils.hasClassName = function (element, className) { try { var classNames = className.split(' '); var classList = element.classList; if (classList) { for (var i = classNames.length - 1; i >= 0; i--) { if (!classList.contains(classNames[i])) return false; } } else { var elementClassName = element.getAttribute && element.getAttribute('class'); if (!elementClassName) return false; var elementClasses = elementClassName.split(' '); for (var i = classNames.length - 1; i >= 0; i--) { if (elementClasses.indexOf(classNames[i]) < 0) return false; } } return true; } catch (e) { return false; } }; DomUtils.addClassName = function (element, className) { if (!DomUtils.hasClassName(element, className)) { var elementClassName = element.getAttribute && element.getAttribute('class'); element.setAttribute('class', elementClassName === '' ? className : elementClassName + " " + className); } }; DomUtils.removeClassName = function (element, className) { var elementClassName = element.getAttribute && element.getAttribute('class'); var updClassName = " " + elementClassName + " "; var newClassName = updClassName.replace(" " + className + " ", ' '); if (updClassName.length !== newClassName.length) element.setAttribute('class', string_1.StringUtils.trim(newClassName)); }; DomUtils.toggleClassName = function (element, className, toggle) { if (toggle === undefined) { if (DomUtils.hasClassName(element, className)) DomUtils.removeClassName(element, className); else DomUtils.addClassName(element, className); } else { if (toggle) DomUtils.addClassName(element, className); else DomUtils.removeClassName(element, className); } }; DomUtils.pxToInt = function (px) { return pxToNumber(px, parseInt); }; DomUtils.pxToFloat = function (px) { return pxToNumber(px, parseFloat); }; DomUtils.getAbsolutePositionY = function (element) { function getAbsolutePositionY_IE(element) { return browser_1.Browser.IE && element.parentNode === null ? 0 : element.getBoundingClientRect().top + DomUtils.getDocumentScrollTop(); } function getAbsolutePositionY_FF3(element) { return Math.round(element.getBoundingClientRect().top + DomUtils.getDocumentScrollTop()); } function getAbsolutePositionY_NS(curEl) { var pos = getAbsoluteScrollOffset_OperaFF(curEl, false); var isFirstCycle = true; while (curEl != null) { pos += curEl.offsetTop; if (!isFirstCycle && curEl.offsetParent != null) pos -= curEl.scrollTop; if (!isFirstCycle && browser_1.Browser.Firefox) { var style = DomUtils.getCurrentStyle(curEl); if (curEl.tagName === 'DIV' && style.overflow !== 'visible') pos += DomUtils.pxToInt(style.borderTopWidth); } isFirstCycle = false; curEl = curEl.offsetParent; } return pos; } function getAbsolutePositionY_Other(curEl) { var pos = 0; var isFirstCycle = true; while (curEl != null) { pos += curEl.offsetTop; if (!isFirstCycle && curEl.offsetParent != null) pos -= curEl.scrollTop; isFirstCycle = false; curEl = curEl.offsetParent; } return pos; } if (!element) return 0; if (browser_1.Browser.IE) return getAbsolutePositionY_IE(element); else if (browser_1.Browser.Firefox && browser_1.Browser.Version >= 3) return getAbsolutePositionY_FF3(element); else if (browser_1.Browser.NetscapeFamily && (!browser_1.Browser.Firefox || browser_1.Browser.Version < 3)) return getAbsolutePositionY_NS(element); else if (browser_1.Browser.WebKitFamily || browser_1.Browser.Edge) return getAbsolutePositionY_FF3(element); return getAbsolutePositionY_Other(element); }; DomUtils.getAbsolutePositionX = function (element) { function getAbsolutePositionX_IE(element) { return browser_1.Browser.IE && element.parentNode === null ? 0 : element.getBoundingClientRect().left + DomUtils.getDocumentScrollLeft(); } function getAbsolutePositionX_FF3(element) { return Math.round(element.getBoundingClientRect().left + DomUtils.getDocumentScrollLeft()); } function getAbsolutePositionX_Opera(curEl) { var isFirstCycle = true; var pos = getAbsoluteScrollOffset_OperaFF(curEl, true); while (curEl != null) { pos += curEl.offsetLeft; if (!isFirstCycle) pos -= curEl.scrollLeft; curEl = curEl.offsetParent; isFirstCycle = false; } pos += document.body.scrollLeft; return pos; } function getAbsolutePositionX_NS(curEl) { var pos = getAbsoluteScrollOffset_OperaFF(curEl, true); var isFirstCycle = true; while (curEl != null) { pos += curEl.offsetLeft; if (!isFirstCycle && curEl.offsetParent != null) pos -= curEl.scrollLeft; if (!isFirstCycle && browser_1.Browser.Firefox) { var style = DomUtils.getCurrentStyle(curEl); if (curEl.tagName === 'DIV' && style.overflow !== 'visible') pos += DomUtils.pxToInt(style.borderLeftWidth); } isFirstCycle = false; curEl = curEl.offsetParent; } return pos; } function getAbsolutePositionX_Other(curEl) { var pos = 0; var isFirstCycle = true; while (curEl != null) { pos += curEl.offsetLeft; if (!isFirstCycle && curEl.offsetParent != null) pos -= curEl.scrollLeft; isFirstCycle = false; curEl = curEl.offsetParent; } return pos; } if (!element) return 0; if (browser_1.Browser.IE) return getAbsolutePositionX_IE(element); else if (browser_1.Browser.Firefox && browser_1.Browser.Version >= 3) return getAbsolutePositionX_FF3(element); else if (browser_1.Browser.Opera && browser_1.Browser.Version <= 12) return getAbsolutePositionX_Opera(element); else if (browser_1.Browser.NetscapeFamily && (!browser_1.Browser.Firefox || browser_1.Browser.Version < 3)) return getAbsolutePositionX_NS(element); else if (browser_1.Browser.WebKitFamily || browser_1.Browser.Edge) return getAbsolutePositionX_FF3(element); else return getAbsolutePositionX_Other(element); }; DomUtils.isInteractiveControl = function (element) { return ['A', 'INPUT', 'SELECT', 'OPTION', 'TEXTAREA', 'BUTTON', 'IFRAME'].indexOf(element.tagName) > -1; }; DomUtils.getClearClientHeight = function (element) { return element.offsetHeight - (DomUtils.getTopBottomPaddings(element) + DomUtils.getVerticalBordersWidth(element)); }; DomUtils.getTopBottomPaddings = function (element, style) { var currentStyle = style ? style : DomUtils.getCurrentStyle(element); return DomUtils.pxToInt(currentStyle.paddingTop) + DomUtils.pxToInt(currentStyle.paddingBottom); }; DomUtils.getVerticalBordersWidth = function (element, style) { if (!common_1.isDefined(style)) style = (browser_1.Browser.IE && browser_1.Browser.MajorVersion !== 9 && window.getComputedStyle) ? window.getComputedStyle(element) : DomUtils.getCurrentStyle(element); var res = 0; if (style.borderTopStyle !== 'none') res += DomUtils.pxToFloat(style.borderTopWidth); if (style.borderBottomStyle !== 'none') res += DomUtils.pxToFloat(style.borderBottomWidth); return res; }; DomUtils.getNodes = function (parent, predicate) { var collection = parent.all || parent.getElementsByTagName('*'); var result = []; for (var i = 0; i < collection.length; i++) { var element = collection[i]; if (predicate(element)) result.push(element); } return result; }; DomUtils.getChildNodes = function (parent, predicate) { var collection = parent.childNodes; var result = []; for (var i = 0; i < collection.length; i++) { var element = collection[i]; if (predicate(element)) result.push(element); } return result; }; DomUtils.getNodesByClassName = function (parent, className) { if (parent.querySelectorAll) { var children = parent.querySelectorAll("." + className); var result_1 = []; children.forEach(function (element) { return result_1.push(element); }); return result_1; } else return DomUtils.getNodes(parent, function (elem) { return DomUtils.hasClassName(elem, className); }); }; DomUtils.getChildNodesByClassName = function (parent, className) { function nodeListToArray(nodeList, filter) { var result = []; for (var i = 0; i < nodeList.length; i++) { var element = nodeList[i]; if (filter(element)) result.push(element); } return result; } if (parent.querySelectorAll) { var children = parent.querySelectorAll("." + className); return nodeListToArray(children, function (element) { return element.parentNode === parent; }); } else { return DomUtils.getChildNodes(parent, function (elem) { if (DomUtils.isElementNode(elem)) return common_1.isNonNullString(elem.className) && DomUtils.hasClassName(elem, elem.className); else return false; }); } }; DomUtils.getVerticalScrollBarWidth = function () { if (DomUtils.verticalScrollBarWidth === undefined) { var container = document.createElement('DIV'); container.style.cssText = 'position: absolute; top: 0px; left: 0px; visibility: hidden; width: 200px; height: 150px; overflow: hidden; box-sizing: content-box'; document.body.appendChild(container); var child = document.createElement('P'); container.appendChild(child); child.style.cssText = 'width: 100%; height: 200px;'; var widthWithoutScrollBar = child.offsetWidth; container.style.overflow = 'scroll'; var widthWithScrollBar = child.offsetWidth; if (widthWithoutScrollBar === widthWithScrollBar) widthWithScrollBar = container.clientWidth; DomUtils.verticalScrollBarWidth = widthWithoutScrollBar - widthWithScrollBar; document.body.removeChild(container); } return DomUtils.verticalScrollBarWidth; }; DomUtils.getHorizontalBordersWidth = function (element, style) { if (!common_1.isDefined(style)) style = (browser_1.Browser.IE && window.getComputedStyle) ? window.getComputedStyle(element) : DomUtils.getCurrentStyle(element); var res = 0; if (style.borderLeftStyle !== 'none') res += DomUtils.pxToFloat(style.borderLeftWidth); if (style.borderRightStyle !== 'none') res += DomUtils.pxToFloat(style.borderRightWidth); return res; }; DomUtils.getFontFamiliesFromCssString = function (cssString) { return cssString.split(',').map(function (fam) { return string_1.StringUtils.trim(fam.replace(/'|"/gi, '')); }); }; DomUtils.getInnerText = function (container) { if (browser_1.Browser.Safari && browser_1.Browser.MajorVersion <= 5) { if (DomUtils.html2PlainTextFilter === null) { DomUtils.html2PlainTextFilter = document.createElement('DIV'); DomUtils.html2PlainTextFilter.style.width = '0'; DomUtils.html2PlainTextFilter.style.height = '0'; DomUtils.html2PlainTextFilter.style.overflow = 'visible'; DomUtils.html2PlainTextFilter.style.display = 'none'; document.body.appendChild(DomUtils.html2PlainTextFilter); } var filter = DomUtils.html2PlainTextFilter; filter.innerHTML = container.innerHTML; filter.style.display = ''; var innerText = filter.innerText; filter.style.display = 'none'; return innerText; } else if (browser_1.Browser.NetscapeFamily || browser_1.Browser.WebKitFamily || (browser_1.Browser.IE && browser_1.Browser.Version >= 9) || browser_1.Browser.Edge) return container.textContent; else return container.innerText; }; DomUtils.html2PlainTextFilter = null; DomUtils.verticalScrollBarWidth = undefined; return DomUtils; }()); exports.DomUtils = DomUtils; function cloneObject(srcObject) { if (typeof (srcObject) !== 'object' || !common_1.isDefined(srcObject)) return srcObject; var newObject = {}; for (var i in srcObject) newObject[i] = srcObject[i]; return newObject; } function pxToNumber(px, parseFunction) { var result = 0; if (common_1.isDefined(px) && px !== '') { try { var indexOfPx = px.indexOf('px'); if (indexOfPx > -1) result = parseFunction(px.substr(0, indexOfPx)); } catch (e) { } } return result; } function getAbsoluteScrollOffset_OperaFF(curEl, isX) { var pos = 0; var isFirstCycle = true; while (curEl != null) { if (curEl.tagName === 'BODY') break; var style = DomUtils.getCurrentStyle(curEl); if (style.position === 'absolute'