/*!
 * DevExtreme-Quill Editor v.1.7.1
 * https://js.devexpress.com/
 * Copyright (c) 2020, Developer Express Inc.
 * Copyright (c) 2017, Slab
 * Copyright (c) 2014, Jason Chen
 * Copyright (c) 2013, salesforce.com
 */
(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"]["Quill"] = factory();
})(this, () => {
return /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 1674:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ OverriddenAttributor)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var _decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3866);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3398);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var OverriddenAttributor = /*#__PURE__*/function (_Attributor) {
  _inherits(OverriddenAttributor, _Attributor);
  var _super = _createSuper(OverriddenAttributor);
  function OverriddenAttributor(attrName, keyName) {
    var _options$allowedTags;
    var _this;
    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
      allowedTags: []
    };
    _classCallCheck(this, OverriddenAttributor);
    _this = _super.call(this, attrName, keyName, options);
    _this.allowedTags = (_options$allowedTags = options.allowedTags) !== null && _options$allowedTags !== void 0 ? _options$allowedTags : [];
    return _this;
  }
  _createClass(OverriddenAttributor, [{
    key: "add",
    value: function add(node, value) {
      return _decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateMethodWithKeyName.call */ .Mx.call(this, _get(_getPrototypeOf(OverriddenAttributor.prototype), "add", this), node, value);
    }
  }, {
    key: "remove",
    value: function remove(node) {
      return _decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateMethodWithKeyName.call */ .Mx.call(this, _get(_getPrototypeOf(OverriddenAttributor.prototype), "remove", this), node);
    }
  }, {
    key: "value",
    value: function value(node) {
      return _decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateMethodWithKeyName.call */ .Mx.call(this, _get(_getPrototypeOf(OverriddenAttributor.prototype), "value", this), node);
    }
  }, {
    key: "canAdd",
    value: function canAdd(node, value) {
      return _decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateCanAdd.call */ .ud.call(this, _get(_getPrototypeOf(OverriddenAttributor.prototype), "canAdd", this), node, value);
    }
  }], [{
    key: "keys",
    value: function keys(node) {
      return (0,_decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateKeys */ .dj)(_get(_getPrototypeOf(OverriddenAttributor), "keys", this), node, _utils__WEBPACK_IMPORTED_MODULE_2__/* .KeyNameType.attribute */ .WT.attribute);
    }
  }]);
  return OverriddenAttributor;
}(parchment__WEBPACK_IMPORTED_MODULE_0__.Attributor);


/***/ }),

/***/ 3866:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Mx": () => (/* binding */ decorateMethodWithKeyName),
/* harmony export */   "dj": () => (/* binding */ decorateKeys),
/* harmony export */   "ud": () => (/* binding */ decorateCanAdd)
/* harmony export */ });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3398);

function decorateMethodWithKeyName(method) {
  var originalKeyName = this.keyName;
  this.keyName = (0,_utils__WEBPACK_IMPORTED_MODULE_0__/* .removeCustomPrefixFromKeyName */ .mQ)(this.keyName);
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  var result = method.call.apply(method, [this].concat(args));
  this.keyName = originalKeyName;
  return result;
}
function decorateCanAdd(originCanAdd, node, value) {
  var isNodeAllowed = this.allowedTags.indexOf(node.tagName) > -1;
  return isNodeAllowed && originCanAdd.call(this, node, value);
}
function decorateKeys(originKeys, node, keyType) {
  return originKeys(node).map(function (keyName) {
    return (0,_utils__WEBPACK_IMPORTED_MODULE_0__/* .getKeyNameWithCustomPrefix */ .jf)(node.tagName, keyName, keyType);
  });
}

/***/ }),

/***/ 4569:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ OverriddenStyleAttributor)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var _decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3866);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3398);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var OverriddenStyleAttributor = /*#__PURE__*/function (_StyleAttributor) {
  _inherits(OverriddenStyleAttributor, _StyleAttributor);
  var _super = _createSuper(OverriddenStyleAttributor);
  function OverriddenStyleAttributor(attrName, keyName) {
    var _options$allowedTags;
    var _this;
    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
      allowedTags: []
    };
    _classCallCheck(this, OverriddenStyleAttributor);
    _this = _super.call(this, attrName, keyName, options);
    _this.allowedTags = (_options$allowedTags = options.allowedTags) !== null && _options$allowedTags !== void 0 ? _options$allowedTags : [];
    return _this;
  }
  _createClass(OverriddenStyleAttributor, [{
    key: "add",
    value: function add(node, value) {
      return _decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateMethodWithKeyName.call */ .Mx.call(this, _get(_getPrototypeOf(OverriddenStyleAttributor.prototype), "add", this), node, value);
    }
  }, {
    key: "remove",
    value: function remove(node) {
      return _decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateMethodWithKeyName.call */ .Mx.call(this, _get(_getPrototypeOf(OverriddenStyleAttributor.prototype), "remove", this), node);
    }
  }, {
    key: "value",
    value: function value(node) {
      return _decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateMethodWithKeyName.call */ .Mx.call(this, _get(_getPrototypeOf(OverriddenStyleAttributor.prototype), "value", this), node);
    }
  }, {
    key: "canAdd",
    value: function canAdd(node, value) {
      return _decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateCanAdd.call */ .ud.call(this, _get(_getPrototypeOf(OverriddenStyleAttributor.prototype), "canAdd", this), node, value);
    }
  }], [{
    key: "keys",
    value: function keys(node) {
      return (0,_decorators__WEBPACK_IMPORTED_MODULE_1__/* .decorateKeys */ .dj)(_get(_getPrototypeOf(OverriddenStyleAttributor), "keys", this), node, _utils__WEBPACK_IMPORTED_MODULE_2__/* .KeyNameType.style */ .WT.style);
    }
  }]);
  return OverriddenStyleAttributor;
}(parchment__WEBPACK_IMPORTED_MODULE_0__.StyleAttributor);


/***/ }),

/***/ 3398:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "WT": () => (/* binding */ KeyNameType),
/* harmony export */   "jf": () => (/* binding */ getKeyNameWithCustomPrefix),
/* harmony export */   "mQ": () => (/* binding */ removeCustomPrefixFromKeyName)
/* harmony export */ });
/* harmony import */ var _formats_table_attributors_table_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
/* harmony import */ var _formats_table_attributors_cell_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8252);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }


var KeyNameType = {
  attribute: 'attr',
  style: 'style'
};
var OVERRIDDEN_ATTRIBUTORS_TAG_INFO = _objectSpread(_objectSpread({}, _formats_table_attributors_table_config__WEBPACK_IMPORTED_MODULE_0__/* .tableConfig.allowedTags.reduce */ .Sp.allowedTags.reduce(function (result, tag) {
  result[tag] = {
    name: _formats_table_attributors_table_config__WEBPACK_IMPORTED_MODULE_0__/* .tableConfig.name */ .Sp.name,
    keyNamesSet: _formats_table_attributors_table_config__WEBPACK_IMPORTED_MODULE_0__/* .TABLE_KEY_NAME_SET */ .bc
  };
  return result;
}, {})), _formats_table_attributors_cell_config__WEBPACK_IMPORTED_MODULE_1__/* .cellConfig.allowedTags.reduce */ .Pw.allowedTags.reduce(function (result, tag) {
  result[tag] = {
    name: _formats_table_attributors_cell_config__WEBPACK_IMPORTED_MODULE_1__/* .cellConfig.name */ .Pw.name,
    keyNamesSet: _formats_table_attributors_cell_config__WEBPACK_IMPORTED_MODULE_1__/* .TABLE_CELL_KEY_NAME_SET */ .fU
  };
  return result;
}, {}));
function getKeyNameWithCustomPrefix(tagName, keyName, keyType) {
  var tagInfo = OVERRIDDEN_ATTRIBUTORS_TAG_INFO[tagName];
  if (!tagInfo) {
    return keyName;
  }
  return tagInfo.keyNamesSet.has(keyName) ? "".concat(keyType).concat(tagInfo.name, "_").concat(keyName) : keyName;
}
function removeCustomPrefixFromKeyName(keyNameWithPrefix) {
  return keyNameWithPrefix.replace(/([^]*_)/, '');
}

/***/ }),

/***/ 6446:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "i2": () => (/* binding */ BlockEmbed),
  "qz": () => (/* binding */ blockDelta),
  "E2": () => (/* binding */ bubbleFormats),
  "ZP": () => (/* binding */ Block)
});

// EXTERNAL MODULE: ./node_modules/quill-delta/dist/Delta.js
var Delta = __webpack_require__(9098);
var Delta_default = /*#__PURE__*/__webpack_require__.n(Delta);
// EXTERNAL MODULE: ./node_modules/parchment/src/parchment.ts + 17 modules
var parchment = __webpack_require__(1233);
// EXTERNAL MODULE: ./blots/break.js
var blots_break = __webpack_require__(4122);
// EXTERNAL MODULE: ./blots/inline.js
var inline = __webpack_require__(6603);
// EXTERNAL MODULE: ./blots/text.js
var blots_text = __webpack_require__(8222);
// EXTERNAL MODULE: ./attributors/utils.js
var utils = __webpack_require__(3398);
;// CONCATENATED MODULE: ./parchment/override.js



function fillAttributes(tagName, blot, keyNames, keyType) {
  return keyNames.map((keyName) => {
    const normalizedKeyName = keyType
      ? (0,utils/* getKeyNameWithCustomPrefix */.jf)(tagName, keyName, keyType)
      : keyName;
    return blot.scroll.query(normalizedKeyName, parchment.Scope.ATTRIBUTE);
  }).filter((attributor) => attributor instanceof parchment.Attributor)
    .reduce((result, attributor) => {
      result[attributor.attrName] = attributor;
      return result;
    }, {});
}

function overrideParchment() {
  // eslint-disable-next-line no-undef, func-names
  parchment.AttributorStore.prototype.build = function () {
    const { tagName } = this.domNode;
    const blot = parchment.Registry.find(this.domNode);
    if (blot == null) {
      return;
    }

    const attributes = parchment.Attributor.keys(this.domNode);
    const classes = parchment.ClassAttributor.keys(this.domNode);
    const styles = parchment.StyleAttributor.keys(this.domNode);

    this.attributes = {
      ...fillAttributes(tagName, blot, attributes, utils/* KeyNameType.attribute */.WT.attribute),
      ...fillAttributes(tagName, blot, classes),
      ...fillAttributes(tagName, blot, styles, utils/* KeyNameType.style */.WT.style),
    };
  };
}

;// CONCATENATED MODULE: ./blots/block.js
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }






overrideParchment();
var NEWLINE_LENGTH = 1;
var Block = /*#__PURE__*/function (_BlockBlot) {
  _inherits(Block, _BlockBlot);
  var _super = _createSuper(Block);
  function Block(scroll, domNode) {
    var _this;
    _classCallCheck(this, Block);
    _this = _super.call(this, scroll, domNode);
    _this.cache = {};
    return _this;
  }
  _createClass(Block, [{
    key: "delta",
    value: function delta() {
      if (this.cache.delta == null) {
        this.cache.delta = blockDelta(this);
      }
      return this.cache.delta;
    }
  }, {
    key: "deleteAt",
    value: function deleteAt(index, length) {
      _get(_getPrototypeOf(Block.prototype), "deleteAt", this).call(this, index, length);
      this.cache = {};
    }
  }, {
    key: "formatAt",
    value: function formatAt(index, length, name, value) {
      if (length <= 0) return;
      if (this.scroll.query(name, parchment.Scope.BLOCK)) {
        if (index + length === this.length()) {
          this.format(name, value);
        }
      } else {
        _get(_getPrototypeOf(Block.prototype), "formatAt", this).call(this, index, Math.min(length, this.length() - index - 1), name, value);
      }
      this.cache = {};
    }
  }, {
    key: "insertAt",
    value: function insertAt(index, value, def) {
      if (def != null) {
        _get(_getPrototypeOf(Block.prototype), "insertAt", this).call(this, index, value, def);
        this.cache = {};
        return;
      }
      if (value.length === 0) return;
      var lines = value.split('\n');
      var text = lines.shift();
      if (text.length > 0) {
        if (index < this.length() - 1 || this.children.tail == null) {
          _get(_getPrototypeOf(Block.prototype), "insertAt", this).call(this, Math.min(index, this.length() - 1), text);
        } else {
          this.children.tail.insertAt(this.children.tail.length(), text);
        }
        this.cache = {};
      }
      var block = this;
      lines.reduce(function (lineIndex, line) {
        block = block.split(lineIndex, true);
        block.insertAt(0, line);
        return line.length;
      }, index + text.length);
    }
  }, {
    key: "insertBefore",
    value: function insertBefore(blot, ref) {
      var head = this.children.head;

      // NOTE: This condition is necessary for correct composition events handling on Android devices.
      if (!ref || this.domNode.contains(ref.domNode)) {
        _get(_getPrototypeOf(Block.prototype), "insertBefore", this).call(this, blot, ref);
      }
      if (head instanceof blots_break/* default */.Z) {
        head.remove();
      }
      this.cache = {};
    }
  }, {
    key: "length",
    value: function length() {
      if (this.cache.length == null) {
        this.cache.length = _get(_getPrototypeOf(Block.prototype), "length", this).call(this) + NEWLINE_LENGTH;
      }
      return this.cache.length;
    }
  }, {
    key: "moveChildren",
    value: function moveChildren(target, ref) {
      _get(_getPrototypeOf(Block.prototype), "moveChildren", this).call(this, target, ref);
      this.cache = {};
    }
  }, {
    key: "optimize",
    value: function optimize(context) {
      _get(_getPrototypeOf(Block.prototype), "optimize", this).call(this, context);
      this.cache = {};
    }
  }, {
    key: "path",
    value: function path(index) {
      return _get(_getPrototypeOf(Block.prototype), "path", this).call(this, index, true);
    }
  }, {
    key: "removeChild",
    value: function removeChild(child) {
      _get(_getPrototypeOf(Block.prototype), "removeChild", this).call(this, child);
      this.cache = {};
    }
  }, {
    key: "split",
    value: function split(index) {
      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {
        var clone = this.clone();
        if (index === 0) {
          this.parent.insertBefore(clone, this);
          return this;
        }
        this.parent.insertBefore(clone, this.next);
        return clone;
      }
      var next = _get(_getPrototypeOf(Block.prototype), "split", this).call(this, index, force);
      this.cache = {};
      return next;
    }
  }]);
  return Block;
}(parchment.BlockBlot);
Block.blotName = 'block';
Block.tagName = 'P';
Block.defaultChild = blots_break/* default */.Z;
Block.allowedChildren = [blots_break/* default */.Z, inline/* default */.Z, parchment.EmbedBlot, blots_text/* default */.Z];
var BlockEmbed = /*#__PURE__*/function (_EmbedBlot) {
  _inherits(BlockEmbed, _EmbedBlot);
  var _super2 = _createSuper(BlockEmbed);
  function BlockEmbed() {
    _classCallCheck(this, BlockEmbed);
    return _super2.apply(this, arguments);
  }
  _createClass(BlockEmbed, [{
    key: "attach",
    value: function attach() {
      _get(_getPrototypeOf(BlockEmbed.prototype), "attach", this).call(this);
      this.attributes = new parchment.AttributorStore(this.domNode);
    }
  }, {
    key: "delta",
    value: function delta() {
      return new (Delta_default())().insert(this.value(), _objectSpread(_objectSpread({}, this.formats()), this.attributes.values()));
    }
  }, {
    key: "format",
    value: function format(name, value) {
      var attribute = this.scroll.query(name, parchment.Scope.BLOCK_ATTRIBUTE);
      if (attribute != null) {
        this.attributes.attribute(attribute, value);
      }
    }
  }, {
    key: "formatAt",
    value: function formatAt(index, length, name, value) {
      this.format(name, value);
    }
  }, {
    key: "insertAt",
    value: function insertAt(index, value, def) {
      if (typeof value === 'string' && value.endsWith('\n')) {
        var block = this.scroll.create(Block.blotName);
        this.parent.insertBefore(block, index === 0 ? this : this.next);
        block.insertAt(0, value.slice(0, -1));
      } else {
        _get(_getPrototypeOf(BlockEmbed.prototype), "insertAt", this).call(this, index, value, def);
      }
    }
  }]);
  return BlockEmbed;
}(parchment.EmbedBlot);
BlockEmbed.scope = parchment.Scope.BLOCK_BLOT;
// It is important for cursor behavior BlockEmbeds use tags that are block level elements

function blockDelta(blot) {
  var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  return blot.descendants(parchment.LeafBlot).reduce(function (delta, leaf) {
    if (leaf.length() === 0) {
      return delta;
    }
    return delta.insert(leaf.value(), bubbleFormats(leaf, {}, filter));
  }, new (Delta_default())()).insert('\n', bubbleFormats(blot));
}
function bubbleFormats(blot) {
  var formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  if (blot == null) return formats;
  if (typeof blot.formats === 'function') {
    formats = _objectSpread(_objectSpread({}, formats), blot.formats());
    if (filter) {
      // exclude syntax highlighting from deltas and getFormat()
      delete formats['code-token'];
    }
  }
  if (blot.parent == null || blot.parent.statics.blotName === 'scroll' || blot.parent.statics.scope !== blot.statics.scope) {
    return formats;
  }
  return bubbleFormats(blot.parent, formats, filter);
}


/***/ }),

/***/ 4122:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var Break = /*#__PURE__*/function (_EmbedBlot) {
  _inherits(Break, _EmbedBlot);
  var _super = _createSuper(Break);
  function Break() {
    _classCallCheck(this, Break);
    return _super.apply(this, arguments);
  }
  _createClass(Break, [{
    key: "optimize",
    value: function optimize() {
      if (this.prev || this.next) {
        this.remove();
      }
    }
  }, {
    key: "length",
    value: function length() {
      return 0;
    }
  }, {
    key: "value",
    value: function value() {
      return '';
    }
  }], [{
    key: "value",
    value: function value() {
      return undefined;
    }
  }]);
  return Break;
}(parchment__WEBPACK_IMPORTED_MODULE_0__.EmbedBlot);
Break.blotName = 'break';
Break.tagName = 'BR';
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Break);

/***/ }),

/***/ 3553:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var Container = /*#__PURE__*/function (_ContainerBlot) {
  _inherits(Container, _ContainerBlot);
  var _super = _createSuper(Container);
  function Container() {
    _classCallCheck(this, Container);
    return _super.apply(this, arguments);
  }
  return _createClass(Container);
}(parchment__WEBPACK_IMPORTED_MODULE_0__.ContainerBlot);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Container);

/***/ }),

/***/ 3657:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8222);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var Cursor = /*#__PURE__*/function (_EmbedBlot) {
  _inherits(Cursor, _EmbedBlot);
  var _super = _createSuper(Cursor);
  function Cursor(scroll, domNode, selection) {
    var _this;
    _classCallCheck(this, Cursor);
    _this = _super.call(this, scroll, domNode);
    _this.selection = selection;
    _this.textNode = document.createTextNode(Cursor.CONTENTS);
    _this.domNode.appendChild(_this.textNode);
    _this.savedLength = 0;
    return _this;
  }
  _createClass(Cursor, [{
    key: "detach",
    value: function detach() {
      // super.detach() will also clear domNode.__blot
      if (this.parent != null) this.parent.removeChild(this);
    }
  }, {
    key: "format",
    value: function format(name, value) {
      if (this.savedLength !== 0) {
        _get(_getPrototypeOf(Cursor.prototype), "format", this).call(this, name, value);
        return;
      }
      var target = this;
      var index = 0;
      while (target != null && target.statics.scope !== parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.BLOCK_BLOT) {
        index += target.offset(target.parent);
        target = target.parent;
      }
      if (target != null) {
        this.savedLength = Cursor.CONTENTS.length;
        target.optimize();
        target.formatAt(index, Cursor.CONTENTS.length, name, value);
        this.savedLength = 0;
      }
    }
  }, {
    key: "index",
    value: function index(node, offset) {
      if (node === this.textNode) return 0;
      return _get(_getPrototypeOf(Cursor.prototype), "index", this).call(this, node, offset);
    }
  }, {
    key: "length",
    value: function length() {
      return this.savedLength;
    }
  }, {
    key: "position",
    value: function position() {
      return [this.textNode, this.textNode.data.length];
    }
  }, {
    key: "remove",
    value: function remove() {
      _get(_getPrototypeOf(Cursor.prototype), "remove", this).call(this);
      this.parent = null;
    }
  }, {
    key: "restore",
    value: function restore() {
      if (this.selection.composing || this.parent == null) return null;
      var range = this.selection.getNativeRange();
      // Link format will insert text outside of anchor tag
      while (this.domNode.lastChild != null && this.domNode.lastChild !== this.textNode) {
        this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode);
      }
      var prevTextBlot = this.prev instanceof _text__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z ? this.prev : null;
      var prevTextLength = prevTextBlot ? prevTextBlot.length() : 0;
      var nextTextBlot = this.next instanceof _text__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z ? this.next : null;
      var nextText = nextTextBlot ? nextTextBlot.text : '';
      var textNode = this.textNode;
      // take text from inside this blot and reset it
      var newText = textNode.data.split(Cursor.CONTENTS).join('');
      textNode.data = Cursor.CONTENTS;

      // proactively merge TextBlots around cursor so that optimization
      // doesn't lose the cursor.  the reason we are here in cursor.restore
      // could be that the user clicked in prevTextBlot or nextTextBlot, or
      // the user typed something.
      var mergedTextBlot;
      if (prevTextBlot) {
        mergedTextBlot = prevTextBlot;
        if (newText || nextTextBlot) {
          prevTextBlot.insertAt(prevTextBlot.length(), newText + nextText);
          if (nextTextBlot) {
            nextTextBlot.remove();
          }
        }
      } else if (nextTextBlot) {
        mergedTextBlot = nextTextBlot;
        nextTextBlot.insertAt(0, newText);
      } else {
        var newTextNode = document.createTextNode(newText);
        mergedTextBlot = this.scroll.create(newTextNode);
        this.parent.insertBefore(mergedTextBlot, this);
      }
      this.remove();
      if (range) {
        // calculate selection to restore
        var remapOffset = function remapOffset(node, offset) {
          if (prevTextBlot && node === prevTextBlot.domNode) {
            return offset;
          }
          if (node === textNode) {
            return prevTextLength + offset - 1;
          }
          if (nextTextBlot && node === nextTextBlot.domNode) {
            return prevTextLength + newText.length + offset;
          }
          return null;
        };
        var start = remapOffset(range.start.node, range.start.offset);
        var end = remapOffset(range.end.node, range.end.offset);
        if (start !== null && end !== null) {
          return {
            startNode: mergedTextBlot.domNode,
            startOffset: start,
            endNode: mergedTextBlot.domNode,
            endOffset: end
          };
        }
      }
      return null;
    }
  }, {
    key: "update",
    value: function update(mutations, context) {
      var _this2 = this;
      if (mutations.some(function (mutation) {
        return mutation.type === 'characterData' && mutation.target === _this2.textNode;
      })) {
        var range = this.restore();
        if (range) context.range = range;
      }
    }
  }, {
    key: "value",
    value: function value() {
      return '';
    }
  }], [{
    key: "value",
    value: function value() {
      return undefined;
    }
  }]);
  return Cursor;
}(parchment__WEBPACK_IMPORTED_MODULE_0__.EmbedBlot);
Cursor.blotName = 'cursor';
Cursor.className = 'ql-cursor';
Cursor.tagName = 'span';
Cursor.CONTENTS = "\uFEFF"; // Zero width no break space

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Cursor);

/***/ }),

/***/ 7452:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8222);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var GUARD_TEXT = "\uFEFF";
var Embed = /*#__PURE__*/function (_EmbedBlot) {
  _inherits(Embed, _EmbedBlot);
  var _super = _createSuper(Embed);
  function Embed(scroll, node) {
    var _this;
    _classCallCheck(this, Embed);
    _this = _super.call(this, scroll, node);
    _this.contentNode = document.createElement('span');
    _this.contentNode.setAttribute('contenteditable', false);
    Array.from(_this.domNode.childNodes).forEach(function (childNode) {
      _this.contentNode.appendChild(childNode);
    });
    _this.leftGuard = document.createTextNode(GUARD_TEXT);
    _this.rightGuard = document.createTextNode(GUARD_TEXT);
    _this.domNode.appendChild(_this.leftGuard);
    _this.domNode.appendChild(_this.contentNode);
    _this.domNode.appendChild(_this.rightGuard);
    return _this;
  }
  _createClass(Embed, [{
    key: "index",
    value: function index(node, offset) {
      if (node === this.leftGuard) return 0;
      if (node === this.rightGuard) return 1;
      return _get(_getPrototypeOf(Embed.prototype), "index", this).call(this, node, offset);
    }
  }, {
    key: "restore",
    value: function restore(node) {
      var range;
      var textNode;
      var text = node.data.split(GUARD_TEXT).join('');
      if (node === this.leftGuard) {
        if (this.prev instanceof _text__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z) {
          var prevLength = this.prev.length();
          this.prev.insertAt(prevLength, text);
          range = {
            startNode: this.prev.domNode,
            startOffset: prevLength + text.length
          };
        } else {
          textNode = document.createTextNode(text);
          this.parent.insertBefore(this.scroll.create(textNode), this);
          range = {
            startNode: textNode,
            startOffset: text.length
          };
        }
      } else if (node === this.rightGuard) {
        if (this.next instanceof _text__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z) {
          this.next.insertAt(0, text);
          range = {
            startNode: this.next.domNode,
            startOffset: text.length
          };
        } else {
          textNode = document.createTextNode(text);
          this.parent.insertBefore(this.scroll.create(textNode), this.next);
          range = {
            startNode: textNode,
            startOffset: text.length
          };
        }
      }
      node.data = GUARD_TEXT;
      return range;
    }
  }, {
    key: "update",
    value: function update(mutations, context) {
      var _this2 = this;
      mutations.forEach(function (mutation) {
        if (mutation.type === 'characterData' && (mutation.target === _this2.leftGuard || mutation.target === _this2.rightGuard)) {
          var range = _this2.restore(mutation.target);
          if (range) context.range = range;
        }
      });
    }
  }]);
  return Embed;
}(parchment__WEBPACK_IMPORTED_MODULE_0__.EmbedBlot);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Embed);

/***/ }),

/***/ 6603:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var _break__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4122);
/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8222);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var Inline = /*#__PURE__*/function (_InlineBlot) {
  _inherits(Inline, _InlineBlot);
  var _super = _createSuper(Inline);
  function Inline() {
    _classCallCheck(this, Inline);
    return _super.apply(this, arguments);
  }
  _createClass(Inline, [{
    key: "formatAt",
    value: function formatAt(index, length, name, value) {
      if (Inline.compare(this.statics.blotName, name) < 0 && this.scroll.query(name, parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.BLOT)) {
        var blot = this.isolate(index, length);
        if (value) {
          blot.wrap(name, value);
        }
      } else {
        _get(_getPrototypeOf(Inline.prototype), "formatAt", this).call(this, index, length, name, value);
      }
    }
  }, {
    key: "optimize",
    value: function optimize(context) {
      _get(_getPrototypeOf(Inline.prototype), "optimize", this).call(this, context);
      if (this.parent instanceof Inline && Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {
        var parent = this.parent.isolate(this.offset(), this.length());
        this.moveChildren(parent);
        parent.wrap(this);
      }
    }
  }], [{
    key: "compare",
    value: function compare(self, other) {
      var selfIndex = Inline.order.indexOf(self);
      var otherIndex = Inline.order.indexOf(other);
      if (selfIndex >= 0 || otherIndex >= 0) {
        return selfIndex - otherIndex;
      }
      if (self === other) {
        return 0;
      }
      if (self < other) {
        return -1;
      }
      return 1;
    }
  }]);
  return Inline;
}(parchment__WEBPACK_IMPORTED_MODULE_0__.InlineBlot);
Inline.allowedChildren = [Inline, _break__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, parchment__WEBPACK_IMPORTED_MODULE_0__.EmbedBlot, _text__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z];
// Lower index means deeper in the DOM tree, since not found (-1) is for embeds
Inline.order = ['cursor', 'inline',
// Must be lower
'link',
// Chrome wants <a> to be lower
'underline', 'strike', 'italic', 'bold', 'script', 'code' // Must be higher
];

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Inline);

/***/ }),

/***/ 3272:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var _core_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2069);
/* harmony import */ var _block__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6446);
/* harmony import */ var _break__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4122);
/* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3553);
/* harmony import */ var _formats_table__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1969);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }






function isLine(blot) {
  return blot instanceof _block__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP || blot instanceof _block__WEBPACK_IMPORTED_MODULE_2__/* .BlockEmbed */ .i2;
}
var Scroll = /*#__PURE__*/function (_ScrollBlot) {
  _inherits(Scroll, _ScrollBlot);
  var _super = _createSuper(Scroll);
  function Scroll(registry, domNode, _ref) {
    var _this;
    var emitter = _ref.emitter,
      toggleBlankClass = _ref.toggleBlankClass;
    _classCallCheck(this, Scroll);
    _this = _super.call(this, registry, domNode);
    _this.emitter = emitter;
    _this.toggleBlankClass = toggleBlankClass;
    _this.batch = false;
    _this.optimize();
    _this.enable();
    _this.domNode.addEventListener('dragstart', function (e) {
      return _this.handleDragStart(e);
    });
    return _this;
  }
  _createClass(Scroll, [{
    key: "batchStart",
    value: function batchStart() {
      if (!Array.isArray(this.batch)) {
        this.batch = [];
      }
    }
  }, {
    key: "batchEnd",
    value: function batchEnd() {
      var mutations = this.batch;
      this.batch = false;
      this.update(mutations);
    }
  }, {
    key: "emitMount",
    value: function emitMount(blot) {
      this.emitter.emit(_core_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.SCROLL_BLOT_MOUNT */ .Z.events.SCROLL_BLOT_MOUNT, blot);
    }
  }, {
    key: "emitUnmount",
    value: function emitUnmount(blot) {
      this.emitter.emit(_core_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.SCROLL_BLOT_UNMOUNT */ .Z.events.SCROLL_BLOT_UNMOUNT, blot);
    }
  }, {
    key: "deleteAt",
    value: function deleteAt(index, length) {
      var _this$line = this.line(index),
        _this$line2 = _slicedToArray(_this$line, 2),
        first = _this$line2[0],
        offset = _this$line2[1];
      var _this$line3 = this.line(index + length),
        _this$line4 = _slicedToArray(_this$line3, 1),
        last = _this$line4[0];
      _get(_getPrototypeOf(Scroll.prototype), "deleteAt", this).call(this, index, length);
      if (last != null && first !== last && offset > 0) {
        var isCrossCellDelete = (first instanceof _formats_table__WEBPACK_IMPORTED_MODULE_5__/* .CellLine */ .zW || last instanceof _formats_table__WEBPACK_IMPORTED_MODULE_5__/* .CellLine */ .zW) && first.parent !== last.parent;
        var includesEmbedBlock = first instanceof _block__WEBPACK_IMPORTED_MODULE_2__/* .BlockEmbed */ .i2 || last instanceof _block__WEBPACK_IMPORTED_MODULE_2__/* .BlockEmbed */ .i2;
        if (!includesEmbedBlock && !isCrossCellDelete) {
          var ref = last.children.head instanceof _break__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z ? null : last.children.head;
          first.moveChildren(last, ref);
          first.remove();
        }
      }
      this.optimize();
    }
  }, {
    key: "enable",
    value: function enable() {
      var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
      this.domNode.setAttribute('contenteditable', enabled);
    }
  }, {
    key: "formatAt",
    value: function formatAt(index, length, format, value) {
      _get(_getPrototypeOf(Scroll.prototype), "formatAt", this).call(this, index, length, format, value);
      this.optimize();
    }
  }, {
    key: "handleDragStart",
    value: function handleDragStart(event) {
      event.preventDefault();
    }
  }, {
    key: "insertAt",
    value: function insertAt(index, value, def) {
      if (index >= this.length()) {
        if (def == null || this.scroll.query(value, parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.BLOCK) == null) {
          var blot = this.scroll.create(this.statics.defaultChild.blotName);
          this.appendChild(blot);
          if (def == null && value.endsWith('\n')) {
            blot.insertAt(0, value.slice(0, -1), def);
          } else {
            blot.insertAt(0, value, def);
          }
        } else {
          var embed = this.scroll.create(value, def);
          this.appendChild(embed);
        }
      } else {
        _get(_getPrototypeOf(Scroll.prototype), "insertAt", this).call(this, index, value, def);
      }
      this.optimize();
    }
  }, {
    key: "insertBefore",
    value: function insertBefore(blot, ref) {
      if (blot.statics.scope === parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.INLINE_BLOT) {
        var wrapper = this.scroll.create(this.statics.defaultChild.blotName);
        wrapper.appendChild(blot);
        _get(_getPrototypeOf(Scroll.prototype), "insertBefore", this).call(this, wrapper, ref);
      } else {
        _get(_getPrototypeOf(Scroll.prototype), "insertBefore", this).call(this, blot, ref);
      }
    }
  }, {
    key: "isEnabled",
    value: function isEnabled() {
      return this.domNode.getAttribute('contenteditable') === 'true';
    }
  }, {
    key: "leaf",
    value: function leaf(index) {
      return this.path(index).pop() || [null, -1];
    }
  }, {
    key: "line",
    value: function line(index) {
      if (index === this.length()) {
        return this.line(index - 1);
      }
      return this.descendant(isLine, index);
    }
  }, {
    key: "lines",
    value: function lines() {
      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;
      var getLines = function getLines(blot, blotIndex, blotLength) {
        var lines = [];
        var lengthLeft = blotLength;
        blot.children.forEachAt(blotIndex, blotLength, function (child, childIndex, childLength) {
          if (isLine(child)) {
            lines.push(child);
          } else if (child instanceof parchment__WEBPACK_IMPORTED_MODULE_0__.ContainerBlot) {
            lines = lines.concat(getLines(child, childIndex, lengthLeft));
          }
          lengthLeft -= childLength;
        });
        return lines;
      };
      return getLines(this, index, length);
    }
  }, {
    key: "optimize",
    value: function optimize() {
      var mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      if (this.batch) return;
      _get(_getPrototypeOf(Scroll.prototype), "optimize", this).call(this, mutations, context);
      if (mutations.length > 0) {
        this.emitter.emit(_core_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.SCROLL_OPTIMIZE */ .Z.events.SCROLL_OPTIMIZE, mutations, context);
      }
    }
  }, {
    key: "path",
    value: function path(index) {
      return _get(_getPrototypeOf(Scroll.prototype), "path", this).call(this, index).slice(1); // Exclude self
    }
  }, {
    key: "remove",
    value: function remove() {
      // Never remove self
    }
  }, {
    key: "update",
    value: function update(mutations) {
      var _this2 = this;
      if (this.batch) {
        if (Array.isArray(mutations)) {
          this.batch = this.batch.concat(mutations);
          this.toggleBlankClass();
        }
        return;
      }
      var source = _core_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].sources.USER */ .Z.sources.USER;
      if (typeof mutations === 'string') {
        source = mutations;
      }
      if (!Array.isArray(mutations)) {
        mutations = this.observer.takeRecords();
      }
      mutations = mutations.filter(function (_ref2) {
        var target = _ref2.target;
        var blot = _this2.find(target, true);
        return blot && blot.scroll === _this2;
      });
      if (mutations.length > 0) {
        this.emitter.emit(_core_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.SCROLL_BEFORE_UPDATE */ .Z.events.SCROLL_BEFORE_UPDATE, source, mutations);
      }
      _get(_getPrototypeOf(Scroll.prototype), "update", this).call(this, mutations.concat([])); // pass copy
      if (mutations.length > 0) {
        this.emitter.emit(_core_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.SCROLL_UPDATE */ .Z.events.SCROLL_UPDATE, source, mutations);
      }
    }
  }]);
  return Scroll;
}(parchment__WEBPACK_IMPORTED_MODULE_0__.ScrollBlot);
Scroll.blotName = 'scroll';
Scroll.className = 'ql-editor';
Scroll.tagName = 'DIV';
Scroll.defaultChild = _block__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP;
Scroll.allowedChildren = [_block__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP, _block__WEBPACK_IMPORTED_MODULE_2__/* .BlockEmbed */ .i2, _container__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z];
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Scroll);

/***/ }),

/***/ 8222:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ Text),
/* harmony export */   "b": () => (/* binding */ escapeText)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var Text = /*#__PURE__*/function (_TextBlot) {
  _inherits(Text, _TextBlot);
  var _super = _createSuper(Text);
  function Text() {
    _classCallCheck(this, Text);
    return _super.apply(this, arguments);
  }
  return _createClass(Text);
}(parchment__WEBPACK_IMPORTED_MODULE_0__.TextBlot);
function escapeText(text) {
  return text.replace(/[&<>"']/g, function (s) {
    // https://lodash.com/docs#escape
    var entityMap = {
      '&': '&amp;',
      '<': '&lt;',
      '>': '&gt;',
      '"': '&quot;',
      "'": '&#39;'
    };
    return entityMap[s];
  });
}

// eslint-disable-next-line no-restricted-exports


/***/ }),

/***/ 2432:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _core_quill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(281);
/* harmony import */ var _blots_block__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6446);
/* harmony import */ var _blots_break__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4122);
/* harmony import */ var _blots_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3553);
/* harmony import */ var _blots_cursor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3657);
/* harmony import */ var _blots_embed__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7452);
/* harmony import */ var _blots_inline__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6603);
/* harmony import */ var _blots_scroll__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3272);
/* harmony import */ var _blots_text__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8222);
/* harmony import */ var _modules_clipboard__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(5635);
/* harmony import */ var _modules_history__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2613);
/* harmony import */ var _modules_keyboard__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(3071);
/* harmony import */ var _modules_uploader__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(3859);
/* harmony import */ var _modules_input__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(990);














_core_quill__WEBPACK_IMPORTED_MODULE_0__/* ["default"].register */ .ZP.register({
  'blots/block': _blots_block__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP,
  'blots/block/embed': _blots_block__WEBPACK_IMPORTED_MODULE_1__/* .BlockEmbed */ .i2,
  'blots/break': _blots_break__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z,
  'blots/container': _blots_container__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z,
  'blots/cursor': _blots_cursor__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z,
  'blots/embed': _blots_embed__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z,
  'blots/inline': _blots_inline__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z,
  'blots/scroll': _blots_scroll__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z,
  'blots/text': _blots_text__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z,
  'modules/clipboard': _modules_clipboard__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP,
  'modules/history': _modules_history__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z,
  'modules/keyboard': _modules_keyboard__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .ZP,
  'modules/uploader': _modules_uploader__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z,
  'modules/input': _modules_input__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_core_quill__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP);

/***/ }),

/***/ 6229:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _blots_embed__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7452);
/* harmony import */ var _emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2069);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }


var Composition = /*#__PURE__*/function () {
  function Composition(scroll, emitter) {
    var _this = this;
    _classCallCheck(this, Composition);
    this.scroll = scroll;
    this.emitter = emitter;
    this.isComposing = false;
    scroll.domNode.addEventListener('compositionstart', function (event) {
      if (!_this.isComposing) {
        _this.handleCompositionStart(event);
      }
    });
    scroll.domNode.addEventListener('compositionend', function (event) {
      if (_this.isComposing) {
        _this.handleCompositionEnd(event);
      }
    });
  }
  _createClass(Composition, [{
    key: "isCompositionInProgress",
    value: function isCompositionInProgress() {
      return this.isComposing;
    }
  }, {
    key: "handleCompositionStart",
    value: function handleCompositionStart(event) {
      var blot = event.target instanceof Node ? this.scroll.find(event.target, true) : null;
      if (blot && !(blot instanceof _blots_embed__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)) {
        this.emitter.emit(_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.COMPOSITION_BEFORE_START */ .Z.events.COMPOSITION_BEFORE_START, event);
        this.scroll.batchStart();
        this.emitter.emit(_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.COMPOSITION_START */ .Z.events.COMPOSITION_START, event);
        this.isComposing = true;
      }
    }
  }, {
    key: "handleCompositionEnd",
    value: function handleCompositionEnd(event) {
      this.emitter.emit(_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.COMPOSITION_BEFORE_END */ .Z.events.COMPOSITION_BEFORE_END, event);
      this.scroll.batchEnd();
      this.emitter.emit(_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.COMPOSITION_END */ .Z.events.COMPOSITION_END, event);
      this.isComposing = false;
    }
  }]);
  return Composition;
}();
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Composition);

/***/ }),

/***/ 2861:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": () => (/* binding */ editor)
});

// EXTERNAL MODULE: ./node_modules/lodash.clonedeep/index.js
var lodash_clonedeep = __webpack_require__(8805);
var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);
// EXTERNAL MODULE: ./node_modules/lodash.isequal/index.js
var lodash_isequal = __webpack_require__(2722);
var lodash_isequal_default = /*#__PURE__*/__webpack_require__.n(lodash_isequal);
// EXTERNAL MODULE: ./node_modules/lodash.merge/index.js
var lodash_merge = __webpack_require__(732);
var lodash_merge_default = /*#__PURE__*/__webpack_require__.n(lodash_merge);
// EXTERNAL MODULE: ./node_modules/quill-delta/dist/Delta.js
var Delta = __webpack_require__(9098);
var Delta_default = /*#__PURE__*/__webpack_require__.n(Delta);
// EXTERNAL MODULE: ./node_modules/parchment/src/parchment.ts + 17 modules
var parchment = __webpack_require__(1233);
// EXTERNAL MODULE: ./core/selection.js
var selection = __webpack_require__(7800);
// EXTERNAL MODULE: ./blots/cursor.js
var cursor = __webpack_require__(3657);
// EXTERNAL MODULE: ./blots/block.js + 1 modules
var blots_block = __webpack_require__(6446);
// EXTERNAL MODULE: ./blots/break.js
var blots_break = __webpack_require__(4122);
// EXTERNAL MODULE: ./blots/text.js
var blots_text = __webpack_require__(8222);
;// CONCATENATED MODULE: ./utils/remove_class.js
function removeClass(node, className) {
  node.classList.remove(className);
  if (node.classList.length === 0) {
    node.removeAttribute('class');
  }
}
// EXTERNAL MODULE: ./utils/is_defined.js
var is_defined = __webpack_require__(5874);
;// CONCATENATED MODULE: ./core/editor.js
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }












var ASCII = /^[ -~]*$/;
var Editor = /*#__PURE__*/function () {
  function Editor(scroll) {
    _classCallCheck(this, Editor);
    this.scroll = scroll;
    this.delta = this.getDelta();
    this.immediateFormats = new Set();
  }
  _createClass(Editor, [{
    key: "addImmediateFormat",
    value: function addImmediateFormat(name) {
      this.immediateFormats.add(name);
    }
  }, {
    key: "applyDelta",
    value: function applyDelta(delta) {
      var _this = this;
      this.scroll.update();
      var scrollLength = this.scroll.length();
      this.scroll.batchStart();
      var normalizedDelta = normalizeDelta(delta);
      var deleteDelta = new (Delta_default())();
      normalizedDelta.reduce(function (index, op) {
        var length = Delta.Op.length(op);
        var attributes = op.attributes || {};
        var addedNewline = false;
        if (op.insert != null) {
          deleteDelta.retain(length);
          if (typeof op.insert === 'string') {
            var text = op.insert;
            addedNewline = !text.endsWith('\n') && (scrollLength <= index || _this.scroll.descendant(blots_block/* BlockEmbed */.i2, index)[0]);
            _this.scroll.insertAt(index, text);
            var _this$scroll$line = _this.scroll.line(index),
              _this$scroll$line2 = _slicedToArray(_this$scroll$line, 2),
              line = _this$scroll$line2[0],
              offset = _this$scroll$line2[1];
            var formats = lodash_merge_default()({}, (0,blots_block/* bubbleFormats */.E2)(line));
            if (line instanceof blots_block/* default */.ZP) {
              var _line$descendant = line.descendant(parchment.LeafBlot, offset),
                _line$descendant2 = _slicedToArray(_line$descendant, 1),
                leaf = _line$descendant2[0];
              formats = lodash_merge_default()(formats, (0,blots_block/* bubbleFormats */.E2)(leaf));
            }
            attributes = Delta.AttributeMap.diff(formats, attributes) || {};
          } else if (_typeof(op.insert) === 'object') {
            var key = Object.keys(op.insert)[0]; // There should only be one key
            if (key == null) return index;
            addedNewline = _this.scroll.query(key, parchment.Scope.INLINE) != null && (scrollLength <= index || _this.scroll.descendant(blots_block/* BlockEmbed */.i2, index)[0]);
            _this.scroll.insertAt(index, key, op.insert[key]);
          }
          scrollLength += length;
        } else {
          deleteDelta.push(op);
        }
        var keys = Object.keys(attributes);
        _this.immediateFormats.forEach(function (format) {
          if (keys.indexOf(format) > -1) {
            _this.scroll.formatAt(index, length, format, attributes[format]);
            delete attributes[format];
          }
        });
        Object.keys(attributes).forEach(function (name) {
          _this.scroll.formatAt(index, length, name, attributes[name]);
        });
        var addedLength = addedNewline ? 1 : 0;
        scrollLength += addedLength;
        deleteDelta.delete(addedLength);
        return index + length + addedLength;
      }, 0);
      deleteDelta.reduce(function (index, op) {
        if (typeof op.delete === 'number') {
          _this.scroll.deleteAt(index, op.delete);
          return index;
        }
        return index + Delta.Op.length(op);
      }, 0);
      this.scroll.batchEnd();
      this.scroll.optimize();
      return this.update(normalizedDelta);
    }
  }, {
    key: "deleteText",
    value: function deleteText(index, length) {
      this.scroll.deleteAt(index, length);
      return this.update(new (Delta_default())().retain(index).delete(length));
    }
  }, {
    key: "formatLine",
    value: function formatLine(index, length) {
      var _this2 = this;
      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
      this.scroll.update();
      Object.keys(formats).forEach(function (format) {
        _this2.scroll.lines(index, Math.max(length, 1)).forEach(function (line) {
          line.format(format, formats[format]);
        });
      });
      this.scroll.optimize();
      var delta = new (Delta_default())().retain(index).retain(length, lodash_clonedeep_default()(formats));
      return this.update(delta);
    }
  }, {
    key: "formatText",
    value: function formatText(index, length) {
      var _this3 = this;
      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
      Object.keys(formats).forEach(function (format) {
        _this3.scroll.formatAt(index, length, format, formats[format]);
      });
      var delta = new (Delta_default())().retain(index).retain(length, lodash_clonedeep_default()(formats));
      return this.update(delta);
    }
  }, {
    key: "getContents",
    value: function getContents(index, length) {
      return this.delta.slice(index, index + length);
    }
  }, {
    key: "getDelta",
    value: function getDelta() {
      return this.scroll.lines().reduce(function (delta, line) {
        return delta.concat(line.delta());
      }, new (Delta_default())());
    }
  }, {
    key: "getFormat",
    value: function getFormat(index) {
      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
      var lines = [];
      var leaves = [];
      if (length === 0) {
        this.scroll.path(index).forEach(function (path) {
          var _path = _slicedToArray(path, 1),
            blot = _path[0];
          if (blot instanceof blots_block/* default */.ZP) {
            lines.push(blot);
          } else if (blot instanceof parchment.LeafBlot) {
            leaves.push(blot);
          }
        });
      } else {
        lines = this.scroll.lines(index, length);
        leaves = this.scroll.descendants(parchment.LeafBlot, index, length);
      }
      var _map = [lines, leaves].map(function (blots) {
        if (blots.length === 0) return {};
        var formats = (0,blots_block/* bubbleFormats */.E2)(blots.shift());
        while (Object.keys(formats).length > 0) {
          var blot = blots.shift();
          if (blot == null) return formats;
          formats = combineFormats((0,blots_block/* bubbleFormats */.E2)(blot), formats);
        }
        return formats;
      });
      var _map2 = _slicedToArray(_map, 2);
      lines = _map2[0];
      leaves = _map2[1];
      return _objectSpread(_objectSpread({}, lines), leaves);
    }
  }, {
    key: "getHTML",
    value: function getHTML(index, length) {
      var _this$scroll$line3 = this.scroll.line(index),
        _this$scroll$line4 = _slicedToArray(_this$scroll$line3, 2),
        line = _this$scroll$line4[0],
        lineOffset = _this$scroll$line4[1];
      if (line.length() > lineOffset + length) {
        return convertHTML(line, lineOffset, length, true);
      }
      return convertHTML(this.scroll, index, length, true);
    }
  }, {
    key: "getText",
    value: function getText(index, length) {
      return this.getContents(index, length).filter(function (op) {
        return typeof op.insert === 'string';
      }).map(function (op) {
        return op.insert;
      }).join('');
    }
  }, {
    key: "insertEmbed",
    value: function insertEmbed(index, embed, value) {
      this.scroll.insertAt(index, embed, value);
      return this.update(new (Delta_default())().retain(index).insert(_defineProperty({}, embed, value)));
    }
  }, {
    key: "insertText",
    value: function insertText(index, text) {
      var _this4 = this;
      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
      text = text.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
      this.scroll.insertAt(index, text);
      Object.keys(formats).forEach(function (format) {
        _this4.scroll.formatAt(index, text.length, format, formats[format]);
      });
      return this.update(new (Delta_default())().retain(index).insert(text, lodash_clonedeep_default()(formats)));
    }
  }, {
    key: "isBlank",
    value: function isBlank() {
      var isComposing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      if (this.scroll.children.length === 0) return true;
      if (isComposing) return false;
      if (this.scroll.children.length > 1) return false;
      var block = this.scroll.children.head;
      if (block.statics.blotName !== blots_block/* default.blotName */.ZP.blotName) return false;
      if (block.children.length > 1) return false;
      return block.children.head instanceof blots_break/* default */.Z;
    }
  }, {
    key: "removeFormat",
    value: function removeFormat(index, length) {
      var text = this.getText(index, length);
      var _this$scroll$line5 = this.scroll.line(index + length),
        _this$scroll$line6 = _slicedToArray(_this$scroll$line5, 2),
        line = _this$scroll$line6[0],
        offset = _this$scroll$line6[1];
      var suffixLength = 0;
      var suffix = new (Delta_default())();
      if (line != null) {
        suffixLength = line.length() - offset;
        suffix = line.delta().slice(offset, offset + suffixLength - 1).insert('\n');
      }
      var contents = this.getContents(index, length + suffixLength);
      var diff = contents.diff(new (Delta_default())().insert(text).concat(suffix));
      var delta = new (Delta_default())().retain(index).concat(diff);
      return this.applyDelta(delta);
    }
  }, {
    key: "update",
    value: function update(change) {
      var mutations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
      var selectionInfo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
      var oldDelta = this.delta;
      if (mutations.length === 1 && mutations[0].type === 'characterData' && mutations[0].target.data.match(ASCII) && this.scroll.find(mutations[0].target)) {
        // Optimization for character changes
        var textBlot = this.scroll.find(mutations[0].target);
        var formats = (0,blots_block/* bubbleFormats */.E2)(textBlot);
        var index = textBlot.offset(this.scroll);
        var oldValue = mutations[0].oldValue.replace(cursor/* default.CONTENTS */.Z.CONTENTS, '');
        var oldText = new (Delta_default())().insert(oldValue);
        var newText = new (Delta_default())().insert(textBlot.value());
        var relativeSelectionInfo = selectionInfo && {
          oldRange: shiftRange(selectionInfo.oldRange, -index),
          newRange: shiftRange(selectionInfo.newRange, -index)
        };
        var diffDelta = new (Delta_default())().retain(index).concat(oldText.diff(newText, relativeSelectionInfo));
        change = diffDelta.reduce(function (delta, op) {
          if (op.insert) {
            return delta.insert(op.insert, formats);
          }
          return delta.push(op);
        }, new (Delta_default())());
        this.delta = oldDelta.compose(change);
      } else {
        this.delta = this.getDelta();
        if (!change || !lodash_isequal_default()(oldDelta.compose(change), this.delta)) {
          if (!this.deltaContainsRetain(oldDelta)) {
            change = oldDelta.diff(this.delta, selectionInfo);
          }
        }
      }
      return change;
    }

    // T1200561
  }, {
    key: "deltaContainsRetain",
    value: function deltaContainsRetain(delta) {
      return delta.ops.some(function (op) {
        return (0,is_defined/* default */.Z)(op.retain);
      });
    }
  }]);
  return Editor;
}();
function convertListHTML(items, lastIndent, types) {
  if (items.length === 0) {
    var _getListType = getListType(types.pop()),
      _getListType2 = _slicedToArray(_getListType, 1),
      _endTag = _getListType2[0];
    if (lastIndent <= 0) {
      return "</li></".concat(_endTag, ">");
    }
    return "</li></".concat(_endTag, ">").concat(convertListHTML([], lastIndent - 1, types));
  }
  var _items = _toArray(items),
    _items$ = _items[0],
    child = _items$.child,
    offset = _items$.offset,
    length = _items$.length,
    indent = _items$.indent,
    type = _items$.type,
    rest = _items.slice(1);
  var _getListType3 = getListType(type, child),
    _getListType4 = _slicedToArray(_getListType3, 2),
    tag = _getListType4[0],
    attribute = _getListType4[1];
  if (indent > lastIndent) {
    types.push(type);
    if (indent === lastIndent + 1) {
      return "<".concat(tag, "><li").concat(attribute, ">").concat(convertHTML(child, offset, length)).concat(convertListHTML(rest, indent, types));
    }
    return "<".concat(tag, "><li>").concat(convertListHTML(items, lastIndent + 1, types));
  }
  var previousType = types[types.length - 1];
  if (indent === lastIndent && type === previousType) {
    return "</li><li".concat(attribute, ">").concat(convertHTML(child, offset, length)).concat(convertListHTML(rest, indent, types));
  }
  var _getListType5 = getListType(types.pop()),
    _getListType6 = _slicedToArray(_getListType5, 1),
    endTag = _getListType6[0];
  return "</li></".concat(endTag, ">").concat(convertListHTML(items, lastIndent - 1, types));
}
function convertHTML(blot, index, length) {
  var isRoot = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  if (typeof blot.html === 'function') {
    return blot.html(index, length);
  }
  if (blot instanceof blots_text/* default */.Z) {
    return (0,blots_text/* escapeText */.b)(blot.value().slice(index, index + length));
  }
  if (blot.children) {
    // TODO fix API
    if (blot.statics.blotName === 'list-container') {
      var items = [];
      blot.children.forEachAt(index, length, function (child, offset, childLength) {
        var formats = child.formats();
        items.push({
          child: child,
          offset: offset,
          length: childLength,
          indent: formats.indent || 0,
          type: formats.list
        });
      });
      return convertListHTML(items, -1, []);
    }
    var parts = [];
    blot.children.forEachAt(index, length, function (child, offset, childLength) {
      parts.push(convertHTML(child, offset, childLength));
    });
    handleBreakLine(blot.children, parts);
    if (isRoot || blot.statics.blotName === 'list') {
      return parts.join('');
    }
    var domNode = extractNodeFromBlot(blot);
    var outerHTML = domNode.outerHTML,
      innerHTML = domNode.innerHTML;
    var _outerHTML$split = outerHTML.split(">".concat(innerHTML, "<")),
      _outerHTML$split2 = _slicedToArray(_outerHTML$split, 2),
      start = _outerHTML$split2[0],
      end = _outerHTML$split2[1];
    if (start.indexOf('<table') === 0) {
      return "".concat(start.replace(/(\sdata-.+?=["'].*?["'])/g, ''), ">").concat(parts.join('').replace(/(\sdata-table.+?=["'].*?["'])/g, ''), "<").concat(end);
    }
    return "".concat(start, ">").concat(parts.join(''), "<").concat(end);
  }
  return blot.domNode.outerHTML;
}
function handleBreakLine(linkedList, parts) {
  if (linkedList.length === 1 && linkedList.head instanceof blots_break/* default */.Z) {
    parts.push('<br>');
  }
}
function extractNodeFromBlot(blot) {
  var domNode = blot.domNode.cloneNode(true);
  return removeTableServiceClasses(blot, domNode);
}
function removeTableServiceClasses(blot, domNode) {
  var BLOTS_WITH_SERVICE_CLASS = ['tableCellLine', 'tableHeaderCellLine', 'tableCell', 'tableHeaderCell'];
  if (BLOTS_WITH_SERVICE_CLASS.includes(blot.statics.blotName)) {
    removeClass(domNode, blot.statics.className);
  }
  return domNode;
}
function combineFormats(formats, combined) {
  return Object.keys(combined).reduce(function (merged, name) {
    if (formats[name] == null) return merged;
    if (combined[name] === formats[name]) {
      merged[name] = combined[name];
    } else if (Array.isArray(combined[name])) {
      if (combined[name].indexOf(formats[name]) < 0) {
        merged[name] = combined[name].concat([formats[name]]);
      }
    } else {
      merged[name] = [combined[name], formats[name]];
    }
    return merged;
  }, {});
}
function getListType(type, child) {
  var tag = type === 'ordered' ? 'ol' : 'ul';
  var attributes = child ? "".concat(getBlotNodeAttributes(child)) : '';
  switch (type) {
    case 'checked':
      return [tag, "".concat(attributes, " data-list=\"checked\"")];
    case 'unchecked':
      return [tag, "".concat(attributes, " data-list=\"unchecked\"")];
    default:
      return [tag, attributes];
  }
}
function getBlotNodeAttributes(_ref) {
  var domNode = _ref.domNode;
  if (!domNode.hasAttributes()) {
    return '';
  }
  var attributes = domNode.attributes;
  var attributesString = ' ';
  for (var i = 0; i < attributes.length; i += 1) {
    var name = attributes[i].name;
    var value = attributes[i].value;
    if (name === 'class') {
      value = removeIndentClass(value);
    }
    if (value.length && name.indexOf('data-') === -1) {
      attributesString += "".concat(name, "=\"").concat(value, "\"");
    }
  }
  return attributesString.length > 1 ? attributesString : '';
}
function removeIndentClass(classString) {
  return classString.replace(/ql-indent-\d/g, '').trim();
}
function normalizeDelta(delta) {
  return delta.reduce(function (normalizedDelta, op) {
    if (typeof op.insert === 'string') {
      var text = op.insert.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
      return normalizedDelta.insert(text, op.attributes);
    }
    return normalizedDelta.push(op);
  }, new (Delta_default())());
}
function shiftRange(_ref2, amount) {
  var index = _ref2.index,
    length = _ref2.length;
  return new selection/* Range */.e(index + amount, length);
}
/* harmony default export */ const editor = (Editor);

/***/ }),

/***/ 2069:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var eventemitter3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3034);
/* harmony import */ var eventemitter3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(eventemitter3__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utils_has_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8034);
/* harmony import */ var _instances__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2598);
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3122);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }




var debug = (0,_logger__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)('quill:events');
var EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click'];
if ((0,_utils_has_window__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)()) {
  EVENTS.forEach(function (eventName) {
    document.addEventListener(eventName, function () {
      var _event$target;
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      var event = args[0];
      var shadowRoot = event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.shadowRoot;
      var root = shadowRoot !== null && shadowRoot !== void 0 ? shadowRoot : document;
      var quillContainers = root.querySelectorAll('.ql-container');
      Array.from(quillContainers).forEach(function (node) {
        var quill = _instances__WEBPACK_IMPORTED_MODULE_1__/* ["default"].get */ .Z.get(node);
        if (quill && quill.emitter) {
          var _quill$emitter;
          (_quill$emitter = quill.emitter).handleDOM.apply(_quill$emitter, args);
        }
      });
    });
  });
}
var Emitter = /*#__PURE__*/function (_EventEmitter) {
  _inherits(Emitter, _EventEmitter);
  var _super = _createSuper(Emitter);
  function Emitter() {
    var _this;
    _classCallCheck(this, Emitter);
    _this = _super.call(this);
    _this.listeners = {};
    _this.on('error', debug.error);
    return _this;
  }
  _createClass(Emitter, [{
    key: "emit",
    value: function emit() {
      var _debug$log, _get2;
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
      (_debug$log = debug.log).call.apply(_debug$log, [debug].concat(args));
      (_get2 = _get(_getPrototypeOf(Emitter.prototype), "emit", this)).call.apply(_get2, [this].concat(args));
    }
  }, {
    key: "handleDOM",
    value: function handleDOM(event) {
      for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
        args[_key3 - 1] = arguments[_key3];
      }
      (this.listeners[event.type] || []).forEach(function (_ref) {
        var node = _ref.node,
          handler = _ref.handler;
        if (event.target === node || node.contains(event.target)) {
          handler.apply(void 0, [event].concat(args));
        }
      });
    }
  }, {
    key: "listenDOM",
    value: function listenDOM(eventName, node, handler) {
      if (!this.listeners[eventName]) {
        this.listeners[eventName] = [];
      }
      this.listeners[eventName].push({
        node: node,
        handler: handler
      });
    }
  }]);
  return Emitter;
}((eventemitter3__WEBPACK_IMPORTED_MODULE_0___default()));
Emitter.events = {
  EDITOR_CHANGE: 'editor-change',
  SCROLL_BEFORE_UPDATE: 'scroll-before-update',
  SCROLL_BLOT_MOUNT: 'scroll-blot-mount',
  SCROLL_BLOT_UNMOUNT: 'scroll-blot-unmount',
  SCROLL_OPTIMIZE: 'scroll-optimize',
  SCROLL_UPDATE: 'scroll-update',
  SELECTION_CHANGE: 'selection-change',
  TEXT_CHANGE: 'text-change',
  CONTENT_SETTED: 'content-setted',
  COMPOSITION_BEFORE_START: 'composition-before-start',
  COMPOSITION_START: 'composition-start',
  COMPOSITION_BEFORE_END: 'composition-before-end',
  COMPOSITION_END: 'composition-end'
};
Emitter.sources = {
  API: 'api',
  SILENT: 'silent',
  USER: 'user'
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Emitter);

/***/ }),

/***/ 2598:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (new WeakMap());

/***/ }),

/***/ 3122:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var levels = ['error', 'warn', 'log', 'info'];
var level = 'warn';
function debug(method) {
  if (levels.indexOf(method) <= levels.indexOf(level)) {
    var _console;
    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }
    (_console = console)[method].apply(_console, args); // eslint-disable-line no-console
  }
}

function namespace(ns) {
  return levels.reduce(function (logger, method) {
    logger[method] = debug.bind(console, method, ns);
    return logger;
  }, {});
}
namespace.level = function (newLevel) {
  level = newLevel;
};
debug.level = namespace.level;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (namespace);

/***/ }),

/***/ 7094:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Module = /*#__PURE__*/_createClass(function Module(quill) {
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  _classCallCheck(this, Module);
  this.quill = quill;
  this.options = options;
});
Module.DEFAULTS = {};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Module);

/***/ }),

/***/ 281:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ZP": () => (/* binding */ Quill)
/* harmony export */ });
/* unused harmony exports globalRegistry, expandConfig, overload */
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9098);
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quill_delta__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8805);
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(732);
/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1233);
/* harmony import */ var _editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2861);
/* harmony import */ var _emitter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2069);
/* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7094);
/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7800);
/* harmony import */ var _instances__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2598);
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3122);
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(1690);
/* harmony import */ var _utils_is_defined__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(5874);
/* harmony import */ var _composition__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(6229);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }













var debug = (0,_logger__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)('quill');
var STYLE_ATTRIBUTE_KEY = 'style-data-key';
var globalRegistry = new parchment__WEBPACK_IMPORTED_MODULE_3__.Registry();
parchment__WEBPACK_IMPORTED_MODULE_3__.ParentBlot.uiClass = 'ql-ui';
var Quill = /*#__PURE__*/function () {
  function Quill(container) {
    var _this = this;
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
    _classCallCheck(this, Quill);
    this.options = expandConfig(container, options);
    this.container = this.options.container;
    if (this.container == null) {
      // eslint-disable-next-line no-constructor-return
      return debug.error('Invalid Quill container', container);
    }
    if (this.options.debug) {
      Quill.debug(this.options.debug);
    }
    var html = this.container.innerHTML.trim();
    this.container.classList.add('ql-container');
    this.container.innerHTML = '';
    _instances__WEBPACK_IMPORTED_MODULE_8__/* ["default"].set */ .Z.set(this.container, this);
    this.root = this.addContainer('ql-editor');
    this.root.classList.add('ql-blank');
    this.scrollingContainer = this.options.scrollingContainer || this.root;
    this.emitter = new _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z();
    var ScrollBlot = this.options.registry.query(parchment__WEBPACK_IMPORTED_MODULE_3__.ScrollBlot.blotName);
    this.scroll = new ScrollBlot(this.options.registry, this.root, {
      emitter: this.emitter,
      toggleBlankClass: this.toggleBlankClass.bind(this)
    });
    this.editor = new _editor__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z(this.scroll);
    this.composition = new _composition__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z(this.scroll, this.emitter);
    this.selection = new _selection__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z(this.scroll, this.emitter, this.composition);
    this.theme = new this.options.theme(this, this.options); // eslint-disable-line new-cap
    this.keyboard = this.theme.addModule('keyboard');
    this.clipboard = this.theme.addModule('clipboard');
    this.history = this.theme.addModule('history');
    this.uploader = this.theme.addModule('uploader');
    this.theme.addModule('input');
    this.theme.init();
    this.emitter.on(_emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].events.EDITOR_CHANGE */ .Z.events.EDITOR_CHANGE, function (type) {
      if (type === _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].events.TEXT_CHANGE */ .Z.events.TEXT_CHANGE) {
        _this.toggleBlankClass();
      }
    });
    this.emitter.on(_emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].events.SCROLL_UPDATE */ .Z.events.SCROLL_UPDATE, function (source, mutations) {
      var oldRange = _this.selection.lastRange;
      var _this$selection$getRa = _this.selection.getRange(),
        _this$selection$getRa2 = _slicedToArray(_this$selection$getRa, 1),
        newRange = _this$selection$getRa2[0];
      var selectionInfo = oldRange && newRange ? {
        oldRange: oldRange,
        newRange: newRange
      } : undefined;
      modify.call(_this, function () {
        return _this.editor.update(null, mutations, selectionInfo);
      }, source);
    });
    this.setContents(this.getInitialContent(html));
    this.history.clear();
    if (this.options.placeholder) {
      this.root.setAttribute('data-placeholder', this.options.placeholder);
    }
    if (this.options.readOnly) {
      this.disable();
    }
    this.allowReadOnlyEdits = false;
  }
  _createClass(Quill, [{
    key: "getInitialContent",
    value: function getInitialContent(html) {
      return this.clipboard.convert({
        html: "".concat(html, "<p><br></p>"),
        text: '\n'
      });
    }
  }, {
    key: "toggleBlankClass",
    value: function toggleBlankClass() {
      var isCompositionInProgress = this.composition.isCompositionInProgress();
      this.root.classList.toggle('ql-blank', this.editor.isBlank(isCompositionInProgress));
    }
  }, {
    key: "addContainer",
    value: function addContainer(container) {
      var refNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      if (typeof container === 'string') {
        var className = container;
        container = document.createElement('div');
        container.classList.add(className);
      }
      this.container.insertBefore(container, refNode);
      return container;
    }
  }, {
    key: "blur",
    value: function blur() {
      this.selection.setRange(null);
    }
  }, {
    key: "deleteText",
    value: function deleteText(index, length, source) {
      var _this2 = this;
      var _overload = overload(index, length, source);
      var _overload2 = _slicedToArray(_overload, 4);
      index = _overload2[0];
      length = _overload2[1];
      source = _overload2[3];
      return modify.call(this, function () {
        return _this2.editor.deleteText(index, length);
      }, source, index, -1 * length);
    }
  }, {
    key: "disable",
    value: function disable() {
      this.enable(false);
    }
  }, {
    key: "editReadOnly",
    value: function editReadOnly(modifier) {
      this.allowReadOnlyEdits = true;
      var value = modifier();
      this.allowReadOnlyEdits = false;
      return value;
    }
  }, {
    key: "enable",
    value: function enable() {
      var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
      this.scroll.enable(enabled);
      this.container.classList.toggle('ql-disabled', !enabled);
    }
  }, {
    key: "focus",
    value: function focus() {
      var scrollTop = this.scrollingContainer.scrollTop;
      this.selection.focus();
      this.scrollingContainer.scrollTop = scrollTop;
      this.scrollIntoView();
    }
  }, {
    key: "format",
    value: function format(name, value) {
      var _this3 = this;
      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.API */ .Z.sources.API;
      this.applyCompositionChanges();
      return modify.call(this, function () {
        var range = _this3.getSelection(true);
        var change = new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())();
        if (range == null) return change;
        if (_this3.scroll.query(name, parchment__WEBPACK_IMPORTED_MODULE_3__.Scope.BLOCK)) {
          change = _this3.editor.formatLine(range.index, range.length, _defineProperty({}, name, value));
        } else if (range.length === 0) {
          _this3.selection.format(name, value);
          return change;
        } else {
          change = _this3.editor.formatText(range.index, range.length, _defineProperty({}, name, value));
        }
        _this3.setSelection(range, _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.SILENT */ .Z.sources.SILENT);
        return change;
      }, source);
    }
  }, {
    key: "formatLine",
    value: function formatLine(index, length, name, value, source) {
      var _this4 = this;
      var formats;
      // eslint-disable-next-line prefer-const
      var _overload3 = overload(index, length, name, value, source);
      var _overload4 = _slicedToArray(_overload3, 4);
      index = _overload4[0];
      length = _overload4[1];
      formats = _overload4[2];
      source = _overload4[3];
      return modify.call(this, function () {
        return _this4.editor.formatLine(index, length, formats);
      }, source, index, 0);
    }
  }, {
    key: "formatText",
    value: function formatText(index, length, name, value, source) {
      var _this5 = this;
      var formats;
      // eslint-disable-next-line prefer-const
      var _overload5 = overload(index, length, name, value, source);
      var _overload6 = _slicedToArray(_overload5, 4);
      index = _overload6[0];
      length = _overload6[1];
      formats = _overload6[2];
      source = _overload6[3];
      return modify.call(this, function () {
        return _this5.editor.formatText(index, length, formats);
      }, source, index, 0);
    }
  }, {
    key: "getBounds",
    value: function getBounds(index) {
      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
      var bounds;
      if (typeof index === 'number') {
        bounds = this.selection.getBounds(index, length);
      } else {
        bounds = this.selection.getBounds(index.index, index.length);
      }
      var containerBounds = this.container.getBoundingClientRect();
      return {
        bottom: bounds.bottom - containerBounds.top,
        height: bounds.height,
        left: bounds.left - containerBounds.left,
        right: bounds.right - containerBounds.left,
        top: bounds.top - containerBounds.top,
        width: bounds.width
      };
    }
  }, {
    key: "getContents",
    value: function getContents() {
      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
      var _overload7 = overload(index, length);
      var _overload8 = _slicedToArray(_overload7, 2);
      index = _overload8[0];
      length = _overload8[1];
      return this.editor.getContents(index, length);
    }
  }, {
    key: "getFormat",
    value: function getFormat() {
      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getSelection(true);
      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(index)) {
        return {};
      }
      if (typeof index === 'number') {
        return this.editor.getFormat(index, length);
      }
      return this.editor.getFormat(index.index, index.length);
    }
  }, {
    key: "getIndex",
    value: function getIndex(blot) {
      return blot.offset(this.scroll);
    }
  }, {
    key: "getLength",
    value: function getLength() {
      return this.scroll.length();
    }
  }, {
    key: "getLeaf",
    value: function getLeaf(index) {
      return this.scroll.leaf(index);
    }
  }, {
    key: "getLine",
    value: function getLine(index) {
      return this.scroll.line(index);
    }
  }, {
    key: "getLines",
    value: function getLines() {
      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;
      if (typeof index !== 'number') {
        return this.scroll.lines(index.index, index.length);
      }
      return this.scroll.lines(index, length);
    }
  }, {
    key: "getModule",
    value: function getModule(name) {
      return this.theme.modules[name];
    }
  }, {
    key: "getSelection",
    value: function getSelection() {
      var focus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      if (focus) this.focus();
      this.update(); // Make sure we access getRange with editor in consistent state
      return this.selection.getRange()[0];
    }
  }, {
    key: "getSemanticHTML",
    value: function getSemanticHTML() {
      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
      var _overload9 = overload(index, length);
      var _overload10 = _slicedToArray(_overload9, 2);
      index = _overload10[0];
      length = _overload10[1];
      return this.editor.getHTML(index, length);
    }
  }, {
    key: "getText",
    value: function getText() {
      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
      var _overload11 = overload(index, length);
      var _overload12 = _slicedToArray(_overload11, 2);
      index = _overload12[0];
      length = _overload12[1];
      return this.editor.getText(index, length);
    }
  }, {
    key: "hasFocus",
    value: function hasFocus() {
      return this.selection.hasFocus();
    }
  }, {
    key: "insertEmbed",
    value: function insertEmbed(index, embed, value) {
      var _this6 = this;
      var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Quill.sources.API;
      return modify.call(this, function () {
        return _this6.editor.insertEmbed(index, embed, value);
      }, source, index);
    }
  }, {
    key: "insertText",
    value: function insertText(index, text, name, value, source) {
      var _this7 = this;
      var formats;
      // eslint-disable-next-line prefer-const
      var _overload13 = overload(index, 0, name, value, source);
      var _overload14 = _slicedToArray(_overload13, 4);
      index = _overload14[0];
      formats = _overload14[2];
      source = _overload14[3];
      return modify.call(this, function () {
        return _this7.editor.insertText(index, text, formats);
      }, source, index, text.length);
    }
  }, {
    key: "isEnabled",
    value: function isEnabled() {
      return this.scroll.isEnabled();
    }
  }, {
    key: "off",
    value: function off() {
      var _this$emitter;
      return (_this$emitter = this.emitter).off.apply(_this$emitter, arguments);
    }
  }, {
    key: "on",
    value: function on() {
      var _this$emitter2;
      return (_this$emitter2 = this.emitter).on.apply(_this$emitter2, arguments);
    }
  }, {
    key: "once",
    value: function once() {
      var _this$emitter3;
      return (_this$emitter3 = this.emitter).once.apply(_this$emitter3, arguments);
    }
  }, {
    key: "removeFormat",
    value: function removeFormat(index, length, source) {
      var _this8 = this;
      var _overload15 = overload(index, length, source);
      var _overload16 = _slicedToArray(_overload15, 4);
      index = _overload16[0];
      length = _overload16[1];
      source = _overload16[3];
      return modify.call(this, function () {
        return _this8.editor.removeFormat(index, length);
      }, source, index);
    }
  }, {
    key: "scrollIntoView",
    value: function scrollIntoView() {
      this.selection.scrollIntoView(this.scrollingContainer);
    }
  }, {
    key: "setContents",
    value: function setContents(delta) {
      var _this9 = this;
      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.API */ .Z.sources.API;
      return modify.call(this, function () {
        delta = new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())(delta);
        var length = _this9.getLength();
        // Quill will set empty editor to \n
        var delete1 = _this9.editor.deleteText(0, length);
        // delta always applied before existing content
        var applied = _this9.editor.applyDelta(delta);
        // Remove extra \n from empty editor initialization
        var delete2 = _this9.editor.deleteText(_this9.getLength() - 1, 1);
        _this9.emitter.emit(Quill.events.CONTENT_SETTED);
        return delete1.compose(applied).compose(delete2);
      }, source);
    }
  }, {
    key: "setSelection",
    value: function setSelection(index, length, source) {
      if (index == null) {
        this.selection.setRange(null, length || Quill.sources.API);
      } else {
        var _overload17 = overload(index, length, source);
        var _overload18 = _slicedToArray(_overload17, 4);
        index = _overload18[0];
        length = _overload18[1];
        source = _overload18[3];
        this.selection.setRange(new _selection__WEBPACK_IMPORTED_MODULE_7__/* .Range */ .e(Math.max(0, index), length), source);
        if (source !== _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.SILENT */ .Z.sources.SILENT) {
          this.selection.scrollIntoView(this.scrollingContainer);
        }
      }
    }
  }, {
    key: "setText",
    value: function setText(text) {
      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.API */ .Z.sources.API;
      var delta = new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().insert(text);
      return this.setContents(delta, source);
    }
  }, {
    key: "update",
    value: function update() {
      var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.USER */ .Z.sources.USER;
      // Will update selection before selection.update() does if text changes
      var change = this.scroll.update(source);
      this.selection.update(source);
      // TODO this is usually undefined
      return change;
    }
  }, {
    key: "updateContents",
    value: function updateContents(delta) {
      var _this10 = this;
      var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.API */ .Z.sources.API;
      return modify.call(this, function () {
        delta = new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())(delta);
        return _this10.editor.applyDelta(delta, source);
      }, source, true);
    }
  }, {
    key: "applyCompositionChanges",
    value: function applyCompositionChanges() {
      this.composition.handleCompositionEnd({});
    }
  }], [{
    key: "debug",
    value: function debug(limit) {
      if (limit === true) {
        limit = 'log';
      }
      _logger__WEBPACK_IMPORTED_MODULE_9__/* ["default"].level */ .Z.level(limit);
    }
  }, {
    key: "find",
    value: function find(node) {
      return _instances__WEBPACK_IMPORTED_MODULE_8__/* ["default"].get */ .Z.get(node) || globalRegistry.find(node);
    }
  }, {
    key: "import",
    value: function _import(name) {
      if (this.imports[name] == null) {
        debug.error("Cannot import ".concat(name, ". Are you sure it was registered?"));
      }
      return this.imports[name];
    }
  }, {
    key: "register",
    value: function register(path, target) {
      var _this11 = this;
      var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      if (typeof path !== 'string') {
        var name = path.attrName || path.blotName;
        if (typeof name === 'string') {
          // register(Blot | Attributor, overwrite)
          this.register("formats/".concat(name), path, target);
        } else {
          Object.keys(path).forEach(function (key) {
            _this11.register(key, path[key], target);
          });
        }
      } else {
        if (this.imports[path] != null && !overwrite) {
          debug.warn("Overwriting ".concat(path, " with"), target);
        }
        this.imports[path] = target;
        if ((path.indexOf('blots/') === 0 || path.indexOf('formats/') === 0) && target.blotName !== 'abstract') {
          globalRegistry.register(target);
        }
        if (typeof target.register === 'function') {
          target.register(globalRegistry);
        }
      }
    }
  }]);
  return Quill;
}();
Quill.DEFAULTS = {
  bounds: null,
  modules: {},
  placeholder: '',
  readOnly: false,
  registry: globalRegistry,
  scrollingContainer: null,
  theme: 'default'
};
Quill.events = _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].events */ .Z.events;
Quill.sources = _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources */ .Z.sources;
// eslint-disable-next-line no-undef
Quill.version =  false ? 0 : "1.7.1";
Quill.MS_LIST_DATA_KEY = 'mso-list-data';
Quill.replaceStyleAttribute = function (html) {
  var tagAttrsRegex = /(?:(<[a-z0-9]+\s*))([\s\S]*?)(>|\/>)/gi;
  return html.replace(tagAttrsRegex, function (allTagAttrs, tagStart, tagAttrs, tagEnd) {
    var contentWithoutStyle = tagAttrs.replace(/style\s*=/gi, "".concat(STYLE_ATTRIBUTE_KEY, "="));
    return tagStart + contentWithoutStyle + tagEnd;
  });
};
Quill.restoreStyleAttribute = function (element) {
  element.querySelectorAll("[".concat(STYLE_ATTRIBUTE_KEY, "]")).forEach(function (currentElement) {
    var attrValue = currentElement.getAttribute(STYLE_ATTRIBUTE_KEY);
    currentElement.style = attrValue;
    currentElement.setAttribute(Quill.MS_LIST_DATA_KEY, attrValue);
    currentElement.removeAttribute(STYLE_ATTRIBUTE_KEY);
  });
};
Quill.imports = {
  delta: (quill_delta__WEBPACK_IMPORTED_MODULE_0___default()),
  parchment: parchment__WEBPACK_IMPORTED_MODULE_3__,
  'core/module': _module__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z,
  'core/theme': _theme__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z
};
function expandConfig(container, userConfig) {
  userConfig = lodash_merge__WEBPACK_IMPORTED_MODULE_2___default()({
    container: container,
    modules: {
      clipboard: true,
      keyboard: true,
      history: true,
      uploader: true
    }
  }, userConfig);
  if (!userConfig.theme || userConfig.theme === Quill.DEFAULTS.theme) {
    userConfig.theme = _theme__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z;
  } else {
    userConfig.theme = Quill.import("themes/".concat(userConfig.theme));
    if (userConfig.theme == null) {
      throw new Error("Invalid theme ".concat(userConfig.theme, ". Did you register it?"));
    }
  }
  var themeConfig = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_1___default()(userConfig.theme.DEFAULTS);
  [themeConfig, userConfig].forEach(function (config) {
    config.modules = config.modules || {};
    Object.keys(config.modules).forEach(function (module) {
      if (config.modules[module] === true) {
        config.modules[module] = {};
      }
    });
  });
  var moduleNames = Object.keys(themeConfig.modules).concat(Object.keys(userConfig.modules));
  var moduleConfig = moduleNames.reduce(function (config, name) {
    var moduleClass = Quill.import("modules/".concat(name));
    if (moduleClass == null) {
      debug.error("Cannot load ".concat(name, " module. Are you sure you registered it?"));
    } else {
      config[name] = moduleClass.DEFAULTS || {};
    }
    return config;
  }, {});
  // Special case toolbar shorthand
  if (userConfig.modules != null && userConfig.modules.toolbar && userConfig.modules.toolbar.constructor !== Object) {
    userConfig.modules.toolbar = {
      container: userConfig.modules.toolbar
    };
  }
  userConfig = lodash_merge__WEBPACK_IMPORTED_MODULE_2___default()({}, Quill.DEFAULTS, {
    modules: moduleConfig
  }, themeConfig, userConfig);
  ['bounds', 'container', 'scrollingContainer'].forEach(function (key) {
    if (typeof userConfig[key] === 'string') {
      userConfig[key] = document.querySelector(userConfig[key]);
    }
  });
  userConfig.modules = Object.keys(userConfig.modules).reduce(function (config, name) {
    if (userConfig.modules[name]) {
      config[name] = userConfig.modules[name];
    }
    return config;
  }, {});
  return userConfig;
}

// Handle selection preservation and TEXT_CHANGE emission
// common to modification APIs
function modify(modifier, source, index, shift) {
  if (!this.isEnabled() && source === _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.USER */ .Z.sources.USER && !this.allowReadOnlyEdits) {
    return new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())();
  }
  var range = index == null ? null : this.getSelection();
  var oldDelta = this.editor.delta;
  var change = modifier();
  if (range != null) {
    if (index === true) {
      index = range.index; // eslint-disable-line prefer-destructuring
    }

    if (shift == null) {
      range = shiftRange(range, change, source);
    } else if (shift !== 0) {
      range = shiftRange(range, index, shift, source);
    }
    this.setSelection(range, _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.SILENT */ .Z.sources.SILENT);
  }
  if (change.length() > 0) {
    var _this$emitter4;
    var args = [_emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].events.TEXT_CHANGE */ .Z.events.TEXT_CHANGE, change, oldDelta, source];
    (_this$emitter4 = this.emitter).emit.apply(_this$emitter4, [_emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].events.EDITOR_CHANGE */ .Z.events.EDITOR_CHANGE].concat(args));
    if (source !== _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.SILENT */ .Z.sources.SILENT) {
      var _this$emitter5;
      (_this$emitter5 = this.emitter).emit.apply(_this$emitter5, args);
    }
  }
  return change;
}
function overload(index, length, name, value, source) {
  var formats = {};
  if (typeof index.index === 'number' && typeof index.length === 'number') {
    // Allow for throwaway end (used by insertText/insertEmbed)
    if (typeof length !== 'number') {
      source = value;
      value = name;
      name = length;
      length = index.length; // eslint-disable-line prefer-destructuring
      index = index.index; // eslint-disable-line prefer-destructuring
    } else {
      length = index.length; // eslint-disable-line prefer-destructuring
      index = index.index; // eslint-disable-line prefer-destructuring
    }
  } else if (typeof length !== 'number') {
    source = value;
    value = name;
    name = length;
    length = 0;
  }
  // Handle format being object, two format name/value strings or excluded
  if (_typeof(name) === 'object') {
    formats = name;
    source = value;
  } else if (typeof name === 'string') {
    if (value != null) {
      formats[name] = value;
    } else {
      source = name;
    }
  }
  // Handle optional source
  source = source || _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.API */ .Z.sources.API;
  return [index, length, formats, source];
}
function shiftRange(range, index, length, source) {
  if (range == null) return null;
  var start;
  var end;
  if (index instanceof (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())) {
    var _map = [range.index, range.index + range.length].map(function (pos) {
      return index.transformPosition(pos, source !== _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.USER */ .Z.sources.USER);
    });
    var _map2 = _slicedToArray(_map, 2);
    start = _map2[0];
    end = _map2[1];
  } else {
    var _map3 = [range.index, range.index + range.length].map(function (pos) {
      if (pos < index || pos === index && source === _emitter__WEBPACK_IMPORTED_MODULE_5__/* ["default"].sources.USER */ .Z.sources.USER) return pos;
      if (length >= 0) {
        return pos + length;
      }
      return Math.max(index, pos + length);
    });
    var _map4 = _slicedToArray(_map3, 2);
    start = _map4[0];
    end = _map4[1];
  }
  return new _selection__WEBPACK_IMPORTED_MODULE_7__/* .Range */ .e(start, end - start);
}


/***/ }),

/***/ 7800:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ Selection),
/* harmony export */   "e": () => (/* binding */ Range)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8805);
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var lodash_isequal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2722);
/* harmony import */ var lodash_isequal__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isequal__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _emitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2069);
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3122);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }





var debug = (0,_logger__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)('quill:selection');
function toNotNegative(value) {
  if (value < 0) {
    return 0;
  }
  return value;
}
var Range = /*#__PURE__*/_createClass(function Range(index) {
  var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  _classCallCheck(this, Range);
  this.index = index;
  this.length = length;
});
var Selection = /*#__PURE__*/function () {
  function Selection(scroll, emitter, composition) {
    var _this = this;
    _classCallCheck(this, Selection);
    this.emitter = emitter;
    this.scroll = scroll;
    this.composition = composition;
    this.mouseDown = false;
    this.root = this.scroll.domNode;
    this.cursor = this.scroll.create('cursor', this);
    // savedRange is last non-null range
    this.savedRange = new Range(0, 0);
    this.lastRange = this.savedRange;
    this.lastNative = null;
    this.handleDragging();
    this.emitter.listenDOM('selectionchange', document, function () {
      if (!_this.mouseDown && !_this.composition.isCompositionInProgress()) {
        setTimeout(_this.update.bind(_this, _emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.USER */ .Z.sources.USER), 1);
      }
    });
    this.emitter.on(_emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].events.SCROLL_BEFORE_UPDATE */ .Z.events.SCROLL_BEFORE_UPDATE, function () {
      if (!_this.hasFocus()) return;
      var native = _this.getNativeRange();
      if (native == null) return;
      if (native.start.node === _this.cursor.textNode) return; // cursor.restore() will handle
      _this.emitter.once(_emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].events.SCROLL_UPDATE */ .Z.events.SCROLL_UPDATE, function () {
        try {
          if (_this.root.contains(native.start.node) && _this.root.contains(native.end.node)) {
            _this.setNativeRange(native.start.node, native.start.offset, native.end.node, native.end.offset);
          }
          _this.update(_emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.SILENT */ .Z.sources.SILENT);
        } catch (ignored) {
          // ignore
        }
      });
    });
    this.emitter.on(_emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].events.SCROLL_OPTIMIZE */ .Z.events.SCROLL_OPTIMIZE, function (mutations, context) {
      if (context.range) {
        var _context$range = context.range,
          startNode = _context$range.startNode,
          startOffset = _context$range.startOffset,
          endNode = _context$range.endNode,
          endOffset = _context$range.endOffset;
        _this.setNativeRange(startNode, startOffset, endNode, endOffset);
        _this.update(_emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.SILENT */ .Z.sources.SILENT);
      }
    });
    this.update(_emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.SILENT */ .Z.sources.SILENT);
  }
  _createClass(Selection, [{
    key: "handleDragging",
    value: function handleDragging() {
      var _this2 = this;
      this.emitter.listenDOM('mousedown', document.body, function () {
        _this2.mouseDown = true;
      });
      this.emitter.listenDOM('mouseup', document.body, function () {
        _this2.mouseDown = false;
        _this2.update(_emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.USER */ .Z.sources.USER);
      });
    }
  }, {
    key: "focus",
    value: function focus() {
      if (this.hasFocus()) return;
      this.root.focus();
      this.setRange(this.savedRange);
    }
  }, {
    key: "format",
    value: function format(_format, value) {
      this.scroll.update();
      var nativeRange = this.getNativeRange();
      if (nativeRange == null || !nativeRange.native.collapsed || this.scroll.query(_format, parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.BLOCK)) return;
      if (nativeRange.start.node !== this.cursor.textNode) {
        var blot = this.scroll.find(nativeRange.start.node, false);
        if (blot == null) return;
        // TODO Give blot ability to not split
        if (blot instanceof parchment__WEBPACK_IMPORTED_MODULE_0__.LeafBlot) {
          var after = blot.split(nativeRange.start.offset);
          blot.parent.insertBefore(this.cursor, after);
        } else {
          blot.insertBefore(this.cursor, nativeRange.start.node); // Should never happen
        }

        this.cursor.attach();
      }
      this.cursor.format(_format, value);
      this.scroll.optimize();
      this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length);
      this.update();
    }
  }, {
    key: "getBounds",
    value: function getBounds(index) {
      var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
      var scrollLength = this.scroll.length();
      index = Math.min(index, scrollLength - 1);
      length = Math.min(index + length, scrollLength - 1) - index;
      var node;
      var _this$scroll$leaf = this.scroll.leaf(index),
        _this$scroll$leaf2 = _slicedToArray(_this$scroll$leaf, 2),
        leaf = _this$scroll$leaf2[0],
        offset = _this$scroll$leaf2[1];
      if (leaf == null) return null;
      var _this$getPositionData = this.getPositionData(leaf, offset, true);
      var _this$getPositionData2 = _slicedToArray(_this$getPositionData, 2);
      node = _this$getPositionData2[0];
      offset = _this$getPositionData2[1];
      var range = document.createRange();
      if (length > 0) {
        range.setStart(node, offset);
        var _this$scroll$leaf3 = this.scroll.leaf(index + length);
        var _this$scroll$leaf4 = _slicedToArray(_this$scroll$leaf3, 2);
        leaf = _this$scroll$leaf4[0];
        offset = _this$scroll$leaf4[1];
        if (leaf == null) return null;
        var _this$getPositionData3 = this.getPositionData(leaf, offset, true);
        var _this$getPositionData4 = _slicedToArray(_this$getPositionData3, 2);
        node = _this$getPositionData4[0];
        offset = _this$getPositionData4[1];
        range.setEnd(node, offset);
        return range.getBoundingClientRect();
      }
      var side = 'left';
      var rect;
      if (node instanceof Text) {
        if (offset < node.data.length) {
          range.setStart(node, offset);
          range.setEnd(node, offset + 1);
        } else {
          // needed for composition events handling on Android devices
          var decrementedOffset = toNotNegative(offset - 1);
          range.setStart(node, decrementedOffset);
          range.setEnd(node, offset);
          side = 'right';
        }
        rect = range.getBoundingClientRect();
      } else {
        rect = leaf.domNode.getBoundingClientRect();
        if (offset > 0) side = 'right';
      }
      return {
        bottom: rect.top + rect.height,
        height: rect.height,
        left: rect[side],
        right: rect[side],
        top: rect.top,
        width: 0
      };
    }
  }, {
    key: "getNativeRange",
    value: function getNativeRange() {
      var _ownerDocument$getSel, _ownerDocument$getSel2;
      var ownerDocument = this.root.getRootNode();
      var selection = (_ownerDocument$getSel = (_ownerDocument$getSel2 = ownerDocument.getSelection) === null || _ownerDocument$getSel2 === void 0 ? void 0 : _ownerDocument$getSel2.call(ownerDocument)) !== null && _ownerDocument$getSel !== void 0 ? _ownerDocument$getSel : document.getSelection();
      if (selection == null || selection.rangeCount <= 0) return null;
      var nativeRange = selection.getRangeAt(0);
      if (nativeRange == null) return null;
      var range = this.normalizeNative(nativeRange);
      debug.info('getNativeRange', range);
      return range;
    }
  }, {
    key: "getRange",
    value: function getRange() {
      var normalized = this.getNativeRange();
      if (normalized == null) return [null, null];
      var range = this.normalizedToRange(normalized);
      return [range, normalized];
    }
  }, {
    key: "hasFocus",
    value: function hasFocus() {
      var ownerDocument = this.root.getRootNode();
      return ownerDocument.activeElement === this.root || contains(this.root, ownerDocument.activeElement);
    }
  }, {
    key: "normalizedToRange",
    value: function normalizedToRange(range) {
      var _this3 = this;
      var positions = [[range.start.node, range.start.offset]];
      if (!range.native.collapsed) {
        positions.push([range.end.node, range.end.offset]);
      }
      var indexes = positions.map(function (position) {
        var _position = _slicedToArray(position, 2),
          node = _position[0],
          offset = _position[1];
        var blot = _this3.scroll.find(node, true);
        var index = blot.offset(_this3.scroll);
        if (offset === 0) {
          return index;
        }
        if (blot instanceof parchment__WEBPACK_IMPORTED_MODULE_0__.LeafBlot) {
          return index + blot.index(node, offset);
        }
        return index + blot.length();
      });
      var end = Math.min(Math.max.apply(Math, _toConsumableArray(indexes)), this.scroll.length() - 1);
      var start = Math.min.apply(Math, [end].concat(_toConsumableArray(indexes)));
      return new Range(start, end - start);
    }
  }, {
    key: "normalizeNative",
    value: function normalizeNative(nativeRange) {
      if (!contains(this.root, nativeRange.startContainer) || !nativeRange.collapsed && !contains(this.root, nativeRange.endContainer)) {
        return null;
      }
      var range = {
        start: {
          node: nativeRange.startContainer,
          offset: nativeRange.startOffset
        },
        end: {
          node: nativeRange.endContainer,
          offset: nativeRange.endOffset
        },
        native: nativeRange
      };
      [range.start, range.end].forEach(function (position) {
        var node = position.node,
          offset = position.offset;
        while (!(node instanceof Text) && node.childNodes.length > 0) {
          if (node.childNodes.length > offset) {
            node = node.childNodes[offset];
            offset = 0;
          } else if (node.childNodes.length === offset) {
            node = node.lastChild;
            if (node instanceof Text) {
              offset = node.data.length;
            } else if (node.childNodes.length > 0) {
              // Container case
              offset = node.childNodes.length;
            } else {
              // Embed case
              offset = node.childNodes.length + 1;
            }
          } else {
            break;
          }
        }
        position.node = node;
        position.offset = offset;
      });
      return range;
    }
  }, {
    key: "rangeToNative",
    value: function rangeToNative(range) {
      var _this4 = this;
      var indexes = range.collapsed ? [range.index] : [range.index, range.index + range.length];
      var args = [];
      var scrollLength = this.scroll.length();
      indexes.forEach(function (index, i) {
        index = Math.min(scrollLength - 1, index);
        var _this4$scroll$leaf = _this4.scroll.leaf(index),
          _this4$scroll$leaf2 = _slicedToArray(_this4$scroll$leaf, 2),
          leaf = _this4$scroll$leaf2[0],
          leafOffset = _this4$scroll$leaf2[1];
        var _this4$getPositionDat = _this4.getPositionData(leaf, leafOffset, i !== 0),
          _this4$getPositionDat2 = _slicedToArray(_this4$getPositionDat, 2),
          node = _this4$getPositionDat2[0],
          offset = _this4$getPositionDat2[1];
        args.push(node, offset);
      });
      if (args.length < 2) {
        return args.concat(args);
      }
      return args;
    }
  }, {
    key: "getPositionData",
    value: function getPositionData(leaf, offset, inclusive) {
      if (leaf instanceof parchment__WEBPACK_IMPORTED_MODULE_0__.LeafBlot) {
        return leaf.position(offset, inclusive);
      }
      return [leaf.domNode, offset];
    }
  }, {
    key: "scrollIntoView",
    value: function scrollIntoView(scrollingContainer) {
      var range = this.lastRange;
      if (range == null) return;
      var bounds = this.getBounds(range.index, range.length);
      if (bounds == null) return;
      var limit = this.scroll.length() - 1;
      var _this$scroll$line = this.scroll.line(Math.min(range.index, limit)),
        _this$scroll$line2 = _slicedToArray(_this$scroll$line, 1),
        first = _this$scroll$line2[0];
      var last = first;
      if (range.length > 0) {
        var _this$scroll$line3 = this.scroll.line(Math.min(range.index + range.length, limit));
        var _this$scroll$line4 = _slicedToArray(_this$scroll$line3, 1);
        last = _this$scroll$line4[0];
      }
      if (first == null || last == null) return;
      var scrollBounds = scrollingContainer.getBoundingClientRect();
      if (bounds.top < scrollBounds.top) {
        scrollingContainer.scrollTop -= scrollBounds.top - bounds.top;
      } else if (bounds.bottom > scrollBounds.bottom) {
        scrollingContainer.scrollTop += bounds.bottom - scrollBounds.bottom;
      }
    }
  }, {
    key: "setNativeRange",
    value: function setNativeRange(startNode, startOffset) {
      var endNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : startNode;
      var endOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : startOffset;
      var force = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
      debug.info('setNativeRange', startNode, startOffset, endNode, endOffset);
      if (startNode != null && (this.root.parentNode == null || startNode.parentNode == null || endNode.parentNode == null)) {
        return;
      }
      var selection = document.getSelection();
      if (selection == null) return;
      if (startNode != null) {
        if (!this.hasFocus()) this.root.focus();
        var _ref = this.getNativeRange() || {},
          native = _ref.native;
        if (native == null || force || startNode !== native.startContainer || startOffset !== native.startOffset || endNode !== native.endContainer || endOffset !== native.endOffset) {
          if (startNode.tagName === 'BR') {
            startOffset = Array.from(startNode.parentNode.childNodes).indexOf(startNode);
            startNode = startNode.parentNode;
          }
          if (endNode.tagName === 'BR') {
            endOffset = Array.from(endNode.parentNode.childNodes).indexOf(endNode);
            endNode = endNode.parentNode;
          }
          var range = document.createRange();

          // needed for composition events handling on Android devices
          startOffset = toNotNegative(startOffset);
          endOffset = toNotNegative(endOffset);
          range.setStart(startNode, startOffset);
          range.setEnd(endNode, endOffset);
          selection.removeAllRanges();
          selection.addRange(range);
        }
      } else {
        selection.removeAllRanges();
        this.root.blur();
        document.body.focus(); // root.blur() not enough for IE11
      }
    }
  }, {
    key: "setRange",
    value: function setRange(range) {
      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.API */ .Z.sources.API;
      if (typeof force === 'string') {
        source = force;
        force = false;
      }
      debug.info('setRange', range);
      if (range != null) {
        var args = this.rangeToNative(range);
        this.setNativeRange.apply(this, _toConsumableArray(args).concat([force]));
      } else {
        this.setNativeRange(null);
      }
      this.update(source);
    }
  }, {
    key: "update",
    value: function update() {
      var source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.USER */ .Z.sources.USER;
      var oldRange = this.lastRange;
      var _this$getRange = this.getRange(),
        _this$getRange2 = _slicedToArray(_this$getRange, 2),
        lastRange = _this$getRange2[0],
        nativeRange = _this$getRange2[1];
      this.lastRange = lastRange;
      this.lastNative = nativeRange;
      if (this.lastRange != null) {
        this.savedRange = this.lastRange;
      }
      if (!lodash_isequal__WEBPACK_IMPORTED_MODULE_2___default()(oldRange, this.lastRange)) {
        var _this$emitter;
        if (!this.composition.isCompositionInProgress() && nativeRange != null && nativeRange.native.collapsed && nativeRange.start.node !== this.cursor.textNode) {
          var range = this.cursor.restore();
          if (range) {
            this.setNativeRange(range.startNode, range.startOffset, range.endNode, range.endOffset);
          }
        }
        var args = [_emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].events.SELECTION_CHANGE */ .Z.events.SELECTION_CHANGE, lodash_clonedeep__WEBPACK_IMPORTED_MODULE_1___default()(this.lastRange), lodash_clonedeep__WEBPACK_IMPORTED_MODULE_1___default()(oldRange), source];
        (_this$emitter = this.emitter).emit.apply(_this$emitter, [_emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].events.EDITOR_CHANGE */ .Z.events.EDITOR_CHANGE].concat(args));
        if (source !== _emitter__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.SILENT */ .Z.sources.SILENT) {
          var _this$emitter2;
          (_this$emitter2 = this.emitter).emit.apply(_this$emitter2, args);
        }
      }
    }
  }]);
  return Selection;
}();
function contains(parent, descendant) {
  try {
    // Firefox inserts inaccessible nodes around video elements
    descendant.parentNode; // eslint-disable-line no-unused-expressions
  } catch (e) {
    return false;
  }

  // IE11 has bug with Text nodes
  // https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect
  if (descendant instanceof Text) {
    descendant = descendant.parentNode;
  }
  return parent.contains(descendant);
}

// eslint-disable-next-line no-restricted-exports


/***/ }),

/***/ 1690:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
var Theme = /*#__PURE__*/function () {
  function Theme(quill, options) {
    _classCallCheck(this, Theme);
    this.quill = quill;
    this.options = options;
    this.modules = {};
  }
  _createClass(Theme, [{
    key: "init",
    value: function init() {
      var _this = this;
      Object.keys(this.options.modules).forEach(function (name) {
        if (_this.modules[name] == null) {
          _this.addModule(name);
        }
      });
    }
  }, {
    key: "addModule",
    value: function addModule(name) {
      var ModuleClass = this.quill.constructor.import("modules/".concat(name));
      this.modules[name] = new ModuleClass(this.quill, this.options.modules[name] || {});
      return this.modules[name];
    }
  }]);
  return Theme;
}();
Theme.DEFAULTS = {
  modules: {}
};
Theme.themes = {
  default: Theme
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Theme);

/***/ }),

/***/ 715:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "HE": () => (/* binding */ AlignStyle),
/* harmony export */   "dk": () => (/* binding */ AlignClass),
/* harmony export */   "if": () => (/* binding */ AlignAttribute)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);

var config = {
  scope: parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.BLOCK,
  whitelist: ['right', 'center', 'justify']
};
var AlignAttribute = new parchment__WEBPACK_IMPORTED_MODULE_0__.Attributor('align', 'align', config);
var AlignClass = new parchment__WEBPACK_IMPORTED_MODULE_0__.ClassAttributor('align', 'ql-align', config);
var AlignStyle = new parchment__WEBPACK_IMPORTED_MODULE_0__.StyleAttributor('align', 'text-align', config);


/***/ }),

/***/ 7898:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Y": () => (/* binding */ BackgroundClass),
/* harmony export */   "w": () => (/* binding */ BackgroundStyle)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6039);


var BackgroundClass = new parchment__WEBPACK_IMPORTED_MODULE_0__.ClassAttributor('background', 'ql-bg', {
  scope: parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.INLINE
});
var BackgroundStyle = new _color__WEBPACK_IMPORTED_MODULE_1__/* .ColorAttributor */ .OO('background', 'background-color', {
  scope: parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.INLINE
});


/***/ }),

/***/ 3991:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _blots_inline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6603);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var Bold = /*#__PURE__*/function (_Inline) {
  _inherits(Bold, _Inline);
  var _super = _createSuper(Bold);
  function Bold() {
    _classCallCheck(this, Bold);
    return _super.apply(this, arguments);
  }
  _createClass(Bold, [{
    key: "optimize",
    value: function optimize(context) {
      _get(_getPrototypeOf(Bold.prototype), "optimize", this).call(this, context);
      if (this.domNode.tagName !== this.statics.tagName[0]) {
        this.replaceWith(this.statics.blotName);
      }
    }
  }], [{
    key: "create",
    value: function create() {
      return _get(_getPrototypeOf(Bold), "create", this).call(this);
    }
  }, {
    key: "formats",
    value: function formats() {
      return true;
    }
  }]);
  return Bold;
}(_blots_inline__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z);
Bold.blotName = 'bold';
Bold.tagName = ['STRONG', 'B'];
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Bold);

/***/ }),

/***/ 7309:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "EK": () => (/* binding */ Code),
/* harmony export */   "ZP": () => (/* binding */ CodeBlock),
/* harmony export */   "se": () => (/* binding */ CodeBlockContainer)
/* harmony export */ });
/* harmony import */ var _blots_block__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6446);
/* harmony import */ var _blots_break__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4122);
/* harmony import */ var _blots_cursor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3657);
/* harmony import */ var _blots_inline__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6603);
/* harmony import */ var _blots_text__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8222);
/* harmony import */ var _blots_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3553);
/* harmony import */ var _core_quill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(281);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }







var CodeBlockContainer = /*#__PURE__*/function (_Container) {
  _inherits(CodeBlockContainer, _Container);
  var _super = _createSuper(CodeBlockContainer);
  function CodeBlockContainer() {
    _classCallCheck(this, CodeBlockContainer);
    return _super.apply(this, arguments);
  }
  _createClass(CodeBlockContainer, [{
    key: "code",
    value: function code(index, length) {
      var text = this.children.map(function (child) {
        return child.length() <= 1 ? '' : child.domNode.textContent;
      }).join('\n').slice(index, index + length);
      return (0,_blots_text__WEBPACK_IMPORTED_MODULE_4__/* .escapeText */ .b)(text);
    }
  }, {
    key: "html",
    value: function html(index, length) {
      // `\n`s are needed in order to support empty lines at the beginning and the end.
      // https://html.spec.whatwg.org/multipage/syntax.html#element-restrictions
      return "<pre>\n".concat(this.code(index, length), "\n</pre>");
    }
  }], [{
    key: "create",
    value: function create(value) {
      var domNode = _get(_getPrototypeOf(CodeBlockContainer), "create", this).call(this, value);
      domNode.setAttribute('spellcheck', false);
      return domNode;
    }
  }]);
  return CodeBlockContainer;
}(_blots_container__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z);
var CodeBlock = /*#__PURE__*/function (_Block) {
  _inherits(CodeBlock, _Block);
  var _super2 = _createSuper(CodeBlock);
  function CodeBlock() {
    _classCallCheck(this, CodeBlock);
    return _super2.apply(this, arguments);
  }
  _createClass(CodeBlock, null, [{
    key: "register",
    value: function register() {
      _core_quill__WEBPACK_IMPORTED_MODULE_6__/* ["default"].register */ .ZP.register(CodeBlockContainer);
    }
  }]);
  return CodeBlock;
}(_blots_block__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP);
var Code = /*#__PURE__*/function (_Inline) {
  _inherits(Code, _Inline);
  var _super3 = _createSuper(Code);
  function Code() {
    _classCallCheck(this, Code);
    return _super3.apply(this, arguments);
  }
  return _createClass(Code);
}(_blots_inline__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z);
Code.blotName = 'code';
Code.tagName = 'CODE';
CodeBlock.blotName = 'code-block';
CodeBlock.className = 'ql-code-block';
CodeBlock.tagName = 'DIV';
CodeBlockContainer.blotName = 'code-block-container';
CodeBlockContainer.className = 'ql-code-block-container';
CodeBlockContainer.tagName = 'DIV';
CodeBlockContainer.allowedChildren = [CodeBlock];
CodeBlock.allowedChildren = [_blots_text__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, _blots_break__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, _blots_cursor__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z];
CodeBlock.requiredContainer = CodeBlockContainer;
CodeBlock.TAB = '  ';

// eslint-disable-next-line no-restricted-exports


/***/ }),

/***/ 6039:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "HQ": () => (/* binding */ ColorStyle),
/* harmony export */   "Hn": () => (/* binding */ ColorClass),
/* harmony export */   "OO": () => (/* binding */ ColorAttributor)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var ColorAttributor = /*#__PURE__*/function (_StyleAttributor) {
  _inherits(ColorAttributor, _StyleAttributor);
  var _super = _createSuper(ColorAttributor);
  function ColorAttributor() {
    _classCallCheck(this, ColorAttributor);
    return _super.apply(this, arguments);
  }
  _createClass(ColorAttributor, [{
    key: "value",
    value: function value(domNode) {
      var value = _get(_getPrototypeOf(ColorAttributor.prototype), "value", this).call(this, domNode);
      if (value.indexOf('rgb(') !== 0) return value;
      value = value.replace(/^[^\d]+/, '').replace(/[^\d]+$/, '');
      var hex = value.split(',').map(function (component) {
        return "00".concat(parseInt(component, 10).toString(16)).slice(-2);
      }).join('');
      return "#".concat(hex);
    }
  }]);
  return ColorAttributor;
}(parchment__WEBPACK_IMPORTED_MODULE_0__.StyleAttributor);
var ColorClass = new parchment__WEBPACK_IMPORTED_MODULE_0__.ClassAttributor('color', 'ql-color', {
  scope: parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.INLINE
});
var ColorStyle = new ColorAttributor('color', 'color', {
  scope: parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.INLINE
});


/***/ }),

/***/ 4048:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "H8": () => (/* binding */ DirectionStyle),
/* harmony export */   "IF": () => (/* binding */ DirectionAttribute),
/* harmony export */   "hY": () => (/* binding */ DirectionClass)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);

var config = {
  scope: parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.BLOCK,
  whitelist: ['rtl']
};
var DirectionAttribute = new parchment__WEBPACK_IMPORTED_MODULE_0__.Attributor('direction', 'dir', config);
var DirectionClass = new parchment__WEBPACK_IMPORTED_MODULE_0__.ClassAttributor('direction', 'ql-direction', config);
var DirectionStyle = new parchment__WEBPACK_IMPORTED_MODULE_0__.StyleAttributor('direction', 'direction', config);


/***/ }),

/***/ 5832:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "H": () => (/* binding */ FontStyle),
/* harmony export */   "_": () => (/* binding */ FontClass)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var config = {
  scope: parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.INLINE,
  whitelist: ['serif', 'monospace']
};
var FontClass = new parchment__WEBPACK_IMPORTED_MODULE_0__.ClassAttributor('font', 'ql-font', config);
var FontStyleAttributor = /*#__PURE__*/function (_StyleAttributor) {
  _inherits(FontStyleAttributor, _StyleAttributor);
  var _super = _createSuper(FontStyleAttributor);
  function FontStyleAttributor() {
    _classCallCheck(this, FontStyleAttributor);
    return _super.apply(this, arguments);
  }
  _createClass(FontStyleAttributor, [{
    key: "value",
    value: function value(node) {
      return _get(_getPrototypeOf(FontStyleAttributor.prototype), "value", this).call(this, node).replace(/["']/g, '');
    }
  }]);
  return FontStyleAttributor;
}(parchment__WEBPACK_IMPORTED_MODULE_0__.StyleAttributor);
var FontStyle = new FontStyleAttributor('font', 'font-family', config);


/***/ }),

/***/ 7256:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "N": () => (/* binding */ _sanitize),
/* harmony export */   "Z": () => (/* binding */ Link)
/* harmony export */ });
/* harmony import */ var _blots_inline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6603);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var Link = /*#__PURE__*/function (_Inline) {
  _inherits(Link, _Inline);
  var _super = _createSuper(Link);
  function Link() {
    _classCallCheck(this, Link);
    return _super.apply(this, arguments);
  }
  _createClass(Link, [{
    key: "format",
    value: function format(name, value) {
      if (name !== this.statics.blotName || !value) {
        _get(_getPrototypeOf(Link.prototype), "format", this).call(this, name, value);
      } else {
        this.domNode.setAttribute('href', this.constructor.sanitize(value));
      }
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = _get(_getPrototypeOf(Link), "create", this).call(this, value);
      node.setAttribute('href', this.sanitize(value));
      node.setAttribute('rel', 'noopener noreferrer');
      node.setAttribute('target', '_blank');
      return node;
    }
  }, {
    key: "formats",
    value: function formats(domNode) {
      return domNode.getAttribute('href');
    }
  }, {
    key: "sanitize",
    value: function sanitize(url) {
      return _sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;
    }
  }]);
  return Link;
}(_blots_inline__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z);
Link.blotName = 'link';
Link.tagName = 'A';
Link.SANITIZED_URL = 'about:blank';
Link.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel'];
function _sanitize(url, protocols) {
  var anchor = document.createElement('a');
  anchor.href = url;
  var protocol = anchor.href.slice(0, anchor.href.indexOf(':'));
  return protocols.indexOf(protocol) > -1;
}

// eslint-disable-next-line no-restricted-exports


/***/ }),

/***/ 1629:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ SizeStyle),
/* harmony export */   "m": () => (/* binding */ SizeClass)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);

var SizeClass = new parchment__WEBPACK_IMPORTED_MODULE_0__.ClassAttributor('size', 'ql-size', {
  scope: parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.INLINE,
  whitelist: ['small', 'large', 'huge']
});
var SizeStyle = new parchment__WEBPACK_IMPORTED_MODULE_0__.StyleAttributor('size', 'font-size', {
  scope: parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.INLINE,
  whitelist: ['10px', '18px', '32px']
});


/***/ }),

/***/ 1342:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Du": () => (/* binding */ CELL_FORMATS),
/* harmony export */   "h6": () => (/* binding */ CELL_ATTRIBUTORS),
/* harmony export */   "kk": () => (/* binding */ TABLE_CELL_STYLE_ATTRIBUTORS),
/* harmony export */   "yA": () => (/* binding */ TABLE_CELL_ATTR_ATTRIBUTORS)
/* harmony export */ });
/* harmony import */ var _prepare_attributor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6062);
/* harmony import */ var _prepare_style_attributor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1801);
/* harmony import */ var _cell_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8252);
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }



var TABLE_CELL_ATTR_ATTRIBUTORS = _cell_config__WEBPACK_IMPORTED_MODULE_2__/* .TABLE_CELL_ATTRIBUTES.map */ .F1.map(function (attrName) {
  return (0,_prepare_attributor__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_cell_config__WEBPACK_IMPORTED_MODULE_2__/* .cellConfig */ .Pw, attrName);
});
var TABLE_CELL_STYLE_ATTRIBUTORS = _cell_config__WEBPACK_IMPORTED_MODULE_2__/* .TABLE_CELL_STYLES.map */ .Mu.map(function (styleName) {
  return (0,_prepare_style_attributor__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_cell_config__WEBPACK_IMPORTED_MODULE_2__/* .cellConfig */ .Pw, styleName);
});
var CELL_FORMATS = TABLE_CELL_STYLE_ATTRIBUTORS.reduce(function (result, attributor) {
  result[attributor.attrName] = attributor;
  return result;
}, {});
var CELL_ATTRIBUTORS = [].concat(_toConsumableArray(TABLE_CELL_ATTR_ATTRIBUTORS), _toConsumableArray(TABLE_CELL_STYLE_ATTRIBUTORS)).reduce(function (result, attributor) {
  result[attributor.keyName] = attributor;
  return result;
}, {});

/***/ }),

/***/ 8252:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "F1": () => (/* binding */ TABLE_CELL_ATTRIBUTES),
/* harmony export */   "Mu": () => (/* binding */ TABLE_CELL_STYLES),
/* harmony export */   "Pw": () => (/* binding */ cellConfig),
/* harmony export */   "fU": () => (/* binding */ TABLE_CELL_KEY_NAME_SET)
/* harmony export */ });
var cellConfig = {
  name: 'cell',
  allowedTags: ['TH', 'TD', 'TR']
};
var TABLE_CELL_ATTRIBUTES = ['height', 'width'];
var TABLE_CELL_STYLES = ['height', 'width', 'vertical-align', 'text-align', 'background-color', 'border', 'border-style', 'border-width', 'border-color', 'padding', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left'];
var TABLE_CELL_KEY_NAME_SET = new Set([].concat(TABLE_CELL_ATTRIBUTES, TABLE_CELL_STYLES));

/***/ }),

/***/ 6062:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ prepareAttributor)
/* harmony export */ });
/* harmony import */ var _attributors_attributor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1674);
/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2141);
/* harmony import */ var _attributors_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3398);
var _excluded = ["name"];
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }



function prepareAttributor(_ref, domAttrName) {
  var name = _ref.name,
    elementConfig = _objectWithoutProperties(_ref, _excluded);
  var attrName = "".concat(name).concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(domAttrName));
  var keyName = "".concat(_attributors_utils__WEBPACK_IMPORTED_MODULE_1__/* .KeyNameType.attribute */ .WT.attribute).concat(name, "_").concat(domAttrName);
  return new _attributors_attributor__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z(attrName, keyName, elementConfig);
}

/***/ }),

/***/ 1801:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ prepareStyleAttributor)
/* harmony export */ });
/* harmony import */ var _attributors_style_attributor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4569);
/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2141);
/* harmony import */ var _attributors_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3398);
var _excluded = ["name", "formatName"];
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }



function prepareStyleAttributor(_ref, prop) {
  var name = _ref.name,
    formatName = _ref.formatName,
    elementConfig = _objectWithoutProperties(_ref, _excluded);
  var _prop$split = prop.split('-'),
    _prop$split2 = _slicedToArray(_prop$split, 2),
    propName = _prop$split2[0],
    propSubName = _prop$split2[1];
  var attrName = "".concat(name).concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(formatName !== null && formatName !== void 0 ? formatName : propName)).concat(propSubName ? (0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(propSubName) : '');
  var keyName = "".concat(_attributors_utils__WEBPACK_IMPORTED_MODULE_1__/* .KeyNameType.style */ .WT.style).concat(name, "_").concat(prop);
  return new _attributors_style_attributor__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z(attrName, keyName, elementConfig);
}

/***/ }),

/***/ 319:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Qu": () => (/* binding */ TABLE_ATTR_ATTRIBUTORS),
/* harmony export */   "VT": () => (/* binding */ TABLE_STYLE_ATTRIBUTORS),
/* harmony export */   "Zt": () => (/* binding */ TABLE_ATTRIBUTORS),
/* harmony export */   "li": () => (/* binding */ TABLE_FORMATS)
/* harmony export */ });
/* harmony import */ var _prepare_attributor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6062);
/* harmony import */ var _prepare_style_attributor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1801);
/* harmony import */ var _table_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19);
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }



var TABLE_ATTR_ATTRIBUTORS = _table_config__WEBPACK_IMPORTED_MODULE_2__/* .TABLE_ATTRIBUTES.map */ .N2.map(function (attrName) {
  return (0,_prepare_attributor__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_table_config__WEBPACK_IMPORTED_MODULE_2__/* .tableConfig */ .Sp, attrName);
});
var TABLE_STYLE_ATTRIBUTORS = _table_config__WEBPACK_IMPORTED_MODULE_2__/* .TABLE_STYLES.map */ .GX.map(function (styleName) {
  return (0,_prepare_style_attributor__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_table_config__WEBPACK_IMPORTED_MODULE_2__/* .tableConfig */ .Sp, styleName);
});
var TABLE_FORMATS = TABLE_STYLE_ATTRIBUTORS.reduce(function (result, attributor) {
  result[attributor.attrName] = attributor;
  return result;
}, {});
var TABLE_ATTRIBUTORS = [].concat(_toConsumableArray(TABLE_ATTR_ATTRIBUTORS), _toConsumableArray(TABLE_STYLE_ATTRIBUTORS)).reduce(function (result, attributor) {
  result[attributor.keyName] = attributor;
  return result;
}, {});

/***/ }),

/***/ 19:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "GX": () => (/* binding */ TABLE_STYLES),
/* harmony export */   "N2": () => (/* binding */ TABLE_ATTRIBUTES),
/* harmony export */   "Sp": () => (/* binding */ tableConfig),
/* harmony export */   "bc": () => (/* binding */ TABLE_KEY_NAME_SET)
/* harmony export */ });
var tableConfig = {
  name: 'table',
  allowedTags: ['TABLE']
};
var TABLE_ATTRIBUTES = ['height', 'width'];
var TABLE_STYLES = ['height', 'width', 'text-align', 'background-color', 'border', 'border-style', 'border-width', 'border-color'];
var TABLE_KEY_NAME_SET = new Set([].concat(TABLE_ATTRIBUTES, TABLE_STYLES));

/***/ }),

/***/ 8536:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ getId)
/* harmony export */ });
function getId() {
  return Math.random().toString(36).slice(2, 6);
}

/***/ }),

/***/ 1969:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "KA": () => (/* binding */ TableHeaderRow),
/* harmony export */   "Lv": () => (/* binding */ tableId),
/* harmony export */   "RM": () => (/* binding */ TableBody),
/* harmony export */   "SC": () => (/* binding */ TableRow),
/* harmony export */   "iD": () => (/* binding */ HeaderCellLine),
/* harmony export */   "pj": () => (/* binding */ TableCell),
/* harmony export */   "xD": () => (/* binding */ TableHeader),
/* harmony export */   "xJ": () => (/* binding */ TableContainer),
/* harmony export */   "xs": () => (/* binding */ TableHeaderCell),
/* harmony export */   "zW": () => (/* binding */ CellLine)
/* harmony export */ });
/* unused harmony export TABLE_TAGS */
/* harmony import */ var _blots_block__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6446);
/* harmony import */ var _blots_break__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4122);
/* harmony import */ var _blots_container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3553);
/* harmony import */ var _utils_is_defined__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5874);
/* harmony import */ var _attributors_cell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1342);
/* harmony import */ var _attributors_table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(319);
/* harmony import */ var _get_id__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8536);
/* harmony import */ var _toggle_attribute__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2795);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }








var CELL_IDENTITY_KEYS = ['row', 'cell'];
var TABLE_TAGS = (/* unused pure expression or super */ null && (['TD', 'TH', 'TR', 'TBODY', 'THEAD', 'TABLE']));
var DATA_PREFIX = 'data-table-';
function deleteChildrenAt(children, index, length) {
  children.forEachAt(index, length, function (child, offset, childLength) {
    child.deleteAt(offset, childLength);
  });
}
var CellLine = /*#__PURE__*/function (_Block) {
  _inherits(CellLine, _Block);
  var _super = _createSuper(CellLine);
  function CellLine() {
    _classCallCheck(this, CellLine);
    return _super.apply(this, arguments);
  }
  _createClass(CellLine, [{
    key: "optimize",
    value: function optimize() {
      var _get2;
      var rowId = this.domNode.getAttribute("".concat(DATA_PREFIX, "row"));
      if (this.statics.requiredContainer && !(this.parent instanceof this.statics.requiredContainer)) {
        var domNode = this.domNode;
        var formats = {
          row: rowId
        };
        Object.keys(_attributors_cell__WEBPACK_IMPORTED_MODULE_3__/* .CELL_FORMATS */ .Du).forEach(function (format) {
          var value = domNode.dataset[format.toLowerCase()];
          if (value) {
            formats[format] = value;
          }
        });
        this.wrap(this.statics.requiredContainer.blotName, formats);
      }
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      (_get2 = _get(_getPrototypeOf(CellLine.prototype), "optimize", this)).call.apply(_get2, [this].concat(args));
    }
  }, {
    key: "format",
    value: function format(name, value) {
      var isCellLine = name === 'tableCellLine';
      if (isCellLine && value === null) {
        value = this.formats().tableCellLine;
      }
      var isCell = CELL_IDENTITY_KEYS.indexOf(name) > -1;
      if (isCell || _attributors_table__WEBPACK_IMPORTED_MODULE_4__/* .TABLE_FORMATS */ .li[name] || _attributors_cell__WEBPACK_IMPORTED_MODULE_3__/* .CELL_FORMATS */ .Du[name]) {
        var attrName = "data-".concat(isCell ? 'table-' : '').concat(name.toLowerCase());
        (0,_toggle_attribute__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(this.domNode, attrName, value);
        if (_attributors_cell__WEBPACK_IMPORTED_MODULE_3__/* .CELL_FORMATS */ .Du[name]) {
          var _this$cell;
          (_this$cell = this.cell()) === null || _this$cell === void 0 || _this$cell.format(name, value);
        }
        if (_attributors_table__WEBPACK_IMPORTED_MODULE_4__/* .TABLE_FORMATS */ .li[name]) {
          var _this$cell2;
          (_this$cell2 = this.cell()) === null || _this$cell2 === void 0 || (_this$cell2 = _this$cell2.table()) === null || _this$cell2 === void 0 || _this$cell2.format(name, value);
        }
      } else {
        _get(_getPrototypeOf(CellLine.prototype), "format", this).call(this, name, value);
      }
    }
  }, {
    key: "cell",
    value: function cell() {
      return 'row' in this.parent ? this.parent : null;
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = _get(_getPrototypeOf(CellLine), "create", this).call(this, value);
      CELL_IDENTITY_KEYS.forEach(function (key) {
        var _value$key;
        var identityMarker = key === 'row' ? tableId : cellId;
        node.setAttribute("".concat(DATA_PREFIX).concat(key), (_value$key = value === null || value === void 0 ? void 0 : value[key]) !== null && _value$key !== void 0 ? _value$key : identityMarker());
      });
      return node;
    }
  }, {
    key: "formats",
    value: function formats(domNode) {
      return CELL_IDENTITY_KEYS.reduce(function (formats, attribute) {
        var attrName = "".concat(DATA_PREFIX).concat(attribute);
        if (domNode.hasAttribute(attrName)) {
          formats[attribute] = domNode.getAttribute(attrName) || undefined;
        }
        return formats;
      }, {});
    }
  }]);
  return CellLine;
}(_blots_block__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP);
CellLine.blotName = 'tableCellLine';
CellLine.className = 'ql-table-cell-line';
CellLine.tagName = 'P';
var HeaderCellLine = /*#__PURE__*/function (_CellLine) {
  _inherits(HeaderCellLine, _CellLine);
  var _super2 = _createSuper(HeaderCellLine);
  function HeaderCellLine() {
    _classCallCheck(this, HeaderCellLine);
    return _super2.apply(this, arguments);
  }
  return _createClass(HeaderCellLine);
}(CellLine);
HeaderCellLine.blotName = 'tableHeaderCellLine';
HeaderCellLine.className = 'ql-table-header-cell-line';
var BaseCell = /*#__PURE__*/function (_Container) {
  _inherits(BaseCell, _Container);
  var _super3 = _createSuper(BaseCell);
  function BaseCell() {
    _classCallCheck(this, BaseCell);
    return _super3.apply(this, arguments);
  }
  _createClass(BaseCell, [{
    key: "format",
    value: function format(name, value) {
      var _CELL_FORMATS$name;
      (_CELL_FORMATS$name = _attributors_cell__WEBPACK_IMPORTED_MODULE_3__/* .CELL_FORMATS */ .Du[name]) === null || _CELL_FORMATS$name === void 0 || _CELL_FORMATS$name.add(this.domNode, value);
    }
  }, {
    key: "checkMerge",
    value: function checkMerge() {
      if (_get(_getPrototypeOf(BaseCell.prototype), "checkMerge", this).call(this) && this.next.children.head != null) {
        var thisHead = this.children.head.formats()[this.children.head.statics.blotName];
        var thisTail = this.children.tail.formats()[this.children.tail.statics.blotName];
        var nextHead = this.next.children.head.formats()[this.next.children.head.statics.blotName];
        var nextTail = this.next.children.tail.formats()[this.next.children.tail.statics.blotName];
        return thisHead.cell === thisTail.cell && thisHead.cell === nextHead.cell && thisHead.cell === nextTail.cell;
      }
      return false;
    }
  }, {
    key: "formats",
    value: function formats() {
      return BaseCell.cellFormats(this.domNode);
    }
  }, {
    key: "cellOffset",
    value: function cellOffset() {
      if (this.parent) {
        return this.parent.children.indexOf(this);
      }
      return -1;
    }
  }, {
    key: "row",
    value: function row() {
      return 'table' in this.parent ? this.parent : null;
    }
  }, {
    key: "rowOffset",
    value: function rowOffset() {
      if (this.row()) {
        return this.row().rowOffset();
      }
      return -1;
    }
  }, {
    key: "table",
    value: function table() {
      var _this$row;
      return (_this$row = this.row()) === null || _this$row === void 0 ? void 0 : _this$row.table();
    }
  }, {
    key: "optimize",
    value: function optimize() {
      var _this$domNode$getAttr, _get3;
      var rowId = (_this$domNode$getAttr = this.domNode.getAttribute("".concat(DATA_PREFIX, "row"))) !== null && _this$domNode$getAttr !== void 0 ? _this$domNode$getAttr : this.domNode.getAttribute("".concat(DATA_PREFIX, "header-row"));
      if (this.statics.requiredContainer && !(this.parent instanceof this.statics.requiredContainer)) {
        this.wrap(this.statics.requiredContainer.blotName, {
          row: rowId
        });
      }
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
      (_get3 = _get(_getPrototypeOf(BaseCell.prototype), "optimize", this)).call.apply(_get3, [this].concat(args));
    }
  }, {
    key: "deleteAt",
    value: function deleteAt(index, length) {
      deleteChildrenAt(this.children, index, length);
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = _get(_getPrototypeOf(BaseCell), "create", this).call(this, value);
      if (value) {
        Object.keys(value).forEach(function (format) {
          var _CELL_FORMATS$format;
          (_CELL_FORMATS$format = _attributors_cell__WEBPACK_IMPORTED_MODULE_3__/* .CELL_FORMATS */ .Du[format]) === null || _CELL_FORMATS$format === void 0 || _CELL_FORMATS$format.add(node, value[format]);
        });
      }
      return node;
    }
  }, {
    key: "cellFormats",
    value: function cellFormats(domNode) {
      var formats = {};
      if (domNode.hasAttribute("".concat(DATA_PREFIX, "row")) || domNode.hasAttribute("".concat(DATA_PREFIX, "header-row"))) {
        var _domNode$getAttribute;
        formats.row = (_domNode$getAttribute = domNode.getAttribute("".concat(DATA_PREFIX, "row"))) !== null && _domNode$getAttribute !== void 0 ? _domNode$getAttribute : domNode.getAttribute("".concat(DATA_PREFIX, "header-row"));
      }
      Object.keys(_attributors_cell__WEBPACK_IMPORTED_MODULE_3__/* .CELL_FORMATS */ .Du).forEach(function (format) {
        var _domNode$firstElement;
        var value = (_domNode$firstElement = domNode.firstElementChild) === null || _domNode$firstElement === void 0 ? void 0 : _domNode$firstElement.dataset[format.toLowerCase()];
        if (value) {
          formats[format] = value;
        }
      });
      return formats;
    }
  }]);
  return BaseCell;
}(_blots_container__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
BaseCell.tagName = ['TD', 'TH'];
var TableCell = /*#__PURE__*/function (_BaseCell) {
  _inherits(TableCell, _BaseCell);
  var _super4 = _createSuper(TableCell);
  function TableCell() {
    _classCallCheck(this, TableCell);
    return _super4.apply(this, arguments);
  }
  _createClass(TableCell, [{
    key: "format",
    value: function format(name, value) {
      if (name === 'row') {
        this.domNode.setAttribute("".concat(DATA_PREFIX).concat(name), value);
        this.children.forEach(function (child) {
          child.format(name, value);
        });
      } else {
        _get(_getPrototypeOf(TableCell.prototype), "format", this).call(this, name, value);
      }
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = _get(_getPrototypeOf(TableCell), "create", this).call(this, value);
      var attrName = "".concat(DATA_PREFIX, "row");
      if (value !== null && value !== void 0 && value.row) {
        node.setAttribute(attrName, value.row);
      }
      return node;
    }
  }]);
  return TableCell;
}(BaseCell);
TableCell.blotName = 'tableCell';
TableCell.className = 'ql-table-data-cell';
TableCell.dataAttribute = "".concat(DATA_PREFIX, "row");
TableCell.defaultChild = CellLine;
var TableHeaderCell = /*#__PURE__*/function (_BaseCell2) {
  _inherits(TableHeaderCell, _BaseCell2);
  var _super5 = _createSuper(TableHeaderCell);
  function TableHeaderCell() {
    _classCallCheck(this, TableHeaderCell);
    return _super5.apply(this, arguments);
  }
  _createClass(TableHeaderCell, [{
    key: "format",
    value: function format(name, value) {
      if (name === 'row') {
        this.domNode.setAttribute("".concat(DATA_PREFIX).concat(name), value);
        this.children.forEach(function (child) {
          child.format(name, value);
        });
      } else {
        _get(_getPrototypeOf(TableHeaderCell.prototype), "format", this).call(this, name, value);
      }
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = _get(_getPrototypeOf(TableHeaderCell), "create", this).call(this, value);
      var attrName = "".concat(DATA_PREFIX, "header-row");
      if (value && value.row) {
        node.setAttribute(attrName, value.row);
      }
      return node;
    }
  }]);
  return TableHeaderCell;
}(BaseCell);
TableHeaderCell.tagName = ['TH', 'TD'];
TableHeaderCell.className = 'ql-table-header-cell';
TableHeaderCell.blotName = 'tableHeaderCell';
TableHeaderCell.dataAttribute = "".concat(DATA_PREFIX, "header-row");
TableHeaderCell.defaultChild = HeaderCellLine;
var BaseRow = /*#__PURE__*/function (_Container2) {
  _inherits(BaseRow, _Container2);
  var _super6 = _createSuper(BaseRow);
  function BaseRow() {
    _classCallCheck(this, BaseRow);
    return _super6.apply(this, arguments);
  }
  _createClass(BaseRow, [{
    key: "checkMerge",
    value: function checkMerge() {
      if (_get(_getPrototypeOf(BaseRow.prototype), "checkMerge", this).call(this) && (0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(this.next.children.head)) {
        var formatName = 'row';
        var thisHead = this.children.head.formats();
        var thisTail = this.children.tail.formats();
        var nextHead = this.next.children.head.formats();
        var nextTail = this.next.children.tail.formats();
        return thisHead[formatName] === thisTail[formatName] && thisHead[formatName] === nextHead[formatName] && thisHead[formatName] === nextTail[formatName];
      }
      return false;
    }
  }, {
    key: "optimize",
    value: function optimize() {
      var _get4,
        _this = this;
      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
        args[_key3] = arguments[_key3];
      }
      (_get4 = _get(_getPrototypeOf(BaseRow.prototype), "optimize", this)).call.apply(_get4, [this].concat(args));
      var formatName = this.childFormatName;
      this.children.forEach(function (child) {
        if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(child.next)) {
          return;
        }
        var childFormats = child.formats();
        var nextFormats = child.next.formats();
        if (childFormats[formatName] !== nextFormats[formatName]) {
          var next = _this.splitAfter(child);
          if (next) {
            next.optimize();
          }
          if (_this.prev) {
            _this.prev.optimize();
          }
        }
      });
    }
  }, {
    key: "rowOffset",
    value: function rowOffset() {
      if (this.parent) {
        return this.parent.children.indexOf(this);
      }
      return -1;
    }
  }, {
    key: "table",
    value: function table() {
      var _this$parent;
      return (_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.parent;
    }
  }, {
    key: "formats",
    value: function formats() {
      var formats = {};
      var attrName = "".concat(DATA_PREFIX, "row");
      if (this.domNode.hasAttribute(attrName)) {
        formats[attrName] = this.domNode.getAttribute(attrName);
      }
      return formats;
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = _get(_getPrototypeOf(BaseRow), "create", this).call(this, value);
      if (value !== null && value !== void 0 && value.row) {
        node.setAttribute("".concat(DATA_PREFIX, "row"), value.row);
      }
      return node;
    }
  }]);
  return BaseRow;
}(_blots_container__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
BaseRow.tagName = 'TR';
var TableRow = /*#__PURE__*/function (_BaseRow) {
  _inherits(TableRow, _BaseRow);
  var _super7 = _createSuper(TableRow);
  function TableRow(scroll, domNode) {
    var _this2;
    _classCallCheck(this, TableRow);
    _this2 = _super7.call(this, scroll, domNode);
    _this2.childFormatName = 'table';
    return _this2;
  }
  _createClass(TableRow, [{
    key: "deleteAt",
    value: function deleteAt(index, length) {
      deleteChildrenAt(this.children, index, length);
    }
  }]);
  return TableRow;
}(BaseRow);
TableRow.blotName = 'tableRow';
var TableHeaderRow = /*#__PURE__*/function (_BaseRow2) {
  _inherits(TableHeaderRow, _BaseRow2);
  var _super8 = _createSuper(TableHeaderRow);
  function TableHeaderRow(scroll, domNode) {
    var _this3;
    _classCallCheck(this, TableHeaderRow);
    _this3 = _super8.call(this, scroll, domNode);
    _this3.childFormatName = 'tableHeaderCell';
    return _this3;
  }
  return _createClass(TableHeaderRow);
}(BaseRow);
TableHeaderRow.blotName = 'tableHeaderRow';
var RowContainer = /*#__PURE__*/function (_Container3) {
  _inherits(RowContainer, _Container3);
  var _super9 = _createSuper(RowContainer);
  function RowContainer() {
    _classCallCheck(this, RowContainer);
    return _super9.apply(this, arguments);
  }
  _createClass(RowContainer, [{
    key: "optimize",
    value: function optimize() {
      var _get5;
      if (this.statics.requiredContainer && !(this.parent instanceof this.statics.requiredContainer)) {
        var _this$children$head$c;
        var domNode = ((_this$children$head$c = this.children.head.children.head.children) === null || _this$children$head$c === void 0 || (_this$children$head$c = _this$children$head$c.head) === null || _this$children$head$c === void 0 ? void 0 : _this$children$head$c.domNode) || null;
        var formats = {};
        if (domNode) {
          Object.keys(_attributors_table__WEBPACK_IMPORTED_MODULE_4__/* .TABLE_FORMATS */ .li).forEach(function (format) {
            var value = domNode.dataset[format.toLowerCase()];
            if (value) {
              formats[format] = value;
            }
          });
        }
        this.wrap(this.statics.requiredContainer.blotName, formats);
      }
      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
        args[_key4] = arguments[_key4];
      }
      (_get5 = _get(_getPrototypeOf(RowContainer.prototype), "optimize", this)).call.apply(_get5, [this].concat(args));
    }
  }]);
  return RowContainer;
}(_blots_container__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
var TableBody = /*#__PURE__*/function (_RowContainer) {
  _inherits(TableBody, _RowContainer);
  var _super10 = _createSuper(TableBody);
  function TableBody() {
    _classCallCheck(this, TableBody);
    return _super10.apply(this, arguments);
  }
  return _createClass(TableBody);
}(RowContainer);
TableBody.blotName = 'tableBody';
TableBody.tagName = 'TBODY';
var TableHeader = /*#__PURE__*/function (_RowContainer2) {
  _inherits(TableHeader, _RowContainer2);
  var _super11 = _createSuper(TableHeader);
  function TableHeader() {
    _classCallCheck(this, TableHeader);
    return _super11.apply(this, arguments);
  }
  return _createClass(TableHeader);
}(RowContainer);
TableHeader.blotName = 'tableHeader';
TableHeader.tagName = 'THEAD';
var TableContainer = /*#__PURE__*/function (_Container4) {
  _inherits(TableContainer, _Container4);
  var _super12 = _createSuper(TableContainer);
  function TableContainer() {
    _classCallCheck(this, TableContainer);
    return _super12.apply(this, arguments);
  }
  _createClass(TableContainer, [{
    key: "balanceCells",
    value: function balanceCells() {
      var headerRows = this.descendants(TableHeaderRow);
      var bodyRows = this.descendants(TableRow);
      var maxColCount = this.getMaxTableColCount(headerRows, bodyRows);
      this.balanceRows(maxColCount, headerRows, TableHeaderCell);
      this.balanceRows(maxColCount, bodyRows, TableCell);
    }
  }, {
    key: "getMaxTableColCount",
    value: function getMaxTableColCount(headerRows, bodyRows) {
      return Math.max(this.getMaxRowColCount(headerRows), this.getMaxRowColCount(bodyRows));
    }
  }, {
    key: "getMaxRowColCount",
    value: function getMaxRowColCount(rows) {
      return Math.max.apply(Math, _toConsumableArray(rows.map(function (row) {
        return row.children.length;
      })));
    }
  }, {
    key: "balanceRows",
    value: function balanceRows(maxColCount, rows, CellClass) {
      var _this4 = this;
      rows.forEach(function (row) {
        new Array(maxColCount - row.children.length).fill(0).forEach(function () {
          var value;
          if ((0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(row.children.head)) {
            value = CellClass.cellFormats(row.children.head.domNode);
          }
          var blot = _this4.scroll.create(CellClass.blotName, value);
          var cellLine = _this4.scroll.create(CellClass.allowedChildren[0].blotName, value);
          blot.appendChild(cellLine);
          row.appendChild(blot);
          blot.optimize(); // Add break blot
        });
      });
    }
  }, {
    key: "cells",
    value: function cells(column) {
      return this.rows().map(function (row) {
        return row.children.at(column);
      });
    }
  }, {
    key: "deleteColumn",
    value: function deleteColumn(index) {
      var _this5 = this;
      [TableHeader, TableBody].forEach(function (blot) {
        var _this5$descendants = _this5.descendants(blot),
          _this5$descendants2 = _slicedToArray(_this5$descendants, 1),
          tablePart = _this5$descendants2[0];
        if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(tablePart) || !(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(tablePart.children.head)) {
          return;
        }
        tablePart.children.forEach(function (row) {
          var cell = row.children.at(index);
          if ((0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(cell)) {
            cell.remove();
          }
        });
      });
    }
  }, {
    key: "insertColumn",
    value: function insertColumn(index) {
      var _this6 = this;
      [TableHeader, TableBody].forEach(function (blot) {
        var _this6$descendants = _this6.descendants(blot),
          _this6$descendants2 = _slicedToArray(_this6$descendants, 1),
          tablePart = _this6$descendants2[0];
        if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(tablePart) || !(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(tablePart.children.head)) {
          return;
        }
        var CellBlot = blot === TableHeader ? TableHeaderCell : TableCell;
        var CellLineBlot = blot === TableHeader ? HeaderCellLine : CellLine;
        tablePart.children.forEach(function (row) {
          var ref = row.children.at(index);
          var value = CellLineBlot.formats(row.children.head.children.head.domNode);
          var cell = _this6.scroll.create(CellBlot.blotName, {
            row: value.row
          });
          var cellLine = _this6.scroll.create(CellLineBlot.blotName, {
            row: value.row
          });
          var emptyLine = _this6.scroll.create(_blots_break__WEBPACK_IMPORTED_MODULE_1__/* ["default"].blotName */ .Z.blotName);
          cellLine.appendChild(emptyLine);
          cell.appendChild(cellLine);
          row.insertBefore(cell, ref);
        });
      });
    }
  }, {
    key: "insertRow",
    value: function insertRow(index) {
      var _this7 = this;
      var _this$descendants = this.descendants(TableBody),
        _this$descendants2 = _slicedToArray(_this$descendants, 1),
        body = _this$descendants2[0];
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(body) || !(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(body.children.head)) {
        return;
      }
      var id = tableId();
      var row = this.scroll.create(TableRow.blotName, {
        row: id
      });
      body.children.head.children.forEach(function () {
        var cell = _this7.scroll.create(TableCell.blotName, {
          row: id
        });
        var cellLine = _this7.scroll.create(CellLine.blotName, {
          row: id
        });
        var emptyLine = _this7.scroll.create(_blots_break__WEBPACK_IMPORTED_MODULE_1__/* ["default"].blotName */ .Z.blotName);
        cellLine.appendChild(emptyLine);
        cell.appendChild(cellLine);
        row.appendChild(cell);
      });
      var ref = body.children.at(index);
      body.insertBefore(row, ref);
    }
  }, {
    key: "insertHeaderRow",
    value: function insertHeaderRow() {
      var _this8 = this;
      var _this$descendants3 = this.descendants(TableHeader),
        _this$descendants4 = _slicedToArray(_this$descendants3, 1),
        header = _this$descendants4[0];
      var _this$descendants5 = this.descendants(TableBody),
        _this$descendants6 = _slicedToArray(_this$descendants5, 1),
        body = _this$descendants6[0];
      if ((0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(header) || !(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(body) || !(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(body.children.head)) {
        return;
      }
      var id = tableId();
      var newHeader = this.scroll.create(TableHeader.blotName);
      var row = this.scroll.create(TableHeaderRow.blotName);
      var ref = this.children.at(0);
      newHeader.appendChild(row);
      body.children.head.children.forEach(function () {
        var cell = _this8.scroll.create(TableHeaderCell.blotName, {
          row: id
        });
        var cellLine = _this8.scroll.create(HeaderCellLine.blotName, {
          row: id
        });
        var emptyLine = _this8.scroll.create(_blots_break__WEBPACK_IMPORTED_MODULE_1__/* ["default"].blotName */ .Z.blotName);
        cellLine.appendChild(emptyLine);
        cell.appendChild(cellLine);
        row.appendChild(cell);
        cell.optimize();
      });
      this.insertBefore(newHeader, ref);
    }
  }, {
    key: "rows",
    value: function rows() {
      var body = this.children.head;
      return (0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(body) ? body.children.map(function (row) {
        return row;
      }) : [];
    }
  }, {
    key: "formats",
    value: function formats() {
      var formats = {};
      var childElem = this.cells()[0].domNode.firstElementChild;
      Object.keys(_attributors_table__WEBPACK_IMPORTED_MODULE_4__/* .TABLE_FORMATS */ .li).forEach(function (format) {
        var value = childElem === null || childElem === void 0 ? void 0 : childElem.dataset[format.toLowerCase()];
        if (value) {
          formats[format] = value;
        }
      });
      return formats;
    }
  }, {
    key: "format",
    value: function format(name, value) {
      var tableFormat = _attributors_table__WEBPACK_IMPORTED_MODULE_4__/* .TABLE_FORMATS */ .li[name];
      if (tableFormat) {
        var attrName = "data-".concat(name.toLowerCase());
        this.cells().forEach(function (cell) {
          (0,_toggle_attribute__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(cell.children.head.domNode, attrName, value);
        });
        tableFormat.add(this.domNode, value);
      }
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = _get(_getPrototypeOf(TableContainer), "create", this).call(this, value);
      if (value) {
        Object.keys(value).forEach(function (format) {
          var _TABLE_FORMATS$format;
          (_TABLE_FORMATS$format = _attributors_table__WEBPACK_IMPORTED_MODULE_4__/* .TABLE_FORMATS */ .li[format]) === null || _TABLE_FORMATS$format === void 0 || _TABLE_FORMATS$format.add(node, value[format]);
        });
      }
      return node;
    }
  }]);
  return TableContainer;
}(_blots_container__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
TableContainer.blotName = 'tableContainer';
TableContainer.tagName = 'TABLE';
TableContainer.allowedChildren = [TableHeader, TableBody];
TableBody.requiredContainer = TableContainer;
TableHeader.requiredContainer = TableContainer;
TableBody.allowedChildren = [TableRow];
TableRow.requiredContainer = TableBody;
TableRow.allowedChildren = [TableCell];
TableCell.requiredContainer = TableRow;
CellLine.requiredContainer = TableCell;
TableCell.allowedChildren = [CellLine];
TableHeader.allowedChildren = [TableHeaderRow];
TableHeaderRow.requiredContainer = TableHeader;
HeaderCellLine.requiredContainer = TableHeaderCell;
TableHeaderCell.allowedChildren = [HeaderCellLine];
TableHeaderRow.allowedChildren = [TableHeaderCell];
TableHeaderCell.requiredContainer = TableHeaderRow;
function tableId() {
  return "row-".concat((0,_get_id__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)());
}
function cellId() {
  return "cell-".concat((0,_get_id__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)());
}


/***/ }),

/***/ 2795:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ toggleAttribute)
/* harmony export */ });
function toggleAttribute(domNode, attrName, value) {
  if (value) {
    domNode.setAttribute(attrName, value);
  } else {
    domNode.removeAttribute(attrName);
  }
}

/***/ }),

/***/ 5635:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "HI": () => (/* binding */ applyFormat),
/* harmony export */   "PF": () => (/* binding */ deltaEndsWith),
/* harmony export */   "ZP": () => (/* binding */ Clipboard),
/* harmony export */   "fw": () => (/* binding */ traverse)
/* harmony export */ });
/* unused harmony exports matchAttributor, matchBlot, matchNewline, matchText */
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9098);
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quill_delta__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1233);
/* harmony import */ var _blots_block__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6446);
/* harmony import */ var _core_quill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(281);
/* harmony import */ var _core_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3122);
/* harmony import */ var _core_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7094);
/* harmony import */ var _formats_align__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(715);
/* harmony import */ var _formats_background__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7898);
/* harmony import */ var _formats_code__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7309);
/* harmony import */ var _formats_color__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(6039);
/* harmony import */ var _formats_direction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4048);
/* harmony import */ var _formats_font__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(5832);
/* harmony import */ var _formats_size__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(1629);
/* harmony import */ var _keyboard__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(3071);
/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2141);
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }















var debug = (0,_core_logger__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)('quill:clipboard');
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var CLIPBOARD_CONFIG = [[TEXT_NODE, matchText], [TEXT_NODE, matchNewline], ['br', matchBreak], [ELEMENT_NODE, matchNewline], [ELEMENT_NODE, matchBlot], [ELEMENT_NODE, matchAttributor], [ELEMENT_NODE, matchStyles], ['li', matchIndent], ['ol, ul', matchList], ['pre', matchCodeBlock], ['b', matchAlias.bind(matchAlias, 'bold')], ['i', matchAlias.bind(matchAlias, 'italic')], ['strike', matchAlias.bind(matchAlias, 'strike')], ['style', matchIgnore]];
var HTML_TEXT_MATCHERS = [matchText, matchNewline];
var ATTRIBUTE_ATTRIBUTORS = [_formats_align__WEBPACK_IMPORTED_MODULE_6__/* .AlignAttribute */ ["if"], _formats_direction__WEBPACK_IMPORTED_MODULE_10__/* .DirectionAttribute */ .IF].reduce(function (memo, attr) {
  memo[attr.keyName] = attr;
  return memo;
}, {});
var STYLE_ATTRIBUTORS = [_formats_align__WEBPACK_IMPORTED_MODULE_6__/* .AlignStyle */ .HE, _formats_background__WEBPACK_IMPORTED_MODULE_7__/* .BackgroundStyle */ .w, _formats_color__WEBPACK_IMPORTED_MODULE_9__/* .ColorStyle */ .HQ, _formats_direction__WEBPACK_IMPORTED_MODULE_10__/* .DirectionStyle */ .H8, _formats_font__WEBPACK_IMPORTED_MODULE_11__/* .FontStyle */ .H, _formats_size__WEBPACK_IMPORTED_MODULE_12__/* .SizeStyle */ .Z].reduce(function (memo, attr) {
  memo[attr.keyName] = attr;
  return memo;
}, {});
var Clipboard = /*#__PURE__*/function (_Module) {
  _inherits(Clipboard, _Module);
  var _super = _createSuper(Clipboard);
  function Clipboard(quill, options) {
    var _options$tableBlots;
    var _this;
    _classCallCheck(this, Clipboard);
    _this = _super.call(this, quill, options);
    _this.quill.root.addEventListener('copy', function (e) {
      return _this.onCaptureCopy(e, false);
    });
    _this.quill.root.addEventListener('cut', function (e) {
      return _this.onCaptureCopy(e, true);
    });
    _this.quill.root.addEventListener('paste', _this.onCapturePaste.bind(_assertThisInitialized(_this)));
    _this.matchers = [];
    _this.tableBlots = (_options$tableBlots = options.tableBlots) !== null && _options$tableBlots !== void 0 ? _options$tableBlots : [];
    _this.multilineParagraph = false;
    CLIPBOARD_CONFIG.concat(_this.options.matchers).forEach(function (_ref) {
      var _ref2 = _slicedToArray(_ref, 2),
        selector = _ref2[0],
        matcher = _ref2[1];
      _this.addMatcher(selector, matcher);
    });
    return _this;
  }
  _createClass(Clipboard, [{
    key: "addMatcher",
    value: function addMatcher(selector, matcher) {
      this.matchers.push([selector, matcher]);
    }
  }, {
    key: "addTableBlot",
    value: function addTableBlot(blotName) {
      this.tableBlots.push(blotName);
    }
  }, {
    key: "convert",
    value: function convert(_ref3) {
      var html = _ref3.html,
        text = _ref3.text,
        keepLastNewLine = _ref3.keepLastNewLine;
      var formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      if (formats[_formats_code__WEBPACK_IMPORTED_MODULE_8__/* ["default"].blotName */ .ZP.blotName]) {
        return new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().insert(text, _defineProperty({}, _formats_code__WEBPACK_IMPORTED_MODULE_8__/* ["default"].blotName */ .ZP.blotName, formats[_formats_code__WEBPACK_IMPORTED_MODULE_8__/* ["default"].blotName */ .ZP.blotName]));
      }
      return html ? this.applyMatchers(html, keepLastNewLine, formats) : this.applyTextMatchers(text);
    }
  }, {
    key: "applyTextMatchers",
    value: function applyTextMatchers() {
      var _this2 = this;
      var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
      if (text.length === 0) {
        return new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())();
      }
      var matchers = this.prepareTextMatching();
      var element = this.quill.root.ownerDocument.createElement('div');
      element.textContent = text;
      var node = element.childNodes[0];
      return matchers.reduce(function (delta, matcher) {
        return matcher(node, delta, _this2.quill.scroll);
      }, new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())());
    }
  }, {
    key: "applyMatchers",
    value: function applyMatchers(html, keepLastNewLine) {
      var _this3 = this;
      var formats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
      // NOTE: Operations with style attribute is required
      // to prevent a 'unsafe-inline' CSP error in DOMParser.
      var htmlWithoutStyles = _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].replaceStyleAttribute */ .ZP.replaceStyleAttribute(html);
      var doc = new DOMParser().parseFromString(htmlWithoutStyles, 'text/html');
      _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].restoreStyleAttribute */ .ZP.restoreStyleAttribute(doc);
      var container = doc.body;
      var nodeMatches = new WeakMap();
      var _this$prepareMatching = this.prepareMatching(container, nodeMatches),
        _this$prepareMatching2 = _slicedToArray(_this$prepareMatching, 2),
        elementMatchers = _this$prepareMatching2[0],
        textMatchers = _this$prepareMatching2[1];
      var delta = traverse(this.quill.scroll, container, elementMatchers, textMatchers, nodeMatches, this.multilineParagraph);
      // Remove trailing newline
      if (!keepLastNewLine && deltaEndsWith(delta, '\n') && (delta.ops[delta.ops.length - 1].attributes == null || Object.values(formats).some(function (blotName) {
        return _this3.tableBlots.includes(blotName);
      }))) {
        return delta.compose(new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().retain(delta.length() - 1).delete(1));
      }
      return delta;
    }
  }, {
    key: "dangerouslyPasteHTML",
    value: function dangerouslyPasteHTML(index, html) {
      var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.API */ .ZP.sources.API;
      if (typeof index === 'string') {
        var delta = this.convert({
          html: index,
          text: ''
        });
        this.quill.setContents(delta, html);
        this.quill.setSelection(0, _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      } else {
        var paste = this.convert({
          html: html,
          text: ''
        });
        this.quill.updateContents(new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().retain(index).concat(paste), source);
        this.quill.setSelection(index + paste.length(), _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      }
    }
  }, {
    key: "onCaptureCopy",
    value: function onCaptureCopy(e) {
      var isCut = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      if (e.defaultPrevented) return;
      if (e.clipboardData) {
        e.preventDefault();
      } else {
        return;
      }
      var _this$quill$selection = this.quill.selection.getRange(),
        _this$quill$selection2 = _slicedToArray(_this$quill$selection, 1),
        range = _this$quill$selection2[0];
      if (range == null) return;
      var _this$onCopy = this.onCopy(range, isCut),
        html = _this$onCopy.html,
        text = _this$onCopy.text;
      e.clipboardData.setData('text/plain', text);
      e.clipboardData.setData('text/html', html);
      if (isCut) {
        this.raiseCallback('onCut', e);
        (0,_keyboard__WEBPACK_IMPORTED_MODULE_13__/* .deleteRange */ .WQ)({
          range: range,
          quill: this.quill
        });
      }
    }
  }, {
    key: "onCapturePaste",
    value: function onCapturePaste(e) {
      if (e.defaultPrevented || !this.quill.isEnabled()) {
        return;
      }
      this.raiseCallback('onPaste', e);
      if (e.clipboardData) {
        e.preventDefault();
      } else {
        return;
      }
      var range = this.quill.getSelection(true);
      if (range == null) {
        return;
      }
      var html = e.clipboardData.getData('text/html');
      var files = Array.from(e.clipboardData.files || []);
      if (!html && files.length > 0) {
        this.quill.uploader.upload(range, files);
        return;
      }
      if (html && files.length > 0) {
        var _DOMParser$parseFromS = new DOMParser().parseFromString(html, 'text/html'),
          body = _DOMParser$parseFromS.body;
        var documentContainsImage = body.childElementCount === 1 && body.firstElementChild.tagName === 'IMG';
        if (documentContainsImage) {
          this.quill.uploader.upload(range, files);
          return;
        }
      }
      var text = e.clipboardData.getData('text/plain');
      this.onPaste(range, {
        html: html,
        text: text,
        keepLastNewLine: true
      });
    }
  }, {
    key: "raiseCallback",
    value: function raiseCallback(name, event) {
      var callback = this.options[name];
      if (callback && typeof callback === 'function') {
        callback(event);
      }
    }
  }, {
    key: "onCopy",
    value: function onCopy(_ref4) {
      var index = _ref4.index,
        length = _ref4.length;
      var text = this.quill.getText(index, length);
      var html = this.quill.getSemanticHTML(index, length);
      return {
        html: html,
        text: text
      };
    }
  }, {
    key: "onPaste",
    value: function onPaste(range, _ref5) {
      var text = _ref5.text,
        html = _ref5.html,
        keepLastNewLine = _ref5.keepLastNewLine;
      var formats = this.quill.getFormat(range.index);
      var pastedDelta = this.convert({
        text: text,
        html: html,
        keepLastNewLine: keepLastNewLine
      }, formats);
      debug.log('onPaste', pastedDelta, {
        text: text,
        html: html
      });
      var delta = new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().retain(range.index).delete(range.length).concat(pastedDelta);
      this.quill.updateContents(delta, _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.USER */ .ZP.sources.USER);
      // range.length contributes to delta.length()
      this.quill.setSelection(delta.length() - range.length, _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      this.quill.scrollIntoView();
    }
  }, {
    key: "prepareMatching",
    value: function prepareMatching(container, nodeMatches) {
      var elementMatchers = [];
      var textMatchers = [];
      this.matchers.forEach(function (pair) {
        var _pair = _slicedToArray(pair, 2),
          selector = _pair[0],
          matcher = _pair[1];
        switch (selector) {
          case TEXT_NODE:
            textMatchers.push(matcher);
            break;
          case ELEMENT_NODE:
            elementMatchers.push(matcher);
            break;
          default:
            Array.from(container.querySelectorAll(selector)).forEach(function (node) {
              if (nodeMatches.has(node)) {
                var matches = nodeMatches.get(node);
                matches.push(matcher);
              } else {
                nodeMatches.set(node, [matcher]);
              }
            });
            break;
        }
      });
      return [elementMatchers, textMatchers];
    }
  }, {
    key: "prepareTextMatching",
    value: function prepareTextMatching() {
      var textMatchers = [matchPlainText];
      this.matchers.forEach(function (pair) {
        var _pair2 = _slicedToArray(pair, 2),
          selector = _pair2[0],
          matcher = _pair2[1];
        if (HTML_TEXT_MATCHERS.indexOf(matcher) === -1 && selector === TEXT_NODE) {
          textMatchers.push(matcher);
        }
      });
      return textMatchers;
    }
  }]);
  return Clipboard;
}(_core_module__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z);
Clipboard.DEFAULTS = {
  matchers: []
};
function applyFormat(delta, format, value) {
  if (_typeof(format) === 'object') {
    return Object.keys(format).reduce(function (newDelta, key) {
      return applyFormat(newDelta, key, format[key]);
    }, delta);
  }
  return delta.reduce(function (newDelta, op) {
    if (op.attributes && op.attributes[format]) {
      return newDelta.push(op);
    }
    var formats = value ? _defineProperty({}, format, value) : {};
    return newDelta.insert(op.insert, _objectSpread(_objectSpread({}, formats), op.attributes));
  }, new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())());
}
function deltaEndsWith(delta, text) {
  var endText = '';
  for (var i = delta.ops.length - 1; i >= 0 && endText.length < text.length; --i // eslint-disable-line no-plusplus
  ) {
    var op = delta.ops[i];
    if (typeof op.insert !== 'string') break;
    endText = op.insert + endText;
  }
  return endText.slice(-1 * text.length) === text;
}
function isLine(node) {
  if (node.childNodes.length === 0) return false; // Exclude embed blocks
  return ['address', 'article', 'blockquote', 'canvas', 'dd', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'iframe', 'li', 'main', 'nav', 'ol', 'output', 'p', 'pre', 'section', 'table', 'td', 'tr', 'ul', 'video'].indexOf(node.tagName.toLowerCase()) !== -1;
}
var preNodes = new WeakMap();
function isPre(node) {
  if (node == null) return false;
  if (!preNodes.has(node)) {
    if (node.tagName === 'PRE') {
      preNodes.set(node, true);
    } else {
      preNodes.set(node, isPre(node.parentNode));
    }
  }
  return preNodes.get(node);
}
function traverse(scroll, node, elementMatchers, textMatchers, nodeMatches, multilineParagraph) {
  // Post-order
  if (node.nodeType === node.TEXT_NODE) {
    return textMatchers.reduce(function (delta, matcher) {
      return matcher(node, delta, scroll);
    }, new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())());
  }
  if (node.nodeType === node.ELEMENT_NODE) {
    return Array.from(node.childNodes || []).reduce(function (delta, childNode, idx, allNodes) {
      var childrenDelta = traverse(scroll, childNode, elementMatchers, textMatchers, nodeMatches, multilineParagraph);
      var nextNode = idx < allNodes.length - 1 && allNodes[idx + 1];
      var isNextNodeList = nextNode && nextNode.nodeType === node.ELEMENT_NODE && ['ul', 'ol'].indexOf(nextNode.tagName.toLowerCase()) > -1;
      if (childNode.nodeType === node.ELEMENT_NODE) {
        multilineParagraph = childNode.tagName.toLowerCase() === 'br';
        childrenDelta = elementMatchers.reduce(function (reducedDelta, matcher) {
          return matcher(childNode, reducedDelta, scroll);
        }, childrenDelta);
        childrenDelta = (nodeMatches.get(childNode) || []).reduce(function (reducedDelta, matcher) {
          return matcher(childNode, reducedDelta, scroll);
        }, childrenDelta);
      }
      var newDelta = delta.concat(childrenDelta);
      if (multilineParagraph && isNextNodeList) {
        newDelta.insert('\n');
      }
      return newDelta;
    }, new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())());
  }
  return new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())();
}
function matchAlias(format, node, delta) {
  return applyFormat(delta, format, true);
}
function matchAttributor(node, delta, scroll) {
  if (['TD', 'TH', 'TR', 'TABLE'].indexOf(node.tagName) === -1) {
    var attributes = parchment__WEBPACK_IMPORTED_MODULE_1__.Attributor.keys(node);
    var classes = parchment__WEBPACK_IMPORTED_MODULE_1__.ClassAttributor.keys(node);
    var styles = parchment__WEBPACK_IMPORTED_MODULE_1__.StyleAttributor.keys(node);
    var formats = {};
    attributes.concat(classes).concat(styles).forEach(function (name) {
      var attr = scroll.query(name, parchment__WEBPACK_IMPORTED_MODULE_1__.Scope.ATTRIBUTE);
      if (attr != null) {
        formats[attr.attrName] = attr.value(node);
        if (formats[attr.attrName]) return;
      }
      attr = ATTRIBUTE_ATTRIBUTORS[name];
      if (attr != null && (attr.attrName === name || attr.keyName === name)) {
        formats[attr.attrName] = attr.value(node) || undefined;
      }
      attr = STYLE_ATTRIBUTORS[name];
      if (attr != null && (attr.attrName === name || attr.keyName === name)) {
        attr = STYLE_ATTRIBUTORS[name];
        formats[attr.attrName] = attr.value(node) || undefined;
      }
    });
    if (Object.keys(formats).length > 0) {
      return applyFormat(delta, formats);
    }
  }
  return delta;
}
function matchBlot(node, delta, scroll) {
  var match = scroll.query(node);
  if (match == null) return delta;
  if (match.prototype instanceof parchment__WEBPACK_IMPORTED_MODULE_1__.EmbedBlot) {
    var embed = {};
    var value = match.value(node);
    if (value != null) {
      embed[match.blotName] = value;
      return new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().insert(embed, match.formats(node, scroll));
    }
  } else {
    if (match.prototype instanceof parchment__WEBPACK_IMPORTED_MODULE_1__.BlockBlot && !deltaEndsWith(delta, '\n')) {
      delta.insert('\n');
    }
    if (typeof match.formats === 'function') {
      return applyFormat(delta, match.blotName, match.formats(node, scroll));
    }
  }
  return delta;
}
function matchBreak(node, delta) {
  if (!deltaEndsWith(delta, '\n')) {
    delta.insert('\n');
  }
  return delta;
}
function matchCodeBlock(node, delta, scroll) {
  var match = scroll.query('code-block');
  var language = match ? match.formats(node, scroll) : true;
  return applyFormat(delta, 'code-block', language);
}
function matchIgnore() {
  return new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())();
}
function matchIndent(node, delta, scroll) {
  var match = scroll.query(node);
  if (match == null || match.blotName !== 'list' || !deltaEndsWith(delta, '\n')) {
    return delta;
  }
  var indent = -1;
  var parent = node.parentNode;
  while (parent != null) {
    if (['OL', 'UL'].indexOf(parent.tagName) !== -1) {
      indent += 1;
    }
    parent = parent.parentNode;
  }
  if (indent <= 0) return delta;
  return delta.reduce(function (composed, op) {
    if (op.attributes && typeof op.attributes.indent === 'number') {
      return composed.push(op);
    }
    return composed.insert(op.insert, _objectSpread({
      indent: indent
    }, op.attributes || {}));
  }, new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())());
}
function matchList(node, delta) {
  var list = node.tagName === 'OL' ? 'ordered' : 'bullet';
  return applyFormat(delta, 'list', list);
}
function matchNewline(node, delta, scroll) {
  if (!deltaEndsWith(delta, '\n')) {
    if (isLine(node)) {
      return delta.insert('\n');
    }
    if (delta.length() > 0 && node.nextSibling) {
      var nextSibling = node.nextSibling;
      while (nextSibling != null) {
        if (isLine(nextSibling)) {
          return delta.insert('\n');
        }
        var match = scroll.query(nextSibling);
        if ((match === null || match === void 0 ? void 0 : match.prototype) instanceof _blots_block__WEBPACK_IMPORTED_MODULE_2__/* .BlockEmbed */ .i2) {
          return delta.insert('\n');
        }
        nextSibling = nextSibling.firstChild;
      }
    }
  }
  return delta;
}
function matchStyles(node, delta) {
  var formats = {};
  var style = node.style || {};
  ['height', 'width'].forEach(function (dimension) {
    var isCell = ['TD', 'TH'].indexOf(node.tagName) !== -1;
    var isTable = node.tagName === 'TABLE';
    if ((isCell || isTable) && style[dimension]) {
      var name = "".concat(isTable ? 'table' : 'cell').concat((0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)(dimension));
      formats[name] = style[dimension];
    }
  });
  if (style.fontStyle === 'italic') {
    formats.italic = true;
  }
  if (style.textDecoration.indexOf('underline') !== -1) {
    formats.underline = true;
  }
  if (style.textDecoration.indexOf('line-through') !== -1) {
    formats.strike = true;
  }
  if (style.fontWeight.indexOf('bold') === 0 || parseInt(style.fontWeight, 10) >= 700) {
    formats.bold = true;
  }
  if (Object.keys(formats).length > 0) {
    delta = applyFormat(delta, formats);
  }
  if (parseFloat(style.textIndent || 0) > 0) {
    // Could be 0.5in
    return new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().insert('\t').concat(delta);
  }
  return delta;
}
function matchPlainText(node, delta) {
  var text = node.data || '';
  text = text.replace(/\r\n/g, '\n');
  return delta.insert(text);
}
function matchText(node, delta) {
  var text = node.data;
  // Word represents empty line with <o:p>&nbsp;</o:p>
  if (node.parentNode.tagName === 'O:P') {
    return delta.insert(text.trim());
  }
  if (text.trim().length === 0 && text.indexOf('\n') !== -1) {
    return delta;
  }
  if (!isPre(node)) {
    var replacer = function replacer(collapse, match) {
      var replaced = match.replace(/[^\u00a0]/g, ''); // \u00a0 is nbsp;
      return replaced.length < 1 && collapse ? ' ' : replaced;
    };
    text = text.replace(/\r\n/g, ' ').replace(/\n/g, ' ');
    text = text.replace(/\s\s+/g, replacer.bind(replacer, true)); // collapse whitespace
    if (node.previousSibling == null && isLine(node.parentNode) || node.previousSibling != null && isLine(node.previousSibling)) {
      text = text.replace(/^\s+/, replacer.bind(replacer, false));
    }
    if (node.nextSibling == null && isLine(node.parentNode) || node.nextSibling != null && isLine(node.nextSibling)) {
      text = text.replace(/\s+$/, replacer.bind(replacer, false));
    }
  }
  return delta.insert(text);
}


/***/ }),

/***/ 2613:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ History)
/* harmony export */ });
/* unused harmony export getLastChangeIndex */
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var _core_quill__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(281);
/* harmony import */ var _core_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7094);
/* harmony import */ var _utils_has_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8034);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }




var History = /*#__PURE__*/function (_Module) {
  _inherits(History, _Module);
  var _super = _createSuper(History);
  function History(quill, options) {
    var _this;
    _classCallCheck(this, History);
    _this = _super.call(this, quill, options);
    _this.lastRecorded = 0;
    _this.ignoreChange = false;
    _this.clear();
    _this.quill.on(_core_quill__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.EDITOR_CHANGE */ .ZP.events.EDITOR_CHANGE, function (eventName, delta, oldDelta, source) {
      if (eventName !== _core_quill__WEBPACK_IMPORTED_MODULE_1__/* ["default"].events.TEXT_CHANGE */ .ZP.events.TEXT_CHANGE || _this.ignoreChange) return;
      if (!_this.options.userOnly || source === _core_quill__WEBPACK_IMPORTED_MODULE_1__/* ["default"].sources.USER */ .ZP.sources.USER) {
        _this.record(delta, oldDelta);
      } else {
        _this.transform(delta);
      }
    });
    _this.quill.keyboard.addBinding({
      key: 'z',
      shortKey: true
    }, _this.undo.bind(_assertThisInitialized(_this)));
    _this.quill.keyboard.addBinding({
      key: 'z',
      shortKey: true,
      shiftKey: true
    }, _this.redo.bind(_assertThisInitialized(_this)));
    if ((0,_utils_has_window__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)() && /Win/i.test(navigator.platform)) {
      _this.quill.keyboard.addBinding({
        key: 'y',
        shortKey: true
      }, _this.redo.bind(_assertThisInitialized(_this)));
    }
    _this.quill.root.addEventListener('beforeinput', function (event) {
      if (event.inputType === 'historyUndo') {
        _this.undo();
        event.preventDefault();
      } else if (event.inputType === 'historyRedo') {
        _this.redo();
        event.preventDefault();
      }
    });
    return _this;
  }
  _createClass(History, [{
    key: "change",
    value: function change(source, dest) {
      if (this.stack[source].length === 0) return;
      var delta = this.stack[source].pop();
      var base = this.quill.getContents();
      var inverseDelta = delta.invert(base);
      this.stack[dest].push(inverseDelta);
      this.lastRecorded = 0;
      this.ignoreChange = true;
      this.quill.updateContents(delta, _core_quill__WEBPACK_IMPORTED_MODULE_1__/* ["default"].sources.USER */ .ZP.sources.USER);
      this.ignoreChange = false;
      var index = getLastChangeIndex(this.quill.scroll, delta);
      this.quill.setSelection(index);
    }
  }, {
    key: "clear",
    value: function clear() {
      this.stack = {
        undo: [],
        redo: []
      };
    }
  }, {
    key: "cutoff",
    value: function cutoff() {
      this.lastRecorded = 0;
    }
  }, {
    key: "record",
    value: function record(changeDelta, oldDelta) {
      if (changeDelta.ops.length === 0) return;
      this.stack.redo = [];
      var undoDelta = changeDelta.invert(oldDelta);
      var timestamp = Date.now();
      if (this.lastRecorded + this.options.delay > timestamp && this.stack.undo.length > 0) {
        var delta = this.stack.undo.pop();
        undoDelta = undoDelta.compose(delta);
      } else {
        this.lastRecorded = timestamp;
      }
      if (undoDelta.length() === 0) return;
      this.stack.undo.push(undoDelta);
      if (this.stack.undo.length > this.options.maxStack) {
        this.stack.undo.shift();
      }
    }
  }, {
    key: "redo",
    value: function redo() {
      this.change('redo', 'undo');
    }
  }, {
    key: "transform",
    value: function transform(delta) {
      transformStack(this.stack.undo, delta);
      transformStack(this.stack.redo, delta);
    }
  }, {
    key: "undo",
    value: function undo() {
      this.change('undo', 'redo');
    }
  }]);
  return History;
}(_core_module__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
History.DEFAULTS = {
  delay: 1000,
  maxStack: 100,
  userOnly: false
};
function transformStack(stack, delta) {
  var remoteDelta = delta;
  for (var i = stack.length - 1; i >= 0; i -= 1) {
    var oldDelta = stack[i];
    stack[i] = remoteDelta.transform(oldDelta, true);
    remoteDelta = oldDelta.transform(remoteDelta);
    if (stack[i].length() === 0) {
      stack.splice(i, 1);
    }
  }
}
function endsWithNewlineChange(scroll, delta) {
  var lastOp = delta.ops[delta.ops.length - 1];
  if (lastOp == null) return false;
  if (lastOp.insert != null) {
    return typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\n');
  }
  if (lastOp.attributes != null) {
    return Object.keys(lastOp.attributes).some(function (attr) {
      return scroll.query(attr, parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.BLOCK) != null;
    });
  }
  return false;
}
function getLastChangeIndex(scroll, delta) {
  var deleteLength = delta.reduce(function (length, op) {
    return length + (op.delete || 0);
  }, 0);
  var changeIndex = delta.length() - deleteLength;
  if (endsWithNewlineChange(scroll, delta)) {
    changeIndex -= 1;
  }
  return changeIndex;
}

// eslint-disable-next-line no-restricted-exports


/***/ }),

/***/ 990:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9098);
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quill_delta__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _core_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7094);
/* harmony import */ var _core_quill__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(281);
/* harmony import */ var _keyboard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3071);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }




var INSERT_TYPES = ['insertText', 'insertReplacementText'];
var Input = /*#__PURE__*/function (_Module) {
  _inherits(Input, _Module);
  var _super = _createSuper(Input);
  function Input(quill, options) {
    var _this;
    _classCallCheck(this, Input);
    _this = _super.call(this, quill, options);
    quill.root.addEventListener('beforeinput', function (event) {
      _this.handleBeforeInput(event);
    });

    // Gboard with English input on Android triggers `compositionstart` sometimes even
    // users are not going to type anything.
    if (!/Android/i.test(navigator.userAgent)) {
      quill.on(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].events.COMPOSITION_BEFORE_START */ .ZP.events.COMPOSITION_BEFORE_START, function () {
        _this.handleCompositionStart();
      });
    }
    return _this;
  }
  _createClass(Input, [{
    key: "deleteRange",
    value: function deleteRange(range) {
      (0,_keyboard__WEBPACK_IMPORTED_MODULE_3__/* .deleteRange */ .WQ)({
        range: range,
        quill: this.quill
      });
    }
  }, {
    key: "replaceText",
    value: function replaceText(range) {
      var text = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
      if (range.length === 0) return false;
      if (text) {
        // Follow the native behavior that inherits the formats of the first character
        var formats = this.quill.getFormat(range.index, 1);
        this.deleteRange(range);
        this.quill.updateContents(new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().retain(range.index).insert(text, formats), _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
      } else {
        this.deleteRange(range);
      }
      this.quill.setSelection(range.index + text.length, 0, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      return true;
    }
  }, {
    key: "handleBeforeInput",
    value: function handleBeforeInput(event) {
      if (this.quill.composition.isCompositionInProgress() || event.defaultPrevented || !INSERT_TYPES.includes(event.inputType)) {
        return;
      }
      var staticRange = event.getTargetRanges ? event.getTargetRanges()[0] : null;
      if (!staticRange || staticRange.collapsed === true) {
        return;
      }
      var text = getPlainTextFromInputEvent(event);
      if (text == null) {
        return;
      }
      var normalized = this.quill.selection.normalizeNative(staticRange);
      var range = normalized ? this.quill.selection.normalizedToRange(normalized) : null;
      if (range && this.replaceText(range, text)) {
        event.preventDefault();
      }
    }
  }, {
    key: "handleCompositionStart",
    value: function handleCompositionStart() {
      var range = this.quill.getSelection();
      if (range) {
        this.replaceText(range);
      }
    }
  }]);
  return Input;
}(_core_module__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z);
function getPlainTextFromInputEvent(event) {
  var _event$dataTransfer;
  // When `inputType` is "insertText":
  // - `event.data` should be string (Safari uses `event.dataTransfer`).
  // - `event.dataTransfer` should be null.
  // When `inputType` is "insertReplacementText":
  // - `event.data` should be null.
  // - `event.dataTransfer` should contain "text/plain" data.

  if (typeof event.data === 'string') {
    return event.data;
  }
  if ((_event$dataTransfer = event.dataTransfer) !== null && _event$dataTransfer !== void 0 && _event$dataTransfer.types.includes('text/plain')) {
    return event.dataTransfer.getData('text/plain');
  }
  return null;
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Input);

/***/ }),

/***/ 3071:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "ZP": () => (/* binding */ Keyboard),
  "WQ": () => (/* binding */ deleteRange)
});

// UNUSED EXPORTS: SHORTKEY, normalize

// EXTERNAL MODULE: ./node_modules/lodash.clonedeep/index.js
var lodash_clonedeep = __webpack_require__(8805);
var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);
// EXTERNAL MODULE: ./node_modules/lodash.isequal/index.js
var lodash_isequal = __webpack_require__(2722);
var lodash_isequal_default = /*#__PURE__*/__webpack_require__.n(lodash_isequal);
// EXTERNAL MODULE: ./node_modules/quill-delta/dist/Delta.js
var Delta = __webpack_require__(9098);
var Delta_default = /*#__PURE__*/__webpack_require__.n(Delta);
// EXTERNAL MODULE: ./node_modules/parchment/src/parchment.ts + 17 modules
var parchment = __webpack_require__(1233);
// EXTERNAL MODULE: ./core/quill.js
var core_quill = __webpack_require__(281);
// EXTERNAL MODULE: ./core/logger.js
var logger = __webpack_require__(3122);
// EXTERNAL MODULE: ./core/module.js
var core_module = __webpack_require__(7094);
// EXTERNAL MODULE: ./utils/has_window.js
var has_window = __webpack_require__(8034);
;// CONCATENATED MODULE: ./utils/get_scroll_into_view_config.js
function getScrollIntoViewConfig(element) {
  var _window = window,
    windowHeight = _window.innerHeight;
  var _element$getBoundingC = element.getBoundingClientRect(),
    elemTop = _element$getBoundingC.y,
    elemBottom = _element$getBoundingC.bottom;
  if (elemTop < 0) {
    return true; // scroll to the top
  }

  if (elemBottom >= windowHeight) {
    return false; // scroll to the bottom
  }

  return null;
}
;// CONCATENATED MODULE: ./modules/keyboard.js
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }









var debug = (0,logger/* default */.Z)('quill:keyboard');
var KEY_NAMES = {
  backspace: 'backspace',
  tab: 'tab',
  enter: 'enter',
  escape: 'escape',
  pageup: 'pageUp',
  pagedown: 'pageDown',
  end: 'end',
  home: 'home',
  arrowleft: 'leftArrow',
  arrowup: 'upArrow',
  arrowright: 'rightArrow',
  arrowdown: 'downArrow',
  delete: 'del',
  ' ': 'space',
  '*': 'asterisk',
  '-': 'minus',
  alt: 'alt',
  control: 'control',
  shift: 'shift',
  // IE11:
  left: 'leftArrow',
  up: 'upArrow',
  right: 'rightArrow',
  down: 'downArrow',
  multiply: 'asterisk',
  spacebar: 'space',
  del: 'del',
  subtract: 'minus',
  esc: 'escape'
};
var KEY_CODES = {
  // iOS 10.2 and lower didn't supports KeyboardEvent.key
  8: 'backspace',
  9: 'tab',
  13: 'enter',
  27: 'escape',
  33: 'pageUp',
  34: 'pageDown',
  35: 'end',
  36: 'home',
  37: 'leftArrow',
  38: 'upArrow',
  39: 'rightArrow',
  40: 'downArrow',
  46: 'del',
  32: 'space',
  106: 'asterisk',
  109: 'minus',
  189: 'minus',
  173: 'minus',
  16: 'shift',
  17: 'control',
  18: 'alt'
};
var SHORTKEY = (0,has_window/* default */.Z)() && /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey';
var Keyboard = /*#__PURE__*/function (_Module) {
  _inherits(Keyboard, _Module);
  var _super = _createSuper(Keyboard);
  function Keyboard(quill, options) {
    var _this;
    _classCallCheck(this, Keyboard);
    _this = _super.call(this, quill, options);
    _this.bindings = {};
    Object.keys(_this.options.bindings).forEach(function (name) {
      if (_this.options.bindings[name]) {
        _this.addBinding(_this.options.bindings[name]);
      }
    });
    _this.addInternalBindings();
    _this.listen();
    return _this;
  }
  _createClass(Keyboard, [{
    key: "addInternalBindings",
    value: function addInternalBindings() {
      var _this2 = this;
      this.quill.once(core_quill/* default.events.CONTENT_SETTED */.ZP.events.CONTENT_SETTED, function () {
        _this2.addBinding({
          key: 'enter',
          shiftKey: null
        }, _this2.handleEnter);
        _this2.addBinding({
          key: 'enter',
          metaKey: null,
          ctrlKey: null,
          altKey: null
        }, function () {});
        if ((0,has_window/* default */.Z)() && /Firefox/i.test(navigator.userAgent)) {
          // Need to handle delete and backspace for Firefox in the general case #1171
          _this2.addBinding({
            key: 'backspace'
          }, {
            collapsed: true
          }, _this2.handleBackspace);
          _this2.addBinding({
            key: 'del'
          }, {
            collapsed: true
          }, _this2.handleDelete);
        } else {
          _this2.addBinding({
            key: 'backspace'
          }, {
            collapsed: true,
            prefix: /^.?$/
          }, _this2.handleBackspace);
          _this2.addBinding({
            key: 'del'
          }, {
            collapsed: true,
            suffix: /^.?$/
          }, _this2.handleDelete);
        }
        _this2.addBinding({
          key: 'backspace'
        }, {
          collapsed: false
        }, _this2.handleDeleteRange);
        _this2.addBinding({
          key: 'del'
        }, {
          collapsed: false
        }, _this2.handleDeleteRange);
        _this2.addBinding({
          key: 'backspace',
          altKey: null,
          ctrlKey: null,
          metaKey: null,
          shiftKey: null
        }, {
          collapsed: true,
          offset: 0
        }, _this2.handleBackspace);
      });
    }
  }, {
    key: "addBinding",
    value: function addBinding(keyBinding) {
      var _this3 = this;
      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var handler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
      var binding = normalize(keyBinding);
      if (binding == null) {
        debug.warn('Attempted to add invalid keyboard binding', binding);
        return;
      }
      if (typeof context === 'function') {
        context = {
          handler: context
        };
      }
      if (typeof handler === 'function') {
        handler = {
          handler: handler
        };
      }
      var keyPropery = binding.which ? 'which' : 'key';
      var keys = Array.isArray(binding[keyPropery]) ? binding[keyPropery] : [binding[keyPropery]];
      keys.forEach(function (key) {
        var singleBinding = _objectSpread(_objectSpread(_objectSpread({}, binding), {}, {
          key: key
        }, context), handler);
        _this3.bindings[singleBinding.key] = _this3.bindings[singleBinding.key] || [];
        _this3.bindings[singleBinding.key].push(singleBinding);
      });
    }
  }, {
    key: "listen",
    value: function listen() {
      var _this4 = this;
      this.quill.root.addEventListener('keydown', function (evt) {
        if (evt.defaultPrevented || evt.isComposing) return;
        _this4.raiseOnKeydownCallback(evt);
        var keyName = Keyboard.normalizeKeyName(evt);
        var bindings = (_this4.bindings[keyName] || []).concat(_this4.bindings[evt.which] || []);
        var matches = bindings.filter(function (binding) {
          return Keyboard.match(evt, binding);
        });
        if (matches.length === 0) return;
        var range = _this4.quill.getSelection();
        if (range == null || !_this4.quill.hasFocus()) return;
        var _this4$quill$getLine = _this4.quill.getLine(range.index),
          _this4$quill$getLine2 = _slicedToArray(_this4$quill$getLine, 2),
          line = _this4$quill$getLine2[0],
          offset = _this4$quill$getLine2[1];
        var _this4$quill$getLeaf = _this4.quill.getLeaf(range.index),
          _this4$quill$getLeaf2 = _slicedToArray(_this4$quill$getLeaf, 2),
          leafStart = _this4$quill$getLeaf2[0],
          offsetStart = _this4$quill$getLeaf2[1];
        var _ref = range.length === 0 ? [leafStart, offsetStart] : _this4.quill.getLeaf(range.index + range.length),
          _ref2 = _slicedToArray(_ref, 2),
          leafEnd = _ref2[0],
          offsetEnd = _ref2[1];
        var prefixText = leafStart instanceof parchment.TextBlot ? leafStart.value().slice(0, offsetStart) : '';
        var suffixText = leafEnd instanceof parchment.TextBlot ? leafEnd.value().slice(offsetEnd) : '';
        var curContext = {
          collapsed: range.length === 0,
          empty: range.length === 0 && line.length() <= 1,
          format: _this4.quill.getFormat(range),
          line: line,
          offset: offset,
          prefix: prefixText,
          suffix: suffixText,
          event: evt
        };
        var prevented = false;
        matches.some(function (binding) {
          if (binding.collapsed != null && binding.collapsed !== curContext.collapsed) {
            return false;
          }
          if (binding.empty != null && binding.empty !== curContext.empty) {
            return false;
          }
          if (binding.offset != null && binding.offset !== curContext.offset) {
            return false;
          }
          if (Array.isArray(binding.format)) {
            // any format is present
            if (binding.format.every(function (name) {
              return curContext.format[name] == null;
            })) {
              return false;
            }
          } else if (_typeof(binding.format) === 'object') {
            // all formats must match
            if (!Object.keys(binding.format).every(function (name) {
              if (binding.format[name] === true) return curContext.format[name] != null;
              if (binding.format[name] === false) return curContext.format[name] == null;
              return lodash_isequal_default()(binding.format[name], curContext.format[name]);
            })) {
              return false;
            }
          }
          if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) {
            return false;
          }
          if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) {
            return false;
          }
          var handlerResult = binding.handler.call(_this4, range, curContext, binding);
          var preventAfterAllMatches = handlerResult === null || handlerResult === void 0 ? void 0 : handlerResult.preventAfterAllMatches;
          prevented = handlerResult !== true || preventAfterAllMatches;
          return prevented && !preventAfterAllMatches;
        });
        if (prevented) {
          evt.preventDefault();
        }
      });
    }
  }, {
    key: "raiseOnKeydownCallback",
    value: function raiseOnKeydownCallback(event) {
      var callback = this.options.onKeydown;
      if (callback && typeof callback === 'function') {
        callback(event);
      }
    }
  }, {
    key: "handleBackspace",
    value: function handleBackspace(range, context) {
      // Check for astral symbols
      var length = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix) ? 2 : 1;
      if (range.index === 0 || this.quill.getLength() <= 1) return;
      var formats = {};
      var _this$quill$getLine = this.quill.getLine(range.index),
        _this$quill$getLine2 = _slicedToArray(_this$quill$getLine, 1),
        line = _this$quill$getLine2[0];
      var delta = new (Delta_default())().retain(range.index - length).delete(length);
      if (context.offset === 0) {
        // Always deleting newline here, length always 1
        var _this$quill$getLine3 = this.quill.getLine(range.index - 1),
          _this$quill$getLine4 = _slicedToArray(_this$quill$getLine3, 1),
          prev = _this$quill$getLine4[0];
        if (prev) {
          var isPrevLineEmpty = prev.statics.blotName === 'block' && prev.length() <= 1;
          var isPrevLineTable = prev.statics.blotName.startsWith('table');
          var isLineEmpty = line.statics.blotName === 'block' && line.length() <= 1;
          if (isPrevLineTable) {
            if (isLineEmpty) {
              line.remove();
            }
            this.quill.setSelection(range.index - 1);
          }
          if (!isPrevLineEmpty && !isPrevLineTable) {
            var curFormats = line.formats();
            var prevFormats = this.quill.getFormat(range.index - 1, 1);
            formats = Delta.AttributeMap.diff(curFormats, prevFormats) || {};
            if (Object.keys(formats).length > 0) {
              // line.length() - 1 targets \n in line, another -1 for newline being deleted
              var formatDelta = new (Delta_default())().retain(range.index + line.length() - 2).retain(1, formats);
              delta = delta.compose(formatDelta);
            }
          }
        }
      }
      this.quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
      this.quill.focus();
    }
  }, {
    key: "handleDelete",
    value: function handleDelete(range, context) {
      // Check for astral symbols
      var length = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(context.suffix) ? 2 : 1;
      if (range.index >= this.quill.getLength() - length) return;
      var formats = {};
      var _this$quill$getLine5 = this.quill.getLine(range.index),
        _this$quill$getLine6 = _slicedToArray(_this$quill$getLine5, 1),
        line = _this$quill$getLine6[0];
      var delta = new (Delta_default())().retain(range.index).delete(length);
      if (context.offset >= line.length() - 1) {
        var _this$quill$getLine7 = this.quill.getLine(range.index + 1),
          _this$quill$getLine8 = _slicedToArray(_this$quill$getLine7, 1),
          next = _this$quill$getLine8[0];
        if (next) {
          var curFormats = line.formats();
          var nextFormats = this.quill.getFormat(range.index, 1);
          formats = Delta.AttributeMap.diff(curFormats, nextFormats) || {};
          if (Object.keys(formats).length > 0) {
            delta = delta.retain(next.length() - 1).retain(1, formats);
          }
        }
      }
      this.quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
      this.quill.focus();
    }
  }, {
    key: "handleDeleteRange",
    value: function handleDeleteRange(range, context) {
      this.raiseOnKeydownCallback(context.event);
      deleteRange({
        range: range,
        quill: this.quill
      });
      this.quill.focus();
    }
  }, {
    key: "handleEnter",
    value: function handleEnter(range, context) {
      var _this5 = this;
      var lineFormats = Object.keys(context.format).reduce(function (formats, format) {
        if (_this5.quill.scroll.query(format, parchment.Scope.BLOCK) && !Array.isArray(context.format[format])) {
          formats[format] = context.format[format];
        }
        return formats;
      }, {});
      var delta = new (Delta_default())().retain(range.index).delete(range.length).insert('\n', lineFormats);
      this.quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
      this.quill.setSelection(range.index + 1, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
      this.quill.focus();
      var _this$quill$getLine9 = this.quill.getLine(range.index + 1),
        _this$quill$getLine10 = _slicedToArray(_this$quill$getLine9, 1),
        line = _this$quill$getLine10[0];
      var scrollConfig = getScrollIntoViewConfig(line.domNode);
      if (scrollConfig !== null) {
        line.domNode.scrollIntoView(scrollConfig);
      }
      Object.keys(context.format).forEach(function (name) {
        if (lineFormats[name] != null) return;
        if (Array.isArray(context.format[name])) return;
        if (name === 'code' || name === 'link') return;
        _this5.raiseOnKeydownCallback(context.event);
        _this5.quill.format(name, context.format[name], core_quill/* default.sources.USER */.ZP.sources.USER);
      });
    }
  }], [{
    key: "match",
    value: function match(evt, binding) {
      if (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(function (key) {
        return !!binding[key] !== evt[key] && binding[key] !== null;
      })) {
        return false;
      }
      return binding.key === Keyboard.normalizeKeyName(evt) || binding.key === evt.which;
    }
  }, {
    key: "normalizeKeyName",
    value: function normalizeKeyName(_ref3) {
      var key = _ref3.key,
        which = _ref3.which;
      var isKeySupported = !!key;
      var normalizedKey = isKeySupported ? key : which;
      if (normalizedKey) {
        if (isKeySupported) {
          normalizedKey = KEY_NAMES[normalizedKey.toLowerCase()] || normalizedKey;
        } else {
          normalizedKey = KEY_CODES[normalizedKey] || String.fromCharCode(normalizedKey);
        }
      }
      return normalizedKey;
    }
  }]);
  return Keyboard;
}(core_module/* default */.Z);
Keyboard.DEFAULTS = {
  bindings: {
    bold: makeFormatHandler('bold', 66),
    italic: makeFormatHandler('italic', 73),
    underline: makeFormatHandler('underline', 85),
    indent: {
      // highlight tab or tab at beginning of list, indent or blockquote
      key: 'tab',
      format: ['blockquote', 'indent', 'list'],
      handler: function handler(range, context) {
        if (context.collapsed && context.offset !== 0) return true;
        this.quill.format('indent', '+1', core_quill/* default.sources.USER */.ZP.sources.USER);
        return false;
      }
    },
    outdent: {
      key: 'tab',
      shiftKey: true,
      format: ['blockquote', 'indent', 'list'],
      // highlight tab or tab at beginning of list, indent or blockquote
      handler: function handler(range, context) {
        if (context.collapsed && context.offset !== 0) return true;
        this.quill.format('indent', '-1', core_quill/* default.sources.USER */.ZP.sources.USER);
        return false;
      }
    },
    'outdent backspace': {
      key: 'backspace',
      collapsed: true,
      shiftKey: null,
      metaKey: null,
      ctrlKey: null,
      altKey: null,
      format: ['indent', 'list'],
      offset: 0,
      handler: function handler(range, context) {
        if (context.format.indent != null) {
          this.quill.format('indent', '-1', core_quill/* default.sources.USER */.ZP.sources.USER);
        } else if (context.format.list != null) {
          this.quill.format('list', false, core_quill/* default.sources.USER */.ZP.sources.USER);
        }
      }
    },
    'indent code-block': makeCodeBlockHandler(true),
    'outdent code-block': makeCodeBlockHandler(false),
    'remove tab': {
      key: 'tab',
      shiftKey: true,
      collapsed: true,
      prefix: /\t$/,
      handler: function handler(range) {
        this.quill.deleteText(range.index - 1, 1, core_quill/* default.sources.USER */.ZP.sources.USER);
      }
    },
    tab: {
      key: 'tab',
      handler: function handler(range, _ref4) {
        var format = _ref4.format;
        var isInTable = format.tableCellLine || format.tableHeaderCellLine || format.tableHeaderCell || format.table;
        if (isInTable) return true;
        this.quill.history.cutoff();
        var delta = new (Delta_default())().retain(range.index).delete(range.length).insert('\t');
        this.quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
        this.quill.history.cutoff();
        this.quill.setSelection(range.index + 1, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
        return false;
      }
    },
    'blockquote empty enter': {
      key: 'enter',
      collapsed: true,
      format: ['blockquote'],
      empty: true,
      handler: function handler() {
        this.quill.format('blockquote', false, core_quill/* default.sources.USER */.ZP.sources.USER);
      }
    },
    'list empty enter': {
      key: 'enter',
      collapsed: true,
      format: ['list'],
      empty: true,
      handler: function handler(range, context) {
        var formats = {
          list: false
        };
        if (context.format.indent) {
          formats.indent = false;
        }
        this.quill.formatLine(range.index, range.length, formats, core_quill/* default.sources.USER */.ZP.sources.USER);
      }
    },
    'checklist enter': {
      key: 'enter',
      collapsed: true,
      format: {
        list: 'checked'
      },
      handler: function handler(range) {
        var _this$quill$getLine11 = this.quill.getLine(range.index),
          _this$quill$getLine12 = _slicedToArray(_this$quill$getLine11, 2),
          line = _this$quill$getLine12[0],
          offset = _this$quill$getLine12[1];
        var formats = _objectSpread(_objectSpread({}, line.formats()), {}, {
          list: 'checked'
        });
        var delta = new (Delta_default())().retain(range.index).insert('\n', formats).retain(line.length() - offset - 1).retain(1, {
          list: 'unchecked'
        });
        this.quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
        this.quill.setSelection(range.index + 1, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
        this.quill.scrollIntoView();
      }
    },
    'header enter': {
      key: 'enter',
      collapsed: true,
      format: ['header'],
      suffix: /^$/,
      handler: function handler(range, context) {
        var _this$quill$getLine13 = this.quill.getLine(range.index),
          _this$quill$getLine14 = _slicedToArray(_this$quill$getLine13, 2),
          line = _this$quill$getLine14[0],
          offset = _this$quill$getLine14[1];
        var delta = new (Delta_default())().retain(range.index).insert('\n', context.format).retain(line.length() - offset - 1).retain(1, {
          header: null
        });
        this.quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
        this.quill.setSelection(range.index + 1, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
        this.quill.scrollIntoView();
      }
    },
    'list autofill': {
      key: 'space',
      shiftKey: null,
      collapsed: true,
      format: {
        'code-block': false,
        blockquote: false,
        table: false
      },
      prefix: /^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,
      handler: function handler(range, context) {
        if (this.quill.scroll.query('list') == null) return true;
        var length = context.prefix.length;
        var _this$quill$getLine15 = this.quill.getLine(range.index),
          _this$quill$getLine16 = _slicedToArray(_this$quill$getLine15, 2),
          line = _this$quill$getLine16[0],
          offset = _this$quill$getLine16[1];
        if (offset > length) return true;
        var value;
        switch (context.prefix.trim()) {
          case '[]':
          case '[ ]':
            value = 'unchecked';
            break;
          case '[x]':
            value = 'checked';
            break;
          case '-':
          case '*':
            value = 'bullet';
            break;
          default:
            value = 'ordered';
        }
        this.quill.insertText(range.index, ' ', core_quill/* default.sources.USER */.ZP.sources.USER);
        this.quill.history.cutoff();
        var delta = new (Delta_default())().retain(range.index - offset).delete(length + 1).retain(line.length() - 2 - offset).retain(1, {
          list: value
        });
        this.raiseOnKeydownCallback(context.event);
        this.quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
        this.quill.history.cutoff();
        this.quill.setSelection(range.index - length, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
        return false;
      }
    },
    'code exit': {
      key: 'enter',
      collapsed: true,
      format: ['code-block'],
      prefix: /^$/,
      suffix: /^\s*$/,
      handler: function handler(range) {
        var _this$quill$getLine17 = this.quill.getLine(range.index),
          _this$quill$getLine18 = _slicedToArray(_this$quill$getLine17, 2),
          line = _this$quill$getLine18[0],
          offset = _this$quill$getLine18[1];
        var numLines = 2;
        var cur = line;
        while (cur != null && cur.length() <= 1 && cur.formats()['code-block']) {
          cur = cur.prev;
          numLines -= 1;
          // Requisite prev lines are empty
          if (numLines <= 0) {
            var delta = new (Delta_default())().retain(range.index + line.length() - offset - 2).retain(1, {
              'code-block': null
            }).delete(1);
            this.quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
            this.quill.setSelection(range.index - 1, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
            return false;
          }
        }
        return true;
      }
    },
    'embed left': makeEmbedArrowHandler('leftArrow', false),
    'embed left shift': makeEmbedArrowHandler('leftArrow', true),
    'embed right': makeEmbedArrowHandler('rightArrow', false),
    'embed right shift': makeEmbedArrowHandler('rightArrow', true)
  }
};
function makeCodeBlockHandler(indent) {
  return {
    key: 'tab',
    shiftKey: !indent,
    format: {
      'code-block': true
    },
    handler: function handler(range) {
      var CodeBlock = this.quill.scroll.query('code-block');
      var lines = range.length === 0 ? this.quill.getLines(range.index, 1) : this.quill.getLines(range);
      var index = range.index,
        length = range.length;
      lines.forEach(function (line, i) {
        if (indent) {
          line.insertAt(0, CodeBlock.TAB);
          if (i === 0) {
            index += CodeBlock.TAB.length;
          } else {
            length += CodeBlock.TAB.length;
          }
        } else if (line.domNode.textContent.indexOf(CodeBlock.TAB) === 0) {
          line.deleteAt(0, CodeBlock.TAB.length);
          if (i === 0) {
            index -= CodeBlock.TAB.length;
          } else {
            length -= CodeBlock.TAB.length;
          }
        }
      });
      this.quill.update(core_quill/* default.sources.USER */.ZP.sources.USER);
      this.quill.setSelection(index, length, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
    }
  };
}
function makeEmbedArrowHandler(key, shiftKey) {
  var where = key === 'leftArrow' ? 'prefix' : 'suffix';
  return _defineProperty(_defineProperty({
    key: key,
    shiftKey: shiftKey,
    altKey: null
  }, where, /^$/), "handler", function handler(range) {
    var index = range.index;
    if (key === 'rightArrow') {
      index += range.length + 1;
    }
    var _this$quill$getLeaf = this.quill.getLeaf(index),
      _this$quill$getLeaf2 = _slicedToArray(_this$quill$getLeaf, 1),
      leaf = _this$quill$getLeaf2[0];
    if (!(leaf instanceof parchment.EmbedBlot)) return true;
    if (key === 'leftArrow') {
      if (shiftKey) {
        this.quill.setSelection(range.index - 1, range.length + 1, core_quill/* default.sources.USER */.ZP.sources.USER);
      } else {
        this.quill.setSelection(range.index - 1, core_quill/* default.sources.USER */.ZP.sources.USER);
      }
    } else if (shiftKey) {
      this.quill.setSelection(range.index, range.length + 1, core_quill/* default.sources.USER */.ZP.sources.USER);
    } else {
      this.quill.setSelection(range.index + range.length + 1, core_quill/* default.sources.USER */.ZP.sources.USER);
    }
    return false;
  });
}
function makeFormatHandler(format, which) {
  return {
    key: format[0],
    which: which,
    shortKey: true,
    handler: function handler(range, context) {
      this.quill.format(format, !context.format[format], core_quill/* default.sources.USER */.ZP.sources.USER);
      return {
        preventAfterAllMatches: true
      };
    }
  };
}
function normalize(binding) {
  if (typeof binding === 'string' || typeof binding === 'number') {
    binding = {
      key: binding
    };
  } else if (_typeof(binding) === 'object') {
    binding = lodash_clonedeep_default()(binding);
  } else {
    return null;
  }
  if (binding.shortKey) {
    binding[SHORTKEY] = binding.shortKey;
    delete binding.shortKey;
  }
  return binding;
}
function deleteRange(_ref6) {
  var quill = _ref6.quill,
    range = _ref6.range;
  var lines = quill.getLines(range);
  var formats = {};
  if (lines.length > 1) {
    var firstFormats = lines[0].formats();
    var lastFormats = lines[lines.length - 1].formats();
    formats = Delta.AttributeMap.diff(lastFormats, firstFormats) || {};
  }
  quill.deleteText(range, core_quill/* default.sources.USER */.ZP.sources.USER);
  if (Object.keys(formats).length > 0) {
    quill.formatLine(range.index, 1, formats, core_quill/* default.sources.USER */.ZP.sources.USER);
  }
  quill.setSelection(range.index, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
}


/***/ }),

/***/ 9072:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ZP": () => (/* binding */ Syntax)
/* harmony export */ });
/* unused harmony exports CodeBlock, CodeToken */
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9098);
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quill_delta__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1233);
/* harmony import */ var _blots_inline__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6603);
/* harmony import */ var _core_quill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(281);
/* harmony import */ var _core_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7094);
/* harmony import */ var _blots_block__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6446);
/* harmony import */ var _blots_break__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4122);
/* harmony import */ var _blots_cursor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3657);
/* harmony import */ var _blots_text__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8222);
/* harmony import */ var _formats_code__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7309);
/* harmony import */ var _clipboard__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5635);
/* harmony import */ var _utils_has_window__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8034);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }












var TokenAttributor = new parchment__WEBPACK_IMPORTED_MODULE_1__.ClassAttributor('code-token', 'hljs', {
  scope: parchment__WEBPACK_IMPORTED_MODULE_1__.Scope.INLINE
});
var CodeToken = /*#__PURE__*/function (_Inline) {
  _inherits(CodeToken, _Inline);
  var _super = _createSuper(CodeToken);
  function CodeToken(scroll, domNode, value) {
    var _this;
    _classCallCheck(this, CodeToken);
    _this = _super.call(this, scroll, domNode, value);
    TokenAttributor.add(_this.domNode, value);
    return _this;
  }
  _createClass(CodeToken, [{
    key: "format",
    value: function format(_format, value) {
      if (_format !== CodeToken.blotName) {
        _get(_getPrototypeOf(CodeToken.prototype), "format", this).call(this, _format, value);
      } else if (value) {
        TokenAttributor.add(this.domNode, value);
      } else {
        TokenAttributor.remove(this.domNode);
        this.domNode.classList.remove(this.statics.className);
      }
    }
  }, {
    key: "optimize",
    value: function optimize() {
      var _get2;
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      (_get2 = _get(_getPrototypeOf(CodeToken.prototype), "optimize", this)).call.apply(_get2, [this].concat(args));
      if (!TokenAttributor.value(this.domNode)) {
        this.unwrap();
      }
    }
  }], [{
    key: "formats",
    value: function formats(node, scroll) {
      while (node != null && node !== scroll.domNode) {
        if (node.classList && node.classList.contains(_formats_code__WEBPACK_IMPORTED_MODULE_9__/* ["default"].className */ .ZP.className)) {
          return _get(_getPrototypeOf(CodeToken), "formats", this).call(this, node, scroll);
        }
        node = node.parentNode;
      }
      return undefined;
    }
  }]);
  return CodeToken;
}(_blots_inline__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
CodeToken.blotName = 'code-token';
CodeToken.className = 'ql-token';
var SyntaxCodeBlock = /*#__PURE__*/function (_CodeBlock) {
  _inherits(SyntaxCodeBlock, _CodeBlock);
  var _super2 = _createSuper(SyntaxCodeBlock);
  function SyntaxCodeBlock() {
    _classCallCheck(this, SyntaxCodeBlock);
    return _super2.apply(this, arguments);
  }
  _createClass(SyntaxCodeBlock, [{
    key: "format",
    value:
    // Syntax module will register

    function format(name, value) {
      if (name === this.statics.blotName && value) {
        this.domNode.setAttribute('data-language', value);
      } else {
        _get(_getPrototypeOf(SyntaxCodeBlock.prototype), "format", this).call(this, name, value);
      }
    }
  }, {
    key: "replaceWith",
    value: function replaceWith(name, value) {
      this.formatAt(0, this.length(), CodeToken.blotName, false);
      return _get(_getPrototypeOf(SyntaxCodeBlock.prototype), "replaceWith", this).call(this, name, value);
    }
  }], [{
    key: "create",
    value: function create(value) {
      var domNode = _get(_getPrototypeOf(SyntaxCodeBlock), "create", this).call(this, value);
      if (typeof value === 'string') {
        domNode.setAttribute('data-language', value);
      }
      return domNode;
    }
  }, {
    key: "formats",
    value: function formats(domNode) {
      return domNode.getAttribute('data-language') || 'plain';
    }
  }, {
    key: "register",
    value: function register() {}
  }]);
  return SyntaxCodeBlock;
}(_formats_code__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP);
var SyntaxCodeBlockContainer = /*#__PURE__*/function (_CodeBlockContainer) {
  _inherits(SyntaxCodeBlockContainer, _CodeBlockContainer);
  var _super3 = _createSuper(SyntaxCodeBlockContainer);
  function SyntaxCodeBlockContainer() {
    _classCallCheck(this, SyntaxCodeBlockContainer);
    return _super3.apply(this, arguments);
  }
  _createClass(SyntaxCodeBlockContainer, [{
    key: "attach",
    value: function attach() {
      _get(_getPrototypeOf(SyntaxCodeBlockContainer.prototype), "attach", this).call(this);
      this.forceNext = false;
      this.scroll.emitMount(this);
    }
  }, {
    key: "format",
    value: function format(name, value) {
      if (name === SyntaxCodeBlock.blotName) {
        this.forceNext = true;
        this.children.forEach(function (child) {
          child.format(name, value);
        });
      }
    }
  }, {
    key: "formatAt",
    value: function formatAt(index, length, name, value) {
      if (name === SyntaxCodeBlock.blotName) {
        this.forceNext = true;
      }
      _get(_getPrototypeOf(SyntaxCodeBlockContainer.prototype), "formatAt", this).call(this, index, length, name, value);
    }
  }, {
    key: "highlight",
    value: function highlight(_highlight) {
      var _this2 = this;
      var forced = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      if (this.children.head == null) return;
      var nodes = Array.from(this.domNode.childNodes).filter(function (node) {
        return node !== _this2.uiNode;
      });
      var text = "".concat(nodes.map(function (node) {
        return node.textContent;
      }).join('\n'), "\n");
      var language = SyntaxCodeBlock.formats(this.children.head.domNode);
      if (forced || this.forceNext || this.cachedText !== text) {
        if (text.trim().length > 0 || this.cachedText == null) {
          var oldDelta = this.children.reduce(function (delta, child) {
            return delta.concat((0,_blots_block__WEBPACK_IMPORTED_MODULE_5__/* .blockDelta */ .qz)(child, false));
          }, new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())());
          var delta = _highlight(text, language);
          oldDelta.diff(delta).reduce(function (index, _ref) {
            var retain = _ref.retain,
              attributes = _ref.attributes;
            // Should be all retains
            if (!retain) return index;
            if (attributes) {
              Object.keys(attributes).forEach(function (format) {
                if ([SyntaxCodeBlock.blotName, CodeToken.blotName].indexOf(format) !== -1) {
                  _this2.formatAt(index, retain, format, attributes[format]);
                }
              });
            }
            return index + retain;
          }, 0);
        }
        this.cachedText = text;
        this.forceNext = false;
      }
    }
  }, {
    key: "html",
    value: function html(index, length) {
      var _this$children$find = this.children.find(index),
        _this$children$find2 = _slicedToArray(_this$children$find, 1),
        codeBlock = _this$children$find2[0];
      var language = codeBlock ? SyntaxCodeBlock.formats(codeBlock.domNode) : 'plain';
      return "<pre data-language=\"".concat(language, "\">\n").concat(this.code(index, length), "\n</pre>");
    }
  }, {
    key: "optimize",
    value: function optimize(context) {
      _get(_getPrototypeOf(SyntaxCodeBlockContainer.prototype), "optimize", this).call(this, context);
      if (this.parent != null && this.children.head != null && this.uiNode != null) {
        var language = SyntaxCodeBlock.formats(this.children.head.domNode);
        if (language !== this.uiNode.value) {
          this.uiNode.value = language;
        }
      }
    }
  }]);
  return SyntaxCodeBlockContainer;
}(_formats_code__WEBPACK_IMPORTED_MODULE_9__/* .CodeBlockContainer */ .se);
SyntaxCodeBlockContainer.allowedChildren = [SyntaxCodeBlock];
SyntaxCodeBlock.requiredContainer = SyntaxCodeBlockContainer;
SyntaxCodeBlock.allowedChildren = [CodeToken, _blots_cursor__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, _blots_text__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, _blots_break__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z];
var Syntax = /*#__PURE__*/function (_Module) {
  _inherits(Syntax, _Module);
  var _super4 = _createSuper(Syntax);
  function Syntax(quill, options) {
    var _this3;
    _classCallCheck(this, Syntax);
    _this3 = _super4.call(this, quill, options);
    if (_this3.options.hljs == null) {
      throw new Error('Syntax module requires highlight.js. Please include the library on the page before Quill.');
    }
    _this3.languages = _this3.options.languages.reduce(function (memo, _ref2) {
      var key = _ref2.key;
      memo[key] = true;
      return memo;
    }, {});
    _this3.highlightBlot = _this3.highlightBlot.bind(_assertThisInitialized(_this3));
    _this3.initListener();
    _this3.initTimer();
    return _this3;
  }
  _createClass(Syntax, [{
    key: "initListener",
    value: function initListener() {
      var _this4 = this;
      this.quill.on(_core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].events.SCROLL_BLOT_MOUNT */ .ZP.events.SCROLL_BLOT_MOUNT, function (blot) {
        if (!(blot instanceof SyntaxCodeBlockContainer)) return;
        var select = _this4.quill.root.ownerDocument.createElement('select');
        _this4.options.languages.forEach(function (_ref3) {
          var key = _ref3.key,
            label = _ref3.label;
          var option = select.ownerDocument.createElement('option');
          option.textContent = label;
          option.setAttribute('value', key);
          select.appendChild(option);
        });
        select.addEventListener('change', function () {
          blot.format(SyntaxCodeBlock.blotName, select.value);
          _this4.quill.root.focus(); // Prevent scrolling
          _this4.highlight(blot, true);
        });
        if (blot.uiNode == null) {
          blot.attachUI(select);
          if (blot.children.head) {
            select.value = SyntaxCodeBlock.formats(blot.children.head.domNode);
          }
        }
      });
    }
  }, {
    key: "initTimer",
    value: function initTimer() {
      var _this5 = this;
      var timer = null;
      this.quill.on(_core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].events.SCROLL_OPTIMIZE */ .ZP.events.SCROLL_OPTIMIZE, function () {
        clearTimeout(timer);
        timer = setTimeout(function () {
          _this5.highlight();
          timer = null;
        }, _this5.options.interval);
      });
    }
  }, {
    key: "highlight",
    value: function highlight() {
      var _this6 = this;
      var blot = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
      var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      if (this.quill.selection.composing) return;
      this.quill.update(_core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.USER */ .ZP.sources.USER);
      var range = this.quill.getSelection();
      var blots = blot == null ? this.quill.scroll.descendants(SyntaxCodeBlockContainer) : [blot];
      blots.forEach(function (container) {
        container.highlight(_this6.highlightBlot, force);
      });
      this.quill.update(_core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      if (range != null) {
        this.quill.setSelection(range, _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      }
    }
  }, {
    key: "highlightBlot",
    value: function highlightBlot(text) {
      var language = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'plain';
      language = this.languages[language] ? language : 'plain';
      if (language === 'plain') {
        return (0,_blots_text__WEBPACK_IMPORTED_MODULE_8__/* .escapeText */ .b)(text).split('\n').reduce(function (delta, line, i) {
          if (i !== 0) {
            delta.insert('\n', _defineProperty({}, _formats_code__WEBPACK_IMPORTED_MODULE_9__/* ["default"].blotName */ .ZP.blotName, language));
          }
          return delta.insert(line);
        }, new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())());
      }
      var container = this.quill.root.ownerDocument.createElement('div');
      container.classList.add(_formats_code__WEBPACK_IMPORTED_MODULE_9__/* ["default"].className */ .ZP.className);
      container.innerHTML = this.options.hljs.highlight(language, text).value;
      return (0,_clipboard__WEBPACK_IMPORTED_MODULE_10__/* .traverse */ .fw)(this.quill.scroll, container, [function (node, delta) {
        var value = TokenAttributor.value(node);
        if (value) {
          return delta.compose(new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().retain(delta.length(), _defineProperty({}, CodeToken.blotName, value)));
        }
        return delta;
      }], [function (node, delta) {
        return node.data.split('\n').reduce(function (memo, nodeText, i) {
          if (i !== 0) memo.insert('\n', _defineProperty({}, _formats_code__WEBPACK_IMPORTED_MODULE_9__/* ["default"].blotName */ .ZP.blotName, language));
          return memo.insert(nodeText);
        }, delta);
      }], new WeakMap());
    }
  }], [{
    key: "register",
    value: function register() {
      _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].register */ .ZP.register(CodeToken, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].register */ .ZP.register(SyntaxCodeBlock, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_3__/* ["default"].register */ .ZP.register(SyntaxCodeBlockContainer, true);
    }
  }]);
  return Syntax;
}(_core_module__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z);
Syntax.DEFAULTS = {
  hljs: function () {
    if ((0,_utils_has_window__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)()) {
      return window.hljs;
    }
    return null;
  }(),
  interval: 1000,
  languages: [{
    key: 'plain',
    label: 'Plain'
  }, {
    key: 'bash',
    label: 'Bash'
  }, {
    key: 'cpp',
    label: 'C++'
  }, {
    key: 'cs',
    label: 'C#'
  }, {
    key: 'css',
    label: 'CSS'
  }, {
    key: 'diff',
    label: 'Diff'
  }, {
    key: 'xml',
    label: 'HTML/XML'
  }, {
    key: 'java',
    label: 'Java'
  }, {
    key: 'javascript',
    label: 'Javascript'
  }, {
    key: 'markdown',
    label: 'Markdown'
  }, {
    key: 'php',
    label: 'PHP'
  }, {
    key: 'python',
    label: 'Python'
  }, {
    key: 'ruby',
    label: 'Ruby'
  }, {
    key: 'sql',
    label: 'SQL'
  }]
};

// eslint-disable-next-line no-restricted-exports


/***/ }),

/***/ 867:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9098);
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quill_delta__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1233);
/* harmony import */ var _core_quill__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(281);
/* harmony import */ var _core_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7094);
/* harmony import */ var _formats_table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1969);
/* harmony import */ var _utils_is_defined__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(5874);
/* harmony import */ var _clipboard__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5635);
/* harmony import */ var _utils_make_table_arrow_handler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9466);
/* harmony import */ var _utils_prepare_attr_matcher__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7896);
/* harmony import */ var _formats_table_attributors_table__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(319);
/* harmony import */ var _formats_table_attributors_cell__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1342);
/* harmony import */ var _utils_insert_pr_above__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2480);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }












var EMPTY_RESULT = [null, null, null, -1];
var ELEMENT_NODE = 1;
var Table = /*#__PURE__*/function (_Module) {
  _inherits(Table, _Module);
  var _super = _createSuper(Table);
  function Table() {
    var _this;
    _classCallCheck(this, Table);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _this.tableBlots = [_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .CellLine.blotName */ .zW.blotName, _formats_table__WEBPACK_IMPORTED_MODULE_4__/* .HeaderCellLine.blotName */ .iD.blotName];
    _this.tableBlots.forEach(function (blotName) {
      _this.quill.editor.addImmediateFormat(blotName);
    });
    _this.integrateClipboard();
    _this.addKeyboardHandlers();
    _this.listenBalanceCells();
    return _this;
  }
  _createClass(Table, [{
    key: "integrateClipboard",
    value: function integrateClipboard() {
      var _this2 = this;
      this.tableBlots.forEach(function (blotName) {
        _this2.quill.clipboard.addTableBlot(blotName);
      });
      this.quill.clipboard.addMatcher('td, th', matchCell);
      this.quill.clipboard.addMatcher('table', (0,_utils_prepare_attr_matcher__WEBPACK_IMPORTED_MODULE_7__/* .prepareAttributeMatcher */ .F)(_formats_table_attributors_table__WEBPACK_IMPORTED_MODULE_8__/* .TABLE_ATTRIBUTORS */ .Zt));
      this.quill.clipboard.addMatcher('td, th', (0,_utils_prepare_attr_matcher__WEBPACK_IMPORTED_MODULE_7__/* .prepareCellAttributeMatcher */ .a)(_formats_table_attributors_cell__WEBPACK_IMPORTED_MODULE_9__/* .CELL_ATTRIBUTORS */ .h6));
    }
  }, {
    key: "addKeyboardHandlers",
    value: function addKeyboardHandlers() {
      var _this3 = this;
      var bindings = Table.keyboardBindings;
      Object.keys(bindings).forEach(function (name) {
        if (bindings[name]) {
          _this3.quill.keyboard.addBinding(bindings[name]);
        }
      });
    }
  }, {
    key: "balanceTables",
    value: function balanceTables() {
      this.quill.scroll.descendants(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .TableContainer */ .xJ).forEach(function (table) {
        table.balanceCells();
      });
    }
  }, {
    key: "deleteColumn",
    value: function deleteColumn() {
      var _this$getTable = this.getTable(),
        _this$getTable2 = _slicedToArray(_this$getTable, 3),
        table = _this$getTable2[0],
        cell = _this$getTable2[2];
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(cell)) {
        return;
      }
      table.deleteColumn(cell.cellOffset());
      this.quill.update(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
    }
  }, {
    key: "deleteRow",
    value: function deleteRow() {
      var _this$getTable3 = this.getTable(),
        _this$getTable4 = _slicedToArray(_this$getTable3, 2),
        row = _this$getTable4[1];
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(row)) {
        return;
      }
      row.remove();
      this.quill.update(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
    }
  }, {
    key: "deleteTable",
    value: function deleteTable() {
      var _this$getTable5 = this.getTable(),
        _this$getTable6 = _slicedToArray(_this$getTable5, 1),
        table = _this$getTable6[0];
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(table)) {
        return;
      }
      var offset = table.offset();
      table.remove();
      this.quill.update(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
      this.quill.setSelection(offset, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
    }
  }, {
    key: "getTable",
    value: function getTable() {
      var range = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.quill.getSelection();
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(range)) {
        return EMPTY_RESULT;
      }
      var _this$quill$getLine = this.quill.getLine(range.index),
        _this$quill$getLine2 = _slicedToArray(_this$quill$getLine, 2),
        cellLine = _this$quill$getLine2[0],
        offset = _this$quill$getLine2[1];
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(cellLine) || this.tableBlots.indexOf(cellLine.statics.blotName) === -1) {
        return EMPTY_RESULT;
      }
      var cell = cellLine.parent;
      var row = cell.parent;
      var table = row.parent.parent;
      return [table, row, cell, offset];
    }
  }, {
    key: "insertColumn",
    value: function insertColumn(offset) {
      var range = this.quill.getSelection();
      var _this$getTable7 = this.getTable(range),
        _this$getTable8 = _slicedToArray(_this$getTable7, 3),
        table = _this$getTable8[0],
        row = _this$getTable8[1],
        cell = _this$getTable8[2];
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(cell)) {
        return;
      }
      var column = cell.cellOffset();
      table.insertColumn(column + offset);
      this.quill.update(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
      var shift = row.rowOffset();
      if (offset === 0) {
        shift += 1;
      }
      this.quill.setSelection(range.index + shift, range.length, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
    }
  }, {
    key: "insertColumnLeft",
    value: function insertColumnLeft() {
      this.insertColumn(0);
    }
  }, {
    key: "insertColumnRight",
    value: function insertColumnRight() {
      this.insertColumn(1);
    }
  }, {
    key: "insertRow",
    value: function insertRow(offset) {
      var range = this.quill.getSelection();
      var _this$getTable9 = this.getTable(range),
        _this$getTable10 = _slicedToArray(_this$getTable9, 3),
        table = _this$getTable10[0],
        row = _this$getTable10[1],
        cell = _this$getTable10[2];
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(cell)) {
        return;
      }
      var index = row.rowOffset();
      table.insertRow(index + offset);
      this.quill.update(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
      if (offset > 0) {
        this.quill.setSelection(range, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      } else {
        this.quill.setSelection(range.index + row.children.length, range.length, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      }
    }
  }, {
    key: "insertRowAbove",
    value: function insertRowAbove() {
      this.insertRow(0);
    }
  }, {
    key: "insertRowBelow",
    value: function insertRowBelow() {
      this.insertRow(1);
    }
  }, {
    key: "insertHeaderRow",
    value: function insertHeaderRow() {
      var range = this.quill.getSelection();
      var _this$getTable11 = this.getTable(range),
        _this$getTable12 = _slicedToArray(_this$getTable11, 3),
        table = _this$getTable12[0],
        cell = _this$getTable12[2];
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(cell)) {
        return;
      }
      table.insertHeaderRow();
      this.quill.update(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
    }
  }, {
    key: "insertTable",
    value: function insertTable(rows, columns) {
      var range = this.quill.getSelection();
      if (!(0,_utils_is_defined__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(range)) {
        return;
      }
      var delta = new Array(rows).fill(0).reduce(function (memo) {
        var rowId = (0,_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .tableId */ .Lv)();
        new Array(columns).fill('\n').forEach(function (text) {
          memo.insert(text, {
            tableCellLine: {
              row: rowId,
              cell: (0,_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .tableId */ .Lv)()
            }
          });
        });
        return memo;
      }, new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().retain(range.index));
      this.quill.updateContents(delta, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
      this.quill.setSelection(range.index, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      this.balanceTables();
    }
  }, {
    key: "tableFormats",
    value: function tableFormats() {
      return this.tableBlots;
    }
  }, {
    key: "listenBalanceCells",
    value: function listenBalanceCells() {
      var _this4 = this;
      this.quill.on(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].events.SCROLL_OPTIMIZE */ .ZP.events.SCROLL_OPTIMIZE, function (mutations) {
        mutations.some(function (mutation) {
          if (['TD', 'TH', 'TR', 'TBODY', 'THEAD', 'TABLE'].indexOf(mutation.target.tagName) !== -1) {
            _this4.quill.once(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].events.TEXT_CHANGE */ .ZP.events.TEXT_CHANGE, function (delta, old, source) {
              if (source !== _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER) return;
              _this4.balanceTables();
            });
            return true;
          }
          return false;
        });
      });
      this.quill.on(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].events.CONTENT_SETTED */ .ZP.events.CONTENT_SETTED, function () {
        _this4.quill.once(_core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].events.TEXT_CHANGE */ .ZP.events.TEXT_CHANGE, function () {
          _this4.balanceTables();
        });
      });
    }
  }], [{
    key: "register",
    value: function register() {
      _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .CellLine */ .zW, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .HeaderCellLine */ .iD, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .TableHeaderCell */ .xs, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .TableCell */ .pj, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .TableHeaderRow */ .KA, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .TableRow */ .SC, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .TableBody */ .RM, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .TableHeader */ .xD, true);
      _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_formats_table__WEBPACK_IMPORTED_MODULE_4__/* .TableContainer */ .xJ, true);
      [_formats_table_attributors_table__WEBPACK_IMPORTED_MODULE_8__/* .TABLE_FORMATS */ .li, _formats_table_attributors_cell__WEBPACK_IMPORTED_MODULE_9__/* .CELL_FORMATS */ .Du].forEach(function (formats) {
        Object.keys(formats).forEach(function (name) {
          _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].register */ .ZP.register(_defineProperty({}, "formats/".concat(name), formats[name]), true);
        });
      });
    }
  }]);
  return Table;
}(_core_module__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z);
Table.keyboardBindings = {
  'table backspace': {
    key: 'backspace',
    format: ['tableCellLine', 'tableHeaderCellLine'],
    collapsed: true,
    offset: 0,
    handler: function handler(range) {
      var _this$quill$getLine3 = this.quill.getLine(range.index),
        _this$quill$getLine4 = _slicedToArray(_this$quill$getLine3, 1),
        line = _this$quill$getLine4[0];
      if (!line.prev || ['tableCellLine', 'tableHeaderCellLine'].indexOf(line.prev.statics.blotName) === -1) {
        return false;
      }
      return true;
    }
  },
  'table delete': {
    key: 'del',
    format: ['tableCellLine', 'tableHeaderCellLine'],
    collapsed: true,
    suffix: /^$/,
    handler: function handler() {}
  },
  'table enter': {
    key: 'enter',
    shiftKey: null,
    format: ['tableCellLine', 'tableHeaderCellLine'],
    handler: function handler(range, context) {
      var _this$quill$selection,
        _this$quill$selection2,
        _this5 = this;
      var module = this.quill.getModule('table');
      if (!module) {
        return;
      }
      var quill = this.quill;
      var _module$getTable = module.getTable(range),
        _module$getTable2 = _slicedToArray(_module$getTable, 1),
        table = _module$getTable2[0];
      var isCaretPositionAfterTable = ((_this$quill$selection = this.quill.selection) === null || _this$quill$selection === void 0 ? void 0 : _this$quill$selection.lastNative.native.endContainer.nodeType) === ELEMENT_NODE;
      if (isCaretPositionAfterTable) {
        var index = table.offset();
        (0,_utils_insert_pr_above__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)({
          quill: quill,
          index: index,
          table: table
        });
        return;
      }
      if ((_this$quill$selection2 = this.quill.selection) !== null && _this$quill$selection2 !== void 0 && _this$quill$selection2.composing) return;
      if (range.length > 0) {
        this.quill.scroll.deleteAt(range.index, range.length);
      }
      var lineFormats = Object.keys(context.format).reduce(function (formats, format) {
        if (_this5.quill.scroll.query(format, parchment__WEBPACK_IMPORTED_MODULE_1__.Scope.BLOCK) && !Array.isArray(context.format[format])) {
          formats[format] = context.format[format];
        }
        return formats;
      }, {});
      this.quill.insertText(range.index, '\n', lineFormats.tableCellLine, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
      this.quill.setSelection(range.index + 1, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.SILENT */ .ZP.sources.SILENT);
      this.quill.focus();
      Object.keys(context.format).forEach(function (name) {
        if (lineFormats[name] != null) return;
        if (Array.isArray(context.format[name])) return;
        if (name === 'link') return;
        _this5.quill.format(name, context.format[name], _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
      });
    }
  },
  'table tab': {
    key: 'tab',
    shiftKey: null,
    format: ['tableCellLine', 'tableHeaderCellLine'],
    handler: function handler(range, context) {
      var event = context.event,
        cell = context.line;
      var offset = cell.offset(this.quill.scroll);
      if (event.shiftKey) {
        this.quill.setSelection(offset - 1, _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
      } else {
        this.quill.setSelection(offset + cell.length(), _core_quill__WEBPACK_IMPORTED_MODULE_2__/* ["default"].sources.USER */ .ZP.sources.USER);
      }
    }
  },
  'table down': (0,_utils_make_table_arrow_handler__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(false, ['tableCellLine', 'tableHeaderCellLine']),
  'table up': (0,_utils_make_table_arrow_handler__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(true, ['tableCellLine', 'tableHeaderCellLine'])
};
function matchCell(node, delta) {
  var row = node.parentNode;
  var table = row.parentNode.tagName === 'TABLE' ? row.parentNode : row.parentNode.parentNode;
  var isHeaderRow = row.parentNode.tagName === 'THEAD' ? true : null;
  var rows = Array.from(table.querySelectorAll('tr'));
  var cells = Array.from(row.querySelectorAll('th,td'));
  var rowId = rows.indexOf(row) + 1;
  var cellId = cells.indexOf(node) + 1;
  var cellLineBlotName = isHeaderRow ? 'tableHeaderCellLine' : 'tableCellLine';
  if (delta.length() === 0) {
    delta = new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().insert('\n', _defineProperty({}, cellLineBlotName, {
      row: rowId,
      cell: cellId
    }));
    return delta;
  }
  if (!(0,_clipboard__WEBPACK_IMPORTED_MODULE_5__/* .deltaEndsWith */ .PF)(delta, '\n')) {
    delta.insert('\n');
  }
  return (0,_clipboard__WEBPACK_IMPORTED_MODULE_5__/* .applyFormat */ .HI)(delta, cellLineBlotName, {
    row: rowId,
    cell: cellId
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Table);

/***/ }),

/***/ 6054:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": () => (/* binding */ lite)
});

// EXTERNAL MODULE: ./node_modules/quill-delta/dist/Delta.js
var Delta = __webpack_require__(9098);
var Delta_default = /*#__PURE__*/__webpack_require__.n(Delta);
// EXTERNAL MODULE: ./core/quill.js
var core_quill = __webpack_require__(281);
// EXTERNAL MODULE: ./core/module.js
var core_module = __webpack_require__(7094);
// EXTERNAL MODULE: ./blots/block.js + 1 modules
var block = __webpack_require__(6446);
// EXTERNAL MODULE: ./blots/container.js
var container = __webpack_require__(3553);
// EXTERNAL MODULE: ./utils/is_defined.js
var is_defined = __webpack_require__(5874);
// EXTERNAL MODULE: ./formats/table/attributors/table.js
var table = __webpack_require__(319);
// EXTERNAL MODULE: ./formats/table/get_id.js
var get_id = __webpack_require__(8536);
// EXTERNAL MODULE: ./formats/table/toggle_attribute.js
var toggle_attribute = __webpack_require__(2795);
;// CONCATENATED MODULE: ./formats/table/lite.js
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }






var TABLE_TAGS = (/* unused pure expression or super */ null && (['TD', 'TH', 'TR', 'TBODY', 'THEAD', 'TABLE']));
var DATA_PREFIX = 'data-tablelite-';
var BaseCell = /*#__PURE__*/function (_Block) {
  _inherits(BaseCell, _Block);
  var _super = _createSuper(BaseCell);
  function BaseCell() {
    _classCallCheck(this, BaseCell);
    return _super.apply(this, arguments);
  }
  _createClass(BaseCell, [{
    key: "format",
    value: function format(name, value) {
      if (table/* TABLE_FORMATS */.li[name]) {
        var _this$row;
        var attrName = "data-".concat(name.toLowerCase());
        (0,toggle_attribute/* default */.Z)(this.domNode, attrName, value);
        (_this$row = this.row()) === null || _this$row === void 0 || (_this$row = _this$row.table()) === null || _this$row === void 0 || _this$row.format(name, value);
      } else {
        _get(_getPrototypeOf(BaseCell.prototype), "format", this).call(this, name, value);
      }
    }
  }, {
    key: "cellOffset",
    value: function cellOffset() {
      if (this.parent) {
        return this.parent.children.indexOf(this);
      }
      return -1;
    }
  }, {
    key: "row",
    value: function row() {
      return 'table' in this.parent ? this.parent : null;
    }
  }, {
    key: "rowOffset",
    value: function rowOffset() {
      if (this.row()) {
        return this.row().rowOffset();
      }
      return -1;
    }
  }, {
    key: "table",
    value: function table() {
      var _this$row2;
      return (_this$row2 = this.row()) === null || _this$row2 === void 0 ? void 0 : _this$row2.table();
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = _get(_getPrototypeOf(BaseCell), "create", this).call(this);
      var attrName = this.dataAttribute;
      (0,toggle_attribute/* default */.Z)(node, attrName, value !== null && value !== void 0 ? value : tableId());
      return node;
    }
  }, {
    key: "formats",
    value: function formats(domNode) {
      var attrName = this.dataAttribute;
      if (domNode.hasAttribute(attrName)) {
        return domNode.getAttribute(attrName);
      }
      return undefined;
    }
  }]);
  return BaseCell;
}(block/* default */.ZP);
BaseCell.tagName = ['TD', 'TH'];
var TableCell = /*#__PURE__*/function (_BaseCell) {
  _inherits(TableCell, _BaseCell);
  var _super2 = _createSuper(TableCell);
  function TableCell() {
    _classCallCheck(this, TableCell);
    return _super2.apply(this, arguments);
  }
  _createClass(TableCell, [{
    key: "format",
    value: function format(name, value) {
      if (name === TableCell.blotName && value) {
        this.domNode.setAttribute(TableCell.dataAttribute, value);
      } else {
        _get(_getPrototypeOf(TableCell.prototype), "format", this).call(this, name, value);
      }
    }
  }]);
  return TableCell;
}(BaseCell);
TableCell.blotName = 'table';
TableCell.dataAttribute = "".concat(DATA_PREFIX, "row");
var TableHeaderCell = /*#__PURE__*/function (_BaseCell2) {
  _inherits(TableHeaderCell, _BaseCell2);
  var _super3 = _createSuper(TableHeaderCell);
  function TableHeaderCell() {
    _classCallCheck(this, TableHeaderCell);
    return _super3.apply(this, arguments);
  }
  _createClass(TableHeaderCell, [{
    key: "format",
    value: function format(name, value) {
      if (name === TableHeaderCell.blotName && value) {
        this.domNode.setAttribute(TableHeaderCell.dataAttribute, value);
      } else {
        _get(_getPrototypeOf(TableHeaderCell.prototype), "format", this).call(this, name, value);
      }
    }
  }]);
  return TableHeaderCell;
}(BaseCell);
TableHeaderCell.tagName = ['TH', 'TD'];
TableHeaderCell.blotName = 'tableHeaderCell';
TableHeaderCell.dataAttribute = "".concat(DATA_PREFIX, "header-row");
var BaseRow = /*#__PURE__*/function (_Container) {
  _inherits(BaseRow, _Container);
  var _super4 = _createSuper(BaseRow);
  function BaseRow() {
    _classCallCheck(this, BaseRow);
    return _super4.apply(this, arguments);
  }
  _createClass(BaseRow, [{
    key: "checkMerge",
    value: function checkMerge() {
      if (_get(_getPrototypeOf(BaseRow.prototype), "checkMerge", this).call(this) && (0,is_defined/* default */.Z)(this.next.children.head)) {
        var formatName = this.childFormatName;
        var thisHead = this.children.head.formats();
        var thisTail = this.children.tail.formats();
        var nextHead = this.next.children.head.formats();
        var nextTail = this.next.children.tail.formats();
        return thisHead[formatName] === thisTail[formatName] && thisHead[formatName] === nextHead[formatName] && thisHead[formatName] === nextTail[formatName];
      }
      return false;
    }
  }, {
    key: "optimize",
    value: function optimize() {
      var _get2,
        _this = this;
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      (_get2 = _get(_getPrototypeOf(BaseRow.prototype), "optimize", this)).call.apply(_get2, [this].concat(args));
      var formatName = this.childFormatName;
      this.children.forEach(function (child) {
        if (!(0,is_defined/* default */.Z)(child.next)) {
          return;
        }
        var childFormats = child.formats();
        var nextFormats = child.next.formats();
        if (childFormats[formatName] !== nextFormats[formatName]) {
          var next = _this.splitAfter(child);
          if (next) {
            next.optimize();
          }
          // We might be able to merge with prev now
          if (_this.prev) {
            _this.prev.optimize();
          }
        }
      });
    }
  }, {
    key: "rowOffset",
    value: function rowOffset() {
      if (this.parent) {
        return this.parent.children.indexOf(this);
      }
      return -1;
    }
  }, {
    key: "table",
    value: function table() {
      var _this$parent;
      return (_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.parent;
    }
  }]);
  return BaseRow;
}(container/* default */.Z);
BaseRow.tagName = 'TR';
var TableRow = /*#__PURE__*/function (_BaseRow) {
  _inherits(TableRow, _BaseRow);
  var _super5 = _createSuper(TableRow);
  function TableRow(scroll, domNode) {
    var _this2;
    _classCallCheck(this, TableRow);
    _this2 = _super5.call(this, scroll, domNode);
    _this2.childFormatName = 'table';
    return _this2;
  }
  return _createClass(TableRow);
}(BaseRow);
TableRow.blotName = 'tableRow';
var TableHeaderRow = /*#__PURE__*/function (_BaseRow2) {
  _inherits(TableHeaderRow, _BaseRow2);
  var _super6 = _createSuper(TableHeaderRow);
  function TableHeaderRow(scroll, domNode) {
    var _this3;
    _classCallCheck(this, TableHeaderRow);
    _this3 = _super6.call(this, scroll, domNode);
    _this3.childFormatName = 'tableHeaderCell';
    return _this3;
  }
  return _createClass(TableHeaderRow);
}(BaseRow);
TableHeaderRow.blotName = 'tableHeaderRow';
var RowContainer = /*#__PURE__*/function (_Container2) {
  _inherits(RowContainer, _Container2);
  var _super7 = _createSuper(RowContainer);
  function RowContainer() {
    _classCallCheck(this, RowContainer);
    return _super7.apply(this, arguments);
  }
  _createClass(RowContainer, [{
    key: "optimize",
    value: function optimize() {
      var _get3;
      if (this.statics.requiredContainer && !(this.parent instanceof this.statics.requiredContainer)) {
        var domNode = this.children.head.children.head.domNode;
        var formats = {};
        Object.keys(table/* TABLE_FORMATS */.li).forEach(function (format) {
          var value = domNode.dataset[format.toLowerCase()];
          if (value) {
            formats[format] = value;
          }
        });
        this.wrap(this.statics.requiredContainer.blotName, formats);
      }
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
      (_get3 = _get(_getPrototypeOf(RowContainer.prototype), "optimize", this)).call.apply(_get3, [this].concat(args));
    }
  }]);
  return RowContainer;
}(container/* default */.Z);
var TableBody = /*#__PURE__*/function (_RowContainer) {
  _inherits(TableBody, _RowContainer);
  var _super8 = _createSuper(TableBody);
  function TableBody() {
    _classCallCheck(this, TableBody);
    return _super8.apply(this, arguments);
  }
  return _createClass(TableBody);
}(RowContainer);
TableBody.blotName = 'tableBody';
TableBody.tagName = ['TBODY'];
var TableHeader = /*#__PURE__*/function (_RowContainer2) {
  _inherits(TableHeader, _RowContainer2);
  var _super9 = _createSuper(TableHeader);
  function TableHeader() {
    _classCallCheck(this, TableHeader);
    return _super9.apply(this, arguments);
  }
  return _createClass(TableHeader);
}(RowContainer);
TableHeader.blotName = 'tableHeader';
TableHeader.tagName = ['THEAD'];
var TableContainer = /*#__PURE__*/function (_Container3) {
  _inherits(TableContainer, _Container3);
  var _super10 = _createSuper(TableContainer);
  function TableContainer() {
    _classCallCheck(this, TableContainer);
    return _super10.apply(this, arguments);
  }
  _createClass(TableContainer, [{
    key: "balanceCells",
    value: function balanceCells() {
      var headerRows = this.descendants(TableHeaderRow);
      var bodyRows = this.descendants(TableRow);
      var maxColCount = this.getMaxTableColCount(headerRows, bodyRows);
      this.balanceRows(maxColCount, headerRows, TableHeaderCell);
      this.balanceRows(maxColCount, bodyRows, TableCell);
    }
  }, {
    key: "getMaxTableColCount",
    value: function getMaxTableColCount(headerRows, bodyRows) {
      return Math.max(this.getMaxRowColCount(headerRows), this.getMaxRowColCount(bodyRows));
    }
  }, {
    key: "getMaxRowColCount",
    value: function getMaxRowColCount(rows) {
      return Math.max.apply(Math, _toConsumableArray(rows.map(function (row) {
        return row.children.length;
      })));
    }
  }, {
    key: "balanceRows",
    value: function balanceRows(maxColCount, rows, CellClass) {
      var _this4 = this;
      rows.forEach(function (row) {
        new Array(maxColCount - row.children.length).fill(0).forEach(function () {
          var value;
          if ((0,is_defined/* default */.Z)(row.children.head)) {
            value = CellClass.formats(row.children.head.domNode);
          }
          var blot = _this4.scroll.create(CellClass.blotName, value);
          row.appendChild(blot);
          blot.optimize(); // Add break blot
        });
      });
    }
  }, {
    key: "cells",
    value: function cells(column) {
      return this.rows().map(function (row) {
        return row.children.at(column);
      });
    }
  }, {
    key: "deleteColumn",
    value: function deleteColumn(index) {
      var _this5 = this;
      [TableHeader, TableBody].forEach(function (blot) {
        var _this5$descendants = _this5.descendants(blot),
          _this5$descendants2 = _slicedToArray(_this5$descendants, 1),
          tablePart = _this5$descendants2[0];
        if (!(0,is_defined/* default */.Z)(tablePart) || !(0,is_defined/* default */.Z)(tablePart.children.head)) {
          return;
        }
        tablePart.children.forEach(function (row) {
          var cell = row.children.at(index);
          if ((0,is_defined/* default */.Z)(cell)) {
            cell.remove();
          }
        });
      });
    }
  }, {
    key: "insertColumn",
    value: function insertColumn(index) {
      var _this6 = this;
      [TableHeader, TableBody].forEach(function (blot) {
        var _this6$descendants = _this6.descendants(blot),
          _this6$descendants2 = _slicedToArray(_this6$descendants, 1),
          tablePart = _this6$descendants2[0];
        if (!(0,is_defined/* default */.Z)(tablePart) || !(0,is_defined/* default */.Z)(tablePart.children.head)) {
          return;
        }
        var CellBlot = blot === TableHeader ? TableHeaderCell : TableCell;
        tablePart.children.forEach(function (row) {
          var ref = row.children.at(index);
          var value = CellBlot.formats(row.children.head.domNode);
          var cell = _this6.scroll.create(CellBlot.blotName, value);
          row.insertBefore(cell, ref);
        });
      });
    }
  }, {
    key: "insertRow",
    value: function insertRow(index) {
      var _this7 = this;
      var _this$descendants = this.descendants(TableBody),
        _this$descendants2 = _slicedToArray(_this$descendants, 1),
        body = _this$descendants2[0];
      if (!(0,is_defined/* default */.Z)(body) || !(0,is_defined/* default */.Z)(body.children.head)) {
        return;
      }
      var id = tableId();
      var row = this.scroll.create(TableRow.blotName);
      body.children.head.children.forEach(function () {
        var cell = _this7.scroll.create(TableCell.blotName, id);
        row.appendChild(cell);
      });
      var ref = body.children.at(index);
      body.insertBefore(row, ref);
    }
  }, {
    key: "insertHeaderRow",
    value: function insertHeaderRow() {
      var _this8 = this;
      var _this$descendants3 = this.descendants(TableHeader),
        _this$descendants4 = _slicedToArray(_this$descendants3, 1),
        header = _this$descendants4[0];
      var _this$descendants5 = this.descendants(TableBody),
        _this$descendants6 = _slicedToArray(_this$descendants5, 1),
        body = _this$descendants6[0];
      if ((0,is_defined/* default */.Z)(header) || !(0,is_defined/* default */.Z)(body) || !(0,is_defined/* default */.Z)(body.children.head)) {
        return;
      }
      var id = tableId();
      var newHeader = this.scroll.create(TableHeader.blotName);
      var row = this.scroll.create(TableHeaderRow.blotName);
      var ref = this.children.at(0);
      newHeader.appendChild(row);
      body.children.head.children.forEach(function () {
        var cell = _this8.scroll.create(TableHeaderCell.blotName, id);
        row.appendChild(cell);
        cell.optimize();
      });
      this.insertBefore(newHeader, ref);
    }
  }, {
    key: "rows",
    value: function rows() {
      var body = this.children.head;
      return (0,is_defined/* default */.Z)(body) ? body.children.map(function (row) {
        return row;
      }) : [];
    }
  }, {
    key: "formats",
    value: function formats() {
      var formats = {};
      var childElem = this.cells()[0].domNode;
      Object.keys(table/* TABLE_FORMATS */.li).forEach(function (format) {
        var value = childElem.dataset[format.toLowerCase()];
        if (value) {
          formats[format] = value;
        }
      });
      return formats;
    }
  }, {
    key: "format",
    value: function format(name, value) {
      var tableFormat = table/* TABLE_FORMATS */.li[name];
      if (tableFormat) {
        var attrName = "data-".concat(name.toLowerCase());
        this.cells().forEach(function (cell) {
          (0,toggle_attribute/* default */.Z)(cell.domNode, attrName, value);
        });
        tableFormat.add(this.domNode, value);
      }
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = _get(_getPrototypeOf(TableContainer), "create", this).call(this, value);
      if (value) {
        Object.keys(value).forEach(function (format) {
          var _TABLE_FORMATS$format;
          (_TABLE_FORMATS$format = table/* TABLE_FORMATS */.li[format]) === null || _TABLE_FORMATS$format === void 0 || _TABLE_FORMATS$format.add(node, value[format]);
        });
      }
      return node;
    }
  }]);
  return TableContainer;
}(container/* default */.Z);
TableContainer.blotName = 'tableContainer';
TableContainer.tagName = 'TABLE';
TableContainer.allowedChildren = [TableHeader, TableBody];
TableBody.requiredContainer = TableContainer;
TableHeader.requiredContainer = TableContainer;
TableBody.allowedChildren = [TableRow];
TableRow.requiredContainer = TableBody;
TableRow.allowedChildren = [TableCell];
TableCell.requiredContainer = TableRow;
TableHeader.allowedChildren = [TableHeaderRow];
TableHeaderRow.requiredContainer = TableHeader;
TableHeaderRow.allowedChildren = [TableHeaderCell];
TableHeaderCell.requiredContainer = TableHeaderRow;
function tableId() {
  return "row-".concat((0,get_id/* default */.Z)());
}

// EXTERNAL MODULE: ./modules/clipboard.js
var clipboard = __webpack_require__(5635);
// EXTERNAL MODULE: ./modules/table/utils/make_table_arrow_handler.js
var make_table_arrow_handler = __webpack_require__(9466);
;// CONCATENATED MODULE: ./modules/table/utils/insert_pr_below.js


function insertParagraphAbove(_ref) {
  var quill = _ref.quill,
    index = _ref.index,
    range = _ref.range;
  var insertIndex = index - 1;
  var delta = new (Delta_default())().retain(insertIndex).insert('\n');
  quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
  quill.setSelection(range.index + 1, range.length, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
}
// EXTERNAL MODULE: ./modules/table/utils/insert_pr_above.js
var insert_pr_above = __webpack_require__(2480);
;// CONCATENATED MODULE: ./modules/table/utils/table_side.js
function tableSide(row, cell, offset) {
  if (row.prev == null && row.next == null) {
    if (cell.prev == null && cell.next == null) {
      return offset === 0 ? -1 : 1;
    }
    return cell.prev == null ? -1 : 1;
  }
  if (row.prev == null) {
    return -1;
  }
  if (row.next == null) {
    return 1;
  }
  return null;
}
// EXTERNAL MODULE: ./modules/table/utils/prepare_attr_matcher.js
var prepare_attr_matcher = __webpack_require__(7896);
// EXTERNAL MODULE: ./formats/table/attributors/cell.js
var cell = __webpack_require__(1342);
;// CONCATENATED MODULE: ./modules/table/lite.js
function lite_typeof(o) { "@babel/helpers - typeof"; return lite_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, lite_typeof(o); }
function _defineProperty(obj, key, value) { key = lite_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function lite_slicedToArray(arr, i) { return lite_arrayWithHoles(arr) || lite_iterableToArrayLimit(arr, i) || lite_unsupportedIterableToArray(arr, i) || lite_nonIterableRest(); }
function lite_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function lite_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return lite_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return lite_arrayLikeToArray(o, minLen); }
function lite_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function lite_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function lite_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function lite_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function lite_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, lite_toPropertyKey(descriptor.key), descriptor); } }
function lite_createClass(Constructor, protoProps, staticProps) { if (protoProps) lite_defineProperties(Constructor.prototype, protoProps); if (staticProps) lite_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function lite_toPropertyKey(arg) { var key = lite_toPrimitive(arg, "string"); return lite_typeof(key) === "symbol" ? key : String(key); }
function lite_toPrimitive(input, hint) { if (lite_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (lite_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function lite_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) lite_setPrototypeOf(subClass, superClass); }
function lite_setPrototypeOf(o, p) { lite_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return lite_setPrototypeOf(o, p); }
function lite_createSuper(Derived) { var hasNativeReflectConstruct = lite_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = lite_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = lite_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return lite_possibleConstructorReturn(this, result); }; }
function lite_possibleConstructorReturn(self, call) { if (call && (lite_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return lite_assertThisInitialized(self); }
function lite_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function lite_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function lite_getPrototypeOf(o) { lite_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return lite_getPrototypeOf(o); }













var EMPTY_RESULT = [null, null, null, -1];
var TableLite = /*#__PURE__*/function (_Module) {
  lite_inherits(TableLite, _Module);
  var _super = lite_createSuper(TableLite);
  function TableLite() {
    var _this;
    lite_classCallCheck(this, TableLite);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _this.tableBlots = [TableCell.blotName, TableHeaderCell.blotName];
    _this.tableBlots.forEach(function (blotName) {
      _this.quill.editor.addImmediateFormat(blotName);
    });
    _this.integrateClipboard();
    _this.addKeyboardHandlers();
    _this.listenBalanceCells();
    return _this;
  }
  lite_createClass(TableLite, [{
    key: "integrateClipboard",
    value: function integrateClipboard() {
      var _this2 = this;
      this.tableBlots.forEach(function (blotName) {
        return _this2.quill.clipboard.addTableBlot(blotName);
      });
      this.quill.clipboard.addMatcher('tr', matchTable);
      this.quill.clipboard.addMatcher('table', (0,prepare_attr_matcher/* prepareAttributeMatcher */.F)(table/* TABLE_ATTRIBUTORS */.Zt));
      this.quill.clipboard.addMatcher('td, th', (0,prepare_attr_matcher/* prepareCellAttributeMatcher */.a)(cell/* CELL_ATTRIBUTORS */.h6));
    }
  }, {
    key: "addKeyboardHandlers",
    value: function addKeyboardHandlers() {
      var _this3 = this;
      var bindings = TableLite.keyboardBindings;
      Object.keys(bindings).forEach(function (name) {
        if (bindings[name]) {
          _this3.quill.keyboard.addBinding(bindings[name]);
        }
      });
    }
  }, {
    key: "balanceTables",
    value: function balanceTables() {
      this.quill.scroll.descendants(TableContainer).forEach(function (table) {
        table.balanceCells();
      });
    }
  }, {
    key: "deleteColumn",
    value: function deleteColumn() {
      var _this$getTable = this.getTable(),
        _this$getTable2 = lite_slicedToArray(_this$getTable, 3),
        table = _this$getTable2[0],
        cell = _this$getTable2[2];
      if (!(0,is_defined/* default */.Z)(cell)) {
        return;
      }
      table.deleteColumn(cell.cellOffset());
      this.quill.update(core_quill/* default.sources.USER */.ZP.sources.USER);
    }
  }, {
    key: "deleteRow",
    value: function deleteRow() {
      var _this$getTable3 = this.getTable(),
        _this$getTable4 = lite_slicedToArray(_this$getTable3, 2),
        row = _this$getTable4[1];
      if (!(0,is_defined/* default */.Z)(row)) {
        return;
      }
      row.remove();
      this.quill.update(core_quill/* default.sources.USER */.ZP.sources.USER);
    }
  }, {
    key: "deleteTable",
    value: function deleteTable() {
      var _this$getTable5 = this.getTable(),
        _this$getTable6 = lite_slicedToArray(_this$getTable5, 1),
        table = _this$getTable6[0];
      if (!(0,is_defined/* default */.Z)(table)) {
        return;
      }
      var offset = table.offset();
      table.remove();
      this.quill.update(core_quill/* default.sources.USER */.ZP.sources.USER);
      this.quill.setSelection(offset, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
    }
  }, {
    key: "getTable",
    value: function getTable() {
      var range = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.quill.getSelection();
      if (!(0,is_defined/* default */.Z)(range)) {
        return EMPTY_RESULT;
      }
      var _this$quill$getLine = this.quill.getLine(range.index),
        _this$quill$getLine2 = lite_slicedToArray(_this$quill$getLine, 2),
        cell = _this$quill$getLine2[0],
        offset = _this$quill$getLine2[1];
      if (!(0,is_defined/* default */.Z)(cell) || this.tableBlots.indexOf(cell.statics.blotName) === -1) {
        return EMPTY_RESULT;
      }
      var row = cell.parent;
      var table = row.parent.parent;
      return [table, row, cell, offset];
    }
  }, {
    key: "insertColumn",
    value: function insertColumn(offset) {
      var range = this.quill.getSelection();
      var _this$getTable7 = this.getTable(range),
        _this$getTable8 = lite_slicedToArray(_this$getTable7, 3),
        table = _this$getTable8[0],
        row = _this$getTable8[1],
        cell = _this$getTable8[2];
      if (!(0,is_defined/* default */.Z)(cell)) {
        return;
      }
      var column = cell.cellOffset();
      table.insertColumn(column + offset);
      this.quill.update(core_quill/* default.sources.USER */.ZP.sources.USER);
      var shift = row.rowOffset();
      if (offset === 0) {
        shift += 1;
      }
      this.quill.setSelection(range.index + shift, range.length, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
    }
  }, {
    key: "insertColumnLeft",
    value: function insertColumnLeft() {
      this.insertColumn(0);
    }
  }, {
    key: "insertColumnRight",
    value: function insertColumnRight() {
      this.insertColumn(1);
    }
  }, {
    key: "insertRow",
    value: function insertRow(offset) {
      var range = this.quill.getSelection();
      var _this$getTable9 = this.getTable(range),
        _this$getTable10 = lite_slicedToArray(_this$getTable9, 3),
        table = _this$getTable10[0],
        row = _this$getTable10[1],
        cell = _this$getTable10[2];
      if (!(0,is_defined/* default */.Z)(cell)) {
        return;
      }
      var index = row.rowOffset();
      table.insertRow(index + offset);
      this.quill.update(core_quill/* default.sources.USER */.ZP.sources.USER);
      if (offset > 0) {
        this.quill.setSelection(range, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
      } else {
        this.quill.setSelection(range.index + row.children.length, range.length, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
      }
    }
  }, {
    key: "insertRowAbove",
    value: function insertRowAbove() {
      this.insertRow(0);
    }
  }, {
    key: "insertRowBelow",
    value: function insertRowBelow() {
      this.insertRow(1);
    }
  }, {
    key: "insertHeaderRow",
    value: function insertHeaderRow() {
      var range = this.quill.getSelection();
      var _this$getTable11 = this.getTable(range),
        _this$getTable12 = lite_slicedToArray(_this$getTable11, 3),
        table = _this$getTable12[0],
        cell = _this$getTable12[2];
      if (!(0,is_defined/* default */.Z)(cell)) {
        return;
      }
      table.insertHeaderRow();
      this.quill.update(core_quill/* default.sources.USER */.ZP.sources.USER);
    }
  }, {
    key: "insertTable",
    value: function insertTable(rows, columns) {
      var range = this.quill.getSelection();
      if (!(0,is_defined/* default */.Z)(range)) {
        return;
      }
      var delta = new Array(rows).fill(0).reduce(function (memo) {
        var text = new Array(columns).fill('\n').join('');
        return memo.insert(text, {
          table: tableId()
        });
      }, new (Delta_default())().retain(range.index));
      this.quill.updateContents(delta, core_quill/* default.sources.USER */.ZP.sources.USER);
      this.quill.setSelection(range.index, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
      this.balanceTables();
    }
  }, {
    key: "tableFormats",
    value: function tableFormats() {
      return this.tableBlots;
    }
  }, {
    key: "listenBalanceCells",
    value: function listenBalanceCells() {
      var _this4 = this;
      this.quill.on(core_quill/* default.events.SCROLL_OPTIMIZE */.ZP.events.SCROLL_OPTIMIZE, function (mutations) {
        mutations.some(function (mutation) {
          if (['TD', 'TH', 'TR', 'TBODY', 'THEAD', 'TABLE'].indexOf(mutation.target.tagName) !== -1) {
            _this4.quill.once(core_quill/* default.events.TEXT_CHANGE */.ZP.events.TEXT_CHANGE, function (delta, old, source) {
              if (source !== core_quill/* default.sources.USER */.ZP.sources.USER) return;
              _this4.balanceTables();
            });
            return true;
          }
          return false;
        });
      });
      this.quill.on(core_quill/* default.events.CONTENT_SETTED */.ZP.events.CONTENT_SETTED, function () {
        _this4.quill.once(core_quill/* default.events.TEXT_CHANGE */.ZP.events.TEXT_CHANGE, function () {
          _this4.balanceTables();
        });
      });
    }
  }], [{
    key: "register",
    value: function register() {
      core_quill/* default.register */.ZP.register(TableHeaderCell, true);
      core_quill/* default.register */.ZP.register(TableCell, true);
      core_quill/* default.register */.ZP.register(TableHeaderRow, true);
      core_quill/* default.register */.ZP.register(TableRow, true);
      core_quill/* default.register */.ZP.register(TableBody, true);
      core_quill/* default.register */.ZP.register(TableHeader, true);
      core_quill/* default.register */.ZP.register(TableContainer, true);
      [table/* TABLE_FORMATS */.li, cell/* CELL_FORMATS */.Du].forEach(function (formats) {
        Object.keys(formats).forEach(function (name) {
          core_quill/* default.register */.ZP.register(_defineProperty({}, "formats/".concat(name), formats[name]), true);
        });
      });
    }
  }]);
  return TableLite;
}(core_module/* default */.Z);
TableLite.keyboardBindings = {
  'table backspace': {
    key: 'backspace',
    format: ['table', 'tableHeaderCell'],
    collapsed: true,
    offset: 0,
    handler: function handler() {}
  },
  'table delete': {
    key: 'del',
    format: ['table', 'tableHeaderCell'],
    collapsed: true,
    suffix: /^$/,
    handler: function handler() {}
  },
  'table enter': {
    key: 'enter',
    shiftKey: null,
    format: ['table'],
    handler: function handler(range) {
      var module = this.quill.getModule('table');
      if (module) {
        var quill = this.quill;
        var _module$getTable = module.getTable(range),
          _module$getTable2 = lite_slicedToArray(_module$getTable, 4),
          table = _module$getTable2[0],
          row = _module$getTable2[1],
          cell = _module$getTable2[2],
          offset = _module$getTable2[3];
        var shift = tableSide(row, cell, offset);
        var hasHead = table.children.length > 1 && table.children.head;
        if (shift == null || shift < 0 && hasHead) {
          return;
        }
        var index = table.offset();
        if (shift < 0) {
          insertParagraphAbove({
            quill: quill,
            index: index,
            range: range
          });
        } else {
          (0,insert_pr_above/* default */.Z)({
            quill: quill,
            index: index,
            table: table
          });
        }
      }
    }
  },
  'table header enter': {
    key: 'enter',
    shiftKey: null,
    format: ['tableHeaderCell'],
    handler: function handler(range) {
      var module = this.quill.getModule('table');
      if (module) {
        var quill = this.quill;
        var _module$getTable3 = module.getTable(range),
          _module$getTable4 = lite_slicedToArray(_module$getTable3, 4),
          table = _module$getTable4[0],
          row = _module$getTable4[1],
          cell = _module$getTable4[2],
          offset = _module$getTable4[3];
        var shift = tableSide(row, cell, offset);
        if (shift == null) {
          return;
        }
        var index = table.offset();
        var hasBody = table.children.length > 1 && table.children.tail;
        if (shift < 0 || shift > 0 && hasBody) {
          insertParagraphAbove({
            quill: quill,
            index: index,
            range: range
          });
        } else {
          (0,insert_pr_above/* default */.Z)({
            quill: quill,
            index: index,
            table: table
          });
        }
      }
    }
  },
  'table tab': {
    key: 'tab',
    shiftKey: null,
    format: ['table', 'tableHeaderCell'],
    handler: function handler(range, context) {
      var event = context.event,
        cell = context.line;
      var offset = cell.offset(this.quill.scroll);
      if (event.shiftKey) {
        this.quill.setSelection(offset - 1, core_quill/* default.sources.USER */.ZP.sources.USER);
      } else {
        this.quill.setSelection(offset + cell.length(), core_quill/* default.sources.USER */.ZP.sources.USER);
      }
    }
  },
  'table down': (0,make_table_arrow_handler/* default */.Z)(false, ['table', 'tableHeaderCell']),
  'table up': (0,make_table_arrow_handler/* default */.Z)(true, ['table', 'tableHeaderCell'])
};
function matchTable(node, delta) {
  var table = node.parentNode.tagName === 'TABLE' ? node.parentNode : node.parentNode.parentNode;
  var isHeaderRow = node.parentNode.tagName === 'THEAD' ? true : null;
  var rows = Array.from(table.querySelectorAll('tr'));
  var row = rows.indexOf(node) + 1;
  return (0,clipboard/* applyFormat */.HI)(delta, isHeaderRow ? 'tableHeaderCell' : 'table', row);
}
/* harmony default export */ const lite = (TableLite);

/***/ }),

/***/ 2480:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ insertParagraphBelow)
/* harmony export */ });
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9098);
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quill_delta__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _core_quill__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(281);


function insertParagraphBelow(_ref) {
  var quill = _ref.quill,
    index = _ref.index,
    table = _ref.table;
  var insertIndex = index + table.length();
  var delta = new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().retain(insertIndex).insert('\n');
  quill.updateContents(delta, _core_quill__WEBPACK_IMPORTED_MODULE_1__/* ["default"].sources.USER */ .ZP.sources.USER);
  quill.setSelection(insertIndex, _core_quill__WEBPACK_IMPORTED_MODULE_1__/* ["default"].sources.USER */ .ZP.sources.USER);
}

/***/ }),

/***/ 9466:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ makeTableArrowHandler)
/* harmony export */ });
/* harmony import */ var _core_quill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(281);

function makeTableArrowHandler(up, formats) {
  return {
    key: up ? 'upArrow' : 'downArrow',
    collapsed: true,
    format: formats,
    handler: function handler(range, context) {
      var key = up ? 'prev' : 'next';
      var line = context.line;
      var cell = line.statics.blotName.indexOf('Line') > -1 ? line.parent : line;
      var targetTablePart = cell.parent.parent[key];
      var targetRow = cell.parent[key] || (targetTablePart === null || targetTablePart === void 0 ? void 0 : targetTablePart.children.head);
      if (targetRow != null) {
        if (targetRow.statics.blotName === 'tableRow' || targetRow.statics.blotName === 'tableHeaderRow') {
          var targetCell = targetRow.children.head;
          var cur = cell;
          while (cur.prev != null) {
            cur = cur.prev;
            targetCell = targetCell.next;
          }
          var index = targetCell.offset(this.quill.scroll) + Math.min(context.offset, targetCell.length() - 1);
          this.quill.setSelection(index, 0, _core_quill__WEBPACK_IMPORTED_MODULE_0__/* ["default"].sources.USER */ .ZP.sources.USER);
        }
      } else {
        var targetLine = cell.table()[key];
        if (targetLine != null) {
          if (up) {
            this.quill.setSelection(targetLine.offset(this.quill.scroll) + targetLine.length() - 1, 0, _core_quill__WEBPACK_IMPORTED_MODULE_0__/* ["default"].sources.USER */ .ZP.sources.USER);
          } else {
            this.quill.setSelection(targetLine.offset(this.quill.scroll), 0, _core_quill__WEBPACK_IMPORTED_MODULE_0__/* ["default"].sources.USER */ .ZP.sources.USER);
          }
        }
      }
      return false;
    }
  };
}

/***/ }),

/***/ 7896:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "F": () => (/* binding */ prepareAttributeMatcher),
/* harmony export */   "a": () => (/* binding */ prepareCellAttributeMatcher)
/* harmony export */ });
/* harmony import */ var parchment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1233);
/* harmony import */ var _attributors_attributor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1674);
/* harmony import */ var _attributors_style_attributor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4569);
/* harmony import */ var _clipboard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5635);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }




function writeToRecord(record, key, value, override) {
  record[key] = !override && record[key] ? record[key] : value;
}
function fillFormats(attributes, node, scroll, attributors, result, override) {
  attributes.filter(function (name) {
    return !!name;
  }).forEach(function (name) {
    var queryAttr = scroll.query(name, parchment__WEBPACK_IMPORTED_MODULE_0__.Scope.ATTRIBUTE);
    if (queryAttr !== null) {
      var queryAttrValue = queryAttr.value(node);
      if (queryAttrValue) {
        writeToRecord(result, queryAttr.attrName, queryAttrValue, override);
        return;
      }
    }
    var attr = attributors[name];
    if (attr != null && (attr.attrName === name || attr.keyName === name)) {
      var attrValue = attr.value(node) || undefined;
      writeToRecord(result, attr.attrName, attrValue, override);
    }
  });
  return result;
}
function prepareAttributeMatcher(attributors) {
  return function (node, delta, scroll) {
    var attributes = _attributors_attributor__WEBPACK_IMPORTED_MODULE_1__/* ["default"].keys */ .Z.keys(node);
    var styles = _attributors_style_attributor__WEBPACK_IMPORTED_MODULE_2__/* ["default"].keys */ .Z.keys(node);
    var formats = _objectSpread(_objectSpread({}, fillFormats(attributes, node, scroll, attributors, {}, true)), fillFormats(styles, node, scroll, attributors, {}, true));
    if (Object.keys(formats).length > 0) {
      return (0,_clipboard__WEBPACK_IMPORTED_MODULE_3__/* .applyFormat */ .HI)(delta, formats);
    }
    return delta;
  };
}
function prepareCellAttributeMatcher(attributors) {
  return function (node, delta, scroll) {
    var _node$parentNode;
    var attributes = _attributors_attributor__WEBPACK_IMPORTED_MODULE_1__/* ["default"].keys */ .Z.keys(node);
    var styles = _attributors_style_attributor__WEBPACK_IMPORTED_MODULE_2__/* ["default"].keys */ .Z.keys(node);
    var parentTrNode = ((_node$parentNode = node.parentNode) === null || _node$parentNode === void 0 ? void 0 : _node$parentNode.tagName) === 'TR' ? node.parentNode : undefined;
    var formats = _objectSpread(_objectSpread({}, fillFormats(attributes, node, scroll, attributors, {}, true)), fillFormats(styles, node, scroll, attributors, {}, true));
    if (parentTrNode) {
      var parentStyles = _attributors_style_attributor__WEBPACK_IMPORTED_MODULE_2__/* ["default"].keys */ .Z.keys(parentTrNode);
      formats = fillFormats(parentStyles, parentTrNode, scroll, attributors, formats, false);
    }
    if (Object.keys(formats).length > 0) {
      return (0,_clipboard__WEBPACK_IMPORTED_MODULE_3__/* .applyFormat */ .HI)(delta, formats);
    }
    return delta;
  };
}

/***/ }),

/***/ 3859:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9098);
/* harmony import */ var quill_delta__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quill_delta__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _core_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2069);
/* harmony import */ var _core_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7094);
/* harmony import */ var _utils_has_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8034);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }




var Uploader = /*#__PURE__*/function (_Module) {
  _inherits(Uploader, _Module);
  var _super = _createSuper(Uploader);
  function Uploader(quill, options) {
    var _this;
    _classCallCheck(this, Uploader);
    _this = _super.call(this, quill, options);
    _this.preventImageUploading(false);
    _this.addDragOverHandler();
    _this.addDropHandler();
    return _this;
  }
  _createClass(Uploader, [{
    key: "addDragOverHandler",
    value: function addDragOverHandler() {
      if ((0,_utils_has_window__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)()) {
        var ua = window.navigator.userAgent.toLowerCase();
        var isMsIe = ua.indexOf('msie ') !== -1 || ua.indexOf('trident/') !== -1 || ua.indexOf('edge/') !== -1;
        if (isMsIe) {
          this.quill.root.addEventListener('dragover', function (e) {
            e.preventDefault();
          });
        }
      }
    }
  }, {
    key: "addDropHandler",
    value: function addDropHandler() {
      var _this2 = this;
      this.quill.root.addEventListener('drop', function (e) {
        var noFiles = e.dataTransfer.files.length === 0;
        var onDrop = _this2.options.onDrop;
        if (onDrop && typeof onDrop === 'function') {
          onDrop(e);
        }
        if (noFiles || _this2.preventImageUpload) {
          return;
        }
        e.preventDefault();
        var native;
        if (document.caretRangeFromPoint) {
          native = document.caretRangeFromPoint(e.clientX, e.clientY);
        } else if (document.caretPositionFromPoint) {
          var position = document.caretPositionFromPoint(e.clientX, e.clientY);
          native = document.createRange();
          native.setStart(position.offsetNode, position.offset);
          native.setEnd(position.offsetNode, position.offset);
        } else {
          return;
        }
        var normalized = _this2.quill.selection.normalizeNative(native);
        var range = _this2.quill.selection.normalizedToRange(normalized);
        _this2.upload(range, e.dataTransfer.files);
      });
    }
  }, {
    key: "preventImageUploading",
    value: function preventImageUploading(value) {
      if (typeof value !== 'undefined') {
        this.preventImageUpload = value;
      }
      return this.preventImageUpload;
    }
  }, {
    key: "upload",
    value: function upload(range, files, force) {
      var _this3 = this;
      if (this.preventImageUpload && !force) {
        return;
      }
      var uploads = [];
      Array.from(files).forEach(function (file) {
        if (file && _this3.options.mimetypes.indexOf(file.type) !== -1) {
          uploads.push(file);
        }
      });
      if (uploads.length > 0) {
        this.options.handler.call(this, range, uploads, this.options.imageBlot);
      }
    }
  }]);
  return Uploader;
}(_core_module__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
Uploader.DEFAULTS = {
  mimetypes: ['image/png', 'image/jpeg', 'image/pjpeg', 'image/gif', 'image/webp', 'image/bmp', 'image/svg+xml', 'image/vnd.microsoft.icon'],
  imageBlot: 'image',
  handler: function handler(range, files, blotName) {
    var _this4 = this;
    var promises = files.map(function (file) {
      return new Promise(function (resolve) {
        var reader = new FileReader();
        reader.onload = function (e) {
          resolve(e.target.result);
        };
        reader.readAsDataURL(file);
      });
    });
    Promise.all(promises).then(function (images) {
      var update = images.reduce(function (delta, image) {
        return delta.insert(_defineProperty({}, blotName, image));
      }, new (quill_delta__WEBPACK_IMPORTED_MODULE_0___default())().retain(range.index).delete(range.length));
      _this4.quill.updateContents(update, _core_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].sources.USER */ .Z.sources.USER);
      _this4.quill.setSelection(range.index + images.length, _core_emitter__WEBPACK_IMPORTED_MODULE_1__/* ["default"].sources.SILENT */ .Z.sources.SILENT);
    });
  }
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Uploader);

/***/ }),

/***/ 2141:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ capitalize)
/* harmony export */ });
function capitalize(text) {
  return text ? text.substring(0, 1).toUpperCase() + text.substring(1) : '';
}

/***/ }),

/***/ 8034:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var hasWindow = function hasWindow() {
  return typeof window !== 'undefined';
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasWindow);

/***/ }),

/***/ 5874:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ isDefined)
/* harmony export */ });
function isDefined(object) {
  return object !== null && object !== undefined;
}

/***/ }),

/***/ 1233:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Attributor": () => (/* reexport */ attributor),
  "AttributorStore": () => (/* reexport */ store),
  "BlockBlot": () => (/* reexport */ block),
  "ClassAttributor": () => (/* reexport */ attributor_class),
  "ContainerBlot": () => (/* reexport */ container),
  "EmbedBlot": () => (/* reexport */ blot_embed),
  "InlineBlot": () => (/* reexport */ inline),
  "LeafBlot": () => (/* reexport */ leaf),
  "ParentBlot": () => (/* reexport */ abstract_parent),
  "Registry": () => (/* reexport */ registry),
  "Scope": () => (/* reexport */ src_scope),
  "ScrollBlot": () => (/* reexport */ blot_scroll),
  "StyleAttributor": () => (/* reexport */ style),
  "TextBlot": () => (/* reexport */ blot_text)
});

;// CONCATENATED MODULE: ./node_modules/parchment/src/scope.ts
var Scope;
(function (Scope) {
  Scope[Scope["TYPE"] = 3] = "TYPE";
  Scope[Scope["LEVEL"] = 12] = "LEVEL";
  Scope[Scope["ATTRIBUTE"] = 13] = "ATTRIBUTE";
  Scope[Scope["BLOT"] = 14] = "BLOT";
  Scope[Scope["INLINE"] = 7] = "INLINE";
  Scope[Scope["BLOCK"] = 11] = "BLOCK";
  Scope[Scope["BLOCK_BLOT"] = 10] = "BLOCK_BLOT";
  Scope[Scope["INLINE_BLOT"] = 6] = "INLINE_BLOT";
  Scope[Scope["BLOCK_ATTRIBUTE"] = 9] = "BLOCK_ATTRIBUTE";
  Scope[Scope["INLINE_ATTRIBUTE"] = 5] = "INLINE_ATTRIBUTE";
  Scope[Scope["ANY"] = 15] = "ANY";
})(Scope || (Scope = {}));
/* harmony default export */ const src_scope = (Scope);
;// CONCATENATED MODULE: ./node_modules/parchment/src/collection/linked-list.ts
var LinkedList = /** @class */function () {
  function LinkedList() {
    this.head = null;
    this.tail = null;
    this.length = 0;
  }
  LinkedList.prototype.append = function () {
    var nodes = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      nodes[_i] = arguments[_i];
    }
    this.insertBefore(nodes[0], null);
    if (nodes.length > 1) {
      var rest = nodes.slice(1);
      this.append.apply(this, rest);
    }
  };
  LinkedList.prototype.at = function (index) {
    var next = this.iterator();
    var cur = next();
    while (cur && index > 0) {
      index -= 1;
      cur = next();
    }
    return cur;
  };
  LinkedList.prototype.contains = function (node) {
    var next = this.iterator();
    var cur = next();
    while (cur) {
      if (cur === node) {
        return true;
      }
      cur = next();
    }
    return false;
  };
  LinkedList.prototype.indexOf = function (node) {
    var next = this.iterator();
    var cur = next();
    var index = 0;
    while (cur) {
      if (cur === node) {
        return index;
      }
      index += 1;
      cur = next();
    }
    return -1;
  };
  LinkedList.prototype.insertBefore = function (node, refNode) {
    if (node == null) {
      return;
    }
    this.remove(node);
    node.next = refNode;
    if (refNode != null) {
      node.prev = refNode.prev;
      if (refNode.prev != null) {
        refNode.prev.next = node;
      }
      refNode.prev = node;
      if (refNode === this.head) {
        this.head = node;
      }
    } else if (this.tail != null) {
      this.tail.next = node;
      node.prev = this.tail;
      this.tail = node;
    } else {
      node.prev = null;
      this.head = this.tail = node;
    }
    this.length += 1;
  };
  LinkedList.prototype.offset = function (target) {
    var index = 0;
    var cur = this.head;
    while (cur != null) {
      if (cur === target) {
        return index;
      }
      index += cur.length();
      cur = cur.next;
    }
    return -1;
  };
  LinkedList.prototype.remove = function (node) {
    if (!this.contains(node)) {
      return;
    }
    if (node.prev != null) {
      node.prev.next = node.next;
    }
    if (node.next != null) {
      node.next.prev = node.prev;
    }
    if (node === this.head) {
      this.head = node.next;
    }
    if (node === this.tail) {
      this.tail = node.prev;
    }
    this.length -= 1;
  };
  LinkedList.prototype.iterator = function (curNode) {
    if (curNode === void 0) {
      curNode = this.head;
    }
    // TODO use yield when we can
    return function () {
      var ret = curNode;
      if (curNode != null) {
        curNode = curNode.next;
      }
      return ret;
    };
  };
  LinkedList.prototype.find = function (index, inclusive) {
    if (inclusive === void 0) {
      inclusive = false;
    }
    var next = this.iterator();
    var cur = next();
    while (cur) {
      var length = cur.length();
      if (index < length || inclusive && index === length && (cur.next == null || cur.next.length() !== 0)) {
        return [cur, index];
      }
      index -= length;
      cur = next();
    }
    return [null, 0];
  };
  LinkedList.prototype.forEach = function (callback) {
    var next = this.iterator();
    var cur = next();
    while (cur) {
      callback(cur);
      cur = next();
    }
  };
  LinkedList.prototype.forEachAt = function (index, length, callback) {
    if (length <= 0) {
      return;
    }
    var _a = this.find(index),
      startNode = _a[0],
      offset = _a[1];
    var curIndex = index - offset;
    var next = this.iterator(startNode);
    var cur = next();
    while (cur && curIndex < index + length) {
      var curLength = cur.length();
      if (index > curIndex) {
        callback(cur, index - curIndex, Math.min(length, curIndex + curLength - index));
      } else {
        callback(cur, 0, Math.min(curLength, index + length - curIndex));
      }
      curIndex += curLength;
      cur = next();
    }
  };
  LinkedList.prototype.map = function (callback) {
    return this.reduce(function (memo, cur) {
      memo.push(callback(cur));
      return memo;
    }, []);
  };
  LinkedList.prototype.reduce = function (callback, memo) {
    var next = this.iterator();
    var cur = next();
    while (cur) {
      memo = callback(memo, cur);
      cur = next();
    }
    return memo;
  };
  return LinkedList;
}();
/* harmony default export */ const linked_list = (LinkedList);
;// CONCATENATED MODULE: ./node_modules/parchment/src/error.ts
var __extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var ParchmentError = /** @class */function (_super) {
  __extends(ParchmentError, _super);
  function ParchmentError(message) {
    var _this = this;
    message = '[Parchment] ' + message;
    _this = _super.call(this, message) || this;
    _this.message = message;
    _this.name = _this.constructor.name;
    return _this;
  }
  return ParchmentError;
}(Error);
/* harmony default export */ const error = (ParchmentError);
;// CONCATENATED MODULE: ./node_modules/parchment/src/registry.ts


var Registry = /** @class */function () {
  function Registry() {
    this.attributes = {};
    this.classes = {};
    this.tags = {};
    this.types = {};
  }
  Registry.find = function (node, bubble) {
    if (bubble === void 0) {
      bubble = false;
    }
    if (node == null) {
      return null;
    }
    if (this.blots.has(node)) {
      return this.blots.get(node) || null;
    }
    if (bubble) {
      var parentNode = null;
      try {
        parentNode = node.parentNode;
      } catch (err) {
        // Probably hit a permission denied error.
        // A known case is in Firefox, event targets can be anonymous DIVs
        // inside an input element.
        // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
        return null;
      }
      return this.find(parentNode, bubble);
    }
    return null;
  };
  Registry.prototype.create = function (scroll, input, value) {
    var match = this.query(input);
    if (match == null) {
      throw new error("Unable to create ".concat(input, " blot"));
    }
    var blotClass = match;
    var node =
    // @ts-expect-error
    input instanceof Node || input.nodeType === Node.TEXT_NODE ? input : blotClass.create(value);
    var blot = new blotClass(scroll, node, value);
    Registry.blots.set(blot.domNode, blot);
    return blot;
  };
  Registry.prototype.find = function (node, bubble) {
    if (bubble === void 0) {
      bubble = false;
    }
    return Registry.find(node, bubble);
  };
  Registry.prototype.query = function (query, scope) {
    var _this = this;
    if (scope === void 0) {
      scope = src_scope.ANY;
    }
    var match;
    if (typeof query === 'string') {
      match = this.types[query] || this.attributes[query];
      // @ts-expect-error
    } else if (query instanceof Text || query.nodeType === Node.TEXT_NODE) {
      match = this.types.text;
    } else if (typeof query === 'number') {
      if (query & src_scope.LEVEL & src_scope.BLOCK) {
        match = this.types.block;
      } else if (query & src_scope.LEVEL & src_scope.INLINE) {
        match = this.types.inline;
      }
    } else if (query instanceof Element) {
      var names = (query.getAttribute('class') || '').split(/\s+/);
      names.some(function (name) {
        match = _this.classes[name];
        if (match) {
          return true;
        }
        return false;
      });
      match = match || this.tags[query.tagName];
    }
    if (match == null) {
      return null;
    }
    // @ts-expect-error
    if (scope & src_scope.LEVEL & match.scope && scope & src_scope.TYPE & match.scope) {
      return match;
    }
    return null;
  };
  Registry.prototype.register = function () {
    var _this = this;
    var definitions = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      definitions[_i] = arguments[_i];
    }
    if (definitions.length > 1) {
      return definitions.map(function (d) {
        return _this.register(d);
      });
    }
    var definition = definitions[0];
    if (typeof definition.blotName !== 'string' && typeof definition.attrName !== 'string') {
      throw new error('Invalid definition');
    } else if (definition.blotName === 'abstract') {
      throw new error('Cannot register abstract class');
    }
    this.types[definition.blotName || definition.attrName] = definition;
    if (typeof definition.keyName === 'string') {
      this.attributes[definition.keyName] = definition;
    } else {
      if (definition.className != null) {
        this.classes[definition.className] = definition;
      }
      if (definition.tagName != null) {
        if (Array.isArray(definition.tagName)) {
          definition.tagName = definition.tagName.map(function (tagName) {
            return tagName.toUpperCase();
          });
        } else {
          definition.tagName = definition.tagName.toUpperCase();
        }
        var tagNames = Array.isArray(definition.tagName) ? definition.tagName : [definition.tagName];
        tagNames.forEach(function (tag) {
          if (_this.tags[tag] == null || definition.className == null) {
            _this.tags[tag] = definition;
          }
        });
      }
    }
    return definition;
  };
  Registry.blots = new WeakMap();
  return Registry;
}();
/* harmony default export */ const registry = (Registry);
;// CONCATENATED MODULE: ./node_modules/parchment/src/blot/abstract/shadow.ts



var ShadowBlot = /** @class */function () {
  function ShadowBlot(scroll, domNode) {
    this.scroll = scroll;
    this.domNode = domNode;
    registry.blots.set(domNode, this);
    this.prev = null;
    this.next = null;
  }
  ShadowBlot.create = function (value) {
    if (this.tagName == null) {
      throw new error('Blot definition missing tagName');
    }
    var node;
    if (Array.isArray(this.tagName)) {
      if (typeof value === 'string') {
        value = value.toUpperCase();
        if (parseInt(value, 10).toString() === value) {
          value = parseInt(value, 10);
        }
      }
      if (typeof value === 'number') {
        node = document.createElement(this.tagName[value - 1]);
      } else if (this.tagName.indexOf(value) > -1) {
        node = document.createElement(value);
      } else {
        node = document.createElement(this.tagName[0]);
      }
    } else {
      node = document.createElement(this.tagName);
    }
    if (this.className) {
      node.classList.add(this.className);
    }
    return node;
  };
  Object.defineProperty(ShadowBlot.prototype, "statics", {
    // Hack for accessing inherited static methods
    get: function get() {
      return this.constructor;
    },
    enumerable: false,
    configurable: true
  });
  ShadowBlot.prototype.attach = function () {
    // Nothing to do
  };
  ShadowBlot.prototype.clone = function () {
    var domNode = this.domNode.cloneNode(false);
    return this.scroll.create(domNode);
  };
  ShadowBlot.prototype.detach = function () {
    if (this.parent != null) {
      this.parent.removeChild(this);
    }
    registry.blots["delete"](this.domNode);
  };
  ShadowBlot.prototype.deleteAt = function (index, length) {
    var blot = this.isolate(index, length);
    blot.remove();
  };
  ShadowBlot.prototype.formatAt = function (index, length, name, value) {
    var blot = this.isolate(index, length);
    if (this.scroll.query(name, src_scope.BLOT) != null && value) {
      blot.wrap(name, value);
    } else if (this.scroll.query(name, src_scope.ATTRIBUTE) != null) {
      var parent = this.scroll.create(this.statics.scope);
      blot.wrap(parent);
      parent.format(name, value);
    }
  };
  ShadowBlot.prototype.insertAt = function (index, value, def) {
    var blot = def == null ? this.scroll.create('text', value) : this.scroll.create(value, def);
    var ref = this.split(index);
    this.parent.insertBefore(blot, ref || undefined);
  };
  ShadowBlot.prototype.isolate = function (index, length) {
    var target = this.split(index);
    if (target == null) {
      throw new Error('Attempt to isolate at end');
    }
    target.split(length);
    return target;
  };
  ShadowBlot.prototype.length = function () {
    return 1;
  };
  ShadowBlot.prototype.offset = function (root) {
    if (root === void 0) {
      root = this.parent;
    }
    if (this.parent == null || this === root) {
      return 0;
    }
    return this.parent.children.offset(this) + this.parent.offset(root);
  };
  ShadowBlot.prototype.optimize = function (_context) {
    if (this.statics.requiredContainer && !(this.parent instanceof this.statics.requiredContainer)) {
      this.wrap(this.statics.requiredContainer.blotName);
    }
  };
  ShadowBlot.prototype.remove = function () {
    if (this.domNode.parentNode != null) {
      this.domNode.parentNode.removeChild(this.domNode);
    }
    this.detach();
  };
  ShadowBlot.prototype.replaceWith = function (name, value) {
    var replacement = typeof name === 'string' ? this.scroll.create(name, value) : name;
    if (this.parent != null) {
      this.parent.insertBefore(replacement, this.next || undefined);
      this.remove();
    }
    return replacement;
  };
  ShadowBlot.prototype.split = function (index, _force) {
    return index === 0 ? this : this.next;
  };
  ShadowBlot.prototype.update = function (_mutations, _context) {
    // Nothing to do by default
  };
  ShadowBlot.prototype.wrap = function (name, value) {
    var wrapper = typeof name === 'string' ? this.scroll.create(name, value) : name;
    if (this.parent != null) {
      this.parent.insertBefore(wrapper, this.next || undefined);
    }
    if (typeof wrapper.appendChild !== 'function') {
      throw new error("Cannot wrap ".concat(name));
    }
    wrapper.appendChild(this);
    return wrapper;
  };
  ShadowBlot.blotName = 'abstract';
  return ShadowBlot;
}();
/* harmony default export */ const shadow = (ShadowBlot);
;// CONCATENATED MODULE: ./node_modules/parchment/src/blot/abstract/parent.ts
var parent_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();




function makeAttachedBlot(node, scroll) {
  var blot = scroll.find(node);
  if (blot == null) {
    try {
      blot = scroll.create(node);
    } catch (e) {
      blot = scroll.create(src_scope.INLINE);
      Array.from(node.childNodes).forEach(function (child) {
        // @ts-expect-error
        blot.domNode.appendChild(child);
      });
      if (node.parentNode) {
        node.parentNode.replaceChild(blot.domNode, node);
      }
      blot.attach();
    }
  }
  return blot;
}
var ParentBlot = /** @class */function (_super) {
  parent_extends(ParentBlot, _super);
  function ParentBlot(scroll, domNode) {
    var _this = _super.call(this, scroll, domNode) || this;
    _this.uiNode = null;
    _this.build();
    return _this;
  }
  ParentBlot.prototype.appendChild = function (other) {
    this.insertBefore(other);
  };
  ParentBlot.prototype.attach = function () {
    _super.prototype.attach.call(this);
    this.children.forEach(function (child) {
      child.attach();
    });
  };
  ParentBlot.prototype.attachUI = function (node) {
    if (this.uiNode != null) {
      this.uiNode.remove();
    }
    this.uiNode = node;
    if (ParentBlot.uiClass) {
      this.uiNode.classList.add(ParentBlot.uiClass);
    }
    this.uiNode.setAttribute('contenteditable', 'false');
    this.domNode.insertBefore(this.uiNode, this.domNode.firstChild);
  };
  ParentBlot.prototype.build = function () {
    var _this = this;
    this.children = new linked_list();
    // Need to be reversed for if DOM nodes already in order
    Array.from(this.domNode.childNodes).filter(function (node) {
      return node !== _this.uiNode;
    }).reverse().forEach(function (node) {
      try {
        var child = makeAttachedBlot(node, _this.scroll);
        _this.insertBefore(child, _this.children.head || undefined);
      } catch (err) {
        if (err instanceof error) {
          return;
        } else {
          throw err;
        }
      }
    });
  };
  ParentBlot.prototype.deleteAt = function (index, length) {
    if (index === 0 && length === this.length()) {
      return this.remove();
    }
    this.children.forEachAt(index, length, function (child, offset, childLength) {
      child.deleteAt(offset, childLength);
    });
  };
  ParentBlot.prototype.descendant = function (criteria, index) {
    if (index === void 0) {
      index = 0;
    }
    var _a = this.children.find(index),
      child = _a[0],
      offset = _a[1];
    if (criteria.blotName == null && criteria(child) || criteria.blotName != null && child instanceof criteria) {
      return [child, offset];
    } else if (child instanceof ParentBlot) {
      return child.descendant(criteria, offset);
    } else {
      return [null, -1];
    }
  };
  ParentBlot.prototype.descendants = function (criteria, index, length) {
    if (index === void 0) {
      index = 0;
    }
    if (length === void 0) {
      length = Number.MAX_VALUE;
    }
    var descendants = [];
    var lengthLeft = length;
    this.children.forEachAt(index, length, function (child, childIndex, childLength) {
      if (criteria.blotName == null && criteria(child) || criteria.blotName != null && child instanceof criteria) {
        descendants.push(child);
      }
      if (child instanceof ParentBlot) {
        descendants = descendants.concat(child.descendants(criteria, childIndex, lengthLeft));
      }
      lengthLeft -= childLength;
    });
    return descendants;
  };
  ParentBlot.prototype.detach = function () {
    this.children.forEach(function (child) {
      child.detach();
    });
    _super.prototype.detach.call(this);
  };
  ParentBlot.prototype.enforceAllowedChildren = function () {
    var _this = this;
    var done = false;
    this.children.forEach(function (child) {
      if (done) {
        return;
      }
      var allowed = _this.statics.allowedChildren.some(function (def) {
        return child instanceof def;
      });
      if (allowed) {
        return;
      }
      if (child.statics.scope === src_scope.BLOCK_BLOT) {
        if (child.next != null) {
          _this.splitAfter(child);
        }
        if (child.prev != null) {
          _this.splitAfter(child.prev);
        }
        child.parent.unwrap();
        done = true;
      } else if (child instanceof ParentBlot) {
        child.unwrap();
      } else {
        child.remove();
      }
    });
  };
  ParentBlot.prototype.formatAt = function (index, length, name, value) {
    this.children.forEachAt(index, length, function (child, offset, childLength) {
      child.formatAt(offset, childLength, name, value);
    });
  };
  ParentBlot.prototype.insertAt = function (index, value, def) {
    var _a = this.children.find(index),
      child = _a[0],
      offset = _a[1];
    if (child) {
      child.insertAt(offset, value, def);
    } else {
      var blot = def == null ? this.scroll.create('text', value) : this.scroll.create(value, def);
      this.appendChild(blot);
    }
  };
  ParentBlot.prototype.insertBefore = function (childBlot, refBlot) {
    if (childBlot.parent != null) {
      childBlot.parent.children.remove(childBlot);
    }
    var refDomNode = null;
    this.children.insertBefore(childBlot, refBlot || null);
    childBlot.parent = this;
    if (refBlot != null) {
      refDomNode = refBlot.domNode;
    }
    if (this.domNode.parentNode !== childBlot.domNode || this.domNode.nextSibling !== refDomNode) {
      this.domNode.insertBefore(childBlot.domNode, refDomNode);
    }
    childBlot.attach();
  };
  ParentBlot.prototype.length = function () {
    return this.children.reduce(function (memo, child) {
      return memo + child.length();
    }, 0);
  };
  ParentBlot.prototype.moveChildren = function (targetParent, refNode) {
    this.children.forEach(function (child) {
      targetParent.insertBefore(child, refNode);
    });
  };
  ParentBlot.prototype.optimize = function (context) {
    _super.prototype.optimize.call(this, context);
    this.enforceAllowedChildren();
    if (this.uiNode != null && this.uiNode !== this.domNode.firstChild) {
      this.domNode.insertBefore(this.uiNode, this.domNode.firstChild);
    }
    if (this.children.length === 0) {
      if (this.statics.defaultChild != null) {
        var child = this.scroll.create(this.statics.defaultChild.blotName);
        this.appendChild(child);
        // TODO double check if necessary
        // child.optimize(context);
      } else {
        this.remove();
      }
    }
  };
  ParentBlot.prototype.path = function (index, inclusive) {
    if (inclusive === void 0) {
      inclusive = false;
    }
    var _a = this.children.find(index, inclusive),
      child = _a[0],
      offset = _a[1];
    var position = [[this, index]];
    if (child instanceof ParentBlot) {
      return position.concat(child.path(offset, inclusive));
    } else if (child != null) {
      position.push([child, offset]);
    }
    return position;
  };
  ParentBlot.prototype.removeChild = function (child) {
    this.children.remove(child);
  };
  ParentBlot.prototype.replaceWith = function (name, value) {
    var replacement = typeof name === 'string' ? this.scroll.create(name, value) : name;
    if (replacement instanceof ParentBlot) {
      this.moveChildren(replacement);
    }
    return _super.prototype.replaceWith.call(this, replacement);
  };
  ParentBlot.prototype.split = function (index, force) {
    if (force === void 0) {
      force = false;
    }
    if (!force) {
      if (index === 0) {
        return this;
      }
      if (index === this.length()) {
        return this.next;
      }
    }
    var after = this.clone();
    if (this.parent) {
      this.parent.insertBefore(after, this.next || undefined);
    }
    this.children.forEachAt(index, this.length(), function (child, offset, _length) {
      var split = child.split(offset, force);
      if (split != null) {
        after.appendChild(split);
      }
    });
    return after;
  };
  ParentBlot.prototype.splitAfter = function (child) {
    var after = this.clone();
    while (child.next != null) {
      after.appendChild(child.next);
    }
    if (this.parent) {
      this.parent.insertBefore(after, this.next || undefined);
    }
    return after;
  };
  ParentBlot.prototype.unwrap = function () {
    if (this.parent) {
      this.moveChildren(this.parent, this.next || undefined);
    }
    this.remove();
  };
  ParentBlot.prototype.update = function (mutations, _context) {
    var _this = this;
    var addedNodes = [];
    var removedNodes = [];
    mutations.forEach(function (mutation) {
      if (mutation.target === _this.domNode && mutation.type === 'childList') {
        addedNodes.push.apply(addedNodes, mutation.addedNodes);
        removedNodes.push.apply(removedNodes, mutation.removedNodes);
      }
    });
    removedNodes.forEach(function (node) {
      // Check node has actually been removed
      // One exception is Chrome does not immediately remove IFRAMEs
      // from DOM but MutationRecord is correct in its reported removal
      if (node.parentNode != null &&
      // @ts-expect-error
      node.tagName !== 'IFRAME' && document.body.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {
        return;
      }
      var blot = _this.scroll.find(node);
      if (blot == null) {
        return;
      }
      if (blot.domNode.parentNode == null || blot.domNode.parentNode === _this.domNode) {
        blot.detach();
      }
    });
    addedNodes.filter(function (node) {
      return node.parentNode === _this.domNode || node === _this.uiNode;
    }).sort(function (a, b) {
      if (a === b) {
        return 0;
      }
      if (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) {
        return 1;
      }
      return -1;
    }).forEach(function (node) {
      var refBlot = null;
      if (node.nextSibling != null) {
        refBlot = _this.scroll.find(node.nextSibling);
      }
      var blot = makeAttachedBlot(node, _this.scroll);
      if (blot.next !== refBlot || blot.next == null) {
        if (blot.parent != null) {
          blot.parent.removeChild(_this);
        }
        _this.insertBefore(blot, refBlot || undefined);
      }
    });
    this.enforceAllowedChildren();
  };
  ParentBlot.uiClass = '';
  return ParentBlot;
}(shadow);
/* harmony default export */ const abstract_parent = (ParentBlot);
;// CONCATENATED MODULE: ./node_modules/parchment/src/blot/abstract/container.ts
var container_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();


var ContainerBlot = /** @class */function (_super) {
  container_extends(ContainerBlot, _super);
  function ContainerBlot() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  ContainerBlot.prototype.checkMerge = function () {
    return this.next !== null && this.next.statics.blotName === this.statics.blotName;
  };
  ContainerBlot.prototype.deleteAt = function (index, length) {
    _super.prototype.deleteAt.call(this, index, length);
    this.enforceAllowedChildren();
  };
  ContainerBlot.prototype.formatAt = function (index, length, name, value) {
    _super.prototype.formatAt.call(this, index, length, name, value);
    this.enforceAllowedChildren();
  };
  ContainerBlot.prototype.insertAt = function (index, value, def) {
    _super.prototype.insertAt.call(this, index, value, def);
    this.enforceAllowedChildren();
  };
  ContainerBlot.prototype.optimize = function (context) {
    _super.prototype.optimize.call(this, context);
    if (this.children.length > 0 && this.next != null && this.checkMerge()) {
      this.next.moveChildren(this);
      this.next.remove();
    }
  };
  ContainerBlot.blotName = 'container';
  ContainerBlot.scope = src_scope.BLOCK_BLOT;
  return ContainerBlot;
}(abstract_parent);
/* harmony default export */ const container = (ContainerBlot);
;// CONCATENATED MODULE: ./node_modules/parchment/src/blot/abstract/leaf.ts
var leaf_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();


var LeafBlot = /** @class */function (_super) {
  leaf_extends(LeafBlot, _super);
  function LeafBlot() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  LeafBlot.value = function (_domNode) {
    return true;
  };
  LeafBlot.prototype.index = function (node, offset) {
    if (this.domNode === node || this.domNode.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) {
      return Math.min(offset, 1);
    }
    return -1;
  };
  LeafBlot.prototype.position = function (index, _inclusive) {
    var childNodes = Array.from(this.parent.domNode.childNodes);
    var offset = childNodes.indexOf(this.domNode);
    if (index > 0) {
      offset += 1;
    }
    return [this.parent.domNode, offset];
  };
  LeafBlot.prototype.value = function () {
    var _a;
    return _a = {}, _a[this.statics.blotName] = this.statics.value(this.domNode) || true, _a;
  };
  LeafBlot.scope = src_scope.INLINE_BLOT;
  return LeafBlot;
}(shadow);
/* harmony default export */ const leaf = (LeafBlot);
;// CONCATENATED MODULE: ./node_modules/parchment/src/attributor/attributor.ts

var Attributor = /** @class */function () {
  function Attributor(attrName, keyName, options) {
    if (options === void 0) {
      options = {};
    }
    this.attrName = attrName;
    this.keyName = keyName;
    var attributeBit = src_scope.TYPE & src_scope.ATTRIBUTE;
    this.scope = options.scope != null ?
    // Ignore type bits, force attribute bit
    options.scope & src_scope.LEVEL | attributeBit : src_scope.ATTRIBUTE;
    if (options.whitelist != null) {
      this.whitelist = options.whitelist;
    }
  }
  Attributor.keys = function (node) {
    return Array.from(node.attributes).map(function (item) {
      return item.name;
    });
  };
  Attributor.prototype.add = function (node, value) {
    if (!this.canAdd(node, value)) {
      return false;
    }
    node.setAttribute(this.keyName, value);
    return true;
  };
  Attributor.prototype.canAdd = function (_node, value) {
    if (this.whitelist == null) {
      return true;
    }
    if (typeof value === 'string') {
      return this.whitelist.indexOf(value.replace(/["']/g, '')) > -1;
    } else {
      return this.whitelist.indexOf(value) > -1;
    }
  };
  Attributor.prototype.remove = function (node) {
    node.removeAttribute(this.keyName);
  };
  Attributor.prototype.value = function (node) {
    var value = node.getAttribute(this.keyName);
    if (this.canAdd(node, value) && value) {
      return value;
    }
    return '';
  };
  return Attributor;
}();
/* harmony default export */ const attributor = (Attributor);
;// CONCATENATED MODULE: ./node_modules/parchment/src/attributor/class.ts
var class_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();

function match(node, prefix) {
  var className = node.getAttribute('class') || '';
  return className.split(/\s+/).filter(function (name) {
    return name.indexOf("".concat(prefix, "-")) === 0;
  });
}
var ClassAttributor = /** @class */function (_super) {
  class_extends(ClassAttributor, _super);
  function ClassAttributor() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  ClassAttributor.keys = function (node) {
    return (node.getAttribute('class') || '').split(/\s+/).map(function (name) {
      return name.split('-').slice(0, -1).join('-');
    });
  };
  ClassAttributor.prototype.add = function (node, value) {
    if (!this.canAdd(node, value)) {
      return false;
    }
    this.remove(node);
    node.classList.add("".concat(this.keyName, "-").concat(value));
    return true;
  };
  ClassAttributor.prototype.remove = function (node) {
    var matches = match(node, this.keyName);
    matches.forEach(function (name) {
      node.classList.remove(name);
    });
    if (node.classList.length === 0) {
      node.removeAttribute('class');
    }
  };
  ClassAttributor.prototype.value = function (node) {
    var result = match(node, this.keyName)[0] || '';
    var value = result.slice(this.keyName.length + 1); // +1 for hyphen
    return this.canAdd(node, value) ? value : '';
  };
  return ClassAttributor;
}(attributor);
/* harmony default export */ const attributor_class = (ClassAttributor);
;// CONCATENATED MODULE: ./node_modules/parchment/src/attributor/style.ts
var style_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();

function camelize(name) {
  var parts = name.split('-');
  var rest = parts.slice(1).map(function (part) {
    return part[0].toUpperCase() + part.slice(1);
  }).join('');
  return parts[0] + rest;
}
var StyleAttributor = /** @class */function (_super) {
  style_extends(StyleAttributor, _super);
  function StyleAttributor() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  StyleAttributor.keys = function (node) {
    return (node.getAttribute('style') || '').split(';').map(function (value) {
      var arr = value.split(':');
      return arr[0].trim();
    });
  };
  StyleAttributor.prototype.add = function (node, value) {
    if (!this.canAdd(node, value)) {
      return false;
    }
    // @ts-expect-error
    node.style[camelize(this.keyName)] = value;
    return true;
  };
  StyleAttributor.prototype.remove = function (node) {
    // @ts-expect-error
    node.style[camelize(this.keyName)] = '';
    if (!node.getAttribute('style')) {
      node.removeAttribute('style');
    }
  };
  StyleAttributor.prototype.value = function (node) {
    // @ts-expect-error
    var value = node.style[camelize(this.keyName)];
    return this.canAdd(node, value) ? value : '';
  };
  return StyleAttributor;
}(attributor);
/* harmony default export */ const style = (StyleAttributor);
;// CONCATENATED MODULE: ./node_modules/parchment/src/attributor/store.ts





var AttributorStore = /** @class */function () {
  function AttributorStore(domNode) {
    this.attributes = {};
    this.domNode = domNode;
    this.build();
  }
  AttributorStore.prototype.attribute = function (attribute, value) {
    // verb
    if (value) {
      if (attribute.add(this.domNode, value)) {
        if (attribute.value(this.domNode) != null) {
          this.attributes[attribute.attrName] = attribute;
        } else {
          delete this.attributes[attribute.attrName];
        }
      }
    } else {
      attribute.remove(this.domNode);
      delete this.attributes[attribute.attrName];
    }
  };
  AttributorStore.prototype.build = function () {
    var _this = this;
    this.attributes = {};
    var blot = registry.find(this.domNode);
    if (blot == null) {
      return;
    }
    var attributes = attributor.keys(this.domNode);
    var classes = attributor_class.keys(this.domNode);
    var styles = style.keys(this.domNode);
    attributes.concat(classes).concat(styles).forEach(function (name) {
      var attr = blot.scroll.query(name, src_scope.ATTRIBUTE);
      if (attr instanceof attributor) {
        _this.attributes[attr.attrName] = attr;
      }
    });
  };
  AttributorStore.prototype.copy = function (target) {
    var _this = this;
    Object.keys(this.attributes).forEach(function (key) {
      var value = _this.attributes[key].value(_this.domNode);
      target.format(key, value);
    });
  };
  AttributorStore.prototype.move = function (target) {
    var _this = this;
    this.copy(target);
    Object.keys(this.attributes).forEach(function (key) {
      _this.attributes[key].remove(_this.domNode);
    });
    this.attributes = {};
  };
  AttributorStore.prototype.values = function () {
    var _this = this;
    return Object.keys(this.attributes).reduce(function (attributes, name) {
      attributes[name] = _this.attributes[name].value(_this.domNode);
      return attributes;
    }, {});
  };
  return AttributorStore;
}();
/* harmony default export */ const store = (AttributorStore);
;// CONCATENATED MODULE: ./node_modules/parchment/src/blot/inline.ts
var inline_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();





// Shallow object comparison
function isEqual(obj1, obj2) {
  if (Object.keys(obj1).length !== Object.keys(obj2).length) {
    return false;
  }
  for (var prop in obj1) {
    // @ts-expect-error
    if (obj1[prop] !== obj2[prop]) {
      return false;
    }
  }
  return true;
}
var InlineBlot = /** @class */function (_super) {
  inline_extends(InlineBlot, _super);
  function InlineBlot(scroll, domNode) {
    var _this = _super.call(this, scroll, domNode) || this;
    _this.attributes = new store(_this.domNode);
    return _this;
  }
  InlineBlot.formats = function (domNode, scroll) {
    var match = scroll.query(InlineBlot.blotName);
    if (match != null && domNode.tagName === match.tagName) {
      return undefined;
    } else if (typeof this.tagName === 'string') {
      return true;
    } else if (Array.isArray(this.tagName)) {
      return domNode.tagName.toLowerCase();
    }
    return undefined;
  };
  InlineBlot.prototype.format = function (name, value) {
    var _this = this;
    if (name === this.statics.blotName && !value) {
      this.children.forEach(function (child) {
        if (!(child instanceof InlineBlot)) {
          child = child.wrap(InlineBlot.blotName, true);
        }
        _this.attributes.copy(child);
      });
      this.unwrap();
    } else {
      var format = this.scroll.query(name, src_scope.INLINE);
      if (format == null) {
        return;
      }
      if (format instanceof attributor) {
        this.attributes.attribute(format, value);
      } else if (value && (name !== this.statics.blotName || this.formats()[name] !== value)) {
        this.replaceWith(name, value);
      }
    }
  };
  InlineBlot.prototype.formats = function () {
    var formats = this.attributes.values();
    var format = this.statics.formats(this.domNode, this.scroll);
    if (format != null) {
      formats[this.statics.blotName] = format;
    }
    return formats;
  };
  InlineBlot.prototype.formatAt = function (index, length, name, value) {
    if (this.formats()[name] != null || this.scroll.query(name, src_scope.ATTRIBUTE)) {
      var blot = this.isolate(index, length);
      blot.format(name, value);
    } else {
      _super.prototype.formatAt.call(this, index, length, name, value);
    }
  };
  InlineBlot.prototype.optimize = function (context) {
    _super.prototype.optimize.call(this, context);
    var formats = this.formats();
    if (Object.keys(formats).length === 0) {
      return this.unwrap(); // unformatted span
    }

    var next = this.next;
    if (next instanceof InlineBlot && next.prev === this && isEqual(formats, next.formats())) {
      next.moveChildren(this);
      next.remove();
    }
  };
  InlineBlot.prototype.replaceWith = function (name, value) {
    var replacement = _super.prototype.replaceWith.call(this, name, value);
    this.attributes.copy(replacement);
    return replacement;
  };
  InlineBlot.prototype.update = function (mutations, context) {
    var _this = this;
    _super.prototype.update.call(this, mutations, context);
    var attributeChanged = mutations.some(function (mutation) {
      return mutation.target === _this.domNode && mutation.type === 'attributes';
    });
    if (attributeChanged) {
      this.attributes.build();
    }
  };
  InlineBlot.prototype.wrap = function (name, value) {
    var wrapper = _super.prototype.wrap.call(this, name, value);
    if (wrapper instanceof InlineBlot) {
      this.attributes.move(wrapper);
    }
    return wrapper;
  };
  InlineBlot.allowedChildren = [InlineBlot, leaf];
  InlineBlot.blotName = 'inline';
  InlineBlot.scope = src_scope.INLINE_BLOT;
  InlineBlot.tagName = 'SPAN';
  return InlineBlot;
}(abstract_parent);
/* harmony default export */ const inline = (InlineBlot);
;// CONCATENATED MODULE: ./node_modules/parchment/src/blot/block.ts
var block_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();






var BlockBlot = /** @class */function (_super) {
  block_extends(BlockBlot, _super);
  function BlockBlot(scroll, domNode) {
    var _this = _super.call(this, scroll, domNode) || this;
    _this.attributes = new store(_this.domNode);
    return _this;
  }
  BlockBlot.formats = function (domNode, scroll) {
    var match = scroll.query(BlockBlot.blotName);
    if (match != null && domNode.tagName === match.tagName) {
      return undefined;
    } else if (typeof this.tagName === 'string') {
      return true;
    } else if (Array.isArray(this.tagName)) {
      return domNode.tagName.toLowerCase();
    }
  };
  BlockBlot.prototype.format = function (name, value) {
    var format = this.scroll.query(name, src_scope.BLOCK);
    if (format == null) {
      return;
    } else if (format instanceof attributor) {
      this.attributes.attribute(format, value);
    } else if (name === this.statics.blotName && !value) {
      this.replaceWith(BlockBlot.blotName);
    } else if (value && (name !== this.statics.blotName || this.formats()[name] !== value)) {
      this.replaceWith(name, value);
    }
  };
  BlockBlot.prototype.formats = function () {
    var formats = this.attributes.values();
    var format = this.statics.formats(this.domNode, this.scroll);
    if (format != null) {
      formats[this.statics.blotName] = format;
    }
    return formats;
  };
  BlockBlot.prototype.formatAt = function (index, length, name, value) {
    if (this.scroll.query(name, src_scope.BLOCK) != null) {
      this.format(name, value);
    } else {
      _super.prototype.formatAt.call(this, index, length, name, value);
    }
  };
  BlockBlot.prototype.insertAt = function (index, value, def) {
    if (def == null || this.scroll.query(value, src_scope.INLINE) != null) {
      // Insert text or inline
      _super.prototype.insertAt.call(this, index, value, def);
    } else {
      var after = this.split(index);
      if (after != null) {
        var blot = this.scroll.create(value, def);
        after.parent.insertBefore(blot, after);
      } else {
        throw new Error('Attempt to insertAt after block boundaries');
      }
    }
  };
  BlockBlot.prototype.replaceWith = function (name, value) {
    var replacement = _super.prototype.replaceWith.call(this, name, value);
    this.attributes.copy(replacement);
    return replacement;
  };
  BlockBlot.prototype.update = function (mutations, context) {
    var _this = this;
    _super.prototype.update.call(this, mutations, context);
    var attributeChanged = mutations.some(function (mutation) {
      return mutation.target === _this.domNode && mutation.type === 'attributes';
    });
    if (attributeChanged) {
      this.attributes.build();
    }
  };
  BlockBlot.blotName = 'block';
  BlockBlot.scope = src_scope.BLOCK_BLOT;
  BlockBlot.tagName = 'P';
  BlockBlot.allowedChildren = [inline, BlockBlot, leaf];
  return BlockBlot;
}(abstract_parent);
/* harmony default export */ const block = (BlockBlot);
;// CONCATENATED MODULE: ./node_modules/parchment/src/blot/embed.ts
var embed_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();

var EmbedBlot = /** @class */function (_super) {
  embed_extends(EmbedBlot, _super);
  function EmbedBlot() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  EmbedBlot.formats = function (_domNode, _scroll) {
    return undefined;
  };
  EmbedBlot.prototype.format = function (name, value) {
    // super.formatAt wraps, which is what we want in general,
    // but this allows subclasses to overwrite for formats
    // that just apply to particular embeds
    _super.prototype.formatAt.call(this, 0, this.length(), name, value);
  };
  EmbedBlot.prototype.formatAt = function (index, length, name, value) {
    if (index === 0 && length === this.length()) {
      this.format(name, value);
    } else {
      _super.prototype.formatAt.call(this, index, length, name, value);
    }
  };
  EmbedBlot.prototype.formats = function () {
    return this.statics.formats(this.domNode, this.scroll);
  };
  return EmbedBlot;
}(leaf);
/* harmony default export */ const blot_embed = (EmbedBlot);
;// CONCATENATED MODULE: ./node_modules/parchment/src/blot/scroll.ts
var scroll_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();




var OBSERVER_CONFIG = {
  attributes: true,
  characterData: true,
  characterDataOldValue: true,
  childList: true,
  subtree: true
};
var MAX_OPTIMIZE_ITERATIONS = 100;
var ScrollBlot = /** @class */function (_super) {
  scroll_extends(ScrollBlot, _super);
  function ScrollBlot(registry, node) {
    var _this =
    // @ts-expect-error
    _super.call(this, null, node) || this;
    _this.registry = registry;
    _this.scroll = _this;
    _this.build();
    _this.observer = new MutationObserver(function (mutations) {
      _this.update(mutations);
    });
    _this.observer.observe(_this.domNode, OBSERVER_CONFIG);
    _this.attach();
    return _this;
  }
  ScrollBlot.prototype.create = function (input, value) {
    return this.registry.create(this, input, value);
  };
  ScrollBlot.prototype.find = function (node, bubble) {
    if (bubble === void 0) {
      bubble = false;
    }
    var blot = this.registry.find(node, bubble);
    if (!blot) {
      return null;
    }
    if (blot.scroll === this) {
      return blot;
    }
    return bubble ? this.find(blot.scroll.domNode.parentNode, true) : null;
  };
  ScrollBlot.prototype.query = function (query, scope) {
    if (scope === void 0) {
      scope = src_scope.ANY;
    }
    return this.registry.query(query, scope);
  };
  ScrollBlot.prototype.register = function () {
    var _a;
    var definitions = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      definitions[_i] = arguments[_i];
    }
    return (_a = this.registry).register.apply(_a, definitions);
  };
  ScrollBlot.prototype.build = function () {
    if (this.scroll == null) {
      return;
    }
    _super.prototype.build.call(this);
  };
  ScrollBlot.prototype.detach = function () {
    _super.prototype.detach.call(this);
    this.observer.disconnect();
  };
  ScrollBlot.prototype.deleteAt = function (index, length) {
    this.update();
    if (index === 0 && length === this.length()) {
      this.children.forEach(function (child) {
        child.remove();
      });
    } else {
      _super.prototype.deleteAt.call(this, index, length);
    }
  };
  ScrollBlot.prototype.formatAt = function (index, length, name, value) {
    this.update();
    _super.prototype.formatAt.call(this, index, length, name, value);
  };
  ScrollBlot.prototype.insertAt = function (index, value, def) {
    this.update();
    _super.prototype.insertAt.call(this, index, value, def);
  };
  ScrollBlot.prototype.optimize = function (mutations, context) {
    var _this = this;
    if (mutations === void 0) {
      mutations = [];
    }
    if (context === void 0) {
      context = {};
    }
    _super.prototype.optimize.call(this, context);
    var mutationsMap = context.mutationsMap || new WeakMap();
    // We must modify mutations directly, cannot make copy and then modify
    var records = Array.from(this.observer.takeRecords());
    // Array.push currently seems to be implemented by a non-tail recursive function
    // so we cannot just mutations.push.apply(mutations, this.observer.takeRecords());
    while (records.length > 0) {
      mutations.push(records.pop());
    }
    var mark = function mark(blot, markParent) {
      if (markParent === void 0) {
        markParent = true;
      }
      if (blot == null || blot === _this) {
        return;
      }
      if (blot.domNode.parentNode == null) {
        return;
      }
      if (!mutationsMap.has(blot.domNode)) {
        mutationsMap.set(blot.domNode, []);
      }
      if (markParent) {
        mark(blot.parent);
      }
    };
    var optimize = function optimize(blot) {
      // Post-order traversal
      if (!mutationsMap.has(blot.domNode)) {
        return;
      }
      if (blot instanceof abstract_parent) {
        blot.children.forEach(optimize);
      }
      mutationsMap.delete(blot.domNode);
      blot.optimize(context);
    };
    var remaining = mutations;
    for (var i = 0; remaining.length > 0; i += 1) {
      if (i >= MAX_OPTIMIZE_ITERATIONS) {
        throw new Error('[Parchment] Maximum optimize iterations reached');
      }
      remaining.forEach(function (mutation) {
        var blot = _this.find(mutation.target, true);
        if (blot == null) {
          return;
        }
        if (blot.domNode === mutation.target) {
          if (mutation.type === 'childList') {
            mark(_this.find(mutation.previousSibling, false));
            Array.from(mutation.addedNodes).forEach(function (node) {
              var child = _this.find(node, false);
              mark(child, false);
              if (child instanceof abstract_parent) {
                child.children.forEach(function (grandChild) {
                  mark(grandChild, false);
                });
              }
            });
          } else if (mutation.type === 'attributes') {
            mark(blot.prev);
          }
        }
        mark(blot);
      });
      this.children.forEach(optimize);
      remaining = Array.from(this.observer.takeRecords());
      records = remaining.slice();
      while (records.length > 0) {
        mutations.push(records.pop());
      }
    }
  };
  ScrollBlot.prototype.update = function (mutations, context) {
    var _this = this;
    if (context === void 0) {
      context = {};
    }
    mutations = mutations || this.observer.takeRecords();
    var mutationsMap = new WeakMap();
    mutations.map(function (mutation) {
      var blot = _this.find(mutation.target, true);
      if (blot == null) {
        return null;
      }
      if (mutationsMap.has(blot.domNode)) {
        mutationsMap.get(blot.domNode).push(mutation);
        return null;
      } else {
        mutationsMap.set(blot.domNode, [mutation]);
        return blot;
      }
    }).forEach(function (blot) {
      if (blot != null && blot !== _this && mutationsMap.has(blot.domNode)) {
        blot.update(mutationsMap.get(blot.domNode) || [], context);
      }
    });
    context.mutationsMap = mutationsMap;
    if (mutationsMap.has(this.domNode)) {
      _super.prototype.update.call(this, mutationsMap.get(this.domNode), context);
    }
    this.optimize(mutations, context);
  };
  ScrollBlot.blotName = 'scroll';
  ScrollBlot.defaultChild = block;
  ScrollBlot.allowedChildren = [block, container];
  ScrollBlot.scope = src_scope.BLOCK_BLOT;
  ScrollBlot.tagName = 'DIV';
  return ScrollBlot;
}(abstract_parent);
/* harmony default export */ const blot_scroll = (ScrollBlot);
;// CONCATENATED MODULE: ./node_modules/parchment/src/blot/text.ts
var text_extends = undefined && undefined.__extends || function () {
  var _extendStatics = function extendStatics(d, b) {
    _extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function (d, b) {
      d.__proto__ = b;
    } || function (d, b) {
      for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
    };
    return _extendStatics(d, b);
  };
  return function (d, b) {
    if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    _extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();


var TextBlot = /** @class */function (_super) {
  text_extends(TextBlot, _super);
  function TextBlot(scroll, node) {
    var _this = _super.call(this, scroll, node) || this;
    _this.text = _this.statics.value(_this.domNode);
    return _this;
  }
  TextBlot.create = function (value) {
    return document.createTextNode(value);
  };
  TextBlot.value = function (domNode) {
    return domNode.data;
  };
  TextBlot.prototype.deleteAt = function (index, length) {
    this.domNode.data = this.text = this.text.slice(0, index) + this.text.slice(index + length);
  };
  TextBlot.prototype.index = function (node, offset) {
    if (this.domNode === node) {
      return offset;
    }
    return -1;
  };
  TextBlot.prototype.insertAt = function (index, value, def) {
    if (def == null) {
      this.text = this.text.slice(0, index) + value + this.text.slice(index);
      this.domNode.data = this.text;
    } else {
      _super.prototype.insertAt.call(this, index, value, def);
    }
  };
  TextBlot.prototype.length = function () {
    return this.text.length;
  };
  TextBlot.prototype.optimize = function (context) {
    _super.prototype.optimize.call(this, context);
    this.text = this.statics.value(this.domNode);
    if (this.text.length === 0) {
      this.remove();
    } else if (this.next instanceof TextBlot && this.next.prev === this) {
      this.insertAt(this.length(), this.next.value());
      this.next.remove();
    }
  };
  TextBlot.prototype.position = function (index, _inclusive) {
    if (_inclusive === void 0) {
      _inclusive = false;
    }
    return [this.domNode, index];
  };
  TextBlot.prototype.split = function (index, force) {
    if (force === void 0) {
      force = false;
    }
    if (!force) {
      if (index === 0) {
        return this;
      }
      if (index === this.length()) {
        return this.next;
      }
    }
    var after = this.scroll.create(this.domNode.splitText(index));
    this.parent.insertBefore(after, this.next || undefined);
    this.text = this.statics.value(this.domNode);
    return after;
  };
  TextBlot.prototype.update = function (mutations, _context) {
    var _this = this;
    if (mutations.some(function (mutation) {
      return mutation.type === 'characterData' && mutation.target === _this.domNode;
    })) {
      this.text = this.statics.value(this.domNode);
    }
  };
  TextBlot.prototype.value = function () {
    return this.text;
  };
  TextBlot.blotName = 'text';
  TextBlot.scope = src_scope.INLINE_BLOT;
  return TextBlot;
}(leaf);
/* harmony default export */ const blot_text = (TextBlot);
;// CONCATENATED MODULE: ./node_modules/parchment/src/parchment.ts
















/***/ }),

/***/ 3034:
/***/ (function(module, exports) {

'use strict';

var has = Object.prototype.hasOwnProperty
  , prefix = '~';

/**
 * Constructor to create a storage for our `EE` objects.
 * An `Events` instance is a plain object whose properties are event names.
 *
 * @constructor
 * @private
 */
function Events() {}

//
// We try to not inherit from `Object.prototype`. In some engines creating an
// instance in this way is faster than calling `Object.create(null)` directly.
// If `Object.create(null)` is not supported we prefix the event names with a
// character to make sure that the built-in object properties are not
// overridden or used as an attack vector.
//
if (Object.create) {
  Events.prototype = Object.create(null);

  //
  // This hack is needed because the `__proto__` property is still inherited in
  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
  //
  if (!new Events().__proto__) prefix = false;
}

/**
 * Representation of a single event listener.
 *
 * @param {Function} fn The listener function.
 * @param {*} context The context to invoke the listener with.
 * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
 * @constructor
 * @private
 */
function EE(fn, context, once) {
  this.fn = fn;
  this.context = context;
  this.once = once || false;
}

/**
 * Add a listener for a given event.
 *
 * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
 * @param {(String|Symbol)} event The event name.
 * @param {Function} fn The listener function.
 * @param {*} context The context to invoke the listener with.
 * @param {Boolean} once Specify if the listener is a one-time listener.
 * @returns {EventEmitter}
 * @private
 */
function addListener(emitter, event, fn, context, once) {
  if (typeof fn !== 'function') {
    throw new TypeError('The listener must be a function');
  }

  var listener = new EE(fn, context || emitter, once)
    , evt = prefix ? prefix + event : event;

  if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
  else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
  else emitter._events[evt] = [emitter._events[evt], listener];

  return emitter;
}

/**
 * Clear event by name.
 *
 * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
 * @param {(String|Symbol)} evt The Event name.
 * @private
 */
function clearEvent(emitter, evt) {
  if (--emitter._eventsCount === 0) emitter._events = new Events();
  else delete emitter._events[evt];
}

/**
 * Minimal `EventEmitter` interface that is molded against the Node.js
 * `EventEmitter` interface.
 *
 * @constructor
 * @public
 */
function EventEmitter() {
  this._events = new Events();
  this._eventsCount = 0;
}

/**
 * Return an array listing the events for which the emitter has registered
 * listeners.
 *
 * @returns {Array}
 * @public
 */
EventEmitter.prototype.eventNames = function eventNames() {
  var names = []
    , events
    , name;

  if (this._eventsCount === 0) return names;

  for (name in (events = this._events)) {
    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
  }

  if (Object.getOwnPropertySymbols) {
    return names.concat(Object.getOwnPropertySymbols(events));
  }

  return names;
};

/**
 * Return the listeners registered for a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @returns {Array} The registered listeners.
 * @public
 */
EventEmitter.prototype.listeners = function listeners(event) {
  var evt = prefix ? prefix + event : event
    , handlers = this._events[evt];

  if (!handlers) return [];
  if (handlers.fn) return [handlers.fn];

  for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
    ee[i] = handlers[i].fn;
  }

  return ee;
};

/**
 * Return the number of listeners listening to a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @returns {Number} The number of listeners.
 * @public
 */
EventEmitter.prototype.listenerCount = function listenerCount(event) {
  var evt = prefix ? prefix + event : event
    , listeners = this._events[evt];

  if (!listeners) return 0;
  if (listeners.fn) return 1;
  return listeners.length;
};

/**
 * Calls each of the listeners registered for a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @returns {Boolean} `true` if the event had listeners, else `false`.
 * @public
 */
EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
  var evt = prefix ? prefix + event : event;

  if (!this._events[evt]) return false;

  var listeners = this._events[evt]
    , len = arguments.length
    , args
    , i;

  if (listeners.fn) {
    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);

    switch (len) {
      case 1: return listeners.fn.call(listeners.context), true;
      case 2: return listeners.fn.call(listeners.context, a1), true;
      case 3: return listeners.fn.call(listeners.context, a1, a2), true;
      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
    }

    for (i = 1, args = new Array(len -1); i < len; i++) {
      args[i - 1] = arguments[i];
    }

    listeners.fn.apply(listeners.context, args);
  } else {
    var length = listeners.length
      , j;

    for (i = 0; i < length; i++) {
      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);

      switch (len) {
        case 1: listeners[i].fn.call(listeners[i].context); break;
        case 2: listeners[i].fn.call(listeners[i].context, a1); break;
        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
        default:
          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
            args[j - 1] = arguments[j];
          }

          listeners[i].fn.apply(listeners[i].context, args);
      }
    }
  }

  return true;
};

/**
 * Add a listener for a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @param {Function} fn The listener function.
 * @param {*} [context=this] The context to invoke the listener with.
 * @returns {EventEmitter} `this`.
 * @public
 */
EventEmitter.prototype.on = function on(event, fn, context) {
  return addListener(this, event, fn, context, false);
};

/**
 * Add a one-time listener for a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @param {Function} fn The listener function.
 * @param {*} [context=this] The context to invoke the listener with.
 * @returns {EventEmitter} `this`.
 * @public
 */
EventEmitter.prototype.once = function once(event, fn, context) {
  return addListener(this, event, fn, context, true);
};

/**
 * Remove the listeners of a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @param {Function} fn Only remove the listeners that match this function.
 * @param {*} context Only remove the listeners that have this context.
 * @param {Boolean} once Only remove one-time listeners.
 * @returns {EventEmitter} `this`.
 * @public
 */
EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
  var evt = prefix ? prefix + event : event;

  if (!this._events[evt]) return this;
  if (!fn) {
    clearEvent(this, evt);
    return this;
  }

  var listeners = this._events[evt];

  if (listeners.fn) {
    if (
      listeners.fn === fn &&
      (!once || listeners.once) &&
      (!context || listeners.context === context)
    ) {
      clearEvent(this, evt);
    }
  } else {
    for (var i = 0, events = [], length = listeners.length; i < length; i++) {
      if (
        listeners[i].fn !== fn ||
        (once && !listeners[i].once) ||
        (context && listeners[i].context !== context)
      ) {
        events.push(listeners[i]);
      }
    }

    //
    // Reset the array, or remove it completely if we have no more listeners.
    //
    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
    else clearEvent(this, evt);
  }

  return this;
};

/**
 * Remove all listeners, or those of the specified event.
 *
 * @param {(String|Symbol)} [event] The event name.
 * @returns {EventEmitter} `this`.
 * @public
 */
EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
  var evt;

  if (event) {
    evt = prefix ? prefix + event : event;
    if (this._events[evt]) clearEvent(this, evt);
  } else {
    this._events = new Events();
    this._eventsCount = 0;
  }

  return this;
};

//
// Alias methods names because people roll like that.
//
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
EventEmitter.prototype.addListener = EventEmitter.prototype.on;

//
// Expose the prefix.
//
EventEmitter.prefixed = prefix;

//
// Allow `EventEmitter` to be imported as module namespace.
//
EventEmitter.EventEmitter = EventEmitter;

//
// Expose the module.
//
if ('undefined' !== typeof module) {
  module.exports = EventEmitter;
}


/***/ }),

/***/ 1456:
/***/ ((module) => {

/**
 * This library modifies the diff-patch-match library by Neil Fraser
 * by removing the patch and match functionality and certain advanced
 * options in the diff function. The original license is as follows:
 *
 * ===
 *
 * Diff Match and Patch
 *
 * Copyright 2006 Google Inc.
 * http://code.google.com/p/google-diff-match-patch/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


/**
 * The data structure representing a diff is an array of tuples:
 * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
 * which means: delete 'Hello', add 'Goodbye' and keep ' world.'
 */
var DIFF_DELETE = -1;
var DIFF_INSERT = 1;
var DIFF_EQUAL = 0;


/**
 * Find the differences between two texts.  Simplifies the problem by stripping
 * any common prefix or suffix off the texts before diffing.
 * @param {string} text1 Old string to be diffed.
 * @param {string} text2 New string to be diffed.
 * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info
 * @return {Array} Array of diff tuples.
 */
function diff_main(text1, text2, cursor_pos, _fix_unicode) {
  // Check for equality
  if (text1 === text2) {
    if (text1) {
      return [[DIFF_EQUAL, text1]];
    }
    return [];
  }

  if (cursor_pos != null) {
    var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);
    if (editdiff) {
      return editdiff;
    }
  }

  // Trim off common prefix (speedup).
  var commonlength = diff_commonPrefix(text1, text2);
  var commonprefix = text1.substring(0, commonlength);
  text1 = text1.substring(commonlength);
  text2 = text2.substring(commonlength);

  // Trim off common suffix (speedup).
  commonlength = diff_commonSuffix(text1, text2);
  var commonsuffix = text1.substring(text1.length - commonlength);
  text1 = text1.substring(0, text1.length - commonlength);
  text2 = text2.substring(0, text2.length - commonlength);

  // Compute the diff on the middle block.
  var diffs = diff_compute_(text1, text2);

  // Restore the prefix and suffix.
  if (commonprefix) {
    diffs.unshift([DIFF_EQUAL, commonprefix]);
  }
  if (commonsuffix) {
    diffs.push([DIFF_EQUAL, commonsuffix]);
  }
  diff_cleanupMerge(diffs, _fix_unicode);
  return diffs;
};


/**
 * Find the differences between two texts.  Assumes that the texts do not
 * have any common prefix or suffix.
 * @param {string} text1 Old string to be diffed.
 * @param {string} text2 New string to be diffed.
 * @return {Array} Array of diff tuples.
 */
function diff_compute_(text1, text2) {
  var diffs;

  if (!text1) {
    // Just add some text (speedup).
    return [[DIFF_INSERT, text2]];
  }

  if (!text2) {
    // Just delete some text (speedup).
    return [[DIFF_DELETE, text1]];
  }

  var longtext = text1.length > text2.length ? text1 : text2;
  var shorttext = text1.length > text2.length ? text2 : text1;
  var i = longtext.indexOf(shorttext);
  if (i !== -1) {
    // Shorter text is inside the longer text (speedup).
    diffs = [
      [DIFF_INSERT, longtext.substring(0, i)],
      [DIFF_EQUAL, shorttext],
      [DIFF_INSERT, longtext.substring(i + shorttext.length)]
    ];
    // Swap insertions for deletions if diff is reversed.
    if (text1.length > text2.length) {
      diffs[0][0] = diffs[2][0] = DIFF_DELETE;
    }
    return diffs;
  }

  if (shorttext.length === 1) {
    // Single character string.
    // After the previous speedup, the character can't be an equality.
    return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
  }

  // Check to see if the problem can be split in two.
  var hm = diff_halfMatch_(text1, text2);
  if (hm) {
    // A half-match was found, sort out the return data.
    var text1_a = hm[0];
    var text1_b = hm[1];
    var text2_a = hm[2];
    var text2_b = hm[3];
    var mid_common = hm[4];
    // Send both pairs off for separate processing.
    var diffs_a = diff_main(text1_a, text2_a);
    var diffs_b = diff_main(text1_b, text2_b);
    // Merge the results.
    return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);
  }

  return diff_bisect_(text1, text2);
};


/**
 * Find the 'middle snake' of a diff, split the problem in two
 * and return the recursively constructed diff.
 * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
 * @param {string} text1 Old string to be diffed.
 * @param {string} text2 New string to be diffed.
 * @return {Array} Array of diff tuples.
 * @private
 */
function diff_bisect_(text1, text2) {
  // Cache the text lengths to prevent multiple calls.
  var text1_length = text1.length;
  var text2_length = text2.length;
  var max_d = Math.ceil((text1_length + text2_length) / 2);
  var v_offset = max_d;
  var v_length = 2 * max_d;
  var v1 = new Array(v_length);
  var v2 = new Array(v_length);
  // Setting all elements to -1 is faster in Chrome & Firefox than mixing
  // integers and undefined.
  for (var x = 0; x < v_length; x++) {
    v1[x] = -1;
    v2[x] = -1;
  }
  v1[v_offset + 1] = 0;
  v2[v_offset + 1] = 0;
  var delta = text1_length - text2_length;
  // If the total number of characters is odd, then the front path will collide
  // with the reverse path.
  var front = (delta % 2 !== 0);
  // Offsets for start and end of k loop.
  // Prevents mapping of space beyond the grid.
  var k1start = 0;
  var k1end = 0;
  var k2start = 0;
  var k2end = 0;
  for (var d = 0; d < max_d; d++) {
    // Walk the front path one step.
    for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {
      var k1_offset = v_offset + k1;
      var x1;
      if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {
        x1 = v1[k1_offset + 1];
      } else {
        x1 = v1[k1_offset - 1] + 1;
      }
      var y1 = x1 - k1;
      while (
        x1 < text1_length && y1 < text2_length &&
        text1.charAt(x1) === text2.charAt(y1)
      ) {
        x1++;
        y1++;
      }
      v1[k1_offset] = x1;
      if (x1 > text1_length) {
        // Ran off the right of the graph.
        k1end += 2;
      } else if (y1 > text2_length) {
        // Ran off the bottom of the graph.
        k1start += 2;
      } else if (front) {
        var k2_offset = v_offset + delta - k1;
        if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {
          // Mirror x2 onto top-left coordinate system.
          var x2 = text1_length - v2[k2_offset];
          if (x1 >= x2) {
            // Overlap detected.
            return diff_bisectSplit_(text1, text2, x1, y1);
          }
        }
      }
    }

    // Walk the reverse path one step.
    for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {
      var k2_offset = v_offset + k2;
      var x2;
      if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {
        x2 = v2[k2_offset + 1];
      } else {
        x2 = v2[k2_offset - 1] + 1;
      }
      var y2 = x2 - k2;
      while (
        x2 < text1_length && y2 < text2_length &&
        text1.charAt(text1_length - x2 - 1) === text2.charAt(text2_length - y2 - 1)
      ) {
        x2++;
        y2++;
      }
      v2[k2_offset] = x2;
      if (x2 > text1_length) {
        // Ran off the left of the graph.
        k2end += 2;
      } else if (y2 > text2_length) {
        // Ran off the top of the graph.
        k2start += 2;
      } else if (!front) {
        var k1_offset = v_offset + delta - k2;
        if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {
          var x1 = v1[k1_offset];
          var y1 = v_offset + x1 - k1_offset;
          // Mirror x2 onto top-left coordinate system.
          x2 = text1_length - x2;
          if (x1 >= x2) {
            // Overlap detected.
            return diff_bisectSplit_(text1, text2, x1, y1);
          }
        }
      }
    }
  }
  // Diff took too long and hit the deadline or
  // number of diffs equals number of characters, no commonality at all.
  return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
};


/**
 * Given the location of the 'middle snake', split the diff in two parts
 * and recurse.
 * @param {string} text1 Old string to be diffed.
 * @param {string} text2 New string to be diffed.
 * @param {number} x Index of split point in text1.
 * @param {number} y Index of split point in text2.
 * @return {Array} Array of diff tuples.
 */
function diff_bisectSplit_(text1, text2, x, y) {
  var text1a = text1.substring(0, x);
  var text2a = text2.substring(0, y);
  var text1b = text1.substring(x);
  var text2b = text2.substring(y);

  // Compute both diffs serially.
  var diffs = diff_main(text1a, text2a);
  var diffsb = diff_main(text1b, text2b);

  return diffs.concat(diffsb);
};


/**
 * Determine the common prefix of two strings.
 * @param {string} text1 First string.
 * @param {string} text2 Second string.
 * @return {number} The number of characters common to the start of each
 *     string.
 */
function diff_commonPrefix(text1, text2) {
  // Quick check for common null cases.
  if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {
    return 0;
  }
  // Binary search.
  // Performance analysis: http://neil.fraser.name/news/2007/10/09/
  var pointermin = 0;
  var pointermax = Math.min(text1.length, text2.length);
  var pointermid = pointermax;
  var pointerstart = 0;
  while (pointermin < pointermid) {
    if (
      text1.substring(pointerstart, pointermid) ==
      text2.substring(pointerstart, pointermid)
    ) {
      pointermin = pointermid;
      pointerstart = pointermin;
    } else {
      pointermax = pointermid;
    }
    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
  }

  if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {
    pointermid--;
  }

  return pointermid;
};


/**
 * Determine the common suffix of two strings.
 * @param {string} text1 First string.
 * @param {string} text2 Second string.
 * @return {number} The number of characters common to the end of each string.
 */
function diff_commonSuffix(text1, text2) {
  // Quick check for common null cases.
  if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {
    return 0;
  }
  // Binary search.
  // Performance analysis: http://neil.fraser.name/news/2007/10/09/
  var pointermin = 0;
  var pointermax = Math.min(text1.length, text2.length);
  var pointermid = pointermax;
  var pointerend = 0;
  while (pointermin < pointermid) {
    if (
      text1.substring(text1.length - pointermid, text1.length - pointerend) ==
      text2.substring(text2.length - pointermid, text2.length - pointerend)
    ) {
      pointermin = pointermid;
      pointerend = pointermin;
    } else {
      pointermax = pointermid;
    }
    pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
  }

  if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {
    pointermid--;
  }

  return pointermid;
};


/**
 * Do the two texts share a substring which is at least half the length of the
 * longer text?
 * This speedup can produce non-minimal diffs.
 * @param {string} text1 First string.
 * @param {string} text2 Second string.
 * @return {Array.<string>} Five element Array, containing the prefix of
 *     text1, the suffix of text1, the prefix of text2, the suffix of
 *     text2 and the common middle.  Or null if there was no match.
 */
function diff_halfMatch_(text1, text2) {
  var longtext = text1.length > text2.length ? text1 : text2;
  var shorttext = text1.length > text2.length ? text2 : text1;
  if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {
    return null;  // Pointless.
  }

  /**
   * Does a substring of shorttext exist within longtext such that the substring
   * is at least half the length of longtext?
   * Closure, but does not reference any external variables.
   * @param {string} longtext Longer string.
   * @param {string} shorttext Shorter string.
   * @param {number} i Start index of quarter length substring within longtext.
   * @return {Array.<string>} Five element Array, containing the prefix of
   *     longtext, the suffix of longtext, the prefix of shorttext, the suffix
   *     of shorttext and the common middle.  Or null if there was no match.
   * @private
   */
  function diff_halfMatchI_(longtext, shorttext, i) {
    // Start with a 1/4 length substring at position i as a seed.
    var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));
    var j = -1;
    var best_common = '';
    var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
    while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {
      var prefixLength = diff_commonPrefix(
        longtext.substring(i), shorttext.substring(j));
      var suffixLength = diff_commonSuffix(
        longtext.substring(0, i), shorttext.substring(0, j));
      if (best_common.length < suffixLength + prefixLength) {
        best_common = shorttext.substring(
          j - suffixLength, j) + shorttext.substring(j, j + prefixLength);
        best_longtext_a = longtext.substring(0, i - suffixLength);
        best_longtext_b = longtext.substring(i + prefixLength);
        best_shorttext_a = shorttext.substring(0, j - suffixLength);
        best_shorttext_b = shorttext.substring(j + prefixLength);
      }
    }
    if (best_common.length * 2 >= longtext.length) {
      return [
        best_longtext_a, best_longtext_b,
        best_shorttext_a, best_shorttext_b, best_common
      ];
    } else {
      return null;
    }
  }

  // First check if the second quarter is the seed for a half-match.
  var hm1 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 4));
  // Check again based on the third quarter.
  var hm2 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 2));
  var hm;
  if (!hm1 && !hm2) {
    return null;
  } else if (!hm2) {
    hm = hm1;
  } else if (!hm1) {
    hm = hm2;
  } else {
    // Both matched.  Select the longest.
    hm = hm1[4].length > hm2[4].length ? hm1 : hm2;
  }

  // A half-match was found, sort out the return data.
  var text1_a, text1_b, text2_a, text2_b;
  if (text1.length > text2.length) {
    text1_a = hm[0];
    text1_b = hm[1];
    text2_a = hm[2];
    text2_b = hm[3];
  } else {
    text2_a = hm[0];
    text2_b = hm[1];
    text1_a = hm[2];
    text1_b = hm[3];
  }
  var mid_common = hm[4];
  return [text1_a, text1_b, text2_a, text2_b, mid_common];
};


/**
 * Reorder and merge like edit sections.  Merge equalities.
 * Any edit section can move as long as it doesn't cross an equality.
 * @param {Array} diffs Array of diff tuples.
 * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff
 */
function diff_cleanupMerge(diffs, fix_unicode) {
  diffs.push([DIFF_EQUAL, '']);  // Add a dummy entry at the end.
  var pointer = 0;
  var count_delete = 0;
  var count_insert = 0;
  var text_delete = '';
  var text_insert = '';
  var commonlength;
  while (pointer < diffs.length) {
    if (pointer < diffs.length - 1 && !diffs[pointer][1]) {
      diffs.splice(pointer, 1);
      continue;
    }
    switch (diffs[pointer][0]) {
      case DIFF_INSERT:

        count_insert++;
        text_insert += diffs[pointer][1];
        pointer++;
        break;
      case DIFF_DELETE:
        count_delete++;
        text_delete += diffs[pointer][1];
        pointer++;
        break;
      case DIFF_EQUAL:
        var previous_equality = pointer - count_insert - count_delete - 1;
        if (fix_unicode) {
          // prevent splitting of unicode surrogate pairs.  when fix_unicode is true,
          // we assume that the old and new text in the diff are complete and correct
          // unicode-encoded JS strings, but the tuple boundaries may fall between
          // surrogate pairs.  we fix this by shaving off stray surrogates from the end
          // of the previous equality and the beginning of this equality.  this may create
          // empty equalities or a common prefix or suffix.  for example, if AB and AC are
          // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and
          // inserting 'AC', and then the common suffix 'AC' will be eliminated.  in this
          // particular case, both equalities go away, we absorb any previous inequalities,
          // and we keep scanning for the next equality before rewriting the tuples.
          if (previous_equality >= 0 && ends_with_pair_start(diffs[previous_equality][1])) {
            var stray = diffs[previous_equality][1].slice(-1);
            diffs[previous_equality][1] = diffs[previous_equality][1].slice(0, -1);
            text_delete = stray + text_delete;
            text_insert = stray + text_insert;
            if (!diffs[previous_equality][1]) {
              // emptied out previous equality, so delete it and include previous delete/insert
              diffs.splice(previous_equality, 1);
              pointer--;
              var k = previous_equality - 1;
              if (diffs[k] && diffs[k][0] === DIFF_INSERT) {
                count_insert++;
                text_insert = diffs[k][1] + text_insert;
                k--;
              }
              if (diffs[k] && diffs[k][0] === DIFF_DELETE) {
                count_delete++;
                text_delete = diffs[k][1] + text_delete;
                k--;
              }
              previous_equality = k;
            }
          }
          if (starts_with_pair_end(diffs[pointer][1])) {
            var stray = diffs[pointer][1].charAt(0);
            diffs[pointer][1] = diffs[pointer][1].slice(1);
            text_delete += stray;
            text_insert += stray;
          }
        }
        if (pointer < diffs.length - 1 && !diffs[pointer][1]) {
          // for empty equality not at end, wait for next equality
          diffs.splice(pointer, 1);
          break;
        }
        if (text_delete.length > 0 || text_insert.length > 0) {
          // note that diff_commonPrefix and diff_commonSuffix are unicode-aware
          if (text_delete.length > 0 && text_insert.length > 0) {
            // Factor out any common prefixes.
            commonlength = diff_commonPrefix(text_insert, text_delete);
            if (commonlength !== 0) {
              if (previous_equality >= 0) {
                diffs[previous_equality][1] += text_insert.substring(0, commonlength);
              } else {
                diffs.splice(0, 0, [DIFF_EQUAL, text_insert.substring(0, commonlength)]);
                pointer++;
              }
              text_insert = text_insert.substring(commonlength);
              text_delete = text_delete.substring(commonlength);
            }
            // Factor out any common suffixes.
            commonlength = diff_commonSuffix(text_insert, text_delete);
            if (commonlength !== 0) {
              diffs[pointer][1] =
                text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1];
              text_insert = text_insert.substring(0, text_insert.length - commonlength);
              text_delete = text_delete.substring(0, text_delete.length - commonlength);
            }
          }
          // Delete the offending records and add the merged ones.
          var n = count_insert + count_delete;
          if (text_delete.length === 0 && text_insert.length === 0) {
            diffs.splice(pointer - n, n);
            pointer = pointer - n;
          } else if (text_delete.length === 0) {
            diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);
            pointer = pointer - n + 1;
          } else if (text_insert.length === 0) {
            diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);
            pointer = pointer - n + 1;
          } else {
            diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete], [DIFF_INSERT, text_insert]);
            pointer = pointer - n + 2;
          }
        }
        if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {
          // Merge this equality with the previous one.
          diffs[pointer - 1][1] += diffs[pointer][1];
          diffs.splice(pointer, 1);
        } else {
          pointer++;
        }
        count_insert = 0;
        count_delete = 0;
        text_delete = '';
        text_insert = '';
        break;
    }
  }
  if (diffs[diffs.length - 1][1] === '') {
    diffs.pop();  // Remove the dummy entry at the end.
  }

  // Second pass: look for single edits surrounded on both sides by equalities
  // which can be shifted sideways to eliminate an equality.
  // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC
  var changes = false;
  pointer = 1;
  // Intentionally ignore the first and last element (don't need checking).
  while (pointer < diffs.length - 1) {
    if (diffs[pointer - 1][0] === DIFF_EQUAL &&
      diffs[pointer + 1][0] === DIFF_EQUAL) {
      // This is a single edit surrounded by equalities.
      if (diffs[pointer][1].substring(diffs[pointer][1].length -
        diffs[pointer - 1][1].length) === diffs[pointer - 1][1]) {
        // Shift the edit over the previous equality.
        diffs[pointer][1] = diffs[pointer - 1][1] +
          diffs[pointer][1].substring(0, diffs[pointer][1].length -
            diffs[pointer - 1][1].length);
        diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];
        diffs.splice(pointer - 1, 1);
        changes = true;
      } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==
        diffs[pointer + 1][1]) {
        // Shift the edit over the next equality.
        diffs[pointer - 1][1] += diffs[pointer + 1][1];
        diffs[pointer][1] =
          diffs[pointer][1].substring(diffs[pointer + 1][1].length) +
          diffs[pointer + 1][1];
        diffs.splice(pointer + 1, 1);
        changes = true;
      }
    }
    pointer++;
  }
  // If shifts were made, the diff needs reordering and another shift sweep.
  if (changes) {
    diff_cleanupMerge(diffs, fix_unicode);
  }
};

function is_surrogate_pair_start(charCode) {
  return charCode >= 0xD800 && charCode <= 0xDBFF;
}

function is_surrogate_pair_end(charCode) {
  return charCode >= 0xDC00 && charCode <= 0xDFFF;
}

function starts_with_pair_end(str) {
  return is_surrogate_pair_end(str.charCodeAt(0));
}

function ends_with_pair_start(str) {
  return is_surrogate_pair_start(str.charCodeAt(str.length - 1));
}

function remove_empty_tuples(tuples) {
  var ret = [];
  for (var i = 0; i < tuples.length; i++) {
    if (tuples[i][1].length > 0) {
      ret.push(tuples[i]);
    }
  }
  return ret;
}

function make_edit_splice(before, oldMiddle, newMiddle, after) {
  if (ends_with_pair_start(before) || starts_with_pair_end(after)) {
    return null;
  }
  return remove_empty_tuples([
    [DIFF_EQUAL, before],
    [DIFF_DELETE, oldMiddle],
    [DIFF_INSERT, newMiddle],
    [DIFF_EQUAL, after]
  ]);
}

function find_cursor_edit_diff(oldText, newText, cursor_pos) {
  // note: this runs after equality check has ruled out exact equality
  var oldRange = typeof cursor_pos === 'number' ?
    { index: cursor_pos, length: 0 } : cursor_pos.oldRange;
  var newRange = typeof cursor_pos === 'number' ?
    null : cursor_pos.newRange;
  // take into account the old and new selection to generate the best diff
  // possible for a text edit.  for example, a text change from "xxx" to "xx"
  // could be a delete or forwards-delete of any one of the x's, or the
  // result of selecting two of the x's and typing "x".
  var oldLength = oldText.length;
  var newLength = newText.length;
  if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {
    // see if we have an insert or delete before or after cursor
    var oldCursor = oldRange.index;
    var oldBefore = oldText.slice(0, oldCursor);
    var oldAfter = oldText.slice(oldCursor);
    var maybeNewCursor = newRange ? newRange.index : null;
    editBefore: {
      // is this an insert or delete right before oldCursor?
      var newCursor = oldCursor + newLength - oldLength;
      if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {
        break editBefore;
      }
      if (newCursor < 0 || newCursor > newLength) {
        break editBefore;
      }
      var newBefore = newText.slice(0, newCursor);
      var newAfter = newText.slice(newCursor);
      if (newAfter !== oldAfter) {
        break editBefore;
      }
      var prefixLength = Math.min(oldCursor, newCursor);
      var oldPrefix = oldBefore.slice(0, prefixLength);
      var newPrefix = newBefore.slice(0, prefixLength);
      if (oldPrefix !== newPrefix) {
        break editBefore;
      }
      var oldMiddle = oldBefore.slice(prefixLength);
      var newMiddle = newBefore.slice(prefixLength);
      return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);
    }
    editAfter: {
      // is this an insert or delete right after oldCursor?
      if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {
        break editAfter;
      }
      var cursor = oldCursor;
      var newBefore = newText.slice(0, cursor);
      var newAfter = newText.slice(cursor);
      if (newBefore !== oldBefore) {
        break editAfter;
      }
      var suffixLength = Math.min(oldLength - cursor, newLength - cursor);
      var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);
      var newSuffix = newAfter.slice(newAfter.length - suffixLength);
      if (oldSuffix !== newSuffix) {
        break editAfter;
      }
      var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);
      var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);
      return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);
    }
  }
  if (oldRange.length > 0 && newRange && newRange.length === 0) {
    replaceRange: {
      // see if diff could be a splice of the old selection range
      var oldPrefix = oldText.slice(0, oldRange.index);
      var oldSuffix = oldText.slice(oldRange.index + oldRange.length);
      var prefixLength = oldPrefix.length;
      var suffixLength = oldSuffix.length;
      if (newLength < prefixLength + suffixLength) {
        break replaceRange;
      }
      var newPrefix = newText.slice(0, prefixLength);
      var newSuffix = newText.slice(newLength - suffixLength);
      if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {
        break replaceRange;
      }
      var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);
      var newMiddle = newText.slice(prefixLength, newLength - suffixLength);
      return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);
    }
  }

  return null;
}

function diff(text1, text2, cursor_pos) {
  // only pass fix_unicode=true at the top level, not when diff_main is
  // recursively invoked
  return diff_main(text1, text2, cursor_pos, true);
}

diff.INSERT = DIFF_INSERT;
diff.DELETE = DIFF_DELETE;
diff.EQUAL = DIFF_EQUAL;

module.exports = diff;


/***/ }),

/***/ 8805:
/***/ ((module, exports, __webpack_require__) => {

/* module decorator */ module = __webpack_require__.nmd(module);
/**
 * lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;

/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
    arrayTag = '[object Array]',
    boolTag = '[object Boolean]',
    dateTag = '[object Date]',
    errorTag = '[object Error]',
    funcTag = '[object Function]',
    genTag = '[object GeneratorFunction]',
    mapTag = '[object Map]',
    numberTag = '[object Number]',
    objectTag = '[object Object]',
    promiseTag = '[object Promise]',
    regexpTag = '[object RegExp]',
    setTag = '[object Set]',
    stringTag = '[object String]',
    symbolTag = '[object Symbol]',
    weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]',
    dataViewTag = '[object DataView]',
    float32Tag = '[object Float32Array]',
    float64Tag = '[object Float64Array]',
    int8Tag = '[object Int8Array]',
    int16Tag = '[object Int16Array]',
    int32Tag = '[object Int32Array]',
    uint8Tag = '[object Uint8Array]',
    uint8ClampedTag = '[object Uint8ClampedArray]',
    uint16Tag = '[object Uint16Array]',
    uint32Tag = '[object Uint32Array]';

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] =
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
cloneableTags[boolTag] = cloneableTags[dateTag] =
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
cloneableTags[int32Tag] = cloneableTags[mapTag] =
cloneableTags[numberTag] = cloneableTags[objectTag] =
cloneableTags[regexpTag] = cloneableTags[setTag] =
cloneableTags[stringTag] = cloneableTags[symbolTag] =
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[weakMapTag] = false;

/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Detect free variable `exports`. */
var freeExports =  true && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/**
 * Adds the key-value `pair` to `map`.
 *
 * @private
 * @param {Object} map The map to modify.
 * @param {Array} pair The key-value pair to add.
 * @returns {Object} Returns `map`.
 */
function addMapEntry(map, pair) {
  // Don't return `map.set` because it's not chainable in IE 11.
  map.set(pair[0], pair[1]);
  return map;
}

/**
 * Adds `value` to `set`.
 *
 * @private
 * @param {Object} set The set to modify.
 * @param {*} value The value to add.
 * @returns {Object} Returns `set`.
 */
function addSetEntry(set, value) {
  // Don't return `set.add` because it's not chainable in IE 11.
  set.add(value);
  return set;
}

/**
 * A specialized version of `_.forEach` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns `array`.
 */
function arrayEach(array, iteratee) {
  var index = -1,
      length = array ? array.length : 0;

  while (++index < length) {
    if (iteratee(array[index], index, array) === false) {
      break;
    }
  }
  return array;
}

/**
 * Appends the elements of `values` to `array`.
 *
 * @private
 * @param {Array} array The array to modify.
 * @param {Array} values The values to append.
 * @returns {Array} Returns `array`.
 */
function arrayPush(array, values) {
  var index = -1,
      length = values.length,
      offset = array.length;

  while (++index < length) {
    array[offset + index] = values[index];
  }
  return array;
}

/**
 * A specialized version of `_.reduce` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {*} [accumulator] The initial value.
 * @param {boolean} [initAccum] Specify using the first element of `array` as
 *  the initial value.
 * @returns {*} Returns the accumulated value.
 */
function arrayReduce(array, iteratee, accumulator, initAccum) {
  var index = -1,
      length = array ? array.length : 0;

  if (initAccum && length) {
    accumulator = array[++index];
  }
  while (++index < length) {
    accumulator = iteratee(accumulator, array[index], index, array);
  }
  return accumulator;
}

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
      result = Array(n);

  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

/**
 * Checks if `value` is a host object in IE < 9.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
 */
function isHostObject(value) {
  // Many host objects are `Object` objects that can coerce to strings
  // despite having improperly defined `toString` methods.
  var result = false;
  if (value != null && typeof value.toString != 'function') {
    try {
      result = !!(value + '');
    } catch (e) {}
  }
  return result;
}

/**
 * Converts `map` to its key-value pairs.
 *
 * @private
 * @param {Object} map The map to convert.
 * @returns {Array} Returns the key-value pairs.
 */
function mapToArray(map) {
  var index = -1,
      result = Array(map.size);

  map.forEach(function(value, key) {
    result[++index] = [key, value];
  });
  return result;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function(arg) {
    return func(transform(arg));
  };
}

/**
 * Converts `set` to an array of its values.
 *
 * @private
 * @param {Object} set The set to convert.
 * @returns {Array} Returns the values.
 */
function setToArray(set) {
  var index = -1,
      result = Array(set.size);

  set.forEach(function(value) {
    result[++index] = value;
  });
  return result;
}

/** Used for built-in method references. */
var arrayProto = Array.prototype,
    funcProto = Function.prototype,
    objectProto = Object.prototype;

/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];

/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  return uid ? ('Symbol(src)_1.' + uid) : '';
}());

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var objectToString = objectProto.toString;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined,
    Symbol = root.Symbol,
    Uint8Array = root.Uint8Array,
    getPrototype = overArg(Object.getPrototypeOf, Object),
    objectCreate = Object.create,
    propertyIsEnumerable = objectProto.propertyIsEnumerable,
    splice = arrayProto.splice;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols,
    nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
    nativeKeys = overArg(Object.keys, Object);

/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView'),
    Map = getNative(root, 'Map'),
    Promise = getNative(root, 'Promise'),
    Set = getNative(root, 'Set'),
    WeakMap = getNative(root, 'WeakMap'),
    nativeCreate = getNative(Object, 'create');

/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
    mapCtorString = toSource(Map),
    promiseCtorString = toSource(Promise),
    setCtorString = toSource(Set),
    weakMapCtorString = toSource(WeakMap);

/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;

/**
 * Creates a hash object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Hash(entries) {
  var index = -1,
      length = entries ? entries.length : 0;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the hash.
 *
 * @private
 * @name clear
 * @memberOf Hash
 */
function hashClear() {
  this.__data__ = nativeCreate ? nativeCreate(null) : {};
}

/**
 * Removes `key` and its value from the hash.
 *
 * @private
 * @name delete
 * @memberOf Hash
 * @param {Object} hash The hash to modify.
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function hashDelete(key) {
  return this.has(key) && delete this.__data__[key];
}

/**
 * Gets the hash value for `key`.
 *
 * @private
 * @name get
 * @memberOf Hash
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function hashGet(key) {
  var data = this.__data__;
  if (nativeCreate) {
    var result = data[key];
    return result === HASH_UNDEFINED ? undefined : result;
  }
  return hasOwnProperty.call(data, key) ? data[key] : undefined;
}

/**
 * Checks if a hash value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Hash
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function hashHas(key) {
  var data = this.__data__;
  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}

/**
 * Sets the hash `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Hash
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the hash instance.
 */
function hashSet(key, value) {
  var data = this.__data__;
  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  return this;
}

// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;

/**
 * Creates an list cache object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function ListCache(entries) {
  var index = -1,
      length = entries ? entries.length : 0;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the list cache.
 *
 * @private
 * @name clear
 * @memberOf ListCache
 */
function listCacheClear() {
  this.__data__ = [];
}

/**
 * Removes `key` and its value from the list cache.
 *
 * @private
 * @name delete
 * @memberOf ListCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function listCacheDelete(key) {
  var data = this.__data__,
      index = assocIndexOf(data, key);

  if (index < 0) {
    return false;
  }
  var lastIndex = data.length - 1;
  if (index == lastIndex) {
    data.pop();
  } else {
    splice.call(data, index, 1);
  }
  return true;
}

/**
 * Gets the list cache value for `key`.
 *
 * @private
 * @name get
 * @memberOf ListCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function listCacheGet(key) {
  var data = this.__data__,
      index = assocIndexOf(data, key);

  return index < 0 ? undefined : data[index][1];
}

/**
 * Checks if a list cache value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf ListCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function listCacheHas(key) {
  return assocIndexOf(this.__data__, key) > -1;
}

/**
 * Sets the list cache `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf ListCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the list cache instance.
 */
function listCacheSet(key, value) {
  var data = this.__data__,
      index = assocIndexOf(data, key);

  if (index < 0) {
    data.push([key, value]);
  } else {
    data[index][1] = value;
  }
  return this;
}

// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;

/**
 * Creates a map cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function MapCache(entries) {
  var index = -1,
      length = entries ? entries.length : 0;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the map.
 *
 * @private
 * @name clear
 * @memberOf MapCache
 */
function mapCacheClear() {
  this.__data__ = {
    'hash': new Hash,
    'map': new (Map || ListCache),
    'string': new Hash
  };
}

/**
 * Removes `key` and its value from the map.
 *
 * @private
 * @name delete
 * @memberOf MapCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function mapCacheDelete(key) {
  return getMapData(this, key)['delete'](key);
}

/**
 * Gets the map value for `key`.
 *
 * @private
 * @name get
 * @memberOf MapCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function mapCacheGet(key) {
  return getMapData(this, key).get(key);
}

/**
 * Checks if a map value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf MapCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function mapCacheHas(key) {
  return getMapData(this, key).has(key);
}

/**
 * Sets the map `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf MapCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the map cache instance.
 */
function mapCacheSet(key, value) {
  getMapData(this, key).set(key, value);
  return this;
}

// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;

/**
 * Creates a stack cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Stack(entries) {
  this.__data__ = new ListCache(entries);
}

/**
 * Removes all key-value entries from the stack.
 *
 * @private
 * @name clear
 * @memberOf Stack
 */
function stackClear() {
  this.__data__ = new ListCache;
}

/**
 * Removes `key` and its value from the stack.
 *
 * @private
 * @name delete
 * @memberOf Stack
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function stackDelete(key) {
  return this.__data__['delete'](key);
}

/**
 * Gets the stack value for `key`.
 *
 * @private
 * @name get
 * @memberOf Stack
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function stackGet(key) {
  return this.__data__.get(key);
}

/**
 * Checks if a stack value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Stack
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function stackHas(key) {
  return this.__data__.has(key);
}

/**
 * Sets the stack `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Stack
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the stack cache instance.
 */
function stackSet(key, value) {
  var cache = this.__data__;
  if (cache instanceof ListCache) {
    var pairs = cache.__data__;
    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
      pairs.push([key, value]);
      return this;
    }
    cache = this.__data__ = new MapCache(pairs);
  }
  cache.set(key, value);
  return this;
}

// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  // Safari 9 makes `arguments.length` enumerable in strict mode.
  var result = (isArray(value) || isArguments(value))
    ? baseTimes(value.length, String)
    : [];

  var length = result.length,
      skipIndexes = !!length;

  for (var key in value) {
    if ((inherited || hasOwnProperty.call(value, key)) &&
        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
      result.push(key);
    }
  }
  return result;
}

/**
 * Assigns `value` to `key` of `object` if the existing value is not equivalent
 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * for equality comparisons.
 *
 * @private
 * @param {Object} object The object to modify.
 * @param {string} key The key of the property to assign.
 * @param {*} value The value to assign.
 */
function assignValue(object, key, value) {
  var objValue = object[key];
  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
      (value === undefined && !(key in object))) {
    object[key] = value;
  }
}

/**
 * Gets the index at which the `key` is found in `array` of key-value pairs.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} key The key to search for.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function assocIndexOf(array, key) {
  var length = array.length;
  while (length--) {
    if (eq(array[length][0], key)) {
      return length;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.assign` without support for multiple sources
 * or `customizer` functions.
 *
 * @private
 * @param {Object} object The destination object.
 * @param {Object} source The source object.
 * @returns {Object} Returns `object`.
 */
function baseAssign(object, source) {
  return object && copyObject(source, keys(source), object);
}

/**
 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
 * traversed objects.
 *
 * @private
 * @param {*} value The value to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @param {boolean} [isFull] Specify a clone including symbols.
 * @param {Function} [customizer] The function to customize cloning.
 * @param {string} [key] The key of `value`.
 * @param {Object} [object] The parent object of `value`.
 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
 * @returns {*} Returns the cloned value.
 */
function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
  var result;
  if (customizer) {
    result = object ? customizer(value, key, object, stack) : customizer(value);
  }
  if (result !== undefined) {
    return result;
  }
  if (!isObject(value)) {
    return value;
  }
  var isArr = isArray(value);
  if (isArr) {
    result = initCloneArray(value);
    if (!isDeep) {
      return copyArray(value, result);
    }
  } else {
    var tag = getTag(value),
        isFunc = tag == funcTag || tag == genTag;

    if (isBuffer(value)) {
      return cloneBuffer(value, isDeep);
    }
    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
      if (isHostObject(value)) {
        return object ? value : {};
      }
      result = initCloneObject(isFunc ? {} : value);
      if (!isDeep) {
        return copySymbols(value, baseAssign(result, value));
      }
    } else {
      if (!cloneableTags[tag]) {
        return object ? value : {};
      }
      result = initCloneByTag(value, tag, baseClone, isDeep);
    }
  }
  // Check for circular references and return its corresponding clone.
  stack || (stack = new Stack);
  var stacked = stack.get(value);
  if (stacked) {
    return stacked;
  }
  stack.set(value, result);

  if (!isArr) {
    var props = isFull ? getAllKeys(value) : keys(value);
  }
  arrayEach(props || value, function(subValue, key) {
    if (props) {
      key = subValue;
      subValue = value[key];
    }
    // Recursively populate clone (susceptible to call stack limits).
    assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
  });
  return result;
}

/**
 * The base implementation of `_.create` without support for assigning
 * properties to the created object.
 *
 * @private
 * @param {Object} prototype The object to inherit from.
 * @returns {Object} Returns the new object.
 */
function baseCreate(proto) {
  return isObject(proto) ? objectCreate(proto) : {};
}

/**
 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
 * symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {Function} keysFunc The function to get the keys of `object`.
 * @param {Function} symbolsFunc The function to get the symbols of `object`.
 * @returns {Array} Returns the array of property names and symbols.
 */
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  var result = keysFunc(object);
  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}

/**
 * The base implementation of `getTag`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  return objectToString.call(value);
}

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject(value) || isMasked(value)) {
    return false;
  }
  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  return pattern.test(toSource(value));
}

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * Creates a clone of  `buffer`.
 *
 * @private
 * @param {Buffer} buffer The buffer to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Buffer} Returns the cloned buffer.
 */
function cloneBuffer(buffer, isDeep) {
  if (isDeep) {
    return buffer.slice();
  }
  var result = new buffer.constructor(buffer.length);
  buffer.copy(result);
  return result;
}

/**
 * Creates a clone of `arrayBuffer`.
 *
 * @private
 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
 * @returns {ArrayBuffer} Returns the cloned array buffer.
 */
function cloneArrayBuffer(arrayBuffer) {
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  return result;
}

/**
 * Creates a clone of `dataView`.
 *
 * @private
 * @param {Object} dataView The data view to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the cloned data view.
 */
function cloneDataView(dataView, isDeep) {
  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}

/**
 * Creates a clone of `map`.
 *
 * @private
 * @param {Object} map The map to clone.
 * @param {Function} cloneFunc The function to clone values.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the cloned map.
 */
function cloneMap(map, isDeep, cloneFunc) {
  var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
  return arrayReduce(array, addMapEntry, new map.constructor);
}

/**
 * Creates a clone of `regexp`.
 *
 * @private
 * @param {Object} regexp The regexp to clone.
 * @returns {Object} Returns the cloned regexp.
 */
function cloneRegExp(regexp) {
  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  result.lastIndex = regexp.lastIndex;
  return result;
}

/**
 * Creates a clone of `set`.
 *
 * @private
 * @param {Object} set The set to clone.
 * @param {Function} cloneFunc The function to clone values.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the cloned set.
 */
function cloneSet(set, isDeep, cloneFunc) {
  var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
  return arrayReduce(array, addSetEntry, new set.constructor);
}

/**
 * Creates a clone of the `symbol` object.
 *
 * @private
 * @param {Object} symbol The symbol object to clone.
 * @returns {Object} Returns the cloned symbol object.
 */
function cloneSymbol(symbol) {
  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}

/**
 * Creates a clone of `typedArray`.
 *
 * @private
 * @param {Object} typedArray The typed array to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the cloned typed array.
 */
function cloneTypedArray(typedArray, isDeep) {
  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}

/**
 * Copies the values of `source` to `array`.
 *
 * @private
 * @param {Array} source The array to copy values from.
 * @param {Array} [array=[]] The array to copy values to.
 * @returns {Array} Returns `array`.
 */
function copyArray(source, array) {
  var index = -1,
      length = source.length;

  array || (array = Array(length));
  while (++index < length) {
    array[index] = source[index];
  }
  return array;
}

/**
 * Copies properties of `source` to `object`.
 *
 * @private
 * @param {Object} source The object to copy properties from.
 * @param {Array} props The property identifiers to copy.
 * @param {Object} [object={}] The object to copy properties to.
 * @param {Function} [customizer] The function to customize copied values.
 * @returns {Object} Returns `object`.
 */
function copyObject(source, props, object, customizer) {
  object || (object = {});

  var index = -1,
      length = props.length;

  while (++index < length) {
    var key = props[index];

    var newValue = customizer
      ? customizer(object[key], source[key], key, object, source)
      : undefined;

    assignValue(object, key, newValue === undefined ? source[key] : newValue);
  }
  return object;
}

/**
 * Copies own symbol properties of `source` to `object`.
 *
 * @private
 * @param {Object} source The object to copy symbols from.
 * @param {Object} [object={}] The object to copy symbols to.
 * @returns {Object} Returns `object`.
 */
function copySymbols(source, object) {
  return copyObject(source, getSymbols(source), object);
}

/**
 * Creates an array of own enumerable property names and symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names and symbols.
 */
function getAllKeys(object) {
  return baseGetAllKeys(object, keys, getSymbols);
}

/**
 * Gets the data for `map`.
 *
 * @private
 * @param {Object} map The map to query.
 * @param {string} key The reference key.
 * @returns {*} Returns the map data.
 */
function getMapData(map, key) {
  var data = map.__data__;
  return isKeyable(key)
    ? data[typeof key == 'string' ? 'string' : 'hash']
    : data.map;
}

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
  var value = getValue(object, key);
  return baseIsNative(value) ? value : undefined;
}

/**
 * Creates an array of the own enumerable symbol properties of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of symbols.
 */
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;

/**
 * Gets the `toStringTag` of `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
var getTag = baseGetTag;

// Fallback for data views, maps, sets, and weak maps in IE 11,
// for data views in Edge < 14, and promises in Node.js.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
    (Map && getTag(new Map) != mapTag) ||
    (Promise && getTag(Promise.resolve()) != promiseTag) ||
    (Set && getTag(new Set) != setTag) ||
    (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  getTag = function(value) {
    var result = objectToString.call(value),
        Ctor = result == objectTag ? value.constructor : undefined,
        ctorString = Ctor ? toSource(Ctor) : undefined;

    if (ctorString) {
      switch (ctorString) {
        case dataViewCtorString: return dataViewTag;
        case mapCtorString: return mapTag;
        case promiseCtorString: return promiseTag;
        case setCtorString: return setTag;
        case weakMapCtorString: return weakMapTag;
      }
    }
    return result;
  };
}

/**
 * Initializes an array clone.
 *
 * @private
 * @param {Array} array The array to clone.
 * @returns {Array} Returns the initialized clone.
 */
function initCloneArray(array) {
  var length = array.length,
      result = array.constructor(length);

  // Add properties assigned by `RegExp#exec`.
  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
    result.index = array.index;
    result.input = array.input;
  }
  return result;
}

/**
 * Initializes an object clone.
 *
 * @private
 * @param {Object} object The object to clone.
 * @returns {Object} Returns the initialized clone.
 */
function initCloneObject(object) {
  return (typeof object.constructor == 'function' && !isPrototype(object))
    ? baseCreate(getPrototype(object))
    : {};
}

/**
 * Initializes an object clone based on its `toStringTag`.
 *
 * **Note:** This function only supports cloning values with tags of
 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
 *
 * @private
 * @param {Object} object The object to clone.
 * @param {string} tag The `toStringTag` of the object to clone.
 * @param {Function} cloneFunc The function to clone values.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the initialized clone.
 */
function initCloneByTag(object, tag, cloneFunc, isDeep) {
  var Ctor = object.constructor;
  switch (tag) {
    case arrayBufferTag:
      return cloneArrayBuffer(object);

    case boolTag:
    case dateTag:
      return new Ctor(+object);

    case dataViewTag:
      return cloneDataView(object, isDeep);

    case float32Tag: case float64Tag:
    case int8Tag: case int16Tag: case int32Tag:
    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
      return cloneTypedArray(object, isDeep);

    case mapTag:
      return cloneMap(object, isDeep, cloneFunc);

    case numberTag:
    case stringTag:
      return new Ctor(object);

    case regexpTag:
      return cloneRegExp(object);

    case setTag:
      return cloneSet(object, isDeep, cloneFunc);

    case symbolTag:
      return cloneSymbol(object);
  }
}

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  length = length == null ? MAX_SAFE_INTEGER : length;
  return !!length &&
    (typeof value == 'number' || reIsUint.test(value)) &&
    (value > -1 && value % 1 == 0 && value < length);
}

/**
 * Checks if `value` is suitable for use as unique object key.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
 */
function isKeyable(value) {
  var type = typeof value;
  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
    ? (value !== '__proto__')
    : (value === null);
}

/**
 * Checks if `func` has its source masked.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
 */
function isMasked(func) {
  return !!maskSrcKey && (maskSrcKey in func);
}

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;

  return value === proto;
}

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to process.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {}
    try {
      return (func + '');
    } catch (e) {}
  }
  return '';
}

/**
 * This method is like `_.clone` except that it recursively clones `value`.
 *
 * @static
 * @memberOf _
 * @since 1.0.0
 * @category Lang
 * @param {*} value The value to recursively clone.
 * @returns {*} Returns the deep cloned value.
 * @see _.clone
 * @example
 *
 * var objects = [{ 'a': 1 }, { 'b': 2 }];
 *
 * var deep = _.cloneDeep(objects);
 * console.log(deep[0] === objects[0]);
 * // => false
 */
function cloneDeep(value) {
  return baseClone(value, true, true);
}

/**
 * Performs a
 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * comparison between two values to determine if they are equivalent.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.eq(object, object);
 * // => true
 *
 * _.eq(object, other);
 * // => false
 *
 * _.eq('a', 'a');
 * // => true
 *
 * _.eq('a', Object('a'));
 * // => false
 *
 * _.eq(NaN, NaN);
 * // => true
 */
function eq(value, other) {
  return value === other || (value !== value && other !== other);
}

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
function isArguments(value) {
  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

/**
 * This method is like `_.isArrayLike` except that it also checks if `value`
 * is an object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array-like object,
 *  else `false`.
 * @example
 *
 * _.isArrayLikeObject([1, 2, 3]);
 * // => true
 *
 * _.isArrayLikeObject(document.body.children);
 * // => true
 *
 * _.isArrayLikeObject('abc');
 * // => false
 *
 * _.isArrayLikeObject(_.noop);
 * // => false
 */
function isArrayLikeObject(value) {
  return isObjectLike(value) && isArrayLike(value);
}

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 8-9 which returns 'object' for typed array and other constructors.
  var tag = isObject(value) ? objectToString.call(value) : '';
  return tag == funcTag || tag == genTag;
}

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = typeof value;
  return !!value && (type == 'object' || type == 'function');
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return !!value && typeof value == 'object';
}

/**
 * Creates an array of the own enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects. See the
 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * for more details.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keys(new Foo);
 * // => ['a', 'b'] (iteration order is not guaranteed)
 *
 * _.keys('hi');
 * // => ['0', '1']
 */
function keys(object) {
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}

/**
 * This method returns a new empty array.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {Array} Returns the new empty array.
 * @example
 *
 * var arrays = _.times(2, _.stubArray);
 *
 * console.log(arrays);
 * // => [[], []]
 *
 * console.log(arrays[0] === arrays[1]);
 * // => false
 */
function stubArray() {
  return [];
}

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}

module.exports = cloneDeep;


/***/ }),

/***/ 2722:
/***/ ((module, exports, __webpack_require__) => {

/* module decorator */ module = __webpack_require__.nmd(module);
/**
 * Lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright JS Foundation and other contributors <https://js.foundation/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;

/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';

/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
    COMPARE_UNORDERED_FLAG = 2;

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
    arrayTag = '[object Array]',
    asyncTag = '[object AsyncFunction]',
    boolTag = '[object Boolean]',
    dateTag = '[object Date]',
    errorTag = '[object Error]',
    funcTag = '[object Function]',
    genTag = '[object GeneratorFunction]',
    mapTag = '[object Map]',
    numberTag = '[object Number]',
    nullTag = '[object Null]',
    objectTag = '[object Object]',
    promiseTag = '[object Promise]',
    proxyTag = '[object Proxy]',
    regexpTag = '[object RegExp]',
    setTag = '[object Set]',
    stringTag = '[object String]',
    symbolTag = '[object Symbol]',
    undefinedTag = '[object Undefined]',
    weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]',
    dataViewTag = '[object DataView]',
    float32Tag = '[object Float32Array]',
    float64Tag = '[object Float64Array]',
    int8Tag = '[object Int8Array]',
    int16Tag = '[object Int16Array]',
    int32Tag = '[object Int32Array]',
    uint8Tag = '[object Uint8Array]',
    uint8ClampedTag = '[object Uint8ClampedArray]',
    uint16Tag = '[object Uint16Array]',
    uint32Tag = '[object Uint32Array]';

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;

/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Detect free variable `exports`. */
var freeExports =  true && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
  try {
    return freeProcess && freeProcess.binding && freeProcess.binding('util');
  } catch (e) {}
}());

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * A specialized version of `_.filter` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} predicate The function invoked per iteration.
 * @returns {Array} Returns the new filtered array.
 */
function arrayFilter(array, predicate) {
  var index = -1,
      length = array == null ? 0 : array.length,
      resIndex = 0,
      result = [];

  while (++index < length) {
    var value = array[index];
    if (predicate(value, index, array)) {
      result[resIndex++] = value;
    }
  }
  return result;
}

/**
 * Appends the elements of `values` to `array`.
 *
 * @private
 * @param {Array} array The array to modify.
 * @param {Array} values The values to append.
 * @returns {Array} Returns `array`.
 */
function arrayPush(array, values) {
  var index = -1,
      length = values.length,
      offset = array.length;

  while (++index < length) {
    array[offset + index] = values[index];
  }
  return array;
}

/**
 * A specialized version of `_.some` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} predicate The function invoked per iteration.
 * @returns {boolean} Returns `true` if any element passes the predicate check,
 *  else `false`.
 */
function arraySome(array, predicate) {
  var index = -1,
      length = array == null ? 0 : array.length;

  while (++index < length) {
    if (predicate(array[index], index, array)) {
      return true;
    }
  }
  return false;
}

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
      result = Array(n);

  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}

/**
 * Checks if a `cache` value for `key` exists.
 *
 * @private
 * @param {Object} cache The cache to query.
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function cacheHas(cache, key) {
  return cache.has(key);
}

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

/**
 * Converts `map` to its key-value pairs.
 *
 * @private
 * @param {Object} map The map to convert.
 * @returns {Array} Returns the key-value pairs.
 */
function mapToArray(map) {
  var index = -1,
      result = Array(map.size);

  map.forEach(function(value, key) {
    result[++index] = [key, value];
  });
  return result;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function(arg) {
    return func(transform(arg));
  };
}

/**
 * Converts `set` to an array of its values.
 *
 * @private
 * @param {Object} set The set to convert.
 * @returns {Array} Returns the values.
 */
function setToArray(set) {
  var index = -1,
      result = Array(set.size);

  set.forEach(function(value) {
    result[++index] = value;
  });
  return result;
}

/** Used for built-in method references. */
var arrayProto = Array.prototype,
    funcProto = Function.prototype,
    objectProto = Object.prototype;

/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  return uid ? ('Symbol(src)_1.' + uid) : '';
}());

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined,
    Symbol = root.Symbol,
    Uint8Array = root.Uint8Array,
    propertyIsEnumerable = objectProto.propertyIsEnumerable,
    splice = arrayProto.splice,
    symToStringTag = Symbol ? Symbol.toStringTag : undefined;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols,
    nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
    nativeKeys = overArg(Object.keys, Object);

/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView'),
    Map = getNative(root, 'Map'),
    Promise = getNative(root, 'Promise'),
    Set = getNative(root, 'Set'),
    WeakMap = getNative(root, 'WeakMap'),
    nativeCreate = getNative(Object, 'create');

/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
    mapCtorString = toSource(Map),
    promiseCtorString = toSource(Promise),
    setCtorString = toSource(Set),
    weakMapCtorString = toSource(WeakMap);

/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;

/**
 * Creates a hash object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Hash(entries) {
  var index = -1,
      length = entries == null ? 0 : entries.length;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the hash.
 *
 * @private
 * @name clear
 * @memberOf Hash
 */
function hashClear() {
  this.__data__ = nativeCreate ? nativeCreate(null) : {};
  this.size = 0;
}

/**
 * Removes `key` and its value from the hash.
 *
 * @private
 * @name delete
 * @memberOf Hash
 * @param {Object} hash The hash to modify.
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function hashDelete(key) {
  var result = this.has(key) && delete this.__data__[key];
  this.size -= result ? 1 : 0;
  return result;
}

/**
 * Gets the hash value for `key`.
 *
 * @private
 * @name get
 * @memberOf Hash
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function hashGet(key) {
  var data = this.__data__;
  if (nativeCreate) {
    var result = data[key];
    return result === HASH_UNDEFINED ? undefined : result;
  }
  return hasOwnProperty.call(data, key) ? data[key] : undefined;
}

/**
 * Checks if a hash value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Hash
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function hashHas(key) {
  var data = this.__data__;
  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}

/**
 * Sets the hash `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Hash
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the hash instance.
 */
function hashSet(key, value) {
  var data = this.__data__;
  this.size += this.has(key) ? 0 : 1;
  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  return this;
}

// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;

/**
 * Creates an list cache object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function ListCache(entries) {
  var index = -1,
      length = entries == null ? 0 : entries.length;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the list cache.
 *
 * @private
 * @name clear
 * @memberOf ListCache
 */
function listCacheClear() {
  this.__data__ = [];
  this.size = 0;
}

/**
 * Removes `key` and its value from the list cache.
 *
 * @private
 * @name delete
 * @memberOf ListCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function listCacheDelete(key) {
  var data = this.__data__,
      index = assocIndexOf(data, key);

  if (index < 0) {
    return false;
  }
  var lastIndex = data.length - 1;
  if (index == lastIndex) {
    data.pop();
  } else {
    splice.call(data, index, 1);
  }
  --this.size;
  return true;
}

/**
 * Gets the list cache value for `key`.
 *
 * @private
 * @name get
 * @memberOf ListCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function listCacheGet(key) {
  var data = this.__data__,
      index = assocIndexOf(data, key);

  return index < 0 ? undefined : data[index][1];
}

/**
 * Checks if a list cache value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf ListCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function listCacheHas(key) {
  return assocIndexOf(this.__data__, key) > -1;
}

/**
 * Sets the list cache `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf ListCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the list cache instance.
 */
function listCacheSet(key, value) {
  var data = this.__data__,
      index = assocIndexOf(data, key);

  if (index < 0) {
    ++this.size;
    data.push([key, value]);
  } else {
    data[index][1] = value;
  }
  return this;
}

// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;

/**
 * Creates a map cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function MapCache(entries) {
  var index = -1,
      length = entries == null ? 0 : entries.length;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the map.
 *
 * @private
 * @name clear
 * @memberOf MapCache
 */
function mapCacheClear() {
  this.size = 0;
  this.__data__ = {
    'hash': new Hash,
    'map': new (Map || ListCache),
    'string': new Hash
  };
}

/**
 * Removes `key` and its value from the map.
 *
 * @private
 * @name delete
 * @memberOf MapCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function mapCacheDelete(key) {
  var result = getMapData(this, key)['delete'](key);
  this.size -= result ? 1 : 0;
  return result;
}

/**
 * Gets the map value for `key`.
 *
 * @private
 * @name get
 * @memberOf MapCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function mapCacheGet(key) {
  return getMapData(this, key).get(key);
}

/**
 * Checks if a map value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf MapCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function mapCacheHas(key) {
  return getMapData(this, key).has(key);
}

/**
 * Sets the map `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf MapCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the map cache instance.
 */
function mapCacheSet(key, value) {
  var data = getMapData(this, key),
      size = data.size;

  data.set(key, value);
  this.size += data.size == size ? 0 : 1;
  return this;
}

// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;

/**
 *
 * Creates an array cache object to store unique values.
 *
 * @private
 * @constructor
 * @param {Array} [values] The values to cache.
 */
function SetCache(values) {
  var index = -1,
      length = values == null ? 0 : values.length;

  this.__data__ = new MapCache;
  while (++index < length) {
    this.add(values[index]);
  }
}

/**
 * Adds `value` to the array cache.
 *
 * @private
 * @name add
 * @memberOf SetCache
 * @alias push
 * @param {*} value The value to cache.
 * @returns {Object} Returns the cache instance.
 */
function setCacheAdd(value) {
  this.__data__.set(value, HASH_UNDEFINED);
  return this;
}

/**
 * Checks if `value` is in the array cache.
 *
 * @private
 * @name has
 * @memberOf SetCache
 * @param {*} value The value to search for.
 * @returns {number} Returns `true` if `value` is found, else `false`.
 */
function setCacheHas(value) {
  return this.__data__.has(value);
}

// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;

/**
 * Creates a stack cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Stack(entries) {
  var data = this.__data__ = new ListCache(entries);
  this.size = data.size;
}

/**
 * Removes all key-value entries from the stack.
 *
 * @private
 * @name clear
 * @memberOf Stack
 */
function stackClear() {
  this.__data__ = new ListCache;
  this.size = 0;
}

/**
 * Removes `key` and its value from the stack.
 *
 * @private
 * @name delete
 * @memberOf Stack
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function stackDelete(key) {
  var data = this.__data__,
      result = data['delete'](key);

  this.size = data.size;
  return result;
}

/**
 * Gets the stack value for `key`.
 *
 * @private
 * @name get
 * @memberOf Stack
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function stackGet(key) {
  return this.__data__.get(key);
}

/**
 * Checks if a stack value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Stack
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function stackHas(key) {
  return this.__data__.has(key);
}

/**
 * Sets the stack `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Stack
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the stack cache instance.
 */
function stackSet(key, value) {
  var data = this.__data__;
  if (data instanceof ListCache) {
    var pairs = data.__data__;
    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
      pairs.push([key, value]);
      this.size = ++data.size;
      return this;
    }
    data = this.__data__ = new MapCache(pairs);
  }
  data.set(key, value);
  this.size = data.size;
  return this;
}

// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  var isArr = isArray(value),
      isArg = !isArr && isArguments(value),
      isBuff = !isArr && !isArg && isBuffer(value),
      isType = !isArr && !isArg && !isBuff && isTypedArray(value),
      skipIndexes = isArr || isArg || isBuff || isType,
      result = skipIndexes ? baseTimes(value.length, String) : [],
      length = result.length;

  for (var key in value) {
    if ((inherited || hasOwnProperty.call(value, key)) &&
        !(skipIndexes && (
           // Safari 9 has enumerable `arguments.length` in strict mode.
           key == 'length' ||
           // Node.js 0.10 has enumerable non-index properties on buffers.
           (isBuff && (key == 'offset' || key == 'parent')) ||
           // PhantomJS 2 has enumerable non-index properties on typed arrays.
           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
           // Skip index properties.
           isIndex(key, length)
        ))) {
      result.push(key);
    }
  }
  return result;
}

/**
 * Gets the index at which the `key` is found in `array` of key-value pairs.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} key The key to search for.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function assocIndexOf(array, key) {
  var length = array.length;
  while (length--) {
    if (eq(array[length][0], key)) {
      return length;
    }
  }
  return -1;
}

/**
 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
 * symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {Function} keysFunc The function to get the keys of `object`.
 * @param {Function} symbolsFunc The function to get the symbols of `object`.
 * @returns {Array} Returns the array of property names and symbols.
 */
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  var result = keysFunc(object);
  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  if (value == null) {
    return value === undefined ? undefinedTag : nullTag;
  }
  return (symToStringTag && symToStringTag in Object(value))
    ? getRawTag(value)
    : objectToString(value);
}

/**
 * The base implementation of `_.isArguments`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 */
function baseIsArguments(value) {
  return isObjectLike(value) && baseGetTag(value) == argsTag;
}

/**
 * The base implementation of `_.isEqual` which supports partial comparisons
 * and tracks traversed objects.
 *
 * @private
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @param {boolean} bitmask The bitmask flags.
 *  1 - Unordered comparison
 *  2 - Partial comparison
 * @param {Function} [customizer] The function to customize comparisons.
 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 */
function baseIsEqual(value, other, bitmask, customizer, stack) {
  if (value === other) {
    return true;
  }
  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
    return value !== value && other !== other;
  }
  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}

/**
 * A specialized version of `baseIsEqual` for arrays and objects which performs
 * deep comparisons and tracks traversed objects enabling objects with circular
 * references to be compared.
 *
 * @private
 * @param {Object} object The object to compare.
 * @param {Object} other The other object to compare.
 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
 * @param {Function} customizer The function to customize comparisons.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
 */
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  var objIsArr = isArray(object),
      othIsArr = isArray(other),
      objTag = objIsArr ? arrayTag : getTag(object),
      othTag = othIsArr ? arrayTag : getTag(other);

  objTag = objTag == argsTag ? objectTag : objTag;
  othTag = othTag == argsTag ? objectTag : othTag;

  var objIsObj = objTag == objectTag,
      othIsObj = othTag == objectTag,
      isSameTag = objTag == othTag;

  if (isSameTag && isBuffer(object)) {
    if (!isBuffer(other)) {
      return false;
    }
    objIsArr = true;
    objIsObj = false;
  }
  if (isSameTag && !objIsObj) {
    stack || (stack = new Stack);
    return (objIsArr || isTypedArray(object))
      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  }
  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');

    if (objIsWrapped || othIsWrapped) {
      var objUnwrapped = objIsWrapped ? object.value() : object,
          othUnwrapped = othIsWrapped ? other.value() : other;

      stack || (stack = new Stack);
      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
    }
  }
  if (!isSameTag) {
    return false;
  }
  stack || (stack = new Stack);
  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject(value) || isMasked(value)) {
    return false;
  }
  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  return pattern.test(toSource(value));
}

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike(value) &&
    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * A specialized version of `baseIsEqualDeep` for arrays with support for
 * partial deep comparisons.
 *
 * @private
 * @param {Array} array The array to compare.
 * @param {Array} other The other array to compare.
 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
 * @param {Function} customizer The function to customize comparisons.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Object} stack Tracks traversed `array` and `other` objects.
 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
 */
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
      arrLength = array.length,
      othLength = other.length;

  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
    return false;
  }
  // Assume cyclic values are equal.
  var stacked = stack.get(array);
  if (stacked && stack.get(other)) {
    return stacked == other;
  }
  var index = -1,
      result = true,
      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;

  stack.set(array, other);
  stack.set(other, array);

  // Ignore non-index properties.
  while (++index < arrLength) {
    var arrValue = array[index],
        othValue = other[index];

    if (customizer) {
      var compared = isPartial
        ? customizer(othValue, arrValue, index, other, array, stack)
        : customizer(arrValue, othValue, index, array, other, stack);
    }
    if (compared !== undefined) {
      if (compared) {
        continue;
      }
      result = false;
      break;
    }
    // Recursively compare arrays (susceptible to call stack limits).
    if (seen) {
      if (!arraySome(other, function(othValue, othIndex) {
            if (!cacheHas(seen, othIndex) &&
                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
              return seen.push(othIndex);
            }
          })) {
        result = false;
        break;
      }
    } else if (!(
          arrValue === othValue ||
            equalFunc(arrValue, othValue, bitmask, customizer, stack)
        )) {
      result = false;
      break;
    }
  }
  stack['delete'](array);
  stack['delete'](other);
  return result;
}

/**
 * A specialized version of `baseIsEqualDeep` for comparing objects of
 * the same `toStringTag`.
 *
 * **Note:** This function only supports comparing values with tags of
 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
 *
 * @private
 * @param {Object} object The object to compare.
 * @param {Object} other The other object to compare.
 * @param {string} tag The `toStringTag` of the objects to compare.
 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
 * @param {Function} customizer The function to customize comparisons.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Object} stack Tracks traversed `object` and `other` objects.
 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
 */
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  switch (tag) {
    case dataViewTag:
      if ((object.byteLength != other.byteLength) ||
          (object.byteOffset != other.byteOffset)) {
        return false;
      }
      object = object.buffer;
      other = other.buffer;

    case arrayBufferTag:
      if ((object.byteLength != other.byteLength) ||
          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
        return false;
      }
      return true;

    case boolTag:
    case dateTag:
    case numberTag:
      // Coerce booleans to `1` or `0` and dates to milliseconds.
      // Invalid dates are coerced to `NaN`.
      return eq(+object, +other);

    case errorTag:
      return object.name == other.name && object.message == other.message;

    case regexpTag:
    case stringTag:
      // Coerce regexes to strings and treat strings, primitives and objects,
      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
      // for more details.
      return object == (other + '');

    case mapTag:
      var convert = mapToArray;

    case setTag:
      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
      convert || (convert = setToArray);

      if (object.size != other.size && !isPartial) {
        return false;
      }
      // Assume cyclic values are equal.
      var stacked = stack.get(object);
      if (stacked) {
        return stacked == other;
      }
      bitmask |= COMPARE_UNORDERED_FLAG;

      // Recursively compare objects (susceptible to call stack limits).
      stack.set(object, other);
      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
      stack['delete'](object);
      return result;

    case symbolTag:
      if (symbolValueOf) {
        return symbolValueOf.call(object) == symbolValueOf.call(other);
      }
  }
  return false;
}

/**
 * A specialized version of `baseIsEqualDeep` for objects with support for
 * partial deep comparisons.
 *
 * @private
 * @param {Object} object The object to compare.
 * @param {Object} other The other object to compare.
 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
 * @param {Function} customizer The function to customize comparisons.
 * @param {Function} equalFunc The function to determine equivalents of values.
 * @param {Object} stack Tracks traversed `object` and `other` objects.
 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
 */
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
      objProps = getAllKeys(object),
      objLength = objProps.length,
      othProps = getAllKeys(other),
      othLength = othProps.length;

  if (objLength != othLength && !isPartial) {
    return false;
  }
  var index = objLength;
  while (index--) {
    var key = objProps[index];
    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
      return false;
    }
  }
  // Assume cyclic values are equal.
  var stacked = stack.get(object);
  if (stacked && stack.get(other)) {
    return stacked == other;
  }
  var result = true;
  stack.set(object, other);
  stack.set(other, object);

  var skipCtor = isPartial;
  while (++index < objLength) {
    key = objProps[index];
    var objValue = object[key],
        othValue = other[key];

    if (customizer) {
      var compared = isPartial
        ? customizer(othValue, objValue, key, other, object, stack)
        : customizer(objValue, othValue, key, object, other, stack);
    }
    // Recursively compare objects (susceptible to call stack limits).
    if (!(compared === undefined
          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
          : compared
        )) {
      result = false;
      break;
    }
    skipCtor || (skipCtor = key == 'constructor');
  }
  if (result && !skipCtor) {
    var objCtor = object.constructor,
        othCtor = other.constructor;

    // Non `Object` object instances with different constructors are not equal.
    if (objCtor != othCtor &&
        ('constructor' in object && 'constructor' in other) &&
        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
          typeof othCtor == 'function' && othCtor instanceof othCtor)) {
      result = false;
    }
  }
  stack['delete'](object);
  stack['delete'](other);
  return result;
}

/**
 * Creates an array of own enumerable property names and symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names and symbols.
 */
function getAllKeys(object) {
  return baseGetAllKeys(object, keys, getSymbols);
}

/**
 * Gets the data for `map`.
 *
 * @private
 * @param {Object} map The map to query.
 * @param {string} key The reference key.
 * @returns {*} Returns the map data.
 */
function getMapData(map, key) {
  var data = map.__data__;
  return isKeyable(key)
    ? data[typeof key == 'string' ? 'string' : 'hash']
    : data.map;
}

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
  var value = getValue(object, key);
  return baseIsNative(value) ? value : undefined;
}

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag),
      tag = value[symToStringTag];

  try {
    value[symToStringTag] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag] = tag;
    } else {
      delete value[symToStringTag];
    }
  }
  return result;
}

/**
 * Creates an array of the own enumerable symbols of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of symbols.
 */
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  if (object == null) {
    return [];
  }
  object = Object(object);
  return arrayFilter(nativeGetSymbols(object), function(symbol) {
    return propertyIsEnumerable.call(object, symbol);
  });
};

/**
 * Gets the `toStringTag` of `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
var getTag = baseGetTag;

// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
    (Map && getTag(new Map) != mapTag) ||
    (Promise && getTag(Promise.resolve()) != promiseTag) ||
    (Set && getTag(new Set) != setTag) ||
    (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  getTag = function(value) {
    var result = baseGetTag(value),
        Ctor = result == objectTag ? value.constructor : undefined,
        ctorString = Ctor ? toSource(Ctor) : '';

    if (ctorString) {
      switch (ctorString) {
        case dataViewCtorString: return dataViewTag;
        case mapCtorString: return mapTag;
        case promiseCtorString: return promiseTag;
        case setCtorString: return setTag;
        case weakMapCtorString: return weakMapTag;
      }
    }
    return result;
  };
}

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  length = length == null ? MAX_SAFE_INTEGER : length;
  return !!length &&
    (typeof value == 'number' || reIsUint.test(value)) &&
    (value > -1 && value % 1 == 0 && value < length);
}

/**
 * Checks if `value` is suitable for use as unique object key.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
 */
function isKeyable(value) {
  var type = typeof value;
  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
    ? (value !== '__proto__')
    : (value === null);
}

/**
 * Checks if `func` has its source masked.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
 */
function isMasked(func) {
  return !!maskSrcKey && (maskSrcKey in func);
}

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;

  return value === proto;
}

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString(value) {
  return nativeObjectToString.call(value);
}

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to convert.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {}
    try {
      return (func + '');
    } catch (e) {}
  }
  return '';
}

/**
 * Performs a
 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * comparison between two values to determine if they are equivalent.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.eq(object, object);
 * // => true
 *
 * _.eq(object, other);
 * // => false
 *
 * _.eq('a', 'a');
 * // => true
 *
 * _.eq('a', Object('a'));
 * // => false
 *
 * _.eq(NaN, NaN);
 * // => true
 */
function eq(value, other) {
  return value === other || (value !== value && other !== other);
}

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
    !propertyIsEnumerable.call(value, 'callee');
};

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/**
 * Performs a deep comparison between two values to determine if they are
 * equivalent.
 *
 * **Note:** This method supports comparing arrays, array buffers, booleans,
 * date objects, error objects, maps, numbers, `Object` objects, regexes,
 * sets, strings, symbols, and typed arrays. `Object` objects are compared
 * by their own, not inherited, enumerable properties. Functions and DOM
 * nodes are compared by strict equality, i.e. `===`.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.isEqual(object, other);
 * // => true
 *
 * object === other;
 * // => false
 */
function isEqual(value, other) {
  return baseIsEqual(value, other);
}

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  if (!isObject(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag(value);
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = typeof value;
  return value != null && (type == 'object' || type == 'function');
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return value != null && typeof value == 'object';
}

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

/**
 * Creates an array of the own enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects. See the
 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * for more details.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keys(new Foo);
 * // => ['a', 'b'] (iteration order is not guaranteed)
 *
 * _.keys('hi');
 * // => ['0', '1']
 */
function keys(object) {
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}

/**
 * This method returns a new empty array.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {Array} Returns the new empty array.
 * @example
 *
 * var arrays = _.times(2, _.stubArray);
 *
 * console.log(arrays);
 * // => [[], []]
 *
 * console.log(arrays[0] === arrays[1]);
 * // => false
 */
function stubArray() {
  return [];
}

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}

module.exports = isEqual;


/***/ }),

/***/ 732:
/***/ ((module, exports, __webpack_require__) => {

/* module decorator */ module = __webpack_require__.nmd(module);
/**
 * Lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;

/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';

/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
    HOT_SPAN = 16;

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
    arrayTag = '[object Array]',
    asyncTag = '[object AsyncFunction]',
    boolTag = '[object Boolean]',
    dateTag = '[object Date]',
    errorTag = '[object Error]',
    funcTag = '[object Function]',
    genTag = '[object GeneratorFunction]',
    mapTag = '[object Map]',
    numberTag = '[object Number]',
    nullTag = '[object Null]',
    objectTag = '[object Object]',
    proxyTag = '[object Proxy]',
    regexpTag = '[object RegExp]',
    setTag = '[object Set]',
    stringTag = '[object String]',
    undefinedTag = '[object Undefined]',
    weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]',
    dataViewTag = '[object DataView]',
    float32Tag = '[object Float32Array]',
    float64Tag = '[object Float64Array]',
    int8Tag = '[object Int8Array]',
    int16Tag = '[object Int16Array]',
    int32Tag = '[object Int32Array]',
    uint8Tag = '[object Uint8Array]',
    uint8ClampedTag = '[object Uint8ClampedArray]',
    uint16Tag = '[object Uint16Array]',
    uint32Tag = '[object Uint32Array]';

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;

/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Detect free variable `exports`. */
var freeExports =  true && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
  try {
    // Use `util.types` for Node.js 10+.
    var types = freeModule && freeModule.require && freeModule.require('util').types;

    if (types) {
      return types;
    }

    // Legacy `process.binding('util')` for Node.js < 10.
    return freeProcess && freeProcess.binding && freeProcess.binding('util');
  } catch (e) {}
}());

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * A faster alternative to `Function#apply`, this function invokes `func`
 * with the `this` binding of `thisArg` and the arguments of `args`.
 *
 * @private
 * @param {Function} func The function to invoke.
 * @param {*} thisArg The `this` binding of `func`.
 * @param {Array} args The arguments to invoke `func` with.
 * @returns {*} Returns the result of `func`.
 */
function apply(func, thisArg, args) {
  switch (args.length) {
    case 0: return func.call(thisArg);
    case 1: return func.call(thisArg, args[0]);
    case 2: return func.call(thisArg, args[0], args[1]);
    case 3: return func.call(thisArg, args[0], args[1], args[2]);
  }
  return func.apply(thisArg, args);
}

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
      result = Array(n);

  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function(arg) {
    return func(transform(arg));
  };
}

/** Used for built-in method references. */
var arrayProto = Array.prototype,
    funcProto = Function.prototype,
    objectProto = Object.prototype;

/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  return uid ? ('Symbol(src)_1.' + uid) : '';
}());

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined,
    Symbol = root.Symbol,
    Uint8Array = root.Uint8Array,
    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
    getPrototype = overArg(Object.getPrototypeOf, Object),
    objectCreate = Object.create,
    propertyIsEnumerable = objectProto.propertyIsEnumerable,
    splice = arrayProto.splice,
    symToStringTag = Symbol ? Symbol.toStringTag : undefined;

var defineProperty = (function() {
  try {
    var func = getNative(Object, 'defineProperty');
    func({}, '', {});
    return func;
  } catch (e) {}
}());

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
    nativeMax = Math.max,
    nativeNow = Date.now;

/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map'),
    nativeCreate = getNative(Object, 'create');

/**
 * The base implementation of `_.create` without support for assigning
 * properties to the created object.
 *
 * @private
 * @param {Object} proto The object to inherit from.
 * @returns {Object} Returns the new object.
 */
var baseCreate = (function() {
  function object() {}
  return function(proto) {
    if (!isObject(proto)) {
      return {};
    }
    if (objectCreate) {
      return objectCreate(proto);
    }
    object.prototype = proto;
    var result = new object;
    object.prototype = undefined;
    return result;
  };
}());

/**
 * Creates a hash object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Hash(entries) {
  var index = -1,
      length = entries == null ? 0 : entries.length;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the hash.
 *
 * @private
 * @name clear
 * @memberOf Hash
 */
function hashClear() {
  this.__data__ = nativeCreate ? nativeCreate(null) : {};
  this.size = 0;
}

/**
 * Removes `key` and its value from the hash.
 *
 * @private
 * @name delete
 * @memberOf Hash
 * @param {Object} hash The hash to modify.
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function hashDelete(key) {
  var result = this.has(key) && delete this.__data__[key];
  this.size -= result ? 1 : 0;
  return result;
}

/**
 * Gets the hash value for `key`.
 *
 * @private
 * @name get
 * @memberOf Hash
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function hashGet(key) {
  var data = this.__data__;
  if (nativeCreate) {
    var result = data[key];
    return result === HASH_UNDEFINED ? undefined : result;
  }
  return hasOwnProperty.call(data, key) ? data[key] : undefined;
}

/**
 * Checks if a hash value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Hash
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function hashHas(key) {
  var data = this.__data__;
  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}

/**
 * Sets the hash `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Hash
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the hash instance.
 */
function hashSet(key, value) {
  var data = this.__data__;
  this.size += this.has(key) ? 0 : 1;
  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  return this;
}

// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;

/**
 * Creates an list cache object.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function ListCache(entries) {
  var index = -1,
      length = entries == null ? 0 : entries.length;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the list cache.
 *
 * @private
 * @name clear
 * @memberOf ListCache
 */
function listCacheClear() {
  this.__data__ = [];
  this.size = 0;
}

/**
 * Removes `key` and its value from the list cache.
 *
 * @private
 * @name delete
 * @memberOf ListCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function listCacheDelete(key) {
  var data = this.__data__,
      index = assocIndexOf(data, key);

  if (index < 0) {
    return false;
  }
  var lastIndex = data.length - 1;
  if (index == lastIndex) {
    data.pop();
  } else {
    splice.call(data, index, 1);
  }
  --this.size;
  return true;
}

/**
 * Gets the list cache value for `key`.
 *
 * @private
 * @name get
 * @memberOf ListCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function listCacheGet(key) {
  var data = this.__data__,
      index = assocIndexOf(data, key);

  return index < 0 ? undefined : data[index][1];
}

/**
 * Checks if a list cache value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf ListCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function listCacheHas(key) {
  return assocIndexOf(this.__data__, key) > -1;
}

/**
 * Sets the list cache `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf ListCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the list cache instance.
 */
function listCacheSet(key, value) {
  var data = this.__data__,
      index = assocIndexOf(data, key);

  if (index < 0) {
    ++this.size;
    data.push([key, value]);
  } else {
    data[index][1] = value;
  }
  return this;
}

// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;

/**
 * Creates a map cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function MapCache(entries) {
  var index = -1,
      length = entries == null ? 0 : entries.length;

  this.clear();
  while (++index < length) {
    var entry = entries[index];
    this.set(entry[0], entry[1]);
  }
}

/**
 * Removes all key-value entries from the map.
 *
 * @private
 * @name clear
 * @memberOf MapCache
 */
function mapCacheClear() {
  this.size = 0;
  this.__data__ = {
    'hash': new Hash,
    'map': new (Map || ListCache),
    'string': new Hash
  };
}

/**
 * Removes `key` and its value from the map.
 *
 * @private
 * @name delete
 * @memberOf MapCache
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function mapCacheDelete(key) {
  var result = getMapData(this, key)['delete'](key);
  this.size -= result ? 1 : 0;
  return result;
}

/**
 * Gets the map value for `key`.
 *
 * @private
 * @name get
 * @memberOf MapCache
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function mapCacheGet(key) {
  return getMapData(this, key).get(key);
}

/**
 * Checks if a map value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf MapCache
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function mapCacheHas(key) {
  return getMapData(this, key).has(key);
}

/**
 * Sets the map `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf MapCache
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the map cache instance.
 */
function mapCacheSet(key, value) {
  var data = getMapData(this, key),
      size = data.size;

  data.set(key, value);
  this.size += data.size == size ? 0 : 1;
  return this;
}

// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;

/**
 * Creates a stack cache object to store key-value pairs.
 *
 * @private
 * @constructor
 * @param {Array} [entries] The key-value pairs to cache.
 */
function Stack(entries) {
  var data = this.__data__ = new ListCache(entries);
  this.size = data.size;
}

/**
 * Removes all key-value entries from the stack.
 *
 * @private
 * @name clear
 * @memberOf Stack
 */
function stackClear() {
  this.__data__ = new ListCache;
  this.size = 0;
}

/**
 * Removes `key` and its value from the stack.
 *
 * @private
 * @name delete
 * @memberOf Stack
 * @param {string} key The key of the value to remove.
 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
 */
function stackDelete(key) {
  var data = this.__data__,
      result = data['delete'](key);

  this.size = data.size;
  return result;
}

/**
 * Gets the stack value for `key`.
 *
 * @private
 * @name get
 * @memberOf Stack
 * @param {string} key The key of the value to get.
 * @returns {*} Returns the entry value.
 */
function stackGet(key) {
  return this.__data__.get(key);
}

/**
 * Checks if a stack value for `key` exists.
 *
 * @private
 * @name has
 * @memberOf Stack
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function stackHas(key) {
  return this.__data__.has(key);
}

/**
 * Sets the stack `key` to `value`.
 *
 * @private
 * @name set
 * @memberOf Stack
 * @param {string} key The key of the value to set.
 * @param {*} value The value to set.
 * @returns {Object} Returns the stack cache instance.
 */
function stackSet(key, value) {
  var data = this.__data__;
  if (data instanceof ListCache) {
    var pairs = data.__data__;
    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
      pairs.push([key, value]);
      this.size = ++data.size;
      return this;
    }
    data = this.__data__ = new MapCache(pairs);
  }
  data.set(key, value);
  this.size = data.size;
  return this;
}

// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  var isArr = isArray(value),
      isArg = !isArr && isArguments(value),
      isBuff = !isArr && !isArg && isBuffer(value),
      isType = !isArr && !isArg && !isBuff && isTypedArray(value),
      skipIndexes = isArr || isArg || isBuff || isType,
      result = skipIndexes ? baseTimes(value.length, String) : [],
      length = result.length;

  for (var key in value) {
    if ((inherited || hasOwnProperty.call(value, key)) &&
        !(skipIndexes && (
           // Safari 9 has enumerable `arguments.length` in strict mode.
           key == 'length' ||
           // Node.js 0.10 has enumerable non-index properties on buffers.
           (isBuff && (key == 'offset' || key == 'parent')) ||
           // PhantomJS 2 has enumerable non-index properties on typed arrays.
           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
           // Skip index properties.
           isIndex(key, length)
        ))) {
      result.push(key);
    }
  }
  return result;
}

/**
 * This function is like `assignValue` except that it doesn't assign
 * `undefined` values.
 *
 * @private
 * @param {Object} object The object to modify.
 * @param {string} key The key of the property to assign.
 * @param {*} value The value to assign.
 */
function assignMergeValue(object, key, value) {
  if ((value !== undefined && !eq(object[key], value)) ||
      (value === undefined && !(key in object))) {
    baseAssignValue(object, key, value);
  }
}

/**
 * Assigns `value` to `key` of `object` if the existing value is not equivalent
 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * for equality comparisons.
 *
 * @private
 * @param {Object} object The object to modify.
 * @param {string} key The key of the property to assign.
 * @param {*} value The value to assign.
 */
function assignValue(object, key, value) {
  var objValue = object[key];
  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
      (value === undefined && !(key in object))) {
    baseAssignValue(object, key, value);
  }
}

/**
 * Gets the index at which the `key` is found in `array` of key-value pairs.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} key The key to search for.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function assocIndexOf(array, key) {
  var length = array.length;
  while (length--) {
    if (eq(array[length][0], key)) {
      return length;
    }
  }
  return -1;
}

/**
 * The base implementation of `assignValue` and `assignMergeValue` without
 * value checks.
 *
 * @private
 * @param {Object} object The object to modify.
 * @param {string} key The key of the property to assign.
 * @param {*} value The value to assign.
 */
function baseAssignValue(object, key, value) {
  if (key == '__proto__' && defineProperty) {
    defineProperty(object, key, {
      'configurable': true,
      'enumerable': true,
      'value': value,
      'writable': true
    });
  } else {
    object[key] = value;
  }
}

/**
 * The base implementation of `baseForOwn` which iterates over `object`
 * properties returned by `keysFunc` and invokes `iteratee` for each property.
 * Iteratee functions may exit iteration early by explicitly returning `false`.
 *
 * @private
 * @param {Object} object The object to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {Function} keysFunc The function to get the keys of `object`.
 * @returns {Object} Returns `object`.
 */
var baseFor = createBaseFor();

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  if (value == null) {
    return value === undefined ? undefinedTag : nullTag;
  }
  return (symToStringTag && symToStringTag in Object(value))
    ? getRawTag(value)
    : objectToString(value);
}

/**
 * The base implementation of `_.isArguments`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 */
function baseIsArguments(value) {
  return isObjectLike(value) && baseGetTag(value) == argsTag;
}

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject(value) || isMasked(value)) {
    return false;
  }
  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  return pattern.test(toSource(value));
}

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike(value) &&
    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}

/**
 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeysIn(object) {
  if (!isObject(object)) {
    return nativeKeysIn(object);
  }
  var isProto = isPrototype(object),
      result = [];

  for (var key in object) {
    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
      result.push(key);
    }
  }
  return result;
}

/**
 * The base implementation of `_.merge` without support for multiple sources.
 *
 * @private
 * @param {Object} object The destination object.
 * @param {Object} source The source object.
 * @param {number} srcIndex The index of `source`.
 * @param {Function} [customizer] The function to customize merged values.
 * @param {Object} [stack] Tracks traversed source values and their merged
 *  counterparts.
 */
function baseMerge(object, source, srcIndex, customizer, stack) {
  if (object === source) {
    return;
  }
  baseFor(source, function(srcValue, key) {
    stack || (stack = new Stack);
    if (isObject(srcValue)) {
      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
    }
    else {
      var newValue = customizer
        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
        : undefined;

      if (newValue === undefined) {
        newValue = srcValue;
      }
      assignMergeValue(object, key, newValue);
    }
  }, keysIn);
}

/**
 * A specialized version of `baseMerge` for arrays and objects which performs
 * deep merges and tracks traversed objects enabling objects with circular
 * references to be merged.
 *
 * @private
 * @param {Object} object The destination object.
 * @param {Object} source The source object.
 * @param {string} key The key of the value to merge.
 * @param {number} srcIndex The index of `source`.
 * @param {Function} mergeFunc The function to merge values.
 * @param {Function} [customizer] The function to customize assigned values.
 * @param {Object} [stack] Tracks traversed source values and their merged
 *  counterparts.
 */
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  var objValue = safeGet(object, key),
      srcValue = safeGet(source, key),
      stacked = stack.get(srcValue);

  if (stacked) {
    assignMergeValue(object, key, stacked);
    return;
  }
  var newValue = customizer
    ? customizer(objValue, srcValue, (key + ''), object, source, stack)
    : undefined;

  var isCommon = newValue === undefined;

  if (isCommon) {
    var isArr = isArray(srcValue),
        isBuff = !isArr && isBuffer(srcValue),
        isTyped = !isArr && !isBuff && isTypedArray(srcValue);

    newValue = srcValue;
    if (isArr || isBuff || isTyped) {
      if (isArray(objValue)) {
        newValue = objValue;
      }
      else if (isArrayLikeObject(objValue)) {
        newValue = copyArray(objValue);
      }
      else if (isBuff) {
        isCommon = false;
        newValue = cloneBuffer(srcValue, true);
      }
      else if (isTyped) {
        isCommon = false;
        newValue = cloneTypedArray(srcValue, true);
      }
      else {
        newValue = [];
      }
    }
    else if (isPlainObject(srcValue) || isArguments(srcValue)) {
      newValue = objValue;
      if (isArguments(objValue)) {
        newValue = toPlainObject(objValue);
      }
      else if (!isObject(objValue) || isFunction(objValue)) {
        newValue = initCloneObject(srcValue);
      }
    }
    else {
      isCommon = false;
    }
  }
  if (isCommon) {
    // Recursively merge objects and arrays (susceptible to call stack limits).
    stack.set(srcValue, newValue);
    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
    stack['delete'](srcValue);
  }
  assignMergeValue(object, key, newValue);
}

/**
 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
 *
 * @private
 * @param {Function} func The function to apply a rest parameter to.
 * @param {number} [start=func.length-1] The start position of the rest parameter.
 * @returns {Function} Returns the new function.
 */
function baseRest(func, start) {
  return setToString(overRest(func, start, identity), func + '');
}

/**
 * The base implementation of `setToString` without support for hot loop shorting.
 *
 * @private
 * @param {Function} func The function to modify.
 * @param {Function} string The `toString` result.
 * @returns {Function} Returns `func`.
 */
var baseSetToString = !defineProperty ? identity : function(func, string) {
  return defineProperty(func, 'toString', {
    'configurable': true,
    'enumerable': false,
    'value': constant(string),
    'writable': true
  });
};

/**
 * Creates a clone of  `buffer`.
 *
 * @private
 * @param {Buffer} buffer The buffer to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Buffer} Returns the cloned buffer.
 */
function cloneBuffer(buffer, isDeep) {
  if (isDeep) {
    return buffer.slice();
  }
  var length = buffer.length,
      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);

  buffer.copy(result);
  return result;
}

/**
 * Creates a clone of `arrayBuffer`.
 *
 * @private
 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
 * @returns {ArrayBuffer} Returns the cloned array buffer.
 */
function cloneArrayBuffer(arrayBuffer) {
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  return result;
}

/**
 * Creates a clone of `typedArray`.
 *
 * @private
 * @param {Object} typedArray The typed array to clone.
 * @param {boolean} [isDeep] Specify a deep clone.
 * @returns {Object} Returns the cloned typed array.
 */
function cloneTypedArray(typedArray, isDeep) {
  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}

/**
 * Copies the values of `source` to `array`.
 *
 * @private
 * @param {Array} source The array to copy values from.
 * @param {Array} [array=[]] The array to copy values to.
 * @returns {Array} Returns `array`.
 */
function copyArray(source, array) {
  var index = -1,
      length = source.length;

  array || (array = Array(length));
  while (++index < length) {
    array[index] = source[index];
  }
  return array;
}

/**
 * Copies properties of `source` to `object`.
 *
 * @private
 * @param {Object} source The object to copy properties from.
 * @param {Array} props The property identifiers to copy.
 * @param {Object} [object={}] The object to copy properties to.
 * @param {Function} [customizer] The function to customize copied values.
 * @returns {Object} Returns `object`.
 */
function copyObject(source, props, object, customizer) {
  var isNew = !object;
  object || (object = {});

  var index = -1,
      length = props.length;

  while (++index < length) {
    var key = props[index];

    var newValue = customizer
      ? customizer(object[key], source[key], key, object, source)
      : undefined;

    if (newValue === undefined) {
      newValue = source[key];
    }
    if (isNew) {
      baseAssignValue(object, key, newValue);
    } else {
      assignValue(object, key, newValue);
    }
  }
  return object;
}

/**
 * Creates a function like `_.assign`.
 *
 * @private
 * @param {Function} assigner The function to assign values.
 * @returns {Function} Returns the new assigner function.
 */
function createAssigner(assigner) {
  return baseRest(function(object, sources) {
    var index = -1,
        length = sources.length,
        customizer = length > 1 ? sources[length - 1] : undefined,
        guard = length > 2 ? sources[2] : undefined;

    customizer = (assigner.length > 3 && typeof customizer == 'function')
      ? (length--, customizer)
      : undefined;

    if (guard && isIterateeCall(sources[0], sources[1], guard)) {
      customizer = length < 3 ? undefined : customizer;
      length = 1;
    }
    object = Object(object);
    while (++index < length) {
      var source = sources[index];
      if (source) {
        assigner(object, source, index, customizer);
      }
    }
    return object;
  });
}

/**
 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
 *
 * @private
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Function} Returns the new base function.
 */
function createBaseFor(fromRight) {
  return function(object, iteratee, keysFunc) {
    var index = -1,
        iterable = Object(object),
        props = keysFunc(object),
        length = props.length;

    while (length--) {
      var key = props[fromRight ? length : ++index];
      if (iteratee(iterable[key], key, iterable) === false) {
        break;
      }
    }
    return object;
  };
}

/**
 * Gets the data for `map`.
 *
 * @private
 * @param {Object} map The map to query.
 * @param {string} key The reference key.
 * @returns {*} Returns the map data.
 */
function getMapData(map, key) {
  var data = map.__data__;
  return isKeyable(key)
    ? data[typeof key == 'string' ? 'string' : 'hash']
    : data.map;
}

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
  var value = getValue(object, key);
  return baseIsNative(value) ? value : undefined;
}

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag),
      tag = value[symToStringTag];

  try {
    value[symToStringTag] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag] = tag;
    } else {
      delete value[symToStringTag];
    }
  }
  return result;
}

/**
 * Initializes an object clone.
 *
 * @private
 * @param {Object} object The object to clone.
 * @returns {Object} Returns the initialized clone.
 */
function initCloneObject(object) {
  return (typeof object.constructor == 'function' && !isPrototype(object))
    ? baseCreate(getPrototype(object))
    : {};
}

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  var type = typeof value;
  length = length == null ? MAX_SAFE_INTEGER : length;

  return !!length &&
    (type == 'number' ||
      (type != 'symbol' && reIsUint.test(value))) &&
        (value > -1 && value % 1 == 0 && value < length);
}

/**
 * Checks if the given arguments are from an iteratee call.
 *
 * @private
 * @param {*} value The potential iteratee value argument.
 * @param {*} index The potential iteratee index or key argument.
 * @param {*} object The potential iteratee object argument.
 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
 *  else `false`.
 */
function isIterateeCall(value, index, object) {
  if (!isObject(object)) {
    return false;
  }
  var type = typeof index;
  if (type == 'number'
        ? (isArrayLike(object) && isIndex(index, object.length))
        : (type == 'string' && index in object)
      ) {
    return eq(object[index], value);
  }
  return false;
}

/**
 * Checks if `value` is suitable for use as unique object key.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
 */
function isKeyable(value) {
  var type = typeof value;
  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
    ? (value !== '__proto__')
    : (value === null);
}

/**
 * Checks if `func` has its source masked.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
 */
function isMasked(func) {
  return !!maskSrcKey && (maskSrcKey in func);
}

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;

  return value === proto;
}

/**
 * This function is like
 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * except that it includes inherited enumerable properties.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function nativeKeysIn(object) {
  var result = [];
  if (object != null) {
    for (var key in Object(object)) {
      result.push(key);
    }
  }
  return result;
}

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString(value) {
  return nativeObjectToString.call(value);
}

/**
 * A specialized version of `baseRest` which transforms the rest array.
 *
 * @private
 * @param {Function} func The function to apply a rest parameter to.
 * @param {number} [start=func.length-1] The start position of the rest parameter.
 * @param {Function} transform The rest array transform.
 * @returns {Function} Returns the new function.
 */
function overRest(func, start, transform) {
  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  return function() {
    var args = arguments,
        index = -1,
        length = nativeMax(args.length - start, 0),
        array = Array(length);

    while (++index < length) {
      array[index] = args[start + index];
    }
    index = -1;
    var otherArgs = Array(start + 1);
    while (++index < start) {
      otherArgs[index] = args[index];
    }
    otherArgs[start] = transform(array);
    return apply(func, this, otherArgs);
  };
}

/**
 * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function safeGet(object, key) {
  if (key === 'constructor' && typeof object[key] === 'function') {
    return;
  }

  if (key == '__proto__') {
    return;
  }

  return object[key];
}

/**
 * Sets the `toString` method of `func` to return `string`.
 *
 * @private
 * @param {Function} func The function to modify.
 * @param {Function} string The `toString` result.
 * @returns {Function} Returns `func`.
 */
var setToString = shortOut(baseSetToString);

/**
 * Creates a function that'll short out and invoke `identity` instead
 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
 * milliseconds.
 *
 * @private
 * @param {Function} func The function to restrict.
 * @returns {Function} Returns the new shortable function.
 */
function shortOut(func) {
  var count = 0,
      lastCalled = 0;

  return function() {
    var stamp = nativeNow(),
        remaining = HOT_SPAN - (stamp - lastCalled);

    lastCalled = stamp;
    if (remaining > 0) {
      if (++count >= HOT_COUNT) {
        return arguments[0];
      }
    } else {
      count = 0;
    }
    return func.apply(undefined, arguments);
  };
}

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to convert.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {}
    try {
      return (func + '');
    } catch (e) {}
  }
  return '';
}

/**
 * Performs a
 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * comparison between two values to determine if they are equivalent.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.eq(object, object);
 * // => true
 *
 * _.eq(object, other);
 * // => false
 *
 * _.eq('a', 'a');
 * // => true
 *
 * _.eq('a', Object('a'));
 * // => false
 *
 * _.eq(NaN, NaN);
 * // => true
 */
function eq(value, other) {
  return value === other || (value !== value && other !== other);
}

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
    !propertyIsEnumerable.call(value, 'callee');
};

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

/**
 * This method is like `_.isArrayLike` except that it also checks if `value`
 * is an object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array-like object,
 *  else `false`.
 * @example
 *
 * _.isArrayLikeObject([1, 2, 3]);
 * // => true
 *
 * _.isArrayLikeObject(document.body.children);
 * // => true
 *
 * _.isArrayLikeObject('abc');
 * // => false
 *
 * _.isArrayLikeObject(_.noop);
 * // => false
 */
function isArrayLikeObject(value) {
  return isObjectLike(value) && isArrayLike(value);
}

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  if (!isObject(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag(value);
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = typeof value;
  return value != null && (type == 'object' || type == 'function');
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return value != null && typeof value == 'object';
}

/**
 * Checks if `value` is a plain object, that is, an object created by the
 * `Object` constructor or one with a `[[Prototype]]` of `null`.
 *
 * @static
 * @memberOf _
 * @since 0.8.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 * }
 *
 * _.isPlainObject(new Foo);
 * // => false
 *
 * _.isPlainObject([1, 2, 3]);
 * // => false
 *
 * _.isPlainObject({ 'x': 0, 'y': 0 });
 * // => true
 *
 * _.isPlainObject(Object.create(null));
 * // => true
 */
function isPlainObject(value) {
  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
    return false;
  }
  var proto = getPrototype(value);
  if (proto === null) {
    return true;
  }
  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  return typeof Ctor == 'function' && Ctor instanceof Ctor &&
    funcToString.call(Ctor) == objectCtorString;
}

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

/**
 * Converts `value` to a plain object flattening inherited enumerable string
 * keyed properties of `value` to own properties of the plain object.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {Object} Returns the converted plain object.
 * @example
 *
 * function Foo() {
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.assign({ 'a': 1 }, new Foo);
 * // => { 'a': 1, 'b': 2 }
 *
 * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
 * // => { 'a': 1, 'b': 2, 'c': 3 }
 */
function toPlainObject(value) {
  return copyObject(value, keysIn(value));
}

/**
 * Creates an array of the own and inherited enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keysIn(new Foo);
 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
 */
function keysIn(object) {
  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}

/**
 * This method is like `_.assign` except that it recursively merges own and
 * inherited enumerable string keyed properties of source objects into the
 * destination object. Source properties that resolve to `undefined` are
 * skipped if a destination value exists. Array and plain object properties
 * are merged recursively. Other objects and value types are overridden by
 * assignment. Source objects are applied from left to right. Subsequent
 * sources overwrite property assignments of previous sources.
 *
 * **Note:** This method mutates `object`.
 *
 * @static
 * @memberOf _
 * @since 0.5.0
 * @category Object
 * @param {Object} object The destination object.
 * @param {...Object} [sources] The source objects.
 * @returns {Object} Returns `object`.
 * @example
 *
 * var object = {
 *   'a': [{ 'b': 2 }, { 'd': 4 }]
 * };
 *
 * var other = {
 *   'a': [{ 'c': 3 }, { 'e': 5 }]
 * };
 *
 * _.merge(object, other);
 * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
 */
var merge = createAssigner(function(object, source, srcIndex) {
  baseMerge(object, source, srcIndex);
});

/**
 * Creates a function that returns `value`.
 *
 * @static
 * @memberOf _
 * @since 2.4.0
 * @category Util
 * @param {*} value The value to return from the new function.
 * @returns {Function} Returns the new constant function.
 * @example
 *
 * var objects = _.times(2, _.constant({ 'a': 1 }));
 *
 * console.log(objects);
 * // => [{ 'a': 1 }, { 'a': 1 }]
 *
 * console.log(objects[0] === objects[1]);
 * // => true
 */
function constant(value) {
  return function() {
    return value;
  };
}

/**
 * This method returns the first argument it receives.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Util
 * @param {*} value Any value.
 * @returns {*} Returns `value`.
 * @example
 *
 * var object = { 'a': 1 };
 *
 * console.log(_.identity(object) === object);
 * // => true
 */
function identity(value) {
  return value;
}

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}

module.exports = merge;


/***/ }),

/***/ 5143:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
const cloneDeep = __webpack_require__(8805);
const isEqual = __webpack_require__(2722);
var AttributeMap;
(function (AttributeMap) {
    function compose(a = {}, b = {}, keepNull = false) {
        if (typeof a !== 'object') {
            a = {};
        }
        if (typeof b !== 'object') {
            b = {};
        }
        let attributes = cloneDeep(b);
        if (!keepNull) {
            attributes = Object.keys(attributes).reduce((copy, key) => {
                if (attributes[key] != null) {
                    copy[key] = attributes[key];
                }
                return copy;
            }, {});
        }
        for (const key in a) {
            if (a[key] !== undefined && b[key] === undefined) {
                attributes[key] = a[key];
            }
        }
        return Object.keys(attributes).length > 0 ? attributes : undefined;
    }
    AttributeMap.compose = compose;
    function diff(a = {}, b = {}) {
        if (typeof a !== 'object') {
            a = {};
        }
        if (typeof b !== 'object') {
            b = {};
        }
        const attributes = Object.keys(a)
            .concat(Object.keys(b))
            .reduce((attrs, key) => {
            if (!isEqual(a[key], b[key])) {
                attrs[key] = b[key] === undefined ? null : b[key];
            }
            return attrs;
        }, {});
        return Object.keys(attributes).length > 0 ? attributes : undefined;
    }
    AttributeMap.diff = diff;
    function invert(attr = {}, base = {}) {
        attr = attr || {};
        const baseInverted = Object.keys(base).reduce((memo, key) => {
            if (base[key] !== attr[key] && attr[key] !== undefined) {
                memo[key] = base[key];
            }
            return memo;
        }, {});
        return Object.keys(attr).reduce((memo, key) => {
            if (attr[key] !== base[key] && base[key] === undefined) {
                memo[key] = null;
            }
            return memo;
        }, baseInverted);
    }
    AttributeMap.invert = invert;
    function transform(a, b, priority = false) {
        if (typeof a !== 'object') {
            return b;
        }
        if (typeof b !== 'object') {
            return undefined;
        }
        if (!priority) {
            return b; // b simply overwrites us without priority
        }
        const attributes = Object.keys(b).reduce((attrs, key) => {
            if (a[key] === undefined) {
                attrs[key] = b[key]; // null is a valid value
            }
            return attrs;
        }, {});
        return Object.keys(attributes).length > 0 ? attributes : undefined;
    }
    AttributeMap.transform = transform;
})(AttributeMap || (AttributeMap = {}));
exports["default"] = AttributeMap;


/***/ }),

/***/ 9098:
/***/ ((module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AttributeMap = exports.OpIterator = exports.Op = void 0;
const diff = __webpack_require__(1456);
const cloneDeep = __webpack_require__(8805);
const isEqual = __webpack_require__(2722);
const AttributeMap_1 = __webpack_require__(5143);
exports.AttributeMap = AttributeMap_1.default;
const Op_1 = __webpack_require__(6237);
exports.Op = Op_1.default;
const OpIterator_1 = __webpack_require__(2849);
exports.OpIterator = OpIterator_1.default;
const NULL_CHARACTER = String.fromCharCode(0); // Placeholder char for embed in diff()
const getEmbedTypeAndData = (a, b) => {
    if (typeof a !== 'object' || a === null) {
        throw new Error(`cannot retain a ${typeof a}`);
    }
    if (typeof b !== 'object' || b === null) {
        throw new Error(`cannot retain a ${typeof b}`);
    }
    const embedType = Object.keys(a)[0];
    if (!embedType || embedType !== Object.keys(b)[0]) {
        throw new Error(`embed types not matched: ${embedType} != ${Object.keys(b)[0]}`);
    }
    return [embedType, a[embedType], b[embedType]];
};
class Delta {
    constructor(ops) {
        // Assume we are given a well formed ops
        if (Array.isArray(ops)) {
            this.ops = ops;
        }
        else if (ops != null && Array.isArray(ops.ops)) {
            this.ops = ops.ops;
        }
        else {
            this.ops = [];
        }
    }
    static registerEmbed(embedType, handler) {
        this.handlers[embedType] = handler;
    }
    static unregisterEmbed(embedType) {
        delete this.handlers[embedType];
    }
    static getHandler(embedType) {
        const handler = this.handlers[embedType];
        if (!handler) {
            throw new Error(`no handlers for embed type "${embedType}"`);
        }
        return handler;
    }
    insert(arg, attributes) {
        const newOp = {};
        if (typeof arg === 'string' && arg.length === 0) {
            return this;
        }
        newOp.insert = arg;
        if (attributes != null &&
            typeof attributes === 'object' &&
            Object.keys(attributes).length > 0) {
            newOp.attributes = attributes;
        }
        return this.push(newOp);
    }
    delete(length) {
        if (length <= 0) {
            return this;
        }
        return this.push({ delete: length });
    }
    retain(length, attributes) {
        if (typeof length === 'number' && length <= 0) {
            return this;
        }
        const newOp = { retain: length };
        if (attributes != null &&
            typeof attributes === 'object' &&
            Object.keys(attributes).length > 0) {
            newOp.attributes = attributes;
        }
        return this.push(newOp);
    }
    push(newOp) {
        let index = this.ops.length;
        let lastOp = this.ops[index - 1];
        newOp = cloneDeep(newOp);
        if (typeof lastOp === 'object') {
            if (typeof newOp.delete === 'number' &&
                typeof lastOp.delete === 'number') {
                this.ops[index - 1] = { delete: lastOp.delete + newOp.delete };
                return this;
            }
            // Since it does not matter if we insert before or after deleting at the same index,
            // always prefer to insert first
            if (typeof lastOp.delete === 'number' && newOp.insert != null) {
                index -= 1;
                lastOp = this.ops[index - 1];
                if (typeof lastOp !== 'object') {
                    this.ops.unshift(newOp);
                    return this;
                }
            }
            if (isEqual(newOp.attributes, lastOp.attributes)) {
                if (typeof newOp.insert === 'string' &&
                    typeof lastOp.insert === 'string') {
                    this.ops[index - 1] = { insert: lastOp.insert + newOp.insert };
                    if (typeof newOp.attributes === 'object') {
                        this.ops[index - 1].attributes = newOp.attributes;
                    }
                    return this;
                }
                else if (typeof newOp.retain === 'number' &&
                    typeof lastOp.retain === 'number') {
                    this.ops[index - 1] = { retain: lastOp.retain + newOp.retain };
                    if (typeof newOp.attributes === 'object') {
                        this.ops[index - 1].attributes = newOp.attributes;
                    }
                    return this;
                }
            }
        }
        if (index === this.ops.length) {
            this.ops.push(newOp);
        }
        else {
            this.ops.splice(index, 0, newOp);
        }
        return this;
    }
    chop() {
        const lastOp = this.ops[this.ops.length - 1];
        if (lastOp && typeof lastOp.retain === 'number' && !lastOp.attributes) {
            this.ops.pop();
        }
        return this;
    }
    filter(predicate) {
        return this.ops.filter(predicate);
    }
    forEach(predicate) {
        this.ops.forEach(predicate);
    }
    map(predicate) {
        return this.ops.map(predicate);
    }
    partition(predicate) {
        const passed = [];
        const failed = [];
        this.forEach((op) => {
            const target = predicate(op) ? passed : failed;
            target.push(op);
        });
        return [passed, failed];
    }
    reduce(predicate, initialValue) {
        return this.ops.reduce(predicate, initialValue);
    }
    changeLength() {
        return this.reduce((length, elem) => {
            if (elem.insert) {
                return length + Op_1.default.length(elem);
            }
            else if (elem.delete) {
                return length - elem.delete;
            }
            return length;
        }, 0);
    }
    length() {
        return this.reduce((length, elem) => {
            return length + Op_1.default.length(elem);
        }, 0);
    }
    slice(start = 0, end = Infinity) {
        const ops = [];
        const iter = new OpIterator_1.default(this.ops);
        let index = 0;
        while (index < end && iter.hasNext()) {
            let nextOp;
            if (index < start) {
                nextOp = iter.next(start - index);
            }
            else {
                nextOp = iter.next(end - index);
                ops.push(nextOp);
            }
            index += Op_1.default.length(nextOp);
        }
        return new Delta(ops);
    }
    compose(other) {
        const thisIter = new OpIterator_1.default(this.ops);
        const otherIter = new OpIterator_1.default(other.ops);
        const ops = [];
        const firstOther = otherIter.peek();
        if (firstOther != null &&
            typeof firstOther.retain === 'number' &&
            firstOther.attributes == null) {
            let firstLeft = firstOther.retain;
            while (thisIter.peekType() === 'insert' &&
                thisIter.peekLength() <= firstLeft) {
                firstLeft -= thisIter.peekLength();
                ops.push(thisIter.next());
            }
            if (firstOther.retain - firstLeft > 0) {
                otherIter.next(firstOther.retain - firstLeft);
            }
        }
        const delta = new Delta(ops);
        while (thisIter.hasNext() || otherIter.hasNext()) {
            if (otherIter.peekType() === 'insert') {
                delta.push(otherIter.next());
            }
            else if (thisIter.peekType() === 'delete') {
                delta.push(thisIter.next());
            }
            else {
                const length = Math.min(thisIter.peekLength(), otherIter.peekLength());
                const thisOp = thisIter.next(length);
                const otherOp = otherIter.next(length);
                if (otherOp.retain) {
                    const newOp = {};
                    if (typeof thisOp.retain === 'number') {
                        newOp.retain =
                            typeof otherOp.retain === 'number' ? length : otherOp.retain;
                    }
                    else {
                        if (typeof otherOp.retain === 'number') {
                            if (thisOp.retain == null) {
                                newOp.insert = thisOp.insert;
                            }
                            else {
                                newOp.retain = thisOp.retain;
                            }
                        }
                        else {
                            const action = thisOp.retain == null ? 'insert' : 'retain';
                            const [embedType, thisData, otherData] = getEmbedTypeAndData(thisOp[action], otherOp.retain);
                            const handler = Delta.getHandler(embedType);
                            newOp[action] = {
                                [embedType]: handler.compose(thisData, otherData, action === 'retain'),
                            };
                        }
                    }
                    // Preserve null when composing with a retain, otherwise remove it for inserts
                    const attributes = AttributeMap_1.default.compose(thisOp.attributes, otherOp.attributes, typeof thisOp.retain === 'number');
                    if (attributes) {
                        newOp.attributes = attributes;
                    }
                    delta.push(newOp);
                    // Optimization if rest of other is just retain
                    if (!otherIter.hasNext() &&
                        isEqual(delta.ops[delta.ops.length - 1], newOp)) {
                        const rest = new Delta(thisIter.rest());
                        return delta.concat(rest).chop();
                    }
                    // Other op should be delete, we could be an insert or retain
                    // Insert + delete cancels out
                }
                else if (typeof otherOp.delete === 'number' &&
                    (typeof thisOp.retain === 'number' ||
                        (typeof thisOp.retain === 'object' && thisOp.retain !== null))) {
                    delta.push(otherOp);
                }
            }
        }
        return delta.chop();
    }
    concat(other) {
        const delta = new Delta(this.ops.slice());
        if (other.ops.length > 0) {
            delta.push(other.ops[0]);
            delta.ops = delta.ops.concat(other.ops.slice(1));
        }
        return delta;
    }
    diff(other, cursor) {
        if (this.ops === other.ops) {
            return new Delta();
        }
        const strings = [this, other].map((delta) => {
            return delta
                .map((op) => {
                if (op.insert != null) {
                    return typeof op.insert === 'string' ? op.insert : NULL_CHARACTER;
                }
                const prep = delta === other ? 'on' : 'with';
                throw new Error('diff() called ' + prep + ' non-document');
            })
                .join('');
        });
        const retDelta = new Delta();
        const diffResult = diff(strings[0], strings[1], cursor);
        const thisIter = new OpIterator_1.default(this.ops);
        const otherIter = new OpIterator_1.default(other.ops);
        diffResult.forEach((component) => {
            let length = component[1].length;
            while (length > 0) {
                let opLength = 0;
                switch (component[0]) {
                    case diff.INSERT:
                        opLength = Math.min(otherIter.peekLength(), length);
                        retDelta.push(otherIter.next(opLength));
                        break;
                    case diff.DELETE:
                        opLength = Math.min(length, thisIter.peekLength());
                        thisIter.next(opLength);
                        retDelta.delete(opLength);
                        break;
                    case diff.EQUAL:
                        opLength = Math.min(thisIter.peekLength(), otherIter.peekLength(), length);
                        const thisOp = thisIter.next(opLength);
                        const otherOp = otherIter.next(opLength);
                        if (isEqual(thisOp.insert, otherOp.insert)) {
                            retDelta.retain(opLength, AttributeMap_1.default.diff(thisOp.attributes, otherOp.attributes));
                        }
                        else {
                            retDelta.push(otherOp).delete(opLength);
                        }
                        break;
                }
                length -= opLength;
            }
        });
        return retDelta.chop();
    }
    eachLine(predicate, newline = '\n') {
        const iter = new OpIterator_1.default(this.ops);
        let line = new Delta();
        let i = 0;
        while (iter.hasNext()) {
            if (iter.peekType() !== 'insert') {
                return;
            }
            const thisOp = iter.peek();
            const start = Op_1.default.length(thisOp) - iter.peekLength();
            const index = typeof thisOp.insert === 'string'
                ? thisOp.insert.indexOf(newline, start) - start
                : -1;
            if (index < 0) {
                line.push(iter.next());
            }
            else if (index > 0) {
                line.push(iter.next(index));
            }
            else {
                if (predicate(line, iter.next(1).attributes || {}, i) === false) {
                    return;
                }
                i += 1;
                line = new Delta();
            }
        }
        if (line.length() > 0) {
            predicate(line, {}, i);
        }
    }
    invert(base) {
        const inverted = new Delta();
        this.reduce((baseIndex, op) => {
            if (op.insert) {
                inverted.delete(Op_1.default.length(op));
            }
            else if (typeof op.retain === 'number' && op.attributes == null) {
                inverted.retain(op.retain);
                return baseIndex + op.retain;
            }
            else if (op.delete || typeof op.retain === 'number') {
                const length = (op.delete || op.retain);
                const slice = base.slice(baseIndex, baseIndex + length);
                slice.forEach((baseOp) => {
                    if (op.delete) {
                        inverted.push(baseOp);
                    }
                    else if (op.retain && op.attributes) {
                        inverted.retain(Op_1.default.length(baseOp), AttributeMap_1.default.invert(op.attributes, baseOp.attributes));
                    }
                });
                return baseIndex + length;
            }
            else if (typeof op.retain === 'object' && op.retain !== null) {
                const slice = base.slice(baseIndex, baseIndex + 1);
                const baseOp = new OpIterator_1.default(slice.ops).next();
                const [embedType, opData, baseOpData] = getEmbedTypeAndData(op.retain, baseOp.insert);
                const handler = Delta.getHandler(embedType);
                inverted.retain({ [embedType]: handler.invert(opData, baseOpData) }, AttributeMap_1.default.invert(op.attributes, baseOp.attributes));
                return baseIndex + 1;
            }
            return baseIndex;
        }, 0);
        return inverted.chop();
    }
    transform(arg, priority = false) {
        priority = !!priority;
        if (typeof arg === 'number') {
            return this.transformPosition(arg, priority);
        }
        const other = arg;
        const thisIter = new OpIterator_1.default(this.ops);
        const otherIter = new OpIterator_1.default(other.ops);
        const delta = new Delta();
        while (thisIter.hasNext() || otherIter.hasNext()) {
            if (thisIter.peekType() === 'insert' &&
                (priority || otherIter.peekType() !== 'insert')) {
                delta.retain(Op_1.default.length(thisIter.next()));
            }
            else if (otherIter.peekType() === 'insert') {
                delta.push(otherIter.next());
            }
            else {
                const length = Math.min(thisIter.peekLength(), otherIter.peekLength());
                const thisOp = thisIter.next(length);
                const otherOp = otherIter.next(length);
                if (thisOp.delete) {
                    // Our delete either makes their delete redundant or removes their retain
                    continue;
                }
                else if (otherOp.delete) {
                    delta.push(otherOp);
                }
                else {
                    const thisData = thisOp.retain;
                    const otherData = otherOp.retain;
                    let transformedData = typeof otherData === 'object' && otherData !== null
                        ? otherData
                        : length;
                    if (typeof thisData === 'object' &&
                        thisData !== null &&
                        typeof otherData === 'object' &&
                        otherData !== null) {
                        const embedType = Object.keys(thisData)[0];
                        if (embedType === Object.keys(otherData)[0]) {
                            const handler = Delta.getHandler(embedType);
                            if (handler) {
                                transformedData = {
                                    [embedType]: handler.transform(thisData[embedType], otherData[embedType], priority),
                                };
                            }
                        }
                    }
                    // We retain either their retain or insert
                    delta.retain(transformedData, AttributeMap_1.default.transform(thisOp.attributes, otherOp.attributes, priority));
                }
            }
        }
        return delta.chop();
    }
    transformPosition(index, priority = false) {
        priority = !!priority;
        const thisIter = new OpIterator_1.default(this.ops);
        let offset = 0;
        while (thisIter.hasNext() && offset <= index) {
            const length = thisIter.peekLength();
            const nextType = thisIter.peekType();
            thisIter.next();
            if (nextType === 'delete') {
                index -= Math.min(length, index - offset);
                continue;
            }
            else if (nextType === 'insert' && (offset < index || !priority)) {
                index += length;
            }
            offset += length;
        }
        return index;
    }
}
Delta.Op = Op_1.default;
Delta.OpIterator = OpIterator_1.default;
Delta.AttributeMap = AttributeMap_1.default;
Delta.handlers = {};
exports["default"] = Delta;
if (true) {
    module.exports = Delta;
    module.exports["default"] = Delta;
}


/***/ }),

/***/ 6237:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var Op;
(function (Op) {
    function length(op) {
        if (typeof op.delete === 'number') {
            return op.delete;
        }
        else if (typeof op.retain === 'number') {
            return op.retain;
        }
        else if (typeof op.retain === 'object' && op.retain !== null) {
            return 1;
        }
        else {
            return typeof op.insert === 'string' ? op.insert.length : 1;
        }
    }
    Op.length = length;
})(Op || (Op = {}));
exports["default"] = Op;


/***/ }),

/***/ 2849:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
const Op_1 = __webpack_require__(6237);
class Iterator {
    constructor(ops) {
        this.ops = ops;
        this.index = 0;
        this.offset = 0;
    }
    hasNext() {
        return this.peekLength() < Infinity;
    }
    next(length) {
        if (!length) {
            length = Infinity;
        }
        const nextOp = this.ops[this.index];
        if (nextOp) {
            const offset = this.offset;
            const opLength = Op_1.default.length(nextOp);
            if (length >= opLength - offset) {
                length = opLength - offset;
                this.index += 1;
                this.offset = 0;
            }
            else {
                this.offset += length;
            }
            if (typeof nextOp.delete === 'number') {
                return { delete: length };
            }
            else {
                const retOp = {};
                if (nextOp.attributes) {
                    retOp.attributes = nextOp.attributes;
                }
                if (typeof nextOp.retain === 'number') {
                    retOp.retain = length;
                }
                else if (typeof nextOp.retain === 'object' &&
                    nextOp.retain !== null) {
                    // offset should === 0, length should === 1
                    retOp.retain = nextOp.retain;
                }
                else if (typeof nextOp.insert === 'string') {
                    retOp.insert = nextOp.insert.substr(offset, length);
                }
                else {
                    // offset should === 0, length should === 1
                    retOp.insert = nextOp.insert;
                }
                return retOp;
            }
        }
        else {
            return { retain: Infinity };
        }
    }
    peek() {
        return this.ops[this.index];
    }
    peekLength() {
        if (this.ops[this.index]) {
            // Should never return 0 if our index is being managed correctly
            return Op_1.default.length(this.ops[this.index]) - this.offset;
        }
        else {
            return Infinity;
        }
    }
    peekType() {
        const op = this.ops[this.index];
        if (op) {
            if (typeof op.delete === 'number') {
                return 'delete';
            }
            else if (typeof op.retain === 'number' ||
                (typeof op.retain === 'object' && op.retain !== null)) {
                return 'retain';
            }
            else {
                return 'insert';
            }
        }
        return 'retain';
    }
    rest() {
        if (!this.hasNext()) {
            return [];
        }
        else if (this.offset === 0) {
            return this.ops.slice(this.index);
        }
        else {
            const offset = this.offset;
            const index = this.index;
            const next = this.next();
            const rest = this.ops.slice(this.index);
            this.offset = offset;
            this.index = index;
            return [next].concat(rest);
        }
    }
}
exports["default"] = Iterator;


/***/ }),

/***/ 1863:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(9731);

module.exports = parent;


/***/ }),

/***/ 6572:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(4401);

module.exports = parent;


/***/ }),

/***/ 2318:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(3661);

module.exports = parent;


/***/ }),

/***/ 576:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(5606);

module.exports = parent;


/***/ }),

/***/ 2327:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

__webpack_require__(5445);
var entryUnbind = __webpack_require__(6731);

module.exports = entryUnbind('Array', 'fill');


/***/ }),

/***/ 3274:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

__webpack_require__(9477);
__webpack_require__(6272);
var path = __webpack_require__(577);

module.exports = path.Array.from;


/***/ }),

/***/ 5339:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

__webpack_require__(2947);
var path = __webpack_require__(577);

module.exports = path.Object.values;


/***/ }),

/***/ 1189:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

__webpack_require__(538);
var entryUnbind = __webpack_require__(6731);

module.exports = entryUnbind('String', 'endsWith');


/***/ }),

/***/ 5142:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

/* unused reexport */ __webpack_require__(297);


/***/ }),

/***/ 1019:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

/* unused reexport */ __webpack_require__(4660);


/***/ }),

/***/ 1183:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

/* unused reexport */ __webpack_require__(5275);


/***/ }),

/***/ 2570:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

/* unused reexport */ __webpack_require__(2839);


/***/ }),

/***/ 297:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(1863);

module.exports = parent;


/***/ }),

/***/ 4660:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(6572);

module.exports = parent;


/***/ }),

/***/ 5275:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(2318);

module.exports = parent;


/***/ }),

/***/ 2839:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(576);

module.exports = parent;


/***/ }),

/***/ 6324:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var isCallable = __webpack_require__(2539);
var tryToString = __webpack_require__(7471);

var $TypeError = TypeError;

// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
  if (isCallable(argument)) return argument;
  throw new $TypeError(tryToString(argument) + ' is not a function');
};


/***/ }),

/***/ 2162:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var isCallable = __webpack_require__(2539);

var $String = String;
var $TypeError = TypeError;

module.exports = function (argument) {
  if (typeof argument == 'object' || isCallable(argument)) return argument;
  throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
};


/***/ }),

/***/ 2572:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var wellKnownSymbol = __webpack_require__(5485);
var create = __webpack_require__(3830);
var defineProperty = (__webpack_require__(8503).f);

var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;

// Array.prototype[@@unscopables]
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] === undefined) {
  defineProperty(ArrayPrototype, UNSCOPABLES, {
    configurable: true,
    value: create(null)
  });
}

// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
  ArrayPrototype[UNSCOPABLES][key] = true;
};


/***/ }),

/***/ 8874:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var isObject = __webpack_require__(3988);

var $String = String;
var $TypeError = TypeError;

// `Assert: Type(argument) is Object`
module.exports = function (argument) {
  if (isObject(argument)) return argument;
  throw new $TypeError($String(argument) + ' is not an object');
};


/***/ }),

/***/ 9236:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var toObject = __webpack_require__(6015);
var toAbsoluteIndex = __webpack_require__(7234);
var lengthOfArrayLike = __webpack_require__(3235);

// `Array.prototype.fill` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.fill
module.exports = function fill(value /* , start = 0, end = @length */) {
  var O = toObject(this);
  var length = lengthOfArrayLike(O);
  var argumentsLength = arguments.length;
  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  var end = argumentsLength > 2 ? arguments[2] : undefined;
  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  while (endPos > index) O[index++] = value;
  return O;
};


/***/ }),

/***/ 8459:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var bind = __webpack_require__(9794);
var call = __webpack_require__(2977);
var toObject = __webpack_require__(6015);
var callWithSafeIterationClosing = __webpack_require__(9154);
var isArrayIteratorMethod = __webpack_require__(7024);
var isConstructor = __webpack_require__(6467);
var lengthOfArrayLike = __webpack_require__(3235);
var createProperty = __webpack_require__(3003);
var getIterator = __webpack_require__(2387);
var getIteratorMethod = __webpack_require__(7874);

var $Array = Array;

// `Array.from` method implementation
// https://tc39.es/ecma262/#sec-array.from
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  var O = toObject(arrayLike);
  var IS_CONSTRUCTOR = isConstructor(this);
  var argumentsLength = arguments.length;
  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  var mapping = mapfn !== undefined;
  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
  var iteratorMethod = getIteratorMethod(O);
  var index = 0;
  var length, result, step, iterator, next, value;
  // if the target is not iterable or it's an array with the default iterator - use a simple case
  if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
    iterator = getIterator(O, iteratorMethod);
    next = iterator.next;
    result = IS_CONSTRUCTOR ? new this() : [];
    for (;!(step = call(next, iterator)).done; index++) {
      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
      createProperty(result, index, value);
    }
  } else {
    length = lengthOfArrayLike(O);
    result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
    for (;length > index; index++) {
      value = mapping ? mapfn(O[index], index) : O[index];
      createProperty(result, index, value);
    }
  }
  result.length = index;
  return result;
};


/***/ }),

/***/ 5644:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var toIndexedObject = __webpack_require__(7625);
var toAbsoluteIndex = __webpack_require__(7234);
var lengthOfArrayLike = __webpack_require__(3235);

// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIndexedObject($this);
    var length = lengthOfArrayLike(O);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare -- NaN check
    if (IS_INCLUDES && el !== el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare -- NaN check
      if (value !== value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) {
      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

module.exports = {
  // `Array.prototype.includes` method
  // https://tc39.es/ecma262/#sec-array.prototype.includes
  includes: createMethod(true),
  // `Array.prototype.indexOf` method
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
  indexOf: createMethod(false)
};


/***/ }),

/***/ 9154:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var anObject = __webpack_require__(8874);
var iteratorClose = __webpack_require__(8880);

// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
  try {
    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  } catch (error) {
    iteratorClose(iterator, 'throw', error);
  }
};


/***/ }),

/***/ 3346:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var wellKnownSymbol = __webpack_require__(5485);

var ITERATOR = wellKnownSymbol('iterator');
var SAFE_CLOSING = false;

try {
  var called = 0;
  var iteratorWithReturn = {
    next: function () {
      return { done: !!called++ };
    },
    'return': function () {
      SAFE_CLOSING = true;
    }
  };
  iteratorWithReturn[ITERATOR] = function () {
    return this;
  };
  // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  Array.from(iteratorWithReturn, function () { throw 2; });
} catch (error) { /* empty */ }

module.exports = function (exec, SKIP_CLOSING) {
  try {
    if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  } catch (error) { return false; } // workaround of old WebKit + `eval` bug
  var ITERATION_SUPPORT = false;
  try {
    var object = {};
    object[ITERATOR] = function () {
      return {
        next: function () {
          return { done: ITERATION_SUPPORT = true };
        }
      };
    };
    exec(object);
  } catch (error) { /* empty */ }
  return ITERATION_SUPPORT;
};


/***/ }),

/***/ 4545:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);

var toString = uncurryThis({}.toString);
var stringSlice = uncurryThis(''.slice);

module.exports = function (it) {
  return stringSlice(toString(it), 8, -1);
};


/***/ }),

/***/ 2702:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var TO_STRING_TAG_SUPPORT = __webpack_require__(1923);
var isCallable = __webpack_require__(2539);
var classofRaw = __webpack_require__(4545);
var wellKnownSymbol = __webpack_require__(5485);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $Object = Object;

// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (error) { /* empty */ }
};

// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  var O, tag, result;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
    // builtinTag case
    : CORRECT_ARGUMENTS ? classofRaw(O)
    // ES3 arguments fallback
    : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
};


/***/ }),

/***/ 1358:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var hasOwn = __webpack_require__(2623);
var ownKeys = __webpack_require__(3054);
var getOwnPropertyDescriptorModule = __webpack_require__(3037);
var definePropertyModule = __webpack_require__(8503);

module.exports = function (target, source, exceptions) {
  var keys = ownKeys(source);
  var defineProperty = definePropertyModule.f;
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
      defineProperty(target, key, getOwnPropertyDescriptor(source, key));
    }
  }
};


/***/ }),

/***/ 6775:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var wellKnownSymbol = __webpack_require__(5485);

var MATCH = wellKnownSymbol('match');

module.exports = function (METHOD_NAME) {
  var regexp = /./;
  try {
    '/./'[METHOD_NAME](regexp);
  } catch (error1) {
    try {
      regexp[MATCH] = false;
      return '/./'[METHOD_NAME](regexp);
    } catch (error2) { /* empty */ }
  } return false;
};


/***/ }),

/***/ 6141:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var fails = __webpack_require__(5202);

module.exports = !fails(function () {
  function F() { /* empty */ }
  F.prototype.constructor = null;
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  return Object.getPrototypeOf(new F()) !== F.prototype;
});


/***/ }),

/***/ 3585:
/***/ ((module) => {

"use strict";

// `CreateIterResultObject` abstract operation
// https://tc39.es/ecma262/#sec-createiterresultobject
module.exports = function (value, done) {
  return { value: value, done: done };
};


/***/ }),

/***/ 8868:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var DESCRIPTORS = __webpack_require__(5007);
var definePropertyModule = __webpack_require__(8503);
var createPropertyDescriptor = __webpack_require__(4238);

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),

/***/ 4238:
/***/ ((module) => {

"use strict";

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),

/***/ 3003:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var toPropertyKey = __webpack_require__(3164);
var definePropertyModule = __webpack_require__(8503);
var createPropertyDescriptor = __webpack_require__(4238);

module.exports = function (object, key, value) {
  var propertyKey = toPropertyKey(key);
  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  else object[propertyKey] = value;
};


/***/ }),

/***/ 916:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var isCallable = __webpack_require__(2539);
var definePropertyModule = __webpack_require__(8503);
var makeBuiltIn = __webpack_require__(6614);
var defineGlobalProperty = __webpack_require__(2136);

module.exports = function (O, key, value, options) {
  if (!options) options = {};
  var simple = options.enumerable;
  var name = options.name !== undefined ? options.name : key;
  if (isCallable(value)) makeBuiltIn(value, name, options);
  if (options.global) {
    if (simple) O[key] = value;
    else defineGlobalProperty(key, value);
  } else {
    try {
      if (!options.unsafe) delete O[key];
      else if (O[key]) simple = true;
    } catch (error) { /* empty */ }
    if (simple) O[key] = value;
    else definePropertyModule.f(O, key, {
      value: value,
      enumerable: false,
      configurable: !options.nonConfigurable,
      writable: !options.nonWritable
    });
  } return O;
};


/***/ }),

/***/ 2136:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);

// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;

module.exports = function (key, value) {
  try {
    defineProperty(global, key, { value: value, configurable: true, writable: true });
  } catch (error) {
    global[key] = value;
  } return value;
};


/***/ }),

/***/ 5007:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var fails = __webpack_require__(5202);

// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
});


/***/ }),

/***/ 8629:
/***/ ((module) => {

"use strict";

var documentAll = typeof document == 'object' && document.all;

// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;

module.exports = {
  all: documentAll,
  IS_HTMLDDA: IS_HTMLDDA
};


/***/ }),

/***/ 2215:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);
var isObject = __webpack_require__(3988);

var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};


/***/ }),

/***/ 932:
/***/ ((module) => {

"use strict";

module.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';


/***/ }),

/***/ 7626:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);
var userAgent = __webpack_require__(932);

var process = global.process;
var Deno = global.Deno;
var versions = process && process.versions || Deno && Deno.version;
var v8 = versions && versions.v8;
var match, version;

if (v8) {
  match = v8.split('.');
  // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  // but their correct versions are not interesting for us
  version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
}

// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
// so check `userAgent` even if `.v8` exists, but 0
if (!version && userAgent) {
  match = userAgent.match(/Edge\/(\d+)/);
  if (!match || match[1] >= 74) {
    match = userAgent.match(/Chrome\/(\d+)/);
    if (match) version = +match[1];
  }
}

module.exports = version;


/***/ }),

/***/ 6731:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);
var uncurryThis = __webpack_require__(4038);

module.exports = function (CONSTRUCTOR, METHOD) {
  return uncurryThis(global[CONSTRUCTOR].prototype[METHOD]);
};


/***/ }),

/***/ 8552:
/***/ ((module) => {

"use strict";

// IE8- don't enum bug keys
module.exports = [
  'constructor',
  'hasOwnProperty',
  'isPrototypeOf',
  'propertyIsEnumerable',
  'toLocaleString',
  'toString',
  'valueOf'
];


/***/ }),

/***/ 2189:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);
var getOwnPropertyDescriptor = (__webpack_require__(3037).f);
var createNonEnumerableProperty = __webpack_require__(8868);
var defineBuiltIn = __webpack_require__(916);
var defineGlobalProperty = __webpack_require__(2136);
var copyConstructorProperties = __webpack_require__(1358);
var isForced = __webpack_require__(3455);

/*
  options.target         - name of the target object
  options.global         - target is the global object
  options.stat           - export as static methods of target
  options.proto          - export as prototype methods of target
  options.real           - real prototype method for the `pure` version
  options.forced         - export even if the native feature is available
  options.bind           - bind methods to the target, required for the `pure` version
  options.wrap           - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe         - use the simple assignment of property instead of delete + defineProperty
  options.sham           - add a flag to not completely full polyfills
  options.enumerable     - export as enumerable property
  options.dontCallGetSet - prevent calling a getter on target
  options.name           - the .name of the function if it does not match the key
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  if (GLOBAL) {
    target = global;
  } else if (STATIC) {
    target = global[TARGET] || defineGlobalProperty(TARGET, {});
  } else {
    target = (global[TARGET] || {}).prototype;
  }
  if (target) for (key in source) {
    sourceProperty = source[key];
    if (options.dontCallGetSet) {
      descriptor = getOwnPropertyDescriptor(target, key);
      targetProperty = descriptor && descriptor.value;
    } else targetProperty = target[key];
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contained in target
    if (!FORCED && targetProperty !== undefined) {
      if (typeof sourceProperty == typeof targetProperty) continue;
      copyConstructorProperties(sourceProperty, targetProperty);
    }
    // add a flag to not completely full polyfills
    if (options.sham || (targetProperty && targetProperty.sham)) {
      createNonEnumerableProperty(sourceProperty, 'sham', true);
    }
    defineBuiltIn(target, key, sourceProperty, options);
  }
};


/***/ }),

/***/ 5202:
/***/ ((module) => {

"use strict";

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};


/***/ }),

/***/ 9794:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(6192);
var aCallable = __webpack_require__(6324);
var NATIVE_BIND = __webpack_require__(2865);

var bind = uncurryThis(uncurryThis.bind);

// optional / simple context binding
module.exports = function (fn, that) {
  aCallable(fn);
  return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),

/***/ 2865:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var fails = __webpack_require__(5202);

module.exports = !fails(function () {
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
  var test = (function () { /* empty */ }).bind();
  // eslint-disable-next-line no-prototype-builtins -- safe
  return typeof test != 'function' || test.hasOwnProperty('prototype');
});


/***/ }),

/***/ 2977:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var NATIVE_BIND = __webpack_require__(2865);

var call = Function.prototype.call;

module.exports = NATIVE_BIND ? call.bind(call) : function () {
  return call.apply(call, arguments);
};


/***/ }),

/***/ 9895:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var DESCRIPTORS = __webpack_require__(5007);
var hasOwn = __webpack_require__(2623);

var FunctionPrototype = Function.prototype;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;

var EXISTS = hasOwn(FunctionPrototype, 'name');
// additional protection from minified / mangled / dropped function names
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));

module.exports = {
  EXISTS: EXISTS,
  PROPER: PROPER,
  CONFIGURABLE: CONFIGURABLE
};


/***/ }),

/***/ 6589:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);
var aCallable = __webpack_require__(6324);

module.exports = function (object, key, method) {
  try {
    // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
    return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
  } catch (error) { /* empty */ }
};


/***/ }),

/***/ 6192:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var classofRaw = __webpack_require__(4545);
var uncurryThis = __webpack_require__(4038);

module.exports = function (fn) {
  // Nashorn bug:
  //   https://github.com/zloirock/core-js/issues/1128
  //   https://github.com/zloirock/core-js/issues/1130
  if (classofRaw(fn) === 'Function') return uncurryThis(fn);
};


/***/ }),

/***/ 4038:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var NATIVE_BIND = __webpack_require__(2865);

var FunctionPrototype = Function.prototype;
var call = FunctionPrototype.call;
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);

module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  return function () {
    return call.apply(fn, arguments);
  };
};


/***/ }),

/***/ 7300:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);
var isCallable = __webpack_require__(2539);

var aFunction = function (argument) {
  return isCallable(argument) ? argument : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
};


/***/ }),

/***/ 7874:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var classof = __webpack_require__(2702);
var getMethod = __webpack_require__(3923);
var isNullOrUndefined = __webpack_require__(2219);
var Iterators = __webpack_require__(7817);
var wellKnownSymbol = __webpack_require__(5485);

var ITERATOR = wellKnownSymbol('iterator');

module.exports = function (it) {
  if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
    || getMethod(it, '@@iterator')
    || Iterators[classof(it)];
};


/***/ }),

/***/ 2387:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var call = __webpack_require__(2977);
var aCallable = __webpack_require__(6324);
var anObject = __webpack_require__(8874);
var tryToString = __webpack_require__(7471);
var getIteratorMethod = __webpack_require__(7874);

var $TypeError = TypeError;

module.exports = function (argument, usingIterator) {
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
  if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
  throw new $TypeError(tryToString(argument) + ' is not iterable');
};


/***/ }),

/***/ 3923:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var aCallable = __webpack_require__(6324);
var isNullOrUndefined = __webpack_require__(2219);

// `GetMethod` abstract operation
// https://tc39.es/ecma262/#sec-getmethod
module.exports = function (V, P) {
  var func = V[P];
  return isNullOrUndefined(func) ? undefined : aCallable(func);
};


/***/ }),

/***/ 730:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var check = function (it) {
  return it && it.Math === Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  // eslint-disable-next-line es/no-global-this -- safe
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof window == 'object' && window) ||
  // eslint-disable-next-line no-restricted-globals -- safe
  check(typeof self == 'object' && self) ||
  check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||
  check(typeof this == 'object' && this) ||
  // eslint-disable-next-line no-new-func -- fallback
  (function () { return this; })() || Function('return this')();


/***/ }),

/***/ 2623:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);
var toObject = __webpack_require__(6015);

var hasOwnProperty = uncurryThis({}.hasOwnProperty);

// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
// eslint-disable-next-line es/no-object-hasown -- safe
module.exports = Object.hasOwn || function hasOwn(it, key) {
  return hasOwnProperty(toObject(it), key);
};


/***/ }),

/***/ 7467:
/***/ ((module) => {

"use strict";

module.exports = {};


/***/ }),

/***/ 845:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var getBuiltIn = __webpack_require__(7300);

module.exports = getBuiltIn('document', 'documentElement');


/***/ }),

/***/ 2470:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var DESCRIPTORS = __webpack_require__(5007);
var fails = __webpack_require__(5202);
var createElement = __webpack_require__(2215);

// Thanks to IE8 for its funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a !== 7;
});


/***/ }),

/***/ 6854:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);
var fails = __webpack_require__(5202);
var classof = __webpack_require__(4545);

var $Object = Object;
var split = uncurryThis(''.split);

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins -- safe
  return !$Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) === 'String' ? split(it, '') : $Object(it);
} : $Object;


/***/ }),

/***/ 7821:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);
var isCallable = __webpack_require__(2539);
var store = __webpack_require__(6838);

var functionToString = uncurryThis(Function.toString);

// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
if (!isCallable(store.inspectSource)) {
  store.inspectSource = function (it) {
    return functionToString(it);
  };
}

module.exports = store.inspectSource;


/***/ }),

/***/ 5378:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var NATIVE_WEAK_MAP = __webpack_require__(2543);
var global = __webpack_require__(730);
var isObject = __webpack_require__(3988);
var createNonEnumerableProperty = __webpack_require__(8868);
var hasOwn = __webpack_require__(2623);
var shared = __webpack_require__(6838);
var sharedKey = __webpack_require__(3511);
var hiddenKeys = __webpack_require__(7467);

var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var TypeError = global.TypeError;
var WeakMap = global.WeakMap;
var set, get, has;

var enforce = function (it) {
  return has(it) ? get(it) : set(it, {});
};

var getterFor = function (TYPE) {
  return function (it) {
    var state;
    if (!isObject(it) || (state = get(it)).type !== TYPE) {
      throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
    } return state;
  };
};

if (NATIVE_WEAK_MAP || shared.state) {
  var store = shared.state || (shared.state = new WeakMap());
  /* eslint-disable no-self-assign -- prototype methods protection */
  store.get = store.get;
  store.has = store.has;
  store.set = store.set;
  /* eslint-enable no-self-assign -- prototype methods protection */
  set = function (it, metadata) {
    if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
    metadata.facade = it;
    store.set(it, metadata);
    return metadata;
  };
  get = function (it) {
    return store.get(it) || {};
  };
  has = function (it) {
    return store.has(it);
  };
} else {
  var STATE = sharedKey('state');
  hiddenKeys[STATE] = true;
  set = function (it, metadata) {
    if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
    metadata.facade = it;
    createNonEnumerableProperty(it, STATE, metadata);
    return metadata;
  };
  get = function (it) {
    return hasOwn(it, STATE) ? it[STATE] : {};
  };
  has = function (it) {
    return hasOwn(it, STATE);
  };
}

module.exports = {
  set: set,
  get: get,
  has: has,
  enforce: enforce,
  getterFor: getterFor
};


/***/ }),

/***/ 7024:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var wellKnownSymbol = __webpack_require__(5485);
var Iterators = __webpack_require__(7817);

var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;

// check on default Array iterator
module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};


/***/ }),

/***/ 2539:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var $documentAll = __webpack_require__(8629);

var documentAll = $documentAll.all;

// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
module.exports = $documentAll.IS_HTMLDDA ? function (argument) {
  return typeof argument == 'function' || argument === documentAll;
} : function (argument) {
  return typeof argument == 'function';
};


/***/ }),

/***/ 6467:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);
var fails = __webpack_require__(5202);
var isCallable = __webpack_require__(2539);
var classof = __webpack_require__(2702);
var getBuiltIn = __webpack_require__(7300);
var inspectSource = __webpack_require__(7821);

var noop = function () { /* empty */ };
var empty = [];
var construct = getBuiltIn('Reflect', 'construct');
var constructorRegExp = /^\s*(?:class|function)\b/;
var exec = uncurryThis(constructorRegExp.exec);
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);

var isConstructorModern = function isConstructor(argument) {
  if (!isCallable(argument)) return false;
  try {
    construct(noop, empty, argument);
    return true;
  } catch (error) {
    return false;
  }
};

var isConstructorLegacy = function isConstructor(argument) {
  if (!isCallable(argument)) return false;
  switch (classof(argument)) {
    case 'AsyncFunction':
    case 'GeneratorFunction':
    case 'AsyncGeneratorFunction': return false;
  }
  try {
    // we can't check .prototype since constructors produced by .bind haven't it
    // `Function#toString` throws on some built-it function in some legacy engines
    // (for example, `DOMQuad` and similar in FF41-)
    return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  } catch (error) {
    return true;
  }
};

isConstructorLegacy.sham = true;

// `IsConstructor` abstract operation
// https://tc39.es/ecma262/#sec-isconstructor
module.exports = !construct || fails(function () {
  var called;
  return isConstructorModern(isConstructorModern.call)
    || !isConstructorModern(Object)
    || !isConstructorModern(function () { called = true; })
    || called;
}) ? isConstructorLegacy : isConstructorModern;


/***/ }),

/***/ 3455:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var fails = __webpack_require__(5202);
var isCallable = __webpack_require__(2539);

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value === POLYFILL ? true
    : value === NATIVE ? false
    : isCallable(detection) ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;


/***/ }),

/***/ 2219:
/***/ ((module) => {

"use strict";

// we can't use just `it == null` since of `document.all` special case
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
module.exports = function (it) {
  return it === null || it === undefined;
};


/***/ }),

/***/ 3988:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var isCallable = __webpack_require__(2539);
var $documentAll = __webpack_require__(8629);

var documentAll = $documentAll.all;

module.exports = $documentAll.IS_HTMLDDA ? function (it) {
  return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;
} : function (it) {
  return typeof it == 'object' ? it !== null : isCallable(it);
};


/***/ }),

/***/ 4708:
/***/ ((module) => {

"use strict";

module.exports = false;


/***/ }),

/***/ 184:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var isObject = __webpack_require__(3988);
var classof = __webpack_require__(4545);
var wellKnownSymbol = __webpack_require__(5485);

var MATCH = wellKnownSymbol('match');

// `IsRegExp` abstract operation
// https://tc39.es/ecma262/#sec-isregexp
module.exports = function (it) {
  var isRegExp;
  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
};


/***/ }),

/***/ 8820:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var getBuiltIn = __webpack_require__(7300);
var isCallable = __webpack_require__(2539);
var isPrototypeOf = __webpack_require__(7676);
var USE_SYMBOL_AS_UID = __webpack_require__(3713);

var $Object = Object;

module.exports = USE_SYMBOL_AS_UID ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  var $Symbol = getBuiltIn('Symbol');
  return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
};


/***/ }),

/***/ 8880:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var call = __webpack_require__(2977);
var anObject = __webpack_require__(8874);
var getMethod = __webpack_require__(3923);

module.exports = function (iterator, kind, value) {
  var innerResult, innerError;
  anObject(iterator);
  try {
    innerResult = getMethod(iterator, 'return');
    if (!innerResult) {
      if (kind === 'throw') throw value;
      return value;
    }
    innerResult = call(innerResult, iterator);
  } catch (error) {
    innerError = true;
    innerResult = error;
  }
  if (kind === 'throw') throw value;
  if (innerError) throw innerResult;
  anObject(innerResult);
  return value;
};


/***/ }),

/***/ 3450:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var IteratorPrototype = (__webpack_require__(344).IteratorPrototype);
var create = __webpack_require__(3830);
var createPropertyDescriptor = __webpack_require__(4238);
var setToStringTag = __webpack_require__(3506);
var Iterators = __webpack_require__(7817);

var returnThis = function () { return this; };

module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
  var TO_STRING_TAG = NAME + ' Iterator';
  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  Iterators[TO_STRING_TAG] = returnThis;
  return IteratorConstructor;
};


/***/ }),

/***/ 3174:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var $ = __webpack_require__(2189);
var call = __webpack_require__(2977);
var IS_PURE = __webpack_require__(4708);
var FunctionName = __webpack_require__(9895);
var isCallable = __webpack_require__(2539);
var createIteratorConstructor = __webpack_require__(3450);
var getPrototypeOf = __webpack_require__(8059);
var setPrototypeOf = __webpack_require__(5502);
var setToStringTag = __webpack_require__(3506);
var createNonEnumerableProperty = __webpack_require__(8868);
var defineBuiltIn = __webpack_require__(916);
var wellKnownSymbol = __webpack_require__(5485);
var Iterators = __webpack_require__(7817);
var IteratorsCore = __webpack_require__(344);

var PROPER_FUNCTION_NAME = FunctionName.PROPER;
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';

var returnThis = function () { return this; };

module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  createIteratorConstructor(IteratorConstructor, NAME, next);

  var getIterationMethod = function (KIND) {
    if (KIND === DEFAULT && defaultIterator) return defaultIterator;
    if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];

    switch (KIND) {
      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
    }

    return function () { return new IteratorConstructor(this); };
  };

  var TO_STRING_TAG = NAME + ' Iterator';
  var INCORRECT_VALUES_NAME = false;
  var IterablePrototype = Iterable.prototype;
  var nativeIterator = IterablePrototype[ITERATOR]
    || IterablePrototype['@@iterator']
    || DEFAULT && IterablePrototype[DEFAULT];
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  var CurrentIteratorPrototype, methods, KEY;

  // fix native
  if (anyNativeIterator) {
    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
    if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
        if (setPrototypeOf) {
          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
        } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
          defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);
        }
      }
      // Set @@toStringTag to native iterators
      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
    }
  }

  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
  if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
    if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
      createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
    } else {
      INCORRECT_VALUES_NAME = true;
      defaultIterator = function values() { return call(nativeIterator, this); };
    }
  }

  // export additional methods
  if (DEFAULT) {
    methods = {
      values: getIterationMethod(VALUES),
      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
      entries: getIterationMethod(ENTRIES)
    };
    if (FORCED) for (KEY in methods) {
      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
        defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
      }
    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  }

  // define iterator
  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
    defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });
  }
  Iterators[NAME] = defaultIterator;

  return methods;
};


/***/ }),

/***/ 344:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var fails = __webpack_require__(5202);
var isCallable = __webpack_require__(2539);
var isObject = __webpack_require__(3988);
var create = __webpack_require__(3830);
var getPrototypeOf = __webpack_require__(8059);
var defineBuiltIn = __webpack_require__(916);
var wellKnownSymbol = __webpack_require__(5485);
var IS_PURE = __webpack_require__(4708);

var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;

// `%IteratorPrototype%` object
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;

/* eslint-disable es/no-array-prototype-keys -- safe */
if ([].keys) {
  arrayIterator = [].keys();
  // Safari 8 has buggy iterators w/o `next`
  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  else {
    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  }
}

var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {
  var test = {};
  // FF44- legacy iterators case
  return IteratorPrototype[ITERATOR].call(test) !== test;
});

if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
else if (IS_PURE) IteratorPrototype = create(IteratorPrototype);

// `%IteratorPrototype%[@@iterator]()` method
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
if (!isCallable(IteratorPrototype[ITERATOR])) {
  defineBuiltIn(IteratorPrototype, ITERATOR, function () {
    return this;
  });
}

module.exports = {
  IteratorPrototype: IteratorPrototype,
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};


/***/ }),

/***/ 7817:
/***/ ((module) => {

"use strict";

module.exports = {};


/***/ }),

/***/ 3235:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var toLength = __webpack_require__(3627);

// `LengthOfArrayLike` abstract operation
// https://tc39.es/ecma262/#sec-lengthofarraylike
module.exports = function (obj) {
  return toLength(obj.length);
};


/***/ }),

/***/ 6614:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);
var fails = __webpack_require__(5202);
var isCallable = __webpack_require__(2539);
var hasOwn = __webpack_require__(2623);
var DESCRIPTORS = __webpack_require__(5007);
var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(9895).CONFIGURABLE);
var inspectSource = __webpack_require__(7821);
var InternalStateModule = __webpack_require__(5378);

var enforceInternalState = InternalStateModule.enforce;
var getInternalState = InternalStateModule.get;
var $String = String;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
var stringSlice = uncurryThis(''.slice);
var replace = uncurryThis(''.replace);
var join = uncurryThis([].join);

var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
});

var TEMPLATE = String(String).split('String');

var makeBuiltIn = module.exports = function (value, name, options) {
  if (stringSlice($String(name), 0, 7) === 'Symbol(') {
    name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
  }
  if (options && options.getter) name = 'get ' + name;
  if (options && options.setter) name = 'set ' + name;
  if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
    if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
    else value.name = name;
  }
  if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
    defineProperty(value, 'length', { value: options.arity });
  }
  try {
    if (options && hasOwn(options, 'constructor') && options.constructor) {
      if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
    // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
    } else if (value.prototype) value.prototype = undefined;
  } catch (error) { /* empty */ }
  var state = enforceInternalState(value);
  if (!hasOwn(state, 'source')) {
    state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  } return value;
};

// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
// eslint-disable-next-line no-extend-native -- required
Function.prototype.toString = makeBuiltIn(function toString() {
  return isCallable(this) && getInternalState(this).source || inspectSource(this);
}, 'toString');


/***/ }),

/***/ 3041:
/***/ ((module) => {

"use strict";

var ceil = Math.ceil;
var floor = Math.floor;

// `Math.trunc` method
// https://tc39.es/ecma262/#sec-math.trunc
// eslint-disable-next-line es/no-math-trunc -- safe
module.exports = Math.trunc || function trunc(x) {
  var n = +x;
  return (n > 0 ? floor : ceil)(n);
};


/***/ }),

/***/ 50:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var isRegExp = __webpack_require__(184);

var $TypeError = TypeError;

module.exports = function (it) {
  if (isRegExp(it)) {
    throw new $TypeError("The method doesn't accept regular expressions");
  } return it;
};


/***/ }),

/***/ 3830:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

/* global ActiveXObject -- old IE, WSH */
var anObject = __webpack_require__(8874);
var definePropertiesModule = __webpack_require__(3944);
var enumBugKeys = __webpack_require__(8552);
var hiddenKeys = __webpack_require__(7467);
var html = __webpack_require__(845);
var documentCreateElement = __webpack_require__(2215);
var sharedKey = __webpack_require__(3511);

var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');

var EmptyConstructor = function () { /* empty */ };

var scriptTag = function (content) {
  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};

// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
  activeXDocument.write(scriptTag(''));
  activeXDocument.close();
  var temp = activeXDocument.parentWindow.Object;
  activeXDocument = null; // avoid memory leak
  return temp;
};

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = documentCreateElement('iframe');
  var JS = 'java' + SCRIPT + ':';
  var iframeDocument;
  iframe.style.display = 'none';
  html.appendChild(iframe);
  // https://github.com/zloirock/core-js/issues/475
  iframe.src = String(JS);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(scriptTag('document.F=Object'));
  iframeDocument.close();
  return iframeDocument.F;
};

// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
  try {
    activeXDocument = new ActiveXObject('htmlfile');
  } catch (error) { /* ignore */ }
  NullProtoObject = typeof document != 'undefined'
    ? document.domain && activeXDocument
      ? NullProtoObjectViaActiveX(activeXDocument) // old IE
      : NullProtoObjectViaIFrame()
    : NullProtoObjectViaActiveX(activeXDocument); // WSH
  var length = enumBugKeys.length;
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  return NullProtoObject();
};

hiddenKeys[IE_PROTO] = true;

// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
// eslint-disable-next-line es/no-object-create -- safe
module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    EmptyConstructor[PROTOTYPE] = anObject(O);
    result = new EmptyConstructor();
    EmptyConstructor[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = NullProtoObject();
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
};


/***/ }),

/***/ 3944:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

var DESCRIPTORS = __webpack_require__(5007);
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(2268);
var definePropertyModule = __webpack_require__(8503);
var anObject = __webpack_require__(8874);
var toIndexedObject = __webpack_require__(7625);
var objectKeys = __webpack_require__(4254);

// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
// eslint-disable-next-line es/no-object-defineproperties -- safe
exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var props = toIndexedObject(Properties);
  var keys = objectKeys(Properties);
  var length = keys.length;
  var index = 0;
  var key;
  while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  return O;
};


/***/ }),

/***/ 8503:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

var DESCRIPTORS = __webpack_require__(5007);
var IE8_DOM_DEFINE = __webpack_require__(2470);
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(2268);
var anObject = __webpack_require__(8874);
var toPropertyKey = __webpack_require__(3164);

var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var ENUMERABLE = 'enumerable';
var CONFIGURABLE = 'configurable';
var WRITABLE = 'writable';

// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPropertyKey(P);
  anObject(Attributes);
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
    var current = $getOwnPropertyDescriptor(O, P);
    if (current && current[WRITABLE]) {
      O[P] = Attributes.value;
      Attributes = {
        configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
        enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
        writable: false
      };
    }
  } return $defineProperty(O, P, Attributes);
} : $defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPropertyKey(P);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return $defineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),

/***/ 3037:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

var DESCRIPTORS = __webpack_require__(5007);
var call = __webpack_require__(2977);
var propertyIsEnumerableModule = __webpack_require__(6251);
var createPropertyDescriptor = __webpack_require__(4238);
var toIndexedObject = __webpack_require__(7625);
var toPropertyKey = __webpack_require__(3164);
var hasOwn = __webpack_require__(2623);
var IE8_DOM_DEFINE = __webpack_require__(2470);

// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPropertyKey(P);
  if (IE8_DOM_DEFINE) try {
    return $getOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
};


/***/ }),

/***/ 5974:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

var internalObjectKeys = __webpack_require__(7862);
var enumBugKeys = __webpack_require__(8552);

var hiddenKeys = enumBugKeys.concat('length', 'prototype');

// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return internalObjectKeys(O, hiddenKeys);
};


/***/ }),

/***/ 1526:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
exports.f = Object.getOwnPropertySymbols;


/***/ }),

/***/ 8059:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var hasOwn = __webpack_require__(2623);
var isCallable = __webpack_require__(2539);
var toObject = __webpack_require__(6015);
var sharedKey = __webpack_require__(3511);
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(6141);

var IE_PROTO = sharedKey('IE_PROTO');
var $Object = Object;
var ObjectPrototype = $Object.prototype;

// `Object.getPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.getprototypeof
// eslint-disable-next-line es/no-object-getprototypeof -- safe
module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
  var object = toObject(O);
  if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
  var constructor = object.constructor;
  if (isCallable(constructor) && object instanceof constructor) {
    return constructor.prototype;
  } return object instanceof $Object ? ObjectPrototype : null;
};


/***/ }),

/***/ 7676:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);

module.exports = uncurryThis({}.isPrototypeOf);


/***/ }),

/***/ 7862:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);
var hasOwn = __webpack_require__(2623);
var toIndexedObject = __webpack_require__(7625);
var indexOf = (__webpack_require__(5644).indexOf);
var hiddenKeys = __webpack_require__(7467);

var push = uncurryThis([].push);

module.exports = function (object, names) {
  var O = toIndexedObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (hasOwn(O, key = names[i++])) {
    ~indexOf(result, key) || push(result, key);
  }
  return result;
};


/***/ }),

/***/ 4254:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var internalObjectKeys = __webpack_require__(7862);
var enumBugKeys = __webpack_require__(8552);

// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
// eslint-disable-next-line es/no-object-keys -- safe
module.exports = Object.keys || function keys(O) {
  return internalObjectKeys(O, enumBugKeys);
};


/***/ }),

/***/ 6251:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

var $propertyIsEnumerable = {}.propertyIsEnumerable;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : $propertyIsEnumerable;


/***/ }),

/***/ 5502:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

/* eslint-disable no-proto -- safe */
var uncurryThisAccessor = __webpack_require__(6589);
var anObject = __webpack_require__(8874);
var aPossiblePrototype = __webpack_require__(2162);

// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
// eslint-disable-next-line es/no-object-setprototypeof -- safe
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
    setter(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    anObject(O);
    aPossiblePrototype(proto);
    if (CORRECT_SETTER) setter(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);


/***/ }),

/***/ 7830:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var DESCRIPTORS = __webpack_require__(5007);
var fails = __webpack_require__(5202);
var uncurryThis = __webpack_require__(4038);
var objectGetPrototypeOf = __webpack_require__(8059);
var objectKeys = __webpack_require__(4254);
var toIndexedObject = __webpack_require__(7625);
var $propertyIsEnumerable = (__webpack_require__(6251).f);

var propertyIsEnumerable = uncurryThis($propertyIsEnumerable);
var push = uncurryThis([].push);

// in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys
// of `null` prototype objects
var IE_BUG = DESCRIPTORS && fails(function () {
  // eslint-disable-next-line es/no-object-create -- safe
  var O = Object.create(null);
  O[2] = 2;
  return !propertyIsEnumerable(O, 2);
});

// `Object.{ entries, values }` methods implementation
var createMethod = function (TO_ENTRIES) {
  return function (it) {
    var O = toIndexedObject(it);
    var keys = objectKeys(O);
    var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;
    var length = keys.length;
    var i = 0;
    var result = [];
    var key;
    while (length > i) {
      key = keys[i++];
      if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {
        push(result, TO_ENTRIES ? [key, O[key]] : O[key]);
      }
    }
    return result;
  };
};

module.exports = {
  // `Object.entries` method
  // https://tc39.es/ecma262/#sec-object.entries
  entries: createMethod(true),
  // `Object.values` method
  // https://tc39.es/ecma262/#sec-object.values
  values: createMethod(false)
};


/***/ }),

/***/ 532:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var call = __webpack_require__(2977);
var isCallable = __webpack_require__(2539);
var isObject = __webpack_require__(3988);

var $TypeError = TypeError;

// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
module.exports = function (input, pref) {
  var fn, val;
  if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  throw new $TypeError("Can't convert object to primitive value");
};


/***/ }),

/***/ 3054:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var getBuiltIn = __webpack_require__(7300);
var uncurryThis = __webpack_require__(4038);
var getOwnPropertyNamesModule = __webpack_require__(5974);
var getOwnPropertySymbolsModule = __webpack_require__(1526);
var anObject = __webpack_require__(8874);

var concat = uncurryThis([].concat);

// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  var keys = getOwnPropertyNamesModule.f(anObject(it));
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
};


/***/ }),

/***/ 577:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);

module.exports = global;


/***/ }),

/***/ 6373:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var isNullOrUndefined = __webpack_require__(2219);

var $TypeError = TypeError;

// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
  return it;
};


/***/ }),

/***/ 3506:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var defineProperty = (__webpack_require__(8503).f);
var hasOwn = __webpack_require__(2623);
var wellKnownSymbol = __webpack_require__(5485);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');

module.exports = function (target, TAG, STATIC) {
  if (target && !STATIC) target = target.prototype;
  if (target && !hasOwn(target, TO_STRING_TAG)) {
    defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
  }
};


/***/ }),

/***/ 3511:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var shared = __webpack_require__(6568);
var uid = __webpack_require__(2858);

var keys = shared('keys');

module.exports = function (key) {
  return keys[key] || (keys[key] = uid(key));
};


/***/ }),

/***/ 6838:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);
var defineGlobalProperty = __webpack_require__(2136);

var SHARED = '__core-js_shared__';
var store = global[SHARED] || defineGlobalProperty(SHARED, {});

module.exports = store;


/***/ }),

/***/ 6568:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var IS_PURE = __webpack_require__(4708);
var store = __webpack_require__(6838);

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: '3.34.0',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
  license: 'https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE',
  source: 'https://github.com/zloirock/core-js'
});


/***/ }),

/***/ 6365:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);
var toIntegerOrInfinity = __webpack_require__(3550);
var toString = __webpack_require__(2532);
var requireObjectCoercible = __webpack_require__(6373);

var charAt = uncurryThis(''.charAt);
var charCodeAt = uncurryThis(''.charCodeAt);
var stringSlice = uncurryThis(''.slice);

var createMethod = function (CONVERT_TO_STRING) {
  return function ($this, pos) {
    var S = toString(requireObjectCoercible($this));
    var position = toIntegerOrInfinity(pos);
    var size = S.length;
    var first, second;
    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
    first = charCodeAt(S, position);
    return first < 0xD800 || first > 0xDBFF || position + 1 === size
      || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
        ? CONVERT_TO_STRING
          ? charAt(S, position)
          : first
        : CONVERT_TO_STRING
          ? stringSlice(S, position, position + 2)
          : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  };
};

module.exports = {
  // `String.prototype.codePointAt` method
  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  codeAt: createMethod(false),
  // `String.prototype.at` method
  // https://github.com/mathiasbynens/String.prototype.at
  charAt: createMethod(true)
};


/***/ }),

/***/ 3370:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__(7626);
var fails = __webpack_require__(5202);
var global = __webpack_require__(730);

var $String = global.String;

// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  var symbol = Symbol('symbol detection');
  // Chrome 38 Symbol has incorrect toString conversion
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  // of course, fail.
  return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
    !Symbol.sham && V8_VERSION && V8_VERSION < 41;
});


/***/ }),

/***/ 7234:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var toIntegerOrInfinity = __webpack_require__(3550);

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
  var integer = toIntegerOrInfinity(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};


/***/ }),

/***/ 7625:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(6854);
var requireObjectCoercible = __webpack_require__(6373);

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};


/***/ }),

/***/ 3550:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var trunc = __webpack_require__(3041);

// `ToIntegerOrInfinity` abstract operation
// https://tc39.es/ecma262/#sec-tointegerorinfinity
module.exports = function (argument) {
  var number = +argument;
  // eslint-disable-next-line no-self-compare -- NaN check
  return number !== number || number === 0 ? 0 : trunc(number);
};


/***/ }),

/***/ 3627:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var toIntegerOrInfinity = __webpack_require__(3550);

var min = Math.min;

// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
  return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};


/***/ }),

/***/ 6015:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var requireObjectCoercible = __webpack_require__(6373);

var $Object = Object;

// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
  return $Object(requireObjectCoercible(argument));
};


/***/ }),

/***/ 634:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var call = __webpack_require__(2977);
var isObject = __webpack_require__(3988);
var isSymbol = __webpack_require__(8820);
var getMethod = __webpack_require__(3923);
var ordinaryToPrimitive = __webpack_require__(532);
var wellKnownSymbol = __webpack_require__(5485);

var $TypeError = TypeError;
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');

// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
module.exports = function (input, pref) {
  if (!isObject(input) || isSymbol(input)) return input;
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  var result;
  if (exoticToPrim) {
    if (pref === undefined) pref = 'default';
    result = call(exoticToPrim, input, pref);
    if (!isObject(result) || isSymbol(result)) return result;
    throw new $TypeError("Can't convert object to primitive value");
  }
  if (pref === undefined) pref = 'number';
  return ordinaryToPrimitive(input, pref);
};


/***/ }),

/***/ 3164:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var toPrimitive = __webpack_require__(634);
var isSymbol = __webpack_require__(8820);

// `ToPropertyKey` abstract operation
// https://tc39.es/ecma262/#sec-topropertykey
module.exports = function (argument) {
  var key = toPrimitive(argument, 'string');
  return isSymbol(key) ? key : key + '';
};


/***/ }),

/***/ 1923:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var wellKnownSymbol = __webpack_require__(5485);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};

test[TO_STRING_TAG] = 'z';

module.exports = String(test) === '[object z]';


/***/ }),

/***/ 2532:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var classof = __webpack_require__(2702);

var $String = String;

module.exports = function (argument) {
  if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  return $String(argument);
};


/***/ }),

/***/ 7471:
/***/ ((module) => {

"use strict";

var $String = String;

module.exports = function (argument) {
  try {
    return $String(argument);
  } catch (error) {
    return 'Object';
  }
};


/***/ }),

/***/ 2858:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var uncurryThis = __webpack_require__(4038);

var id = 0;
var postfix = Math.random();
var toString = uncurryThis(1.0.toString);

module.exports = function (key) {
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
};


/***/ }),

/***/ 3713:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

/* eslint-disable es/no-symbol -- required for testing */
var NATIVE_SYMBOL = __webpack_require__(3370);

module.exports = NATIVE_SYMBOL
  && !Symbol.sham
  && typeof Symbol.iterator == 'symbol';


/***/ }),

/***/ 2268:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var DESCRIPTORS = __webpack_require__(5007);
var fails = __webpack_require__(5202);

// V8 ~ Chrome 36-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
module.exports = DESCRIPTORS && fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
    value: 42,
    writable: false
  }).prototype !== 42;
});


/***/ }),

/***/ 2543:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);
var isCallable = __webpack_require__(2539);

var WeakMap = global.WeakMap;

module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));


/***/ }),

/***/ 5485:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var global = __webpack_require__(730);
var shared = __webpack_require__(6568);
var hasOwn = __webpack_require__(2623);
var uid = __webpack_require__(2858);
var NATIVE_SYMBOL = __webpack_require__(3370);
var USE_SYMBOL_AS_UID = __webpack_require__(3713);

var Symbol = global.Symbol;
var WellKnownSymbolsStore = shared('wks');
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;

module.exports = function (name) {
  if (!hasOwn(WellKnownSymbolsStore, name)) {
    WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
      ? Symbol[name]
      : createWellKnownSymbol('Symbol.' + name);
  } return WellKnownSymbolsStore[name];
};


/***/ }),

/***/ 5445:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var $ = __webpack_require__(2189);
var fill = __webpack_require__(9236);
var addToUnscopables = __webpack_require__(2572);

// `Array.prototype.fill` method
// https://tc39.es/ecma262/#sec-array.prototype.fill
$({ target: 'Array', proto: true }, {
  fill: fill
});

// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('fill');


/***/ }),

/***/ 6272:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var $ = __webpack_require__(2189);
var from = __webpack_require__(8459);
var checkCorrectnessOfIteration = __webpack_require__(3346);

var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  // eslint-disable-next-line es/no-array-from -- required for testing
  Array.from(iterable);
});

// `Array.from` method
// https://tc39.es/ecma262/#sec-array.from
$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  from: from
});


/***/ }),

/***/ 2947:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var $ = __webpack_require__(2189);
var $values = (__webpack_require__(7830).values);

// `Object.values` method
// https://tc39.es/ecma262/#sec-object.values
$({ target: 'Object', stat: true }, {
  values: function values(O) {
    return $values(O);
  }
});


/***/ }),

/***/ 538:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var $ = __webpack_require__(2189);
var uncurryThis = __webpack_require__(6192);
var getOwnPropertyDescriptor = (__webpack_require__(3037).f);
var toLength = __webpack_require__(3627);
var toString = __webpack_require__(2532);
var notARegExp = __webpack_require__(50);
var requireObjectCoercible = __webpack_require__(6373);
var correctIsRegExpLogic = __webpack_require__(6775);
var IS_PURE = __webpack_require__(4708);

// eslint-disable-next-line es/no-string-prototype-endswith -- safe
var nativeEndsWith = uncurryThis(''.endsWith);
var slice = uncurryThis(''.slice);
var min = Math.min;

var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');
// https://github.com/zloirock/core-js/pull/702
var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
  var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');
  return descriptor && !descriptor.writable;
}();

// `String.prototype.endsWith` method
// https://tc39.es/ecma262/#sec-string.prototype.endswith
$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
  endsWith: function endsWith(searchString /* , endPosition = @length */) {
    var that = toString(requireObjectCoercible(this));
    notARegExp(searchString);
    var endPosition = arguments.length > 1 ? arguments[1] : undefined;
    var len = that.length;
    var end = endPosition === undefined ? len : min(toLength(endPosition), len);
    var search = toString(searchString);
    return nativeEndsWith
      ? nativeEndsWith(that, search, end)
      : slice(that, end - search.length, end) === search;
  }
});


/***/ }),

/***/ 9477:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var charAt = (__webpack_require__(6365).charAt);
var toString = __webpack_require__(2532);
var InternalStateModule = __webpack_require__(5378);
var defineIterator = __webpack_require__(3174);
var createIterResultObject = __webpack_require__(3585);

var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);

// `String.prototype[@@iterator]` method
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
defineIterator(String, 'String', function (iterated) {
  setInternalState(this, {
    type: STRING_ITERATOR,
    string: toString(iterated),
    index: 0
  });
// `%StringIteratorPrototype%.next` method
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
}, function next() {
  var state = getInternalState(this);
  var string = state.string;
  var index = state.index;
  var point;
  if (index >= string.length) return createIterResultObject(undefined, true);
  point = charAt(string, index);
  state.index += point.length;
  return createIterResultObject(point, false);
});


/***/ }),

/***/ 9731:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(2327);

module.exports = parent;


/***/ }),

/***/ 4401:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(3274);

module.exports = parent;


/***/ }),

/***/ 3661:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(5339);

module.exports = parent;


/***/ }),

/***/ 5606:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var parent = __webpack_require__(1189);

module.exports = parent;


/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			id: moduleId,
/******/ 			loaded: false,
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/global */
/******/ 	(() => {
/******/ 		__webpack_require__.g = (function() {
/******/ 			if (typeof globalThis === 'object') return globalThis;
/******/ 			try {
/******/ 				return this || new Function('return this')();
/******/ 			} catch (e) {
/******/ 				if (typeof window === 'object') return window;
/******/ 			}
/******/ 		})();
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/node module decorator */
/******/ 	(() => {
/******/ 		__webpack_require__.nmd = (module) => {
/******/ 			module.paths = [];
/******/ 			if (!module.children) module.children = [];
/******/ 			return module;
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": () => (/* binding */ quill)
});

// EXTERNAL MODULE: ./node_modules/core-js/features/array/from.js
var from = __webpack_require__(1019);
// EXTERNAL MODULE: ./node_modules/core-js/features/array/fill.js
var fill = __webpack_require__(5142);
// EXTERNAL MODULE: ./node_modules/core-js/features/object/values.js
var values = __webpack_require__(1183);
// EXTERNAL MODULE: ./node_modules/core-js/features/string/ends-with.js
var ends_with = __webpack_require__(2570);
;// CONCATENATED MODULE: ./polyfills.js
// IE11 support





// EXTERNAL MODULE: ./core.js
var core = __webpack_require__(2432);
// EXTERNAL MODULE: ./formats/align.js
var align = __webpack_require__(715);
// EXTERNAL MODULE: ./formats/direction.js
var direction = __webpack_require__(4048);
// EXTERNAL MODULE: ./node_modules/parchment/src/parchment.ts + 17 modules
var parchment = __webpack_require__(1233);
;// CONCATENATED MODULE: ./formats/indent.js
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var IndentAttributor = /*#__PURE__*/function (_ClassAttributor) {
  _inherits(IndentAttributor, _ClassAttributor);
  var _super = _createSuper(IndentAttributor);
  function IndentAttributor() {
    _classCallCheck(this, IndentAttributor);
    return _super.apply(this, arguments);
  }
  _createClass(IndentAttributor, [{
    key: "add",
    value: function add(node, value) {
      if (value === '+1' || value === '-1') {
        var indent = this.value(node) || 0;
        value = value === '+1' ? indent + 1 : indent - 1;
      }
      if (value === 0) {
        this.remove(node);
        return true;
      }
      return _get(_getPrototypeOf(IndentAttributor.prototype), "add", this).call(this, node, value);
    }
  }, {
    key: "canAdd",
    value: function canAdd(node, value) {
      return _get(_getPrototypeOf(IndentAttributor.prototype), "canAdd", this).call(this, node, value) || _get(_getPrototypeOf(IndentAttributor.prototype), "canAdd", this).call(this, node, parseInt(value, 10));
    }
  }, {
    key: "value",
    value: function value(node) {
      return parseInt(_get(_getPrototypeOf(IndentAttributor.prototype), "value", this).call(this, node), 10) || undefined; // Don't return NaN
    }
  }]);
  return IndentAttributor;
}(parchment.ClassAttributor);
var IndentClass = new IndentAttributor('indent', 'ql-indent', {
  scope: parchment.Scope.BLOCK,
  whitelist: [1, 2, 3, 4, 5, 6, 7, 8]
});
/* harmony default export */ const indent = (IndentClass);
// EXTERNAL MODULE: ./blots/block.js + 1 modules
var block = __webpack_require__(6446);
;// CONCATENATED MODULE: ./formats/blockquote.js
function blockquote_typeof(o) { "@babel/helpers - typeof"; return blockquote_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, blockquote_typeof(o); }
function blockquote_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, blockquote_toPropertyKey(descriptor.key), descriptor); } }
function blockquote_createClass(Constructor, protoProps, staticProps) { if (protoProps) blockquote_defineProperties(Constructor.prototype, protoProps); if (staticProps) blockquote_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function blockquote_toPropertyKey(arg) { var key = blockquote_toPrimitive(arg, "string"); return blockquote_typeof(key) === "symbol" ? key : String(key); }
function blockquote_toPrimitive(input, hint) { if (blockquote_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (blockquote_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function blockquote_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function blockquote_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) blockquote_setPrototypeOf(subClass, superClass); }
function blockquote_setPrototypeOf(o, p) { blockquote_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return blockquote_setPrototypeOf(o, p); }
function blockquote_createSuper(Derived) { var hasNativeReflectConstruct = blockquote_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = blockquote_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = blockquote_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return blockquote_possibleConstructorReturn(this, result); }; }
function blockquote_possibleConstructorReturn(self, call) { if (call && (blockquote_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return blockquote_assertThisInitialized(self); }
function blockquote_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function blockquote_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function blockquote_getPrototypeOf(o) { blockquote_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return blockquote_getPrototypeOf(o); }

var Blockquote = /*#__PURE__*/function (_Block) {
  blockquote_inherits(Blockquote, _Block);
  var _super = blockquote_createSuper(Blockquote);
  function Blockquote() {
    blockquote_classCallCheck(this, Blockquote);
    return _super.apply(this, arguments);
  }
  return blockquote_createClass(Blockquote);
}(block/* default */.ZP);
Blockquote.blotName = 'blockquote';
Blockquote.tagName = 'blockquote';
/* harmony default export */ const blockquote = (Blockquote);
;// CONCATENATED MODULE: ./formats/header.js
function header_typeof(o) { "@babel/helpers - typeof"; return header_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, header_typeof(o); }
function header_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function header_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, header_toPropertyKey(descriptor.key), descriptor); } }
function header_createClass(Constructor, protoProps, staticProps) { if (protoProps) header_defineProperties(Constructor.prototype, protoProps); if (staticProps) header_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function header_toPropertyKey(arg) { var key = header_toPrimitive(arg, "string"); return header_typeof(key) === "symbol" ? key : String(key); }
function header_toPrimitive(input, hint) { if (header_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (header_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function header_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) header_setPrototypeOf(subClass, superClass); }
function header_setPrototypeOf(o, p) { header_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return header_setPrototypeOf(o, p); }
function header_createSuper(Derived) { var hasNativeReflectConstruct = header_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = header_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = header_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return header_possibleConstructorReturn(this, result); }; }
function header_possibleConstructorReturn(self, call) { if (call && (header_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return header_assertThisInitialized(self); }
function header_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function header_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function header_getPrototypeOf(o) { header_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return header_getPrototypeOf(o); }

var Header = /*#__PURE__*/function (_Block) {
  header_inherits(Header, _Block);
  var _super = header_createSuper(Header);
  function Header() {
    header_classCallCheck(this, Header);
    return _super.apply(this, arguments);
  }
  header_createClass(Header, null, [{
    key: "formats",
    value: function formats(domNode) {
      return this.tagName.indexOf(domNode.tagName) + 1;
    }
  }]);
  return Header;
}(block/* default */.ZP);
Header.blotName = 'header';
Header.tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6'];
/* harmony default export */ const header = (Header);
// EXTERNAL MODULE: ./blots/container.js
var container = __webpack_require__(3553);
// EXTERNAL MODULE: ./core/quill.js
var core_quill = __webpack_require__(281);
;// CONCATENATED MODULE: ./formats/list.js
function list_typeof(o) { "@babel/helpers - typeof"; return list_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, list_typeof(o); }
function list_get() { if (typeof Reflect !== "undefined" && Reflect.get) { list_get = Reflect.get.bind(); } else { list_get = function _get(target, property, receiver) { var base = list_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return list_get.apply(this, arguments); }
function list_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = list_getPrototypeOf(object); if (object === null) break; } return object; }
function list_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, list_toPropertyKey(descriptor.key), descriptor); } }
function list_createClass(Constructor, protoProps, staticProps) { if (protoProps) list_defineProperties(Constructor.prototype, protoProps); if (staticProps) list_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function list_toPropertyKey(arg) { var key = list_toPrimitive(arg, "string"); return list_typeof(key) === "symbol" ? key : String(key); }
function list_toPrimitive(input, hint) { if (list_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (list_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function list_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function list_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) list_setPrototypeOf(subClass, superClass); }
function list_setPrototypeOf(o, p) { list_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return list_setPrototypeOf(o, p); }
function list_createSuper(Derived) { var hasNativeReflectConstruct = list_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = list_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = list_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return list_possibleConstructorReturn(this, result); }; }
function list_possibleConstructorReturn(self, call) { if (call && (list_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return list_assertThisInitialized(self); }
function list_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function list_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function list_getPrototypeOf(o) { list_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return list_getPrototypeOf(o); }



var ListContainer = /*#__PURE__*/function (_Container) {
  list_inherits(ListContainer, _Container);
  var _super = list_createSuper(ListContainer);
  function ListContainer() {
    list_classCallCheck(this, ListContainer);
    return _super.apply(this, arguments);
  }
  return list_createClass(ListContainer);
}(container/* default */.Z);
ListContainer.blotName = 'list-container';
ListContainer.tagName = 'OL';
var ListItem = /*#__PURE__*/function (_Block) {
  list_inherits(ListItem, _Block);
  var _super2 = list_createSuper(ListItem);
  function ListItem(scroll, domNode) {
    var _this;
    list_classCallCheck(this, ListItem);
    _this = _super2.call(this, scroll, domNode);
    var ui = domNode.ownerDocument.createElement('span');
    var listEventHandler = function listEventHandler(e) {
      if (!scroll.isEnabled()) return;
      var format = _this.statics.formats(domNode, scroll);
      if (format === 'checked') {
        _this.format('list', 'unchecked');
        e.preventDefault();
      } else if (format === 'unchecked') {
        _this.format('list', 'checked');
        e.preventDefault();
      }
    };
    ui.addEventListener('mousedown', listEventHandler);
    ui.addEventListener('touchstart', listEventHandler);
    _this.attachUI(ui);
    return _this;
  }
  list_createClass(ListItem, [{
    key: "format",
    value: function format(name, value) {
      if (name === this.statics.blotName && value) {
        this.domNode.setAttribute('data-list', value);
      } else {
        list_get(list_getPrototypeOf(ListItem.prototype), "format", this).call(this, name, value);
      }
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = list_get(list_getPrototypeOf(ListItem), "create", this).call(this);
      node.setAttribute('data-list', value);
      return node;
    }
  }, {
    key: "formats",
    value: function formats(domNode) {
      return domNode.getAttribute('data-list') || undefined;
    }
  }, {
    key: "register",
    value: function register() {
      core_quill/* default.register */.ZP.register(ListContainer);
    }
  }]);
  return ListItem;
}(block/* default */.ZP);
ListItem.blotName = 'list';
ListItem.tagName = 'LI';
ListContainer.allowedChildren = [ListItem];
ListItem.requiredContainer = ListContainer;

// eslint-disable-next-line no-restricted-exports

// EXTERNAL MODULE: ./formats/background.js
var background = __webpack_require__(7898);
// EXTERNAL MODULE: ./formats/color.js
var color = __webpack_require__(6039);
// EXTERNAL MODULE: ./formats/font.js
var font = __webpack_require__(5832);
// EXTERNAL MODULE: ./formats/size.js
var size = __webpack_require__(1629);
// EXTERNAL MODULE: ./formats/bold.js
var bold = __webpack_require__(3991);
;// CONCATENATED MODULE: ./formats/italic.js
function italic_typeof(o) { "@babel/helpers - typeof"; return italic_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, italic_typeof(o); }
function italic_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, italic_toPropertyKey(descriptor.key), descriptor); } }
function italic_createClass(Constructor, protoProps, staticProps) { if (protoProps) italic_defineProperties(Constructor.prototype, protoProps); if (staticProps) italic_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function italic_toPropertyKey(arg) { var key = italic_toPrimitive(arg, "string"); return italic_typeof(key) === "symbol" ? key : String(key); }
function italic_toPrimitive(input, hint) { if (italic_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (italic_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function italic_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function italic_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) italic_setPrototypeOf(subClass, superClass); }
function italic_setPrototypeOf(o, p) { italic_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return italic_setPrototypeOf(o, p); }
function italic_createSuper(Derived) { var hasNativeReflectConstruct = italic_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = italic_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = italic_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return italic_possibleConstructorReturn(this, result); }; }
function italic_possibleConstructorReturn(self, call) { if (call && (italic_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return italic_assertThisInitialized(self); }
function italic_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function italic_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function italic_getPrototypeOf(o) { italic_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return italic_getPrototypeOf(o); }

var Italic = /*#__PURE__*/function (_Bold) {
  italic_inherits(Italic, _Bold);
  var _super = italic_createSuper(Italic);
  function Italic() {
    italic_classCallCheck(this, Italic);
    return _super.apply(this, arguments);
  }
  return italic_createClass(Italic);
}(bold/* default */.Z);
Italic.blotName = 'italic';
Italic.tagName = ['EM', 'I'];
/* harmony default export */ const italic = (Italic);
// EXTERNAL MODULE: ./formats/link.js
var formats_link = __webpack_require__(7256);
// EXTERNAL MODULE: ./blots/inline.js
var inline = __webpack_require__(6603);
;// CONCATENATED MODULE: ./formats/script.js
function script_typeof(o) { "@babel/helpers - typeof"; return script_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, script_typeof(o); }
function script_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function script_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, script_toPropertyKey(descriptor.key), descriptor); } }
function script_createClass(Constructor, protoProps, staticProps) { if (protoProps) script_defineProperties(Constructor.prototype, protoProps); if (staticProps) script_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function script_toPropertyKey(arg) { var key = script_toPrimitive(arg, "string"); return script_typeof(key) === "symbol" ? key : String(key); }
function script_toPrimitive(input, hint) { if (script_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (script_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function script_get() { if (typeof Reflect !== "undefined" && Reflect.get) { script_get = Reflect.get.bind(); } else { script_get = function _get(target, property, receiver) { var base = script_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return script_get.apply(this, arguments); }
function script_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = script_getPrototypeOf(object); if (object === null) break; } return object; }
function script_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) script_setPrototypeOf(subClass, superClass); }
function script_setPrototypeOf(o, p) { script_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return script_setPrototypeOf(o, p); }
function script_createSuper(Derived) { var hasNativeReflectConstruct = script_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = script_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = script_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return script_possibleConstructorReturn(this, result); }; }
function script_possibleConstructorReturn(self, call) { if (call && (script_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return script_assertThisInitialized(self); }
function script_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function script_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function script_getPrototypeOf(o) { script_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return script_getPrototypeOf(o); }

var Script = /*#__PURE__*/function (_Inline) {
  script_inherits(Script, _Inline);
  var _super = script_createSuper(Script);
  function Script() {
    script_classCallCheck(this, Script);
    return _super.apply(this, arguments);
  }
  script_createClass(Script, null, [{
    key: "create",
    value: function create(value) {
      if (value === 'super') {
        return document.createElement('sup');
      }
      if (value === 'sub') {
        return document.createElement('sub');
      }
      return script_get(script_getPrototypeOf(Script), "create", this).call(this, value);
    }
  }, {
    key: "formats",
    value: function formats(domNode) {
      if (domNode.tagName === 'SUB') return 'sub';
      if (domNode.tagName === 'SUP') return 'super';
      return undefined;
    }
  }]);
  return Script;
}(inline/* default */.Z);
Script.blotName = 'script';
Script.tagName = ['SUB', 'SUP'];
/* harmony default export */ const script = (Script);
;// CONCATENATED MODULE: ./formats/strike.js
function strike_typeof(o) { "@babel/helpers - typeof"; return strike_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, strike_typeof(o); }
function strike_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, strike_toPropertyKey(descriptor.key), descriptor); } }
function strike_createClass(Constructor, protoProps, staticProps) { if (protoProps) strike_defineProperties(Constructor.prototype, protoProps); if (staticProps) strike_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function strike_toPropertyKey(arg) { var key = strike_toPrimitive(arg, "string"); return strike_typeof(key) === "symbol" ? key : String(key); }
function strike_toPrimitive(input, hint) { if (strike_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (strike_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function strike_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function strike_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) strike_setPrototypeOf(subClass, superClass); }
function strike_setPrototypeOf(o, p) { strike_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return strike_setPrototypeOf(o, p); }
function strike_createSuper(Derived) { var hasNativeReflectConstruct = strike_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = strike_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = strike_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return strike_possibleConstructorReturn(this, result); }; }
function strike_possibleConstructorReturn(self, call) { if (call && (strike_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return strike_assertThisInitialized(self); }
function strike_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function strike_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function strike_getPrototypeOf(o) { strike_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return strike_getPrototypeOf(o); }

var Strike = /*#__PURE__*/function (_Bold) {
  strike_inherits(Strike, _Bold);
  var _super = strike_createSuper(Strike);
  function Strike() {
    strike_classCallCheck(this, Strike);
    return _super.apply(this, arguments);
  }
  return strike_createClass(Strike);
}(bold/* default */.Z);
Strike.blotName = 'strike';
Strike.tagName = ['S', 'STRIKE'];
/* harmony default export */ const strike = (Strike);
;// CONCATENATED MODULE: ./formats/underline.js
function underline_typeof(o) { "@babel/helpers - typeof"; return underline_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, underline_typeof(o); }
function underline_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, underline_toPropertyKey(descriptor.key), descriptor); } }
function underline_createClass(Constructor, protoProps, staticProps) { if (protoProps) underline_defineProperties(Constructor.prototype, protoProps); if (staticProps) underline_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function underline_toPropertyKey(arg) { var key = underline_toPrimitive(arg, "string"); return underline_typeof(key) === "symbol" ? key : String(key); }
function underline_toPrimitive(input, hint) { if (underline_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (underline_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function underline_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function underline_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) underline_setPrototypeOf(subClass, superClass); }
function underline_setPrototypeOf(o, p) { underline_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return underline_setPrototypeOf(o, p); }
function underline_createSuper(Derived) { var hasNativeReflectConstruct = underline_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = underline_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = underline_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return underline_possibleConstructorReturn(this, result); }; }
function underline_possibleConstructorReturn(self, call) { if (call && (underline_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return underline_assertThisInitialized(self); }
function underline_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function underline_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function underline_getPrototypeOf(o) { underline_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return underline_getPrototypeOf(o); }

var Underline = /*#__PURE__*/function (_Inline) {
  underline_inherits(Underline, _Inline);
  var _super = underline_createSuper(Underline);
  function Underline() {
    underline_classCallCheck(this, Underline);
    return _super.apply(this, arguments);
  }
  return underline_createClass(Underline);
}(inline/* default */.Z);
Underline.blotName = 'underline';
Underline.tagName = 'U';
/* harmony default export */ const underline = (Underline);
// EXTERNAL MODULE: ./blots/embed.js
var blots_embed = __webpack_require__(7452);
// EXTERNAL MODULE: ./utils/has_window.js
var has_window = __webpack_require__(8034);
;// CONCATENATED MODULE: ./formats/formula.js
function formula_typeof(o) { "@babel/helpers - typeof"; return formula_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, formula_typeof(o); }
function formula_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function formula_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, formula_toPropertyKey(descriptor.key), descriptor); } }
function formula_createClass(Constructor, protoProps, staticProps) { if (protoProps) formula_defineProperties(Constructor.prototype, protoProps); if (staticProps) formula_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function formula_toPropertyKey(arg) { var key = formula_toPrimitive(arg, "string"); return formula_typeof(key) === "symbol" ? key : String(key); }
function formula_toPrimitive(input, hint) { if (formula_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (formula_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function formula_get() { if (typeof Reflect !== "undefined" && Reflect.get) { formula_get = Reflect.get.bind(); } else { formula_get = function _get(target, property, receiver) { var base = formula_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return formula_get.apply(this, arguments); }
function formula_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = formula_getPrototypeOf(object); if (object === null) break; } return object; }
function formula_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) formula_setPrototypeOf(subClass, superClass); }
function formula_setPrototypeOf(o, p) { formula_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return formula_setPrototypeOf(o, p); }
function formula_createSuper(Derived) { var hasNativeReflectConstruct = formula_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = formula_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = formula_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return formula_possibleConstructorReturn(this, result); }; }
function formula_possibleConstructorReturn(self, call) { if (call && (formula_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return formula_assertThisInitialized(self); }
function formula_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function formula_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function formula_getPrototypeOf(o) { formula_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return formula_getPrototypeOf(o); }


var Formula = /*#__PURE__*/function (_Embed) {
  formula_inherits(Formula, _Embed);
  var _super = formula_createSuper(Formula);
  function Formula() {
    formula_classCallCheck(this, Formula);
    return _super.apply(this, arguments);
  }
  formula_createClass(Formula, [{
    key: "html",
    value: function html() {
      var _this$value = this.value(),
        formula = _this$value.formula;
      return "<span>".concat(formula, "</span>");
    }
  }], [{
    key: "create",
    value: function create(value) {
      var katex = null;
      if ((0,has_window/* default */.Z)()) {
        katex = window.katex;
      }
      if (katex == null) {
        throw new Error('Formula module requires KaTeX.');
      }
      var node = formula_get(formula_getPrototypeOf(Formula), "create", this).call(this, value);
      if (typeof value === 'string') {
        katex.render(value, node, {
          throwOnError: false,
          errorColor: '#f00'
        });
        node.setAttribute('data-value', value);
      }
      return node;
    }
  }, {
    key: "value",
    value: function value(domNode) {
      return domNode.getAttribute('data-value');
    }
  }]);
  return Formula;
}(blots_embed/* default */.Z);
Formula.blotName = 'formula';
Formula.className = 'ql-formula';
Formula.tagName = 'SPAN';
/* harmony default export */ const formula = (Formula);
;// CONCATENATED MODULE: ./formats/image.js
function image_typeof(o) { "@babel/helpers - typeof"; return image_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, image_typeof(o); }
function image_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function image_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, image_toPropertyKey(descriptor.key), descriptor); } }
function image_createClass(Constructor, protoProps, staticProps) { if (protoProps) image_defineProperties(Constructor.prototype, protoProps); if (staticProps) image_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function image_toPropertyKey(arg) { var key = image_toPrimitive(arg, "string"); return image_typeof(key) === "symbol" ? key : String(key); }
function image_toPrimitive(input, hint) { if (image_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (image_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function image_get() { if (typeof Reflect !== "undefined" && Reflect.get) { image_get = Reflect.get.bind(); } else { image_get = function _get(target, property, receiver) { var base = image_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return image_get.apply(this, arguments); }
function image_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = image_getPrototypeOf(object); if (object === null) break; } return object; }
function image_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) image_setPrototypeOf(subClass, superClass); }
function image_setPrototypeOf(o, p) { image_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return image_setPrototypeOf(o, p); }
function image_createSuper(Derived) { var hasNativeReflectConstruct = image_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = image_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = image_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return image_possibleConstructorReturn(this, result); }; }
function image_possibleConstructorReturn(self, call) { if (call && (image_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return image_assertThisInitialized(self); }
function image_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function image_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function image_getPrototypeOf(o) { image_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return image_getPrototypeOf(o); }



var ATTRIBUTES = ['alt', 'height', 'width'];
var Image = /*#__PURE__*/function (_EmbedBlot) {
  image_inherits(Image, _EmbedBlot);
  var _super = image_createSuper(Image);
  function Image() {
    image_classCallCheck(this, Image);
    return _super.apply(this, arguments);
  }
  image_createClass(Image, [{
    key: "format",
    value: function format(name, value) {
      if (ATTRIBUTES.indexOf(name) > -1) {
        if (value) {
          this.domNode.setAttribute(name, value);
        } else {
          this.domNode.removeAttribute(name);
        }
      } else {
        image_get(image_getPrototypeOf(Image.prototype), "format", this).call(this, name, value);
      }
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = image_get(image_getPrototypeOf(Image), "create", this).call(this, value);
      if (typeof value === 'string') {
        node.setAttribute('src', this.sanitize(value));
      }
      return node;
    }
  }, {
    key: "formats",
    value: function formats(domNode) {
      return ATTRIBUTES.reduce(function (formats, attribute) {
        if (domNode.hasAttribute(attribute)) {
          formats[attribute] = domNode.getAttribute(attribute);
        }
        return formats;
      }, {});
    }
  }, {
    key: "match",
    value: function match(url) {
      return /\.(jpe?g|gif|png)$/.test(url) || /^data:image\/.+;base64/.test(url);
    }
  }, {
    key: "register",
    value: function register() {
      if ((0,has_window/* default */.Z)() && /Firefox/i.test(navigator.userAgent)) {
        setTimeout(function () {
          // Disable image resizing in Firefox
          document.execCommand('enableObjectResizing', false, false);
        }, 1);
      }
    }
  }, {
    key: "sanitize",
    value: function sanitize(url) {
      return (0,formats_link/* sanitize */.N)(url, ['http', 'https', 'data']) ? url : '//:0';
    }
  }, {
    key: "value",
    value: function value(domNode) {
      return domNode.getAttribute('src');
    }
  }]);
  return Image;
}(parchment.EmbedBlot);
Image.blotName = 'image';
Image.tagName = 'IMG';
/* harmony default export */ const formats_image = (Image);
;// CONCATENATED MODULE: ./formats/video.js
function video_typeof(o) { "@babel/helpers - typeof"; return video_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, video_typeof(o); }
function video_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function video_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, video_toPropertyKey(descriptor.key), descriptor); } }
function video_createClass(Constructor, protoProps, staticProps) { if (protoProps) video_defineProperties(Constructor.prototype, protoProps); if (staticProps) video_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function video_toPropertyKey(arg) { var key = video_toPrimitive(arg, "string"); return video_typeof(key) === "symbol" ? key : String(key); }
function video_toPrimitive(input, hint) { if (video_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (video_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function video_get() { if (typeof Reflect !== "undefined" && Reflect.get) { video_get = Reflect.get.bind(); } else { video_get = function _get(target, property, receiver) { var base = video_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return video_get.apply(this, arguments); }
function video_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = video_getPrototypeOf(object); if (object === null) break; } return object; }
function video_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) video_setPrototypeOf(subClass, superClass); }
function video_setPrototypeOf(o, p) { video_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return video_setPrototypeOf(o, p); }
function video_createSuper(Derived) { var hasNativeReflectConstruct = video_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = video_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = video_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return video_possibleConstructorReturn(this, result); }; }
function video_possibleConstructorReturn(self, call) { if (call && (video_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return video_assertThisInitialized(self); }
function video_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function video_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function video_getPrototypeOf(o) { video_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return video_getPrototypeOf(o); }


var video_ATTRIBUTES = ['height', 'width'];
var Video = /*#__PURE__*/function (_BlockEmbed) {
  video_inherits(Video, _BlockEmbed);
  var _super = video_createSuper(Video);
  function Video() {
    video_classCallCheck(this, Video);
    return _super.apply(this, arguments);
  }
  video_createClass(Video, [{
    key: "format",
    value: function format(name, value) {
      if (video_ATTRIBUTES.indexOf(name) > -1) {
        if (value) {
          this.domNode.setAttribute(name, value);
        } else {
          this.domNode.removeAttribute(name);
        }
      } else {
        video_get(video_getPrototypeOf(Video.prototype), "format", this).call(this, name, value);
      }
    }
  }, {
    key: "html",
    value: function html() {
      var _this$value = this.value(),
        video = _this$value.video;
      return "<a href=\"".concat(video, "\">").concat(video, "</a>");
    }
  }], [{
    key: "create",
    value: function create(value) {
      var node = video_get(video_getPrototypeOf(Video), "create", this).call(this, value);
      node.setAttribute('frameborder', '0');
      node.setAttribute('allowfullscreen', true);
      node.setAttribute('src', this.sanitize(value));
      return node;
    }
  }, {
    key: "formats",
    value: function formats(domNode) {
      return video_ATTRIBUTES.reduce(function (formats, attribute) {
        if (domNode.hasAttribute(attribute)) {
          formats[attribute] = domNode.getAttribute(attribute);
        }
        return formats;
      }, {});
    }
  }, {
    key: "sanitize",
    value: function sanitize(url) {
      return formats_link/* default.sanitize */.Z.sanitize(url); // eslint-disable-line import/no-named-as-default-member
    }
  }, {
    key: "value",
    value: function value(domNode) {
      return domNode.getAttribute('src');
    }
  }]);
  return Video;
}(block/* BlockEmbed */.i2);
Video.blotName = 'video';
Video.className = 'ql-video';
Video.tagName = 'IFRAME';
/* harmony default export */ const video = (Video);
// EXTERNAL MODULE: ./formats/code.js
var code = __webpack_require__(7309);
// EXTERNAL MODULE: ./modules/syntax.js
var syntax = __webpack_require__(9072);
// EXTERNAL MODULE: ./modules/table/index.js
var table = __webpack_require__(867);
// EXTERNAL MODULE: ./node_modules/quill-delta/dist/Delta.js
var Delta = __webpack_require__(9098);
var Delta_default = /*#__PURE__*/__webpack_require__.n(Delta);
;// CONCATENATED MODULE: ./blots/multiline_break.js
function multiline_break_typeof(o) { "@babel/helpers - typeof"; return multiline_break_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, multiline_break_typeof(o); }
function multiline_break_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function multiline_break_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, multiline_break_toPropertyKey(descriptor.key), descriptor); } }
function multiline_break_createClass(Constructor, protoProps, staticProps) { if (protoProps) multiline_break_defineProperties(Constructor.prototype, protoProps); if (staticProps) multiline_break_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function multiline_break_toPropertyKey(arg) { var key = multiline_break_toPrimitive(arg, "string"); return multiline_break_typeof(key) === "symbol" ? key : String(key); }
function multiline_break_toPrimitive(input, hint) { if (multiline_break_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (multiline_break_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function multiline_break_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) multiline_break_setPrototypeOf(subClass, superClass); }
function multiline_break_setPrototypeOf(o, p) { multiline_break_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return multiline_break_setPrototypeOf(o, p); }
function multiline_break_createSuper(Derived) { var hasNativeReflectConstruct = multiline_break_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = multiline_break_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = multiline_break_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return multiline_break_possibleConstructorReturn(this, result); }; }
function multiline_break_possibleConstructorReturn(self, call) { if (call && (multiline_break_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return multiline_break_assertThisInitialized(self); }
function multiline_break_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function multiline_break_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function multiline_break_getPrototypeOf(o) { multiline_break_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return multiline_break_getPrototypeOf(o); }

var MultilineBreak = /*#__PURE__*/function (_EmbedBlot) {
  multiline_break_inherits(MultilineBreak, _EmbedBlot);
  var _super = multiline_break_createSuper(MultilineBreak);
  function MultilineBreak() {
    multiline_break_classCallCheck(this, MultilineBreak);
    return _super.apply(this, arguments);
  }
  multiline_break_createClass(MultilineBreak, [{
    key: "length",
    value: function length() {
      return 1;
    }
  }, {
    key: "value",
    value: function value() {
      return '\n';
    }
  }, {
    key: "optimize",
    value: function optimize() {
      if (!this.prev && !this.next) {
        this.remove();
      }
    }
  }], [{
    key: "value",
    value: function value() {
      return '\n';
    }
  }]);
  return MultilineBreak;
}(parchment.EmbedBlot);
MultilineBreak.blotName = 'multilineBreak';
MultilineBreak.tagName = 'BR';
/* harmony default export */ const multiline_break = (MultilineBreak);
// EXTERNAL MODULE: ./core/module.js
var core_module = __webpack_require__(7094);
;// CONCATENATED MODULE: ./modules/multiline.js
function multiline_typeof(o) { "@babel/helpers - typeof"; return multiline_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, multiline_typeof(o); }
function _defineProperty(obj, key, value) { key = multiline_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function multiline_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function multiline_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, multiline_toPropertyKey(descriptor.key), descriptor); } }
function multiline_createClass(Constructor, protoProps, staticProps) { if (protoProps) multiline_defineProperties(Constructor.prototype, protoProps); if (staticProps) multiline_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function multiline_toPropertyKey(arg) { var key = multiline_toPrimitive(arg, "string"); return multiline_typeof(key) === "symbol" ? key : String(key); }
function multiline_toPrimitive(input, hint) { if (multiline_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (multiline_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function multiline_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) multiline_setPrototypeOf(subClass, superClass); }
function multiline_setPrototypeOf(o, p) { multiline_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return multiline_setPrototypeOf(o, p); }
function multiline_createSuper(Derived) { var hasNativeReflectConstruct = multiline_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = multiline_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = multiline_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return multiline_possibleConstructorReturn(this, result); }; }
function multiline_possibleConstructorReturn(self, call) { if (call && (multiline_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return multiline_assertThisInitialized(self); }
function multiline_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function multiline_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function multiline_getPrototypeOf(o) { multiline_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return multiline_getPrototypeOf(o); }




function breakMatcher(node) {
  if (!(node.nextSibling || node.previousSibling)) {
    return new (Delta_default())().insert('\n');
  }
  return new (Delta_default())().insert({
    multilineBreak: ''
  });
}
var Multiline = /*#__PURE__*/function (_Module) {
  multiline_inherits(Multiline, _Module);
  var _super = multiline_createSuper(Multiline);
  function Multiline(quill, options) {
    var _this;
    multiline_classCallCheck(this, Multiline);
    var path = 'blots/multilineBreak';
    _this = _super.call(this, quill, options);
    core_quill/* default.register */.ZP.register(_defineProperty({}, path, multiline_break), true);
    quill.keyboard.addBinding({
      key: 'enter',
      shiftKey: true
    }, _this.enterHandler.bind(multiline_assertThisInitialized(_this)));
    quill.keyboard.bindings.enter.unshift(quill.keyboard.bindings.enter.pop());
    quill.clipboard.addMatcher('BR', breakMatcher);
    return _this;
  }
  multiline_createClass(Multiline, [{
    key: "enterHandler",
    value: function enterHandler(range) {
      var currentLeaf = this.quill.getLeaf(range.index)[0];
      var nextLeaf = this.quill.getLeaf(range.index + 1)[0];
      this.quill.insertEmbed(range.index, 'multilineBreak', true, 'user');
      if (nextLeaf === null || currentLeaf.parent !== nextLeaf.parent) {
        this.quill.insertEmbed(range.index, 'multilineBreak', true, 'user');
      }
      this.quill.setSelection(range.index + 1, core_quill/* default.sources.SILENT */.ZP.sources.SILENT);
    }
  }]);
  return Multiline;
}(core_module/* default */.Z);
/* harmony default export */ const multiline = (Multiline);
// EXTERNAL MODULE: ./modules/table/lite.js + 3 modules
var lite = __webpack_require__(6054);
// EXTERNAL MODULE: ./formats/table/attributors/cell.js
var cell = __webpack_require__(1342);
// EXTERNAL MODULE: ./formats/table/attributors/table.js
var attributors_table = __webpack_require__(319);
;// CONCATENATED MODULE: ./quill.js
function quill_typeof(o) { "@babel/helpers - typeof"; return quill_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, quill_typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { quill_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function quill_defineProperty(obj, key, value) { key = quill_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function quill_toPropertyKey(arg) { var key = quill_toPrimitive(arg, "string"); return quill_typeof(key) === "symbol" ? key : String(key); }
function quill_toPrimitive(input, hint) { if (quill_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (quill_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }




























function registerAttributorArray(path, attributorArray) {
  return attributorArray.reduce(function (result, attributor) {
    var key = "".concat(path).concat(attributor.attrName);
    result[key] = attributor;
    return result;
  }, {});
}
core["default"].register(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
  'attributors/attribute/direction': direction/* DirectionAttribute */.IF
}, registerAttributorArray('attributors/attribute/', attributors_table/* TABLE_ATTR_ATTRIBUTORS */.Qu)), registerAttributorArray('attributors/attribute/', cell/* TABLE_CELL_ATTR_ATTRIBUTORS */.yA)), {}, {
  'attributors/class/align': align/* AlignClass */.dk,
  'attributors/class/background': background/* BackgroundClass */.Y,
  'attributors/class/color': color/* ColorClass */.Hn,
  'attributors/class/direction': direction/* DirectionClass */.hY,
  'attributors/class/font': font/* FontClass */._,
  'attributors/class/size': size/* SizeClass */.m,
  'attributors/style/align': align/* AlignStyle */.HE,
  'attributors/style/background': background/* BackgroundStyle */.w,
  'attributors/style/color': color/* ColorStyle */.HQ,
  'attributors/style/direction': direction/* DirectionStyle */.H8,
  'attributors/style/font': font/* FontStyle */.H,
  'attributors/style/size': size/* SizeStyle */.Z
}, registerAttributorArray('attributors/style/', attributors_table/* TABLE_STYLE_ATTRIBUTORS */.VT)), registerAttributorArray('attributors/style/', cell/* TABLE_CELL_STYLE_ATTRIBUTORS */.kk)), true);
core["default"].register({
  'formats/align': align/* AlignClass */.dk,
  'formats/direction': direction/* DirectionClass */.hY,
  'formats/indent': indent,
  'formats/background': background/* BackgroundStyle */.w,
  'formats/color': color/* ColorStyle */.HQ,
  'formats/font': font/* FontClass */._,
  'formats/size': size/* SizeClass */.m,
  'formats/blockquote': blockquote,
  'formats/code-block': code/* default */.ZP,
  'formats/header': header,
  'formats/list': ListItem,
  'formats/bold': bold/* default */.Z,
  'formats/code': code/* Code */.EK,
  'formats/italic': italic,
  'formats/link': formats_link/* default */.Z,
  'formats/script': script,
  'formats/strike': strike,
  'formats/underline': underline,
  'formats/formula': formula,
  'formats/image': formats_image,
  'formats/video': video,
  'tableModules/lite': lite/* default */.Z,
  'tableModules/main': table/* default */.Z,
  'modules/syntax': syntax/* default */.ZP,
  'modules/multiline': multiline,
  'modules/table': table/* default */.Z
}, true);
/* harmony default export */ const quill = (core["default"]);
})();

__webpack_exports__ = __webpack_exports__["default"];
/******/ 	return __webpack_exports__;
/******/ })()
;
});
/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Z(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!=w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ne={};function re(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=ce.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<ce(i,this).index(l):ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",J.appendChild(u).appendChild(l);var e=ie.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&ie.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&ie.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce});

/**
 * CLDR JavaScript Library v0.5.4
 * http://jquery.com/
 *
 * Copyright 2013 Rafael Xavier de Souza
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2020-10-22T15:56Z
 */
/*!
 * CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier
 * http://git.io/h4lmVg
 */
(function( root, factory ) {

	if ( typeof define === "function" && define.amd ) {
		// AMD.
		define( factory );
	} else if ( typeof module === "object" && typeof module.exports === "object" ) {
		// Node. CommonJS.
		module.exports = factory();
	} else {
		// Global
		root.Cldr = factory();
	}

}( this, function() {


	var arrayIsArray = Array.isArray || function( obj ) {
		return Object.prototype.toString.call( obj ) === "[object Array]";
	};




	var pathNormalize = function( path, attributes ) {
		if ( arrayIsArray( path ) ) {
			path = path.join( "/" );
		}
		if ( typeof path !== "string" ) {
			throw new Error( "invalid path \"" + path + "\"" );
		}
		// 1: Ignore leading slash `/`
		// 2: Ignore leading `cldr/`
		path = path
			.replace( /^\// , "" ) /* 1 */
			.replace( /^cldr\// , "" ); /* 2 */

		// Replace {attribute}'s
		path = path.replace( /{[a-zA-Z]+}/g, function( name ) {
			name = name.replace( /^{([^}]*)}$/, "$1" );
			return attributes[ name ];
		});

		return path.split( "/" );
	};




	var arraySome = function( array, callback ) {
		var i, length;
		if ( array.some ) {
			return array.some( callback );
		}
		for ( i = 0, length = array.length; i < length; i++ ) {
			if ( callback( array[ i ], i, array ) ) {
				return true;
			}
		}
		return false;
	};




	/**
	 * Return the maximized language id as defined in
	 * http://www.unicode.org/reports/tr35/#Likely_Subtags
	 * 1. Canonicalize.
	 * 1.1 Make sure the input locale is in canonical form: uses the right
	 * separator, and has the right casing.
	 * TODO Right casing? What df? It seems languages are lowercase, scripts are
	 * Capitalized, territory is uppercase. I am leaving this as an exercise to
	 * the user.
	 *
	 * 1.2 Replace any deprecated subtags with their canonical values using the
	 * <alias> data in supplemental metadata. Use the first value in the
	 * replacement list, if it exists. Language tag replacements may have multiple
	 * parts, such as "sh" ➞ "sr_Latn" or mo" ➞ "ro_MD". In such a case, the
	 * original script and/or region are retained if there is one. Thus
	 * "sh_Arab_AQ" ➞ "sr_Arab_AQ", not "sr_Latn_AQ".
	 * TODO What <alias> data?
	 *
	 * 1.3 If the tag is grandfathered (see <variable id="$grandfathered"
	 * type="choice"> in the supplemental data), then return it.
	 * TODO grandfathered?
	 *
	 * 1.4 Remove the script code 'Zzzz' and the region code 'ZZ' if they occur.
	 * 1.5 Get the components of the cleaned-up source tag (languages, scripts,
	 * and regions), plus any variants and extensions.
	 * 2. Lookup. Lookup each of the following in order, and stop on the first
	 * match:
	 * 2.1 languages_scripts_regions
	 * 2.2 languages_regions
	 * 2.3 languages_scripts
	 * 2.4 languages
	 * 2.5 und_scripts
	 * 3. Return
	 * 3.1 If there is no match, either return an error value, or the match for
	 * "und" (in APIs where a valid language tag is required).
	 * 3.2 Otherwise there is a match = languagem_scriptm_regionm
	 * 3.3 Let xr = xs if xs is not empty, and xm otherwise.
	 * 3.4 Return the language tag composed of languager _ scriptr _ regionr +
	 * variants + extensions.
	 *
	 * @subtags [Array] normalized language id subtags tuple (see init.js).
	 */
	var coreLikelySubtags = function( Cldr, cldr, subtags, options ) {
		var match, matchFound,
			language = subtags[ 0 ],
			script = subtags[ 1 ],
			sep = Cldr.localeSep,
			territory = subtags[ 2 ],
			variants = subtags.slice( 3, 4 );
		options = options || {};

		// Skip if (language, script, territory) is not empty [3.3]
		if ( language !== "und" && script !== "Zzzz" && territory !== "ZZ" ) {
			return [ language, script, territory ].concat( variants );
		}

		// Skip if no supplemental likelySubtags data is present
		if ( typeof cldr.get( "supplemental/likelySubtags" ) === "undefined" ) {
			return;
		}

		// [2]
		matchFound = arraySome([
			[ language, script, territory ],
			[ language, territory ],
			[ language, script ],
			[ language ],
			[ "und", script ]
		], function( test ) {
			return match = !(/\b(Zzzz|ZZ)\b/).test( test.join( sep ) ) /* [1.4] */ && cldr.get( [ "supplemental/likelySubtags", test.join( sep ) ] );
		});

		// [3]
		if ( matchFound ) {
			// [3.2 .. 3.4]
			match = match.split( sep );
			return [
				language !== "und" ? language : match[ 0 ],
				script !== "Zzzz" ? script : match[ 1 ],
				territory !== "ZZ" ? territory : match[ 2 ]
			].concat( variants );
		} else if ( options.force ) {
			// [3.1.2]
			return cldr.get( "supplemental/likelySubtags/und" ).split( sep );
		} else {
			// [3.1.1]
			return;
		}
	};



	/**
	 * Given a locale, remove any fields that Add Likely Subtags would add.
	 * http://www.unicode.org/reports/tr35/#Likely_Subtags
	 * 1. First get max = AddLikelySubtags(inputLocale). If an error is signaled,
	 * return it.
	 * 2. Remove the variants from max.
	 * 3. Then for trial in {language, language _ region, language _ script}. If
	 * AddLikelySubtags(trial) = max, then return trial + variants.
	 * 4. If you do not get a match, return max + variants.
	 * 
	 * @maxLanguageId [Array] maxLanguageId tuple (see init.js).
	 */
	var coreRemoveLikelySubtags = function( Cldr, cldr, maxLanguageId ) {
		var match, matchFound,
			language = maxLanguageId[ 0 ],
			script = maxLanguageId[ 1 ],
			territory = maxLanguageId[ 2 ],
			variants = maxLanguageId[ 3 ];

		// [3]
		matchFound = arraySome([
			[ [ language, "Zzzz", "ZZ" ], [ language ] ],
			[ [ language, "Zzzz", territory ], [ language, territory ] ],
			[ [ language, script, "ZZ" ], [ language, script ] ]
		], function( test ) {
			var result = coreLikelySubtags( Cldr, cldr, test[ 0 ] );
			match = test[ 1 ];
			return result && result[ 0 ] === maxLanguageId[ 0 ] &&
				result[ 1 ] === maxLanguageId[ 1 ] &&
				result[ 2 ] === maxLanguageId[ 2 ];
		});

		if ( matchFound ) {
			if ( variants ) {
				match.push( variants );
			}
			return match;
		}

		// [4]
		return maxLanguageId;
	};




	/**
	 * subtags( locale )
	 *
	 * @locale [String]
	 */
	var coreSubtags = function( locale ) {
		var aux, unicodeLanguageId,
			subtags = [];

		locale = locale.replace( /_/, "-" );

		// Unicode locale extensions.
		aux = locale.split( "-u-" );
		if ( aux[ 1 ] ) {
			aux[ 1 ] = aux[ 1 ].split( "-t-" );
			locale = aux[ 0 ] + ( aux[ 1 ][ 1 ] ? "-t-" + aux[ 1 ][ 1 ] : "");
			subtags[ 4 /* unicodeLocaleExtensions */ ] = aux[ 1 ][ 0 ];
		}

		// TODO normalize transformed extensions. Currently, skipped.
		// subtags[ x ] = locale.split( "-t-" )[ 1 ];
		unicodeLanguageId = locale.split( "-t-" )[ 0 ];

		// unicode_language_id = "root"
		//   | unicode_language_subtag         
		//     (sep unicode_script_subtag)? 
		//     (sep unicode_region_subtag)?
		//     (sep unicode_variant_subtag)* ;
		//
		// Although unicode_language_subtag = alpha{2,8}, I'm using alpha{2,3}. Because, there's no language on CLDR lengthier than 3.
		aux = unicodeLanguageId.match( /^(([a-z]{2,3})(-([A-Z][a-z]{3}))?(-([A-Z]{2}|[0-9]{3}))?)((-([a-zA-Z0-9]{5,8}|[0-9][a-zA-Z0-9]{3}))*)$|^(root)$/ );
		if ( aux === null ) {
			return [ "und", "Zzzz", "ZZ" ];
		}
		subtags[ 0 /* language */ ] = aux[ 10 ] /* root */ || aux[ 2 ] || "und";
		subtags[ 1 /* script */ ] = aux[ 4 ] || "Zzzz";
		subtags[ 2 /* territory */ ] = aux[ 6 ] || "ZZ";
		if ( aux[ 7 ] && aux[ 7 ].length ) {
			subtags[ 3 /* variant */ ] = aux[ 7 ].slice( 1 ) /* remove leading "-" */;
		}

		// 0: language
		// 1: script
		// 2: territory (aka region)
		// 3: variant
		// 4: unicodeLocaleExtensions
		return subtags;
	};




	var arrayForEach = function( array, callback ) {
		var i, length;
		if ( array.forEach ) {
			return array.forEach( callback );
		}
		for ( i = 0, length = array.length; i < length; i++ ) {
			callback( array[ i ], i, array );
		}
	};




	/**
	 * bundleLookup( minLanguageId )
	 *
	 * @Cldr [Cldr class]
	 *
	 * @cldr [Cldr instance]
	 *
	 * @minLanguageId [String] requested languageId after applied remove likely subtags.
	 */
	var bundleLookup = function( Cldr, cldr, minLanguageId ) {
		var availableBundleMap = Cldr._availableBundleMap,
			availableBundleMapQueue = Cldr._availableBundleMapQueue;

		if ( availableBundleMapQueue.length ) {
			arrayForEach( availableBundleMapQueue, function( bundle, i ) {
				var existing, maxBundle, minBundle, subtags;
				subtags = coreSubtags( bundle );
				maxBundle = coreLikelySubtags( Cldr, cldr, subtags );
				if ( maxBundle === undefined ) {
					availableBundleMapQueue.splice( i, 1 );
					throw new Error( "Could not find likelySubtags for " + bundle );
				}
				minBundle = coreRemoveLikelySubtags( Cldr, cldr, maxBundle );
				minBundle = minBundle.join( Cldr.localeSep );
				existing = availableBundleMap[ minBundle ];
				if ( existing && existing.length < bundle.length ) {
					return;
				}
				availableBundleMap[ minBundle ] = bundle;
			});
			Cldr._availableBundleMapQueue = [];
		}

		return availableBundleMap[ minLanguageId ] || null;
	};




	var objectKeys = function( object ) {
		var i,
			result = [];

		if ( Object.keys ) {
			return Object.keys( object );
		}

		for ( i in object ) {
			result.push( i );
		}

		return result;
	};




	var createError = function( code, attributes ) {
		var error, message;

		message = code + ( attributes && JSON ? ": " + JSON.stringify( attributes ) : "" );
		error = new Error( message );
		error.code = code;

		// extend( error, attributes );
		arrayForEach( objectKeys( attributes ), function( attribute ) {
			error[ attribute ] = attributes[ attribute ];
		});

		return error;
	};




	var validate = function( code, check, attributes ) {
		if ( !check ) {
			throw createError( code, attributes );
		}
	};




	var validatePresence = function( value, name ) {
		validate( "E_MISSING_PARAMETER", typeof value !== "undefined", {
			name: name
		});
	};




	var validateType = function( value, name, check, expected ) {
		validate( "E_INVALID_PAR_TYPE", check, {
			expected: expected,
			name: name,
			value: value
		});
	};




	var validateTypePath = function( value, name ) {
		validateType( value, name, typeof value === "string" || arrayIsArray( value ), "String or Array" );
	};




	/**
	 * Function inspired by jQuery Core, but reduced to our use case.
	 */
	var isPlainObject = function( obj ) {
		return obj !== null && "" + obj === "[object Object]";
	};




	var validateTypePlainObject = function( value, name ) {
		validateType( value, name, typeof value === "undefined" || isPlainObject( value ), "Plain Object" );
	};




	var validateTypeString = function( value, name ) {
		validateType( value, name, typeof value === "string", "a string" );
	};




	// @path: normalized path
	var resourceGet = function( data, path ) {
		var i,
			node = data,
			length = path.length;

		for ( i = 0; i < length - 1; i++ ) {
			node = node[ path[ i ] ];
			if ( !node ) {
				return undefined;
			}
		}
		return node[ path[ i ] ];
	};




	/**
	 * setAvailableBundles( Cldr, json )
	 *
	 * @Cldr [Cldr class]
	 *
	 * @json resolved/unresolved cldr data.
	 *
	 * Set available bundles queue based on passed json CLDR data. Considers a bundle as any String at /main/{bundle}.
	 */
	var coreSetAvailableBundles = function( Cldr, json ) {
		var bundle,
			availableBundleMapQueue = Cldr._availableBundleMapQueue,
			main = resourceGet( json, [ "main" ] );

		if ( main ) {
			for ( bundle in main ) {
				if ( main.hasOwnProperty( bundle ) && bundle !== "root" &&
							availableBundleMapQueue.indexOf( bundle ) === -1 ) {
					availableBundleMapQueue.push( bundle );
				}
			}
		}
	};



	var alwaysArray = function( somethingOrArray ) {
		return arrayIsArray( somethingOrArray ) ?  somethingOrArray : [ somethingOrArray ];
	};


	var jsonMerge = (function() {

	// Returns new deeply merged JSON.
	//
	// Eg.
	// merge( { a: { b: 1, c: 2 } }, { a: { b: 3, d: 4 } } )
	// -> { a: { b: 3, c: 2, d: 4 } }
	//
	// @arguments JSON's
	// 
	var merge = function() {
		var destination = {},
			sources = [].slice.call( arguments, 0 );
		arrayForEach( sources, function( source ) {
			var prop;
			for ( prop in source ) {
				if ( prop in destination && typeof destination[ prop ] === "object" && !arrayIsArray( destination[ prop ] ) ) {

					// Merge Objects
					destination[ prop ] = merge( destination[ prop ], source[ prop ] );

				} else {

					// Set new values
					destination[ prop ] = source[ prop ];

				}
			}
		});
		return destination;
	};

	return merge;

}());


	/**
	 * load( Cldr, source, jsons )
	 *
	 * @Cldr [Cldr class]
	 *
	 * @source [Object]
	 *
	 * @jsons [arguments]
	 */
	var coreLoad = function( Cldr, source, jsons ) {
		var i, j, json;

		validatePresence( jsons[ 0 ], "json" );

		// Support arbitrary parameters, e.g., `Cldr.load({...}, {...})`.
		for ( i = 0; i < jsons.length; i++ ) {

			// Support array parameters, e.g., `Cldr.load([{...}, {...}])`.
			json = alwaysArray( jsons[ i ] );

			for ( j = 0; j < json.length; j++ ) {
				validateTypePlainObject( json[ j ], "json" );
				source = jsonMerge( source, json[ j ] );
				coreSetAvailableBundles( Cldr, json[ j ] );
			}
		}

		return source;
	};



	var itemGetResolved = function( Cldr, path, attributes ) {
		// Resolve path
		var normalizedPath = pathNormalize( path, attributes );

		return resourceGet( Cldr._resolved, normalizedPath );
	};




	/**
	 * new Cldr()
	 */
	var Cldr = function( locale ) {
		this.init( locale );
	};

	// Build optimization hack to avoid duplicating functions across modules.
	Cldr._alwaysArray = alwaysArray;
	Cldr._coreLoad = coreLoad;
	Cldr._createError = createError;
	Cldr._itemGetResolved = itemGetResolved;
	Cldr._jsonMerge = jsonMerge;
	Cldr._pathNormalize = pathNormalize;
	Cldr._resourceGet = resourceGet;
	Cldr._validatePresence = validatePresence;
	Cldr._validateType = validateType;
	Cldr._validateTypePath = validateTypePath;
	Cldr._validateTypePlainObject = validateTypePlainObject;

	Cldr._availableBundleMap = {};
	Cldr._availableBundleMapQueue = [];
	Cldr._resolved = {};

	// Allow user to override locale separator "-" (default) | "_". According to http://www.unicode.org/reports/tr35/#Unicode_language_identifier, both "-" and "_" are valid locale separators (eg. "en_GB", "en-GB"). According to http://unicode.org/cldr/trac/ticket/6786 its usage must be consistent throughout the data set.
	Cldr.localeSep = "-";

	/**
	 * Cldr.load( json [, json, ...] )
	 *
	 * @json [JSON] CLDR data or [Array] Array of @json's.
	 *
	 * Load resolved cldr data.
	 */
	Cldr.load = function() {
		Cldr._resolved = coreLoad( Cldr, Cldr._resolved, arguments );
	};

	/**
	 * .init() automatically run on instantiation/construction.
	 */
	Cldr.prototype.init = function( locale ) {
		var attributes, language, maxLanguageId, minLanguageId, script, subtags, territory, unicodeLocaleExtensions, variant,
			sep = Cldr.localeSep,
			unicodeLocaleExtensionsRaw = "";

		validatePresence( locale, "locale" );
		validateTypeString( locale, "locale" );

		subtags = coreSubtags( locale );

		if ( subtags.length === 5 ) {
			unicodeLocaleExtensions = subtags.pop();
			unicodeLocaleExtensionsRaw = sep + "u" + sep + unicodeLocaleExtensions;
			// Remove trailing null when there is unicodeLocaleExtensions but no variants.
			if ( !subtags[ 3 ] ) {
				subtags.pop();
			}
		}
		variant = subtags[ 3 ];

		// Normalize locale code.
		// Get (or deduce) the "triple subtags": language, territory (also aliased as region), and script subtags.
		// Get the variant subtags (calendar, collation, currency, etc).
		// refs:
		// - http://www.unicode.org/reports/tr35/#Field_Definitions
		// - http://www.unicode.org/reports/tr35/#Language_and_Locale_IDs
		// - http://www.unicode.org/reports/tr35/#Unicode_locale_identifier

		// When a locale id does not specify a language, or territory (region), or script, they are obtained by Likely Subtags.
		maxLanguageId = coreLikelySubtags( Cldr, this, subtags, { force: true } ) || subtags;
		language = maxLanguageId[ 0 ];
		script = maxLanguageId[ 1 ];
		territory = maxLanguageId[ 2 ];

		minLanguageId = coreRemoveLikelySubtags( Cldr, this, maxLanguageId ).join( sep );

		// Set attributes
		this.attributes = attributes = {
			bundle: bundleLookup( Cldr, this, minLanguageId ),

			// Unicode Language Id
			minLanguageId: minLanguageId + unicodeLocaleExtensionsRaw,
			maxLanguageId: maxLanguageId.join( sep ) + unicodeLocaleExtensionsRaw,

			// Unicode Language Id Subtabs
			language: language,
			script: script,
			territory: territory,
			region: territory, /* alias */
			variant: variant
		};

		// Unicode locale extensions.
		unicodeLocaleExtensions && ( "-" + unicodeLocaleExtensions ).replace( /-[a-z]{3,8}|(-[a-z]{2})-([a-z]{3,8})/g, function( attribute, key, type ) {

			if ( key ) {

				// Extension is in the `keyword` form.
				attributes[ "u" + key ] = type;
			} else {

				// Extension is in the `attribute` form.
				attributes[ "u" + attribute ] = true;
			}
		});

		this.locale = locale;
	};

	/**
	 * .get()
	 */
	Cldr.prototype.get = function( path ) {

		validatePresence( path, "path" );
		validateTypePath( path, "path" );

		return itemGetResolved( Cldr, path, this.attributes );
	};

	/**
	 * .main()
	 */
	Cldr.prototype.main = function( path ) {
		validatePresence( path, "path" );
		validateTypePath( path, "path" );

		validate( "E_MISSING_BUNDLE", this.attributes.bundle !== null, {
			locale: this.locale
		});

		path = alwaysArray( path );
		return this.get( [ "main/{bundle}" ].concat( path ) );
	};

	return Cldr;




}));

/**
 * CLDR JavaScript Library v0.5.4
 * http://jquery.com/
 *
 * Copyright 2013 Rafael Xavier de Souza
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2020-10-22T15:56Z
 */
/*!
 * CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier
 * http://git.io/h4lmVg
 */
(function( factory ) {

	if ( typeof define === "function" && define.amd ) {
		// AMD.
		define( [ "../cldr" ], factory );
	} else if ( typeof module === "object" && typeof module.exports === "object" ) {
		// Node. CommonJS.
		module.exports = factory( require( "../cldr" ) );
	} else {
		// Global
		factory( Cldr );
	}

}(function( Cldr ) {

	// Build optimization hack to avoid duplicating functions across modules.
	var pathNormalize = Cldr._pathNormalize,
		validatePresence = Cldr._validatePresence,
		validateType = Cldr._validateType;

/*!
 * EventEmitter v4.2.7 - git.io/ee
 * Oliver Caldwell
 * MIT license
 * @preserve
 */

var EventEmitter;
/* jshint ignore:start */
EventEmitter = (function () {


	/**
	 * Class for managing events.
	 * Can be extended to provide event functionality in other classes.
	 *
	 * @class EventEmitter Manages event registering and emitting.
	 */
	function EventEmitter() {}

	// Shortcuts to improve speed and size
	var proto = EventEmitter.prototype;
	var exports = {};
	

	/**
	 * Finds the index of the listener for the event in it's storage array.
	 *
	 * @param {Function[]} listeners Array of listeners to search through.
	 * @param {Function} listener Method to look for.
	 * @return {Number} Index of the specified listener, -1 if not found
	 * @api private
	 */
	function indexOfListener(listeners, listener) {
		var i = listeners.length;
		while (i--) {
			if (listeners[i].listener === listener) {
				return i;
			}
		}

		return -1;
	}

	/**
	 * Alias a method while keeping the context correct, to allow for overwriting of target method.
	 *
	 * @param {String} name The name of the target method.
	 * @return {Function} The aliased method
	 * @api private
	 */
	function alias(name) {
		return function aliasClosure() {
			return this[name].apply(this, arguments);
		};
	}

	/**
	 * Returns the listener array for the specified event.
	 * Will initialise the event object and listener arrays if required.
	 * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.
	 * Each property in the object response is an array of listener functions.
	 *
	 * @param {String|RegExp} evt Name of the event to return the listeners from.
	 * @return {Function[]|Object} All listener functions for the event.
	 */
	proto.getListeners = function getListeners(evt) {
		var events = this._getEvents();
		var response;
		var key;

		// Return a concatenated array of all matching events if
		// the selector is a regular expression.
		if (evt instanceof RegExp) {
			response = {};
			for (key in events) {
				if (events.hasOwnProperty(key) && evt.test(key)) {
					response[key] = events[key];
				}
			}
		}
		else {
			response = events[evt] || (events[evt] = []);
		}

		return response;
	};

	/**
	 * Takes a list of listener objects and flattens it into a list of listener functions.
	 *
	 * @param {Object[]} listeners Raw listener objects.
	 * @return {Function[]} Just the listener functions.
	 */
	proto.flattenListeners = function flattenListeners(listeners) {
		var flatListeners = [];
		var i;

		for (i = 0; i < listeners.length; i += 1) {
			flatListeners.push(listeners[i].listener);
		}

		return flatListeners;
	};

	/**
	 * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.
	 *
	 * @param {String|RegExp} evt Name of the event to return the listeners from.
	 * @return {Object} All listener functions for an event in an object.
	 */
	proto.getListenersAsObject = function getListenersAsObject(evt) {
		var listeners = this.getListeners(evt);
		var response;

		if (listeners instanceof Array) {
			response = {};
			response[evt] = listeners;
		}

		return response || listeners;
	};

	/**
	 * Adds a listener function to the specified event.
	 * The listener will not be added if it is a duplicate.
	 * If the listener returns true then it will be removed after it is called.
	 * If you pass a regular expression as the event name then the listener will be added to all events that match it.
	 *
	 * @param {String|RegExp} evt Name of the event to attach the listener to.
	 * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.addListener = function addListener(evt, listener) {
		var listeners = this.getListenersAsObject(evt);
		var listenerIsWrapped = typeof listener === 'object';
		var key;

		for (key in listeners) {
			if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {
				listeners[key].push(listenerIsWrapped ? listener : {
					listener: listener,
					once: false
				});
			}
		}

		return this;
	};

	/**
	 * Alias of addListener
	 */
	proto.on = alias('addListener');

	/**
	 * Semi-alias of addListener. It will add a listener that will be
	 * automatically removed after it's first execution.
	 *
	 * @param {String|RegExp} evt Name of the event to attach the listener to.
	 * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.addOnceListener = function addOnceListener(evt, listener) {
		return this.addListener(evt, {
			listener: listener,
			once: true
		});
	};

	/**
	 * Alias of addOnceListener.
	 */
	proto.once = alias('addOnceListener');

	/**
	 * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.
	 * You need to tell it what event names should be matched by a regex.
	 *
	 * @param {String} evt Name of the event to create.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.defineEvent = function defineEvent(evt) {
		this.getListeners(evt);
		return this;
	};

	/**
	 * Uses defineEvent to define multiple events.
	 *
	 * @param {String[]} evts An array of event names to define.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.defineEvents = function defineEvents(evts) {
		for (var i = 0; i < evts.length; i += 1) {
			this.defineEvent(evts[i]);
		}
		return this;
	};

	/**
	 * Removes a listener function from the specified event.
	 * When passed a regular expression as the event name, it will remove the listener from all events that match it.
	 *
	 * @param {String|RegExp} evt Name of the event to remove the listener from.
	 * @param {Function} listener Method to remove from the event.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.removeListener = function removeListener(evt, listener) {
		var listeners = this.getListenersAsObject(evt);
		var index;
		var key;

		for (key in listeners) {
			if (listeners.hasOwnProperty(key)) {
				index = indexOfListener(listeners[key], listener);

				if (index !== -1) {
					listeners[key].splice(index, 1);
				}
			}
		}

		return this;
	};

	/**
	 * Alias of removeListener
	 */
	proto.off = alias('removeListener');

	/**
	 * Adds listeners in bulk using the manipulateListeners method.
	 * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.
	 * You can also pass it a regular expression to add the array of listeners to all events that match it.
	 * Yeah, this function does quite a bit. That's probably a bad thing.
	 *
	 * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.
	 * @param {Function[]} [listeners] An optional array of listener functions to add.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.addListeners = function addListeners(evt, listeners) {
		// Pass through to manipulateListeners
		return this.manipulateListeners(false, evt, listeners);
	};

	/**
	 * Removes listeners in bulk using the manipulateListeners method.
	 * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
	 * You can also pass it an event name and an array of listeners to be removed.
	 * You can also pass it a regular expression to remove the listeners from all events that match it.
	 *
	 * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.
	 * @param {Function[]} [listeners] An optional array of listener functions to remove.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.removeListeners = function removeListeners(evt, listeners) {
		// Pass through to manipulateListeners
		return this.manipulateListeners(true, evt, listeners);
	};

	/**
	 * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.
	 * The first argument will determine if the listeners are removed (true) or added (false).
	 * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
	 * You can also pass it an event name and an array of listeners to be added/removed.
	 * You can also pass it a regular expression to manipulate the listeners of all events that match it.
	 *
	 * @param {Boolean} remove True if you want to remove listeners, false if you want to add.
	 * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.
	 * @param {Function[]} [listeners] An optional array of listener functions to add/remove.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {
		var i;
		var value;
		var single = remove ? this.removeListener : this.addListener;
		var multiple = remove ? this.removeListeners : this.addListeners;

		// If evt is an object then pass each of it's properties to this method
		if (typeof evt === 'object' && !(evt instanceof RegExp)) {
			for (i in evt) {
				if (evt.hasOwnProperty(i) && (value = evt[i])) {
					// Pass the single listener straight through to the singular method
					if (typeof value === 'function') {
						single.call(this, i, value);
					}
					else {
						// Otherwise pass back to the multiple function
						multiple.call(this, i, value);
					}
				}
			}
		}
		else {
			// So evt must be a string
			// And listeners must be an array of listeners
			// Loop over it and pass each one to the multiple method
			i = listeners.length;
			while (i--) {
				single.call(this, evt, listeners[i]);
			}
		}

		return this;
	};

	/**
	 * Removes all listeners from a specified event.
	 * If you do not specify an event then all listeners will be removed.
	 * That means every event will be emptied.
	 * You can also pass a regex to remove all events that match it.
	 *
	 * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.removeEvent = function removeEvent(evt) {
		var type = typeof evt;
		var events = this._getEvents();
		var key;

		// Remove different things depending on the state of evt
		if (type === 'string') {
			// Remove all listeners for the specified event
			delete events[evt];
		}
		else if (evt instanceof RegExp) {
			// Remove all events matching the regex.
			for (key in events) {
				if (events.hasOwnProperty(key) && evt.test(key)) {
					delete events[key];
				}
			}
		}
		else {
			// Remove all listeners in all events
			delete this._events;
		}

		return this;
	};

	/**
	 * Alias of removeEvent.
	 *
	 * Added to mirror the node API.
	 */
	proto.removeAllListeners = alias('removeEvent');

	/**
	 * Emits an event of your choice.
	 * When emitted, every listener attached to that event will be executed.
	 * If you pass the optional argument array then those arguments will be passed to every listener upon execution.
	 * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.
	 * So they will not arrive within the array on the other side, they will be separate.
	 * You can also pass a regular expression to emit to all events that match it.
	 *
	 * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
	 * @param {Array} [args] Optional array of arguments to be passed to each listener.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.emitEvent = function emitEvent(evt, args) {
		var listeners = this.getListenersAsObject(evt);
		var listener;
		var i;
		var key;
		var response;

		for (key in listeners) {
			if (listeners.hasOwnProperty(key)) {
				i = listeners[key].length;

				while (i--) {
					// If the listener returns true then it shall be removed from the event
					// The function is executed either with a basic call or an apply if there is an args array
					listener = listeners[key][i];

					if (listener.once === true) {
						this.removeListener(evt, listener.listener);
					}

					response = listener.listener.apply(this, args || []);

					if (response === this._getOnceReturnValue()) {
						this.removeListener(evt, listener.listener);
					}
				}
			}
		}

		return this;
	};

	/**
	 * Alias of emitEvent
	 */
	proto.trigger = alias('emitEvent');

	/**
	 * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.
	 * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.
	 *
	 * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
	 * @param {...*} Optional additional arguments to be passed to each listener.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.emit = function emit(evt) {
		var args = Array.prototype.slice.call(arguments, 1);
		return this.emitEvent(evt, args);
	};

	/**
	 * Sets the current value to check against when executing listeners. If a
	 * listeners return value matches the one set here then it will be removed
	 * after execution. This value defaults to true.
	 *
	 * @param {*} value The new value to check for when executing listeners.
	 * @return {Object} Current instance of EventEmitter for chaining.
	 */
	proto.setOnceReturnValue = function setOnceReturnValue(value) {
		this._onceReturnValue = value;
		return this;
	};

	/**
	 * Fetches the current value to check against when executing listeners. If
	 * the listeners return value matches this one then it should be removed
	 * automatically. It will return true by default.
	 *
	 * @return {*|Boolean} The current value to check for or the default, true.
	 * @api private
	 */
	proto._getOnceReturnValue = function _getOnceReturnValue() {
		if (this.hasOwnProperty('_onceReturnValue')) {
			return this._onceReturnValue;
		}
		else {
			return true;
		}
	};

	/**
	 * Fetches the events object and creates one if required.
	 *
	 * @return {Object} The events storage object.
	 * @api private
	 */
	proto._getEvents = function _getEvents() {
		return this._events || (this._events = {});
	};

	/**
	 * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.
	 *
	 * @return {Function} Non conflicting EventEmitter class.
	 */
	EventEmitter.noConflict = function noConflict() {
		exports.EventEmitter = originalGlobalValue;
		return EventEmitter;
	};

	return EventEmitter;
}());
/* jshint ignore:end */



	var validateTypeFunction = function( value, name ) {
		validateType( value, name, typeof value === "undefined" || typeof value === "function", "Function" );
	};




	var superGet, superInit,
		globalEe = new EventEmitter();

	function validateTypeEvent( value, name ) {
		validateType( value, name, typeof value === "string" || value instanceof RegExp, "String or RegExp" );
	}

	function validateThenCall( method, self ) {
		return function( event, listener ) {
			validatePresence( event, "event" );
			validateTypeEvent( event, "event" );

			validatePresence( listener, "listener" );
			validateTypeFunction( listener, "listener" );

			return self[ method ].apply( self, arguments );
		};
	}

	function off( self ) {
		return validateThenCall( "off", self );
	}

	function on( self ) {
		return validateThenCall( "on", self );
	}

	function once( self ) {
		return validateThenCall( "once", self );
	}

	Cldr.off = off( globalEe );
	Cldr.on = on( globalEe );
	Cldr.once = once( globalEe );

	/**
	 * Overload Cldr.prototype.init().
	 */
	superInit = Cldr.prototype.init;
	Cldr.prototype.init = function() {
		var ee;
		this.ee = ee = new EventEmitter();
		this.off = off( ee );
		this.on = on( ee );
		this.once = once( ee );
		superInit.apply( this, arguments );
	};

	/**
	 * getOverload is encapsulated, because of cldr/unresolved. If it's loaded
	 * after cldr/event (and note it overwrites .get), it can trigger this
	 * overload again.
	 */
	function getOverload() {

		/**
		 * Overload Cldr.prototype.get().
		 */
		superGet = Cldr.prototype.get;
		Cldr.prototype.get = function( path ) {
			var value = superGet.apply( this, arguments );
			path = pathNormalize( path, this.attributes ).join( "/" );
			globalEe.trigger( "get", [ path, value ] );
			this.ee.trigger( "get", [ path, value ] );
			return value;
		};
	}

	Cldr._eventInit = getOverload;
	getOverload();

	return Cldr;




}));

/**
 * CLDR JavaScript Library v0.5.4
 * http://jquery.com/
 *
 * Copyright 2013 Rafael Xavier de Souza
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2020-10-22T15:56Z
 */
/*!
 * CLDR JavaScript Library v0.5.4 2020-10-22T15:56Z MIT license © Rafael Xavier
 * http://git.io/h4lmVg
 */
(function( factory ) {

	if ( typeof define === "function" && define.amd ) {
		// AMD.
		define( [ "../cldr" ], factory );
	} else if ( typeof module === "object" && typeof module.exports === "object" ) {
		// Node. CommonJS.
		module.exports = factory( require( "../cldr" ) );
	} else {
		// Global
		factory( Cldr );
	}

}(function( Cldr ) {

	// Build optimization hack to avoid duplicating functions across modules.
	var alwaysArray = Cldr._alwaysArray;



	var supplementalMain = function( cldr ) {

		var prepend, supplemental;
		
		prepend = function( prepend ) {
			return function( path ) {
				path = alwaysArray( path );
				return cldr.get( [ prepend ].concat( path ) );
			};
		};

		supplemental = prepend( "supplemental" );

		// Week Data
		// http://www.unicode.org/reports/tr35/tr35-dates.html#Week_Data
		supplemental.weekData = prepend( "supplemental/weekData" );

		supplemental.weekData.firstDay = function() {
			return cldr.get( "supplemental/weekData/firstDay/{territory}" ) ||
				cldr.get( "supplemental/weekData/firstDay/001" );
		};

		supplemental.weekData.minDays = function() {
			var minDays = cldr.get( "supplemental/weekData/minDays/{territory}" ) ||
				cldr.get( "supplemental/weekData/minDays/001" );
			return parseInt( minDays, 10 );
		};

		// Time Data
		// http://www.unicode.org/reports/tr35/tr35-dates.html#Time_Data
		supplemental.timeData = prepend( "supplemental/timeData" );

		supplemental.timeData.allowed = function() {
			return cldr.get( "supplemental/timeData/{territory}/_allowed" ) ||
				cldr.get( "supplemental/timeData/001/_allowed" );
		};

		supplemental.timeData.preferred = function() {
			return cldr.get( "supplemental/timeData/{territory}/_preferred" ) ||
				cldr.get( "supplemental/timeData/001/_preferred" );
		};

		return supplemental;

	};




	var initSuper = Cldr.prototype.init;

	/**
	 * .init() automatically ran on construction.
	 *
	 * Overload .init().
	 */
	Cldr.prototype.init = function() {
		initSuper.apply( this, arguments );
		this.supplemental = supplementalMain( this );
	};

	return Cldr;




}));

/**
 * Globalize v1.7.0
 *
 * https://github.com/globalizejs/globalize
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2021-08-02T11:53Z
 */
/*!
 * Globalize v1.7.0 2021-08-02T11:53Z Released under the MIT license
 * http://git.io/TrdQbw
 */
(function( root, factory ) {

	// UMD returnExports
	if ( typeof define === "function" && define.amd ) {

		// AMD
		define([
			"cldr",
			"cldr/event"
		], factory );
	} else if ( typeof exports === "object" ) {

		// Node, CommonJS
		module.exports = factory( require( "cldrjs" ) );
	} else {

		// Global
		root.Globalize = factory( root.Cldr );
	}
}( this, function( Cldr ) {


/**
 * A toString method that outputs meaningful values for objects or arrays and
 * still performs as fast as a plain string in case variable is string, or as
 * fast as `"" + number` in case variable is a number.
 * Ref: http://jsperf.com/my-stringify
 */
var toString = function( variable ) {
	return typeof variable === "string" ? variable : ( typeof variable === "number" ? "" +
		variable : JSON.stringify( variable ) );
};




/**
 * formatMessage( message, data )
 *
 * @message [String] A message with optional {vars} to be replaced.
 *
 * @data [Array or JSON] Object with replacing-variables content.
 *
 * Return the formatted message. For example:
 *
 * - formatMessage( "{0} second", [ 1 ] ); // 1 second
 *
 * - formatMessage( "{0}/{1}", ["m", "s"] ); // m/s
 *
 * - formatMessage( "{name} <{email}>", {
 *     name: "Foo",
 *     email: "bar@baz.qux"
 *   }); // Foo <bar@baz.qux>
 */
var formatMessage = function( message, data ) {

	// Replace {attribute}'s
	message = message.replace( /{[0-9a-zA-Z-_. ]+}/g, function( name ) {
		name = name.replace( /^{([^}]*)}$/, "$1" );
		return toString( data[ name ] );
	});

	return message;
};




var objectExtend = function() {
	var destination = arguments[ 0 ],
		sources = [].slice.call( arguments, 1 );

	sources.forEach(function( source ) {
		var prop;
		for ( prop in source ) {
			destination[ prop ] = source[ prop ];
		}
	});

	return destination;
};




var createError = function( code, message, attributes ) {
	var error;

	message = code + ( message ? ": " + formatMessage( message, attributes ) : "" );
	error = new Error( message );
	error.code = code;

	objectExtend( error, attributes );

	return error;
};




/**
 * Pushes part to parts array, concat two consecutive parts of the same type.
 */
var partsPush = function( parts, type, value ) {

		// Concat two consecutive parts of same type
		if ( parts.length && parts[ parts.length - 1 ].type === type ) {
			parts[ parts.length - 1 ].value += value;
			return;
		}

		parts.push( { type: type, value: value } );
};




/**
 * formatMessage( message, data )
 *
 * @message [String] A message with optional {vars} to be replaced.
 *
 * @data [Array or JSON] Object with replacing-variables content.
 *
 * Return the formatted message. For example:
 *
 * - formatMessage( "{0} second", [ 1 ] );
 * > [{type: "variable", value: "1", name: "0"}, {type: "literal", value: " second"}]
 *
 * - formatMessage( "{0}/{1}", ["m", "s"] );
 * > [
 *     { type: "variable", value: "m", name: "0" },
 *     { type: "literal", value: " /" },
 *     { type: "variable", value: "s", name: "1" }
 *   ]
 */
var formatMessageToParts = function( message, data ) {

	var lastOffset = 0,
		parts = [];

	// Create parts.
	message.replace( /{[0-9a-zA-Z-_. ]+}/g, function( nameIncludingBrackets, offset ) {
		var name = nameIncludingBrackets.slice( 1, -1 );
		partsPush( parts, "literal", message.slice( lastOffset, offset ));
		partsPush( parts, "variable", data[ name ] );
		parts[ parts.length - 1 ].name = name;
		lastOffset += offset + nameIncludingBrackets.length;
	});

	// Skip empty ones such as `{ type: 'literal', value: '' }`.
	return parts.filter(function( part ) {
		return part.value !== "";
	});
};




/**
 * Returns joined parts values.
 */
var partsJoin = function( parts ) {
	return parts.map( function( part ) {
		return part.value;
	}).join( "" );
};




var runtimeStringify = function( args ) {
	return JSON.stringify( args, function( _key, value ) {
		if ( value && value.runtimeKey ) {
			return value.runtimeKey;
		}
		return value;
	} );
};




// Based on http://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript-jquery
var stringHash = function( str ) {
	return [].reduce.call( str, function( hash, i ) {
		var chr = i.charCodeAt( 0 );
		hash = ( ( hash << 5 ) - hash ) + chr;
		return hash | 0;
	}, 0 );
};




var runtimeKey = function( fnName, locale, args, argsStr ) {
	var hash;
	argsStr = argsStr || runtimeStringify( args );
	hash = stringHash( fnName + locale + argsStr );
	return hash > 0 ? "a" + hash : "b" + Math.abs( hash );
};




var functionName = function( fn ) {
	if ( fn.name !== undefined ) {
		return fn.name;
	}

	// fn.name is not supported by IE.
	var matches = /^function\s+([\w\$]+)\s*\(/.exec( fn.toString() );

	if ( matches && matches.length > 0 ) {
		return matches[ 1 ];
	}
};




var runtimeBind = function( args, cldr, fn, runtimeArgs ) {

	var argsStr = runtimeStringify( args ),
		fnName = functionName( fn ),
		locale = cldr.locale;

	// If name of the function is not available, this is most likely due to uglification,
	// which most likely means we are in production, and runtimeBind here is not necessary.
	if ( !fnName ) {
		return fn;
	}

	fn.runtimeKey = runtimeKey( fnName, locale, null, argsStr );

	fn.generatorString = function() {
		return "Globalize(\"" + locale + "\")." + fnName + "(" + argsStr.slice( 1, -1 ) + ")";
	};

	fn.runtimeArgs = runtimeArgs;

	return fn;
};




var validate = function( code, message, check, attributes ) {
	if ( !check ) {
		throw createError( code, message, attributes );
	}
};




var alwaysArray = function( stringOrArray ) {
	return Array.isArray( stringOrArray ) ? stringOrArray : stringOrArray ? [ stringOrArray ] : [];
};




var validateCldr = function( path, value, options ) {
	var skipBoolean;
	options = options || {};

	skipBoolean = alwaysArray( options.skip ).some(function( pathRe ) {
		return pathRe.test( path );
	});

	validate( "E_MISSING_CLDR", "Missing required CLDR content `{path}`.", value || skipBoolean, {
		path: path
	});
};




var validateDefaultLocale = function( value ) {
	validate( "E_DEFAULT_LOCALE_NOT_DEFINED", "Default locale has not been defined.",
		value !== undefined, {} );
};




var validateParameterPresence = function( value, name ) {
	validate( "E_MISSING_PARAMETER", "Missing required parameter `{name}`.",
		value !== undefined, { name: name });
};




/**
 * range( value, name, minimum, maximum )
 *
 * @value [Number].
 *
 * @name [String] name of variable.
 *
 * @minimum [Number]. The lowest valid value, inclusive.
 *
 * @maximum [Number]. The greatest valid value, inclusive.
 */
var validateParameterRange = function( value, name, minimum, maximum ) {
	validate(
		"E_PAR_OUT_OF_RANGE",
		"Parameter `{name}` has value `{value}` out of range [{minimum}, {maximum}].",
		value === undefined || value >= minimum && value <= maximum,
		{
			maximum: maximum,
			minimum: minimum,
			name: name,
			value: value
		}
	);
};




var validateParameterType = function( value, name, check, expected ) {
	validate(
		"E_INVALID_PAR_TYPE",
		"Invalid `{name}` parameter ({value}). {expected} expected.",
		check,
		{
			expected: expected,
			name: name,
			value: value
		}
	);
};




var validateParameterTypeLocale = function( value, name ) {
	validateParameterType(
		value,
		name,
		value === undefined || typeof value === "string" || value instanceof Cldr,
		"String or Cldr instance"
	);
};




/**
 * Function inspired by jQuery Core, but reduced to our use case.
 */
var isPlainObject = function( obj ) {
	return obj !== null && "" + obj === "[object Object]";
};




var validateParameterTypePlainObject = function( value, name ) {
	validateParameterType(
		value,
		name,
		value === undefined || isPlainObject( value ),
		"Plain Object"
	);
};




var alwaysCldr = function( localeOrCldr ) {
	return localeOrCldr instanceof Cldr ? localeOrCldr : new Cldr( localeOrCldr );
};




// ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions?redirectlocale=en-US&redirectslug=JavaScript%2FGuide%2FRegular_Expressions
var regexpEscape = function( string ) {
	return string.replace( /([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1" );
};




var stringPad = function( str, count, right ) {
	var length;
	if ( typeof str !== "string" ) {
		str = String( str );
	}
	for ( length = str.length; length < count; length += 1 ) {
		str = ( right ? ( str + "0" ) : ( "0" + str ) );
	}
	return str;
};




function validateLikelySubtags( cldr ) {
	cldr.once( "get", validateCldr );
	cldr.get( "supplemental/likelySubtags" );
}

/**
 * [new] Globalize( locale|cldr )
 *
 * @locale [String]
 *
 * @cldr [Cldr instance]
 *
 * Create a Globalize instance.
 */
function Globalize( locale ) {
	if ( !( this instanceof Globalize ) ) {
		return new Globalize( locale );
	}

	validateParameterPresence( locale, "locale" );
	validateParameterTypeLocale( locale, "locale" );

	this.cldr = alwaysCldr( locale );

	validateLikelySubtags( this.cldr );
}

/**
 * Globalize.load( json, ... )
 *
 * @json [JSON]
 *
 * Load resolved or unresolved cldr data.
 * Somewhat equivalent to previous Globalize.addCultureInfo(...).
 */
Globalize.load = function() {

	// validations are delegated to Cldr.load().
	Cldr.load.apply( Cldr, arguments );
};

/**
 * Globalize.locale( [locale|cldr] )
 *
 * @locale [String]
 *
 * @cldr [Cldr instance]
 *
 * Set default Cldr instance if locale or cldr argument is passed.
 *
 * Return the default Cldr instance.
 */
Globalize.locale = function( locale ) {
	validateParameterTypeLocale( locale, "locale" );

	if ( arguments.length ) {
		this.cldr = alwaysCldr( locale );
		validateLikelySubtags( this.cldr );
	}
	return this.cldr;
};

/**
 * Optimization to avoid duplicating some internal functions across modules.
 */
Globalize._alwaysArray = alwaysArray;
Globalize._createError = createError;
Globalize._formatMessage = formatMessage;
Globalize._formatMessageToParts = formatMessageToParts;
Globalize._isPlainObject = isPlainObject;
Globalize._objectExtend = objectExtend;
Globalize._partsJoin = partsJoin;
Globalize._partsPush = partsPush;
Globalize._regexpEscape = regexpEscape;
Globalize._runtimeBind = runtimeBind;
Globalize._stringPad = stringPad;
Globalize._validate = validate;
Globalize._validateCldr = validateCldr;
Globalize._validateDefaultLocale = validateDefaultLocale;
Globalize._validateParameterPresence = validateParameterPresence;
Globalize._validateParameterRange = validateParameterRange;
Globalize._validateParameterTypePlainObject = validateParameterTypePlainObject;
Globalize._validateParameterType = validateParameterType;

return Globalize;




}));

/**
 * Globalize v1.7.0
 *
 * https://github.com/globalizejs/globalize
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2021-08-02T11:53Z
 */
/*!
 * Globalize v1.7.0 2021-08-02T11:53Z Released under the MIT license
 * http://git.io/TrdQbw
 */
(function( root, factory ) {

	// UMD returnExports
	if ( typeof define === "function" && define.amd ) {

		// AMD
		define([
			"cldr",
			"../globalize",
			"cldr/event"
		], factory );
	} else if ( typeof exports === "object" ) {

		// Node, CommonJS
		module.exports = factory( require( "cldrjs" ), require( "../globalize" ) );
	} else {

		// Extend global
		factory( root.Cldr, root.Globalize );
	}
}(this, function( Cldr, Globalize ) {

var alwaysArray = Globalize._alwaysArray,
	createError = Globalize._createError,
	isPlainObject = Globalize._isPlainObject,
	runtimeBind = Globalize._runtimeBind,
	validateDefaultLocale = Globalize._validateDefaultLocale,
	validate = Globalize._validate,
	validateParameterPresence = Globalize._validateParameterPresence,
	validateParameterType = Globalize._validateParameterType,
	validateParameterTypePlainObject = Globalize._validateParameterTypePlainObject;
var MessageFormat;
/* eslint-disable */
MessageFormat = (function() {
MessageFormat._parse = (function() {

  /*
   * Generated by PEG.js 0.8.0.
   *
   * http://pegjs.majda.cz/
   */

  function peg$subclass(child, parent) {
    function ctor() { this.constructor = child; }
    ctor.prototype = parent.prototype;
    child.prototype = new ctor();
  }

  function SyntaxError(message, expected, found, offset, line, column) {
    this.message  = message;
    this.expected = expected;
    this.found    = found;
    this.offset   = offset;
    this.line     = line;
    this.column   = column;

    this.name     = "SyntaxError";
  }

  peg$subclass(SyntaxError, Error);

  function parse(input) {
    var options = arguments.length > 1 ? arguments[1] : {},

        peg$FAILED = {},

        peg$startRuleFunctions = { start: peg$parsestart },
        peg$startRuleFunction  = peg$parsestart,

        peg$c0 = [],
        peg$c1 = function(st) {
              return { type: 'messageFormatPattern', statements: st };
            },
        peg$c2 = peg$FAILED,
        peg$c3 = "{",
        peg$c4 = { type: "literal", value: "{", description: "\"{\"" },
        peg$c5 = null,
        peg$c6 = ",",
        peg$c7 = { type: "literal", value: ",", description: "\",\"" },
        peg$c8 = "}",
        peg$c9 = { type: "literal", value: "}", description: "\"}\"" },
        peg$c10 = function(argIdx, efmt) {
              var res = {
                type: "messageFormatElement",
                argumentIndex: argIdx
              };
              if (efmt && efmt.length) {
                res.elementFormat = efmt[1];
              } else {
                res.output = true;
              }
              return res;
            },
        peg$c11 = "plural",
        peg$c12 = { type: "literal", value: "plural", description: "\"plural\"" },
        peg$c13 = function(t, s) {
              return { type: "elementFormat", key: t, val: s };
            },
        peg$c14 = "selectordinal",
        peg$c15 = { type: "literal", value: "selectordinal", description: "\"selectordinal\"" },
        peg$c16 = "select",
        peg$c17 = { type: "literal", value: "select", description: "\"select\"" },
        peg$c18 = function(t, p) {
              return { type: "elementFormat", key: t, val: p };
            },
        peg$c19 = function(op, pf) {
              return { type: "pluralFormatPattern", pluralForms: pf, offset: op || 0 };
            },
        peg$c20 = "offset",
        peg$c21 = { type: "literal", value: "offset", description: "\"offset\"" },
        peg$c22 = ":",
        peg$c23 = { type: "literal", value: ":", description: "\":\"" },
        peg$c24 = function(d) { return d; },
        peg$c25 = function(k, mfp) {
              return { key: k, val: mfp };
            },
        peg$c26 = function(i) { return i; },
        peg$c27 = "=",
        peg$c28 = { type: "literal", value: "=", description: "\"=\"" },
        peg$c29 = function(pf) { return { type: "selectFormatPattern", pluralForms: pf }; },
        peg$c30 = function(p) { return p; },
        peg$c31 = "#",
        peg$c32 = { type: "literal", value: "#", description: "\"#\"" },
        peg$c33 = function() { return {type: 'octothorpe'}; },
        peg$c34 = function(s) { return { type: "string", val: s.join('') }; },
        peg$c35 = { type: "other", description: "identifier" },
        peg$c36 = /^[0-9a-zA-Z$_]/,
        peg$c37 = { type: "class", value: "[0-9a-zA-Z$_]", description: "[0-9a-zA-Z$_]" },
        peg$c38 = /^[^ \t\n\r,.+={}]/,
        peg$c39 = { type: "class", value: "[^ \\t\\n\\r,.+={}]", description: "[^ \\t\\n\\r,.+={}]" },
        peg$c40 = function(s) { return s; },
        peg$c41 = function(chars) { return chars.join(''); },
        peg$c42 = /^[^{}#\\\0-\x1F \t\n\r]/,
        peg$c43 = { type: "class", value: "[^{}#\\\\\\0-\\x1F \\t\\n\\r]", description: "[^{}#\\\\\\0-\\x1F \\t\\n\\r]" },
        peg$c44 = function(x) { return x; },
        peg$c45 = "\\\\",
        peg$c46 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" },
        peg$c47 = function() { return "\\"; },
        peg$c48 = "\\#",
        peg$c49 = { type: "literal", value: "\\#", description: "\"\\\\#\"" },
        peg$c50 = function() { return "#"; },
        peg$c51 = "\\{",
        peg$c52 = { type: "literal", value: "\\{", description: "\"\\\\{\"" },
        peg$c53 = function() { return "\u007B"; },
        peg$c54 = "\\}",
        peg$c55 = { type: "literal", value: "\\}", description: "\"\\\\}\"" },
        peg$c56 = function() { return "\u007D"; },
        peg$c57 = "\\u",
        peg$c58 = { type: "literal", value: "\\u", description: "\"\\\\u\"" },
        peg$c59 = function(h1, h2, h3, h4) {
              return String.fromCharCode(parseInt("0x" + h1 + h2 + h3 + h4));
            },
        peg$c60 = /^[0-9]/,
        peg$c61 = { type: "class", value: "[0-9]", description: "[0-9]" },
        peg$c62 = function(ds) {
            //the number might start with 0 but must not be interpreted as an octal number
            //Hence, the base is passed to parseInt explicitely
            return parseInt((ds.join('')), 10);
          },
        peg$c63 = /^[0-9a-fA-F]/,
        peg$c64 = { type: "class", value: "[0-9a-fA-F]", description: "[0-9a-fA-F]" },
        peg$c65 = { type: "other", description: "whitespace" },
        peg$c66 = function(w) { return w.join(''); },
        peg$c67 = /^[ \t\n\r]/,
        peg$c68 = { type: "class", value: "[ \\t\\n\\r]", description: "[ \\t\\n\\r]" },

        peg$currPos          = 0,
        peg$reportedPos      = 0,
        peg$cachedPos        = 0,
        peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },
        peg$maxFailPos       = 0,
        peg$maxFailExpected  = [],
        peg$silentFails      = 0,

        peg$result;

    if ("startRule" in options) {
      if (!(options.startRule in peg$startRuleFunctions)) {
        throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
      }

      peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
    }

    function text() {
      return input.substring(peg$reportedPos, peg$currPos);
    }

    function offset() {
      return peg$reportedPos;
    }

    function line() {
      return peg$computePosDetails(peg$reportedPos).line;
    }

    function column() {
      return peg$computePosDetails(peg$reportedPos).column;
    }

    function expected(description) {
      throw peg$buildException(
        null,
        [{ type: "other", description: description }],
        peg$reportedPos
      );
    }

    function error(message) {
      throw peg$buildException(message, null, peg$reportedPos);
    }

    function peg$computePosDetails(pos) {
      function advance(details, startPos, endPos) {
        var p, ch;

        for (p = startPos; p < endPos; p++) {
          ch = input.charAt(p);
          if (ch === "\n") {
            if (!details.seenCR) { details.line++; }
            details.column = 1;
            details.seenCR = false;
          } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") {
            details.line++;
            details.column = 1;
            details.seenCR = true;
          } else {
            details.column++;
            details.seenCR = false;
          }
        }
      }

      if (peg$cachedPos !== pos) {
        if (peg$cachedPos > pos) {
          peg$cachedPos = 0;
          peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };
        }
        advance(peg$cachedPosDetails, peg$cachedPos, pos);
        peg$cachedPos = pos;
      }

      return peg$cachedPosDetails;
    }

    function peg$fail(expected) {
      if (peg$currPos < peg$maxFailPos) { return; }

      if (peg$currPos > peg$maxFailPos) {
        peg$maxFailPos = peg$currPos;
        peg$maxFailExpected = [];
      }

      peg$maxFailExpected.push(expected);
    }

    function peg$buildException(message, expected, pos) {
      function cleanupExpected(expected) {
        var i = 1;

        expected.sort(function(a, b) {
          if (a.description < b.description) {
            return -1;
          } else if (a.description > b.description) {
            return 1;
          } else {
            return 0;
          }
        });

        while (i < expected.length) {
          if (expected[i - 1] === expected[i]) {
            expected.splice(i, 1);
          } else {
            i++;
          }
        }
      }

      function buildMessage(expected, found) {
        function stringEscape(s) {
          function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }

          return s
            .replace(/\\/g,   '\\\\')
            .replace(/"/g,    '\\"')
            .replace(/\x08/g, '\\b')
            .replace(/\t/g,   '\\t')
            .replace(/\n/g,   '\\n')
            .replace(/\f/g,   '\\f')
            .replace(/\r/g,   '\\r')
            .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
            .replace(/[\x10-\x1F\x80-\xFF]/g,    function(ch) { return '\\x'  + hex(ch); })
            .replace(/[\u0180-\u0FFF]/g,         function(ch) { return '\\u0' + hex(ch); })
            .replace(/[\u1080-\uFFFF]/g,         function(ch) { return '\\u'  + hex(ch); });
        }

        var expectedDescs = new Array(expected.length),
            expectedDesc, foundDesc, i;

        for (i = 0; i < expected.length; i++) {
          expectedDescs[i] = expected[i].description;
        }

        expectedDesc = expected.length > 1
          ? expectedDescs.slice(0, -1).join(", ")
              + " or "
              + expectedDescs[expected.length - 1]
          : expectedDescs[0];

        foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input";

        return "Expected " + expectedDesc + " but " + foundDesc + " found.";
      }

      var posDetails = peg$computePosDetails(pos),
          found      = pos < input.length ? input.charAt(pos) : null;

      if (expected !== null) {
        cleanupExpected(expected);
      }

      return new SyntaxError(
        message !== null ? message : buildMessage(expected, found),
        expected,
        found,
        pos,
        posDetails.line,
        posDetails.column
      );
    }

    function peg$parsestart() {
      var s0;

      s0 = peg$parsemessageFormatPattern();

      return s0;
    }

    function peg$parsemessageFormatPattern() {
      var s0, s1, s2;

      s0 = peg$currPos;
      s1 = [];
      s2 = peg$parsemessageFormatElement();
      if (s2 === peg$FAILED) {
        s2 = peg$parsestring();
        if (s2 === peg$FAILED) {
          s2 = peg$parseoctothorpe();
        }
      }
      while (s2 !== peg$FAILED) {
        s1.push(s2);
        s2 = peg$parsemessageFormatElement();
        if (s2 === peg$FAILED) {
          s2 = peg$parsestring();
          if (s2 === peg$FAILED) {
            s2 = peg$parseoctothorpe();
          }
        }
      }
      if (s1 !== peg$FAILED) {
        peg$reportedPos = s0;
        s1 = peg$c1(s1);
      }
      s0 = s1;

      return s0;
    }

    function peg$parsemessageFormatElement() {
      var s0, s1, s2, s3, s4, s5, s6;

      s0 = peg$currPos;
      if (input.charCodeAt(peg$currPos) === 123) {
        s1 = peg$c3;
        peg$currPos++;
      } else {
        s1 = peg$FAILED;
        if (peg$silentFails === 0) { peg$fail(peg$c4); }
      }
      if (s1 !== peg$FAILED) {
        s2 = peg$parse_();
        if (s2 !== peg$FAILED) {
          s3 = peg$parseid();
          if (s3 !== peg$FAILED) {
            s4 = peg$currPos;
            if (input.charCodeAt(peg$currPos) === 44) {
              s5 = peg$c6;
              peg$currPos++;
            } else {
              s5 = peg$FAILED;
              if (peg$silentFails === 0) { peg$fail(peg$c7); }
            }
            if (s5 !== peg$FAILED) {
              s6 = peg$parseelementFormat();
              if (s6 !== peg$FAILED) {
                s5 = [s5, s6];
                s4 = s5;
              } else {
                peg$currPos = s4;
                s4 = peg$c2;
              }
            } else {
              peg$currPos = s4;
              s4 = peg$c2;
            }
            if (s4 === peg$FAILED) {
              s4 = peg$c5;
            }
            if (s4 !== peg$FAILED) {
              s5 = peg$parse_();
              if (s5 !== peg$FAILED) {
                if (input.charCodeAt(peg$currPos) === 125) {
                  s6 = peg$c8;
                  peg$currPos++;
                } else {
                  s6 = peg$FAILED;
                  if (peg$silentFails === 0) { peg$fail(peg$c9); }
                }
                if (s6 !== peg$FAILED) {
                  peg$reportedPos = s0;
                  s1 = peg$c10(s3, s4);
                  s0 = s1;
                } else {
                  peg$currPos = s0;
                  s0 = peg$c2;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$c2;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$c2;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
      } else {
        peg$currPos = s0;
        s0 = peg$c2;
      }

      return s0;
    }

    function peg$parseelementFormat() {
      var s0, s1, s2, s3, s4, s5, s6, s7;

      s0 = peg$currPos;
      s1 = peg$parse_();
      if (s1 !== peg$FAILED) {
        if (input.substr(peg$currPos, 6) === peg$c11) {
          s2 = peg$c11;
          peg$currPos += 6;
        } else {
          s2 = peg$FAILED;
          if (peg$silentFails === 0) { peg$fail(peg$c12); }
        }
        if (s2 !== peg$FAILED) {
          s3 = peg$parse_();
          if (s3 !== peg$FAILED) {
            if (input.charCodeAt(peg$currPos) === 44) {
              s4 = peg$c6;
              peg$currPos++;
            } else {
              s4 = peg$FAILED;
              if (peg$silentFails === 0) { peg$fail(peg$c7); }
            }
            if (s4 !== peg$FAILED) {
              s5 = peg$parse_();
              if (s5 !== peg$FAILED) {
                s6 = peg$parsepluralFormatPattern();
                if (s6 !== peg$FAILED) {
                  s7 = peg$parse_();
                  if (s7 !== peg$FAILED) {
                    peg$reportedPos = s0;
                    s1 = peg$c13(s2, s6);
                    s0 = s1;
                  } else {
                    peg$currPos = s0;
                    s0 = peg$c2;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$c2;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$c2;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$c2;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
      } else {
        peg$currPos = s0;
        s0 = peg$c2;
      }
      if (s0 === peg$FAILED) {
        s0 = peg$currPos;
        s1 = peg$parse_();
        if (s1 !== peg$FAILED) {
          if (input.substr(peg$currPos, 13) === peg$c14) {
            s2 = peg$c14;
            peg$currPos += 13;
          } else {
            s2 = peg$FAILED;
            if (peg$silentFails === 0) { peg$fail(peg$c15); }
          }
          if (s2 !== peg$FAILED) {
            s3 = peg$parse_();
            if (s3 !== peg$FAILED) {
              if (input.charCodeAt(peg$currPos) === 44) {
                s4 = peg$c6;
                peg$currPos++;
              } else {
                s4 = peg$FAILED;
                if (peg$silentFails === 0) { peg$fail(peg$c7); }
              }
              if (s4 !== peg$FAILED) {
                s5 = peg$parse_();
                if (s5 !== peg$FAILED) {
                  s6 = peg$parsepluralFormatPattern();
                  if (s6 !== peg$FAILED) {
                    s7 = peg$parse_();
                    if (s7 !== peg$FAILED) {
                      peg$reportedPos = s0;
                      s1 = peg$c13(s2, s6);
                      s0 = s1;
                    } else {
                      peg$currPos = s0;
                      s0 = peg$c2;
                    }
                  } else {
                    peg$currPos = s0;
                    s0 = peg$c2;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$c2;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$c2;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$c2;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
        if (s0 === peg$FAILED) {
          s0 = peg$currPos;
          s1 = peg$parse_();
          if (s1 !== peg$FAILED) {
            if (input.substr(peg$currPos, 6) === peg$c16) {
              s2 = peg$c16;
              peg$currPos += 6;
            } else {
              s2 = peg$FAILED;
              if (peg$silentFails === 0) { peg$fail(peg$c17); }
            }
            if (s2 !== peg$FAILED) {
              s3 = peg$parse_();
              if (s3 !== peg$FAILED) {
                if (input.charCodeAt(peg$currPos) === 44) {
                  s4 = peg$c6;
                  peg$currPos++;
                } else {
                  s4 = peg$FAILED;
                  if (peg$silentFails === 0) { peg$fail(peg$c7); }
                }
                if (s4 !== peg$FAILED) {
                  s5 = peg$parse_();
                  if (s5 !== peg$FAILED) {
                    s6 = peg$parseselectFormatPattern();
                    if (s6 !== peg$FAILED) {
                      s7 = peg$parse_();
                      if (s7 !== peg$FAILED) {
                        peg$reportedPos = s0;
                        s1 = peg$c13(s2, s6);
                        s0 = s1;
                      } else {
                        peg$currPos = s0;
                        s0 = peg$c2;
                      }
                    } else {
                      peg$currPos = s0;
                      s0 = peg$c2;
                    }
                  } else {
                    peg$currPos = s0;
                    s0 = peg$c2;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$c2;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$c2;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$c2;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
          if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            s1 = peg$parse_();
            if (s1 !== peg$FAILED) {
              s2 = peg$parseid();
              if (s2 !== peg$FAILED) {
                s3 = [];
                s4 = peg$parseargStylePattern();
                while (s4 !== peg$FAILED) {
                  s3.push(s4);
                  s4 = peg$parseargStylePattern();
                }
                if (s3 !== peg$FAILED) {
                  peg$reportedPos = s0;
                  s1 = peg$c18(s2, s3);
                  s0 = s1;
                } else {
                  peg$currPos = s0;
                  s0 = peg$c2;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$c2;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$c2;
            }
          }
        }
      }

      return s0;
    }

    function peg$parsepluralFormatPattern() {
      var s0, s1, s2, s3;

      s0 = peg$currPos;
      s1 = peg$parseoffsetPattern();
      if (s1 === peg$FAILED) {
        s1 = peg$c5;
      }
      if (s1 !== peg$FAILED) {
        s2 = [];
        s3 = peg$parsepluralForm();
        if (s3 !== peg$FAILED) {
          while (s3 !== peg$FAILED) {
            s2.push(s3);
            s3 = peg$parsepluralForm();
          }
        } else {
          s2 = peg$c2;
        }
        if (s2 !== peg$FAILED) {
          peg$reportedPos = s0;
          s1 = peg$c19(s1, s2);
          s0 = s1;
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
      } else {
        peg$currPos = s0;
        s0 = peg$c2;
      }

      return s0;
    }

    function peg$parseoffsetPattern() {
      var s0, s1, s2, s3, s4, s5, s6, s7;

      s0 = peg$currPos;
      s1 = peg$parse_();
      if (s1 !== peg$FAILED) {
        if (input.substr(peg$currPos, 6) === peg$c20) {
          s2 = peg$c20;
          peg$currPos += 6;
        } else {
          s2 = peg$FAILED;
          if (peg$silentFails === 0) { peg$fail(peg$c21); }
        }
        if (s2 !== peg$FAILED) {
          s3 = peg$parse_();
          if (s3 !== peg$FAILED) {
            if (input.charCodeAt(peg$currPos) === 58) {
              s4 = peg$c22;
              peg$currPos++;
            } else {
              s4 = peg$FAILED;
              if (peg$silentFails === 0) { peg$fail(peg$c23); }
            }
            if (s4 !== peg$FAILED) {
              s5 = peg$parse_();
              if (s5 !== peg$FAILED) {
                s6 = peg$parsedigits();
                if (s6 !== peg$FAILED) {
                  s7 = peg$parse_();
                  if (s7 !== peg$FAILED) {
                    peg$reportedPos = s0;
                    s1 = peg$c24(s6);
                    s0 = s1;
                  } else {
                    peg$currPos = s0;
                    s0 = peg$c2;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$c2;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$c2;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$c2;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
      } else {
        peg$currPos = s0;
        s0 = peg$c2;
      }

      return s0;
    }

    function peg$parsepluralForm() {
      var s0, s1, s2, s3, s4, s5, s6, s7, s8;

      s0 = peg$currPos;
      s1 = peg$parse_();
      if (s1 !== peg$FAILED) {
        s2 = peg$parsepluralKey();
        if (s2 !== peg$FAILED) {
          s3 = peg$parse_();
          if (s3 !== peg$FAILED) {
            if (input.charCodeAt(peg$currPos) === 123) {
              s4 = peg$c3;
              peg$currPos++;
            } else {
              s4 = peg$FAILED;
              if (peg$silentFails === 0) { peg$fail(peg$c4); }
            }
            if (s4 !== peg$FAILED) {
              s5 = peg$parse_();
              if (s5 !== peg$FAILED) {
                s6 = peg$parsemessageFormatPattern();
                if (s6 !== peg$FAILED) {
                  s7 = peg$parse_();
                  if (s7 !== peg$FAILED) {
                    if (input.charCodeAt(peg$currPos) === 125) {
                      s8 = peg$c8;
                      peg$currPos++;
                    } else {
                      s8 = peg$FAILED;
                      if (peg$silentFails === 0) { peg$fail(peg$c9); }
                    }
                    if (s8 !== peg$FAILED) {
                      peg$reportedPos = s0;
                      s1 = peg$c25(s2, s6);
                      s0 = s1;
                    } else {
                      peg$currPos = s0;
                      s0 = peg$c2;
                    }
                  } else {
                    peg$currPos = s0;
                    s0 = peg$c2;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$c2;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$c2;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$c2;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
      } else {
        peg$currPos = s0;
        s0 = peg$c2;
      }

      return s0;
    }

    function peg$parsepluralKey() {
      var s0, s1, s2;

      s0 = peg$currPos;
      s1 = peg$parseid();
      if (s1 !== peg$FAILED) {
        peg$reportedPos = s0;
        s1 = peg$c26(s1);
      }
      s0 = s1;
      if (s0 === peg$FAILED) {
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 61) {
          s1 = peg$c27;
          peg$currPos++;
        } else {
          s1 = peg$FAILED;
          if (peg$silentFails === 0) { peg$fail(peg$c28); }
        }
        if (s1 !== peg$FAILED) {
          s2 = peg$parsedigits();
          if (s2 !== peg$FAILED) {
            peg$reportedPos = s0;
            s1 = peg$c24(s2);
            s0 = s1;
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
      }

      return s0;
    }

    function peg$parseselectFormatPattern() {
      var s0, s1, s2;

      s0 = peg$currPos;
      s1 = [];
      s2 = peg$parseselectForm();
      if (s2 !== peg$FAILED) {
        while (s2 !== peg$FAILED) {
          s1.push(s2);
          s2 = peg$parseselectForm();
        }
      } else {
        s1 = peg$c2;
      }
      if (s1 !== peg$FAILED) {
        peg$reportedPos = s0;
        s1 = peg$c29(s1);
      }
      s0 = s1;

      return s0;
    }

    function peg$parseselectForm() {
      var s0, s1, s2, s3, s4, s5, s6, s7, s8;

      s0 = peg$currPos;
      s1 = peg$parse_();
      if (s1 !== peg$FAILED) {
        s2 = peg$parseid();
        if (s2 !== peg$FAILED) {
          s3 = peg$parse_();
          if (s3 !== peg$FAILED) {
            if (input.charCodeAt(peg$currPos) === 123) {
              s4 = peg$c3;
              peg$currPos++;
            } else {
              s4 = peg$FAILED;
              if (peg$silentFails === 0) { peg$fail(peg$c4); }
            }
            if (s4 !== peg$FAILED) {
              s5 = peg$parse_();
              if (s5 !== peg$FAILED) {
                s6 = peg$parsemessageFormatPattern();
                if (s6 !== peg$FAILED) {
                  s7 = peg$parse_();
                  if (s7 !== peg$FAILED) {
                    if (input.charCodeAt(peg$currPos) === 125) {
                      s8 = peg$c8;
                      peg$currPos++;
                    } else {
                      s8 = peg$FAILED;
                      if (peg$silentFails === 0) { peg$fail(peg$c9); }
                    }
                    if (s8 !== peg$FAILED) {
                      peg$reportedPos = s0;
                      s1 = peg$c25(s2, s6);
                      s0 = s1;
                    } else {
                      peg$currPos = s0;
                      s0 = peg$c2;
                    }
                  } else {
                    peg$currPos = s0;
                    s0 = peg$c2;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$c2;
                }
              } else {
                peg$currPos = s0;
                s0 = peg$c2;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$c2;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
      } else {
        peg$currPos = s0;
        s0 = peg$c2;
      }

      return s0;
    }

    function peg$parseargStylePattern() {
      var s0, s1, s2, s3, s4, s5;

      s0 = peg$currPos;
      s1 = peg$parse_();
      if (s1 !== peg$FAILED) {
        if (input.charCodeAt(peg$currPos) === 44) {
          s2 = peg$c6;
          peg$currPos++;
        } else {
          s2 = peg$FAILED;
          if (peg$silentFails === 0) { peg$fail(peg$c7); }
        }
        if (s2 !== peg$FAILED) {
          s3 = peg$parse_();
          if (s3 !== peg$FAILED) {
            s4 = peg$parseid();
            if (s4 !== peg$FAILED) {
              s5 = peg$parse_();
              if (s5 !== peg$FAILED) {
                peg$reportedPos = s0;
                s1 = peg$c30(s4);
                s0 = s1;
              } else {
                peg$currPos = s0;
                s0 = peg$c2;
              }
            } else {
              peg$currPos = s0;
              s0 = peg$c2;
            }
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
      } else {
        peg$currPos = s0;
        s0 = peg$c2;
      }

      return s0;
    }

    function peg$parseoctothorpe() {
      var s0, s1;

      s0 = peg$currPos;
      if (input.charCodeAt(peg$currPos) === 35) {
        s1 = peg$c31;
        peg$currPos++;
      } else {
        s1 = peg$FAILED;
        if (peg$silentFails === 0) { peg$fail(peg$c32); }
      }
      if (s1 !== peg$FAILED) {
        peg$reportedPos = s0;
        s1 = peg$c33();
      }
      s0 = s1;

      return s0;
    }

    function peg$parsestring() {
      var s0, s1, s2;

      s0 = peg$currPos;
      s1 = [];
      s2 = peg$parsechars();
      if (s2 === peg$FAILED) {
        s2 = peg$parsewhitespace();
      }
      if (s2 !== peg$FAILED) {
        while (s2 !== peg$FAILED) {
          s1.push(s2);
          s2 = peg$parsechars();
          if (s2 === peg$FAILED) {
            s2 = peg$parsewhitespace();
          }
        }
      } else {
        s1 = peg$c2;
      }
      if (s1 !== peg$FAILED) {
        peg$reportedPos = s0;
        s1 = peg$c34(s1);
      }
      s0 = s1;

      return s0;
    }

    function peg$parseid() {
      var s0, s1, s2, s3, s4, s5, s6;

      peg$silentFails++;
      s0 = peg$currPos;
      s1 = peg$parse_();
      if (s1 !== peg$FAILED) {
        s2 = peg$currPos;
        s3 = peg$currPos;
        if (peg$c36.test(input.charAt(peg$currPos))) {
          s4 = input.charAt(peg$currPos);
          peg$currPos++;
        } else {
          s4 = peg$FAILED;
          if (peg$silentFails === 0) { peg$fail(peg$c37); }
        }
        if (s4 !== peg$FAILED) {
          s5 = [];
          if (peg$c38.test(input.charAt(peg$currPos))) {
            s6 = input.charAt(peg$currPos);
            peg$currPos++;
          } else {
            s6 = peg$FAILED;
            if (peg$silentFails === 0) { peg$fail(peg$c39); }
          }
          while (s6 !== peg$FAILED) {
            s5.push(s6);
            if (peg$c38.test(input.charAt(peg$currPos))) {
              s6 = input.charAt(peg$currPos);
              peg$currPos++;
            } else {
              s6 = peg$FAILED;
              if (peg$silentFails === 0) { peg$fail(peg$c39); }
            }
          }
          if (s5 !== peg$FAILED) {
            s4 = [s4, s5];
            s3 = s4;
          } else {
            peg$currPos = s3;
            s3 = peg$c2;
          }
        } else {
          peg$currPos = s3;
          s3 = peg$c2;
        }
        if (s3 !== peg$FAILED) {
          s3 = input.substring(s2, peg$currPos);
        }
        s2 = s3;
        if (s2 !== peg$FAILED) {
          s3 = peg$parse_();
          if (s3 !== peg$FAILED) {
            peg$reportedPos = s0;
            s1 = peg$c40(s2);
            s0 = s1;
          } else {
            peg$currPos = s0;
            s0 = peg$c2;
          }
        } else {
          peg$currPos = s0;
          s0 = peg$c2;
        }
      } else {
        peg$currPos = s0;
        s0 = peg$c2;
      }
      peg$silentFails--;
      if (s0 === peg$FAILED) {
        s1 = peg$FAILED;
        if (peg$silentFails === 0) { peg$fail(peg$c35); }
      }

      return s0;
    }

    function peg$parsechars() {
      var s0, s1, s2;

      s0 = peg$currPos;
      s1 = [];
      s2 = peg$parsechar();
      if (s2 !== peg$FAILED) {
        while (s2 !== peg$FAILED) {
          s1.push(s2);
          s2 = peg$parsechar();
        }
      } else {
        s1 = peg$c2;
      }
      if (s1 !== peg$FAILED) {
        peg$reportedPos = s0;
        s1 = peg$c41(s1);
      }
      s0 = s1;

      return s0;
    }

    function peg$parsechar() {
      var s0, s1, s2, s3, s4, s5;

      s0 = peg$currPos;
      if (peg$c42.test(input.charAt(peg$currPos))) {
        s1 = input.charAt(peg$currPos);
        peg$currPos++;
      } else {
        s1 = peg$FAILED;
        if (peg$silentFails === 0) { peg$fail(peg$c43); }
      }
      if (s1 !== peg$FAILED) {
        peg$reportedPos = s0;
        s1 = peg$c44(s1);
      }
      s0 = s1;
      if (s0 === peg$FAILED) {
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c45) {
          s1 = peg$c45;
          peg$currPos += 2;
        } else {
          s1 = peg$FAILED;
          if (peg$silentFails === 0) { peg$fail(peg$c46); }
        }
        if (s1 !== peg$FAILED) {
          peg$reportedPos = s0;
          s1 = peg$c47();
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
          s0 = peg$currPos;
          if (input.substr(peg$currPos, 2) === peg$c48) {
            s1 = peg$c48;
            peg$currPos += 2;
          } else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) { peg$fail(peg$c49); }
          }
          if (s1 !== peg$FAILED) {
            peg$reportedPos = s0;
            s1 = peg$c50();
          }
          s0 = s1;
          if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            if (input.substr(peg$currPos, 2) === peg$c51) {
              s1 = peg$c51;
              peg$currPos += 2;
            } else {
              s1 = peg$FAILED;
              if (peg$silentFails === 0) { peg$fail(peg$c52); }
            }
            if (s1 !== peg$FAILED) {
              peg$reportedPos = s0;
              s1 = peg$c53();
            }
            s0 = s1;
            if (s0 === peg$FAILED) {
              s0 = peg$currPos;
              if (input.substr(peg$currPos, 2) === peg$c54) {
                s1 = peg$c54;
                peg$currPos += 2;
              } else {
                s1 = peg$FAILED;
                if (peg$silentFails === 0) { peg$fail(peg$c55); }
              }
              if (s1 !== peg$FAILED) {
                peg$reportedPos = s0;
                s1 = peg$c56();
              }
              s0 = s1;
              if (s0 === peg$FAILED) {
                s0 = peg$currPos;
                if (input.substr(peg$currPos, 2) === peg$c57) {
                  s1 = peg$c57;
                  peg$currPos += 2;
                } else {
                  s1 = peg$FAILED;
                  if (peg$silentFails === 0) { peg$fail(peg$c58); }
                }
                if (s1 !== peg$FAILED) {
                  s2 = peg$parsehexDigit();
                  if (s2 !== peg$FAILED) {
                    s3 = peg$parsehexDigit();
                    if (s3 !== peg$FAILED) {
                      s4 = peg$parsehexDigit();
                      if (s4 !== peg$FAILED) {
                        s5 = peg$parsehexDigit();
                        if (s5 !== peg$FAILED) {
                          peg$reportedPos = s0;
                          s1 = peg$c59(s2, s3, s4, s5);
                          s0 = s1;
                        } else {
                          peg$currPos = s0;
                          s0 = peg$c2;
                        }
                      } else {
                        peg$currPos = s0;
                        s0 = peg$c2;
                      }
                    } else {
                      peg$currPos = s0;
                      s0 = peg$c2;
                    }
                  } else {
                    peg$currPos = s0;
                    s0 = peg$c2;
                  }
                } else {
                  peg$currPos = s0;
                  s0 = peg$c2;
                }
              }
            }
          }
        }
      }

      return s0;
    }

    function peg$parsedigits() {
      var s0, s1, s2;

      s0 = peg$currPos;
      s1 = [];
      if (peg$c60.test(input.charAt(peg$currPos))) {
        s2 = input.charAt(peg$currPos);
        peg$currPos++;
      } else {
        s2 = peg$FAILED;
        if (peg$silentFails === 0) { peg$fail(peg$c61); }
      }
      if (s2 !== peg$FAILED) {
        while (s2 !== peg$FAILED) {
          s1.push(s2);
          if (peg$c60.test(input.charAt(peg$currPos))) {
            s2 = input.charAt(peg$currPos);
            peg$currPos++;
          } else {
            s2 = peg$FAILED;
            if (peg$silentFails === 0) { peg$fail(peg$c61); }
          }
        }
      } else {
        s1 = peg$c2;
      }
      if (s1 !== peg$FAILED) {
        peg$reportedPos = s0;
        s1 = peg$c62(s1);
      }
      s0 = s1;

      return s0;
    }

    function peg$parsehexDigit() {
      var s0;

      if (peg$c63.test(input.charAt(peg$currPos))) {
        s0 = input.charAt(peg$currPos);
        peg$currPos++;
      } else {
        s0 = peg$FAILED;
        if (peg$silentFails === 0) { peg$fail(peg$c64); }
      }

      return s0;
    }

    function peg$parse_() {
      var s0, s1, s2;

      peg$silentFails++;
      s0 = peg$currPos;
      s1 = [];
      s2 = peg$parsewhitespace();
      while (s2 !== peg$FAILED) {
        s1.push(s2);
        s2 = peg$parsewhitespace();
      }
      if (s1 !== peg$FAILED) {
        peg$reportedPos = s0;
        s1 = peg$c66(s1);
      }
      s0 = s1;
      peg$silentFails--;
      if (s0 === peg$FAILED) {
        s1 = peg$FAILED;
        if (peg$silentFails === 0) { peg$fail(peg$c65); }
      }

      return s0;
    }

    function peg$parsewhitespace() {
      var s0;

      if (peg$c67.test(input.charAt(peg$currPos))) {
        s0 = input.charAt(peg$currPos);
        peg$currPos++;
      } else {
        s0 = peg$FAILED;
        if (peg$silentFails === 0) { peg$fail(peg$c68); }
      }

      return s0;
    }

    peg$result = peg$startRuleFunction();

    if (peg$result !== peg$FAILED && peg$currPos === input.length) {
      return peg$result;
    } else {
      if (peg$result !== peg$FAILED && peg$currPos < input.length) {
        peg$fail({ type: "end", description: "end of input" });
      }

      throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
    }
  }

  return {
    SyntaxError: SyntaxError,
    parse:       parse
  };
}()).parse;


/** @file messageformat.js - ICU PluralFormat + SelectFormat for JavaScript
 *  @author Alex Sexton - @SlexAxton
 *  @version 0.3.0-1
 *  @copyright 2012-2015 Alex Sexton, Eemeli Aro, and Contributors
 *  @license To use or fork, MIT. To contribute back, Dojo CLA  */


/** Utility function for quoting an Object's key value iff required
 *  @private  */
function propname(key, obj) {
  if (/^[A-Z_$][0-9A-Z_$]*$/i.test(key)) {
    return obj ? obj + '.' + key : key;
  } else {
    var jkey = JSON.stringify(key);
    return obj ? obj + '[' + jkey + ']' : jkey;
  }
};


/** Create a new message formatter
 *
 *  @class
 *  @global
 *  @param {string|string[]} [locale="en"] - The locale to use, with fallbacks
 *  @param {function} [pluralFunc] - Optional custom pluralization function
 *  @param {function[]} [formatters] - Optional custom formatting functions  */
function MessageFormat(locale, pluralFunc, formatters) {
  this.lc = [locale];  
  this.runtime.pluralFuncs = {};
  this.runtime.pluralFuncs[this.lc[0]] = pluralFunc;
  this.runtime.fmt = {};
  if (formatters) for (var f in formatters) {
    this.runtime.fmt[f] = formatters[f];
  }
}




/** Parse an input string to its AST
 *
 *  Precompiled from `lib/messageformat-parser.pegjs` by
 *  {@link http://pegjs.org/ PEG.js}. Included in MessageFormat object
 *  to enable testing.
 *
 *  @private  */



/** Pluralization functions from
 *  {@link http://github.com/eemeli/make-plural.js make-plural}
 *
 *  @memberof MessageFormat
 *  @type Object.<string,function>  */
MessageFormat.plurals = {};


/** Default number formatting functions in the style of ICU's
 *  {@link http://icu-project.org/apiref/icu4j/com/ibm/icu/text/MessageFormat.html simpleArg syntax}
 *  implemented using the
 *  {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl Intl}
 *  object defined by ECMA-402.
 *
 *  **Note**: Intl is not defined in default Node until 0.11.15 / 0.12.0, so
 *  earlier versions require a {@link https://www.npmjs.com/package/intl polyfill}.
 *  Therefore {@link MessageFormat.withIntlSupport} needs to be true for these
 *  functions to be available for inclusion in the output.
 *
 *  @see MessageFormat#setIntlSupport
 *
 *  @namespace
 *  @memberof MessageFormat
 *  @property {function} number - Represent a number as an integer, percent or currency value
 *  @property {function} date - Represent a date as a full/long/default/short string
 *  @property {function} time - Represent a time as a full/long/default/short string
 *
 *  @example
 *  > var MessageFormat = require('messageformat');
 *  > var mf = (new MessageFormat('en')).setIntlSupport(true);
 *  > mf.currency = 'EUR';
 *  > var mfunc = mf.compile("The total is {V,number,currency}.");
 *  > mfunc({V:5.5})
 *  "The total is €5.50."
 *
 *  @example
 *  > var MessageFormat = require('messageformat');
 *  > var mf = new MessageFormat('en', null, {number: MessageFormat.number});
 *  > mf.currency = 'EUR';
 *  > var mfunc = mf.compile("The total is {V,number,currency}.");
 *  > mfunc({V:5.5})
 *  "The total is €5.50."  */
MessageFormat.formatters = {};

/** Enable or disable support for the default formatters, which require the
 *  `Intl` object. Note that this can't be autodetected, as the environment
 *  in which the formatted text is compiled into Javascript functions is not
 *  necessarily the same environment in which they will get executed.
 *
 *  @see MessageFormat.formatters
 *
 *  @memberof MessageFormat
 *  @param {boolean} [enable=true]
 *  @returns {Object} The MessageFormat instance, to allow for chaining
 *  @example
 *  > var Intl = require('intl');
 *  > var MessageFormat = require('messageformat');
 *  > var mf = (new MessageFormat('en')).setIntlSupport(true);
 *  > mf.currency = 'EUR';
 *  > mf.compile("The total is {V,number,currency}.")({V:5.5});
 *  "The total is €5.50."  */



/** A set of utility functions that are called by the compiled Javascript
 *  functions, these are included locally in the output of {@link
 *  MessageFormat#compile compile()}.
 *
 *  @namespace
 *  @memberof MessageFormat  */
MessageFormat.prototype.runtime = {

  /** Utility function for `#` in plural rules
   *
   *  @param {number} value - The value to operate on
   *  @param {number} [offset=0] - An optional offset, set by the surrounding context  */
  number: function(value, offset) {
    if (isNaN(value)) throw new Error("'" + value + "' isn't a number.");
    return value - (offset || 0);
  },

  /** Utility function for `{N, plural|selectordinal, ...}`
   *
   *  @param {number} value - The key to use to find a pluralization rule
   *  @param {number} offset - An offset to apply to `value`
   *  @param {function} lcfunc - A locale function from `pluralFuncs`
   *  @param {Object.<string,string>} data - The object from which results are looked up
   *  @param {?boolean} isOrdinal - If true, use ordinal rather than cardinal rules
   *  @returns {string} The result of the pluralization  */
  plural: function(value, offset, lcfunc, data, isOrdinal) {
    if ({}.hasOwnProperty.call(data, value)) return data[value]();
    if (offset) value -= offset;
    var key = lcfunc(value, isOrdinal);
    if (key in data) return data[key]();
    return data.other();
  },

  /** Utility function for `{N, select, ...}`
   *
   *  @param {number} value - The key to use to find a selection
   *  @param {Object.<string,string>} data - The object from which results are looked up
   *  @returns {string} The result of the select statement  */
  select: function(value, data) {
    if ({}.hasOwnProperty.call(data, value)) return data[value]();
    return data.other()
  },

  /** Pluralization functions included in compiled output
   *  @instance
   *  @type Object.<string,function>  */
  pluralFuncs: {},

  /** Custom formatting functions called by `{var, fn[, args]*}` syntax
   *
   *  For examples, see {@link MessageFormat.formatters}
   *
   *  @instance
   *  @see MessageFormat.formatters
   *  @type Object.<string,function>  */
  fmt: {},

  /** Custom stringifier to clean up browser inconsistencies
   *  @instance  */
  toString: function () {
    var _stringify = function(o, level) {
      if (typeof o != 'object') {
        var funcStr = o.toString().replace(/^(function )\w*/, '$1');
        var indent = /([ \t]*)\S.*$/.exec(funcStr);
        return indent ? funcStr.replace(new RegExp('^' + indent[1], 'mg'), '') : funcStr;
      }
      var s = [];
      for (var i in o) if (i != 'toString') {
        if (level == 0) s.push('var ' + i + ' = ' + _stringify(o[i], level + 1) + ';\n');
        else s.push(propname(i) + ': ' + _stringify(o[i], level + 1));
      }
      if (level == 0) return s.join('');
      if (s.length == 0) return '{}';
      var indent = '  '; while (--level) indent += '  ';
      return '{\n' + s.join(',\n').replace(/^/gm, indent) + '\n}';
    };
    return _stringify(this, 0);
  }
};


/** Recursively map an AST to its resulting string
 *
 *  @memberof MessageFormat
 *
 *  @param ast - the Ast node for which the JS code should be generated
 *
 *  @private  */
MessageFormat.prototype._precompile = function(ast, data) {
  data = data || { keys: {}, offset: {} };
  var r = [], i, tmp, args = [];

  switch ( ast.type ) {
    case 'messageFormatPattern':
      for ( i = 0; i < ast.statements.length; ++i ) {
        r.push(this._precompile( ast.statements[i], data ));
      }
      tmp = r.join(' + ') || '""';
      return data.pf_count ? tmp : 'function(d) { return ' + tmp + '; }';

    case 'messageFormatElement':
      data.pf_count = data.pf_count || 0;
      if ( ast.output ) {
        return propname(ast.argumentIndex, 'd');
      }
      else {
        data.keys[data.pf_count] = ast.argumentIndex;
        return this._precompile( ast.elementFormat, data );
      }
      return '';

    case 'elementFormat':
      args = [ propname(data.keys[data.pf_count], 'd') ];
      switch (ast.key) {
        case 'select':
          args.push(this._precompile(ast.val, data));
          return 'select(' + args.join(', ') + ')';
        case 'selectordinal':
          args = args.concat([ 0, propname(this.lc[0], 'pluralFuncs'), this._precompile(ast.val, data), 1 ]);
          return 'plural(' + args.join(', ') + ')';
        case 'plural':
          data.offset[data.pf_count || 0] = ast.val.offset || 0;
          args = args.concat([ data.offset[data.pf_count] || 0, propname(this.lc[0], 'pluralFuncs'), this._precompile(ast.val, data) ]);
          return 'plural(' + args.join(', ') + ')';
        default:
          if (this.withIntlSupport && !(ast.key in this.runtime.fmt) && (ast.key in MessageFormat.formatters)) {
            tmp = MessageFormat.formatters[ast.key];
            this.runtime.fmt[ast.key] = (typeof tmp(this) == 'function') ? tmp(this) : tmp;
          }
          args.push(JSON.stringify(this.lc));
          if (ast.val && ast.val.length) args.push(JSON.stringify(ast.val.length == 1 ? ast.val[0] : ast.val));
          return 'fmt.' + ast.key + '(' + args.join(', ') + ')';
      }

    case 'pluralFormatPattern':
    case 'selectFormatPattern':
      data.pf_count = data.pf_count || 0;
      if (ast.type == 'selectFormatPattern') data.offset[data.pf_count] = 0;
      var needOther = true;
      for (i = 0; i < ast.pluralForms.length; ++i) {
        var key = ast.pluralForms[i].key;
        if (key === 'other') needOther = false;
        var data_copy = JSON.parse(JSON.stringify(data));
        data_copy.pf_count++;
        r.push(propname(key) + ': function() { return ' + this._precompile(ast.pluralForms[i].val, data_copy) + ';}');
      }
      if (needOther) throw new Error("No 'other' form found in " + ast.type + " " + data.pf_count);
      return '{ ' + r.join(', ') + ' }';

    case 'string':
      return JSON.stringify(ast.val || "");

    case 'octothorpe':
      if (!data.pf_count) return '"#"';
      args = [ propname(data.keys[data.pf_count-1], 'd') ];
      if (data.offset[data.pf_count-1]) args.push(data.offset[data.pf_count-1]);
      return 'number(' + args.join(', ') + ')';

    default:
      throw new Error( 'Bad AST type: ' + ast.type );
  }
};

/** Compile messages into an executable function with clean string
 *  representation.
 *
 *  If `messages` is a single string including ICU MessageFormat declarations,
 *  `opt` is ignored and the returned function takes a single Object parameter
 *  `d` representing each of the input's defined variables. The returned
 *  function will be defined in a local scope that includes all the required
 *  runtime variables.
 *
 *  If `messages` is a map of keys to strings, or a map of namespace keys to
 *  such key/string maps, the returned function will fill the specified global
 *  with javascript functions matching the structure of the input. In such use,
 *  the output of `compile()` is expected to be serialized using `.toString()`,
 *  and will include definitions of the runtime functions. If `opt.global` is
 *  null, calling the output function will return the object itself.
 *
 *  Together, the input parameters should match the following patterns:
 *  ```js
 *  messages = "string" || { key0: "string0", key1: "string1", ... } || {
 *    ns0: { key0: "string0", key1: "string1", ...  },
 *    ns1: { key0: "string0", key1: "string1", ...  },
 *    ...
 *  }
 *
 *  opt = null || {
 *    locale: null || {
 *      ns0: "lc0" || [ "lc0", ... ],
 *      ns1: "lc1" || [ "lc1", ... ],
 *      ...
 *    },
 *    global: null || "module.exports" || "exports" || "i18n" || ...
 *  }
 *  ```
 *
 *  @memberof MessageFormat
 *  @param {string|Object}
 *      messages - The input message(s) to be compiled, in ICU MessageFormat
 *  @param {Object} [opt={}] - Options controlling output for non-simple intput
 *  @param {Object} [opt.locale] - The locales to use for the messages, with a
 *      structure matching that of `messages`
 *  @param {string} [opt.global=""] - The global variable that the output
 *      function should use, or a null string for none. "exports" and
 *      "module.exports" are recognised as special cases.
 *  @returns {function} The first match found for the given locale(s)
 *
 *  @example
 * > var MessageFormat = require('messageformat'),
 * ...   mf = new MessageFormat('en'),
 * ...   mfunc0 = mf.compile('A {TYPE} example.');
 * > mfunc0({TYPE:'simple'})
 * 'A simple example.'
 * > mfunc0.toString()
 * 'function (d) { return "A " + d.TYPE + " example."; }'
 *
 *  @example
 * > var msgSet = { a: 'A {TYPE} example.',
 * ...              b: 'This has {COUNT, plural, one{one member} other{# members}}.' },
 * ...   mfuncSet = mf.compile(msgSet);
 * > mfuncSet().a({TYPE:'more complex'})
 * 'A more complex example.'
 * > mfuncSet().b({COUNT:2})
 * 'This has 2 members.'
 *
 * > console.log(mfuncSet.toString())
 * function anonymous() {
 * var number = function (value, offset) {
 *   if (isNaN(value)) throw new Error("'" + value + "' isn't a number.");
 *   return value - (offset || 0);
 * };
 * var plural = function (value, offset, lcfunc, data, isOrdinal) {
 *   if ({}.hasOwnProperty.call(data, value)) return data[value]();
 *   if (offset) value -= offset;
 *   var key = lcfunc(value, isOrdinal);
 *   if (key in data) return data[key]();
 *   return data.other();
 * };
 * var select = function (value, data) {
 *   if ({}.hasOwnProperty.call(data, value)) return data[value]();
 *   return data.other()
 * };
 * var pluralFuncs = {
 *   en: function (n, ord) {
 *     var s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n,
 *         n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
 *     if (ord) return (n10 == 1 && n100 != 11) ? 'one'
 *         : (n10 == 2 && n100 != 12) ? 'two'
 *         : (n10 == 3 && n100 != 13) ? 'few'
 *         : 'other';
 *     return (n == 1 && v0) ? 'one' : 'other';
 *   }
 * };
 * var fmt = {};
 *
 * return {
 *   a: function(d) { return "A " + d.TYPE + " example."; },
 *   b: function(d) { return "This has " + plural(d.COUNT, 0, pluralFuncs.en, { one: function() { return "one member";}, other: function() { return number(d.COUNT)+" members";} }) + "."; }
 * }
 * }
 *
 *  @example
 * > mf.runtime.pluralFuncs.fi = MessageFormat.plurals.fi;
 * > var multiSet = { en: { a: 'A {TYPE} example.',
 * ...                      b: 'This is the {COUNT, selectordinal, one{#st} two{#nd} few{#rd} other{#th}} example.' },
 * ...                fi: { a: '{TYPE} esimerkki.',
 * ...                      b: 'Tämä on {COUNT, selectordinal, other{#.}} esimerkki.' } },
 * ...   multiSetLocales = { en: 'en', fi: 'fi' },
 * ...   mfuncSet = mf.compile(multiSet, { locale: multiSetLocales, global: 'i18n' });
 * > mfuncSet(this);
 * > i18n.en.b({COUNT:3})
 * 'This is the 3rd example.'
 * > i18n.fi.b({COUNT:3})
 * 'Tämä on 3. esimerkki.'  */
MessageFormat.prototype.compile = function ( messages, opt ) {
  var r = {}, lc0 = this.lc,
      compileMsg = function(self, msg) {
        try {
          var ast = MessageFormat._parse(msg);
          return self._precompile(ast);
        } catch (e) {
          throw new Error((ast ? 'Precompiler' : 'Parser') + ' error: ' + e.toString());
        }
      },
      stringify = function(r, level) {
        if (!level) level = 0;
        if (typeof r != 'object') return r;
        var o = [], indent = '';
        for (var i = 0; i < level; ++i) indent += '  ';
        for (var k in r) o.push('\n' + indent + '  ' + propname(k) + ': ' + stringify(r[k], level + 1));
        return '{' + o.join(',') + '\n' + indent + '}';
      };

  if (typeof messages == 'string') {
    var f = new Function(
        'number, plural, select, pluralFuncs, fmt',
        'return ' + compileMsg(this, messages));
    return f(this.runtime.number, this.runtime.plural, this.runtime.select,
        this.runtime.pluralFuncs, this.runtime.fmt);
  }

  opt = opt || {};

  for (var ns in messages) {
    if (opt.locale) this.lc = opt.locale[ns] && [].concat(opt.locale[ns]) || lc0;
    if (typeof messages[ns] == 'string') {
      try { r[ns] = compileMsg(this, messages[ns]); }
      catch (e) { e.message = e.message.replace(':', ' with `' + ns + '`:'); throw e; }
    } else {
      r[ns] = {};
      for (var key in messages[ns]) {
        try { r[ns][key] = compileMsg(this, messages[ns][key]); }
        catch (e) { e.message = e.message.replace(':', ' with `' + key + '` in `' + ns + '`:'); throw e; }
      }
    }
  }

  this.lc = lc0;
  var s = this.runtime.toString() + '\n';
  switch (opt.global || '') {
    case 'exports':
      var o = [];
      for (var k in r) o.push(propname(k, 'exports') + ' = ' + stringify(r[k]));
      return new Function(s + o.join(';\n'));
    case 'module.exports':
      return new Function(s + 'module.exports = ' + stringify(r));
    case '':
      return new Function(s + 'return ' + stringify(r));
    default:
      return new Function('G', s + propname(opt.global, 'G') + ' = ' + stringify(r));
  }
};


return MessageFormat;
}());
/* eslint-enable */


var createErrorPluralModulePresence = function() {
	return createError( "E_MISSING_PLURAL_MODULE", "Plural module not loaded." );
};




var validateMessageBundle = function( cldr ) {
	validate(
		"E_MISSING_MESSAGE_BUNDLE",
		"Missing message bundle for locale `{locale}`.",
		cldr.attributes.bundle && cldr.get( "globalize-messages/{bundle}" ) !== undefined,
		{
			locale: cldr.locale
		}
	);
};




var validateMessagePresence = function( path, value ) {
	path = path.join( "/" );
	validate( "E_MISSING_MESSAGE", "Missing required message content `{path}`.",
		value !== undefined, { path: path } );
};




var validateMessageType = function( path, value ) {
	path = path.join( "/" );
	validate(
		"E_INVALID_MESSAGE",
		"Invalid message content `{path}`. {expected} expected.",
		typeof value === "string",
		{
			expected: "a string",
			path: path
		}
	);
};




var validateParameterTypeMessageVariables = function( value, name ) {
	validateParameterType(
		value,
		name,
		value === undefined || isPlainObject( value ) || Array.isArray( value ),
		"Array or Plain Object"
	);
};




var messageFormatterFn = function( formatter ) {
	return function messageFormatter( variables ) {
		if ( typeof variables === "number" || typeof variables === "string" ) {
			variables = [].slice.call( arguments, 0 );
		}
		validateParameterTypeMessageVariables( variables, "variables" );
		return formatter( variables );
	};
};




var messageFormatterRuntimeBind = function( cldr, messageformatter ) {
	var locale = cldr.locale,
		origToString = messageformatter.toString;

	messageformatter.toString = function() {
		var argNames, argValues, output,
			args = {};

		// Properly adjust SlexAxton/messageformat.js compiled variables with Globalize variables:
		output = origToString.call( messageformatter );

		if ( /number\(/.test( output ) ) {
			args.number = "messageFormat.number";
		}

		if ( /plural\(/.test( output ) ) {
			args.plural = "messageFormat.plural";
		}

		if ( /select\(/.test( output ) ) {
			args.select = "messageFormat.select";
		}

		output.replace( /pluralFuncs(\[([^\]]+)\]|\.([a-zA-Z]+))/, function( match ) {
			args.pluralFuncs = "{" +
				"\"" + locale + "\": Globalize(\"" + locale + "\").pluralGenerator()" +
				"}";
			return match;
		});

		argNames = Object.keys( args ).join( ", " );
		argValues = Object.keys( args ).map(function( key ) {
			return args[ key ];
		}).join( ", " );

		return "(function( " + argNames + " ) {\n" +
			"  return " + output + "\n" +
			"})(" + argValues + ")";
	};

	return messageformatter;
};




var slice = [].slice;

/**
 * .loadMessages( json )
 *
 * @json [JSON]
 *
 * Load translation data.
 */
Globalize.loadMessages = function( json ) {
	var locale,
		customData = {
			"globalize-messages": json,
			"main": {}
		};

	validateParameterPresence( json, "json" );
	validateParameterTypePlainObject( json, "json" );

	// Set available bundles by populating customData main dataset.
	for ( locale in json ) {
		if ( json.hasOwnProperty( locale ) ) {
			customData.main[ locale ] = {};
		}
	}

	Cldr.load( customData );
};

/**
 * .messageFormatter( path )
 *
 * @path [String or Array]
 *
 * Format a message given its path.
 */
Globalize.messageFormatter =
Globalize.prototype.messageFormatter = function( path ) {
	var cldr, formatter, message, pluralGenerator, returnFn,
		args = slice.call( arguments, 0 );

	validateParameterPresence( path, "path" );
	validateParameterType( path, "path", typeof path === "string" || Array.isArray( path ),
		"a String nor an Array" );

	path = alwaysArray( path );
	cldr = this.cldr;

	validateDefaultLocale( cldr );
	validateMessageBundle( cldr );

	message = cldr.get( [ "globalize-messages/{bundle}" ].concat( path ) );
	validateMessagePresence( path, message );

	// If message is an Array, concatenate it.
	if ( Array.isArray( message ) ) {
		message = message.join( " " );
	}
	validateMessageType( path, message );

	// Is plural module present? Yes, use its generator. Nope, use an error generator.
	pluralGenerator = this.plural !== undefined ?
		this.pluralGenerator() :
		createErrorPluralModulePresence;

	formatter = new MessageFormat( cldr.locale, pluralGenerator ).compile( message );

	returnFn = messageFormatterFn( formatter );

	runtimeBind( args, cldr, returnFn,
		[ messageFormatterRuntimeBind( cldr, formatter ), pluralGenerator ] );

	return returnFn;
};

/**
 * .formatMessage( path [, variables] )
 *
 * @path [String or Array]
 *
 * @variables [Number, String, Array or Object]
 *
 * Format a message given its path.
 */
Globalize.formatMessage =
Globalize.prototype.formatMessage = function( path /* , variables */ ) {
	return this.messageFormatter( path ).apply( {}, slice.call( arguments, 1 ) );
};

return Globalize;




}));

/**
 * Globalize v1.7.0
 *
 * https://github.com/globalizejs/globalize
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2021-08-02T11:53Z
 */
/*!
 * Globalize v1.7.0 2021-08-02T11:53Z Released under the MIT license
 * http://git.io/TrdQbw
 */
(function( root, factory ) {

	// UMD returnExports
	if ( typeof define === "function" && define.amd ) {

		// AMD
		define([
			"cldr",
			"../globalize",
			"cldr/event",
			"cldr/supplemental"
		], factory );
	} else if ( typeof exports === "object" ) {

		// Node, CommonJS
		module.exports = factory( require( "cldrjs" ), require( "../globalize" ) );
	} else {

		// Global
		factory( root.Cldr, root.Globalize );
	}
}(this, function( Cldr, Globalize ) {

var createError = Globalize._createError,
	partsJoin = Globalize._partsJoin,
	partsPush = Globalize._partsPush,
	regexpEscape = Globalize._regexpEscape,
	runtimeBind = Globalize._runtimeBind,
	stringPad = Globalize._stringPad,
	validateCldr = Globalize._validateCldr,
	validateDefaultLocale = Globalize._validateDefaultLocale,
	validateParameterPresence = Globalize._validateParameterPresence,
	validateParameterRange = Globalize._validateParameterRange,
	validateParameterType = Globalize._validateParameterType,
	validateParameterTypePlainObject = Globalize._validateParameterTypePlainObject;


var createErrorUnsupportedFeature = function( feature ) {
	return createError( "E_UNSUPPORTED", "Unsupported {feature}.", {
		feature: feature
	});
};




var validateParameterTypeNumber = function( value, name ) {
	validateParameterType(
		value,
		name,
		value === undefined || typeof value === "number",
		"Number"
	);
};




var validateParameterTypeString = function( value, name ) {
	validateParameterType(
		value,
		name,
		value === undefined || typeof value === "string",
		"a string"
	);
};




var numberFormatterFn = function( numberToPartsFormatter ) {
	return function numberFormatter( value ) {
		return partsJoin( numberToPartsFormatter( value ));
	};
};




/**
 * NumberingSystem( cldr )
 *
 * - http://www.unicode.org/reports/tr35/tr35-numbers.html#otherNumberingSystems
 * - http://cldr.unicode.org/index/bcp47-extension
 * - http://www.unicode.org/reports/tr35/#u_Extension
 */
var numberNumberingSystem = function( cldr ) {
	var nu = cldr.attributes[ "u-nu" ];

	if ( nu ) {
		if ( nu === "traditio" ) {
			nu = "traditional";
		}
		if ( [ "native", "traditional", "finance" ].indexOf( nu ) !== -1 ) {

			// Unicode locale extension `u-nu` is set using either (native, traditional or
			// finance). So, lookup the respective locale's numberingSystem and return it.
			return cldr.main([ "numbers/otherNumberingSystems", nu ]);
		}

		// Unicode locale extension `u-nu` is set with an explicit numberingSystem. Return it.
		return nu;
	}

	// Return the default numberingSystem.
	return cldr.main( "numbers/defaultNumberingSystem" );
};




/**
 * Compact( name, cldr )
 *
 * @compactType [String] Compact mode, `short` or `long`.
 *
 * @cldr [Cldr instance].
 *
 * Return the localized compact map for the given compact mode.
 */
var numberCompact = function( compactType, cldr ) {
	var maxExponent = 0;

	var object = cldr.main([
		"numbers/decimalFormats-numberSystem-" + numberNumberingSystem( cldr ),
		compactType,
		"decimalFormat"
	]);

	object = Object.keys( object ).reduce(function( newObject, compactKey ) {
		var numberExponent = compactKey.split( "0" ).length - 1;
		var pluralForm = compactKey.split( "-" )[ 2 ];
		newObject[ numberExponent ] = newObject[ numberExponent ] || {};
		newObject[ numberExponent ][ pluralForm ] = object[ compactKey ];
		maxExponent = Math.max( numberExponent, maxExponent );
		return newObject;
	}, {});

	object.maxExponent = maxExponent;

	return object;
};




/**
 * nuMap( cldr )
 *
 * @cldr [Cldr instance].
 *
 * Return digits map if numbering system is different than `latn`.
 */
var numberNumberingSystemDigitsMap = function( cldr ) {
	var aux,
		nu = numberNumberingSystem( cldr );

	if ( nu === "latn" ) {
		return;
	}

	aux = cldr.supplemental([ "numberingSystems", nu ]);

	if ( aux._type !== "numeric" ) {
		throw createErrorUnsupportedFeature( "`" + aux._type + "` numbering system" );
	}

	return aux._digits;
};




/**
 * EBNF representation:
 *
 * number_pattern_re =        prefix?
 *                            padding?
 *                            (integer_fraction_pattern | significant_pattern)
 *                            scientific_notation?
 *                            suffix?
 *
 * prefix =                   non_number_stuff
 *
 * padding =                  "*" regexp(.)
 *
 * integer_fraction_pattern = integer_pattern
 *                            fraction_pattern?
 *
 * integer_pattern =          regexp([#,]*[0,]*0+)
 *
 * fraction_pattern =         "." regexp(0*[0-9]*#*)
 *
 * significant_pattern =      regexp([#,]*@+#*)
 *
 * scientific_notation =      regexp(E\+?0+)
 *
 * suffix =                   non_number_stuff
 *
 * non_number_stuff =         regexp(('[^']+'|''|[^*#@0,.E])*)
 *
 *
 * Regexp groups:
 *
 *  0: number_pattern_re
 *  1: prefix
 *  2: -
 *  3: -
 *  4: padding
 *  5: (integer_fraction_pattern | significant_pattern)
 *  6: integer_fraction_pattern
 *  7: integer_pattern
 *  8: fraction_pattern
 *  9: significant_pattern
 * 10: scientific_notation
 * 11: suffix
 * 12: -
 */
var numberPatternRe = ( /^(('([^']|'')*'|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/ );




/**
 * format( number, pattern )
 *
 * @number [Number].
 *
 * @pattern [String] raw pattern for numbers.
 *
 * Return the formatted number.
 * ref: http://www.unicode.org/reports/tr35/tr35-numbers.html
 */
var numberPatternProperties = function( pattern ) {
	var aux1, aux2, fractionPattern, integerFractionOrSignificantPattern, integerPattern,
		maximumFractionDigits, maximumSignificantDigits, minimumFractionDigits,
		minimumIntegerDigits, minimumSignificantDigits, padding, prefix, primaryGroupingSize,
		roundIncrement, scientificNotation, secondaryGroupingSize, significantPattern, suffix;

	pattern = pattern.match( numberPatternRe );
	if ( !pattern ) {
		throw new Error( "Invalid pattern: " + pattern );
	}

	prefix = pattern[ 1 ];
	padding = pattern[ 4 ];
	integerFractionOrSignificantPattern = pattern[ 5 ];
	significantPattern = pattern[ 9 ];
	scientificNotation = pattern[ 10 ];
	suffix = pattern[ 11 ];

	// Significant digit format
	if ( significantPattern ) {
		significantPattern.replace( /(@+)(#*)/, function( _match, minimumSignificantDigitsMatch, maximumSignificantDigitsMatch ) {
			minimumSignificantDigits = minimumSignificantDigitsMatch.length;
			maximumSignificantDigits = minimumSignificantDigits +
				maximumSignificantDigitsMatch.length;
		});

	// Integer and fractional format
	} else {
		fractionPattern = pattern[ 8 ];
		integerPattern = pattern[ 7 ];

		if ( fractionPattern ) {

			// Minimum fraction digits, and rounding.
			fractionPattern.replace( /[0-9]+/, function( match ) {
				minimumFractionDigits = match;
			});
			if ( minimumFractionDigits ) {
				roundIncrement = +( "0." + minimumFractionDigits );
				minimumFractionDigits = minimumFractionDigits.length;
			} else {
				minimumFractionDigits = 0;
			}

			// Maximum fraction digits
			// 1: ignore decimal character
			maximumFractionDigits = fractionPattern.length - 1; /* 1 */
		} else {
			minimumFractionDigits = 0;
			maximumFractionDigits = 0;
		}

		// Minimum integer digits
		integerPattern.replace( /0+$/, function( match ) {
			minimumIntegerDigits = match.length;
		});
	}

	// Scientific notation
	if ( scientificNotation ) {
		throw createErrorUnsupportedFeature({
			feature: "scientific notation (not implemented)"
		});
	}

	// Padding
	if ( padding ) {
		throw createErrorUnsupportedFeature({
			feature: "padding (not implemented)"
		});
	}

	// Grouping
	if ( ( aux1 = integerFractionOrSignificantPattern.lastIndexOf( "," ) ) !== -1 ) {

		// Primary grouping size is the interval between the last group separator and the end of
		// the integer (or the end of the significant pattern).
		aux2 = integerFractionOrSignificantPattern.split( "." )[ 0 ];
		primaryGroupingSize = aux2.length - aux1 - 1;

		// Secondary grouping size is the interval between the last two group separators.
		if ( ( aux2 = integerFractionOrSignificantPattern.lastIndexOf( ",", aux1 - 1 ) ) !== -1 ) {
			secondaryGroupingSize = aux1 - 1 - aux2;
		}
	}

	// Return:
	//  0: @prefix String
	//  1: @padding Array [ <character>, <count> ] TODO
	//  2: @minimumIntegerDigits non-negative integer Number value indicating the minimum integer
	//        digits to be used. Numbers will be padded with leading zeroes if necessary.
	//  3: @minimumFractionDigits and
	//  4: @maximumFractionDigits are non-negative integer Number values indicating the minimum and
	//        maximum fraction digits to be used. Numbers will be rounded or padded with trailing
	//        zeroes if necessary.
	//  5: @minimumSignificantDigits and
	//  6: @maximumSignificantDigits are positive integer Number values indicating the minimum and
	//        maximum fraction digits to be shown. Either none or both of these properties are
	//        present; if they are, they override minimum and maximum integer and fraction digits
	//        – the formatter uses however many integer and fraction digits are required to display
	//        the specified number of significant digits.
	//  7: @roundIncrement Decimal round increment or null
	//  8: @primaryGroupingSize
	//  9: @secondaryGroupingSize
	// 10: @suffix String
	return [
		prefix,
		padding,
		minimumIntegerDigits,
		minimumFractionDigits,
		maximumFractionDigits,
		minimumSignificantDigits,
		maximumSignificantDigits,
		roundIncrement,
		primaryGroupingSize,
		secondaryGroupingSize,
		suffix
	];
};




/**
 * Symbol( name, cldr )
 *
 * @name [String] Symbol name.
 *
 * @cldr [Cldr instance].
 *
 * Return the localized symbol given its name.
 */
var numberSymbol = function( name, cldr ) {
	return cldr.main([
		"numbers/symbols-numberSystem-" + numberNumberingSystem( cldr ),
		name
	]);
};




var numberSymbolName = {
	".": "decimal",
	",": "group",
	"%": "percentSign",
	"+": "plusSign",
	"-": "minusSign",
	"E": "exponential",
	"\u2030": "perMille"
};




/**
 * symbolMap( cldr )
 *
 * @cldr [Cldr instance].
 *
 * Return the (localized symbol, pattern symbol) key value pair, eg. {
 *   ".": "٫",
 *   ",": "٬",
 *   "%": "٪",
 *   ...
 * };
 */
var numberSymbolMap = function( cldr ) {
	var symbol,
		symbolMap = {};

	for ( symbol in numberSymbolName ) {
		symbolMap[ symbol ] = numberSymbol( numberSymbolName[ symbol ], cldr );
	}

	return symbolMap;
};




var numberTruncate = function( value ) {
	if ( isNaN( value ) ) {
		return NaN;
	}
	return Math[ value < 0 ? "ceil" : "floor" ]( value );
};




/**
 * round( method )
 *
 * @method [String] with either "round", "ceil", "floor", or "truncate".
 *
 * Return function( value, incrementOrExp ):
 *
 *   @value [Number] eg. 123.45.
 *
 *   @incrementOrExp [Number] optional, eg. 0.1; or
 *     [Object] Either { increment: <value> } or { exponent: <value> }
 *
 *   Return the rounded number, eg:
 *   - round( "round" )( 123.45 ): 123;
 *   - round( "ceil" )( 123.45 ): 124;
 *   - round( "floor" )( 123.45 ): 123;
 *   - round( "truncate" )( 123.45 ): 123;
 *   - round( "round" )( 123.45, 0.1 ): 123.5;
 *   - round( "round" )( 123.45, 10 ): 120;
 *
 *   Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round
 *   Ref: #376
 */
var numberRound = function( method ) {
	method = method || "round";
	method = method === "truncate" ? numberTruncate : Math[ method ];

	return function( value, incrementOrExp ) {
		var exp, increment;

		value = +value;

		// If the value is not a number, return NaN.
		if ( isNaN( value ) ) {
			return NaN;
		}

		// Exponent given.
		if ( typeof incrementOrExp === "object" && incrementOrExp.exponent ) {
			exp = +incrementOrExp.exponent;
			increment = 1;

			if ( exp === 0 ) {
				return method( value );
			}

			// If the exp is not an integer, return NaN.
			if ( !( typeof exp === "number" && exp % 1 === 0 ) ) {
				return NaN;
			}

		// Increment given.
		} else {
			increment = +incrementOrExp || 1;

			if ( increment === 1 ) {
				return method( value );
			}

			// If the increment is not a number, return NaN.
			if ( isNaN( increment ) ) {
				return NaN;
			}

			increment = increment.toExponential().split( "e" );
			exp = +increment[ 1 ];
			increment = +increment[ 0 ];
		}

		// Shift & Round
		value = value.toString().split( "e" );
		value[ 0 ] = +value[ 0 ] / increment;
		value[ 1 ] = value[ 1 ] ? ( +value[ 1 ] - exp ) : -exp;
		value = method( +( value[ 0 ] + "e" + value[ 1 ] ) );

		// Shift back
		value = value.toString().split( "e" );
		value[ 0 ] = +value[ 0 ] * increment;
		value[ 1 ] = value[ 1 ] ? ( +value[ 1 ] + exp ) : exp;
		return +( value[ 0 ] + "e" + value[ 1 ] );
	};
};




/**
 * formatProperties( pattern, cldr [, options] )
 *
 * @pattern [String] raw pattern for numbers.
 *
 * @cldr [Cldr instance].
 *
 * @options [Object]:
 * - minimumIntegerDigits [Number]
 * - minimumFractionDigits, maximumFractionDigits [Number]
 * - minimumSignificantDigits, maximumSignificantDigits [Number]
 * - round [String] "ceil", "floor", "round" (default), or "truncate".
 * - useGrouping [Boolean] default true.
 *
 * Return the processed properties that will be used in number/format.
 * ref: http://www.unicode.org/reports/tr35/tr35-numbers.html
 */
var numberFormatProperties = function( pattern, cldr, options ) {
	var negativePattern, negativePrefix, negativeProperties, negativeSuffix, positivePattern,
		roundFn, properties;

	function getOptions( attribute, propertyIndex ) {
		if ( attribute in options ) {
			properties[ propertyIndex ] = options[ attribute ];
		}
	}

	options = options || {};
	pattern = pattern.split( ";" );

	positivePattern = pattern[ 0 ];

	negativePattern = pattern[ 1 ] || "-" + positivePattern;
	negativeProperties = numberPatternProperties( negativePattern );
	negativePrefix = negativeProperties[ 0 ];
	negativeSuffix = negativeProperties[ 10 ];

	// Have runtime code to refer to numberRound() instead of including it explicitly.
	roundFn = numberRound( options.round );
	roundFn.generatorString = function() {
		return "numberRound(" + ( options.round ? "\"" + options.round + "\"" : "" ) + ")";
	};

	properties = numberPatternProperties( positivePattern ).concat([
		positivePattern,
		negativePrefix + positivePattern + negativeSuffix,
		negativePrefix,
		negativeSuffix,
		roundFn,
		numberSymbol( "infinity", cldr ),
		numberSymbol( "nan", cldr ),
		numberSymbolMap( cldr ),
		numberNumberingSystemDigitsMap( cldr )
	]);

	if ( options.compact ) {

		// The compact digits number pattern is always `0+`, so override the following properties.
		// Note: minimumIntegerDigits would actually range from `0` to `000` based on the scale of
		// the value to be formatted, though we're always using 1 as a simplification, because the
		// number won't be zero-padded since we chose the right format based on the scale, i.e.,
		// we'd never see something like `003M` anyway.
		properties[ 2 ] = 1; // minimumIntegerDigits
		properties[ 3 ] = 0; // minimumFractionDigits
		properties[ 4 ] = 0; // maximumFractionDigits
		properties[ 5 ] = // minimumSignificantDigits &
			properties[ 6 ] = undefined; // maximumSignificantDigits

		properties[ 20 ] = numberCompact( options.compact, cldr );
	}

	getOptions( "minimumIntegerDigits", 2 );
	getOptions( "minimumFractionDigits", 3 );
	getOptions( "maximumFractionDigits", 4 );
	getOptions( "minimumSignificantDigits", 5 );
	getOptions( "maximumSignificantDigits", 6 );

	// Grouping separators
	if ( options.useGrouping === false ) {
		properties[ 8 ] = null;
	}

	// Normalize number of digits if only one of either minimumFractionDigits or
	// maximumFractionDigits is passed in as an option
	if ( "minimumFractionDigits" in options && !( "maximumFractionDigits" in options ) ) {

		// maximumFractionDigits = Math.max( minimumFractionDigits, maximumFractionDigits );
		properties[ 4 ] = Math.max( properties[ 3 ], properties[ 4 ] );
	} else if ( !( "minimumFractionDigits" in options ) &&
			"maximumFractionDigits" in options ) {

		// minimumFractionDigits = Math.min( minimumFractionDigits, maximumFractionDigits );
		properties[ 3 ] = Math.min( properties[ 3 ], properties[ 4 ] );
	}

	// Return:
	// 0-10: see number/pattern-properties.
	// 11: @positivePattern [String] Positive pattern.
	// 12: @negativePattern [String] Negative pattern.
	// 13: @negativePrefix [String] Negative prefix.
	// 14: @negativeSuffix [String] Negative suffix.
	// 15: @round [Function] Round function.
	// 16: @infinitySymbol [String] Infinity symbol.
	// 17: @nanSymbol [String] NaN symbol.
	// 18: @symbolMap [Object] A bunch of other symbols.
	// 19: @nuDigitsMap [Array] Digits map if numbering system is different than `latn`.
	// 20: @compactMap [Object] Map of per-digit-count format patterns for specified compact mode.
	return properties;
};




/**
 * Generated by:
 *
 * var regenerate = require( "regenerate" );
 * var formatSymbols = require( "@unicode/unicode-13.0.0/General_Category/Format/symbols" );
 * regenerate().add( formatSymbols ).toString();
 *
 * https://github.com/mathiasbynens/regenerate
 * https://github.com/node-unicode/unicode-13.0.0
 */
var regexpCfG = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC38]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/g;




/**
 * Generated by:
 *
 * var regenerate = require( "regenerate" );
 * var dashSymbols = require( "https://github.com/node-unicode/unicode-13.0.0/General_Category/Dash_Punctuation/symbols" );
 * regenerate().add( dashSymbols ).toString();
 *
 * https://github.com/mathiasbynens/regenerate
 * https://github.com/node-unicode/unicode-13.0.0
 *
 * NOTE: In addition to [:dash:],  the below includes MINUS SIGN U+2212.
 */
var regexpDashG = /[\x2D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D\u2212]|\uD803\uDEAD/g;




/**
 * Generated by:
 *
 * var regenerate = require( "regenerate" );
 * var spaceSeparatorSymbols = require( "@unicode/unicode-13.0.0/General_Category/Space_Separator/symbols" );
 * regenerate().add( spaceSeparatorSymbols ).toString();
 *
 * https://github.com/mathiasbynens/regenerate
 * https://github.com/node-unicode/unicode-13.0.0
 */
var regexpZsG = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/g;




/**
 * Loose Matching:
 * - Ignore all format characters, which includes RLM, LRM or ALM used to control BIDI
 *   formatting.
 * - Map all characters in [:Zs:] to U+0020 SPACE;
 * - Map all characters in [:Dash:] to U+002D HYPHEN-MINUS;
 */
var looseMatching = function( value ) {
	return value
		.replace( regexpCfG, "" )
		.replace( regexpDashG, "-" )
		.replace( regexpZsG, " " );
};




/**
 * parse( value, properties )
 *
 * @value [String].
 *
 * @properties [Object] Parser properties is a reduced pre-processed cldr
 * data set returned by numberParserProperties().
 *
 * Return the parsed Number (including Infinity) or NaN when value is invalid.
 * ref: http://www.unicode.org/reports/tr35/tr35-numbers.html
 */
var numberParse = function( value, properties ) {
	var grammar, invertedNuDigitsMap, invertedSymbolMap, negative, number, prefix, prefixNSuffix,
		suffix, tokenizer, valid;

	// Grammar:
	// - Value <=           NaN | PositiveNumber | NegativeNumber
	// - PositiveNumber <=  PositivePrefix NumberOrInf PositiveSufix
	// - NegativeNumber <=  NegativePrefix NumberOrInf
	// - NumberOrInf <=     Number | Inf
	grammar = [
		[ "nan" ],
		[ "prefix", "infinity", "suffix" ],
		[ "prefix", "number", "suffix" ],
		[ "negativePrefix", "infinity", "negativeSuffix" ],
		[ "negativePrefix", "number", "negativeSuffix" ]
	];

	invertedSymbolMap = properties[ 0 ];
	invertedNuDigitsMap = properties[ 1 ] || {};
	tokenizer = properties[ 2 ];

	value = looseMatching( value );

	function parse( type ) {
		return function( lexeme ) {

			// Reverse localized symbols and numbering system.
			lexeme = lexeme.split( "" ).map(function( character ) {
				return invertedSymbolMap[ character ] ||
					invertedNuDigitsMap[ character ] ||
					character;
			}).join( "" );

			switch ( type ) {
				case "infinity":
					number = Infinity;
					break;

				case "nan":
					number = NaN;
					break;

				case "number":

					// Remove grouping separators.
					lexeme = lexeme.replace( /,/g, "" );

					number = +lexeme;
					break;

				case "prefix":
				case "negativePrefix":
					prefix = lexeme;
					break;

				case "suffix":
					suffix = lexeme;
					break;

				case "negativeSuffix":
					suffix = lexeme;
					negative = true;
					break;

				// This should never be reached.
				default:
					throw new Error( "Internal error" );
			}
			return "";
		};
	}

	function tokenizeNParse( _value, grammar ) {
		return grammar.some(function( statement ) {
			var value = _value;

			// The whole grammar statement should be used (i.e., .every() return true) and value be
			// entirely consumed (i.e., !value.length).
			return statement.every(function( type ) {
				if ( value.match( tokenizer[ type ] ) === null ) {
					return false;
				}

				// Consume and parse it.
				value = value.replace( tokenizer[ type ], parse( type ) );
				return true;
			}) && !value.length;
		});
	}

	valid = tokenizeNParse( value, grammar );

	// NaN
	if ( !valid || isNaN( number ) ) {
		return NaN;
	}

	prefixNSuffix = "" + prefix + suffix;

	// Percent
	if ( prefixNSuffix.indexOf( "%" ) !== -1 ) {
		number /= 100;

	// Per mille
	} else if ( prefixNSuffix.indexOf( "\u2030" ) !== -1 ) {
		number /= 1000;
	}

	// Negative number
	if ( negative ) {
		number *= -1;
	}

	return number;
};




var numberParserFn = function( properties ) {
	return function numberParser( value ) {
		validateParameterPresence( value, "value" );
		validateParameterTypeString( value, "value" );

		return numberParse( value, properties );
	};

};




/**
 * symbolMap( cldr )
 *
 * @cldr [Cldr instance].
 *
 * Return the (localized symbol, pattern symbol) key value pair, eg. {
 *   "٫": ".",
 *   "٬": ",",
 *   "٪": "%",
 *   ...
 * };
 */
var numberSymbolInvertedMap = function( cldr ) {
	var symbol,
		symbolMap = {};

	for ( symbol in numberSymbolName ) {
		symbolMap[ numberSymbol( numberSymbolName[ symbol ], cldr ) ] = symbol;
	}

	return symbolMap;
};




/**
 * objectMap( object, fn)
 *
 * - object
 *
 * - fn( pair ) => pair
 */
var objectMap = function( object, fn ) {
	return Object.keys( object ).map(function( key ) {
		return fn([ key, object[ key ] ]);
	}).reduce(function( object, pair ) {
		object[ pair[ 0 ] ] = pair[ 1 ];
		return object;
	}, {});
};




/**
 * removeLiteralQuotes( string )
 *
 * Return:
 * - `'` if input string is `''`.
 * - `o'clock` if input string is `'o''clock'`.
 * - `foo` if input string is `foo`, i.e., return the same value in case it isn't a single-quoted
 *   string.
 */
var removeLiteralQuotes = function( string ) {
	if ( string[ 0 ] + string[ string.length - 1 ] !== "''" ) {
		return string;
	}
	if ( string === "''" ) {
		return "'";
	}
	return string.replace( /''/g, "'" ).slice( 1, -1 );
};




/**
 * parseProperties( pattern, cldr )
 *
 * @pattern [String] raw pattern for numbers.
 *
 * @cldr [Cldr instance].
 *
 * Return parser properties, used to feed parser function.
 *
 * TODO:
 * - Scientific_notation;
 * - Padding;
 */
var numberParseProperties = function( pattern, cldr, options ) {
	var aux, decimalSymbolRe, digitsRe, groupingSeparatorRe, infinitySymbol, invertedNuDigitsMap,
		invertedSymbolMap, maximumFractionDigits, maximumSignificantDigits,
		minimumSignificantDigits, nanSymbol, negativePrefix, negativeSuffix, nuDigitsMap,
		numberTokenizer, prefix, primaryGroupingSize, secondaryGroupingSize, suffix, symbolMap,
		formatProperties = numberFormatProperties( pattern, cldr, options );

	prefix = looseMatching( formatProperties[ 0 ] );
	maximumFractionDigits = formatProperties[ 4 ];
	minimumSignificantDigits = formatProperties[ 5 ];
	maximumSignificantDigits = formatProperties[ 6 ];
	primaryGroupingSize = formatProperties[ 8 ];
	secondaryGroupingSize = formatProperties[ 9 ];
	suffix = looseMatching( formatProperties[ 10 ] );
	negativePrefix = looseMatching( formatProperties[ 13 ] );
	negativeSuffix = looseMatching( formatProperties[ 14 ] );
	infinitySymbol = looseMatching( formatProperties[ 16 ] );
	nanSymbol = looseMatching( formatProperties[ 17 ] );
	symbolMap = objectMap( formatProperties[ 18 ], function( pair ) {
		return [ pair[ 0 ], looseMatching( pair[ 1 ] ) ];
	});
	nuDigitsMap = formatProperties[ 19 ];

	invertedSymbolMap = objectMap( numberSymbolInvertedMap( cldr ), function( pair ) {
		return [ looseMatching( pair[ 0 ] ), pair[ 1 ] ];
	});

	digitsRe = nuDigitsMap ? "[" + nuDigitsMap + "]" : "\\d";
	groupingSeparatorRe = regexpEscape( symbolMap[ "," ] );
	decimalSymbolRe = regexpEscape( symbolMap[ "." ] );

	if ( nuDigitsMap ) {
		invertedNuDigitsMap = nuDigitsMap.split( "" ).reduce(function( object, localizedDigit, i ) {
			object[ localizedDigit ] = String( i );
			return object;
		}, {} );
	}

	aux = [ prefix, suffix, negativePrefix, negativeSuffix ].map(function( value ) {
		return value.replace( /('([^']|'')+'|'')|./g, function( character, literal ) {

			// Literals
			if ( literal ) {
				return removeLiteralQuotes( literal );
			}

			// Symbols
			character = character.replace( /[\-+E%\u2030]/, function( symbol ) {
				return symbolMap[ symbol ];
			});

			return character;
		});
	});

	prefix = aux[ 0 ];
	suffix = aux[ 1 ];
	negativePrefix = aux[ 2 ];
	negativeSuffix = aux[ 3 ];

	// Number
	//
	// number_re =                       integer fraction?
	//
	// integer =                         digits | digits_using_grouping_separators
	//
	// fraction =                        regexp((.\d+)?)
	//
	// digits =                          regexp(\d+)
	//
	// digits_w_grouping_separators =    digits_w_1_grouping_separators |
	//                                   digits_w_2_grouping_separators
	//
	// digits_w_1_grouping_separators =  regexp(\d{1,3}(,\d{3})+)
	//
	// digits_w_2_grouping_separators =  regexp(\d{1,2}((,\d{2})*(,\d{3})))

	// Integer part
	numberTokenizer = digitsRe + "+";

	// Grouping separators
	if ( primaryGroupingSize ) {
		if ( secondaryGroupingSize ) {
			aux = digitsRe + "{1," + secondaryGroupingSize + "}((" + groupingSeparatorRe +
				digitsRe + "{" + secondaryGroupingSize + "})*(" + groupingSeparatorRe +
				digitsRe + "{" + primaryGroupingSize + "}))";
		} else {
			aux = digitsRe + "{1," + primaryGroupingSize + "}(" + groupingSeparatorRe +
				digitsRe + "{" + primaryGroupingSize + "})+";
		}
		numberTokenizer = "(" + aux + "|" + numberTokenizer + ")";
	}

	// Fraction part? Only included if 1 or 2.
	// 1: Using significant digit format.
	// 2: Using integer and fractional format && it has a maximumFractionDigits.
	if ( !isNaN( minimumSignificantDigits * maximumSignificantDigits ) || /* 1 */
				maximumFractionDigits /* 2 */ ) {

		// 1: Handle trailing decimal separator, e.g., `"1." => `1``.
		aux = decimalSymbolRe + digitsRe + "+";
		numberTokenizer = numberTokenizer + "(" + aux + "|" + decimalSymbolRe /* 1 */ + ")?" +

			// Handle non-padded decimals, e.g., `".12"` => `0.12` by making the integer part
			// optional.
			"|(" + numberTokenizer + ")?" + aux;

		numberTokenizer = "(" + numberTokenizer + ")";
	}

	// 0: @invertedSymbolMap [Object] Inverted symbol map.
	// 1: @invertedNuDigitsMap [Object] Inverted digits map if numbering system is different than
	//    `latn`.
	// 2: @tokenizer [Object] Tokenizer map, used by parser to consume input.
	return [
		invertedSymbolMap,
		invertedNuDigitsMap,
		{
			infinity: new RegExp( "^" + regexpEscape( infinitySymbol ) ),
			nan: new RegExp( "^" + regexpEscape( nanSymbol ) ),
			negativePrefix: new RegExp( "^" + regexpEscape( negativePrefix ) ),
			negativeSuffix: new RegExp( "^" + regexpEscape( negativeSuffix ) ),
			number: new RegExp( "^" + numberTokenizer ),
			prefix: new RegExp( "^" + regexpEscape( prefix ) ),
			suffix: new RegExp( "^" + regexpEscape( suffix ) )
		}
	];

};




/**
 * Pattern( style )
 *
 * @style [String] "decimal" (default) or "percent".
 *
 * @cldr [Cldr instance].
 */
var numberPattern = function( style, cldr ) {
	if ( style !== "decimal" && style !== "percent" ) {
		throw new Error( "Invalid style" );
	}

	return cldr.main([
		"numbers",
		style + "Formats-numberSystem-" + numberNumberingSystem( cldr ),
		"standard"
	]);
};




/**
 * EBNF representation:
 *
 * compact_pattern_re =       prefix?
 *                            number_pattern_re
 *                            suffix?
 *
 * number_pattern_re =        0+
 *
 * Regexp groups:
 *
 *  0: compact_pattern_re
 *  1: prefix
 *  2: number_pattern_re (the number pattern to use in compact mode)
 *  3: suffix
 */
var numberCompactPatternRe = ( /^([^0]*)(0+)([^0]*)$/ );




/**
 * goupingSeparator( number, primaryGroupingSize, secondaryGroupingSize )
 *
 * @number [Number].
 *
 * @primaryGroupingSize [Number]
 *
 * @secondaryGroupingSize [Number]
 *
 * Return the formatted number with group separator.
 */
var numberFormatGroupingSeparator = function( number, primaryGroupingSize, secondaryGroupingSize ) {
	var index,
		currentGroupingSize = primaryGroupingSize,
		ret = "",
		sep = ",",
		switchToSecondary = secondaryGroupingSize ? true : false;

	number = String( number ).split( "." );
	index = number[ 0 ].length;

	while ( index > currentGroupingSize ) {
		ret = number[ 0 ].slice( index - currentGroupingSize, index ) +
			( ret.length ? sep : "" ) + ret;
		index -= currentGroupingSize;
		if ( switchToSecondary ) {
			currentGroupingSize = secondaryGroupingSize;
			switchToSecondary = false;
		}
	}

	number[ 0 ] = number[ 0 ].slice( 0, index ) + ( ret.length ? sep : "" ) + ret;
	return number.join( "." );
};




/**
 * integerFractionDigits( number, minimumIntegerDigits, minimumFractionDigits,
 * maximumFractionDigits, round, roundIncrement )
 *
 * @number [Number]
 *
 * @minimumIntegerDigits [Number]
 *
 * @minimumFractionDigits [Number]
 *
 * @maximumFractionDigits [Number]
 *
 * @round [Function]
 *
 * @roundIncrement [Function]
 *
 * Return the formatted integer and fraction digits.
 */
var numberFormatIntegerFractionDigits = function( number, minimumIntegerDigits, minimumFractionDigits, maximumFractionDigits, round,
	roundIncrement ) {

	// Fraction
	if ( maximumFractionDigits ) {

		// Rounding
		if ( roundIncrement ) {
			number = round( number, roundIncrement );

		// Maximum fraction digits
		} else {
			number = round( number, { exponent: -maximumFractionDigits } );
		}

	} else {
		number = round( number );
	}

	number = String( number );

	// Maximum integer digits (post string phase)
	if ( maximumFractionDigits && /e-/.test( number ) ) {

		// Use toFixed( maximumFractionDigits ) to make sure small numbers like 1e-7 are
		// displayed using plain digits instead of scientific notation.
		// 1: Remove leading decimal zeros.
		// 2: Remove leading decimal separator.
		// Note: String() is still preferred so it doesn't mess up with a number precision
		// unnecessarily, e.g., (123456789.123).toFixed(10) === "123456789.1229999959",
		// String(123456789.123) === "123456789.123".
		number = ( +number ).toFixed( maximumFractionDigits )
			.replace( /0+$/, "" ) /* 1 */
			.replace( /\.$/, "" ); /* 2 */
	}

	// Minimum fraction digits (post string phase)
	if ( minimumFractionDigits ) {
		number = number.split( "." );
		number[ 1 ] = stringPad( number[ 1 ] || "", minimumFractionDigits, true );
		number = number.join( "." );
	}

	// Minimum integer digits
	if ( minimumIntegerDigits ) {
		number = number.split( "." );
		number[ 0 ] = stringPad( number[ 0 ], minimumIntegerDigits );
		number = number.join( "." );
	}

	return number;
};




/**
 * toPrecision( number, precision, round )
 *
 * @number (Number)
 *
 * @precision (Number) significant figures precision (not decimal precision).
 *
 * @round (Function)
 *
 * Return number.toPrecision( precision ) using the given round function.
 */
var numberToPrecision = function( number, precision, round ) {
	var roundOrder;

	if ( number === 0 ) {  // Fix #706
		return number;
	}

	roundOrder = Math.ceil( Math.log( Math.abs( number ) ) / Math.log( 10 ) );
	roundOrder -= precision;

	return round( number, { exponent: roundOrder } );
};




/**
 * toPrecision( number, minimumSignificantDigits, maximumSignificantDigits, round )
 *
 * @number [Number]
 *
 * @minimumSignificantDigits [Number]
 *
 * @maximumSignificantDigits [Number]
 *
 * @round [Function]
 *
 * Return the formatted significant digits number.
 */
var numberFormatSignificantDigits = function( number, minimumSignificantDigits, maximumSignificantDigits, round ) {
	var atMinimum, atMaximum;

	// Sanity check.
	if ( minimumSignificantDigits > maximumSignificantDigits ) {
		maximumSignificantDigits = minimumSignificantDigits;
	}

	atMinimum = numberToPrecision( number, minimumSignificantDigits, round );
	atMaximum = numberToPrecision( number, maximumSignificantDigits, round );

	// Use atMaximum only if it has more significant digits than atMinimum.
	number = +atMinimum === +atMaximum ? atMinimum : atMaximum;

	// Expand integer numbers, eg. 123e5 to 12300.
	number = ( +number ).toString( 10 );

	if ( ( /e/ ).test( number ) ) {
		throw createErrorUnsupportedFeature({
			feature: "integers out of (1e21, 1e-7)"
		});
	}

	// Add trailing zeros if necessary.
	if ( minimumSignificantDigits - number.replace( /^0+|\./g, "" ).length > 0 ) {
		number = number.split( "." );
		number[ 1 ] = stringPad( number[ 1 ] || "", minimumSignificantDigits - number[ 0 ].replace( /^0+/, "" ).length, true );
		number = number.join( "." );
	}

	return number;
};




/**
 * format( number, properties )
 *
 * @number [Number].
 *
 * @properties [Object] Output of number/format-properties.
 *
 * Return the formatted number.
 * ref: http://www.unicode.org/reports/tr35/tr35-numbers.html
 */
var numberFormat = function( number, properties, pluralGenerator ) {
	var aux, compactMap, infinitySymbol, maximumFractionDigits, maximumSignificantDigits,
		minimumFractionDigits, minimumIntegerDigits, minimumSignificantDigits, nanSymbol,
		nuDigitsMap, prefix, primaryGroupingSize, pattern, round, roundIncrement,
		secondaryGroupingSize, stringToParts, suffix, symbolMap;

	minimumIntegerDigits = properties[ 2 ];
	minimumFractionDigits = properties[ 3 ];
	maximumFractionDigits = properties[ 4 ];
	minimumSignificantDigits = properties[ 5 ];
	maximumSignificantDigits = properties[ 6 ];
	roundIncrement = properties[ 7 ];
	primaryGroupingSize = properties[ 8 ];
	secondaryGroupingSize = properties[ 9 ];
	round = properties[ 15 ];
	infinitySymbol = properties[ 16 ];
	nanSymbol = properties[ 17 ];
	symbolMap = properties[ 18 ];
	nuDigitsMap = properties[ 19 ];
	compactMap = properties[ 20 ];

	// NaN
	if ( isNaN( number ) ) {
		return [ { type: "nan", value: nanSymbol } ];
	}

	if ( number < 0 ) {
		pattern = properties[ 12 ];
		prefix = properties[ 13 ];
		suffix = properties[ 14 ];
	} else {
		pattern = properties[ 11 ];
		prefix = properties[ 0 ];
		suffix = properties[ 10 ];
	}

	// For prefix, suffix, and number parts.
	stringToParts = function( string ) {
		var numberType = "integer",
			parts = [];

		// TODO Move the tokenization of all parts that don't depend on number into
		// format-properties.
		string.replace( /('([^']|'')+'|'')|./g, function( character, literal ) {

			// Literals
			if ( literal ) {
				partsPush( parts, "literal", removeLiteralQuotes( literal ) );
				return;
			}

			// Currency symbol
			if ( character === "\u00A4" ) {
				partsPush( parts, "currency", character );
				return;
			}

			// Symbols
			character = character.replace( /[.,\-+E%\u2030]/, function( symbol ) {
				if ( symbol === "." ) {
					numberType = "fraction";
				}
				partsPush( parts, numberSymbolName[ symbol ], symbolMap[ symbol ] );

				// "Erase" handled character.
				return "";
			});

			// Number
			character = character.replace( /[0-9]/, function( digit ) {

				// Numbering system
				if ( nuDigitsMap ) {
					digit = nuDigitsMap[ +digit ];
				}
				partsPush( parts, numberType, digit );

				// "Erase" handled character.
				return "";
			});

			// Etc
			character.replace( /./, function( etc ) {
				partsPush( parts, "literal", etc );
			});
		});
		return parts;
	};

	prefix = stringToParts( prefix );
	suffix = stringToParts( suffix );

	// Infinity
	if ( !isFinite( number ) ) {
		return prefix.concat(
			{ type: "infinity", value: infinitySymbol },
			suffix
		);
	}

	// Percent
	if ( pattern.indexOf( "%" ) !== -1 ) {
		number *= 100;

	// Per mille
	} else if ( pattern.indexOf( "\u2030" ) !== -1 ) {
		number *= 1000;
	}

	var compactPattern, compactDigits, compactProperties, divisor, numberExponent, pluralForm;

	// Compact mode: initial number digit processing
	if ( compactMap ) {
		numberExponent = Math.abs( Math.floor( number ) ).toString().length - 1;
		numberExponent = Math.min( numberExponent, compactMap.maxExponent );

		// Use default plural form to perform initial decimal shift
		if ( numberExponent >= 3 ) {
			compactPattern = compactMap[ numberExponent ] && compactMap[ numberExponent ].other;
		}

		if ( compactPattern === "0" ) {
			compactPattern = null;
		} else if ( compactPattern ) {
			compactDigits = compactPattern.split( "0" ).length - 1;
			divisor = numberExponent - ( compactDigits - 1 );
			number = number / Math.pow( 10, divisor );
		}
	}

	// Significant digit format
	if ( !isNaN( minimumSignificantDigits * maximumSignificantDigits ) ) {
		number = numberFormatSignificantDigits( number, minimumSignificantDigits,
			maximumSignificantDigits, round );

	// Integer and fractional format
	} else {
		number = numberFormatIntegerFractionDigits( number, minimumIntegerDigits,
			minimumFractionDigits, maximumFractionDigits, round, roundIncrement );
	}

	// Compact mode: apply formatting
	if ( compactMap && compactPattern ) {

		// Get plural form after possible roundings
		pluralForm = pluralGenerator ? pluralGenerator( +number ) : "other";

		compactPattern = compactMap[ numberExponent ][ pluralForm ] || compactPattern;
		compactProperties = compactPattern.match( numberCompactPatternRe );

		// TODO Move the tokenization of all parts that don't depend on number into
		// format-properties.
		aux = function( string ) {
			var parts = [];
			string.replace( /(\s+)|([^\s0]+)/g, function( _garbage, space, compact ) {

				// Literals
				if ( space ) {
					partsPush( parts, "literal", space );
					return;
				}

				// Compact value
				if ( compact ) {
					partsPush( parts, "compact", compact );
					return;
				}
			});
			return parts;
		};

		// update prefix/suffix with compact prefix/suffix
		prefix = prefix.concat( aux( compactProperties[ 1 ] ) );
		suffix = aux( compactProperties[ 3 ] ).concat( suffix );
	}

	// Remove the possible number minus sign
	number = number.replace( /^-/, "" );

	// Grouping separators
	if ( primaryGroupingSize ) {
		number = numberFormatGroupingSeparator( number, primaryGroupingSize,
			secondaryGroupingSize );
	}

	// Scientific notation
	// TODO implement here

	// Padding/'([^']|'')+'|''|[.,\-+E%\u2030]/g
	// TODO implement here

	return prefix.concat(
		stringToParts( number ),
		suffix
	);
};




var numberToPartsFormatterFn = function( properties, pluralGenerator ) {
	return function numberToPartsFormatter( value ) {
		validateParameterPresence( value, "value" );
		validateParameterTypeNumber( value, "value" );

		return numberFormat( value, properties, pluralGenerator );
	};
};




function validateDigits( properties ) {
	var minimumIntegerDigits = properties[ 2 ],
		minimumFractionDigits = properties[ 3 ],
		maximumFractionDigits = properties[ 4 ],
		minimumSignificantDigits = properties[ 5 ],
		maximumSignificantDigits = properties[ 6 ];

	// Validate significant digit format properties
	if ( !isNaN( minimumSignificantDigits * maximumSignificantDigits ) ) {
		validateParameterRange( minimumSignificantDigits, "minimumSignificantDigits", 1, 21 );
		validateParameterRange( maximumSignificantDigits, "maximumSignificantDigits",
			minimumSignificantDigits, 21 );

	} else if ( !isNaN( minimumSignificantDigits ) || !isNaN( maximumSignificantDigits ) ) {
		throw new Error( "Neither or both the minimum and maximum significant digits must be " +
			"present" );

	// Validate integer and fractional format
	} else {
		validateParameterRange( minimumIntegerDigits, "minimumIntegerDigits", 1, 21 );
		validateParameterRange( minimumFractionDigits, "minimumFractionDigits", 0, 20 );
		validateParameterRange( maximumFractionDigits, "maximumFractionDigits",
			minimumFractionDigits, 20 );
	}
}

/**
 * .numberFormatter( [options] )
 *
 * @options [Object]:
 * - style: [String] "decimal" (default) or "percent".
 * - see also number/format options.
 *
 * Return a function that formats a number according to the given options and default/instance
 * locale.
 */
Globalize.numberFormatter =
Globalize.prototype.numberFormatter = function( options ) {
	var args, numberToPartsFormatter, returnFn;

	validateParameterTypePlainObject( options, "options" );

	options = options || {};
	args = [ options ];

	numberToPartsFormatter = this.numberToPartsFormatter( options );
	returnFn = numberFormatterFn( numberToPartsFormatter );
	runtimeBind( args, this.cldr, returnFn, [ numberToPartsFormatter ] );

	return returnFn;
};

/**
 * .numberToPartsFormatter( [options] )
 *
 * @options [Object]:
 * - style: [String] "symbol" (default), "accounting", "code" or "name".
 * - see also number/format options.
 *
 * Return a function that formats a number to parts according to the given options and
 * default/instance locale.
 */
Globalize.numberToPartsFormatter =
Globalize.prototype.numberToPartsFormatter = function( options ) {
	var args, cldr, fnArgs, pattern, properties, returnFn;

	validateParameterTypePlainObject( options, "options" );

	options = options || {};
	cldr = this.cldr;

	args = [ options ];

	validateDefaultLocale( cldr );

	cldr.on( "get", validateCldr );
	try {
		if ( options.raw ) {
			pattern = options.raw;
		} else {
			pattern = numberPattern( options.style || "decimal", cldr );
		}

		properties = numberFormatProperties( pattern, cldr, options );
		fnArgs = [ properties ];
	} finally {
		cldr.off( "get", validateCldr );
	}

	validateDigits( properties );

	if ( options.compact ) {
		fnArgs.push( this.pluralGenerator() );
	}
	returnFn = numberToPartsFormatterFn.apply( null, fnArgs );
	runtimeBind( args, cldr, returnFn, fnArgs );

	return returnFn;
};

/**
 * .numberParser( [options] )
 *
 * @options [Object]:
 * - style: [String] "decimal" (default) or "percent".
 *
 * Return the number parser according to the default/instance locale.
 */
Globalize.numberParser =
Globalize.prototype.numberParser = function( options ) {
	var args, cldr, pattern, properties, returnFn;

	validateParameterTypePlainObject( options, "options" );

	options = options || {};
	cldr = this.cldr;

	args = [ options ];

	validateDefaultLocale( cldr );
	if ( options.compact ) {
		throw createErrorUnsupportedFeature({
			feature: "compact number parsing (not implemented)"
		});
	}

	cldr.on( "get", validateCldr );

	if ( options.raw ) {
		pattern = options.raw;
	} else {
		pattern = numberPattern( options.style || "decimal", cldr );
	}

	properties = numberParseProperties( pattern, cldr, options );

	cldr.off( "get", validateCldr );

	returnFn = numberParserFn( properties );

	runtimeBind( args, cldr, returnFn, [ properties ] );

	return returnFn;
};

/**
 * .formatNumber( value [, options] )
 *
 * @value [Number] number to be formatted.
 *
 * @options [Object]: see number/format-properties.
 *
 * Format a number according to the given options and default/instance locale.
 */
Globalize.formatNumber =
Globalize.prototype.formatNumber = function( value, options ) {
	validateParameterPresence( value, "value" );
	validateParameterTypeNumber( value, "value" );

	return this.numberFormatter( options )( value );
};

/**
 * .formatNumberToParts( value [, options] )
 *
 * @value [Number] number to be formatted.
 *
 * @options [Object]: see number/format-properties.
 *
 * Format a number to pars according to the given options and default/instance locale.
 */
Globalize.formatNumberToParts =
Globalize.prototype.formatNumberToParts = function( value, options ) {
	validateParameterPresence( value, "value" );
	validateParameterTypeNumber( value, "value" );

	return this.numberToPartsFormatter( options )( value );
};

/**
 * .parseNumber( value [, options] )
 *
 * @value [String]
 *
 * @options [Object]: See numberParser().
 *
 * Return the parsed Number (including Infinity) or NaN when value is invalid.
 */
Globalize.parseNumber =
Globalize.prototype.parseNumber = function( value, options ) {
	validateParameterPresence( value, "value" );
	validateParameterTypeString( value, "value" );

	return this.numberParser( options )( value );
};

/**
 * Optimization to avoid duplicating some internal functions across modules.
 */
Globalize._createErrorUnsupportedFeature = createErrorUnsupportedFeature;
Globalize._numberNumberingSystem = numberNumberingSystem;
Globalize._numberNumberingSystemDigitsMap = numberNumberingSystemDigitsMap;
Globalize._numberPattern = numberPattern;
Globalize._numberSymbol = numberSymbol;
Globalize._looseMatching = looseMatching;
Globalize._removeLiteralQuotes = removeLiteralQuotes;
Globalize._stringPad = stringPad;
Globalize._validateParameterTypeNumber = validateParameterTypeNumber;
Globalize._validateParameterTypeString = validateParameterTypeString;

return Globalize;




}));

/*!
 * Globalize v1.7.0
 *
 * https://github.com/globalizejs/globalize
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2021-08-02T11:53Z
 */
(function( root, factory ) {

	// UMD returnExports
	if ( typeof define === "function" && define.amd ) {

		// AMD
		define([
			"cldr",
			"../globalize",
			"./number",
			"cldr/event",
			"cldr/supplemental"
		], factory );
	} else if ( typeof exports === "object" ) {

		// Node, CommonJS
		module.exports = factory( require( "cldrjs" ), require( "../globalize" ) );
	} else {

		// Global
		factory( root.Cldr, root.Globalize );
	}
}(this, function( Cldr, Globalize ) {

var alwaysArray = Globalize._alwaysArray,
	createError = Globalize._createError,
	formatMessageToParts = Globalize._formatMessageToParts,
	numberNumberingSystem = Globalize._numberNumberingSystem,
	numberPattern = Globalize._numberPattern,
	partsJoin = Globalize._partsJoin,
	partsPush = Globalize._partsPush,
	runtimeBind = Globalize._runtimeBind,
	stringPad = Globalize._stringPad,
	validateCldr = Globalize._validateCldr,
	validateDefaultLocale = Globalize._validateDefaultLocale,
	validateParameterPresence = Globalize._validateParameterPresence,
	validateParameterType = Globalize._validateParameterType,
	validateParameterTypeNumber = Globalize._validateParameterTypeNumber,
	validateParameterTypePlainObject = Globalize._validateParameterTypePlainObject;


var createErrorPluralModulePresence = function() {
	return createError( "E_MISSING_PLURAL_MODULE", "Plural module not loaded." );
};




var validateParameterTypeCurrency = function( value, name ) {
	validateParameterType(
		value,
		name,
		value === undefined || typeof value === "string" && ( /^[A-Za-z]{3}$/ ).test( value ),
		"3-letter currency code string as defined by ISO 4217"
	);
};




var currencyFormatterFn = function( currencyToPartsFormatter ) {
	return function currencyFormatter( value ) {
		return partsJoin( currencyToPartsFormatter( value ));
	};
};




/**
 * supplementalOverride( currency, pattern, cldr )
 *
 * Return pattern with fraction digits overriden by supplemental currency data.
 */
var currencySupplementalOverride = function( currency, pattern, cldr ) {
	var digits,
		fraction = "",
		fractionData = cldr.supplemental([ "currencyData/fractions", currency ]) ||
			cldr.supplemental( "currencyData/fractions/DEFAULT" );

	digits = +fractionData._digits;

	if ( digits ) {
		fraction = "." + stringPad( "0", digits ).slice( 0, -1 ) + fractionData._rounding;
	}

	return pattern.replace( /\.(#+|0*[0-9]|0+[0-9]?)/g, fraction );
};




var objectFilter = function( object, testRe ) {
	var key,
		copy = {};

	for ( key in object ) {
		if ( testRe.test( key ) ) {
			copy[ key ] = object[ key ];
		}
	}

	return copy;
};




var currencyUnitPatterns = function( cldr ) {
	return objectFilter( cldr.main([
		"numbers",
		"currencyFormats-numberSystem-" + numberNumberingSystem( cldr )
	]), /^unitPattern/ );
};




/**
 * nameProperties( currency, cldr )
 *
 * Return number pattern with the appropriate currency code in as literal.
 */
var currencyNameProperties = function( currency, cldr ) {
	var pattern = numberPattern( "decimal", cldr );

	// The number of decimal places and the rounding for each currency is not locale-specific. Those
	// values overridden by Supplemental Currency Data.
	pattern = currencySupplementalOverride( currency, pattern, cldr );

	return {
		displayNames: objectFilter( cldr.main([
			"numbers/currencies",
			currency
		]), /^displayName/ ),
		pattern: pattern,
		unitPatterns: currencyUnitPatterns( cldr )
	};
};




/**
 * Unicode regular expression for: everything except symbols from the category S
 *
 * Generated by:
 *
 * var s = regenerate()
 *   .addRange( 0x0, 0x10FFFF )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Math_Symbol/symbols" ) )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Currency_Symbol/symbols" ) )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Modifier_Symbol/symbols" ) )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Other_Symbol/symbols" ) )
 *
 * https://github.com/mathiasbynens/regenerate
 * https://github.com/node-unicode/unicode-13.0.0
 * http://www.unicode.org/reports/tr44/#General_Category_Values
 */
var regexpNotS = /[\0-#%-\*,-;\?-\]_a-\{\}\x7F-\xA1\xA7\xAA\xAB\xAD\xB2\xB3\xB5-\xB7\xB9-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u0383\u0386-\u03F5\u03F7-\u0481\u0483-\u058C\u0590-\u0605\u0609\u060A\u060C\u060D\u0610-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF-\u07F5\u07F7-\u07FD\u0800-\u09F1\u09F4-\u09F9\u09FC-\u0AF0\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C7E\u0C80-\u0D4E\u0D50-\u0D78\u0D7A-\u0E3E\u0E40-\u0F00\u0F04-\u0F12\u0F14\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39-\u0FBD\u0FC6\u0FCD\u0FD0-\u0FD4\u0FD9-\u109D\u10A0-\u138F\u139A-\u166C\u166E-\u17DA\u17DC-\u193F\u1941-\u19DD\u1A00-\u1B60\u1B6B-\u1B73\u1B7D-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF-\u2043\u2045-\u2051\u2053-\u2079\u207D-\u2089\u208D-\u209F\u20C0-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u2308-\u230B\u2329\u232A\u2427-\u243F\u244B-\u249B\u24EA-\u24FF\u2768-\u2793\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2B74\u2B75\u2B96\u2C00-\u2CE4\u2CEB-\u2E4F\u2E52-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u3003\u3005-\u3011\u3014-\u301F\u3021-\u3035\u3038-\u303D\u3040-\u309A\u309D-\u318F\u3192-\u3195\u31A0-\u31BF\u31E4-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uAA76\uAA7A-\uAB5A\uAB5C-\uAB69\uAB6C-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBC2-\uFDFB\uFDFE-\uFE61\uFE63\uFE67\uFE68\uFE6A-\uFF03\uFF05-\uFF0A\uFF0C-\uFF1B\uFF1F-\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5F-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDFFF]|[\uD801\uD803\uD804\uD806\uD808-\uD819\uD81B-\uD82E\uD830-\uD833\uD837\uD839\uD83A\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD802[\uDC00-\uDC76\uDC79-\uDEC7\uDEC9-\uDFFF]|\uD805[\uDC00-\uDF3E\uDF40-\uDFFF]|\uD807[\uDC00-\uDFD4\uDFF2-\uDFFF]|\uD81A[\uDC00-\uDF3B\uDF40-\uDF44\uDF46-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDE9-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE87-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDF\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDD79\uDDCC\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7B-\uDE7F\uDE87-\uDE8F\uDEA9-\uDEAF\uDEB7-\uDEBF\uDEC3-\uDECF\uDED7-\uDEFF\uDF93\uDFCB-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;




/**
 * Unicode regular expression for: everything except symbols from categories S and Z
 *
 * Generated by:
 *
 * var s = regenerate()
 *   .addRange( 0x0, 0x10FFFF )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Math_Symbol/symbols" ) )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Currency_Symbol/symbols" ) )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Modifier_Symbol/symbols" ) )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Other_Symbol/symbols" ) )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Space_Separator/symbols" ) )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Line_Separator/symbols" ) )
 *   .remove( require( "@unicode/unicode-13.0.0/General_Category/Paragraph_Separator/symbols" ) );
 *
 * https://github.com/mathiasbynens/regenerate
 * https://github.com/node-unicode/unicode-13.0.0
 * http://www.unicode.org/reports/tr44/#General_Category_Values
 */
var regexpNotSAndZ = /[\0-\x1F!-#%-\*,-;\?-\]_a-\{\}\x7F-\x9F\xA1\xA7\xAA\xAB\xAD\xB2\xB3\xB5-\xB7\xB9-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u0383\u0386-\u03F5\u03F7-\u0481\u0483-\u058C\u0590-\u0605\u0609\u060A\u060C\u060D\u0610-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF-\u07F5\u07F7-\u07FD\u0800-\u09F1\u09F4-\u09F9\u09FC-\u0AF0\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C7E\u0C80-\u0D4E\u0D50-\u0D78\u0D7A-\u0E3E\u0E40-\u0F00\u0F04-\u0F12\u0F14\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39-\u0FBD\u0FC6\u0FCD\u0FD0-\u0FD4\u0FD9-\u109D\u10A0-\u138F\u139A-\u166C\u166E-\u167F\u1681-\u17DA\u17DC-\u193F\u1941-\u19DD\u1A00-\u1B60\u1B6B-\u1B73\u1B7D-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u2043\u2045-\u2051\u2053-\u205E\u2060-\u2079\u207D-\u2089\u208D-\u209F\u20C0-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u2308-\u230B\u2329\u232A\u2427-\u243F\u244B-\u249B\u24EA-\u24FF\u2768-\u2793\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2B74\u2B75\u2B96\u2C00-\u2CE4\u2CEB-\u2E4F\u2E52-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3001-\u3003\u3005-\u3011\u3014-\u301F\u3021-\u3035\u3038-\u303D\u3040-\u309A\u309D-\u318F\u3192-\u3195\u31A0-\u31BF\u31E4-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uAA76\uAA7A-\uAB5A\uAB5C-\uAB69\uAB6C-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBC2-\uFDFB\uFDFE-\uFE61\uFE63\uFE67\uFE68\uFE6A-\uFF03\uFF05-\uFF0A\uFF0C-\uFF1B\uFF1F-\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5F-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDFFF]|[\uD801\uD803\uD804\uD806\uD808-\uD819\uD81B-\uD82E\uD830-\uD833\uD837\uD839\uD83A\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD802[\uDC00-\uDC76\uDC79-\uDEC7\uDEC9-\uDFFF]|\uD805[\uDC00-\uDF3E\uDF40-\uDFFF]|\uD807[\uDC00-\uDFD4\uDFF2-\uDFFF]|\uD81A[\uDC00-\uDF3B\uDF40-\uDF44\uDF46-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDE9-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE87-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDF\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDD79\uDDCC\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7B-\uDE7F\uDE87-\uDE8F\uDEA9-\uDEAF\uDEB7-\uDEBF\uDEC3-\uDECF\uDED7-\uDEFF\uDF93\uDFCB-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;




/**
 * symbolProperties( currency, cldr )
 *
 * Return pattern replacing `¤` with the appropriate currency symbol literal.
 */
var currencySymbolProperties = function( currency, cldr, options ) {
	var currencySpacing, pattern, symbol, symbolEntries,
		regexp = {
			"[:digit:]": /\d/,
			"[:^S:]": regexpNotS,
			"[[:^S:]&[:^Z:]]": regexpNotSAndZ
		};

	if ( options.style === "code" ) {
		symbol = currency;
	} else {
		symbolEntries = [ "symbol" ];

		// If options.symbolForm === "narrow" was passed, prepend it.
		if ( options.symbolForm === "narrow" ) {
			symbolEntries.unshift( "symbol-alt-narrow" );
		}

		symbolEntries.some(function( symbolEntry ) {
			return symbol = cldr.main([
				"numbers/currencies",
				currency,
				symbolEntry
			]);
		});
	}

	currencySpacing = [ "beforeCurrency", "afterCurrency" ].map(function( position ) {
		return cldr.main([
			"numbers",
			"currencyFormats-numberSystem-" + numberNumberingSystem( cldr ),
			"currencySpacing",
			position
		]);
	});

	pattern = cldr.main([
		"numbers",
		"currencyFormats-numberSystem-" + numberNumberingSystem( cldr ),
		options.style === "accounting" ? "accounting" : "standard"
	]);

	pattern =

		// The number of decimal places and the rounding for each currency is not locale-specific.
		// Those values are overridden by Supplemental Currency Data.
		currencySupplementalOverride( currency, pattern, cldr )

		// Replace "¤" (\u00A4) with the appropriate symbol literal.
		.split( ";" ).map(function( pattern ) {

			return pattern.split( "\u00A4" ).map(function( part, i ) {
				var currencyMatch = regexp[ currencySpacing[ i ].currencyMatch ],
					surroundingMatch = regexp[ currencySpacing[ i ].surroundingMatch ],
					insertBetween = "";

				// For currencyMatch and surroundingMatch definitions, read [1].
				// When i === 0, beforeCurrency is being handled. Otherwise, afterCurrency.
				// 1: http://www.unicode.org/reports/tr35/tr35-numbers.html#Currencies
				currencyMatch = currencyMatch.test( symbol.charAt( i ? symbol.length - 1 : 0 ) );
				surroundingMatch = surroundingMatch.test(
					part.charAt( i ? 0 : part.length - 1 ).replace( /[#@,.]/g, "0" )
				);

				if ( currencyMatch && part && surroundingMatch ) {
					insertBetween = currencySpacing[ i ].insertBetween;
				}

				return ( i ? insertBetween : "" ) + part + ( i ? "" : insertBetween );
			}).join( "\u00A4" );
		}).join( ";" );

	return {
		pattern: pattern,
		symbol: symbol
	};
};




/**
 * nameFormat( formattedNumber, pluralForm, properties )
 *
 * Return the appropriate name form currency format.
 */
var currencyNameFormat = function( formattedNumber, pluralForm, properties ) {
	var displayName, unitPattern,
		parts = [],
		displayNames = properties.displayNames || {},
		unitPatterns = properties.unitPatterns;

	displayName = displayNames[ "displayName-count-" + pluralForm ] ||
		displayNames[ "displayName-count-other" ] ||
		displayNames.displayName ||
		properties.currency;
	unitPattern = unitPatterns[ "unitPattern-count-" + pluralForm ] ||
		unitPatterns[ "unitPattern-count-other" ];

	formatMessageToParts( unitPattern, [ formattedNumber, displayName ]).forEach(function( part ) {
		if ( part.type === "variable" && part.name === "0" ) {
			part.value.forEach(function( part ) {
				partsPush( parts, part.type, part.value );
			});
		} else if ( part.type === "variable" && part.name === "1" ) {
			partsPush( parts, "currency", part.value );
		} else {
			partsPush( parts, "literal", part.value );
		}
	});

	return parts;
};




/**
 * symbolFormat( parts, symbol )
 *
 * Return the appropriate symbol/account form format.
 */
var currencySymbolFormat = function( parts, symbol ) {
	parts.forEach(function( part ) {
		if ( part.type === "currency" ) {
			part.value = symbol;
		}
	});
	return parts;
};




var currencyToPartsFormatterFn = function( numberToPartsFormatter, pluralGenerator, properties ) {
	var fn;

	// Return formatter when style is "name".
	if ( pluralGenerator && properties ) {
		fn = function currencyToPartsFormatter( value ) {
			validateParameterPresence( value, "value" );
			validateParameterTypeNumber( value, "value" );
			return currencyNameFormat(
				numberToPartsFormatter( value ),
				pluralGenerator( value ),
				properties
			);
		};

	// Return formatter when style is "symbol", "accounting", or "code".
	} else {
		fn = function currencyToPartsFormatter( value ) {

			// 1: Reusing pluralGenerator argument, but in this case it is actually `symbol`
			return currencySymbolFormat( numberToPartsFormatter( value ), pluralGenerator /* 1 */ );
		};
	}

	return fn;
};




/**
 * objectOmit( object, keys )
 *
 * Return a copy of the object, filtered to omit the blacklisted key or array of keys.
 */
var objectOmit = function( object, keys ) {
	var key,
		copy = {};

	keys = alwaysArray( keys );

	for ( key in object ) {
		if ( keys.indexOf( key ) === -1 ) {
			copy[ key ] = object[ key ];
		}
	}

	return copy;
};




function validateRequiredCldr( path, value ) {
	validateCldr( path, value, {
		skip: [
			/numbers\/currencies\/[^/]+\/symbol-alt-/,
			/supplemental\/currencyData\/fractions\/[A-Za-z]{3}$/
		]
	});
}

/**
 * .currencyFormatter( currency [, options] )
 *
 * @currency [String] 3-letter currency code as defined by ISO 4217.
 *
 * @options [Object]:
 * - style: [String] "symbol" (default), "accounting", "code" or "name".
 * - see also number/format options.
 *
 * Return a function that formats a currency according to the given options and default/instance
 * locale.
 */
Globalize.currencyFormatter =
Globalize.prototype.currencyFormatter = function( currency, options ) {
	var args, currencyToPartsFormatter, returnFn;

	validateParameterPresence( currency, "currency" );
	validateParameterTypeCurrency( currency, "currency" );

	validateParameterTypePlainObject( options, "options" );

	options = options || {};
	args = [ currency, options ];

	currencyToPartsFormatter = this.currencyToPartsFormatter( currency, options );
	returnFn = currencyFormatterFn( currencyToPartsFormatter );
	runtimeBind( args, this.cldr, returnFn, [ currencyToPartsFormatter ] );

	return returnFn;
};

/**
 * .currencyToPartsFormatter( currency [, options] )
 *
 * @currency [String] 3-letter currency code as defined by ISO 4217.
 *
 * @options [Object]:
 * - style: [String] "symbol" (default), "accounting", "code" or "name".
 * - see also number/format options.
 *
 * Return a currency formatter function (of the form below) according to the given options and the
 * default/instance locale.
 *
 * fn( value )
 *
 * @value [Number]
 *
 * Return a function that formats a currency to parts according to the given options
 * and the default/instance locale.
 */
Globalize.currencyToPartsFormatter =
Globalize.prototype.currencyToPartsFormatter = function( currency, options ) {
	var args, cldr, numberToPartsFormatter, pluralGenerator, properties, returnFn, style;

	validateParameterPresence( currency, "currency" );
	validateParameterTypeCurrency( currency, "currency" );

	validateParameterTypePlainObject( options, "options" );

	cldr = this.cldr;
	options = options || {};

	args = [ currency, options ];
	style = options.style || "symbol";

	validateDefaultLocale( cldr );

	// Get properties given style ("symbol" default, "code" or "name").
	cldr.on( "get", validateRequiredCldr );
	try {
		properties = ({
			accounting: currencySymbolProperties,
			code: currencySymbolProperties,
			name: currencyNameProperties,
			symbol: currencySymbolProperties
		}[ style ] )( currency, cldr, options );
	} finally {
		cldr.off( "get", validateRequiredCldr );
	}

	// options = options minus style, plus raw pattern.
	options = objectOmit( options, "style" );
	options.raw = properties.pattern;

	// Return formatter when style is "symbol", "accounting", or "code".
	if ( style === "symbol" || style === "accounting" || style === "code" ) {
		numberToPartsFormatter = this.numberToPartsFormatter( options );

		returnFn = currencyToPartsFormatterFn( numberToPartsFormatter, properties.symbol );

		runtimeBind( args, cldr, returnFn, [ numberToPartsFormatter, properties.symbol ] );

	// Return formatter when style is "name".
	} else {
		numberToPartsFormatter = this.numberToPartsFormatter( options );

		// Is plural module present? Yes, use its generator. Nope, use an error generator.
		pluralGenerator = this.plural !== undefined ?
			this.pluralGenerator() :
			createErrorPluralModulePresence;

		returnFn = currencyToPartsFormatterFn(
			numberToPartsFormatter,
			pluralGenerator,
			properties
		);

		runtimeBind( args, cldr, returnFn, [
			numberToPartsFormatter,
			pluralGenerator,
			properties
		]);
	}

	return returnFn;
};

/**
 * .currencyParser( currency [, options] )
 *
 * @currency [String] 3-letter currency code as defined by ISO 4217.
 *
 * @options [Object] see currencyFormatter.
 *
 * Return the currency parser according to the given options and the default/instance locale.
 */
Globalize.currencyParser =
Globalize.prototype.currencyParser = function( /* currency, options */ ) {

	// TODO implement parser.

};

/**
 * .formatCurrency( value, currency [, options] )
 *
 * @value [Number] number to be formatted.
 *
 * @currency [String] 3-letter currency code as defined by ISO 4217.
 *
 * @options [Object] see currencyFormatter.
 *
 * Format a currency according to the given options and the default/instance locale.
 */
Globalize.formatCurrency =
Globalize.prototype.formatCurrency = function( value, currency, options ) {
	validateParameterPresence( value, "value" );
	validateParameterTypeNumber( value, "value" );
	return this.currencyFormatter( currency, options )( value );
};

/**
 * .formatCurrencyToParts( value, currency [, options] )
 *
 * @value [Number] number to be formatted.
 *
 * @currency [String] 3-letter currency code as defined by ISO 4217.
 *
 * @options [Object] see currencyFormatter.
 *
 * Format a currency to parts according to the given options and the default/instance locale.
 */
Globalize.formatCurrencyToParts =
Globalize.prototype.formatCurrencyToParts = function( value, currency, options ) {
	validateParameterPresence( value, "value" );
	validateParameterTypeNumber( value, "value" );
	return this.currencyToPartsFormatter( currency, options )( value );
};

/**
 * .parseCurrency( value, currency [, options] )
 *
 * @value [String]
 *
 * @currency [String] 3-letter currency code as defined by ISO 4217.
 *
 * @options [Object]: See currencyFormatter.
 *
 * Return the parsed currency or NaN when value is invalid.
 */
Globalize.parseCurrency =
Globalize.prototype.parseCurrency = function( /* value, currency, options */ ) {
};

return Globalize;




}));

/**
 * Globalize v1.7.0
 *
 * https://github.com/globalizejs/globalize
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2021-08-02T11:53Z
 */
/*!
 * Globalize v1.7.0 2021-08-02T11:53Z Released under the MIT license
 * http://git.io/TrdQbw
 */
(function( root, factory ) {

	// UMD returnExports
	if ( typeof define === "function" && define.amd ) {

		// AMD
		define([
			"cldr",
			"../globalize",
			"./number",
			"cldr/event",
			"cldr/supplemental"
		], factory );
	} else if ( typeof exports === "object" ) {

		// Node, CommonJS
		module.exports = factory( require( "cldrjs" ), require( "../globalize" ) );
	} else {

		// Extend global
		factory( root.Cldr, root.Globalize );
	}
}(this, function( Cldr, Globalize ) {

var createError = Globalize._createError,
	createErrorUnsupportedFeature = Globalize._createErrorUnsupportedFeature,
	formatMessage = Globalize._formatMessage,
	isPlainObject = Globalize._isPlainObject,
	looseMatching = Globalize._looseMatching,
	numberNumberingSystemDigitsMap = Globalize._numberNumberingSystemDigitsMap,
	numberSymbol = Globalize._numberSymbol,
	partsJoin = Globalize._partsJoin,
	partsPush = Globalize._partsPush,
	regexpEscape = Globalize._regexpEscape,
	removeLiteralQuotes = Globalize._removeLiteralQuotes,
	runtimeBind = Globalize._runtimeBind,
	stringPad = Globalize._stringPad,
	validate = Globalize._validate,
	validateCldr = Globalize._validateCldr,
	validateDefaultLocale = Globalize._validateDefaultLocale,
	validateParameterPresence = Globalize._validateParameterPresence,
	validateParameterType = Globalize._validateParameterType,
	validateParameterTypePlainObject = Globalize._validateParameterTypePlainObject,
	validateParameterTypeString = Globalize._validateParameterTypeString;


var validateParameterTypeDate = function( value, name ) {
	validateParameterType( value, name, value === undefined || value instanceof Date, "Date" );
};




var createErrorInvalidParameterValue = function( name, value ) {
	return createError( "E_INVALID_PAR_VALUE", "Invalid `{name}` value ({value}).", {
		name: name,
		value: value
	});
};




/**
 * Create a map between the skeleton fields and their positions, e.g.,
 * {
 *   G: 0
 *   y: 1
 *   ...
 * }
 */
var validateSkeletonFieldsPosMap = "GyYuUrQqMLlwWEecdDFghHKkmsSAzZOvVXx".split( "" ).reduce(function( memo, item, i ) {
	memo[ item ] = i;
	return memo;
}, {});




/**
 * validateSkeleton( skeleton )
 *
 * skeleton: Assume `j` has already been converted into a localized hour field.
 */
var validateSkeleton = function validateSkeleton( skeleton ) {
	var last,

		// Using easier to read variable.
		fieldsPosMap = validateSkeletonFieldsPosMap;

	// "The fields are from the Date Field Symbol Table in Date Format Patterns"
	// Ref: http://www.unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems
	// I.e., check for invalid characters.
	skeleton.replace( /[^GyYuUrQqMLlwWEecdDFghHKkmsSAzZOvVXx]/, function( field ) {
		throw createError(
			"E_INVALID_OPTIONS", "Invalid field `{invalidField}` of skeleton `{value}`",
			{
				invalidField: field,
				type: "skeleton",
				value: skeleton
			}
		);
	});

	// "The canonical order is from top to bottom in that table; that is, yM not My".
	// http://www.unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems
	// I.e., check for invalid order.
	skeleton.split( "" ).every(function( field ) {
		if ( fieldsPosMap[ field ] < last ) {
			throw createError(
				"E_INVALID_OPTIONS", "Invalid order `{invalidField}` of skeleton `{value}`",
				{
					invalidField: field,
					type: "skeleton",
					value: skeleton
				}
			);
		}
		last = fieldsPosMap[ field ];
		return true;
	});
};




/**
 * Returns a new object created by using `object`'s values as keys, and the keys as values.
 */
var objectInvert = function( object, fn ) {
	fn = fn || function( object, key, value ) {
		object[ value ] = key;
		return object;
	};
	return Object.keys( object ).reduce(function( newObject, key ) {
		return fn( newObject, key, object[ key ] );
	}, {});
};




// Invert key and values, e.g., {"e": "eEc"} ==> {"e": "e", "E": "e", "c": "e"}.
var dateExpandPatternSimilarFieldsMap = objectInvert({
	"e": "eEc",
	"L": "ML"
}, function( object, key, value ) {
	value.split( "" ).forEach(function( field ) {
		object[ field ] = key;
	});
	return object;
});




var dateExpandPatternNormalizePatternType = function( character ) {
	return dateExpandPatternSimilarFieldsMap[ character ] || character;
};




var datePatternRe = ( /([a-z])\1*|'([^']|'')+'|''|./ig );




var stringRepeat = function( str, count ) {
	var i, result = "";
	for ( i = 0; i < count; i++ ) {
		result = result + str;
	}
	return result;
};




function expandBestMatchFormat( skeletonWithoutFractionalSeconds, bestMatchFormat ) {
	var i, j, bestMatchFormatParts, matchedType, matchedLength, requestedType,
		requestedLength, requestedSkeletonParts,

		// Using an easier to read variable.
		normalizePatternType = dateExpandPatternNormalizePatternType;

	requestedSkeletonParts = skeletonWithoutFractionalSeconds.match( datePatternRe );
	bestMatchFormatParts = bestMatchFormat.match( datePatternRe );

	for ( i = 0; i < bestMatchFormatParts.length; i++ ) {
		matchedType = bestMatchFormatParts[ i ].charAt( 0 );
		matchedLength = bestMatchFormatParts[ i ].length;
		for ( j = 0; j < requestedSkeletonParts.length; j++ ) {
			requestedType = requestedSkeletonParts[ j ].charAt( 0 );
			requestedLength = requestedSkeletonParts[ j ].length;
			if ( normalizePatternType( matchedType ) === normalizePatternType( requestedType ) &&
				matchedLength < requestedLength
			) {
				bestMatchFormatParts[ i ] = stringRepeat( matchedType, requestedLength );
			}
		}
	}

	return bestMatchFormatParts.join( "" );
}

// See: http://www.unicode.org/reports/tr35/tr35-dates.html#Matching_Skeletons
var dateExpandPatternAugmentFormat = function( requestedSkeleton, bestMatchFormat, decimalSeparator ) {
	var countOfFractionalSeconds, fractionalSecondMatch, lastSecondIdx,
		skeletonWithoutFractionalSeconds;

	fractionalSecondMatch = requestedSkeleton.match( /S/g );
	countOfFractionalSeconds = fractionalSecondMatch ? fractionalSecondMatch.length : 0;
	skeletonWithoutFractionalSeconds = requestedSkeleton.replace( /S/g, "" );

	bestMatchFormat = expandBestMatchFormat( skeletonWithoutFractionalSeconds, bestMatchFormat );

	lastSecondIdx = bestMatchFormat.lastIndexOf( "s" );
	if ( lastSecondIdx !== -1 && countOfFractionalSeconds !== 0 ) {
		bestMatchFormat =
			bestMatchFormat.slice( 0, lastSecondIdx + 1 ) +
			decimalSeparator +
			stringRepeat( "S", countOfFractionalSeconds ) +
			bestMatchFormat.slice( lastSecondIdx + 1 );
	}
	return bestMatchFormat;
};




var dateExpandPatternCompareFormats = function( formatA, formatB ) {
	var a, b, distance, lenA, lenB, typeA, typeB, i, j,

		// Using easier to read variables.
		normalizePatternType = dateExpandPatternNormalizePatternType;

	if ( formatA === formatB ) {
		return 0;
	}

	formatA = formatA.match( datePatternRe );
	formatB = formatB.match( datePatternRe );

	if ( formatA.length !== formatB.length ) {
		return -1;
	}

	distance = 1;
	for ( i = 0; i < formatA.length; i++ ) {
		a = formatA[ i ].charAt( 0 );
		typeA = normalizePatternType( a );
		typeB = null;
		for ( j = 0; j < formatB.length; j++ ) {
			b = formatB[ j ].charAt( 0 );
			typeB = normalizePatternType( b );
			if ( typeA === typeB ) {
				break;
			} else {
				typeB = null;
			}
		}
		if ( typeB === null ) {
			return -1;
		}
		lenA = formatA[ i ].length;
		lenB = formatB[ j ].length;
		distance = distance + Math.abs( lenA - lenB );

		// Most symbols have a small distance from each other, e.g., M ≅ L; E ≅ c; a ≅ b ≅ B;
		// H ≅ k ≅ h ≅ K; ...
		if ( a !== b ) {
			distance += 1;
		}

		// Numeric (l<3) and text fields (l>=3) are given a larger distance from each other.
		if ( ( lenA < 3 && lenB >= 3 ) || ( lenA >= 3 && lenB < 3 ) ) {
			distance += 20;
		}
	}
	return distance;
};




var dateExpandPatternGetBestMatchPattern = function( cldr, askedSkeleton ) {
	var availableFormats, decimalSeparator, pattern, ratedFormats, skeleton,
		path = "dates/calendars/gregorian/dateTimeFormats/availableFormats",

		// Using easier to read variables.
		augmentFormat = dateExpandPatternAugmentFormat,
		compareFormats = dateExpandPatternCompareFormats;

	pattern = cldr.main([ path, askedSkeleton ]);

	if ( askedSkeleton && !pattern ) {
		availableFormats = cldr.main([ path ]);
		ratedFormats = [];

		for ( skeleton in availableFormats ) {
			ratedFormats.push({
				skeleton: skeleton,
				pattern: availableFormats[ skeleton ],
				rate: compareFormats( askedSkeleton, skeleton )
			});
		}

		ratedFormats = ratedFormats
			.filter( function( format ) {
				return format.rate > -1;
			} )
			.sort( function( formatA, formatB ) {
				return formatA.rate - formatB.rate;
			});

		if ( ratedFormats.length ) {
			decimalSeparator = numberSymbol( "decimal", cldr );
			pattern = augmentFormat( askedSkeleton, ratedFormats[ 0 ].pattern, decimalSeparator );
		}
	}

	return pattern;
};




/**
 * expandPattern( options, cldr )
 *
 * @options [Object] if String, it's considered a skeleton. Object accepts:
 * - skeleton: [String] lookup availableFormat;
 * - date: [String] ( "full" | "long" | "medium" | "short" );
 * - time: [String] ( "full" | "long" | "medium" | "short" );
 * - datetime: [String] ( "full" | "long" | "medium" | "short" );
 * - raw: [String] For more info see datetime/format.js.
 *
 * @cldr [Cldr instance].
 *
 * Return the corresponding pattern.
 * Eg for "en":
 * - "GyMMMd" returns "MMM d, y G";
 * - { skeleton: "GyMMMd" } returns "MMM d, y G";
 * - { date: "full" } returns "EEEE, MMMM d, y";
 * - { time: "full" } returns "h:mm:ss a zzzz";
 * - { datetime: "full" } returns "EEEE, MMMM d, y 'at' h:mm:ss a zzzz";
 * - { raw: "dd/mm" } returns "dd/mm";
 */
var dateExpandPattern = function( options, cldr ) {
	var dateSkeleton, result, skeleton, timeSkeleton, type,

		// Using easier to read variables.
		getBestMatchPattern = dateExpandPatternGetBestMatchPattern;

	function combineDateTime( type, datePattern, timePattern ) {
		return formatMessage(
			cldr.main([
				"dates/calendars/gregorian/dateTimeFormats",
				type
			]),
			[ timePattern, datePattern ]
		);
	}

	switch ( true ) {
		case "skeleton" in options:
			skeleton = options.skeleton;

			// Preferred hour (j).
			skeleton = skeleton.replace( /j/g, function() {
				return cldr.supplemental.timeData.preferred();
			});

			validateSkeleton( skeleton );

			// Try direct map (note that getBestMatchPattern handles it).
			// ... or, try to "best match" the whole skeleton.
			result = getBestMatchPattern(
				cldr,
				skeleton
			);
			if ( result ) {
				break;
			}

			// ... or, try to "best match" the date and time parts individually.
			timeSkeleton = skeleton.split( /[^hHKkmsSAzZOvVXx]/ ).slice( -1 )[ 0 ];
			dateSkeleton = skeleton.split( /[^GyYuUrQqMLlwWdDFgEec]/ )[ 0 ];
			dateSkeleton = getBestMatchPattern(
				cldr,
				dateSkeleton
			);
			timeSkeleton = getBestMatchPattern(
				cldr,
				timeSkeleton
			);

			if ( /(MMMM|LLLL).*[Ec]/.test( dateSkeleton ) ) {
				type = "full";
			} else if ( /MMMM|LLLL/.test( dateSkeleton ) ) {
				type = "long";
			} else if ( /MMM|LLL/.test( dateSkeleton ) ) {
				type = "medium";
			} else {
				type = "short";
			}

			if ( dateSkeleton && timeSkeleton ) {
				result = combineDateTime( type, dateSkeleton, timeSkeleton );
			} else {
				result = dateSkeleton || timeSkeleton;
			}

			break;

		case "date" in options:
		case "time" in options:
			result = cldr.main([
				"dates/calendars/gregorian",
				"date" in options ? "dateFormats" : "timeFormats",
				( options.date || options.time )
			]);
			break;

		case "datetime" in options:
			result = combineDateTime( options.datetime,
				cldr.main([ "dates/calendars/gregorian/dateFormats", options.datetime ]),
				cldr.main([ "dates/calendars/gregorian/timeFormats", options.datetime ])
			);
			break;

		case "raw" in options:
			result = options.raw;
			break;

		default:
			throw createErrorInvalidParameterValue({
				name: "options",
				value: options
			});
	}

	return result;
};




var dateWeekDays = [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ];




/**
 * firstDayOfWeek
 */
var dateFirstDayOfWeek = function( cldr ) {
	return dateWeekDays.indexOf( cldr.supplemental.weekData.firstDay() );
};




/**
 * getTimeZoneName( length, type )
 */
var dateGetTimeZoneName = function( length, type, timeZone, cldr ) {
	var metaZone, result;

	if ( !timeZone ) {
		return;
	}

	result = cldr.main([
		"dates/timeZoneNames/zone",
		timeZone,
		length < 4 ? "short" : "long",
		type
	]);

	if ( result ) {
		return result;
	}

	// The latest metazone data of the metazone array.
	// TODO expand to support the historic metazones based on the given date.
	metaZone = cldr.supplemental([
		"metaZones/metazoneInfo/timezone", timeZone, 0,
		"usesMetazone/_mzone"
	]);

	return cldr.main([
		"dates/timeZoneNames/metazone",
		metaZone,
		length < 4 ? "short" : "long",
		type
	]);
};




/**
 * timezoneHourFormatShortH( hourFormat )
 *
 * @hourFormat [String]
 *
 * Unofficial deduction of the short hourFormat given time zone `hourFormat` element.
 * Official spec is pending resolution: http://unicode.org/cldr/trac/ticket/8293
 *
 * Example:
 * - "+HH.mm;-HH.mm" => "+H;-H"
 * - "+HH:mm;-HH:mm" => "+H;-H"
 * - "+HH:mm;−HH:mm" => "+H;−H" (Note MINUS SIGN \u2212)
 * - "+HHmm;-HHmm" => "+H:-H"
 */
var dateTimezoneHourFormatH = function( hourFormat ) {
	return hourFormat
		.split( ";" )
		.map(function( format ) {
			return format.slice( 0, format.indexOf( "H" ) + 1 );
		})
		.join( ";" );
};




/**
 * timezoneHourFormatLongHm( hourFormat )
 *
 * @hourFormat [String]
 *
 * Unofficial deduction of the short hourFormat given time zone `hourFormat` element.
 * Official spec is pending resolution: http://unicode.org/cldr/trac/ticket/8293
 *
 * Example (hFormat === "H"): (used for short Hm)
 * - "+HH.mm;-HH.mm" => "+H.mm;-H.mm"
 * - "+HH:mm;-HH:mm" => "+H:mm;-H:mm"
 * - "+HH:mm;−HH:mm" => "+H:mm;−H:mm" (Note MINUS SIGN \u2212)
 * - "+HHmm;-HHmm" => "+Hmm:-Hmm"
 *
 * Example (hFormat === "HH": (used for long Hm)
 * - "+HH.mm;-HH.mm" => "+HH.mm;-HH.mm"
 * - "+HH:mm;-HH:mm" => "+HH:mm;-HH:mm"
 * - "+H:mm;-H:mm"   => "+HH:mm;-HH:mm"
 * - "+HH:mm;−HH:mm" => "+HH:mm;−HH:mm" (Note MINUS SIGN \u2212)
 * - "+HHmm;-HHmm" => "+HHmm:-HHmm"
 */
var dateTimezoneHourFormatHm = function( hourFormat, hFormat ) {
	return hourFormat
		.split( ";" )
		.map(function( format ) {
			var parts = format.split( /H+/ );
			parts.splice( 1, 0, hFormat );
			return parts.join( "" );
		})
		.join( ";" );
};




var runtimeCacheDataBind = function( key, data ) {
	var fn = function() {
		return data;
	};
	fn.dataCacheKey = key;
	return fn;
};




/**
 * properties( pattern, cldr )
 *
 * @pattern [String] raw pattern.
 * ref: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
 *
 * @cldr [Cldr instance].
 *
 * Return the properties given the pattern and cldr.
 *
 * TODO Support other calendar types.
 */
var dateFormatProperties = function( pattern, cldr, timeZone ) {
	var properties = {
			numberFormatters: {},
			pattern: pattern,
			timeSeparator: numberSymbol( "timeSeparator", cldr )
		},
		widths = [ "abbreviated", "wide", "narrow" ];

	function setNumberFormatterPattern( pad ) {
		properties.numberFormatters[ pad ] = stringPad( "", pad );
	}

	if ( timeZone ) {
		properties.timeZoneData = runtimeCacheDataBind( "iana/" + timeZone, {
			offsets: cldr.get([ "globalize-iana/zoneData", timeZone, "offsets" ]),
			untils: cldr.get([ "globalize-iana/zoneData", timeZone, "untils" ]),
			isdsts: cldr.get([ "globalize-iana/zoneData", timeZone, "isdsts" ])
		});
	}

	pattern.replace( datePatternRe, function( current ) {
		var aux, chr, daylightTzName, formatNumber, genericTzName, length, standardTzName;

		chr = current.charAt( 0 );
		length = current.length;

		if ( chr === "j" ) {

			// Locale preferred hHKk.
			// http://www.unicode.org/reports/tr35/tr35-dates.html#Time_Data
			properties.preferredTime = chr = cldr.supplemental.timeData.preferred();
		}

		// ZZZZ: same as "OOOO".
		if ( chr === "Z" && length === 4 ) {
			chr = "O";
			length = 4;
		}

		// z...zzz: "{shortRegion}", eg. "PST" or "PDT".
		// zzzz: "{regionName} {Standard Time}" or "{regionName} {Daylight Time}",
		//       e.g., "Pacific Standard Time" or "Pacific Daylight Time".
		// http://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
		if ( chr === "z" ) {
			standardTzName = dateGetTimeZoneName( length, "standard", timeZone, cldr );
			daylightTzName = dateGetTimeZoneName( length, "daylight", timeZone, cldr );
			if ( standardTzName ) {
				properties.standardTzName = standardTzName;
			}
			if ( daylightTzName ) {
				properties.daylightTzName = daylightTzName;
			}

			// Fall through the "O" format in case one name is missing.
			if ( !standardTzName || !daylightTzName ) {
				chr = "O";
				if ( length < 4 ) {
					length = 1;
				}
			}
		}

		// v...vvv: "{shortRegion}", eg. "PT".
		// vvvv: "{regionName} {Time}" or "{regionName} {Time}",
		// e.g., "Pacific Time"
		// http://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
		if ( chr === "v" ) {
			genericTzName = dateGetTimeZoneName( length, "generic", timeZone, cldr );

			// Fall back to "V" format.
			if ( !genericTzName ) {
				chr = "V";
				length = 4;
			}
		}

		switch ( chr ) {

			// Era
			case "G":
				properties.eras = cldr.main([
					"dates/calendars/gregorian/eras",
					length <= 3 ? "eraAbbr" : ( length === 4 ? "eraNames" : "eraNarrow" )
				]);
				break;

			// Year
			case "y":

				// Plain year.
				formatNumber = true;
				break;

			case "Y":

				// Year in "Week of Year"
				properties.firstDay = dateFirstDayOfWeek( cldr );
				properties.minDays = cldr.supplemental.weekData.minDays();
				formatNumber = true;
				break;

			case "u": // Extended year. Need to be implemented.
			case "U": // Cyclic year name. Need to be implemented.
				throw createErrorUnsupportedFeature({
					feature: "year pattern `" + chr + "`"
				});

			// Quarter
			case "Q":
			case "q":
				if ( length > 2 ) {
					if ( !properties.quarters ) {
						properties.quarters = {};
					}
					if ( !properties.quarters[ chr ] ) {
						properties.quarters[ chr ] = {};
					}
					properties.quarters[ chr ][ length ] = cldr.main([
						"dates/calendars/gregorian/quarters",
						chr === "Q" ? "format" : "stand-alone",
						widths[ length - 3 ]
					]);
				} else {
					formatNumber = true;
				}
				break;

			// Month
			case "M":
			case "L":
				if ( length > 2 ) {
					if ( !properties.months ) {
						properties.months = {};
					}
					if ( !properties.months[ chr ] ) {
						properties.months[ chr ] = {};
					}
					properties.months[ chr ][ length ] = cldr.main([
						"dates/calendars/gregorian/months",
						chr === "M" ? "format" : "stand-alone",
						widths[ length - 3 ]
					]);
				} else {
					formatNumber = true;
				}
				break;

			// Week - Week of Year (w) or Week of Month (W).
			case "w":
			case "W":
				properties.firstDay = dateFirstDayOfWeek( cldr );
				properties.minDays = cldr.supplemental.weekData.minDays();
				formatNumber = true;
				break;

			// Day
			case "d":
			case "D":
			case "F":
				formatNumber = true;
				break;

			case "g":

				// Modified Julian day. Need to be implemented.
				throw createErrorUnsupportedFeature({
					feature: "Julian day pattern `g`"
				});

			// Week day
			case "e":
			case "c":
				if ( length <= 2 ) {
					properties.firstDay = dateFirstDayOfWeek( cldr );
					formatNumber = true;
					break;
				}

			/* falls through */
			case "E":
				if ( !properties.days ) {
					properties.days = {};
				}
				if ( !properties.days[ chr ] ) {
					properties.days[ chr ] = {};
				}
				if ( length === 6 ) {

					// If short day names are not explicitly specified, abbreviated day names are
					// used instead.
					// http://www.unicode.org/reports/tr35/tr35-dates.html#months_days_quarters_eras
					// http://unicode.org/cldr/trac/ticket/6790
					properties.days[ chr ][ length ] = cldr.main([
							"dates/calendars/gregorian/days",
							chr === "c" ? "stand-alone" : "format",
							"short"
						]) || cldr.main([
							"dates/calendars/gregorian/days",
							chr === "c" ? "stand-alone" : "format",
							"abbreviated"
						]);
				} else {
					properties.days[ chr ][ length ] = cldr.main([
						"dates/calendars/gregorian/days",
						chr === "c" ? "stand-alone" : "format",
						widths[ length < 3 ? 0 : length - 3 ]
					]);
				}
				break;

			// Period (AM or PM)
			case "a":
				properties.dayPeriods = {
					am: cldr.main(
						"dates/calendars/gregorian/dayPeriods/format/wide/am"
					),
					pm: cldr.main(
						"dates/calendars/gregorian/dayPeriods/format/wide/pm"
					)
				};
				break;

			// Hour
			case "h": // 1-12
			case "H": // 0-23
			case "K": // 0-11
			case "k": // 1-24

			// Minute
			case "m":

			// Second
			case "s":
			case "S":
			case "A":
				formatNumber = true;
				break;

			// Zone
			case "v":
				if ( length !== 1 && length !== 4 ) {
					throw createErrorUnsupportedFeature({
						feature: "timezone pattern `" + pattern + "`"
					});
				}
				properties.genericTzName = genericTzName;
				break;

			case "V":

				if ( length === 1 ) {
					throw createErrorUnsupportedFeature({
						feature: "timezone pattern `" + pattern + "`"
					});
				}

				if ( timeZone ) {
					if ( length === 2 ) {
						properties.timeZoneName = timeZone;
						break;
					}

					var timeZoneName,
						exemplarCity = cldr.main([
							"dates/timeZoneNames/zone", timeZone, "exemplarCity"
						]);

					if ( length === 3 ) {
						if ( !exemplarCity ) {
							exemplarCity = cldr.main([
								"dates/timeZoneNames/zone/Etc/Unknown/exemplarCity"
							]);
						}
						timeZoneName = exemplarCity;
					}

					if ( exemplarCity && length === 4 ) {
						timeZoneName = formatMessage(
							cldr.main(
								"dates/timeZoneNames/regionFormat"
							),
							[ exemplarCity ]
						);
					}

					if ( timeZoneName ) {
						properties.timeZoneName = timeZoneName;
						break;
					}
				}

				if ( current === "v" ) {
					length = 1;
				}

			/* falls through */
			case "O":

				// O: "{gmtFormat}+H;{gmtFormat}-H" or "{gmtZeroFormat}", eg. "GMT-8" or "GMT".
				// OOOO: "{gmtFormat}{hourFormat}" or "{gmtZeroFormat}", eg. "GMT-08:00" or "GMT".
				properties.gmtFormat = cldr.main( "dates/timeZoneNames/gmtFormat" );
				properties.gmtZeroFormat = cldr.main( "dates/timeZoneNames/gmtZeroFormat" );

				// Unofficial deduction of the hourFormat variations.
				// Official spec is pending resolution: http://unicode.org/cldr/trac/ticket/8293
				aux = cldr.main( "dates/timeZoneNames/hourFormat" );
				properties.hourFormat = length < 4 ?
					[ dateTimezoneHourFormatH( aux ), dateTimezoneHourFormatHm( aux, "H" ) ] :
					dateTimezoneHourFormatHm( aux, "HH" );

			/* falls through */
			case "Z":
			case "X":
			case "x":
				setNumberFormatterPattern( 1 );
				setNumberFormatterPattern( 2 );
				break;
		}

		if ( formatNumber ) {
			setNumberFormatterPattern( length );
		}
	});

	return properties;
};




var dateFormatterFn = function( dateToPartsFormatter ) {
	return function dateFormatter( value ) {
		return partsJoin( dateToPartsFormatter( value ));
	};
};




/**
 * parseProperties( cldr )
 *
 * @cldr [Cldr instance].
 *
 * @timeZone [String] FIXME.
 *
 * Return parser properties.
 */
var dateParseProperties = function( cldr, timeZone ) {
	var properties = {
		preferredTimeData: cldr.supplemental.timeData.preferred()
	};

	if ( timeZone ) {
		properties.timeZoneData = runtimeCacheDataBind( "iana/" + timeZone, {
			offsets: cldr.get([ "globalize-iana/zoneData", timeZone, "offsets" ]),
			untils: cldr.get([ "globalize-iana/zoneData", timeZone, "untils" ]),
			isdsts: cldr.get([ "globalize-iana/zoneData", timeZone, "isdsts" ])
		});
	}

	return properties;
};


var ZonedDateTime = (function() {
function definePrivateProperty(object, property, value) {
  Object.defineProperty(object, property, {
    value: value
  });
}

function getUntilsIndex(original, untils) {
  var index = 0;
  var originalTime = original.getTime();

  // TODO Should we do binary search for improved performance?
  while (index < untils.length - 1 && originalTime >= untils[index]) {
    index++;
  }
  return index;
}

function setWrap(fn) {
  var offset1 = this.getTimezoneOffset();
  var ret = fn();
  this.original.setTime(new Date(this.getTime()));
  var offset2 = this.getTimezoneOffset();
  if (offset2 - offset1) {
    this.original.setMinutes(this.original.getMinutes() + offset2 - offset1);
  }
  return ret;
}

var ZonedDateTime = function(date, timeZoneData) {
  definePrivateProperty(this, "original", new Date(date.getTime()));
  definePrivateProperty(this, "local", new Date(date.getTime()));
  definePrivateProperty(this, "timeZoneData", timeZoneData);
  definePrivateProperty(this, "setWrap", setWrap);
  if (!(timeZoneData.untils && timeZoneData.offsets && timeZoneData.isdsts)) {
    throw new Error("Invalid IANA data");
  }
  this.setTime(this.local.getTime() - this.getTimezoneOffset() * 60 * 1000);
};

ZonedDateTime.prototype.clone = function() {
  return new ZonedDateTime(this.original, this.timeZoneData);
};

// Date field getters.
["getFullYear", "getMonth", "getDate", "getDay", "getHours", "getMinutes",
"getSeconds", "getMilliseconds"].forEach(function(method) {
  // Corresponding UTC method, e.g., "getUTCFullYear" if method === "getFullYear".
  var utcMethod = "getUTC" + method.substr(3);
  ZonedDateTime.prototype[method] = function() {
    return this.local[utcMethod]();
  };
});

// Note: Define .valueOf = .getTime for arithmetic operations like date1 - date2.
ZonedDateTime.prototype.valueOf =
ZonedDateTime.prototype.getTime = function() {
  return this.local.getTime() + this.getTimezoneOffset() * 60 * 1000;
};

ZonedDateTime.prototype.getTimezoneOffset = function() {
  var index = getUntilsIndex(this.original, this.timeZoneData.untils);
  return this.timeZoneData.offsets[index];
};

// Date field setters.
["setFullYear", "setMonth", "setDate", "setHours", "setMinutes", "setSeconds", "setMilliseconds"].forEach(function(method) {
  // Corresponding UTC method, e.g., "setUTCFullYear" if method === "setFullYear".
  var utcMethod = "setUTC" + method.substr(3);
  ZonedDateTime.prototype[method] = function(value) {
    var local = this.local;
    // Note setWrap is needed for seconds and milliseconds just because
    // abs(value) could be >= a minute.
    return this.setWrap(function() {
      return local[utcMethod](value);
    });
  };
});

ZonedDateTime.prototype.setTime = function(time) {
  return this.local.setTime(time);
};

ZonedDateTime.prototype.isDST = function() {
  var index = getUntilsIndex(this.original, this.timeZoneData.untils);
  return Boolean(this.timeZoneData.isdsts[index]);
};

ZonedDateTime.prototype.inspect = function() {
  var index = getUntilsIndex(this.original, this.timeZoneData.untils);
  var abbrs = this.timeZoneData.abbrs;
  return this.local.toISOString().replace(/Z$/, "") + " " +
    (abbrs && abbrs[index] + " " || (this.getTimezoneOffset() * -1) + " ") +
    (this.isDST() ? "(daylight savings)" : "");
};

ZonedDateTime.prototype.toDate = function() {
  return new Date(this.getTime());
};

// Type cast getters.
["toISOString", "toJSON", "toUTCString"].forEach(function(method) {
  ZonedDateTime.prototype[method] = function() {
    return this.toDate()[method]();
  };
});

return ZonedDateTime;
}());


/**
 * isLeapYear( year )
 *
 * @year [Number]
 *
 * Returns an indication whether the specified year is a leap year.
 */
var dateIsLeapYear = function( year ) {
	return new Date( year, 1, 29 ).getMonth() === 1;
};




/**
 * lastDayOfMonth( date )
 *
 * @date [Date]
 *
 * Return the last day of the given date's month
 */
var dateLastDayOfMonth = function( date ) {
	return new Date( date.getFullYear(), date.getMonth() + 1, 0 ).getDate();
};




/**
 * startOf changes the input to the beginning of the given unit.
 *
 * For example, starting at the start of a day, resets hours, minutes
 * seconds and milliseconds to 0. Starting at the month does the same, but
 * also sets the date to 1.
 *
 * Returns the modified date
 */
var dateStartOf = function( date, unit ) {
	date = date instanceof ZonedDateTime ? date.clone() : new Date( date.getTime() );
	switch ( unit ) {
		case "year":
			date.setMonth( 0 );
		/* falls through */
		case "month":
			date.setDate( 1 );
		/* falls through */
		case "day":
			date.setHours( 0 );
		/* falls through */
		case "hour":
			date.setMinutes( 0 );
		/* falls through */
		case "minute":
			date.setSeconds( 0 );
		/* falls through */
		case "second":
			date.setMilliseconds( 0 );
	}
	return date;
};




/**
 * Differently from native date.setDate(), this function returns a date whose
 * day remains inside the month boundaries. For example:
 *
 * setDate( FebDate, 31 ): a "Feb 28" date.
 * setDate( SepDate, 31 ): a "Sep 30" date.
 */
var dateSetDate = function( date, day ) {
	var lastDay = new Date( date.getFullYear(), date.getMonth() + 1, 0 ).getDate();

	date.setDate( day < 1 ? 1 : day < lastDay ? day : lastDay );
};




/**
 * Differently from native date.setMonth(), this function adjusts date if
 * needed, so final month is always the one set.
 *
 * setMonth( Jan31Date, 1 ): a "Feb 28" date.
 * setDate( Jan31Date, 8 ): a "Sep 30" date.
 */
var dateSetMonth = function( date, month ) {
	var originalDate = date.getDate();

	date.setDate( 1 );
	date.setMonth( month );
	dateSetDate( date, originalDate );
};




var outOfRange = function( value, low, high ) {
	return value < low || value > high;
};




/**
 * parse( value, tokens, properties )
 *
 * @value [String] string date.
 *
 * @tokens [Object] tokens returned by date/tokenizer.
 *
 * @properties [Object] output returned by date/tokenizer-properties.
 *
 * ref: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
 */
var dateParse = function( _value, tokens, properties ) {
	var amPm, day, daysOfYear, month, era, hour, hour12, timezoneOffset, valid,
		YEAR = 0,
		MONTH = 1,
		DAY = 2,
		HOUR = 3,
		MINUTE = 4,
		SECOND = 5,
		MILLISECONDS = 6,
		date = new Date(),
		truncateAt = [],
		units = [ "year", "month", "day", "hour", "minute", "second", "milliseconds" ];

	// Create globalize date with given timezone data.
	if ( properties.timeZoneData ) {
		date = new ZonedDateTime( date, properties.timeZoneData() );
	}

	if ( !tokens.length ) {
		return null;
	}

	valid = tokens.every(function( token ) {
		var century, chr, value, length;

		if ( token.type === "literal" ) {

			// continue
			return true;
		}

		chr = token.type.charAt( 0 );
		length = token.type.length;

		if ( chr === "j" ) {

			// Locale preferred hHKk.
			// http://www.unicode.org/reports/tr35/tr35-dates.html#Time_Data
			chr = properties.preferredTimeData;
		}

		switch ( chr ) {

			// Era
			case "G":
				truncateAt.push( YEAR );
				era = +token.value;
				break;

			// Year
			case "y":
				value = token.value;
				if ( length === 2 ) {
					if ( outOfRange( value, 0, 99 ) ) {
						return false;
					}

					// mimic dojo/date/locale: choose century to apply, according to a sliding
					// window of 80 years before and 20 years after present year.
					century = Math.floor( date.getFullYear() / 100 ) * 100;
					value += century;
					if ( value > date.getFullYear() + 20 ) {
						value -= 100;
					}
				}
				date.setFullYear( value );
				truncateAt.push( YEAR );
				break;

			case "Y": // Year in "Week of Year"
				throw createErrorUnsupportedFeature({
					feature: "year pattern `" + chr + "`"
				});

			// Quarter (skip)
			case "Q":
			case "q":
				break;

			// Month
			case "M":
			case "L":
				if ( length <= 2 ) {
					value = token.value;
				} else {
					value = +token.value;
				}
				if ( outOfRange( value, 1, 12 ) ) {
					return false;
				}

				// Setting the month later so that we have the correct year and can determine
				// the correct last day of February in case of leap year.
				month = value;
				truncateAt.push( MONTH );
				break;

			// Week (skip)
			case "w": // Week of Year.
			case "W": // Week of Month.
				break;

			// Day
			case "d":
				day = token.value;
				truncateAt.push( DAY );
				break;

			case "D":
				daysOfYear = token.value;
				truncateAt.push( DAY );
				break;

			case "F":

				// Day of Week in month. eg. 2nd Wed in July.
				// Skip
				break;

			// Week day
			case "e":
			case "c":
			case "E":

				// Skip.
				// value = arrayIndexOf( dateWeekDays, token.value );
				break;

			// Period (AM or PM)
			case "a":
				amPm = token.value;
				break;

			// Hour
			case "h": // 1-12
				value = token.value;
				if ( outOfRange( value, 1, 12 ) ) {
					return false;
				}
				hour = hour12 = true;
				date.setHours( value === 12 ? 0 : value );
				truncateAt.push( HOUR );
				break;

			case "K": // 0-11
				value = token.value;
				if ( outOfRange( value, 0, 11 ) ) {
					return false;
				}
				hour = hour12 = true;
				date.setHours( value );
				truncateAt.push( HOUR );
				break;

			case "k": // 1-24
				value = token.value;
				if ( outOfRange( value, 1, 24 ) ) {
					return false;
				}
				hour = true;
				date.setHours( value === 24 ? 0 : value );
				truncateAt.push( HOUR );
				break;

			case "H": // 0-23
				value = token.value;
				if ( outOfRange( value, 0, 23 ) ) {
					return false;
				}
				hour = true;
				date.setHours( value );
				truncateAt.push( HOUR );
				break;

			// Minute
			case "m":
				value = token.value;
				if ( outOfRange( value, 0, 59 ) ) {
					return false;
				}
				date.setMinutes( value );
				truncateAt.push( MINUTE );
				break;

			// Second
			case "s":
				value = token.value;
				if ( outOfRange( value, 0, 59 ) ) {
					return false;
				}
				date.setSeconds( value );
				truncateAt.push( SECOND );
				break;

			case "A":
				date.setHours( 0 );
				date.setMinutes( 0 );
				date.setSeconds( 0 );

			/* falls through */
			case "S":
				value = Math.round( token.value * Math.pow( 10, 3 - length ) );
				date.setMilliseconds( value );
				truncateAt.push( MILLISECONDS );
				break;

			// Zone
			case "z":
			case "Z":
			case "O":
			case "v":
			case "V":
			case "X":
			case "x":
				if ( typeof token.value === "number" ) {
					timezoneOffset = token.value;
				}
				break;
		}

		return true;
	});

	if ( !valid ) {
		return null;
	}

	// 12-hour format needs AM or PM, 24-hour format doesn't, ie. return null
	// if amPm && !hour12 || !amPm && hour12.
	if ( hour && !( !amPm ^ hour12 ) ) {
		return null;
	}

	if ( era === 0 ) {

		// 1 BC = year 0
		date.setFullYear( date.getFullYear() * -1 + 1 );
	}

	if ( month !== undefined ) {
		dateSetMonth( date, month - 1 );
	}

	if ( day !== undefined ) {
		if ( outOfRange( day, 1, dateLastDayOfMonth( date ) ) ) {
			return null;
		}
		date.setDate( day );
	} else if ( daysOfYear !== undefined ) {
		if ( outOfRange( daysOfYear, 1, dateIsLeapYear( date.getFullYear() ) ? 366 : 365 ) ) {
			return null;
		}
		date.setMonth( 0 );
		date.setDate( daysOfYear );
	}

	if ( hour12 && amPm === "pm" ) {
		date.setHours( date.getHours() + 12 );
	}

	if ( timezoneOffset !== undefined ) {
		date.setMinutes( date.getMinutes() + timezoneOffset - date.getTimezoneOffset() );
	}

	// Truncate date at the most precise unit defined. Eg.
	// If value is "12/31", and pattern is "MM/dd":
	// => new Date( <current Year>, 12, 31, 0, 0, 0, 0 );
	truncateAt = Math.max.apply( null, truncateAt );
	date = dateStartOf( date, units[ truncateAt ] );

	// Get date back from globalize date.
	if ( date instanceof ZonedDateTime ) {
		date = date.toDate();
	}

	return date;
};


/* eslint-disable no-unused-expressions */



/**
 * tokenizer( value, numberParser, properties )
 *
 * @value [String] string date.
 *
 * @numberParser [Function]
 *
 * @properties [Object] output returned by date/tokenizer-properties.
 *
 * Returns an Array of tokens, eg. value "5 o'clock PM", pattern "h 'o''clock' a":
 * [{
 *   type: "h",
 *   lexeme: "5"
 * }, {
 *   type: "literal",
 *   lexeme: " "
 * }, {
 *   type: "literal",
 *   lexeme: "o'clock"
 * }, {
 *   type: "literal",
 *   lexeme: " "
 * }, {
 *   type: "a",
 *   lexeme: "PM",
 *   value: "pm"
 * }]
 *
 * OBS: lexeme's are always String and may return invalid ranges depending of the token type.
 * Eg. "99" for month number.
 *
 * Return an empty Array when not successfully parsed.
 */
var dateTokenizer = function( value, numberParser, properties ) {
	var digitsRe, valid,
		tokens = [],
		widths = [ "abbreviated", "wide", "narrow" ];

	digitsRe = properties.digitsRe;
	value = looseMatching( value );

	valid = properties.pattern.match( datePatternRe ).every(function( current ) {
		var aux, chr, length, numeric, tokenRe,
			token = {};

		function hourFormatParse( tokenRe, numberParser ) {
			var aux, isPositive,
				match = value.match( tokenRe );
			numberParser = numberParser || function( value ) {
				return +value;
			};

			if ( !match ) {
				return false;
			}

			isPositive = match[ 1 ];

			// hourFormat containing H only, e.g., `+H;-H`
			if ( match.length < 6 ) {
				aux = isPositive ? 1 : 3;
				token.value = numberParser( match[ aux ] ) * 60;

			// hourFormat containing H and m, e.g., `+HHmm;-HHmm`
			} else if ( match.length < 10 ) {
				aux = isPositive ? [ 1, 3 ] : [ 5, 7 ];
				token.value = numberParser( match[ aux[ 0 ] ] ) * 60 +
					numberParser( match[ aux[ 1 ] ] );

			// hourFormat containing H, m, and s e.g., `+HHmmss;-HHmmss`
			} else {
				aux = isPositive ? [ 1, 3, 5 ] : [ 7, 9, 11 ];
				token.value = numberParser( match[ aux[ 0 ] ] ) * 60 +
					numberParser( match[ aux[ 1 ] ] ) +
					numberParser( match[ aux[ 2 ] ] ) / 60;
			}

			if ( isPositive ) {
				token.value *= -1;
			}

			return true;
		}

		function oneDigitIfLengthOne() {
			if ( length === 1 ) {

				// Unicode equivalent to /\d/
				numeric = true;
				return tokenRe = digitsRe;
			}
		}

		function oneOrTwoDigitsIfLengthOne() {
			if ( length === 1 ) {

				// Unicode equivalent to /\d\d?/
				numeric = true;
				return tokenRe = new RegExp( "^(" + digitsRe.source + "){1,2}" );
			}
		}

		function oneOrTwoDigitsIfLengthOneOrTwo() {
			if ( length === 1 || length === 2 ) {

				// Unicode equivalent to /\d\d?/
				numeric = true;
				return tokenRe = new RegExp( "^(" + digitsRe.source + "){1,2}" );
			}
		}

		function twoDigitsIfLengthTwo() {
			if ( length === 2 ) {

				// Unicode equivalent to /\d\d/
				numeric = true;
				return tokenRe = new RegExp( "^(" + digitsRe.source + "){2}" );
			}
		}

		// Brute-force test every locale entry in an attempt to match the given value.
		// Return the first found one (and set token accordingly), or null.
		function lookup( path ) {
			var array = properties[ path.join( "/" ) ];

			if ( !array ) {
				return null;
			}

			// array of pairs [key, value] sorted by desc value length.
			array.some(function( item ) {
				var valueRe = item[ 1 ];
				if ( valueRe.test( value ) ) {
					token.value = item[ 0 ];
					tokenRe = item[ 1 ];
					return true;
				}
			});
			return null;
		}

		token.type = current;
		chr = current.charAt( 0 );
		length = current.length;

		if ( chr === "Z" ) {

			// Z..ZZZ: same as "xxxx".
			if ( length < 4 ) {
				chr = "x";
				length = 4;

			// ZZZZ: same as "OOOO".
			} else if ( length < 5 ) {
				chr = "O";
				length = 4;

			// ZZZZZ: same as "XXXXX"
			} else {
				chr = "X";
				length = 5;
			}
		}

		if ( chr === "z" ) {
			if ( properties.standardOrDaylightTzName ) {
				token.value = null;
				tokenRe = properties.standardOrDaylightTzName;
			}
		}

		// v...vvv: "{shortRegion}", eg. "PT".
		// vvvv: "{regionName} {Time}" or "{regionName} {Time}",
		// e.g., "Pacific Time"
		// http://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
		if ( chr === "v" ) {
			if ( properties.genericTzName ) {
				token.value = null;
				tokenRe = properties.genericTzName;

			// Fall back to "V" format.
			} else {
				chr = "V";
				length = 4;
			}
		}

		if ( chr === "V" && properties.timeZoneName ) {
			token.value = length === 2 ? properties.timeZoneName : null;
			tokenRe = properties.timeZoneNameRe;
		}

		switch ( chr ) {

			// Era
			case "G":
				lookup([
					"gregorian/eras",
					length <= 3 ? "eraAbbr" : ( length === 4 ? "eraNames" : "eraNarrow" )
				]);
				break;

			// Year
			case "y":
			case "Y":
				numeric = true;

				// number l=1:+, l=2:{2}, l=3:{3,}, l=4:{4,}, ...
				if ( length === 1 ) {

					// Unicode equivalent to /\d+/.
					tokenRe = new RegExp( "^(" + digitsRe.source + ")+" );
				} else if ( length === 2 ) {

					// Lenient parsing: there's no year pattern to indicate non-zero-padded 2-digits
					// year, so parser accepts both zero-padded and non-zero-padded for `yy`.
					//
					// Unicode equivalent to /\d\d?/
					tokenRe = new RegExp( "^(" + digitsRe.source + "){1,2}" );
				} else {

					// Unicode equivalent to /\d{length,}/
					tokenRe = new RegExp( "^(" + digitsRe.source + "){" + length + ",}" );
				}
				break;

			// Quarter
			case "Q":
			case "q":

				// number l=1:{1}, l=2:{2}.
				// lookup l=3...
				oneDigitIfLengthOne() || twoDigitsIfLengthTwo() ||
					lookup([
						"gregorian/quarters",
						chr === "Q" ? "format" : "stand-alone",
						widths[ length - 3 ]
					]);
				break;

			// Month
			case "M":
			case "L":

				// number l=1:{1,2}, l=2:{2}.
				// lookup l=3...
				//
				// Lenient parsing: skeleton "yMd" (i.e., one M) may include MM for the pattern,
				// therefore parser accepts both zero-padded and non-zero-padded for M and MM.
				// Similar for L.
				oneOrTwoDigitsIfLengthOneOrTwo() || lookup([
					"gregorian/months",
					chr === "M" ? "format" : "stand-alone",
					widths[ length - 3 ]
				]);
				break;

			// Day
			case "D":

				// number {l,3}.
				if ( length <= 3 ) {

					// Equivalent to /\d{length,3}/
					numeric = true;
					tokenRe = new RegExp( "^(" + digitsRe.source + "){" + length + ",3}" );
				}
				break;

			case "W":
			case "F":

				// number l=1:{1}.
				oneDigitIfLengthOne();
				break;

			// Week day
			case "e":
			case "c":

				// number l=1:{1}, l=2:{2}.
				// lookup for length >=3.
				if ( length <= 2 ) {
					oneDigitIfLengthOne() || twoDigitsIfLengthTwo();
					break;
				}

			/* falls through */
			case "E":
				if ( length === 6 ) {

					// Note: if short day names are not explicitly specified, abbreviated day
					// names are used instead http://www.unicode.org/reports/tr35/tr35-dates.html#months_days_quarters_eras
					lookup([
						"gregorian/days",
						[ chr === "c" ? "stand-alone" : "format" ],
						"short"
					]) || lookup([
						"gregorian/days",
						[ chr === "c" ? "stand-alone" : "format" ],
						"abbreviated"
					]);
				} else {
					lookup([
						"gregorian/days",
						[ chr === "c" ? "stand-alone" : "format" ],
						widths[ length < 3 ? 0 : length - 3 ]
					]);
				}
				break;

			// Period (AM or PM)
			case "a":
				lookup([
					"gregorian/dayPeriods/format/wide"
				]);
				break;

			// Week
			case "w":

				// number l1:{1,2}, l2:{2}.
				oneOrTwoDigitsIfLengthOne() || twoDigitsIfLengthTwo();
				break;

			// Day, Hour, Minute, or Second
			case "d":
			case "h":
			case "H":
			case "K":
			case "k":
			case "j":
			case "m":
			case "s":

				// number l1:{1,2}, l2:{2}.
				//
				// Lenient parsing:
				// - skeleton "hms" (i.e., one m) always includes mm for the pattern, i.e., it's
				//   impossible to use a different skeleton to parse non-zero-padded minutes,
				//   therefore parser accepts both zero-padded and non-zero-padded for m. Similar
				//   for seconds s.
				// - skeleton "hms" (i.e., one h) may include h or hh for the pattern, i.e., it's
				//   impossible to use a different skeleton to parser non-zero-padded hours for some
				//   locales, therefore parser accepts both zero-padded and non-zero-padded for h.
				//   Similar for d (in skeleton yMd).
				oneOrTwoDigitsIfLengthOneOrTwo();
				break;

			case "S":

				// number {l}.

				// Unicode equivalent to /\d{length}/
				numeric = true;
				tokenRe = new RegExp( "^(" + digitsRe.source + "){" + length + "}" );
				break;

			case "A":

				// number {l+5}.

				// Unicode equivalent to /\d{length+5}/
				numeric = true;
				tokenRe = new RegExp( "^(" + digitsRe.source + "){" + ( length + 5 ) + "}" );
				break;

			// Zone
			case "v":
			case "V":
			case "z":
				if ( tokenRe && tokenRe.test( value ) ) {
					break;
				}
				if ( chr === "V" && length === 2 ) {
					break;
				}

			/* falls through */
			case "O":

				// O: "{gmtFormat}+H;{gmtFormat}-H" or "{gmtZeroFormat}", eg. "GMT-8" or "GMT".
				// OOOO: "{gmtFormat}{hourFormat}" or "{gmtZeroFormat}", eg. "GMT-08:00" or "GMT".
				if ( value === properties[ "timeZoneNames/gmtZeroFormat" ] ) {
					token.value = 0;
					tokenRe = properties[ "timeZoneNames/gmtZeroFormatRe" ];
				} else {
					aux = properties[ "timeZoneNames/hourFormat" ].some(function( hourFormatRe ) {
						if ( hourFormatParse( hourFormatRe, numberParser ) ) {
							tokenRe = hourFormatRe;
							return true;
						}
					});
					if ( !aux ) {
						return null;
					}
				}
				break;

			case "X":

				// Same as x*, except it uses "Z" for zero offset.
				if ( value === "Z" ) {
					token.value = 0;
					tokenRe = /^Z/;
					break;
				}

			/* falls through */
			case "x":

				// x: hourFormat("+HH[mm];-HH[mm]")
				// xx: hourFormat("+HHmm;-HHmm")
				// xxx: hourFormat("+HH:mm;-HH:mm")
				// xxxx: hourFormat("+HHmm[ss];-HHmm[ss]")
				// xxxxx: hourFormat("+HH:mm[:ss];-HH:mm[:ss]")
				aux = properties.x.some(function( hourFormatRe ) {
					if ( hourFormatParse( hourFormatRe ) ) {
						tokenRe = hourFormatRe;
						return true;
					}
				});
				if ( !aux ) {
					return null;
				}
				break;

			case "'":
				token.type = "literal";
				tokenRe = new RegExp( "^" + regexpEscape( removeLiteralQuotes( current ) ) );
				break;

			default:
				token.type = "literal";
				tokenRe = new RegExp( "^" + regexpEscape( current ) );
		}

		if ( !tokenRe ) {
			return false;
		}

		// Get lexeme and consume it.
		value = value.replace( tokenRe, function( lexeme ) {
			token.lexeme = lexeme;
			if ( numeric ) {
				token.value = numberParser( lexeme );
			}
			return "";
		});

		if ( !token.lexeme ) {
			return false;
		}

		if ( numeric && isNaN( token.value ) ) {
			return false;
		}

		tokens.push( token );
		return true;
	});

	if ( value !== "" ) {
		valid = false;
	}

	return valid ? tokens : [];
};




var dateParserFn = function( numberParser, parseProperties, tokenizerProperties ) {
	return function dateParser( value ) {
		var tokens;

		validateParameterPresence( value, "value" );
		validateParameterTypeString( value, "value" );

		tokens = dateTokenizer( value, numberParser, tokenizerProperties );
		return dateParse( value, tokens, parseProperties ) || null;
	};
};




var objectFilter = function( object, testRe ) {
	var key,
		copy = {};

	for ( key in object ) {
		if ( testRe.test( key ) ) {
			copy[ key ] = object[ key ];
		}
	}

	return copy;
};




/**
 * tokenizerProperties( pattern, cldr )
 *
 * @pattern [String] raw pattern.
 *
 * @cldr [Cldr instance].
 *
 * Return Object with data that will be used by tokenizer.
 */
var dateTokenizerProperties = function( pattern, cldr, timeZone ) {
	var digitsReSource,
		properties = {
			pattern: looseMatching( pattern )
		},
		timeSeparator = numberSymbol( "timeSeparator", cldr ),
		widths = [ "abbreviated", "wide", "narrow" ];

	digitsReSource = numberNumberingSystemDigitsMap( cldr );
	digitsReSource = digitsReSource ? "[" + digitsReSource + "]" : "\\d";
	properties.digitsRe = new RegExp( digitsReSource );

	// Transform:
	// - "+H;-H" -> /\+(\d\d?)|-(\d\d?)/
	// - "+HH;-HH" -> /\+(\d\d)|-(\d\d)/
	// - "+HHmm;-HHmm" -> /\+(\d\d)(\d\d)|-(\d\d)(\d\d)/
	// - "+HH:mm;-HH:mm" -> /\+(\d\d):(\d\d)|-(\d\d):(\d\d)/
	//
	// If gmtFormat is GMT{0}, the regexp must fill {0} in each side, e.g.:
	// - "+H;-H" -> /GMT\+(\d\d?)|GMT-(\d\d?)/
	function hourFormatRe( hourFormat, gmtFormat, digitsReSource, timeSeparator ) {
		var re;

		if ( !digitsReSource ) {
			digitsReSource = "\\d";
		}
		if ( !gmtFormat ) {
			gmtFormat = "{0}";
		}

		re = hourFormat
			.replace( "+", "\\+" )

			// Unicode equivalent to (\\d\\d)
			.replace( /HH|mm|ss/g, "((" + digitsReSource + "){2})" )

			// Unicode equivalent to (\\d\\d?)
			.replace( /H|m/g, "((" + digitsReSource + "){1,2})" );

		if ( timeSeparator ) {
			re = re.replace( /:/g, timeSeparator );
		}

		re = re.split( ";" ).map(function( part ) {
			return gmtFormat.replace( "{0}", part );
		}).join( "|" );

		return new RegExp( "^" + re );
	}

	function populateProperties( path, value ) {

		// Skip
		var skipRe = /(timeZoneNames\/zone|supplemental\/metaZones|timeZoneNames\/metazone|timeZoneNames\/regionFormat|timeZoneNames\/gmtFormat)/;
		if ( skipRe.test( path ) ) {
			return;
		}

		if ( !value ) {
			return;
		}

		// The `dates` and `calendars` trim's purpose is to reduce properties' key size only.
		path = path.replace( /^.*\/dates\//, "" ).replace( /calendars\//, "" );

		// Specific filter for "gregorian/dayPeriods/format/wide".
		if ( path === "gregorian/dayPeriods/format/wide" ) {
			value = objectFilter( value, /^am|^pm/ );
		}

		// Transform object into array of pairs [key, /value/], sort by desc value length.
		if ( isPlainObject( value ) ) {
			value = Object.keys( value ).map(function( key ) {
				return [ key, new RegExp( "^" + regexpEscape( looseMatching( value[ key ] ) ) ) ];
			}).sort(function( a, b ) {
				return b[ 1 ].source.length - a[ 1 ].source.length;
			});

		// If typeof value === "string".
		} else {
			value = looseMatching( value );
		}
		properties[ path ] = value;
	}

	function regexpSourceSomeTerm( terms ) {
		return "(" + terms.filter(function( item ) {
			return item;
		}).reduce(function( memo, item ) {
			return memo + "|" + item;
		}) + ")";
	}

	cldr.on( "get", populateProperties );

	pattern.match( datePatternRe ).forEach(function( current ) {
		var aux, chr, daylightTzName, gmtFormat, length, standardTzName;

		chr = current.charAt( 0 );
		length = current.length;

		if ( chr === "Z" ) {
			if ( length < 5 ) {
				chr = "O";
				length = 4;
			} else {
				chr = "X";
				length = 5;
			}
		}

		// z...zzz: "{shortRegion}", eg. "PST" or "PDT".
		// zzzz: "{regionName} {Standard Time}" or "{regionName} {Daylight Time}",
		//       e.g., "Pacific Standard Time" or "Pacific Daylight Time".
		// http://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
		if ( chr === "z" ) {
			standardTzName = dateGetTimeZoneName( length, "standard", timeZone, cldr );
			daylightTzName = dateGetTimeZoneName( length, "daylight", timeZone, cldr );
			if ( standardTzName ) {
				standardTzName = regexpEscape( looseMatching( standardTzName ) );
			}
			if ( daylightTzName ) {
				daylightTzName = regexpEscape( looseMatching( daylightTzName ) );
			}
			if ( standardTzName || daylightTzName ) {
				properties.standardOrDaylightTzName = new RegExp(
					"^" + regexpSourceSomeTerm([ standardTzName, daylightTzName ])
				);
			}

			// Fall through the "O" format in case one name is missing.
			if ( !standardTzName || !daylightTzName ) {
				chr = "O";
				if ( length < 4 ) {
					length = 1;
				}
			}
		}

		// v...vvv: "{shortRegion}", eg. "PT".
		// vvvv: "{regionName} {Time}" or "{regionName} {Time}",
		// e.g., "Pacific Time"
		// http://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
		if ( chr === "v" ) {
			if ( length !== 1 && length !== 4 ) {
				throw createErrorUnsupportedFeature({
					feature: "timezone pattern `" + pattern + "`"
				});
			}
			var genericTzName = dateGetTimeZoneName( length, "generic", timeZone, cldr );
			if ( genericTzName ) {
				properties.genericTzName = new RegExp(
					"^" + regexpEscape( looseMatching( genericTzName ) )
				);
				chr = "O";

			// Fall back to "V" format.
			} else {
				chr = "V";
				length = 4;
			}
		}

		switch ( chr ) {

			// Era
			case "G":
				cldr.main([
					"dates/calendars/gregorian/eras",
					length <= 3 ? "eraAbbr" : ( length === 4 ? "eraNames" : "eraNarrow" )
				]);
				break;

			// Year
			case "u": // Extended year. Need to be implemented.
			case "U": // Cyclic year name. Need to be implemented.
				throw createErrorUnsupportedFeature({
					feature: "year pattern `" + chr + "`"
				});

			// Quarter
			case "Q":
			case "q":
				if ( length > 2 ) {
					cldr.main([
						"dates/calendars/gregorian/quarters",
						chr === "Q" ? "format" : "stand-alone",
						widths[ length - 3 ]
					]);
				}
				break;

			// Month
			case "M":
			case "L":

				// number l=1:{1,2}, l=2:{2}.
				// lookup l=3...
				if ( length > 2 ) {
					cldr.main([
						"dates/calendars/gregorian/months",
						chr === "M" ? "format" : "stand-alone",
						widths[ length - 3 ]
					]);
				}
				break;

			// Day
			case "g":

				// Modified Julian day. Need to be implemented.
				throw createErrorUnsupportedFeature({
					feature: "Julian day pattern `g`"
				});

			// Week day
			case "e":
			case "c":

				// lookup for length >=3.
				if ( length <= 2 ) {
					break;
				}

			/* falls through */
			case "E":
				if ( length === 6 ) {

					// Note: if short day names are not explicitly specified, abbreviated day
					// names are used instead http://www.unicode.org/reports/tr35/tr35-dates.html#months_days_quarters_eras
					// eslint-disable-next-line no-unused-expressions
					cldr.main([
						"dates/calendars/gregorian/days",
						[ chr === "c" ? "stand-alone" : "format" ],
						"short"
					]) || cldr.main([
						"dates/calendars/gregorian/days",
						[ chr === "c" ? "stand-alone" : "format" ],
						"abbreviated"
					]);
				} else {
					cldr.main([
						"dates/calendars/gregorian/days",
						[ chr === "c" ? "stand-alone" : "format" ],
						widths[ length < 3 ? 0 : length - 3 ]
					]);
				}
				break;

			// Period (AM or PM)
			case "a":
				cldr.main(
					"dates/calendars/gregorian/dayPeriods/format/wide"
				);
				break;

			// Zone
			case "V":

				if ( length === 1 ) {
					throw createErrorUnsupportedFeature({
						feature: "timezone pattern `" + pattern + "`"
					});
				}

				if ( timeZone ) {
					if ( length === 2 ) {

						// Skip looseMatching processing since timeZone is a canonical posix value.
						properties.timeZoneName = timeZone;
						properties.timeZoneNameRe = new RegExp( "^" + regexpEscape( timeZone ) );
						break;
					}

					var timeZoneName,
						exemplarCity = cldr.main([
							"dates/timeZoneNames/zone", timeZone, "exemplarCity"
						]);

					if ( length === 3 ) {
						if ( !exemplarCity ) {
							exemplarCity = cldr.main([
								"dates/timeZoneNames/zone/Etc/Unknown/exemplarCity"
							]);
						}
						timeZoneName = exemplarCity;
					}

					if ( exemplarCity && length === 4 ) {
						timeZoneName = formatMessage(
							cldr.main(
								"dates/timeZoneNames/regionFormat"
							),
							[ exemplarCity ]
						);
					}

					if ( timeZoneName ) {
						timeZoneName = looseMatching( timeZoneName );
						properties.timeZoneName = timeZoneName;
						properties.timeZoneNameRe = new RegExp(
							"^" + regexpEscape( timeZoneName )
						);
					}
				}

				if ( current === "v" ) {
					length = 1;
				}

			/* falls through */
			case "z":
			case "O":
				gmtFormat = cldr.main( "dates/timeZoneNames/gmtFormat" );
				cldr.main( "dates/timeZoneNames/gmtZeroFormat" );
				cldr.main( "dates/timeZoneNames/hourFormat" );
				properties[ "timeZoneNames/gmtZeroFormatRe" ] =
					new RegExp( "^" + regexpEscape( properties[ "timeZoneNames/gmtZeroFormat" ] ) );
				aux = properties[ "timeZoneNames/hourFormat" ];
				properties[ "timeZoneNames/hourFormat" ] = (
					length < 4 ?
						[ dateTimezoneHourFormatHm( aux, "H" ), dateTimezoneHourFormatH( aux ) ] :
						[ dateTimezoneHourFormatHm( aux, "HH" ) ]
				).map(function( hourFormat ) {
					return hourFormatRe(
						hourFormat,
						gmtFormat,
						digitsReSource,
						timeSeparator
					);
				});

			/* falls through */
			case "X":
			case "x":

				// x: hourFormat("+HH[mm];-HH[mm]")
				// xx: hourFormat("+HHmm;-HHmm")
				// xxx: hourFormat("+HH:mm;-HH:mm")
				// xxxx: hourFormat("+HHmm[ss];-HHmm[ss]")
				// xxxxx: hourFormat("+HH:mm[:ss];-HH:mm[:ss]")
				properties.x = [
					[ "+HHmm;-HHmm", "+HH;-HH" ],
					[ "+HHmm;-HHmm" ],
					[ "+HH:mm;-HH:mm" ],
					[ "+HHmmss;-HHmmss", "+HHmm;-HHmm" ],
					[ "+HH:mm:ss;-HH:mm:ss", "+HH:mm;-HH:mm" ]
				][ length - 1 ].map(function( hourFormat ) {
					return hourFormatRe( hourFormat );
				});
		}
	});

	cldr.off( "get", populateProperties );

	return properties;
};




/**
 * dayOfWeek( date, firstDay )
 *
 * @date
 *
 * @firstDay the result of `dateFirstDayOfWeek( cldr )`
 *
 * Return the day of the week normalized by the territory's firstDay [0-6].
 * Eg for "mon":
 * - return 0 if territory is GB, or BR, or DE, or FR (week starts on "mon");
 * - return 1 if territory is US (week starts on "sun");
 * - return 2 if territory is EG (week starts on "sat");
 */
var dateDayOfWeek = function( date, firstDay ) {
	return ( date.getDay() - firstDay + 7 ) % 7;
};




/**
 * distanceInDays( from, to )
 *
 * Return the distance in days between from and to Dates.
 */
var dateDistanceInDays = function( from, to ) {
	var inDays = 864e5;
	return ( to.getTime() - from.getTime() ) / inDays;
};




/**
 * dayOfYear
 *
 * Return the distance in days of the date to the begin of the year [0-d].
 */
var dateDayOfYear = function( date ) {
	return Math.floor( dateDistanceInDays( dateStartOf( date, "year" ), date ) );
};




// Invert key and values, e.g., {"year": "yY"} ==> {"y": "year", "Y": "year"}
var dateFieldsMap = objectInvert({
	"era": "G",
	"year": "yY",
	"quarter": "qQ",
	"month": "ML",
	"week": "wW",
	"day": "dDF",
	"weekday": "ecE",
	"dayperiod": "a",
	"hour": "hHkK",
	"minute": "m",
	"second": "sSA",
	"zone": "zvVOxX"
}, function( object, key, value ) {
	value.split( "" ).forEach(function( symbol ) {
		object[ symbol ] = key;
	});
	return object;
});




/**
 * millisecondsInDay
 */
var dateMillisecondsInDay = function( date ) {

	// TODO Handle daylight savings discontinuities
	return date - dateStartOf( date, "day" );
};




/**
 * hourFormat( date, format, timeSeparator, formatNumber )
 *
 * Return date's timezone offset according to the format passed.
 * Eg for format when timezone offset is 180:
 * - "+H;-H": -3
 * - "+HHmm;-HHmm": -0300
 * - "+HH:mm;-HH:mm": -03:00
 * - "+HH:mm:ss;-HH:mm:ss": -03:00:00
 */
var dateTimezoneHourFormat = function( date, format, timeSeparator, formatNumber ) {
	var absOffset,
		offset = date.getTimezoneOffset();

	absOffset = Math.abs( offset );
	formatNumber = formatNumber || {
		1: function( value ) {
			return stringPad( value, 1 );
		},
		2: function( value ) {
			return stringPad( value, 2 );
		}
	};

	return format

		// Pick the correct sign side (+ or -).
		.split( ";" )[ offset > 0 ? 1 : 0 ]

		// Localize time separator
		.replace( ":", timeSeparator )

		// Update hours offset.
		.replace( /HH?/, function( match ) {
			return formatNumber[ match.length ]( Math.floor( absOffset / 60 ) );
		})

		// Update minutes offset and return.
		.replace( /mm/, function() {
			return formatNumber[ 2 ]( Math.floor( absOffset % 60 ) );
		})

		// Update minutes offset and return.
		.replace( /ss/, function() {
			return formatNumber[ 2 ]( Math.floor( absOffset % 1 * 60 ) );
		});
};




/**
 * format( date, properties )
 *
 * @date [Date instance].
 *
 * @properties
 *
 * TODO Support other calendar types.
 *
 * Disclosure: this function borrows excerpts of dojo/date/locale.
 */
var dateFormat = function( date, numberFormatters, properties ) {
	var parts = [];

	var timeSeparator = properties.timeSeparator;

	// create globalize date with given timezone data
	if ( properties.timeZoneData ) {
		date = new ZonedDateTime( date, properties.timeZoneData() );
	}

	properties.pattern.replace( datePatternRe, function( current ) {
		var aux, dateField, type, value,
			chr = current.charAt( 0 ),
			length = current.length;

		if ( chr === "j" ) {

			// Locale preferred hHKk.
			// http://www.unicode.org/reports/tr35/tr35-dates.html#Time_Data
			chr = properties.preferredTime;
		}

		if ( chr === "Z" ) {

			// Z..ZZZ: same as "xxxx".
			if ( length < 4 ) {
				chr = "x";
				length = 4;

			// ZZZZ: same as "OOOO".
			} else if ( length < 5 ) {
				chr = "O";
				length = 4;

			// ZZZZZ: same as "XXXXX"
			} else {
				chr = "X";
				length = 5;
			}
		}

		// z...zzz: "{shortRegion}", e.g., "PST" or "PDT".
		// zzzz: "{regionName} {Standard Time}" or "{regionName} {Daylight Time}",
		//       e.g., "Pacific Standard Time" or "Pacific Daylight Time".
		if ( chr === "z" ) {
			if ( date.isDST ) {
				value = date.isDST() ? properties.daylightTzName : properties.standardTzName;
			}

			// Fall back to "O" format.
			if ( !value ) {
				chr = "O";
				if ( length < 4 ) {
					length = 1;
				}
			}
		}

		switch ( chr ) {

			// Era
			case "G":
				value = properties.eras[ date.getFullYear() < 0 ? 0 : 1 ];
				break;

			// Year
			case "y":

				// Plain year.
				// The length specifies the padding, but for two letters it also specifies the
				// maximum length.
				value = date.getFullYear();
				if ( length === 2 ) {
					value = String( value );
					value = +value.substr( value.length - 2 );
				}
				break;

			case "Y":

				// Year in "Week of Year"
				// The length specifies the padding, but for two letters it also specifies the
				// maximum length.
				// yearInWeekofYear = date + DaysInAWeek - (dayOfWeek - firstDay) - minDays
				value = new Date( date.getTime() );
				value.setDate(
					value.getDate() + 7 -
					dateDayOfWeek( date, properties.firstDay ) -
					properties.firstDay -
					properties.minDays
				);
				value = value.getFullYear();
				if ( length === 2 ) {
					value = String( value );
					value = +value.substr( value.length - 2 );
				}
				break;

			// Quarter
			case "Q":
			case "q":
				value = Math.ceil( ( date.getMonth() + 1 ) / 3 );
				if ( length > 2 ) {
					value = properties.quarters[ chr ][ length ][ value ];
				}
				break;

			// Month
			case "M":
			case "L":
				value = date.getMonth() + 1;
				if ( length > 2 ) {
					value = properties.months[ chr ][ length ][ value ];
				}
				break;

			// Week
			case "w":

				// Week of Year.
				// woy = ceil( ( doy + dow of 1/1 ) / 7 ) - minDaysStuff ? 1 : 0.
				// TODO should pad on ww? Not documented, but I guess so.
				value = dateDayOfWeek( dateStartOf( date, "year" ), properties.firstDay );
				value = Math.ceil( ( dateDayOfYear( date ) + value ) / 7 ) -
					( 7 - value >= properties.minDays ? 0 : 1 );
				break;

			case "W":

				// Week of Month.
				// wom = ceil( ( dom + dow of `1/month` ) / 7 ) - minDaysStuff ? 1 : 0.
				value = dateDayOfWeek( dateStartOf( date, "month" ), properties.firstDay );
				value = Math.ceil( ( date.getDate() + value ) / 7 ) -
					( 7 - value >= properties.minDays ? 0 : 1 );
				break;

			// Day
			case "d":
				value = date.getDate();
				break;

			case "D":
				value = dateDayOfYear( date ) + 1;
				break;

			case "F":

				// Day of Week in month. eg. 2nd Wed in July.
				value = Math.floor( date.getDate() / 7 ) + 1;
				break;

			// Week day
			case "e":
			case "c":
				if ( length <= 2 ) {

					// Range is [1-7] (deduced by example provided on documentation)
					// TODO Should pad with zeros (not specified in the docs)?
					value = dateDayOfWeek( date, properties.firstDay ) + 1;
					break;
				}

			/* falls through */
			case "E":
				value = dateWeekDays[ date.getDay() ];
				value = properties.days[ chr ][ length ][ value ];
				break;

			// Period (AM or PM)
			case "a":
				value = properties.dayPeriods[ date.getHours() < 12 ? "am" : "pm" ];
				break;

			// Hour
			case "h": // 1-12
				value = ( date.getHours() % 12 ) || 12;
				break;

			case "H": // 0-23
				value = date.getHours();
				break;

			case "K": // 0-11
				value = date.getHours() % 12;
				break;

			case "k": // 1-24
				value = date.getHours() || 24;
				break;

			// Minute
			case "m":
				value = date.getMinutes();
				break;

			// Second
			case "s":
				value = date.getSeconds();
				break;

			case "S":
				value = Math.round( date.getMilliseconds() * Math.pow( 10, length - 3 ) );
				break;

			case "A":
				value = Math.round( dateMillisecondsInDay( date ) * Math.pow( 10, length - 3 ) );
				break;

			// Zone
			case "z":
				break;

			case "v":

				// v...vvv: "{shortRegion}", eg. "PT".
				// vvvv: "{regionName} {Time}",
				//       e.g., "Pacific Time".
				if ( properties.genericTzName ) {
					value = properties.genericTzName;
					break;
				}

			/* falls through */
			case "V":

				//VVVV: "{explarCity} {Time}", e.g., "Los Angeles Time"
				if ( properties.timeZoneName ) {
					value = properties.timeZoneName;
					break;
				}

				if ( current === "v" ) {
					length = 1;
				}

			/* falls through */
			case "O":

				// O: "{gmtFormat}+H;{gmtFormat}-H" or "{gmtZeroFormat}", eg. "GMT-8" or "GMT".
				// OOOO: "{gmtFormat}{hourFormat}" or "{gmtZeroFormat}", eg. "GMT-08:00" or "GMT".
				if ( date.getTimezoneOffset() === 0 ) {
					value = properties.gmtZeroFormat;
				} else {

					// If O..OOO and timezone offset has non-zero minutes, show minutes.
					if ( length < 4 ) {
						aux = date.getTimezoneOffset();
						aux = properties.hourFormat[ aux % 60 - aux % 1 === 0 ? 0 : 1 ];
					} else {
						aux = properties.hourFormat;
					}

					value = dateTimezoneHourFormat(
						date,
						aux,
						timeSeparator,
						numberFormatters
					);
					value = properties.gmtFormat.replace( /\{0\}/, value );
				}
				break;

			case "X":

				// Same as x*, except it uses "Z" for zero offset.
				if ( date.getTimezoneOffset() === 0 ) {
					value = "Z";
					break;
				}

			/* falls through */
			case "x":

				// x: hourFormat("+HH[mm];-HH[mm]")
				// xx: hourFormat("+HHmm;-HHmm")
				// xxx: hourFormat("+HH:mm;-HH:mm")
				// xxxx: hourFormat("+HHmm[ss];-HHmm[ss]")
				// xxxxx: hourFormat("+HH:mm[:ss];-HH:mm[:ss]")
				aux = date.getTimezoneOffset();

				// If x and timezone offset has non-zero minutes, use xx (i.e., show minutes).
				if ( length === 1 && aux % 60 - aux % 1 !== 0 ) {
					length += 1;
				}

				// If (xxxx or xxxxx) and timezone offset has zero seconds, use xx or xxx
				// respectively (i.e., don't show optional seconds).
				if ( ( length === 4 || length === 5 ) && aux % 1 === 0 ) {
					length -= 2;
				}

				value = [
					"+HH;-HH",
					"+HHmm;-HHmm",
					"+HH:mm;-HH:mm",
					"+HHmmss;-HHmmss",
					"+HH:mm:ss;-HH:mm:ss"
				][ length - 1 ];

				value = dateTimezoneHourFormat( date, value, ":" );
				break;

			// timeSeparator
			case ":":
				value = timeSeparator;
				break;

			// ' literals.
			case "'":
				value = removeLiteralQuotes( current );
				break;

			// Anything else is considered a literal, including [ ,:/.@#], chinese, japonese, and
			// arabic characters.
			default:
				value = current;

		}
		if ( typeof value === "number" ) {
			value = numberFormatters[ length ]( value );
		}

		dateField = dateFieldsMap[ chr ];
		type = dateField ? dateField : "literal";

		partsPush( parts, type, value );
	});

	return parts;

};




var dateToPartsFormatterFn = function( numberFormatters, properties ) {
	return function dateToPartsFormatter( value ) {
		validateParameterPresence( value, "value" );
		validateParameterTypeDate( value, "value" );

		return dateFormat( value, numberFormatters, properties );
	};

};




function optionsHasStyle( options ) {
	return options.skeleton !== undefined ||
		options.date !== undefined ||
		options.time !== undefined ||
		options.datetime !== undefined ||
		options.raw !== undefined;
}

function validateRequiredCldr( path, value ) {
	validateCldr( path, value, {
		skip: [
			/dates\/calendars\/gregorian\/dateTimeFormats\/availableFormats/,
			/dates\/calendars\/gregorian\/days\/.*\/short/,
			/dates\/timeZoneNames\/zone/,
			/dates\/timeZoneNames\/metazone/,
			/globalize-iana/,
			/supplemental\/metaZones/,
			/supplemental\/timeData\/(?!001)/,
			/supplemental\/weekData\/(?!001)/
		]
	});
}

function validateOptionsPreset( options ) {
	validateOptionsPresetEach( "date", options );
	validateOptionsPresetEach( "time", options );
	validateOptionsPresetEach( "datetime", options );
}

function validateOptionsPresetEach( type, options ) {
	var value = options[ type ];
	validate(
		"E_INVALID_OPTIONS",
		"Invalid `{{type}: \"{value}\"}`.",
		value === undefined || [ "short", "medium", "long", "full" ].indexOf( value ) !== -1,
		{ type: type, value: value }
	);
}

function validateOptionsSkeleton( pattern, skeleton ) {
	validate(
		"E_INVALID_OPTIONS",
		"Invalid `{skeleton: \"{value}\"}` based on provided CLDR.",
		skeleton === undefined || ( typeof pattern === "string" && pattern ),
		{ type: "skeleton", value: skeleton }
	);
}

function validateRequiredIana( timeZone ) {
	return function( path, value ) {

		if ( !/globalize-iana/.test( path ) ) {
			return;
		}

		validate(
			"E_MISSING_IANA_TZ",
			"Missing required IANA timezone content for `{timeZone}`: `{path}`.",
			value,
			{
				path: path.replace( /globalize-iana\//, "" ),
				timeZone: timeZone
			}
		);
	};
}

/**
 * .loadTimeZone( json )
 *
 * @json [JSON]
 *
 * Load IANA timezone data.
 */
Globalize.loadTimeZone = function( json ) {
	var customData = {
			"globalize-iana": json
		};

	validateParameterPresence( json, "json" );
	validateParameterTypePlainObject( json, "json" );

	Cldr.load( customData );
};

/**
 * .dateFormatter( options )
 *
 * @options [Object] see date/expand_pattern for more info.
 *
 * Return a date formatter function (of the form below) according to the given options and the
 * default/instance locale.
 *
 * fn( value )
 *
 * @value [Date]
 *
 * Return a function that formats a date according to the given `format` and the default/instance
 * locale.
 */
Globalize.dateFormatter =
Globalize.prototype.dateFormatter = function( options ) {
	var args, dateToPartsFormatter, returnFn;

	validateParameterTypePlainObject( options, "options" );

	options = options || {};
	if ( !optionsHasStyle( options ) ) {
		options.skeleton = "yMd";
	}
	args = [ options ];

	dateToPartsFormatter = this.dateToPartsFormatter( options );
	returnFn = dateFormatterFn( dateToPartsFormatter );
	runtimeBind( args, this.cldr, returnFn, [ dateToPartsFormatter ] );

	return returnFn;
};

/**
 * .dateToPartsFormatter( options )
 *
 * @options [Object] see date/expand_pattern for more info.
 *
 * Return a date formatter function (of the form below) according to the given options and the
 * default/instance locale.
 *
 * fn( value )
 *
 * @value [Date]
 *
 * Return a function that formats a date to parts according to the given `format`
 * and the default/instance
 * locale.
 */
Globalize.dateToPartsFormatter =
Globalize.prototype.dateToPartsFormatter = function( options ) {
	var args, cldr, numberFormatters, pad, pattern, properties, returnFn,
		timeZone, ianaListener;

	validateParameterTypePlainObject( options, "options" );

	cldr = this.cldr;
	options = options || {};
	if ( !optionsHasStyle( options ) ) {
		options.skeleton = "yMd";
	}

	validateOptionsPreset( options );
	validateDefaultLocale( cldr );

	timeZone = options.timeZone;
	validateParameterTypeString( timeZone, "options.timeZone" );

	args = [ options ];

	cldr.on( "get", validateRequiredCldr );
	if ( timeZone ) {
		ianaListener = validateRequiredIana( timeZone );
		cldr.on( "get", ianaListener );
	}
	try {
		pattern = dateExpandPattern( options, cldr );
		validateOptionsSkeleton( pattern, options.skeleton );
		properties = dateFormatProperties( pattern, cldr, timeZone );
	} finally {
		cldr.off( "get", validateRequiredCldr );
		if ( ianaListener ) {
			cldr.off( "get", ianaListener );
		}
	}

	// Create needed number formatters.
	numberFormatters = properties.numberFormatters;
	delete properties.numberFormatters;
	for ( pad in numberFormatters ) {
		numberFormatters[ pad ] = this.numberFormatter({
			raw: numberFormatters[ pad ]
		});
	}

	returnFn = dateToPartsFormatterFn( numberFormatters, properties );

	runtimeBind( args, cldr, returnFn, [ numberFormatters, properties ] );

	return returnFn;
};

/**
 * .dateParser( options )
 *
 * @options [Object] see date/expand_pattern for more info.
 *
 * Return a function that parses a string date according to the given `formats` and the
 * default/instance locale.
 */
Globalize.dateParser =
Globalize.prototype.dateParser = function( options ) {
	var args, cldr, numberParser, parseProperties, pattern, returnFn, timeZone,
		tokenizerProperties;

	validateParameterTypePlainObject( options, "options" );

	cldr = this.cldr;
	options = options || {};
	if ( !optionsHasStyle( options ) ) {
		options.skeleton = "yMd";
	}

	validateOptionsPreset( options );
	validateDefaultLocale( cldr );

	timeZone = options.timeZone;
	validateParameterTypeString( timeZone, "options.timeZone" );

	args = [ options ];

	try {
		cldr.on( "get", validateRequiredCldr );
		if ( timeZone ) {
			cldr.on( "get", validateRequiredIana( timeZone ) );
		}
		pattern = dateExpandPattern( options, cldr );
		validateOptionsSkeleton( pattern, options.skeleton );
		tokenizerProperties = dateTokenizerProperties( pattern, cldr, timeZone );
		parseProperties = dateParseProperties( cldr, timeZone );
	} finally {
		cldr.off( "get", validateRequiredCldr );
		if ( timeZone ) {
			cldr.off( "get", validateRequiredIana( timeZone ) );
		}
	}
	numberParser = this.numberParser({ raw: "0" });

	returnFn = dateParserFn( numberParser, parseProperties, tokenizerProperties );

	runtimeBind( args, cldr, returnFn, [ numberParser, parseProperties, tokenizerProperties ] );

	return returnFn;
};

/**
 * .formatDate( value, options )
 *
 * @value [Date]
 *
 * @options [Object] see date/expand_pattern for more info.
 *
 * Formats a date or number according to the given options string and the default/instance locale.
 */
Globalize.formatDate =
Globalize.prototype.formatDate = function( value, options ) {
	validateParameterPresence( value, "value" );
	validateParameterTypeDate( value, "value" );

	return this.dateFormatter( options )( value );
};

/**
 * .formatDateToParts( value, options )
 *
 * @value [Date]
 *
 * @options [Object] see date/expand_pattern for more info.
 *
 * Formats a date or number to parts according to the given options and the default/instance locale.
 */
Globalize.formatDateToParts =
Globalize.prototype.formatDateToParts = function( value, options ) {
	validateParameterPresence( value, "value" );
	validateParameterTypeDate( value, "value" );

	return this.dateToPartsFormatter( options )( value );
};

/**
 * .parseDate( value, options )
 *
 * @value [String]
 *
 * @options [Object] see date/expand_pattern for more info.
 *
 * Return a Date instance or null.
 */
Globalize.parseDate =
Globalize.prototype.parseDate = function( value, options ) {
	validateParameterPresence( value, "value" );
	validateParameterTypeString( value, "value" );

	return this.dateParser( options )( value );
};

return Globalize;




}));

/*!

JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>

(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.

JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/

(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSZip = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";
var utils = require("./utils");
var support = require("./support");
// private property
var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";


// public method for encoding
exports.encode = function(input) {
    var output = [];
    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
    var i = 0, len = input.length, remainingBytes = len;

    var isArray = utils.getTypeOf(input) !== "string";
    while (i < input.length) {
        remainingBytes = len - i;

        if (!isArray) {
            chr1 = input.charCodeAt(i++);
            chr2 = i < len ? input.charCodeAt(i++) : 0;
            chr3 = i < len ? input.charCodeAt(i++) : 0;
        } else {
            chr1 = input[i++];
            chr2 = i < len ? input[i++] : 0;
            chr3 = i < len ? input[i++] : 0;
        }

        enc1 = chr1 >> 2;
        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
        enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;
        enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;

        output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));

    }

    return output.join("");
};

// public method for decoding
exports.decode = function(input) {
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0, resultIndex = 0;

    var dataUrlPrefix = "data:";

    if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {
        // This is a common error: people give a data url
        // (data:image/png;base64,iVBOR...) with a {base64: true} and
        // wonders why things don't work.
        // We can detect that the string input looks like a data url but we
        // *can't* be sure it is one: removing everything up to the comma would
        // be too dangerous.
        throw new Error("Invalid base64 input, it looks like a data url.");
    }

    input = input.replace(/[^A-Za-z0-9+/=]/g, "");

    var totalLength = input.length * 3 / 4;
    if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {
        totalLength--;
    }
    if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {
        totalLength--;
    }
    if (totalLength % 1 !== 0) {
        // totalLength is not an integer, the length does not match a valid
        // base64 content. That can happen if:
        // - the input is not a base64 content
        // - the input is *almost* a base64 content, with a extra chars at the
        //   beginning or at the end
        // - the input uses a base64 variant (base64url for example)
        throw new Error("Invalid base64 input, bad content length.");
    }
    var output;
    if (support.uint8array) {
        output = new Uint8Array(totalLength|0);
    } else {
        output = new Array(totalLength|0);
    }

    while (i < input.length) {

        enc1 = _keyStr.indexOf(input.charAt(i++));
        enc2 = _keyStr.indexOf(input.charAt(i++));
        enc3 = _keyStr.indexOf(input.charAt(i++));
        enc4 = _keyStr.indexOf(input.charAt(i++));

        chr1 = (enc1 << 2) | (enc2 >> 4);
        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
        chr3 = ((enc3 & 3) << 6) | enc4;

        output[resultIndex++] = chr1;

        if (enc3 !== 64) {
            output[resultIndex++] = chr2;
        }
        if (enc4 !== 64) {
            output[resultIndex++] = chr3;
        }

    }

    return output;
};

},{"./support":30,"./utils":32}],2:[function(require,module,exports){
"use strict";

var external = require("./external");
var DataWorker = require("./stream/DataWorker");
var Crc32Probe = require("./stream/Crc32Probe");
var DataLengthProbe = require("./stream/DataLengthProbe");

/**
 * Represent a compressed object, with everything needed to decompress it.
 * @constructor
 * @param {number} compressedSize the size of the data compressed.
 * @param {number} uncompressedSize the size of the data after decompression.
 * @param {number} crc32 the crc32 of the decompressed file.
 * @param {object} compression the type of compression, see lib/compressions.js.
 * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.
 */
function CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {
    this.compressedSize = compressedSize;
    this.uncompressedSize = uncompressedSize;
    this.crc32 = crc32;
    this.compression = compression;
    this.compressedContent = data;
}

CompressedObject.prototype = {
    /**
     * Create a worker to get the uncompressed content.
     * @return {GenericWorker} the worker.
     */
    getContentWorker: function () {
        var worker = new DataWorker(external.Promise.resolve(this.compressedContent))
            .pipe(this.compression.uncompressWorker())
            .pipe(new DataLengthProbe("data_length"));

        var that = this;
        worker.on("end", function () {
            if (this.streamInfo["data_length"] !== that.uncompressedSize) {
                throw new Error("Bug : uncompressed data size mismatch");
            }
        });
        return worker;
    },
    /**
     * Create a worker to get the compressed content.
     * @return {GenericWorker} the worker.
     */
    getCompressedWorker: function () {
        return new DataWorker(external.Promise.resolve(this.compressedContent))
            .withStreamInfo("compressedSize", this.compressedSize)
            .withStreamInfo("uncompressedSize", this.uncompressedSize)
            .withStreamInfo("crc32", this.crc32)
            .withStreamInfo("compression", this.compression)
        ;
    }
};

/**
 * Chain the given worker with other workers to compress the content with the
 * given compression.
 * @param {GenericWorker} uncompressedWorker the worker to pipe.
 * @param {Object} compression the compression object.
 * @param {Object} compressionOptions the options to use when compressing.
 * @return {GenericWorker} the new worker compressing the content.
 */
CompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {
    return uncompressedWorker
        .pipe(new Crc32Probe())
        .pipe(new DataLengthProbe("uncompressedSize"))
        .pipe(compression.compressWorker(compressionOptions))
        .pipe(new DataLengthProbe("compressedSize"))
        .withStreamInfo("compression", compression);
};

module.exports = CompressedObject;

},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(require,module,exports){
"use strict";

var GenericWorker = require("./stream/GenericWorker");

exports.STORE = {
    magic: "\x00\x00",
    compressWorker : function () {
        return new GenericWorker("STORE compression");
    },
    uncompressWorker : function () {
        return new GenericWorker("STORE decompression");
    }
};
exports.DEFLATE = require("./flate");

},{"./flate":7,"./stream/GenericWorker":28}],4:[function(require,module,exports){
"use strict";

var utils = require("./utils");

/**
 * The following functions come from pako, from pako/lib/zlib/crc32.js
 * released under the MIT license, see pako https://github.com/nodeca/pako/
 */

// Use ordinary array, since untyped makes no boost here
function makeTable() {
    var c, table = [];

    for(var n =0; n < 256; n++){
        c = n;
        for(var k =0; k < 8; k++){
            c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
        }
        table[n] = c;
    }

    return table;
}

// Create table on load. Just 255 signed longs. Not a problem.
var crcTable = makeTable();


function crc32(crc, buf, len, pos) {
    var t = crcTable, end = pos + len;

    crc = crc ^ (-1);

    for (var i = pos; i < end; i++ ) {
        crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
    }

    return (crc ^ (-1)); // >>> 0;
}

// That's all for the pako functions.

/**
 * Compute the crc32 of a string.
 * This is almost the same as the function crc32, but for strings. Using the
 * same function for the two use cases leads to horrible performances.
 * @param {Number} crc the starting value of the crc.
 * @param {String} str the string to use.
 * @param {Number} len the length of the string.
 * @param {Number} pos the starting position for the crc32 computation.
 * @return {Number} the computed crc32.
 */
function crc32str(crc, str, len, pos) {
    var t = crcTable, end = pos + len;

    crc = crc ^ (-1);

    for (var i = pos; i < end; i++ ) {
        crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];
    }

    return (crc ^ (-1)); // >>> 0;
}

module.exports = function crc32wrapper(input, crc) {
    if (typeof input === "undefined" || !input.length) {
        return 0;
    }

    var isArray = utils.getTypeOf(input) !== "string";

    if(isArray) {
        return crc32(crc|0, input, input.length, 0);
    } else {
        return crc32str(crc|0, input, input.length, 0);
    }
};

},{"./utils":32}],5:[function(require,module,exports){
"use strict";
exports.base64 = false;
exports.binary = false;
exports.dir = false;
exports.createFolders = true;
exports.date = null;
exports.compression = null;
exports.compressionOptions = null;
exports.comment = null;
exports.unixPermissions = null;
exports.dosPermissions = null;

},{}],6:[function(require,module,exports){
"use strict";

// load the global object first:
// - it should be better integrated in the system (unhandledRejection in node)
// - the environment may have a custom Promise implementation (see zone.js)
var ES6Promise = null;
if (typeof Promise !== "undefined") {
    ES6Promise = Promise;
} else {
    ES6Promise = require("lie");
}

/**
 * Let the user use/change some implementations.
 */
module.exports = {
    Promise: ES6Promise
};

},{"lie":37}],7:[function(require,module,exports){
"use strict";
var USE_TYPEDARRAY = (typeof Uint8Array !== "undefined") && (typeof Uint16Array !== "undefined") && (typeof Uint32Array !== "undefined");

var pako = require("pako");
var utils = require("./utils");
var GenericWorker = require("./stream/GenericWorker");

var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array";

exports.magic = "\x08\x00";

/**
 * Create a worker that uses pako to inflate/deflate.
 * @constructor
 * @param {String} action the name of the pako function to call : either "Deflate" or "Inflate".
 * @param {Object} options the options to use when (de)compressing.
 */
function FlateWorker(action, options) {
    GenericWorker.call(this, "FlateWorker/" + action);

    this._pako = null;
    this._pakoAction = action;
    this._pakoOptions = options;
    // the `meta` object from the last chunk received
    // this allow this worker to pass around metadata
    this.meta = {};
}

utils.inherits(FlateWorker, GenericWorker);

/**
 * @see GenericWorker.processChunk
 */
FlateWorker.prototype.processChunk = function (chunk) {
    this.meta = chunk.meta;
    if (this._pako === null) {
        this._createPako();
    }
    this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false);
};

/**
 * @see GenericWorker.flush
 */
FlateWorker.prototype.flush = function () {
    GenericWorker.prototype.flush.call(this);
    if (this._pako === null) {
        this._createPako();
    }
    this._pako.push([], true);
};
/**
 * @see GenericWorker.cleanUp
 */
FlateWorker.prototype.cleanUp = function () {
    GenericWorker.prototype.cleanUp.call(this);
    this._pako = null;
};

/**
 * Create the _pako object.
 * TODO: lazy-loading this object isn't the best solution but it's the
 * quickest. The best solution is to lazy-load the worker list. See also the
 * issue #446.
 */
FlateWorker.prototype._createPako = function () {
    this._pako = new pako[this._pakoAction]({
        raw: true,
        level: this._pakoOptions.level || -1 // default compression
    });
    var self = this;
    this._pako.onData = function(data) {
        self.push({
            data : data,
            meta : self.meta
        });
    };
};

exports.compressWorker = function (compressionOptions) {
    return new FlateWorker("Deflate", compressionOptions);
};
exports.uncompressWorker = function () {
    return new FlateWorker("Inflate", {});
};

},{"./stream/GenericWorker":28,"./utils":32,"pako":38}],8:[function(require,module,exports){
"use strict";

var utils = require("../utils");
var GenericWorker = require("../stream/GenericWorker");
var utf8 = require("../utf8");
var crc32 = require("../crc32");
var signature = require("../signature");

/**
 * Transform an integer into a string in hexadecimal.
 * @private
 * @param {number} dec the number to convert.
 * @param {number} bytes the number of bytes to generate.
 * @returns {string} the result.
 */
var decToHex = function(dec, bytes) {
    var hex = "", i;
    for (i = 0; i < bytes; i++) {
        hex += String.fromCharCode(dec & 0xff);
        dec = dec >>> 8;
    }
    return hex;
};

/**
 * Generate the UNIX part of the external file attributes.
 * @param {Object} unixPermissions the unix permissions or null.
 * @param {Boolean} isDir true if the entry is a directory, false otherwise.
 * @return {Number} a 32 bit integer.
 *
 * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :
 *
 * TTTTsstrwxrwxrwx0000000000ADVSHR
 * ^^^^____________________________ file type, see zipinfo.c (UNX_*)
 *     ^^^_________________________ setuid, setgid, sticky
 *        ^^^^^^^^^________________ permissions
 *                 ^^^^^^^^^^______ not used ?
 *                           ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only
 */
var generateUnixExternalFileAttr = function (unixPermissions, isDir) {

    var result = unixPermissions;
    if (!unixPermissions) {
        // I can't use octal values in strict mode, hence the hexa.
        //  040775 => 0x41fd
        // 0100664 => 0x81b4
        result = isDir ? 0x41fd : 0x81b4;
    }
    return (result & 0xFFFF) << 16;
};

/**
 * Generate the DOS part of the external file attributes.
 * @param {Object} dosPermissions the dos permissions or null.
 * @param {Boolean} isDir true if the entry is a directory, false otherwise.
 * @return {Number} a 32 bit integer.
 *
 * Bit 0     Read-Only
 * Bit 1     Hidden
 * Bit 2     System
 * Bit 3     Volume Label
 * Bit 4     Directory
 * Bit 5     Archive
 */
var generateDosExternalFileAttr = function (dosPermissions) {
    // the dir flag is already set for compatibility
    return (dosPermissions || 0)  & 0x3F;
};

/**
 * Generate the various parts used in the construction of the final zip file.
 * @param {Object} streamInfo the hash with information about the compressed file.
 * @param {Boolean} streamedContent is the content streamed ?
 * @param {Boolean} streamingEnded is the stream finished ?
 * @param {number} offset the current offset from the start of the zip file.
 * @param {String} platform let's pretend we are this platform (change platform dependents fields)
 * @param {Function} encodeFileName the function to encode the file name / comment.
 * @return {Object} the zip parts.
 */
var generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {
    var file = streamInfo["file"],
        compression = streamInfo["compression"],
        useCustomEncoding = encodeFileName !== utf8.utf8encode,
        encodedFileName = utils.transformTo("string", encodeFileName(file.name)),
        utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)),
        comment = file.comment,
        encodedComment = utils.transformTo("string", encodeFileName(comment)),
        utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)),
        useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,
        useUTF8ForComment = utfEncodedComment.length !== comment.length,
        dosTime,
        dosDate,
        extraFields = "",
        unicodePathExtraField = "",
        unicodeCommentExtraField = "",
        dir = file.dir,
        date = file.date;


    var dataInfo = {
        crc32 : 0,
        compressedSize : 0,
        uncompressedSize : 0
    };

    // if the content is streamed, the sizes/crc32 are only available AFTER
    // the end of the stream.
    if (!streamedContent || streamingEnded) {
        dataInfo.crc32 = streamInfo["crc32"];
        dataInfo.compressedSize = streamInfo["compressedSize"];
        dataInfo.uncompressedSize = streamInfo["uncompressedSize"];
    }

    var bitflag = 0;
    if (streamedContent) {
        // Bit 3: the sizes/crc32 are set to zero in the local header.
        // The correct values are put in the data descriptor immediately
        // following the compressed data.
        bitflag |= 0x0008;
    }
    if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {
        // Bit 11: Language encoding flag (EFS).
        bitflag |= 0x0800;
    }


    var extFileAttr = 0;
    var versionMadeBy = 0;
    if (dir) {
        // dos or unix, we set the dos dir flag
        extFileAttr |= 0x00010;
    }
    if(platform === "UNIX") {
        versionMadeBy = 0x031E; // UNIX, version 3.0
        extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);
    } else { // DOS or other, fallback to DOS
        versionMadeBy = 0x0014; // DOS, version 2.0
        extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);
    }

    // date
    // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html
    // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html
    // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html

    dosTime = date.getUTCHours();
    dosTime = dosTime << 6;
    dosTime = dosTime | date.getUTCMinutes();
    dosTime = dosTime << 5;
    dosTime = dosTime | date.getUTCSeconds() / 2;

    dosDate = date.getUTCFullYear() - 1980;
    dosDate = dosDate << 4;
    dosDate = dosDate | (date.getUTCMonth() + 1);
    dosDate = dosDate << 5;
    dosDate = dosDate | date.getUTCDate();

    if (useUTF8ForFileName) {
        // set the unicode path extra field. unzip needs at least one extra
        // field to correctly handle unicode path, so using the path is as good
        // as any other information. This could improve the situation with
        // other archive managers too.
        // This field is usually used without the utf8 flag, with a non
        // unicode path in the header (winrar, winzip). This helps (a bit)
        // with the messy Windows' default compressed folders feature but
        // breaks on p7zip which doesn't seek the unicode path extra field.
        // So for now, UTF-8 everywhere !
        unicodePathExtraField =
            // Version
            decToHex(1, 1) +
            // NameCRC32
            decToHex(crc32(encodedFileName), 4) +
            // UnicodeName
            utfEncodedFileName;

        extraFields +=
            // Info-ZIP Unicode Path Extra Field
            "\x75\x70" +
            // size
            decToHex(unicodePathExtraField.length, 2) +
            // content
            unicodePathExtraField;
    }

    if(useUTF8ForComment) {

        unicodeCommentExtraField =
            // Version
            decToHex(1, 1) +
            // CommentCRC32
            decToHex(crc32(encodedComment), 4) +
            // UnicodeName
            utfEncodedComment;

        extraFields +=
            // Info-ZIP Unicode Path Extra Field
            "\x75\x63" +
            // size
            decToHex(unicodeCommentExtraField.length, 2) +
            // content
            unicodeCommentExtraField;
    }

    var header = "";

    // version needed to extract
    header += "\x0A\x00";
    // general purpose bit flag
    header += decToHex(bitflag, 2);
    // compression method
    header += compression.magic;
    // last mod file time
    header += decToHex(dosTime, 2);
    // last mod file date
    header += decToHex(dosDate, 2);
    // crc-32
    header += decToHex(dataInfo.crc32, 4);
    // compressed size
    header += decToHex(dataInfo.compressedSize, 4);
    // uncompressed size
    header += decToHex(dataInfo.uncompressedSize, 4);
    // file name length
    header += decToHex(encodedFileName.length, 2);
    // extra field length
    header += decToHex(extraFields.length, 2);


    var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;

    var dirRecord = signature.CENTRAL_FILE_HEADER +
        // version made by (00: DOS)
        decToHex(versionMadeBy, 2) +
        // file header (common to file and central directory)
        header +
        // file comment length
        decToHex(encodedComment.length, 2) +
        // disk number start
        "\x00\x00" +
        // internal file attributes TODO
        "\x00\x00" +
        // external file attributes
        decToHex(extFileAttr, 4) +
        // relative offset of local header
        decToHex(offset, 4) +
        // file name
        encodedFileName +
        // extra field
        extraFields +
        // file comment
        encodedComment;

    return {
        fileRecord: fileRecord,
        dirRecord: dirRecord
    };
};

/**
 * Generate the EOCD record.
 * @param {Number} entriesCount the number of entries in the zip file.
 * @param {Number} centralDirLength the length (in bytes) of the central dir.
 * @param {Number} localDirLength the length (in bytes) of the local dir.
 * @param {String} comment the zip file comment as a binary string.
 * @param {Function} encodeFileName the function to encode the comment.
 * @return {String} the EOCD record.
 */
var generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {
    var dirEnd = "";
    var encodedComment = utils.transformTo("string", encodeFileName(comment));

    // end of central dir signature
    dirEnd = signature.CENTRAL_DIRECTORY_END +
        // number of this disk
        "\x00\x00" +
        // number of the disk with the start of the central directory
        "\x00\x00" +
        // total number of entries in the central directory on this disk
        decToHex(entriesCount, 2) +
        // total number of entries in the central directory
        decToHex(entriesCount, 2) +
        // size of the central directory   4 bytes
        decToHex(centralDirLength, 4) +
        // offset of start of central directory with respect to the starting disk number
        decToHex(localDirLength, 4) +
        // .ZIP file comment length
        decToHex(encodedComment.length, 2) +
        // .ZIP file comment
        encodedComment;

    return dirEnd;
};

/**
 * Generate data descriptors for a file entry.
 * @param {Object} streamInfo the hash generated by a worker, containing information
 * on the file entry.
 * @return {String} the data descriptors.
 */
var generateDataDescriptors = function (streamInfo) {
    var descriptor = "";
    descriptor = signature.DATA_DESCRIPTOR +
        // crc-32                          4 bytes
        decToHex(streamInfo["crc32"], 4) +
        // compressed size                 4 bytes
        decToHex(streamInfo["compressedSize"], 4) +
        // uncompressed size               4 bytes
        decToHex(streamInfo["uncompressedSize"], 4);

    return descriptor;
};


/**
 * A worker to concatenate other workers to create a zip file.
 * @param {Boolean} streamFiles `true` to stream the content of the files,
 * `false` to accumulate it.
 * @param {String} comment the comment to use.
 * @param {String} platform the platform to use, "UNIX" or "DOS".
 * @param {Function} encodeFileName the function to encode file names and comments.
 */
function ZipFileWorker(streamFiles, comment, platform, encodeFileName) {
    GenericWorker.call(this, "ZipFileWorker");
    // The number of bytes written so far. This doesn't count accumulated chunks.
    this.bytesWritten = 0;
    // The comment of the zip file
    this.zipComment = comment;
    // The platform "generating" the zip file.
    this.zipPlatform = platform;
    // the function to encode file names and comments.
    this.encodeFileName = encodeFileName;
    // Should we stream the content of the files ?
    this.streamFiles = streamFiles;
    // If `streamFiles` is false, we will need to accumulate the content of the
    // files to calculate sizes / crc32 (and write them *before* the content).
    // This boolean indicates if we are accumulating chunks (it will change a lot
    // during the lifetime of this worker).
    this.accumulate = false;
    // The buffer receiving chunks when accumulating content.
    this.contentBuffer = [];
    // The list of generated directory records.
    this.dirRecords = [];
    // The offset (in bytes) from the beginning of the zip file for the current source.
    this.currentSourceOffset = 0;
    // The total number of entries in this zip file.
    this.entriesCount = 0;
    // the name of the file currently being added, null when handling the end of the zip file.
    // Used for the emitted metadata.
    this.currentFile = null;



    this._sources = [];
}
utils.inherits(ZipFileWorker, GenericWorker);

/**
 * @see GenericWorker.push
 */
ZipFileWorker.prototype.push = function (chunk) {

    var currentFilePercent = chunk.meta.percent || 0;
    var entriesCount = this.entriesCount;
    var remainingFiles = this._sources.length;

    if(this.accumulate) {
        this.contentBuffer.push(chunk);
    } else {
        this.bytesWritten += chunk.data.length;

        GenericWorker.prototype.push.call(this, {
            data : chunk.data,
            meta : {
                currentFile : this.currentFile,
                percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100
            }
        });
    }
};

/**
 * The worker started a new source (an other worker).
 * @param {Object} streamInfo the streamInfo object from the new source.
 */
ZipFileWorker.prototype.openedSource = function (streamInfo) {
    this.currentSourceOffset = this.bytesWritten;
    this.currentFile = streamInfo["file"].name;

    var streamedContent = this.streamFiles && !streamInfo["file"].dir;

    // don't stream folders (because they don't have any content)
    if(streamedContent) {
        var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
        this.push({
            data : record.fileRecord,
            meta : {percent:0}
        });
    } else {
        // we need to wait for the whole file before pushing anything
        this.accumulate = true;
    }
};

/**
 * The worker finished a source (an other worker).
 * @param {Object} streamInfo the streamInfo object from the finished source.
 */
ZipFileWorker.prototype.closedSource = function (streamInfo) {
    this.accumulate = false;
    var streamedContent = this.streamFiles && !streamInfo["file"].dir;
    var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);

    this.dirRecords.push(record.dirRecord);
    if(streamedContent) {
        // after the streamed file, we put data descriptors
        this.push({
            data : generateDataDescriptors(streamInfo),
            meta : {percent:100}
        });
    } else {
        // the content wasn't streamed, we need to push everything now
        // first the file record, then the content
        this.push({
            data : record.fileRecord,
            meta : {percent:0}
        });
        while(this.contentBuffer.length) {
            this.push(this.contentBuffer.shift());
        }
    }
    this.currentFile = null;
};

/**
 * @see GenericWorker.flush
 */
ZipFileWorker.prototype.flush = function () {

    var localDirLength = this.bytesWritten;
    for(var i = 0; i < this.dirRecords.length; i++) {
        this.push({
            data : this.dirRecords[i],
            meta : {percent:100}
        });
    }
    var centralDirLength = this.bytesWritten - localDirLength;

    var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);

    this.push({
        data : dirEnd,
        meta : {percent:100}
    });
};

/**
 * Prepare the next source to be read.
 */
ZipFileWorker.prototype.prepareNextSource = function () {
    this.previous = this._sources.shift();
    this.openedSource(this.previous.streamInfo);
    if (this.isPaused) {
        this.previous.pause();
    } else {
        this.previous.resume();
    }
};

/**
 * @see GenericWorker.registerPrevious
 */
ZipFileWorker.prototype.registerPrevious = function (previous) {
    this._sources.push(previous);
    var self = this;

    previous.on("data", function (chunk) {
        self.processChunk(chunk);
    });
    previous.on("end", function () {
        self.closedSource(self.previous.streamInfo);
        if(self._sources.length) {
            self.prepareNextSource();
        } else {
            self.end();
        }
    });
    previous.on("error", function (e) {
        self.error(e);
    });
    return this;
};

/**
 * @see GenericWorker.resume
 */
ZipFileWorker.prototype.resume = function () {
    if(!GenericWorker.prototype.resume.call(this)) {
        return false;
    }

    if (!this.previous && this._sources.length) {
        this.prepareNextSource();
        return true;
    }
    if (!this.previous && !this._sources.length && !this.generatedError) {
        this.end();
        return true;
    }
};

/**
 * @see GenericWorker.error
 */
ZipFileWorker.prototype.error = function (e) {
    var sources = this._sources;
    if(!GenericWorker.prototype.error.call(this, e)) {
        return false;
    }
    for(var i = 0; i < sources.length; i++) {
        try {
            sources[i].error(e);
        } catch(e) {
            // the `error` exploded, nothing to do
        }
    }
    return true;
};

/**
 * @see GenericWorker.lock
 */
ZipFileWorker.prototype.lock = function () {
    GenericWorker.prototype.lock.call(this);
    var sources = this._sources;
    for(var i = 0; i < sources.length; i++) {
        sources[i].lock();
    }
};

module.exports = ZipFileWorker;

},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(require,module,exports){
"use strict";

var compressions = require("../compressions");
var ZipFileWorker = require("./ZipFileWorker");

/**
 * Find the compression to use.
 * @param {String} fileCompression the compression defined at the file level, if any.
 * @param {String} zipCompression the compression defined at the load() level.
 * @return {Object} the compression object to use.
 */
var getCompression = function (fileCompression, zipCompression) {

    var compressionName = fileCompression || zipCompression;
    var compression = compressions[compressionName];
    if (!compression) {
        throw new Error(compressionName + " is not a valid compression method !");
    }
    return compression;
};

/**
 * Create a worker to generate a zip file.
 * @param {JSZip} zip the JSZip instance at the right root level.
 * @param {Object} options to generate the zip file.
 * @param {String} comment the comment to use.
 */
exports.generateWorker = function (zip, options, comment) {

    var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName);
    var entriesCount = 0;
    try {

        zip.forEach(function (relativePath, file) {
            entriesCount++;
            var compression = getCompression(file.options.compression, options.compression);
            var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};
            var dir = file.dir, date = file.date;

            file._compressWorker(compression, compressionOptions)
                .withStreamInfo("file", {
                    name : relativePath,
                    dir : dir,
                    date : date,
                    comment : file.comment || "",
                    unixPermissions : file.unixPermissions,
                    dosPermissions : file.dosPermissions
                })
                .pipe(zipFileWorker);
        });
        zipFileWorker.entriesCount = entriesCount;
    } catch (e) {
        zipFileWorker.error(e);
    }

    return zipFileWorker;
};

},{"../compressions":3,"./ZipFileWorker":8}],10:[function(require,module,exports){
"use strict";

/**
 * Representation a of zip file in js
 * @constructor
 */
function JSZip() {
    // if this constructor is used without `new`, it adds `new` before itself:
    if(!(this instanceof JSZip)) {
        return new JSZip();
    }

    if(arguments.length) {
        throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
    }

    // object containing the files :
    // {
    //   "folder/" : {...},
    //   "folder/data.txt" : {...}
    // }
    // NOTE: we use a null prototype because we do not
    // want filenames like "toString" coming from a zip file
    // to overwrite methods and attributes in a normal Object.
    this.files = Object.create(null);

    this.comment = null;

    // Where we are in the hierarchy
    this.root = "";
    this.clone = function() {
        var newObj = new JSZip();
        for (var i in this) {
            if (typeof this[i] !== "function") {
                newObj[i] = this[i];
            }
        }
        return newObj;
    };
}
JSZip.prototype = require("./object");
JSZip.prototype.loadAsync = require("./load");
JSZip.support = require("./support");
JSZip.defaults = require("./defaults");

// TODO find a better way to handle this version,
// a require('package.json').version doesn't work with webpack, see #327
JSZip.version = "3.10.1";

JSZip.loadAsync = function (content, options) {
    return new JSZip().loadAsync(content, options);
};

JSZip.external = require("./external");
module.exports = JSZip;

},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(require,module,exports){
"use strict";
var utils = require("./utils");
var external = require("./external");
var utf8 = require("./utf8");
var ZipEntries = require("./zipEntries");
var Crc32Probe = require("./stream/Crc32Probe");
var nodejsUtils = require("./nodejsUtils");

/**
 * Check the CRC32 of an entry.
 * @param {ZipEntry} zipEntry the zip entry to check.
 * @return {Promise} the result.
 */
function checkEntryCRC32(zipEntry) {
    return new external.Promise(function (resolve, reject) {
        var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());
        worker.on("error", function (e) {
            reject(e);
        })
            .on("end", function () {
                if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {
                    reject(new Error("Corrupted zip : CRC32 mismatch"));
                } else {
                    resolve();
                }
            })
            .resume();
    });
}

module.exports = function (data, options) {
    var zip = this;
    options = utils.extend(options || {}, {
        base64: false,
        checkCRC32: false,
        optimizedBinaryString: false,
        createFolders: false,
        decodeFileName: utf8.utf8decode
    });

    if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {
        return external.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file."));
    }

    return utils.prepareContent("the loaded zip file", data, true, options.optimizedBinaryString, options.base64)
        .then(function (data) {
            var zipEntries = new ZipEntries(options);
            zipEntries.load(data);
            return zipEntries;
        }).then(function checkCRC32(zipEntries) {
            var promises = [external.Promise.resolve(zipEntries)];
            var files = zipEntries.files;
            if (options.checkCRC32) {
                for (var i = 0; i < files.length; i++) {
                    promises.push(checkEntryCRC32(files[i]));
                }
            }
            return external.Promise.all(promises);
        }).then(function addFiles(results) {
            var zipEntries = results.shift();
            var files = zipEntries.files;
            for (var i = 0; i < files.length; i++) {
                var input = files[i];

                var unsafeName = input.fileNameStr;
                var safeName = utils.resolve(input.fileNameStr);

                zip.file(safeName, input.decompressed, {
                    binary: true,
                    optimizedBinaryString: true,
                    date: input.date,
                    dir: input.dir,
                    comment: input.fileCommentStr.length ? input.fileCommentStr : null,
                    unixPermissions: input.unixPermissions,
                    dosPermissions: input.dosPermissions,
                    createFolders: options.createFolders
                });
                if (!input.dir) {
                    zip.file(safeName).unsafeOriginalName = unsafeName;
                }
            }
            if (zipEntries.zipComment.length) {
                zip.comment = zipEntries.zipComment;
            }

            return zip;
        });
};

},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(require,module,exports){
"use strict";

var utils = require("../utils");
var GenericWorker = require("../stream/GenericWorker");

/**
 * A worker that use a nodejs stream as source.
 * @constructor
 * @param {String} filename the name of the file entry for this stream.
 * @param {Readable} stream the nodejs stream.
 */
function NodejsStreamInputAdapter(filename, stream) {
    GenericWorker.call(this, "Nodejs stream input adapter for " + filename);
    this._upstreamEnded = false;
    this._bindStream(stream);
}

utils.inherits(NodejsStreamInputAdapter, GenericWorker);

/**
 * Prepare the stream and bind the callbacks on it.
 * Do this ASAP on node 0.10 ! A lazy binding doesn't always work.
 * @param {Stream} stream the nodejs stream to use.
 */
NodejsStreamInputAdapter.prototype._bindStream = function (stream) {
    var self = this;
    this._stream = stream;
    stream.pause();
    stream
        .on("data", function (chunk) {
            self.push({
                data: chunk,
                meta : {
                    percent : 0
                }
            });
        })
        .on("error", function (e) {
            if(self.isPaused) {
                this.generatedError = e;
            } else {
                self.error(e);
            }
        })
        .on("end", function () {
            if(self.isPaused) {
                self._upstreamEnded = true;
            } else {
                self.end();
            }
        });
};
NodejsStreamInputAdapter.prototype.pause = function () {
    if(!GenericWorker.prototype.pause.call(this)) {
        return false;
    }
    this._stream.pause();
    return true;
};
NodejsStreamInputAdapter.prototype.resume = function () {
    if(!GenericWorker.prototype.resume.call(this)) {
        return false;
    }

    if(this._upstreamEnded) {
        this.end();
    } else {
        this._stream.resume();
    }

    return true;
};

module.exports = NodejsStreamInputAdapter;

},{"../stream/GenericWorker":28,"../utils":32}],13:[function(require,module,exports){
"use strict";

var Readable = require("readable-stream").Readable;

var utils = require("../utils");
utils.inherits(NodejsStreamOutputAdapter, Readable);

/**
* A nodejs stream using a worker as source.
* @see the SourceWrapper in http://nodejs.org/api/stream.html
* @constructor
* @param {StreamHelper} helper the helper wrapping the worker
* @param {Object} options the nodejs stream options
* @param {Function} updateCb the update callback.
*/
function NodejsStreamOutputAdapter(helper, options, updateCb) {
    Readable.call(this, options);
    this._helper = helper;

    var self = this;
    helper.on("data", function (data, meta) {
        if (!self.push(data)) {
            self._helper.pause();
        }
        if(updateCb) {
            updateCb(meta);
        }
    })
        .on("error", function(e) {
            self.emit("error", e);
        })
        .on("end", function () {
            self.push(null);
        });
}


NodejsStreamOutputAdapter.prototype._read = function() {
    this._helper.resume();
};

module.exports = NodejsStreamOutputAdapter;

},{"../utils":32,"readable-stream":16}],14:[function(require,module,exports){
"use strict";

module.exports = {
    /**
     * True if this is running in Nodejs, will be undefined in a browser.
     * In a browser, browserify won't include this file and the whole module
     * will be resolved an empty object.
     */
    isNode : typeof Buffer !== "undefined",
    /**
     * Create a new nodejs Buffer from an existing content.
     * @param {Object} data the data to pass to the constructor.
     * @param {String} encoding the encoding to use.
     * @return {Buffer} a new Buffer.
     */
    newBufferFrom: function(data, encoding) {
        if (Buffer.from && Buffer.from !== Uint8Array.from) {
            return Buffer.from(data, encoding);
        } else {
            if (typeof data === "number") {
                // Safeguard for old Node.js versions. On newer versions,
                // Buffer.from(number) / Buffer(number, encoding) already throw.
                throw new Error("The \"data\" argument must not be a number");
            }
            return new Buffer(data, encoding);
        }
    },
    /**
     * Create a new nodejs Buffer with the specified size.
     * @param {Integer} size the size of the buffer.
     * @return {Buffer} a new Buffer.
     */
    allocBuffer: function (size) {
        if (Buffer.alloc) {
            return Buffer.alloc(size);
        } else {
            var buf = new Buffer(size);
            buf.fill(0);
            return buf;
        }
    },
    /**
     * Find out if an object is a Buffer.
     * @param {Object} b the object to test.
     * @return {Boolean} true if the object is a Buffer, false otherwise.
     */
    isBuffer : function(b){
        return Buffer.isBuffer(b);
    },

    isStream : function (obj) {
        return obj &&
            typeof obj.on === "function" &&
            typeof obj.pause === "function" &&
            typeof obj.resume === "function";
    }
};

},{}],15:[function(require,module,exports){
"use strict";
var utf8 = require("./utf8");
var utils = require("./utils");
var GenericWorker = require("./stream/GenericWorker");
var StreamHelper = require("./stream/StreamHelper");
var defaults = require("./defaults");
var CompressedObject = require("./compressedObject");
var ZipObject = require("./zipObject");
var generate = require("./generate");
var nodejsUtils = require("./nodejsUtils");
var NodejsStreamInputAdapter = require("./nodejs/NodejsStreamInputAdapter");


/**
 * Add a file in the current folder.
 * @private
 * @param {string} name the name of the file
 * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file
 * @param {Object} originalOptions the options of the file
 * @return {Object} the new file.
 */
var fileAdd = function(name, data, originalOptions) {
    // be sure sub folders exist
    var dataType = utils.getTypeOf(data),
        parent;


    /*
     * Correct options.
     */

    var o = utils.extend(originalOptions || {}, defaults);
    o.date = o.date || new Date();
    if (o.compression !== null) {
        o.compression = o.compression.toUpperCase();
    }

    if (typeof o.unixPermissions === "string") {
        o.unixPermissions = parseInt(o.unixPermissions, 8);
    }

    // UNX_IFDIR  0040000 see zipinfo.c
    if (o.unixPermissions && (o.unixPermissions & 0x4000)) {
        o.dir = true;
    }
    // Bit 4    Directory
    if (o.dosPermissions && (o.dosPermissions & 0x0010)) {
        o.dir = true;
    }

    if (o.dir) {
        name = forceTrailingSlash(name);
    }
    if (o.createFolders && (parent = parentFolder(name))) {
        folderAdd.call(this, parent, true);
    }

    var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false;
    if (!originalOptions || typeof originalOptions.binary === "undefined") {
        o.binary = !isUnicodeString;
    }


    var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;

    if (isCompressedEmpty || o.dir || !data || data.length === 0) {
        o.base64 = false;
        o.binary = true;
        data = "";
        o.compression = "STORE";
        dataType = "string";
    }

    /*
     * Convert content to fit.
     */

    var zipObjectContent = null;
    if (data instanceof CompressedObject || data instanceof GenericWorker) {
        zipObjectContent = data;
    } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {
        zipObjectContent = new NodejsStreamInputAdapter(name, data);
    } else {
        zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);
    }

    var object = new ZipObject(name, zipObjectContent, o);
    this.files[name] = object;
    /*
    TODO: we can't throw an exception because we have async promises
    (we can have a promise of a Date() for example) but returning a
    promise is useless because file(name, data) returns the JSZip
    object for chaining. Should we break that to allow the user
    to catch the error ?

    return external.Promise.resolve(zipObjectContent)
    .then(function () {
        return object;
    });
    */
};

/**
 * Find the parent folder of the path.
 * @private
 * @param {string} path the path to use
 * @return {string} the parent folder, or ""
 */
var parentFolder = function (path) {
    if (path.slice(-1) === "/") {
        path = path.substring(0, path.length - 1);
    }
    var lastSlash = path.lastIndexOf("/");
    return (lastSlash > 0) ? path.substring(0, lastSlash) : "";
};

/**
 * Returns the path with a slash at the end.
 * @private
 * @param {String} path the path to check.
 * @return {String} the path with a trailing slash.
 */
var forceTrailingSlash = function(path) {
    // Check the name ends with a /
    if (path.slice(-1) !== "/") {
        path += "/"; // IE doesn't like substr(-1)
    }
    return path;
};

/**
 * Add a (sub) folder in the current folder.
 * @private
 * @param {string} name the folder's name
 * @param {boolean=} [createFolders] If true, automatically create sub
 *  folders. Defaults to false.
 * @return {Object} the new folder.
 */
var folderAdd = function(name, createFolders) {
    createFolders = (typeof createFolders !== "undefined") ? createFolders : defaults.createFolders;

    name = forceTrailingSlash(name);

    // Does this folder already exist?
    if (!this.files[name]) {
        fileAdd.call(this, name, null, {
            dir: true,
            createFolders: createFolders
        });
    }
    return this.files[name];
};

/**
* Cross-window, cross-Node-context regular expression detection
* @param  {Object}  object Anything
* @return {Boolean}        true if the object is a regular expression,
* false otherwise
*/
function isRegExp(object) {
    return Object.prototype.toString.call(object) === "[object RegExp]";
}

// return the actual prototype of JSZip
var out = {
    /**
     * @see loadAsync
     */
    load: function() {
        throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
    },


    /**
     * Call a callback function for each entry at this folder level.
     * @param {Function} cb the callback function:
     * function (relativePath, file) {...}
     * It takes 2 arguments : the relative path and the file.
     */
    forEach: function(cb) {
        var filename, relativePath, file;
        // ignore warning about unwanted properties because this.files is a null prototype object
        /* eslint-disable-next-line guard-for-in */
        for (filename in this.files) {
            file = this.files[filename];
            relativePath = filename.slice(this.root.length, filename.length);
            if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root
                cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...
            }
        }
    },

    /**
     * Filter nested files/folders with the specified function.
     * @param {Function} search the predicate to use :
     * function (relativePath, file) {...}
     * It takes 2 arguments : the relative path and the file.
     * @return {Array} An array of matching elements.
     */
    filter: function(search) {
        var result = [];
        this.forEach(function (relativePath, entry) {
            if (search(relativePath, entry)) { // the file matches the function
                result.push(entry);
            }

        });
        return result;
    },

    /**
     * Add a file to the zip file, or search a file.
     * @param   {string|RegExp} name The name of the file to add (if data is defined),
     * the name of the file to find (if no data) or a regex to match files.
     * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded
     * @param   {Object} o     File options
     * @return  {JSZip|Object|Array} this JSZip object (when adding a file),
     * a file (when searching by string) or an array of files (when searching by regex).
     */
    file: function(name, data, o) {
        if (arguments.length === 1) {
            if (isRegExp(name)) {
                var regexp = name;
                return this.filter(function(relativePath, file) {
                    return !file.dir && regexp.test(relativePath);
                });
            }
            else { // text
                var obj = this.files[this.root + name];
                if (obj && !obj.dir) {
                    return obj;
                } else {
                    return null;
                }
            }
        }
        else { // more than one argument : we have data !
            name = this.root + name;
            fileAdd.call(this, name, data, o);
        }
        return this;
    },

    /**
     * Add a directory to the zip file, or search.
     * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.
     * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.
     */
    folder: function(arg) {
        if (!arg) {
            return this;
        }

        if (isRegExp(arg)) {
            return this.filter(function(relativePath, file) {
                return file.dir && arg.test(relativePath);
            });
        }

        // else, name is a new folder
        var name = this.root + arg;
        var newFolder = folderAdd.call(this, name);

        // Allow chaining by returning a new object with this folder as the root
        var ret = this.clone();
        ret.root = newFolder.name;
        return ret;
    },

    /**
     * Delete a file, or a directory and all sub-files, from the zip
     * @param {string} name the name of the file to delete
     * @return {JSZip} this JSZip object
     */
    remove: function(name) {
        name = this.root + name;
        var file = this.files[name];
        if (!file) {
            // Look for any folders
            if (name.slice(-1) !== "/") {
                name += "/";
            }
            file = this.files[name];
        }

        if (file && !file.dir) {
            // file
            delete this.files[name];
        } else {
            // maybe a folder, delete recursively
            var kids = this.filter(function(relativePath, file) {
                return file.name.slice(0, name.length) === name;
            });
            for (var i = 0; i < kids.length; i++) {
                delete this.files[kids[i].name];
            }
        }

        return this;
    },

    /**
     * @deprecated This method has been removed in JSZip 3.0, please check the upgrade guide.
     */
    generate: function() {
        throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
    },

    /**
     * Generate the complete zip file as an internal stream.
     * @param {Object} options the options to generate the zip file :
     * - compression, "STORE" by default.
     * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
     * @return {StreamHelper} the streamed zip file.
     */
    generateInternalStream: function(options) {
        var worker, opts = {};
        try {
            opts = utils.extend(options || {}, {
                streamFiles: false,
                compression: "STORE",
                compressionOptions : null,
                type: "",
                platform: "DOS",
                comment: null,
                mimeType: "application/zip",
                encodeFileName: utf8.utf8encode
            });

            opts.type = opts.type.toLowerCase();
            opts.compression = opts.compression.toUpperCase();

            // "binarystring" is preferred but the internals use "string".
            if(opts.type === "binarystring") {
                opts.type = "string";
            }

            if (!opts.type) {
                throw new Error("No output type specified.");
            }

            utils.checkSupport(opts.type);

            // accept nodejs `process.platform`
            if(
                opts.platform === "darwin" ||
                opts.platform === "freebsd" ||
                opts.platform === "linux" ||
                opts.platform === "sunos"
            ) {
                opts.platform = "UNIX";
            }
            if (opts.platform === "win32") {
                opts.platform = "DOS";
            }

            var comment = opts.comment || this.comment || "";
            worker = generate.generateWorker(this, opts, comment);
        } catch (e) {
            worker = new GenericWorker("error");
            worker.error(e);
        }
        return new StreamHelper(worker, opts.type || "string", opts.mimeType);
    },
    /**
     * Generate the complete zip file asynchronously.
     * @see generateInternalStream
     */
    generateAsync: function(options, onUpdate) {
        return this.generateInternalStream(options).accumulate(onUpdate);
    },
    /**
     * Generate the complete zip file asynchronously.
     * @see generateInternalStream
     */
    generateNodeStream: function(options, onUpdate) {
        options = options || {};
        if (!options.type) {
            options.type = "nodebuffer";
        }
        return this.generateInternalStream(options).toNodejsStream(onUpdate);
    }
};
module.exports = out;

},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(require,module,exports){
"use strict";
/*
 * This file is used by module bundlers (browserify/webpack/etc) when
 * including a stream implementation. We use "readable-stream" to get a
 * consistent behavior between nodejs versions but bundlers often have a shim
 * for "stream". Using this shim greatly improve the compatibility and greatly
 * reduce the final size of the bundle (only one stream implementation, not
 * two).
 */
module.exports = require("stream");

},{"stream":undefined}],17:[function(require,module,exports){
"use strict";
var DataReader = require("./DataReader");
var utils = require("../utils");

function ArrayReader(data) {
    DataReader.call(this, data);
    for(var i = 0; i < this.data.length; i++) {
        data[i] = data[i] & 0xFF;
    }
}
utils.inherits(ArrayReader, DataReader);
/**
 * @see DataReader.byteAt
 */
ArrayReader.prototype.byteAt = function(i) {
    return this.data[this.zero + i];
};
/**
 * @see DataReader.lastIndexOfSignature
 */
ArrayReader.prototype.lastIndexOfSignature = function(sig) {
    var sig0 = sig.charCodeAt(0),
        sig1 = sig.charCodeAt(1),
        sig2 = sig.charCodeAt(2),
        sig3 = sig.charCodeAt(3);
    for (var i = this.length - 4; i >= 0; --i) {
        if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {
            return i - this.zero;
        }
    }

    return -1;
};
/**
 * @see DataReader.readAndCheckSignature
 */
ArrayReader.prototype.readAndCheckSignature = function (sig) {
    var sig0 = sig.charCodeAt(0),
        sig1 = sig.charCodeAt(1),
        sig2 = sig.charCodeAt(2),
        sig3 = sig.charCodeAt(3),
        data = this.readData(4);
    return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];
};
/**
 * @see DataReader.readData
 */
ArrayReader.prototype.readData = function(size) {
    this.checkOffset(size);
    if(size === 0) {
        return [];
    }
    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);
    this.index += size;
    return result;
};
module.exports = ArrayReader;

},{"../utils":32,"./DataReader":18}],18:[function(require,module,exports){
"use strict";
var utils = require("../utils");

function DataReader(data) {
    this.data = data; // type : see implementation
    this.length = data.length;
    this.index = 0;
    this.zero = 0;
}
DataReader.prototype = {
    /**
     * Check that the offset will not go too far.
     * @param {string} offset the additional offset to check.
     * @throws {Error} an Error if the offset is out of bounds.
     */
    checkOffset: function(offset) {
        this.checkIndex(this.index + offset);
    },
    /**
     * Check that the specified index will not be too far.
     * @param {string} newIndex the index to check.
     * @throws {Error} an Error if the index is out of bounds.
     */
    checkIndex: function(newIndex) {
        if (this.length < this.zero + newIndex || newIndex < 0) {
            throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?");
        }
    },
    /**
     * Change the index.
     * @param {number} newIndex The new index.
     * @throws {Error} if the new index is out of the data.
     */
    setIndex: function(newIndex) {
        this.checkIndex(newIndex);
        this.index = newIndex;
    },
    /**
     * Skip the next n bytes.
     * @param {number} n the number of bytes to skip.
     * @throws {Error} if the new index is out of the data.
     */
    skip: function(n) {
        this.setIndex(this.index + n);
    },
    /**
     * Get the byte at the specified index.
     * @param {number} i the index to use.
     * @return {number} a byte.
     */
    byteAt: function() {
        // see implementations
    },
    /**
     * Get the next number with a given byte size.
     * @param {number} size the number of bytes to read.
     * @return {number} the corresponding number.
     */
    readInt: function(size) {
        var result = 0,
            i;
        this.checkOffset(size);
        for (i = this.index + size - 1; i >= this.index; i--) {
            result = (result << 8) + this.byteAt(i);
        }
        this.index += size;
        return result;
    },
    /**
     * Get the next string with a given byte size.
     * @param {number} size the number of bytes to read.
     * @return {string} the corresponding string.
     */
    readString: function(size) {
        return utils.transformTo("string", this.readData(size));
    },
    /**
     * Get raw data without conversion, <size> bytes.
     * @param {number} size the number of bytes to read.
     * @return {Object} the raw data, implementation specific.
     */
    readData: function() {
        // see implementations
    },
    /**
     * Find the last occurrence of a zip signature (4 bytes).
     * @param {string} sig the signature to find.
     * @return {number} the index of the last occurrence, -1 if not found.
     */
    lastIndexOfSignature: function() {
        // see implementations
    },
    /**
     * Read the signature (4 bytes) at the current position and compare it with sig.
     * @param {string} sig the expected signature
     * @return {boolean} true if the signature matches, false otherwise.
     */
    readAndCheckSignature: function() {
        // see implementations
    },
    /**
     * Get the next date.
     * @return {Date} the date.
     */
    readDate: function() {
        var dostime = this.readInt(4);
        return new Date(Date.UTC(
            ((dostime >> 25) & 0x7f) + 1980, // year
            ((dostime >> 21) & 0x0f) - 1, // month
            (dostime >> 16) & 0x1f, // day
            (dostime >> 11) & 0x1f, // hour
            (dostime >> 5) & 0x3f, // minute
            (dostime & 0x1f) << 1)); // second
    }
};
module.exports = DataReader;

},{"../utils":32}],19:[function(require,module,exports){
"use strict";
var Uint8ArrayReader = require("./Uint8ArrayReader");
var utils = require("../utils");

function NodeBufferReader(data) {
    Uint8ArrayReader.call(this, data);
}
utils.inherits(NodeBufferReader, Uint8ArrayReader);

/**
 * @see DataReader.readData
 */
NodeBufferReader.prototype.readData = function(size) {
    this.checkOffset(size);
    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);
    this.index += size;
    return result;
};
module.exports = NodeBufferReader;

},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(require,module,exports){
"use strict";
var DataReader = require("./DataReader");
var utils = require("../utils");

function StringReader(data) {
    DataReader.call(this, data);
}
utils.inherits(StringReader, DataReader);
/**
 * @see DataReader.byteAt
 */
StringReader.prototype.byteAt = function(i) {
    return this.data.charCodeAt(this.zero + i);
};
/**
 * @see DataReader.lastIndexOfSignature
 */
StringReader.prototype.lastIndexOfSignature = function(sig) {
    return this.data.lastIndexOf(sig) - this.zero;
};
/**
 * @see DataReader.readAndCheckSignature
 */
StringReader.prototype.readAndCheckSignature = function (sig) {
    var data = this.readData(4);
    return sig === data;
};
/**
 * @see DataReader.readData
 */
StringReader.prototype.readData = function(size) {
    this.checkOffset(size);
    // this will work because the constructor applied the "& 0xff" mask.
    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);
    this.index += size;
    return result;
};
module.exports = StringReader;

},{"../utils":32,"./DataReader":18}],21:[function(require,module,exports){
"use strict";
var ArrayReader = require("./ArrayReader");
var utils = require("../utils");

function Uint8ArrayReader(data) {
    ArrayReader.call(this, data);
}
utils.inherits(Uint8ArrayReader, ArrayReader);
/**
 * @see DataReader.readData
 */
Uint8ArrayReader.prototype.readData = function(size) {
    this.checkOffset(size);
    if(size === 0) {
        // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].
        return new Uint8Array(0);
    }
    var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);
    this.index += size;
    return result;
};
module.exports = Uint8ArrayReader;

},{"../utils":32,"./ArrayReader":17}],22:[function(require,module,exports){
"use strict";

var utils = require("../utils");
var support = require("../support");
var ArrayReader = require("./ArrayReader");
var StringReader = require("./StringReader");
var NodeBufferReader = require("./NodeBufferReader");
var Uint8ArrayReader = require("./Uint8ArrayReader");

/**
 * Create a reader adapted to the data.
 * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.
 * @return {DataReader} the data reader.
 */
module.exports = function (data) {
    var type = utils.getTypeOf(data);
    utils.checkSupport(type);
    if (type === "string" && !support.uint8array) {
        return new StringReader(data);
    }
    if (type === "nodebuffer") {
        return new NodeBufferReader(data);
    }
    if (support.uint8array) {
        return new Uint8ArrayReader(utils.transformTo("uint8array", data));
    }
    return new ArrayReader(utils.transformTo("array", data));
};

},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(require,module,exports){
"use strict";
exports.LOCAL_FILE_HEADER = "PK\x03\x04";
exports.CENTRAL_FILE_HEADER = "PK\x01\x02";
exports.CENTRAL_DIRECTORY_END = "PK\x05\x06";
exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07";
exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06";
exports.DATA_DESCRIPTOR = "PK\x07\x08";

},{}],24:[function(require,module,exports){
"use strict";

var GenericWorker = require("./GenericWorker");
var utils = require("../utils");

/**
 * A worker which convert chunks to a specified type.
 * @constructor
 * @param {String} destType the destination type.
 */
function ConvertWorker(destType) {
    GenericWorker.call(this, "ConvertWorker to " + destType);
    this.destType = destType;
}
utils.inherits(ConvertWorker, GenericWorker);

/**
 * @see GenericWorker.processChunk
 */
ConvertWorker.prototype.processChunk = function (chunk) {
    this.push({
        data : utils.transformTo(this.destType, chunk.data),
        meta : chunk.meta
    });
};
module.exports = ConvertWorker;

},{"../utils":32,"./GenericWorker":28}],25:[function(require,module,exports){
"use strict";

var GenericWorker = require("./GenericWorker");
var crc32 = require("../crc32");
var utils = require("../utils");

/**
 * A worker which calculate the crc32 of the data flowing through.
 * @constructor
 */
function Crc32Probe() {
    GenericWorker.call(this, "Crc32Probe");
    this.withStreamInfo("crc32", 0);
}
utils.inherits(Crc32Probe, GenericWorker);

/**
 * @see GenericWorker.processChunk
 */
Crc32Probe.prototype.processChunk = function (chunk) {
    this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);
    this.push(chunk);
};
module.exports = Crc32Probe;

},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(require,module,exports){
"use strict";

var utils = require("../utils");
var GenericWorker = require("./GenericWorker");

/**
 * A worker which calculate the total length of the data flowing through.
 * @constructor
 * @param {String} propName the name used to expose the length
 */
function DataLengthProbe(propName) {
    GenericWorker.call(this, "DataLengthProbe for " + propName);
    this.propName = propName;
    this.withStreamInfo(propName, 0);
}
utils.inherits(DataLengthProbe, GenericWorker);

/**
 * @see GenericWorker.processChunk
 */
DataLengthProbe.prototype.processChunk = function (chunk) {
    if(chunk) {
        var length = this.streamInfo[this.propName] || 0;
        this.streamInfo[this.propName] = length + chunk.data.length;
    }
    GenericWorker.prototype.processChunk.call(this, chunk);
};
module.exports = DataLengthProbe;


},{"../utils":32,"./GenericWorker":28}],27:[function(require,module,exports){
"use strict";

var utils = require("../utils");
var GenericWorker = require("./GenericWorker");

// the size of the generated chunks
// TODO expose this as a public variable
var DEFAULT_BLOCK_SIZE = 16 * 1024;

/**
 * A worker that reads a content and emits chunks.
 * @constructor
 * @param {Promise} dataP the promise of the data to split
 */
function DataWorker(dataP) {
    GenericWorker.call(this, "DataWorker");
    var self = this;
    this.dataIsReady = false;
    this.index = 0;
    this.max = 0;
    this.data = null;
    this.type = "";

    this._tickScheduled = false;

    dataP.then(function (data) {
        self.dataIsReady = true;
        self.data = data;
        self.max = data && data.length || 0;
        self.type = utils.getTypeOf(data);
        if(!self.isPaused) {
            self._tickAndRepeat();
        }
    }, function (e) {
        self.error(e);
    });
}

utils.inherits(DataWorker, GenericWorker);

/**
 * @see GenericWorker.cleanUp
 */
DataWorker.prototype.cleanUp = function () {
    GenericWorker.prototype.cleanUp.call(this);
    this.data = null;
};

/**
 * @see GenericWorker.resume
 */
DataWorker.prototype.resume = function () {
    if(!GenericWorker.prototype.resume.call(this)) {
        return false;
    }

    if (!this._tickScheduled && this.dataIsReady) {
        this._tickScheduled = true;
        utils.delay(this._tickAndRepeat, [], this);
    }
    return true;
};

/**
 * Trigger a tick a schedule an other call to this function.
 */
DataWorker.prototype._tickAndRepeat = function() {
    this._tickScheduled = false;
    if(this.isPaused || this.isFinished) {
        return;
    }
    this._tick();
    if(!this.isFinished) {
        utils.delay(this._tickAndRepeat, [], this);
        this._tickScheduled = true;
    }
};

/**
 * Read and push a chunk.
 */
DataWorker.prototype._tick = function() {

    if(this.isPaused || this.isFinished) {
        return false;
    }

    var size = DEFAULT_BLOCK_SIZE;
    var data = null, nextIndex = Math.min(this.max, this.index + size);
    if (this.index >= this.max) {
        // EOF
        return this.end();
    } else {
        switch(this.type) {
        case "string":
            data = this.data.substring(this.index, nextIndex);
            break;
        case "uint8array":
            data = this.data.subarray(this.index, nextIndex);
            break;
        case "array":
        case "nodebuffer":
            data = this.data.slice(this.index, nextIndex);
            break;
        }
        this.index = nextIndex;
        return this.push({
            data : data,
            meta : {
                percent : this.max ? this.index / this.max * 100 : 0
            }
        });
    }
};

module.exports = DataWorker;

},{"../utils":32,"./GenericWorker":28}],28:[function(require,module,exports){
"use strict";

/**
 * A worker that does nothing but passing chunks to the next one. This is like
 * a nodejs stream but with some differences. On the good side :
 * - it works on IE 6-9 without any issue / polyfill
 * - it weights less than the full dependencies bundled with browserify
 * - it forwards errors (no need to declare an error handler EVERYWHERE)
 *
 * A chunk is an object with 2 attributes : `meta` and `data`. The former is an
 * object containing anything (`percent` for example), see each worker for more
 * details. The latter is the real data (String, Uint8Array, etc).
 *
 * @constructor
 * @param {String} name the name of the stream (mainly used for debugging purposes)
 */
function GenericWorker(name) {
    // the name of the worker
    this.name = name || "default";
    // an object containing metadata about the workers chain
    this.streamInfo = {};
    // an error which happened when the worker was paused
    this.generatedError = null;
    // an object containing metadata to be merged by this worker into the general metadata
    this.extraStreamInfo = {};
    // true if the stream is paused (and should not do anything), false otherwise
    this.isPaused = true;
    // true if the stream is finished (and should not do anything), false otherwise
    this.isFinished = false;
    // true if the stream is locked to prevent further structure updates (pipe), false otherwise
    this.isLocked = false;
    // the event listeners
    this._listeners = {
        "data":[],
        "end":[],
        "error":[]
    };
    // the previous worker, if any
    this.previous = null;
}

GenericWorker.prototype = {
    /**
     * Push a chunk to the next workers.
     * @param {Object} chunk the chunk to push
     */
    push : function (chunk) {
        this.emit("data", chunk);
    },
    /**
     * End the stream.
     * @return {Boolean} true if this call ended the worker, false otherwise.
     */
    end : function () {
        if (this.isFinished) {
            return false;
        }

        this.flush();
        try {
            this.emit("end");
            this.cleanUp();
            this.isFinished = true;
        } catch (e) {
            this.emit("error", e);
        }
        return true;
    },
    /**
     * End the stream with an error.
     * @param {Error} e the error which caused the premature end.
     * @return {Boolean} true if this call ended the worker with an error, false otherwise.
     */
    error : function (e) {
        if (this.isFinished) {
            return false;
        }

        if(this.isPaused) {
            this.generatedError = e;
        } else {
            this.isFinished = true;

            this.emit("error", e);

            // in the workers chain exploded in the middle of the chain,
            // the error event will go downward but we also need to notify
            // workers upward that there has been an error.
            if(this.previous) {
                this.previous.error(e);
            }

            this.cleanUp();
        }
        return true;
    },
    /**
     * Add a callback on an event.
     * @param {String} name the name of the event (data, end, error)
     * @param {Function} listener the function to call when the event is triggered
     * @return {GenericWorker} the current object for chainability
     */
    on : function (name, listener) {
        this._listeners[name].push(listener);
        return this;
    },
    /**
     * Clean any references when a worker is ending.
     */
    cleanUp : function () {
        this.streamInfo = this.generatedError = this.extraStreamInfo = null;
        this._listeners = [];
    },
    /**
     * Trigger an event. This will call registered callback with the provided arg.
     * @param {String} name the name of the event (data, end, error)
     * @param {Object} arg the argument to call the callback with.
     */
    emit : function (name, arg) {
        if (this._listeners[name]) {
            for(var i = 0; i < this._listeners[name].length; i++) {
                this._listeners[name][i].call(this, arg);
            }
        }
    },
    /**
     * Chain a worker with an other.
     * @param {Worker} next the worker receiving events from the current one.
     * @return {worker} the next worker for chainability
     */
    pipe : function (next) {
        return next.registerPrevious(this);
    },
    /**
     * Same as `pipe` in the other direction.
     * Using an API with `pipe(next)` is very easy.
     * Implementing the API with the point of view of the next one registering
     * a source is easier, see the ZipFileWorker.
     * @param {Worker} previous the previous worker, sending events to this one
     * @return {Worker} the current worker for chainability
     */
    registerPrevious : function (previous) {
        if (this.isLocked) {
            throw new Error("The stream '" + this + "' has already been used.");
        }

        // sharing the streamInfo...
        this.streamInfo = previous.streamInfo;
        // ... and adding our own bits
        this.mergeStreamInfo();
        this.previous =  previous;
        var self = this;
        previous.on("data", function (chunk) {
            self.processChunk(chunk);
        });
        previous.on("end", function () {
            self.end();
        });
        previous.on("error", function (e) {
            self.error(e);
        });
        return this;
    },
    /**
     * Pause the stream so it doesn't send events anymore.
     * @return {Boolean} true if this call paused the worker, false otherwise.
     */
    pause : function () {
        if(this.isPaused || this.isFinished) {
            return false;
        }
        this.isPaused = true;

        if(this.previous) {
            this.previous.pause();
        }
        return true;
    },
    /**
     * Resume a paused stream.
     * @return {Boolean} true if this call resumed the worker, false otherwise.
     */
    resume : function () {
        if(!this.isPaused || this.isFinished) {
            return false;
        }
        this.isPaused = false;

        // if true, the worker tried to resume but failed
        var withError = false;
        if(this.generatedError) {
            this.error(this.generatedError);
            withError = true;
        }
        if(this.previous) {
            this.previous.resume();
        }

        return !withError;
    },
    /**
     * Flush any remaining bytes as the stream is ending.
     */
    flush : function () {},
    /**
     * Process a chunk. This is usually the method overridden.
     * @param {Object} chunk the chunk to process.
     */
    processChunk : function(chunk) {
        this.push(chunk);
    },
    /**
     * Add a key/value to be added in the workers chain streamInfo once activated.
     * @param {String} key the key to use
     * @param {Object} value the associated value
     * @return {Worker} the current worker for chainability
     */
    withStreamInfo : function (key, value) {
        this.extraStreamInfo[key] = value;
        this.mergeStreamInfo();
        return this;
    },
    /**
     * Merge this worker's streamInfo into the chain's streamInfo.
     */
    mergeStreamInfo : function () {
        for(var key in this.extraStreamInfo) {
            if (!Object.prototype.hasOwnProperty.call(this.extraStreamInfo, key)) {
                continue;
            }
            this.streamInfo[key] = this.extraStreamInfo[key];
        }
    },

    /**
     * Lock the stream to prevent further updates on the workers chain.
     * After calling this method, all calls to pipe will fail.
     */
    lock: function () {
        if (this.isLocked) {
            throw new Error("The stream '" + this + "' has already been used.");
        }
        this.isLocked = true;
        if (this.previous) {
            this.previous.lock();
        }
    },

    /**
     *
     * Pretty print the workers chain.
     */
    toString : function () {
        var me = "Worker " + this.name;
        if (this.previous) {
            return this.previous + " -> " + me;
        } else {
            return me;
        }
    }
};

module.exports = GenericWorker;

},{}],29:[function(require,module,exports){
"use strict";

var utils = require("../utils");
var ConvertWorker = require("./ConvertWorker");
var GenericWorker = require("./GenericWorker");
var base64 = require("../base64");
var support = require("../support");
var external = require("../external");

var NodejsStreamOutputAdapter = null;
if (support.nodestream) {
    try {
        NodejsStreamOutputAdapter = require("../nodejs/NodejsStreamOutputAdapter");
    } catch(e) {
        // ignore
    }
}

/**
 * Apply the final transformation of the data. If the user wants a Blob for
 * example, it's easier to work with an U8intArray and finally do the
 * ArrayBuffer/Blob conversion.
 * @param {String} type the name of the final type
 * @param {String|Uint8Array|Buffer} content the content to transform
 * @param {String} mimeType the mime type of the content, if applicable.
 * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.
 */
function transformZipOutput(type, content, mimeType) {
    switch(type) {
    case "blob" :
        return utils.newBlob(utils.transformTo("arraybuffer", content), mimeType);
    case "base64" :
        return base64.encode(content);
    default :
        return utils.transformTo(type, content);
    }
}

/**
 * Concatenate an array of data of the given type.
 * @param {String} type the type of the data in the given array.
 * @param {Array} dataArray the array containing the data chunks to concatenate
 * @return {String|Uint8Array|Buffer} the concatenated data
 * @throws Error if the asked type is unsupported
 */
function concat (type, dataArray) {
    var i, index = 0, res = null, totalLength = 0;
    for(i = 0; i < dataArray.length; i++) {
        totalLength += dataArray[i].length;
    }
    switch(type) {
    case "string":
        return dataArray.join("");
    case "array":
        return Array.prototype.concat.apply([], dataArray);
    case "uint8array":
        res = new Uint8Array(totalLength);
        for(i = 0; i < dataArray.length; i++) {
            res.set(dataArray[i], index);
            index += dataArray[i].length;
        }
        return res;
    case "nodebuffer":
        return Buffer.concat(dataArray);
    default:
        throw new Error("concat : unsupported type '"  + type + "'");
    }
}

/**
 * Listen a StreamHelper, accumulate its content and concatenate it into a
 * complete block.
 * @param {StreamHelper} helper the helper to use.
 * @param {Function} updateCallback a callback called on each update. Called
 * with one arg :
 * - the metadata linked to the update received.
 * @return Promise the promise for the accumulation.
 */
function accumulate(helper, updateCallback) {
    return new external.Promise(function (resolve, reject){
        var dataArray = [];
        var chunkType = helper._internalType,
            resultType = helper._outputType,
            mimeType = helper._mimeType;
        helper
            .on("data", function (data, meta) {
                dataArray.push(data);
                if(updateCallback) {
                    updateCallback(meta);
                }
            })
            .on("error", function(err) {
                dataArray = [];
                reject(err);
            })
            .on("end", function (){
                try {
                    var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);
                    resolve(result);
                } catch (e) {
                    reject(e);
                }
                dataArray = [];
            })
            .resume();
    });
}

/**
 * An helper to easily use workers outside of JSZip.
 * @constructor
 * @param {Worker} worker the worker to wrap
 * @param {String} outputType the type of data expected by the use
 * @param {String} mimeType the mime type of the content, if applicable.
 */
function StreamHelper(worker, outputType, mimeType) {
    var internalType = outputType;
    switch(outputType) {
    case "blob":
    case "arraybuffer":
        internalType = "uint8array";
        break;
    case "base64":
        internalType = "string";
        break;
    }

    try {
        // the type used internally
        this._internalType = internalType;
        // the type used to output results
        this._outputType = outputType;
        // the mime type
        this._mimeType = mimeType;
        utils.checkSupport(internalType);
        this._worker = worker.pipe(new ConvertWorker(internalType));
        // the last workers can be rewired without issues but we need to
        // prevent any updates on previous workers.
        worker.lock();
    } catch(e) {
        this._worker = new GenericWorker("error");
        this._worker.error(e);
    }
}

StreamHelper.prototype = {
    /**
     * Listen a StreamHelper, accumulate its content and concatenate it into a
     * complete block.
     * @param {Function} updateCb the update callback.
     * @return Promise the promise for the accumulation.
     */
    accumulate : function (updateCb) {
        return accumulate(this, updateCb);
    },
    /**
     * Add a listener on an event triggered on a stream.
     * @param {String} evt the name of the event
     * @param {Function} fn the listener
     * @return {StreamHelper} the current helper.
     */
    on : function (evt, fn) {
        var self = this;

        if(evt === "data") {
            this._worker.on(evt, function (chunk) {
                fn.call(self, chunk.data, chunk.meta);
            });
        } else {
            this._worker.on(evt, function () {
                utils.delay(fn, arguments, self);
            });
        }
        return this;
    },
    /**
     * Resume the flow of chunks.
     * @return {StreamHelper} the current helper.
     */
    resume : function () {
        utils.delay(this._worker.resume, [], this._worker);
        return this;
    },
    /**
     * Pause the flow of chunks.
     * @return {StreamHelper} the current helper.
     */
    pause : function () {
        this._worker.pause();
        return this;
    },
    /**
     * Return a nodejs stream for this helper.
     * @param {Function} updateCb the update callback.
     * @return {NodejsStreamOutputAdapter} the nodejs stream.
     */
    toNodejsStream : function (updateCb) {
        utils.checkSupport("nodestream");
        if (this._outputType !== "nodebuffer") {
            // an object stream containing blob/arraybuffer/uint8array/string
            // is strange and I don't know if it would be useful.
            // I you find this comment and have a good usecase, please open a
            // bug report !
            throw new Error(this._outputType + " is not supported by this method");
        }

        return new NodejsStreamOutputAdapter(this, {
            objectMode : this._outputType !== "nodebuffer"
        }, updateCb);
    }
};


module.exports = StreamHelper;

},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(require,module,exports){
"use strict";

exports.base64 = true;
exports.array = true;
exports.string = true;
exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";
exports.nodebuffer = typeof Buffer !== "undefined";
// contains true if JSZip can read/generate Uint8Array, false otherwise.
exports.uint8array = typeof Uint8Array !== "undefined";

if (typeof ArrayBuffer === "undefined") {
    exports.blob = false;
}
else {
    var buffer = new ArrayBuffer(0);
    try {
        exports.blob = new Blob([buffer], {
            type: "application/zip"
        }).size === 0;
    }
    catch (e) {
        try {
            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
            var builder = new Builder();
            builder.append(buffer);
            exports.blob = builder.getBlob("application/zip").size === 0;
        }
        catch (e) {
            exports.blob = false;
        }
    }
}

try {
    exports.nodestream = !!require("readable-stream").Readable;
} catch(e) {
    exports.nodestream = false;
}

},{"readable-stream":16}],31:[function(require,module,exports){
"use strict";

var utils = require("./utils");
var support = require("./support");
var nodejsUtils = require("./nodejsUtils");
var GenericWorker = require("./stream/GenericWorker");

/**
 * The following functions come from pako, from pako/lib/utils/strings
 * released under the MIT license, see pako https://github.com/nodeca/pako/
 */

// Table with utf8 lengths (calculated by first byte of sequence)
// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
// because max possible codepoint is 0x10ffff
var _utf8len = new Array(256);
for (var i=0; i<256; i++) {
    _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);
}
_utf8len[254]=_utf8len[254]=1; // Invalid sequence start

// convert string to array (typed, when possible)
var string2buf = function (str) {
    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;

    // count binary size
    for (m_pos = 0; m_pos < str_len; m_pos++) {
        c = str.charCodeAt(m_pos);
        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
            c2 = str.charCodeAt(m_pos+1);
            if ((c2 & 0xfc00) === 0xdc00) {
                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
                m_pos++;
            }
        }
        buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
    }

    // allocate buffer
    if (support.uint8array) {
        buf = new Uint8Array(buf_len);
    } else {
        buf = new Array(buf_len);
    }

    // convert
    for (i=0, m_pos = 0; i < buf_len; m_pos++) {
        c = str.charCodeAt(m_pos);
        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
            c2 = str.charCodeAt(m_pos+1);
            if ((c2 & 0xfc00) === 0xdc00) {
                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
                m_pos++;
            }
        }
        if (c < 0x80) {
            /* one byte */
            buf[i++] = c;
        } else if (c < 0x800) {
            /* two bytes */
            buf[i++] = 0xC0 | (c >>> 6);
            buf[i++] = 0x80 | (c & 0x3f);
        } else if (c < 0x10000) {
            /* three bytes */
            buf[i++] = 0xE0 | (c >>> 12);
            buf[i++] = 0x80 | (c >>> 6 & 0x3f);
            buf[i++] = 0x80 | (c & 0x3f);
        } else {
            /* four bytes */
            buf[i++] = 0xf0 | (c >>> 18);
            buf[i++] = 0x80 | (c >>> 12 & 0x3f);
            buf[i++] = 0x80 | (c >>> 6 & 0x3f);
            buf[i++] = 0x80 | (c & 0x3f);
        }
    }

    return buf;
};

// Calculate max possible position in utf8 buffer,
// that will not break sequence. If that's not possible
// - (very small limits) return max size as is.
//
// buf[] - utf8 bytes array
// max   - length limit (mandatory);
var utf8border = function(buf, max) {
    var pos;

    max = max || buf.length;
    if (max > buf.length) { max = buf.length; }

    // go back from last position, until start of sequence found
    pos = max-1;
    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }

    // Fuckup - very small and broken sequence,
    // return max, because we should return something anyway.
    if (pos < 0) { return max; }

    // If we came to start of buffer - that means vuffer is too small,
    // return max too.
    if (pos === 0) { return max; }

    return (pos + _utf8len[buf[pos]] > max) ? pos : max;
};

// convert array to string
var buf2string = function (buf) {
    var i, out, c, c_len;
    var len = buf.length;

    // Reserve max possible length (2 words per char)
    // NB: by unknown reasons, Array is significantly faster for
    //     String.fromCharCode.apply than Uint16Array.
    var utf16buf = new Array(len*2);

    for (out=0, i=0; i<len;) {
        c = buf[i++];
        // quick process ascii
        if (c < 0x80) { utf16buf[out++] = c; continue; }

        c_len = _utf8len[c];
        // skip 5 & 6 byte codes
        if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }

        // apply mask on first byte
        c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
        // join the rest
        while (c_len > 1 && i < len) {
            c = (c << 6) | (buf[i++] & 0x3f);
            c_len--;
        }

        // terminated by end of string?
        if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }

        if (c < 0x10000) {
            utf16buf[out++] = c;
        } else {
            c -= 0x10000;
            utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
            utf16buf[out++] = 0xdc00 | (c & 0x3ff);
        }
    }

    // shrinkBuf(utf16buf, out)
    if (utf16buf.length !== out) {
        if(utf16buf.subarray) {
            utf16buf = utf16buf.subarray(0, out);
        } else {
            utf16buf.length = out;
        }
    }

    // return String.fromCharCode.apply(null, utf16buf);
    return utils.applyFromCharCode(utf16buf);
};


// That's all for the pako functions.


/**
 * Transform a javascript string into an array (typed if possible) of bytes,
 * UTF-8 encoded.
 * @param {String} str the string to encode
 * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.
 */
exports.utf8encode = function utf8encode(str) {
    if (support.nodebuffer) {
        return nodejsUtils.newBufferFrom(str, "utf-8");
    }

    return string2buf(str);
};


/**
 * Transform a bytes array (or a representation) representing an UTF-8 encoded
 * string into a javascript string.
 * @param {Array|Uint8Array|Buffer} buf the data de decode
 * @return {String} the decoded string.
 */
exports.utf8decode = function utf8decode(buf) {
    if (support.nodebuffer) {
        return utils.transformTo("nodebuffer", buf).toString("utf-8");
    }

    buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf);

    return buf2string(buf);
};

/**
 * A worker to decode utf8 encoded binary chunks into string chunks.
 * @constructor
 */
function Utf8DecodeWorker() {
    GenericWorker.call(this, "utf-8 decode");
    // the last bytes if a chunk didn't end with a complete codepoint.
    this.leftOver = null;
}
utils.inherits(Utf8DecodeWorker, GenericWorker);

/**
 * @see GenericWorker.processChunk
 */
Utf8DecodeWorker.prototype.processChunk = function (chunk) {

    var data = utils.transformTo(support.uint8array ? "uint8array" : "array", chunk.data);

    // 1st step, re-use what's left of the previous chunk
    if (this.leftOver && this.leftOver.length) {
        if(support.uint8array) {
            var previousData = data;
            data = new Uint8Array(previousData.length + this.leftOver.length);
            data.set(this.leftOver, 0);
            data.set(previousData, this.leftOver.length);
        } else {
            data = this.leftOver.concat(data);
        }
        this.leftOver = null;
    }

    var nextBoundary = utf8border(data);
    var usableData = data;
    if (nextBoundary !== data.length) {
        if (support.uint8array) {
            usableData = data.subarray(0, nextBoundary);
            this.leftOver = data.subarray(nextBoundary, data.length);
        } else {
            usableData = data.slice(0, nextBoundary);
            this.leftOver = data.slice(nextBoundary, data.length);
        }
    }

    this.push({
        data : exports.utf8decode(usableData),
        meta : chunk.meta
    });
};

/**
 * @see GenericWorker.flush
 */
Utf8DecodeWorker.prototype.flush = function () {
    if(this.leftOver && this.leftOver.length) {
        this.push({
            data : exports.utf8decode(this.leftOver),
            meta : {}
        });
        this.leftOver = null;
    }
};
exports.Utf8DecodeWorker = Utf8DecodeWorker;

/**
 * A worker to endcode string chunks into utf8 encoded binary chunks.
 * @constructor
 */
function Utf8EncodeWorker() {
    GenericWorker.call(this, "utf-8 encode");
}
utils.inherits(Utf8EncodeWorker, GenericWorker);

/**
 * @see GenericWorker.processChunk
 */
Utf8EncodeWorker.prototype.processChunk = function (chunk) {
    this.push({
        data : exports.utf8encode(chunk.data),
        meta : chunk.meta
    });
};
exports.Utf8EncodeWorker = Utf8EncodeWorker;

},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(require,module,exports){
"use strict";

var support = require("./support");
var base64 = require("./base64");
var nodejsUtils = require("./nodejsUtils");
var external = require("./external");
require("setimmediate");


/**
 * Convert a string that pass as a "binary string": it should represent a byte
 * array but may have > 255 char codes. Be sure to take only the first byte
 * and returns the byte array.
 * @param {String} str the string to transform.
 * @return {Array|Uint8Array} the string in a binary format.
 */
function string2binary(str) {
    var result = null;
    if (support.uint8array) {
        result = new Uint8Array(str.length);
    } else {
        result = new Array(str.length);
    }
    return stringToArrayLike(str, result);
}

/**
 * Create a new blob with the given content and the given type.
 * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use
 * an Uint8Array because the stock browser of android 4 won't accept it (it
 * will be silently converted to a string, "[object Uint8Array]").
 *
 * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge:
 * when a large amount of Array is used to create the Blob, the amount of
 * memory consumed is nearly 100 times the original data amount.
 *
 * @param {String} type the mime type of the blob.
 * @return {Blob} the created blob.
 */
exports.newBlob = function(part, type) {
    exports.checkSupport("blob");

    try {
        // Blob constructor
        return new Blob([part], {
            type: type
        });
    }
    catch (e) {

        try {
            // deprecated, browser only, old way
            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
            var builder = new Builder();
            builder.append(part);
            return builder.getBlob(type);
        }
        catch (e) {

            // well, fuck ?!
            throw new Error("Bug : can't construct the Blob.");
        }
    }


};
/**
 * The identity function.
 * @param {Object} input the input.
 * @return {Object} the same input.
 */
function identity(input) {
    return input;
}

/**
 * Fill in an array with a string.
 * @param {String} str the string to use.
 * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).
 * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.
 */
function stringToArrayLike(str, array) {
    for (var i = 0; i < str.length; ++i) {
        array[i] = str.charCodeAt(i) & 0xFF;
    }
    return array;
}

/**
 * An helper for the function arrayLikeToString.
 * This contains static information and functions that
 * can be optimized by the browser JIT compiler.
 */
var arrayToStringHelper = {
    /**
     * Transform an array of int into a string, chunk by chunk.
     * See the performances notes on arrayLikeToString.
     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
     * @param {String} type the type of the array.
     * @param {Integer} chunk the chunk size.
     * @return {String} the resulting string.
     * @throws Error if the chunk is too big for the stack.
     */
    stringifyByChunk: function(array, type, chunk) {
        var result = [], k = 0, len = array.length;
        // shortcut
        if (len <= chunk) {
            return String.fromCharCode.apply(null, array);
        }
        while (k < len) {
            if (type === "array" || type === "nodebuffer") {
                result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));
            }
            else {
                result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));
            }
            k += chunk;
        }
        return result.join("");
    },
    /**
     * Call String.fromCharCode on every item in the array.
     * This is the naive implementation, which generate A LOT of intermediate string.
     * This should be used when everything else fail.
     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
     * @return {String} the result.
     */
    stringifyByChar: function(array){
        var resultStr = "";
        for(var i = 0; i < array.length; i++) {
            resultStr += String.fromCharCode(array[i]);
        }
        return resultStr;
    },
    applyCanBeUsed : {
        /**
         * true if the browser accepts to use String.fromCharCode on Uint8Array
         */
        uint8array : (function () {
            try {
                return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
            } catch (e) {
                return false;
            }
        })(),
        /**
         * true if the browser accepts to use String.fromCharCode on nodejs Buffer.
         */
        nodebuffer : (function () {
            try {
                return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1;
            } catch (e) {
                return false;
            }
        })()
    }
};

/**
 * Transform an array-like object to a string.
 * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
 * @return {String} the result.
 */
function arrayLikeToString(array) {
    // Performances notes :
    // --------------------
    // String.fromCharCode.apply(null, array) is the fastest, see
    // see http://jsperf.com/converting-a-uint8array-to-a-string/2
    // but the stack is limited (and we can get huge arrays !).
    //
    // result += String.fromCharCode(array[i]); generate too many strings !
    //
    // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2
    // TODO : we now have workers that split the work. Do we still need that ?
    var chunk = 65536,
        type = exports.getTypeOf(array),
        canUseApply = true;
    if (type === "uint8array") {
        canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;
    } else if (type === "nodebuffer") {
        canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;
    }

    if (canUseApply) {
        while (chunk > 1) {
            try {
                return arrayToStringHelper.stringifyByChunk(array, type, chunk);
            } catch (e) {
                chunk = Math.floor(chunk / 2);
            }
        }
    }

    // no apply or chunk error : slow and painful algorithm
    // default browser on android 4.*
    return arrayToStringHelper.stringifyByChar(array);
}

exports.applyFromCharCode = arrayLikeToString;


/**
 * Copy the data from an array-like to an other array-like.
 * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.
 * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.
 * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.
 */
function arrayLikeToArrayLike(arrayFrom, arrayTo) {
    for (var i = 0; i < arrayFrom.length; i++) {
        arrayTo[i] = arrayFrom[i];
    }
    return arrayTo;
}

// a matrix containing functions to transform everything into everything.
var transform = {};

// string to ?
transform["string"] = {
    "string": identity,
    "array": function(input) {
        return stringToArrayLike(input, new Array(input.length));
    },
    "arraybuffer": function(input) {
        return transform["string"]["uint8array"](input).buffer;
    },
    "uint8array": function(input) {
        return stringToArrayLike(input, new Uint8Array(input.length));
    },
    "nodebuffer": function(input) {
        return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length));
    }
};

// array to ?
transform["array"] = {
    "string": arrayLikeToString,
    "array": identity,
    "arraybuffer": function(input) {
        return (new Uint8Array(input)).buffer;
    },
    "uint8array": function(input) {
        return new Uint8Array(input);
    },
    "nodebuffer": function(input) {
        return nodejsUtils.newBufferFrom(input);
    }
};

// arraybuffer to ?
transform["arraybuffer"] = {
    "string": function(input) {
        return arrayLikeToString(new Uint8Array(input));
    },
    "array": function(input) {
        return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));
    },
    "arraybuffer": identity,
    "uint8array": function(input) {
        return new Uint8Array(input);
    },
    "nodebuffer": function(input) {
        return nodejsUtils.newBufferFrom(new Uint8Array(input));
    }
};

// uint8array to ?
transform["uint8array"] = {
    "string": arrayLikeToString,
    "array": function(input) {
        return arrayLikeToArrayLike(input, new Array(input.length));
    },
    "arraybuffer": function(input) {
        return input.buffer;
    },
    "uint8array": identity,
    "nodebuffer": function(input) {
        return nodejsUtils.newBufferFrom(input);
    }
};

// nodebuffer to ?
transform["nodebuffer"] = {
    "string": arrayLikeToString,
    "array": function(input) {
        return arrayLikeToArrayLike(input, new Array(input.length));
    },
    "arraybuffer": function(input) {
        return transform["nodebuffer"]["uint8array"](input).buffer;
    },
    "uint8array": function(input) {
        return arrayLikeToArrayLike(input, new Uint8Array(input.length));
    },
    "nodebuffer": identity
};

/**
 * Transform an input into any type.
 * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.
 * If no output type is specified, the unmodified input will be returned.
 * @param {String} outputType the output type.
 * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.
 * @throws {Error} an Error if the browser doesn't support the requested output type.
 */
exports.transformTo = function(outputType, input) {
    if (!input) {
        // undefined, null, etc
        // an empty string won't harm.
        input = "";
    }
    if (!outputType) {
        return input;
    }
    exports.checkSupport(outputType);
    var inputType = exports.getTypeOf(input);
    var result = transform[inputType][outputType](input);
    return result;
};

/**
 * Resolve all relative path components, "." and "..", in a path. If these relative components
 * traverse above the root then the resulting path will only contain the final path component.
 *
 * All empty components, e.g. "//", are removed.
 * @param {string} path A path with / or \ separators
 * @returns {string} The path with all relative path components resolved.
 */
exports.resolve = function(path) {
    var parts = path.split("/");
    var result = [];
    for (var index = 0; index < parts.length; index++) {
        var part = parts[index];
        // Allow the first and last component to be empty for trailing slashes.
        if (part === "." || (part === "" && index !== 0 && index !== parts.length - 1)) {
            continue;
        } else if (part === "..") {
            result.pop();
        } else {
            result.push(part);
        }
    }
    return result.join("/");
};

/**
 * Return the type of the input.
 * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.
 * @param {Object} input the input to identify.
 * @return {String} the (lowercase) type of the input.
 */
exports.getTypeOf = function(input) {
    if (typeof input === "string") {
        return "string";
    }
    if (Object.prototype.toString.call(input) === "[object Array]") {
        return "array";
    }
    if (support.nodebuffer && nodejsUtils.isBuffer(input)) {
        return "nodebuffer";
    }
    if (support.uint8array && input instanceof Uint8Array) {
        return "uint8array";
    }
    if (support.arraybuffer && input instanceof ArrayBuffer) {
        return "arraybuffer";
    }
};

/**
 * Throw an exception if the type is not supported.
 * @param {String} type the type to check.
 * @throws {Error} an Error if the browser doesn't support the requested type.
 */
exports.checkSupport = function(type) {
    var supported = support[type.toLowerCase()];
    if (!supported) {
        throw new Error(type + " is not supported by this platform");
    }
};

exports.MAX_VALUE_16BITS = 65535;
exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1

/**
 * Prettify a string read as binary.
 * @param {string} str the string to prettify.
 * @return {string} a pretty string.
 */
exports.pretty = function(str) {
    var res = "",
        code, i;
    for (i = 0; i < (str || "").length; i++) {
        code = str.charCodeAt(i);
        res += "\\x" + (code < 16 ? "0" : "") + code.toString(16).toUpperCase();
    }
    return res;
};

/**
 * Defer the call of a function.
 * @param {Function} callback the function to call asynchronously.
 * @param {Array} args the arguments to give to the callback.
 */
exports.delay = function(callback, args, self) {
    setImmediate(function () {
        callback.apply(self || null, args || []);
    });
};

/**
 * Extends a prototype with an other, without calling a constructor with
 * side effects. Inspired by nodejs' `utils.inherits`
 * @param {Function} ctor the constructor to augment
 * @param {Function} superCtor the parent constructor to use
 */
exports.inherits = function (ctor, superCtor) {
    var Obj = function() {};
    Obj.prototype = superCtor.prototype;
    ctor.prototype = new Obj();
};

/**
 * Merge the objects passed as parameters into a new one.
 * @private
 * @param {...Object} var_args All objects to merge.
 * @return {Object} a new object with the data of the others.
 */
exports.extend = function() {
    var result = {}, i, attr;
    for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers
        for (attr in arguments[i]) {
            if (Object.prototype.hasOwnProperty.call(arguments[i], attr) && typeof result[attr] === "undefined") {
                result[attr] = arguments[i][attr];
            }
        }
    }
    return result;
};

/**
 * Transform arbitrary content into a Promise.
 * @param {String} name a name for the content being processed.
 * @param {Object} inputData the content to process.
 * @param {Boolean} isBinary true if the content is not an unicode string
 * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.
 * @param {Boolean} isBase64 true if the string content is encoded with base64.
 * @return {Promise} a promise in a format usable by JSZip.
 */
exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {

    // if inputData is already a promise, this flatten it.
    var promise = external.Promise.resolve(inputData).then(function(data) {


        var isBlob = support.blob && (data instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(data)) !== -1);

        if (isBlob && typeof FileReader !== "undefined") {
            return new external.Promise(function (resolve, reject) {
                var reader = new FileReader();

                reader.onload = function(e) {
                    resolve(e.target.result);
                };
                reader.onerror = function(e) {
                    reject(e.target.error);
                };
                reader.readAsArrayBuffer(data);
            });
        } else {
            return data;
        }
    });

    return promise.then(function(data) {
        var dataType = exports.getTypeOf(data);

        if (!dataType) {
            return external.Promise.reject(
                new Error("Can't read the data of '" + name + "'. Is it " +
                          "in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?")
            );
        }
        // special case : it's way easier to work with Uint8Array than with ArrayBuffer
        if (dataType === "arraybuffer") {
            data = exports.transformTo("uint8array", data);
        } else if (dataType === "string") {
            if (isBase64) {
                data = base64.decode(data);
            }
            else if (isBinary) {
                // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask
                if (isOptimizedBinaryString !== true) {
                    // this is a string, not in a base64 format.
                    // Be sure that this is a correct "binary string"
                    data = string2binary(data);
                }
            }
        }
        return data;
    });
};

},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"setimmediate":54}],33:[function(require,module,exports){
"use strict";
var readerFor = require("./reader/readerFor");
var utils = require("./utils");
var sig = require("./signature");
var ZipEntry = require("./zipEntry");
var support = require("./support");
//  class ZipEntries {{{
/**
 * All the entries in the zip file.
 * @constructor
 * @param {Object} loadOptions Options for loading the stream.
 */
function ZipEntries(loadOptions) {
    this.files = [];
    this.loadOptions = loadOptions;
}
ZipEntries.prototype = {
    /**
     * Check that the reader is on the specified signature.
     * @param {string} expectedSignature the expected signature.
     * @throws {Error} if it is an other signature.
     */
    checkSignature: function(expectedSignature) {
        if (!this.reader.readAndCheckSignature(expectedSignature)) {
            this.reader.index -= 4;
            var signature = this.reader.readString(4);
            throw new Error("Corrupted zip or bug: unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")");
        }
    },
    /**
     * Check if the given signature is at the given index.
     * @param {number} askedIndex the index to check.
     * @param {string} expectedSignature the signature to expect.
     * @return {boolean} true if the signature is here, false otherwise.
     */
    isSignature: function(askedIndex, expectedSignature) {
        var currentIndex = this.reader.index;
        this.reader.setIndex(askedIndex);
        var signature = this.reader.readString(4);
        var result = signature === expectedSignature;
        this.reader.setIndex(currentIndex);
        return result;
    },
    /**
     * Read the end of the central directory.
     */
    readBlockEndOfCentral: function() {
        this.diskNumber = this.reader.readInt(2);
        this.diskWithCentralDirStart = this.reader.readInt(2);
        this.centralDirRecordsOnThisDisk = this.reader.readInt(2);
        this.centralDirRecords = this.reader.readInt(2);
        this.centralDirSize = this.reader.readInt(4);
        this.centralDirOffset = this.reader.readInt(4);

        this.zipCommentLength = this.reader.readInt(2);
        // warning : the encoding depends of the system locale
        // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.
        // On a windows machine, this field is encoded with the localized windows code page.
        var zipComment = this.reader.readData(this.zipCommentLength);
        var decodeParamType = support.uint8array ? "uint8array" : "array";
        // To get consistent behavior with the generation part, we will assume that
        // this is utf8 encoded unless specified otherwise.
        var decodeContent = utils.transformTo(decodeParamType, zipComment);
        this.zipComment = this.loadOptions.decodeFileName(decodeContent);
    },
    /**
     * Read the end of the Zip 64 central directory.
     * Not merged with the method readEndOfCentral :
     * The end of central can coexist with its Zip64 brother,
     * I don't want to read the wrong number of bytes !
     */
    readBlockZip64EndOfCentral: function() {
        this.zip64EndOfCentralSize = this.reader.readInt(8);
        this.reader.skip(4);
        // this.versionMadeBy = this.reader.readString(2);
        // this.versionNeeded = this.reader.readInt(2);
        this.diskNumber = this.reader.readInt(4);
        this.diskWithCentralDirStart = this.reader.readInt(4);
        this.centralDirRecordsOnThisDisk = this.reader.readInt(8);
        this.centralDirRecords = this.reader.readInt(8);
        this.centralDirSize = this.reader.readInt(8);
        this.centralDirOffset = this.reader.readInt(8);

        this.zip64ExtensibleData = {};
        var extraDataSize = this.zip64EndOfCentralSize - 44,
            index = 0,
            extraFieldId,
            extraFieldLength,
            extraFieldValue;
        while (index < extraDataSize) {
            extraFieldId = this.reader.readInt(2);
            extraFieldLength = this.reader.readInt(4);
            extraFieldValue = this.reader.readData(extraFieldLength);
            this.zip64ExtensibleData[extraFieldId] = {
                id: extraFieldId,
                length: extraFieldLength,
                value: extraFieldValue
            };
        }
    },
    /**
     * Read the end of the Zip 64 central directory locator.
     */
    readBlockZip64EndOfCentralLocator: function() {
        this.diskWithZip64CentralDirStart = this.reader.readInt(4);
        this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);
        this.disksCount = this.reader.readInt(4);
        if (this.disksCount > 1) {
            throw new Error("Multi-volumes zip are not supported");
        }
    },
    /**
     * Read the local files, based on the offset read in the central part.
     */
    readLocalFiles: function() {
        var i, file;
        for (i = 0; i < this.files.length; i++) {
            file = this.files[i];
            this.reader.setIndex(file.localHeaderOffset);
            this.checkSignature(sig.LOCAL_FILE_HEADER);
            file.readLocalPart(this.reader);
            file.handleUTF8();
            file.processAttributes();
        }
    },
    /**
     * Read the central directory.
     */
    readCentralDir: function() {
        var file;

        this.reader.setIndex(this.centralDirOffset);
        while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) {
            file = new ZipEntry({
                zip64: this.zip64
            }, this.loadOptions);
            file.readCentralPart(this.reader);
            this.files.push(file);
        }

        if (this.centralDirRecords !== this.files.length) {
            if (this.centralDirRecords !== 0 && this.files.length === 0) {
                // We expected some records but couldn't find ANY.
                // This is really suspicious, as if something went wrong.
                throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
            } else {
                // We found some records but not all.
                // Something is wrong but we got something for the user: no error here.
                // console.warn("expected", this.centralDirRecords, "records in central dir, got", this.files.length);
            }
        }
    },
    /**
     * Read the end of central directory.
     */
    readEndOfCentral: function() {
        var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);
        if (offset < 0) {
            // Check if the content is a truncated zip or complete garbage.
            // A "LOCAL_FILE_HEADER" is not required at the beginning (auto
            // extractible zip for example) but it can give a good hint.
            // If an ajax request was used without responseType, we will also
            // get unreadable data.
            var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER);

            if (isGarbage) {
                throw new Error("Can't find end of central directory : is this a zip file ? " +
                                "If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");
            } else {
                throw new Error("Corrupted zip: can't find end of central directory");
            }

        }
        this.reader.setIndex(offset);
        var endOfCentralDirOffset = offset;
        this.checkSignature(sig.CENTRAL_DIRECTORY_END);
        this.readBlockEndOfCentral();


        /* extract from the zip spec :
            4)  If one of the fields in the end of central directory
                record is too small to hold required data, the field
                should be set to -1 (0xFFFF or 0xFFFFFFFF) and the
                ZIP64 format record should be created.
            5)  The end of central directory record and the
                Zip64 end of central directory locator record must
                reside on the same disk when splitting or spanning
                an archive.
         */
        if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {
            this.zip64 = true;

            /*
            Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from
            the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents
            all numbers as 64-bit double precision IEEE 754 floating point numbers.
            So, we have 53bits for integers and bitwise operations treat everything as 32bits.
            see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators
            and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5
            */

            // should look for a zip64 EOCD locator
            offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);
            if (offset < 0) {
                throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
            }
            this.reader.setIndex(offset);
            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);
            this.readBlockZip64EndOfCentralLocator();

            // now the zip64 EOCD record
            if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) {
                // console.warn("ZIP64 end of central directory not where expected.");
                this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);
                if (this.relativeOffsetEndOfZip64CentralDir < 0) {
                    throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
                }
            }
            this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);
            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);
            this.readBlockZip64EndOfCentral();
        }

        var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize;
        if (this.zip64) {
            expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator
            expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize;
        }

        var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset;

        if (extraBytes > 0) {
            // console.warn(extraBytes, "extra bytes at beginning or within zipfile");
            if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) {
                // The offsets seem wrong, but we have something at the specified offset.
                // So… we keep it.
            } else {
                // the offset is wrong, update the "zero" of the reader
                // this happens if data has been prepended (crx files for example)
                this.reader.zero = extraBytes;
            }
        } else if (extraBytes < 0) {
            throw new Error("Corrupted zip: missing " + Math.abs(extraBytes) + " bytes.");
        }
    },
    prepareReader: function(data) {
        this.reader = readerFor(data);
    },
    /**
     * Read a zip file and create ZipEntries.
     * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.
     */
    load: function(data) {
        this.prepareReader(data);
        this.readEndOfCentral();
        this.readCentralDir();
        this.readLocalFiles();
    }
};
// }}} end of ZipEntries
module.exports = ZipEntries;

},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(require,module,exports){
"use strict";
var readerFor = require("./reader/readerFor");
var utils = require("./utils");
var CompressedObject = require("./compressedObject");
var crc32fn = require("./crc32");
var utf8 = require("./utf8");
var compressions = require("./compressions");
var support = require("./support");

var MADE_BY_DOS = 0x00;
var MADE_BY_UNIX = 0x03;

/**
 * Find a compression registered in JSZip.
 * @param {string} compressionMethod the method magic to find.
 * @return {Object|null} the JSZip compression object, null if none found.
 */
var findCompression = function(compressionMethod) {
    for (var method in compressions) {
        if (!Object.prototype.hasOwnProperty.call(compressions, method)) {
            continue;
        }
        if (compressions[method].magic === compressionMethod) {
            return compressions[method];
        }
    }
    return null;
};

// class ZipEntry {{{
/**
 * An entry in the zip file.
 * @constructor
 * @param {Object} options Options of the current file.
 * @param {Object} loadOptions Options for loading the stream.
 */
function ZipEntry(options, loadOptions) {
    this.options = options;
    this.loadOptions = loadOptions;
}
ZipEntry.prototype = {
    /**
     * say if the file is encrypted.
     * @return {boolean} true if the file is encrypted, false otherwise.
     */
    isEncrypted: function() {
        // bit 1 is set
        return (this.bitFlag & 0x0001) === 0x0001;
    },
    /**
     * say if the file has utf-8 filename/comment.
     * @return {boolean} true if the filename/comment is in utf-8, false otherwise.
     */
    useUTF8: function() {
        // bit 11 is set
        return (this.bitFlag & 0x0800) === 0x0800;
    },
    /**
     * Read the local part of a zip file and add the info in this object.
     * @param {DataReader} reader the reader to use.
     */
    readLocalPart: function(reader) {
        var compression, localExtraFieldsLength;

        // we already know everything from the central dir !
        // If the central dir data are false, we are doomed.
        // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.
        // The less data we get here, the more reliable this should be.
        // Let's skip the whole header and dash to the data !
        reader.skip(22);
        // in some zip created on windows, the filename stored in the central dir contains \ instead of /.
        // Strangely, the filename here is OK.
        // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes
        // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators...
        // Search "unzip mismatching "local" filename continuing with "central" filename version" on
        // the internet.
        //
        // I think I see the logic here : the central directory is used to display
        // content and the local directory is used to extract the files. Mixing / and \
        // may be used to display \ to windows users and use / when extracting the files.
        // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394
        this.fileNameLength = reader.readInt(2);
        localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir
        // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding.
        this.fileName = reader.readData(this.fileNameLength);
        reader.skip(localExtraFieldsLength);

        if (this.compressedSize === -1 || this.uncompressedSize === -1) {
            throw new Error("Bug or corrupted zip : didn't get enough information from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)");
        }

        compression = findCompression(this.compressionMethod);
        if (compression === null) { // no compression found
            throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + utils.transformTo("string", this.fileName) + ")");
        }
        this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize));
    },

    /**
     * Read the central part of a zip file and add the info in this object.
     * @param {DataReader} reader the reader to use.
     */
    readCentralPart: function(reader) {
        this.versionMadeBy = reader.readInt(2);
        reader.skip(2);
        // this.versionNeeded = reader.readInt(2);
        this.bitFlag = reader.readInt(2);
        this.compressionMethod = reader.readString(2);
        this.date = reader.readDate();
        this.crc32 = reader.readInt(4);
        this.compressedSize = reader.readInt(4);
        this.uncompressedSize = reader.readInt(4);
        var fileNameLength = reader.readInt(2);
        this.extraFieldsLength = reader.readInt(2);
        this.fileCommentLength = reader.readInt(2);
        this.diskNumberStart = reader.readInt(2);
        this.internalFileAttributes = reader.readInt(2);
        this.externalFileAttributes = reader.readInt(4);
        this.localHeaderOffset = reader.readInt(4);

        if (this.isEncrypted()) {
            throw new Error("Encrypted zip are not supported");
        }

        // will be read in the local part, see the comments there
        reader.skip(fileNameLength);
        this.readExtraFields(reader);
        this.parseZIP64ExtraField(reader);
        this.fileComment = reader.readData(this.fileCommentLength);
    },

    /**
     * Parse the external file attributes and get the unix/dos permissions.
     */
    processAttributes: function () {
        this.unixPermissions = null;
        this.dosPermissions = null;
        var madeBy = this.versionMadeBy >> 8;

        // Check if we have the DOS directory flag set.
        // We look for it in the DOS and UNIX permissions
        // but some unknown platform could set it as a compatibility flag.
        this.dir = this.externalFileAttributes & 0x0010 ? true : false;

        if(madeBy === MADE_BY_DOS) {
            // first 6 bits (0 to 5)
            this.dosPermissions = this.externalFileAttributes & 0x3F;
        }

        if(madeBy === MADE_BY_UNIX) {
            this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;
            // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);
        }

        // fail safe : if the name ends with a / it probably means a folder
        if (!this.dir && this.fileNameStr.slice(-1) === "/") {
            this.dir = true;
        }
    },

    /**
     * Parse the ZIP64 extra field and merge the info in the current ZipEntry.
     * @param {DataReader} reader the reader to use.
     */
    parseZIP64ExtraField: function() {
        if (!this.extraFields[0x0001]) {
            return;
        }

        // should be something, preparing the extra reader
        var extraReader = readerFor(this.extraFields[0x0001].value);

        // I really hope that these 64bits integer can fit in 32 bits integer, because js
        // won't let us have more.
        if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {
            this.uncompressedSize = extraReader.readInt(8);
        }
        if (this.compressedSize === utils.MAX_VALUE_32BITS) {
            this.compressedSize = extraReader.readInt(8);
        }
        if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {
            this.localHeaderOffset = extraReader.readInt(8);
        }
        if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {
            this.diskNumberStart = extraReader.readInt(4);
        }
    },
    /**
     * Read the central part of a zip file and add the info in this object.
     * @param {DataReader} reader the reader to use.
     */
    readExtraFields: function(reader) {
        var end = reader.index + this.extraFieldsLength,
            extraFieldId,
            extraFieldLength,
            extraFieldValue;

        if (!this.extraFields) {
            this.extraFields = {};
        }

        while (reader.index + 4 < end) {
            extraFieldId = reader.readInt(2);
            extraFieldLength = reader.readInt(2);
            extraFieldValue = reader.readData(extraFieldLength);

            this.extraFields[extraFieldId] = {
                id: extraFieldId,
                length: extraFieldLength,
                value: extraFieldValue
            };
        }

        reader.setIndex(end);
    },
    /**
     * Apply an UTF8 transformation if needed.
     */
    handleUTF8: function() {
        var decodeParamType = support.uint8array ? "uint8array" : "array";
        if (this.useUTF8()) {
            this.fileNameStr = utf8.utf8decode(this.fileName);
            this.fileCommentStr = utf8.utf8decode(this.fileComment);
        } else {
            var upath = this.findExtraFieldUnicodePath();
            if (upath !== null) {
                this.fileNameStr = upath;
            } else {
                // ASCII text or unsupported code page
                var fileNameByteArray =  utils.transformTo(decodeParamType, this.fileName);
                this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray);
            }

            var ucomment = this.findExtraFieldUnicodeComment();
            if (ucomment !== null) {
                this.fileCommentStr = ucomment;
            } else {
                // ASCII text or unsupported code page
                var commentByteArray =  utils.transformTo(decodeParamType, this.fileComment);
                this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray);
            }
        }
    },

    /**
     * Find the unicode path declared in the extra field, if any.
     * @return {String} the unicode path, null otherwise.
     */
    findExtraFieldUnicodePath: function() {
        var upathField = this.extraFields[0x7075];
        if (upathField) {
            var extraReader = readerFor(upathField.value);

            // wrong version
            if (extraReader.readInt(1) !== 1) {
                return null;
            }

            // the crc of the filename changed, this field is out of date.
            if (crc32fn(this.fileName) !== extraReader.readInt(4)) {
                return null;
            }

            return utf8.utf8decode(extraReader.readData(upathField.length - 5));
        }
        return null;
    },

    /**
     * Find the unicode comment declared in the extra field, if any.
     * @return {String} the unicode comment, null otherwise.
     */
    findExtraFieldUnicodeComment: function() {
        var ucommentField = this.extraFields[0x6375];
        if (ucommentField) {
            var extraReader = readerFor(ucommentField.value);

            // wrong version
            if (extraReader.readInt(1) !== 1) {
                return null;
            }

            // the crc of the comment changed, this field is out of date.
            if (crc32fn(this.fileComment) !== extraReader.readInt(4)) {
                return null;
            }

            return utf8.utf8decode(extraReader.readData(ucommentField.length - 5));
        }
        return null;
    }
};
module.exports = ZipEntry;

},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(require,module,exports){
"use strict";

var StreamHelper = require("./stream/StreamHelper");
var DataWorker = require("./stream/DataWorker");
var utf8 = require("./utf8");
var CompressedObject = require("./compressedObject");
var GenericWorker = require("./stream/GenericWorker");

/**
 * A simple object representing a file in the zip file.
 * @constructor
 * @param {string} name the name of the file
 * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data
 * @param {Object} options the options of the file
 */
var ZipObject = function(name, data, options) {
    this.name = name;
    this.dir = options.dir;
    this.date = options.date;
    this.comment = options.comment;
    this.unixPermissions = options.unixPermissions;
    this.dosPermissions = options.dosPermissions;

    this._data = data;
    this._dataBinary = options.binary;
    // keep only the compression
    this.options = {
        compression : options.compression,
        compressionOptions : options.compressionOptions
    };
};

ZipObject.prototype = {
    /**
     * Create an internal stream for the content of this object.
     * @param {String} type the type of each chunk.
     * @return StreamHelper the stream.
     */
    internalStream: function (type) {
        var result = null, outputType = "string";
        try {
            if (!type) {
                throw new Error("No output type specified.");
            }
            outputType = type.toLowerCase();
            var askUnicodeString = outputType === "string" || outputType === "text";
            if (outputType === "binarystring" || outputType === "text") {
                outputType = "string";
            }
            result = this._decompressWorker();

            var isUnicodeString = !this._dataBinary;

            if (isUnicodeString && !askUnicodeString) {
                result = result.pipe(new utf8.Utf8EncodeWorker());
            }
            if (!isUnicodeString && askUnicodeString) {
                result = result.pipe(new utf8.Utf8DecodeWorker());
            }
        } catch (e) {
            result = new GenericWorker("error");
            result.error(e);
        }

        return new StreamHelper(result, outputType, "");
    },

    /**
     * Prepare the content in the asked type.
     * @param {String} type the type of the result.
     * @param {Function} onUpdate a function to call on each internal update.
     * @return Promise the promise of the result.
     */
    async: function (type, onUpdate) {
        return this.internalStream(type).accumulate(onUpdate);
    },

    /**
     * Prepare the content as a nodejs stream.
     * @param {String} type the type of each chunk.
     * @param {Function} onUpdate a function to call on each internal update.
     * @return Stream the stream.
     */
    nodeStream: function (type, onUpdate) {
        return this.internalStream(type || "nodebuffer").toNodejsStream(onUpdate);
    },

    /**
     * Return a worker for the compressed content.
     * @private
     * @param {Object} compression the compression object to use.
     * @param {Object} compressionOptions the options to use when compressing.
     * @return Worker the worker.
     */
    _compressWorker: function (compression, compressionOptions) {
        if (
            this._data instanceof CompressedObject &&
            this._data.compression.magic === compression.magic
        ) {
            return this._data.getCompressedWorker();
        } else {
            var result = this._decompressWorker();
            if(!this._dataBinary) {
                result = result.pipe(new utf8.Utf8EncodeWorker());
            }
            return CompressedObject.createWorkerFrom(result, compression, compressionOptions);
        }
    },
    /**
     * Return a worker for the decompressed content.
     * @private
     * @return Worker the worker.
     */
    _decompressWorker : function () {
        if (this._data instanceof CompressedObject) {
            return this._data.getContentWorker();
        } else if (this._data instanceof GenericWorker) {
            return this._data;
        } else {
            return new DataWorker(this._data);
        }
    }
};

var removedMethods = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"];
var removedFn = function () {
    throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
};

for(var i = 0; i < removedMethods.length; i++) {
    ZipObject.prototype[removedMethods[i]] = removedFn;
}
module.exports = ZipObject;

},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(require,module,exports){
(function (global){
'use strict';
var Mutation = global.MutationObserver || global.WebKitMutationObserver;

var scheduleDrain;

{
  if (Mutation) {
    var called = 0;
    var observer = new Mutation(nextTick);
    var element = global.document.createTextNode('');
    observer.observe(element, {
      characterData: true
    });
    scheduleDrain = function () {
      element.data = (called = ++called % 2);
    };
  } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {
    var channel = new global.MessageChannel();
    channel.port1.onmessage = nextTick;
    scheduleDrain = function () {
      channel.port2.postMessage(0);
    };
  } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {
    scheduleDrain = function () {

      // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
      // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
      var scriptEl = global.document.createElement('script');
      scriptEl.onreadystatechange = function () {
        nextTick();

        scriptEl.onreadystatechange = null;
        scriptEl.parentNode.removeChild(scriptEl);
        scriptEl = null;
      };
      global.document.documentElement.appendChild(scriptEl);
    };
  } else {
    scheduleDrain = function () {
      setTimeout(nextTick, 0);
    };
  }
}

var draining;
var queue = [];
//named nextTick for less confusing stack traces
function nextTick() {
  draining = true;
  var i, oldQueue;
  var len = queue.length;
  while (len) {
    oldQueue = queue;
    queue = [];
    i = -1;
    while (++i < len) {
      oldQueue[i]();
    }
    len = queue.length;
  }
  draining = false;
}

module.exports = immediate;
function immediate(task) {
  if (queue.push(task) === 1 && !draining) {
    scheduleDrain();
  }
}

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],37:[function(require,module,exports){
'use strict';
var immediate = require('immediate');

/* istanbul ignore next */
function INTERNAL() {}

var handlers = {};

var REJECTED = ['REJECTED'];
var FULFILLED = ['FULFILLED'];
var PENDING = ['PENDING'];

module.exports = Promise;

function Promise(resolver) {
  if (typeof resolver !== 'function') {
    throw new TypeError('resolver must be a function');
  }
  this.state = PENDING;
  this.queue = [];
  this.outcome = void 0;
  if (resolver !== INTERNAL) {
    safelyResolveThenable(this, resolver);
  }
}

Promise.prototype["finally"] = function (callback) {
  if (typeof callback !== 'function') {
    return this;
  }
  var p = this.constructor;
  return this.then(resolve, reject);

  function resolve(value) {
    function yes () {
      return value;
    }
    return p.resolve(callback()).then(yes);
  }
  function reject(reason) {
    function no () {
      throw reason;
    }
    return p.resolve(callback()).then(no);
  }
};
Promise.prototype["catch"] = function (onRejected) {
  return this.then(null, onRejected);
};
Promise.prototype.then = function (onFulfilled, onRejected) {
  if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||
    typeof onRejected !== 'function' && this.state === REJECTED) {
    return this;
  }
  var promise = new this.constructor(INTERNAL);
  if (this.state !== PENDING) {
    var resolver = this.state === FULFILLED ? onFulfilled : onRejected;
    unwrap(promise, resolver, this.outcome);
  } else {
    this.queue.push(new QueueItem(promise, onFulfilled, onRejected));
  }

  return promise;
};
function QueueItem(promise, onFulfilled, onRejected) {
  this.promise = promise;
  if (typeof onFulfilled === 'function') {
    this.onFulfilled = onFulfilled;
    this.callFulfilled = this.otherCallFulfilled;
  }
  if (typeof onRejected === 'function') {
    this.onRejected = onRejected;
    this.callRejected = this.otherCallRejected;
  }
}
QueueItem.prototype.callFulfilled = function (value) {
  handlers.resolve(this.promise, value);
};
QueueItem.prototype.otherCallFulfilled = function (value) {
  unwrap(this.promise, this.onFulfilled, value);
};
QueueItem.prototype.callRejected = function (value) {
  handlers.reject(this.promise, value);
};
QueueItem.prototype.otherCallRejected = function (value) {
  unwrap(this.promise, this.onRejected, value);
};

function unwrap(promise, func, value) {
  immediate(function () {
    var returnValue;
    try {
      returnValue = func(value);
    } catch (e) {
      return handlers.reject(promise, e);
    }
    if (returnValue === promise) {
      handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));
    } else {
      handlers.resolve(promise, returnValue);
    }
  });
}

handlers.resolve = function (self, value) {
  var result = tryCatch(getThen, value);
  if (result.status === 'error') {
    return handlers.reject(self, result.value);
  }
  var thenable = result.value;

  if (thenable) {
    safelyResolveThenable(self, thenable);
  } else {
    self.state = FULFILLED;
    self.outcome = value;
    var i = -1;
    var len = self.queue.length;
    while (++i < len) {
      self.queue[i].callFulfilled(value);
    }
  }
  return self;
};
handlers.reject = function (self, error) {
  self.state = REJECTED;
  self.outcome = error;
  var i = -1;
  var len = self.queue.length;
  while (++i < len) {
    self.queue[i].callRejected(error);
  }
  return self;
};

function getThen(obj) {
  // Make sure we only access the accessor once as required by the spec
  var then = obj && obj.then;
  if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {
    return function appyThen() {
      then.apply(obj, arguments);
    };
  }
}

function safelyResolveThenable(self, thenable) {
  // Either fulfill, reject or reject with error
  var called = false;
  function onError(value) {
    if (called) {
      return;
    }
    called = true;
    handlers.reject(self, value);
  }

  function onSuccess(value) {
    if (called) {
      return;
    }
    called = true;
    handlers.resolve(self, value);
  }

  function tryToUnwrap() {
    thenable(onSuccess, onError);
  }

  var result = tryCatch(tryToUnwrap);
  if (result.status === 'error') {
    onError(result.value);
  }
}

function tryCatch(func, value) {
  var out = {};
  try {
    out.value = func(value);
    out.status = 'success';
  } catch (e) {
    out.status = 'error';
    out.value = e;
  }
  return out;
}

Promise.resolve = resolve;
function resolve(value) {
  if (value instanceof this) {
    return value;
  }
  return handlers.resolve(new this(INTERNAL), value);
}

Promise.reject = reject;
function reject(reason) {
  var promise = new this(INTERNAL);
  return handlers.reject(promise, reason);
}

Promise.all = all;
function all(iterable) {
  var self = this;
  if (Object.prototype.toString.call(iterable) !== '[object Array]') {
    return this.reject(new TypeError('must be an array'));
  }

  var len = iterable.length;
  var called = false;
  if (!len) {
    return this.resolve([]);
  }

  var values = new Array(len);
  var resolved = 0;
  var i = -1;
  var promise = new this(INTERNAL);

  while (++i < len) {
    allResolver(iterable[i], i);
  }
  return promise;
  function allResolver(value, i) {
    self.resolve(value).then(resolveFromAll, function (error) {
      if (!called) {
        called = true;
        handlers.reject(promise, error);
      }
    });
    function resolveFromAll(outValue) {
      values[i] = outValue;
      if (++resolved === len && !called) {
        called = true;
        handlers.resolve(promise, values);
      }
    }
  }
}

Promise.race = race;
function race(iterable) {
  var self = this;
  if (Object.prototype.toString.call(iterable) !== '[object Array]') {
    return this.reject(new TypeError('must be an array'));
  }

  var len = iterable.length;
  var called = false;
  if (!len) {
    return this.resolve([]);
  }

  var i = -1;
  var promise = new this(INTERNAL);

  while (++i < len) {
    resolver(iterable[i]);
  }
  return promise;
  function resolver(value) {
    self.resolve(value).then(function (response) {
      if (!called) {
        called = true;
        handlers.resolve(promise, response);
      }
    }, function (error) {
      if (!called) {
        called = true;
        handlers.reject(promise, error);
      }
    });
  }
}

},{"immediate":36}],38:[function(require,module,exports){
// Top level file is just a mixin of submodules & constants
'use strict';

var assign    = require('./lib/utils/common').assign;

var deflate   = require('./lib/deflate');
var inflate   = require('./lib/inflate');
var constants = require('./lib/zlib/constants');

var pako = {};

assign(pako, deflate, inflate, constants);

module.exports = pako;

},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(require,module,exports){
'use strict';


var zlib_deflate = require('./zlib/deflate');
var utils        = require('./utils/common');
var strings      = require('./utils/strings');
var msg          = require('./zlib/messages');
var ZStream      = require('./zlib/zstream');

var toString = Object.prototype.toString;

/* Public constants ==========================================================*/
/* ===========================================================================*/

var Z_NO_FLUSH      = 0;
var Z_FINISH        = 4;

var Z_OK            = 0;
var Z_STREAM_END    = 1;
var Z_SYNC_FLUSH    = 2;

var Z_DEFAULT_COMPRESSION = -1;

var Z_DEFAULT_STRATEGY    = 0;

var Z_DEFLATED  = 8;

/* ===========================================================================*/


/**
 * class Deflate
 *
 * Generic JS-style wrapper for zlib calls. If you don't need
 * streaming behaviour - use more simple functions: [[deflate]],
 * [[deflateRaw]] and [[gzip]].
 **/

/* internal
 * Deflate.chunks -> Array
 *
 * Chunks of output data, if [[Deflate#onData]] not overriden.
 **/

/**
 * Deflate.result -> Uint8Array|Array
 *
 * Compressed result, generated by default [[Deflate#onData]]
 * and [[Deflate#onEnd]] handlers. Filled after you push last chunk
 * (call [[Deflate#push]] with `Z_FINISH` / `true` param)  or if you
 * push a chunk with explicit flush (call [[Deflate#push]] with
 * `Z_SYNC_FLUSH` param).
 **/

/**
 * Deflate.err -> Number
 *
 * Error code after deflate finished. 0 (Z_OK) on success.
 * You will not need it in real life, because deflate errors
 * are possible only on wrong options or bad `onData` / `onEnd`
 * custom handlers.
 **/

/**
 * Deflate.msg -> String
 *
 * Error message, if [[Deflate.err]] != 0
 **/


/**
 * new Deflate(options)
 * - options (Object): zlib deflate options.
 *
 * Creates new deflator instance with specified params. Throws exception
 * on bad params. Supported options:
 *
 * - `level`
 * - `windowBits`
 * - `memLevel`
 * - `strategy`
 * - `dictionary`
 *
 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
 * for more information on these.
 *
 * Additional options, for internal needs:
 *
 * - `chunkSize` - size of generated data chunks (16K by default)
 * - `raw` (Boolean) - do raw deflate
 * - `gzip` (Boolean) - create gzip wrapper
 * - `to` (String) - if equal to 'string', then result will be "binary string"
 *    (each char code [0..255])
 * - `header` (Object) - custom header for gzip
 *   - `text` (Boolean) - true if compressed data believed to be text
 *   - `time` (Number) - modification time, unix timestamp
 *   - `os` (Number) - operation system code
 *   - `extra` (Array) - array of bytes with extra data (max 65536)
 *   - `name` (String) - file name (binary string)
 *   - `comment` (String) - comment (binary string)
 *   - `hcrc` (Boolean) - true if header crc should be added
 *
 * ##### Example:
 *
 * ```javascript
 * var pako = require('pako')
 *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
 *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
 *
 * var deflate = new pako.Deflate({ level: 3});
 *
 * deflate.push(chunk1, false);
 * deflate.push(chunk2, true);  // true -> last chunk
 *
 * if (deflate.err) { throw new Error(deflate.err); }
 *
 * console.log(deflate.result);
 * ```
 **/
function Deflate(options) {
  if (!(this instanceof Deflate)) return new Deflate(options);

  this.options = utils.assign({
    level: Z_DEFAULT_COMPRESSION,
    method: Z_DEFLATED,
    chunkSize: 16384,
    windowBits: 15,
    memLevel: 8,
    strategy: Z_DEFAULT_STRATEGY,
    to: ''
  }, options || {});

  var opt = this.options;

  if (opt.raw && (opt.windowBits > 0)) {
    opt.windowBits = -opt.windowBits;
  }

  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {
    opt.windowBits += 16;
  }

  this.err    = 0;      // error code, if happens (0 = Z_OK)
  this.msg    = '';     // error message
  this.ended  = false;  // used to avoid multiple onEnd() calls
  this.chunks = [];     // chunks of compressed data

  this.strm = new ZStream();
  this.strm.avail_out = 0;

  var status = zlib_deflate.deflateInit2(
    this.strm,
    opt.level,
    opt.method,
    opt.windowBits,
    opt.memLevel,
    opt.strategy
  );

  if (status !== Z_OK) {
    throw new Error(msg[status]);
  }

  if (opt.header) {
    zlib_deflate.deflateSetHeader(this.strm, opt.header);
  }

  if (opt.dictionary) {
    var dict;
    // Convert data if needed
    if (typeof opt.dictionary === 'string') {
      // If we need to compress text, change encoding to utf8.
      dict = strings.string2buf(opt.dictionary);
    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {
      dict = new Uint8Array(opt.dictionary);
    } else {
      dict = opt.dictionary;
    }

    status = zlib_deflate.deflateSetDictionary(this.strm, dict);

    if (status !== Z_OK) {
      throw new Error(msg[status]);
    }

    this._dict_set = true;
  }
}

/**
 * Deflate#push(data[, mode]) -> Boolean
 * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be
 *   converted to utf8 byte sequence.
 * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
 *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.
 *
 * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with
 * new compressed chunks. Returns `true` on success. The last data block must have
 * mode Z_FINISH (or `true`). That will flush internal pending buffers and call
 * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you
 * can use mode Z_SYNC_FLUSH, keeping the compression context.
 *
 * On fail call [[Deflate#onEnd]] with error code and return false.
 *
 * We strongly recommend to use `Uint8Array` on input for best speed (output
 * array format is detected automatically). Also, don't skip last param and always
 * use the same type in your code (boolean or number). That will improve JS speed.
 *
 * For regular `Array`-s make sure all elements are [0..255].
 *
 * ##### Example
 *
 * ```javascript
 * push(chunk, false); // push one of data chunks
 * ...
 * push(chunk, true);  // push last chunk
 * ```
 **/
Deflate.prototype.push = function (data, mode) {
  var strm = this.strm;
  var chunkSize = this.options.chunkSize;
  var status, _mode;

  if (this.ended) { return false; }

  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);

  // Convert data if needed
  if (typeof data === 'string') {
    // If we need to compress text, change encoding to utf8.
    strm.input = strings.string2buf(data);
  } else if (toString.call(data) === '[object ArrayBuffer]') {
    strm.input = new Uint8Array(data);
  } else {
    strm.input = data;
  }

  strm.next_in = 0;
  strm.avail_in = strm.input.length;

  do {
    if (strm.avail_out === 0) {
      strm.output = new utils.Buf8(chunkSize);
      strm.next_out = 0;
      strm.avail_out = chunkSize;
    }
    status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */

    if (status !== Z_STREAM_END && status !== Z_OK) {
      this.onEnd(status);
      this.ended = true;
      return false;
    }
    if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {
      if (this.options.to === 'string') {
        this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));
      } else {
        this.onData(utils.shrinkBuf(strm.output, strm.next_out));
      }
    }
  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);

  // Finalize on the last chunk.
  if (_mode === Z_FINISH) {
    status = zlib_deflate.deflateEnd(this.strm);
    this.onEnd(status);
    this.ended = true;
    return status === Z_OK;
  }

  // callback interim results if Z_SYNC_FLUSH.
  if (_mode === Z_SYNC_FLUSH) {
    this.onEnd(Z_OK);
    strm.avail_out = 0;
    return true;
  }

  return true;
};


/**
 * Deflate#onData(chunk) -> Void
 * - chunk (Uint8Array|Array|String): ouput data. Type of array depends
 *   on js engine support. When string output requested, each chunk
 *   will be string.
 *
 * By default, stores data blocks in `chunks[]` property and glue
 * those in `onEnd`. Override this handler, if you need another behaviour.
 **/
Deflate.prototype.onData = function (chunk) {
  this.chunks.push(chunk);
};


/**
 * Deflate#onEnd(status) -> Void
 * - status (Number): deflate status. 0 (Z_OK) on success,
 *   other if not.
 *
 * Called once after you tell deflate that the input stream is
 * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)
 * or if an error happened. By default - join collected chunks,
 * free memory and fill `results` / `err` properties.
 **/
Deflate.prototype.onEnd = function (status) {
  // On success - join
  if (status === Z_OK) {
    if (this.options.to === 'string') {
      this.result = this.chunks.join('');
    } else {
      this.result = utils.flattenChunks(this.chunks);
    }
  }
  this.chunks = [];
  this.err = status;
  this.msg = this.strm.msg;
};


/**
 * deflate(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to compress.
 * - options (Object): zlib deflate options.
 *
 * Compress `data` with deflate algorithm and `options`.
 *
 * Supported options are:
 *
 * - level
 * - windowBits
 * - memLevel
 * - strategy
 * - dictionary
 *
 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
 * for more information on these.
 *
 * Sugar (options):
 *
 * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
 *   negative windowBits implicitly.
 * - `to` (String) - if equal to 'string', then result will be "binary string"
 *    (each char code [0..255])
 *
 * ##### Example:
 *
 * ```javascript
 * var pako = require('pako')
 *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);
 *
 * console.log(pako.deflate(data));
 * ```
 **/
function deflate(input, options) {
  var deflator = new Deflate(options);

  deflator.push(input, true);

  // That will never happens, if you don't cheat with options :)
  if (deflator.err) { throw deflator.msg || msg[deflator.err]; }

  return deflator.result;
}


/**
 * deflateRaw(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to compress.
 * - options (Object): zlib deflate options.
 *
 * The same as [[deflate]], but creates raw data, without wrapper
 * (header and adler32 crc).
 **/
function deflateRaw(input, options) {
  options = options || {};
  options.raw = true;
  return deflate(input, options);
}


/**
 * gzip(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to compress.
 * - options (Object): zlib deflate options.
 *
 * The same as [[deflate]], but create gzip wrapper instead of
 * deflate one.
 **/
function gzip(input, options) {
  options = options || {};
  options.gzip = true;
  return deflate(input, options);
}


exports.Deflate = Deflate;
exports.deflate = deflate;
exports.deflateRaw = deflateRaw;
exports.gzip = gzip;

},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(require,module,exports){
'use strict';


var zlib_inflate = require('./zlib/inflate');
var utils        = require('./utils/common');
var strings      = require('./utils/strings');
var c            = require('./zlib/constants');
var msg          = require('./zlib/messages');
var ZStream      = require('./zlib/zstream');
var GZheader     = require('./zlib/gzheader');

var toString = Object.prototype.toString;

/**
 * class Inflate
 *
 * Generic JS-style wrapper for zlib calls. If you don't need
 * streaming behaviour - use more simple functions: [[inflate]]
 * and [[inflateRaw]].
 **/

/* internal
 * inflate.chunks -> Array
 *
 * Chunks of output data, if [[Inflate#onData]] not overriden.
 **/

/**
 * Inflate.result -> Uint8Array|Array|String
 *
 * Uncompressed result, generated by default [[Inflate#onData]]
 * and [[Inflate#onEnd]] handlers. Filled after you push last chunk
 * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you
 * push a chunk with explicit flush (call [[Inflate#push]] with
 * `Z_SYNC_FLUSH` param).
 **/

/**
 * Inflate.err -> Number
 *
 * Error code after inflate finished. 0 (Z_OK) on success.
 * Should be checked if broken data possible.
 **/

/**
 * Inflate.msg -> String
 *
 * Error message, if [[Inflate.err]] != 0
 **/


/**
 * new Inflate(options)
 * - options (Object): zlib inflate options.
 *
 * Creates new inflator instance with specified params. Throws exception
 * on bad params. Supported options:
 *
 * - `windowBits`
 * - `dictionary`
 *
 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
 * for more information on these.
 *
 * Additional options, for internal needs:
 *
 * - `chunkSize` - size of generated data chunks (16K by default)
 * - `raw` (Boolean) - do raw inflate
 * - `to` (String) - if equal to 'string', then result will be converted
 *   from utf8 to utf16 (javascript) string. When string output requested,
 *   chunk length can differ from `chunkSize`, depending on content.
 *
 * By default, when no options set, autodetect deflate/gzip data format via
 * wrapper header.
 *
 * ##### Example:
 *
 * ```javascript
 * var pako = require('pako')
 *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
 *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
 *
 * var inflate = new pako.Inflate({ level: 3});
 *
 * inflate.push(chunk1, false);
 * inflate.push(chunk2, true);  // true -> last chunk
 *
 * if (inflate.err) { throw new Error(inflate.err); }
 *
 * console.log(inflate.result);
 * ```
 **/
function Inflate(options) {
  if (!(this instanceof Inflate)) return new Inflate(options);

  this.options = utils.assign({
    chunkSize: 16384,
    windowBits: 0,
    to: ''
  }, options || {});

  var opt = this.options;

  // Force window size for `raw` data, if not set directly,
  // because we have no header for autodetect.
  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {
    opt.windowBits = -opt.windowBits;
    if (opt.windowBits === 0) { opt.windowBits = -15; }
  }

  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&
      !(options && options.windowBits)) {
    opt.windowBits += 32;
  }

  // Gzip header has no info about windows size, we can do autodetect only
  // for deflate. So, if window size not set, force it to max when gzip possible
  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {
    // bit 3 (16) -> gzipped data
    // bit 4 (32) -> autodetect gzip/deflate
    if ((opt.windowBits & 15) === 0) {
      opt.windowBits |= 15;
    }
  }

  this.err    = 0;      // error code, if happens (0 = Z_OK)
  this.msg    = '';     // error message
  this.ended  = false;  // used to avoid multiple onEnd() calls
  this.chunks = [];     // chunks of compressed data

  this.strm   = new ZStream();
  this.strm.avail_out = 0;

  var status  = zlib_inflate.inflateInit2(
    this.strm,
    opt.windowBits
  );

  if (status !== c.Z_OK) {
    throw new Error(msg[status]);
  }

  this.header = new GZheader();

  zlib_inflate.inflateGetHeader(this.strm, this.header);
}

/**
 * Inflate#push(data[, mode]) -> Boolean
 * - data (Uint8Array|Array|ArrayBuffer|String): input data
 * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
 *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.
 *
 * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
 * new output chunks. Returns `true` on success. The last data block must have
 * mode Z_FINISH (or `true`). That will flush internal pending buffers and call
 * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you
 * can use mode Z_SYNC_FLUSH, keeping the decompression context.
 *
 * On fail call [[Inflate#onEnd]] with error code and return false.
 *
 * We strongly recommend to use `Uint8Array` on input for best speed (output
 * format is detected automatically). Also, don't skip last param and always
 * use the same type in your code (boolean or number). That will improve JS speed.
 *
 * For regular `Array`-s make sure all elements are [0..255].
 *
 * ##### Example
 *
 * ```javascript
 * push(chunk, false); // push one of data chunks
 * ...
 * push(chunk, true);  // push last chunk
 * ```
 **/
Inflate.prototype.push = function (data, mode) {
  var strm = this.strm;
  var chunkSize = this.options.chunkSize;
  var dictionary = this.options.dictionary;
  var status, _mode;
  var next_out_utf8, tail, utf8str;
  var dict;

  // Flag to properly process Z_BUF_ERROR on testing inflate call
  // when we check that all output data was flushed.
  var allowBufError = false;

  if (this.ended) { return false; }
  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);

  // Convert data if needed
  if (typeof data === 'string') {
    // Only binary strings can be decompressed on practice
    strm.input = strings.binstring2buf(data);
  } else if (toString.call(data) === '[object ArrayBuffer]') {
    strm.input = new Uint8Array(data);
  } else {
    strm.input = data;
  }

  strm.next_in = 0;
  strm.avail_in = strm.input.length;

  do {
    if (strm.avail_out === 0) {
      strm.output = new utils.Buf8(chunkSize);
      strm.next_out = 0;
      strm.avail_out = chunkSize;
    }

    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */

    if (status === c.Z_NEED_DICT && dictionary) {
      // Convert data if needed
      if (typeof dictionary === 'string') {
        dict = strings.string2buf(dictionary);
      } else if (toString.call(dictionary) === '[object ArrayBuffer]') {
        dict = new Uint8Array(dictionary);
      } else {
        dict = dictionary;
      }

      status = zlib_inflate.inflateSetDictionary(this.strm, dict);

    }

    if (status === c.Z_BUF_ERROR && allowBufError === true) {
      status = c.Z_OK;
      allowBufError = false;
    }

    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {
      this.onEnd(status);
      this.ended = true;
      return false;
    }

    if (strm.next_out) {
      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {

        if (this.options.to === 'string') {

          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);

          tail = strm.next_out - next_out_utf8;
          utf8str = strings.buf2string(strm.output, next_out_utf8);

          // move tail
          strm.next_out = tail;
          strm.avail_out = chunkSize - tail;
          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }

          this.onData(utf8str);

        } else {
          this.onData(utils.shrinkBuf(strm.output, strm.next_out));
        }
      }
    }

    // When no more input data, we should check that internal inflate buffers
    // are flushed. The only way to do it when avail_out = 0 - run one more
    // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.
    // Here we set flag to process this error properly.
    //
    // NOTE. Deflate does not return error in this case and does not needs such
    // logic.
    if (strm.avail_in === 0 && strm.avail_out === 0) {
      allowBufError = true;
    }

  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);

  if (status === c.Z_STREAM_END) {
    _mode = c.Z_FINISH;
  }

  // Finalize on the last chunk.
  if (_mode === c.Z_FINISH) {
    status = zlib_inflate.inflateEnd(this.strm);
    this.onEnd(status);
    this.ended = true;
    return status === c.Z_OK;
  }

  // callback interim results if Z_SYNC_FLUSH.
  if (_mode === c.Z_SYNC_FLUSH) {
    this.onEnd(c.Z_OK);
    strm.avail_out = 0;
    return true;
  }

  return true;
};


/**
 * Inflate#onData(chunk) -> Void
 * - chunk (Uint8Array|Array|String): ouput data. Type of array depends
 *   on js engine support. When string output requested, each chunk
 *   will be string.
 *
 * By default, stores data blocks in `chunks[]` property and glue
 * those in `onEnd`. Override this handler, if you need another behaviour.
 **/
Inflate.prototype.onData = function (chunk) {
  this.chunks.push(chunk);
};


/**
 * Inflate#onEnd(status) -> Void
 * - status (Number): inflate status. 0 (Z_OK) on success,
 *   other if not.
 *
 * Called either after you tell inflate that the input stream is
 * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)
 * or if an error happened. By default - join collected chunks,
 * free memory and fill `results` / `err` properties.
 **/
Inflate.prototype.onEnd = function (status) {
  // On success - join
  if (status === c.Z_OK) {
    if (this.options.to === 'string') {
      // Glue & convert here, until we teach pako to send
      // utf8 alligned strings to onData
      this.result = this.chunks.join('');
    } else {
      this.result = utils.flattenChunks(this.chunks);
    }
  }
  this.chunks = [];
  this.err = status;
  this.msg = this.strm.msg;
};


/**
 * inflate(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to decompress.
 * - options (Object): zlib inflate options.
 *
 * Decompress `data` with inflate/ungzip and `options`. Autodetect
 * format via wrapper header by default. That's why we don't provide
 * separate `ungzip` method.
 *
 * Supported options are:
 *
 * - windowBits
 *
 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
 * for more information.
 *
 * Sugar (options):
 *
 * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
 *   negative windowBits implicitly.
 * - `to` (String) - if equal to 'string', then result will be converted
 *   from utf8 to utf16 (javascript) string. When string output requested,
 *   chunk length can differ from `chunkSize`, depending on content.
 *
 *
 * ##### Example:
 *
 * ```javascript
 * var pako = require('pako')
 *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])
 *   , output;
 *
 * try {
 *   output = pako.inflate(input);
 * } catch (err)
 *   console.log(err);
 * }
 * ```
 **/
function inflate(input, options) {
  var inflator = new Inflate(options);

  inflator.push(input, true);

  // That will never happens, if you don't cheat with options :)
  if (inflator.err) { throw inflator.msg || msg[inflator.err]; }

  return inflator.result;
}


/**
 * inflateRaw(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to decompress.
 * - options (Object): zlib inflate options.
 *
 * The same as [[inflate]], but creates raw data, without wrapper
 * (header and adler32 crc).
 **/
function inflateRaw(input, options) {
  options = options || {};
  options.raw = true;
  return inflate(input, options);
}


/**
 * ungzip(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to decompress.
 * - options (Object): zlib inflate options.
 *
 * Just shortcut to [[inflate]], because it autodetects format
 * by header.content. Done for convenience.
 **/


exports.Inflate = Inflate;
exports.inflate = inflate;
exports.inflateRaw = inflateRaw;
exports.ungzip  = inflate;

},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(require,module,exports){
'use strict';


var TYPED_OK =  (typeof Uint8Array !== 'undefined') &&
                (typeof Uint16Array !== 'undefined') &&
                (typeof Int32Array !== 'undefined');


exports.assign = function (obj /*from1, from2, from3, ...*/) {
  var sources = Array.prototype.slice.call(arguments, 1);
  while (sources.length) {
    var source = sources.shift();
    if (!source) { continue; }

    if (typeof source !== 'object') {
      throw new TypeError(source + 'must be non-object');
    }

    for (var p in source) {
      if (source.hasOwnProperty(p)) {
        obj[p] = source[p];
      }
    }
  }

  return obj;
};


// reduce buffer size, avoiding mem copy
exports.shrinkBuf = function (buf, size) {
  if (buf.length === size) { return buf; }
  if (buf.subarray) { return buf.subarray(0, size); }
  buf.length = size;
  return buf;
};


var fnTyped = {
  arraySet: function (dest, src, src_offs, len, dest_offs) {
    if (src.subarray && dest.subarray) {
      dest.set(src.subarray(src_offs, src_offs + len), dest_offs);
      return;
    }
    // Fallback to ordinary array
    for (var i = 0; i < len; i++) {
      dest[dest_offs + i] = src[src_offs + i];
    }
  },
  // Join array of chunks to single array.
  flattenChunks: function (chunks) {
    var i, l, len, pos, chunk, result;

    // calculate data length
    len = 0;
    for (i = 0, l = chunks.length; i < l; i++) {
      len += chunks[i].length;
    }

    // join chunks
    result = new Uint8Array(len);
    pos = 0;
    for (i = 0, l = chunks.length; i < l; i++) {
      chunk = chunks[i];
      result.set(chunk, pos);
      pos += chunk.length;
    }

    return result;
  }
};

var fnUntyped = {
  arraySet: function (dest, src, src_offs, len, dest_offs) {
    for (var i = 0; i < len; i++) {
      dest[dest_offs + i] = src[src_offs + i];
    }
  },
  // Join array of chunks to single array.
  flattenChunks: function (chunks) {
    return [].concat.apply([], chunks);
  }
};


// Enable/Disable typed arrays use, for testing
//
exports.setTyped = function (on) {
  if (on) {
    exports.Buf8  = Uint8Array;
    exports.Buf16 = Uint16Array;
    exports.Buf32 = Int32Array;
    exports.assign(exports, fnTyped);
  } else {
    exports.Buf8  = Array;
    exports.Buf16 = Array;
    exports.Buf32 = Array;
    exports.assign(exports, fnUntyped);
  }
};

exports.setTyped(TYPED_OK);

},{}],42:[function(require,module,exports){
// String encode/decode helpers
'use strict';


var utils = require('./common');


// Quick check if we can use fast array to bin string conversion
//
// - apply(Array) can fail on Android 2.2
// - apply(Uint8Array) can fail on iOS 5.1 Safary
//
var STR_APPLY_OK = true;
var STR_APPLY_UIA_OK = true;

try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }
try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }


// Table with utf8 lengths (calculated by first byte of sequence)
// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
// because max possible codepoint is 0x10ffff
var _utf8len = new utils.Buf8(256);
for (var q = 0; q < 256; q++) {
  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);
}
_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start


// convert string to array (typed, when possible)
exports.string2buf = function (str) {
  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;

  // count binary size
  for (m_pos = 0; m_pos < str_len; m_pos++) {
    c = str.charCodeAt(m_pos);
    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
      c2 = str.charCodeAt(m_pos + 1);
      if ((c2 & 0xfc00) === 0xdc00) {
        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
        m_pos++;
      }
    }
    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
  }

  // allocate buffer
  buf = new utils.Buf8(buf_len);

  // convert
  for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
    c = str.charCodeAt(m_pos);
    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
      c2 = str.charCodeAt(m_pos + 1);
      if ((c2 & 0xfc00) === 0xdc00) {
        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
        m_pos++;
      }
    }
    if (c < 0x80) {
      /* one byte */
      buf[i++] = c;
    } else if (c < 0x800) {
      /* two bytes */
      buf[i++] = 0xC0 | (c >>> 6);
      buf[i++] = 0x80 | (c & 0x3f);
    } else if (c < 0x10000) {
      /* three bytes */
      buf[i++] = 0xE0 | (c >>> 12);
      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
      buf[i++] = 0x80 | (c & 0x3f);
    } else {
      /* four bytes */
      buf[i++] = 0xf0 | (c >>> 18);
      buf[i++] = 0x80 | (c >>> 12 & 0x3f);
      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
      buf[i++] = 0x80 | (c & 0x3f);
    }
  }

  return buf;
};

// Helper (used in 2 places)
function buf2binstring(buf, len) {
  // use fallback for big arrays to avoid stack overflow
  if (len < 65537) {
    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {
      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));
    }
  }

  var result = '';
  for (var i = 0; i < len; i++) {
    result += String.fromCharCode(buf[i]);
  }
  return result;
}


// Convert byte array to binary string
exports.buf2binstring = function (buf) {
  return buf2binstring(buf, buf.length);
};


// Convert binary string (typed, when possible)
exports.binstring2buf = function (str) {
  var buf = new utils.Buf8(str.length);
  for (var i = 0, len = buf.length; i < len; i++) {
    buf[i] = str.charCodeAt(i);
  }
  return buf;
};


// convert array to string
exports.buf2string = function (buf, max) {
  var i, out, c, c_len;
  var len = max || buf.length;

  // Reserve max possible length (2 words per char)
  // NB: by unknown reasons, Array is significantly faster for
  //     String.fromCharCode.apply than Uint16Array.
  var utf16buf = new Array(len * 2);

  for (out = 0, i = 0; i < len;) {
    c = buf[i++];
    // quick process ascii
    if (c < 0x80) { utf16buf[out++] = c; continue; }

    c_len = _utf8len[c];
    // skip 5 & 6 byte codes
    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }

    // apply mask on first byte
    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
    // join the rest
    while (c_len > 1 && i < len) {
      c = (c << 6) | (buf[i++] & 0x3f);
      c_len--;
    }

    // terminated by end of string?
    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }

    if (c < 0x10000) {
      utf16buf[out++] = c;
    } else {
      c -= 0x10000;
      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
      utf16buf[out++] = 0xdc00 | (c & 0x3ff);
    }
  }

  return buf2binstring(utf16buf, out);
};


// Calculate max possible position in utf8 buffer,
// that will not break sequence. If that's not possible
// - (very small limits) return max size as is.
//
// buf[] - utf8 bytes array
// max   - length limit (mandatory);
exports.utf8border = function (buf, max) {
  var pos;

  max = max || buf.length;
  if (max > buf.length) { max = buf.length; }

  // go back from last position, until start of sequence found
  pos = max - 1;
  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }

  // Fuckup - very small and broken sequence,
  // return max, because we should return something anyway.
  if (pos < 0) { return max; }

  // If we came to start of buffer - that means vuffer is too small,
  // return max too.
  if (pos === 0) { return max; }

  return (pos + _utf8len[buf[pos]] > max) ? pos : max;
};

},{"./common":41}],43:[function(require,module,exports){
'use strict';

// Note: adler32 takes 12% for level 0 and 2% for level 6.
// It doesn't worth to make additional optimizationa as in original.
// Small size is preferable.

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

function adler32(adler, buf, len, pos) {
  var s1 = (adler & 0xffff) |0,
      s2 = ((adler >>> 16) & 0xffff) |0,
      n = 0;

  while (len !== 0) {
    // Set limit ~ twice less than 5552, to keep
    // s2 in 31-bits, because we force signed ints.
    // in other case %= will fail.
    n = len > 2000 ? 2000 : len;
    len -= n;

    do {
      s1 = (s1 + buf[pos++]) |0;
      s2 = (s2 + s1) |0;
    } while (--n);

    s1 %= 65521;
    s2 %= 65521;
  }

  return (s1 | (s2 << 16)) |0;
}


module.exports = adler32;

},{}],44:[function(require,module,exports){
'use strict';

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

module.exports = {

  /* Allowed flush values; see deflate() and inflate() below for details */
  Z_NO_FLUSH:         0,
  Z_PARTIAL_FLUSH:    1,
  Z_SYNC_FLUSH:       2,
  Z_FULL_FLUSH:       3,
  Z_FINISH:           4,
  Z_BLOCK:            5,
  Z_TREES:            6,

  /* Return codes for the compression/decompression functions. Negative values
  * are errors, positive values are used for special but normal events.
  */
  Z_OK:               0,
  Z_STREAM_END:       1,
  Z_NEED_DICT:        2,
  Z_ERRNO:           -1,
  Z_STREAM_ERROR:    -2,
  Z_DATA_ERROR:      -3,
  //Z_MEM_ERROR:     -4,
  Z_BUF_ERROR:       -5,
  //Z_VERSION_ERROR: -6,

  /* compression levels */
  Z_NO_COMPRESSION:         0,
  Z_BEST_SPEED:             1,
  Z_BEST_COMPRESSION:       9,
  Z_DEFAULT_COMPRESSION:   -1,


  Z_FILTERED:               1,
  Z_HUFFMAN_ONLY:           2,
  Z_RLE:                    3,
  Z_FIXED:                  4,
  Z_DEFAULT_STRATEGY:       0,

  /* Possible values of the data_type field (though see inflate()) */
  Z_BINARY:                 0,
  Z_TEXT:                   1,
  //Z_ASCII:                1, // = Z_TEXT (deprecated)
  Z_UNKNOWN:                2,

  /* The deflate compression method */
  Z_DEFLATED:               8
  //Z_NULL:                 null // Use -1 or null inline, depending on var type
};

},{}],45:[function(require,module,exports){
'use strict';

// Note: we can't get significant speed boost here.
// So write code to minimize size - no pregenerated tables
// and array tools dependencies.

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

// Use ordinary array, since untyped makes no boost here
function makeTable() {
  var c, table = [];

  for (var n = 0; n < 256; n++) {
    c = n;
    for (var k = 0; k < 8; k++) {
      c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
    }
    table[n] = c;
  }

  return table;
}

// Create table on load. Just 255 signed longs. Not a problem.
var crcTable = makeTable();


function crc32(crc, buf, len, pos) {
  var t = crcTable,
      end = pos + len;

  crc ^= -1;

  for (var i = pos; i < end; i++) {
    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
  }

  return (crc ^ (-1)); // >>> 0;
}


module.exports = crc32;

},{}],46:[function(require,module,exports){
'use strict';

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

var utils   = require('../utils/common');
var trees   = require('./trees');
var adler32 = require('./adler32');
var crc32   = require('./crc32');
var msg     = require('./messages');

/* Public constants ==========================================================*/
/* ===========================================================================*/


/* Allowed flush values; see deflate() and inflate() below for details */
var Z_NO_FLUSH      = 0;
var Z_PARTIAL_FLUSH = 1;
//var Z_SYNC_FLUSH    = 2;
var Z_FULL_FLUSH    = 3;
var Z_FINISH        = 4;
var Z_BLOCK         = 5;
//var Z_TREES         = 6;


/* Return codes for the compression/decompression functions. Negative values
 * are errors, positive values are used for special but normal events.
 */
var Z_OK            = 0;
var Z_STREAM_END    = 1;
//var Z_NEED_DICT     = 2;
//var Z_ERRNO         = -1;
var Z_STREAM_ERROR  = -2;
var Z_DATA_ERROR    = -3;
//var Z_MEM_ERROR     = -4;
var Z_BUF_ERROR     = -5;
//var Z_VERSION_ERROR = -6;


/* compression levels */
//var Z_NO_COMPRESSION      = 0;
//var Z_BEST_SPEED          = 1;
//var Z_BEST_COMPRESSION    = 9;
var Z_DEFAULT_COMPRESSION = -1;


var Z_FILTERED            = 1;
var Z_HUFFMAN_ONLY        = 2;
var Z_RLE                 = 3;
var Z_FIXED               = 4;
var Z_DEFAULT_STRATEGY    = 0;

/* Possible values of the data_type field (though see inflate()) */
//var Z_BINARY              = 0;
//var Z_TEXT                = 1;
//var Z_ASCII               = 1; // = Z_TEXT
var Z_UNKNOWN             = 2;


/* The deflate compression method */
var Z_DEFLATED  = 8;

/*============================================================================*/


var MAX_MEM_LEVEL = 9;
/* Maximum value for memLevel in deflateInit2 */
var MAX_WBITS = 15;
/* 32K LZ77 window */
var DEF_MEM_LEVEL = 8;


var LENGTH_CODES  = 29;
/* number of length codes, not counting the special END_BLOCK code */
var LITERALS      = 256;
/* number of literal bytes 0..255 */
var L_CODES       = LITERALS + 1 + LENGTH_CODES;
/* number of Literal or Length codes, including the END_BLOCK code */
var D_CODES       = 30;
/* number of distance codes */
var BL_CODES      = 19;
/* number of codes used to transfer the bit lengths */
var HEAP_SIZE     = 2 * L_CODES + 1;
/* maximum heap size */
var MAX_BITS  = 15;
/* All codes must not exceed MAX_BITS bits */

var MIN_MATCH = 3;
var MAX_MATCH = 258;
var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);

var PRESET_DICT = 0x20;

var INIT_STATE = 42;
var EXTRA_STATE = 69;
var NAME_STATE = 73;
var COMMENT_STATE = 91;
var HCRC_STATE = 103;
var BUSY_STATE = 113;
var FINISH_STATE = 666;

var BS_NEED_MORE      = 1; /* block not completed, need more input or more output */
var BS_BLOCK_DONE     = 2; /* block flush performed */
var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */
var BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */

var OS_CODE = 0x03; // Unix :) . Don't detect, use this default.

function err(strm, errorCode) {
  strm.msg = msg[errorCode];
  return errorCode;
}

function rank(f) {
  return ((f) << 1) - ((f) > 4 ? 9 : 0);
}

function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }


/* =========================================================================
 * Flush as much pending output as possible. All deflate() output goes
 * through this function so some applications may wish to modify it
 * to avoid allocating a large strm->output buffer and copying into it.
 * (See also read_buf()).
 */
function flush_pending(strm) {
  var s = strm.state;

  //_tr_flush_bits(s);
  var len = s.pending;
  if (len > strm.avail_out) {
    len = strm.avail_out;
  }
  if (len === 0) { return; }

  utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);
  strm.next_out += len;
  s.pending_out += len;
  strm.total_out += len;
  strm.avail_out -= len;
  s.pending -= len;
  if (s.pending === 0) {
    s.pending_out = 0;
  }
}


function flush_block_only(s, last) {
  trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);
  s.block_start = s.strstart;
  flush_pending(s.strm);
}


function put_byte(s, b) {
  s.pending_buf[s.pending++] = b;
}


/* =========================================================================
 * Put a short in the pending buffer. The 16-bit value is put in MSB order.
 * IN assertion: the stream state is correct and there is enough room in
 * pending_buf.
 */
function putShortMSB(s, b) {
//  put_byte(s, (Byte)(b >> 8));
//  put_byte(s, (Byte)(b & 0xff));
  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;
  s.pending_buf[s.pending++] = b & 0xff;
}


/* ===========================================================================
 * Read a new buffer from the current input stream, update the adler32
 * and total number of bytes read.  All deflate() input goes through
 * this function so some applications may wish to modify it to avoid
 * allocating a large strm->input buffer and copying from it.
 * (See also flush_pending()).
 */
function read_buf(strm, buf, start, size) {
  var len = strm.avail_in;

  if (len > size) { len = size; }
  if (len === 0) { return 0; }

  strm.avail_in -= len;

  // zmemcpy(buf, strm->next_in, len);
  utils.arraySet(buf, strm.input, strm.next_in, len, start);
  if (strm.state.wrap === 1) {
    strm.adler = adler32(strm.adler, buf, len, start);
  }

  else if (strm.state.wrap === 2) {
    strm.adler = crc32(strm.adler, buf, len, start);
  }

  strm.next_in += len;
  strm.total_in += len;

  return len;
}


/* ===========================================================================
 * Set match_start to the longest match starting at the given string and
 * return its length. Matches shorter or equal to prev_length are discarded,
 * in which case the result is equal to prev_length and match_start is
 * garbage.
 * IN assertions: cur_match is the head of the hash chain for the current
 *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
 * OUT assertion: the match length is not greater than s->lookahead.
 */
function longest_match(s, cur_match) {
  var chain_length = s.max_chain_length;      /* max hash chain length */
  var scan = s.strstart; /* current string */
  var match;                       /* matched string */
  var len;                           /* length of current match */
  var best_len = s.prev_length;              /* best match length so far */
  var nice_match = s.nice_match;             /* stop if match long enough */
  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?
      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;

  var _win = s.window; // shortcut

  var wmask = s.w_mask;
  var prev  = s.prev;

  /* Stop when cur_match becomes <= limit. To simplify the code,
   * we prevent matches with the string of window index 0.
   */

  var strend = s.strstart + MAX_MATCH;
  var scan_end1  = _win[scan + best_len - 1];
  var scan_end   = _win[scan + best_len];

  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
   * It is easy to get rid of this optimization if necessary.
   */
  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");

  /* Do not waste too much time if we already have a good match: */
  if (s.prev_length >= s.good_match) {
    chain_length >>= 2;
  }
  /* Do not look for matches beyond the end of the input. This is necessary
   * to make deflate deterministic.
   */
  if (nice_match > s.lookahead) { nice_match = s.lookahead; }

  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");

  do {
    // Assert(cur_match < s->strstart, "no future");
    match = cur_match;

    /* Skip to next match if the match length cannot increase
     * or if the match length is less than 2.  Note that the checks below
     * for insufficient lookahead only occur occasionally for performance
     * reasons.  Therefore uninitialized memory will be accessed, and
     * conditional jumps will be made that depend on those values.
     * However the length of the match is limited to the lookahead, so
     * the output of deflate is not affected by the uninitialized values.
     */

    if (_win[match + best_len]     !== scan_end  ||
        _win[match + best_len - 1] !== scan_end1 ||
        _win[match]                !== _win[scan] ||
        _win[++match]              !== _win[scan + 1]) {
      continue;
    }

    /* The check at best_len-1 can be removed because it will be made
     * again later. (This heuristic is not always a win.)
     * It is not necessary to compare scan[2] and match[2] since they
     * are always equal when the other bytes match, given that
     * the hash keys are equal and that HASH_BITS >= 8.
     */
    scan += 2;
    match++;
    // Assert(*scan == *match, "match[2]?");

    /* We check for insufficient lookahead only every 8th comparison;
     * the 256th check will be made at strstart+258.
     */
    do {
      /*jshint noempty:false*/
    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
             scan < strend);

    // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");

    len = MAX_MATCH - (strend - scan);
    scan = strend - MAX_MATCH;

    if (len > best_len) {
      s.match_start = cur_match;
      best_len = len;
      if (len >= nice_match) {
        break;
      }
      scan_end1  = _win[scan + best_len - 1];
      scan_end   = _win[scan + best_len];
    }
  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);

  if (best_len <= s.lookahead) {
    return best_len;
  }
  return s.lookahead;
}


/* ===========================================================================
 * Fill the window when the lookahead becomes insufficient.
 * Updates strstart and lookahead.
 *
 * IN assertion: lookahead < MIN_LOOKAHEAD
 * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
 *    At least one byte has been read, or avail_in == 0; reads are
 *    performed for at least two bytes (required for the zip translate_eol
 *    option -- not supported here).
 */
function fill_window(s) {
  var _w_size = s.w_size;
  var p, n, m, more, str;

  //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");

  do {
    more = s.window_size - s.lookahead - s.strstart;

    // JS ints have 32 bit, block below not needed
    /* Deal with !@#$% 64K limit: */
    //if (sizeof(int) <= 2) {
    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
    //        more = wsize;
    //
    //  } else if (more == (unsigned)(-1)) {
    //        /* Very unlikely, but possible on 16 bit machine if
    //         * strstart == 0 && lookahead == 1 (input done a byte at time)
    //         */
    //        more--;
    //    }
    //}


    /* If the window is almost full and there is insufficient lookahead,
     * move the upper half to the lower one to make room in the upper half.
     */
    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {

      utils.arraySet(s.window, s.window, _w_size, _w_size, 0);
      s.match_start -= _w_size;
      s.strstart -= _w_size;
      /* we now have strstart >= MAX_DIST */
      s.block_start -= _w_size;

      /* Slide the hash table (could be avoided with 32 bit values
       at the expense of memory usage). We slide even when level == 0
       to keep the hash table consistent if we switch back to level > 0
       later. (Using level 0 permanently is not an optimal usage of
       zlib, so we don't care about this pathological case.)
       */

      n = s.hash_size;
      p = n;
      do {
        m = s.head[--p];
        s.head[p] = (m >= _w_size ? m - _w_size : 0);
      } while (--n);

      n = _w_size;
      p = n;
      do {
        m = s.prev[--p];
        s.prev[p] = (m >= _w_size ? m - _w_size : 0);
        /* If n is not on any hash chain, prev[n] is garbage but
         * its value will never be used.
         */
      } while (--n);

      more += _w_size;
    }
    if (s.strm.avail_in === 0) {
      break;
    }

    /* If there was no sliding:
     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
     *    more == window_size - lookahead - strstart
     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
     * => more >= window_size - 2*WSIZE + 2
     * In the BIG_MEM or MMAP case (not yet supported),
     *   window_size == input_size + MIN_LOOKAHEAD  &&
     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
     * Otherwise, window_size == 2*WSIZE so more >= 2.
     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
     */
    //Assert(more >= 2, "more < 2");
    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
    s.lookahead += n;

    /* Initialize the hash value now that we have some input: */
    if (s.lookahead + s.insert >= MIN_MATCH) {
      str = s.strstart - s.insert;
      s.ins_h = s.window[str];

      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */
      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;
//#if MIN_MATCH != 3
//        Call update_hash() MIN_MATCH-3 more times
//#endif
      while (s.insert) {
        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;

        s.prev[str & s.w_mask] = s.head[s.ins_h];
        s.head[s.ins_h] = str;
        str++;
        s.insert--;
        if (s.lookahead + s.insert < MIN_MATCH) {
          break;
        }
      }
    }
    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
     * but this is not important since only literal bytes will be emitted.
     */

  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);

  /* If the WIN_INIT bytes after the end of the current data have never been
   * written, then zero those bytes in order to avoid memory check reports of
   * the use of uninitialized (or uninitialised as Julian writes) bytes by
   * the longest match routines.  Update the high water mark for the next
   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match
   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
   */
//  if (s.high_water < s.window_size) {
//    var curr = s.strstart + s.lookahead;
//    var init = 0;
//
//    if (s.high_water < curr) {
//      /* Previous high water mark below current data -- zero WIN_INIT
//       * bytes or up to end of window, whichever is less.
//       */
//      init = s.window_size - curr;
//      if (init > WIN_INIT)
//        init = WIN_INIT;
//      zmemzero(s->window + curr, (unsigned)init);
//      s->high_water = curr + init;
//    }
//    else if (s->high_water < (ulg)curr + WIN_INIT) {
//      /* High water mark at or above current data, but below current data
//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
//       * to end of window, whichever is less.
//       */
//      init = (ulg)curr + WIN_INIT - s->high_water;
//      if (init > s->window_size - s->high_water)
//        init = s->window_size - s->high_water;
//      zmemzero(s->window + s->high_water, (unsigned)init);
//      s->high_water += init;
//    }
//  }
//
//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
//    "not enough room for search");
}

/* ===========================================================================
 * Copy without compression as much as possible from the input stream, return
 * the current block state.
 * This function does not insert new strings in the dictionary since
 * uncompressible data is probably not useful. This function is used
 * only for the level=0 compression option.
 * NOTE: this function should be optimized to avoid extra copying from
 * window to pending_buf.
 */
function deflate_stored(s, flush) {
  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
   * to pending_buf_size, and each stored block has a 5 byte header:
   */
  var max_block_size = 0xffff;

  if (max_block_size > s.pending_buf_size - 5) {
    max_block_size = s.pending_buf_size - 5;
  }

  /* Copy as much as possible from input to output: */
  for (;;) {
    /* Fill the window as much as possible: */
    if (s.lookahead <= 1) {

      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||
      //  s->block_start >= (long)s->w_size, "slide too late");
//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||
//        s.block_start >= s.w_size)) {
//        throw  new Error("slide too late");
//      }

      fill_window(s);
      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {
        return BS_NEED_MORE;
      }

      if (s.lookahead === 0) {
        break;
      }
      /* flush the current block */
    }
    //Assert(s->block_start >= 0L, "block gone");
//    if (s.block_start < 0) throw new Error("block gone");

    s.strstart += s.lookahead;
    s.lookahead = 0;

    /* Emit a stored block if pending_buf will be full: */
    var max_start = s.block_start + max_block_size;

    if (s.strstart === 0 || s.strstart >= max_start) {
      /* strstart == 0 is possible when wraparound on 16-bit machine */
      s.lookahead = s.strstart - max_start;
      s.strstart = max_start;
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/


    }
    /* Flush if we may have to slide, otherwise block_start may become
     * negative and the data will be gone:
     */
    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/
    }
  }

  s.insert = 0;

  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }

  if (s.strstart > s.block_start) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }

  return BS_NEED_MORE;
}

/* ===========================================================================
 * Compress as much as possible from the input stream, return the current
 * block state.
 * This function does not perform lazy evaluation of matches and inserts
 * new strings in the dictionary only for unmatched strings or for short
 * matches. It is used only for the fast compression options.
 */
function deflate_fast(s, flush) {
  var hash_head;        /* head of the hash chain */
  var bflush;           /* set if current block must be flushed */

  for (;;) {
    /* Make sure that we always have enough lookahead, except
     * at the end of the input file. We need MAX_MATCH bytes
     * for the next match, plus MIN_MATCH bytes to insert the
     * string following the next match.
     */
    if (s.lookahead < MIN_LOOKAHEAD) {
      fill_window(s);
      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
        return BS_NEED_MORE;
      }
      if (s.lookahead === 0) {
        break; /* flush the current block */
      }
    }

    /* Insert the string window[strstart .. strstart+2] in the
     * dictionary, and set hash_head to the head of the hash chain:
     */
    hash_head = 0/*NIL*/;
    if (s.lookahead >= MIN_MATCH) {
      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
      s.head[s.ins_h] = s.strstart;
      /***/
    }

    /* Find the longest match, discarding those <= prev_length.
     * At this point we have always match_length < MIN_MATCH
     */
    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {
      /* To simplify the code, we prevent matches with the string
       * of window index 0 (in particular we have to avoid a match
       * of the string with itself at the start of the input file).
       */
      s.match_length = longest_match(s, hash_head);
      /* longest_match() sets match_start */
    }
    if (s.match_length >= MIN_MATCH) {
      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only

      /*** _tr_tally_dist(s, s.strstart - s.match_start,
                     s.match_length - MIN_MATCH, bflush); ***/
      bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);

      s.lookahead -= s.match_length;

      /* Insert new strings in the hash table only if the match length
       * is not too large. This saves time but degrades compression.
       */
      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {
        s.match_length--; /* string at strstart already in table */
        do {
          s.strstart++;
          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
          s.head[s.ins_h] = s.strstart;
          /***/
          /* strstart never exceeds WSIZE-MAX_MATCH, so there are
           * always MIN_MATCH bytes ahead.
           */
        } while (--s.match_length !== 0);
        s.strstart++;
      } else
      {
        s.strstart += s.match_length;
        s.match_length = 0;
        s.ins_h = s.window[s.strstart];
        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;

//#if MIN_MATCH != 3
//                Call UPDATE_HASH() MIN_MATCH-3 more times
//#endif
        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
         * matter since it will be recomputed at next deflate call.
         */
      }
    } else {
      /* No match, output a literal byte */
      //Tracevv((stderr,"%c", s.window[s.strstart]));
      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);

      s.lookahead--;
      s.strstart++;
    }
    if (bflush) {
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/
    }
  }
  s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);
  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }
  if (s.last_lit) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }
  return BS_BLOCK_DONE;
}

/* ===========================================================================
 * Same as above, but achieves better compression. We use a lazy
 * evaluation for matches: a match is finally adopted only if there is
 * no better match at the next window position.
 */
function deflate_slow(s, flush) {
  var hash_head;          /* head of hash chain */
  var bflush;              /* set if current block must be flushed */

  var max_insert;

  /* Process the input block. */
  for (;;) {
    /* Make sure that we always have enough lookahead, except
     * at the end of the input file. We need MAX_MATCH bytes
     * for the next match, plus MIN_MATCH bytes to insert the
     * string following the next match.
     */
    if (s.lookahead < MIN_LOOKAHEAD) {
      fill_window(s);
      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
        return BS_NEED_MORE;
      }
      if (s.lookahead === 0) { break; } /* flush the current block */
    }

    /* Insert the string window[strstart .. strstart+2] in the
     * dictionary, and set hash_head to the head of the hash chain:
     */
    hash_head = 0/*NIL*/;
    if (s.lookahead >= MIN_MATCH) {
      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
      s.head[s.ins_h] = s.strstart;
      /***/
    }

    /* Find the longest match, discarding those <= prev_length.
     */
    s.prev_length = s.match_length;
    s.prev_match = s.match_start;
    s.match_length = MIN_MATCH - 1;

    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&
        s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {
      /* To simplify the code, we prevent matches with the string
       * of window index 0 (in particular we have to avoid a match
       * of the string with itself at the start of the input file).
       */
      s.match_length = longest_match(s, hash_head);
      /* longest_match() sets match_start */

      if (s.match_length <= 5 &&
         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {

        /* If prev_match is also MIN_MATCH, match_start is garbage
         * but we will ignore the current match anyway.
         */
        s.match_length = MIN_MATCH - 1;
      }
    }
    /* If there was a match at the previous step and the current
     * match is not better, output the previous match:
     */
    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {
      max_insert = s.strstart + s.lookahead - MIN_MATCH;
      /* Do not insert strings in hash table beyond this. */

      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);

      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
                     s.prev_length - MIN_MATCH, bflush);***/
      bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);
      /* Insert in hash table all strings up to the end of the match.
       * strstart-1 and strstart are already inserted. If there is not
       * enough lookahead, the last two strings are not inserted in
       * the hash table.
       */
      s.lookahead -= s.prev_length - 1;
      s.prev_length -= 2;
      do {
        if (++s.strstart <= max_insert) {
          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
          s.head[s.ins_h] = s.strstart;
          /***/
        }
      } while (--s.prev_length !== 0);
      s.match_available = 0;
      s.match_length = MIN_MATCH - 1;
      s.strstart++;

      if (bflush) {
        /*** FLUSH_BLOCK(s, 0); ***/
        flush_block_only(s, false);
        if (s.strm.avail_out === 0) {
          return BS_NEED_MORE;
        }
        /***/
      }

    } else if (s.match_available) {
      /* If there was no match at the previous position, output a
       * single literal. If there was a match but the current match
       * is longer, truncate the previous match to a single literal.
       */
      //Tracevv((stderr,"%c", s->window[s->strstart-1]));
      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
      bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);

      if (bflush) {
        /*** FLUSH_BLOCK_ONLY(s, 0) ***/
        flush_block_only(s, false);
        /***/
      }
      s.strstart++;
      s.lookahead--;
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
    } else {
      /* There is no previous match to compare with, wait for
       * the next step to decide.
       */
      s.match_available = 1;
      s.strstart++;
      s.lookahead--;
    }
  }
  //Assert (flush != Z_NO_FLUSH, "no flush?");
  if (s.match_available) {
    //Tracevv((stderr,"%c", s->window[s->strstart-1]));
    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
    bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);

    s.match_available = 0;
  }
  s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;
  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }
  if (s.last_lit) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }

  return BS_BLOCK_DONE;
}


/* ===========================================================================
 * For Z_RLE, simply look for runs of bytes, generate matches only of distance
 * one.  Do not maintain a hash table.  (It will be regenerated if this run of
 * deflate switches away from Z_RLE.)
 */
function deflate_rle(s, flush) {
  var bflush;            /* set if current block must be flushed */
  var prev;              /* byte at distance one to match */
  var scan, strend;      /* scan goes up to strend for length of run */

  var _win = s.window;

  for (;;) {
    /* Make sure that we always have enough lookahead, except
     * at the end of the input file. We need MAX_MATCH bytes
     * for the longest run, plus one for the unrolled loop.
     */
    if (s.lookahead <= MAX_MATCH) {
      fill_window(s);
      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {
        return BS_NEED_MORE;
      }
      if (s.lookahead === 0) { break; } /* flush the current block */
    }

    /* See how many times the previous byte repeats */
    s.match_length = 0;
    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {
      scan = s.strstart - 1;
      prev = _win[scan];
      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
        strend = s.strstart + MAX_MATCH;
        do {
          /*jshint noempty:false*/
        } while (prev === _win[++scan] && prev === _win[++scan] &&
                 prev === _win[++scan] && prev === _win[++scan] &&
                 prev === _win[++scan] && prev === _win[++scan] &&
                 prev === _win[++scan] && prev === _win[++scan] &&
                 scan < strend);
        s.match_length = MAX_MATCH - (strend - scan);
        if (s.match_length > s.lookahead) {
          s.match_length = s.lookahead;
        }
      }
      //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
    }

    /* Emit match if have run of MIN_MATCH or longer, else emit literal */
    if (s.match_length >= MIN_MATCH) {
      //check_match(s, s.strstart, s.strstart - 1, s.match_length);

      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
      bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);

      s.lookahead -= s.match_length;
      s.strstart += s.match_length;
      s.match_length = 0;
    } else {
      /* No match, output a literal byte */
      //Tracevv((stderr,"%c", s->window[s->strstart]));
      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);

      s.lookahead--;
      s.strstart++;
    }
    if (bflush) {
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/
    }
  }
  s.insert = 0;
  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }
  if (s.last_lit) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }
  return BS_BLOCK_DONE;
}

/* ===========================================================================
 * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.
 * (It will be regenerated if this run of deflate switches away from Huffman.)
 */
function deflate_huff(s, flush) {
  var bflush;             /* set if current block must be flushed */

  for (;;) {
    /* Make sure that we have a literal to write. */
    if (s.lookahead === 0) {
      fill_window(s);
      if (s.lookahead === 0) {
        if (flush === Z_NO_FLUSH) {
          return BS_NEED_MORE;
        }
        break;      /* flush the current block */
      }
    }

    /* Output a literal byte */
    s.match_length = 0;
    //Tracevv((stderr,"%c", s->window[s->strstart]));
    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
    bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
    s.lookahead--;
    s.strstart++;
    if (bflush) {
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/
    }
  }
  s.insert = 0;
  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }
  if (s.last_lit) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }
  return BS_BLOCK_DONE;
}

/* Values for max_lazy_match, good_match and max_chain_length, depending on
 * the desired pack level (0..9). The values given below have been tuned to
 * exclude worst case performance for pathological files. Better values may be
 * found for specific files.
 */
function Config(good_length, max_lazy, nice_length, max_chain, func) {
  this.good_length = good_length;
  this.max_lazy = max_lazy;
  this.nice_length = nice_length;
  this.max_chain = max_chain;
  this.func = func;
}

var configuration_table;

configuration_table = [
  /*      good lazy nice chain */
  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */
  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */
  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */
  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */

  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */
  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */
  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */
  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */
  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */
  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */
];


/* ===========================================================================
 * Initialize the "longest match" routines for a new zlib stream
 */
function lm_init(s) {
  s.window_size = 2 * s.w_size;

  /*** CLEAR_HASH(s); ***/
  zero(s.head); // Fill with NIL (= 0);

  /* Set the default configuration parameters:
   */
  s.max_lazy_match = configuration_table[s.level].max_lazy;
  s.good_match = configuration_table[s.level].good_length;
  s.nice_match = configuration_table[s.level].nice_length;
  s.max_chain_length = configuration_table[s.level].max_chain;

  s.strstart = 0;
  s.block_start = 0;
  s.lookahead = 0;
  s.insert = 0;
  s.match_length = s.prev_length = MIN_MATCH - 1;
  s.match_available = 0;
  s.ins_h = 0;
}


function DeflateState() {
  this.strm = null;            /* pointer back to this zlib stream */
  this.status = 0;            /* as the name implies */
  this.pending_buf = null;      /* output still pending */
  this.pending_buf_size = 0;  /* size of pending_buf */
  this.pending_out = 0;       /* next pending byte to output to the stream */
  this.pending = 0;           /* nb of bytes in the pending buffer */
  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
  this.gzhead = null;         /* gzip header information to write */
  this.gzindex = 0;           /* where in extra, name, or comment */
  this.method = Z_DEFLATED; /* can only be DEFLATED */
  this.last_flush = -1;   /* value of flush param for previous deflate call */

  this.w_size = 0;  /* LZ77 window size (32K by default) */
  this.w_bits = 0;  /* log2(w_size)  (8..16) */
  this.w_mask = 0;  /* w_size - 1 */

  this.window = null;
  /* Sliding window. Input bytes are read into the second half of the window,
   * and move to the first half later to keep a dictionary of at least wSize
   * bytes. With this organization, matches are limited to a distance of
   * wSize-MAX_MATCH bytes, but this ensures that IO is always
   * performed with a length multiple of the block size.
   */

  this.window_size = 0;
  /* Actual size of window: 2*wSize, except when the user input buffer
   * is directly used as sliding window.
   */

  this.prev = null;
  /* Link to older string with same hash index. To limit the size of this
   * array to 64K, this link is maintained only for the last 32K strings.
   * An index in this array is thus a window index modulo 32K.
   */

  this.head = null;   /* Heads of the hash chains or NIL. */

  this.ins_h = 0;       /* hash index of string to be inserted */
  this.hash_size = 0;   /* number of elements in hash table */
  this.hash_bits = 0;   /* log2(hash_size) */
  this.hash_mask = 0;   /* hash_size-1 */

  this.hash_shift = 0;
  /* Number of bits by which ins_h must be shifted at each input
   * step. It must be such that after MIN_MATCH steps, the oldest
   * byte no longer takes part in the hash key, that is:
   *   hash_shift * MIN_MATCH >= hash_bits
   */

  this.block_start = 0;
  /* Window position at the beginning of the current output block. Gets
   * negative when the window is moved backwards.
   */

  this.match_length = 0;      /* length of best match */
  this.prev_match = 0;        /* previous match */
  this.match_available = 0;   /* set if previous match exists */
  this.strstart = 0;          /* start of string to insert */
  this.match_start = 0;       /* start of matching string */
  this.lookahead = 0;         /* number of valid bytes ahead in window */

  this.prev_length = 0;
  /* Length of the best match at previous step. Matches not greater than this
   * are discarded. This is used in the lazy match evaluation.
   */

  this.max_chain_length = 0;
  /* To speed up deflation, hash chains are never searched beyond this
   * length.  A higher limit improves compression ratio but degrades the
   * speed.
   */

  this.max_lazy_match = 0;
  /* Attempt to find a better match only when the current match is strictly
   * smaller than this value. This mechanism is used only for compression
   * levels >= 4.
   */
  // That's alias to max_lazy_match, don't use directly
  //this.max_insert_length = 0;
  /* Insert new strings in the hash table only if the match length is not
   * greater than this length. This saves time but degrades compression.
   * max_insert_length is used only for compression levels <= 3.
   */

  this.level = 0;     /* compression level (1..9) */
  this.strategy = 0;  /* favor or force Huffman coding*/

  this.good_match = 0;
  /* Use a faster search when the previous match is longer than this */

  this.nice_match = 0; /* Stop searching when current match exceeds this */

              /* used by trees.c: */

  /* Didn't use ct_data typedef below to suppress compiler warning */

  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */

  // Use flat array of DOUBLE size, with interleaved fata,
  // because JS does not support effective
  this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);
  this.dyn_dtree  = new utils.Buf16((2 * D_CODES + 1) * 2);
  this.bl_tree    = new utils.Buf16((2 * BL_CODES + 1) * 2);
  zero(this.dyn_ltree);
  zero(this.dyn_dtree);
  zero(this.bl_tree);

  this.l_desc   = null;         /* desc. for literal tree */
  this.d_desc   = null;         /* desc. for distance tree */
  this.bl_desc  = null;         /* desc. for bit length tree */

  //ush bl_count[MAX_BITS+1];
  this.bl_count = new utils.Buf16(MAX_BITS + 1);
  /* number of codes at each bit length for an optimal tree */

  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
  this.heap = new utils.Buf16(2 * L_CODES + 1);  /* heap used to build the Huffman trees */
  zero(this.heap);

  this.heap_len = 0;               /* number of elements in the heap */
  this.heap_max = 0;               /* element of largest frequency */
  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
   * The same heap array is used to build all trees.
   */

  this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];
  zero(this.depth);
  /* Depth of each subtree used as tie breaker for trees of equal frequency
   */

  this.l_buf = 0;          /* buffer index for literals or lengths */

  this.lit_bufsize = 0;
  /* Size of match buffer for literals/lengths.  There are 4 reasons for
   * limiting lit_bufsize to 64K:
   *   - frequencies can be kept in 16 bit counters
   *   - if compression is not successful for the first block, all input
   *     data is still in the window so we can still emit a stored block even
   *     when input comes from standard input.  (This can also be done for
   *     all blocks if lit_bufsize is not greater than 32K.)
   *   - if compression is not successful for a file smaller than 64K, we can
   *     even emit a stored file instead of a stored block (saving 5 bytes).
   *     This is applicable only for zip (not gzip or zlib).
   *   - creating new Huffman trees less frequently may not provide fast
   *     adaptation to changes in the input data statistics. (Take for
   *     example a binary file with poorly compressible code followed by
   *     a highly compressible string table.) Smaller buffer sizes give
   *     fast adaptation but have of course the overhead of transmitting
   *     trees more frequently.
   *   - I can't count above 4
   */

  this.last_lit = 0;      /* running index in l_buf */

  this.d_buf = 0;
  /* Buffer index for distances. To simplify the code, d_buf and l_buf have
   * the same number of elements. To use different lengths, an extra flag
   * array would be necessary.
   */

  this.opt_len = 0;       /* bit length of current block with optimal trees */
  this.static_len = 0;    /* bit length of current block with static trees */
  this.matches = 0;       /* number of string matches in current block */
  this.insert = 0;        /* bytes at end of window left to insert */


  this.bi_buf = 0;
  /* Output buffer. bits are inserted starting at the bottom (least
   * significant bits).
   */
  this.bi_valid = 0;
  /* Number of valid bits in bi_buf.  All bits above the last valid bit
   * are always zero.
   */

  // Used for window memory init. We safely ignore it for JS. That makes
  // sense only for pointers and memory check tools.
  //this.high_water = 0;
  /* High water mark offset in window for initialized bytes -- bytes above
   * this are set to zero in order to avoid memory check warnings when
   * longest match routines access bytes past the input.  This is then
   * updated to the new high water mark.
   */
}


function deflateResetKeep(strm) {
  var s;

  if (!strm || !strm.state) {
    return err(strm, Z_STREAM_ERROR);
  }

  strm.total_in = strm.total_out = 0;
  strm.data_type = Z_UNKNOWN;

  s = strm.state;
  s.pending = 0;
  s.pending_out = 0;

  if (s.wrap < 0) {
    s.wrap = -s.wrap;
    /* was made negative by deflate(..., Z_FINISH); */
  }
  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);
  strm.adler = (s.wrap === 2) ?
    0  // crc32(0, Z_NULL, 0)
  :
    1; // adler32(0, Z_NULL, 0)
  s.last_flush = Z_NO_FLUSH;
  trees._tr_init(s);
  return Z_OK;
}


function deflateReset(strm) {
  var ret = deflateResetKeep(strm);
  if (ret === Z_OK) {
    lm_init(strm.state);
  }
  return ret;
}


function deflateSetHeader(strm, head) {
  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }
  strm.state.gzhead = head;
  return Z_OK;
}


function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {
  if (!strm) { // === Z_NULL
    return Z_STREAM_ERROR;
  }
  var wrap = 1;

  if (level === Z_DEFAULT_COMPRESSION) {
    level = 6;
  }

  if (windowBits < 0) { /* suppress zlib wrapper */
    wrap = 0;
    windowBits = -windowBits;
  }

  else if (windowBits > 15) {
    wrap = 2;           /* write gzip wrapper instead */
    windowBits -= 16;
  }


  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||
    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
    strategy < 0 || strategy > Z_FIXED) {
    return err(strm, Z_STREAM_ERROR);
  }


  if (windowBits === 8) {
    windowBits = 9;
  }
  /* until 256-byte window bug fixed */

  var s = new DeflateState();

  strm.state = s;
  s.strm = strm;

  s.wrap = wrap;
  s.gzhead = null;
  s.w_bits = windowBits;
  s.w_size = 1 << s.w_bits;
  s.w_mask = s.w_size - 1;

  s.hash_bits = memLevel + 7;
  s.hash_size = 1 << s.hash_bits;
  s.hash_mask = s.hash_size - 1;
  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);

  s.window = new utils.Buf8(s.w_size * 2);
  s.head = new utils.Buf16(s.hash_size);
  s.prev = new utils.Buf16(s.w_size);

  // Don't need mem init magic for JS.
  //s.high_water = 0;  /* nothing written to s->window yet */

  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */

  s.pending_buf_size = s.lit_bufsize * 4;

  //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
  //s->pending_buf = (uchf *) overlay;
  s.pending_buf = new utils.Buf8(s.pending_buf_size);

  // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)
  //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
  s.d_buf = 1 * s.lit_bufsize;

  //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
  s.l_buf = (1 + 2) * s.lit_bufsize;

  s.level = level;
  s.strategy = strategy;
  s.method = method;

  return deflateReset(strm);
}

function deflateInit(strm, level) {
  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
}


function deflate(strm, flush) {
  var old_flush, s;
  var beg, val; // for gzip header write only

  if (!strm || !strm.state ||
    flush > Z_BLOCK || flush < 0) {
    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;
  }

  s = strm.state;

  if (!strm.output ||
      (!strm.input && strm.avail_in !== 0) ||
      (s.status === FINISH_STATE && flush !== Z_FINISH)) {
    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);
  }

  s.strm = strm; /* just in case */
  old_flush = s.last_flush;
  s.last_flush = flush;

  /* Write the header */
  if (s.status === INIT_STATE) {

    if (s.wrap === 2) { // GZIP header
      strm.adler = 0;  //crc32(0L, Z_NULL, 0);
      put_byte(s, 31);
      put_byte(s, 139);
      put_byte(s, 8);
      if (!s.gzhead) { // s->gzhead == Z_NULL
        put_byte(s, 0);
        put_byte(s, 0);
        put_byte(s, 0);
        put_byte(s, 0);
        put_byte(s, 0);
        put_byte(s, s.level === 9 ? 2 :
                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
                     4 : 0));
        put_byte(s, OS_CODE);
        s.status = BUSY_STATE;
      }
      else {
        put_byte(s, (s.gzhead.text ? 1 : 0) +
                    (s.gzhead.hcrc ? 2 : 0) +
                    (!s.gzhead.extra ? 0 : 4) +
                    (!s.gzhead.name ? 0 : 8) +
                    (!s.gzhead.comment ? 0 : 16)
                );
        put_byte(s, s.gzhead.time & 0xff);
        put_byte(s, (s.gzhead.time >> 8) & 0xff);
        put_byte(s, (s.gzhead.time >> 16) & 0xff);
        put_byte(s, (s.gzhead.time >> 24) & 0xff);
        put_byte(s, s.level === 9 ? 2 :
                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
                     4 : 0));
        put_byte(s, s.gzhead.os & 0xff);
        if (s.gzhead.extra && s.gzhead.extra.length) {
          put_byte(s, s.gzhead.extra.length & 0xff);
          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);
        }
        if (s.gzhead.hcrc) {
          strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);
        }
        s.gzindex = 0;
        s.status = EXTRA_STATE;
      }
    }
    else // DEFLATE header
    {
      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;
      var level_flags = -1;

      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {
        level_flags = 0;
      } else if (s.level < 6) {
        level_flags = 1;
      } else if (s.level === 6) {
        level_flags = 2;
      } else {
        level_flags = 3;
      }
      header |= (level_flags << 6);
      if (s.strstart !== 0) { header |= PRESET_DICT; }
      header += 31 - (header % 31);

      s.status = BUSY_STATE;
      putShortMSB(s, header);

      /* Save the adler32 of the preset dictionary: */
      if (s.strstart !== 0) {
        putShortMSB(s, strm.adler >>> 16);
        putShortMSB(s, strm.adler & 0xffff);
      }
      strm.adler = 1; // adler32(0L, Z_NULL, 0);
    }
  }

//#ifdef GZIP
  if (s.status === EXTRA_STATE) {
    if (s.gzhead.extra/* != Z_NULL*/) {
      beg = s.pending;  /* start of bytes to update crc */

      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {
        if (s.pending === s.pending_buf_size) {
          if (s.gzhead.hcrc && s.pending > beg) {
            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
          }
          flush_pending(strm);
          beg = s.pending;
          if (s.pending === s.pending_buf_size) {
            break;
          }
        }
        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);
        s.gzindex++;
      }
      if (s.gzhead.hcrc && s.pending > beg) {
        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
      }
      if (s.gzindex === s.gzhead.extra.length) {
        s.gzindex = 0;
        s.status = NAME_STATE;
      }
    }
    else {
      s.status = NAME_STATE;
    }
  }
  if (s.status === NAME_STATE) {
    if (s.gzhead.name/* != Z_NULL*/) {
      beg = s.pending;  /* start of bytes to update crc */
      //int val;

      do {
        if (s.pending === s.pending_buf_size) {
          if (s.gzhead.hcrc && s.pending > beg) {
            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
          }
          flush_pending(strm);
          beg = s.pending;
          if (s.pending === s.pending_buf_size) {
            val = 1;
            break;
          }
        }
        // JS specific: little magic to add zero terminator to end of string
        if (s.gzindex < s.gzhead.name.length) {
          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;
        } else {
          val = 0;
        }
        put_byte(s, val);
      } while (val !== 0);

      if (s.gzhead.hcrc && s.pending > beg) {
        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
      }
      if (val === 0) {
        s.gzindex = 0;
        s.status = COMMENT_STATE;
      }
    }
    else {
      s.status = COMMENT_STATE;
    }
  }
  if (s.status === COMMENT_STATE) {
    if (s.gzhead.comment/* != Z_NULL*/) {
      beg = s.pending;  /* start of bytes to update crc */
      //int val;

      do {
        if (s.pending === s.pending_buf_size) {
          if (s.gzhead.hcrc && s.pending > beg) {
            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
          }
          flush_pending(strm);
          beg = s.pending;
          if (s.pending === s.pending_buf_size) {
            val = 1;
            break;
          }
        }
        // JS specific: little magic to add zero terminator to end of string
        if (s.gzindex < s.gzhead.comment.length) {
          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;
        } else {
          val = 0;
        }
        put_byte(s, val);
      } while (val !== 0);

      if (s.gzhead.hcrc && s.pending > beg) {
        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
      }
      if (val === 0) {
        s.status = HCRC_STATE;
      }
    }
    else {
      s.status = HCRC_STATE;
    }
  }
  if (s.status === HCRC_STATE) {
    if (s.gzhead.hcrc) {
      if (s.pending + 2 > s.pending_buf_size) {
        flush_pending(strm);
      }
      if (s.pending + 2 <= s.pending_buf_size) {
        put_byte(s, strm.adler & 0xff);
        put_byte(s, (strm.adler >> 8) & 0xff);
        strm.adler = 0; //crc32(0L, Z_NULL, 0);
        s.status = BUSY_STATE;
      }
    }
    else {
      s.status = BUSY_STATE;
    }
  }
//#endif

  /* Flush as much pending output as possible */
  if (s.pending !== 0) {
    flush_pending(strm);
    if (strm.avail_out === 0) {
      /* Since avail_out is 0, deflate will be called again with
       * more output space, but possibly with both pending and
       * avail_in equal to zero. There won't be anything to do,
       * but this is not an error situation so make sure we
       * return OK instead of BUF_ERROR at next call of deflate:
       */
      s.last_flush = -1;
      return Z_OK;
    }

    /* Make sure there is something to do and avoid duplicate consecutive
     * flushes. For repeated and useless calls with Z_FINISH, we keep
     * returning Z_STREAM_END instead of Z_BUF_ERROR.
     */
  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
    flush !== Z_FINISH) {
    return err(strm, Z_BUF_ERROR);
  }

  /* User must not provide more input after the first FINISH: */
  if (s.status === FINISH_STATE && strm.avail_in !== 0) {
    return err(strm, Z_BUF_ERROR);
  }

  /* Start a new block or continue the current one.
   */
  if (strm.avail_in !== 0 || s.lookahead !== 0 ||
    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {
    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :
      (s.strategy === Z_RLE ? deflate_rle(s, flush) :
        configuration_table[s.level].func(s, flush));

    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {
      s.status = FINISH_STATE;
    }
    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {
      if (strm.avail_out === 0) {
        s.last_flush = -1;
        /* avoid BUF_ERROR next call, see above */
      }
      return Z_OK;
      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
       * of deflate should use the same flush parameter to make sure
       * that the flush is complete. So we don't have to output an
       * empty block here, this will be done at next call. This also
       * ensures that for a very small output buffer, we emit at most
       * one empty block.
       */
    }
    if (bstate === BS_BLOCK_DONE) {
      if (flush === Z_PARTIAL_FLUSH) {
        trees._tr_align(s);
      }
      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */

        trees._tr_stored_block(s, 0, 0, false);
        /* For a full flush, this empty block will be recognized
         * as a special marker by inflate_sync().
         */
        if (flush === Z_FULL_FLUSH) {
          /*** CLEAR_HASH(s); ***/             /* forget history */
          zero(s.head); // Fill with NIL (= 0);

          if (s.lookahead === 0) {
            s.strstart = 0;
            s.block_start = 0;
            s.insert = 0;
          }
        }
      }
      flush_pending(strm);
      if (strm.avail_out === 0) {
        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */
        return Z_OK;
      }
    }
  }
  //Assert(strm->avail_out > 0, "bug2");
  //if (strm.avail_out <= 0) { throw new Error("bug2");}

  if (flush !== Z_FINISH) { return Z_OK; }
  if (s.wrap <= 0) { return Z_STREAM_END; }

  /* Write the trailer */
  if (s.wrap === 2) {
    put_byte(s, strm.adler & 0xff);
    put_byte(s, (strm.adler >> 8) & 0xff);
    put_byte(s, (strm.adler >> 16) & 0xff);
    put_byte(s, (strm.adler >> 24) & 0xff);
    put_byte(s, strm.total_in & 0xff);
    put_byte(s, (strm.total_in >> 8) & 0xff);
    put_byte(s, (strm.total_in >> 16) & 0xff);
    put_byte(s, (strm.total_in >> 24) & 0xff);
  }
  else
  {
    putShortMSB(s, strm.adler >>> 16);
    putShortMSB(s, strm.adler & 0xffff);
  }

  flush_pending(strm);
  /* If avail_out is zero, the application will call deflate again
   * to flush the rest.
   */
  if (s.wrap > 0) { s.wrap = -s.wrap; }
  /* write the trailer only once! */
  return s.pending !== 0 ? Z_OK : Z_STREAM_END;
}

function deflateEnd(strm) {
  var status;

  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
    return Z_STREAM_ERROR;
  }

  status = strm.state.status;
  if (status !== INIT_STATE &&
    status !== EXTRA_STATE &&
    status !== NAME_STATE &&
    status !== COMMENT_STATE &&
    status !== HCRC_STATE &&
    status !== BUSY_STATE &&
    status !== FINISH_STATE
  ) {
    return err(strm, Z_STREAM_ERROR);
  }

  strm.state = null;

  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;
}


/* =========================================================================
 * Initializes the compression dictionary from the given byte
 * sequence without producing any compressed output.
 */
function deflateSetDictionary(strm, dictionary) {
  var dictLength = dictionary.length;

  var s;
  var str, n;
  var wrap;
  var avail;
  var next;
  var input;
  var tmpDict;

  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
    return Z_STREAM_ERROR;
  }

  s = strm.state;
  wrap = s.wrap;

  if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {
    return Z_STREAM_ERROR;
  }

  /* when using zlib wrappers, compute Adler-32 for provided dictionary */
  if (wrap === 1) {
    /* adler32(strm->adler, dictionary, dictLength); */
    strm.adler = adler32(strm.adler, dictionary, dictLength, 0);
  }

  s.wrap = 0;   /* avoid computing Adler-32 in read_buf */

  /* if dictionary would fill window, just replace the history */
  if (dictLength >= s.w_size) {
    if (wrap === 0) {            /* already empty otherwise */
      /*** CLEAR_HASH(s); ***/
      zero(s.head); // Fill with NIL (= 0);
      s.strstart = 0;
      s.block_start = 0;
      s.insert = 0;
    }
    /* use the tail */
    // dictionary = dictionary.slice(dictLength - s.w_size);
    tmpDict = new utils.Buf8(s.w_size);
    utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);
    dictionary = tmpDict;
    dictLength = s.w_size;
  }
  /* insert dictionary into window and hash */
  avail = strm.avail_in;
  next = strm.next_in;
  input = strm.input;
  strm.avail_in = dictLength;
  strm.next_in = 0;
  strm.input = dictionary;
  fill_window(s);
  while (s.lookahead >= MIN_MATCH) {
    str = s.strstart;
    n = s.lookahead - (MIN_MATCH - 1);
    do {
      /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;

      s.prev[str & s.w_mask] = s.head[s.ins_h];

      s.head[s.ins_h] = str;
      str++;
    } while (--n);
    s.strstart = str;
    s.lookahead = MIN_MATCH - 1;
    fill_window(s);
  }
  s.strstart += s.lookahead;
  s.block_start = s.strstart;
  s.insert = s.lookahead;
  s.lookahead = 0;
  s.match_length = s.prev_length = MIN_MATCH - 1;
  s.match_available = 0;
  strm.next_in = next;
  strm.input = input;
  strm.avail_in = avail;
  s.wrap = wrap;
  return Z_OK;
}


exports.deflateInit = deflateInit;
exports.deflateInit2 = deflateInit2;
exports.deflateReset = deflateReset;
exports.deflateResetKeep = deflateResetKeep;
exports.deflateSetHeader = deflateSetHeader;
exports.deflate = deflate;
exports.deflateEnd = deflateEnd;
exports.deflateSetDictionary = deflateSetDictionary;
exports.deflateInfo = 'pako deflate (from Nodeca project)';

/* Not implemented
exports.deflateBound = deflateBound;
exports.deflateCopy = deflateCopy;
exports.deflateParams = deflateParams;
exports.deflatePending = deflatePending;
exports.deflatePrime = deflatePrime;
exports.deflateTune = deflateTune;
*/

},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(require,module,exports){
'use strict';

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

function GZheader() {
  /* true if compressed data believed to be text */
  this.text       = 0;
  /* modification time */
  this.time       = 0;
  /* extra flags (not used when writing a gzip file) */
  this.xflags     = 0;
  /* operating system */
  this.os         = 0;
  /* pointer to extra field or Z_NULL if none */
  this.extra      = null;
  /* extra field length (valid if extra != Z_NULL) */
  this.extra_len  = 0; // Actually, we don't need it in JS,
                       // but leave for few code modifications

  //
  // Setup limits is not necessary because in js we should not preallocate memory
  // for inflate use constant limit in 65536 bytes
  //

  /* space at extra (only when reading header) */
  // this.extra_max  = 0;
  /* pointer to zero-terminated file name or Z_NULL */
  this.name       = '';
  /* space at name (only when reading header) */
  // this.name_max   = 0;
  /* pointer to zero-terminated comment or Z_NULL */
  this.comment    = '';
  /* space at comment (only when reading header) */
  // this.comm_max   = 0;
  /* true if there was or will be a header crc */
  this.hcrc       = 0;
  /* true when done reading gzip header (not used when writing a gzip file) */
  this.done       = false;
}

module.exports = GZheader;

},{}],48:[function(require,module,exports){
'use strict';

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

// See state defs from inflate.js
var BAD = 30;       /* got a data error -- remain here until reset */
var TYPE = 12;      /* i: waiting for type bits, including last-flag bit */

/*
   Decode literal, length, and distance codes and write out the resulting
   literal and match bytes until either not enough input or output is
   available, an end-of-block is encountered, or a data error is encountered.
   When large enough input and output buffers are supplied to inflate(), for
   example, a 16K input buffer and a 64K output buffer, more than 95% of the
   inflate execution time is spent in this routine.

   Entry assumptions:

        state.mode === LEN
        strm.avail_in >= 6
        strm.avail_out >= 258
        start >= strm.avail_out
        state.bits < 8

   On return, state.mode is one of:

        LEN -- ran out of enough output space or enough available input
        TYPE -- reached end of block code, inflate() to interpret next block
        BAD -- error in block data

   Notes:

    - The maximum input bits used by a length/distance pair is 15 bits for the
      length code, 5 bits for the length extra, 15 bits for the distance code,
      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
      Therefore if strm.avail_in >= 6, then there is enough input to avoid
      checking for available input while decoding.

    - The maximum bytes that a single length/distance pair can output is 258
      bytes, which is the maximum length that can be coded.  inflate_fast()
      requires strm.avail_out >= 258 for each loop to avoid checking for
      output space.
 */
module.exports = function inflate_fast(strm, start) {
  var state;
  var _in;                    /* local strm.input */
  var last;                   /* have enough input while in < last */
  var _out;                   /* local strm.output */
  var beg;                    /* inflate()'s initial strm.output */
  var end;                    /* while out < end, enough space available */
//#ifdef INFLATE_STRICT
  var dmax;                   /* maximum distance from zlib header */
//#endif
  var wsize;                  /* window size or zero if not using window */
  var whave;                  /* valid bytes in the window */
  var wnext;                  /* window write index */
  // Use `s_window` instead `window`, avoid conflict with instrumentation tools
  var s_window;               /* allocated sliding window, if wsize != 0 */
  var hold;                   /* local strm.hold */
  var bits;                   /* local strm.bits */
  var lcode;                  /* local strm.lencode */
  var dcode;                  /* local strm.distcode */
  var lmask;                  /* mask for first level of length codes */
  var dmask;                  /* mask for first level of distance codes */
  var here;                   /* retrieved table entry */
  var op;                     /* code bits, operation, extra bits, or */
                              /*  window position, window bytes to copy */
  var len;                    /* match length, unused bytes */
  var dist;                   /* match distance */
  var from;                   /* where to copy match from */
  var from_source;


  var input, output; // JS specific, because we have no pointers

  /* copy state to local variables */
  state = strm.state;
  //here = state.here;
  _in = strm.next_in;
  input = strm.input;
  last = _in + (strm.avail_in - 5);
  _out = strm.next_out;
  output = strm.output;
  beg = _out - (start - strm.avail_out);
  end = _out + (strm.avail_out - 257);
//#ifdef INFLATE_STRICT
  dmax = state.dmax;
//#endif
  wsize = state.wsize;
  whave = state.whave;
  wnext = state.wnext;
  s_window = state.window;
  hold = state.hold;
  bits = state.bits;
  lcode = state.lencode;
  dcode = state.distcode;
  lmask = (1 << state.lenbits) - 1;
  dmask = (1 << state.distbits) - 1;


  /* decode literals and length/distances until end-of-block or not enough
     input data or output space */

  top:
  do {
    if (bits < 15) {
      hold += input[_in++] << bits;
      bits += 8;
      hold += input[_in++] << bits;
      bits += 8;
    }

    here = lcode[hold & lmask];

    dolen:
    for (;;) { // Goto emulation
      op = here >>> 24/*here.bits*/;
      hold >>>= op;
      bits -= op;
      op = (here >>> 16) & 0xff/*here.op*/;
      if (op === 0) {                          /* literal */
        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
        //        "inflate:         literal '%c'\n" :
        //        "inflate:         literal 0x%02x\n", here.val));
        output[_out++] = here & 0xffff/*here.val*/;
      }
      else if (op & 16) {                     /* length base */
        len = here & 0xffff/*here.val*/;
        op &= 15;                           /* number of extra bits */
        if (op) {
          if (bits < op) {
            hold += input[_in++] << bits;
            bits += 8;
          }
          len += hold & ((1 << op) - 1);
          hold >>>= op;
          bits -= op;
        }
        //Tracevv((stderr, "inflate:         length %u\n", len));
        if (bits < 15) {
          hold += input[_in++] << bits;
          bits += 8;
          hold += input[_in++] << bits;
          bits += 8;
        }
        here = dcode[hold & dmask];

        dodist:
        for (;;) { // goto emulation
          op = here >>> 24/*here.bits*/;
          hold >>>= op;
          bits -= op;
          op = (here >>> 16) & 0xff/*here.op*/;

          if (op & 16) {                      /* distance base */
            dist = here & 0xffff/*here.val*/;
            op &= 15;                       /* number of extra bits */
            if (bits < op) {
              hold += input[_in++] << bits;
              bits += 8;
              if (bits < op) {
                hold += input[_in++] << bits;
                bits += 8;
              }
            }
            dist += hold & ((1 << op) - 1);
//#ifdef INFLATE_STRICT
            if (dist > dmax) {
              strm.msg = 'invalid distance too far back';
              state.mode = BAD;
              break top;
            }
//#endif
            hold >>>= op;
            bits -= op;
            //Tracevv((stderr, "inflate:         distance %u\n", dist));
            op = _out - beg;                /* max distance in output */
            if (dist > op) {                /* see if copy from window */
              op = dist - op;               /* distance back in window */
              if (op > whave) {
                if (state.sane) {
                  strm.msg = 'invalid distance too far back';
                  state.mode = BAD;
                  break top;
                }

// (!) This block is disabled in zlib defailts,
// don't enable it for binary compatibility
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
//                if (len <= op - whave) {
//                  do {
//                    output[_out++] = 0;
//                  } while (--len);
//                  continue top;
//                }
//                len -= op - whave;
//                do {
//                  output[_out++] = 0;
//                } while (--op > whave);
//                if (op === 0) {
//                  from = _out - dist;
//                  do {
//                    output[_out++] = output[from++];
//                  } while (--len);
//                  continue top;
//                }
//#endif
              }
              from = 0; // window index
              from_source = s_window;
              if (wnext === 0) {           /* very common case */
                from += wsize - op;
                if (op < len) {         /* some from window */
                  len -= op;
                  do {
                    output[_out++] = s_window[from++];
                  } while (--op);
                  from = _out - dist;  /* rest from output */
                  from_source = output;
                }
              }
              else if (wnext < op) {      /* wrap around window */
                from += wsize + wnext - op;
                op -= wnext;
                if (op < len) {         /* some from end of window */
                  len -= op;
                  do {
                    output[_out++] = s_window[from++];
                  } while (--op);
                  from = 0;
                  if (wnext < len) {  /* some from start of window */
                    op = wnext;
                    len -= op;
                    do {
                      output[_out++] = s_window[from++];
                    } while (--op);
                    from = _out - dist;      /* rest from output */
                    from_source = output;
                  }
                }
              }
              else {                      /* contiguous in window */
                from += wnext - op;
                if (op < len) {         /* some from window */
                  len -= op;
                  do {
                    output[_out++] = s_window[from++];
                  } while (--op);
                  from = _out - dist;  /* rest from output */
                  from_source = output;
                }
              }
              while (len > 2) {
                output[_out++] = from_source[from++];
                output[_out++] = from_source[from++];
                output[_out++] = from_source[from++];
                len -= 3;
              }
              if (len) {
                output[_out++] = from_source[from++];
                if (len > 1) {
                  output[_out++] = from_source[from++];
                }
              }
            }
            else {
              from = _out - dist;          /* copy direct from output */
              do {                        /* minimum length is three */
                output[_out++] = output[from++];
                output[_out++] = output[from++];
                output[_out++] = output[from++];
                len -= 3;
              } while (len > 2);
              if (len) {
                output[_out++] = output[from++];
                if (len > 1) {
                  output[_out++] = output[from++];
                }
              }
            }
          }
          else if ((op & 64) === 0) {          /* 2nd level distance code */
            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
            continue dodist;
          }
          else {
            strm.msg = 'invalid distance code';
            state.mode = BAD;
            break top;
          }

          break; // need to emulate goto via "continue"
        }
      }
      else if ((op & 64) === 0) {              /* 2nd level length code */
        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
        continue dolen;
      }
      else if (op & 32) {                     /* end-of-block */
        //Tracevv((stderr, "inflate:         end of block\n"));
        state.mode = TYPE;
        break top;
      }
      else {
        strm.msg = 'invalid literal/length code';
        state.mode = BAD;
        break top;
      }

      break; // need to emulate goto via "continue"
    }
  } while (_in < last && _out < end);

  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
  len = bits >> 3;
  _in -= len;
  bits -= len << 3;
  hold &= (1 << bits) - 1;

  /* update state and return */
  strm.next_in = _in;
  strm.next_out = _out;
  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
  state.hold = hold;
  state.bits = bits;
  return;
};

},{}],49:[function(require,module,exports){
'use strict';

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

var utils         = require('../utils/common');
var adler32       = require('./adler32');
var crc32         = require('./crc32');
var inflate_fast  = require('./inffast');
var inflate_table = require('./inftrees');

var CODES = 0;
var LENS = 1;
var DISTS = 2;

/* Public constants ==========================================================*/
/* ===========================================================================*/


/* Allowed flush values; see deflate() and inflate() below for details */
//var Z_NO_FLUSH      = 0;
//var Z_PARTIAL_FLUSH = 1;
//var Z_SYNC_FLUSH    = 2;
//var Z_FULL_FLUSH    = 3;
var Z_FINISH        = 4;
var Z_BLOCK         = 5;
var Z_TREES         = 6;


/* Return codes for the compression/decompression functions. Negative values
 * are errors, positive values are used for special but normal events.
 */
var Z_OK            = 0;
var Z_STREAM_END    = 1;
var Z_NEED_DICT     = 2;
//var Z_ERRNO         = -1;
var Z_STREAM_ERROR  = -2;
var Z_DATA_ERROR    = -3;
var Z_MEM_ERROR     = -4;
var Z_BUF_ERROR     = -5;
//var Z_VERSION_ERROR = -6;

/* The deflate compression method */
var Z_DEFLATED  = 8;


/* STATES ====================================================================*/
/* ===========================================================================*/


var    HEAD = 1;       /* i: waiting for magic header */
var    FLAGS = 2;      /* i: waiting for method and flags (gzip) */
var    TIME = 3;       /* i: waiting for modification time (gzip) */
var    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */
var    EXLEN = 5;      /* i: waiting for extra length (gzip) */
var    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */
var    NAME = 7;       /* i: waiting for end of file name (gzip) */
var    COMMENT = 8;    /* i: waiting for end of comment (gzip) */
var    HCRC = 9;       /* i: waiting for header crc (gzip) */
var    DICTID = 10;    /* i: waiting for dictionary check value */
var    DICT = 11;      /* waiting for inflateSetDictionary() call */
var        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */
var        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */
var        STORED = 14;    /* i: waiting for stored size (length and complement) */
var        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */
var        COPY = 16;      /* i/o: waiting for input or output to copy stored block */
var        TABLE = 17;     /* i: waiting for dynamic block table lengths */
var        LENLENS = 18;   /* i: waiting for code length code lengths */
var        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */
var            LEN_ = 20;      /* i: same as LEN below, but only first time in */
var            LEN = 21;       /* i: waiting for length/lit/eob code */
var            LENEXT = 22;    /* i: waiting for length extra bits */
var            DIST = 23;      /* i: waiting for distance code */
var            DISTEXT = 24;   /* i: waiting for distance extra bits */
var            MATCH = 25;     /* o: waiting for output space to copy string */
var            LIT = 26;       /* o: waiting for output space to write literal */
var    CHECK = 27;     /* i: waiting for 32-bit check value */
var    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */
var    DONE = 29;      /* finished check, done -- remain here until reset */
var    BAD = 30;       /* got a data error -- remain here until reset */
var    MEM = 31;       /* got an inflate() memory error -- remain here until reset */
var    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */

/* ===========================================================================*/



var ENOUGH_LENS = 852;
var ENOUGH_DISTS = 592;
//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);

var MAX_WBITS = 15;
/* 32K LZ77 window */
var DEF_WBITS = MAX_WBITS;


function zswap32(q) {
  return  (((q >>> 24) & 0xff) +
          ((q >>> 8) & 0xff00) +
          ((q & 0xff00) << 8) +
          ((q & 0xff) << 24));
}


function InflateState() {
  this.mode = 0;             /* current inflate mode */
  this.last = false;          /* true if processing last block */
  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
  this.havedict = false;      /* true if dictionary provided */
  this.flags = 0;             /* gzip header method and flags (0 if zlib) */
  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */
  this.check = 0;             /* protected copy of check value */
  this.total = 0;             /* protected copy of output count */
  // TODO: may be {}
  this.head = null;           /* where to save gzip header information */

  /* sliding window */
  this.wbits = 0;             /* log base 2 of requested window size */
  this.wsize = 0;             /* window size or zero if not using window */
  this.whave = 0;             /* valid bytes in the window */
  this.wnext = 0;             /* window write index */
  this.window = null;         /* allocated sliding window, if needed */

  /* bit accumulator */
  this.hold = 0;              /* input bit accumulator */
  this.bits = 0;              /* number of bits in "in" */

  /* for string and stored block copying */
  this.length = 0;            /* literal or length of data to copy */
  this.offset = 0;            /* distance back to copy string from */

  /* for table and code decoding */
  this.extra = 0;             /* extra bits needed */

  /* fixed and dynamic code tables */
  this.lencode = null;          /* starting table for length/literal codes */
  this.distcode = null;         /* starting table for distance codes */
  this.lenbits = 0;           /* index bits for lencode */
  this.distbits = 0;          /* index bits for distcode */

  /* dynamic table building */
  this.ncode = 0;             /* number of code length code lengths */
  this.nlen = 0;              /* number of length code lengths */
  this.ndist = 0;             /* number of distance code lengths */
  this.have = 0;              /* number of code lengths in lens[] */
  this.next = null;              /* next available space in codes[] */

  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
  this.work = new utils.Buf16(288); /* work area for code table building */

  /*
   because we don't have pointers in js, we use lencode and distcode directly
   as buffers so we don't need codes
  */
  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */
  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */
  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */
  this.sane = 0;                   /* if false, allow invalid distance too far */
  this.back = 0;                   /* bits back of last unprocessed length/lit */
  this.was = 0;                    /* initial length of match */
}

function inflateResetKeep(strm) {
  var state;

  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  state = strm.state;
  strm.total_in = strm.total_out = state.total = 0;
  strm.msg = ''; /*Z_NULL*/
  if (state.wrap) {       /* to support ill-conceived Java test suite */
    strm.adler = state.wrap & 1;
  }
  state.mode = HEAD;
  state.last = 0;
  state.havedict = 0;
  state.dmax = 32768;
  state.head = null/*Z_NULL*/;
  state.hold = 0;
  state.bits = 0;
  //state.lencode = state.distcode = state.next = state.codes;
  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);
  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);

  state.sane = 1;
  state.back = -1;
  //Tracev((stderr, "inflate: reset\n"));
  return Z_OK;
}

function inflateReset(strm) {
  var state;

  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  state = strm.state;
  state.wsize = 0;
  state.whave = 0;
  state.wnext = 0;
  return inflateResetKeep(strm);

}

function inflateReset2(strm, windowBits) {
  var wrap;
  var state;

  /* get the state */
  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  state = strm.state;

  /* extract wrap request from windowBits parameter */
  if (windowBits < 0) {
    wrap = 0;
    windowBits = -windowBits;
  }
  else {
    wrap = (windowBits >> 4) + 1;
    if (windowBits < 48) {
      windowBits &= 15;
    }
  }

  /* set number of window bits, free window if different */
  if (windowBits && (windowBits < 8 || windowBits > 15)) {
    return Z_STREAM_ERROR;
  }
  if (state.window !== null && state.wbits !== windowBits) {
    state.window = null;
  }

  /* update state and reset the rest of it */
  state.wrap = wrap;
  state.wbits = windowBits;
  return inflateReset(strm);
}

function inflateInit2(strm, windowBits) {
  var ret;
  var state;

  if (!strm) { return Z_STREAM_ERROR; }
  //strm.msg = Z_NULL;                 /* in case we return an error */

  state = new InflateState();

  //if (state === Z_NULL) return Z_MEM_ERROR;
  //Tracev((stderr, "inflate: allocated\n"));
  strm.state = state;
  state.window = null/*Z_NULL*/;
  ret = inflateReset2(strm, windowBits);
  if (ret !== Z_OK) {
    strm.state = null/*Z_NULL*/;
  }
  return ret;
}

function inflateInit(strm) {
  return inflateInit2(strm, DEF_WBITS);
}


/*
 Return state with length and distance decoding tables and index sizes set to
 fixed code decoding.  Normally this returns fixed tables from inffixed.h.
 If BUILDFIXED is defined, then instead this routine builds the tables the
 first time it's called, and returns those tables the first time and
 thereafter.  This reduces the size of the code by about 2K bytes, in
 exchange for a little execution time.  However, BUILDFIXED should not be
 used for threaded applications, since the rewriting of the tables and virgin
 may not be thread-safe.
 */
var virgin = true;

var lenfix, distfix; // We have no pointers in JS, so keep tables separate

function fixedtables(state) {
  /* build fixed huffman tables if first call (may not be thread safe) */
  if (virgin) {
    var sym;

    lenfix = new utils.Buf32(512);
    distfix = new utils.Buf32(32);

    /* literal/length table */
    sym = 0;
    while (sym < 144) { state.lens[sym++] = 8; }
    while (sym < 256) { state.lens[sym++] = 9; }
    while (sym < 280) { state.lens[sym++] = 7; }
    while (sym < 288) { state.lens[sym++] = 8; }

    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });

    /* distance table */
    sym = 0;
    while (sym < 32) { state.lens[sym++] = 5; }

    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });

    /* do this just once */
    virgin = false;
  }

  state.lencode = lenfix;
  state.lenbits = 9;
  state.distcode = distfix;
  state.distbits = 5;
}


/*
 Update the window with the last wsize (normally 32K) bytes written before
 returning.  If window does not exist yet, create it.  This is only called
 when a window is already in use, or when output has been written during this
 inflate call, but the end of the deflate stream has not been reached yet.
 It is also called to create a window for dictionary data when a dictionary
 is loaded.

 Providing output buffers larger than 32K to inflate() should provide a speed
 advantage, since only the last 32K of output is copied to the sliding window
 upon return from inflate(), and since all distances after the first 32K of
 output will fall in the output data, making match copies simpler and faster.
 The advantage may be dependent on the size of the processor's data caches.
 */
function updatewindow(strm, src, end, copy) {
  var dist;
  var state = strm.state;

  /* if it hasn't been done already, allocate space for the window */
  if (state.window === null) {
    state.wsize = 1 << state.wbits;
    state.wnext = 0;
    state.whave = 0;

    state.window = new utils.Buf8(state.wsize);
  }

  /* copy state->wsize or less output bytes into the circular window */
  if (copy >= state.wsize) {
    utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);
    state.wnext = 0;
    state.whave = state.wsize;
  }
  else {
    dist = state.wsize - state.wnext;
    if (dist > copy) {
      dist = copy;
    }
    //zmemcpy(state->window + state->wnext, end - copy, dist);
    utils.arraySet(state.window, src, end - copy, dist, state.wnext);
    copy -= dist;
    if (copy) {
      //zmemcpy(state->window, end - copy, copy);
      utils.arraySet(state.window, src, end - copy, copy, 0);
      state.wnext = copy;
      state.whave = state.wsize;
    }
    else {
      state.wnext += dist;
      if (state.wnext === state.wsize) { state.wnext = 0; }
      if (state.whave < state.wsize) { state.whave += dist; }
    }
  }
  return 0;
}

function inflate(strm, flush) {
  var state;
  var input, output;          // input/output buffers
  var next;                   /* next input INDEX */
  var put;                    /* next output INDEX */
  var have, left;             /* available input and output */
  var hold;                   /* bit buffer */
  var bits;                   /* bits in bit buffer */
  var _in, _out;              /* save starting available input and output */
  var copy;                   /* number of stored or match bytes to copy */
  var from;                   /* where to copy match bytes from */
  var from_source;
  var here = 0;               /* current decoding table entry */
  var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
  //var last;                   /* parent table entry */
  var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
  var len;                    /* length to copy for repeats, bits to drop */
  var ret;                    /* return code */
  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */
  var opts;

  var n; // temporary var for NEED_BITS

  var order = /* permutation of code lengths */
    [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];


  if (!strm || !strm.state || !strm.output ||
      (!strm.input && strm.avail_in !== 0)) {
    return Z_STREAM_ERROR;
  }

  state = strm.state;
  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */


  //--- LOAD() ---
  put = strm.next_out;
  output = strm.output;
  left = strm.avail_out;
  next = strm.next_in;
  input = strm.input;
  have = strm.avail_in;
  hold = state.hold;
  bits = state.bits;
  //---

  _in = have;
  _out = left;
  ret = Z_OK;

  inf_leave: // goto emulation
  for (;;) {
    switch (state.mode) {
    case HEAD:
      if (state.wrap === 0) {
        state.mode = TYPEDO;
        break;
      }
      //=== NEEDBITS(16);
      while (bits < 16) {
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
      }
      //===//
      if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */
        state.check = 0/*crc32(0L, Z_NULL, 0)*/;
        //=== CRC2(state.check, hold);
        hbuf[0] = hold & 0xff;
        hbuf[1] = (hold >>> 8) & 0xff;
        state.check = crc32(state.check, hbuf, 2, 0);
        //===//

        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
        state.mode = FLAGS;
        break;
      }
      state.flags = 0;           /* expect zlib header */
      if (state.head) {
        state.head.done = false;
      }
      if (!(state.wrap & 1) ||   /* check if zlib header allowed */
        (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
        strm.msg = 'incorrect header check';
        state.mode = BAD;
        break;
      }
      if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
        strm.msg = 'unknown compression method';
        state.mode = BAD;
        break;
      }
      //--- DROPBITS(4) ---//
      hold >>>= 4;
      bits -= 4;
      //---//
      len = (hold & 0x0f)/*BITS(4)*/ + 8;
      if (state.wbits === 0) {
        state.wbits = len;
      }
      else if (len > state.wbits) {
        strm.msg = 'invalid window size';
        state.mode = BAD;
        break;
      }
      state.dmax = 1 << len;
      //Tracev((stderr, "inflate:   zlib header ok\n"));
      strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
      state.mode = hold & 0x200 ? DICTID : TYPE;
      //=== INITBITS();
      hold = 0;
      bits = 0;
      //===//
      break;
    case FLAGS:
      //=== NEEDBITS(16); */
      while (bits < 16) {
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
      }
      //===//
      state.flags = hold;
      if ((state.flags & 0xff) !== Z_DEFLATED) {
        strm.msg = 'unknown compression method';
        state.mode = BAD;
        break;
      }
      if (state.flags & 0xe000) {
        strm.msg = 'unknown header flags set';
        state.mode = BAD;
        break;
      }
      if (state.head) {
        state.head.text = ((hold >> 8) & 1);
      }
      if (state.flags & 0x0200) {
        //=== CRC2(state.check, hold);
        hbuf[0] = hold & 0xff;
        hbuf[1] = (hold >>> 8) & 0xff;
        state.check = crc32(state.check, hbuf, 2, 0);
        //===//
      }
      //=== INITBITS();
      hold = 0;
      bits = 0;
      //===//
      state.mode = TIME;
      /* falls through */
    case TIME:
      //=== NEEDBITS(32); */
      while (bits < 32) {
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
      }
      //===//
      if (state.head) {
        state.head.time = hold;
      }
      if (state.flags & 0x0200) {
        //=== CRC4(state.check, hold)
        hbuf[0] = hold & 0xff;
        hbuf[1] = (hold >>> 8) & 0xff;
        hbuf[2] = (hold >>> 16) & 0xff;
        hbuf[3] = (hold >>> 24) & 0xff;
        state.check = crc32(state.check, hbuf, 4, 0);
        //===
      }
      //=== INITBITS();
      hold = 0;
      bits = 0;
      //===//
      state.mode = OS;
      /* falls through */
    case OS:
      //=== NEEDBITS(16); */
      while (bits < 16) {
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
      }
      //===//
      if (state.head) {
        state.head.xflags = (hold & 0xff);
        state.head.os = (hold >> 8);
      }
      if (state.flags & 0x0200) {
        //=== CRC2(state.check, hold);
        hbuf[0] = hold & 0xff;
        hbuf[1] = (hold >>> 8) & 0xff;
        state.check = crc32(state.check, hbuf, 2, 0);
        //===//
      }
      //=== INITBITS();
      hold = 0;
      bits = 0;
      //===//
      state.mode = EXLEN;
      /* falls through */
    case EXLEN:
      if (state.flags & 0x0400) {
        //=== NEEDBITS(16); */
        while (bits < 16) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        state.length = hold;
        if (state.head) {
          state.head.extra_len = hold;
        }
        if (state.flags & 0x0200) {
          //=== CRC2(state.check, hold);
          hbuf[0] = hold & 0xff;
          hbuf[1] = (hold >>> 8) & 0xff;
          state.check = crc32(state.check, hbuf, 2, 0);
          //===//
        }
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
      }
      else if (state.head) {
        state.head.extra = null/*Z_NULL*/;
      }
      state.mode = EXTRA;
      /* falls through */
    case EXTRA:
      if (state.flags & 0x0400) {
        copy = state.length;
        if (copy > have) { copy = have; }
        if (copy) {
          if (state.head) {
            len = state.head.extra_len - state.length;
            if (!state.head.extra) {
              // Use untyped array for more conveniend processing later
              state.head.extra = new Array(state.head.extra_len);
            }
            utils.arraySet(
              state.head.extra,
              input,
              next,
              // extra field is limited to 65536 bytes
              // - no need for additional size check
              copy,
              /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
              len
            );
            //zmemcpy(state.head.extra + len, next,
            //        len + copy > state.head.extra_max ?
            //        state.head.extra_max - len : copy);
          }
          if (state.flags & 0x0200) {
            state.check = crc32(state.check, input, copy, next);
          }
          have -= copy;
          next += copy;
          state.length -= copy;
        }
        if (state.length) { break inf_leave; }
      }
      state.length = 0;
      state.mode = NAME;
      /* falls through */
    case NAME:
      if (state.flags & 0x0800) {
        if (have === 0) { break inf_leave; }
        copy = 0;
        do {
          // TODO: 2 or 1 bytes?
          len = input[next + copy++];
          /* use constant limit because in js we should not preallocate memory */
          if (state.head && len &&
              (state.length < 65536 /*state.head.name_max*/)) {
            state.head.name += String.fromCharCode(len);
          }
        } while (len && copy < have);

        if (state.flags & 0x0200) {
          state.check = crc32(state.check, input, copy, next);
        }
        have -= copy;
        next += copy;
        if (len) { break inf_leave; }
      }
      else if (state.head) {
        state.head.name = null;
      }
      state.length = 0;
      state.mode = COMMENT;
      /* falls through */
    case COMMENT:
      if (state.flags & 0x1000) {
        if (have === 0) { break inf_leave; }
        copy = 0;
        do {
          len = input[next + copy++];
          /* use constant limit because in js we should not preallocate memory */
          if (state.head && len &&
              (state.length < 65536 /*state.head.comm_max*/)) {
            state.head.comment += String.fromCharCode(len);
          }
        } while (len && copy < have);
        if (state.flags & 0x0200) {
          state.check = crc32(state.check, input, copy, next);
        }
        have -= copy;
        next += copy;
        if (len) { break inf_leave; }
      }
      else if (state.head) {
        state.head.comment = null;
      }
      state.mode = HCRC;
      /* falls through */
    case HCRC:
      if (state.flags & 0x0200) {
        //=== NEEDBITS(16); */
        while (bits < 16) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        if (hold !== (state.check & 0xffff)) {
          strm.msg = 'header crc mismatch';
          state.mode = BAD;
          break;
        }
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
      }
      if (state.head) {
        state.head.hcrc = ((state.flags >> 9) & 1);
        state.head.done = true;
      }
      strm.adler = state.check = 0;
      state.mode = TYPE;
      break;
    case DICTID:
      //=== NEEDBITS(32); */
      while (bits < 32) {
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
      }
      //===//
      strm.adler = state.check = zswap32(hold);
      //=== INITBITS();
      hold = 0;
      bits = 0;
      //===//
      state.mode = DICT;
      /* falls through */
    case DICT:
      if (state.havedict === 0) {
        //--- RESTORE() ---
        strm.next_out = put;
        strm.avail_out = left;
        strm.next_in = next;
        strm.avail_in = have;
        state.hold = hold;
        state.bits = bits;
        //---
        return Z_NEED_DICT;
      }
      strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
      state.mode = TYPE;
      /* falls through */
    case TYPE:
      if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
      /* falls through */
    case TYPEDO:
      if (state.last) {
        //--- BYTEBITS() ---//
        hold >>>= bits & 7;
        bits -= bits & 7;
        //---//
        state.mode = CHECK;
        break;
      }
      //=== NEEDBITS(3); */
      while (bits < 3) {
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
      }
      //===//
      state.last = (hold & 0x01)/*BITS(1)*/;
      //--- DROPBITS(1) ---//
      hold >>>= 1;
      bits -= 1;
      //---//

      switch ((hold & 0x03)/*BITS(2)*/) {
      case 0:                             /* stored block */
        //Tracev((stderr, "inflate:     stored block%s\n",
        //        state.last ? " (last)" : ""));
        state.mode = STORED;
        break;
      case 1:                             /* fixed block */
        fixedtables(state);
        //Tracev((stderr, "inflate:     fixed codes block%s\n",
        //        state.last ? " (last)" : ""));
        state.mode = LEN_;             /* decode codes */
        if (flush === Z_TREES) {
          //--- DROPBITS(2) ---//
          hold >>>= 2;
          bits -= 2;
          //---//
          break inf_leave;
        }
        break;
      case 2:                             /* dynamic block */
        //Tracev((stderr, "inflate:     dynamic codes block%s\n",
        //        state.last ? " (last)" : ""));
        state.mode = TABLE;
        break;
      case 3:
        strm.msg = 'invalid block type';
        state.mode = BAD;
      }
      //--- DROPBITS(2) ---//
      hold >>>= 2;
      bits -= 2;
      //---//
      break;
    case STORED:
      //--- BYTEBITS() ---// /* go to byte boundary */
      hold >>>= bits & 7;
      bits -= bits & 7;
      //---//
      //=== NEEDBITS(32); */
      while (bits < 32) {
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
      }
      //===//
      if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
        strm.msg = 'invalid stored block lengths';
        state.mode = BAD;
        break;
      }
      state.length = hold & 0xffff;
      //Tracev((stderr, "inflate:       stored length %u\n",
      //        state.length));
      //=== INITBITS();
      hold = 0;
      bits = 0;
      //===//
      state.mode = COPY_;
      if (flush === Z_TREES) { break inf_leave; }
      /* falls through */
    case COPY_:
      state.mode = COPY;
      /* falls through */
    case COPY:
      copy = state.length;
      if (copy) {
        if (copy > have) { copy = have; }
        if (copy > left) { copy = left; }
        if (copy === 0) { break inf_leave; }
        //--- zmemcpy(put, next, copy); ---
        utils.arraySet(output, input, next, copy, put);
        //---//
        have -= copy;
        next += copy;
        left -= copy;
        put += copy;
        state.length -= copy;
        break;
      }
      //Tracev((stderr, "inflate:       stored end\n"));
      state.mode = TYPE;
      break;
    case TABLE:
      //=== NEEDBITS(14); */
      while (bits < 14) {
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
      }
      //===//
      state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
      //--- DROPBITS(5) ---//
      hold >>>= 5;
      bits -= 5;
      //---//
      state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
      //--- DROPBITS(5) ---//
      hold >>>= 5;
      bits -= 5;
      //---//
      state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
      //--- DROPBITS(4) ---//
      hold >>>= 4;
      bits -= 4;
      //---//
//#ifndef PKZIP_BUG_WORKAROUND
      if (state.nlen > 286 || state.ndist > 30) {
        strm.msg = 'too many length or distance symbols';
        state.mode = BAD;
        break;
      }
//#endif
      //Tracev((stderr, "inflate:       table sizes ok\n"));
      state.have = 0;
      state.mode = LENLENS;
      /* falls through */
    case LENLENS:
      while (state.have < state.ncode) {
        //=== NEEDBITS(3);
        while (bits < 3) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
        //--- DROPBITS(3) ---//
        hold >>>= 3;
        bits -= 3;
        //---//
      }
      while (state.have < 19) {
        state.lens[order[state.have++]] = 0;
      }
      // We have separate tables & no pointers. 2 commented lines below not needed.
      //state.next = state.codes;
      //state.lencode = state.next;
      // Switch to use dynamic table
      state.lencode = state.lendyn;
      state.lenbits = 7;

      opts = { bits: state.lenbits };
      ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
      state.lenbits = opts.bits;

      if (ret) {
        strm.msg = 'invalid code lengths set';
        state.mode = BAD;
        break;
      }
      //Tracev((stderr, "inflate:       code lengths ok\n"));
      state.have = 0;
      state.mode = CODELENS;
      /* falls through */
    case CODELENS:
      while (state.have < state.nlen + state.ndist) {
        for (;;) {
          here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
          here_bits = here >>> 24;
          here_op = (here >>> 16) & 0xff;
          here_val = here & 0xffff;

          if ((here_bits) <= bits) { break; }
          //--- PULLBYTE() ---//
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
          //---//
        }
        if (here_val < 16) {
          //--- DROPBITS(here.bits) ---//
          hold >>>= here_bits;
          bits -= here_bits;
          //---//
          state.lens[state.have++] = here_val;
        }
        else {
          if (here_val === 16) {
            //=== NEEDBITS(here.bits + 2);
            n = here_bits + 2;
            while (bits < n) {
              if (have === 0) { break inf_leave; }
              have--;
              hold += input[next++] << bits;
              bits += 8;
            }
            //===//
            //--- DROPBITS(here.bits) ---//
            hold >>>= here_bits;
            bits -= here_bits;
            //---//
            if (state.have === 0) {
              strm.msg = 'invalid bit length repeat';
              state.mode = BAD;
              break;
            }
            len = state.lens[state.have - 1];
            copy = 3 + (hold & 0x03);//BITS(2);
            //--- DROPBITS(2) ---//
            hold >>>= 2;
            bits -= 2;
            //---//
          }
          else if (here_val === 17) {
            //=== NEEDBITS(here.bits + 3);
            n = here_bits + 3;
            while (bits < n) {
              if (have === 0) { break inf_leave; }
              have--;
              hold += input[next++] << bits;
              bits += 8;
            }
            //===//
            //--- DROPBITS(here.bits) ---//
            hold >>>= here_bits;
            bits -= here_bits;
            //---//
            len = 0;
            copy = 3 + (hold & 0x07);//BITS(3);
            //--- DROPBITS(3) ---//
            hold >>>= 3;
            bits -= 3;
            //---//
          }
          else {
            //=== NEEDBITS(here.bits + 7);
            n = here_bits + 7;
            while (bits < n) {
              if (have === 0) { break inf_leave; }
              have--;
              hold += input[next++] << bits;
              bits += 8;
            }
            //===//
            //--- DROPBITS(here.bits) ---//
            hold >>>= here_bits;
            bits -= here_bits;
            //---//
            len = 0;
            copy = 11 + (hold & 0x7f);//BITS(7);
            //--- DROPBITS(7) ---//
            hold >>>= 7;
            bits -= 7;
            //---//
          }
          if (state.have + copy > state.nlen + state.ndist) {
            strm.msg = 'invalid bit length repeat';
            state.mode = BAD;
            break;
          }
          while (copy--) {
            state.lens[state.have++] = len;
          }
        }
      }

      /* handle error breaks in while */
      if (state.mode === BAD) { break; }

      /* check for end-of-block code (better have one) */
      if (state.lens[256] === 0) {
        strm.msg = 'invalid code -- missing end-of-block';
        state.mode = BAD;
        break;
      }

      /* build code tables -- note: do not change the lenbits or distbits
         values here (9 and 6) without reading the comments in inftrees.h
         concerning the ENOUGH constants, which depend on those values */
      state.lenbits = 9;

      opts = { bits: state.lenbits };
      ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
      // We have separate tables & no pointers. 2 commented lines below not needed.
      // state.next_index = opts.table_index;
      state.lenbits = opts.bits;
      // state.lencode = state.next;

      if (ret) {
        strm.msg = 'invalid literal/lengths set';
        state.mode = BAD;
        break;
      }

      state.distbits = 6;
      //state.distcode.copy(state.codes);
      // Switch to use dynamic table
      state.distcode = state.distdyn;
      opts = { bits: state.distbits };
      ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
      // We have separate tables & no pointers. 2 commented lines below not needed.
      // state.next_index = opts.table_index;
      state.distbits = opts.bits;
      // state.distcode = state.next;

      if (ret) {
        strm.msg = 'invalid distances set';
        state.mode = BAD;
        break;
      }
      //Tracev((stderr, 'inflate:       codes ok\n'));
      state.mode = LEN_;
      if (flush === Z_TREES) { break inf_leave; }
      /* falls through */
    case LEN_:
      state.mode = LEN;
      /* falls through */
    case LEN:
      if (have >= 6 && left >= 258) {
        //--- RESTORE() ---
        strm.next_out = put;
        strm.avail_out = left;
        strm.next_in = next;
        strm.avail_in = have;
        state.hold = hold;
        state.bits = bits;
        //---
        inflate_fast(strm, _out);
        //--- LOAD() ---
        put = strm.next_out;
        output = strm.output;
        left = strm.avail_out;
        next = strm.next_in;
        input = strm.input;
        have = strm.avail_in;
        hold = state.hold;
        bits = state.bits;
        //---

        if (state.mode === TYPE) {
          state.back = -1;
        }
        break;
      }
      state.back = 0;
      for (;;) {
        here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/
        here_bits = here >>> 24;
        here_op = (here >>> 16) & 0xff;
        here_val = here & 0xffff;

        if (here_bits <= bits) { break; }
        //--- PULLBYTE() ---//
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
        //---//
      }
      if (here_op && (here_op & 0xf0) === 0) {
        last_bits = here_bits;
        last_op = here_op;
        last_val = here_val;
        for (;;) {
          here = state.lencode[last_val +
                  ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
          here_bits = here >>> 24;
          here_op = (here >>> 16) & 0xff;
          here_val = here & 0xffff;

          if ((last_bits + here_bits) <= bits) { break; }
          //--- PULLBYTE() ---//
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
          //---//
        }
        //--- DROPBITS(last.bits) ---//
        hold >>>= last_bits;
        bits -= last_bits;
        //---//
        state.back += last_bits;
      }
      //--- DROPBITS(here.bits) ---//
      hold >>>= here_bits;
      bits -= here_bits;
      //---//
      state.back += here_bits;
      state.length = here_val;
      if (here_op === 0) {
        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
        //        "inflate:         literal '%c'\n" :
        //        "inflate:         literal 0x%02x\n", here.val));
        state.mode = LIT;
        break;
      }
      if (here_op & 32) {
        //Tracevv((stderr, "inflate:         end of block\n"));
        state.back = -1;
        state.mode = TYPE;
        break;
      }
      if (here_op & 64) {
        strm.msg = 'invalid literal/length code';
        state.mode = BAD;
        break;
      }
      state.extra = here_op & 15;
      state.mode = LENEXT;
      /* falls through */
    case LENEXT:
      if (state.extra) {
        //=== NEEDBITS(state.extra);
        n = state.extra;
        while (bits < n) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
        //--- DROPBITS(state.extra) ---//
        hold >>>= state.extra;
        bits -= state.extra;
        //---//
        state.back += state.extra;
      }
      //Tracevv((stderr, "inflate:         length %u\n", state.length));
      state.was = state.length;
      state.mode = DIST;
      /* falls through */
    case DIST:
      for (;;) {
        here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/
        here_bits = here >>> 24;
        here_op = (here >>> 16) & 0xff;
        here_val = here & 0xffff;

        if ((here_bits) <= bits) { break; }
        //--- PULLBYTE() ---//
        if (have === 0) { break inf_leave; }
        have--;
        hold += input[next++] << bits;
        bits += 8;
        //---//
      }
      if ((here_op & 0xf0) === 0) {
        last_bits = here_bits;
        last_op = here_op;
        last_val = here_val;
        for (;;) {
          here = state.distcode[last_val +
                  ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
          here_bits = here >>> 24;
          here_op = (here >>> 16) & 0xff;
          here_val = here & 0xffff;

          if ((last_bits + here_bits) <= bits) { break; }
          //--- PULLBYTE() ---//
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
          //---//
        }
        //--- DROPBITS(last.bits) ---//
        hold >>>= last_bits;
        bits -= last_bits;
        //---//
        state.back += last_bits;
      }
      //--- DROPBITS(here.bits) ---//
      hold >>>= here_bits;
      bits -= here_bits;
      //---//
      state.back += here_bits;
      if (here_op & 64) {
        strm.msg = 'invalid distance code';
        state.mode = BAD;
        break;
      }
      state.offset = here_val;
      state.extra = (here_op) & 15;
      state.mode = DISTEXT;
      /* falls through */
    case DISTEXT:
      if (state.extra) {
        //=== NEEDBITS(state.extra);
        n = state.extra;
        while (bits < n) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
        //--- DROPBITS(state.extra) ---//
        hold >>>= state.extra;
        bits -= state.extra;
        //---//
        state.back += state.extra;
      }
//#ifdef INFLATE_STRICT
      if (state.offset > state.dmax) {
        strm.msg = 'invalid distance too far back';
        state.mode = BAD;
        break;
      }
//#endif
      //Tracevv((stderr, "inflate:         distance %u\n", state.offset));
      state.mode = MATCH;
      /* falls through */
    case MATCH:
      if (left === 0) { break inf_leave; }
      copy = _out - left;
      if (state.offset > copy) {         /* copy from window */
        copy = state.offset - copy;
        if (copy > state.whave) {
          if (state.sane) {
            strm.msg = 'invalid distance too far back';
            state.mode = BAD;
            break;
          }
// (!) This block is disabled in zlib defailts,
// don't enable it for binary compatibility
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
//          Trace((stderr, "inflate.c too far\n"));
//          copy -= state.whave;
//          if (copy > state.length) { copy = state.length; }
//          if (copy > left) { copy = left; }
//          left -= copy;
//          state.length -= copy;
//          do {
//            output[put++] = 0;
//          } while (--copy);
//          if (state.length === 0) { state.mode = LEN; }
//          break;
//#endif
        }
        if (copy > state.wnext) {
          copy -= state.wnext;
          from = state.wsize - copy;
        }
        else {
          from = state.wnext - copy;
        }
        if (copy > state.length) { copy = state.length; }
        from_source = state.window;
      }
      else {                              /* copy from output */
        from_source = output;
        from = put - state.offset;
        copy = state.length;
      }
      if (copy > left) { copy = left; }
      left -= copy;
      state.length -= copy;
      do {
        output[put++] = from_source[from++];
      } while (--copy);
      if (state.length === 0) { state.mode = LEN; }
      break;
    case LIT:
      if (left === 0) { break inf_leave; }
      output[put++] = state.length;
      left--;
      state.mode = LEN;
      break;
    case CHECK:
      if (state.wrap) {
        //=== NEEDBITS(32);
        while (bits < 32) {
          if (have === 0) { break inf_leave; }
          have--;
          // Use '|' insdead of '+' to make sure that result is signed
          hold |= input[next++] << bits;
          bits += 8;
        }
        //===//
        _out -= left;
        strm.total_out += _out;
        state.total += _out;
        if (_out) {
          strm.adler = state.check =
              /*UPDATE(state.check, put - _out, _out);*/
              (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));

        }
        _out = left;
        // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
        if ((state.flags ? hold : zswap32(hold)) !== state.check) {
          strm.msg = 'incorrect data check';
          state.mode = BAD;
          break;
        }
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
        //Tracev((stderr, "inflate:   check matches trailer\n"));
      }
      state.mode = LENGTH;
      /* falls through */
    case LENGTH:
      if (state.wrap && state.flags) {
        //=== NEEDBITS(32);
        while (bits < 32) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        if (hold !== (state.total & 0xffffffff)) {
          strm.msg = 'incorrect length check';
          state.mode = BAD;
          break;
        }
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
        //Tracev((stderr, "inflate:   length matches trailer\n"));
      }
      state.mode = DONE;
      /* falls through */
    case DONE:
      ret = Z_STREAM_END;
      break inf_leave;
    case BAD:
      ret = Z_DATA_ERROR;
      break inf_leave;
    case MEM:
      return Z_MEM_ERROR;
    case SYNC:
      /* falls through */
    default:
      return Z_STREAM_ERROR;
    }
  }

  // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"

  /*
     Return from inflate(), updating the total counts and the check value.
     If there was no progress during the inflate() call, return a buffer
     error.  Call updatewindow() to create and/or update the window state.
     Note: a memory error from inflate() is non-recoverable.
   */

  //--- RESTORE() ---
  strm.next_out = put;
  strm.avail_out = left;
  strm.next_in = next;
  strm.avail_in = have;
  state.hold = hold;
  state.bits = bits;
  //---

  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
                      (state.mode < CHECK || flush !== Z_FINISH))) {
    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
      state.mode = MEM;
      return Z_MEM_ERROR;
    }
  }
  _in -= strm.avail_in;
  _out -= strm.avail_out;
  strm.total_in += _in;
  strm.total_out += _out;
  state.total += _out;
  if (state.wrap && _out) {
    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
  }
  strm.data_type = state.bits + (state.last ? 64 : 0) +
                    (state.mode === TYPE ? 128 : 0) +
                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {
    ret = Z_BUF_ERROR;
  }
  return ret;
}

function inflateEnd(strm) {

  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
    return Z_STREAM_ERROR;
  }

  var state = strm.state;
  if (state.window) {
    state.window = null;
  }
  strm.state = null;
  return Z_OK;
}

function inflateGetHeader(strm, head) {
  var state;

  /* check state */
  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  state = strm.state;
  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }

  /* save header structure */
  state.head = head;
  head.done = false;
  return Z_OK;
}

function inflateSetDictionary(strm, dictionary) {
  var dictLength = dictionary.length;

  var state;
  var dictid;
  var ret;

  /* check state */
  if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }
  state = strm.state;

  if (state.wrap !== 0 && state.mode !== DICT) {
    return Z_STREAM_ERROR;
  }

  /* check for correct dictionary identifier */
  if (state.mode === DICT) {
    dictid = 1; /* adler32(0, null, 0)*/
    /* dictid = adler32(dictid, dictionary, dictLength); */
    dictid = adler32(dictid, dictionary, dictLength, 0);
    if (dictid !== state.check) {
      return Z_DATA_ERROR;
    }
  }
  /* copy dictionary to window using updatewindow(), which will amend the
   existing dictionary if appropriate */
  ret = updatewindow(strm, dictionary, dictLength, dictLength);
  if (ret) {
    state.mode = MEM;
    return Z_MEM_ERROR;
  }
  state.havedict = 1;
  // Tracev((stderr, "inflate:   dictionary set\n"));
  return Z_OK;
}

exports.inflateReset = inflateReset;
exports.inflateReset2 = inflateReset2;
exports.inflateResetKeep = inflateResetKeep;
exports.inflateInit = inflateInit;
exports.inflateInit2 = inflateInit2;
exports.inflate = inflate;
exports.inflateEnd = inflateEnd;
exports.inflateGetHeader = inflateGetHeader;
exports.inflateSetDictionary = inflateSetDictionary;
exports.inflateInfo = 'pako inflate (from Nodeca project)';

/* Not implemented
exports.inflateCopy = inflateCopy;
exports.inflateGetDictionary = inflateGetDictionary;
exports.inflateMark = inflateMark;
exports.inflatePrime = inflatePrime;
exports.inflateSync = inflateSync;
exports.inflateSyncPoint = inflateSyncPoint;
exports.inflateUndermine = inflateUndermine;
*/

},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(require,module,exports){
'use strict';

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

var utils = require('../utils/common');

var MAXBITS = 15;
var ENOUGH_LENS = 852;
var ENOUGH_DISTS = 592;
//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);

var CODES = 0;
var LENS = 1;
var DISTS = 2;

var lbase = [ /* Length codes 257..285 base */
  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
];

var lext = [ /* Length codes 257..285 extra */
  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
];

var dbase = [ /* Distance codes 0..29 base */
  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
  8193, 12289, 16385, 24577, 0, 0
];

var dext = [ /* Distance codes 0..29 extra */
  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
  28, 28, 29, 29, 64, 64
];

module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)
{
  var bits = opts.bits;
      //here = opts.here; /* table entry for duplication */

  var len = 0;               /* a code's length in bits */
  var sym = 0;               /* index of code symbols */
  var min = 0, max = 0;          /* minimum and maximum code lengths */
  var root = 0;              /* number of index bits for root table */
  var curr = 0;              /* number of index bits for current table */
  var drop = 0;              /* code bits to drop for sub-table */
  var left = 0;                   /* number of prefix codes available */
  var used = 0;              /* code entries in table used */
  var huff = 0;              /* Huffman code */
  var incr;              /* for incrementing code, index */
  var fill;              /* index for replicating entries */
  var low;               /* low bits for current root entry */
  var mask;              /* mask for low root bits */
  var next;             /* next available space in table */
  var base = null;     /* base value table to use */
  var base_index = 0;
//  var shoextra;    /* extra bits table to use */
  var end;                    /* use base and extra for symbol > end */
  var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */
  var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */
  var extra = null;
  var extra_index = 0;

  var here_bits, here_op, here_val;

  /*
   Process a set of code lengths to create a canonical Huffman code.  The
   code lengths are lens[0..codes-1].  Each length corresponds to the
   symbols 0..codes-1.  The Huffman code is generated by first sorting the
   symbols by length from short to long, and retaining the symbol order
   for codes with equal lengths.  Then the code starts with all zero bits
   for the first code of the shortest length, and the codes are integer
   increments for the same length, and zeros are appended as the length
   increases.  For the deflate format, these bits are stored backwards
   from their more natural integer increment ordering, and so when the
   decoding tables are built in the large loop below, the integer codes
   are incremented backwards.

   This routine assumes, but does not check, that all of the entries in
   lens[] are in the range 0..MAXBITS.  The caller must assure this.
   1..MAXBITS is interpreted as that code length.  zero means that that
   symbol does not occur in this code.

   The codes are sorted by computing a count of codes for each length,
   creating from that a table of starting indices for each length in the
   sorted table, and then entering the symbols in order in the sorted
   table.  The sorted table is work[], with that space being provided by
   the caller.

   The length counts are used for other purposes as well, i.e. finding
   the minimum and maximum length codes, determining if there are any
   codes at all, checking for a valid set of lengths, and looking ahead
   at length counts to determine sub-table sizes when building the
   decoding tables.
   */

  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
  for (len = 0; len <= MAXBITS; len++) {
    count[len] = 0;
  }
  for (sym = 0; sym < codes; sym++) {
    count[lens[lens_index + sym]]++;
  }

  /* bound code lengths, force root to be within code lengths */
  root = bits;
  for (max = MAXBITS; max >= 1; max--) {
    if (count[max] !== 0) { break; }
  }
  if (root > max) {
    root = max;
  }
  if (max === 0) {                     /* no symbols to code at all */
    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */
    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;
    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;
    table[table_index++] = (1 << 24) | (64 << 16) | 0;


    //table.op[opts.table_index] = 64;
    //table.bits[opts.table_index] = 1;
    //table.val[opts.table_index++] = 0;
    table[table_index++] = (1 << 24) | (64 << 16) | 0;

    opts.bits = 1;
    return 0;     /* no symbols, but wait for decoding to report error */
  }
  for (min = 1; min < max; min++) {
    if (count[min] !== 0) { break; }
  }
  if (root < min) {
    root = min;
  }

  /* check for an over-subscribed or incomplete set of lengths */
  left = 1;
  for (len = 1; len <= MAXBITS; len++) {
    left <<= 1;
    left -= count[len];
    if (left < 0) {
      return -1;
    }        /* over-subscribed */
  }
  if (left > 0 && (type === CODES || max !== 1)) {
    return -1;                      /* incomplete set */
  }

  /* generate offsets into symbol table for each length for sorting */
  offs[1] = 0;
  for (len = 1; len < MAXBITS; len++) {
    offs[len + 1] = offs[len] + count[len];
  }

  /* sort symbols by length, by symbol order within each length */
  for (sym = 0; sym < codes; sym++) {
    if (lens[lens_index + sym] !== 0) {
      work[offs[lens[lens_index + sym]]++] = sym;
    }
  }

  /*
   Create and fill in decoding tables.  In this loop, the table being
   filled is at next and has curr index bits.  The code being used is huff
   with length len.  That code is converted to an index by dropping drop
   bits off of the bottom.  For codes where len is less than drop + curr,
   those top drop + curr - len bits are incremented through all values to
   fill the table with replicated entries.

   root is the number of index bits for the root table.  When len exceeds
   root, sub-tables are created pointed to by the root entry with an index
   of the low root bits of huff.  This is saved in low to check for when a
   new sub-table should be started.  drop is zero when the root table is
   being filled, and drop is root when sub-tables are being filled.

   When a new sub-table is needed, it is necessary to look ahead in the
   code lengths to determine what size sub-table is needed.  The length
   counts are used for this, and so count[] is decremented as codes are
   entered in the tables.

   used keeps track of how many table entries have been allocated from the
   provided *table space.  It is checked for LENS and DIST tables against
   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
   the initial root table size constants.  See the comments in inftrees.h
   for more information.

   sym increments through all symbols, and the loop terminates when
   all codes of length max, i.e. all codes, have been processed.  This
   routine permits incomplete codes, so another loop after this one fills
   in the rest of the decoding tables with invalid code markers.
   */

  /* set up for code type */
  // poor man optimization - use if-else instead of switch,
  // to avoid deopts in old v8
  if (type === CODES) {
    base = extra = work;    /* dummy value--not used */
    end = 19;

  } else if (type === LENS) {
    base = lbase;
    base_index -= 257;
    extra = lext;
    extra_index -= 257;
    end = 256;

  } else {                    /* DISTS */
    base = dbase;
    extra = dext;
    end = -1;
  }

  /* initialize opts for loop */
  huff = 0;                   /* starting code */
  sym = 0;                    /* starting code symbol */
  len = min;                  /* starting code length */
  next = table_index;              /* current table to fill in */
  curr = root;                /* current table index bits */
  drop = 0;                   /* current bits to drop from code for index */
  low = -1;                   /* trigger new sub-table when len > root */
  used = 1 << root;          /* use root table entries */
  mask = used - 1;            /* mask for comparing low */

  /* check available table space */
  if ((type === LENS && used > ENOUGH_LENS) ||
    (type === DISTS && used > ENOUGH_DISTS)) {
    return 1;
  }

  /* process all codes and make table entries */
  for (;;) {
    /* create table entry */
    here_bits = len - drop;
    if (work[sym] < end) {
      here_op = 0;
      here_val = work[sym];
    }
    else if (work[sym] > end) {
      here_op = extra[extra_index + work[sym]];
      here_val = base[base_index + work[sym]];
    }
    else {
      here_op = 32 + 64;         /* end of block */
      here_val = 0;
    }

    /* replicate for those indices with low len bits equal to huff */
    incr = 1 << (len - drop);
    fill = 1 << curr;
    min = fill;                 /* save offset to next table */
    do {
      fill -= incr;
      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
    } while (fill !== 0);

    /* backwards increment the len-bit code huff */
    incr = 1 << (len - 1);
    while (huff & incr) {
      incr >>= 1;
    }
    if (incr !== 0) {
      huff &= incr - 1;
      huff += incr;
    } else {
      huff = 0;
    }

    /* go to next symbol, update count, len */
    sym++;
    if (--count[len] === 0) {
      if (len === max) { break; }
      len = lens[lens_index + work[sym]];
    }

    /* create new sub-table if needed */
    if (len > root && (huff & mask) !== low) {
      /* if first time, transition to sub-tables */
      if (drop === 0) {
        drop = root;
      }

      /* increment past last table */
      next += min;            /* here min is 1 << curr */

      /* determine length of next table */
      curr = len - drop;
      left = 1 << curr;
      while (curr + drop < max) {
        left -= count[curr + drop];
        if (left <= 0) { break; }
        curr++;
        left <<= 1;
      }

      /* check for enough space */
      used += 1 << curr;
      if ((type === LENS && used > ENOUGH_LENS) ||
        (type === DISTS && used > ENOUGH_DISTS)) {
        return 1;
      }

      /* point entry in root table to sub-table */
      low = huff & mask;
      /*table.op[low] = curr;
      table.bits[low] = root;
      table.val[low] = next - opts.table_index;*/
      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
    }
  }

  /* fill in remaining table entry if code is incomplete (guaranteed to have
   at most one remaining entry, since if the code is incomplete, the
   maximum code length that was allowed to get this far is one bit) */
  if (huff !== 0) {
    //table.op[next + huff] = 64;            /* invalid code marker */
    //table.bits[next + huff] = len - drop;
    //table.val[next + huff] = 0;
    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
  }

  /* set return parameters */
  //opts.table_index += used;
  opts.bits = root;
  return 0;
};

},{"../utils/common":41}],51:[function(require,module,exports){
'use strict';

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

module.exports = {
  2:      'need dictionary',     /* Z_NEED_DICT       2  */
  1:      'stream end',          /* Z_STREAM_END      1  */
  0:      '',                    /* Z_OK              0  */
  '-1':   'file error',          /* Z_ERRNO         (-1) */
  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */
  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */
  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */
  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */
  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */
};

},{}],52:[function(require,module,exports){
'use strict';

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

var utils = require('../utils/common');

/* Public constants ==========================================================*/
/* ===========================================================================*/


//var Z_FILTERED          = 1;
//var Z_HUFFMAN_ONLY      = 2;
//var Z_RLE               = 3;
var Z_FIXED               = 4;
//var Z_DEFAULT_STRATEGY  = 0;

/* Possible values of the data_type field (though see inflate()) */
var Z_BINARY              = 0;
var Z_TEXT                = 1;
//var Z_ASCII             = 1; // = Z_TEXT
var Z_UNKNOWN             = 2;

/*============================================================================*/


function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }

// From zutil.h

var STORED_BLOCK = 0;
var STATIC_TREES = 1;
var DYN_TREES    = 2;
/* The three kinds of block type */

var MIN_MATCH    = 3;
var MAX_MATCH    = 258;
/* The minimum and maximum match lengths */

// From deflate.h
/* ===========================================================================
 * Internal compression state.
 */

var LENGTH_CODES  = 29;
/* number of length codes, not counting the special END_BLOCK code */

var LITERALS      = 256;
/* number of literal bytes 0..255 */

var L_CODES       = LITERALS + 1 + LENGTH_CODES;
/* number of Literal or Length codes, including the END_BLOCK code */

var D_CODES       = 30;
/* number of distance codes */

var BL_CODES      = 19;
/* number of codes used to transfer the bit lengths */

var HEAP_SIZE     = 2 * L_CODES + 1;
/* maximum heap size */

var MAX_BITS      = 15;
/* All codes must not exceed MAX_BITS bits */

var Buf_size      = 16;
/* size of bit buffer in bi_buf */


/* ===========================================================================
 * Constants
 */

var MAX_BL_BITS = 7;
/* Bit length codes must not exceed MAX_BL_BITS bits */

var END_BLOCK   = 256;
/* end of block literal code */

var REP_3_6     = 16;
/* repeat previous bit length 3-6 times (2 bits of repeat count) */

var REPZ_3_10   = 17;
/* repeat a zero length 3-10 times  (3 bits of repeat count) */

var REPZ_11_138 = 18;
/* repeat a zero length 11-138 times  (7 bits of repeat count) */

/* eslint-disable comma-spacing,array-bracket-spacing */
var extra_lbits =   /* extra bits for each length code */
  [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];

var extra_dbits =   /* extra bits for each distance code */
  [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];

var extra_blbits =  /* extra bits for each bit length code */
  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];

var bl_order =
  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
/* eslint-enable comma-spacing,array-bracket-spacing */

/* The lengths of the bit length codes are sent in order of decreasing
 * probability, to avoid transmitting the lengths for unused bit length codes.
 */

/* ===========================================================================
 * Local data. These are initialized only once.
 */

// We pre-fill arrays with 0 to avoid uninitialized gaps

var DIST_CODE_LEN = 512; /* see definition of array dist_code below */

// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1
var static_ltree  = new Array((L_CODES + 2) * 2);
zero(static_ltree);
/* The static literal tree. Since the bit lengths are imposed, there is no
 * need for the L_CODES extra codes used during heap construction. However
 * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
 * below).
 */

var static_dtree  = new Array(D_CODES * 2);
zero(static_dtree);
/* The static distance tree. (Actually a trivial tree since all codes use
 * 5 bits.)
 */

var _dist_code    = new Array(DIST_CODE_LEN);
zero(_dist_code);
/* Distance codes. The first 256 values correspond to the distances
 * 3 .. 258, the last 256 values correspond to the top 8 bits of
 * the 15 bit distances.
 */

var _length_code  = new Array(MAX_MATCH - MIN_MATCH + 1);
zero(_length_code);
/* length code for each normalized match length (0 == MIN_MATCH) */

var base_length   = new Array(LENGTH_CODES);
zero(base_length);
/* First normalized length for each code (0 = MIN_MATCH) */

var base_dist     = new Array(D_CODES);
zero(base_dist);
/* First normalized distance for each code (0 = distance of 1) */


function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {

  this.static_tree  = static_tree;  /* static tree or NULL */
  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */
  this.extra_base   = extra_base;   /* base index for extra_bits */
  this.elems        = elems;        /* max number of elements in the tree */
  this.max_length   = max_length;   /* max bit length for the codes */

  // show if `static_tree` has data or dummy - needed for monomorphic objects
  this.has_stree    = static_tree && static_tree.length;
}


var static_l_desc;
var static_d_desc;
var static_bl_desc;


function TreeDesc(dyn_tree, stat_desc) {
  this.dyn_tree = dyn_tree;     /* the dynamic tree */
  this.max_code = 0;            /* largest code with non zero frequency */
  this.stat_desc = stat_desc;   /* the corresponding static tree */
}



function d_code(dist) {
  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];
}


/* ===========================================================================
 * Output a short LSB first on the stream.
 * IN assertion: there is enough room in pendingBuf.
 */
function put_short(s, w) {
//    put_byte(s, (uch)((w) & 0xff));
//    put_byte(s, (uch)((ush)(w) >> 8));
  s.pending_buf[s.pending++] = (w) & 0xff;
  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;
}


/* ===========================================================================
 * Send a value on a given number of bits.
 * IN assertion: length <= 16 and value fits in length bits.
 */
function send_bits(s, value, length) {
  if (s.bi_valid > (Buf_size - length)) {
    s.bi_buf |= (value << s.bi_valid) & 0xffff;
    put_short(s, s.bi_buf);
    s.bi_buf = value >> (Buf_size - s.bi_valid);
    s.bi_valid += length - Buf_size;
  } else {
    s.bi_buf |= (value << s.bi_valid) & 0xffff;
    s.bi_valid += length;
  }
}


function send_code(s, c, tree) {
  send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);
}


/* ===========================================================================
 * Reverse the first len bits of a code, using straightforward code (a faster
 * method would use a table)
 * IN assertion: 1 <= len <= 15
 */
function bi_reverse(code, len) {
  var res = 0;
  do {
    res |= code & 1;
    code >>>= 1;
    res <<= 1;
  } while (--len > 0);
  return res >>> 1;
}


/* ===========================================================================
 * Flush the bit buffer, keeping at most 7 bits in it.
 */
function bi_flush(s) {
  if (s.bi_valid === 16) {
    put_short(s, s.bi_buf);
    s.bi_buf = 0;
    s.bi_valid = 0;

  } else if (s.bi_valid >= 8) {
    s.pending_buf[s.pending++] = s.bi_buf & 0xff;
    s.bi_buf >>= 8;
    s.bi_valid -= 8;
  }
}


/* ===========================================================================
 * Compute the optimal bit lengths for a tree and update the total bit length
 * for the current block.
 * IN assertion: the fields freq and dad are set, heap[heap_max] and
 *    above are the tree nodes sorted by increasing frequency.
 * OUT assertions: the field len is set to the optimal bit length, the
 *     array bl_count contains the frequencies for each bit length.
 *     The length opt_len is updated; static_len is also updated if stree is
 *     not null.
 */
function gen_bitlen(s, desc)
//    deflate_state *s;
//    tree_desc *desc;    /* the tree descriptor */
{
  var tree            = desc.dyn_tree;
  var max_code        = desc.max_code;
  var stree           = desc.stat_desc.static_tree;
  var has_stree       = desc.stat_desc.has_stree;
  var extra           = desc.stat_desc.extra_bits;
  var base            = desc.stat_desc.extra_base;
  var max_length      = desc.stat_desc.max_length;
  var h;              /* heap index */
  var n, m;           /* iterate over the tree elements */
  var bits;           /* bit length */
  var xbits;          /* extra bits */
  var f;              /* frequency */
  var overflow = 0;   /* number of elements with bit length too large */

  for (bits = 0; bits <= MAX_BITS; bits++) {
    s.bl_count[bits] = 0;
  }

  /* In a first pass, compute the optimal bit lengths (which may
   * overflow in the case of the bit length tree).
   */
  tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */

  for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {
    n = s.heap[h];
    bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;
    if (bits > max_length) {
      bits = max_length;
      overflow++;
    }
    tree[n * 2 + 1]/*.Len*/ = bits;
    /* We overwrite tree[n].Dad which is no longer needed */

    if (n > max_code) { continue; } /* not a leaf node */

    s.bl_count[bits]++;
    xbits = 0;
    if (n >= base) {
      xbits = extra[n - base];
    }
    f = tree[n * 2]/*.Freq*/;
    s.opt_len += f * (bits + xbits);
    if (has_stree) {
      s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);
    }
  }
  if (overflow === 0) { return; }

  // Trace((stderr,"\nbit length overflow\n"));
  /* This happens for example on obj2 and pic of the Calgary corpus */

  /* Find the first bit length which could increase: */
  do {
    bits = max_length - 1;
    while (s.bl_count[bits] === 0) { bits--; }
    s.bl_count[bits]--;      /* move one leaf down the tree */
    s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */
    s.bl_count[max_length]--;
    /* The brother of the overflow item also moves one step up,
     * but this does not affect bl_count[max_length]
     */
    overflow -= 2;
  } while (overflow > 0);

  /* Now recompute all bit lengths, scanning in increasing frequency.
   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
   * lengths instead of fixing only the wrong ones. This idea is taken
   * from 'ar' written by Haruhiko Okumura.)
   */
  for (bits = max_length; bits !== 0; bits--) {
    n = s.bl_count[bits];
    while (n !== 0) {
      m = s.heap[--h];
      if (m > max_code) { continue; }
      if (tree[m * 2 + 1]/*.Len*/ !== bits) {
        // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
        s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;
        tree[m * 2 + 1]/*.Len*/ = bits;
      }
      n--;
    }
  }
}


/* ===========================================================================
 * Generate the codes for a given tree and bit counts (which need not be
 * optimal).
 * IN assertion: the array bl_count contains the bit length statistics for
 * the given tree and the field len is set for all tree elements.
 * OUT assertion: the field code is set for all tree elements of non
 *     zero code length.
 */
function gen_codes(tree, max_code, bl_count)
//    ct_data *tree;             /* the tree to decorate */
//    int max_code;              /* largest code with non zero frequency */
//    ushf *bl_count;            /* number of codes at each bit length */
{
  var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */
  var code = 0;              /* running code value */
  var bits;                  /* bit index */
  var n;                     /* code index */

  /* The distribution counts are first used to generate the code values
   * without bit reversal.
   */
  for (bits = 1; bits <= MAX_BITS; bits++) {
    next_code[bits] = code = (code + bl_count[bits - 1]) << 1;
  }
  /* Check that the bit counts in bl_count are consistent. The last code
   * must be all ones.
   */
  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
  //        "inconsistent bit counts");
  //Tracev((stderr,"\ngen_codes: max_code %d ", max_code));

  for (n = 0;  n <= max_code; n++) {
    var len = tree[n * 2 + 1]/*.Len*/;
    if (len === 0) { continue; }
    /* Now reverse the bits */
    tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);

    //Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
  }
}


/* ===========================================================================
 * Initialize the various 'constant' tables.
 */
function tr_static_init() {
  var n;        /* iterates over tree elements */
  var bits;     /* bit counter */
  var length;   /* length value */
  var code;     /* code value */
  var dist;     /* distance index */
  var bl_count = new Array(MAX_BITS + 1);
  /* number of codes at each bit length for an optimal tree */

  // do check in _tr_init()
  //if (static_init_done) return;

  /* For some embedded targets, global variables are not initialized: */
/*#ifdef NO_INIT_GLOBAL_POINTERS
  static_l_desc.static_tree = static_ltree;
  static_l_desc.extra_bits = extra_lbits;
  static_d_desc.static_tree = static_dtree;
  static_d_desc.extra_bits = extra_dbits;
  static_bl_desc.extra_bits = extra_blbits;
#endif*/

  /* Initialize the mapping length (0..255) -> length code (0..28) */
  length = 0;
  for (code = 0; code < LENGTH_CODES - 1; code++) {
    base_length[code] = length;
    for (n = 0; n < (1 << extra_lbits[code]); n++) {
      _length_code[length++] = code;
    }
  }
  //Assert (length == 256, "tr_static_init: length != 256");
  /* Note that the length 255 (match length 258) can be represented
   * in two different ways: code 284 + 5 bits or code 285, so we
   * overwrite length_code[255] to use the best encoding:
   */
  _length_code[length - 1] = code;

  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
  dist = 0;
  for (code = 0; code < 16; code++) {
    base_dist[code] = dist;
    for (n = 0; n < (1 << extra_dbits[code]); n++) {
      _dist_code[dist++] = code;
    }
  }
  //Assert (dist == 256, "tr_static_init: dist != 256");
  dist >>= 7; /* from now on, all distances are divided by 128 */
  for (; code < D_CODES; code++) {
    base_dist[code] = dist << 7;
    for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {
      _dist_code[256 + dist++] = code;
    }
  }
  //Assert (dist == 256, "tr_static_init: 256+dist != 512");

  /* Construct the codes of the static literal tree */
  for (bits = 0; bits <= MAX_BITS; bits++) {
    bl_count[bits] = 0;
  }

  n = 0;
  while (n <= 143) {
    static_ltree[n * 2 + 1]/*.Len*/ = 8;
    n++;
    bl_count[8]++;
  }
  while (n <= 255) {
    static_ltree[n * 2 + 1]/*.Len*/ = 9;
    n++;
    bl_count[9]++;
  }
  while (n <= 279) {
    static_ltree[n * 2 + 1]/*.Len*/ = 7;
    n++;
    bl_count[7]++;
  }
  while (n <= 287) {
    static_ltree[n * 2 + 1]/*.Len*/ = 8;
    n++;
    bl_count[8]++;
  }
  /* Codes 286 and 287 do not exist, but we must include them in the
   * tree construction to get a canonical Huffman tree (longest code
   * all ones)
   */
  gen_codes(static_ltree, L_CODES + 1, bl_count);

  /* The static distance tree is trivial: */
  for (n = 0; n < D_CODES; n++) {
    static_dtree[n * 2 + 1]/*.Len*/ = 5;
    static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);
  }

  // Now data ready and we can init static trees
  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);
  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);
  static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);

  //static_init_done = true;
}


/* ===========================================================================
 * Initialize a new block.
 */
function init_block(s) {
  var n; /* iterates over tree elements */

  /* Initialize the trees. */
  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }
  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }
  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }

  s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;
  s.opt_len = s.static_len = 0;
  s.last_lit = s.matches = 0;
}


/* ===========================================================================
 * Flush the bit buffer and align the output on a byte boundary
 */
function bi_windup(s)
{
  if (s.bi_valid > 8) {
    put_short(s, s.bi_buf);
  } else if (s.bi_valid > 0) {
    //put_byte(s, (Byte)s->bi_buf);
    s.pending_buf[s.pending++] = s.bi_buf;
  }
  s.bi_buf = 0;
  s.bi_valid = 0;
}

/* ===========================================================================
 * Copy a stored block, storing first the length and its
 * one's complement if requested.
 */
function copy_block(s, buf, len, header)
//DeflateState *s;
//charf    *buf;    /* the input data */
//unsigned len;     /* its length */
//int      header;  /* true if block header must be written */
{
  bi_windup(s);        /* align on byte boundary */

  if (header) {
    put_short(s, len);
    put_short(s, ~len);
  }
//  while (len--) {
//    put_byte(s, *buf++);
//  }
  utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);
  s.pending += len;
}

/* ===========================================================================
 * Compares to subtrees, using the tree depth as tie breaker when
 * the subtrees have equal frequency. This minimizes the worst case length.
 */
function smaller(tree, n, m, depth) {
  var _n2 = n * 2;
  var _m2 = m * 2;
  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||
         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));
}

/* ===========================================================================
 * Restore the heap property by moving down the tree starting at node k,
 * exchanging a node with the smallest of its two sons if necessary, stopping
 * when the heap property is re-established (each father smaller than its
 * two sons).
 */
function pqdownheap(s, tree, k)
//    deflate_state *s;
//    ct_data *tree;  /* the tree to restore */
//    int k;               /* node to move down */
{
  var v = s.heap[k];
  var j = k << 1;  /* left son of k */
  while (j <= s.heap_len) {
    /* Set j to the smallest of the two sons: */
    if (j < s.heap_len &&
      smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {
      j++;
    }
    /* Exit if v is smaller than both sons */
    if (smaller(tree, v, s.heap[j], s.depth)) { break; }

    /* Exchange v with the smallest son */
    s.heap[k] = s.heap[j];
    k = j;

    /* And continue down the tree, setting j to the left son of k */
    j <<= 1;
  }
  s.heap[k] = v;
}


// inlined manually
// var SMALLEST = 1;

/* ===========================================================================
 * Send the block data compressed using the given Huffman trees
 */
function compress_block(s, ltree, dtree)
//    deflate_state *s;
//    const ct_data *ltree; /* literal tree */
//    const ct_data *dtree; /* distance tree */
{
  var dist;           /* distance of matched string */
  var lc;             /* match length or unmatched char (if dist == 0) */
  var lx = 0;         /* running index in l_buf */
  var code;           /* the code to send */
  var extra;          /* number of extra bits to send */

  if (s.last_lit !== 0) {
    do {
      dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);
      lc = s.pending_buf[s.l_buf + lx];
      lx++;

      if (dist === 0) {
        send_code(s, lc, ltree); /* send a literal byte */
        //Tracecv(isgraph(lc), (stderr," '%c' ", lc));
      } else {
        /* Here, lc is the match length - MIN_MATCH */
        code = _length_code[lc];
        send_code(s, code + LITERALS + 1, ltree); /* send the length code */
        extra = extra_lbits[code];
        if (extra !== 0) {
          lc -= base_length[code];
          send_bits(s, lc, extra);       /* send the extra length bits */
        }
        dist--; /* dist is now the match distance - 1 */
        code = d_code(dist);
        //Assert (code < D_CODES, "bad d_code");

        send_code(s, code, dtree);       /* send the distance code */
        extra = extra_dbits[code];
        if (extra !== 0) {
          dist -= base_dist[code];
          send_bits(s, dist, extra);   /* send the extra distance bits */
        }
      } /* literal or match pair ? */

      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
      //       "pendingBuf overflow");

    } while (lx < s.last_lit);
  }

  send_code(s, END_BLOCK, ltree);
}


/* ===========================================================================
 * Construct one Huffman tree and assigns the code bit strings and lengths.
 * Update the total bit length for the current block.
 * IN assertion: the field freq is set for all tree elements.
 * OUT assertions: the fields len and code are set to the optimal bit length
 *     and corresponding code. The length opt_len is updated; static_len is
 *     also updated if stree is not null. The field max_code is set.
 */
function build_tree(s, desc)
//    deflate_state *s;
//    tree_desc *desc; /* the tree descriptor */
{
  var tree     = desc.dyn_tree;
  var stree    = desc.stat_desc.static_tree;
  var has_stree = desc.stat_desc.has_stree;
  var elems    = desc.stat_desc.elems;
  var n, m;          /* iterate over heap elements */
  var max_code = -1; /* largest code with non zero frequency */
  var node;          /* new node being created */

  /* Construct the initial heap, with least frequent element in
   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
   * heap[0] is not used.
   */
  s.heap_len = 0;
  s.heap_max = HEAP_SIZE;

  for (n = 0; n < elems; n++) {
    if (tree[n * 2]/*.Freq*/ !== 0) {
      s.heap[++s.heap_len] = max_code = n;
      s.depth[n] = 0;

    } else {
      tree[n * 2 + 1]/*.Len*/ = 0;
    }
  }

  /* The pkzip format requires that at least one distance code exists,
   * and that at least one bit should be sent even if there is only one
   * possible code. So to avoid special checks later on we force at least
   * two codes of non zero frequency.
   */
  while (s.heap_len < 2) {
    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
    tree[node * 2]/*.Freq*/ = 1;
    s.depth[node] = 0;
    s.opt_len--;

    if (has_stree) {
      s.static_len -= stree[node * 2 + 1]/*.Len*/;
    }
    /* node is 0 or 1 so it does not have extra bits */
  }
  desc.max_code = max_code;

  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
   * establish sub-heaps of increasing lengths:
   */
  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }

  /* Construct the Huffman tree by repeatedly combining the least two
   * frequent nodes.
   */
  node = elems;              /* next internal node of the tree */
  do {
    //pqremove(s, tree, n);  /* n = node of least frequency */
    /*** pqremove ***/
    n = s.heap[1/*SMALLEST*/];
    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
    pqdownheap(s, tree, 1/*SMALLEST*/);
    /***/

    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */

    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
    s.heap[--s.heap_max] = m;

    /* Create a new node father of n and m */
    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;
    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
    tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;

    /* and insert the new node in the heap */
    s.heap[1/*SMALLEST*/] = node++;
    pqdownheap(s, tree, 1/*SMALLEST*/);

  } while (s.heap_len >= 2);

  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];

  /* At this point, the fields freq and dad are set. We can now
   * generate the bit lengths.
   */
  gen_bitlen(s, desc);

  /* The field len is now set, we can generate the bit codes */
  gen_codes(tree, max_code, s.bl_count);
}


/* ===========================================================================
 * Scan a literal or distance tree to determine the frequencies of the codes
 * in the bit length tree.
 */
function scan_tree(s, tree, max_code)
//    deflate_state *s;
//    ct_data *tree;   /* the tree to be scanned */
//    int max_code;    /* and its largest code of non zero frequency */
{
  var n;                     /* iterates over all tree elements */
  var prevlen = -1;          /* last emitted length */
  var curlen;                /* length of current code */

  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */

  var count = 0;             /* repeat count of the current code */
  var max_count = 7;         /* max repeat count */
  var min_count = 4;         /* min repeat count */

  if (nextlen === 0) {
    max_count = 138;
    min_count = 3;
  }
  tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */

  for (n = 0; n <= max_code; n++) {
    curlen = nextlen;
    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;

    if (++count < max_count && curlen === nextlen) {
      continue;

    } else if (count < min_count) {
      s.bl_tree[curlen * 2]/*.Freq*/ += count;

    } else if (curlen !== 0) {

      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }
      s.bl_tree[REP_3_6 * 2]/*.Freq*/++;

    } else if (count <= 10) {
      s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;

    } else {
      s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;
    }

    count = 0;
    prevlen = curlen;

    if (nextlen === 0) {
      max_count = 138;
      min_count = 3;

    } else if (curlen === nextlen) {
      max_count = 6;
      min_count = 3;

    } else {
      max_count = 7;
      min_count = 4;
    }
  }
}


/* ===========================================================================
 * Send a literal or distance tree in compressed form, using the codes in
 * bl_tree.
 */
function send_tree(s, tree, max_code)
//    deflate_state *s;
//    ct_data *tree; /* the tree to be scanned */
//    int max_code;       /* and its largest code of non zero frequency */
{
  var n;                     /* iterates over all tree elements */
  var prevlen = -1;          /* last emitted length */
  var curlen;                /* length of current code */

  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */

  var count = 0;             /* repeat count of the current code */
  var max_count = 7;         /* max repeat count */
  var min_count = 4;         /* min repeat count */

  /* tree[max_code+1].Len = -1; */  /* guard already set */
  if (nextlen === 0) {
    max_count = 138;
    min_count = 3;
  }

  for (n = 0; n <= max_code; n++) {
    curlen = nextlen;
    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;

    if (++count < max_count && curlen === nextlen) {
      continue;

    } else if (count < min_count) {
      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);

    } else if (curlen !== 0) {
      if (curlen !== prevlen) {
        send_code(s, curlen, s.bl_tree);
        count--;
      }
      //Assert(count >= 3 && count <= 6, " 3_6?");
      send_code(s, REP_3_6, s.bl_tree);
      send_bits(s, count - 3, 2);

    } else if (count <= 10) {
      send_code(s, REPZ_3_10, s.bl_tree);
      send_bits(s, count - 3, 3);

    } else {
      send_code(s, REPZ_11_138, s.bl_tree);
      send_bits(s, count - 11, 7);
    }

    count = 0;
    prevlen = curlen;
    if (nextlen === 0) {
      max_count = 138;
      min_count = 3;

    } else if (curlen === nextlen) {
      max_count = 6;
      min_count = 3;

    } else {
      max_count = 7;
      min_count = 4;
    }
  }
}


/* ===========================================================================
 * Construct the Huffman tree for the bit lengths and return the index in
 * bl_order of the last bit length code to send.
 */
function build_bl_tree(s) {
  var max_blindex;  /* index of last bit length code of non zero freq */

  /* Determine the bit length frequencies for literal and distance trees */
  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);
  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);

  /* Build the bit length tree: */
  build_tree(s, s.bl_desc);
  /* opt_len now includes the length of the tree representations, except
   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
   */

  /* Determine the number of bit length codes to send. The pkzip format
   * requires that at least 4 bit length codes be sent. (appnote.txt says
   * 3 but the actual value used is 4.)
   */
  for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {
    if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {
      break;
    }
  }
  /* Update opt_len to include the bit length tree and counts */
  s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;
  //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
  //        s->opt_len, s->static_len));

  return max_blindex;
}


/* ===========================================================================
 * Send the header for a block using dynamic Huffman trees: the counts, the
 * lengths of the bit length codes, the literal tree and the distance tree.
 * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
 */
function send_all_trees(s, lcodes, dcodes, blcodes)
//    deflate_state *s;
//    int lcodes, dcodes, blcodes; /* number of codes for each tree */
{
  var rank;                    /* index in bl_order */

  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
  //        "too many codes");
  //Tracev((stderr, "\nbl counts: "));
  send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */
  send_bits(s, dcodes - 1,   5);
  send_bits(s, blcodes - 4,  4); /* not -3 as stated in appnote.txt */
  for (rank = 0; rank < blcodes; rank++) {
    //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
    send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);
  }
  //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));

  send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */
  //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));

  send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */
  //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
}


/* ===========================================================================
 * Check if the data type is TEXT or BINARY, using the following algorithm:
 * - TEXT if the two conditions below are satisfied:
 *    a) There are no non-portable control characters belonging to the
 *       "black list" (0..6, 14..25, 28..31).
 *    b) There is at least one printable character belonging to the
 *       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
 * - BINARY otherwise.
 * - The following partially-portable control characters form a
 *   "gray list" that is ignored in this detection algorithm:
 *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
 * IN assertion: the fields Freq of dyn_ltree are set.
 */
function detect_data_type(s) {
  /* black_mask is the bit mask of black-listed bytes
   * set bits 0..6, 14..25, and 28..31
   * 0xf3ffc07f = binary 11110011111111111100000001111111
   */
  var black_mask = 0xf3ffc07f;
  var n;

  /* Check for non-textual ("black-listed") bytes. */
  for (n = 0; n <= 31; n++, black_mask >>>= 1) {
    if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {
      return Z_BINARY;
    }
  }

  /* Check for textual ("white-listed") bytes. */
  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||
      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {
    return Z_TEXT;
  }
  for (n = 32; n < LITERALS; n++) {
    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {
      return Z_TEXT;
    }
  }

  /* There are no "black-listed" or "white-listed" bytes:
   * this stream either is empty or has tolerated ("gray-listed") bytes only.
   */
  return Z_BINARY;
}


var static_init_done = false;

/* ===========================================================================
 * Initialize the tree data structures for a new zlib stream.
 */
function _tr_init(s)
{

  if (!static_init_done) {
    tr_static_init();
    static_init_done = true;
  }

  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);
  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);
  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);

  s.bi_buf = 0;
  s.bi_valid = 0;

  /* Initialize the first block of the first file: */
  init_block(s);
}


/* ===========================================================================
 * Send a stored block
 */
function _tr_stored_block(s, buf, stored_len, last)
//DeflateState *s;
//charf *buf;       /* input block */
//ulg stored_len;   /* length of input block */
//int last;         /* one if this is the last block for a file */
{
  send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3);    /* send block type */
  copy_block(s, buf, stored_len, true); /* with header */
}


/* ===========================================================================
 * Send one empty static block to give enough lookahead for inflate.
 * This takes 10 bits, of which 7 may remain in the bit buffer.
 */
function _tr_align(s) {
  send_bits(s, STATIC_TREES << 1, 3);
  send_code(s, END_BLOCK, static_ltree);
  bi_flush(s);
}


/* ===========================================================================
 * Determine the best encoding for the current block: dynamic trees, static
 * trees or store, and output the encoded block to the zip file.
 */
function _tr_flush_block(s, buf, stored_len, last)
//DeflateState *s;
//charf *buf;       /* input block, or NULL if too old */
//ulg stored_len;   /* length of input block */
//int last;         /* one if this is the last block for a file */
{
  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */
  var max_blindex = 0;        /* index of last bit length code of non zero freq */

  /* Build the Huffman trees unless a stored block is forced */
  if (s.level > 0) {

    /* Check if the file is binary or text */
    if (s.strm.data_type === Z_UNKNOWN) {
      s.strm.data_type = detect_data_type(s);
    }

    /* Construct the literal and distance trees */
    build_tree(s, s.l_desc);
    // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
    //        s->static_len));

    build_tree(s, s.d_desc);
    // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
    //        s->static_len));
    /* At this point, opt_len and static_len are the total bit lengths of
     * the compressed block data, excluding the tree representations.
     */

    /* Build the bit length tree for the above two trees, and get the index
     * in bl_order of the last bit length code to send.
     */
    max_blindex = build_bl_tree(s);

    /* Determine the best encoding. Compute the block lengths in bytes. */
    opt_lenb = (s.opt_len + 3 + 7) >>> 3;
    static_lenb = (s.static_len + 3 + 7) >>> 3;

    // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
    //        s->last_lit));

    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }

  } else {
    // Assert(buf != (char*)0, "lost buf");
    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
  }

  if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {
    /* 4: two words for the lengths */

    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
     * Otherwise we can't have processed more than WSIZE input bytes since
     * the last block flush, because compression would have been
     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
     * transform a block into a stored block.
     */
    _tr_stored_block(s, buf, stored_len, last);

  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {

    send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);
    compress_block(s, static_ltree, static_dtree);

  } else {
    send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);
    send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);
    compress_block(s, s.dyn_ltree, s.dyn_dtree);
  }
  // Assert (s->compressed_len == s->bits_sent, "bad compressed size");
  /* The above check is made mod 2^32, for files larger than 512 MB
   * and uLong implemented on 32 bits.
   */
  init_block(s);

  if (last) {
    bi_windup(s);
  }
  // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
  //       s->compressed_len-7*last));
}

/* ===========================================================================
 * Save the match info and tally the frequency counts. Return true if
 * the current block must be flushed.
 */
function _tr_tally(s, dist, lc)
//    deflate_state *s;
//    unsigned dist;  /* distance of matched string */
//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
{
  //var out_length, in_length, dcode;

  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;
  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;

  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;
  s.last_lit++;

  if (dist === 0) {
    /* lc is the unmatched char */
    s.dyn_ltree[lc * 2]/*.Freq*/++;
  } else {
    s.matches++;
    /* Here, lc is the match length - MIN_MATCH */
    dist--;             /* dist = match distance - 1 */
    //Assert((ush)dist < (ush)MAX_DIST(s) &&
    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
    //       (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");

    s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;
    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
  }

// (!) This block is disabled in zlib defailts,
// don't enable it for binary compatibility

//#ifdef TRUNCATE_BLOCK
//  /* Try to guess if it is profitable to stop the current block here */
//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
//    /* Compute an upper bound for the compressed length */
//    out_length = s.last_lit*8;
//    in_length = s.strstart - s.block_start;
//
//    for (dcode = 0; dcode < D_CODES; dcode++) {
//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
//    }
//    out_length >>>= 3;
//    //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
//    //       s->last_lit, in_length, out_length,
//    //       100L - out_length*100L/in_length));
//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
//      return true;
//    }
//  }
//#endif

  return (s.last_lit === s.lit_bufsize - 1);
  /* We avoid equality with lit_bufsize because of wraparound at 64K
   * on 16 bit machines and because stored blocks are restricted to
   * 64K-1 bytes.
   */
}

exports._tr_init  = _tr_init;
exports._tr_stored_block = _tr_stored_block;
exports._tr_flush_block  = _tr_flush_block;
exports._tr_tally = _tr_tally;
exports._tr_align = _tr_align;

},{"../utils/common":41}],53:[function(require,module,exports){
'use strict';

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

function ZStream() {
  /* next input byte */
  this.input = null; // JS specific, because we have no pointers
  this.next_in = 0;
  /* number of bytes available at input */
  this.avail_in = 0;
  /* total number of input bytes read so far */
  this.total_in = 0;
  /* next output byte should be put there */
  this.output = null; // JS specific, because we have no pointers
  this.next_out = 0;
  /* remaining free space at output */
  this.avail_out = 0;
  /* total number of bytes output so far */
  this.total_out = 0;
  /* last error message, NULL if no error */
  this.msg = ''/*Z_NULL*/;
  /* not visible by applications */
  this.state = null;
  /* best guess about the data type: binary or text */
  this.data_type = 2/*Z_UNKNOWN*/;
  /* adler32 value of the uncompressed data */
  this.adler = 0;
}

module.exports = ZStream;

},{}],54:[function(require,module,exports){
(function (global){
(function (global, undefined) {
    "use strict";

    if (global.setImmediate) {
        return;
    }

    var nextHandle = 1; // Spec says greater than zero
    var tasksByHandle = {};
    var currentlyRunningATask = false;
    var doc = global.document;
    var registerImmediate;

    function setImmediate(callback) {
      // Callback can either be a function or a string
      if (typeof callback !== "function") {
        callback = new Function("" + callback);
      }
      // Copy function arguments
      var args = new Array(arguments.length - 1);
      for (var i = 0; i < args.length; i++) {
          args[i] = arguments[i + 1];
      }
      // Store and register the task
      var task = { callback: callback, args: args };
      tasksByHandle[nextHandle] = task;
      registerImmediate(nextHandle);
      return nextHandle++;
    }

    function clearImmediate(handle) {
        delete tasksByHandle[handle];
    }

    function run(task) {
        var callback = task.callback;
        var args = task.args;
        switch (args.length) {
        case 0:
            callback();
            break;
        case 1:
            callback(args[0]);
            break;
        case 2:
            callback(args[0], args[1]);
            break;
        case 3:
            callback(args[0], args[1], args[2]);
            break;
        default:
            callback.apply(undefined, args);
            break;
        }
    }

    function runIfPresent(handle) {
        // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
        // So if we're currently running a task, we'll need to delay this invocation.
        if (currentlyRunningATask) {
            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
            // "too much recursion" error.
            setTimeout(runIfPresent, 0, handle);
        } else {
            var task = tasksByHandle[handle];
            if (task) {
                currentlyRunningATask = true;
                try {
                    run(task);
                } finally {
                    clearImmediate(handle);
                    currentlyRunningATask = false;
                }
            }
        }
    }

    function installNextTickImplementation() {
        registerImmediate = function(handle) {
            process.nextTick(function () { runIfPresent(handle); });
        };
    }

    function canUsePostMessage() {
        // The test against `importScripts` prevents this implementation from being installed inside a web worker,
        // where `global.postMessage` means something completely different and can't be used for this purpose.
        if (global.postMessage && !global.importScripts) {
            var postMessageIsAsynchronous = true;
            var oldOnMessage = global.onmessage;
            global.onmessage = function() {
                postMessageIsAsynchronous = false;
            };
            global.postMessage("", "*");
            global.onmessage = oldOnMessage;
            return postMessageIsAsynchronous;
        }
    }

    function installPostMessageImplementation() {
        // Installs an event handler on `global` for the `message` event: see
        // * https://developer.mozilla.org/en/DOM/window.postMessage
        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages

        var messagePrefix = "setImmediate$" + Math.random() + "$";
        var onGlobalMessage = function(event) {
            if (event.source === global &&
                typeof event.data === "string" &&
                event.data.indexOf(messagePrefix) === 0) {
                runIfPresent(+event.data.slice(messagePrefix.length));
            }
        };

        if (global.addEventListener) {
            global.addEventListener("message", onGlobalMessage, false);
        } else {
            global.attachEvent("onmessage", onGlobalMessage);
        }

        registerImmediate = function(handle) {
            global.postMessage(messagePrefix + handle, "*");
        };
    }

    function installMessageChannelImplementation() {
        var channel = new MessageChannel();
        channel.port1.onmessage = function(event) {
            var handle = event.data;
            runIfPresent(handle);
        };

        registerImmediate = function(handle) {
            channel.port2.postMessage(handle);
        };
    }

    function installReadyStateChangeImplementation() {
        var html = doc.documentElement;
        registerImmediate = function(handle) {
            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
            var script = doc.createElement("script");
            script.onreadystatechange = function () {
                runIfPresent(handle);
                script.onreadystatechange = null;
                html.removeChild(script);
                script = null;
            };
            html.appendChild(script);
        };
    }

    function installSetTimeoutImplementation() {
        registerImmediate = function(handle) {
            setTimeout(runIfPresent, 0, handle);
        };
    }

    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;

    // Don't get fooled by e.g. browserify environments.
    if ({}.toString.call(global.process) === "[object process]") {
        // For Node.js before 0.9
        installNextTickImplementation();

    } else if (canUsePostMessage()) {
        // For non-IE10 modern browsers
        installPostMessageImplementation();

    } else if (global.MessageChannel) {
        // For web workers, where supported
        installMessageChannelImplementation();

    } else if (doc && "onreadystatechange" in doc.createElement("script")) {
        // For IE 6–8
        installReadyStateChangeImplementation();

    } else {
        // For older browsers
        installSetTimeoutImplementation();
    }

    attachTo.setImmediate = setImmediate;
    attachTo.clearImmediate = clearImmediate;
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}]},{},[10])(10)
});
/*!
* DevExtreme (dx.all.js)
* Version: 24.2.3
* Build date: Fri Dec 06 2024
*
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
"use strict";!function(){var e={57329:function(e,t,i){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0}),t.InfernoWrapperComponent=t.InfernoComponent=t.BaseInfernoComponent=void 0;var a=i(81167),s=i(86734),r=function(e,t){if(!(e instanceof Object&&t instanceof Object))return e===t;var i=Object.keys(e),n=Object.keys(t);return i.length===n.length&&!i.some((function(i){return e[i]!==t[i]}))},l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._pendingContext=t.context,t}return o(t,e),t.prototype.componentWillReceiveProps=function(e,t){this._pendingContext=null!=t?t:{}},t.prototype.shouldComponentUpdate=function(e,t){return!r(this.props,e)||!r(this.state,t)||!r(this.context,this._pendingContext)},t}(a.Component);t.BaseInfernoComponent=l;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._effects=[],t}return o(t,e),t.prototype.createEffects=function(){return[]},t.prototype.updateEffects=function(){},t.prototype.componentWillMount=function(){s.InfernoEffectHost.lock()},t.prototype.componentWillUpdate=function(e,t,i){s.InfernoEffectHost.lock()},t.prototype.componentDidMount=function(){var e=this;s.InfernoEffectHost.callbacks.push((function(){e._effects=e.createEffects()})),s.InfernoEffectHost.callEffects()},t.prototype.componentDidUpdate=function(){var e=this;s.InfernoEffectHost.callbacks.push((function(){return e.updateEffects()})),s.InfernoEffectHost.callEffects()},t.prototype.destroyEffects=function(){this._effects.forEach((function(e){return e.dispose()}))},t.prototype.componentWillUnmount=function(){this.destroyEffects()},t}(l);t.InfernoComponent=d;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.vDomElement=null,t}return o(t,e),t.prototype.vDomUpdateClasses=function(){var e=this.vDomElement,t=e.className.length?e.className.split(" "):[],i=t.filter((function(t){return e.dxClasses.previous.indexOf(t)<0})),n=e.dxClasses.previous.filter((function(e){return t.indexOf(e)<0}));i.forEach((function(t){var i=e.dxClasses.removed.indexOf(t);i>-1?e.dxClasses.removed.splice(i,1):e.dxClasses.added.includes(t)||e.dxClasses.added.push(t)})),n.forEach((function(t){var i=e.dxClasses.added.indexOf(t);i>-1?e.dxClasses.added.splice(i,1):e.dxClasses.removed.includes(t)||e.dxClasses.removed.push(t)}))},t.prototype.componentDidMount=function(){var t=a.findDOMfromVNode(this.$LI,!0);this.vDomElement=t,e.prototype.componentDidMount.call(this),t.dxClasses=t.dxClasses||{removed:[],added:[],previous:[]},t.dxClasses.previous=(null==t?void 0:t.className.length)?t.className.split(" "):[]},t.prototype.componentDidUpdate=function(){e.prototype.componentDidUpdate.call(this);var t=this.vDomElement;null!==t&&(t.dxClasses.added.forEach((function(e){return t.classList.add(e)})),t.dxClasses.removed.forEach((function(e){return t.classList.remove(e)})),t.dxClasses.previous=t.className.length?t.className.split(" "):[])},t.prototype.shouldComponentUpdate=function(t,i){var n=e.prototype.shouldComponentUpdate.call(this,t,i);return n&&this.vDomUpdateClasses(),n},t}(d);t.InfernoWrapperComponent=u},83804:function(e,t,i){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createContext=void 0;var s=i(81167),r=0;t.createContext=function(e){var t=r++;return{id:t,defaultValue:e,Provider:function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return o(n,i),n.prototype.getChildContext=function(){var i;return a(a({},this.context),((i={})[t]=this.props.value||e,i))},n.prototype.render=function(){return this.props.children},n}(s.Component)}}},43017:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.InfernoEffect=void 0;var i=function(){function e(e,t){this.dependency=t,this.effect=e,this.destroy=e()}return e.prototype.update=function(e){var t=this.dependency;e&&(this.dependency=e),e&&!e.some((function(e,i){return t[i]!==e}))||(this.dispose(),this.destroy=this.effect())},e.prototype.dispose=function(){this.destroy&&this.destroy()},e}();t.InfernoEffect=i},86734:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.InfernoEffectHost=void 0,t.InfernoEffectHost={lockCount:0,lock:function(){this.lockCount++},callbacks:[],callEffects:function(){if(this.lockCount--,this.lockCount<0)throw new Error("Unexpected Effect Call");if(0===this.lockCount){var e=this.callbacks;this.callbacks=[],e.forEach((function(e){return e()}))}}}},49714:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(57329),t),o(i(83804),t),o(i(43017),t),o(i(86734),t),o(i(38034),t),o(i(8865),t),o(i(17526),t),o(i(86059),t),o(i(74757),t),o(i(43262),t)},86059:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.hydrate=void 0;var n=i(81167),o=i(93055);function a(e,t){return Boolean(t&&t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html&&function(e,t){var i=document.createElement("i");return i.innerHTML=t,i.innerHTML===e.innerHTML}(e,t.dangerouslySetInnerHTML.__html))}function s(e,t,i,s,r,d){var u=e.childFlags,c=e.children,h=e.props,p=e.flags;if(1!==u){if(2===u)o.isNull(i)?n._M(c,t,s,r,null,d):i=(i=l(c,t,i,s,r,d))?i.nextSibling:null;else if(16===u)o.isNull(i)?t.appendChild(document.createTextNode(c)):1!==t.childNodes.length||3!==i.nodeType?t.textContent=c:i.nodeValue!==c&&(i.nodeValue=c),i=null;else if(12&u)for(var g=!1,_=0,f=c.length;_<f;++_){var m=c[_];o.isNull(i)||g&&(16&m.flags)>0?n._M(m,t,s,r,i,d):i=(i=l(m,t,i,s,r,d))?i.nextSibling:null,g=(16&m.flags)>0}if(!(8192&p))for(var v=null;i;)v=i.nextSibling,t.removeChild(i),i=v}else o.isNull(t.firstChild)||a(t,h)||(t.textContent="",448&p&&(t.defaultValue=""))}function r(e,t,i){if(3!==i.nodeType)t.replaceChild(e.dom=document.createTextNode(e.children),i);else{var n=e.children;i.nodeValue!==n&&(i.nodeValue=n),e.dom=i}return e.dom}function l(e,t,i,a,d,u){var c=e.flags|=16384;return 14&c?function(e,t,i,o,a,s,r){var d,u=e.type,c=e.ref,h=e.props||n.EMPTY_OBJ;if(s){var p=n._CI(e,u,h,o,a,r);d=l(g=p.$LI,t,i,p.$CX,a,r),n._MCCC(c,p,r)}else{var g;d=l(g=n._HI(n._RFC(e,o)),t,i,o,a,r),e.children=g,n._MFCC(e,r)}return d}(e,t,i,a,d,(4&c)>0,u):481&c?function(e,t,i,a,r,l){var d=e.props,u=e.className,c=e.flags,h=e.ref;return r=r||(32&c)>0,1!==i.nodeType?(n._ME(e,null,a,r,null,l),t.replaceChild(e.dom,i)):(e.dom=i,s(e,i,i.firstChild,a,r,l),o.isNull(d)||n._MP(e,c,d,i,r),o.isNullOrUndef(u)?""!==i.className&&i.removeAttribute("class"):r?i.setAttribute("class",u):i.className=u,n._MR(h,i,l)),e.dom}(e,t,i,a,d,u):16&c?r(e,t,i):512&c?e.dom=i:8192&c?function(e,t,i,n,o,a){var l=e.children;return 2===e.childFlags?(r(l,t,i),l.dom):(s(e,t,i,n,o,a),function(e){for(var t,i;e;){if(2033&(t=e.flags))return e.dom;i=e.children,e=8192&t?2===e.childFlags?i:i[i.length-1]:4&t?i.$LI:i}return null}(l[l.length-1]))}(e,t,i,a,d,u):(o.throwError(),null)}t.hydrate=function(e,t,i){var a=t.firstChild;if(o.isNull(a))n.render(e,t,i);else{var s=[];for(o.isInvalid(e)||(a=l(e,t,a,{},!1,s));a&&(a=a.nextSibling);)t.removeChild(a);if(s.length>0)for(var r=void 0;void 0!==(r=s.shift());)r()}t.$V=e,o.isFunction(i)&&i()}},93055:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=t.isNull=t.isFunction=t.isInvalid=t.isNullOrUndef=t.ERROR_MSG=void 0,t.ERROR_MSG="a runtime error occured! Use Inferno in development environment to find the error.",t.isNullOrUndef=function(e){return null==e},t.isInvalid=function(e){return null===e||!1===e||!0===e||void 0===e},t.isFunction=function(e){return"function"==typeof e},t.isNull=function(e){return null===e},t.throwError=function(e){throw e||(e=t.ERROR_MSG),new Error("Inferno Error: "+e)}},43262:function(e,t){var i=this&&this.__read||function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,a=i.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeStyles=void 0;var n=new Set(["animationIterationCount","borderImageOutset","borderImageSlice","border-imageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","fillOpacity","flex","flexGrow","flexNegative","flexOrder","flexPositive","flexShrink","floodOpacity","fontWeight","gridColumn","gridRow","lineClamp","lineHeight","opacity","order","orphans","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),o=/[A-Z]/g;t.normalizeStyles=function(e){if(e instanceof Object)return Object.entries(e).reduce((function(e,t){var a,s=i(t,2),r=s[0],l=s[1];return e[(a=r,a.replace(o,"-$&").toLowerCase())]=function(e){return"number"==typeof e||!Number.isNaN(Number(e))}(l)?function(e,t){return n.has(e)?t:t+"px"}(r,l):l,e}),{})}},38034:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Portal=void 0;var n=i(81167);t.Portal=function(e){var t=e.container,i=e.children;return t?n.createPortal(i,t):null}},17526:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createReRenderEffect=void 0;var n=i(81167),o=i(43017);t.createReRenderEffect=function(){return new o.InfernoEffect((function(){n.rerender()}),[])}},8865:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},74757:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.hasTemplate=t.renderTemplate=void 0;var n=i(81167),o=i(63935);t.renderTemplate=function(e,t,i){setTimeout((function(){n.render(o.createElement(e,t),function(e){var t,i;return(null===(t=e.container)||void 0===t?void 0:t.get(0))||(null===(i=e.item)||void 0===i?void 0:i.get(0))}(t))}),0)};t.hasTemplate=function(e,t,i){var n=t[e];return!!n&&"string"!=typeof n}},63935:function(e,t,i){i.r(t),i.d(t,{createElement:function(){return r}});var n=i(81167);function o(e){return null==e}function a(e){return void 0===e}var s={onComponentDidMount:1,onComponentDidUpdate:1,onComponentShouldUpdate:1,onComponentWillMount:1,onComponentWillUnmount:1,onComponentWillUpdate:1};function r(e,t,i){var r,l,d=arguments,u=null,c=null,h=null,p=0,g=arguments.length-2;if(1===g)r=i;else if(g>1)for(r=[];g-- >0;)r[g]=d[g+2];if("string"!=typeof e){if(p=2,a(r)||(t||(t={}),t.children=r),!o(t))for(var _ in l={},t)"key"===_?c=t.key:"ref"===_?u=t.ref:1===s[_]?(u||(u={}),u[_]=t[_]):l[_]=t[_];return(0,n.createComponentVNode)(p,e,l,c,u)}if(p=(0,n.getFlagsForElementVnode)(e),!o(t))for(var f in l={},t)"className"===f||"class"===f?h=t[f]:"key"===f?c=t.key:"children"===f&&a(r)?r=t.children:"ref"===f?u=t.ref:("contenteditable"===f&&(p|=4096),l[f]=t[f]);return 8192&p?(0,n.createFragment)(1===g?[r]:r,0,c):(0,n.createVNode)(p,e,h,r,0,l,c,u)}},81167:function(e,t,i){i.r(t),i.d(t,{Component:function(){return at},EMPTY_OBJ:function(){return p},Fragment:function(){return g},_CI:function(){return Ve},_HI:function(){return G},_M:function(){return He},_MCCC:function(){return $e},_ME:function(){return ze},_MFCC:function(){return Ge},_MP:function(){return Le},_MR:function(){return Ee},_RFC:function(){return Fe},__render:function(){return qe},createComponentVNode:function(){return R},createFragment:function(){return B},createPortal:function(){return N},createRef:function(){return Se},createRenderer:function(){return Xe},createTextVNode:function(){return L},createVNode:function(){return M},directClone:function(){return F},findDOMfromVNode:function(){return b},forwardRef:function(){return De},getFlagsForElementVnode:function(){return W},linkEvent:function(){return c},normalizeProps:function(){return V},options:function(){return I},render:function(){return Ye},rerender:function(){return nt},version:function(){return st}});var n=Array.isArray;function o(e){var t=typeof e;return"string"===t||"number"===t}function a(e){return null==e}function s(e){return null===e||!1===e||!0===e||void 0===e}function r(e){return"function"==typeof e}function l(e){return"string"==typeof e}function d(e){return null===e}function u(e,t){var i={};if(e)for(var n in e)i[n]=e[n];if(t)for(var o in t)i[o]=t[o];return i}function c(e,t){return r(t)?{data:e,event:t}:null}function h(e){return!d(e)&&"object"==typeof e}var p={},g="$F";function _(e){return e.substr(2).toLowerCase()}function f(e,t){e.appendChild(t)}function m(e,t,i){d(i)?f(e,t):e.insertBefore(t,i)}function v(e,t){e.removeChild(t)}function C(e){for(var t=0;t<e.length;t++)e[t]()}function y(e,t,i){var n=e.children;return 4&i?n.$LI:8192&i?2===e.childFlags?n:n[t?0:n.length-1]:n}function b(e,t){for(var i;e;){if(2033&(i=e.flags))return e.dom;e=y(e,t,i)}return null}function x(e,t){do{var i=e.flags;if(2033&i)return void v(t,e.dom);var n=e.children;if(4&i&&(e=n.$LI),8&i&&(e=n),8192&i){if(2!==e.childFlags){for(var o=0,a=n.length;o<a;++o)x(n[o],t);return}e=n}}while(e)}function w(e,t,i){do{var n=e.flags;if(2033&n)return void m(t,e.dom,i);var o=e.children;if(4&n&&(e=o.$LI),8&n&&(e=o),8192&n){if(2!==e.childFlags){for(var a=0,s=o.length;a<s;++a)w(o[a],t,i);return}e=o}}while(e)}function S(e,t,i){return e.constructor.getDerivedStateFromProps?u(i,e.constructor.getDerivedStateFromProps(t,i)):i}var D={v:!1},I={componentComparator:null,createVNode:null,renderComplete:null};function E(e,t){e.textContent=t}function T(e,t){return h(e)&&e.event===t.event&&e.data===t.data}function A(e,t){for(var i in t)void 0===e[i]&&(e[i]=t[i]);return e}function O(e,t){return!!r(e)&&(e(t),!0)}var P="$";function k(e,t,i,n,o,a,s,r){this.childFlags=e,this.children=t,this.className=i,this.dom=null,this.flags=n,this.key=void 0===o?null:o,this.props=void 0===a?null:a,this.ref=void 0===s?null:s,this.type=r}function M(e,t,i,n,o,a,s,r){var l=void 0===o?1:o,d=new k(l,n,i,e,s,a,r,t);return I.createVNode&&I.createVNode(d),0===l&&$(d,d.children),d}function R(e,t,i,n,o){e=function(e,t){return 12&e?e:t.prototype&&t.prototype.render?4:t.render?32776:8}(e,t);var s=new k(1,null,null,e,n,function(e,t,i){var n=(32768&e?t.render:t).defaultProps;return a(n)?i:a(i)?u(n,null):A(i,n)}(e,t,i),function(e,t,i){if(4&e)return i;var n=(32768&e?t.render:t).defaultHooks;return a(n)?i:a(i)?n:A(i,n)}(e,t,o),t);return I.createVNode&&I.createVNode(s),s}function L(e,t){return new k(1,a(e)||!0===e||!1===e?"":e,null,16,t,null,null,null)}function B(e,t,i){var n=M(8192,8192,null,e,t,null,i,null);switch(n.childFlags){case 1:n.children=H(),n.childFlags=2;break;case 16:n.children=[L(e)],n.childFlags=4}return n}function V(e){var t=e.props;if(t){var i=e.flags;481&i&&(void 0!==t.children&&a(e.children)&&$(e,t.children),void 0!==t.className&&(a(e.className)&&(e.className=t.className||null),t.className=void 0)),void 0!==t.key&&(e.key=t.key,t.key=void 0),void 0!==t.ref&&(e.ref=8&i?u(e.ref,t.ref):t.ref,t.ref=void 0)}return e}function F(e){var t=-16385&e.flags,i=e.props;if(14&t&&!d(i)){var n=i;for(var o in i={},n)i[o]=n[o]}return 8192&t?function(e){var t=e.children,i=e.childFlags;return B(2===i?F(t):t.map(F),i,e.key)}(e):new k(e.childFlags,e.children,e.className,t,e.key,i,e.ref,e.type)}function H(){return L("",null)}function N(e,t){var i=G(e);return M(1024,1024,null,i,0,null,i.key,t)}function z(e,t,i,a){for(var r=e.length;i<r;i++){var u=e[i];if(!s(u)){var c=a+P+i;if(n(u))z(u,t,0,c);else{if(o(u))u=L(u,c);else{var h=u.key,p=l(h)&&h[0]===P;(81920&u.flags||p)&&(u=F(u)),u.flags|=65536,p?h.substring(0,a.length)!==a&&(u.key=a+h):d(h)?u.key=c:u.key=a+h}t.push(u)}}}}function W(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case g:return 8192;default:return 1}}function $(e,t){var i,a=1;if(s(t))i=t;else if(o(t))a=16,i=t;else if(n(t)){for(var r=t.length,u=0;u<r;++u){var c=t[u];if(s(c)||n(c)){i=i||t.slice(0,u),z(t,i,u,"");break}if(o(c))(i=i||t.slice(0,u)).push(L(c,P+u));else{var h=c.key,p=(81920&c.flags)>0,g=d(h),_=l(h)&&h[0]===P;p||g||_?(i=i||t.slice(0,u),(p||_)&&(c=F(c)),(g||_)&&(c.key=P+u),i.push(c)):i&&i.push(c),c.flags|=65536}}a=0===(i=i||t).length?1:8}else(i=t).flags|=65536,81920&t.flags&&(i=F(t)),a=2;return e.children=i,e.childFlags=a,e}function G(e){return s(e)||o(e)?L(e,null):n(e)?B(e,0,null):16384&e.flags?F(e):e}var j="http://www.w3.org/1999/xlink",U="http://www.w3.org/XML/1998/namespace",K={"xlink:actuate":j,"xlink:arcrole":j,"xlink:href":j,"xlink:role":j,"xlink:show":j,"xlink:title":j,"xlink:type":j,"xml:base":U,"xml:lang":U,"xml:space":U};function Z(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var q=Z(0),Y=Z(null),X=Z(!0);function Q(e,t){var i=t.$EV;return i||(i=t.$EV=Z(null)),i[e]||1==++q[e]&&(Y[e]=function(e){var t="onClick"===e||"onDblClick"===e?function(e){return function(t){0===t.button?ee(t,!0,e,oe(t)):t.stopPropagation()}}(e):function(e){return function(t){ee(t,!1,e,oe(t))}}(e);return document.addEventListener(_(e),t),t}(e)),i}function J(e,t){var i=t.$EV;i&&i[e]&&(0==--q[e]&&(document.removeEventListener(_(e),Y[e]),Y[e]=null),i[e]=null)}function ee(e,t,i,n){var o=function(e){return r(e.composedPath)?e.composedPath()[0]:e.target}(e);do{if(t&&o.disabled)return;var a=o.$EV;if(a){var s=a[i];if(s&&(n.dom=o,s.event?s.event(s.data,e):s(e),e.cancelBubble))return}o=o.parentNode}while(!d(o))}function te(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function ie(){return this.defaultPrevented}function ne(){return this.cancelBubble}function oe(e){var t={dom:document};return e.isDefaultPrevented=ie,e.isPropagationStopped=ne,e.stopPropagation=te,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function ae(e,t,i){if(e[t]){var n=e[t];n.event?n.event(n.data,i):n(i)}else{var o=t.toLowerCase();e[o]&&e[o](i)}}function se(e,t){var i=function(i){var n=this.$V;if(n){var o=n.props||p,a=n.dom;if(l(e))ae(o,e,i);else for(var s=0;s<e.length;++s)ae(o,e[s],i);if(r(t)){var d=this.$V,u=d.props||p;t(u,a,!1,d)}}};return Object.defineProperty(i,"wrapped",{configurable:!1,enumerable:!1,value:!0,writable:!1}),i}function re(e,t,i){var n="$"+t,o=e[n];if(o){if(o[1].wrapped)return;e.removeEventListener(o[0],o[1]),e[n]=null}r(i)&&(e.addEventListener(t,i),e[n]=[t,i])}function le(e){return"checkbox"===e||"radio"===e}var de=se("onInput",he),ue=se(["onClick","onChange"],he);function ce(e){e.stopPropagation()}function he(e,t){var i=e.type,n=e.value,o=e.checked,s=e.multiple,r=e.defaultValue,l=!a(n);i&&i!==t.type&&t.setAttribute("type",i),a(s)||s===t.multiple||(t.multiple=s),a(r)||l||(t.defaultValue=r+""),le(i)?(l&&(t.value=n),a(o)||(t.checked=o)):l&&t.value!==n?(t.defaultValue=n,t.value=n):a(o)||(t.checked=o)}function pe(e,t){if("option"===e.type)!function(e,t){var i=e.props||p,o=e.dom;o.value=i.value,i.value===t||n(t)&&-1!==t.indexOf(i.value)?o.selected=!0:a(t)&&a(i.selected)||(o.selected=i.selected||!1)}(e,t);else{var i=e.children,o=e.flags;if(4&o)pe(i.$LI,t);else if(8&o)pe(i,t);else if(2===e.childFlags)pe(i,t);else if(12&e.childFlags)for(var s=0,r=i.length;s<r;++s)pe(i[s],t)}}ce.wrapped=!0;var ge=se("onChange",_e);function _e(e,t,i,n){var o=Boolean(e.multiple);a(e.multiple)||o===t.multiple||(t.multiple=o);var s=e.selectedIndex;if(-1===s&&(t.selectedIndex=-1),1!==n.childFlags){var r=e.value;"number"==typeof s&&s>-1&&t.options[s]&&(r=t.options[s].value),i&&a(r)&&(r=e.defaultValue),pe(n,r)}}var fe,me,ve=se("onInput",ye),Ce=se("onChange");function ye(e,t,i){var n=e.value,o=t.value;if(a(n)){if(i){var s=e.defaultValue;a(s)||s===o||(t.defaultValue=s,t.value=s)}}else o!==n&&(t.defaultValue=n,t.value=n)}function be(e,t,i,n,o,a){64&e?he(n,i):256&e?_e(n,i,o,t):128&e&&ye(n,i,o),a&&(i.$V=t)}function xe(e,t,i){64&e?function(e,t){le(t.type)?(re(e,"change",ue),re(e,"click",ce)):re(e,"input",de)}(t,i):256&e?function(e){re(e,"change",ge)}(t):128&e&&function(e,t){re(e,"input",ve),t.onChange&&re(e,"change",Ce)}(t,i)}function we(e){return e.type&&le(e.type)?!a(e.checked):!a(e.value)}function Se(){return{current:null}}function De(e){return{render:e}}function Ie(e){e&&!O(e,null)&&e.current&&(e.current=null)}function Ee(e,t,i){e&&(r(e)||void 0!==e.current)&&i.push((function(){O(e,t)||void 0===e.current||(e.current=t)}))}function Te(e,t){Ae(e),x(e,t)}function Ae(e){var t,i=e.flags,n=e.children;if(481&i){t=e.ref;var o=e.props;Ie(t);var s=e.childFlags;if(!d(o))for(var l=Object.keys(o),u=0,c=l.length;u<c;u++){var h=l[u];X[h]&&J(h,e.dom)}12&s?Oe(n):2===s&&Ae(n)}else n&&(4&i?(r(n.componentWillUnmount)&&n.componentWillUnmount(),Ie(e.ref),n.$UN=!0,Ae(n.$LI)):8&i?(!a(t=e.ref)&&r(t.onComponentWillUnmount)&&t.onComponentWillUnmount(b(e,!0),e.props||p),Ae(n)):1024&i?Te(n,e.ref):8192&i&&12&e.childFlags&&Oe(n))}function Oe(e){for(var t=0,i=e.length;t<i;++t)Ae(e[t])}function Pe(e){e.textContent=""}function ke(e,t,i){Oe(i),8192&t.flags?x(t,e):Pe(e)}function Me(e,t,i,n){var o=e&&e.__html||"",s=t&&t.__html||"";o!==s&&(a(s)||function(e,t){var i=document.createElement("i");return i.innerHTML=t,i.innerHTML===e.innerHTML}(n,s)||(d(i)||(12&i.childFlags?Oe(i.children):2===i.childFlags&&Ae(i.children),i.children=null,i.childFlags=1),n.innerHTML=s))}function Re(e,t,i,n,o,s,d){switch(e){case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":case"selectedIndex":break;case"autoFocus":n.autofocus=!!i;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":n[e]=!!i;break;case"defaultChecked":case"value":case"volume":if(s&&"value"===e)break;var u=a(i)?"":i;n[e]!==u&&(n[e]=u);break;case"style":!function(e,t,i){if(a(t))i.removeAttribute("style");else{var n,o,s=i.style;if(l(t))s.cssText=t;else if(a(e)||l(e))for(n in t)o=t[n],s.setProperty(n,o);else{for(n in t)(o=t[n])!==e[n]&&s.setProperty(n,o);for(n in e)a(t[n])&&s.removeProperty(n)}}}(t,i,n);break;case"dangerouslySetInnerHTML":Me(t,i,d,n);break;default:X[e]?function(e,t,i,n){if(r(i))Q(e,n)[e]=i;else if(h(i)){if(T(t,i))return;Q(e,n)[e]=i}else J(e,n)}(e,t,i,n):111===e.charCodeAt(0)&&110===e.charCodeAt(1)?function(e,t,i,n){if(h(i)){if(T(t,i))return;i=function(e){var t=e.event;return function(i){t(e.data,i)}}(i)}re(n,_(e),i)}(e,t,i,n):a(i)?n.removeAttribute(e):o&&K[e]?n.setAttributeNS(K[e],e,i):n.setAttribute(e,i)}}function Le(e,t,i,n,o){var a=!1,s=(448&t)>0;for(var r in s&&(a=we(i))&&xe(t,n,i),i)Re(r,null,i[r],n,o,a,null);s&&be(t,e,n,i,!0,a)}function Be(e,t,i){var n=G(e.render(t,e.state,i)),o=i;return r(e.getChildContext)&&(o=u(i,e.getChildContext())),e.$CX=o,n}function Ve(e,t,i,n,o,a){var s=new t(i,n),l=s.$N=Boolean(t.getDerivedStateFromProps||s.getSnapshotBeforeUpdate);if(s.$SVG=o,s.$L=a,e.children=s,s.$BS=!1,s.context=n,s.props===p&&(s.props=i),l)s.state=S(s,i,s.state);else if(r(s.componentWillMount)){s.$BR=!0,s.componentWillMount();var u=s.$PS;if(!d(u)){var c=s.state;if(d(c))s.state=u;else for(var h in u)c[h]=u[h];s.$PS=null}s.$BR=!1}return s.$LI=Be(s,i,n),s}function Fe(e,t){var i=e.props||p;return 32768&e.flags?e.type.render(i,e.ref,t):e.type(i,t)}function He(e,t,i,n,o,a){var s=e.flags|=16384;481&s?ze(e,t,i,n,o,a):4&s?function(e,t,i,n,o,a){var s=Ve(e,e.type,e.props||p,i,n,a);He(s.$LI,t,s.$CX,n,o,a),$e(e.ref,s,a)}(e,t,i,n,o,a):8&s?(!function(e,t,i,n,o,a){He(e.children=G(Fe(e,i)),t,i,n,o,a)}(e,t,i,n,o,a),Ge(e,a)):512&s||16&s?Ne(e,t,o):8192&s?function(e,t,i,n,o,a){var s=e.children,r=e.childFlags;12&r&&0===s.length&&(r=e.childFlags=2,s=e.children=H());2===r?He(s,i,t,n,o,a):We(s,i,t,n,o,a)}(e,i,t,n,o,a):1024&s&&function(e,t,i,n,o){He(e.children,e.ref,t,!1,null,o);var a=H();Ne(a,i,n),e.dom=a.dom}(e,i,t,o,a)}function Ne(e,t,i){var n=e.dom=document.createTextNode(e.children);d(t)||m(t,n,i)}function ze(e,t,i,n,o,s){var r=e.flags,l=e.props,u=e.className,c=e.childFlags,h=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,n=n||(32&r)>0),p=e.children;if(a(u)||""===u||(n?h.setAttribute("class",u):h.className=u),16===c)E(h,p);else if(1!==c){var g=n&&"foreignObject"!==e.type;2===c?(16384&p.flags&&(e.children=p=F(p)),He(p,h,i,g,null,s)):8!==c&&4!==c||We(p,h,i,g,null,s)}d(t)||m(t,h,o),d(l)||Le(e,r,l,h,n),Ee(e.ref,h,s)}function We(e,t,i,n,o,a){for(var s=0;s<e.length;++s){var r=e[s];16384&r.flags&&(e[s]=r=F(r)),He(r,t,i,n,o,a)}}function $e(e,t,i){Ee(e,t,i),r(t.componentDidMount)&&i.push(function(e){return function(){e.componentDidMount()}}(t))}function Ge(e,t){var i=e.ref;a(i)||(O(i.onComponentWillMount,e.props||p),r(i.onComponentDidMount)&&t.push(function(e,t){return function(){e.onComponentDidMount(b(t,!0),t.props||p)}}(i,e)))}function je(e,t,i,n,o,l,c){var h=t.flags|=16384;e.flags!==h||e.type!==t.type||e.key!==t.key||2048&h?16384&e.flags?function(e,t,i,n,o,a){Ae(e),t.flags&e.flags&2033?(He(t,null,n,o,null,a),function(e,t,i){e.replaceChild(t,i)}(i,t.dom,e.dom)):(He(t,i,n,o,b(e,!0),a),x(e,i))}(e,t,i,n,o,c):He(t,i,n,o,l,c):481&h?function(e,t,i,n,o,s){var r,l=t.dom=e.dom,d=e.props,u=t.props,c=!1,h=!1;if(n=n||(32&o)>0,d!==u){var g=d||p;if((r=u||p)!==p)for(var _ in(c=(448&o)>0)&&(h=we(r)),r){var f=g[_],m=r[_];f!==m&&Re(_,f,m,l,n,h,e)}if(g!==p)for(var v in g)a(r[v])&&!a(g[v])&&Re(v,g[v],null,l,n,h,e)}var C=t.children,y=t.className;e.className!==y&&(a(y)?l.removeAttribute("class"):n?l.setAttribute("class",y):l.className=y);4096&o?function(e,t){e.textContent!==t&&(e.textContent=t)}(l,C):Ue(e.childFlags,t.childFlags,e.children,C,l,i,n&&"foreignObject"!==t.type,null,e,s);c&&be(o,t,l,r,!1,h);var b=t.ref,x=e.ref;x!==b&&(Ie(x),Ee(b,l,s))}(e,t,n,o,h,c):4&h?function(e,t,i,n,o,a,s){var l=t.children=e.children;if(d(l))return;l.$L=s;var c=t.props||p,h=t.ref,g=e.ref,_=l.state;if(!l.$N){if(r(l.componentWillReceiveProps)){if(l.$BR=!0,l.componentWillReceiveProps(c,n),l.$UN)return;l.$BR=!1}d(l.$PS)||(_=u(_,l.$PS),l.$PS=null)}Ke(l,_,c,i,n,o,!1,a,s),g!==h&&(Ie(g),Ee(h,l,s))}(e,t,i,n,o,l,c):8&h?function(e,t,i,n,o,s,l){var d=!0,u=t.props||p,c=t.ref,h=e.props,g=!a(c),_=e.children;g&&r(c.onComponentShouldUpdate)&&(d=c.onComponentShouldUpdate(h,u));if(!1!==d){g&&r(c.onComponentWillUpdate)&&c.onComponentWillUpdate(h,u);var f=G(Fe(t,n));je(_,f,i,n,o,s,l),t.children=f,g&&r(c.onComponentDidUpdate)&&c.onComponentDidUpdate(h,u)}else t.children=_}(e,t,i,n,o,l,c):16&h?function(e,t){var i=t.children,n=t.dom=e.dom;i!==e.children&&(n.nodeValue=i)}(e,t):512&h?t.dom=e.dom:8192&h?function(e,t,i,n,o,a){var s=e.children,r=t.children,l=e.childFlags,d=t.childFlags,u=null;12&d&&0===r.length&&(d=t.childFlags=2,r=t.children=H());var c=!!(2&d);if(12&l){var h=s.length;(8&l&&8&d||c||!c&&r.length>h)&&(u=b(s[h-1],!1).nextSibling)}Ue(l,d,s,r,i,n,o,u,e,a)}(e,t,i,n,o,c):function(e,t,i,n){var o=e.ref,a=t.ref,r=t.children;if(Ue(e.childFlags,t.childFlags,e.children,r,o,i,!1,null,e,n),t.dom=e.dom,o!==a&&!s(r)){var l=r.dom;v(o,l),f(a,l)}}(e,t,n,c)}function Ue(e,t,i,n,o,a,s,r,l,d){switch(e){case 2:switch(t){case 2:je(i,n,o,a,s,r,d);break;case 1:Te(i,o);break;case 16:Ae(i),E(o,n);break;default:!function(e,t,i,n,o,a){Ae(e),We(t,i,n,o,b(e,!0),a),x(e,i)}(i,n,o,a,s,d)}break;case 1:switch(t){case 2:He(n,o,a,s,r,d);break;case 1:break;case 16:E(o,n);break;default:We(n,o,a,s,r,d)}break;case 16:switch(t){case 16:!function(e,t,i){e!==t&&(""!==e?i.firstChild.nodeValue=t:E(i,t))}(i,n,o);break;case 2:Pe(o),He(n,o,a,s,r,d);break;case 1:Pe(o);break;default:Pe(o),We(n,o,a,s,r,d)}break;default:switch(t){case 16:Oe(i),E(o,n);break;case 2:ke(o,l,i),He(n,o,a,s,r,d);break;case 1:ke(o,l,i);break;default:var u=0|i.length,c=0|n.length;0===u?c>0&&We(n,o,a,s,r,d):0===c?ke(o,l,i):8===t&&8===e?function(e,t,i,n,o,a,s,r,l,d){var u,c,h=a-1,p=s-1,g=0,_=e[g],f=t[g];e:{for(;_.key===f.key;){if(16384&f.flags&&(t[g]=f=F(f)),je(_,f,i,n,o,r,d),e[g]=f,++g>h||g>p)break e;_=e[g],f=t[g]}for(_=e[h],f=t[p];_.key===f.key;){if(16384&f.flags&&(t[p]=f=F(f)),je(_,f,i,n,o,r,d),e[h]=f,p--,g>--h||g>p)break e;_=e[h],f=t[p]}}if(g>h){if(g<=p)for(c=(u=p+1)<s?b(t[u],!0):r;g<=p;)16384&(f=t[g]).flags&&(t[g]=f=F(f)),++g,He(f,i,n,o,c,d)}else if(g>p)for(;g<=h;)Te(e[g++],i);else!function(e,t,i,n,o,a,s,r,l,d,u,c,h){var p,g,_,f=0,m=r,v=r,C=a-r+1,y=s-r+1,x=new Int32Array(y+1),S=C===n,D=!1,I=0,E=0;if(o<4||(C|y)<32)for(f=m;f<=a;++f)if(p=e[f],E<y){for(r=v;r<=s;r++)if(g=t[r],p.key===g.key){if(x[r-v]=f+1,S)for(S=!1;m<f;)Te(e[m++],l);I>r?D=!0:I=r,16384&g.flags&&(t[r]=g=F(g)),je(p,g,l,i,d,u,h),++E;break}!S&&r>s&&Te(p,l)}else S||Te(p,l);else{var T={};for(f=v;f<=s;++f)T[t[f].key]=f;for(f=m;f<=a;++f)if(p=e[f],E<y)if(void 0!==(r=T[p.key])){if(S)for(S=!1;f>m;)Te(e[m++],l);x[r-v]=f+1,I>r?D=!0:I=r,16384&(g=t[r]).flags&&(t[r]=g=F(g)),je(p,g,l,i,d,u,h),++E}else S||Te(p,l);else S||Te(p,l)}if(S)ke(l,c,e),We(t,l,i,d,u,h);else if(D){var A=function(e){var t=0,i=0,n=0,o=0,a=0,s=0,r=0,l=e.length;l>Ze&&(Ze=l,fe=new Int32Array(l),me=new Int32Array(l));for(;i<l;++i)if(0!==(t=e[i])){if(e[n=fe[o]]<t){me[i]=n,fe[++o]=i;continue}for(a=0,s=o;a<s;)e[fe[r=a+s>>1]]<t?a=r+1:s=r;t<e[fe[a]]&&(a>0&&(me[i]=fe[a-1]),fe[a]=i)}a=o+1;var d=new Int32Array(a);s=fe[a-1];for(;a-- >0;)d[a]=s,s=me[s],fe[a]=0;return d}(x);for(r=A.length-1,f=y-1;f>=0;f--)0===x[f]?(16384&(g=t[I=f+v]).flags&&(t[I]=g=F(g)),He(g,l,i,d,(_=I+1)<o?b(t[_],!0):u,h)):r<0||f!==A[r]?w(g=t[I=f+v],l,(_=I+1)<o?b(t[_],!0):u):r--}else if(E!==y)for(f=y-1;f>=0;f--)0===x[f]&&(16384&(g=t[I=f+v]).flags&&(t[I]=g=F(g)),He(g,l,i,d,(_=I+1)<o?b(t[_],!0):u,h))}(e,t,n,a,s,h,p,g,i,o,r,l,d)}(i,n,o,a,s,u,c,r,l,d):function(e,t,i,n,o,a,s,r,l){for(var d,u,c=a>s?s:a,h=0;h<c;++h)d=t[h],u=e[h],16384&d.flags&&(d=t[h]=F(d)),je(u,d,i,n,o,r,l),e[h]=d;if(a<s)for(h=c;h<s;++h)16384&(d=t[h]).flags&&(d=t[h]=F(d)),He(d,i,n,o,r,l);else if(a>s)for(h=c;h<a;++h)Te(e[h],i)}(i,n,o,a,s,u,c,r,d)}}}function Ke(e,t,i,n,o,a,s,l,d){var c=e.state,h=e.props,p=Boolean(e.$N),g=r(e.shouldComponentUpdate);if(p&&(t=S(e,i,t!==c?u(c,t):t)),s||!g||g&&e.shouldComponentUpdate(i,t,o)){!p&&r(e.componentWillUpdate)&&e.componentWillUpdate(i,t,o),e.props=i,e.state=t,e.context=o;var _=null,f=Be(e,i,o);p&&r(e.getSnapshotBeforeUpdate)&&(_=e.getSnapshotBeforeUpdate(h,c)),je(e.$LI,f,n,e.$CX,a,l,d),e.$LI=f,r(e.componentDidUpdate)&&function(e,t,i,n,o){o.push((function(){e.componentDidUpdate(t,i,n)}))}(e,h,c,_,d)}else e.props=i,e.state=t,e.context=o}var Ze=0;function qe(e,t,i,n){var o=[],s=t.$V;D.v=!0,a(s)?a(e)||(16384&e.flags&&(e=F(e)),He(e,t,n,!1,null,o),t.$V=e,s=e):a(e)?(Te(s,t),t.$V=null):(16384&e.flags&&(e=F(e)),je(s,e,t,n,!1,null,o),s=t.$V=e),C(o),D.v=!1,r(i)&&i(),r(I.renderComplete)&&I.renderComplete(s,t)}function Ye(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=p),qe(e,t,i,n)}function Xe(e){return function(t,i,n,o){e||(e=t),Ye(i,e,n,o)}}"undefined"!=typeof document&&window.Node&&(Node.prototype.$EV=null,Node.prototype.$V=null);var Qe=[],Je="undefined"!=typeof Promise?Promise.resolve().then.bind(Promise.resolve()):function(e){window.setTimeout(e,0)},et=!1;function tt(e,t,i,n){var o=e.$PS;if(r(t)&&(t=t(o?u(e.state,o):e.state,e.props,e.context)),a(o))e.$PS=t;else for(var s in t)o[s]=t[s];if(e.$BR)r(i)&&e.$L.push(i.bind(e));else{if(!D.v&&0===Qe.length)return ot(e,n),void(r(i)&&i.call(e));if(-1===Qe.indexOf(e)&&Qe.push(e),n&&(e.$F=!0),et||(et=!0,Je(nt)),r(i)){var l=e.$QU;l||(l=e.$QU=[]),l.push(i)}}}function it(e){for(var t=e.$QU,i=0;i<t.length;++i)t[i].call(e);e.$QU=null}function nt(){var e;for(et=!1;e=Qe.shift();)if(!e.$UN){var t=e.$F;e.$F=!1,ot(e,t),e.$QU&&it(e)}}function ot(e,t){if(t||!e.$BR){var i=e.$PS;e.$PS=null;var n=[];D.v=!0,Ke(e,u(e.state,i),e.props,b(e.$LI,!0).parentNode,e.context,e.$SVG,t,null,n),C(n),D.v=!1}else e.state=e.$PS,e.$PS=null}var at=function(e,t){this.state=null,this.$BR=!1,this.$BS=!0,this.$PS=null,this.$LI=null,this.$UN=!1,this.$CX=null,this.$QU=null,this.$N=!1,this.$L=null,this.$SVG=!1,this.$F=!1,this.props=e||p,this.context=t||p};at.prototype.forceUpdate=function(e){this.$UN||tt(this,{},e,!0)},at.prototype.setState=function(e,t){this.$UN||this.$BS||tt(this,e,t,!1)},at.prototype.render=function(e,t,i){return null};var st="7.4.11"},4755:function(e,t,i){i.r(t),i.d(t,{ALL_WEEKDAYS:function(){return n},Frequency:function(){return $},RRule:function(){return Ge},RRuleSet:function(){return Xe},Weekday:function(){return o},datetime:function(){return v},rrulestr:function(){return Ke}});var n=["MO","TU","WE","TH","FR","SA","SU"],o=function(){function e(e,t){if(0===t)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return e.fromStr=function(t){return new e(n.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},e.prototype.toString=function(){var e=n[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},e.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},e}(),a=function(e){return null!=e},s=function(e){return"number"==typeof e},r=function(e){return"string"==typeof e&&n.includes(e)},l=Array.isArray,d=function(e,t){void 0===t&&(t=e),1===arguments.length&&(t=e,e=0);for(var i=[],n=e;n<t;n++)i.push(n);return i},u=function(e,t){var i=0,n=[];if(l(e))for(;i<t;i++)n[i]=[].concat(e);else for(;i<t;i++)n[i]=e;return n};function c(e,t,i){void 0===i&&(i=" ");var n=String(e);return t|=0,n.length>t?String(n):((t-=n.length)>i.length&&(i+=u(i,t/i.length)),i.slice(0,t)+String(n))}var h=function(e,t,i){var n=e.split(t);return i?n.slice(0,i).concat([n.slice(i).join(t)]):n},p=function(e,t){var i=e%t;return i*t<0?i+t:i},g=function(e,t){return{div:Math.floor(e/t),mod:p(e,t)}},_=function(e){return!a(e)||0===e.length},f=function(e){return!_(e)},m=function(e,t){return f(e)&&-1!==e.indexOf(t)},v=function(e,t,i,n,o,a){return void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=0),new Date(Date.UTC(e,t-1,i,n,o,a))},C=[31,28,31,30,31,30,31,31,30,31,30,31],y=864e5,b=v(1970,1,1),x=[6,0,1,2,3,4,5],w=function(e){return e%4==0&&e%100!=0||e%400==0},S=function(e){return e instanceof Date},D=function(e){return S(e)&&!isNaN(e.getTime())},I=function(e){return t=b,i=e.getTime()-t.getTime(),Math.round(i/y);var t,i},E=function(e){return new Date(b.getTime()+e*y)},T=function(e){var t=e.getUTCMonth();return 1===t&&w(e.getUTCFullYear())?29:C[t]},A=function(e){return x[e.getUTCDay()]},O=function(e,t){var i=v(e,t+1,1);return[A(i),T(i)]},P=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},k=function(e){return new Date(e.getTime())},M=function(e){for(var t=[],i=0;i<e.length;i++)t.push(k(e[i]));return t},R=function(e){e.sort((function(e,t){return e.getTime()-t.getTime()}))},L=function(e,t){void 0===t&&(t=!0);var i=new Date(e);return[c(i.getUTCFullYear().toString(),4,"0"),c(i.getUTCMonth()+1,2,"0"),c(i.getUTCDate(),2,"0"),"T",c(i.getUTCHours(),2,"0"),c(i.getUTCMinutes(),2,"0"),c(i.getUTCSeconds(),2,"0"),t?"Z":""].join("")},B=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(e);if(!t)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},V=function(e,t){return e.toLocaleString("sv-SE",{timeZone:t}).replace(" ","T")+"Z"},F=function(){function e(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,"between"===e?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):"before"===e?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):"after"===e&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return e.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,i=this.maxDate&&e>this.maxDate;if("between"===this.method){if(t)return!0;if(i)return!1}else if("before"===this.method){if(i)return!1}else if("after"===this.method)return!!t||(this.add(e),!1);return this.add(e)},e.prototype.add=function(e){return this._result.push(e),!0},e.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;default:return e.length?e[e.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),H=function(e,t){return H=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},H(e,t)};function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}H(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var z=function(){return z=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},z.apply(this,arguments)};Object.create;function W(e,t,i){if(i||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var $,G=function(e){function t(t,i,n){var o=e.call(this,t,i)||this;return o.iterator=n,o}return N(t,e),t.prototype.add=function(e){return!!this.iterator(e,this._result.length)&&(this._result.push(e),!0)},t}(F),j={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},U=function(e,t){return-1!==e.indexOf(t)},K=function(e){return e.toString()},Z=function(e,t,i){return"".concat(t," ").concat(i,", ").concat(e)},q=function(){function e(e,t,i,n){if(void 0===t&&(t=K),void 0===i&&(i=j),void 0===n&&(n=Z),this.text=[],this.language=i||j,this.gettext=t,this.dateFormatter=n,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var o=[].concat(this.options.bymonthday),s=[].concat(this.options.bynmonthday);o.sort((function(e,t){return e-t})),s.sort((function(e,t){return t-e})),this.bymonthday=o.concat(s),this.bymonthday.length||(this.bymonthday=null)}if(a(this.origOptions.byweekday)){var r=l(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],d=String(r);this.byweekday={allWeeks:r.filter((function(e){return!e.n})),someWeeks:r.filter((function(e){return Boolean(e.n)})),isWeekdays:-1!==d.indexOf("MO")&&-1!==d.indexOf("TU")&&-1!==d.indexOf("WE")&&-1!==d.indexOf("TH")&&-1!==d.indexOf("FR")&&-1===d.indexOf("SA")&&-1===d.indexOf("SU"),isEveryDay:-1!==d.indexOf("MO")&&-1!==d.indexOf("TU")&&-1!==d.indexOf("WE")&&-1!==d.indexOf("TH")&&-1!==d.indexOf("FR")&&-1!==d.indexOf("SA")&&-1!==d.indexOf("SU")};var u=function(e,t){return e.weekday-t.weekday};this.byweekday.allWeeks.sort(u),this.byweekday.someWeeks.sort(u),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){if(!(t.options.freq in e.IMPLEMENTED))return!1;if(t.origOptions.until&&t.origOptions.count)return!1;for(var i in t.origOptions){if(U(["dtstart","tzid","wkst","freq"],i))return!0;if(!U(e.IMPLEMENTED[t.options.freq],i))return!1}return!0},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[Ge.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var i=this.options.until;this.add(this.dateFormatter(i.getUTCFullYear(),this.language.monthNames[i.getUTCMonth()],i.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},e.prototype.HOURLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},e.prototype.MINUTELY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},e.prototype.DAILY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(1===this.options.interval&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},e.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},e.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},e.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},e.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},e.prototype.nth=function(e){var t;e=parseInt(e.toString(),10);var i=this.gettext;if(-1===e)return i("last");var n=Math.abs(e);switch(n){case 1:case 21:case 31:t=n+i("st");break;case 2:case 22:t=n+i("nd");break;case 3:case 23:t=n+i("rd");break;default:t=n+i("th")}return e<0?t+" "+i("last"):t},e.prototype.monthtext=function(e){return this.language.monthNames[e-1]},e.prototype.weekdaytext=function(e){var t=s(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},e.prototype.plural=function(e){return e%100!=1},e.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},e.prototype.list=function(e,t,i,n){var o=this;void 0===n&&(n=","),l(e)||(e=[e]);t=t||function(e){return e.toString()};var a=function(e){return t&&t.call(o,e)};return i?function(e,t,i){for(var n="",o=0;o<e.length;o++)0!==o&&(o===e.length-1?n+=" "+i+" ":n+=t+" "),n+=e[o];return n}(e.map(a),n,i):e.map(a).join(n+" ")},e}(),Y=function(){function e(e){this.done=!0,this.rules=e}return e.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&null===this.symbol},e.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;for(var i in e=null,this.rules){var n=this.rules[i].exec(this.text);n&&(null===e||n[0].length>e[0].length)&&(e=n,t=i)}if(null!=e&&(this.text=this.text.substr(e[0].length),""===this.text&&(this.done=!0)),null==e)return this.done=!0,this.symbol=null,void(this.value=null)}while("SKIP"===t);return this.symbol=t,this.value=e,!0},e.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},e}();function X(e,t){void 0===t&&(t=j);var i={},n=new Y(t.tokens);return n.start(e)?(function(){n.expect("every");var e=n.acceptNumber();e&&(i.interval=parseInt(e[0],10));if(n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":i.freq=Ge.DAILY,n.nextSymbol()&&(a(),d());break;case"weekday(s)":i.freq=Ge.WEEKLY,i.byweekday=[Ge.MO,Ge.TU,Ge.WE,Ge.TH,Ge.FR],n.nextSymbol(),a(),d();break;case"week(s)":i.freq=Ge.WEEKLY,n.nextSymbol()&&(o(),a(),d());break;case"hour(s)":i.freq=Ge.HOURLY,n.nextSymbol()&&(o(),d());break;case"minute(s)":i.freq=Ge.MINUTELY,n.nextSymbol()&&(o(),d());break;case"month(s)":i.freq=Ge.MONTHLY,n.nextSymbol()&&(o(),d());break;case"year(s)":i.freq=Ge.YEARLY,n.nextSymbol()&&(o(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":i.freq=Ge.WEEKLY;var t=n.symbol.substr(0,2).toUpperCase();if(i.byweekday=[Ge[t]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var u=r();if(!u)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");i.byweekday.push(Ge[u]),n.nextSymbol()}a(),function(){n.accept("on"),n.accept("the");var e=l();if(!e)return;i.bymonthday=[e],n.nextSymbol();for(;n.accept("comma");){if(!(e=l()))throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");i.bymonthday.push(e),n.nextSymbol()}}(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(i.freq=Ge.YEARLY,i.bymonth=[s()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var c=s();if(!c)throw new Error("Unexpected symbol "+n.symbol+", expected month");i.bymonth.push(c),n.nextSymbol()}o(),d();break;default:throw new Error("Unknown symbol")}}(),i):null;function o(){var e=n.accept("on"),t=n.accept("the");if(e||t)do{var o=l(),a=r(),d=s();if(o)a?(n.nextSymbol(),i.byweekday||(i.byweekday=[]),i.byweekday.push(Ge[a].nth(o))):(i.bymonthday||(i.bymonthday=[]),i.bymonthday.push(o),n.accept("day(s)"));else if(a)n.nextSymbol(),i.byweekday||(i.byweekday=[]),i.byweekday.push(Ge[a]);else if("weekday(s)"===n.symbol)n.nextSymbol(),i.byweekday||(i.byweekday=[Ge.MO,Ge.TU,Ge.WE,Ge.TH,Ge.FR]);else if("week(s)"===n.symbol){n.nextSymbol();var u=n.acceptNumber();if(!u)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(i.byweekno=[parseInt(u[0],10)];n.accept("comma");){if(!(u=n.acceptNumber()))throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");i.byweekno.push(parseInt(u[0],10))}}else{if(!d)return;n.nextSymbol(),i.bymonth||(i.bymonth=[]),i.bymonth.push(d)}}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){if(n.accept("at"))do{var e=n.acceptNumber();if(!e)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(i.byhour=[parseInt(e[0],10)];n.accept("comma");){if(!(e=n.acceptNumber()))throw new Error("Unexpected symbol "+n.symbol+"; expected hour");i.byhour.push(parseInt(e[0],10))}}while(n.accept("comma")||n.accept("at"))}function s(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function r(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var e=parseInt(n.value[1],10);if(e<-366||e>366)throw new Error("Nth out of range: "+e);return n.nextSymbol(),n.accept("last")?-e:e;default:return!1}}function d(){if("until"===n.symbol){var e=Date.parse(n.text);if(!e)throw new Error("Cannot parse until date:"+n.text);i.until=new Date(e)}else n.accept("for")&&(i.count=parseInt(n.value[0],10),n.expect("number"))}}function Q(e){return e<$.HOURLY}!function(e){e[e.YEARLY=0]="YEARLY",e[e.MONTHLY=1]="MONTHLY",e[e.WEEKLY=2]="WEEKLY",e[e.DAILY=3]="DAILY",e[e.HOURLY=4]="HOURLY",e[e.MINUTELY=5]="MINUTELY",e[e.SECONDLY=6]="SECONDLY"}($||($={}));
/* !
 * rrule.js - Library for working with recurrence rules for calendar dates.
 * https://github.com/jakubroztocil/rrule
 *
 * Copyright 2010, Jakub Roztocil and Lars Schoning
 * Licenced under the BSD licence.
 * https://github.com/jakubroztocil/rrule/blob/master/LICENCE
 *
 */
var J=function(e,t){return void 0===t&&(t=j),new Ge(X(e,t)||void 0)},ee=["count","until","interval","byweekday","bymonthday","bymonth"];q.IMPLEMENTED=[],q.IMPLEMENTED[$.HOURLY]=ee,q.IMPLEMENTED[$.MINUTELY]=ee,q.IMPLEMENTED[$.DAILY]=["byhour"].concat(ee),q.IMPLEMENTED[$.WEEKLY]=ee,q.IMPLEMENTED[$.MONTHLY]=ee,q.IMPLEMENTED[$.YEARLY]=["byweekno","byyearday"].concat(ee);var te=q.isFullyConvertible,ie=function(){function e(e,t,i,n){this.hour=e,this.minute=t,this.second=i,this.millisecond=n||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return 1e3*(60*this.hour*60+60*this.minute+this.second)+this.millisecond},e}(),ne=function(e){function t(t,i,n,o,a,s,r){var l=e.call(this,o,a,s,r)||this;return l.year=t,l.month=i,l.day=n,l}return N(t,e),t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return A(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var t=Math.floor(this.month/12),i=p(this.month,12);this.month=i,this.year+=t,0===this.month&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,t){t>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-t))+7*e:this.day+=-(this.getWeekday()-t)+7*e,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,t,i){for(t&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var n=g(this.hour,24),o=n.div,a=n.mod;if(o&&(this.hour=a,this.addDaily(o)),_(i)||m(i,this.hour))break}},t.prototype.addMinutes=function(e,t,i,n){for(t&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/e)*e);;){this.minute+=e;var o=g(this.minute,60),a=o.div,s=o.mod;if(a&&(this.minute=s,this.addHours(a,!1,i)),(_(i)||m(i,this.hour))&&(_(n)||m(n,this.minute)))break}},t.prototype.addSeconds=function(e,t,i,n,o){for(t&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/e)*e);;){this.second+=e;var a=g(this.second,60),s=a.div,r=a.mod;if(s&&(this.second=r,this.addMinutes(s,!1,i,n)),(_(i)||m(i,this.hour))&&(_(n)||m(n,this.minute))&&(_(o)||m(o,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=O(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,13===this.month&&(this.month=1,++this.year,this.year>9999))return;e=O(this.year,this.month-1)[1]}}},t.prototype.add=function(e,t){var i=e.freq,n=e.interval,o=e.wkst,a=e.byhour,s=e.byminute,r=e.bysecond;switch(i){case $.YEARLY:return this.addYears(n);case $.MONTHLY:return this.addMonths(n);case $.WEEKLY:return this.addWeekly(n,o);case $.DAILY:return this.addDaily(n);case $.HOURLY:return this.addHours(n,t,a);case $.MINUTELY:return this.addMinutes(n,t,a,s);case $.SECONDLY:return this.addSeconds(n,t,a,s,r)}},t}(ie);function oe(e){for(var t=[],i=0,n=Object.keys(e);i<n.length;i++){var o=n[i];m($e,o)||t.push(o),S(e[o])&&!D(e[o])&&t.push(o)}if(t.length)throw new Error("Invalid options: "+t.join(", "));return z({},e)}function ae(e){var t=z(z({},We),oe(e));if(a(t.byeaster)&&(t.freq=Ge.YEARLY),!a(t.freq)||!Ge.FREQUENCIES[t.freq])throw new Error("Invalid frequency: ".concat(t.freq," ").concat(e.freq));if(t.dtstart||(t.dtstart=new Date((new Date).setMilliseconds(0))),a(t.wkst)?s(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=Ge.MO.weekday,a(t.bysetpos)){s(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var i=0;i<t.bysetpos.length;i++){if(0===(u=t.bysetpos[i])||!(u>=-366&&u<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(t.byweekno)||f(t.byweekno)||f(t.byyearday)||Boolean(t.bymonthday)||f(t.bymonthday)||a(t.byweekday)||a(t.byeaster)))switch(t.freq){case Ge.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case Ge.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case Ge.WEEKLY:t.byweekday=[A(t.dtstart)]}if(a(t.bymonth)&&!l(t.bymonth)&&(t.bymonth=[t.bymonth]),a(t.byyearday)&&!l(t.byyearday)&&s(t.byyearday)&&(t.byyearday=[t.byyearday]),a(t.bymonthday))if(l(t.bymonthday)){var n=[],d=[];for(i=0;i<t.bymonthday.length;i++){var u;(u=t.bymonthday[i])>0?n.push(u):u<0&&d.push(u)}t.bymonthday=n,t.bynmonthday=d}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);else t.bymonthday=[],t.bynmonthday=[];if(a(t.byweekno)&&!l(t.byweekno)&&(t.byweekno=[t.byweekno]),a(t.byweekday))if(s(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(r(t.byweekday))t.byweekday=[o.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof o)!t.byweekday.n||t.freq>Ge.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{var c=[],h=[];for(i=0;i<t.byweekday.length;i++){var p=t.byweekday[i];s(p)?c.push(p):r(p)?c.push(o.fromStr(p).weekday):!p.n||t.freq>Ge.MONTHLY?c.push(p.weekday):h.push([p.weekday,p.n])}t.byweekday=f(c)?c:null,t.bynweekday=f(h)?h:null}else t.bynweekday=null;return a(t.byhour)?s(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<Ge.HOURLY?[t.dtstart.getUTCHours()]:null,a(t.byminute)?s(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<Ge.MINUTELY?[t.dtstart.getUTCMinutes()]:null,a(t.bysecond)?s(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<Ge.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function se(e){var t=e.split("\n").map(le).filter((function(e){return null!==e}));return z(z({},t[0]),t[1])}function re(e){var t={},i=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!i)return t;var n=i[1],o=i[2];return n&&(t.tzid=n),t.dtstart=B(o),t}function le(e){if(!(e=e.replace(/^\s+|\s+$/,"")).length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return de(e);var i=t[1];switch(i.toUpperCase()){case"RRULE":case"EXRULE":return de(e);case"DTSTART":return re(e);default:throw new Error("Unsupported RFC prop ".concat(i," in ").concat(e))}}function de(e){var t=re(e.replace(/^RRULE:/i,""));return e.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach((function(i){var n=i.split("="),a=n[0],s=n[1];switch(a.toUpperCase()){case"FREQ":t.freq=$[s.toUpperCase()];break;case"WKST":t.wkst=ze[s.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var r=function(e){if(-1!==e.indexOf(",")){return e.split(",").map(ue)}return ue(e)}(s),l=a.toLowerCase();t[l]=r;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=function(e){var t=e.split(",");return t.map((function(e){if(2===e.length)return ze[e];var t=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!t||t.length<3)throw new SyntaxError("Invalid weekday string: ".concat(e));var i=Number(t[1]),n=t[2],a=ze[n].weekday;return new o(a,i)}))}(s);break;case"DTSTART":case"TZID":var d=re(e);t.tzid=d.tzid,t.dtstart=d.dtstart;break;case"UNTIL":t.until=B(s);break;case"BYEASTER":t.byeaster=Number(s);break;default:throw new Error("Unknown RRULE property '"+a+"'")}})),t}function ue(e){return/^[+-]?\d+$/.test(e)?Number(e):e}var ce=function(){function e(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=L(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:function(e,t){var i=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(V(e,i)),o=new Date(V(e,null!=t?t:"UTC")).getTime()-n.getTime();return new Date(e.getTime()-o)}(this.date,this.tzid)},e}();function he(e){for(var t,i=[],n="",r=Object.keys(e),d=Object.keys(We),u=0;u<r.length;u++)if("tzid"!==r[u]&&m(d,r[u])){var c=r[u].toUpperCase(),h=e[r[u]],p="";if(a(h)&&(!l(h)||h.length)){switch(c){case"FREQ":p=Ge.FREQUENCIES[e.freq];break;case"WKST":p=s(h)?new o(h).toString():h.toString();break;case"BYWEEKDAY":c="BYDAY",p=(t=h,l(t)?t:[t]).map((function(e){return e instanceof o?e:l(e)?new o(e[0],e[1]):new o(e)})).toString();break;case"DTSTART":n=pe(h,e.tzid);break;case"UNTIL":p=L(h,!e.tzid);break;default:if(l(h)){for(var g=[],_=0;_<h.length;_++)g[_]=String(h[_]);p=g.toString()}else p=String(h)}p&&i.push([c,p])}}var f=i.map((function(e){var t=e[0],i=e[1];return"".concat(t,"=").concat(i.toString())})).join(";"),v="";return""!==f&&(v="RRULE:".concat(f)),[n,v].filter((function(e){return!!e})).join("\n")}function pe(e,t){return e?"DTSTART"+new ce(new Date(e),t).toString():""}function ge(e,t){return Array.isArray(e)?!!Array.isArray(t)&&(e.length===t.length&&e.every((function(e,i){return e.getTime()===t[i].getTime()}))):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var _e=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(e,t,i){t&&(t=t instanceof Date?k(t):M(t)),"all"===e?this.all=t:(i._value=t,this[e].push(i))},e.prototype._cacheGet=function(e,t){var i=!1,n=t?Object.keys(t):[],o=function(e){for(var i=0;i<n.length;i++){var o=n[i];if(!ge(t[o],e[o]))return!0}return!1},a=this[e];if("all"===e)i=this.all;else if(l(a))for(var s=0;s<a.length;s++){var r=a[s];if(!n.length||!o(r)){i=r._value;break}}if(!i&&this.all){var d=new F(e,t);for(s=0;s<this.all.length&&d.accept(this.all[s]);s++);i=d.getValue(),this._cacheAdd(e,i,t)}return l(i)?M(i):i instanceof Date?k(i):i},e}(),fe=W(W(W(W(W(W(W(W(W(W(W(W(W([],u(1,31),!0),u(2,28),!0),u(3,31),!0),u(4,30),!0),u(5,31),!0),u(6,30),!0),u(7,31),!0),u(8,31),!0),u(9,30),!0),u(10,31),!0),u(11,30),!0),u(12,31),!0),u(1,7),!0),me=W(W(W(W(W(W(W(W(W(W(W(W(W([],u(1,31),!0),u(2,29),!0),u(3,31),!0),u(4,30),!0),u(5,31),!0),u(6,30),!0),u(7,31),!0),u(8,31),!0),u(9,30),!0),u(10,31),!0),u(11,30),!0),u(12,31),!0),u(1,7),!0),ve=d(1,29),Ce=d(1,30),ye=d(1,31),be=d(1,32),xe=W(W(W(W(W(W(W(W(W(W(W(W(W([],be,!0),Ce,!0),be,!0),ye,!0),be,!0),ye,!0),be,!0),be,!0),ye,!0),be,!0),ye,!0),be,!0),be.slice(0,7),!0),we=W(W(W(W(W(W(W(W(W(W(W(W(W([],be,!0),ve,!0),be,!0),ye,!0),be,!0),ye,!0),be,!0),be,!0),ye,!0),be,!0),ye,!0),be,!0),be.slice(0,7),!0),Se=d(-28,0),De=d(-29,0),Ie=d(-30,0),Ee=d(-31,0),Te=W(W(W(W(W(W(W(W(W(W(W(W(W([],Ee,!0),De,!0),Ee,!0),Ie,!0),Ee,!0),Ie,!0),Ee,!0),Ee,!0),Ie,!0),Ee,!0),Ie,!0),Ee,!0),Ee.slice(0,7),!0),Ae=W(W(W(W(W(W(W(W(W(W(W(W(W([],Ee,!0),Se,!0),Ee,!0),Ie,!0),Ee,!0),Ie,!0),Ee,!0),Ee,!0),Ie,!0),Ee,!0),Ie,!0),Ee,!0),Ee.slice(0,7),!0),Oe=[0,31,60,91,121,152,182,213,244,274,305,335,366],Pe=[0,31,59,90,120,151,181,212,243,273,304,334,365],ke=function(){for(var e=[],t=0;t<55;t++)e=e.concat(d(7));return e}();function Me(e,t){var i,n,o=v(e,1,1),a=w(e)?366:365,s=w(e+1)?366:365,r=I(o),l=A(o),d=z(z({yearlen:a,nextyearlen:s,yearordinal:r,yearweekday:l},function(e){var t=w(e)?366:365,i=v(e,1,1),n=A(i);if(365===t)return{mmask:fe,mdaymask:we,nmdaymask:Ae,wdaymask:ke.slice(n),mrange:Pe};return{mmask:me,mdaymask:xe,nmdaymask:Te,wdaymask:ke.slice(n),mrange:Oe}}(e)),{wnomask:null});if(_(t.byweekno))return d;d.wnomask=u(0,a+7);var c=i=p(7-l+t.wkst,7);c>=4?(c=0,n=d.yearlen+p(l-t.wkst,7)):n=a-c;for(var h=Math.floor(n/7),g=p(n,7),f=Math.floor(h+g/4),C=0;C<t.byweekno.length;C++){var y=t.byweekno[C];if(y<0&&(y+=f+1),y>0&&y<=f){var b=void 0;y>1?(b=c+7*(y-1),c!==i&&(b-=7-i)):b=c;for(var x=0;x<7&&(d.wnomask[b]=1,b++,d.wdaymask[b]!==t.wkst);x++);}}if(m(t.byweekno,1)){b=c+7*f;if(c!==i&&(b-=7-i),b<a)for(C=0;C<7&&(d.wnomask[b]=1,b+=1,d.wdaymask[b]!==t.wkst);C++);}if(c){var S=void 0;if(m(t.byweekno,-1))S=-1;else{var D=A(v(e-1,1,1)),E=p(7-D.valueOf()+t.wkst,7),T=w(e-1)?366:365,O=void 0;E>=4?(E=0,O=T+p(D-t.wkst,7)):O=a-c,S=Math.floor(52+p(O,7)/4)}if(m(t.byweekno,S))for(b=0;b<c;b++)d.wnomask[b]=1}return d}var Re=function(){function e(e){this.options=e}return e.prototype.rebuild=function(e,t){var i=this.options;if(e!==this.lastyear&&(this.yearinfo=Me(e,i)),f(i.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var n=this.yearinfo,o=n.yearlen,s=n.mrange,r=n.wdaymask;this.monthinfo=function(e,t,i,n,o,a){var s={lastyear:e,lastmonth:t,nwdaymask:[]},r=[];if(a.freq===Ge.YEARLY)if(_(a.bymonth))r=[[0,i]];else for(var l=0;l<a.bymonth.length;l++)t=a.bymonth[l],r.push(n.slice(t-1,t+1));else a.freq===Ge.MONTHLY&&(r=[n.slice(t-1,t+1)]);if(_(r))return s;for(s.nwdaymask=u(0,i),l=0;l<r.length;l++)for(var d=r[l],c=d[0],h=d[1]-1,g=0;g<a.bynweekday.length;g++){var f=void 0,m=a.bynweekday[g],v=m[0],C=m[1];C<0?(f=h+7*(C+1),f-=p(o[f]-v,7)):(f=c+7*(C-1),f+=p(7-o[f]+v,7)),c<=f&&f<=h&&(s.nwdaymask[f]=1)}return s}(e,t,o,s,r,i)}a(i.byeaster)&&(this.eastermask=function(e,t){void 0===t&&(t=0);var i=e%19,n=Math.floor(e/100),o=e%100,a=Math.floor(n/4),s=n%4,r=Math.floor((n+8)/25),l=Math.floor((n-r+1)/3),d=Math.floor(19*i+n-a-l+15)%30,u=Math.floor(o/4),c=o%4,h=Math.floor(32+2*s+2*u-d-c)%7,p=Math.floor((i+11*d+22*h)/451),g=Math.floor((d+h-7*p+114)/31),_=(d+h-7*p+114)%31+1,f=Date.UTC(e,g-1,_+t),m=Date.UTC(e,0,1);return[Math.ceil((f-m)/864e5)]}(e,i.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[d(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(e,t){for(var i=this.mrange[t-1],n=this.mrange[t],o=u(null,this.yearlen),a=i;a<n;a++)o[a]=a;return[o,i,n]},e.prototype.wdayset=function(e,t,i){for(var n=u(null,this.yearlen+7),o=I(v(e,t,i))-this.yearordinal,a=o,s=0;s<7&&(n[o]=o,++o,this.wdaymask[o]!==this.options.wkst);s++);return[n,a,o]},e.prototype.ddayset=function(e,t,i){var n=u(null,this.yearlen),o=I(v(e,t,i))-this.yearordinal;return n[o]=o,[n,o,o+1]},e.prototype.htimeset=function(e,t,i,n){var o=this,a=[];return this.options.byminute.forEach((function(t){a=a.concat(o.mtimeset(e,t,i,n))})),R(a),a},e.prototype.mtimeset=function(e,t,i,n){var o=this.options.bysecond.map((function(i){return new ie(e,t,i,n)}));return R(o),o},e.prototype.stimeset=function(e,t,i,n){return[new ie(e,t,i,n)]},e.prototype.getdayset=function(e){switch(e){case $.YEARLY:return this.ydayset.bind(this);case $.MONTHLY:return this.mdayset.bind(this);case $.WEEKLY:return this.wdayset.bind(this);case $.DAILY:default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(e){switch(e){case $.HOURLY:return this.htimeset.bind(this);case $.MINUTELY:return this.mtimeset.bind(this);case $.SECONDLY:return this.stimeset.bind(this)}},e}();function Le(e,t,i,n,o,s){for(var r=[],l=0;l<e.length;l++){var d=void 0,u=void 0,c=e[l];c<0?(d=Math.floor(c/t.length),u=p(c,t.length)):(d=Math.floor((c-1)/t.length),u=p(c-1,t.length));for(var h=[],g=i;g<n;g++){var _=s[g];a(_)&&h.push(_)}var f=void 0;f=d<0?h.slice(d)[0]:h[d];var v=t[u],C=E(o.yearordinal+f),y=P(C,v);m(r,y)||r.push(y)}return R(r),r}function Be(e,t){var i=t.dtstart,n=t.freq,o=t.interval,s=t.until,r=t.bysetpos,l=t.count;if(0===l||0===o)return He(e);var d=ne.fromDate(i),u=new Re(t);u.rebuild(d.year,d.month);for(var c=function(e,t,i){var n=i.freq,o=i.byhour,a=i.byminute,s=i.bysecond;if(Q(n))return function(e){var t=e.dtstart.getTime()%1e3;if(!Q(e.freq))return[];var i=[];return e.byhour.forEach((function(n){e.byminute.forEach((function(o){e.bysecond.forEach((function(e){i.push(new ie(n,o,e,t))}))}))})),i}(i);if(n>=Ge.HOURLY&&f(o)&&!m(o,t.hour)||n>=Ge.MINUTELY&&f(a)&&!m(a,t.minute)||n>=Ge.SECONDLY&&f(s)&&!m(s,t.second))return[];return e.gettimeset(n)(t.hour,t.minute,t.second,t.millisecond)}(u,d,t);;){var h=u.getdayset(n)(d.year,d.month,d.day),p=h[0],g=h[1],_=h[2],v=Ne(p,g,_,u,t);if(f(r))for(var C=Le(r,c,g,_,u,p),y=0;y<C.length;y++){var b=C[y];if(s&&b>s)return He(e);if(b>=i){var x=Fe(b,t);if(!e.accept(x))return He(e);if(l&&! --l)return He(e)}}else for(y=g;y<_;y++){var w=p[y];if(a(w))for(var S=E(u.yearordinal+w),D=0;D<c.length;D++){var I=c[D];b=P(S,I);if(s&&b>s)return He(e);if(b>=i){x=Fe(b,t);if(!e.accept(x))return He(e);if(l&&! --l)return He(e)}}}if(0===t.interval)return He(e);if(d.add(t,v),d.year>9999)return He(e);Q(n)||(c=u.gettimeset(n)(d.hour,d.minute,d.second,0)),u.rebuild(d.year,d.month)}}function Ve(e,t,i){var n=i.bymonth,o=i.byweekno,a=i.byweekday,s=i.byeaster,r=i.bymonthday,l=i.bynmonthday,d=i.byyearday;return f(n)&&!m(n,e.mmask[t])||f(o)&&!e.wnomask[t]||f(a)&&!m(a,e.wdaymask[t])||f(e.nwdaymask)&&!e.nwdaymask[t]||null!==s&&!m(e.eastermask,t)||(f(r)||f(l))&&!m(r,e.mdaymask[t])&&!m(l,e.nmdaymask[t])||f(d)&&(t<e.yearlen&&!m(d,t+1)&&!m(d,-e.yearlen+t)||t>=e.yearlen&&!m(d,t+1-e.yearlen)&&!m(d,-e.nextyearlen+t-e.yearlen))}function Fe(e,t){return new ce(e,t.tzid).rezonedDate()}function He(e){return e.getValue()}function Ne(e,t,i,n,o){for(var a=!1,s=t;s<i;s++){var r=e[s];(a=Ve(n,r,o))&&(e[r]=null)}return a}var ze={MO:new o(0),TU:new o(1),WE:new o(2),TH:new o(3),FR:new o(4),SA:new o(5),SU:new o(6)},We={freq:$.YEARLY,dtstart:null,interval:1,wkst:ze.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},$e=Object.keys(We),Ge=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this._cache=t?null:new _e,this.origOptions=oe(e);var i=ae(e).parsedOptions;this.options=i}return e.parseText=function(e,t){return X(e,t)},e.fromText=function(e,t){return J(e,t)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(e){return Be(e,this.options)},e.prototype._cacheGet=function(e,t){return!!this._cache&&this._cache._cacheGet(e,t)},e.prototype._cacheAdd=function(e,t,i){if(this._cache)return this._cache._cacheAdd(e,t,i)},e.prototype.all=function(e){if(e)return this._iter(new G("all",{},e));var t=this._cacheGet("all");return!1===t&&(t=this._iter(new F("all",{})),this._cacheAdd("all",t)),t},e.prototype.between=function(e,t,i,n){if(void 0===i&&(i=!1),!D(e)||!D(t))throw new Error("Invalid date passed in to RRule.between");var o={before:t,after:e,inc:i};if(n)return this._iter(new G("between",o,n));var a=this._cacheGet("between",o);return!1===a&&(a=this._iter(new F("between",o)),this._cacheAdd("between",a,o)),a},e.prototype.before=function(e,t){if(void 0===t&&(t=!1),!D(e))throw new Error("Invalid date passed in to RRule.before");var i={dt:e,inc:t},n=this._cacheGet("before",i);return!1===n&&(n=this._iter(new F("before",i)),this._cacheAdd("before",n,i)),n},e.prototype.after=function(e,t){if(void 0===t&&(t=!1),!D(e))throw new Error("Invalid date passed in to RRule.after");var i={dt:e,inc:t},n=this._cacheGet("after",i);return!1===n&&(n=this._iter(new F("after",i)),this._cacheAdd("after",n,i)),n},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return he(this.origOptions)},e.prototype.toText=function(e,t,i){return function(e,t,i,n){return new q(e,t,i,n).toString()}(this,e,t,i)},e.prototype.isFullyConvertibleToText=function(){return te(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],e.YEARLY=$.YEARLY,e.MONTHLY=$.MONTHLY,e.WEEKLY=$.WEEKLY,e.DAILY=$.DAILY,e.HOURLY=$.HOURLY,e.MINUTELY=$.MINUTELY,e.SECONDLY=$.SECONDLY,e.MO=ze.MO,e.TU=ze.TU,e.WE=ze.WE,e.TH=ze.TH,e.FR=ze.FR,e.SA=ze.SA,e.SU=ze.SU,e.parseString=se,e.optionsToString=he,e}();var je={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function Ue(e,t){var i=[],n=[],o=[],a=[],s=re(e),r=s.dtstart,l=s.tzid,d=function(e,t){void 0===t&&(t=!1);if(e=e&&e.trim(),!e)throw new Error("Invalid empty string");if(!t)return e.split(/\s/);var i=e.split("\n"),n=0;for(;n<i.length;){var o=i[n]=i[n].replace(/\s+$/g,"");o?n>0&&" "===o[0]?(i[n-1]+=o.slice(1),i.splice(n,1)):n+=1:i.splice(n,1)}return i}(e,t.unfold);return d.forEach((function(e){var t;if(e){var s=function(e){var t=function(e){if(-1===e.indexOf(":"))return{name:"RRULE",value:e};var t=h(e,":",1),i=t[0],n=t[1];return{name:i,value:n}}(e),i=t.name,n=t.value,o=i.split(";");if(!o)throw new Error("empty property name");return{name:o[0].toUpperCase(),parms:o.slice(1),value:n}}(e),r=s.name,d=s.parms,u=s.value;switch(r.toUpperCase()){case"RRULE":if(d.length)throw new Error("unsupported RRULE parm: ".concat(d.join(",")));i.push(se(e));break;case"RDATE":var c=(null!==(t=/RDATE(?:;TZID=([^:=]+))?/i.exec(e))&&void 0!==t?t:[])[1];c&&!l&&(l=c),n=n.concat(qe(u,d));break;case"EXRULE":if(d.length)throw new Error("unsupported EXRULE parm: ".concat(d.join(",")));o.push(se(u));break;case"EXDATE":a=a.concat(qe(u,d));break;case"DTSTART":break;default:throw new Error("unsupported property: "+r)}}})),{dtstart:r,tzid:l,rrulevals:i,rdatevals:n,exrulevals:o,exdatevals:a}}function Ke(e,t){return void 0===t&&(t={}),function(e,t){var i=Ue(e,t),n=i.rrulevals,o=i.rdatevals,a=i.exrulevals,s=i.exdatevals,r=i.dtstart,l=i.tzid,d=!1===t.cache;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||n.length>1||o.length||a.length||s.length){var u=new Xe(d);return u.dtstart(r),u.tzid(l||void 0),n.forEach((function(e){u.rrule(new Ge(Ze(e,r,l),d))})),o.forEach((function(e){u.rdate(e)})),a.forEach((function(e){u.exrule(new Ge(Ze(e,r,l),d))})),s.forEach((function(e){u.exdate(e)})),t.compatible&&t.dtstart&&u.rdate(r),u}var c=n[0]||{};return new Ge(Ze(c,c.dtstart||t.dtstart||r,c.tzid||t.tzid||l),d)}(e,function(e){var t=[],i=Object.keys(e),n=Object.keys(je);if(i.forEach((function(e){m(n,e)||t.push(e)})),t.length)throw new Error("Invalid options: "+t.join(", "));return z(z({},je),e)}(t))}function Ze(e,t,i){return z(z({},e),{dtstart:t,tzid:i})}function qe(e,t){return function(e){e.forEach((function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)}))}(t),e.split(",").map((function(e){return B(e)}))}function Ye(e){var t=this;return function(i){if(void 0!==i&&(t["_".concat(e)]=i),void 0!==t["_".concat(e)])return t["_".concat(e)];for(var n=0;n<t._rrule.length;n++){var o=t._rrule[n].origOptions[e];if(o)return o}}}var Xe=function(e){function t(t){void 0===t&&(t=!1);var i=e.call(this,{},t)||this;return i.dtstart=Ye.apply(i,["dtstart"]),i.tzid=Ye.apply(i,["tzid"]),i._rrule=[],i._rdate=[],i._exrule=[],i._exdate=[],i}return N(t,e),t.prototype._iter=function(e){return function(e,t,i,n,o,a){var s={},r=e.accept;function l(e,t){i.forEach((function(i){i.between(e,t,!0).forEach((function(e){s[Number(e)]=!0}))}))}o.forEach((function(e){var t=new ce(e,a).rezonedDate();s[Number(t)]=!0})),e.accept=function(e){var t=Number(e);return isNaN(t)?r.call(this,e):!(!s[t]&&(l(new Date(t-1),new Date(t+1)),!s[t]))||(s[t]=!0,r.call(this,e))},"between"===e.method&&(l(e.args.after,e.args.before),e.accept=function(e){var t=Number(e);return!!s[t]||(s[t]=!0,r.call(this,e))});for(var d=0;d<n.length;d++){var u=new ce(n[d],a).rezonedDate();if(!e.accept(new Date(u.getTime())))break}t.forEach((function(t){Be(e,t.options)}));var c=e._result;switch(R(c),e.method){case"all":case"between":return c;case"before":return c.length&&c[c.length-1]||null;default:return c.length&&c[0]||null}}(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){Qe(e,this._rrule)},t.prototype.exrule=function(e){Qe(e,this._exrule)},t.prototype.rdate=function(e){Je(e,this._rdate)},t.prototype.exdate=function(e){Je(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map((function(e){return Ke(e.toString())}))},t.prototype.exrules=function(){return this._exrule.map((function(e){return Ke(e.toString())}))},t.prototype.rdates=function(){return this._rdate.map((function(e){return new Date(e.getTime())}))},t.prototype.exdates=function(){return this._exdate.map((function(e){return new Date(e.getTime())}))},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(he({dtstart:this._dtstart}))),this._rrule.forEach((function(t){e=e.concat(t.toString().split("\n"))})),this._exrule.forEach((function(t){e=e.concat(t.toString().split("\n").map((function(e){return e.replace(/^RRULE:/,"EXRULE:")})).filter((function(e){return!/^DTSTART/.test(e)})))})),this._rdate.length&&e.push(et("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(et("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join("\n")},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach((function(t){return e.rrule(t.clone())})),this._exrule.forEach((function(t){return e.exrule(t.clone())})),this._rdate.forEach((function(t){return e.rdate(new Date(t.getTime()))})),this._exdate.forEach((function(t){return e.exdate(new Date(t.getTime()))})),e},t}(Ge);function Qe(e,t){if(!(e instanceof Ge))throw new TypeError(String(e)+" is not RRule instance");m(t.map(String),String(e))||t.push(e)}function Je(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");m(t.map(Number),Number(e))||(t.push(e),R(t))}function et(e,t,i){var n=!i||"UTC"===i.toUpperCase(),o=n?"".concat(e,":"):"".concat(e,";TZID=").concat(i,":"),a=t.map((function(e){return L(e.valueOf(),n)})).join(",");return"".concat(o).concat(a)}},55351:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.registerPattern=t.registerGradient=t.default=void 0;var n=i(28779);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}const a={};t.registerPattern=e=>{const t=(0,n.getNextDefsSvgId)();return a[t]=o({type:"pattern"},e),t};t.registerGradient=(e,t)=>{const i=(0,n.getNextDefsSvgId)();return a[i]=o({type:e},t),i};t.default={getGraphicObjects:()=>a}},22692:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.base64ToBytes=function(e){return new Uint8Array(atob(e).split("").map((e=>e.charCodeAt(0))))},t.bytesToHex=function(e){return[...e].map((e=>e.toString(16).padStart(2,"0"))).join("")},t.bytesToWords=function(e){const t=new Uint32Array(1+(e.length-1>>2));for(let i=0;i<e.length;i+=1)t[i>>2]|=e[i]<<8*(3-i%4);return t},t.concatBytes=function(e,t){const i=new Uint8Array(e.length+t.length);return i.set(e,0),i.set(t,e.length),i},t.hexToBytes=function(e){var t;return new Uint8Array((null===(t=e.match(/.{1,2}/g))||void 0===t?void 0:t.map((e=>parseInt(e,16))))??[])},t.leftRotate=function(e,t){return(e<<t|e>>>32-t)>>>0},t.stringToBytes=function(e){const t=new Uint8Array(e.length);for(let i=0;i<e.length;i+=1)t[i]=255&e.charCodeAt(i);return t},t.wordsToBytes=function(e){const t=new Uint8Array(4*e.length);for(let i=0;i<t.length;i+=1)t[i]=e[i>>2]>>>8*(3-i%4);return t},t.wordsToHex=function(e){return[...e].map((e=>e.toString(16).padStart(8,"0"))).join("")}},78157:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PUBLIC_KEY=t.INTERNAL_USAGE_ID=void 0;t.PUBLIC_KEY={e:65537,n:new Uint8Array([200,219,153,203,140,7,228,253,193,243,62,137,139,60,68,242,48,142,113,88,185,235,253,105,80,74,32,170,96,74,111,250,7,205,154,3,146,115,153,53,45,132,123,56,61,208,184,201,63,24,109,223,0,179,169,102,139,224,73,233,45,173,138,66,98,88,69,76,177,111,113,218,192,33,101,152,25,134,34,173,32,82,230,44,247,200,253,170,192,246,30,12,96,205,100,249,181,93,0,231])},t.INTERNAL_USAGE_ID="hxjQeUX1WEGQKud-NfOYMg"},93391:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.parseLicenseKey=A,t.peekValidationPerformed=function(){return T},t.setLicenseCheckSkipCondition=function(){},t.validateLicense=P;var n=_(i(66636)),o=_(i(87129)),a=i(1956),s=i(20258),r=i(22692),l=i(78157),d=i(1012),u=i(42752),c=i(94281),h=i(99671),p=i(13407);const g=["customerId","maxVersionAllowed","format","internalUsageId"];function _(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},f.apply(null,arguments)}const m=1,v=3,C=".",y="https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeJQuery.aspx",b="https://go.devexpress.com/Licensing_Documentation_DevExtremeJQuery.aspx",x={kind:p.TokenKind.corrupted,error:"general"},w={kind:p.TokenKind.corrupted,error:"verification"},S={kind:p.TokenKind.corrupted,error:"decoding"},D={kind:p.TokenKind.corrupted,error:"deserialization"},I={kind:p.TokenKind.corrupted,error:"payload"},E={kind:p.TokenKind.corrupted,error:"version"};let T=!1;function A(e){if(void 0===e)return x;const t=e.split(C);if(2!==t.length||0===t[0].length||0===t[1].length)return x;if(!function(e){let{text:t,signature:i}=e;return(0,u.compareSignatures)({key:l.PUBLIC_KEY,signature:(0,r.base64ToBytes)(i),actual:(0,d.pad)((0,c.sha1)(t))})}({text:t[0],signature:t[1]}))return w;let i="";try{i=atob(t[0])}catch{return S}let n={};try{n=JSON.parse(i)}catch{return D}const{customerId:o,maxVersionAllowed:a,format:s,internalUsageId:h}=n,_=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(n,g);return void 0!==h?{kind:p.TokenKind.internal,internalUsageId:h}:void 0===o||void 0===a||void 0===s?I:s!==m?E:{kind:p.TokenKind.verified,payload:f({customerId:o,maxVersionAllowed:a},_)}}function O(e){return isNaN(e)||e<v}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.fullVersion;if(T)return;T=!0;const i=(0,s.parseVersion)(t),r=(0,s.assertedVersionsCompatible)(i),{internal:d,error:u}=function(e){let{licenseKey:t,version:i}=e,n=!1;try{n=O(i.patch);const{major:e,minor:o}=n?(0,s.getPreviousMajorVersion)(i):i;if(!t)return{preview:n,error:"W0019"};const a=A(t);return a.kind===p.TokenKind.corrupted?{preview:n,error:"W0021"}:a.kind===p.TokenKind.internal?{preview:n,internal:!0,error:a.internalUsageId===l.INTERNAL_USAGE_ID?void 0:"W0020"}:e&&o?10*e+o>a.payload.maxVersionAllowed?{preview:n,error:"W0020"}:{preview:n,error:void 0}:{preview:n,error:"W0021"}}catch{return{preview:n,error:"W0021"}}}({licenseKey:e,version:i});if(!r&&d)return;if(u&&!d){const e=(0,n.default)().buyNowLink??y,t=(0,n.default)().licensingDocLink??b;(0,h.showTrialPanel)(e,t,a.fullVersion)}const c=O(i.patch);u?o.default.log(c?"W0022":u):c&&!d&&o.default.log("W0022")}t.default={validateLicense:P}},1012:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.pad=function(e){const t=(8*o.PUBLIC_KEY.n.length+6)/8,i=(0,n.concatBytes)((0,n.hexToBytes)(a),e);if(i.length+10>t)throw Error("Key is too short for SHA1 signing algorithm");const s=new Uint8Array(t-i.length);return s.fill(255,0,s.length-1),s[0]=0,s[1]=1,s[s.length-1]=0,(0,n.concatBytes)(s,i)};var n=i(22692),o=i(78157);const a="3021300906052b0e03021a05000414"},42752:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.compareSignatures=function(e){try{const t=BigInt(0),i=BigInt(1),n=BigInt(8),o=(e,t,n)=>{let o=i,a=e,s=t;for(;s;)s&i&&(o=o*a%n),a=a*a%n,s>>=i;return o},a=e=>e.reduce(((e,t)=>(e<<n)+BigInt(t)),t),s=a(e.actual),r=a(e.signature),l=BigInt(e.key.e),d=a(e.key.n);return o(r,l,d)===s}catch{return!0}}},94281:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.preprocess=o,t.sha1=function(e){const t=o(e),i=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]);for(let e=0;e<t.length;e+=16){const o=new Uint32Array(80);for(let i=0;i<16;i+=1)o[i]=t[e+i];for(let e=16;e<80;e+=1){const t=o[e-3]^o[e-8]^o[e-14]^o[e-16];o[e]=t<<1|t>>>31}let a=i[0],s=i[1],r=i[2],l=i[3],d=i[4];for(let e=0;e<80;e+=1){const[t,i]=e<20?[s&r|~s&l,1518500249]:e<40?[s^r^l,1859775393]:e<60?[s&r|s&l|r&l,2400959708]:[s^r^l,3395469782],u=(0,n.leftRotate)(a,5)+t+d+i+o[e];d=l,l=r,r=(0,n.leftRotate)(s,30),s=a,a=u}i[0]+=a,i[1]+=s,i[2]+=r,i[3]+=l,i[4]+=d}return(0,n.wordsToBytes)(i)};var n=i(22692);function o(e){const t=new Uint8Array(e.length+1);t.set((0,n.stringToBytes)(e)),t[t.length-1]=128;const i=(0,n.bytesToWords)(new Uint8Array(t)),o=new Uint32Array(16*Math.ceil((i.length+2)/16));return o.set(i,0),o[o.length-1]=8*(t.length-1),o}},42570:function(e,t){function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},i.apply(null,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.isClient=t.BASE_Z_INDEX=void 0,t.registerCustomComponents=f,t.renderTrialPanel=function(e,t,i,n){f(n);const o=document.createElement(s.trigger);o.setAttribute(r.buyNow,e),o.setAttribute(r.licensingDoc,t),o.setAttribute(r.version,i),document.body.appendChild(o)};const n=t.BASE_Z_INDEX=1500,o=()=>"undefined"!=typeof HTMLElement&&"undefined"!=typeof customElements;t.isClient=o;const a=o()?HTMLElement:class{},s={trigger:"dx-license-trigger",panel:"dx-license"},r={buyNow:"buy-now",licensingDoc:"licensing-doc",version:"version"},l={opacity:"1",visibility:"visible","clip-path":"none",filter:"none"},d=i({},l,{width:"100%",height:"auto","line-height":"normal",display:"block","z-index":`${n}`,position:"static",transform:"translate(0px, 0px)","background-color":"#FF7200",border:"none",margin:"auto","box-sizing":"border-box","text-align":"center"}),u=i({},d,{display:"flex","align-items":"center","flex-direction":"row",position:"relative",top:"0px",left:"0px",padding:"0.5rem"}),c={width:"1rem",cursor:"pointer",height:"1rem"},h=i({},l,{display:"inline",position:"static",padding:"0px",margin:"0px",color:"white","font-family":"'Segoe UI','Open Sans Condensed',-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif","font-size":"0.875rem","font-wight":"600"});function p(e,t){const n=t?i({},e,t):e;return Object.keys(n).reduce(((e,t)=>`${e}${[t,`${n[t]} !important;`].join(": ")}`),"")}class g extends a{constructor(){var e,t,i,n,o;super(),this._observer=null,this._inReassign=!1,this._hidden=!1,this._spanStyles=p(h,null===(e=g.customStyles)||void 0===e?void 0:e.textStyles),this._linkStyles=p(h,null===(t=g.customStyles)||void 0===t?void 0:t.linkStyles),this._containerStyles=p(u,null===(i=g.customStyles)||void 0===i?void 0:i.containerStyles),this._contentStyles=p(d,null===(n=g.customStyles)||void 0===n?void 0:n.contentStyles),this._buttonStyles=p(c,null===(o=g.customStyles)||void 0===o?void 0:o.contentStyles)}_createSpan(e){const t=document.createElement("span");return t.innerText=e,t.style.cssText=this._spanStyles,t}_createLink(e,t){const i=document.createElement("a");return i.innerText=e,i.style.cssText=this._linkStyles,i.href=t,i.target="_blank",i}_createButton(){const e=document.createElement("div");e.style.cssText=this._buttonStyles;const t=document.createElementNS("http://www.w3.org/2000/svg","polygon"),i=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("points","13.4 12.7 8.7 8 13.4 3.4 12.6 2.6 8 7.3 3.4 2.6 2.6 3.4 7.3 8 2.6 12.6 3.4 13.4 8 8.7 12.7 13.4 13.4 12.7"),t.style.cssText=p({fill:"#fff",opacity:".5","stroke-width":"0px"}),i.setAttribute("id","Layer_1"),i.setAttribute("data-name","Layer 1"),i.setAttribute("version","1.1"),i.setAttribute("viewBox","0 0 16 16"),i.style.cssText=p({"vertical-align":"baseline"}),i.appendChild(t),e.appendChild(i),e.onclick=()=>{this._hidden=!0,this.style.cssText=p({display:"none"})},e}_createContentContainer(){const e=document.createElement("div");return e.style.cssText=this._contentStyles,e.append(this._createSpan("For evaluation purposes only. Redistribution prohibited. Please "),this._createLink("register",this.getAttribute(r.licensingDoc)),this._createSpan(" an existing license or "),this._createLink("purchase a new license",this.getAttribute(r.buyNow)),this._createSpan(` to continue use of DevExpress product libraries (v${this.getAttribute(r.version)}).`)),e}_reassignComponent(){this.innerHTML="",this.style.cssText=this._containerStyles,this.append(this._createContentContainer(),this._createButton())}connectedCallback(){this._reassignComponent(),this._observer||(this._observer=new MutationObserver((()=>{var e;this._hidden?null===(e=this._observer)||void 0===e||e.disconnect():this._inReassign?this._inReassign=!1:(this._inReassign=!0,this._reassignComponent())})),this._observer.observe(this,{childList:!0,attributes:!0,subtree:!0}))}disconnectedCallback(){setTimeout((()=>{document.getElementsByTagName(s.panel).length||document.body.prepend(this)}),100)}}g.customStyles=void 0;class _ extends a{connectedCallback(){this.style.cssText=p({display:"none"});if(!document.getElementsByTagName(s.panel).length){const e=document.createElement(s.panel);e.setAttribute(r.version,this.getAttribute(r.version)),e.setAttribute(r.buyNow,this.getAttribute(r.buyNow)),e.setAttribute(r.licensingDoc,this.getAttribute(r.licensingDoc)),e.setAttribute("data-permanent","true"),document.body.prepend(e)}}}function f(e){customElements.get(s.trigger)||(g.customStyles=e,customElements.define(s.trigger,_),customElements.define(s.panel,g))}},99671:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.registerTrialPanelComponents=function(e){(0,n.isClient)()&&(0,n.registerCustomComponents)(e)},t.showTrialPanel=function(e,t,i,o){(0,n.isClient)()&&(0,n.renderTrialPanel)(e,t,i,o)};var n=i(42570)},13407:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0,function(e){e.corrupted="corrupted",e.verified="verified",e.internal="internal"}(i||(t.TokenKind=i={}))},3226:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Action=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(21274),s=i(11528),r=i(3104);class l{constructor(e,t){t=t||{},this._action=e,this._context=t.context||(0,r.getWindow)(),this._beforeExecute=t.beforeExecute,this._afterExecute=t.afterExecute,this._component=t.component,this._validatingTargetName=t.validatingTargetName;const i=this._excludeValidators={};if(t.excludeValidators)for(let e=0;e<t.excludeValidators.length;e++)i[t.excludeValidators[e]]=!0}execute(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n={action:this._action,args:Array.prototype.slice.call(t),context:this._context,component:this._component,validatingTargetName:this._validatingTargetName,cancel:!1,handled:!1},o=this._beforeExecute,a=this._afterExecute,s=n.args[0]||{};if(!this._validateAction(n))return;if(null==o||o.call(this._context,n),n.cancel)return;const r=this._executeAction(n);return s.cancel?void 0:(null==a||a.call(this._context,n),r)}_validateAction(e){const t=this._excludeValidators,{executors:i}=l;for(const o in i)if(!t[o]){var n;const t=i[o];if(null===(n=t.validate)||void 0===n||n.call(t,e),e.cancel)return!1}return!0}_executeAction(e){let t;const{executors:i}=l;for(const o in i){var n;const a=i[o];if(null===(n=a.execute)||void 0===n||n.call(a,e),e.handled){t=e.result;break}}return t}static registerExecutor(e,t){(0,s.isPlainObject)(e)?(0,a.each)(e,l.registerExecutor):l.executors[e]=t}static unregisterExecutor(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];(0,a.each)(t,(function(){delete l.executors[this]}))}}t.Action=l,l.executors={};const d=e=>t=>{if(!t.args.length)return;const i=t.args[0],n=i[t.validatingTargetName]||i.element;n&&e((0,o.default)(n))&&(t.cancel=!0)};l.registerExecutor({disabled:{validate:d((e=>e.is(".dx-state-disabled, .dx-state-disabled *")))},readOnly:{validate:d((e=>e.is(".dx-state-readonly, .dx-state-readonly *:not(.dx-state-independent)")))},undefined:{execute:e=>{e.action||(e.result=void 0,e.handled=!0)}},func:{execute:e=>{(0,s.isFunction)(e.action)&&(e.result=e.action.call(e.context,e.args[0]),e.handled=!0)}}});t.default=l},40958:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(87129))&&n.__esModule?n:{default:n},a=i(11528);const s=function(e,t,i){return function(){const n=this.callBase;this.callBase=e[t];try{return i.apply(this,arguments)}finally{this.callBase=n}}},r=function(e){const t=this;let i,n,o;if(!e)return t;for(n in e)o=e[n],i="function"==typeof t.prototype[n]&&"function"==typeof o,t.prototype[n]=i?s(t.parent.prototype,n,o):o;return t},l=function(){const e=this;let t,i,n;const o=Object.prototype.hasOwnProperty.bind(e);!o("_includedCtors")&&!o("_includedPostCtors")&&(e._includedCtors=e._includedCtors.slice(0),e._includedPostCtors=e._includedPostCtors.slice(0));for(var a=arguments.length,s=new Array(a),r=0;r<a;r++)s[r]=arguments[r];for(n=0;n<s.length;n++)for(i in t=s[n],t.ctor&&e._includedCtors.push(t.ctor),t.postCtor&&e._includedPostCtors.push(t.postCtor),t)"ctor"!==i&&"postCtor"!==i&&"default"!==i&&(e.prototype[i]=t[i]);return e},d=function(e){if(!Object.prototype.hasOwnProperty.bind(this)("parent")&&this.parent){const t=Object.getPrototypeOf(this);return t===e||t.subclassOf(e)}return this.parent===e||!(!this.parent||!this.parent.subclassOf)&&this.parent.subclassOf(e)},u=function(){throw o.default.Error("E0001")},c=function(){};c.inherit=function(e){const t=function(){if(!this||(0,a.isWindow)(this)||"function"!=typeof this.constructor)throw o.default.Error("E0003");const e=this,{ctor:t}=e,i=e.constructor._includedCtors,n=e.constructor._includedPostCtors;let s;for(s=0;s<i.length;s++)i[s].call(e);if(t){for(var r=arguments.length,l=new Array(r),d=0;d<r;d++)l[d]=arguments[d];t.apply(e,l)}for(s=0;s<n.length;s++)n[s].call(e)};return t.prototype=function(e){const t=function(){};return t.prototype=e.prototype,new t}(this),Object.setPrototypeOf(t,this),t.inherit=this.inherit,t.abstract=u,t.redefine=r,t.include=l,t.subclassOf=d,t.parent=this,t._includedCtors=this._includedCtors?this._includedCtors.slice(0):[],t._includedPostCtors=this._includedPostCtors?this._includedPostCtors.slice(0):[],t.prototype.constructor=t,t.redefine(e),t},c.abstract=u;t.default=c},10718:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.registerComponent=void 0;var n=r(i(55771)),o=r(i(87129)),a=r(i(64553)),s=i(85521);function r(e){return e&&e.__esModule?e:{default:e}}t.registerComponent=function(e,t,i){i?t[e]=i:i=t,(0,s.name)(i,e),n.default.fire(e,i)};n.default.add((function(e,t){a.default.fn[e]=function(i){let n;if("string"==typeof i){const a=i,s=[].slice.call(arguments).slice(1);this.each((function(){const i=t.getInstance(this);if(!i)throw o.default.Error("E0009",e);const r=i[a].apply(i,s);void 0===n&&(n=r)}))}else this.each((function(){const e=t.getInstance(this);e?e.option(i):new t(this,i)})),n=this;return n}}))},21233:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.componentRegistratorCallbacks=void 0;var n,o=(n=i(35329))&&n.__esModule?n:{default:n};t.componentRegistratorCallbacks=new o.default},34338:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(87129))&&n.__esModule?n:{default:n},a=i(52576);const s={rtlEnabled:!1,defaultCurrency:"USD",defaultUseCurrencyAccountingStyle:!0,oDataFilterToLower:!0,serverDecimalSeparator:".",decimalSeparator:".",thousandsSeparator:",",forceIsoDateParsing:!0,wrapActionsBeforeExecute:!0,useLegacyStoreResult:!1,useJQuery:void 0,editorStylingMode:void 0,useLegacyVisibleIndex:!1,floatingActionButtonConfig:{icon:"add",closeIcon:"close",label:"",position:{at:"right bottom",my:"right bottom",offset:{x:-16,y:-16}},maxSpeedDialActionCount:5,shading:!1,direction:"auto"},optionsParser:e=>{"{"!==e.trim().charAt(0)&&(e=`{${e}}`);try{return JSON.parse(e)}catch(t){try{return JSON.parse(r(e))}catch(i){throw o.default.Error("E3018",t,e)}}}},r=e=>e.replace(/'/g,'"').replace(/,\s*([\]}])/g,"$1").replace(/([{,])\s*([^":\s]+)\s*:/g,'$1"$2":'),l=["decimalSeparator","thousandsSeparator"],d=function(){if(!arguments.length)return s;const e=arguments.length<=0?void 0:arguments[0];l.forEach((t=>{if(e[t]){const e=`Now, the ${t} is selected based on the specified locale.`;o.default.log("W0003","config",t,"19.2",e)}})),(0,a.extend)(s,e)};"undefined"!=typeof DevExpress&&DevExpress.config&&d(DevExpress.config);t.default=d},98905:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(i(66636)),o=f(i(87129)),a=i(2607),s=f(i(64553)),r=f(i(84718)),l=i(52576),d=f(i(3122)),u=f(i(63283)),c=i(57653),h=i(98479),p=i(11528),g=i(55355),_=i(3104);function f(e){return e&&e.__esModule?e:{default:e}}const m=(0,_.getWindow)(),v={iPhone:"iPhone",iPhone5:"iPhone",iPhone6:"iPhone",iPhone6plus:"iPhone",iPad:"iPad",iPadMini:"iPad Mini",androidPhone:"Android Mobile",androidTablet:"Android",msSurface:"Windows ARM Tablet PC",desktop:"desktop"},C={deviceType:"desktop",platform:"generic",version:[],phone:!1,tablet:!1,android:!1,ios:!1,generic:!0,grade:"A",mac:!1},y={generic(e){const t=/windows phone/i.test(e)||e.match(/WPDesktop/),i=!t&&/Windows(.*)arm(.*)Tablet PC/i.test(e),n=!t&&!i&&/msapphost/i.test(e),o=/((intel|ppc) mac os x)/.test(e.toLowerCase());return t||i||n||o?{deviceType:t?"phone":i?"tablet":"desktop",platform:"generic",version:[],grade:"A",mac:o}:null},appleTouchDevice(e){const t=(0,_.getNavigator)(),i=/Macintosh/i.test(e)&&(null==t?void 0:t.maxTouchPoints)>2;if(!/ip(hone|od|ad)/i.test(e)&&!i)return null;const n=/ip(hone|od)/i.test(e),o=e.match(/os\s{0,}X? (\d+)_(\d+)_?(\d+)?/i);return{deviceType:n?"phone":"tablet",platform:"ios",version:o?[parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3]||0,10)]:[],grade:480===m.screen.height?"B":"A"}},android(e){const t=/android|htc_|silk/i.test(e),i=/windows phone/i.test(e);if(!t||i)return null;const n=/mobile/i.test(e),o=e.match(/android (\d+)\.?(\d+)?\.?(\d+)?/i),a=o?[parseInt(o[1],10),parseInt(o[2]||0,10),parseInt(o[3]||0,10)]:[];return{deviceType:n?"phone":"tablet",platform:"android",version:a,grade:a.length>1&&(a[0]<4||4===a[0]&&a[1]<4)?"B":"A"}}},b=[y.appleTouchDevice,y.android,y.generic];const x=new class{constructor(e){this._window=(null==e?void 0:e.window)??m,this._realDevice=this._getDevice(),this._currentDevice=void 0,this._currentOrientation=void 0,this._eventsStrategy=new a.EventsStrategy(this),this.changed=(0,r.default)(),(0,_.hasWindow)()&&(d.default.add(this._recalculateOrientation.bind(this)),u.default.add(this._recalculateOrientation.bind(this)))}current(e){if(e)return this._currentDevice=this._getDevice(e),this._forced=!0,void this.changed.fire();if(!this._currentDevice){e=void 0;try{e=this._getDeviceOrNameFromWindowScope()}catch(t){e=this._getDeviceNameFromSessionStorage()}finally{e||(e=this._getDeviceNameFromSessionStorage()),e&&(this._forced=!0)}this._currentDevice=this._getDevice(e)}return this._currentDevice}real(e){return(0,l.extend)({},this._realDevice)}orientation(){return this._currentOrientation}isForced(){return this._forced}isRippleEmulator(){return!!this._window.tinyHippos}_getCssClasses(e){const t=[],i=this._realDevice;return(e=e||this.current()).deviceType&&(t.push(`dx-device-${e.deviceType}`),"desktop"!==e.deviceType&&t.push("dx-device-mobile")),t.push(`dx-device-${i.platform}`),i.version&&i.version.length&&t.push(`dx-device-${i.platform}-${i.version[0]}`),this.isSimulator()&&t.push("dx-simulator"),(0,n.default)().rtlEnabled&&t.push("dx-rtl"),t}attachCssClasses(e,t){this._deviceClasses=this._getCssClasses(t).join(" "),(0,s.default)(e).addClass(this._deviceClasses)}detachCssClasses(e){(0,s.default)(e).removeClass(this._deviceClasses)}isSimulator(){try{var e;return this._isSimulator||(0,_.hasWindow)()&&this._window.top!==this._window.self&&(null===(e=this._window.top)||void 0===e?void 0:e["dx-force-device"])||this.isRippleEmulator()}catch(e){return!1}}forceSimulator(){this._isSimulator=!0}_getDevice(e){if("genericPhone"===e&&(e={deviceType:"phone",platform:"generic",generic:!0}),(0,p.isPlainObject)(e))return this._fromConfig(e);let t;if(e){if(t=v[e],!t)throw o.default.Error("E0005")}else{t=(0,_.getNavigator)().userAgent}return this._fromUA(t)}_getDeviceOrNameFromWindowScope(){var e,t;let i;var n,o;(0,_.hasWindow)()&&(null!==(e=this._window.top)&&void 0!==e&&e["dx-force-device-object"]||null!==(t=this._window.top)&&void 0!==t&&t["dx-force-device"])&&(i=(null===(n=this._window.top)||void 0===n?void 0:n["dx-force-device-object"])||(null===(o=this._window.top)||void 0===o?void 0:o["dx-force-device"]));return i}_getDeviceNameFromSessionStorage(){const e=(0,h.sessionStorage)();if(!e)return;const t=e.getItem("dx-force-device");try{return JSON.parse(t)}catch(e){return t}}_fromConfig(e){const t=(0,l.extend)({},C,this._currentDevice,e),i={phone:"phone"===t.deviceType,tablet:"tablet"===t.deviceType,android:"android"===t.platform,ios:"ios"===t.platform,generic:"generic"===t.platform};return(0,l.extend)(t,i)}_fromUA(e){for(let t=0;t<b.length;t+=1){const i=(0,b[t])(e);if(i)return this._fromConfig(i)}return C}_changeOrientation(){const e=(0,s.default)(this._window),t=(0,c.getHeight)(e)>(0,c.getWidth)(e)?"portrait":"landscape";this._currentOrientation!==t&&(this._currentOrientation=t,this._eventsStrategy.fireEvent("orientationChanged",[{orientation:t}]))}_recalculateOrientation(){const e=(0,c.getWidth)(this._window);this._currentWidth!==e&&(this._currentWidth=e,this._changeOrientation())}on(e,t){return this._eventsStrategy.on(e,t),this}off(e,t){return this._eventsStrategy.off(e,t),this}},w=(0,g.value)();w&&x.attachCssClasses(w),g.changeCallback.add(((e,t)=>{x.detachCssClasses(t),x.attachCssClasses(e)}));t.default=x},62018:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.domAdapter=t.default=void 0;var n,o=i(17781),a=(n=i(89656))&&n.__esModule?n:{default:n},s=i(93631);const r={querySelectorAll:(e,t)=>e.querySelectorAll(t),elementMatches(e,t){const i=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||(t=>{const i=e.document||e.ownerDocument;if(!i)return!1;const n=this.querySelectorAll(i,t);for(let t=0;t<n.length;t++)if(n[t]===e)return!0});return i.call(e,t)},createElement(e,t){return(t=t??this._document).createElement(e)},createElementNS(e,t,i){return(i=i||this._document).createElementNS(e,t)},createTextNode(e,t){return(t=t||this._document).createTextNode(e)},createAttribute(e,t){return(t=t||this._document).createAttribute(e)},isNode:e=>!!e&&"object"==typeof e&&"nodeType"in e&&"nodeName"in e,isElementNode:e=>!!e&&1===e.nodeType,isTextNode:e=>e&&3===e.nodeType,isDocument:e=>e&&9===e.nodeType,isDocumentFragment:e=>e&&11===e.nodeType,removeElement(e){const t=e&&e.parentNode;t&&t.removeChild(e)},insertElement(e,t,i){e&&t&&e!==t&&(i?e.insertBefore(t,i):e.appendChild(t))},getAttribute:(e,t)=>e.getAttribute(t),setAttribute(e,t,i){"style"===t?e.style.cssText=i:e.setAttribute(t,i)},removeAttribute(e,t){e.removeAttribute(t)},setProperty(e,t,i){e[t]=i},setText(e,t){e&&(e.textContent=t)},setClass(e,t,i){1===e.nodeType&&t&&(i?e.classList.add(t):e.classList.remove(t))},setStyle(e,t,i){e.style[t]=i||""},_document:"undefined"==typeof document?void 0:document,getDocument(){return this._document},getActiveElement(e){return this.getRootNode(e).activeElement},getRootNode(e){var t;return(null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))??this._document},getBody(){return this._document.body},createDocumentFragment(){return this._document.createDocumentFragment()},getDocumentElement(){return this._document.documentElement},getLocation(){return this._document.location},getSelection(){return this._document.selection},getReadyState(){return this._document.readyState},getHead(){return this._document.head},hasDocumentProperty(e){return e in this._document},listen:(e,t,i,n)=>e&&"addEventListener"in e?(e.addEventListener(t,i,n),()=>{e.removeEventListener(t,i)}):o.noop,elementsFromPoint(e,t,i){const n=this.getRootNode(i);return n.host?(0,s.getShadowElementsFromPoint)(e,t,n):n.elementsFromPoint(e,t)}},l=t.domAdapter=(0,a.default)(r);t.default=l},93630:function(e,t){function i(e){return e&&e.get?e.get(0):e}Object.defineProperty(t,"__esModule",{value:!0}),t.getPublicElement=function(e){return n(e)},t.getPublicElementNonJquery=i,t.setPublicElementWrapper=function(e){n=e};let n=i},29489:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.afterCleanData=function(e){c=e},t.beforeCleanData=function(e){u=e},t.cleanData=function(e){return l.cleanData.call(this,e)},t.cleanDataRecursive=function(e,t){if(!o.default.isElementNode(e))return;const i=e.getElementsByTagName("*");l.cleanData(i),t&&l.cleanData([e])},t.data=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return l.data.apply(this,t)},t.getDataStrategy=function(){return l},t.removeData=function(e,t){return l.removeData.call(this,e,t)},t.strategyChanging=t.setDataStrategy=void 0;var n=s(i(92774)),o=s(i(64960)),a=s(i(35329));function s(e){return e&&e.__esModule?e:{default:e}}const r=new WeakMap;let l;const d=t.strategyChanging=new a.default;let u=function(){},c=function(){};const h=function(e){d.fire(e),l=e;const{cleanData:t}=l;l.cleanData=function(e){u(e);const i=t.call(this,e);return c(e),i}};t.setDataStrategy=h,h({data:function(){const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],i=arguments.length<=2?void 0:arguments[2];if(!e)return;let n=r.get(e);return n||(n={},r.set(e,n)),void 0===t?n:2===arguments.length?n[t]:(n[t]=i,i)},removeData:function(e,t){if(e)if(void 0===t)r.delete(e);else{const i=r.get(e);i&&delete i[t]}},cleanData:function(e){for(let t=0;t<e.length;t++)n.default.off(e[t]),r.delete(e[t])}})},5583:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(67264))&&n.__esModule?n:{default:n};t.default=(0,o.default)({E0001:"Method is not implemented",E0002:"Member name collision: {0}",E0003:"A class must be instantiated using the 'new' keyword",E0004:"The NAME property of the component is not specified",E0005:"Unknown device",E0006:"Unknown endpoint key is requested",E0007:"'Invalidate' method is called outside the update transaction",E0008:"Type of the option name is not appropriate to create an action",E0009:"Component '{0}' has not been initialized for an element",E0010:"Animation configuration with the '{0}' type requires '{1}' configuration as {2}",E0011:"Unknown animation type '{0}'",E0012:"jQuery version is too old. Please upgrade jQuery to 1.10.0 or later",E0013:"KnockoutJS version is too old. Please upgrade KnockoutJS to 2.3.0 or later",E0014:"The 'release' method shouldn't be called for an unlocked Lock object",E0015:"Queued task returned an unexpected result",E0017:"Event namespace is not defined",E0018:"DevExpress.ui.DevExpressPopup widget is required",E0020:"Template engine '{0}' is not supported",E0021:"Unknown theme is set: {0}",E0022:"LINK[rel=DevExpress-theme] tags must go before DevExpress included scripts",E0023:"Template name is not specified",E0024:"DevExtreme bundle already included",E0025:"Unexpected argument type",E0100:"Unknown validation type is detected",E0101:"Misconfigured range validation rule is detected",E0102:"Misconfigured comparison validation rule is detected",E0103:"validationCallback of an asynchronous rule should return a jQuery or a native promise",E0110:"Unknown validation group is detected",E0120:"Adapter for a DevExpressValidator component cannot be configured",E0121:"The 'customItem' parameter of the 'onCustomItemCreating' function is empty or contains invalid data. Assign a custom object or a Promise that is resolved after the item is created.",W0000:"'{0}' is deprecated in {1}. {2}",W0001:"{0} - '{1}' option is deprecated in {2}. {3}",W0002:"{0} - '{1}' method is deprecated in {2}. {3}",W0003:"{0} - '{1}' property is deprecated in {2}. {3}",W0004:"Timeout for theme loading is over: {0}",W0005:"'{0}' event is deprecated in {1}. {2}",W0006:"Invalid recurrence rule: '{0}'",W0007:"'{0}' Globalize culture is not defined",W0008:"Invalid view name: '{0}'",W0009:"Invalid time zone name: '{0}'",W0010:"{0} is deprecated in {1}. {2}",W0011:"Number parsing is invoked while the parser is not defined",W0012:"Date parsing is invoked while the parser is not defined",W0013:"'{0}' file is deprecated in {1}. {2}",W0014:"{0} - '{1}' type is deprecated in {2}. {3}",W0015:"Instead of returning a value from the '{0}' function, write it into the '{1}' field of the function's parameter.",W0016:'The "{0}" option does not accept the "{1}" value since v{2}. {3}.',W0017:'Setting the "{0}" property with a function is deprecated since v21.2',W0018:'Setting the "position" property with a function is deprecated since v21.2',W0019:"DevExtreme: Unable to Locate a Valid License Key.\n\nDetailed license/registration related information and instructions: https://js.devexpress.com/Documentation/Licensing/.\n\nIf you are using a 30-day trial version of DevExtreme, you must uninstall all copies of DevExtreme once your 30-day trial period expires. For terms and conditions that govern use of DevExtreme UI components/libraries, please refer to the DevExtreme End User License Agreement: https://js.devexpress.com/EULAs/DevExtremeComplete.\n\nTo use DevExtreme in a commercial project, you must purchase a license. For pricing/licensing options, please visit: https://js.devexpress.com/Buy.\n\nIf you have licensing-related questions or need help with a purchase, please email clientservices@devexpress.com.\n\n",W0020:"DevExtreme: License Key Has Expired.\n\nDetailed license/registration related information and instructions: https://js.devexpress.com/Documentation/Licensing/.\n\nA mismatch exists between the license key used and the DevExtreme version referenced in this project.\n\nTo proceed, you can:\n\u2022 use a version of DevExtreme linked to your license key: https://www.devexpress.com/ClientCenter/DownloadManager\n\u2022 renew your DevExpress Subscription: https://www.devexpress.com/buy/renew (once you renew your subscription, you will be entitled to product updates and support service as defined in the DevExtreme End User License Agreement)\n\nIf you have licensing-related questions or need help with a renewal, please email clientservices@devexpress.com.\n\n",W0021:"DevExtreme: License Key Verification Has Failed.\n\nDetailed license/registration related information and instructions: https://js.devexpress.com/Documentation/Licensing/.\n\nTo verify your DevExtreme license, make certain to specify a correct key in the GlobalConfig. If you continue to encounter this error, please visit https://www.devexpress.com/ClientCenter/DownloadManager to obtain a valid license key.\n\nIf you have a valid license and this problem persists, please submit a support ticket via the DevExpress Support Center. We will be happy to follow-up: https://supportcenter.devexpress.com/ticket/create.\n\n",W0022:"DevExtreme: Pre-release software. Not suitable for commercial use.\n\nDetailed license/registration related information and instructions: https://js.devexpress.com/Documentation/Licensing/.\n\nPre-release software may contain deficiencies and as such, should not be considered for use or integrated in any mission critical application.\n\n",W0023:"DevExtreme: the following 'devextreme' package version does not match versions of other DevExpress products used in this application:\n\n{0}\n\nInteroperability between different versions of the products listed herein cannot be guaranteed.\n\n"})},14201:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.EventsStrategy=void 0;var n,o=(n=i(84718))&&n.__esModule?n:{default:n},a=i(21274),s=i(11528);class r{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._events={},this._owner=e,this._options=t}static create(e,t){return t?(0,s.isFunction)(t)?t(e):t:new r(e)}hasEvent(e){const t=this._events[e];return!!t&&t.has()}fireEvent(e,t){const i=this._events[e];return i&&i.fireWith(this._owner,t),this._owner}on(e,t){if((0,s.isPlainObject)(e))(0,a.each)(e,((e,t)=>{this.on(e,t)}));else{let i=this._events[e];i||(i=(0,o.default)({syncStrategy:this._options.syncStrategy}),this._events[e]=i);(i.originalAdd||i.add).call(i,t)}}off(e,t){const i=this._events[e];i&&((0,s.isFunction)(t)?i.remove(t):i.empty())}dispose(){(0,a.each)(this._events,((e,t)=>{t.empty()}))}}t.EventsStrategy=r},7201:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Guid=void 0;var n,o=(n=i(55620))&&n.__esModule?n:{default:n};t.Guid=o.default.inherit({ctor:function(e){e&&(e=String(e)),this._value=this._normalize(e||this._generate())},_normalize:function(e){for(e=e.replace(/[^a-f0-9]/gi,"").toLowerCase();e.length<32;)e+="0";return[e.substr(0,8),e.substr(8,4),e.substr(12,4),e.substr(16,4),e.substr(20,12)].join("-")},_generate:function(){let e="";for(let t=0;t<32;t++)e+=Math.round(15*Math.random()).toString(16);return e},toString:function(){return this._value},valueOf:function(){return this._value},toJSON:function(){return this._value}})},58670:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.httpRequest=void 0;var n,o=(n=i(89656))&&n.__esModule?n:{default:n};const a=(0,i(3104).getWindow)(),s={getXhr:()=>new a.XMLHttpRequest};t.httpRequest=(0,o.default)(s)},21327:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.infernoRenderer=void 0;var n=i(49714),o=d(i(64960)),a=i(74663),s=d(i(89656)),r=i(81167),l=i(63935);function d(e){return e&&e.__esModule?e:{default:e}}const u=e=>{const{parentNode:t}=e;if(t){const{nextSibling:i}=e;(0,a.cleanDataRecursive)(e),t.$V=e.$V,(0,r.render)(null,t),t.insertBefore(e,i),e.innerHTML="",delete t.$V}delete e.$V};t.infernoRenderer=(0,s.default)({createElement:(e,t)=>(0,l.createElement)(e,t),remove:u,onAfterRender:()=>{n.InfernoEffectHost.callEffects()},onPreRender:()=>{n.InfernoEffectHost.lock()},render:(e,t,i,a)=>{if(a)(0,r.render)((0,l.createElement)(e,t),i);else{const{parentNode:a}=i,s=null==i?void 0:i.nextSibling,r=o.default.createElement("div");r.appendChild(i);const d=o.default.createDocumentFragment().appendChild(r);!!i.$V&&u(i),(0,n.hydrate)((0,l.createElement)(e,t),d),i.$V=d.$V,a&&a.insertBefore(i,s)}}})},87107:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MemorizedCallbacks=void 0;var n,o=(n=i(84718))&&n.__esModule?n:{default:n},a=i(21274);t.MemorizedCallbacks=class{constructor(){this.memory=[],this.callbacks=(0,o.default)()}add(e){(0,a.each)(this.memory,((t,i)=>e.apply(e,i))),this.callbacks.add(e)}remove(e){this.callbacks.remove(e)}fire(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.memory.push(t),this.callbacks.fire.apply(this.callbacks,t)}}},45693:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PostponedOperations=void 0;var n=i(87739),o=i(11528);t.PostponedOperations=class{constructor(){this._postponedOperations={}}add(e,t,i){if(e in this._postponedOperations)i&&this._postponedOperations[e].promises.push(i);else{const o=new n.Deferred;this._postponedOperations[e]={fn:t,completePromise:o,promises:i?[i]:[]}}return this._postponedOperations[e].completePromise.promise()}callPostponedOperations(){for(const e in this._postponedOperations){const t=this._postponedOperations[e];(0,o.isDefined)(t)&&(t.promises&&t.promises.length?(0,n.when)(...t.promises).done(t.fn).then(t.completePromise.resolve):t.fn().done(t.completePromise.resolve))}this._postponedOperations={}}}},95539:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.renderer=t.default=void 0;var n,o=(n=i(21681))&&n.__esModule?n:{default:n};const a=t.renderer=o.default.get();t.default=a},1811:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(64960))&&n.__esModule?n:{default:n},a=i(74663),s=i(23563),r=i(57653),l=i(58515),d=i(11528);const u=(0,i(3104).getWindow)();let c;const h=function(e,t){return e?"string"==typeof e?"body"===e?(this[0]=t?t.body:o.default.getBody(),this.length=1,this):(t=t||o.default.getDocument(),e.startsWith("<")?(this[0]=o.default.createElement(e.slice(1,-1),t),this.length=1,this):([].push.apply(this,o.default.querySelectorAll(t,e)),this)):o.default.isNode(e)||(0,d.isWindow)(e)?(this[0]=e,this.length=1,this):Array.isArray(e)?([].push.apply(this,e),this):c(e.toArray?e.toArray():[e]):(this.length=0,this)};c=function(e,t){return new h(e,t)},c.fn={dxRenderer:!0},h.prototype=c.fn;const p=function(e,t){for(let i=0;i<this.length;i++){const n=c(this[i]);n[e].apply(n,t)}return this},g=function(e,t,i){null!=i&&!1!==i?o.default.setAttribute(e,t,i):o.default.removeAttribute(e,t)};h.prototype.show=function(){return this.toggle(!0)},h.prototype.hide=function(){return this.toggle(!1)},h.prototype.toggle=function(e){return this[0]&&this.toggleClass("dx-state-invisible",!e),this},h.prototype.attr=function(e,t){if(this.length>1&&arguments.length>1)return p.call(this,"attr",arguments);if(!this[0])return(0,d.isObject)(e)||void 0!==t?this:void 0;if(!this[0].getAttribute)return this.prop(e,t);if("string"==typeof e&&1===arguments.length){const t=this[0].getAttribute(e);return null==t?void 0:t}if((0,d.isPlainObject)(e))for(const t in e)this.attr(t,e[t]);else g(this[0],e,t);return this},h.prototype.removeAttr=function(e){return this[0]&&o.default.removeAttribute(this[0],e),this},h.prototype.prop=function(e,t){if(!this[0])return this;if("string"==typeof e&&1===arguments.length)return this[0][e];if((0,d.isPlainObject)(e))for(const t in e)this.prop(t,e[t]);else o.default.setProperty(this[0],e,t);return this},h.prototype.addClass=function(e){return this.toggleClass(e,!0)},h.prototype.removeClass=function(e){return this.toggleClass(e,!1)},h.prototype.hasClass=function(e){if(!this[0]||void 0===this[0].className)return!1;const t=e.split(" ");for(let e=0;e<t.length;e++)if(this[0].classList){if(this[0].classList.contains(t[e]))return!0}else{if((((0,d.isString)(this[0].className)?this[0].className:o.default.getAttribute(this[0],"class"))||"").split(" ").indexOf(t[e])>=0)return!0}return!1},h.prototype.toggleClass=function(e,t){if(this.length>1)return p.call(this,"toggleClass",arguments);if(!this[0]||!e)return this;t=void 0===t?!this.hasClass(e):t;const i=e.split(" ");for(let e=0;e<i.length;e++)o.default.setClass(this[0],i[e],t);return this},h.prototype.html=function(e){return arguments.length?(this.empty(),"string"==typeof e&&!(0,s.isTablePart)(e)||"number"==typeof e?(this[0].innerHTML=e,this):this.append((0,s.parseHTML)(e))):this[0].innerHTML};const _=function(e,t){if(this[0]&&e){"string"==typeof e?e=(0,s.parseHTML)(e):e.nodeType?e=[e]:(0,d.isNumeric)(e)&&(e=[o.default.createTextNode(e)]);for(let i=0;i<e.length;i++){const n=e[i];let a=this[0];"TABLE"===a.tagName&&"TR"===n.tagName&&a.tBodies&&a.tBodies.length&&(a=a.tBodies[0]),o.default.insertElement(a,n.nodeType?n:n[0],t)}}},f=function(e,t){if(this[0]&&this[0].style&&!(null===t||"number"==typeof t&&isNaN(t))){e=(0,l.styleProp)(e);for(let i=0;i<this.length;i++)this[i].style[e]=(0,l.normalizeStyleProp)(e,t)}};h.prototype.css=function(e,t){if((0,d.isString)(e)){if(2!==arguments.length){if(!this[0])return;e=(0,l.styleProp)(e);const t=u.getComputedStyle(this[0])[e]||this[0].style[e];return(0,d.isNumeric)(t)?t.toString():t}f.call(this,e,t)}else if((0,d.isPlainObject)(e))for(const t in e)f.call(this,t,e[t]);return this},h.prototype.prepend=function(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.prepend(arguments[e]);return this}return _.apply(this,[e,this[0].firstChild]),this},h.prototype.append=function(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.append(arguments[e]);return this}return _.apply(this,[e]),this},h.prototype.prependTo=function(e){if(this.length>1){for(let t=this.length-1;t>=0;t--)c(this[t]).prependTo(e);return this}return(e=c(e))[0]&&o.default.insertElement(e[0],this[0],e[0].firstChild),this},h.prototype.appendTo=function(e){return this.length>1?p.call(this,"appendTo",arguments):(o.default.insertElement(c(e)[0],this[0]),this)},h.prototype.insertBefore=function(e){return e&&e[0]&&o.default.insertElement(e[0].parentNode,this[0],e[0]),this},h.prototype.insertAfter=function(e){return e&&e[0]&&o.default.insertElement(e[0].parentNode,this[0],e[0].nextSibling),this},h.prototype.before=function(e){return this[0]&&o.default.insertElement(this[0].parentNode,e[0],this[0]),this},h.prototype.after=function(e){return this[0]&&o.default.insertElement(this[0].parentNode,e[0],this[0].nextSibling),this},h.prototype.wrap=function(e){if(this[0]){const t=c(e);t.insertBefore(this),t.append(this)}return this},h.prototype.wrapInner=function(e){const t=this.contents();return t.length?t.wrap(e):this.append(e),this},h.prototype.replaceWith=function(e){if(e&&e[0])return e.is(this)?this:(e.insertBefore(this),this.remove(),e)},h.prototype.remove=function(){return this.length>1?p.call(this,"remove",arguments):((0,a.cleanDataRecursive)(this[0],!0),o.default.removeElement(this[0]),this)},h.prototype.detach=function(){return this.length>1?p.call(this,"detach",arguments):(o.default.removeElement(this[0]),this)},h.prototype.empty=function(){return this.length>1?p.call(this,"empty",arguments):((0,a.cleanDataRecursive)(this[0]),o.default.setText(this[0],""),this)},h.prototype.clone=function(){const e=[];for(let t=0;t<this.length;t++)e.push(this[t].cloneNode(!0));return c(e)},h.prototype.text=function(e){if(!arguments.length){let e="";for(let t=0;t<this.length;t++)e+=this[t]&&this[t].textContent||"";return e}const t=(0,d.isFunction)(e)?e():e;return(0,a.cleanDataRecursive)(this[0],!1),o.default.setText(this[0],(0,d.isDefined)(t)?t:""),this},h.prototype.val=function(e){return 1===arguments.length?this.prop("value",(0,d.isDefined)(e)?e:""):this.prop("value")},h.prototype.contents=function(){if(!this[0])return c();const e=[];return e.push.apply(e,this[0].childNodes),c(e)},h.prototype.find=function(e){const t=c();if(!e)return t;const i=[];let n;if("string"==typeof e)for(e=e.trim(),n=0;n<this.length;n++){const t=this[n];if(o.default.isElementNode(t)){const n=t.getAttribute("id");let a=n||"dx-query-children";n||g(t,"id",a),a=`[id='${a}'] `;const s=a+e.replace(/([^\\])(,)/g,`$1, ${a}`);i.push.apply(i,o.default.querySelectorAll(t,s)),g(t,"id",n)}else(o.default.isDocument(t)||o.default.isDocumentFragment(t))&&i.push.apply(i,o.default.querySelectorAll(t,e))}else for(n=0;n<this.length;n++)e=o.default.isNode(e)?e:e[0],this[n]!==e&&this[n].contains(e)&&i.push(e);return t.add(i)};const m=function(e,t){var i,n;return!(t=t.host??t).nodeType||!!(t.offsetWidth||t.offsetHeight||null!==(i=(n=t).getClientRects)&&void 0!==i&&i.call(n).length)};h.prototype.filter=function(e){if(!e)return c();if(":visible"===e)return this.filter(m);if(":hidden"===e)return this.filter((function(e,t){return!m(0,t)}));const t=[];for(let i=0;i<this.length;i++){const n=this[i];if(o.default.isElementNode(n)&&"string"===(0,d.type)(e))o.default.elementMatches(n,e)&&t.push(n);else if(o.default.isNode(e)||(0,d.isWindow)(e))e===n&&t.push(n);else if((0,d.isFunction)(e))e.call(n,i,n)&&t.push(n);else for(let i=0;i<e.length;i++)e[i]===n&&t.push(n)}return c(t)},h.prototype.not=function(e){const t=[],i=this.filter(e).toArray();for(let e=0;e<this.length;e++)-1===i.indexOf(this[e])&&t.push(this[e]);return c(t)},h.prototype.is=function(e){return!!this.filter(e).length},h.prototype.children=function(e){let t=[];for(let e=0;e<this.length;e++){const i=this[e]?this[e].childNodes:[];for(let e=0;e<i.length;e++)o.default.isElementNode(i[e])&&t.push(i[e])}return t=c(t),e?t.filter(e):t},h.prototype.siblings=function(){const e=this[0];if(!e||!e.parentNode)return c();const t=[],i=e.parentNode.childNodes||[];for(let n=0;n<i.length;n++){const a=i[n];o.default.isElementNode(a)&&a!==e&&t.push(a)}return c(t)},h.prototype.each=function(e){for(let t=0;t<this.length&&!1!==e.call(this[t],t,this[t]);t++);},h.prototype.index=function(e){return e?(e=c(e),this.toArray().indexOf(e[0])):this.parent().children().index(this)},h.prototype.get=function(e){return this[e<0?this.length+e:e]},h.prototype.eq=function(e){return e=e<0?this.length+e:e,c(this[e])},h.prototype.first=function(){return this.eq(0)},h.prototype.last=function(){return this.eq(-1)},h.prototype.select=function(){for(let e=0;e<this.length;e+=1)this[e].select&&this[e].select();return this},h.prototype.parent=function(e){if(!this[0])return c();const t=c(this[0].parentNode);return!e||t.is(e)?t:c()},h.prototype.parents=function(e){const t=[];let i=this.parent();for(;i&&i[0]&&!o.default.isDocument(i[0]);)o.default.isElementNode(i[0])&&(e&&!i.is(e)||t.push(i.get(0))),i=i.parent();return c(t)},h.prototype.closest=function(e){if(this.is(e))return this;let t=this.parent();for(;t&&t.length;){if(t.is(e))return t;t=t.parent()}return c()},h.prototype.next=function(e){if(!this[0])return c();let t=c(this[0].nextSibling);if(!arguments.length)return t;for(;t&&t.length;){if(t.is(e))return t;t=t.next()}return c()},h.prototype.prev=function(){return this[0]?c(this[0].previousSibling):c()},h.prototype.add=function(e){const t=c(e),i=this.toArray();for(let e=0;e<t.length;e++){const n=t[e];-1===i.indexOf(n)&&i.push(n)}return c(i)};const v=[];h.prototype.splice=function(){return c(v.splice.apply(this,arguments))},h.prototype.slice=function(){return c(v.slice.apply(this,arguments))},h.prototype.toArray=function(){return v.slice.call(this)},h.prototype.offset=function(){if(this[0])return(0,r.getOffset)(this[0])},h.prototype.offsetParent=function(){if(!this[0])return c();let e=c(this[0].offsetParent);for(;e[0]&&"static"===e.css("position");)e=c(e[0].offsetParent);return e=e[0]?e:c(o.default.getDocumentElement()),e},h.prototype.position=function(){if(!this[0])return;let e;const t=parseFloat(this.css("marginTop")),i=parseFloat(this.css("marginLeft"));if("fixed"===this.css("position"))return e=this[0].getBoundingClientRect(),{top:e.top-t,left:e.left-i};e=this.offset();const n=this.offsetParent();let o={top:0,left:0};return"HTML"!==n[0].nodeName&&(o=n.offset()),o={top:o.top+parseFloat(n.css("borderTopWidth")),left:o.left+parseFloat(n.css("borderLeftWidth"))},{top:e.top-o.top-t,left:e.left-o.left-i}},[{name:"scrollLeft",offsetProp:"pageXOffset",scrollWindow:function(e,t){e.scrollTo(t,e.pageYOffset)}},{name:"scrollTop",offsetProp:"pageYOffset",scrollWindow:function(e,t){e.scrollTo(e.pageXOffset,t)}}].forEach((function(e){const t=e.name;h.prototype[t]=function(i){if(!this[0])return;const n=(0,r.getWindowByElement)(this[0]);return void 0===i?n?n[e.offsetProp]:this[0][t]:(n?e.scrollWindow(n,i):this[0][t]=i,this)}})),h.prototype.data=function(e,t){if(this[0])return arguments.length<2?a.data.call(c,this[0],e):(a.data.call(c,this[0],e,t),this)},h.prototype.removeData=function(e){return this[0]&&(0,a.removeData)(this[0],e),this};const C=function(){return c.apply(this,arguments)};Object.defineProperty(C,"fn",{enumerable:!0,configurable:!0,get:function(){return c.fn},set:function(e){c.fn=e}});t.default={set:function(e){c=e},get:function(){return C}}},57785:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.resizeObserverSingleton=void 0;var n,o=i(17781),a=(n=i(14470))&&n.__esModule?n:{default:n};const s=a.default.getWindow(),r={observe:o.noop,unobserve:o.noop,disconnect:o.noop};t.resizeObserverSingleton=new class{constructor(){if(!a.default.hasWindow()||!s.ResizeObserver)return r;this._callbacksMap=new Map,this._observer=new s.ResizeObserver((e=>{e.forEach((e=>{var t;null===(t=this._callbacksMap.get(e.target))||void 0===t||t(e)}))}))}observe(e,t){this._callbacksMap.set(e,t),this._observer.observe(e)}unobserve(e){this._callbacksMap.delete(e),this._observer.unobserve(e)}disconnect(){this._callbacksMap.clear(),this._observer.disconnect()}}},61644:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"setTemplateEngine",{enumerable:!0,get:function(){return n.setTemplateEngine}});var n=i(35155)},66298:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TemplateManager=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(48650),s=i(38699),r=i(17781),l=i(52576),d=i(49194),u=i(11528);const c=new s.FunctionTemplate((e=>{let{model:t,parent:i}=e;const n=t.widget;if(!n)return(0,o.default)();const a=(0,o.default)("<div>"),s=t.options||{};return i?i._createComponent(a,n,s):a[n](s),a}));class h{constructor(e,t){this._tempTemplates=[],this._defaultTemplates={},this._anonymousTemplateName=t||"template",this._createElement=e||d.defaultCreateElement,this._createTemplateIfNeeded=this._createTemplateIfNeeded.bind(this)}static createDefaultOptions(){return{integrationOptions:{watchMethod:function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipImmediate||t(e()),r.noop},templates:{"dx-polymorph-widget":c},useDeferUpdateForTemplates:!0}}}get anonymousTemplateName(){return this._anonymousTemplateName}addDefaultTemplates(e){this._defaultTemplates=(0,l.extend)({},this._defaultTemplates,e)}dispose(){this._tempTemplates.forEach((e=>{e.template.dispose&&e.template.dispose()})),this._tempTemplates=[]}extractTemplates(e){return{templates:this._extractTemplates(e),anonymousTemplateMeta:this._extractAnonymousTemplate(e)}}_extractTemplates(e){const t=(0,d.findTemplates)(e,"dxTemplate"),i=(0,d.suitableTemplatesByName)(t);return t.forEach((e=>{let{element:t,options:{name:n}}=e;t===i[n]?(0,o.default)(t).addClass("dx-template-wrapper").detach():(0,o.default)(t).remove()})),Object.keys(i).map((e=>({name:e,template:this._createTemplate(i[e])})))}_extractAnonymousTemplate(e){const t=e.contents().detach();return t.filter(((e,t)=>{const i=3===t.nodeType,n=(0,o.default)(t).text().trim().length<1;return!(i&&n)})).length>0?{template:this._createTemplate(t),name:this._anonymousTemplateName}:{}}_createTemplateIfNeeded(e){const t=this._tempTemplates.filter((t=>t.source===(0,d.templateKey)(e)))[0];if(t)return t.template;const i=this._createTemplate(e);return this._tempTemplates.push({template:i,source:(0,d.templateKey)(e)}),i}_createTemplate(e){return this._createElement((0,d.validateTemplateSource)(e))}getTemplate(e,t,i,n){let{isAsyncTemplate:r,skipTemplates:l}=i;return(0,u.isFunction)(e)?new s.FunctionTemplate((i=>{const c=e.apply(n,(0,d.getNormalizedTemplateArgs)(i));if(!(0,u.isDefined)(c))return new a.EmptyTemplate;let h=!1;const p=(0,d.acquireTemplate)(c,(e=>e.nodeType||(0,u.isRenderer)(e)&&!(0,o.default)(e).is("script")?new s.FunctionTemplate((()=>e)):(h=!0,this._createTemplate(e))),t,r,l,this._defaultTemplates),g=p.render(i);return h&&p.dispose&&p.dispose(),g})):(0,d.acquireTemplate)(e,this._createTemplateIfNeeded,t,r,l,this._defaultTemplates)}}t.TemplateManager=h;t.default={TemplateManager:h}},43399:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Options=void 0;var n=i(1896),o=i(53904),a=i(17781),s=i(31e3),r=i(52576),l=i(11528);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}t.Options=class{constructor(e,t,i,o){this._deprecatedCallback,this._startChangeCallback,this._endChangeCallback,this._validateOptionsCallback,this._default=t,this._deprecated=o,this._deprecatedNames=[],this._initDeprecatedNames(),this._optionManager=new n.OptionManager(e,i),this._optionManager.onRelevantNamesPrepared(((e,t,i,n)=>this._setRelevantNames(e,t,i,n))),this._cachedOptions={},this._rules=[]}set _initial(e){this._initialOptions=e}get _initial(){if(!this._initialOptions){const e=this._getByRules(this.silent("defaultOptionsRules"));this._initialOptions=this._default,this._optionManager._setByReference(this._initialOptions,e)}return this._initialOptions}_initDeprecatedNames(){for(const e in this._deprecated)this._deprecatedNames.push(e)}_getByRules(e){return e=Array.isArray(e)?this._rules.concat(e):this._rules,(0,o.convertRulesToOptions)(e)}_notifyDeprecated(e){const t=this._deprecated[e];t&&this._deprecatedCallback(e,t)}_setRelevantNames(e,t,i,n){if(t){const o=this._normalizeName(t,n);o&&o!==t&&(this._setField(e,o,i),this._clearField(e,t))}}_setField(e,t,i){let n="",a=null;do{n=n?`.${n}`:"",n=(0,o.getFieldName)(t)+n,a=(t=(0,o.getParentName)(t))?this._optionManager.get(e,t,!1):e}while(!a);a[n]=i}_clearField(e,t){delete e[t];const i=(0,o.getParentName)(t),n=i?this._optionManager.get(e,i,!1):e;n&&delete n[(0,o.getFieldName)(t)]}_normalizeName(e,t){if(this._deprecatedNames.length&&e)for(let i=0;i<this._deprecatedNames.length;i++)if(this._deprecatedNames[i]===e){const i=this._deprecated[e];if(i)return!t&&this._notifyDeprecated(e),i.alias||e}return e}addRules(e){this._rules=e.concat(this._rules)}applyRules(e){const t=this._getByRules(e);this.silent(t)}dispose(){this._deprecatedCallback=a.noop,this._startChangeCallback=a.noop,this._endChangeCallback=a.noop,this._optionManager.dispose()}onChanging(e){this._optionManager.onChanging(e)}onChanged(e){this._optionManager.onChanged(e)}validateOptions(e){this._optionManager.onValidateOptions(e)}onDeprecated(e){this._deprecatedCallback=e}onStartChange(e){this._startChangeCallback=e}onEndChange(e){this._endChangeCallback=e}isInitial(e){const t=this.silent(e),i=this.initial(e);return(0,l.isFunction)(t)&&(0,l.isFunction)(i)?t.toString()===i.toString():(0,a.equalByValue)(t,i)}initial(e){return(0,o.getNestedOptionValue)(this._initial,e)}option(e,t){if(arguments.length<2&&"object"!==(0,l.type)(e))return this._optionManager.get(void 0,this._normalizeName(e));this._startChangeCallback();try{this._optionManager.set(e,t)}finally{this._endChangeCallback()}}silent(e,t){if(arguments.length<2&&"object"!==(0,l.type)(e))return this._optionManager.get(void 0,e,void 0,!0);this._optionManager.set(e,t,void 0,!0)}reset(e){if(e){const t=(0,s.getPathParts)(e).reduce(((e,t)=>e?e[t]:this.initial(t)),null),i=(0,l.isObject)(t)?d({},t):t;this._optionManager.set(e,i,!1)}}getAliasesByName(e){return Object.keys(this._deprecated).filter((t=>e===this._deprecated[t].alias))}isDeprecated(e){return Object.prototype.hasOwnProperty.call(this._deprecated,e)}cache(e,t){if(arguments.length<2)return this._cachedOptions[e];this._cachedOptions[e]=(0,r.extend)(this._cachedOptions[e],t)}}},59830:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.OptionManager=void 0;var n=i(53904),o=i(17781),a=i(60648),s=i(31e3),r=i(52576),l=i(11528);const d={},u={};t.OptionManager=class{constructor(e,t){this._options=e,this._optionsByReference=t,this._changingCallback,this._changedCallback,this._namePreparedCallbacks,this._validateOptionsCallback}_setByReference(e,t){(0,r.extend)(!0,e,t);for(const i in this._optionsByReference)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}_setPreparedValue(e,t,i,n){const o=this.get(this._options,e,!1);if(!(0,a.equals)(o,t)){const a=(0,s.getPathParts)(e);!n&&this._changingCallback(e,o,t),u[e]=u[e]||(0,s.compileSetter)(e),u[e](this._options,t,{functionsAsIs:!0,merge:(0,l.isDefined)(i)?i:!this._optionsByReference[e],unwrapObservables:a.length>1&&!!this._optionsByReference[a[0]]}),!n&&this._changedCallback(e,t,o)}}_prepareRelevantNames(e,t,i,n){if((0,l.isPlainObject)(i))for(const n in i)this._prepareRelevantNames(e,`${t}.${n}`,i[n]);this._namePreparedCallbacks(e,t,i,n)}get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._options,t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;return d[t]=d[t]||(0,s.compileGetter)(t),d[t](e,{functionsAsIs:!0,unwrapObservables:i})}set(e,t,i,o){e=(0,n.normalizeOptions)(e,t);for(const t in e)this._prepareRelevantNames(e,t,e[t],o);this._validateOptionsCallback&&(e=this._validateOptionsCallback(e));for(const t in e)this._setPreparedValue(t,e[t],i,o)}onRelevantNamesPrepared(e){this._namePreparedCallbacks=e}onChanging(e){this._changingCallback=e}onChanged(e){this._changedCallback=e}onValidateOptions(e){this._validateOptionsCallback=e}dispose(){this._changingCallback=o.noop,this._changedCallback=o.noop}}},33810:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeOptions=t.getParentName=t.getNestedOptionValue=t.getFieldName=t.deviceMatch=t.createDefaultOptionRules=t.convertRulesToOptions=void 0;var n,o=(n=i(65951))&&n.__esModule?n:{default:n},a=i(17781),s=i(31e3),r=i(52576),l=i(11528);const d={};t.convertRulesToOptions=e=>{const t=o.default.current();return e.reduce(((e,i)=>{let{device:n,options:o}=i;const a=n||{};return((0,l.isFunction)(a)?a(t):u(t,a))&&(0,r.extend)(!0,e,o),e}),{})};t.normalizeOptions=(e,t)=>"string"!=typeof e?e:{[e]:t};const u=(e,t)=>(0,l.isEmptyObject)(t)||(0,a.findBestMatches)(e,[t]).length>0;t.deviceMatch=u;t.getFieldName=e=>e.substr(e.lastIndexOf(".")+1);t.getParentName=e=>e.substr(0,e.lastIndexOf("."));t.getNestedOptionValue=function(e,t){return d[t]=d[t]||(0,s.compileGetter)(t),d[t](e,{functionsAsIs:!0})};t.createDefaultOptionRules=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]}},28112:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWidgetDefaultProps=void 0;t.BaseWidgetDefaultProps={className:"",activeStateEnabled:!1,disabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,tabIndex:0,visible:!0}},34993:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentWrapper=void 0,i(64044),i(69331),i(638);var n=g(i(64960)),o=g(i(97832)),a=i(61404),s=g(i(64553)),r=i(52576),l=i(11528),d=i(81167),u=g(i(52818)),c=g(i(16965)),h=i(34554),p=i(10632);function g(e){return e&&e.__esModule?e:{default:e}}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_.apply(null,arguments)}const f=(e,t)=>i=>{Object.prototype.hasOwnProperty.call(e,i)&&void 0===e[i]&&(e[i]=t(i))};class m extends o.default{get _propsInfo(){return{allowNull:[],twoWay:[],elements:[],templates:[],props:[]}}constructor(e,t){super(e,t),this._shouldRaiseContentReady=!1,this.validateKeyDownHandler()}validateKeyDownHandler(){const e=this.getSupportedKeyNames().length>0,t="function"==typeof this._viewComponent.prototype.keyDown;if(e&&!t)throw Error("Component's declaration must have 'keyDown' method.")}get viewRef(){var e;return null===(e=this._viewRef)||void 0===e?void 0:e.current}_checkContentReadyOption(e){const t=this._getContentReadyOptions().reduce(((e,t)=>(e[t]=!0,e)),{});return this._checkContentReadyOption=e=>!!t[e],this._checkContentReadyOption(e)}_getContentReadyOptions(){return["rtlEnabled"]}_fireContentReady(){this._actionsMap.onContentReady({})}_getDefaultOptions(){const e=this._getViewComponentDefaultProps();return(0,r.extend)(!0,super._getDefaultOptions(),e,this._propsInfo.twoWay.reduce(((t,i)=>{let[n,o,a]=i;return _({},t,{[n]:e[o],[a]:e=>this.option(n,e)})}),{}),this._propsInfo.templates.reduce(((e,t)=>_({},e,{[t]:null})),{}))}_getUnwrappedOption(){const e={};return Object.keys(this.option()).forEach((t=>{e[t]=this.option(t)})),e}_initializeComponent(){var e;super._initializeComponent(),null===(e=this._templateManager)||void 0===e||e.addDefaultTemplates(this.getDefaultTemplates());const t=this._getUnwrappedOption();this._props=this._optionsWithDefaultTemplates(t),this._propsInfo.templates.forEach((e=>{this._componentTemplates[e]=this._createTemplateComponent(this._props[e])})),Object.keys(this._getActionConfigsFull()).forEach((e=>this._addAction(e))),this._viewRef=(0,d.createRef)(),this.defaultKeyHandlers=this._createDefaultKeyHandlers()}_initMarkup(){const e=this.getProps();this._renderWrapper(e)}_renderWrapper(e){const t=this.$element()[0];this._isNodeReplaced||c.default.onPreRender(),c.default.render(this._viewComponent,e,t,this._isNodeReplaced),this._isNodeReplaced||(this._isNodeReplaced=!0,c.default.onAfterRender(),this._shouldRaiseContentReady=!0),this._shouldRaiseContentReady&&(this._fireContentReady(),this._shouldRaiseContentReady=!1)}_silent(e,t){this._options.silent(e,t)}_render(){}_removeWidget(){c.default.remove(this.$element()[0])}_dispose(){this._removeWidget(),super._dispose()}get elementAttr(){const e=this.$element()[0];if(!this._elementAttr){const{attributes:t}=e,i=Array.from(t).filter((e=>{var i;return!this._propsInfo.templates.includes(e.name)&&(null===(i=t[e.name])||void 0===i?void 0:i.specified)})).reduce(((t,i)=>{let{name:n,value:o}=i;const a=t,s=n in e;return a[n]=""===o&&s?e[n]:o,a}),{});this._elementAttr=i,this._storedClasses=e.getAttribute("class")||""}const t=e.style,i={};for(let e=0;e<t.length;e+=1)i[t[e]]=t.getPropertyValue(t[e]);return this._elementAttr.style=i,this._elementAttr.class=this._storedClasses,this._elementAttr}_getAdditionalActionConfigs(){return{onContentReady:{excludeValidators:["disabled","readOnly"]}}}_getAdditionalProps(){return[]}_patchOptionValues(e){const{allowNull:t,twoWay:i,elements:n,props:o}=this._propsInfo,a=this._getViewComponentDefaultProps(),s=Object.keys(a),r=this._getDefaultOptions(),{ref:d,children:u,onKeyboardHandled:c}=e,h={ref:d,children:u,onKeyDown:c?(e,t)=>{c(t)}:void 0};return[...o,...this._getAdditionalProps()].forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)&&(h[t]=e[t])})),t.forEach(f(h,(()=>null))),s.forEach(f(h,(e=>r[e]))),i.forEach((e=>{let[t,i]=e;f(h,(()=>r[i]))(t)})),n.forEach((e=>{if(e in h){const t=h[e];(0,l.isRenderer)(t)&&(h[e]=this._patchElementParam(t))}})),h}getSupportedKeyNames(){return[]}prepareStyleProp(e){return"string"==typeof e.style?_({},e,{style:{},cssText:e.style}):e}getProps(){const{elementAttr:e}=this.option(),t=this._patchOptionValues(_({},this._props,{ref:this._viewRef,children:this._extractDefaultSlot(),aria:this._aria}));return this._propsInfo.templates.forEach((e=>{t[e]=this._componentTemplates[e]})),this.prepareStyleProp(_({},t,this.elementAttr,e,{className:[...(this.elementAttr.class??"").split(" "),...((null==e?void 0:e.class)??"").split(" ")].filter(((e,t,i)=>e&&i.indexOf(e)===t)).join(" ").trim(),class:""},this._actionsMap))}_getActionConfigs(){return{}}_getActionConfigsFull(){return _({},this._getActionConfigs(),this._getAdditionalActionConfigs())}getDefaultTemplates(){const e=Object.values(this._templatesInfo),t={};return e.forEach((e=>{t[e]="dx-renovation-template-mock"})),t}get _templatesInfo(){return{}}_optionsWithDefaultTemplates(e){const t=Object.entries(this._templatesInfo).reduce(((t,i)=>{let[n,o]=i;return _({},t,{[n]:e[n]??o})}),{});return _({},e,t)}_init(){super._init(),this.customKeyHandlers={},this._actionsMap={},this._aria={},this._componentTemplates={}}_createDefaultKeyHandlers(){const e={};return this.getSupportedKeyNames().forEach((t=>{e[t]=e=>this.viewRef.keyDown(u.default.createKeyDownOptions(e))})),e}_addAction(e,t){let i=t;if(!i){const t=this._createActionByOption(e,this._getActionConfigsFull()[e]);i=e=>(Object.keys(e).forEach((t=>{(0,l.isDefined)(e[t])&&n.default.isNode(e[t])&&(e[t]=(0,a.getPublicElement)((0,s.default)(e[t])))})),t(e))}this._actionsMap[e]=i}_optionChanged(e){const{name:t,fullName:i,value:n,previousValue:o}=e;(0,p.updatePropsImmutable)(this._props,this.option(),t,i),this._propsInfo.templates.includes(t)&&n!==o&&(this._componentTemplates[t]=this._createTemplateComponent(n)),t&&this._getActionConfigsFull()[t]&&this._addAction(t),this._shouldRaiseContentReady=this._shouldRaiseContentReady||this._checkContentReadyOption(i),super._optionChanged(e),this._invalidate()}_validateOptions(e){return super._validateOptions(e)}_extractDefaultSlot(){return this.option("_hasAnonymousTemplateContent")?c.default.createElement(h.TemplateWrapper,{template:this._getTemplate(this._templateManager.anonymousTemplateName),transclude:!0,renovated:!0}):null}_createTemplateComponent(e){if(!e)return;const t=this._getTemplate(e);if((0,l.isString)(t)&&"dx-renovation-template-mock"===t)return;return e=>c.default.createElement(h.TemplateWrapper,(0,h.buildTemplateArgs)(e,t))}_wrapKeyDownHandler(e){return t=>{const{originalEvent:i,keyName:n,which:o}=t,a=this.customKeyHandlers,s=a[n]||a[o];if(void 0!==s){if(!s.bind(this)(i,t))return i.cancel=!0,i}return null==e?void 0:e(i,t)}}_toPublicElement(e){return(0,a.getPublicElement)((0,s.default)(e))}_patchElementParam(e){try{const t=(0,s.default)(e),i=null==t?void 0:t.get(0);return null!=i&&i.nodeType?i:e}catch(t){return e}}focus(){const e=this.$element();if(!(e.is(":focus")||e.find(":focus").length>0))if(this.option("focusStateEnabled"))e.focus();else{var t;null===(t=e.find("[tabindex]")[0])||void 0===t||t.focus()}}repaint(){this._isNodeReplaced=!1,this._shouldRaiseContentReady=!0,this._removeWidget(),this._refresh()}_supportedKeys(){return _({},this.defaultKeyHandlers,this.customKeyHandlers)}registerKeyHandler(e,t){this.customKeyHandlers[e]=t}setAria(e,t){this._aria[e]=t,this._initMarkup()}_getViewComponentDefaultProps(){return this._viewComponent.defaultProps||{}}}t.ComponentWrapper=m,m.IS_RENOVATED_WIDGET=!1,m.IS_RENOVATED_WIDGET=!0},12274:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigContext=void 0;var n=i(49714);t.ConfigContext=(0,n.createContext)(void 0)},86688:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigProviderDefaultProps=t.ConfigProvider=void 0;var n=i(49714),o=i(12274);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}const s=t.ConfigProviderDefaultProps={};class r extends n.BaseInfernoComponent{constructor(){super(...arguments),this.__getterCache={}}get config(){return void 0!==this.__getterCache.config?this.__getterCache.config:this.__getterCache.config=(()=>({rtlEnabled:this.props.rtlEnabled}))()}componentWillUpdate(e){this.props.rtlEnabled!==e.rtlEnabled&&(this.__getterCache.config=void 0)}getChildContext(){return a({},this.context,{[o.ConfigContext.id]:this.config||o.ConfigContext.defaultValue})}render(){return this.props.children}}t.ConfigProvider=r,r.defaultProps=s},10922:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DomComponentWrapper=void 0;var n=i(81167),o=i(49714),a=i(15393),s=i(52576),r=i(12274);const l=["componentProps","componentType","templateNames"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}const u=e=>Object.keys(e).reduce(((t,i)=>(void 0!==e[i]&&(t[i]=e[i]),t)),{});class c extends o.InfernoComponent{constructor(e){super(e),this.state={},this.refs=null,this.widgetRef=(0,n.createRef)(),this.instance=null,this.prevProps=null,this.getInstance=this.getInstance.bind(this),this.setupWidget=this.setupWidget.bind(this),this.updateWidget=this.updateWidget.bind(this)}getConfig(){const{id:e}=r.ConfigContext;return this.context[e]?this.context[e]:r.ConfigContext.defaultValue}render(){return u((0,n.createVNode)(1,"div",this.props.componentProps.className,null,1,d({},this.getRestAttributes()),null,this.widgetRef))}componentWillUpdate(e,t,i){super.componentWillUpdate(e,t,i)}createEffects(){return[new o.InfernoEffect(this.setupWidget,[]),new o.InfernoEffect(this.updateWidget,[this.props.componentProps,this.getConfig(),this.props.templateNames])]}updateEffects(){var e;const t=[this.props.componentProps,this.getConfig(),this.props.templateNames];null===(e=this._effects[1])||void 0===e||e.update(t)}setupWidget(){const e=this.widgetRef.current,t=new this.props.componentType(e,this.getProperties());return this.instance=t,()=>{t.dispose(),this.instance=null}}updateWidget(){if(!this.instance)return;const e=(0,a.getUpdatedOptions)(this.prevProps??{},this.getProperties());e.length&&(this.instance.beginUpdate(),e.forEach((e=>{var t;const{path:i,value:n}=e;null===(t=this.instance)||void 0===t||t.option(i,n)})),this.instance.endUpdate()),this.prevProps=this.getProperties()}getRestAttributes(){return function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(this.props,l)}getProperties(){var e;const t=u(this.props.componentProps),{valueChange:i}=t,n=(0,s.extend)({rtlEnabled:null===(e=this.getConfig())||void 0===e?void 0:e.rtlEnabled,isRenovated:!0},t);i&&(n.onValueChanged=e=>{const{value:t}=e;return i(t)});return this.props.templateNames.forEach((e=>{(0,o.hasTemplate)(e,n,this)&&(n[e]=(t,i,n)=>{(0,o.renderTemplate)(this.props.componentProps[e],{item:t,index:i,container:n},this)})})),n}getInstance(){return this.instance}}t.DomComponentWrapper=c},84766:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ComponentWrapper",{enumerable:!0,get:function(){return n.ComponentWrapper}});var n=i(34993)},34554:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.buildTemplateArgs=t.TemplateWrapper=void 0;var n=i(49714),o=h(i(64960)),a=i(61404),s=h(i(64553)),r=i(86858),l=i(11528),d=i(81167),u=i(1270);const c=["isEqual"];function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},p.apply(null,arguments)}t.buildTemplateArgs=(e,t)=>{const i={template:t,model:p({},e)},n=e.data??{},{isEqual:o}=n,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(n,c);return o&&(i.model.data=a,i.isEqual=o),i};class g extends n.InfernoComponent{constructor(e){super(e),this.renderTemplate=this.renderTemplate.bind(this)}renderTemplate(){const e=(0,d.findDOMfromVNode)(this.$LI,!0);if(null==e||!e.parentNode)return()=>{};const t=e.parentNode,i=(0,s.default)(t),n=i.contents().toArray(),l=((e,t)=>{const{data:i,index:n}=e.model??{data:{}};i&&Object.keys(i).forEach((e=>{i[e]&&o.default.isNode(i[e])&&(i[e]=(0,a.getPublicElement)((0,s.default)(i[e])))}));const r=e.template.render(p({container:t,transclude:e.transclude},{renovated:e.renovated},e.transclude?{}:{model:i},!e.transclude&&Number.isFinite(n)?{index:n}:{}));return void 0===r?[]:r.toArray?r.toArray():[(0,s.default)(r).get(0)]})(this.props,(0,a.getPublicElement)(i));return(0,r.replaceWith)((0,s.default)(e),(0,s.default)(l)),()=>{const i=(0,s.default)(t).contents().toArray();var o;o=n,i.forEach((e=>{!o.find((t=>e===t))&&e.parentNode&&(0,s.default)(e).remove()})),t.appendChild(e)}}shouldComponentUpdate(e){const{template:t,model:i}=this.props,{template:n,model:o,isEqual:a}=e,s=a??u.shallowEquals;if(t!==n)return!0;if(!(0,l.isDefined)(i)||!(0,l.isDefined)(o))return i!==o;const{data:r,index:d}=i,{data:c,index:h}=o;return d!==h||((0,l.isDefined)(r)&&(0,l.isDefined)(c)?!s(r,c):i!==o)}createEffects(){return[new n.InfernoEffect(this.renderTemplate,[this.props.template,this.props.model])]}updateEffects(){this._effects[0].update([this.props.template,this.props.model])}componentWillUnmount(){}render(){return null}}t.TemplateWrapper=g},8808:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.querySelectorInSameDocument=function(e,t){var i;return((null===(i=e.getRootNode)||void 0===i?void 0:i.call(e))??document).querySelector(t)}},31006:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;const i=(0,n.getWindow)();return e?null===(t=i.getComputedStyle)||void 0===t?void 0:t.call(i,e):null};var n=i(3104)},6909:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplate=void 0;var n=i(81167);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}t.getTemplate=e=>e&&(e.defaultProps?t=>(0,n.normalizeProps)((0,n.createComponentVNode)(2,e,o({},t))):e)},15393:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getUpdatedOptions=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;return h(e,t,"",i)};var n=i(11528);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}const a=["dataSource","selectedRowKeys"],s={integrationOptions:!0};function r(e,t,i){return{path:e,value:t,previousValue:i}}function l(e,t,i,a,l,d){if(s[a])return;const c=(0,n.type)(t),h=(0,n.type)(i);if(t!==i)if(c!==h)e.push(r(a,i,t));else if("object"===c)if((0,n.isPlainObject)(i)){const n=u(t,i,l,d);e.push(...n.map((e=>o({},e,{path:`${a}.${e.path}`}))))}else e.push(r(a,i,t));else if("array"===c){if(d.some((e=>l.includes(e)))&&t!==i)e.push(r(a,i,t));else if(t.length!==i.length)e.push(r(a,i,t));else{const n=u(t,i,l,d);[].push.apply(e,n.map((e=>o({},e,{path:`${a}${e.path}`}))))}}else e.push(r(a,i,t))}const d=e=>(t,i,n,o)=>{const a=[],s=Array.isArray(t)?e=>{l(a,t[e],i[e],`[${e}]`,`${n}.${e}`,o)}:e=>{l(a,t[e],i[e],e,`${n}.${e}`,o)};return e(t).forEach(s),Object.keys(i).filter((e=>!Object.prototype.hasOwnProperty.call(t,e)&&t[e]!==i[e])).forEach((e=>{a.push({path:e,value:i[e],previousValue:t[e]})})),a},u=d((e=>Object.keys(e))),c={key:!0,ref:!0,children:!0,style:!0},h=d((e=>Object.keys(e).filter((e=>!c[e]))))},10632:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getTemplate",{enumerable:!0,get:function(){return n.getTemplate}}),Object.defineProperty(t,"shallowEquals",{enumerable:!0,get:function(){return o.shallowEquals}}),Object.defineProperty(t,"updatePropsImmutable",{enumerable:!0,get:function(){return a.updatePropsImmutable}});var n=i(6909),o=i(1270),a=i(73725)},71312:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.combineClasses=void 0;t.combineClasses=e=>Object.keys(e).filter((t=>!!t&&e[t])).join(" ")},28477:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveRtlEnabled=function(e,t){if(void 0!==e)return e;if(void 0!==(null==t?void 0:t.rtlEnabled))return t.rtlEnabled;return(0,n.config)().rtlEnabled},t.resolveRtlEnabledDefinition=function(e,t){const i=(0,o.isDefined)(e),a=(0,o.isDefined)((0,n.config)().rtlEnabled)&&!i&&!(0,o.isDefined)(null==t?void 0:t.rtlEnabled);return i&&e!==(null==t?void 0:t.rtlEnabled)||a};var n=i(83077),o=i(11528)},1270:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shallowEquals=void 0;t.shallowEquals=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((i=>e[i]===t[i]))},28677:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToDxInactiveEvent=t.subscribeToDxHoverStartEvent=t.subscribeToDxHoverEndEvent=t.subscribeToDxFocusOutEvent=t.subscribeToDxFocusInEvent=t.subscribeToDxActiveEvent=t.subscribeToDXScrollStopEvent=t.subscribeToDXScrollStartEvent=t.subscribeToDXScrollMoveEvent=t.subscribeToDXScrollEndEvent=t.subscribeToDXScrollCancelEvent=t.subscribeToDXPointerUpEvent=t.subscribeToDXPointerMoveEvent=t.subscribeToDXPointerDownEvent=t.subscribeToClickEvent=void 0,t.subscribeToEvent=u,t.subscribeToScrollInitEvent=t.subscribeToScrollEvent=t.subscribeToMouseLeaveEvent=t.subscribeToMouseEnterEvent=t.subscribeToKeyDownEvent=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=d(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(64044)),o=l(i(92774)),a=l(i(86548)),s=l(i(89797)),r=i(98834);function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(d=function(e){return e?i:t})(e)}function u(e){return(t,i,n,a)=>{const s=a?(0,r.addNamespace)(e,a):e;if(i)return o.default.on(t,s,n,i),()=>{o.default.off(t,s,i)}}}t.subscribeToClickEvent=u(n.name),t.subscribeToScrollEvent=u(a.default.scroll),t.subscribeToScrollInitEvent=u(a.default.init),t.subscribeToDXScrollStartEvent=u(a.default.start),t.subscribeToDXScrollMoveEvent=u(a.default.move),t.subscribeToDXScrollEndEvent=u(a.default.end),t.subscribeToDXScrollStopEvent=u(a.default.stop),t.subscribeToDXScrollCancelEvent=u(a.default.cancel),t.subscribeToDXPointerDownEvent=u(s.default.down),t.subscribeToDXPointerUpEvent=u(s.default.up),t.subscribeToDXPointerMoveEvent=u(s.default.move),t.subscribeToMouseEnterEvent=u("mouseenter"),t.subscribeToMouseLeaveEvent=u("mouseleave"),t.subscribeToKeyDownEvent=u("keydown"),t.subscribeToDxActiveEvent=u("dxactive"),t.subscribeToDxInactiveEvent=u("dxinactive"),t.subscribeToDxHoverStartEvent=u("dxhoverstart"),t.subscribeToDxHoverEndEvent=u("dxhoverend"),t.subscribeToDxFocusInEvent=u("focusin"),t.subscribeToDxFocusOutEvent=u("focusout")},7529:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toNumber=function(e){return e?Number(e.replace("px","")):0}},73725:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.updatePropsImmutable=void 0;var n=i(31e3),o=i(11528);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}const s=e=>Array.isArray(e)?[...e]:a({},e),r=(e,t,i)=>{const n=i.length>0&&t&&e!==t?s(t):s(e),a=i[0];return i.length>1?n[a]=r(e[a],null==t?void 0:t[a],i.slice(1)):a&&((0,o.isPlainObject)(e[a])?n[a]=s(e[a]):n[a]=e[a]),n};t.updatePropsImmutable=(e,t,i,a)=>{const s=t[i],l=e[i],d=e;(0,o.isPlainObject)(s)||i!==a&&Array.isArray(s)?d[i]=r(s,l,(0,n.getPathParts)(a).slice(1)):d[i]=s}},93796:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetDefaultProps=t.Widget=void 0;var n=i(81167);i(64044),i(638);var o=i(49714),a=i(42222),s=v(i(64960)),r=v(i(87129)),l=i(52576),d=v(i(63283)),u=i(58515),c=i(11528),h=i(12274),p=i(86688),g=i(71312),_=i(28477),f=i(28112),m=i(28677);function v(e){return e&&e.__esModule?e:{default:e}}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},C.apply(null,arguments)}const y=t.WidgetDefaultProps=C({},f.BaseWidgetDefaultProps,{_feedbackHideTimeout:400,_feedbackShowTimeout:30,cssText:"",aria:{},classes:"",name:"",addWidgetClass:!0});class b extends o.InfernoWrapperComponent{constructor(e){super(e),this.state={active:!1,focused:!1,hovered:!1},this.refs=null,this.rootElementRef=(0,n.createRef)(),this.widgetElementRef=(0,n.createRef)(),this.setRootElementRef=this.setRootElementRef.bind(this),this.activeEffect=this.activeEffect.bind(this),this.inactiveEffect=this.inactiveEffect.bind(this),this.clickEffect=this.clickEffect.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.focusInEffect=this.focusInEffect.bind(this),this.focusOutEffect=this.focusOutEffect.bind(this),this.hoverStartEffect=this.hoverStartEffect.bind(this),this.hoverEndEffect=this.hoverEndEffect.bind(this),this.keyboardEffect=this.keyboardEffect.bind(this),this.resizeEffect=this.resizeEffect.bind(this),this.windowResizeEffect=this.windowResizeEffect.bind(this),this.visibilityEffect=this.visibilityEffect.bind(this),this.checkDeprecation=this.checkDeprecation.bind(this),this.applyCssTextEffect=this.applyCssTextEffect.bind(this)}componentWillUpdate(e,t,i){super.componentWillUpdate(e,t,i)}getConfig(){return this.context[h.ConfigContext.id]?this.context[h.ConfigContext.id]:h.ConfigContext.defaultValue}createEffects(){return[new o.InfernoEffect(this.setRootElementRef,[]),new o.InfernoEffect(this.activeEffect,[this.props._feedbackShowTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.disabled,this.props.onActive]),new o.InfernoEffect(this.inactiveEffect,[this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),new o.InfernoEffect(this.clickEffect,[this.props.disabled,this.props.name,this.props.onClick]),new o.InfernoEffect(this.focusInEffect,[this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),new o.InfernoEffect(this.focusOutEffect,[this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),new o.InfernoEffect(this.hoverStartEffect,[this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),new o.InfernoEffect(this.hoverEndEffect,[this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),new o.InfernoEffect(this.keyboardEffect,[this.props.focusStateEnabled,this.props.onKeyDown]),new o.InfernoEffect(this.resizeEffect,[this.props.name,this.props.onDimensionChanged]),new o.InfernoEffect(this.windowResizeEffect,[this.props.onDimensionChanged]),new o.InfernoEffect(this.visibilityEffect,[this.props.name,this.props.onVisibilityChange]),new o.InfernoEffect(this.checkDeprecation,[this.props.height,this.props.width]),new o.InfernoEffect(this.applyCssTextEffect,[this.props.cssText]),(0,o.createReRenderEffect)()]}updateEffects(){var e,t,i,n,o,a,s,r,l,d,u,c,h;null===(e=this._effects[1])||void 0===e||e.update([this.props._feedbackShowTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.disabled,this.props.onActive]),null===(t=this._effects[2])||void 0===t||t.update([this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),null===(i=this._effects[3])||void 0===i||i.update([this.props.disabled,this.props.name,this.props.onClick]),null===(n=this._effects[4])||void 0===n||n.update([this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),null===(o=this._effects[5])||void 0===o||o.update([this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),null===(a=this._effects[6])||void 0===a||a.update([this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),null===(s=this._effects[7])||void 0===s||s.update([this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),null===(r=this._effects[8])||void 0===r||r.update([this.props.focusStateEnabled,this.props.onKeyDown]),null===(l=this._effects[9])||void 0===l||l.update([this.props.name,this.props.onDimensionChanged]),null===(d=this._effects[10])||void 0===d||d.update([this.props.onDimensionChanged]),null===(u=this._effects[11])||void 0===u||u.update([this.props.name,this.props.onVisibilityChange]),null===(c=this._effects[12])||void 0===c||c.update([this.props.height,this.props.width]),null===(h=this._effects[13])||void 0===h||h.update([this.props.cssText])}setRootElementRef(){var e;const{rootElementRef:t,onRootElementRendered:i}=this.props;t&&this.widgetElementRef&&(t.current=this.widgetElementRef.current),null!=this&&null!==(e=this.widgetElementRef)&&void 0!==e&&e.current&&(null==i||i(this.widgetElementRef.current))}activeEffect(){const{activeStateEnabled:e,activeStateUnit:t,disabled:i,_feedbackShowTimeout:n,onActive:o}=this.props,a=t;var s;if(e&&!i)return(0,m.subscribeToDxActiveEvent)(null===(s=this.widgetElementRef)||void 0===s?void 0:s.current,(e=>{this.setState({active:!0}),null==o||o(e)}),{timeout:n,selector:a},"UIFeedback")}inactiveEffect(){const{activeStateEnabled:e,activeStateUnit:t,_feedbackHideTimeout:i,onInactive:n}=this.props,o=t;var a;if(e)return(0,m.subscribeToDxInactiveEvent)(null===(a=this.widgetElementRef)||void 0===a?void 0:a.current,(e=>{this.state.active&&(this.setState({active:!1}),null==n||n(e))}),{timeout:i,selector:o},"UIFeedback")}clickEffect(){const{name:e,onClick:t,disabled:i}=this.props,n=e;var o;if(t&&!i)return a.dxClick.on(null===(o=this.widgetElementRef)||void 0===o?void 0:o.current,t,{namespace:n}),()=>{var e;return a.dxClick.off(null===(e=this.widgetElementRef)||void 0===e?void 0:e.current,{namespace:n})}}focusInEffect(){const{disabled:e,focusStateEnabled:t,name:i,onFocusIn:n}=this.props,o=`${i}Focus`;var a;if(t&&!e)return(0,m.subscribeToDxFocusInEvent)(null===(a=this.widgetElementRef)||void 0===a?void 0:a.current,(e=>{e.isDefaultPrevented()||(this.setState({focused:!0}),null==n||n(e))}),null,o)}focusOutEffect(){const{focusStateEnabled:e,name:t,onFocusOut:i}=this.props,n=`${t}Focus`;var o;if(e)return(0,m.subscribeToDxFocusOutEvent)(null===(o=this.widgetElementRef)||void 0===o?void 0:o.current,(e=>{!e.isDefaultPrevented()&&this.state.focused&&(this.setState({focused:!1}),null==i||i(e))}),null,n)}hoverStartEffect(){const{activeStateUnit:e,hoverStateEnabled:t,disabled:i,onHoverStart:n}=this.props,o=e;var a;if(t&&!i)return(0,m.subscribeToDxHoverStartEvent)(null===(a=this.widgetElementRef)||void 0===a?void 0:a.current,(e=>{this.state.active||this.setState({hovered:!0}),null==n||n(e)}),{selector:o},"UIFeedback")}hoverEndEffect(){const{activeStateUnit:e,hoverStateEnabled:t,onHoverEnd:i}=this.props,n=e;var o;if(t)return(0,m.subscribeToDxHoverEndEvent)(null===(o=this.widgetElementRef)||void 0===o?void 0:o.current,(e=>{this.state.hovered&&(this.setState({hovered:!1}),null==i||i(e))}),{selector:n},"UIFeedback")}keyboardEffect(){const{onKeyDown:e,focusStateEnabled:t}=this.props;if(t&&e){var i,n;const t=a.keyboard.on(null===(i=this.widgetElementRef)||void 0===i?void 0:i.current,null===(n=this.widgetElementRef)||void 0===n?void 0:n.current,(t=>e(t)));return()=>a.keyboard.off(t)}}resizeEffect(){const e=`${this.props.name}VisibilityChange`,{onDimensionChanged:t}=this.props;var i;if(t)return a.resize.on(null===(i=this.widgetElementRef)||void 0===i?void 0:i.current,t,{namespace:e}),()=>{var t;return a.resize.off(null===(t=this.widgetElementRef)||void 0===t?void 0:t.current,{namespace:e})}}windowResizeEffect(){const{onDimensionChanged:e}=this.props;if(e)return d.default.add(e),()=>{d.default.remove(e)}}visibilityEffect(){const{name:e,onVisibilityChange:t}=this.props,i=`${e}VisibilityChange`;var n;if(t)return a.visibility.on(null===(n=this.widgetElementRef)||void 0===n?void 0:n.current,(()=>t(!0)),(()=>t(!1)),{namespace:i}),()=>{var e;return a.visibility.off(null===(e=this.widgetElementRef)||void 0===e?void 0:e.current,{namespace:i})}}checkDeprecation(){const{width:e,height:t}=this.props;(0,c.isFunction)(e)&&r.default.log("W0017","width"),(0,c.isFunction)(t)&&r.default.log("W0017","height")}applyCssTextEffect(){var e;const{cssText:t}=this.props;void 0!==t&&""!==t&&null!==(e=this.widgetElementRef)&&void 0!==e&&e.current&&(this.widgetElementRef.current.style.cssText=t)}getShouldRenderConfigProvider(){const{rtlEnabled:e}=this.props;return(0,_.resolveRtlEnabledDefinition)(e,this.config)}getRtlEnabled(){const{rtlEnabled:e}=this.props;return(0,_.resolveRtlEnabled)(e,this.config)}getAttributes(){const{aria:e,disabled:t,focusStateEnabled:i,visible:n}=this.props,o=i&&!t&&this.props.accessKey;var a;return C({},(0,l.extend)({},o&&{accessKey:o}),(a=C({},e,{disabled:t,hidden:!n}),Object.keys(a).reduce(((e,t)=>a[t]?C({},e,{["role"===t||"id"===t?t:`aria-${t}`]:String(a[t])}):e),{})),(0,l.extend)({},this.getRestAttributes(this.props)))}getRestAttributes(e){const t=C({},e);return["_feedbackHideTimeout","_feedbackShowTimeout","accessKey","activeStateEnabled","activeStateUnit","addWidgetClass","aria","children","className","classes","cssText","disabled","focusStateEnabled","height","hint","hoverStateEnabled","name","onActive","onClick","onDimensionChanged","onFocusIn","onFocusOut","onHoverEnd","onHoverStart","onInactive","onKeyDown","onRootElementRendered","onVisibilityChange","rootElementRef","rtlEnabled","tabIndex","visible","width"].forEach((e=>{delete t[e]})),t}getStyles(){const{width:e,height:t}=this.props,i=this.props.style||{},n=(0,u.normalizeStyleProp)("width",(0,c.isFunction)(e)?e():e);return C({},i,{height:(0,u.normalizeStyleProp)("height",(0,c.isFunction)(t)?t():t)??i.height,width:n??i.width})}getCssClasses(){const{classes:e,addWidgetClass:t,className:i,disabled:n,activeStateEnabled:o,focusStateEnabled:a,hoverStateEnabled:s,onVisibilityChange:r,visible:l}=this.props,d=!!a&&!n,u=!!s&&!n,c=!!o&&!n,h={"dx-widget":!!t,[String(e)]:!!e,[String(i)]:!!i,"dx-state-disabled":!!n,"dx-state-invisible":!l,"dx-state-focused":!!this.state.focused&&d,"dx-state-active":!!this.state.active&&c,"dx-state-hover":!!this.state.hovered&&u&&!this.state.active,"dx-rtl":!!this.props.rtlEnabled,"dx-visibility-change-handler":!!r};return(0,g.combineClasses)(h)}getTabIndex(){const{focusStateEnabled:e,disabled:t,tabIndex:i}=this.props;return e&&!t?i:void 0}focus(){var e;a.focus.trigger(null===(e=this.widgetElementRef)||void 0===e?void 0:e.current)}blur(){var e,t;const i=s.default.getActiveElement(null===(e=this.widgetElementRef)||void 0===e?void 0:e.current);(null===(t=this.widgetElementRef)||void 0===t?void 0:t.current)===i&&i.blur()}activate(){this.setState({active:!0})}deactivate(){this.setState({active:!1})}render(){const{hint:e,children:t}=this.props,i=(0,n.normalizeProps)((0,n.createVNode)(1,"div",this.getCssClasses(),t,0,C({},this.getAttributes(),{tabIndex:this.getTabIndex(),title:e,style:this.getStyles()}),null,this.widgetElementRef));return this.getShouldRenderConfigProvider()?(0,n.createComponentVNode)(2,p.ConfigProvider,{rtlEnabled:this.getRtlEnabled(),children:i}):i}}t.Widget=b,b.defaultProps=y},52820:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BindableTemplate=void 0;var n=l(i(92774)),o=i(28630),a=l(i(64553)),s=i(42186),r=i(11528);function l(e){return e&&e.__esModule?e:{default:e}}const d=function(e,t,i,n,o){let a;const s=((e,t,i)=>t((()=>e),i))(e,t,(e=>{a&&a(),(0,r.isPrimitive)(e)?o(e):a=function(e,t,i,n,o){const a={},s=i.slice(),r=i.map((i=>{const r=n[i];return t(r?()=>r(e):()=>e[i],(e=>{if(a[i]=e,s.length){const e=s.indexOf(i);e>=0&&s.splice(e,1)}s.length||o(a)}))}));return function(){r.forEach((e=>e()))}}(e,t,i,n,o)}));return function(){a&&a(),s&&s()}};class u extends s.TemplateBase{constructor(e,t,i,n){super(),this._render=e,this._fields=t,this._fieldsMap=n||{},this._watchMethod=i}_renderCore(e){const t=(0,a.default)(e.container),i=d(e.model,this._watchMethod,this._fields,this._fieldsMap,(i=>{t.empty(),this._render(t,i,e.model)}));return n.default.on(t,o.removeEvent,i),t.contents()}}t.BindableTemplate=u},93971:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ChildDefaultTemplate=void 0;var n=i(42186);class o extends n.TemplateBase{constructor(e){super(),this.name=e}}t.ChildDefaultTemplate=o},11768:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyTemplate=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(42186);class s extends a.TemplateBase{_renderCore(){return(0,o.default)()}}t.EmptyTemplate=s},88969:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.FunctionTemplate=void 0;var n=i(42186),o=i(86858);class a extends n.TemplateBase{constructor(e){super(),this._render=e}_renderCore(e){return(0,o.normalizeTemplateElement)(this._render(e))}}t.FunctionTemplate=a},52538:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Template=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(42186),s=i(35155),r=i(86858);(0,s.registerTemplateEngine)("default",{compile:e=>(0,r.normalizeTemplateElement)(e),render:(e,t,i)=>e.clone()}),(0,s.setTemplateEngine)("default");class l extends a.TemplateBase{constructor(e){super(),this._element=e}_renderCore(e){const{transclude:t}=e;return t||this._compiledTemplate||(this._compiledTemplate=(0,s.getCurrentTemplateEngine)().compile(this._element)),(0,o.default)("<div>").append(t?this._element:(0,s.getCurrentTemplateEngine)().render(this._compiledTemplate,e.model,e.index)).contents()}source(){return(0,o.default)(this._element).clone()}}t.Template=l},31292:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.renderedCallbacks=t.TemplateBase=void 0;var n=i(18029),o=d(i(64960)),a=d(i(87129)),s=d(i(64553)),r=d(i(84718)),l=i(86858);function d(e){return e&&e.__esModule?e:{default:e}}const u=t.renderedCallbacks=(0,r.default)({syncStrategy:!0});t.TemplateBase=class{render(e){e=e||{};const{onRendered:t}=e;let i;return delete e.onRendered,i=e.renovated&&e.transclude&&this._element?(0,s.default)("<div>").append(this._element).contents():this._renderCore(e),this._ensureResultInContainer(i,e.container),u.fire(i,e.container),t&&t(),i}_ensureResultInContainer(e,t){if(!t)return;const i=(0,s.default)(t),a=(0,l.contains)(i.get(0),e.get(0));if(i.append(e),a)return;(0,l.contains)(o.default.getBody(),i.get(0))&&(0,n.triggerShownEvent)(e)}_renderCore(){throw a.default.Error("E0001")}}},70785:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentTemplateEngine=function(){return r},t.registerTemplateEngine=function(e,t){s[e]=t},t.setTemplateEngine=function(e){if((0,a.isString)(e)){if(r=s[e],!r)throw o.default.Error("E0020",e)}else r=e};var n,o=(n=i(87129))&&n.__esModule?n:{default:n},a=i(11528);const s={};let r},46190:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.combineClasses=function(e){return Object.keys(e).filter((t=>e[t])).join(" ")}},55594:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dateUtilsTs=void 0;t.dateUtilsTs={addOffsets:(e,t)=>{const i=t.reduce(((e,t)=>e+t),e.getTime());return new Date(i)}}},14136:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Ajax=void 0;var n=l(i(35688)),o=i(28248),a=i(87739),s=l(i(89656)),r=i(11528);function l(e){return e&&e.__esModule?e:{default:e}}const d=(0,i(3104).getWindow)(),u="success",c="error";t.Ajax=(0,s.default)({sendRequest:function(e){const t=n.default.getXhr(),i=new a.Deferred,s=i.promise(),l=!(0,r.isDefined)(e.async)||e.async,{dataType:h}=e,p=e.timeout||0;let g;e.crossDomain=(0,o.isCrossDomain)(e.url);const _="jsonp"===h||"script"===h;void 0===e.cache&&(e.cache=!_);const f=(0,o.getJsonpCallbackName)(e),m=(0,o.getRequestHeaders)(e),v=(0,o.getRequestOptions)(e,m),{url:C}=v,{parameters:y}=v;if(f&&(d[f]=function(e){i.resolve(e,u,t)}),e.crossDomain&&_){const e=function(){i.reject(t,c)},n=function(){"jsonp"!==h&&i.resolve(null,u,t)};return(0,o.evalCrossDomainScript)(C).then(n,e),s}if(e.crossDomain&&!("withCredentials"in t))return i.reject(t,c),s;if(t.open((0,o.getMethod)(e),C,l,e.username,e.password),l&&(t.timeout=p,g=function(e,t){return e&&setTimeout((function(){t.customStatus="timeout",t.abort()}),e)}(p,t)),t.onreadystatechange=function(e){var n;4===t.readyState&&(clearTimeout(g),(n=t.status)>=200&&n<300?function(e){return 204!==e}(t.status)?function(e,t,i){const n=function(e){return e.responseType&&"text"!==e.responseType||"string"!=typeof e.responseText?e.response:e.responseText}(t);switch(i){case"jsonp":(0,o.evalScript)(n);break;case"script":(0,o.evalScript)(n),e.resolve(n,u,t);break;case"json":try{e.resolve(JSON.parse(n),u,t)}catch(i){e.reject(t,"parsererror",i)}break;default:e.resolve(n,u,t)}}(i,t,h):i.resolve(null,"nocontent",t):i.reject(t,t.customStatus||c))},e.upload&&(t.upload.onprogress=e.upload.onprogress,t.upload.onloadstart=e.upload.onloadstart,t.upload.onabort=e.upload.onabort),e.xhrFields)for(const i in e.xhrFields)t[i]=e.xhrFields[i];"arraybuffer"===e.responseType&&(t.responseType=e.responseType);for(const e in m)Object.prototype.hasOwnProperty.call(m,e)&&(0,r.isDefined)(m[e])&&t.setRequestHeader(e,m[e]);return e.beforeSend&&e.beforeSend(t),t.send(y),s.abort=function(){t.abort()},s}})},42202:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonpCallbackName=t.getAcceptHeader=t.evalScript=t.evalCrossDomainScript=void 0,t.getMethod=c,t.isCrossDomain=t.getRequestOptions=t.getRequestHeaders=void 0;var n,o=(n=i(64960))&&n.__esModule?n:{default:n},a=i(52576),s=i(3104);const r=(0,s.getWindow)(),l=function(e){const t=o.default.createElement("script");for(const i in e)t[i]=e[i];return t},d=function(e){return o.default.getHead().appendChild(e)},u=function(e){e.parentNode.removeChild(e)};t.evalScript=function(e){const t=l({text:e});d(t),u(t)};function c(e){return(e.method||"GET").toUpperCase()}t.evalCrossDomainScript=function(e){const t=l({src:e});return new Promise(((e,i)=>{const n={load:e,error:i},a=function(e){n[e.type](),u(t)};for(const e in n)o.default.listen(t,e,a);d(t)}))};const h=function(e){const t=e.dataType||"*",i="text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",n={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",jsonp:i,script:i};return(0,a.extendFromObject)(n,e.accepts,!0),n[t]?n[t]+("*"!==t?", */*; q=0.01":""):n["*"]};t.getAcceptHeader=h;t.getRequestHeaders=function(e){const t=e.headers||{};return t["Content-Type"]=t["Content-Type"]||function(e){let t;return e.data&&!e.upload&&"GET"!==c(e)&&(t="application/x-www-form-urlencoded;charset=utf-8"),e.contentType||t}(e),t.Accept=t.Accept||h(e),e.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest"),t};t.getJsonpCallbackName=function(e){if("jsonp"===e.dataType){const t=Math.random().toString().replace(/\D/g,""),i=e.jsonpCallback||`dxCallback${Date.now()}_${t}`,n=e.jsonp||"callback";return e.data=e.data||{},e.data[n]=i,i}};t.getRequestOptions=function(e,t){let i=e.data;const n="string"==typeof i;let o=e.url||r.location.href;return n||e.cache||(i=i||{},i._=Date.now()),i&&!e.upload&&(n||(i=function(e){const t=[];for(const i in e){let n=e[i];void 0!==n&&(null===n&&(n=""),"function"==typeof n&&(n=n()),t.push(`${encodeURIComponent(i)}=${encodeURIComponent(n)}`))}return t.join("&")}(i)),"GET"===c(e)?(""!==i&&(o+=(o.indexOf("?")>-1?"&":"?")+i),i=null):t["Content-Type"]&&t["Content-Type"].indexOf("application/x-www-form-urlencoded")>-1&&(i=i.replace(/%20/g,"+"))),{url:o,parameters:i}};t.isCrossDomain=function(e){if(!(0,s.hasWindow)())return!0;let t=!1;const i=o.default.createElement("a"),n=o.default.createElement("a");i.href=r.location.href;try{n.href=e,n.href=n.href,t=`${i.protocol}//${i.host}`!=`${n.protocol}//${n.host}`}catch(e){t=!0}return t}},28601:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapToArray=t.removeDuplicates=t.normalizeIndexes=t.groupBy=t.getUniqueValues=t.getIntersection=void 0;var n,o=(n=i(66636))&&n.__esModule?n:{default:n},a=i(22263),s=i(11528);function r(e){return e.reduce(((e,t)=>{const i=(e.get(t)??0)+1;return e.set(t,i),e}),new Map)}t.wrapToArray=function(e){return Array.isArray(e)?e:[e]};t.getUniqueValues=function(e){return[...new Set(e)]};t.getIntersection=function(e,t){const i=r(t);return e.filter((e=>{const t=i.get(e);return t&&i.set(e,t-1),t}))};t.removeDuplicates=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]);return e.filter((e=>{const i=t.get(e);return i&&t.set(e,i-1),!i}))};t.normalizeIndexes=function(e,t,i,n){const r={},{useLegacyVisibleIndex:l}=(0,o.default)();let d=0;const u=e=>!(0,s.isDefined)(e[t])&&(!n||n(e));e.forEach((e=>{const n=e[t];n>=0?(r[n]=r[n]||[],e===i?r[n].unshift(e):r[n].push(e)):e[t]=void 0})),l||e.forEach((e=>{if(u(e)){for(;r[d];)d++;r[d]=[e],d++}})),d=0,(0,a.orderEach)(r,(function(e,i){i.forEach((i=>{e>=0&&(i[t]=d++)}))})),l&&e.forEach((e=>{u(e)&&(e[t]=d++)}))};t.groupBy=(e,t)=>e.reduce(((e,i)=>{const n=t(i);return e[n]=e[n]??[],e[n].push(i),e}),{})},87525:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isKeysEqual=t.findChanges=void 0;var n=i(11528);const o=function(e,t){const i=t(e);if((0,n.isObject)(i))try{return JSON.stringify(i)}catch(e){return i}return i},a=function(e,t,i,n){return t[i[o(e,n)]]};t.isKeysEqual=function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0};t.findChanges=function(e,t,i,n){const s={},r={};let l=0,d=0;const u=[];e.forEach((function(e,t){const n=o(e,i);s[n]=t})),t.forEach((function(e,t){const n=o(e,i);r[n]=t}));const c=Math.max(e.length,t.length);for(let h=0;h<c+l;h++){const c=t[h],p=h-l+d,g=e[p];if(!c||g&&!a(g,t,r,i))g&&(u.push({type:"remove",key:i(g),index:h,oldItem:g}),d++,h--);else{const t=o(c,i),a=s[t],r=e[a];if(r){if(a!==p)return;n(r,c)||u.push({type:"update",data:c,key:i(c),index:h,oldItem:r})}else l++,u.push({type:"insert",data:c,index:h})}}return u}},33436:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.browser=void 0;var n=i(52576);const o=(0,i(3104).getNavigator)(),a=/(webkit)[ /]([\w.]+)/,s=/(mozilla)(?:.*? rv:([\w.]+))/,r=e=>{e=e.toLowerCase();const t={},i=a.exec(e)||e.indexOf("compatible")<0&&s.exec(e)||[];let n=i[1],o=i[2];return"webkit"===n&&(t.webkit=!0,e.indexOf("chrome")>=0||e.indexOf("crios")>=0?(n="chrome",o=/(?:chrome|crios)\/(\d+\.\d+)/.exec(e),o=o&&o[1]):e.indexOf("fxios")>=0?(n="mozilla",o=/fxios\/(\d+\.\d+)/.exec(e),o=o&&o[1]):e.indexOf("safari")>=0&&/version|phantomjs/.test(e)?(n="safari",o=/(?:version|phantomjs)\/([0-9.]+)/.exec(e),o=o&&o[1]):(n="unknown",o=/applewebkit\/([0-9.]+)/.exec(e),o=o&&o[1])),n&&(t[n]=!0,t.version=o),t};t.browser=(0,n.extend)({_fromUA:r},r(o.userAgent))},58060:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.callOnce=void 0;t.callOnce=function(e){let t,i=function(){return t=e.apply(this,arguments),i=function(){return t},t};return function(){return i.apply(this,arguments)}}},63172:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Callbacks=void 0;const i=function(e){this._options=e||{},this._list=[],this._queue=[],this._firing=!1,this._fired=!1,this._firingIndexes=[]};i.prototype._fireCore=function(e,t){const i=this._firingIndexes,n=this._list,{stopOnFalse:o}=this._options,a=i.length;for(i[a]=0;i[a]<n.length;i[a]++){if(!1===n[i[a]].apply(e,t)&&o)break}i.pop()},i.prototype.add=function(e){return"function"!=typeof e||this._options.unique&&this.has(e)||this._list.push(e),this},i.prototype.remove=function(e){const t=this._list,i=this._firingIndexes,n=t.indexOf(e);if(n>-1&&(t.splice(n,1),this._firing&&i.length))for(let e=0;e<i.length;e++)n<=i[e]&&i[e]--;return this},i.prototype.has=function(e){const t=this._list;return e?t.indexOf(e)>-1:!!t.length},i.prototype.empty=function(e){return this._list=[],this},i.prototype.fireWith=function(e,t){const i=this._queue;if(t=(t=t||[]).slice?t.slice():t,this._options.syncStrategy)this._firing=!0,this._fireCore(e,t);else{if(i.push([e,t]),this._firing)return;for(this._firing=!0;i.length;){const e=i.shift();this._fireCore(e[0],e[1])}}return this._firing=!1,this._fired=!0,this},i.prototype.fire=function(){this.fireWith(this,arguments)},i.prototype.fired=function(){return this._fired};const n=function(e){return new i(e)};t.Callbacks=n;t.default=n},39315:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.splitPair=t.pairToObject=t.normalizeKey=t.noop=t.grep=t.getKeyHash=t.findBestMatches=t.executeAsync=t.escapeRegExp=t.equalByValue=t.ensureDefined=t.denormalizeKey=t.deferUpdater=t.deferUpdate=t.deferRenderer=t.deferRender=t.default=t.asyncNoop=t.applyServerDecimalSeparator=void 0;var n=d(i(66636)),o=d(i(19427)),a=i(31e3),s=i(87739),r=i(21274),l=i(11528);function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}const c=function(e,t){return(0,l.isDefined)(e)?e:t};t.ensureDefined=c;const h=function(e,t){const i=new s.Deferred,n=t||this,o={promise:i.promise(),abort(){clearTimeout(a),i.rejectWith(n)}},a=(arguments[2]||setTimeout)((function(){const t=e.call(n);t&&t.done&&(0,l.isFunction)(t.done)?t.done((function(){i.resolveWith(n)})):i.resolveWith(n)}),"number"==typeof t?t:0);return o};t.executeAsync=h;const p=[],g=[],_=[];let f;const m=function(e,t,i){if(f&&f!==e)return p.push(t),g.push(e),i=i||new s.Deferred,_.push(i),i;const n=f,o=_.length;f=e;let a=t();return a||(_.length>o?a=s.when.apply(this,_.slice(o)):i&&i.resolve()),f=n,i&&a&&a.done&&a.done(i.resolve).fail(i.reject),!f&&p.length&&("render"===g.shift()?v:C)(p.shift(),_.shift()),a||(0,s.when)()},v=function(e,t){return m("render",e,t)};t.deferRender=v;const C=function(e,t){return m("update",e,t)};t.deferUpdate=C;const y=function(e){return function(){const t=this;return m("render",(function(){return e.call(t)}))}};t.deferRenderer=y;const b=function(e){return function(){const t=this;return m("update",(function(){return e.call(t)}))}};t.deferUpdater=b;const x=(e,t,i)=>{const n=[];let o=0;return(0,r.each)(t,((t,a)=>{let s=0;const l=i?i(a):a;(0,r.each)(e,((e,t)=>{const i=l[e];if(void 0!==i){if(!w(i,t))return s=-1,!1;s++}})),s<o||(s>o&&(n.length=0,o=s),n.push(a))})),n};t.findBestMatches=x;const w=function(e,t){if(Array.isArray(e)&&Array.isArray(t)){let i=!1;return(0,r.each)(e,((e,n)=>{if(n!==t[e])return i=!0,!1})),!i}return e===t},S=function(e){switch((0,l.type)(e)){case"string":return e.split(/\s+/,2);case"object":return[e.x??e.h,e.y??e.v];case"number":return[e];case"array":return e;default:return null}};t.splitPair=S;const D=function(e){let t=(0,l.isString)(e)?e:e.toString();const i=t.match(/[^a-zA-Z0-9_]/g);return i&&(0,r.each)(i,((e,i)=>{t=t.replace(i,`__${i.charCodeAt()}__`)})),t};t.normalizeKey=D;const I=function(e){const t=e.match(/__\d+__/g);return t&&t.forEach((t=>{const i=parseInt(t.replace("__",""));e=e.replace(t,String.fromCharCode(i))})),e};t.denormalizeKey=I;const E=function(e,t){const i=S(e);let n=t?parseFloat(i&&i[0]):parseInt(i&&i[0],10),o=t?parseFloat(i&&i[1]):parseInt(i&&i[1],10);return isFinite(n)||(n=0),isFinite(o)||(o=n),{h:n,v:o}};t.pairToObject=E;const T=function(e){if(e instanceof o.default)return e.toString();if((0,l.isObject)(e)||Array.isArray(e))try{const t=JSON.stringify(e);return"{}"===t?e:t}catch(t){return e}return e};t.getKeyHash=T;const A=function(e){return e.replace(/[[\]{}\-()*+?.\\^$|\s]/g,"\\$&")};t.escapeRegExp=A;const O=function(e){const t=(0,n.default)().serverDecimalSeparator;return(0,l.isDefined)(e)&&(e=e.toString().replace(".",t)),e};t.applyServerDecimalSeparator=O;const P=function(){};t.noop=P;const k=function(){return(new s.Deferred).resolve().promise()};t.asyncNoop=k;const M=function(e,t,i){const n=[];let o;const a=!i;for(let i=0;i<e.length;i++)o=!!t(e[i],i),o===a&&n.push(e[i]);return n};t.grep=M;const R={maxDepth:3,strict:!0},L=(e,t,i,n)=>{const{strict:o,maxDepth:s}=n,r=(0,a.toComparable)(e,!0),d=(0,a.toComparable)(t,!0);switch(!0){case o?r===d:r==d:case i>=s:return!0;case(0,l.isObject)(r)&&(0,l.isObject)(d):return((e,t,i,n)=>{const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const s=new Set(a);return!o.some((o=>!s.has(o)||!L(e[o],t[o],i+1,n)))})(r,d,i,n);case Array.isArray(r)&&Array.isArray(d):return((e,t,i,n)=>e.length===t.length&&!e.some(((e,o)=>!L(e,t[o],i+1,u({},n,{strict:!0})))))(r,d,i,n);default:return!1}},B=function(e,t){const i=u({},R,arguments.length>2&&void 0!==arguments[2]?arguments[2]:R);return L(e,t,0,i)};t.equalByValue=B;t.default={ensureDefined:c,executeAsync:h,deferRender:v,deferUpdate:C,deferRenderer:y,deferUpdater:b,findBestMatches:x,splitPair:S,normalizeKey:D,denormalizeKey:I,pairToObject:E,getKeyHash:T,escapeRegExp:A,applyServerDecimalSeparator:O,noop:P,asyncNoop:k,grep:M,equalByValue:B}},90834:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.equals=void 0;var n,o=(n=i(64960))&&n.__esModule?n:{default:n},a=i(31e3),s=i(11528);t.equals=function(e,t){if(e=(0,a.toComparable)(e,!0),t=(0,a.toComparable)(t,!0),e&&t&&(0,s.isRenderer)(e)&&(0,s.isRenderer)(t))return t.is(e);return!(e==e||t==t)||(0===e&&0===t?function(e,t){return 1/e==1/t}(e,t):!(null!==e&&"object"==typeof e&&!o.default.isElementNode(e))&&e===t)}},35005:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.default=t.debug=void 0;var n=i(11528);const o=function(){},a=function(e){return"undefined"!=typeof console&&(0,n.isFunction)(console[e])?console[e].bind(console):o},s=t.logger={log:a("log"),info:a("info"),warn:a("warn"),error:a("error")},r=t.debug=function(){function e(e,t){if(!e)throw new Error(t)}return{assert:e,assertParam:function(t,i){e(null!=t,i)}}}();t.default={logger:s,debug:r}},93142:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.toComparable=t.getPathParts=t.compileSetter=t.compileGetter=void 0;var n=d(i(55620)),o=d(i(87129)),a=i(21274),s=i(22263),r=i(11528),l=d(i(40216));function d(e){return e&&e.__esModule?e:{default:e}}const u=l.default.unwrap,{isWrapped:c}=l.default,{assign:h}=l.default,p=function(e){return(t=e,t.replace(/\[/g,".").replace(/\]/g,"")).split(".");var t};t.getPathParts=p;const g=function(e,t,i,n){if("this"===t)throw new o.default.Error("E4016");const a=e[t];n.unwrapObservables&&c(a)?h(a,i):e[t]=i},_=function(e){return(e=e||{}).unwrapObservables=void 0===e.unwrapObservables||e.unwrapObservables,e};function f(e,t){return t.unwrapObservables?u(e):e}const m=function(e){if(arguments.length>1&&(e=[].slice.call(arguments)),!e||"this"===e)return function(e){return e};if("string"==typeof e){const t=p(e);return function(e,i){const n=(i=_(i)).functionsAsIs,o="defaultValue"in i;let a=f(e,i);for(let e=0;e<t.length;e++){if(!a){if(null==a&&o)return i.defaultValue;break}const s=t[e];if(o&&(0,r.isObject)(a)&&!(s in a))return i.defaultValue;let l=f(a[s],i);!n&&(0,r.isFunction)(l)&&(l=l.call(a)),a=l}return a}}return Array.isArray(e)?function(e){const t={};for(let i=0,n=e.length;i<n;i++){const n=e[i];t[n]=m(n)}return function(e,i){let n;return(0,a.each)(t,(function(t){const o=this(e,i);if(void 0===o)return;let a=n||(n={});const s=t.split("."),r=s.length-1;for(let e=0;e<r;e++){const t=s[e];t in a||(a[t]={}),a=a[t]}a[s[r]]=o})),n}}(e):(0,r.isFunction)(e)?e:void 0};function v(e,t){return null!=t&&t.locale?e.toLocaleLowerCase(t.locale):e.toLowerCase()}function C(e,t){return null!=t&&t.locale?e.toLocaleUpperCase(t.locale):e.toUpperCase()}t.compileGetter=m;const y=function(e,t,i,n){if((0,r.isDefined)(i))return i;const o={};return g(e,t,o,n),o};t.compileSetter=function(e){const t=(e=p(e||"this")).length-1;return function(i,n,o){let a=f(i,o=_(o));e.forEach((function(e,i){let l=function(e,t,i){return i=i||{},f("this"===t?e:e[t],i)}(a,e,o);const d=!o.functionsAsIs&&(0,r.isFunction)(l)&&!c(l);i===t?o.merge&&(0,r.isPlainObject)(n)&&(!(0,r.isDefined)(l)||(0,r.isPlainObject)(l))?(l=y(a,e,l,o),(0,s.deepExtendArraySafe)(l,n,!1,!0)):d?a[e](n):g(a,e,n,o):(l=y(a,e,l,o),d&&(l=l.call(a)),a=l)}))}};t.toComparable=function(e,t){var i;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof Date)return e.getTime();const a=null==o||null===(i=o.collatorOptions)||void 0===i?void 0:i.sensitivity;if(e&&e instanceof n.default&&e.valueOf)e=e.valueOf();else if("string"==typeof e&&("base"===a||"case"===a)){const t=/[\u0300-\u036f]/g;"base"===a&&(e=v(e,o)),e=e.normalize("NFD").replace(t,"")}if("string"==typeof e&&!(t||"case"===a||"variant"===a)){var s;const t=null==o||null===(s=o.locale)||void 0===s?void 0:s.toLowerCase();return(t&&!!["hy","el"].find((e=>t===e||t.startsWith(`${e}-`)))?C:v)(e,o)}return e}},66570:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.dateUtils=void 0;var n,o=(n=i(71051))&&n.__esModule?n:{default:n},a=i(53124),s=i(21274),r=i(50254),l=i(11528),d=i(24491);const u=["millisecond","second","minute","hour","day","week","month","quarter","year"],c=function(e){let t,i,n;const o=["millisecond","second","minute","hour","day","month","year"],a={};for(t=o.length-1;t>=0;t--)n=o[t],i=Math.floor(e/(0,d.toMilliseconds)(n)),i>0&&(a[`${n}s`]=i,e-=h(n,i));return a};function h(e,t){return(0,d.toMilliseconds)(e)*t}function p(e){let t,i=-1;return(0,l.isString)(e)?e:(0,l.isObject)(e)?((0,s.each)(e,(function(e,n){for(t=0;t<u.length;t++)n&&(e===`${u[t]}s`||e===u[t])&&i<t&&(i=t)})),u[i]):""}const g={millisecond:"millisecond",second:"longtime",minute:"shorttime",hour:"shorttime",day:"day",week:"day",month:"month",quarter:"quarter",year:"year"};const _=function(e){return Math.floor(e/3)},f=function(e){return 3*_(e)};function m(e,t,i,n){e=new Date(e.getTime());const o=new Date(e.getTime());let a,s;const r=p(t);switch(r){case"second":e=new Date(1e3*Math.floor(o.getTime()/1e3));break;case"minute":e=new Date(6e4*Math.floor(o.getTime()/6e4));break;case"hour":e=new Date(36e5*Math.floor(o.getTime()/36e5));break;case"year":e.setMonth(0);case"month":e.setDate(1);case"day":e.setHours(0,0,0,0);break;case"week":(e=E(e,n||0)).setHours(0,0,0,0);break;case"quarter":a=f(e.getMonth()),s=e.getMonth(),e.setDate(1),e.setHours(0,0,0,0),s!==a&&e.setMonth(a)}return i&&"hour"!==r&&"minute"!==r&&"second"!==r&&M(o,e),e}function v(e){return m(e,"day")}function C(e,t,i){const n=new Date(e.getTime()),o=(0,l.isString)(t)?x(t.toLowerCase()):(0,l.isNumeric)(t)?c(t):t;return o.years&&n.setFullYear(n.getFullYear()+o.years*i),o.quarters&&n.setMonth(n.getMonth()+3*o.quarters*i),o.months&&n.setMonth(n.getMonth()+o.months*i),o.weeks&&n.setDate(n.getDate()+7*o.weeks*i),o.days&&n.setDate(n.getDate()+o.days*i),o.hours&&n.setTime(n.getTime()+36e5*o.hours*i),o.minutes&&n.setTime(n.getTime()+6e4*o.minutes*i),o.seconds&&n.setTime(n.getTime()+1e3*o.seconds*i),o.milliseconds&&n.setTime(n.getTime()+o.milliseconds*i),n}const y=function(e,t,i){const n=i?-1:1;return(0,l.isDate)(e)?C(e,t,n):(0,r.adjust)(e+t*n,t)};function b(e){return L(e.getFullYear(),e.getMonth()+1,0).getDate()}function x(e){const t={};switch(e){case"year":t.years=1;break;case"month":t.months=1;break;case"quarter":t.months=3;break;case"week":t.weeks=1;break;case"day":t.days=1;break;case"hour":t.hours=1;break;case"minute":t.minutes=1;break;case"second":t.seconds=1;break;case"millisecond":t.milliseconds=1}return t}function w(e,t){return S(e,t)&&e.getMonth()===t.getMonth()}function S(e,t){return e&&t&&e.getFullYear()===t.getFullYear()}function D(e){return e&&e.getFullYear()-e.getFullYear()%100}function I(e){return e&&e.getFullYear()-e.getFullYear()%10}function E(e,t){const i=(e.getDay()-t+7)%7,n=new Date(e);return n.setDate(e.getDate()-i),n}function T(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())}function A(e){return new Date(e,0,1)}function O(e){return new Date(e,11,31)}function P(e,t){let i=e.getDay()-t+1;return i<=0&&(i+=7),i}function k(e,t,i){let n=e;return(0,l.isDefined)(e)?((0,l.isDefined)(t)&&e<t&&(n=t),(0,l.isDefined)(i)&&e>i&&(n=i),n):e}function M(e,t){if(!(0,l.isDefined)(e))return;const i=t.getHours()-e.getHours();if(0===i)return;const n=1===i||-23===i?-1:1,o=new Date(t.getTime()+36e5*n);(n>0||o.getDate()===t.getDate())&&t.setTime(o.getTime())}function R(e,t){return 60*(t.getTimezoneOffset()-e.getTimezoneOffset())*1e3}const L=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];const o=new Date(e,...i);return o.setFullYear(e),o},B=t.dateUtils={dateUnitIntervals:u,convertMillisecondsToDateUnits:c,dateToMilliseconds:function(e){let t=0;return(0,l.isObject)(e)&&(0,s.each)(e,(function(e,i){t+=h(e.substr(0,e.length-1),i)})),(0,l.isString)(e)&&(t=h(e,1)),t},getNextDateUnit:function(e,t){switch(p(e)){case"millisecond":return"second";case"second":return"minute";case"minute":return"hour";case"hour":return"day";case"day":return t?"week":"month";case"week":return"month";case"month":return"quarter";case"quarter":case"year":return"year";default:return 0}},convertDateUnitToMilliseconds:h,getDateUnitInterval:p,getDateFormatByTickInterval:function(e){return g[p(e)]||""},getDatesDifferences:function(e,t){let i=0;const n={year:e.getFullYear()!==t.getFullYear(),month:e.getMonth()!==t.getMonth(),day:e.getDate()!==t.getDate(),hour:e.getHours()!==t.getHours(),minute:e.getMinutes()!==t.getMinutes(),second:e.getSeconds()!==t.getSeconds(),millisecond:e.getMilliseconds()!==t.getMilliseconds()};return(0,s.each)(n,(function(e,t){t&&i++})),0===i&&0!==R(e,t)&&(n.hour=!0,i++),n.count=i,n},correctDateWithUnitBeginning:m,trimTime:v,setToDayEnd:function(e){const t=v(e);return t.setDate(t.getDate()+1),new Date(t.getTime()-1)},roundDateByStartDayHour:function(e,t){const i=this.dateTimeFromDecimal(t),n=new Date(e);return(e.getHours()===i.hours&&e.getMinutes()<i.minutes||e.getHours()<i.hours)&&n.setHours(i.hours,i.minutes,0,0),n},dateTimeFromDecimal:function(e){return{hours:Math.floor(e),minutes:e%1*60}},addDateInterval:C,addInterval:y,getSequenceByInterval:function(e,t,i){const n=[];let o;for(n.push((0,l.isDate)(e)?new Date(e.getTime()):e),o=e;o<t;)o=y(o,i),n.push(o);return n},getDateIntervalByString:x,sameHoursAndMinutes:function(e,t){return e&&t&&e.getHours()===t.getHours()&&e.getMinutes()===t.getMinutes()},sameDate:function(e,t){return w(e,t)&&e.getDate()===t.getDate()},sameMonthAndYear:w,sameMonth:w,sameYear:S,sameDecade:function(e,t){if(!(0,l.isDefined)(e)||!(0,l.isDefined)(t))return;const i=e.getFullYear()-e.getFullYear()%10,n=t.getFullYear()-t.getFullYear()%10;return e&&t&&i===n},sameCentury:function(e,t){if(!(0,l.isDefined)(e)||!(0,l.isDefined)(t))return;const i=e.getFullYear()-e.getFullYear()%100,n=t.getFullYear()-t.getFullYear()%100;return e&&t&&i===n},sameView:function(e,t,i){return B[(0,a.camelize)(`same ${e}`)](t,i)},getDifferenceInMonth:function(e){let t=1;return"year"===e&&(t=12),"decade"===e&&(t=120),"century"===e&&(t=1200),t},getDifferenceInMonthForCells:function(e){let t=1;return"decade"===e&&(t=12),"century"===e&&(t=120),t},getFirstYearInDecade:I,getFirstDecadeInCentury:D,getShortDateFormat:function(){return"yyyy/MM/dd"},getViewFirstCellDate:function(e,t){return"month"===e?L(t.getFullYear(),t.getMonth(),1):"year"===e?L(t.getFullYear(),0,t.getDate()):"decade"===e?L(I(t),t.getMonth(),t.getDate()):"century"===e?L(D(t),t.getMonth(),t.getDate()):void 0},getViewLastCellDate:function(e,t){return"month"===e?L(t.getFullYear(),t.getMonth(),b(t)):"year"===e?L(t.getFullYear(),11,t.getDate()):"decade"===e?L(I(t)+9,t.getMonth(),t.getDate()):"century"===e?L(D(t)+90,t.getMonth(),t.getDate()):void 0},getViewDown:function(e){switch(e){case"century":return"decade";case"decade":return"year";case"year":return"month"}},getViewUp:function(e){switch(e){case"month":return"year";case"year":return"decade";case"decade":return"century"}},getLastMonthDay:b,getLastMonthDate:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(0,l.isDefined)(e))return;const i=new Date(e.getTime()),n=i.getMonth()+t;return i.setMonth(n),L(i.getFullYear(),n+1,0)},getFirstMonthDate:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(0,l.isDefined)(e))return;const i=new Date(e.getTime()),n=i.getMonth()+t;return i.setMonth(n),L(i.getFullYear(),n,1)},getFirstWeekDate:E,getWeekNumber:function e(t,i,n){const o=P(A(t.getFullYear()),i),a=P(O(t.getFullYear()),i),s=7-o+1;let r=Math.ceil((function(e){const t=T(e)-T(A(e.getFullYear()));return 1+Math.floor(t/(0,d.toMilliseconds)("day"))}(t)-s)/7);switch(n){case"fullWeek":if(7===s&&r++,0===r){return e(O(t.getFullYear()-1),i,n)}return r;case"firstDay":s>0&&r++;return(r>52&&!(7===o||7===a)||54===r)&&(r=1),r;case"firstFourDays":s>3&&r++;if(r>52&&!(4===o||4===a)&&(r=1),0===r){return e(O(t.getFullYear()-1),i,n)}return r}},normalizeDateByWeek:function(e,t){const i=B.getDatesInterval(e,t,"day");let n=new Date(e);return i>=6&&(n=new Date(n.setDate(n.getDate()+7))),n},getQuarter:_,getFirstQuarterMonth:f,dateInRange:function(e,t,i,n){return"date"===n&&(t=t&&B.correctDateWithUnitBeginning(t,"day"),i=i&&B.correctDateWithUnitBeginning(i,"day"),e=e&&B.correctDateWithUnitBeginning(e,"day")),k(e,t,i)===e},intervalsOverlap:function(e){const{firstMin:t,firstMax:i,secondMin:n,secondMax:o}=e;return t<=n&&n<=i||t>n&&t<o||t<o&&i>o},roundToHour:function(e){const t=new Date(e.getTime());return t.setHours(t.getHours()+1),t.setMinutes(0),t},normalizeDate:k,getViewMinBoundaryDate:function(e,t){const i=L(t.getFullYear(),t.getMonth(),1);return"month"===e?i:(i.setMonth(0),"year"===e||("decade"===e&&i.setFullYear(I(t)),"century"===e&&i.setFullYear(D(t))),i)},getViewMaxBoundaryDate:function(e,t){const i=new Date(t);return i.setDate(b(t)),"month"===e?i:(i.setMonth(11),i.setDate(b(i)),"year"===e||("decade"===e&&i.setFullYear(I(t)+9),"century"===e&&i.setFullYear(D(t)+99)),i)},fixTimezoneGap:M,getTimezonesDifference:R,makeDate:function(e){return new Date(e)},getDatesInterval:function(e,t,i){const n=t.getTime()-e.getTime(),o=(0,d.toMilliseconds)(i)||1;return Math.floor(n/o)},getDatesOfInterval:function(e,t,i){const n=[];let o=new Date(e.getTime());for(;o<t;)n.push(new Date(o.getTime())),o=this.addInterval(o,i);return n},createDateWithFullYear:L,getMachineTimezoneName:()=>"undefined"!=typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:null,getRangesByDates:e=>{const t=e.map((e=>m(e,"day").getTime())).sort(((e,t)=>e-t)),i=(0,d.toMilliseconds)("day"),n=[];let a=t[0];for(let e=1;e<=t.length;++e){const s=t[e];if(s-t[e-1]>i||e===t.length){const i=(a===t[e-1]?[a]:[a,t[e-1]]).map((e=>o.default.deserializeDate(e)));n.push(i),a=s}}return n}}},62897:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.dateSerialization=void 0;var n=r(i(81179)),o=i(86670),a=r(i(66636)),s=i(11528);function r(e){return e&&e.__esModule?e:{default:e}}const l="number",d="yyyy/MM/dd",u=/^(\d{4,})(-)?(\d{2})(-)?(\d{2})(?:T(\d{2})(:)?(\d{2})?(:)?(\d{2}(?:\.(\d{1,3})\d*)?)?)?(Z|([+-])(\d{2})(:)?(\d{2})?)?$/,c=/^(\d{2}):(\d{2})(:(\d{2}))?$/,h=["","yyyy","","MM","","dd","THH","","mm","","ss",".SSS"],p=/^(\d{4})\/(\d{2})\/(\d{2})$/,g=function(e,t){let i;return(0,s.isString)(e)&&!t&&(i=function(e){let t=e.match(u);if(!t)return t=e.match(c),t?new Date(0,0,0,_(t[1]),_(t[2]),_(t[4])):void 0;const i=_(t[1]),n=--t[3],o=t[5];let a=0,s=0;const r=e=>(i<100&&e.setFullYear(i),e);a=_(t[14]),s=_(t[16]),"-"===t[13]&&(a=-a,s=-s);const l=_(t[6])-a,d=_(t[8])-s,h=_(t[10]),p=(g=t[11],_(g=g||"")*10**(3-g.length));var g;if(t[12])return r(new Date(Date.UTC(i,n,o,l,d,h,p)));return r(new Date(i,n,o,l,d,h,p))}(e)),i||function(e){const t=f(e)===d,i=!(0,s.isDate)(e)&&Date.parse(e);if(!i&&t){const t=e.match(p);if(t){const e=new Date(_(t[1]),_(t[2]),_(t[3]));return e.setFullYear(_(t[1])),e.setMonth(_(t[2])-1),e.setDate(_(t[3])),e}}return(0,s.isNumeric)(i)?new Date(i):e}(e)};function _(e){return+e||0}const f=function(e){if("number"==typeof e)return l;if((0,s.isString)(e)){let t;return(0,a.default)().forceIsoDateParsing&&(t=function(e){let t=e.match(u),i="";if(!t)return t=e.match(c),t?t[3]?"HH:mm:ss":"HH:mm":void 0;for(let e=1;e<h.length;e++)t[e]&&(i+=h[e]||t[e]);return"Z"===t[12]&&(i+="'Z'"),t[14]&&(t[15]?i+="xxx":t[16]?i+="xx":i+="x"),i}(e)),t||(e.includes(":")?"yyyy/MM/dd HH:mm:ss":d)}return e?null:void 0};t.dateSerialization={dateParser:g,deserializeDate:function(e){return"number"==typeof e?new Date(e):g(e,!(0,a.default)().forceIsoDateParsing)},serializeDate:function(e,t){return t?(0,s.isDate)(e)?t===l?e&&e.valueOf?e.valueOf():null:(0,o.getFormatter)(t,n.default)(e):null:e},getDateSerializationFormat:f}},77117:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=function(){return new l},t.fromPromise=d,t.setStrategy=function(e){l=e.Deferred,u=e.when},t.when=function(){return u.apply(this,arguments)};var n,o=(n=i(84718))&&n.__esModule?n:{default:n},a=i(52576),s=i(11528);const r=[{method:"resolve",handler:"done",state:"resolved"},{method:"reject",handler:"fail",state:"rejected"},{method:"notify",handler:"progress"}];let l=function(){const e=this;this._state="pending",this._promise={},r.forEach(function(t){const i=t.method;this[`${i}Callbacks`]=(0,o.default)(),this[i]=function(){return this[`${i}With`](this._promise,arguments)}.bind(this),this._promise[t.handler]=function(t){if(!t)return this;const n=e[`${i}Callbacks`];return n.fired()?t.apply(e[`${i}Context`],e[`${i}Args`]):n.add((function(e,i){t.apply(e,i)})),this}}.bind(this)),this._promise.always=function(e){return this.done(e).fail(e)},this._promise.catch=function(e){return this.then(null,e)},this._promise.then=function(e,t){const i=new l;return["done","fail"].forEach(function(n){const o="done"===n?e:t;this[n]((function(){if(!o)return void i["done"===n?"resolve":"reject"].apply(this,arguments);const e=o&&o.apply(this,arguments);(0,s.isDeferred)(e)?e.done(i.resolve).fail(i.reject):(0,s.isPromise)(e)?e.then(i.resolve,i.reject):i.resolve.apply(this,(0,s.isDefined)(e)?[e]:arguments)}))}.bind(this)),i.promise()},this._promise.state=function(){return e._state},this._promise.promise=function(t){return t?(0,a.extend)(t,e._promise):e._promise},this._promise.promise(this)};function d(e,t){if((0,s.isDeferred)(e))return e;if((0,s.isPromise)(e)){const i=new l;return e.then((function(){i.resolveWith.apply(i,[t].concat([[].slice.call(arguments)]))}),(function(){i.rejectWith.apply(i,[t].concat([[].slice.call(arguments)]))})),i}return(new l).resolveWith(t,[e])}r.forEach((function(e){const t=e.method,{state:i}=e;l.prototype[`${t}With`]=function(e,n){const o=this[`${t}Callbacks`];return"pending"===this.state()&&(this[`${t}Args`]=n,this[`${t}Context`]=e,i&&(this._state=i),o.fire(e,n),"pending"!==i&&(this.resolveCallbacks.empty(),this.rejectCallbacks.empty())),this}}));let u=function(){if(1===arguments.length)return d(arguments[0]);const e=[].slice.call(arguments),t=[];let i=0;const n=new l,o=function(o){return function(a){t[o]=this,e[o]=arguments.length>1?[].slice.call(arguments):a,i++,i===e.length&&n.resolveWith(t,e)}};for(let t=0;t<e.length;t++)(0,s.isDeferred)(e[t])?e[t].promise().done(o(t)).fail(n.reject):i++;return i===e.length&&n.resolveWith(t,e),n.promise()}},62142:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.injector=function(e){const t=o.default.inherit(e);let i=t,n=new i(e);const l={},d=function(t,i){(0,s.each)(t,(function(t){(0,r.isFunction)(n[t])?!i&&e[t]||(e[t]=function(){return n[t].apply(e,arguments)}):(i&&(l[t]=e[t]),e[t]=n[t])}))};return d(e,!0),e.inject=function(e){i=i.inherit(e),n=new i,d(e)},e.resetInjection=function(){(0,a.extend)(e,l),i=t,n=new t},e};var n,o=(n=i(55620))&&n.__esModule?n:{default:n},a=i(52576),s=i(21274),r=i(11528)},76400:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.resetActiveElement=t.replaceWith=t.normalizeTemplateElement=t.isElementInDom=t.insertBefore=t.extractTemplateMarkup=t.default=t.createTextElementHiddenCopy=t.contains=t.closestCommonParent=t.clipboardText=t.clearSelection=void 0;var n=l(i(64960)),o=l(i(64553)),a=i(21274),s=i(11528),r=i(3104);function l(e){return e&&e.__esModule?e:{default:e}}const d=(0,r.getWindow)(),u=()=>{const e=n.default.getActiveElement();var t;e&&e!==n.default.getBody()&&(null===(t=e.blur)||void 0===t||t.call(e))};t.resetActiveElement=u;const c=()=>{const e=d.getSelection();if(e&&"Caret"!==e.type)if(e.empty)e.empty();else if(e.removeAllRanges)try{e.removeAllRanges()}catch(e){}};t.clearSelection=c;const h=(e,t)=>{const i=(0,o.default)(e),n=(0,o.default)(t);if(i[0]===n[0])return i[0];const a=i.parents(),s=n.parents();for(let e=-Math.min(a.length,s.length);e<0;e++)if(a.get(e)===s.get(e))return a.get(e)};t.closestCommonParent=h;const p=e=>{const t=(e=(0,o.default)(e)).length&&e.filter((function(){const e=(0,o.default)(this);return e.is("script[type]")&&!e.attr("type").includes("script")}));return t.length?t.eq(0).html():(e=(0,o.default)("<div>").append(e)).html()};t.extractTemplateMarkup=p;const g=e=>{let t=(0,s.isDefined)(e)&&(e.nodeType||(0,s.isRenderer)(e))?(0,o.default)(e):(0,o.default)("<div>").html(e).contents();return 1===t.length&&(t.is("script")?t=g(t.html().trim()):t.is("table")&&(t=t.children("tbody").contents())),t};t.normalizeTemplateElement=g;const _=(e,t)=>{const i=e.originalEvent&&e.originalEvent.clipboardData||d.clipboardData;if(!t)return i&&i.getData("Text");i&&i.setData("Text",t)};t.clipboardText=_;const f=(e,t)=>!!t&&((0,s.isWindow)(e)?f(e.document,t):e.contains(t)||f(e,(e=>{if(!e.getRootNode)return;const{host:t}=e.getRootNode();return(0,s.isString)(t)?void 0:t})(t)));t.contains=f;const m=(e,t,i)=>{const n=d.getComputedStyle((0,o.default)(e).get(0)),a=i&&i.includePaddings;return(0,o.default)("<div>").text(t).css({fontStyle:n.fontStyle,fontVariant:n.fontVariant,fontWeight:n.fontWeight,fontSize:n.fontSize,fontFamily:n.fontFamily,letterSpacing:n.letterSpacing,border:n.border,paddingTop:a?n.paddingTop:"",paddingRight:a?n.paddingRight:"",paddingBottom:a?n.paddingBottom:"",paddingLeft:a?n.paddingLeft:"",visibility:"hidden",whiteSpace:"pre",position:"absolute",float:"left"})};t.createTextElementHiddenCopy=m;const v=(e,t)=>(t&&n.default.insertElement(e.parentNode,t,e),e);t.insertBefore=v;const C=(e,t)=>{if(t&&t[0])return t.is(e)?e:((0,a.each)(t,((t,i)=>{v(e[0],i)})),e.remove(),t)};t.replaceWith=C;const y=e=>{const t=null==e?void 0:e.get(0),i=null==t?void 0:t.getRootNode().host;return!!(0,o.default)(i||t).closest((0,r.getWindow)().document).length};t.isElementInDom=y;t.default={resetActiveElement:u,clearSelection:c,closestCommonParent:h,extractTemplateMarkup:p,normalizeTemplateElement:g,clipboardText:_,contains:f,createTextElementHiddenCopy:m,insertBefore:v,replaceWith:C,isElementInDom:y}},40818:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.error=d;var n,o=i(52576),a=i(54497),s=i(1956),r=(n=i(35005))&&n.__esModule?n:{default:n};const l=`https://js.devexpress.com/error/${s.version.split(".").slice(0,2).join("_")}/`;function d(e,t){const i={ERROR_MESSAGES:(0,o.extend)(t,e),Error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e){const t=e[0];e=e.slice(1);const i=n(t,e),a=d(t),r=s(t,i);return(0,o.extend)(new Error(r),{__id:t,__details:i,url:a})}(t)},log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const o=t[0];let a="log";/^E\d+$/.test(o)?a="error":/^W\d+$/.test(o)&&(a="warn"),r.default.logger[a]("log"===a?o:function(e){const t=e[0];return e=e.slice(1),s(t,n(t,e))}(t))}};function n(e,t){return t=[i.ERROR_MESSAGES[e]].concat(t),a.format.apply(this,t).replace(/\.*\s*?$/,"")}function s(e,t){const i=null!=e&&e.startsWith("W")?"warning":"error";return a.format.apply(this,["{0} - {1}.\n\nFor additional information on this {2} message, see: {3}",e,t,i,d(e)])}function d(e){return l+e}return i}t.default=d},96298:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.extendFromObject=t.extend=void 0;var n=i(11528);t.extendFromObject=function(e,t,i){e=e||{};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const o=t[n];n in e&&!i||(e[n]=o)}return e};const o=function(e){let t=1,i=!1;for("boolean"==typeof(e=e||{})&&(i=e,e=arguments[1]||{},t++);t<arguments.length;t++){const a=arguments[t];if(null!=a)for(const t in a){const s=e[t],r=a[t];let l,d=!1;"__proto__"!==t&&"constructor"!==t&&e!==r&&(i&&r&&((0,n.isPlainObject)(r)||(d=Array.isArray(r)))?(l=d?s&&Array.isArray(s)?s:[]:s&&(0,n.isPlainObject)(s)?s:{},e[t]=o(i,l,r)):void 0!==r&&(e[t]=r))}}return e};t.extend=o},25317:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseHTML=t.isTablePart=void 0;var n,o=(n=i(64960))&&n.__esModule?n:{default:n};const a=/<([a-z][^/\0>\x20\t\r\n\f]+)/i,s={default:{tagsCount:0,startTags:"",endTags:""},thead:{tagsCount:1,startTags:"<table>",endTags:"</table>"},td:{tagsCount:3,startTags:"<table><tbody><tr>",endTags:"</tr></tbody></table>"},col:{tagsCount:2,startTags:"<table><colgroup>",endTags:"</colgroup></table>"},tr:{tagsCount:2,startTags:"<table><tbody>",endTags:"</tbody></table>"}};s.tbody=s.colgroup=s.caption=s.tfoot=s.thead,s.th=s.td;t.parseHTML=function(e){if("string"!=typeof e)return null;let t=o.default.createDocumentFragment().appendChild(o.default.createElement("div"));const i=a.exec(e),n=null==i?void 0:i[1].toLowerCase(),r=s[n]||s.default;t.innerHTML=r.startTags+e+r.endTags;for(let e=0;e<r.tagsCount;e++)t=t.lastChild;return[...t.childNodes]};t.isTablePart=function(e){const t=a.exec(e);return t&&t[1]in s}},42463:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getImageSourceType=t.getImageContainer=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n};const a="dx-icon",s=e=>!(!e||"string"!=typeof e)&&(/^\s*<svg[^>]*>(.|\r?\n)*?<\/svg>\s*$/i.test(e)?"svg":/data:.*base64|\.|[^<\s]\/{1,1}/.test(e)?"image":/^[\w-_]+$/.test(e)?"dxIcon":!!/^\s?([\w-_:]\s?)+$/.test(e)&&"fontIcon");t.getImageSourceType=s;t.getImageContainer=e=>{switch(s(e)){case"image":return(0,o.default)("<img>").attr("src",e).addClass(a);case"fontIcon":return(0,o.default)("<i>").addClass(`${a} ${e}`);case"dxIcon":return(0,o.default)("<i>").addClass(`${a} ${a}-${e}`);case"svg":return(0,o.default)("<i>").addClass(`${a} dx-svg-icon`).append(e);default:return null}}},66122:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.underscore=t.titleize=t.humanize=t.default=t.dasherize=t.captionize=t.camelize=void 0;var n=i(21274);const o=function(e){return null==e?"":String(e)},a=function(e){return o(e).charAt(0).toUpperCase()+e.substr(1)},s=function(e){return o(e).replace(/([a-z\d])([A-Z])/g,"$1 $2").split(/[\s_-]+/)},r=function(e){return(0,n.map)(s(e),(function(e){return e.toLowerCase()})).join("-")};t.dasherize=r;const l=function(e){return r(e).replace(/-/g,"_")};t.underscore=l;const d=function(e,t){return(0,n.map)(s(e),(function(e,i){return e=e.toLowerCase(),(t||i>0)&&(e=a(e)),e})).join("")};t.camelize=d;const u=function(e){return a(r(e).replace(/-/g," "))};t.humanize=u;const c=function(e){return(0,n.map)(s(e),(function(e){return a(e.toLowerCase())})).join(" ")};t.titleize=c;const h=["0","1","2","3","4","5","6","7","8","9"],p=function(e){const t=[];let i,n,o=!1,a=!1;for(i=0;i<e.length;i++)n=e.charAt(i),a=n===n.toUpperCase()&&"-"!==n&&")"!==n&&"/"!==n||n in h,"_"===n||"."===n?(n=" ",a=!0):0===i?(n=n.toUpperCase(),a=!0):!o&&a&&t.length>0&&t.push(" "),t.push(n),o=a;return t.join("")};t.captionize=p;t.default={dasherize:r,underscore:l,camelize:d,humanize:u,titleize:c,captionize:p}},26044:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.reverseEach=t.map=t.each=void 0;t.map=(e,t)=>{if(Array.isArray(e))return e.map(t);const i=[];for(const n in e)i.push(t(e[n],n));return i};t.each=(e,t)=>{if(e){if("length"in e)for(let i=0;i<e.length&&!1!==t.call(e[i],i,e[i]);i++);else for(const i in e)if(!1===t.call(e[i],i,e[i]))break;return e}};t.reverseEach=(e,t)=>{if(e&&"length"in e&&0!==e.length)for(let i=e.length-1;i>=0&&!1!==t.call(e[i],i,e[i]);i--);}},24574:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Locker=void 0;var n,o=(n=i(87129))&&n.__esModule?n:{default:n};t.Locker=function(){const e={},t=function(t){return e[t]||0};return{obtain(i){e[i]=t(i)+1},release(i){const n=t(i);if(n<1)throw o.default.Error("E0014");1===n?delete e[i]:e[i]=n-1},locked:e=>t(e)>0}}},80764:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.adjust=function(e,t){let i=a(t||0)+2;const s=e.toString().split("."),r=e,l=Math.abs(e);let d;const u=(0,n.isExponential)(e),c=l>1?10:0;if(1===s.length)return e;u||((0,n.isExponential)(t)&&(i=s[0].length+o(t)),e=(e=l)-Math.floor(e)+c);if(i=function(){return"0.000300"!==3e-4.toPrecision(3)}()&&o(e)>6||i>7?15:7,!u&&(d=parseFloat(e.toPrecision(i)).toString().split("."),d[0]===c.toString()))return parseFloat(`${s[0]}.${d[1]}`);return parseFloat(r.toPrecision(i))},t.fitIntoRange=void 0,t.getExponent=o,t.getExponentLength=function(e){var t;const i=e.toString();return(null===(t=i.split(".")[1])||void 0===t?void 0:t.length)||parseInt(i.split("e-")[1],10)||0},t.getPrecision=a,t.getRemainderByDivision=function(e,t,i){if(t===parseInt(t,10))return e%t;const n=r(e/t,i);return(n-parseInt(n,10))*t},t.getRoot=s,t.inRange=void 0,t.multiplyInExponentialForm=function(e,t){const i=function(e){const t=e.toExponential().split("e"),i=parseFloat(t[0]);return{exponent:parseInt(t[1],10),mantissa:i}}(e);return parseFloat(`${i.mantissa}e${i.exponent+t}`)},t.roundFloatPart=r,t.sign=void 0,t.solveCubicEquation=function(e,t,i,n){const o=1e-8;if(Math.abs(e)<o){if(e=t,t=i,i=n,Math.abs(e)<o)return e=t,t=i,Math.abs(e)<o?[]:[-t/e];const a=t*t-4*e*i;return Math.abs(a)<o?[-t/(2*e)]:a>0?[(-t+Math.sqrt(a))/(2*e),(-t-Math.sqrt(a))/(2*e)]:[]}const a=(3*e*i-t*t)/(3*e*e),r=(2*t*t*t-9*e*t*i+27*e*e*n)/(27*e*e*e);let l,d;if(Math.abs(a)<o)l=[s(-r,3)];else if(Math.abs(r)<o)l=[0].concat(a<0?[Math.sqrt(-a),-Math.sqrt(-a)]:[]);else{const e=r*r/4+a*a*a/27;if(Math.abs(e)<o)l=[-1.5*r/a,3*r/a];else if(e>0)d=s(-r/2-Math.sqrt(e),3),l=[d-a/(3*d)];else{d=2*Math.sqrt(-a/3);const e=Math.acos(3*r/a/d)/3,t=2*Math.PI/3;l=[d*Math.cos(e),d*Math.cos(e-t),d*Math.cos(e-2*t)]}}for(let i=0;i<l.length;i++)l[i]-=t/(3*e);return l},t.trunc=function(e){return Math.trunc?Math.trunc(e):e>0?Math.floor(e):Math.ceil(e)};var n=i(11528);t.sign=function(e){return 0===e?0:e/Math.abs(e)};t.fitIntoRange=function(e,t,i){const n=!t&&0!==t,o=!i&&0!==i;return n&&(t=o?e:Math.min(e,i)),o&&(i=n?e:Math.max(e,t)),Math.min(Math.max(e,t),i)};function o(e){return Math.abs(parseInt(e.toExponential().split("e")[1],10))}function a(e){const t=e.toString();if(t.indexOf(".")<0)return 0;const i=t.split("."),n=i[1].indexOf("e");return n>=0?n:i[1].length}function s(e,t){if(e<0&&t%2!=1)return NaN;const i=Math.abs(e)**(1/t);return t%2==1&&e<0?-i:i}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(e.toFixed(t))}t.inRange=function(e,t,i){return e>=t&&e<=i}},86005:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.orderEach=t.newAssign=t.legacyAssign=t.deepExtendArraySafe=t.clone=void 0;var n,o=i(11528),a=(n=i(40216))&&n.__esModule?n:{default:n};t.clone=function(){function e(){}return function(t){return e.prototype=t,new e}}();t.orderEach=function(e,t){const i=[];let n,a;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.push(n);for(i.sort((function(e,t){const i=(0,o.isNumeric)(e),n=(0,o.isNumeric)(t);return i&&n?e-t:i&&!n?-1:!i&&n?1:e<t?-1:e>t?1:0})),a=0;a<i.length;a++)n=i[a],t(n,e[n])};const s=e=>(0,o.isObject)(e)?Array.isArray(e)?[]:{}:e,r=function(e,t,i,n,o,s){!o&&a.default.isWrapped(e[t])?a.default.assign(e[t],i):e[t]=i};t.legacyAssign=r;const l=function(e,t,i,n,r,u){const c=n?(0,o.isObject)(e):(0,o.isPlainObject)(e);!r&&a.default.isWrapped(e[t])?a.default.assign(e[t],i):!r&&Array.isArray(i)?e[t]=i.map((e=>d(s(e),e,n,r,u))):e[t]=!r&&c?d(s(i),i,n,r,u,l):i};t.newAssign=l;const d=function(e,t,i,n,a,s){let u,c;const h=s?l:r;for(const s in t){if(u=e[s],c=t[s],"__proto__"===s||"constructor"===s||e===c)continue;if((0,o.isPlainObject)(c)){const e=i?(0,o.isObject)(u):(0,o.isPlainObject)(u);c=d(e?u:{},c,i,n,a)}(Array.isArray(c)&&!n||((a||void 0!==c)&&u!==c||a&&void 0===u))&&h(e,s,c,i,n,a)}return e};t.deepExtendArraySafe=d},80125:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultAlignment=t.getBoundingRect=void 0;var n,o=(n=i(66636))&&n.__esModule?n:{default:n},a=i(11528);t.getDefaultAlignment=e=>e??(0,o.default)().rtlEnabled?"right":"left";t.getBoundingRect=e=>{var t;return(0,a.isWindow)(e)?{width:e.outerWidth,height:e.outerHeight}:null===(t=e.getBoundingClientRect)||void 0===t?void 0:t.call(e)}},871:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.attachInstanceToElement=function(e,t,i){const n=(0,s.data)(e.get(0)),r=c(t.constructor);n[r]=t,i&&o.default.one(e,a.removeEvent,(function(){i.call(t)}));n[l]||(n[l]=[]);n[l].push(r)},t.default=void 0,t.getInstanceByElement=function(e,t){const i=c(t);return(0,s.data)(e.get(0),i)},t.name=void 0;var n,o=(n=i(92774))&&n.__esModule?n:{default:n},a=i(28630),s=i(74663),r=i(11528);const l="dxComponents",d=new WeakMap;let u=0;const c=function(e,t){if(!(0,r.isDefined)(t)){if(!d.has(e)){const t="dxPrivateComponent"+u++;return d.set(e,t),t}return d.get(e)}d.set(e,t)};t.name=c;t.default={name:c}},52799:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.create=s,t.enqueue=void 0;var n,o=(n=i(87129))&&n.__esModule?n:{default:n},a=i(87739);function s(e){let t=[],i=!1;function n(){for(;t.length;){i=!0;const e=t.shift()();if(void 0!==e){if(e.then)return void(0,a.when)(e).always(n);throw o.default.Error("E0015")}}i=!1}return{add:function(o,a){e?(t[0]&&a&&a(t[0]),t=[o]):t.push(o),i||n()},busy:function(){return i}}}t.enqueue=s().add},18344:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.readyCallbacksModule=t.default=void 0;var n=r(i(64960)),o=r(i(13630)),a=r(i(89656)),s=i(3104);function r(e){return e&&e.__esModule?e:{default:e}}let l=[];const d=(0,o.default)((()=>{const e=n.default.listen(n.default.getDocument(),"DOMContentLoaded",(()=>{u.fire(),e()}))})),u={add:e=>{const t=(0,s.hasWindow)();t&&"loading"!==n.default.getReadyState()?e():(l.push(e),t&&d())},fire:()=>{l.forEach((e=>e())),l=[]}},c=t.readyCallbacksModule=(0,a.default)(u);t.default=c},33717:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.resizeCallbacks=t.default=void 0;var n=l(i(64960)),o=l(i(13630)),a=l(i(63172)),s=l(i(18344)),r=l(i(14470));function l(e){return e&&e.__esModule?e:{default:e}}const d=t.resizeCallbacks=function(){let e;const t=(0,a.default)(),i=t.add,l=t.remove;if(!r.default.hasWindow())return t;const d=function(){const e=r.default.getWindow();return{width:e.innerWidth,height:e.innerHeight}},u=function(){const i=d();if(i.width===e.width&&i.height===e.height)return;let n;i.width===e.width&&(n="height"),i.height===e.height&&(n="width"),e=i,t.fire(n)},c=(0,o.default)((function(){e=d()}));let h;return t.add=function(){const e=i.apply(t,arguments);return c(),s.default.add((function(){!h&&t.has()&&(h=n.default.listen(r.default.getWindow(),"resize",u))})),e},t.remove=function(){const e=l.apply(t,arguments);return!t.has()&&h&&(h(),h=void 0),e},t}();t.default=d},67135:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionFilterCreator=void 0;var n=i(17781),o=i(31e3),a=i(11528);t.SelectionFilterCreator=function(e,t){let i;this.getLocalFilter=function(e,t,i,o){return t=void 0===t?n.equalByValue:t,l.bind(this,t,e,i,o)},this.getExpr=function(i){if(!i)return;let n;return e.forEach((function(e,s){let r;n=n||[],s>0&&n.push(t?"and":"or"),r=(0,a.isString)(i)?d(i,e):function(e,i){const n=[];for(let a=0,{length:s}=e;a<s;a++){const s=e[a],r=(0,o.compileGetter)(s),l=d(s,i&&r(i));if(!l)break;a>0&&n.push(t?"or":"and"),n.push(l)}return n}(i,e),n.push(r)})),n&&1===n.length&&(n=n[0]),n},this.getCombinedFilter=function(e,i){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=this.getExpr(e);let a=o;return(n||t)&&i&&(o?(a=[],a.push(o),a.push(i)):a=i),a};const s=function(t,o){if(!i){i={};const a=r(e,t,o);for(let e=0;e<a.length;e++)i[(0,n.getKeyHash)(a[e])]=!0}return i},r=function(e,t,i){return Array.isArray(i)?e.map((e=>t(e))):e};function l(i,o,r,l,d){const u=o(d);let c,h;if(!r&&(c=(0,n.getKeyHash)(u),!(0,a.isObject)(c))){return s(o,l)[c]?!t:!!t}for(h=0;h<e.length;h++)if(i(e[h],u))return!t;return!!t}function d(e,i){if(void 0!==i)return[e,t?"<>":"=",i]}}},17113:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.addShadowDomStyles=function(e){var t;const i=e.get(0),s=null===(t=i.getRootNode)||void 0===t?void 0:t.call(i);if(null==s||!s.host)return;n||(n=o(s),a(n,i.ownerDocument.styleSheets,!1));const r=o(s);a(r,s.styleSheets,!0),s.adoptedStyleSheets=[n,r]},t.getShadowElementsFromPoint=function(e,t,i){const n=function(){let e=0;const t=[];return{push(e){return t.push(e),this},shift:()=>(e++,t[e-1]),get length(){return t.length-e},get items(){return t}}}().push(i);for(;n.length;){const i=n.shift();for(let o=0;o<i.childNodes.length;o++){const a=i.childNodes[o];a.nodeType===Node.ELEMENT_NODE&&r(a,e,t)&&"none"!==getComputedStyle(a).pointerEvents&&n.push(a)}}const o=n.items.reverse();return o.pop(),o};const i="dx-";let n=null;function o(e){try{return new CSSStyleSheet}catch(t){const i=e.ownerDocument.createElement("style");return e.appendChild(i),i.sheet}}function a(e,t,i){for(let n=0;n<t.length;n++){const o=t[n];try{for(let t=0;t<o.cssRules.length;t++)s(e,o.cssRules[t],i)}catch(e){}}}function s(e,t,n){var o,a,s,r;(n||(null===(o=t.selectorText)||void 0===o?void 0:o.includes(i))||(null===(a=t.cssRules)||void 0===a||null===(a=a[0])||void 0===a||null===(a=a.selectorText)||void 0===a?void 0:a.includes(i))||(null===(s=t.name)||void 0===s?void 0:s.startsWith(i))||"DXIcons"===(null===(r=t.style)||void 0===r?void 0:r.fontFamily))&&e.insertRule(t.cssText,e.cssRules.length)}function r(e,t,i){var n;const o=null===(n=e.getBoundingClientRect)||void 0===n?void 0:n.call(e);return o&&t>=o.left&&t<o.right&&i>=o.top&&i<o.bottom}},64587:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setWidth=t.setOuterWidth=t.setOuterHeight=t.setInnerWidth=t.setInnerHeight=t.setHeight=t.parseHeight=t.implementationsMap=t.getWindowByElement=t.getWidth=t.getVisibleHeight=t.getVerticalOffsets=t.getSize=t.getOuterWidth=t.getOuterHeight=t.getOffset=t.getInnerWidth=t.getInnerHeight=t.getHeight=t.getElementBoxParams=t.addOffsetToMinHeight=t.addOffsetToMaxHeight=void 0;var n,o=(n=i(64960))&&n.__esModule?n:{default:n},a=i(11528);const s=(0,i(3104).getWindow)(),r=["auto","none","inherit","initial"],l=function(e,t){let i=0;return t.forEach((function(t){i+=parseFloat(e[t])||0})),i},d=function(e,t){const i="width"===e?"Left":"Top",n="width"===e?"Right":"Bottom";return{padding:l(t,[`padding${i}`,`padding${n}`]),border:l(t,[`border${i}Width`,`border${n}Width`]),margin:l(t,[`margin${i}`,`margin${n}`])}};t.getElementBoxParams=d;const u=function(e){var t;const i=(null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView)||s;return i.getComputedStyle&&i.getComputedStyle(e)},c=function(e,t,i,n){var o;return(null==t?void 0:t[i])||(null===(o=e.style)||void 0===o?void 0:o[i])||n},h={content:0,padding:1,border:2,margin:3,"content-box":0,"border-box":2},p={width:["left","right"],height:["top","bottom"]};function g(e,t,i,n){const o=(e,t,i)=>parseFloat(c(e,t,i,"0"))||0,a="border"===i?"-width":"";return o(e,n,`${i}-${p[t][0]}${a}`)+o(e,n,`${i}-${p[t][1]}${a}`)}const _=function(e,t,i){const n="width"===t?"offsetWidth":"offsetHeight",o=u(e);let a=c(e,o,t);""!==a&&"auto"!==a||(a=e[n]),a=parseFloat(a)||0;const s=c(e,o,"boxSizing","content-box");let r=h[i||s],l=h[s];if(void 0===r||void 0===l)throw new Error;if(l===r)return a;const d=Math.sign(r-l);let p=!1,_=!1,f=!1,m=!1;1===d&&(r+=1,l+=1);for(let i=l;i!==r;i+=d)switch(i){case h.content:break;case h.padding:p=d*g(e,t,"padding",o);break;case h.border:_=d*g(e,t,"border",o);break;case h.margin:f=d*g(e,t,"margin",o)}if(p||_){const i=(!1===p?d*g(e,t,"padding",o):p)+(!1===_?d*g(e,t,"border",o):_);m=d*Math.max(0,Math.floor(e[n]-a-d*i))||0}return a+f+p+_+m};t.getSize=_;const f=function(e,t,i){return e.indexOf("px")>0?e=parseInt(e.replace("px","")):e.indexOf("%")>0?e=parseInt(e.replace("%",""))*function(e){return(0,a.isWindow)(e)?e.innerHeight:e.offsetHeight}(t)/100:isNaN(e)?e.indexOf("vh")>0?e=s.innerHeight/100*parseInt(e.replace("vh","")):i&&e.indexOf("em")>0&&(e=parseFloat(e.replace("em",""))*parseFloat(s.getComputedStyle(i).fontSize)):e=parseInt(e),e};t.parseHeight=f;const m=function(e,t,i){if(!e)return null;if(r.includes(e))return t?null:e;if((0,a.isString)(e)&&(e=f(e,i)),(0,a.isNumeric)(e))return Math.max(0,e+t);return`calc(${e}${t<0?" - ":" "}${Math.abs(t)}px)`};t.addOffsetToMaxHeight=function(e,t,i){const n=m(e,t,i);return null!==n?n:"none"};t.addOffsetToMinHeight=function(e,t,i){const n=m(e,t,i);return null!==n?n:0};t.getVerticalOffsets=function(e,t){if(!e)return 0;const i=d("height",s.getComputedStyle(e));return i.padding+i.border+(t?i.margin:0)};t.getVisibleHeight=function(e){if(e){var t;const i=null===(t=e.getBoundingClientRect)||void 0===t?void 0:t.call(e);if(null!=i&&i.height)return i.height}return 0};const v=t.implementationsMap={getWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("width",...t)},setWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("width",...t)},getHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("height",...t)},setHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("height",...t)},getOuterWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("outerWidth",...t)},setOuterWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("outerWidth",...t)},getOuterHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("outerHeight",...t)},setOuterHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("outerHeight",...t)},getInnerWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("innerWidth",...t)},setInnerWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("innerWidth",...t)},getInnerHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("innerHeight",...t)},setInnerHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return C("innerHeight",...t)}};function C(e,t,i){return 2===arguments.length?y(t,e):y(t,e,i)}t.getWidth=e=>v.getWidth(e);t.setWidth=(e,t)=>v.setWidth(e,t);t.getHeight=e=>v.getHeight(e);t.setHeight=(e,t)=>v.setHeight(e,t);t.getOuterWidth=(e,t)=>v.getOuterWidth(e,t||!1);t.setOuterWidth=(e,t)=>v.setOuterWidth(e,t);t.getOuterHeight=(e,t)=>v.getOuterHeight(e,t||!1);t.setOuterHeight=(e,t)=>v.setOuterHeight(e,t);t.getInnerWidth=e=>v.getInnerWidth(e);t.setInnerWidth=(e,t)=>v.setInnerWidth(e,t);t.getInnerHeight=e=>v.getInnerHeight(e);t.setInnerHeight=(e,t)=>v.setInnerHeight(e,t);const y=function(e,t,i){const n=t.toLowerCase().indexOf("width")>=0?"Width":"Height",s=n.toLowerCase(),r=0===t.indexOf("outer"),l=0===t.indexOf("inner"),c=2===arguments.length||"boolean"==typeof i;if((0,a.isRenderer)(e)){if(e.length>1&&!c){for(let n=0;n<e.length;n++)y(e[n],t,i);return}e=e[0]}if(e){if((0,a.isWindow)(e))return r?e[`inner${n}`]:o.default.getDocumentElement()[`client${n}`];if(o.default.isDocument(e)){const e=o.default.getDocumentElement(),t=o.default.getBody();return Math.max(t[`scroll${n}`],t[`offset${n}`],e[`scroll${n}`],e[`offset${n}`],e[`client${n}`])}if(c){let t="content";return r&&(t=i?"margin":"border"),l&&(t="padding"),_(e,s,t)}if((0,a.isNumeric)(i)){const t=u(e),n=d(s,t),o="border-box"===t.boxSizing;i=Number(i),r?i-=o?0:n.border+n.padding:l?i+=o?n.border:-n.padding:o&&(i+=n.border+n.padding)}return i+=(0,a.isNumeric)(i)?"px":"",o.default.setStyle(e,s,i),null}},b=e=>(0,a.isWindow)(e)?e:e.defaultView;t.getWindowByElement=b;t.getOffset=e=>{if(!e.getClientRects().length)return{top:0,left:0};const t=e.getBoundingClientRect(),i=b(e.ownerDocument),n=e.ownerDocument.documentElement;return{top:t.top+i.pageYOffset-n.clientTop,left:t.left+i.pageXOffset-n.clientLeft}}},47865:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.sessionStorage=void 0;const n=(0,i(3104).getWindow)();t.sessionStorage=function(){let e;try{e=n.sessionStorage}catch(e){}return e}},32527:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeHtml=void 0,t.format=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];if((0,n.isFunction)(e))return e(...i);return i.forEach(((t,i)=>{(0,n.isString)(t)&&(t=t.replace(/\$/g,"$$$$"));const o=new RegExp(`\\{${i}\\}`,"gm");e=e.replace(o,t)})),e},t.quadToObject=t.isEmpty=void 0;var n=i(11528);t.encodeHtml=function(){const e=[new RegExp("&","g"),new RegExp('"',"g"),new RegExp("'","g"),new RegExp("<","g"),new RegExp(">","g")];return function(t){return String(t).replace(e[0],"&amp;").replace(e[1],"&quot;").replace(e[2],"&#39;").replace(e[3],"&lt;").replace(e[4],"&gt;")}}();t.quadToObject=function(e){const t=function(e){switch(typeof e){case"string":return e.split(/\s+/,4);case"object":return[e.x||e.h||e.left,e.y||e.v||e.top,e.x||e.h||e.right,e.y||e.v||e.bottom];case"number":return[e];default:return e}}(e);let i=parseInt(t&&t[0],10),n=parseInt(t&&t[1],10),o=parseInt(t&&t[2],10),a=parseInt(t&&t[3],10);return isFinite(i)||(i=0),isFinite(n)||(n=i),isFinite(o)||(o=i),isFinite(a)||(a=n),{top:n,right:o,bottom:a,left:i}};t.isEmpty=function(){const e=/\s/g;return function(t){return!t||!t.replace(e,"")}}()},47453:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.stubComponent=function(e){return class{constructor(){throw new Error(`Module '${e}' not found`)}static getInstance(){}}}},11953:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.stylePropPrefix=t.styleProp=t.setWidth=t.setStyle=t.setHeight=t.parsePixelValue=t.normalizeStyleProp=void 0;var n=r(i(64960)),o=r(i(13630)),a=i(53124),s=i(11528);function r(e){return e&&e.__esModule?e:{default:e}}const l=["","Webkit","Moz","O","Ms"],d={"":"",Webkit:"-webkit-",Moz:"-moz-",O:"-o-",ms:"-ms-"},u=(0,o.default)((function(){return n.default.createElement("dx").style}));t.styleProp=function(e){if(e in u())return e;const t=e;e=e.charAt(0).toUpperCase()+e.substr(1);for(let t=1;t<l.length;t++){const i=l[t].toLowerCase()+e;if(i in u())return i}return t};t.stylePropPrefix=function(e){return function(e,t){let i;e=(0,a.camelize)(e,!0);for(let n=0,o=l.length;n<o;n++){const o=l[n],s=o+e;if(i=t((0,a.camelize)(s),o),void 0===i&&(i=t(s,o)),void 0!==i)break}return i||""}(e,(function(e,t){if(e in u())return d[t]}))};const c=["fillOpacity","columnCount","flexGrow","flexShrink","fontWeight","lineHeight","opacity","zIndex","zoom"];t.parsePixelValue=function(e){return(0,s.isNumeric)(e)?e:(0,s.isString)(e)?Number(e.replace("px","")):NaN};t.normalizeStyleProp=function(e,t){return(0,s.isNumeric)(t)&&!c.includes(e)&&(t+="px"),t};const h=function(e,t,i){if(e){i=(0,s.isNumeric)(i)?i+="px":i;for(let n=0;n<e.length;++n)e[n].style[t]=i}};t.setWidth=function(e,t){h(e,"width",t)};t.setHeight=function(e,t){h(e,"height",t)};t.setStyle=function(e,t){if(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]){[].slice.call(e.style).forEach((t=>{e.style.removeProperty(t)}))}t.split(";").forEach((t=>{const i=t.split(":").map((e=>e.trim()));if(2===i.length){const[t,n]=i;e.style[t]=n}}))}},85991:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.pointerEvents=t.nativeScrolling=t.inputType=t.default=t.animation=void 0,Object.defineProperty(t,"styleProp",{enumerable:!0,get:function(){return s.styleProp}}),Object.defineProperty(t,"stylePropPrefix",{enumerable:!0,get:function(){return s.stylePropPrefix}}),t.transitionEndEventName=t.transition=t.touchEvents=t.touch=t.supportProp=void 0;var n=l(i(44257)),o=l(i(64960)),a=l(i(13630)),s=i(58515),r=i(3104);function l(e){return e&&e.__esModule?e:{default:e}}const{maxTouchPoints:d}=(0,r.getNavigator)(),u={webkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},c=function(e){return!!(0,s.styleProp)(e)};t.supportProp=c;const h=function(e){if("text"===e)return!0;const t=o.default.createElement("input");try{return t.setAttribute("type",e),t.value="wrongValue",!t.value}catch(e){return!1}};t.inputType=h;const p=t.touchEvents=function(e,t){return(e("ontouchstart")||!!t)&&!e("callPhantom")}(r.hasProperty,d),g=t.pointerEvents=(0,r.hasProperty)("PointerEvent");const _=!!d,f=t.touch=p||g&&_,m=t.transition=(0,a.default)((function(){return c("transition")})),v=t.transitionEndEventName=(0,a.default)((function(){return u[(0,s.styleProp)("transition")]})),C=t.animation=(0,a.default)((function(){return c("animation")})),y=t.nativeScrolling=function(){const{platform:e,mac:t}=n.default.real();return"ios"===e||"android"===e||t}();t.default={animation:C,inputType:h,nativeScrolling:y,pointerEvents:g,styleProp:s.styleProp,stylePropPrefix:s.stylePropPrefix,supportProp:c,touch:f,touchEvents:p,transition:m,transitionEndEventName:v}},89650:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.HIDDEN_FOR_EXPORT=void 0,t.getSvgElement=u,t.getSvgMarkup=d;var n=s(i(64960)),o=s(i(64553)),a=i(11528);function s(e){return e&&e.__esModule?e:{default:e}}const r=(0,i(3104).getWindow)();const l=t.HIDDEN_FOR_EXPORT="hidden-for-export";function d(e,t){return function(e){let t=!0;return-1===e.indexOf("xmlns:xlink")&&(e=e.replace("<svg",'<svg xmlns:xlink="http://www.w3.org/1999/xlink"')),(e=e.replace(/xmlns="[\s\S]*?"/gi,(function(e){return t?(t=!1,e):""}))).replace(/xmlns:NS1="[\s\S]*?"/gi,"").replace(/NS1:xmlns:xlink="([\s\S]*?)"/gi,'xmlns:xlink="$1"')}((i=function(e,t){const i=n.default.createElement("div"),a=e.cloneNode(!0);return t&&(0,o.default)(a).css("backgroundColor",t),i.appendChild(a),i.innerHTML}(e,t),i.replace(/&quot;/gi,"&#34;").replace(/&amp;/gi,"&#38;").replace(/&apos;/gi,"&#39;").replace(/&lt;/gi,"&#60;").replace(/&gt;/gi,"&#62;").replace(/&nbsp;/gi,"&#160;").replace(/&shy;/gi,"&#173;")));var i}function u(e){if((0,a.isString)(e)){return(new r.DOMParser).parseFromString(e,"image/svg+xml").childNodes[0]}return n.default.isNode(e)?e:(0,a.isRenderer)(e)?e.get(0):void 0}t.default={getSvgElement:u,getSvgMarkup:d,HIDDEN_FOR_EXPORT:l}},91008:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTemplateSource=t.templateKey=t.suitableTemplatesByName=t.getNormalizedTemplateArgs=t.findTemplates=t.defaultCreateElement=t.default=t.addPublicElementNormalization=t.addOneRenderedCall=t.acquireTemplate=t.acquireIntegrationTemplate=void 0;var n=m(i(66636)),o=m(i(65951)),a=i(61404),s=m(i(87129)),r=m(i(64553)),l=i(91585),d=i(48650),u=i(67872),c=i(42186),h=i(94487),p=i(17781),g=i(52576),_=m(i(76400)),f=m(i(39918));function m(e){return e&&e.__esModule?e:{default:e}}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},v.apply(null,arguments)}const C=(e,t)=>{const i="data-options",o=(0,r.default)(e).contents().filter(`[${i}*="${t}"]`);return[].slice.call(o).map((e=>{const o=(0,r.default)(e).attr(i)||"";return{element:e,options:(0,n.default)().optionsParser(o)[t]}})).filter((e=>!!e.options))};t.findTemplates=C;const y=e=>{const t=(0,h.groupBy)(e,(e=>e.options.name));if(t.undefined)throw s.default.Error("E0023");const i={};return Object.keys(t).forEach((e=>{var n;const a=null===(n=(0,p.findBestMatches)(o.default.current(),t[e],(e=>e.options))[0])||void 0===n?void 0:n.element;a&&(i[e]=a)})),i};t.suitableTemplatesByName=y;const b=e=>{const t=e.render.bind(e);return(0,g.extend)({},e,{render(e){const i=t(e);return e&&e.onRendered&&e.onRendered(),i}})};t.addOneRenderedCall=b;const x=e=>{const t=e.render.bind(e);return(0,g.extend)({},e,{render(e){const i=(0,r.default)(e.container);return t(v({},e,{container:(0,a.getPublicElement)(i)}))}})};t.addPublicElementNormalization=x;const w=e=>{const t=[];return"model"in e&&t.push(e.model),"index"in e&&t.push(e.index),t.push(e.container),t};t.getNormalizedTemplateArgs=w;const S=e=>"string"==typeof e?_.default.normalizeTemplateElement(e):e;t.validateTemplateSource=S;const D=e=>f.default.isRenderer(e)&&e[0]||e;t.templateKey=D;const I=e=>new u.Template(e);t.defaultCreateElement=I;const E=(e,t,i,n)=>{let o=null;return n&&-1!==n.indexOf(e)||(o=t[e],!o||o instanceof c.TemplateBase||(f.default.isFunction(o.render)&&(o=x(o)),i||(o=b(o)))),o};t.acquireIntegrationTemplate=E;const T=(e,t,i,n,o,a)=>null==e?new d.EmptyTemplate:e instanceof l.ChildDefaultTemplate?a[e.name]:e instanceof c.TemplateBase?e:f.default.isFunction(e.render)&&!f.default.isRenderer(e)?n?e:b(e):e.nodeType||f.default.isRenderer(e)?t((0,r.default)(e)):E(e,i,n,o)||a[e]||t(e);t.acquireTemplate=T;t.default={findTemplates:C,suitableTemplatesByName:y,addOneRenderedCall:b,addPublicElementNormalization:x,getNormalizedTemplateArgs:w,validateTemplateSource:S,templateKey:D,defaultCreateElement:I,acquireIntegrationTemplate:E,acquireTemplate:T}},39918:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.type=t.isWindow=t.isString=t.isRenderer=t.isPromise=t.isPrimitive=t.isPlainObject=t.isObject=t.isNumeric=t.isFunction=t.isExponential=t.isEvent=t.isEmptyObject=t.isDefined=t.isDeferred=t.isDate=t.isBoolean=t.default=void 0;const i={"[object Array]":"array","[object Date]":"date","[object Object]":"object","[object String]":"string"},n=function(e){if(null===e)return"null";const t=Object.prototype.toString.call(e);return"object"==typeof e?i[t]||"object":typeof e};t.type=n;const o=function(e){return"boolean"==typeof e};t.isBoolean=o;const a=function(e){return u(e)&&-1!==e.toString().indexOf("e")};t.isExponential=a;const s=function(e){return"date"===n(e)};t.isDate=s;const r=function(e){return null!=e};t.isDefined=r;const l=function(e){return"function"==typeof e};t.isFunction=l;const d=function(e){return"string"==typeof e};t.isString=d;const u=function(e){return"number"==typeof e&&isFinite(e)||!isNaN(e-parseFloat(e))};t.isNumeric=u;const c=function(e){return"object"===n(e)};t.isObject=c;const h=function(e){let t;for(t in e)return!1;return!0};t.isEmptyObject=h;const p=function(e){if(!e||"object"!==n(e))return!1;const t=Object.getPrototypeOf(e);if(!t)return!0;const i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof i&&Object.toString.call(i)===Object.toString.call(Object)};t.isPlainObject=p;const g=function(e){return!["object","array","function"].includes(n(e))};t.isPrimitive=g;const _=function(e){return null!=e&&e===e.window};t.isWindow=_;const f=function(e){return!(!e||!e.jquery&&!e.dxRenderer)};t.isRenderer=f;const m=function(e){return!!e&&l(e.then)};t.isPromise=m;const v=function(e){return!!e&&l(e.done)&&l(e.fail)};t.isDeferred=v;const C=function(e){return!(!e||!e.preventDefault)};t.isEvent=C;t.default={isBoolean:o,isDate:s,isDeferred:v,isDefined:r,isEmptyObject:h,isEvent:C,isExponential:a,isFunction:l,isNumeric:u,isObject:c,isPlainObject:p,isPrimitive:g,isPromise:m,isRenderer:f,isString:d,isWindow:_,type:n}},66082:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.variableWrapper=void 0;var n,o=i(31951),a=(n=i(89656))&&n.__esModule?n:{default:n};t.variableWrapper=(0,a.default)({isWrapped:function(){return!1},isWritableWrapped:function(){return!1},wrap:function(e){return e},unwrap:function(e){return e},assign:function(){o.logger.error("Method 'assign' should not be used for not wrapped variables. Use 'isWrapped' method for ensuring.")}})},5388:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.compare=function(e,t,i){function n(e){return"string"==typeof e?e.split("."):"number"==typeof e?[e]:e}e=n(e),t=n(t);let o=Math.max(e.length,t.length);isFinite(i)&&(o=Math.min(o,i));for(let i=0;i<o;i++){const n=parseInt(e[i]||0,10),o=parseInt(t[i]||0,10);if(n<o)return-1;if(n>o)return 1}return 0}},65913:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.changeCallback=void 0,t.originalViewPort=function(){return l},t.value=void 0;var n=a(i(64553)),o=a(i(84718));function a(e){return e&&e.__esModule?e:{default:e}}const s=a(i(3122)).default.add,r=t.changeCallback=(0,o.default)();let l=(0,n.default)();const d=t.value=function(){let e;return function(t){if(!arguments.length)return e;const i=(0,n.default)(t);l=i;const o=!!i.length,a=d();e=o?i:(0,n.default)("body"),r.fire(o?d():(0,n.default)(),a)}}();s((function(){d(".dx-viewport")}))},14470:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setWindow=t.hasWindow=t.hasProperty=t.getWindow=t.getNavigator=t.getCurrentScreenFactor=t.defaultScreenFactorFunc=t.default=void 0;var n,o=(n=i(64960))&&n.__esModule?n:{default:n};let a="undefined"!=typeof window;const s=()=>a;t.hasWindow=s;let r=s()?window:void 0;r||(r={},r.window=r);const l=()=>r;t.getWindow=l;const d=(e,t)=>{a=void 0===t?"undefined"!=typeof window&&window===e:t,r=e};t.setWindow=d;const u=e=>s()&&e in r;t.hasProperty=u;const c=e=>e<768?"xs":e<992?"sm":e<1200?"md":"lg";t.defaultScreenFactorFunc=c;const h=e=>(e||c)(o.default.getDocumentElement().clientWidth);t.getCurrentScreenFactor=h;const p=()=>{var e;return s()?null===(e=r)||void 0===e?void 0:e.navigator:{userAgent:""}};t.getNavigator=p;t.default={defaultScreenFactorFunc:c,getCurrentScreenFactor:h,getNavigator:p,getWindow:l,hasProperty:u,hasWindow:s,setWindow:d}},12220:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shiftIntegerByModule=void 0;t.shiftIntegerByModule=(e,t)=>{if(!Number.isInteger(e))throw Error(`Passed integer value ${e} is not an integer.`);if(!Number.isInteger(t))throw Error(`Passed module value ${t} is not an integer.`);if(t<=0)throw Error(`Passed module value ${t} must be > 0.`);const i=e%t;switch(!0){case 0===i:return 0;case i>0:return i;case i<0:return t+i;default:throw Error(`Unexpected division (${e} % ${t}) occurred.`)}}},51413:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createPromise=function(){let e,t;return{promise:new Promise(((i,n)=>{e=i,t=n})),resolve:e,reject:t}}},11371:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMemoizeScrollTo=function(e){const t=e();let i={};return function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o={top:void 0!==e.top?Math.ceil(e.top):void 0,left:void 0!==e.left?Math.ceil(e.left):void 0},a=o.top===i.top&&o.left===i.left;!n&&a||(i=o,t.scrollTo(e))}}},65020:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var n=m(i(88412)),o=m(i(55620)),a=m(i(66636)),s=m(i(87129)),r=i(2607),l=i(74453),d=i(53904),u=i(21971),c=m(i(84718)),h=i(17781),p=i(31e3),g=i(52576),_=i(85521),f=i(11528);function m(e){return e&&e.__esModule?e:{default:e}}const v=e=>e.charAt(2).toLowerCase()+e.substr(3);class C extends(o.default.inherit({})){_setDeprecatedOptions(){this._deprecatedOptions={}}_getDeprecatedOptions(){return this._deprecatedOptions}_getDefaultOptions(){return{onInitialized:null,onOptionChanged:null,onDisposing:null,defaultOptionsRules:null}}_defaultOptionsRules(){return[]}_setOptionsByDevice(e){this._options.applyRules(e)}_convertRulesToOptions(e){return(0,d.convertRulesToOptions)(e)}_isInitialOptionValue(e){return this._options.isInitial(e)}_setOptionsByReference(){this._optionsByReference={}}_getOptionsByReference(){return this._optionsByReference}ctor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{_optionChangedCallbacks:t,_disposingCallbacks:i}=e;this.NAME=(0,_.name)(this.constructor),this._eventsStrategy=r.EventsStrategy.create(this,e.eventsStrategy),this._updateLockCount=0,this._optionChangedCallbacks=t||(0,c.default)(),this._disposingCallbacks=i||(0,c.default)(),this.postponedOperations=new u.PostponedOperations,this._createOptions(e)}_createOptions(e){this.beginUpdate();try{this._setOptionsByReference(),this._setDeprecatedOptions(),this._options=new l.Options(this._getDefaultOptions(),this._getDefaultOptions(),this._getOptionsByReference(),this._getDeprecatedOptions()),this._options.onChanging(((e,t,i)=>this._initialized&&this._optionChanging(e,t,i))),this._options.onDeprecated(((e,t)=>this._logDeprecatedOptionWarning(e,t))),this._options.onChanged(((e,t,i)=>this._notifyOptionChanged(e,t,i))),this._options.onStartChange((()=>this.beginUpdate())),this._options.onEndChange((()=>this.endUpdate())),this._options.addRules(this._defaultOptionsRules()),this._options.validateOptions((e=>this._validateOptions(e))),e&&e.onInitializing&&e.onInitializing.apply(this,[e]),this._setOptionsByDevice(e.defaultOptionsRules),this._initOptions(e)}finally{this.endUpdate()}}_initOptions(e){this.option(e)}_init(){this._createOptionChangedAction(),this.on("disposing",(e=>{this._disposingCallbacks.fireWith(this,[e])}))}_logDeprecatedOptionWarning(e,t){const i=t.message||`Use the '${t.alias}' option instead`;s.default.log("W0001",this.NAME,e,t.since,i)}_logDeprecatedComponentWarning(e,t){s.default.log("W0000",this.NAME,e,`Use the '${t}' widget instead`)}_createOptionChangedAction(){this._optionChangedAction=this._createActionByOption("onOptionChanged",{excludeValidators:["disabled","readOnly"]})}_createDisposingAction(){this._disposingAction=this._createActionByOption("onDisposing",{excludeValidators:["disabled","readOnly"]})}_optionChanged(e){const{name:t}=e;switch(t){case"onDisposing":case"onInitialized":case"defaultOptionsRules":default:break;case"onOptionChanged":this._createOptionChangedAction()}}_dispose(){var e;this._optionChangedCallbacks.empty(),this._createDisposingAction(),null===(e=this._disposingAction)||void 0===e||e.call(this),this._eventsStrategy.dispose(),this._options.dispose(),this._disposed=!0}_lockUpdate(){this._updateLockCount++}_unlockUpdate(){this._updateLockCount=Math.max(this._updateLockCount-1,0)}_isUpdateAllowed(){return 0===this._updateLockCount}_isInitializingRequired(){return!this._initializing&&!this._initialized}isInitialized(){return this._initialized}_commitUpdate(){this.postponedOperations.callPostponedOperations(),this._isInitializingRequired()&&this._initializeComponent()}_initializeComponent(){this._initializing=!0;try{this._init()}finally{this._initializing=!1,this._lockUpdate(),this._createActionByOption("onInitialized",{excludeValidators:["disabled","readOnly"]})(),this._unlockUpdate(),this._initialized=!0}}instance(){return this}beginUpdate(){this._lockUpdate()}endUpdate(){this._unlockUpdate(),this._isUpdateAllowed()&&this._commitUpdate()}_optionChanging(){}_notifyOptionChanged(e,t,i){if(this._initialized){const o=[e].concat(this._options.getAliasesByName(e));for(let e=0;e<o.length;e++){const a=o[e],s={name:(0,p.getPathParts)(a)[0],fullName:a,value:t,previousValue:i};var n;if(0!==a.indexOf("_",0))this._optionChangedCallbacks.fireWith(this,[(0,g.extend)(this._defaultActionArgs(),s)]),null===(n=this._optionChangedAction)||void 0===n||n.call(this,(0,g.extend)({},s));this._disposed||this._cancelOptionChange===a||this._optionChanged(s)}}}initialOption(e){return this._options.initial(e)}_defaultActionConfig(){return{context:this,component:this}}_defaultActionArgs(){return{component:this}}_createAction(e,t){let i;return o=>((0,f.isDefined)(o)||(o={}),(0,f.isPlainObject)(o)||(o={actionValue:o}),i=i||new n.default(e,(0,g.extend)({},t,this._defaultActionConfig())),i.execute.call(i,(0,g.extend)(o,this._defaultActionArgs())))}_createActionByOption(e,t){var i=this;let n,o,r;t=(0,g.extend)({},t);const l=function(){if(!o){if(t=t||{},"string"!=typeof e)throw s.default.Error("E0008");e.startsWith("on")&&(o=v(e)),r=i.option(e)}if(n||r||t.beforeExecute||t.afterExecute||i._eventsStrategy.hasEvent(o)){if(!n){const{beforeExecute:e}=t;t.beforeExecute=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];e&&e.apply(i,n),i._eventsStrategy.fireEvent(o,n[0].args)},n=i._createAction(r,t)}for(var l=arguments.length,d=new Array(l),u=0;u<l;u++)d[u]=arguments[u];if((0,a.default)().wrapActionsBeforeExecute){return((i.option("beforeActionExecute")||h.noop)(i,n,t)||n).apply(i,d)}return n.apply(i,d)}};if((0,a.default)().wrapActionsBeforeExecute)return l;return(this.option("onActionCreated")||h.noop)(this,l,t)||l}on(e,t){return this._eventsStrategy.on(e,t),this}off(e,t){return this._eventsStrategy.off(e,t),this}hasActionSubscription(e){return!!this._options.silent(e)||this._eventsStrategy.hasEvent(v(e))}isOptionDeprecated(e){return this._options.isDeprecated(e)}_setOptionWithoutOptionChange(e,t){this._cancelOptionChange=e,this.option(e,t),this._cancelOptionChange=!1}_getOptionValue(e,t){const i=this.option(e);return(0,f.isFunction)(i)?i.bind(t)():i}option(){return this._options.option(...arguments)}resetOption(e){this.beginUpdate(),this._options.reset(e),this.endUpdate()}_validateOptions(e){return e}}t.Component=C},22331:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(42222),o=b(i(66636)),a=i(61404),s=i(74663),r=b(i(87129)),l=b(i(64553)),d=i(17781),u=i(52576),c=i(21274),h=i(85521),p=b(i(63283)),g=i(93631),_=i(11528),f=i(3104),m=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=y(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(93391)),v=b(i(66298)),C=i(65020);function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(y=function(e){return e?i:t})(e)}function b(e){return e&&e.__esModule?e:{default:e}}class x extends C.Component{static getInstance(e){return(0,h.getInstanceByElement)((0,l.default)(e),this)}static defaultOptions(e){this._classCustomRules=Object.hasOwnProperty.bind(this)("_classCustomRules")&&this._classCustomRules?this._classCustomRules:[],this._classCustomRules.push(e)}_getDefaultOptions(){return(0,u.extend)(super._getDefaultOptions(),{width:void 0,height:void 0,rtlEnabled:(0,o.default)().rtlEnabled,elementAttr:{},disabled:!1,integrationOptions:{}},this._useTemplates()?v.default.TemplateManager.createDefaultOptions():{})}ctor(e,t){this._customClass=null,this._createElement(e),(0,h.attachInstanceToElement)(this._$element,this,this._dispose),super.ctor(t);const i=(0,m.peekValidationPerformed)();m.default.validateLicense((0,o.default)().licenseKey),!i&&(0,m.peekValidationPerformed)()&&(0,o.default)({licenseKey:""})}_createElement(e){this._$element=(0,l.default)(e)}_getSynchronizableOptionsForCreateComponent(){return["rtlEnabled","disabled","templatesRenderAsynchronously"]}_checkFunctionValueDeprecation(e){this.option("_ignoreFunctionValueDeprecation")||e.forEach((e=>{(0,_.isFunction)(this.option(e))&&r.default.log("W0017",e)}))}_visibilityChanged(e){}_dimensionChanged(){}_init(){super._init(),this._checkFunctionValueDeprecation(["width","height","maxHeight","maxWidth","minHeight","minWidth","popupHeight","popupWidth"]),this._attachWindowResizeCallback(),this._initTemplateManager()}_setOptionsByDevice(e){super._setOptionsByDevice([].concat(this.constructor._classCustomRules||[],e||[]))}_isInitialOptionValue(e){return!(this.constructor._classCustomRules&&Object.prototype.hasOwnProperty.call(this._convertRulesToOptions(this.constructor._classCustomRules),e))&&super._isInitialOptionValue(e)}_attachWindowResizeCallback(){if(this._isDimensionChangeSupported()){const e=this._windowResizeCallBack=this._dimensionChanged.bind(this);p.default.add(e)}}_isDimensionChangeSupported(){return this._dimensionChanged!==x.prototype._dimensionChanged}_renderComponent(){(0,g.addShadowDomStyles)(this.$element()),this._initMarkup(),(0,f.hasWindow)()&&this._render()}_initMarkup(){const{rtlEnabled:e}=this.option()||{};this._renderElementAttributes(),this._toggleRTLDirection(e),this._renderVisibilityChange(),this._renderDimensions()}_render(){this._attachVisibilityChangeHandlers()}_renderElementAttributes(){const{elementAttr:e}=this.option()||{},t=(0,u.extend)({},e),i=t.class;delete t.class,this.$element().attr(t).removeClass(this._customClass).addClass(i),this._customClass=i}_renderVisibilityChange(){if(this._isDimensionChangeSupported()&&this._attachDimensionChangeHandlers(),this._isVisibilityChangeSupported()){this.$element().addClass("dx-visibility-change-handler")}}_renderDimensions(){const e=this.$element(),t=e.get(0),i=this._getOptionValue("width",t),n=this._getOptionValue("height",t);this._isCssUpdateRequired(t,n,i)&&e.css({width:null===i?"":i,height:null===n?"":n})}_isCssUpdateRequired(e,t,i){return!!((0,_.isDefined)(i)||(0,_.isDefined)(t)||e.style.width||e.style.height)}_attachDimensionChangeHandlers(){const e=this.$element(),t=`${this.NAME}VisibilityChange`;n.resize.off(e,{namespace:t}),n.resize.on(e,(()=>this._dimensionChanged()),{namespace:t})}_attachVisibilityChangeHandlers(){if(this._isVisibilityChangeSupported()){const e=this.$element(),t=`${this.NAME}VisibilityChange`;this._isHidden=!this._isVisible(),n.visibility.off(e,{namespace:t}),n.visibility.on(e,(()=>this._checkVisibilityChanged("shown")),(()=>this._checkVisibilityChanged("hiding")),{namespace:t})}}_isVisible(){return this.$element().is(":visible")}_checkVisibilityChanged(e){this._isVisible()&&("hiding"!==e||this._isHidden?"shown"===e&&this._isHidden&&(this._isHidden=!1,this._visibilityChanged(!0)):(this._visibilityChanged(!1),this._isHidden=!0))}_isVisibilityChangeSupported(){return this._visibilityChanged!==x.prototype._visibilityChanged&&(0,f.hasWindow)()}_clean(){}_modelByElement(e){const{modelByElement:t}=this.option(),i=this.$element();return t?t(i):void 0}_invalidate(){if(this._isUpdateAllowed())throw r.default.Error("E0007");this._requireRefresh=!0}_refresh(){this._clean(),this._renderComponent()}_dispose(){this._templateManager&&this._templateManager.dispose(),super._dispose(),this._clean(),this._detachWindowResizeCallback()}_detachWindowResizeCallback(){this._isDimensionChangeSupported()&&p.default.remove(this._windowResizeCallBack)}_toggleRTLDirection(e){this.$element().toggleClass("dx-rtl",e)}_createComponent(e,t,i){const n=i??{},o=(0,d.grep)(this._getSynchronizableOptionsForCreateComponent(),(e=>!(e in n))),{integrationOptions:a}=this.option();let{nestedComponentOptions:s}=this.option();s=s??d.noop;const r=(0,u.extend)({integrationOptions:a},s(this));let c;if(o.forEach((e=>r[e]=this.option(e))),this._extendConfig(n,r),(0,_.isString)(t)){const i=(0,l.default)(e)[t](n);c=i[t]("instance")}else e&&(c=t.getInstance(e),c?c.option(n):c=new t(e,n));if(c){const e=e=>{let{name:t,value:i}=e;o.includes(t)&&c.option(t,i)};this.on("optionChanged",e),c.on("disposing",(()=>this.off("optionChanged",e)))}return c}_extendConfig(e,t){(0,c.each)(t,((t,i)=>{!Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=i)}))}_defaultActionConfig(){const e=this.$element(),t=this._modelByElement(e);return(0,u.extend)(super._defaultActionConfig(),{context:t})}_defaultActionArgs(){const e=this.$element(),t=this._modelByElement(e),i=this.element();return(0,u.extend)(super._defaultActionArgs(),{element:i,model:t})}_optionChanged(e){const{name:t}=e;switch(t){case"width":case"height":this._renderDimensions();break;case"rtlEnabled":this._invalidate();break;case"elementAttr":this._renderElementAttributes();break;case"disabled":case"integrationOptions":break;default:super._optionChanged(e)}}_removeAttributes(e){const t=e.attributes;for(let i=t.length-1;i>=0;i--){const n=t[i];if(n){const{name:t}=n;t.indexOf("aria-")&&-1===t.indexOf("dx-")&&"role"!==t&&"style"!==t&&"tabindex"!==t||e.removeAttribute(t)}}}_removeClasses(e){e.className=e.className.split(" ").filter((e=>0!==e.lastIndexOf("dx-",0))).join(" ")}_updateDOMComponent(e){e?this._renderComponent():this._requireRefresh&&(this._requireRefresh=!1,this._refresh())}endUpdate(){const e=this._isInitializingRequired();super.endUpdate(),this._isUpdateAllowed()&&this._updateDOMComponent(e)}$element(){return this._$element}element(){const e=this.$element();return(0,a.getPublicElement)(e)}dispose(){const e=this.$element().get(0);(0,s.cleanDataRecursive)(e,!0),e.textContent="",this._removeAttributes(e),this._removeClasses(e)}resetOption(e){if(super.resetOption(e),"width"===e||"height"===e){const t=this.initialOption(e);!(0,_.isDefined)(t)&&this.$element().css(e,"")}}_getAnonymousTemplateName(){}_initTemplateManager(){if(this._templateManager||!this._useTemplates())return;const{integrationOptions:e={}}=this.option(),{createTemplate:t}=e;this._templateManager=new v.default.TemplateManager(t,this._getAnonymousTemplateName()),this._initTemplates()}_initTemplates(){const{templates:e,anonymousTemplateMeta:t}=this._templateManager.extractTemplates(this.$element()),i=this.option(`integrationOptions.templates.${t.name}`);e.forEach((e=>{let{name:t,template:i}=e;this._options.silent(`integrationOptions.templates.${t}`,i)})),t.name&&!i&&(this._options.silent(`integrationOptions.templates.${t.name}`,t.template),this._options.silent("_hasAnonymousTemplateContent",!0))}_getTemplateByOption(e){return this._getTemplate(this.option(e))}_getTemplate(e){const t=this.option("integrationOptions.templates"),i=this.option("templatesRenderAsynchronously"),n=this.option("integrationOptions.skipTemplates");return this._templateManager.getTemplate(e,t,{isAsyncTemplate:i,skipTemplates:n},this)}_saveTemplate(e,t){this._setOptionWithoutOptionChange(`integrationOptions.templates.${e}`,this._templateManager._createTemplate(t))}_useTemplates(){return!0}}t.default=x},89275:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(64044),i(69331),i(638);var n=i(42222),o=g(i(88412)),a=g(i(65951)),s=g(i(64553)),r=i(17781),l=i(52576),d=i(21274),u=i(11528),c=i(20142),h=i(35944),p=g(i(22331));function g(e){return e&&e.__esModule?e:{default:e}}const _="dx-state-disabled",f="dx-state-focused";function m(e,t,i){e="role"===e||"id"===e?e:`aria-${e}`,t=(0,u.isDefined)(t)?t.toString():null,i.attr(e,t)}class v extends p.default{constructor(){super(...arguments),this._feedbackHideTimeout=400,this._feedbackShowTimeout=30}static getOptionsFromContainer(e){let{name:t,fullName:i,value:n}=e,o={};if(t===i)o=n;else{o[i.split(".").pop()]=n}return o}_supportedKeys(){return{}}_getDefaultOptions(){return(0,l.extend)(super._getDefaultOptions(),{hoveredElement:null,isActive:!1,disabled:!1,visible:!0,hint:void 0,activeStateEnabled:!1,onContentReady:null,hoverStateEnabled:!1,focusStateEnabled:!1,tabIndex:0,accessKey:void 0,onFocusIn:null,onFocusOut:null,onKeyboardHandled:null,ignoreParentReadOnly:!1,useResizeObserver:!0})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device(){const e=a.default.real(),{platform:t}=e,{version:i}=e;return"ios"===t&&(0,c.compare)(i,"13.3")<=0},options:{useResizeObserver:!1}}])}_init(){super._init(),this._initContentReadyAction()}_innerWidgetOptionChanged(e,t){const i=v.getOptionsFromContainer(t);e&&e.option(i),this._options.cache(t.name,i)}_bindInnerWidgetOptions(e,t){const i=()=>this._options.silent(t,(0,l.extend)({},e.option()));i(),e.on("optionChanged",i)}_getAriaTarget(){return this._focusTarget()}_initContentReadyAction(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})}_initMarkup(){const{disabled:e,visible:t}=this.option();this.$element().addClass("dx-widget"),this._toggleDisabledState(e),this._toggleVisibility(t),this._renderHint(),this._isFocusable()&&this._renderFocusTarget(),super._initMarkup()}_render(){super._render(),this._renderContent(),this._renderFocusState(),this._attachFeedbackEvents(),this._attachHoverEvents(),this._toggleIndependentState()}_renderHint(){const{hint:e}=this.option();this.$element().attr("title",e||null)}_renderContent(){(0,r.deferRender)((()=>this._disposed?void 0:this._renderContentImpl())).done((()=>this._disposed?void 0:this._fireContentReadyAction()))}_renderContentImpl(){}_fireContentReadyAction(){return(0,r.deferRender)((()=>{var e;return null===(e=this._contentReadyAction)||void 0===e?void 0:e.call(this)}))}_dispose(){this._contentReadyAction=null,this._detachKeyboardEvents(),super._dispose()}_resetActiveState(){this._toggleActiveState(this._eventBindingTarget(),!1)}_clean(){this._cleanFocusState(),this._resetActiveState(),super._clean(),this.$element().empty()}_toggleVisibility(e){this.$element().toggleClass("dx-state-invisible",!e)}_renderFocusState(){this._attachKeyboardEvents(),this._isFocusable()&&(this._renderFocusTarget(),this._attachFocusEvents(),this._renderAccessKey())}_renderAccessKey(){const e=this._focusTarget(),{accessKey:t}=this.option();e.attr("accesskey",t)}_isFocusable(){const{focusStateEnabled:e,disabled:t}=this.option();return e&&!t}_eventBindingTarget(){return this.$element()}_focusTarget(){return this._getActiveElement()}_isFocusTarget(e){return(0,s.default)(this._focusTarget()).toArray().includes(e)}_findActiveTarget(e){return e.find(this._activeStateUnit).not(`.${_}`)}_getActiveElement(){const e=this._eventBindingTarget();return this._activeStateUnit?this._findActiveTarget(e):e}_renderFocusTarget(){const{tabIndex:e}=this.option();this._focusTarget().attr("tabIndex",e)}_keyboardEventBindingTarget(){return this._eventBindingTarget()}_refreshFocusEvent(){this._detachFocusEvents(),this._attachFocusEvents()}_focusEventTarget(){return this._focusTarget()}_focusInHandler(e){e.isDefaultPrevented()||this._createActionByOption("onFocusIn",{beforeExecute:()=>this._updateFocusState(e,!0),excludeValidators:["readOnly"]})({event:e})}_focusOutHandler(e){e.isDefaultPrevented()||this._createActionByOption("onFocusOut",{beforeExecute:()=>this._updateFocusState(e,!1),excludeValidators:["readOnly","disabled"]})({event:e})}_updateFocusState(e,t){let{target:i}=e;this._isFocusTarget(i)&&this._toggleFocusClass(t,(0,s.default)(i))}_toggleFocusClass(e,t){(t&&t.length?t:this._focusTarget()).toggleClass(f,e)}_hasFocusClass(e){return(0,s.default)(e??this._focusTarget()).hasClass(f)}_isFocused(){return this._hasFocusClass()}_getKeyboardListeners(){return[]}_attachKeyboardEvents(){this._detachKeyboardEvents();const{focusStateEnabled:e,onKeyboardHandled:t}=this.option(),i=this._getKeyboardListeners().length;(e||i||!!t)&&(this._keyboardListenerId=n.keyboard.on(this._keyboardEventBindingTarget(),this._focusTarget(),(e=>this._keyboardHandler(e))))}_keyboardHandler(e,t){if(!t){const{originalEvent:t,keyName:i,which:n}=e,o=this._supportedKeys(t),a=o[i]||o[n];if(void 0!==a){if(!a.bind(this)(t,e))return!1}}const i=this._getKeyboardListeners(),{onKeyboardHandled:n}=this.option();return i.forEach((t=>t&&t._keyboardHandler(e))),n&&n(e),!0}_refreshFocusState(){this._cleanFocusState(),this._renderFocusState()}_cleanFocusState(){this._focusTarget().removeAttr("tabIndex"),this._toggleFocusClass(!1),this._detachFocusEvents(),this._detachKeyboardEvents()}_detachKeyboardEvents(){n.keyboard.off(this._keyboardListenerId),this._keyboardListenerId=null}_attachHoverEvents(){const{hoverStateEnabled:e}=this.option(),t=this._activeStateUnit,i="UIFeedback",a=this._eventBindingTarget();n.hover.off(a,{selector:t,namespace:i}),e&&n.hover.on(a,new o.default((e=>{let{event:t,element:i}=e;this._hoverStartHandler(t),this.option("hoveredElement",(0,s.default)(i))}),{excludeValidators:["readOnly"]}),(e=>{this.option("hoveredElement",null),this._hoverEndHandler(e)}),{selector:t,namespace:i})}_attachFeedbackEvents(){const{activeStateEnabled:e}=this.option(),t=this._activeStateUnit,i="UIFeedback",a=this._eventBindingTarget();n.active.off(a,{namespace:i,selector:t}),e&&n.active.on(a,new o.default((e=>{let{event:t,element:i}=e;return this._toggleActiveState((0,s.default)(i),!0,t)})),new o.default((e=>{let{event:t,element:i}=e;return this._toggleActiveState((0,s.default)(i),!1,t)}),{excludeValidators:["disabled","readOnly"]}),{showTimeout:this._feedbackShowTimeout,hideTimeout:this._feedbackHideTimeout,selector:t,namespace:i})}_detachFocusEvents(){const e=this._focusEventTarget();n.focus.off(e,{namespace:`${this.NAME}Focus`})}_attachFocusEvents(){const e=this._focusEventTarget();n.focus.on(e,(e=>this._focusInHandler(e)),(e=>this._focusOutHandler(e)),{namespace:`${this.NAME}Focus`,isFocusable:(e,t)=>(0,s.default)(t).is(h.focusable)})}_hoverStartHandler(e){}_hoverEndHandler(e){}_toggleActiveState(e,t,i){this.option("isActive",t),e.toggleClass("dx-state-active",t)}_updatedHover(){const e=this._options.silent("hoveredElement");this._hover(e,e)}_findHoverTarget(e){return e&&e.closest(this._activeStateUnit||this._eventBindingTarget())}_hover(e,t){const{hoverStateEnabled:i,disabled:n,isActive:o}=this.option();if((t=this._findHoverTarget(t))&&t.toggleClass("dx-state-hover",!1),e&&i&&!n&&!o){const t=this._findHoverTarget(e);t&&t.toggleClass("dx-state-hover",!0)}}_toggleDisabledState(e){this.$element().toggleClass(_,Boolean(e)),this.setAria("disabled",e||void 0)}_toggleIndependentState(){const{ignoreParentReadOnly:e}=this.option();this.$element().toggleClass("dx-state-independent",e)}_setWidgetOption(e,t){if(!this[e])return;if((0,u.isPlainObject)(t[0]))return void(0,d.each)(t[0],((t,i)=>this._setWidgetOption(e,[t,i])));const i=t[0];let n=t[1];1===t.length&&(n=this.option(i));const o=this[`${e}OptionMap`];this[e].option(o?o(i):i,n)}_optionChanged(e){const{name:t,value:i,previousValue:n}=e;switch(t){case"disabled":this._toggleDisabledState(i),this._updatedHover(),this._refreshFocusState();break;case"hint":this._renderHint();break;case"ignoreParentReadOnly":this._toggleIndependentState();break;case"activeStateEnabled":this._attachFeedbackEvents();break;case"hoverStateEnabled":this._attachHoverEvents(),this._updatedHover();break;case"tabIndex":case"focusStateEnabled":this._refreshFocusState();break;case"onFocusIn":case"onFocusOut":case"useResizeObserver":break;case"accessKey":this._renderAccessKey();break;case"hoveredElement":this._hover(i,n);break;case"isActive":this._updatedHover();break;case"visible":this._toggleVisibility(i),this._isVisibilityChangeSupported()&&this._checkVisibilityChanged(i?"shown":"hiding");break;case"onKeyboardHandled":this._attachKeyboardEvents();break;case"onContentReady":this._initContentReadyAction();break;default:super._optionChanged(e)}}_isVisible(){const{visible:e}=this.option();return super._isVisible()&&e}beginUpdate(){this._ready(!1),super.beginUpdate()}endUpdate(){super.endUpdate(),this._initialized&&this._ready(!0)}_ready(e){return 0===arguments.length?!!this._isReady:(this._isReady=!!e,this._isReady)}setAria(){if((0,u.isPlainObject)(arguments.length<=0?void 0:arguments[0])){const e=(arguments.length<=1?void 0:arguments[1])||this._getAriaTarget();(0,d.each)(arguments.length<=0?void 0:arguments[0],((t,i)=>m(t,i,e)))}else m(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],(arguments.length<=2?void 0:arguments[2])||this._getAriaTarget())}isReady(){return this._ready()}repaint(){this._refresh()}focus(){n.focus.trigger(this._focusTarget())}registerKeyHandler(e,t){const i=this._supportedKeys();this._supportedKeys=()=>(0,l.extend)(i,{[e]:t})}}t.default=v},79562:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DataSource=void 0;var n=i(43792),o=i(63326),a=m(i(95853)),s=i(97169),r=i(82812),l=i(89358),d=m(i(55620)),u=i(2607),c=i(87739),h=i(52576),p=i(21274),g=i(65221),_=i(11528),f=m(i(39315));function m(e){return e&&e.__esModule?e:{default:e}}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},v.apply(null,arguments)}t.DataSource=d.default.inherit({ctor(e){e=(0,s.normalizeDataSourceOptions)(e),this._eventsStrategy=new u.EventsStrategy(this,{syncStrategy:!0}),this._store=e.store,this._changedTime=0;if(0!==e.pushAggregationTimeout){const t=void 0===e.pushAggregationTimeout?()=>5*this._changedTime:e.pushAggregationTimeout;let i,n;const o=(0,l.throttleChanges)((e=>{i.resolve();(0,c.when)(...n).done((()=>this._onPush(e))),n=void 0,i=void 0}),t);this._onPushHandler=e=>{this._aggregationTimeoutId=o(e.changes),i||(i=new c.Deferred),n=e.waitFor,e.waitFor.push(i.promise())},this._store.on("beforePushAggregation",this._onPushHandler)}else this._onPushHandler=e=>this._onPush(e),this._store.on("push",this._onPushHandler);this._storeLoadOptions=this._extractLoadOptions(e),this._mapFunc=e.map,this._postProcessFunc=e.postProcess,this._pageIndex=void 0!==e.pageIndex?e.pageIndex:0,this._pageSize=void 0!==e.pageSize?e.pageSize:20,this._loadingCount=0,this._loadQueue=this._createLoadQueue(),this._searchValue="searchValue"in e?e.searchValue:null,this._searchOperation=e.searchOperation||"contains",this._searchExpr=e.searchExpr,this._paginate=e.paginate,this._reshapeOnPush=e.reshapeOnPush??!1,(0,p.each)(["onChanged","onLoadError","onLoadingChanged","onCustomizeLoadResult","onCustomizeStoreLoadOptions"],((t,i)=>{i in e&&this.on(i.substr(2,1).toLowerCase()+i.substr(3),e[i])})),this._operationManager=new a.default,this._init()},_init(){this._items=[],this._userData={},this._totalCount=-1,this._isLoaded=!1,(0,_.isDefined)(this._paginate)||(this._paginate=!this.group()),this._isLastPage=!this._paginate},dispose(){var e;this._store.off("beforePushAggregation",this._onPushHandler),this._store.off("push",this._onPushHandler),this._eventsStrategy.dispose(),clearTimeout(this._aggregationTimeoutId),null===(e=this._delayedLoadTask)||void 0===e||e.abort(),this._operationManager.cancelAll(),delete this._store,delete this._items,delete this._delayedLoadTask,this._disposed=!0},_extractLoadOptions(e){const t={};let i=["sort","filter","langParams","select","group","requireTotalCount"];const n=this._store._customLoadOptions();return n&&(i=i.concat(n)),(0,p.each)(i,(function(){t[this]=e[this]})),t},loadOptions(){return this._storeLoadOptions},items(){return this._items},pageIndex(e){if(!(0,_.isNumeric)(e))return this._pageIndex;this._pageIndex=e,this._isLastPage=!this._paginate},paginate(e){if(!(0,_.isBoolean)(e))return this._paginate;this._paginate!==e&&(this._paginate=e,this.pageIndex(0))},pageSize(e){if(!(0,_.isNumeric)(e))return this._pageSize;this._pageSize=e},isLastPage(){return this._isLastPage},generateStoreLoadOptionAccessor(e){return t=>{const i=(0,s.normalizeStoreLoadOptionAccessorArguments)(t);if(void 0===i)return this._storeLoadOptions[e];this._storeLoadOptions[e]=i}},sort(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.generateStoreLoadOptionAccessor("sort")(t)},filter(){const e=(0,s.normalizeStoreLoadOptionAccessorArguments)(arguments);if(void 0===e)return this._storeLoadOptions.filter;this._storeLoadOptions.filter=e,this.pageIndex(0)},group(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.generateStoreLoadOptionAccessor("group")(t)},select(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.generateStoreLoadOptionAccessor("select")(t)},requireTotalCount(e){if(!(0,_.isBoolean)(e))return this._storeLoadOptions.requireTotalCount;this._storeLoadOptions.requireTotalCount=e},searchValue(e){if(arguments.length<1)return this._searchValue;this._searchValue=e,this.pageIndex(0)},searchOperation(e){if(!(0,_.isString)(e))return this._searchOperation;this._searchOperation=e,this.pageIndex(0)},searchExpr(e){const t=arguments.length;if(0===t)return this._searchExpr;t>1&&(e=[].slice.call(arguments)),this._searchExpr=e,this.pageIndex(0)},store(){return this._store},key(){var e;return null===(e=this._store)||void 0===e?void 0:e.key()},totalCount(){return this._totalCount},isLoaded(){return this._isLoaded},isLoading(){return this._loadingCount>0},beginLoading(){this._changeLoadingCount(1)},endLoading(){this._changeLoadingCount(-1)},_createLoadQueue:()=>(0,g.create)(),_changeLoadingCount(e){const t=this.isLoading();this._loadingCount+=e;const i=this.isLoading();t^i&&this._eventsStrategy.fireEvent("loadingChanged",[i])},_scheduleLoadCallbacks(e){this.beginLoading(),e.always((()=>{this.endLoading()}))},_scheduleFailCallbacks(e){var t=this;e.fail((function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];i[0]!==s.CANCELED_TOKEN&&t._eventsStrategy.fireEvent("loadError",i)}))},_fireChanged(e){const t=new Date;this._eventsStrategy.fireEvent("changed",e),this._changedTime=new Date-t},_scheduleChangedCallbacks(e){e.done((()=>this._fireChanged()))},loadSingle(e,t){const i=new c.Deferred,n=this.key(),a=this._store,s=this._createStoreLoadOptions();this._scheduleFailCallbacks(i),arguments.length<2&&(t=e,e=n),delete s.skip,delete s.group,delete s.refresh,delete s.pageIndex,delete s.searchString;return(e===n||a instanceof o.CustomStore&&!a._byKeyViaLoad()?a.byKey(t,s):(s.take=1,s.filter=s.filter?[s.filter,[e,t]]:[e,t],a.load(s))).fail(i.reject).done((e=>{const t=Array.isArray(e)&&!e.length;!(0,_.isDefined)(e)||t?i.reject(r.errors.Error("E4009")):(Array.isArray(e)||(e=[e]),i.resolve(this._applyMapFunction(e)[0]))})),i.promise()},load(){const e=new c.Deferred,t=()=>{if(!this._disposed&&(0,s.isPending)(e))return this._loadFromStore(i,e)};this._scheduleLoadCallbacks(e),this._scheduleFailCallbacks(e),this._scheduleChangedCallbacks(e);const i=this._createLoadOperation(e);return this._eventsStrategy.fireEvent("customizeStoreLoadOptions",[i]),this._loadQueue.add((()=>("number"==typeof i.delay?this._delayedLoadTask=f.default.executeAsync(t,i.delay):t(),e.promise()))),e.promise({operationId:i.operationId})},_onPush(e){if(this._reshapeOnPush)this.load();else{const t={changes:e};this._eventsStrategy.fireEvent("changing",[t]);const i=this.group(),o=this.items();let a=0,s=this.paginate()||i?e.filter((e=>"update"===e.type)):e;i&&(a=Array.isArray(i)?i.length:1),this._mapFunc&&s.forEach((e=>{"insert"===e.type&&(e.data=this._mapFunc(e.data))})),t.postProcessChanges&&(s=t.postProcessChanges(s)),(0,n.applyBatch)({keyInfo:this.store(),data:o,changes:s,groupCount:a,useInsertIndex:!0}),this._fireChanged([{changes:e}])}},_createLoadOperation(e){const t=this._operationManager.add(e),i=this._createStoreLoadOptions();return this._store&&!(0,_.isEmptyObject)(null==i?void 0:i.langParams)&&(this._store._langParams=v({},this._store._langParams,i.langParams)),e.always((()=>this._operationManager.remove(t))),{operationId:t,storeLoadOptions:i}},reload(){return this.store()._clearCache(),this._init(),this.load()},cancel(e){return this._operationManager.cancel(e)},cancelAll(){return this._operationManager.cancelAll()},_addSearchOptions(e){this._disposed||(this.store()._useDefaultSearch?this._addSearchFilter(e):(e.searchOperation=this._searchOperation,e.searchValue=this._searchValue,e.searchExpr=this._searchExpr))},_createStoreLoadOptions(){const e=(0,h.extend)({},this._storeLoadOptions);return this._addSearchOptions(e),this._paginate&&this._pageSize&&(e.skip=this._pageIndex*this._pageSize,e.take=this._pageSize),e.userData=this._userData,e},_addSearchFilter(e){const t=this._searchValue,i=this._searchOperation;let n=this._searchExpr;const o=[];t&&(n||(n="this"),Array.isArray(n)||(n=[n]),(0,p.each)(n,((e,n)=>{o.length&&o.push("or"),o.push([n,i,t])})),e.filter?e.filter=[o,e.filter]:e.filter=o)},_loadFromStore(e,t){const i=(i,n)=>{if(this._disposed)return;if(!(0,s.isPending)(t))return;const o=(0,h.extend)((0,s.normalizeLoadResult)(i,n),e);this._eventsStrategy.fireEvent("customizeLoadResult",[o]),(0,c.when)(o.data).done((e=>{o.data=e,this._processStoreLoadResult(o,t)})).fail(t.reject)};return e.data?(new c.Deferred).resolve(e.data).done(i):this.store().load(e.storeLoadOptions).done(i).fail(t.reject)},_processStoreLoadResult(e,t){let{data:i}=e,{extra:n}=e;const{storeLoadOptions:o}=e,a=()=>(this._isLoaded=!0,this._totalCount=isFinite(n.totalCount)?n.totalCount:-1,t.resolve(i,n)),s=()=>{this.store().totalCount(o).done((e=>{n.totalCount=e,a()})).fail(t.reject)};this._disposed||(i=this._applyPostProcessFunction(this._applyMapFunction(i)),(0,_.isObject)(n)||(n={}),this._items=i,(!i.length||!this._paginate||this._pageSize&&i.length<this._pageSize)&&(this._isLastPage=!0),o.requireTotalCount&&!isFinite(n.totalCount)?s():a())},_applyMapFunction(e){return this._mapFunc?(0,s.mapDataRespectingGrouping)(e,this._mapFunc,this.group()):e},_applyPostProcessFunction(e){return this._postProcessFunc?this._postProcessFunc(e):e},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}})},9427:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(97169);t.default=class{constructor(){this._counter=-1,this._deferreds={}}add(e){return this._counter++,this._deferreds[this._counter]=e,this._counter}remove(e){return delete this._deferreds[e]}cancel(e){return e in this._deferreds&&(this._deferreds[e].reject(n.CANCELED_TOKEN),!0)}cancelAll(){for(;this._counter>-1;)this.cancel(this._counter),this._counter--}}},23923:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeStoreLoadOptionAccessorArguments=t.normalizeLoadResult=t.normalizeDataSourceOptions=t.mapDataRespectingGrouping=t.isPending=t.CANCELED_TOKEN=void 0;var n=h(i(80556)),o=i(63326),a=i(89358),s=h(i(78670)),r=i(52576),l=i(21274),d=i(11528),u=h(i(77735));const c=["items"];function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},p.apply(null,arguments)}t.CANCELED_TOKEN="canceled";t.isPending=e=>"pending"===e.state();t.normalizeStoreLoadOptionAccessorArguments=e=>{switch(e.length){case 0:return;case 1:return e[0]}return[].slice.call(e)};const g=(e,t,i)=>Array.isArray(e)?t?((e,t,i)=>(0,l.map)(e,(e=>p({},function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,c),{items:g(e.items,t-1,i)}))))(e,t,i):(0,l.map)(e,i):e;t.mapDataRespectingGrouping=(e,t,i)=>{const n=i?(0,a.normalizeSortingInfo)(i).length:0;return g(e,n,t)};t.normalizeLoadResult=(e,t)=>{var i;return null!==(i=e)&&void 0!==i&&i.data&&(t=e,e=e.data),Array.isArray(e)||(e=[e]),{data:e,extra:t}};const _=e=>{const t={};return(0,l.each)(["useDefaultSearch","key","load","loadMode","cacheRawData","byKey","lookup","totalCount","insert","update","remove"],(function(){t[this]=e[this],delete e[this]})),new o.CustomStore(t)},f=(e,t)=>new o.CustomStore({load:()=>s.default.sendRequest({url:e,dataType:"json"}),loadMode:null==t?void 0:t.fromUrlLoadMode});t.normalizeDataSourceOptions=(e,t)=>{let i;return"string"==typeof e&&(e={paginate:!1,store:f(e,t)}),void 0===e&&(e=[]),void 0===(e=Array.isArray(e)||e instanceof u.default?{store:e}:(0,r.extend)({},e)).store&&(e.store=[]),i=e.store,"load"in e?i=_(e):Array.isArray(i)?i=new n.default(i):(0,d.isPlainObject)(i)&&(i=(e=>{const t=e.type;return delete e.type,u.default.create(t,e)})((0,r.extend)({},i))),e.store=i,e}},1773:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(82812),o=p(i(66177)),a=i(89358),s=p(i(55620)),r=i(2607),l=i(17781),d=i(31e3),u=i(87739),c=i(21274),h=i(11528);function p(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},g.apply(null,arguments)}const{abstract:_}=s.default,{queryByOptions:f}=o.default,m={},v=s.default.inherit({_langParams:{},ctor(e){const t=this;e=e||{},this._eventsStrategy=new r.EventsStrategy(this),(0,c.each)(["onLoaded","onLoading","onInserted","onInserting","onUpdated","onUpdating","onPush","onRemoved","onRemoving","onModified","onModifying"],((i,n)=>{n in e&&t.on(n.slice(2).toLowerCase(),e[n])})),this._key=e.key,this._errorHandler=e.errorHandler,this._useDefaultSearch=!0},_clearCache:l.noop,_customLoadOptions:()=>null,key(){return this._key},keyOf(e){return this._keyGetter||(this._keyGetter=(0,d.compileGetter)(this.key())),this._keyGetter(e)},_requireKey(){if(!this.key())throw n.errors.Error("E4005")},load(e){const t=this;return e=e||{},this._eventsStrategy.fireEvent("loading",[e]),this._withLock(this._loadImpl(e)).done((i=>{t._eventsStrategy.fireEvent("loaded",[i,e])}))},_loadImpl(e){return(0,h.isEmptyObject)(this._langParams)||((e=e||{})._langParams=g({},this._langParams,e._langParams)),f(this.createQuery(e),e).enumerate()},_withLock(e){const t=new u.Deferred;return e.done((function(){const e=this,i=arguments;a.processRequestResultLock.promise().done((()=>{t.resolveWith(e,i)}))})).fail((function(){t.rejectWith(this,arguments)})),t},createQuery:_,totalCount(e){return this._totalCountImpl(e)},_totalCountImpl(e){return f(this.createQuery(e),e,!0).count()},byKey(e,t){return this._addFailHandlers(this._withLock(this._byKeyImpl(e,t)))},_byKeyImpl:_,insert(e){const t=this;return t._eventsStrategy.fireEvent("modifying"),t._eventsStrategy.fireEvent("inserting",[e]),t._addFailHandlers(t._insertImpl(e).done(((e,i)=>{t._eventsStrategy.fireEvent("inserted",[e,i]),t._eventsStrategy.fireEvent("modified")})))},_insertImpl:_,update(e,t){const i=this;return i._eventsStrategy.fireEvent("modifying"),i._eventsStrategy.fireEvent("updating",[e,t]),i._addFailHandlers(i._updateImpl(e,t).done((()=>{i._eventsStrategy.fireEvent("updated",[e,t]),i._eventsStrategy.fireEvent("modified")})))},_updateImpl:_,push(e){const t={changes:e,waitFor:[]};this._eventsStrategy.fireEvent("beforePushAggregation",[t]),(0,u.when)(...t.waitFor).done((()=>{this._pushImpl(e),this._eventsStrategy.fireEvent("beforePush",[{changes:e}]),this._eventsStrategy.fireEvent("push",[e])}))},_pushImpl:l.noop,remove(e){const t=this;return t._eventsStrategy.fireEvent("modifying"),t._eventsStrategy.fireEvent("removing",[e]),t._addFailHandlers(t._removeImpl(e).done((e=>{t._eventsStrategy.fireEvent("removed",[e]),t._eventsStrategy.fireEvent("modified")})))},_removeImpl:_,_addFailHandlers(e){return e.fail(this._errorHandler).fail(n.handleError)},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}});var C;v.create=function(e,t){if(!(e in m))throw n.errors.Error("E4020",e);return new m[e](t)},v.registerClass=function(e,t){return t&&(m[t]=e),e},v.inherit=(C=v.inherit,function(e,t){const i=C.apply(this,[e]);return v.registerClass(i,t),i});t.default=v},79587:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(82812),a=i(89358),s=(n=i(55620))&&n.__esModule?n:{default:n},r=i(31e3),l=i(87739),d=i(21274),u=i(11528);const c=s.default.inherit({toArray(){const e=[];for(this.reset();this.next();)e.push(this.current());return e},countable:()=>!1}),h=c.inherit({ctor(e){this.array=e,this.index=-1},next(){return this.index+1<this.array.length&&(this.index++,!0)},current(){return this.array[this.index]},reset(){this.index=-1},toArray(){return this.array.slice(0)},countable:()=>!0,count(){return this.array.length}}),p=c.inherit({ctor(e){this.iter=e},next(){return this.iter.next()},current(){return this.iter.current()},reset(){return this.iter.reset()}}),g=p.inherit({ctor(e,t){this.callBase(e),this.index=-1,this.mapper=t},current(){return this.mapper(this.callBase(),this.index)},next(){const e=this.callBase();return e&&this.index++,e}}),_=c.inherit({ctor(e,t,i,n){this.langParams=e.langParams,e instanceof g||((e=new g(e,this._wrap)).langParams=this.langParams),this.iter=e,this.rules=[{getter:t,desc:i,compare:n,langParams:this.langParams}]},thenBy(e,t,i){const n=new _(this.sortedIter||this.iter,e,t,i);return this.sortedIter||(n.rules=this.rules.concat(n.rules)),n},next(){return this._ensureSorted(),this.sortedIter.next()},current(){return this._ensureSorted(),this.sortedIter.current()},reset(){delete this.sortedIter},countable(){return this.sortedIter||this.iter.countable()},count(){return this.sortedIter?this.sortedIter.count():this.iter.count()},_ensureSorted(){const e=this;e.sortedIter||((0,d.each)(e.rules,(function(){this.getter=(0,r.compileGetter)(this.getter)})),e.sortedIter=new g(new h(this.iter.toArray().sort(((t,i)=>e._compare(t,i)))),e._unwrap))},_wrap:(e,t)=>({index:t,value:e}),_unwrap:e=>e.value,_getDefaultCompare:e=>(t,i)=>function(e,t,i){return(0,u.isString)(e)&&(0,u.isString)(t)&&(null!=i&&i.locale||null!=i&&i.collatorOptions)?new Intl.Collator((null==i?void 0:i.locale)||void 0,(null==i?void 0:i.collatorOptions)||void 0).compare(e,t):(e=(0,r.toComparable)(e,!1,i),t=(0,r.toComparable)(t,!1,i),null===e&&null!==t?-1:null!==e&&null===t||void 0===e&&void 0!==t?1:void 0!==e&&void 0===t||e<t?-1:e>t?1:0)}(t,i,e),_compare(e,t){const i=e.index,n=t.index;if((e=e.value)===(t=t.value))return i-n;for(let i=0,n=this.rules.length;i<n;i++){const n=this.rules[i],o=n.getter(e),a=n.getter(t),s=(n.compare||this._getDefaultCompare(n.langParams))(o,a);if(s)return n.desc?-s:s}return i-n}}),f=function(){let e={};const t=t=>(0,r.toComparable)(t,!1,e),i=function(i){if((0,a.isUniformEqualsByOr)(i))return(e=>{const i=(0,r.compileGetter)(e[0][0]),n=e.reduce(((e,i,n)=>(n%2==0&&e.push(t(i[2])),e)),[]);return e=>{const o=t(i(e));return n.some((e=>l(e)?o===e:o==e))}})(i);const n=[];let s=!1,c=!1;return(0,d.each)(i,(function(){if(Array.isArray(this)||(0,u.isFunction)(this)){if(n.length>1&&s!==c)throw o.errors.Error("E4019");n.push(f(this,e)),s=c,c=!0}else c=(0,a.isConjunctiveOperator)(this)})),function(e){let t=s;for(let i=0;i<n.length;i++)if(n[i](e)!==s){t=!s;break}return t}},n=function(t){var i;return(0,u.isDefined)(t)?null!==(i=e)&&void 0!==i&&i.locale?t.toLocaleString(e.locale):t.toString():""};function s(e,i,n){return function(o){o=t(e(o));let a=l(i)?o===i:o==i;return n&&(a=!a),a}}function l(e){return""===e||0===e||!1===e}return function(l,d){return e=d||{},(0,u.isFunction)(l)?l:(0,a.isGroupCriterion)(l)?i(l):(0,a.isUnaryOperation)(l)?function(t){const i=t[0],n=f(t[1],e);if("!"===i)return function(e){return!n(e)};throw o.errors.Error("E4003",i)}(l):function(e){e=(0,a.normalizeBinaryCriterion)(e);const i=(0,r.compileGetter)(e[0]),l=e[1];let d=e[2];d=t(d);const u=(e,n)=>(e=t(i(e)),(null!=d&&null!=e||d===e)&&n(e,d));switch(l.toLowerCase()){case"=":return s(i,d);case"<>":return s(i,d,!0);case">":return e=>u(e,((e,t)=>e>t));case"<":return e=>u(e,((e,t)=>e<t));case">=":return e=>u(e,((e,t)=>e>=t));case"<=":return e=>u(e,((e,t)=>e<=t));case"startswith":return e=>t(n(i(e))).startsWith(d);case"endswith":return e=>t(n(i(e))).endsWith(d);case"contains":return e=>t(n(i(e))).includes(d);case"notcontains":return e=>!t(n(i(e))).includes(d)}throw o.errors.Error("E4003",l)}(l)}}(),m=p.inherit({ctor(e,t){this.callBase(e),this.langParams=e.langParams,this.criteria=f(t,this.langParams)},next(){for(;this.iter.next();)if(this.criteria(this.current()))return!0;return!1}}),v=c.inherit({ctor(e,t){this.iter=e,this.getter=t},next(){return this._ensureGrouped(),this.groupedIter.next()},current(){return this._ensureGrouped(),this.groupedIter.current()},reset(){delete this.groupedIter},countable(){return!!this.groupedIter},count(){return this.groupedIter.count()},_ensureGrouped(){if(this.groupedIter)return;const e={},t=[],{iter:i}=this,n=(0,r.compileGetter)(this.getter);for(i.reset();i.next();){const o=i.current(),a=n(o);a in e?e[a].push(o):(e[a]=[o],t.push(a))}this.groupedIter=new h((0,d.map)(t,(t=>({key:t,items:e[t]}))))}}),C=p.inherit({ctor(e,t){this.callBase(e),this.getter=(0,r.compileGetter)(t)},current(){return this.getter(this.callBase())},countable(){return this.iter.countable()},count(){return this.iter.count()}}),y=p.inherit({ctor(e,t,i){this.callBase(e),this.skip=Math.max(0,t),this.take=Math.max(0,i),this.pos=0},next(){if(this.pos>=this.skip+this.take)return!1;for(;this.pos<this.skip&&this.iter.next();)this.pos++;return this.pos++,this.iter.next()},reset(){this.callBase(),this.pos=0},countable(){return this.iter.countable()},count(){return Math.min(this.iter.count()-this.skip,this.take)}}),b=function(e,t){t=t||{},e instanceof c||(e=new h(e)),t.langParams&&(e.langParams=t.langParams);const i=function(e){const i=t.errorHandler;i&&i(e),(0,o.handleError)(e)},n=function(t){const n=(new l.Deferred).fail(i);let o;const{step:a}=t,{finalize:s}=t;try{e.reset(),o="seed"in t?t.seed:e.next()?e.current():NaN;let i=o;for(;e.next();)i=a(i,e.current());n.resolve(s?s(i):i)}catch(e){n.reject(e)}return n.promise()},s=function(e){return n(a.aggregators[e])},d=function(t){return(0,u.isFunction)(t)||Array.isArray(t)||(t=[].slice.call(arguments)),g(new C(e,t))},p=function(e){return d((0,r.compileGetter)(e))};function g(e){return b(e,t)}return{toArray:()=>e.toArray(),enumerate(){const t=(new l.Deferred).fail(i);try{t.resolve(e.toArray())}catch(e){t.reject(e)}return t.promise()},setLangParams(t){e.langParams=t},sortBy:(t,i,n)=>g(new _(e,t,i,n)),thenBy(t,i,n){if(e instanceof _)return g(e.thenBy(t,i,n));throw o.errors.Error("E4004")},filter(t){return Array.isArray(t)||(t=[].slice.call(arguments)),g(new m(e,t))},slice:(t,i)=>(void 0===i&&(i=Number.MAX_VALUE),g(new y(e,t,i))),select:d,groupBy:t=>g(new v(e,t)),aggregate:function(e,t,i){return n(arguments.length<2?{step:arguments[0]}:{seed:e,step:t,finalize:i})},count(){if(e.countable()){const t=(new l.Deferred).fail(i);try{t.resolve(e.count())}catch(e){t.reject(e)}return t.promise()}return s("count")},sum:e=>e?p(e).sum():s("sum"),min:e=>e?p(e).min():s("min"),max:e=>e?p(e).max():s("max"),avg:e=>e?p(e).avg():s("avg")}};t.default=b},11338:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(43792),o=i(82812),a=r(i(30771)),s=i(89358);function r(e){return e&&e.__esModule?e:{default:e}}const l=r(i(77735)).default.inherit({ctor(e){e=Array.isArray(e)?{data:e}:e||{},this.callBase(e);const t=e.data;if(t&&!Array.isArray(t))throw o.errors.Error("E4006");this._array=t||[]},createQuery(){return(0,a.default)(this._array,{errorHandler:this._errorHandler})},_byKeyImpl(e){const t=(0,n.indexByKey)(this,this._array,e);return-1===t?(0,s.rejectedPromise)(o.errors.Error("E4009")):(0,s.trivialPromise)(this._array[t])},_insertImpl(e){return(0,n.insert)(this,this._array,e)},_pushImpl(e){(0,n.applyBatch)({keyInfo:this,data:this._array,changes:e})},_updateImpl(e,t){return(0,n.update)(this,this._array,e,t)},_removeImpl(e){return(0,n.remove)(this,this._array,e)},clear(){this._eventsStrategy.fireEvent("modifying"),this._array=[],this._eventsStrategy.fireEvent("modified")}},"array");t.default=l},3198:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.applyBatch=v,t.applyChanges=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{keyExpr:n="id",immutable:o=!0}=i,a=(0,r.compileGetter)(n);return v({keyInfo:{key:()=>n,keyOf:e=>a(e)},data:e,changes:t,immutable:o,disableCache:!0,logError:!0})},t.createObjectWithChanges=m,t.indexByKey=w,t.insert=b,t.remove=x,t.update=y;var n=i(82812),o=i(89358),a=c(i(66636)),s=c(i(19427)),r=i(31e3),l=i(52576),d=i(22263),u=i(11528);function c(e){return e&&e.__esModule?e:{default:e}}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},h.apply(null,arguments)}function p(e,t,i,n){let o,a;if(n){for(let s=0;s<t.length;s++)if(o=t[s].items||t[s].collapsedItems||[],a=p(e,o||[],i,n-1),a)return a}else if(w(e,t,i)>=0)return t}function g(e,t,i,n){return n?p(e,t,i,n)||[]:t}function _(e,t,i){e._dataByKeyMap&&(e._dataByKeyMap[JSON.stringify(t)]=i,e._dataByKeyMapLength+=i?1:-1)}function f(e,t,i){i=i||new WeakMap;const n=e?Object.create(Object.getPrototypeOf(e)):{};e&&i.set(e,n);const o=h({},e);(0,d.deepExtendArraySafe)(n,o,!0,!0,!0);for(const e in o){const a=o[e],s=null==t?void 0:t[e];(0,u.isObject)(a)&&!(0,u.isPlainObject)(a)&&(0,u.isObject)(s)&&!i.has(a)&&(n[e]=f(a,s,i))}for(const e in n){const t=n[e];(0,u.isObject)(t)&&i.has(t)&&(n[e]=i.get(t))}return n}function m(e,t){const i=f(e,t);return(0,d.deepExtendArraySafe)(i,t,!0,!0,!0)}function v(e){let{keyInfo:t,data:i,changes:n,groupCount:o,useInsertIndex:a,immutable:s,disableCache:r,logError:l,skipCopying:d}=e;const c=!0===s?[...i]:i;return n.forEach((e=>{const i="insert"===e.type?c:g(t,c,e.key,o);switch(!r&&function(e,t){if(e.key()&&(!t._dataByKeyMap||t._dataByKeyMapLength!==t.length)){const i={},n=t.length;for(let o=0;o<n;o++)i[JSON.stringify(e.keyOf(t[o]))]=t[o];t._dataByKeyMap=i,t._dataByKeyMapLength=n}}(t,i),e.type){case"update":y(t,i,e.key,e.data,!0,s,l);break;case"insert":b(t,i,e.data,a&&(0,u.isDefined)(e.index)?e.index:-1,!0,l,d);break;case"remove":x(t,i,e.key,!0,l)}})),c}function C(e,t,i){return e?t&&n.errors.log(i):(0,o.rejectedPromise)(n.errors.Error(i))}function y(e,t,i,n,s,r,l){let c;const h=e.key();if(h){if(function(e,t){let i;const n="string"==typeof t?t.split():t.slice();for(;n.length;)if(i=n.shift(),i in e)return!0;return!1}(n,h)&&!(0,o.keysEqual)(h,i,e.keyOf(n)))return C(s,l,"E4017");if(c=function(e,t){if(e._dataByKeyMap)return e._dataByKeyMap[JSON.stringify(t)]}(t,i),!c){const a=w(e,t,i);if(a<0)return C(s,l,"E4009");if(c=t[a],!0===r&&(0,u.isDefined)(c)){const e=m(c,n);return t[a]=e,!s&&(0,o.trivialPromise)(e,i)}}}else c=i;if((0,d.deepExtendArraySafe)(c,n,!0,!1,!0,!0),!s)return(0,a.default)().useLegacyStoreResult?(0,o.trivialPromise)(i,n):(0,o.trivialPromise)(c,i)}function b(e,t,i,r,d,c,h){let p;const g=e.key(),f=(0,u.isPlainObject)(i)&&!h?(0,l.extend)({},i):i;if(g){if(p=e.keyOf(f),void 0===p||"object"==typeof p&&(0,u.isEmptyObject)(p)){if(Array.isArray(g))throw n.errors.Error("E4007");p=f[g]=String(new s.default)}else if(void 0!==t[w(e,t,p)])return C(d,c,"E4008")}else p=f;if(r>=0?t.splice(r,0,f):t.push(f),_(t,p,f),!d)return(0,o.trivialPromise)((0,a.default)().useLegacyStoreResult?i:f,p)}function x(e,t,i,n,a){const s=w(e,t,i);return s>-1&&(t.splice(s,1),_(t,i,null)),n?s<0?C(n,a,"E4009"):void 0:(0,o.trivialPromise)(i)}function w(e,t,i){const n=e.key();if(!function(e,t){return!e._dataByKeyMap||e._dataByKeyMap[JSON.stringify(t)]}(t,i))return-1;for(let a=0,s=t.length;a<s;a++)if((0,o.keysEqual)(n,e.keyOf(t[a]),i))return a;return-1}},12764:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(65517)),o=i(43792),a=i(82812),s=p(i(66177)),r=i(89358),l=p(i(66636)),d=p(i(64553)),u=i(87739),c=i(11528),h=p(i(77735));function p(e){return e&&e.__esModule?e:{default:e}}const g="totalCount",_="load",f="byKey",m="insert",v="update",C="remove";function y(e){return e&&(0,c.isFunction)(e.then)}function b(e){return(new u.Deferred).resolve(e).promise()}function x(e,t){if(!(0,c.isFunction)(t))throw a.errors.Error("E4011",e)}function w(e){throw a.errors.Error("E4012",e)}function S(e){return function(t){let i;i=t instanceof Error?t:new Error(function(e){const t=e[0],i=e[1];return t&&t.getResponseHeader?(0,r.errorMessageFromXhr)(t,i):null}(arguments)||t&&String(t)||"Unknown error"),i.message!==r.XHR_ERROR_UNLOAD&&e.reject(i)}}function D(e,t){const i=e._loadFunc;let n;return x(_,i),n=i.apply(e,[t]),Array.isArray(n)?n=b(n):null==n?n=b([]):y(n)||w(_),(0,u.fromPromise)(n)}function I(e,t,i,n){if(t.__rawData)n(t.__rawData);else{const o=t.__rawDataPromise||D(t,i);t._cacheRawData&&(t.__rawDataPromise=o),o.always((()=>{delete t.__rawDataPromise})).done((e=>{t._cacheRawData&&(t.__rawData=e),n(e)})).fail((i=>{var n;const o=S(e);null===(n=t._errorHandler)||void 0===n||n.call(t,i),o(i)}))}}function E(e,t,i,o){const a={};"userData"in(i=i||{})&&(a.userData=i.userData),I(e,t,a,(a=>{const r=(0,n.default)(a,{errorHandler:t._errorHandler});let l,c;const h=[];let p,g;o||(l=s.default.queryByOptions(r,i),l===r?p=a.slice(0):h.push(l.enumerate().done((e=>{p=e})))),(i.requireTotalCount||o)&&(c=s.default.queryByOptions(r,i,!0),c===r?g=a.length:h.push(c.count().done((e=>{g=e})))),u.when.apply(d.default,h).done((()=>{o?e.resolve(g):i.requireTotalCount?e.resolve(p,{totalCount:g}):e.resolve(p)})).fail((t=>{e.reject(t)}))}))}const T=h.default.inherit({ctor(e){e=e||{},this.callBase(e),this._useDefaultSearch=!!e.useDefaultSearch||"raw"===e.loadMode,this._loadMode=e.loadMode,this._cacheRawData=!1!==e.cacheRawData,this._loadFunc=e[_],this._totalCountFunc=e[g],this._byKeyFunc=e[f],this._insertFunc=e[m],this._updateFunc=e[v],this._removeFunc=e[C]},_clearCache(){delete this.__rawData},createQuery(){throw a.errors.Error("E4010")},clearRawDataCache(){this._clearCache()},_totalCountImpl(e){let t=new u.Deferred;return"raw"!==this._loadMode||this._totalCountFunc?(function(e,t){const i=e._totalCountFunc;let n;if(!(0,c.isFunction)(i))throw a.errors.Error("E4021");return n=i.apply(e,[t]),y(n)||(n=Number(n),isFinite(n)||w(g),n=b(n)),(0,u.fromPromise)(n)}(this,e).done((e=>{t.resolve(Number(e))})).fail(S(t)),t=this._addFailHandlers(t)):E(t,this,e,!0),t.promise()},_pushImpl(e){this.__rawData&&(0,o.applyBatch)({keyInfo:this,data:this.__rawData,changes:e})},_loadImpl(e){let t=new u.Deferred;return"raw"===this._loadMode?E(t,this,e,!1):(D(this,e).done(((e,i)=>{t.resolve(e,i)})).fail(S(t)),t=this._addFailHandlers(t)),t.promise()},_byKeyImpl(e,t){const i=new u.Deferred;return this._byKeyViaLoad()?(this._requireKey(),function(e,t,i){I(e,t,{},(n=>{const o=t.key();let s;for(let a=0,l=n.length;a<l;a++)if(s=n[a],(0,r.keysEqual)(o,t.keyOf(n[a]),i))return void e.resolve(s);e.reject(a.errors.Error("E4009"))}))}(i,this,e)):function(e,t,i){const n=e._byKeyFunc;let o;return x(f,n),o=n.apply(e,[t,i]),y(o)||(o=b(o)),(0,u.fromPromise)(o)}(this,e,t).done((e=>{i.resolve(e)})).fail(S(i)),i.promise()},_byKeyViaLoad(){return"raw"===this._loadMode&&!this._byKeyFunc},_insertImpl(e){const t=this,i=t._insertFunc;let n;const o=new u.Deferred;return x(m,i),n=i.apply(t,[e]),y(n)||(n=b(n)),(0,u.fromPromise)(n).done((i=>{(0,l.default)().useLegacyStoreResult?o.resolve(e,i):o.resolve(i||e,t.keyOf(i))})).fail(S(o)),o.promise()},_updateImpl(e,t){const i=this._updateFunc;let n;const o=new u.Deferred;return x(v,i),n=i.apply(this,[e,t]),y(n)||(n=b(n)),(0,u.fromPromise)(n).done((i=>{(0,l.default)().useLegacyStoreResult?o.resolve(e,t):o.resolve(i||t,e)})).fail(S(o)),o.promise()},_removeImpl(e){const t=this._removeFunc;let i;const n=new u.Deferred;return x(C,t),i=t.apply(this,[e]),y(i)||(i=b()),(0,u.fromPromise)(i).done((()=>{n.resolve(e)})).fail(S(n)),n.promise()}});t.default=T},17410:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(87129))&&n.__esModule?n:{default:n};const a=(0,i(3104).getWindow)();let s,r;const l=function(e){var t;this.config=e,s="ms-appx:"===a.location.protocol,t=a.location.hostname,r=/^(localhost$|127\.)/i.test(t)};l.prototype={urlFor(e){const t=this.config[e];if(!t)throw o.default.Error("E0006");return t.production&&(s&&!Debug.debuggerEnabled||!s&&!r)?t.production:t.local}};t.default=l},5930:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setErrorHandler=t.handleError=t.errors=t.errorHandler=void 0;var n=a(i(87129)),o=a(i(67264));function a(e){return e&&e.__esModule?e:{default:e}}t.errors=(0,o.default)(n.default.ERROR_MESSAGES,{E4000:"[DevExpress.data]: {0}",E4001:"Unknown aggregating function is detected: '{0}'",E4002:"Unsupported OData protocol version is used",E4003:"Unknown filter operation is used: {0}",E4004:"The thenby() method is called before the sortby() method",E4005:"Store requires a key expression for this operation",E4006:"ArrayStore 'data' option must be an array",E4007:"Compound keys cannot be auto-generated",E4008:"Attempt to insert an item with a duplicated key",E4009:"Data item cannot be found",E4010:"CustomStore does not support creating queries",E4011:"Custom Store method is not implemented or is not a function: {0}",E4012:"Custom Store method returns an invalid value: {0}",E4013:"Local Store requires the 'name' configuration option is specified",E4014:"Unknown data type is specified for ODataStore: {0}",E4015:"Unknown entity name or alias is used: {0}",E4016:"The compileSetter(expr) method is called with 'self' passed as a parameter",E4017:"Keys cannot be modified",E4018:"The server has returned a non-numeric value in a response to an item count request",E4019:"Mixing of group operators inside a single group of filter expression is not allowed",E4020:"Unknown store type is detected: {0}",E4021:"The server response does not provide the totalCount value",E4022:"The server response does not provide the groupCount value",E4023:"Could not parse the following XML: {0}",E4024:"String function {0} cannot be used with the data field {1} of type {2}.",W4000:"Data returned from the server has an incorrect structure",W4001:'The {0} field is listed in both "keyType" and "fieldTypes". The value of "fieldTypes" is used.',W4002:"Data loading has failed for some cells due to the following error: {0}"});let s=t.errorHandler=null;t.handleError=function(e){var t;null===(t=s)||void 0===t||t(e)};t.setErrorHandler=e=>t.errorHandler=s=e},33260:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(92774)),o=l(i(80556)),a=i(82812),s=l(i(55620)),r=l(i(64960));function l(e){return e&&e.__esModule?e:{default:e}}const d=(0,i(3104).getWindow)(),{abstract:u}=s.default,c={dom:s.default.inherit({ctor(e,t){this._store=e,this._dirty=!!t.data,this.save();const i=this._immediate=t.immediate,o=Math.max(100,t.flushInterval||1e4);if(!i){const e=this.save.bind(this);setInterval(e,o),n.default.on(d,"beforeunload",e),d.cordova&&r.default.listen(r.default.getDocument(),"pause",e,!1)}},notifyChanged(){this._dirty=!0,this._immediate&&this.save()},load(){this._store._array=this._loadImpl(),this._dirty=!1},save(){this._dirty&&(this._saveImpl(this._store._array),this._dirty=!1)},_loadImpl:u,_saveImpl:u}).inherit({ctor(e,t){const{name:i}=t;if(!i)throw a.errors.Error("E4013");this._key=`dx-data-localStore-${i}`,this.callBase(e,t)},_loadImpl(){const e=d.localStorage.getItem(this._key);return e?JSON.parse(e):[]},_saveImpl(e){e.length?d.localStorage.setItem(this._key,JSON.stringify(e)):d.localStorage.removeItem(this._key)}})},h=o.default.inherit({ctor(e){e="string"==typeof e?{name:e}:e||{},this.callBase(e),this._backend=new c[e.backend||"dom"](this,e),this._backend.load()},_clearCache(){this._backend.load()},clear(){this.callBase(),this._backend.notifyChanged()},_insertImpl(e){const t=this._backend;return this.callBase(e).done(t.notifyChanged.bind(t))},_updateImpl(e,t){const i=this._backend;return this.callBase(e,t).done(i.notifyChanged.bind(i))},_removeImpl(e){const t=this._backend;return this.callBase(e).done(t.notifyChanged.bind(t))}},"local");t.default=h},45149:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(84816);t.default=function(){const e=Array.isArray(arguments[0])?"array":"remote";return n.queryImpl[e].apply(this,arguments)}},51324:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(65517)),o=i(82812),a=d(i(5842)),s=i(87739),r=i(21274),l=i(11528);function d(e){return e&&e.__esModule?e:{default:e}}const u=function(e,t,i){i=i||[],t=t||{};const d=function(e,t){return{name:e,args:t}},c=function(u){const c=new s.Deferred;let h,p,g,_,f;const m=function(e){const i=t.errorHandler;i&&i(e),(0,o.handleError)(e),c.reject(e)};function v(e){switch(e.name){case"sortBy":return f=[e.args],!0;case"thenBy":if(!f)throw o.errors.Error("E4004");return f.push(e.args),!0}return!1}try{h=t.adapter,(0,l.isFunction)(h)||(h=a.default[h]),p=h(t),g=[].concat(i).concat(u);const{optimize:o}=p;for(o&&o(g);g.length;){if(_=g[0],!v(_)){if(f){g.unshift(d("multiSort",[f])),f=null;continue}if("enumerate"!==String(_.name)&&(!p[_.name]||!1===p[_.name].apply(p,_.args)))break}g.shift()}!function(){const e=g[0],t=[];e&&"multiSort"===e.name&&(g.shift(),(0,r.each)(e.args[0],(function(){t.push(d(t.length?"thenBy":"sortBy",this))}))),g=t.concat(g)}(),p.exec(e).done(((e,i)=>{if(g.length){let i=(0,n.default)(e,{errorHandler:t.errorHandler});(0,r.each)(g,(function(){i=i[this.name].apply(i,this.args)})),i.done(c.resolve).fail(c.reject)}else c.resolve(e,i)})).fail(m)}catch(e){m(e)}return c.promise()},h={};return(0,r.each)(["sortBy","thenBy","filter","slice","select","groupBy"],(function(){const n=String(this);h[n]=function(){return u(e,t,i.concat(d(n,arguments)))}})),(0,r.each)(["count","min","max","sum","avg","aggregate","enumerate"],(function(){const e=String(this);h[e]=function(){return c.call(this,d(e,arguments))}})),h};t.default=u},41943:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(65517))&&n.__esModule?n:{default:n},a=i(89358),s=i(17781),r=i(52576),l=i(21274);function d(e,t){return e=e.groupBy(t[0].selector),t.length>1&&(e=e.select((e=>(0,r.extend)({},e,{items:d((0,o.default)(e.items),t.slice(1)).toArray()})))),e}function u(e,t){const i=[];return(0,l.each)(e,((e,n)=>{(0,s.grep)(t,(e=>n.selector===e.selector)).length<1&&i.push(n)})),i.concat(t)}t.default={multiLevelGroup:d,arrangeSortingInfo:u,queryByOptions:function(e,t,i){var n;t=t||{};const{filter:o}=t;var s,r;if(null!==(n=t)&&void 0!==n&&n.langParams&&(null===(s=(r=e).setLangParams)||void 0===s||s.call(r,t.langParams)),o&&(e=e.filter(o)),i)return e;let{sort:c}=t;const{select:h}=t;let{group:p}=t;const{skip:g}=t,{take:_}=t;return p&&(p=(0,a.normalizeSortingInfo)(p),p.keepInitialKeyOrder=!!t.group.keepInitialKeyOrder),(c||p)&&(c=(0,a.normalizeSortingInfo)(c||[]),p&&!p.keepInitialKeyOrder&&(c=u(p,c)),(0,l.each)(c,(function(t){e=e[t?"thenBy":"sortBy"](this.selector,this.desc,this.compare)}))),h&&(e=e.select(h)),p&&(e=d(e,p)),(_||g)&&(e=e.slice(g||0,_)),e}}},30912:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessageFromXhr=t.base64_encode=t.aggregators=t.XHR_ERROR_UNLOAD=void 0,t.isConjunctiveOperator=function(e){return/^(and|&&|&)$/i.test(e)},t.isDisjunctiveOperator=function(e){return/^(or|\|\||\|)$/i.test(e)},t.rejectedPromise=t.processRequestResultLock=t.normalizeSortingInfo=t.normalizeBinaryCriterion=t.keysEqual=t.isUniformEqualsByOr=t.isUnaryOperation=t.isGroupCriterion=void 0,t.throttleChanges=function(e,t){let i=[];const n=function(e,t){let i;return function(){return i||(i=setTimeout((()=>{i=void 0,e.call(this)}),(0,l.isFunction)(t)?t():t)),i}}((function(){e.call(this,i),i=[]}),t);return function(e){return Array.isArray(e)&&i.push(...e),n.call(this,i)}},t.trivialPromise=void 0;var n=u(i(64960)),o=i(17781),a=i(87739),s=i(21274),r=u(i(3122)),l=i(11528),d=i(3104);function u(e){return e&&e.__esModule?e:{default:e}}const c=r.default.add,h=t.XHR_ERROR_UNLOAD="DEVEXTREME_XHR_ERROR_UNLOAD";t.normalizeBinaryCriterion=function(e){return[e[0],e.length<3?"=":String(e[1]).toLowerCase(),e.length<2||e[e.length-1]]};t.normalizeSortingInfo=function(e){return Array.isArray(e)||(e=[e]),(0,s.map)(e,(e=>{const t={selector:(0,l.isFunction)(e)||"string"==typeof e?e:e.getter||e.field||e.selector,desc:!(!e.desc&&"d"!==String(e.dir).charAt(0).toLowerCase())};return e.compare&&(t.compare=e.compare),t}))};t.errorMessageFromXhr=function(){const e={timeout:"Network connection timeout",error:"Unspecified network error",parsererror:"Unexpected server response"};let t;return c((()=>{const e=(0,d.getWindow)();n.default.listen(e,"beforeunload",(()=>{t=!0}))})),function(i,n){return t?h:i.status<400?function(t){let i=e[t];return i||t}(n):i.statusText}}(),t.aggregators={count:{seed:0,step:e=>1+e},sum:{seed:0,step:(e,t)=>e+t},min:{step:(e,t)=>t<e?t:e},max:{step:(e,t)=>t>e?t:e},avg:{seed:[0,0],step:(e,t)=>[e[0]+t,e[1]+1],finalize:e=>e[1]?e[0]/e[1]:NaN}},t.processRequestResultLock=function(){let e,t=0;return{obtain:function(){0===t&&(e=new a.Deferred),t++},release:function(){t--,t<1&&e.resolve()},promise:function(){return(0===t?(new a.Deferred).resolve():e).promise()},reset:function(){t=0,e&&e.resolve()}}}();t.keysEqual=function(e,t,i){if(Array.isArray(e)){const e=(0,s.map)(t,((e,t)=>t));let n;for(let a=0;a<e.length;a++)if(n=e[a],!(0,o.equalByValue)(t[n],i[n],{strict:!1}))return!1;return!0}return(0,o.equalByValue)(t,i,{strict:!1})};t.base64_encode=function(e){Array.isArray(e)||(e=function(e){const t=[];let i,n;for(n=0;n<e.length;n++)i=e.charCodeAt(n),i<128?t.push(i):i<2048?t.push(192+(i>>6),128+(63&i)):i<65536?t.push(224+(i>>12),128+(i>>6&63),128+(63&i)):i<2097152&&t.push(240+(i>>18),128+(i>>12&63),128+(i>>6&63),128+(63&i));return t}(String(e)));let t="";function i(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)}for(let n=0;n<e.length;n+=3){const o=e[n],a=e[n+1],r=e[n+2];t+=(0,s.map)([o>>2,(3&o)<<4|a>>4,isNaN(a)?64:(15&a)<<2|r>>6,isNaN(r)?64:63&r],i).join("")}return t};t.isUnaryOperation=function(e){return"!"===e[0]&&Array.isArray(e[1])};t.isUniformEqualsByOr=function(e){if(e.length>2&&Array.isArray(e[0])&&"or"===e[1]&&"string"==typeof e[0][0]&&"="===e[0][1]){const[t]=e[0];return!e.find(((e,i)=>i%2!=0?"or"!==e:!Array.isArray(e)||3!==e.length||e[0]!==t||"="!==e[1]))}return!1};t.isGroupCriterion=function(e){const t=e[0],i=e[1];return!!Array.isArray(t)||!(!(0,l.isFunction)(t)||!Array.isArray(i)&&!(0,l.isFunction)(i)&&"and"!==(n=i)&&"or"!==n);var n};t.trivialPromise=function(){const e=new a.Deferred;return e.resolve.apply(e,arguments).promise()};t.rejectedPromise=function(){const e=new a.Deferred;return e.reject.apply(e,arguments).promise()}},58824:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(65001);var n=h(i(26098)),o=h(i(29284)),a=h(i(55620)),s=i(87739),r=i(52576),l=i(21274),d=i(11528),u=i(5930),c=i(14606);function h(e){return e&&e.__esModule?e:{default:e}}const p=a.default.inherit({ctor(e){this._requestDispatcher=new n.default(e),this._errorHandler=e.errorHandler,(0,l.each)(e.entities||[],((t,i)=>{this[t]=new o.default((0,r.extend)({},e,{url:`${this._requestDispatcher.url}/${encodeURIComponent(i.name||t)}`},i))}))},get(e,t){return this.invoke(e,t,"GET")},invoke(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"POST";i=i.toLowerCase();const n=new s.Deferred;let o,a=`${this._requestDispatcher.url}/${encodeURIComponent(e)}`;return 4===this.version()&&("get"===i?(a=(0,c.formatFunctionInvocationUrl)(a,(0,c.escapeServiceOperationParams)(t,this.version())),t=null):"post"===i&&(o=t,t=null)),(0,s.when)(this._requestDispatcher.sendRequest(a,i,(0,c.escapeServiceOperationParams)(t,this.version()),o)).done((t=>{(0,d.isPlainObject)(t)&&e in t&&(t=t[e]),n.resolve(t)})).fail(this._errorHandler).fail(u.handleError).fail(n.reject),n.promise()},objectLink(e,t){const i=this[e];if(!i)throw u.errors.Error("E4015",e);return(0,d.isDefined)(t)?{__metadata:{uri:i._byKeyUrl(t)}}:null},version(){return this._requestDispatcher.version}});t.default=p},61575:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.odata=void 0;var n=c(i(5842)),o=c(i(66636)),a=i(52576),s=i(21274),r=i(11528),l=i(5930),d=i(30912),u=i(14606);function c(e){return e&&e.__esModule?e:{default:e}}const h=["contains","notcontains","startswith","endswith"],p=(()=>{let e,t,i;const n=e=>(t,i)=>`${t} ${e} ${i}`,r=(e,i)=>(n,o)=>{const a=[e,"("];return t&&(n=-1===n.indexOf("tolower(")?`tolower(${n})`:n,o=o.toLowerCase()),i?a.push(o,",",n):a.push(n,",",o),a.push(")"),a.join("")},c={"=":n("eq"),"<>":n("ne"),">":n("gt"),">=":n("ge"),"<":n("lt"),"<=":n("le"),startswith:r("startswith"),endswith:r("endswith")},p=(0,a.extend)({},c,{contains:r("substringof",!0),notcontains:r("not substringof",!0)}),g=(0,a.extend)({},c,{contains:r("contains"),notcontains:r("not contains")}),_=t=>{var n;const o=(t=(0,d.normalizeBinaryCriterion)(t))[1],a=t[0],s=i&&i[a];if(s&&(r=o,h.some((e=>e===r)))&&"String"!==s)throw new l.errors.Error("E4024",o,a,s);var r;const c=(4===e?g:p)[o.toLowerCase()];if(!c)throw l.errors.Error("E4003",o);let _=t[2];return null!==(n=i)&&void 0!==n&&n[a]&&(_=(0,u.convertPrimitiveValue)(i[a],_)),c((0,u.serializePropName)(a),(0,u.serializeValue)(_,e))},f=e=>{const t=[];let i,n;return(0,s.each)(e,(function(e,o){if(Array.isArray(o)){if(t.length>1&&i!==n)throw new l.errors.Error("E4019");t.push(`(${m(o)})`),i=n,n="and"}else n=(0,d.isConjunctiveOperator)(this)?"and":"or"})),t.join(` ${i} `)},m=e=>Array.isArray(e[0])?f(e):(0,d.isUnaryOperation)(e)?(e=>{const t=e[0],i=m(e[1]);if("!"===t)return`not (${i})`;throw l.errors.Error("E4003",t)})(e):_(e);return(n,a,s,r)=>(i=s,t=r??(0,o.default)().oDataFilterToLower,e=a,m(n))})(),g=e=>{let t=[];const i=[],n=e.expand;let o,s,l,d;const c=e.version||4,h=()=>s||void 0!==l,g=e=>{for(let t=0;t<e.length;t++){if((0,r.isFunction)(e[t]))return!0;if(Array.isArray(e[t])&&g(e[t]))return!0}return!1},_=()=>{const a={};if(d||(t.length&&(a.$orderby=t.join(",")),s&&(a.$skip=s),void 0!==l&&(a.$top=l),a.$select=(0,u.generateSelect)(c,o)||void 0,a.$expand=(0,u.generateExpand)(c,n,o)||void 0),i.length){const t=i.length<2?i[0]:i,n=null==e?void 0:e.fieldTypes,o=null==e?void 0:e.filterToLower;a.$filter=p(t,c,n,o)}return d&&(a.$top=0),(e.requireTotalCount||d)&&(4!==c?a.$inlinecount="allpages":a.$count="true"),a};return{optimize:e=>{let t=-1;for(let i=0;i<e.length;i++)if("select"===e[i].name){t=i;break}if(t<0||!(0,r.isFunction)(e[t].args[0]))return;const i=e[1+t];i&&"slice"===i.name&&(e[1+t]=e[t],e[t]=i)},exec:t=>(0,u.sendRequest)(c,{url:t,params:(0,a.extend)(_(),null==e?void 0:e.params)},{beforeSend:e.beforeSend,jsonp:e.jsonp,withCredentials:e.withCredentials,countOnly:d,deserializeDates:e.deserializeDates,fieldTypes:e.fieldTypes,isPaged:isFinite(l)}),multiSort(e){let i;if(h())return!1;for(let t=0;t<e.length;t++){const n=e[t][0],o=!!e[t][1];let a;if("string"!=typeof n)return!1;a=(0,u.serializePropName)(n),o&&(a+=" desc"),i=i||[],i.push(a)}t=i},slice(e,t){if(h())return!1;s=e,l=t},filter(e){return!h()&&(Array.isArray(e)||(e=[].slice.call(arguments)),!g(e)&&(i.length&&i.push("and"),void i.push(e)))},select(e){if(o||(0,r.isFunction)(e))return!1;Array.isArray(e)||(e=[].slice.call(arguments)),o=e},count:()=>d=!0}};n.default.odata=g;t.odata=g},8920:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(65001);var n=i(8056);t.default=class{constructor(e){e=e||{},this._url=String(e.url).replace(/\/+$/,""),this._beforeSend=e.beforeSend,this._jsonp=e.jsonp,this._version=e.version||4,this._withCredentials=e.withCredentials,this._deserializeDates=e.deserializeDates,this._filterToLower=e.filterToLower}sendRequest(e,t,i,o){return(0,n.sendRequest)(this.version,{url:e,method:t,params:i||{},payload:o},{beforeSend:this._beforeSend,jsonp:this._jsonp,withCredentials:this._withCredentials,deserializeDates:this._deserializeDates})}get version(){return this._version}get beforeSend(){return this._beforeSend}get url(){return this._url}get jsonp(){return this._jsonp}get filterToLower(){return this._filterToLower}}},17594:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(65001);var n=i(82812),o=c(i(26098)),a=c(i(30771)),s=c(i(66636)),r=i(87739),l=i(11528),d=c(i(77735)),u=i(14606);function c(e){return e&&e.__esModule?e:{default:e}}const h=d.default.inherit({ctor(e){this.callBase(e),this._requestDispatcher=new o.default(e);let t=this.key(),{fieldTypes:i}=e,{keyType:a}=e;if(a){const e="string"==typeof a;t||(t=e?"5d46402c-7899-4ea9-bd81-8b73c47c7683":Object.keys(a),this._legacyAnonymousKey=t),e&&(a=((e,t)=>({[e]:t}))(t,a)),i=((e,t)=>{const i={};for(const t in e)i[t]=e[t];for(const e in t)e in i?i[e]!==t[e]&&n.errors.log("W4001",e):i[e]=t[e];return i})(i,a)}this._fieldTypes=i||{},2===this.version()?this._updateMethod="MERGE":this._updateMethod="PATCH"},_customLoadOptions:()=>["expand","customQueryParams"],_byKeyImpl(e,t){const i={};return t&&(i.$expand=(0,u.generateExpand)(this.version(),t.expand,t.select)||void 0,i.$select=(0,u.generateSelect)(this.version(),t.select)||void 0),this._requestDispatcher.sendRequest(this._byKeyUrl(e),"GET",i)},createQuery(e){let t;const i={adapter:"odata",beforeSend:this._requestDispatcher.beforeSend,errorHandler:this._errorHandler,jsonp:this._requestDispatcher.jsonp,version:this._requestDispatcher.version,withCredentials:this._requestDispatcher._withCredentials,expand:null==e?void 0:e.expand,requireTotalCount:null==e?void 0:e.requireTotalCount,deserializeDates:this._requestDispatcher._deserializeDates,fieldTypes:this._fieldTypes};if(t=(null==e?void 0:e.urlOverride)??this._requestDispatcher.url,(0,l.isDefined)(this._requestDispatcher.filterToLower)&&(i.filterToLower=this._requestDispatcher.filterToLower),null!=e&&e.customQueryParams){const n=(0,u.escapeServiceOperationParams)(null==e?void 0:e.customQueryParams,this.version());4===this.version()?t=(0,u.formatFunctionInvocationUrl)(t,n):i.params=n}return(0,a.default)(t,i)},_insertImpl(e){this._requireKey();const t=new r.Deferred;return(0,r.when)(this._requestDispatcher.sendRequest(this._requestDispatcher.url,"POST",null,e)).done((i=>t.resolve(i&&!(0,s.default)().useLegacyStoreResult?i:e,this.keyOf(i)))).fail(t.reject),t.promise()},_updateImpl(e,t){const i=new r.Deferred;return(0,r.when)(this._requestDispatcher.sendRequest(this._byKeyUrl(e),this._updateMethod,null,t)).done((n=>(0,s.default)().useLegacyStoreResult?i.resolve(e,t):i.resolve(n||t,e))).fail(i.reject),i.promise()},_removeImpl(e){const t=new r.Deferred;return(0,r.when)(this._requestDispatcher.sendRequest(this._byKeyUrl(e),"DELETE")).done((()=>t.resolve(e))).fail(t.reject),t.promise()},_convertKey(e){let t=e;const i=this._fieldTypes,n=this.key()||this._legacyAnonymousKey;if(Array.isArray(n)){t={};for(let o=0;o<n.length;o++){const a=n[o];t[a]=(0,u.convertPrimitiveValue)(i[a],e[a])}}else i[n]&&(t=(0,u.convertPrimitiveValue)(i[n],e));return t},_byKeyUrl(e){const t=this._requestDispatcher.url,i=this._convertKey(e);return`${t}(${encodeURIComponent((0,u.serializeKey)(i,this.version()))})`},version(){return this._requestDispatcher.version}},"odata");t.default=h},14606:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeValue=t.serializePropName=t.serializeKey=t.sendRequest=t.keyConverters=t.generateSelect=t.generateExpand=t.formatFunctionInvocationUrl=t.escapeServiceOperationParams=t.convertPrimitiveValue=t.EdmLiteral=void 0;var n=i(82812),o=i(89358),a=g(i(55620)),s=g(i(19427)),r=g(i(78670)),l=i(17781),d=i(87739),u=i(52576),c=i(21274),h=i(54497),p=i(11528);function g(e){return e&&e.__esModule?e:{default:e}}const _=/^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$/,f=/^\/Date\((-?\d+)((\+|-)?(\d+)?)\)\/$/,m=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[-+]{1}\d{2}(:?)(\d{2})?)?$/,v="application/json;odata=verbose",C=e=>"string"===(0,p.type)(e)?e.split():e,y=e=>/\./.test(e),b=(e,t,i)=>{for(e=String(e);e.length<t;)e=i?`${e}0`:`0${e}`;return e},x=(e,t,i)=>{const n=[],o=e=>b(e,2);return n.push(e.getFullYear()),n.push("-"),n.push(o(e.getMonth()+1)),n.push("-"),n.push(o(e.getDate())),t&&e.getHours()+e.getMinutes()+e.getSeconds()+e.getMilliseconds()<1||(n.push("T"),n.push(o(e.getHours())),n.push(":"),n.push(o(e.getMinutes())),n.push(":"),n.push(o(e.getSeconds())),e.getMilliseconds()&&(n.push("."),n.push(b(e.getMilliseconds(),3))),i||n.push("Z")),n.join("")},w=(e,t,i)=>{const{deserializeDates:a,fieldTypes:s,countOnly:l,isPaged:c}=i,h=new d.Deferred,p=function(e,t){var i;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=(0,u.extend)({async:!0,method:"get",url:"",params:{},payload:null,headers:{},timeout:3e4},t),null===(i=o.beforeSend)||void 0===i||i.call(o,t);const{async:a,timeout:s,headers:r}=t;let{url:l,method:d}=t;const{jsonp:c,withCredentials:h}=o;d=(d||"get").toLowerCase();const p="get"===d,g=p&&c,_=(0,u.extend)({},t.params),f=p?_:(m=t.payload,JSON.stringify(m,(function(t,i){if(!(this[t]instanceof Date))return i;switch(i=x(this[t]),e){case 2:return i.substr(0,i.length-1);case 3:case 4:return i;default:throw n.errors.Error("E4002")}})));var m;const C=!p&&(e=>{const t=[];for(const i in e)t.push(`${i}=${e[i]}`);return t.join("&")})(_),y=!p&&v;return C&&(l+=(l.indexOf("?")>-1?"&":"?")+C),g&&(f.$format="json"),{url:l,data:f,dataType:g?"jsonp":"json",jsonp:g&&"$callback",method:d,async:a,timeout:s,headers:r,contentType:y,accepts:{json:[v,"text/plain"].join()},xhrFields:{withCredentials:h}}}(e,t,i);return r.default.sendRequest(p).always(((t,r)=>{const d=S(t,r,{deserializeDates:a,fieldTypes:s},p),{error:u,data:g,count:_}=d;let{nextUrl:f}=d;if(u)u.message!==o.XHR_ERROR_UNLOAD&&h.reject(u);else if(l)isFinite(_)?h.resolve(_):h.reject(n.errors.Error("E4018"));else if(f&&!c)/^(?:[a-z]+:)?\/{2,2}/i.test(f)||(f=((e,t)=>{let i;const n=(e=>{const t=e.indexOf("?");return t>-1?e.substr(0,t):e})(e).split("/"),o=t.split("/");for(n.pop();o.length;)i=o.shift(),".."===i?n.pop():n.push(i);return n.join("/")})(p.url,f)),w(e,{url:f},i).fail(h.reject).done((e=>h.resolve(g.concat(e))));else{const e=isFinite(_)?{totalCount:_}:void 0;h.resolve(g,e)}})),h.promise()};t.sendRequest=w;const S=(e,t,i,n)=>{const a=((e,t,i)=>{var n,a,s,r;if("nocontent"===t)return null;let l="Unknown error",d=e,c=200;const h={requestOptions:i};if("success"!==t){const{status:i,responseText:n}=e;c=i,l=(0,o.errorMessageFromXhr)(e,t);try{d=JSON.parse(n)}catch(e){}}const p=(null===(n=d)||void 0===n?void 0:n.then)||(null===(a=d)||void 0===a?void 0:a.error)||(null===(s=d)||void 0===s?void 0:s["odata.error"])||(null===(r=d)||void 0===r?void 0:r["@odata.error"]);if(p){l=(e=>{let t,i,n=e;var o;"message"in e&&(t=(null===(o=e.message)||void 0===o?void 0:o.value)||e.message);for(;(n=n.innererror||n.internalexception)&&(i=n.message,t=i??t,!n.internalexception||-1!==t.indexOf("inner exception")););return t})(p)||l,h.errorDetails=p,200===c&&(c=500);const e=Number(p.code);isFinite(e)&&e>=400&&(c=e)}return c>=400||0===c?(h.httpStatus=c,(0,u.extend)(Error(l),h)):null})(e,t,n);if(a)return{error:a};if(!(0,p.isPlainObject)(e))return{data:e};const s="d"in e&&(Array.isArray(e.d)||(0,p.isObject)(e.d))?D(e):I(e);return T(s,i),s},D=e=>{let{d:t}=e;return(0,p.isDefined)(t)?{data:t.results??t,nextUrl:t.__next,count:parseInt(t.__count,10)}:{error:Error("Malformed or unsupported JSON response received")}},I=e=>({data:e.value??e,nextUrl:e["@odata.nextLink"],count:parseInt(e["@odata.count"],10)}),E=t.EdmLiteral=a.default.inherit({ctor(e){this._value=e},valueOf(){return this._value}}),T=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,c.each)(e,((i,n)=>{if(null!==n&&"object"==typeof n)"results"in n&&(e[i]=n.results),T(e[i],t);else if("string"==typeof n){const{fieldTypes:o,deserializeDates:a}=t;if((!o||"String"!==o[i])&&_.test(n)&&(e[i]=new s.default(n)),!1!==a)if(f.exec(n)){const t=new Date(Number(RegExp.$1)+60*RegExp.$2*1e3);e[i]=new Date(t.valueOf()+60*t.getTimezoneOffset()*1e3)}else m.test(n)&&(e[i]=new Date((e=>{const t=new Date(60*new Date(0).getTimezoneOffset()*1e3),i=e.replace("Z","").split("T"),n=/(\d{4})-(\d{2})-(\d{2})/.exec(i[0]),o=/(\d{2}):(\d{2}):(\d{2})\.?(\d{0,7})?/.exec(i[1]);if(t.setFullYear(Number(n[1])),t.setMonth(Number(n[2])-1),t.setDate(Number(n[3])),Array.isArray(o)&&o.length){t.setHours(Number(o[1])),t.setMinutes(Number(o[2])),t.setSeconds(Number(o[3]));let e=(o[4]||"").slice(0,3);e=b(e,3,!0),t.setMilliseconds(Number(e))}return t})(e[i]).valueOf()))}}))},A=e=>e instanceof E?e.valueOf():e.replace(/\./g,"/");t.serializePropName=A;const O=e=>e instanceof Date?x(e,!1,!1):e instanceof s.default?e.valueOf():Array.isArray(e)?`[${e.map((e=>O(e))).join(",")}]`:P(e),P=e=>e instanceof Date?`datetime'${x(e,!0,!0)}'`:e instanceof s.default?`guid'${e}'`:e instanceof E?e.valueOf():"string"==typeof e?(e=>`'${e.replace(/'/g,"''")}'`)(e):String(e),k=(e,t)=>{switch(t){case 2:case 3:return P(e);case 4:return O(e);default:throw n.errors.Error("E4002")}};t.serializeValue=k;t.serializeKey=(e,t)=>{if((0,p.isPlainObject)(e)){const i=[];return(0,c.each)(e,((e,n)=>i.push(`${A(e)}=${k(n,t)}`))),i.join()}return k(e,t)};const M=t.keyConverters={String:e=>`${e}`,Int32:e=>Math.floor(e),Int64:e=>e instanceof E?e:new E(`${e}L`),Guid:e=>e instanceof s.default?e:new s.default(e),Boolean:e=>!!e,Single:e=>e instanceof E?e:new E(`${e}f`),Decimal:e=>e instanceof E?e:new E(`${e}m`)};t.convertPrimitiveValue=(e,t)=>{if(null===t)return null;const i=M[e];if(!i)throw n.errors.Error("E4014",e);return i(t)};t.generateSelect=(e,t)=>{if(t)return e<4?A(t.join()):(0,l.grep)(t,y,!0).join()};const R=e=>{let t="";const i=[],n=[];return(0,c.each)(e,((e,t)=>{Array.isArray(t)&&[].push.apply(i,t),(0,p.isPlainObject)(t)&&n.push(`${e}${R(t)}`)})),(i.length||n.length)&&(t+="(",i.length&&(t+=`$select=${(0,c.map)(i,A).join()}`),n.length&&(i.length&&(t+=";"),t+=`$expand=${(0,c.map)(n,A).join()}`),t+=")"),t},L=(e,t,i)=>{const n=i(t,e.shift(),e);!1!==n&&L(e,n,i)},B=(e,t,i)=>(0,c.each)(e,((e,n)=>L(n.split("."),t,i))),V=(e,t)=>{const i={};return e&&(0,c.each)(C(e),(function(){i[A(this)]=1})),t&&(0,c.each)(C(t),(function(){const e=this.split(".");e.length<2||(e.pop(),i[A(e.join("."))]=1)})),(0,c.map)(i,((e,t)=>t)).join()},F=(e,t)=>{const i={};if(e||t)return e&&B(C(e),i,((e,t,i)=>(e[t]=e[t]||{},!!i.length&&e[t]))),t&&B((0,l.grep)(C(t),y),i,((e,t,i)=>i.length?e[t]=e[t]||{}:(e[t]=e[t]||[],e[t].push(t),!1))),(e=>{const t=[];return(0,c.each)(e,((e,i)=>t.push(`${e}${R(i)}`))),t.join()})(i)};t.generateExpand=(e,t,i)=>e<4?V(t,i):F(t,i);t.formatFunctionInvocationUrl=(e,t)=>(0,h.format)("{0}({1})",e,(0,c.map)(t||{},((e,t)=>(0,h.format)("{0}={1}",t,e))).join(","));t.escapeServiceOperationParams=(e,t)=>{if(!e)return e;const i={};return(0,c.each)(e,((e,n)=>{i[e]=k(n,t)})),i}},32621:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(87739),a=(n=i(80556))&&n.__esModule?n:{default:n},s=i(68216),r=i(97169),l=i(52576),d=i(11528);t.default=class{constructor(e,t){let{key:i}=t;this._isSharedDataSource=!1,this._keyExpr=i,this.updateDataSource(e)}_updateDataSource(e){if(e)if(e instanceof s.DataSource)this._isSharedDataSource=!0,this._dataSource=e;else{const t=(0,r.normalizeDataSourceOptions)(e);this._dataSource=new s.DataSource((0,l.extend)(!0,{},{},t))}}_updateDataSourceByItems(e){this._dataSource=new s.DataSource({store:new a.default({key:this.key(),data:e}),pageSize:0})}_disposeDataSource(){this._dataSource&&(this._isSharedDataSource?this._isSharedDataSource=!1:this._dataSource.dispose(),delete this._dataSource)}load(){return this._dataSource.load()}loadSingle(e,t){if(!this._dataSource)return(new o.Deferred).reject();let i=e,n=t;return arguments.length<2&&(n=e,i=this.key()),this._dataSource.loadSingle(i,n)}loadFromStore(e){return this.store().load(e)}loadNextPage(){return this.pageIndex(1+this.pageIndex()),this.load()}loadOptions(){return this._dataSource.loadOptions()}userData(){return this._dataSource._userData}cancel(e){this._dataSource.cancel(e)}cancelAll(){this._dataSource.cancelAll()}filter(e){return this._dataSource.filter(e)}addSearchFilter(e){this._dataSource._addSearchFilter(e)}group(e){return this._dataSource.group(e)}paginate(){return this._dataSource.paginate()}pageSize(){return this._dataSource._pageSize}pageIndex(e){return void 0===e?this._dataSource.pageIndex(void 0):this._dataSource.pageIndex(e)}resetDataSource(){this._disposeDataSource()}resetDataSourcePageIndex(){this.pageIndex()&&(this.pageIndex(0),this.load())}updateDataSource(e,t){const i=e??this.items();t&&(this._keyExpr=t),this._disposeDataSource(),Array.isArray(i)?this._updateDataSourceByItems(i):this._updateDataSource(i)}totalCount(){return this._dataSource.totalCount()}isLastPage(){return this._dataSource.isLastPage()||!this._dataSource._pageSize}isLoading(){return this._dataSource.isLoading()}isLoaded(){return this._dataSource.isLoaded()}searchValue(e){return this._dataSource.searchValue(e)}searchOperation(e){return this._dataSource.searchOperation(e)}searchExpr(e){return this._dataSource.searchExpr(e)}select(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this._dataSource.select(t)}key(){var e;const t=null===(e=this._dataSource)||void 0===e?void 0:e.key();return(0,d.isDefined)(t)&&"this"===this._keyExpr?t:this._keyExpr}keyOf(e){return this.store().keyOf(e)}store(){return this._dataSource.store()}items(){var e;return null===(e=this._dataSource)||void 0===e?void 0:e.items()}applyMapFunction(e){return this._dataSource._applyMapFunction(e)}getDataSource(){return this._dataSource??null}reload(){return this._dataSource.reload()}on(e,t){this._dataSource.on(e,t)}off(e,t){this._dataSource.off(e,t)}}},14911:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.lock=t.inactive=t.active=void 0;var n=c(i(59e3)),o=c(i(81411)),a=c(i(89797)),s=i(98834),r=c(i(55620)),l=i(17781),d=i(86858),u=c(i(98905));function c(e){return e&&e.__esModule?e:{default:e}}const h=t.active="dxactive",p=t.inactive="dxinactive",g=r.default.inherit({ctor(e,t){this._timeout=e,this._fire=t},start(){const e=this;this._schedule((()=>{e.force()}))},_schedule(e){this.stop(),this._timer=setTimeout(e,this._timeout)},stop(){clearTimeout(this._timer)},force(){this._fired||(this.stop(),this._fire(),this._fired=!0)},fired(){return this._fired}});let _;const f=n.default.inherit({ctor(){this.callBase.apply(this,arguments),this._active=new g(0,l.noop),this._inactive=new g(0,l.noop)},configure(e,t){switch(t){case h:e.activeTimeout=e.timeout;break;case p:e.inactiveTimeout=e.timeout}this.callBase(e)},start(e){if(_){const e=(0,d.contains)(this.getElement().get(0),_.getElement().get(0)),t=!_._active.fired();if(e&&t)return void this._cancel();_._inactive.force()}_=this,this._initEvents(e),this._active.start()},_initEvents(e){const t=this,i=this._getEmitterTarget(e),n=(0,s.isMouseEvent)(e),o=u.default.isSimulator()||!n,a=(0,l.ensureDefined)(this.activeTimeout,30),r=(0,l.ensureDefined)(this.inactiveTimeout,400);this._active=new g(o?a:0,(()=>{t._fireEvent(h,e,{target:i})})),this._inactive=new g(o?r:0,(()=>{t._fireEvent(p,e,{target:i}),_=null}))},cancel(e){this.end(e)},end(e){const t=e.type!==a.default.up;t?this._active.stop():this._active.force(),this._inactive.start(),t&&this._inactive.force()},dispose(){this._active.stop(),this._inactive.stop(),_===this&&(_=null),this.callBase()},lockInactive(){return this._active.force(),this._inactive.stop(),_=null,this._cancel(),this._inactive.force.bind(this._inactive)}});f.lock=function(e){const t=_?_.lockInactive():l.noop;e.done(t)},(0,o.default)({emitter:f,events:[h,p]});const{lock:m}=f;t.lock=m},96292:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(98834),o=d(i(55620)),a=d(i(64553)),s=d(i(84718)),r=i(17781),l=i(52576);function d(e){return e&&e.__esModule?e:{default:e}}const u=o.default.inherit({ctor(e){this._$element=(0,a.default)(e),this._cancelCallback=(0,s.default)(),this._acceptCallback=(0,s.default)()},getElement(){return this._$element},validate:e=>!(0,n.isDxMouseWheelEvent)(e),validatePointers:e=>1===(0,n.hasTouches)(e),allowInterruptionByMouseWheel:()=>!0,configure(e){(0,l.extend)(this,e)},addCancelCallback(e){this._cancelCallback.add(e)},removeCancelCallback(){this._cancelCallback.empty()},_cancel(e){this._cancelCallback.fire(this,e)},addAcceptCallback(e){this._acceptCallback.add(e)},removeAcceptCallback(){this._acceptCallback.empty()},_accept(e){this._acceptCallback.fire(this,e)},_requestAccept(e){this._acceptRequestEvent=e},_forgetAccept(){this._accept(this._acceptRequestEvent),this._acceptRequestEvent=null},start:r.noop,move:r.noop,end:r.noop,cancel:r.noop,reset(){this._acceptRequestEvent&&this._accept(this._acceptRequestEvent)},_fireEvent(e,t,i){const o=(0,l.extend)({type:e,originalEvent:t,target:this._getEmitterTarget(t),delegateTarget:this.getElement().get(0)},i);return(t=(0,n.fireEvent)(o)).cancel&&this._cancel(t),t},_getEmitterTarget(e){return(this.delegateSelector?(0,a.default)(e.target).closest(this.delegateSelector):this.getElement()).get(0)},dispose:r.noop});t.default=u},58063:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_(i(15273)),o=_(i(92774)),a=i(37373),s=_(i(89797)),r=i(98834),l=_(i(55620)),d=_(i(64960)),u=i(74663),c=_(i(64553)),h=i(52576),p=i(21274),g=_(i(3122));function _(e){return e&&e.__esModule?e:{default:e}}const f="dxEventManager",m="dxEmitter",v=new(l.default.inherit({ctor(){this._attachHandlers(),this.reset(),this._proxiedCancelHandler=this._cancelHandler.bind(this),this._proxiedAcceptHandler=this._acceptHandler.bind(this)},_attachHandlers(){g.default.add((()=>{const e=d.default.getDocument();o.default.subscribeGlobal(e,(0,r.addNamespace)(s.default.down,f),this._pointerDownHandler.bind(this)),o.default.subscribeGlobal(e,(0,r.addNamespace)(s.default.move,f),this._pointerMoveHandler.bind(this)),o.default.subscribeGlobal(e,(0,r.addNamespace)([s.default.up,s.default.cancel].join(" "),f),this._pointerUpHandler.bind(this)),o.default.subscribeGlobal(e,(0,r.addNamespace)(a.name,f),this._mouseWheelHandler.bind(this))}))},_eachEmitter(e){const t=this._activeEmitters||[];let i=0;for(;t.length>i;){const n=t[i];if(!1===e(n))break;t[i]===n&&i++}},_applyToEmitters(e,t){this._eachEmitter((i=>{i[e].call(i,t)}))},reset(){this._eachEmitter(this._proxiedCancelHandler),this._activeEmitters=[]},resetEmitter(e){this._proxiedCancelHandler(e)},_pointerDownHandler(e){(0,r.isMouseEvent)(e)&&e.which>1||this._updateEmitters(e)},_updateEmitters(e){this._isSetChanged(e)&&(this._cleanEmitters(e),this._fetchEmitters(e))},_isSetChanged(e){const t=this._closestEmitter(e),i=this._emittersSet||[];let n=t.length!==i.length;return(0,p.each)(t,((e,t)=>(n=n||i[e]!==t,!n))),this._emittersSet=t,n},_closestEmitter(e){const t=this,i=[];let n=(0,c.default)(e.target);function o(n,o){o&&o.validatePointers(e)&&o.validate(e)&&(o.addCancelCallback(t._proxiedCancelHandler),o.addAcceptCallback(t._proxiedAcceptHandler),i.push(o))}for(;n.length;){const e=(0,u.data)(n.get(0),m)||[];(0,p.each)(e,o),n=n.parent()}return i},_acceptHandler(e,t){this._eachEmitter((i=>{i!==e&&this._cancelEmitter(i,t)}))},_cancelHandler(e,t){this._cancelEmitter(e,t)},_cancelEmitter(e,t){const i=this._activeEmitters;t?e.cancel(t):e.reset(),e.removeCancelCallback(),e.removeAcceptCallback();const n=i.indexOf(e);n>-1&&i.splice(n,1)},_cleanEmitters(e){this._applyToEmitters("end",e),this.reset(e)},_fetchEmitters(e){this._activeEmitters=this._emittersSet.slice(),this._applyToEmitters("start",e)},_pointerMoveHandler(e){this._applyToEmitters("move",e)},_pointerUpHandler(e){this._updateEmitters(e)},_mouseWheelHandler(e){this._allowInterruptionByMouseWheel()&&(e.pointers=[null],this._pointerDownHandler(e),this._adjustWheelEvent(e),this._pointerMoveHandler(e),e.pointers=[],this._pointerUpHandler(e))},_allowInterruptionByMouseWheel(){let e=!0;return this._eachEmitter((t=>(e=t.allowInterruptionByMouseWheel()&&e,e))),e},_adjustWheelEvent(e){let t=null;if(this._eachEmitter((i=>{if(!i.gesture)return;const n=i.getDirection(e);return"horizontal"!==n&&!e.shiftKey||"vertical"!==n&&e.shiftKey?(t=i,!1):void 0})),!t)return;const i=t.getDirection(e),n="both"===i&&!e.shiftKey||"vertical"===i;e[n?"pageY":"pageX"]+=e.delta},isActive(e){let t=!1;return this._eachEmitter((i=>{t=t||i.getElement().is(e)})),t}})),C="dxEmitterSubscription";t.default=function(e){const t=e.emitter,i=e.events[0],o=e.events;(0,p.each)(o,((a,s)=>{(0,n.default)(s,{noBubble:!e.bubble,setup(e){const n=(0,u.data)(e,C)||{},o=(0,u.data)(e,m)||{},a=o[i]||new t(e);n[s]=!0,o[i]=a,(0,u.data)(e,m,o),(0,u.data)(e,C,n)},add(e,t){(0,u.data)(e,m)[i].configure((0,h.extend)({delegateSelector:t.selector},t.data),t.type)},teardown(e){const t=(0,u.data)(e,C),n=(0,u.data)(e,m),a=n[i];delete t[s];let r=!0;(0,p.each)(o,((e,i)=>(r=r&&!t[i],r))),r&&(v.isActive(e)&&v.resetEmitter(a),a&&a.dispose(),delete n[i])}})}))}},65381:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(85030))&&n.__esModule?n:{default:n},a=i(21274);const s=function(e,t){const i={};"noBubble"in t&&(i.noBubble=t.noBubble),"bindType"in t&&(i.bindType=t.bindType),"delegateType"in t&&(i.delegateType=t.delegateType),(0,a.each)(["setup","teardown","add","remove","trigger","handle","_default","dispose"],((e,n)=>{t[n]&&(i[n]=function(){const e=[].slice.call(arguments);return e.unshift(this),t[n].apply(t,e)})})),o.default.fire(e,i)};s.callbacks=o.default;t.default=s},36306:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=g(i(85030)),o=g(i(65462)),a=i(45280),s=g(i(64960)),r=g(i(87129)),l=g(i(13630)),d=g(i(84718)),u=g(i(89656)),c=i(52576),h=i(11528),p=i(3104);function g(e){return e&&e.__esModule?e:{default:e}}const _=(0,p.getWindow)(),f="dxEmptyEventType",m={mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},v={focusin:"focus",focusout:"blur"},C=["blur","focus","load"],y=["touchmove","wheel","mousewheel","touchstart"];function b(e,t){return!(0,h.isWindow)(e)&&"#document"!==e.nodeName&&s.default.elementMatches(e,t)}const x=new WeakMap;let w,S=0;const D=function(){const e={};return n.default.add(((t,i)=>{e[t]=i})),{getField:(t,i)=>e[t]&&e[t][i],callMethod:(t,i,n,o)=>e[t]&&e[t][i]&&e[t][i].apply(n,o)}}(),I=(0,u.default)({on:A(R(B(((e,t,i,n,o)=>{k(e,t).addHandler(o,i,n)})))),one:A(R(((e,t,i,n,o)=>{const a=function(){I.off(e,t,i,a),o.apply(this,arguments)};I.on(e,t,i,n,a)}))),off:A((E=B(((e,t,i,n)=>{k(e,t).removeHandler(n,i)})),function(e,t,i,n){"function"==typeof i&&(n=i,i=void 0),E(e,t,i,n)})),trigger:A(L(((e,t,i)=>{const n=t.type,o=k(e,t.type);D.callMethod(n,"trigger",e,[t,i]),o.callHandlers(t,i);if(!(D.getField(n,"noBubble")||t.isPropagationStopped()||C.includes(n))){const n=[],o=function(e){const t=e.parentNode??((0,h.isObject)(e.host)?e.host:null);t&&(n.push(t),o(t))};o(e),n.push(_);let a=0;for(;n[a]&&!t.isPropagationStopped();){k(n[a],t.type).callHandlers((0,c.extend)(t,{currentTarget:n[a]}),i),a++}}(e.nodeType||(0,h.isWindow)(e))&&(D.callMethod(n,"_default",e,[t,i]),function(e,t){const i=v[e]||e,n=function(e,t){return"click"===e&&"a"===t.localName};if(n(e,t))return;(0,h.isFunction)(t[i])&&(w=e,t[i](),w=void 0)}(n,e))}))),triggerHandler:A(L(((e,t,i)=>{k(e,t.type).callHandlers(t,i)})))});var E;function T(e,t){const i=e[0];if(i)if(s.default.isNode(i)||(0,h.isWindow)(i))t.apply(I,e);else{if((0,h.isString)(i)||!("length"in i))throw r.default.Error("E0025");{const n=Array.prototype.slice.call(e,0);Array.prototype.forEach.call(i,(e=>{n[0]=e,T(n,t)}))}}}function A(e){return function(){T(arguments,e)}}const O=(0,l.default)((function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,!0)});_.addEventListener("test",null,t)}catch(e){}return e})),P=(e,t)=>(0,h.isWindow)(e)?P(e.document,t):e.contains?e.contains(t):!!(t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_CONTAINS);function k(e,t){let i=x.get(e);const n=(t=t||"").split("."),o=n.slice(1),r=!!n[0];t=n[0]||f,i||(i={},x.set(e,i)),i[t]||(i[t]={handleObjects:[],nativeHandler:null});const l=i[t];return{addHandler(i,n,d){const u=function(n,o){const a=[n],s=n.currentTarget,{relatedTarget:r}=n;let l,u;t in m&&(l=r&&s&&(r===s||P(s,r))),void 0!==o&&a.push(o),D.callMethod(t,"handle",e,[n,d]),l||(u=i.apply(s,a)),!1===u&&(n.preventDefault(),n.stopPropagation())},c={handler:i,wrappedHandler:function(t,i){if(!w||t.type!==w)if(t.data=d,t.delegateTarget=e,n){let o=t.target;for(;o&&o!==e;)b(o,n)&&(t.currentTarget=o,u(t,i)),o=o.parentNode}else{var o;t.currentTarget=t.delegateTarget||t.target;if(Boolean(null===(o=t.target)||void 0===o?void 0:o.shadowRoot)){const e=(0,a.getEventTarget)(t);t.target=e}u(t,i)}},selector:n,type:t,data:d,namespace:o.join("."),namespaces:o,guid:++S};l.handleObjects.push(c);let h,p=1===l.handleObjects.length&&r;var g;p&&(p=!D.callMethod(t,"setup",e,[d,o,i])),p&&(l.nativeHandler=(g=t,function(e,t){const i=k(this,g);e=I.Event(e),i.callHandlers(e,t)}),O()&&y.includes(t)&&(h={passive:!1}),l.removeListener=s.default.listen(e,m[t]||t,l.nativeHandler,h)),D.callMethod(t,"add",e,[c])},removeHandler(n,a){const s=function(t){const s=i[t];if(!s.handleObjects.length)return void delete i[t];let r;s.handleObjects=s.handleObjects.filter((i=>{const s=o.length&&!M(i.namespaces,o)||n&&i.handler!==n||a&&i.selector!==a;return s||(r=i.handler,D.callMethod(t,"remove",e,[i])),s}));!s.handleObjects.length&&t!==f&&(D.callMethod(t,"teardown",e,[o,r]),s.nativeHandler&&s.removeListener(),delete i[t])};if(r)s(t);else for(const e in i)s(e);0===Object.keys(i).length&&x.delete(e)},callHandlers(e,t){let n=!1;const a=function(i){n||o.length&&!M(i.namespaces,o)||(i.wrappedHandler(e,t),n=e.isImmediatePropagationStopped())};l.handleObjects.forEach(a),o.length&&i[f]&&i[f].handleObjects.forEach(a)}}}function M(e,t){for(let i=0;i<t.length;i++)if(e.indexOf(t[i])<0)return!1;return!0}function R(e){return function(t,i,n,o,a){a||(a=o,o=void 0),"string"!=typeof n&&(o=n,n=void 0),a||"string"!=typeof i||(a=o||n,n=void 0,o=void 0),e(t,i,n,o,a)}}function L(e){return function(t,i,n){"string"==typeof i&&(i={type:i}),i.target||(i.target=t),i.currentTarget=t,i.delegateTarget||(i.delegateTarget=t),!i.type&&i.originalEvent&&(i.type=i.originalEvent.type),e(t,i instanceof I.Event?i:I.Event(i),n)}}function B(e){const t=function(t,i){if(i&&i.indexOf(" ")>-1){const t=Array.prototype.slice.call(arguments,0);i.split(" ").forEach((function(i){t[1]=i,e.apply(this,t)}))}else e.apply(this,arguments)};return function(e,i){if("object"==typeof i){const e=Array.prototype.slice.call(arguments,0);for(const n in i)e[1]=n,e[e.length-1]=i[n],t.apply(this,e)}else t.apply(this,arguments)}}function V(e){if(function(e){return null==e.which&&0===e.type.indexOf("key")}(e))return null!=e.charCode?e.charCode:e.keyCode;if(function(e){return!e.which&&void 0!==e.button&&/^(?:mouse|pointer|contextmenu|drag|drop)|click/.test(e.type)}(e)){return{1:1,2:3,3:1,4:2}[e.button]}return e.which}function F(e){e&&(I.Event=e,I.Event.prototype=e.prototype)}function H(e,t,i){Object.defineProperty(i||I.Event.prototype,e,{enumerable:!0,configurable:!0,get(){return this.originalEvent&&t(this.originalEvent)},set(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})}F(function(e){return I.Event=function(t,i){if(!(this instanceof I.Event))return new I.Event(t,i);t||(t={}),"string"==typeof t&&(t={type:t}),i||(i={}),e.call(this,t,i)},Object.assign(I.Event.prototype,{_propagationStopped:!1,_immediatePropagationStopped:!1,_defaultPrevented:!1,isPropagationStopped(){return!!(this._propagationStopped||this.originalEvent&&this.originalEvent.propagationStopped)},stopPropagation(){this._propagationStopped=!0,this.originalEvent&&this.originalEvent.stopPropagation()},isImmediatePropagationStopped(){return this._immediatePropagationStopped},stopImmediatePropagation(){this.stopPropagation(),this._immediatePropagationStopped=!0,this.originalEvent&&this.originalEvent.stopImmediatePropagation()},isDefaultPrevented(){return!!(this._defaultPrevented||this.originalEvent&&this.originalEvent.defaultPrevented)},preventDefault(){this._defaultPrevented=!0,this.originalEvent&&this.originalEvent.preventDefault()}}),I.Event}((function(e,t){var i;e instanceof I.Event||(0,p.hasWindow)()&&e instanceof _.Event||(null===(i=e.view)||void 0===i?void 0:i.Event)&&e instanceof e.view.Event?(this.originalEvent=e,this.type=e.type,this.currentTarget=void 0,Object.prototype.hasOwnProperty.call(e,"isTrusted")&&(this.isTrusted=e.isTrusted),this.timeStamp=e.timeStamp||Date.now()):Object.assign(this,e),H("which",V,this),0===e.type.indexOf("touch")&&(delete t.pageX,delete t.pageY),Object.assign(this,t),this.guid=++S}))),["target","relatedTarget","delegateTarget","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","shiftKey","view","char","code","charCode","key","keyCode","button","buttons","offsetX","offsetY","pointerId","pointerType","targetTouches","toElement","touches"].forEach((e=>H(e,(t=>t[e])))),(0,o.default)(H);const N=(0,d.default)(),z=(0,d.default)();I.set=function(e){N.fire(),I.inject(e),F(e.Event),z.fire()},I.subscribeGlobal=function(){T(arguments,R((function(){const e=arguments;I.on.apply(this,e),N.add((function(){const t=Array.prototype.slice.call(e,0);t.splice(3,1),I.off.apply(this,t)})),z.add((function(){I.on.apply(this,e)}))})))},I.forcePassiveFalseEventNames=y,I.passiveEventHandlersSupported=O;t.default=I},40866:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){i.forEach((t=>{e(t,(e=>n(t,e)))}),this)};const i=["pageX","pageY","screenX","screenY","clientX","clientY"],n=function(e,t){if(t[e]&&!t.touches||!t.touches)return t[e];const i=t.touches.length?t.touches:t.changedTouches;return i.length?i[0][e]:void 0}},34422:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(92774)),o=i(98834),a=r(i(55620)),s=r(i(64553));function r(e){return e&&e.__esModule?e:{default:e}}const l="compositionstart",d="KeyboardProcessor",u=e=>({keyName:(0,o.normalizeKeyName)(e),key:e.key,code:e.code,ctrl:e.ctrlKey,location:e.location,metaKey:e.metaKey,shift:e.shiftKey,alt:e.altKey,which:e.which,originalEvent:e}),c=a.default.inherit({_keydown:(0,o.addNamespace)("keydown",d),_compositionStart:(0,o.addNamespace)(l,d),_compositionEnd:(0,o.addNamespace)("compositionend",d),ctor(e){(e=e||{}).element&&(this._element=(0,s.default)(e.element)),e.focusTarget&&(this._focusTarget=e.focusTarget),this._handler=e.handler,this._element&&(this._processFunction=e=>{const t=(0,s.default)(this._focusTarget).toArray(),i=this._focusTarget&&this._focusTarget!==e.target&&!t.includes(e.target),n=this._isComposingJustFinished&&229===e.which||this._isComposing||i;this._isComposingJustFinished=!1,n||this.process(e)},this._toggleProcessingWithContext=this.toggleProcessing.bind(this),n.default.on(this._element,this._keydown,this._processFunction),n.default.on(this._element,this._compositionStart,this._toggleProcessingWithContext),n.default.on(this._element,this._compositionEnd,this._toggleProcessingWithContext))},dispose(){this._element&&(n.default.off(this._element,this._keydown,this._processFunction),n.default.off(this._element,this._compositionStart,this._toggleProcessingWithContext),n.default.off(this._element,this._compositionEnd,this._toggleProcessingWithContext)),this._element=void 0,this._handler=void 0},process(e){this._handler(u(e))},toggleProcessing(e){let{type:t}=e;this._isComposing=t===l,this._isComposingJustFinished=!this._isComposing}});c.createKeyDownOptions=u;t.default=c},58065:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.name=void 0;var n=r(i(15273)),o=r(i(92774)),a=i(98834),s=r(i(64553));function r(e){return e&&e.__esModule?e:{default:e}}const l=t.name="dxmousewheel",d="dxWheel",u={setup(e){const t=(0,s.default)(e);o.default.on(t,(0,a.addNamespace)("wheel",d),u._wheelHandler.bind(u))},teardown(e){o.default.off(e,`.${d}`)},_wheelHandler(e){const{deltaMode:t,deltaY:i,deltaX:n,deltaZ:o}=e.originalEvent;(0,a.fireEvent)({type:l,originalEvent:e,delta:this._normalizeDelta(i,t),deltaX:n,deltaY:i,deltaZ:o,deltaMode:t,pointerType:"mouse"}),e.stopPropagation()},_normalizeDelta(e){return 0===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)?-e:-30*e}};(0,n.default)(l,u)},77859:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_(i(59e3)),o=_(i(92774)),a=i(98834),s=_(i(64553)),r=_(i(13630)),l=i(17781),d=i(50254),u=_(i(3122)),c=i(58515),h=i(11528),p=_(i(98905)),g=_(i(76400));function _(e){return e&&e.__esModule?e:{default:e}}const f=u.default.add,{abs:m}=Math;let v=10;const C=(0,r.default)((()=>{const e="desktop"===p.default.real().deviceType;if(!(0,c.styleProp)("pointer-events")||!e)return l.noop;const t=(0,s.default)("<div>").addClass("dx-gesture-cover").css("pointerEvents","none");return o.default.subscribeGlobal(t,"dxmousewheel",(e=>{e.preventDefault()})),f((()=>{t.appendTo("body")})),function(e,i){t.css("pointerEvents",e?"all":"none"),e&&t.css("cursor",i)}})),y=n.default.inherit({gesture:!0,configure(e){this.getElement().css("msTouchAction",e.immediate?"pinch-zoom":""),this.callBase(e)},allowInterruptionByMouseWheel(){return 2!==this._stage},getDirection(){return this.direction},_cancel(){this.callBase.apply(this,arguments),this._toggleGestureCover(!1),this._stage=0},start(e){e._needSkipEvent||(0,a.needSkipEvent)(e)?this._cancel(e):(this._startEvent=(0,a.createEvent)(e),this._startEventData=(0,a.eventData)(e),this._stage=1,this._init(e),this._setupImmediateTimer())},_setupImmediateTimer(){clearTimeout(this._immediateTimer),this._immediateAccepted=!1,this.immediate&&(0!==this.immediateTimeout?this._immediateTimer=setTimeout((()=>{this._immediateAccepted=!0}),this.immediateTimeout??180):this._immediateAccepted=!0)},move(e){if(1===this._stage&&this._directionConfirmed(e)){if(this._stage=2,this._resetActiveElement(),this._toggleGestureCover(!0),this._clearSelection(e),this._adjustStartEvent(e),this._start(this._startEvent),0===this._stage)return;this._requestAccept(e),this._move(e),this._forgetAccept()}else 2===this._stage&&(this._clearSelection(e),this._move(e))},_directionConfirmed(e){const t=this._getTouchBoundary(e),i=(0,a.eventDelta)(this._startEventData,(0,a.eventData)(e)),n=m(i.x),o=m(i.y),s=this._validateMove(t,n,o),r=this._validateMove(t,o,n),l=this.getDirection(e);return"both"===l&&(s||r)||"horizontal"===l&&s||"vertical"===l&&r||this._immediateAccepted},_validateMove(e,t,i){return t&&t>=e&&(!this.immediate||t>=i)},_getTouchBoundary(e){return this.immediate||(0,a.isDxMouseWheelEvent)(e)?0:v},_adjustStartEvent(e){const t=this._getTouchBoundary(e),i=(0,a.eventDelta)(this._startEventData,(0,a.eventData)(e));this._startEvent.pageX+=(0,d.sign)(i.x)*t,this._startEvent.pageY+=(0,d.sign)(i.y)*t},_resetActiveElement(){"ios"===p.default.real().platform&&this.getElement().find(":focus").length&&g.default.resetActiveElement()},_toggleGestureCover(e){this._toggleGestureCoverImpl(e)},_toggleGestureCoverImpl(e){2===this._stage&&function(e,t){C()(e,t)}(e,this.getElement().css("cursor"))},_clearSelection(e){(0,a.isDxMouseWheelEvent)(e)||(0,a.isTouchEvent)(e)||g.default.clearSelection()},end(e){this._toggleGestureCover(!1),2===this._stage?this._end(e):1===this._stage&&this._stop(e),this._stage=0},dispose(){clearTimeout(this._immediateTimer),this.callBase.apply(this,arguments),this._toggleGestureCover(!1)},_init:l.noop,_start:l.noop,_move:l.noop,_stop:l.noop,_end:l.noop});y.initialTouchBoundary=v,y.touchBoundary=function(e){if(!(0,h.isDefined)(e))return v;v=e};t.default=y},18572:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(84096),o=u(i(81411)),a=u(i(92774)),s=u(i(85915)),r=i(98834),l=u(i(55620)),d=u(i(98905));function u(e){return e&&e.__esModule?e:{default:e}}const{abstract:c}=l.default,h=d.default.real(),p="scroll",g="dxscrollinit",_="dxscrollstart",f="dxscroll",m="dxscrollend",v="dxscrollstop",C="dxscrollcancel",y=l.default.inherit(function(){const e=(0,r.addNamespace)(p,"dxScrollEmitter");return{ctor(t){this._element=t,this._locked=!1,this._proxiedScroll=e=>{this._disposed||this._scroll(e)},a.default.on(this._element,e,this._proxiedScroll)},_scroll:c,check(e,t){this._locked&&t()},dispose(){this._disposed=!0,a.default.off(this._element,e,this._proxiedScroll)}}}()),b=y.inherit({ctor(e,t){this.callBase(e),this._timeout=t},_scroll(){this._prepare(),this._forget()},_prepare(){this._timer&&this._clearTimer(),this._locked=!0},_clearTimer(){clearTimeout(this._timer),this._locked=!1,this._timer=null},_forget(){const e=this;this._timer=setTimeout((()=>{e._clearTimer()}),this._timeout)},dispose(){this.callBase(),this._clearTimer()}}),x=b.inherit({ctor(e){this.callBase(e,400),this._lastWheelDirection=null},check(e,t){this._checkDirectionChanged(e),this.callBase(e,t)},_checkDirectionChanged(e){if(!(0,r.isDxMouseWheelEvent)(e))return void(this._lastWheelDirection=null);const t=e.shiftKey||!1,i=null!==this._lastWheelDirection&&t!==this._lastWheelDirection;this._lastWheelDirection=t,this._locked=this._locked&&!i}});let w=b.inherit({ctor(e){this.callBase(e,400)}});!function(){const{ios:e,android:t}=h;(e||t)&&(w=y.inherit({_scroll(){this._locked=!0;const e=this;(0,n.cancelAnimationFrame)(this._scrollFrame),this._scrollFrame=(0,n.requestAnimationFrame)((()=>{e._locked=!1}))},check(e,t){(0,n.cancelAnimationFrame)(this._scrollFrame),(0,n.cancelAnimationFrame)(this._checkFrame);const i=this,{callBase:o}=this;this._checkFrame=(0,n.requestAnimationFrame)((()=>{o.call(i,e,t),i._locked=!1}))},dispose(){this.callBase(),(0,n.cancelAnimationFrame)(this._scrollFrame),(0,n.cancelAnimationFrame)(this._checkFrame)}}))}();const S=s.default.inherit(function(){const e=Math.round(1e3/60);return{ctor(e){this.callBase.apply(this,arguments),this.direction="both",this._pointerLocker=new w(e),this._wheelLocker=new x(e)},validate:()=>!0,configure(e){e.scrollTarget&&(this._pointerLocker.dispose(),this._wheelLocker.dispose(),this._pointerLocker=new w(e.scrollTarget),this._wheelLocker=new x(e.scrollTarget)),this.callBase(e)},_init(e){this._wheelLocker.check(e,(()=>{(0,r.isDxMouseWheelEvent)(e)&&this._accept(e)})),this._pointerLocker.check(e,(()=>{const t=this.isNative&&(0,r.isMouseEvent)(e);(0,r.isDxMouseWheelEvent)(e)||t||this._accept(e)})),this._fireEvent(g,e),this._prevEventData=(0,r.eventData)(e)},move(e){this.callBase.apply(this,arguments),e.isScrollingEvent=this.isNative||e.isScrollingEvent},_start(e){this._savedEventData=(0,r.eventData)(e),this._fireEvent(_,e),this._prevEventData=(0,r.eventData)(e)},_move(e){const t=(0,r.eventData)(e);this._fireEvent(f,e,{delta:(0,r.eventDelta)(this._prevEventData,t)});(0,r.eventDelta)(this._savedEventData,t).time>200&&(this._savedEventData=this._prevEventData),this._prevEventData=(0,r.eventData)(e)},_end(t){const i=(0,r.eventDelta)(this._prevEventData,(0,r.eventData)(t));let n={x:0,y:0};if(!(0,r.isDxMouseWheelEvent)(t)&&i.time<100){const t=(0,r.eventDelta)(this._savedEventData,this._prevEventData),i=e/t.time;n={x:t.x*i,y:t.y*i}}this._fireEvent(m,t,{velocity:n})},_stop(e){this._fireEvent(v,e)},cancel(e){this.callBase.apply(this,arguments),this._fireEvent(C,e)},dispose(){this.callBase.apply(this,arguments),this._pointerLocker.dispose(),this._wheelLocker.dispose()},_clearSelection(){if(!this.isNative)return this.callBase.apply(this,arguments)},_toggleGestureCover(){if(!this.isNative)return this.callBase.apply(this,arguments)}}}());(0,o.default)({emitter:S,events:[g,_,f,m,v,C]});t.default={init:g,start:_,move:f,end:m,stop:v,cancel:C,scroll:p}},54078:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(92774)),o=i(80250),a=i(98834),s=u(i(97832)),r=i(52576),l=i(21274),d=i(85521);function u(e){return e&&e.__esModule?e:{default:e}}const c="dxSwipeable",h={onStart:o.start,onUpdated:o.swipe,onEnd:o.end,onCancel:"dxswipecancel"},p=s.default.inherit({_getDefaultOptions(){return(0,r.extend)(this.callBase(),{elastic:!0,immediate:!1,immediateTimeout:180,direction:"horizontal",itemSizeFunc:null,onStart:null,onUpdated:null,onEnd:null,onCancel:null})},_render(){this.callBase(),this.$element().addClass("dx-swipeable"),this._attachEventHandlers()},_attachEventHandlers(){if(this._detachEventHandlers(),this.option("disabled"))return;const{NAME:e}=this;this._createEventData(),(0,l.each)(h,((t,i)=>{const o=this._createActionByOption(t,{context:this});i=(0,a.addNamespace)(i,e),n.default.on(this.$element(),i,this._eventData,(e=>o({event:e})))}))},_createEventData(){this._eventData={elastic:this.option("elastic"),itemSizeFunc:this.option("itemSizeFunc"),direction:this.option("direction"),immediate:this.option("immediate"),immediateTimeout:this.option("immediateTimeout")}},_detachEventHandlers(){n.default.off(this.$element(),`.${c}`)},_optionChanged(e){switch(e.name){case"disabled":case"onStart":case"onUpdated":case"onEnd":case"onCancel":case"elastic":case"immediate":case"itemSizeFunc":case"direction":this._detachEventHandlers(),this._attachEventHandlers();break;case"rtlEnabled":break;default:this.callBase(e)}},_useTemplates:()=>!1});(0,d.name)(p,c);t.default=p},28356:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.name=void 0;var n=i(81578),o=_(i(59e3)),a=_(i(81411)),s=_(i(92774)),r=_(i(89797)),l=i(47413),d=i(45280),u=i(98834),c=_(i(64960)),h=_(i(64553)),p=_(i(98905)),g=_(i(76400));function _(e){return e&&e.__esModule?e:{default:e}}const f=t.name="dxclick";n.requestAnimationFrame,n.cancelAnimationFrame;let m=null,v=null;const C=()=>{v=null},y=function(e){const{originalEvent:t}=e,i=v===t||t&&t.DXCLICK_FIRED;!(!e.which||1===e.which)||m||i||(t&&(t.DXCLICK_FIRED=!0),(0,l.unsubscribeNodesDisposing)(v,C),v=t,(0,l.subscribeNodesDisposing)(v,C),(0,u.fireEvent)({type:f,originalEvent:e}))},b=o.default.inherit({ctor(e){this.callBase(e),s.default.on(this.getElement(),"click",y)},start(){m=null},cancel(){m=!0},dispose(){s.default.off(this.getElement(),"click",y)}});!function(){if(!p.default.real().generic){let e=null,t=!1;const i=function(e){return(0,h.default)(e).is("input, textarea, select, button ,:focus, :focus *")},n=function(i){e=i.target,t=i.isDefaultPrevented()},o=function(e){const t=(0,d.getEventTarget)(e);return(0,h.default)(t)},a=function(n){const a=o(n);t||!e||a.is(e)||(0,h.default)(e).is("label")||!i(a)||g.default.resetActiveElement(),e=null,t=!1},l="NATIVE_CLICK_FIXER",p=c.default.getDocument();s.default.subscribeGlobal(p,(0,u.addNamespace)(r.default.down,l),n),s.default.subscribeGlobal(p,(0,u.addNamespace)("click",l),a)}}(),(0,a.default)({emitter:b,bubble:!0,events:[f]})},90096:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.name=void 0;var n=c(i(15273)),o=c(i(92774)),a=c(i(68095)),s=i(98834),r=c(i(55620)),l=c(i(64553)),d=c(i(98905)),u=c(i(85991));function c(e){return e&&e.__esModule?e:{default:e}}const h="dxContexMenu",p=(0,s.addNamespace)("contextmenu",h),g=(0,s.addNamespace)(a.default.name,h),_="dxcontextmenu",f=r.default.inherit({setup(e){const t=(0,l.default)(e);o.default.on(t,p,this._contextMenuHandler.bind(this)),(u.default.touch||d.default.isSimulator())&&o.default.on(t,g,this._holdHandler.bind(this))},_holdHandler(e){(0,s.isMouseEvent)(e)&&!d.default.isSimulator()||this._fireContextMenu(e)},_contextMenuHandler(e){this._fireContextMenu(e)},_fireContextMenu:e=>(0,s.fireEvent)({type:_,originalEvent:e}),teardown(e){o.default.off(e,`.${h}`)}});(0,n.default)(_,new f);t.name=_},36212:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.name=t.dblClick=void 0;var n=i(64044),o=d(i(92774)),a=i(98834),s=d(i(55620)),r=d(i(64960)),l=i(86858);function d(e){return e&&e.__esModule?e:{default:e}}const u=t.name="dxdblclick",c=(0,a.addNamespace)(n.name,"dxDblClick"),h=s.default.inherit({ctor(){this._handlerCount=0,this._forgetLastClick()},_forgetLastClick(){this._firstClickTarget=null,this._lastClickTimeStamp=-300},add(){this._handlerCount<=0&&o.default.on(r.default.getDocument(),c,this._clickHandler.bind(this)),this._handlerCount+=1},_clickHandler(e){const t=e.timeStamp||Date.now(),i=t-this._lastClickTimeStamp;!(i<0)&&i<300?((0,a.fireEvent)({type:u,target:(0,l.closestCommonParent)(this._firstClickTarget,e.target),originalEvent:e}),this._forgetLastClick()):(this._firstClickTarget=e.target,this._lastClickTimeStamp=t,clearTimeout(this._lastClickClearTimeout),this._lastClickClearTimeout=setTimeout((()=>{this._forgetLastClick()}),600))},remove(){this._handlerCount-=1,this._handlerCount<=0&&(this._forgetLastClick(),o.default.off(r.default.getDocument(),c,void 0),clearTimeout(this._lastClickClearTimeout),this._handlerCount=0)}});t.dblClick=new h},88480:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.start=t.move=t.leave=t.enter=t.end=t.drop=void 0;var n=p(i(81411)),o=p(i(15273)),a=p(i(85915)),s=i(98834),r=i(74663),l=p(i(64553)),d=i(94487),u=i(86858),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=h(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(21274));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(h=function(e){return e?i:t})(e)}function p(e){return e&&e.__esModule?e:{default:e}}const g=t.start="dxdragstart",_=t.move="dxdrag",f=t.end="dxdragend",m=t.enter="dxdragenter",v=t.leave="dxdragleave",C=t.drop="dxdrop",y="dxDragEventsCount",b=[],x=[],w=[],S={setup(e,t){b.includes(e)||(b.push(e),x.push([]),w.push(t||{}))},add(e,t){const i=b.indexOf(e);this.updateEventsCounter(e,t.type,1);const{selector:n}=t;x[i].includes(n)||x[i].push(n)},updateEventsCounter(e,t,i){if([m,v,C].includes(t)){const t=(0,r.data)(e,y)||0;(0,r.data)(e,y,Math.max(0,t+i))}},remove(e,t){this.updateEventsCounter(e,t.type,-1)},teardown(e){if(!(0,r.data)(e,y)){const t=b.indexOf(e);b.splice(t,1),x.splice(t,1),w.splice(t,1),(0,r.removeData)(e,y)}}};(0,o.default)(m,S),(0,o.default)(v,S),(0,o.default)(C,S);const D=a.default.inherit({ctor(e){this.callBase(e),this.direction="both"},_init(e){this._initEvent=e},_start(e){if(e=this._fireEvent(g,this._initEvent),this._maxLeftOffset=e.maxLeftOffset,this._maxRightOffset=e.maxRightOffset,this._maxTopOffset=e.maxTopOffset,this._maxBottomOffset=e.maxBottomOffset,e.targetElements||null===e.targetElements){const t=(0,d.wrapToArray)(e.targetElements||[]);this._dropTargets=c.map(t,(e=>(0,l.default)(e).get(0)))}else this._dropTargets=b},_move(e){const t=(0,s.eventData)(e),i=this._calculateOffset(t);e=this._fireEvent(_,e,{offset:i}),this._processDropTargets(e),e._cancelPreventDefault||e.preventDefault()},_calculateOffset(e){return{x:this._calculateXOffset(e),y:this._calculateYOffset(e)}},_calculateXOffset(e){if("vertical"!==this.direction){const t=e.x-this._startEventData.x;return this._fitOffset(t,this._maxLeftOffset,this._maxRightOffset)}return 0},_calculateYOffset(e){if("horizontal"!==this.direction){const t=e.y-this._startEventData.y;return this._fitOffset(t,this._maxTopOffset,this._maxBottomOffset)}return 0},_fitOffset:(e,t,i)=>(null!=t&&(e=Math.max(e,-t)),null!=i&&(e=Math.min(e,i)),e),_processDropTargets(e){const t=this._findDropTarget(e);t===this._currentDropTarget||(this._fireDropTargetEvent(e,v),this._currentDropTarget=t,this._fireDropTargetEvent(e,m))},_fireDropTargetEvent(e,t){if(!this._currentDropTarget)return;const i={type:t,originalEvent:e,draggingElement:this._$element.get(0),target:this._currentDropTarget};(0,s.fireEvent)(i)},_findDropTarget(e){const t=this;let i;return c.each(b,((n,o)=>{if(!t._checkDropTargetActive(o))return;const a=(0,l.default)(o);c.each(function(e){const t=b.indexOf(e.get(0)),i=x[t].filter((e=>e));let n=e.find(i.join(", "));return x[t].includes(void 0)&&(n=n.add(e)),n}(a),((n,o)=>{const s=(0,l.default)(o);t._checkDropTarget(function(e){const t=b.indexOf(e.get(0));return w[t]}(a),s,(0,l.default)(i),e)&&(i=o)}))})),i},_checkDropTargetActive(e){let t=!1;return c.each(this._dropTargets,((i,n)=>(t=t||n===e||(0,u.contains)(n,e),!t))),t},_checkDropTarget(e,t,i,n){if(t.get(0)===(0,l.default)(n.target).get(0))return!1;const o=(s=t,(a=e).itemPositionFunc?a.itemPositionFunc(s):s.offset());var a,s;if(n.pageX<o.left)return!1;if(n.pageY<o.top)return!1;const r=function(e,t){return e.itemSizeFunc?e.itemSizeFunc(t):{width:t.get(0).getBoundingClientRect().width,height:t.get(0).getBoundingClientRect().height}}(e,t);return!(n.pageX>o.left+r.width)&&(!(n.pageY>o.top+r.height)&&((!i.length||!i.closest(t).length)&&(!(e.checkDropTarget&&!e.checkDropTarget(t,n))&&t)))},_end(e){const t=(0,s.eventData)(e);this._fireEvent(f,e,{offset:this._calculateOffset(t)}),this._fireDropTargetEvent(e,C),delete this._currentDropTarget}});(0,n.default)({emitter:D,events:[g,_,f]})},3111:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(59e3)),o=s(i(81411)),a=i(98834);function s(e){return e&&e.__esModule?e:{default:e}}const{abs:r}=Math,l="dxhold",d=n.default.inherit({start(e){this._startEventData=(0,a.eventData)(e),this._startTimer(e)},_startTimer(e){const t="timeout"in this?this.timeout:750;this._holdTimer=setTimeout((()=>{this._requestAccept(e),this._fireEvent(l,e,{target:e.target}),this._forgetAccept()}),t)},move(e){this._touchWasMoved(e)&&this._cancel(e)},_touchWasMoved(e){const t=(0,a.eventDelta)(this._startEventData,(0,a.eventData)(e));return r(t.x)>5||r(t.y)>5},end(){this._stopTimer()},_stopTimer(){clearTimeout(this._holdTimer)},cancel(){this._stopTimer()},dispose(){this._stopTimer()}});(0,o.default)({emitter:d,bubble:!0,events:[l]});t.default={name:l}},57798:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.start=t.end=void 0;var n=u(i(15273)),o=u(i(92774)),a=u(i(89797)),s=i(98834),r=u(i(55620)),l=i(74663),d=u(i(98905));function u(e){return e&&e.__esModule?e:{default:e}}const c="dxHoverStart",h=t.start="dxhoverstart",p=(0,s.addNamespace)(a.default.enter,c),g="dxHoverEnd",_=t.end="dxhoverend",f=(0,s.addNamespace)(a.default.leave,g),m=r.default.inherit({noBubble:!0,ctor(){this._handlerArrayKeyPath=`${this._eventNamespace}_HandlerStore`},setup(e){(0,l.data)(e,this._handlerArrayKeyPath,{})},add(e,t){const i=this,n=function(e){i._handler(e)};o.default.on(e,this._originalEventName,t.selector,n),(0,l.data)(e,this._handlerArrayKeyPath)[t.guid]=n},_handler(e){(0,s.isTouchEvent)(e)||d.default.isSimulator()||(0,s.fireEvent)({type:this._eventName,originalEvent:e,delegateTarget:e.delegateTarget})},remove(e,t){const i=(0,l.data)(e,this._handlerArrayKeyPath)[t.guid];o.default.off(e,this._originalEventName,t.selector,i)},teardown(e){(0,l.removeData)(e,this._handlerArrayKeyPath)}}),v=m.inherit({ctor(){this._eventNamespace=c,this._eventName=h,this._originalEventName=p,this.callBase()},_handler(e){(e.pointers||[]).length||this.callBase(e)}}),C=m.inherit({ctor(){this._eventNamespace=g,this._eventName=_,this._originalEventName=f,this.callBase()}});(0,n.default)(h,new v),(0,n.default)(_,new C)},24381:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(15273)),o=u(i(5949)),a=u(i(71887)),s=u(i(71017)),r=u(i(66636)),l=i(21274),d=u(i(98905));function u(e){return e&&e.__esModule?e:{default:e}}const c=((e,t)=>{let{tablet:i,phone:n}=t;const l=function(){const e=(0,r.default)().pointerEventStrategy;return{"mouse-and-touch":a.default,touch:s.default,mouse:o.default}[e]}();return l||(!e.touch||i||n?e.touch?s.default:o.default:a.default)})(u(i(85991)).default,d.default.real());(0,l.each)(c.map,((e,t)=>{(0,n.default)(e,new c(e,t))}));t.default={down:"dxpointerdown",up:"dxpointerup",move:"dxpointermove",cancel:"dxpointercancel",enter:"dxpointerenter",leave:"dxpointerleave",over:"dxpointerover",out:"dxpointerout"}},92686:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.removeEvent=void 0;var n=r(i(15273)),o=r(i(92774)),a=i(74663),s=r(i(64553));function r(e){return e&&e.__esModule?e:{default:e}}const l=t.removeEvent="dxremove",d="dxRemoveEvent";(0,a.beforeCleanData)((e=>{e=[].slice.call(e);for(let t=0;t<e.length;t++){const i=(0,s.default)(e[t]);i.prop(d)&&(i[0][d]=null,o.default.triggerHandler(i,l))}})),(0,n.default)(l,{noBubble:!0,setup(e){(0,s.default)(e).prop(d,!0)}})},43926:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.visibility=t.resize=t.keyboard=t.hover=t.focus=t.dxClick=t.click=t.active=void 0;var n=s(i(92774)),o=s(i(52818)),a=i(98834);function s(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return t?(0,a.addNamespace)(e,t):e}function l(e,t){return"function"==typeof e?e(t):e.execute(t)}t.active={on:(e,t,i,o)=>{const{selector:a,showTimeout:s,hideTimeout:d,namespace:u}=o;n.default.on(e,r("dxactive",u),a,{timeout:s},(e=>l(t,{event:e,element:e.currentTarget}))),n.default.on(e,r("dxinactive",u),a,{timeout:d},(e=>l(i,{event:e,element:e.currentTarget})))},off:(e,t)=>{let{namespace:i,selector:o}=t;n.default.off(e,r("dxactive",i),o),n.default.off(e,r("dxinactive",i),o)}},t.resize={on:function(e,t){let{namespace:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.default.on(e,r("dxresize",i),t)},off:function(e){let{namespace:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.default.off(e,r("dxresize",t))}},t.hover={on:(e,t,i,o)=>{let{selector:a,namespace:s}=o;n.default.on(e,r("dxhoverend",s),a,(e=>i(e))),n.default.on(e,r("dxhoverstart",s),a,(e=>l(t,{element:e.target,event:e})))},off:(e,t)=>{let{selector:i,namespace:o}=t;n.default.off(e,r("dxhoverstart",o),i),n.default.off(e,r("dxhoverend",o),i)}},t.visibility={on:(e,t,i,o)=>{let{namespace:a}=o;n.default.on(e,r("dxhiding",a),i),n.default.on(e,r("dxshown",a),t)},off:(e,t)=>{let{namespace:i}=t;n.default.off(e,r("dxhiding",i)),n.default.off(e,r("dxshown",i))}},t.focus={on:(e,t,i,o)=>{let{namespace:a}=o;n.default.on(e,r("focusin",a),t),n.default.on(e,r("focusout",a),i)},off:(e,t)=>{let{namespace:i}=t;n.default.off(e,r("focusin",i)),n.default.off(e,r("focusout",i))},trigger:e=>n.default.trigger(e,"focus")},t.dxClick={on:function(e,t){let{namespace:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.default.on(e,r("dxclick",i),t)},off:function(e){let{namespace:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.default.off(e,r("dxclick",t))}},t.click={on:function(e,t){let{namespace:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.default.on(e,r("click",i),t)},off:function(e){let{namespace:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.default.off(e,r("click",t))}};let d=0;const u={};t.keyboard={on:(e,t,i)=>{const n="keyboardProcessorId"+d++;return u[n]=new o.default({element:e,focusTarget:t,handler:i}),n},off:e=>{e&&u[e]&&(u[e].dispose(),delete u[e])},_getProcessor:e=>u[e]}},6066:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.swipe=t.start=t.end=void 0;var n=r(i(81411)),o=r(i(85915)),a=i(98834),s=i(57653);function r(e){return e&&e.__esModule?e:{default:e}}const l=t.start="dxswipestart",d=t.swipe="dxswipe",u=t.end="dxswipeend",c={horizontal:{defaultItemSizeFunc(){return(0,s.getWidth)(this.getElement())},getBounds(){return[this._maxLeftOffset,this._maxRightOffset]},calcOffsetRatio(e){return((0,a.eventData)(e).x-(this._savedEventData&&this._savedEventData.x||0))/this._itemSizeFunc().call(this,e)},isFastSwipe(e){const t=(0,a.eventData)(e);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(t.x-this._tickData.x)>=t.time-this._tickData.time}},vertical:{defaultItemSizeFunc(){return(0,s.getHeight)(this.getElement())},getBounds(){return[this._maxTopOffset,this._maxBottomOffset]},calcOffsetRatio(e){return((0,a.eventData)(e).y-(this._savedEventData&&this._savedEventData.y||0))/this._itemSizeFunc().call(this,e)},isFastSwipe(e){const t=(0,a.eventData)(e);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(t.y-this._tickData.y)>=t.time-this._tickData.time}}},h=o.default.inherit({TICK_INTERVAL:300,FAST_SWIPE_SPEED_LIMIT:10,ctor(e){this.callBase(e),this.direction="horizontal",this.elastic=!0},_getStrategy(){return c[this.direction]},_defaultItemSizeFunc(){return this._getStrategy().defaultItemSizeFunc.call(this)},_itemSizeFunc(){return this.itemSizeFunc||this._defaultItemSizeFunc},_init(e){this._tickData=(0,a.eventData)(e)},_start(e){this._savedEventData=(0,a.eventData)(e),(e=this._fireEvent(l,e)).cancel||(this._maxLeftOffset=e.maxLeftOffset,this._maxRightOffset=e.maxRightOffset,this._maxTopOffset=e.maxTopOffset,this._maxBottomOffset=e.maxBottomOffset)},_move(e){const t=this._getStrategy(),i=(0,a.eventData)(e);let n=t.calcOffsetRatio.call(this,e);n=this._fitOffset(n,this.elastic),i.time-this._tickData.time>this.TICK_INTERVAL&&(this._tickData=i),this._fireEvent(d,e,{offset:n}),!1!==e.cancelable&&e.preventDefault()},_end(e){const t=this._getStrategy(),i=t.calcOffsetRatio.call(this,e),n=t.isFastSwipe.call(this,e);let o=i,a=this._calcTargetOffset(i,n);o=this._fitOffset(o,this.elastic),a=this._fitOffset(a,!1),this._fireEvent(u,e,{offset:o,targetOffset:a})},_fitOffset(e,t){const i=this._getStrategy().getBounds.call(this);return e<-i[0]?t?(-2*i[0]+e)/3:-i[0]:e>i[1]?t?(2*i[1]+e)/3:i[1]:e},_calcTargetOffset(e,t){let i;return t?(i=Math.ceil(Math.abs(e)),e<0&&(i=-i)):i=Math.round(e),i}});(0,n.default)({emitter:h,events:[l,d,u]})},68264:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.exportNames=void 0;var n=d(i(59e3)),o=d(i(81411)),a=i(98834),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=l(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(21274)),r=i(50254);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(l=function(e){return e?i:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}const u="dx",c="start",h="",p="end",g=[],_=function(e,t){g.push({name:e,args:t})};_("transform",{scale:!0,deltaScale:!0,rotation:!0,deltaRotation:!0,translation:!0,deltaTranslation:!0}),_("translate",{translation:!0,deltaTranslation:!0}),_("pinch",{scale:!0,deltaScale:!0}),_("rotate",{rotation:!0,deltaRotation:!0});const f=function(e){const{pointers:t}=e;return i=t[0],{x:(n=t[1]).pageX-i.pageX,y:-n.pageY+i.pageY,centerX:.5*(n.pageX+i.pageX),centerY:.5*(n.pageY+i.pageY)};var i,n},m=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},v=function(e,t){return m(e)/m(t)},C=function(e,t){const i=e.x*t.x+e.y*t.y,n=m(e)*m(t);if(0===n)return 0;return(0,r.sign)(e.x*t.y-t.x*e.y)*Math.acos((0,r.fitIntoRange)(i/n,-1,1))},y=function(e,t){return{x:e.centerX-t.centerX,y:e.centerY-t.centerY}},b=n.default.inherit({validatePointers:e=>(0,a.hasTouches)(e)>1,start(e){this._accept(e);const t=f(e);this._startVector=t,this._prevVector=t,this._fireEventAliases(c,e)},move(e){const t=f(e),i=this._getEventArgs(t);this._fireEventAliases(h,e,i),this._prevVector=t},end(e){const t=this._getEventArgs(this._prevVector);this._fireEventAliases(p,e,t)},_getEventArgs(e){return{scale:v(e,this._startVector),deltaScale:v(e,this._prevVector),rotation:C(e,this._startVector),deltaRotation:C(e,this._prevVector),translation:y(e,this._startVector),deltaTranslation:y(e,this._prevVector)}},_fireEventAliases(e,t,i){i=i||{},s.each(g,((n,o)=>{const a={};s.each(o.args,(e=>{e in i&&(a[e]=i[e])})),this._fireEvent(u+o.name+e,t,a)}))}}),x=g.reduce(((e,t)=>([c,h,p].forEach((i=>{e.push(u+t.name+i)})),e)),[]);(0,o.default)({emitter:b,events:x});const w=t.exportNames={};s.each(x,((e,t)=>{w[t.substring(2)]=t}))},52997:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.triggerShownEvent=t.triggerResizeEvent=t.triggerHidingEvent=t.default=void 0;var n=a(i(92774)),o=a(i(64553));function a(e){return e&&e.__esModule?e:{default:e}}const s=function(e){const t=".dx-visibility-change-handler";return function(i){const a=(0,o.default)(i||"body"),s=a.filter(t).add(a.find(t));for(let t=0;t<s.length;t++)n.default.triggerHandler(s[t],e)}},r=t.triggerShownEvent=s("dxshown"),l=t.triggerHidingEvent=s("dxhiding"),d=t.triggerResizeEvent=s("dxresize");t.default={triggerHidingEvent:l,triggerResizeEvent:d,triggerShownEvent:r}},37321:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(92774)),o=i(45280),a=i(98834),s=d(i(55620)),r=d(i(64960)),l=d(i(48314));function d(e){return e&&e.__esModule?e:{default:e}}const u="dxPointerEvents",c=s.default.inherit({ctor(e,t){this._eventName=e,this._originalEvents=(0,a.addNamespace)(t,u),this._handlerCount=0,this.noBubble=this._isNoBubble()},_isNoBubble(){const e=this._eventName;return"dxpointerenter"===e||"dxpointerleave"===e},_handler(e){const t=this._getDelegateTarget(e),i={type:this._eventName,pointerType:e.pointerType||(0,a.eventSource)(e),originalEvent:e,delegateTarget:t,timeStamp:l.default.mozilla?(new Date).getTime():e.timeStamp},n=(0,o.getEventTarget)(e);return i.target=n,this._fireEvent(i)},_getDelegateTarget(e){let t;return this.noBubble&&(t=e.delegateTarget),t},_fireEvent:e=>(0,a.fireEvent)(e),_setSelector(e){this._selector=this.noBubble&&e?e.selector:null},_getSelector(){return this._selector},setup:()=>!0,add(e,t){if(this._handlerCount<=0||this.noBubble){e=this.noBubble?e:r.default.getDocument(),this._setSelector(t);const i=this;n.default.on(e,this._originalEvents,this._getSelector(),(e=>{i._handler(e)}))}this.noBubble||this._handlerCount++},remove(e){this._setSelector(e),this.noBubble||this._handlerCount--},teardown(e){this._handlerCount&&!this.noBubble||(e=this.noBubble?e:r.default.getDocument(),this._originalEvents!==`.${u}`&&n.default.off(e,this._originalEvents,this._getSelector()))},dispose(e){e=this.noBubble?e:r.default.getDocument(),n.default.off(e,this._originalEvents)}});t.default=c},45841:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(725)),o=s(i(38242)),a=i(52576);function s(e){return e&&e.__esModule?e:{default:e}}const r={dxpointerdown:"mousedown",dxpointermove:"mousemove",dxpointerup:"mouseup",dxpointercancel:"",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},l=function(e){return e.pointerId=1,{pointers:d.pointers(),pointerId:1}};let d,u=!1;const c=function(){u||(d=new o.default(r,(()=>!0)),u=!0)},h=n.default.inherit({ctor(){this.callBase.apply(this,arguments),c()},_fireEvent(e){return this.callBase((0,a.extend)(l(e.originalEvent),e))}});h.map=r,h.normalize=l,h.activate=c,h.resetObserver=function(){d.reset()};t.default=h},60699:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(725)),o=l(i(5949)),a=l(i(71017)),s=i(98834),r=i(52576);function l(e){return e&&e.__esModule?e:{default:e}}let d=!1;const u=n.default.inherit({EVENT_LOCK_TIMEOUT:100,ctor(){this.callBase.apply(this,arguments),d||(o.default.activate(),d=!0)},_handler(e){const t=(0,s.isMouseEvent)(e);if(t||(this._skipNextEvents=!0),!t||!this._mouseLocked){if(!t||!this._skipNextEvents)return this.callBase(e);{this._skipNextEvents=!1,this._mouseLocked=!0,clearTimeout(this._unlockMouseTimer);const e=this;this._unlockMouseTimer=setTimeout((()=>{e._mouseLocked=!1}),this.EVENT_LOCK_TIMEOUT)}}},_fireEvent(e){const t=(0,s.isMouseEvent)(e.originalEvent)?o.default.normalize:a.default.normalize;return this.callBase((0,r.extend)(t(e.originalEvent),e))},dispose(){this.callBase(),this._skipNextEvents=!1,this._mouseLocked=!1,clearTimeout(this._unlockMouseTimer)}});u.map={dxpointerdown:"touchstart mousedown",dxpointermove:"touchmove mousemove",dxpointerup:"touchend mouseup",dxpointercancel:"touchcancel",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},u.resetObserver=o.default.resetObserver;t.default=u},62814:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(64960)),o=i(21274),a=s(i(3122));function s(e){return e&&e.__esModule?e:{default:e}}const r=function(e,t){a.default.add((()=>{e.split(" ").forEach((e=>{n.default.listen(n.default.getDocument(),e,t,!0)}))}))};t.default=function(e,t,i){i=i||function(){};let n=[];const a=function(e){let i=-1;return(0,o.each)(n,((n,o)=>!t(e,o)||(i=n,!1))),i},s=function(e){const t=a(e);t>-1&&n.splice(t,1)};r(e.dxpointerdown,(function(e){-1===a(e)&&(i(e),n.push(e))})),r(e.dxpointermove,(function(e){n[a(e)]=e})),r(e.dxpointerup,s),r(e.dxpointercancel,s),this.pointers=function(){return n},this.reset=function(){n=[]}}},95253:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(725)),o=i(52576),a=i(21274),s=r(i(98905));function r(e){return e&&e.__esModule?e:{default:e}}const l=function(e){const t=[];return(0,a.each)(e.touches,((e,i)=>{t.push((0,o.extend)({pointerId:i.identifier},i))})),{pointers:t,pointerId:e.changedTouches[0].identifier}},d=n.default.inherit({ctor(){this.callBase.apply(this,arguments),this._pointerId=0},_handler(e){if(t=this._eventName,"ios"===s.default.real().platform&&("dxpointerdown"===t||"dxpointerup"===t)){const t=e.changedTouches[0];if(this._pointerId===t.identifier&&0!==this._pointerId)return;this._pointerId=t.identifier}var t;return this.callBase.apply(this,arguments)},_fireEvent(e){return this.callBase((0,o.extend)(l(e.originalEvent),e))}});d.map={dxpointerdown:"touchstart",dxpointermove:"touchmove",dxpointerup:"touchend",dxpointercancel:"touchcancel",dxpointerover:"",dxpointerout:"",dxpointerenter:"",dxpointerleave:""},d.normalize=l;t.default=d},61210:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.stopEventsSkipping=t.setEventFixMethod=t.normalizeKeyName=t.needSkipEvent=t.isTouchEvent=t.isPointerEvent=t.isMouseEvent=t.isKeyboardEvent=t.isFakeClickEvent=t.isDxMouseWheelEvent=t.isCommandKeyPressed=t.hasTouches=t.getChar=t.forceSkipEvents=t.fireEvent=t.eventSource=t.eventDelta=t.eventData=t.createEvent=t.addNamespace=void 0;var n=d(i(92774)),o=d(i(64553)),a=i(52576),s=i(21274),r=i(35944),l=d(i(91293));function d(e){return e&&e.__esModule?e:{default:e}}const u={backspace:"backspace",tab:"tab",enter:"enter",escape:"escape",pageup:"pageUp",pagedown:"pageDown",end:"end",home:"home",arrowleft:"leftArrow",arrowup:"upArrow",arrowright:"rightArrow",arrowdown:"downArrow",delete:"del"," ":"space",f:"F",a:"A","*":"asterisk","-":"minus",alt:"alt",control:"control",shift:"shift"},c={8:"backspace",9:"tab",13:"enter",27:"escape",33:"pageUp",34:"pageDown",35:"end",36:"home",37:"leftArrow",38:"upArrow",39:"rightArrow",40:"downArrow",46:"del",32:"space",70:"F",65:"A",106:"asterisk",109:"minus",189:"minus",173:"minus",16:"shift",17:"control",18:"alt"},h={dx:/^dx/i,mouse:/(mouse|wheel)/i,touch:/^touch/i,keyboard:/^key/i,pointer:/^(ms)?pointer/i},p=e=>{let{type:t}=e,i="other";return(0,s.each)(h,(function(e){if(this.test(t))return i=e,!1})),i};t.eventSource=p;let g=e=>e;const _=e=>g((e=>n.default.Event(e,e))(e),e),f=e=>"dx"===p(e),m=e=>"touch"===p(e),v=e=>"pointer"===p(e);t.isPointerEvent=v;const C=e=>(e=>"mouse"===p(e))(e)||(v(e)||f(e))&&"mouse"===e.pointerType;t.isMouseEvent=C;const y=e=>e&&"dxmousewheel"===e.type;t.isDxMouseWheelEvent=y;const b=e=>m(e)||(v(e)||f(e))&&"touch"===e.pointerType;t.isTouchEvent=b;t.isKeyboardEvent=e=>"keyboard"===p(e);t.isFakeClickEvent=e=>{let{screenX:t,offsetX:i,pageX:n}=e;return 0===t&&!i&&0===n};t.eventData=e=>{let{pageX:t,pageY:i,timeStamp:n}=e;return{x:t,y:i,time:n}};t.eventDelta=(e,t)=>({x:t.x-e.x,y:t.y-e.y,time:t.time-e.time||1});t.hasTouches=e=>{const{originalEvent:t,pointers:i}=e;return m(e)?(t.touches||[]).length:f(e)?(i||[]).length:0};let x=!1;t.forceSkipEvents=()=>{x=!0};t.stopEventsSkipping=()=>{x=!1};t.needSkipEvent=e=>{if(x)return!0;const{target:t}=e,i=(0,o.default)(t),n=(null==t?void 0:t.isContentEditable)||(null==t?void 0:t.hasAttribute("contenteditable")),a=i.is("input, textarea, select")||n;if(y(e)){if(i.is("textarea")&&i.hasClass("dx-texteditor-input")||n)return!1;return i.is("input[type='number'], textarea, select")&&i.is(":focus")}return C(e)?a||e.which>1:b(e)?a&&(0,r.focused)(i):void 0};t.setEventFixMethod=e=>{g=e};const w=(e,t)=>{const i=_(e);return t&&(0,a.extend)(i,t),i};t.createEvent=w;t.fireEvent=e=>{const{originalEvent:t,delegateTarget:i}=e,o=w(t,e);return n.default.trigger(i||o.target,o),o};t.normalizeKeyName=e=>{let{key:t,which:i}=e;const n=u[null==t?void 0:t.toLowerCase()]||t,o=c[i];return o&&n===t?o:!n&&i?String.fromCharCode(i):n};t.getChar=e=>{let{key:t,which:i}=e;return t||String.fromCharCode(i)};t.addNamespace=l.default;t.isCommandKeyPressed=e=>{let{ctrlKey:t,metaKey:i}=e;return t||i}},91293:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(87129))&&n.__esModule?n:{default:n};const a=(e,t)=>{if(!t)throw o.default.Error("E0017");return Array.isArray(e)?e.map((e=>a(e,t))).join(" "):-1!==e.indexOf(" ")?a(e.split(/\s+/g),t):`${e}.${t}`};t.default=a},68337:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.unsubscribeNodesDisposing=t.subscribeNodesDisposing=void 0;var n,o=(n=i(92774))&&n.__esModule?n:{default:n},a=i(28630);function s(e){return e&&[e.target,e.delegateTarget,e.relatedTarget,e.currentTarget].filter((e=>!!e))}t.subscribeNodesDisposing=(e,t)=>{o.default.one(s(e),a.removeEvent,t)};t.unsubscribeNodesDisposing=(e,t)=>{o.default.off(s(e),a.removeEvent,t)}},86940:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getEventTarget=void 0;t.getEventTarget=e=>{var t,i;const{originalEvent:n}=e;if(!n)return e.target;if(!Boolean(null===(t=n.target)||void 0===t?void 0:t.shadowRoot))return n.target;const o=n.path??(null===(i=n.composedPath)||void 0===i?void 0:i.call(n));return(null==o?void 0:o[0])??e.target}},46827:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=function(e,t){return{name:"between",caption:e,icon:"range",valueSeparator:u,dataTypes:["number","date","datetime"],editorTemplate:c.bind(t),notForLookup:!0}};var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(52576);const s="dx-filterbuilder-range",r=`${s}-start`,l=`${s}-end`,d=`${s}-separator`,u="\u2013";function c(e,t){const i=(0,o.default)("<div>").addClass(r),n=(0,o.default)("<div>").addClass(l);let c=e.value||[];const h=function(e){return e&&e.length>0?e[0]:null},p=function(e){return e&&2===e.length?e[1]:null};t.append(i),t.append((0,o.default)("<span>").addClass(d).text(u)),t.append(n),t.addClass(s),this._editorFactory.createEditor.call(this,i,(0,a.extend)({},e.field,e,{value:h(c),parentType:"filterBuilder",setValue(t){c=[t,p(c)],e.setValue(c)}})),this._editorFactory.createEditor.call(this,n,(0,a.extend)({},e.field,e,{value:p(c),parentType:"filterBuilder",setValue(t){c=[h(c),t],e.setValue(c)}}))}},26005:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=C(i(92774)),o=i(98834),a=C(i(4671)),s=C(i(92848)),r=C(i(64960)),l=C(i(19427)),d=C(i(64553)),u=i(87739),c=i(52576),h=i(11528),p=C(i(10720)),g=C(i(87093)),_=C(i(4313)),f=C(i(11118)),m=i(67169),v=i(29498);function C(e){return e&&e.__esModule?e:{default:e}}const y="dx-filterbuilder",b=`${y}-group`,x=`${b}-item`,w=`${b}-content`,S=`${b}-operations`,D=`${b}-operation`,I=`${y}-action`,E=`${I}-icon`,T=`${y}-text`,A=`${y}-item-field`,O=`${y}-item-operation`,P=`${y}-item-value`,k=`${y}-item-value-text`,M=`${y}-overlay`,R=`${y}-operations`,L=`${y}-fields`,B=`${y}-add-condition`,V="dx-state-active",F=`${y}-menu-custom-operation`,H="filterBuilder",N="enter",z="escape",W=[{name:"onEditorPreparing",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onEditorPrepared",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onValueChanged",config:{excludeValidators:["disabled","readOnly"]}}],$={and:"and",or:"or",notAnd:"!and",notOr:"!or"},G=(0,g.default)(class{});class j extends f.default{_getDefaultOptions(){return(0,c.extend)(super._getDefaultOptions(),{onEditorPreparing:null,onEditorPrepared:null,onValueChanged:null,fields:[],groupOperations:["and","or","notAnd","notOr"],maxGroupLevel:void 0,value:null,allowHierarchicalFields:!1,groupOperationDescriptions:{and:a.default.format("dxFilterBuilder-and"),or:a.default.format("dxFilterBuilder-or"),notAnd:a.default.format("dxFilterBuilder-notAnd"),notOr:a.default.format("dxFilterBuilder-notOr")},customOperations:[],closePopupOnTargetScroll:!0,filterOperationDescriptions:{between:a.default.format("dxFilterBuilder-filterOperationBetween"),equal:a.default.format("dxFilterBuilder-filterOperationEquals"),notEqual:a.default.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:a.default.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:a.default.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:a.default.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:a.default.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:a.default.format("dxFilterBuilder-filterOperationStartsWith"),contains:a.default.format("dxFilterBuilder-filterOperationContains"),notContains:a.default.format("dxFilterBuilder-filterOperationNotContains"),endsWith:a.default.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:a.default.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:a.default.format("dxFilterBuilder-filterOperationIsNotBlank")}})}_optionChanged(e){switch(e.name){case"closePopupOnTargetScroll":break;case"onEditorPreparing":case"onEditorPrepared":case"onValueChanged":this._initActions();break;case"customOperations":this._initCustomOperations(),this._invalidate();break;case"fields":case"maxGroupLevel":case"groupOperations":case"allowHierarchicalFields":case"groupOperationDescriptions":case"filterOperationDescriptions":this._invalidate();break;case"value":if(e.value!==e.previousValue){const t=this._disableInvalidateForValue;t||(this._initModel(),this._invalidate()),this._disableInvalidateForValue=!1,this.executeAction("onValueChanged",{value:e.value,previousValue:e.previousValue}),this._disableInvalidateForValue=t}break;default:super._optionChanged(e)}}getFilterExpression(){const e=this._getNormalizedFields(),t=(0,c.extend)(!0,[],this._model);return(0,v.getFilterExpression)((0,v.getNormalizedFilter)(t),e,this._customOperations,H)}_getNormalizedFields(){return(0,v.getNormalizedFields)(this.option("fields"))}_updateFilter(){this._disableInvalidateForValue=!0;const e=(0,c.extend)(!0,[],this._model),t=(0,v.getNormalizedFilter)(e),i=(0,v.getNormalizedFilter)(this._getModel(this.option("value")));JSON.stringify(i)!==JSON.stringify(t)&&this.option("value",t),this._disableInvalidateForValue=!1,this._fireContentReadyAction()}_init(){this._initCustomOperations(),this._initModel(),this._initEditorFactory(),this._initActions(),super._init()}_initEditorFactory(){this._editorFactory=new G}_initCustomOperations(){this._customOperations=(0,v.getMergedOperations)(this.option("customOperations"),this.option("filterOperationDescriptions.between"),this)}_getDefaultGroupOperation(){var e;return(null===(e=this.option("groupOperations"))||void 0===e?void 0:e[0])??$.and}_getModel(e){return(0,v.convertToInnerStructure)(e,this._customOperations,this._getDefaultGroupOperation())}_initModel(){this._model=this._getModel(this.option("value"))}_initActions(){const e=this;e._actions={},W.forEach((t=>{const i=(0,c.extend)({},t.config);e._actions[t.name]=e._createActionByOption(t.name,i)}))}executeAction(e,t){const i=this._actions[e];return i&&i(t)}_initMarkup(){this.$element().addClass(y),super._initMarkup(),this._addAriaAttributes(this.$element(),a.default.format("dxFilterBuilder-filterAriaRootElement"),"tree"),this._createGroupElementByCriteria(this._model).appendTo(this.$element())}_addAriaAttributes(e,t,i,n,o,a){if(!e||!e.length)return;const s={role:i};t&&(e.text().length>0?s.title=t:s["aria-label"]=t),(0,h.isDefined)(n)&&(s["aria-haspopup"]=`${n}`),(0,h.isDefined)(o)&&(s["aria-expanded"]=`${o}`),(0,h.isDefined)(a)&&(s["aria-level"]=`${a}`),e.attr(s)}_createConditionElement(e,t,i){return(0,d.default)("<div>").addClass(b).append(this._createConditionItem(e,t,i))}_createGroupElementByCriteria(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=this._createGroupElement(e,t,i),o=n.find(`.${w}`),a=(0,v.getGroupCriteria)(e);for(let t=0;t<a.length;t++){const n=a[t];(0,v.isGroup)(n)?this._createGroupElementByCriteria(n,e,i+1).appendTo(o):(0,v.isCondition)(n)&&this._createConditionElement(n,e,`${i+1}`).appendTo(o)}return n}_createGroupElement(e,t,i){const n=new l.default,o=(0,d.default)("<div>").addClass(x),s=(0,d.default)("<div>").addClass(w).attr("id",`${n}`),r=(0,d.default)("<div>").addClass(b).append(o).append(s);return null!=t&&this._createRemoveButton((()=>{(0,v.removeItem)(t,e),r.remove(),this._updateFilter()}),"group").appendTo(o),this._addAriaAttributes(o,a.default.format("dxFilterBuilder-filterAriaGroupItem"),"treeitem",null,null,`${i+1}`),this._addAriaAttributes(s,"","group"),o.attr("aria-owns",`${n}`),this._createGroupOperationButton(e).appendTo(o),this._createAddButton((()=>{const t=(0,v.createEmptyGroup)(this._getDefaultGroupOperation());(0,v.addItem)(t,e),this._createGroupElement(t,e,i+1).appendTo(s),this._updateFilter()}),(()=>{const t=this.option("fields")[0],n=(0,v.createCondition)(t,this._customOperations);(0,v.addItem)(n,e),this._createConditionElement(n,e,i+1).appendTo(s),this._updateFilter()}),i).appendTo(o),r}_createButton(e){return(0,d.default)("<div>").text(e)}_createGroupOperationButton(e){const t=this._getGroupOperations(e);let i=(0,v.getGroupMenuItem)(e,t);const n=i.text,o=t&&t.length<2?this._createButton(n).addClass("dx-state-disabled"):this._createButtonWithMenu({caption:n,menu:{items:t,displayExpr:"text",keyExpr:"value",onItemClick:t=>{i!==t.itemData&&((0,v.setGroupValue)(e,t.itemData.value),o.text(t.itemData.text),i=t.itemData,this._updateFilter())},onContentReady(e){e.component.selectItem(i)},cssClass:S}});return this._addAriaAttributes(o,a.default.format("dxFilterBuilder-filterAriaOperationButton"),"combobox",!0,!1),o.addClass(T).addClass(D).attr("tabindex",0)}_createButtonWithMenu(e){const t=this,i=function(){t.$element().find(`.${V}`).removeClass(V).attr("aria-expanded","false"),t.$element().find(".dx-overlay .dx-treeview").remove(),t.$element().find(".dx-overlay").remove()},a=this.option("rtlEnabled"),s=a?"right":"left",r=this._createButton(e.caption);var l;return(0,c.extend)(e.menu,{focusStateEnabled:!0,selectionMode:"single",onItemClick:(l=e.menu.onItemClick,function(e){l(e),"dxclick"===e.event.type&&i()}),onHiding(){r.removeClass(V).attr("aria-expanded","false")},position:{my:`${s} top`,at:`${s} bottom`,offset:"0 1",of:r,collision:"flip"},animation:null,onHidden(){i()},cssClass:`${M} ${e.menu.cssClass}`,rtlEnabled:a}),e.popup={onShown(t){const i=(0,d.default)(t.component.content()).find(".dx-treeview"),a=i.dxTreeView("instance");n.default.on(i,"keyup keydown",(i=>{const a=(0,o.normalizeKeyName)(i);("keydown"===i.type&&"tab"===a||"keyup"===i.type&&(a===z||a===N))&&(t.component.hide(),n.default.trigger(e.menu.position.of,"focus"))})),a.focus(),a.option("focusedElement",null)}},this._subscribeOnClickAndEnterKey(r,(()=>{i(),t._createPopupWithTreeView(e,t.$element()),r.addClass(V).attr("aria-expanded","true")})),r}_hasValueButton(e){const t=(0,v.getCustomOperation)(this._customOperations,e[1]);return t?!1!==t.hasValue:null!==e[2]}_createOperationButtonWithMenu(e,t){const i=this,n=(0,v.getAvailableOperations)(t,this.option("filterOperationDescriptions"),this._customOperations);let o=(0,v.getOperationFromAvailable)((0,v.getOperationValue)(e),n);const s=this._createButtonWithMenu({caption:o.text,menu:{items:n,displayExpr:"text",onItemRendered(e){e.itemData.isCustom&&(0,d.default)(e.itemElement).addClass(F)},onContentReady(e){e.component.selectItem(o)},onItemClick:n=>{if(o!==n.itemData){o=n.itemData,(0,v.updateConditionByOperation)(e,o.value,i._customOperations);const a=s.siblings().filter(`.${P}`);i._hasValueButton(e)?(0!==a.length&&a.remove(),i._createValueButton(e,t).appendTo(s.parent())):a.remove(),s.text(o.text),this._updateFilter()}},cssClass:R}}).addClass(T).addClass(O).attr("tabindex",0);return this._addAriaAttributes(s,a.default.format("dxFilterBuilder-filterAriaItemOperation"),"combobox",!0,!1),s}_createOperationAndValueButtons(e,t,i){this._createOperationButtonWithMenu(e,t).appendTo(i),this._hasValueButton(e)&&this._createValueButton(e,t).appendTo(i)}_createFieldButtonWithMenu(e,t,i){const n=this,o=this.option("allowHierarchicalFields"),s=(0,v.getItems)(e,o);let r=(0,v.getField)(i.name||i.dataField,s);const l=function(e,t){return o?(0,v.getCaptionWithParents)(e,t):e.caption};t[0]=r.name||r.dataField;const d=this._createButtonWithMenu({caption:l(r,s),menu:{items:s,dataStructure:"plain",keyExpr:"id",parentId:"parentId",displayExpr:"caption",onItemClick:e=>{if(r!==e.itemData){r=e.itemData,t[0]=r.name||r.dataField,t[2]="object"===r.dataType?null:"",(0,v.updateConditionByOperation)(t,(0,v.getDefaultOperation)(r),n._customOperations),d.siblings().filter(`.${T}`).remove(),n._createOperationAndValueButtons(t,r,d.parent());const i=l(r,e.component.option("items"));d.text(i),this._updateFilter()}},onContentReady(e){e.component.selectItem(r)},cssClass:L}}).addClass(T).addClass(A).attr("tabindex",0);return this._addAriaAttributes(d,a.default.format("dxFilterBuilder-filterAriaItemField"),"combobox",!0,!1),d}_createConditionItem(e,t,i){const n=(0,d.default)("<div>").addClass(x),o=this._getNormalizedFields(),a=(0,v.getField)(e[0],o);return this._addAriaAttributes(n,"","treeitem",null,null,i),this._createRemoveButton((()=>{(0,v.removeItem)(t,e);1===n.parent().children().length?n.parent().remove():n.remove(),this._updateFilter()}),"condition").appendTo(n),this._createFieldButtonWithMenu(o,e,a).appendTo(n),this._createOperationAndValueButtons(e,a,n),n}_getGroupOperations(e){let t=this.option("groupOperations");const i=this.option("groupOperationDescriptions");return t&&t.length||(t=[(0,v.getGroupValue)(e).replace("!","not")]),t.map((e=>({text:i[e],value:$[e]})))}_createRemoveButton(e,t){const i=(0,d.default)("<div>").addClass(E).addClass("dx-icon-remove").addClass(I).attr("tabindex",0);if(t){const e=a.default.format("dxFilterBuilder-filterAriaRemoveButton",t);this._addAriaAttributes(i,e,"button")}return this._subscribeOnClickAndEnterKey(i,e),i}_createAddButton(e,t,i){let n;const o=this.option("maxGroupLevel");return(0,h.isDefined)(o)&&i>=o?(n=this._createButton(),this._subscribeOnClickAndEnterKey(n,t)):n=this._createButtonWithMenu({menu:{items:[{caption:a.default.format("dxFilterBuilder-addCondition"),click:t},{caption:a.default.format("dxFilterBuilder-addGroup"),click:e}],displayExpr:"caption",onItemClick(e){e.itemData.click()},cssClass:B}}),this._addAriaAttributes(n,a.default.format("dxFilterBuilder-filterAriaAddButton"),"combobox",!0,!1),n.addClass(E).addClass("dx-icon-plus").addClass(I).attr("tabindex",0)}_createValueText(e,t,i){const n=this,o=(0,d.default)("<div>").html("&nbsp;").addClass(k).attr("tabindex",0).appendTo(i);this._addAriaAttributes(o,a.default.format("dxFilterBuilder-filterAriaItemValue"),"button",!0);const s=e[2],r=(0,v.getCustomOperation)(n._customOperations,e[1]);return!r&&t.lookup?(0,v.getCurrentLookupValueText)(t,s,(e=>{(0,v.renderValueText)(o,e)})):(0,u.when)((0,v.getCurrentValueText)(t,s,r)).done((e=>{(0,v.renderValueText)(o,e,r)})),n._subscribeOnClickAndEnterKey(o,(o=>{"keyup"===o.type&&o.stopPropagation(),n._createValueEditorWithEvents(e,t,i)})),o}_updateConditionValue(e,t,i){e[2]!==t&&(e[2]=t),i(),this._updateFilter()}_addDocumentKeyUp(e,t){let i=!1,o=!1;const a=r.default.getDocument(),s=e=>{i||o?o=!1:t(e)};n.default.on(a,"keyup",s);const l=e.find("input");n.default.on(l,"compositionstart",(()=>{i=!0})),n.default.on(l,"compositionend",(()=>{i=!1,o=!0})),n.default.on(l,"keydown",(e=>{229!==e.which&&(o=!1)})),this._documentKeyUpHandler=s}_addDocumentClick(e,t){const i=r.default.getDocument(),o=i=>{this._isFocusOnEditorParts(e,i.target)||(n.default.trigger(e.find("input"),"change"),t())};n.default.on(i,"dxpointerdown",o),this._documentClickHandler=o}_isFocusOnEditorParts(e,t){const i=t||r.default.getActiveElement();return(0,d.default)(i).closest(e.children()).length||(0,d.default)(i).closest(".dx-dropdowneditor-overlay").length}_removeEvents(){const e=r.default.getDocument();(0,h.isDefined)(this._documentKeyUpHandler)&&n.default.off(e,"keyup",this._documentKeyUpHandler),(0,h.isDefined)(this._documentClickHandler)&&n.default.off(e,"dxpointerdown",this._documentClickHandler)}_dispose(){this._removeEvents(),super._dispose()}_createValueEditorWithEvents(e,t,i){let a=e[2];const s=()=>(i.empty(),this._removeEvents(),this._createValueText(e,t,i)),r=()=>{this._updateConditionValue(e,a,(()=>{s()}))},l={value:""===a?null:a,filterOperation:(0,v.getOperationValue)(e),setValue(e){a=null===e?"":e},closeEditor:r,text:i.text()};i.empty();const d=this._createValueEditor(i,t,l);n.default.trigger(d.find("input").not(":hidden").eq(0),"focus"),this._removeEvents(),this._addDocumentClick(d,r),this._addDocumentKeyUp(d,(t=>{const r=(0,o.normalizeKeyName)(t);if("tab"===r){if(this._isFocusOnEditorParts(d))return;this._updateConditionValue(e,a,(()=>{s(),t.shiftKey&&n.default.trigger(i.prev(),"focus")}))}r===z&&n.default.trigger(s(),"focus"),r===N&&this._updateConditionValue(e,a,(()=>{n.default.trigger(s(),"focus")}))})),this._fireContentReadyAction()}_createValueButton(e,t){const i=(0,d.default)("<div>").addClass(T).addClass(P);return this._createValueText(e,t,i),i}_createValueEditor(e,t,i){const n=(0,d.default)("<div>").attr("tabindex",0).appendTo(e),o=(0,v.getCustomOperation)(this._customOperations,i.filterOperation),a=o&&o.editorTemplate?o.editorTemplate:t.editorTemplate;if(a){this._getTemplate(a).render({model:(0,c.extend)({field:t},i),container:n})}else this._editorFactory.createEditor.call(this,n,(0,c.extend)({},t,i,{parentType:H}));return n}_createPopupWithTreeView(e,t){const i=this,n=(0,d.default)("<div>").addClass(e.menu.cssClass).appendTo(t);this._createComponent(n,p.default,{onHiding:e.menu.onHiding,onHidden:e.menu.onHidden,rtlEnabled:e.menu.rtlEnabled,position:e.menu.position,animation:e.menu.animation,contentTemplate(t){const n=(0,d.default)("<div>").appendTo(t);i._createComponent(n,_.default,e.menu),this.repaint()},_ignoreFunctionValueDeprecation:!0,maxHeight:()=>(0,m.getElementMaxHeightByWindow)(e.menu.position.of),visible:!0,focusStateEnabled:!1,preventScrollEvents:!1,hideOnParentScroll:this.option("closePopupOnTargetScroll"),hideOnOutsideClick:!0,onShown:e.popup.onShown,shading:!1,width:"auto",height:"auto",showTitle:!1,_wrapperClassExternal:e.menu.cssClass})}_subscribeOnClickAndEnterKey(e,t){n.default.on(e,"dxclick",t),n.default.on(e,"keyup",(e=>{(0,o.normalizeKeyName)(e)===N&&t(e)}))}}(0,s.default)("dxFilterBuilder",j);t.default=j},86193:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i={"=":"equal","<>":"notequal","<":"less","<=":"lessorequal",">":"greater",">=":"greaterorequal",notcontains:"doesnotcontain",contains:"contains",startswith:"startswith",endswith:"endswith",isblank:"isblank",isnotblank:"isnotblank"},n={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",isblank:"isBlank",isnotblank:"isNotBlank",between:"between"};t.default={getIconByFilterOperation:e=>i[e],getNameByFilterOperation:e=>n[e]}},29498:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.addItem=function(e,t){const i=k(t),n=R(i);return 1===i.length?i.unshift(e):i.push(e,n),t},t.convertToInnerStructure=Y,t.createCondition=function(e,t){const i=[e.dataField,"",""],n=F(e);return se(i,n,t),i},t.createEmptyGroup=N,t.filterHasField=function e(t,i){if(null===t||0===t.length)return!1;if($(t))return t[0]===i;return t.some((t=>($(t)||W(t))&&e(t,i)))},t.getAvailableOperations=function(e,t,i){const n=L(e),o=!!e.lookup;return i.forEach((t=>{if(!e.filterOperations&&-1===n.indexOf(t.name)){const i=t&&t.dataTypes;!(!!o&&!!t.notForLookup)&&i&&i.indexOf(e.dataType||v)>=0&&n.push(t.name)}})),n.map((e=>{const n=V(i,e);return n?{icon:n.icon||C,text:n.caption||(0,u.captionize)(n.name),value:n.name,isCustom:!0}:{icon:f.default.getIconByFilterOperation(e)||C,text:B(e,t),value:e}}))},t.getCaptionByOperation=B,t.getCaptionWithParents=function e(t,i){if(oe(t.dataField)){const n=ae(t.dataField);for(let o=0;o<i.length;o++)if(i[o].dataField===n)return`${e(i[o],i)}.${t.caption}`}return t.caption},t.getCurrentLookupValueText=function(e,t,i){if(""===t)return void i("");const{lookup:n}=e;if(n.items)i(n.calculateCellValue(t)||"");else{const a=(0,c.isFunction)(n.dataSource)?n.dataSource({}):n.dataSource;new o.DataSource(a).loadSingle(n.valueExpr,t).done((o=>{let a="";o&&(a=n.displayExpr?(0,r.compileGetter)(n.displayExpr)(o):o),e.customizeText&&(a=e.customizeText({value:t,valueText:a})),i(a)})).fail((()=>{i("")}))}},t.getCurrentValueText=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"filterBuilder";if(J(t))return"";if(Array.isArray(t)){const o=new l.Deferred;return l.when.apply(this,function(e,t,i,n){const o={values:t};return t.map((t=>Q(e,t,i,n,o)))}(e,t,i,n)).done((function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=t.some((e=>!J(e)))?t.map((e=>J(e)?"?":e)):"";o.resolve(n)})),o}return Q(e,t,i,n)},t.getCustomOperation=V,t.getDefaultOperation=F,t.getField=z,t.getFilterExpression=function e(t,i,n,o){if(!(0,c.isDefined)(t))return null;if(P(t)){return["!",e(t[1],i,n,o)]}const a=k(t);if($(a))return X(a,i,n,o)||null;let s,r=[];const l=R(a);for(let t=0;t<a.length;t++)W(a[t])?(s=e(a[t],i,n,o),s&&(t&&r.push(l),r.push(s))):$(a[t])&&(s=X(a[t],i,n,o),s&&(r.length&&r.push(l),r.push(s)));1===r.length&&(r=r[0]);return r.length?r:null},t.getFilterOperations=L,t.getGroupCriteria=k,t.getGroupMenuItem=function(e,t){const i=R(e);return t.filter((e=>e.value===i))[0]},t.getGroupValue=R,t.getItems=ne,t.getMatchedConditions=function(e,t){if(null===e||0===e.length)return[];if($(e))return le(e,t)?[e]:[];if(R(e)!==y)return[];return e.filter((e=>$(e)&&le(e,t)))},t.getMergedOperations=function(e,t,i){const n=(0,d.extend)(!0,[],e);let o=-1;n.some(((e,t)=>{if("between"===e.name)return o=t,!0})),-1!==o?n[o]=(0,d.extend)((0,_.getConfig)(t,i),n[o]):n.unshift((0,_.getConfig)(t,i));return n},t.getNormalizedFields=function(e){return e.reduce(((e,t)=>{if((0,c.isDefined)(t.dataField)){const i={};for(const e in t)t[e]&&I.includes(e)&&(i[e]=t[e]);i.defaultCalculateFilterExpression=p.default.defaultCalculateFilterExpression,(0,c.isDefined)(i.dataType)||(i.dataType=v),(0,c.isDefined)(i.trueText)||(i.trueText=n.default.format("dxDataGrid-trueText")),(0,c.isDefined)(i.falseText)||(i.falseText=n.default.format("dxDataGrid-falseText")),e.push(i)}return e}),[])},t.getNormalizedFilter=function e(t){const i=k(t);let n;if(0===i.length)return null;const o=[];for(n=0;n<i.length;n++)if(W(i[n])){const t=e(i[n]);t?i[n]=t:o.push(i[n])}else $(i[n])&&(re(i[n])||o.push(i[n]));for(n=0;n<o.length;n++)H(i,o[n]);if(1===i.length)return null;i.splice(i.length-1,1),1===i.length&&(t=function(e,t){P(e)?e[1]=t:e=t;return e}(t,i[0]));if(0===t.length)return null;return t},t.getOperationFromAvailable=function(e,t){for(let i=0;i<t.length;i++)if(t[i].value===e)return t[i];throw new g.default.Error("E1048",e)},t.getOperationValue=function(e){let t;t=null===e[2]?e[1]===b?"isblank":"isnotblank":e[1];return t},t.isCondition=$,t.isEmptyGroup=function(e){const t=k(e);if($(t))return!1;return!t.some((e=>$(e)))},t.isGroup=W,t.isValidCondition=re,t.removeFieldConditionsFromFilter=function(e,t){if(!e||0===e.length)return null;if($(e)){return le(e,t)?null:e}return de(e,[t],!1)},t.removeItem=H,t.renderValueText=void 0,t.setGroupValue=function(e,t){!function(e,t){const i=function(e){return-1!==e.indexOf("!")},n=function(e){const t=e.slice(0);e.length=0,e.push("!",t)},o=function(e){const t=k(e);e.length=0,[].push.apply(e,t)};i(t)?P(e)||n(e):P(e)&&o(e)}(e,t);const i=k(e);let n;return t=function(e){return-1===e.indexOf("!")?e:e.substring(1)}(t),function(e,t){for(n=0;n<e.length;n++)Array.isArray(e[n])||(e[n]=t)}(i,t),e},t.syncFilters=function(e,t){if(null===e||0===e.length)return t;if($(e))return le(e,t[0])?t:[e,y,t];if(R(e)!==y)return[t,"and",e];return de(e,t,!0)},t.updateConditionByOperation=se;var n=m(i(4671)),o=i(68216),a=i(82812),s=m(i(64553)),r=i(31e3),l=i(87739),d=i(52576),u=i(53124),c=i(11528),h=m(i(2082)),p=m(i(56417)),g=m(i(35185)),_=i(46827),f=m(i(86193));function m(e){return e&&e.__esModule?e:{default:e}}const v="string",C="icon-none",y="and",b="=",x="<>",w={number:["=","<>","<",">","<=",">=","isblank","isnotblank"],string:["contains","notcontains","startswith","endswith","=","<>","isblank","isnotblank"],date:["=","<>","<",">","<=",">=","isblank","isnotblank"],datetime:["=","<>","<",">","<=",">=","isblank","isnotblank"],boolean:["=","<>","isblank","isnotblank"],object:["isblank","isnotblank"]},S={date:"shortDate",datetime:"shortDateShortTime"},D=["=","<>","isblank","isnotblank"],I=["caption","customizeText","dataField","dataType","editorTemplate","falseText","editorOptions","filterOperations","format","lookup","trueText","calculateFilterExpression","name"],E="dx-filterbuilder-text",T=`${E}-part`,A=`${E}-separator`,O=`${A}-empty`;function P(e){return e&&e.length>1&&"!"===e[0]&&!$(e)}function k(e){return P(e)?e[1]:e}function M(e){if($(e))return y;let t="";for(let i=0;i<e.length;i++){const n=e[i];if(!Array.isArray(n)){if(t&&t!==n)throw a.errors.Error("E4019");"!"!==n&&(t=n)}}return t}function R(e){const t=k(e);let i=M(t);return i||(i=y),t!==e&&(i=`!${i}`),i}function L(e){const t=(i=e.filterOperations,Array.isArray(i)&&i.length?e.filterOperations:function(e){return e.lookup&&D||w[e.dataType||v]}(e));var i;return(0,d.extend)([],t)}function B(e,t){const i=f.default.getNameByFilterOperation(e);return t&&t[i]?t[i]:i}function V(e,t){const i=e.filter((e=>e.name===t));return i.length?i[0]:null}function F(e){return e.defaultFilterOperation||L(e)[0]}function H(e,t){const i=k(e),n=i.indexOf(t);return i.splice(n,1),1!==i.length&&i.splice(n,1),e}function N(e){const t=U(e),i=t?K(e):e;return t?["!",[i]]:[i]}function z(e,t){for(let i=0;i<t.length;i++){if(t[i].name===e)return t[i];if(t[i].dataField.toLowerCase()===e.toLowerCase())return t[i]}const i=ne(t,!0).filter((t=>t.dataField.toLowerCase()===e.toLowerCase()));if(i.length>0)return i[0];throw new g.default.Error("E1047",e)}function W(e){return!!Array.isArray(e)&&(e.length<2||Array.isArray(e[0])||Array.isArray(e[1]))}function $(e){return!!Array.isArray(e)&&(e.length>1&&!Array.isArray(e[0])&&!Array.isArray(e[1]))}function G(e,t,i){i=i||y;const n=M(e).toLowerCase()||i;let o=[];for(let a=0;a<e.length;a++)W(e[a])?(o.push(Y(e[a],t,i)),o=q(o,n)):$(e[a])&&(o.push(j(e[a],t)),o=q(o,n));return 0===o.length&&(o=q(o,n)),o}function j(e,t){return function(e,t){const i=V(t,e[1]);return i&&i.name===e[1]}(e,t)||e.length<3&&(e[2]=e[1],e[1]=b),e}function U(e){return-1!==e.indexOf("not")}function K(e){return e.substring(3).toLowerCase()}function Z(e,t){const i=U(t);return t=i?K(t):t,i?["!",e,t]:[e,t]}function q(e,t){const i=U(t);t=i?K(t):t,e.push(t);let n=e;return i&&(n=["!",n]),n}function Y(e,t,i){return i=i||y,e?$(e=(0,d.extend)(!0,[],e))?Z(j(e,t),i):P(e)?["!",$(e[1])?Z(j(e[1],t),i):P(e[1])?Z(Y(e[1],t),i):G(e[1],t,i)]:G(e,t,i):N(i)}function X(e,t,i,n){const o=z(e[0],t),a=j(e,i),s=i.length&&V(i,a[1]);return s&&s.calculateFilterExpression?s.calculateFilterExpression.apply(s,[a[2],o,t]):o.createFilterExpression?o.createFilterExpression.apply(o,[a[2],a[1],n]):o.calculateFilterExpression?o.calculateFilterExpression.apply(o,[a[2],a[1],n]):o.defaultCalculateFilterExpression.apply(o,[a[2],a[1],n])}function Q(e,t,i,o,a){let s;return s=!0===t?e.trueText||n.default.format("dxDataGrid-trueText"):!1===t?e.falseText||n.default.format("dxDataGrid-falseText"):function(e,t){const i=e.format||S[e.dataType];return h.default.format(t,i)}(e,t),e.customizeText&&(s=e.customizeText.call(e,{value:t,valueText:s,target:o})),i&&i.customizeText&&(s=i.customizeText.call(i,{value:t,valueText:s,field:e,target:o},a)),s}function J(e){return""===e||null===e}function ee(e,t){return e.some((e=>e.dataField===t))}function te(e,t,i){const{dataField:n}=i;oe(n)&&(i.parentId=ae(n),ee(t,i.parentId)||ee(e,i.parentId)||te(e,t,{id:i.parentId,dataType:"object",dataField:i.parentId,caption:ie(i.parentId,!0),filterOperations:["isblank","isnotblank"],defaultCalculateFilterExpression:p.default.defaultCalculateFilterExpression})),t.push(i)}function ie(e,t){let i="";if(t)e=e.substring(e.lastIndexOf(".")+1);else if(oe(e))return e.split(".").forEach(((e,t,n)=>{i+=(0,u.captionize)(e),t!==n.length-1&&(i+=".")})),i;return(0,u.captionize)(e)}function ne(e,t){const i=[];for(let n=0;n<e.length;n++){const o=(0,d.extend)(!0,{caption:ie(e[n].dataField,t)},e[n]);o.id=o.name||o.dataField,t?te(e,i,o):i.push(o)}return i}function oe(e){return-1!==e.lastIndexOf(".")}function ae(e){return e.substring(0,e.lastIndexOf("."))}function se(e,t,i){let n=V(i,t);return n?(!1===n.hasValue?(e[1]=t,e.length=2):(e[1]=t,e[2]=""),e):("isblank"===t?(e[1]=b,e[2]=null):"isnotblank"===t?(e[1]=x,e[2]=null):(n=V(i,e[1]),(n||2===e.length||null===e[2])&&(e[2]=""),e[1]=t),e)}function re(e){return""!==e[2]}function le(e,t){return e[0]===t}function de(e,t,i){const n=[];return e.forEach((e=>{$(e)?le(e,t[0])?i?(n.push(t),i=!1):n.splice(n.length-1,1):n.push(e):(n.length||W(e))&&n.push(e)})),0===n.length?null:(i&&(n.push(y),n.push(t)),1===n.length?n[0]:n)}t.renderValueText=function(e,t,i){if(Array.isArray(t)){const n=t.length-1;e.empty(),t.forEach(((t,o)=>{(0,s.default)("<span>").addClass(T).text(t).appendTo(e),o!==n&&(0,s.default)("<span>").addClass(A).text(i&&i.valueSeparator?i.valueSeparator:"|").addClass(O).appendTo(e)}))}else t?e.text(t):e.text(n.default.format("dxFilterBuilder-enterValueText"))}},83189:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ExportController=t.DataProvider=void 0,i(64973),i(56582);var n=g(i(4671)),o=g(i(64553)),a=i(87739),s=i(52576),r=i(41639),l=i(54497),d=i(11528),u=g(i(80070)),c=g(i(35185)),h=i(47197),p=g(i(54353));function g(e){return e&&e.__esModule?e:{default:e}}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_.apply(null,arguments)}const f="dx-datagrid-export-button",m="export";class v{constructor(e,t,i){this._exportController=e,this._initialColumnWidthsByColumnIndex=t,this._selectedRowsOnly=i}_getGroupValue(e){const{key:t,data:i,rowType:n,groupIndex:o,summaryCells:a}=e,s=this._options.groupColumns[o],r=p.default.getDisplayValue(s,s.deserializeValue?s.deserializeValue(t[o]):t[o],i,n);let l=`${s.caption}: ${p.default.formatValue(r,s)}`;return a&&a[0]&&a[0].length&&(l+=` ${p.default.getGroupRowSummaryText(a[0],this._options.summaryTexts)}`),l}_correctCellIndex(e){return e}_initOptions(){const e=this._exportController,t=e._columnsController.getGroupColumns();this._options={columns:e._getColumns(this._initialColumnWidthsByColumnIndex),groupColumns:t,items:this._selectedRowsOnly||e._selectionOnly?e._getSelectedItems():e._getAllItems(),isHeadersVisible:e.option("showColumnHeaders"),summaryTexts:e.option("summary.texts"),rtlEnabled:e.option("rtlEnabled")}}getHeaderStyles(){return[{bold:!0,alignment:"center"},{bold:!0,alignment:"left"},{bold:!0,alignment:"right"}]}getGroupRowStyle(){return{bold:!0,alignment:(0,r.getDefaultAlignment)(this._options.rtlEnabled)}}getColumnStyles(){const e=[];return this.getColumns().forEach((t=>{e.push({alignment:t.alignment||"left",format:t.format,dataType:t.dataType})})),e}getStyles(){return[...this.getHeaderStyles(),...this.getColumnStyles(),this.getGroupRowStyle()]}_getTotalCellStyleId(e){var t;const i=(null===(t=this.getColumns()[e])||void 0===t?void 0:t.alignment)||"right";return this.getHeaderStyles().map((e=>e.alignment)).indexOf(i)}getStyleId(e,t){return e<this.getHeaderRowCount()?0:this.isTotalCell(e-this.getHeaderRowCount(),t)?this._getTotalCellStyleId(t):this.isGroupRow(e-this.getHeaderRowCount())?this.getHeaderStyles().length+this.getColumns().length:t+this.getHeaderStyles().length}getColumns(e){const{columns:t}=this._options;return e?t:t[t.length-1]}getColumnsWidths(){const e=this.getColumns();return(0,d.isDefined)(e)?e.map((e=>e.width)):void 0}getRowsCount(){return this._options.items.length+this.getHeaderRowCount()}getHeaderRowCount(){return this.isHeadersVisible()?this._options.columns.length-1:0}isGroupRow(e){return e<this._options.items.length&&"group"===this._options.items[e].rowType}getGroupLevel(e){const t=this._options.items[e-this.getHeaderRowCount()],i=t&&t.groupIndex;return t&&"totalFooter"===t.rowType?0:(0,d.isDefined)(i)?i:this._options.groupColumns.length}getCellType(e,t){const i=this.getColumns();if(e<this.getHeaderRowCount())return"string";if(e-=this.getHeaderRowCount(),t<i.length){const n=this._options.items.length&&this._options.items[e],o=i[t];return n&&"data"===n.rowType&&isFinite(n.values[this._correctCellIndex(t)])&&!(0,d.isDefined)(o.customizeText)?(0,d.isDefined)(o.lookup)?o.lookup.dataType:o.dataType:"string"}}ready(){this._initOptions();const e=this._options;return(0,a.when)(e.items).done((t=>{e.items=t})).fail((()=>{e.items=[]}))}_convertFromGridGroupSummaryItems(e){if((0,d.isDefined)(e)&&e.length>0)return e.map((e=>({value:e.value,name:e.name})))}getCellData(e,t,i){let n,o;const a={cellSourceData:{},value:n},s=this.getColumns(),r=this._correctCellIndex(t);if(e<this.getHeaderRowCount()){o=this.getColumns(!0)[e][t],a.cellSourceData.rowType="header",a.cellSourceData.column=o&&o.gridColumn,a.value=o&&o.caption}else{e-=this.getHeaderRowCount();const l=this._options.items.length&&this._options.items[e];if(l){const e=l.values;switch(a.cellSourceData.rowType=l.rowType,a.cellSourceData.column=s[t]&&s[t].gridColumn,l.rowType){case"groupFooter":case"totalFooter":r<e.length&&(n=e[r],(0,d.isDefined)(n)?(a.cellSourceData.value=n.value,a.cellSourceData.totalSummaryItemName=n.name,a.value=p.default.getSummaryText(n,this._options.summaryTexts)):a.cellSourceData.value=void 0);break;case"group":if(a.cellSourceData.groupIndex=l.groupIndex,t<1)a.cellSourceData.column=this._options.groupColumns[l.groupIndex],a.cellSourceData.value=l.key[l.groupIndex],a.cellSourceData.groupSummaryItems=this._convertFromGridGroupSummaryItems(l.summaryCells[0]),a.value=this._getGroupValue(l);else{const e=l.values[r];if(Array.isArray(e)){a.cellSourceData.groupSummaryItems=this._convertFromGridGroupSummaryItems(e),n="";for(let t=0;t<e.length;t++)n+=(t>0?i?"\n":" \n ":"")+p.default.getSummaryText(e[t],this._options.summaryTexts);a.value=n}else a.cellSourceData.value=void 0}break;default:if(o=s[t],o){const t=e[r],n=p.default.getDisplayValue(o,t,l.data,l.rowType);!isFinite(n)||(0,d.isDefined)(o.customizeText)?i&&(0,d.isDefined)(o.customizeText)&&o.customizeText===this._exportController._columnsController.getCustomizeTextByDataType("boolean")?a.value=n:a.value=p.default.formatValue(n,o):a.value=n,a.cellSourceData.value=t}a.cellSourceData.data=l.data}}}return a}isHeadersVisible(){return this._options.isHeadersVisible}isTotalCell(e,t){const{items:i}=this._options,n=i[e],o=this._correctCellIndex(t),a=n.summaryCells&&n.summaryCells[o]&&n.summaryCells[o].length>0&&n.summaryCells[o][0].alignByColumn;return n&&"groupFooter"===n.rowType||"totalFooter"===n.rowType||a}getCellMerging(e,t){const{columns:i}=this._options,n=i[e]&&i[e][t];return n?{colspan:(n.exportColspan||1)-1,rowspan:(n.rowspan||1)-1}:{colspan:0,rowspan:0}}getFrozenArea(){return{x:0,y:this.getHeaderRowCount()}}}t.DataProvider=v;class C extends p.default.ViewController{init(){this.throwWarningIfNoOnExportingEvent(),this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._selectionController=this.getController("selection"),this._rowsView=this.getView("rowsView"),this._headersView=this.getView("columnHeadersView"),this.createAction("onExporting",{excludeValidators:["disabled","readOnly"]})}_getEmptyCell(){return{caption:"",colspan:1,rowspan:1}}_updateColumnWidth(e,t){e.width=t}_getColumns(e){let t,i,n=[];const o=this._columnsController,a=o.getRowCount();for(t=0;t<=a;t++){const r=[];let l;if(i=o.getVisibleColumns(t,!0),t===a)if(this._updateLockCount)l=e;else{const e=this._getColumnWidths(this._headersView,this._rowsView);if(e&&e.length){l={};for(let t=0;t<i.length;t++)l[i[t].index]=e[t]}}for(let e=0;e<i.length;e++){const t=(0,s.extend)({},i[e],{dataType:"datetime"===i[e].dataType?"date":i[e].dataType,gridColumn:i[e]});if(this._needColumnExporting(t)){const e=this._calculateExportColspan(t);(0,d.isDefined)(e)&&(t.exportColspan=e),l&&this._updateColumnWidth(t,l[t.index]),r.push(t)}}n.push(r)}return i=n[a],n=(0,h.prepareItems)(n.slice(0,-1),this._getEmptyCell()),n.push(i),n}_calculateExportColspan(e){if(!e.isBand)return;const t=this._columnsController.getChildrenByBandColumn(e.index,!0);return(0,d.isDefined)(t)?t.reduce(((e,t)=>this._needColumnExporting(t)?e+(this._calculateExportColspan(t)||1):e),0):void 0}_needColumnExporting(e){return!e.command&&(e.allowExporting||void 0===e.allowExporting)}_getFooterSummaryItems(e,t){const i=[];let n=1,o=0;do{const a=[];for(let t=0;t<e.length;t++){const i=e[t],s=i.length;n<s&&(n=s),a.push(i[o])}i.push({values:a,rowType:t?"totalFooter":"groupFooter"})}while(o++<n-1);return i}_hasSummaryGroupFooters(){const e=this.option("summary.groupItems");if((0,d.isDefined)(e))for(let t=0;t<e.length;t++)if(e[t].showInGroupFooter)return!0;return!1}_getItemsWithSummaryGroupFooters(e){let t=[],i=[],n=[];for(let o=0;o<e.length;o++){const a=e[o];"groupFooter"===a.rowType?(n=this._getFooterSummaryItems(a.summaryCells),t=t.concat(i,n),i=[]):i.push(a)}return t.length?t:i}_updateGroupValuesWithSummaryByColumn(e){let t=[];for(let i=0;i<e.length;i++){const n=e[i],{summaryCells:o}=n;if("group"===n.rowType&&o&&o.length>1){const e=n.values.length;for(let i=1;i<o.length;i++)for(let n=0;n<o[i].length;n++){const a=o[i][n];a&&a.alignByColumn&&(Array.isArray(t[i-e])||(t[i-e]=[]),t[i-e].push(a))}t.length>0&&(n.values.push(...t),t=[])}}}_processUnExportedItems(e){const t=this._columnsController.getVisibleColumns(null,!0),i=this._columnsController.getGroupColumns();let n,o;for(let a=0;a<e.length;a++){const s=e[a];let r=!1;n=[],o=[];for(let e=0;e<t.length;e++){const a=t[e];if(r||(r=["detailExpand","buttons"].includes(a.type)),this._needColumnExporting(a)&&(s.values&&("group"!==s.rowType||n.length?n.push(s.values[e]):n.push(s.key[s.groupIndex])),s.summaryCells))if("group"!==s.rowType||o.length)o.push(s.summaryCells[e]);else{const t=e-i.length+s.groupIndex;o.push(s.summaryCells[r?t:t+1])}}n.length&&(s.values=n),o.length&&(s.summaryCells=o)}}_getAllItems(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this,n=new a.Deferred,o=this._dataController.footerItems(),s=o.length&&o[0],r=i.option("summary.totalItems");let l;return(0,a.when)(e).done((e=>{this._dataController.loadAll(e,t).done(((e,t)=>{i._updateGroupValuesWithSummaryByColumn(e),i._hasSummaryGroupFooters()&&(e=i._getItemsWithSummaryGroupFooters(e)),l=s&&s.summaryCells,(0,d.isDefined)(t)&&r&&(l=i._getSummaryCells(r,t));const o=s&&i._getFooterSummaryItems(l,!0);o&&(e=e.concat(o)),i._processUnExportedItems(e),n.resolve(e)})).fail(n.reject)})).fail(n.reject),n}_getSummaryCells(e,t){return this._dataController._calculateSummaryCells(e,t,this._columnsController.getVisibleColumns(null,!0),((e,t)=>this._dataController._isDataColumn(t)?t.index:-1))}_getSelectedItems(){return this.needLoadItemsOnExportingSelectedItems()?this._getAllItems(this._selectionController.loadSelectedItemsWithFilter(),!0):this._getAllItems(this._selectionController.getSelectedRowsData())}_getColumnWidths(e,t){return e&&e.isVisible()?e.getColumnWidths():t.getColumnWidths()}throwWarningIfNoOnExportingEvent(){var e,t;const i=null===(e=(t=this.component).hasActionSubscription)||void 0===e?void 0:e.call(t,"onExporting");this.option("export.enabled")&&!i&&c.default.log("W1024")}callbackNames(){return["selectionOnlyChanged"]}getDataProvider(e){const t=this._getColumnWidths(this._headersView,this._rowsView);let i;if(t&&t.length){i={};const e=this._columnsController.getVisibleColumns(this._columnsController.getRowCount(),!0);for(let n=0;n<e.length;n++)i[e[n].index]=t[n]}return new v(this,i,e)}exportTo(e,t){this._selectionOnly=e;const i=this.getAction("onExporting"),n={rtlEnabled:this.option("rtlEnabled"),selectedRowsOnly:!!e,format:t,fileName:"DataGrid",cancel:!1};(0,d.isFunction)(i)&&i(n)}publicMethods(){return["getDataProvider"]}selectionOnly(e){if(!(0,d.isDefined)(e))return this._isSelectedRows;this._isSelectedRows=e,this.selectionOnlyChanged.fire()}optionChanged(e){super.optionChanged(e),"export"===e.name&&this.throwWarningIfNoOnExportingEvent()}needLoadItemsOnExportingSelectedItems(){return this.option("loadItemsOnExportingSelectedItems")??this._dataController._dataSource.remoteOperations().filtering}}t.ExportController=C;p.default.registerModule("export",{defaultOptions:()=>({export:{enabled:!1,fileName:"DataGrid",formats:["xlsx"],allowExportSelectedData:!1,texts:{exportTo:n.default.format("dxDataGrid-exportTo"),exportAll:n.default.format("dxDataGrid-exportAll"),exportSelectedRows:n.default.format("dxDataGrid-exportSelectedRows")}}}),controllers:{export:C},extenders:{controllers:{editing:e=>class extends e{callbackNames(){const e=super.callbackNames();return(0,d.isDefined)(e)?e.push("editingButtonsUpdated"):["editingButtonsUpdated"]}_updateEditButtons(){super._updateEditButtons(),this.editingButtonsUpdated.fire()}}},views:{headerPanel:e=>class extends e{_getToolbarItems(){const e=super._getToolbarItems(),t=this._getExportToolbarButton();return t&&(e.push(t),this._correctItemsPosition(e)),e}_getExportToolbarButton(){const e=this._getExportToolbarItems();if(0===e.length)return null;const t=this._needDisableExportButton(),i={name:"exportButton",location:"after",locateInMenu:"auto",sortIndex:30,options:{items:e},disabled:t};if(1===e.length){const t=_({},e[0],{hint:e[0].text,elementAttr:{class:f}});i.widget="dxButton",i.showText="inMenu",i.options=t}else{const t={icon:m,displayExpr:"text",items:e,hint:this.option("export.texts.exportTo"),elementAttr:{class:f},dropDownOptions:{width:"auto",_wrapperClassExternal:"dx-datagrid-export-menu"}};i.options=t,i.widget="dxDropDownButton",i.menuItemTemplate=(t,i,n)=>{this._createComponent((0,o.default)(n),u.default,{items:e})}}return i}_getExportToolbarItems(){const e=this.option("export"),t=this.option("export.texts"),i=this.option("export.formats")??[];if(!e.enabled)return[];const n=[];return i.forEach((i=>{let o=i.toUpperCase(),a=m;"xlsx"===i&&(o="Excel",a="xlsxfile"),"pdf"===i&&(a="pdffile"),n.push({text:(0,l.format)(t.exportAll,o),icon:a,onClick:()=>{this._exportController.exportTo(!1,i)}}),e.allowExportSelectedData&&n.push({text:(0,l.format)(t.exportSelectedRows,o),icon:"exportselected",onClick:()=>{this._exportController.exportTo(!0,i)}})})),n}_correctItemsPosition(e){e.sort(((e,t)=>e.sortIndex-t.sortIndex))}_isExportButtonVisible(){return this.option("export.enabled")}optionChanged(e){super.optionChanged(e),"export"===e.name&&(e.handled=!0,this._invalidate())}_needDisableExportButton(){const e=!this._columnsController.hasVisibleDataColumns(),t=this._editingController.hasChanges();return e||t}_columnOptionChanged(e){super._columnOptionChanged(e);if(p.default.checkChanges(e.optionNames,["groupIndex","visible","all"])){const e=this._needDisableExportButton();this.setToolbarItemDisabled("exportButton",e)}}init(){super.init(),this._exportController=this.getController("export"),this._editingController.editingButtonsUpdated.add((()=>{const e=this._needDisableExportButton();this.setToolbarItemDisabled("exportButton",e)}))}isVisible(){return super.isVisible()||this._isExportButtonVisible()}}}}})},30131:function(e,t,i){var n,o=i(17781),a=i(31e3),s=i(87739),r=i(11528),l=i(51628),d=(n=i(54353))&&n.__esModule?n:{default:n},u=i(73057);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},c.apply(null,arguments)}const h=Number.MAX_SAFE_INTEGER||9007199254740991;d.default.registerModule("focus",c({},l.focusModule,{extenders:c({},l.focusModule.extenders,{controllers:c({},l.focusModule.extenders.controllers,{data:e=>class extends(l.focusModule.extenders.controllers.data(e)){changeRowExpand(e,t){return this.option("focusedRowEnabled")&&Array.isArray(e)&&this.isRowExpanded(e)&&(t&&this._keyboardNavigationController.isKeyboardEnabled()||!this._isFocusedRowInsideGroup(e)||this.option("focusedRowKey",e)),super.changeRowExpand(e,t)}_isFocusedRowInsideGroup(e){const t=this.option("focusedRowKey"),i=this.getRowIndexByKey(t),n=i>=0&&this.getVisibleRows()[i],o=this._columnsController.getGroupDataSourceParameters(!0);if(n)for(let t=0;t<e.length;++t){if((0,a.compileGetter)(o[t]&&o[t].selector)(n.data)!==e[t])return!1}return!0}_getGroupPath(e,t){const i=[];let n=[e];for(;n&&n[0]&&t;){const e=n[0];void 0!==e.key&&i.push(e.key),n=e.items,t--}return i}_expandGroupByPath(e,t,i){const n=new s.Deferred;return i++,e.expandRow(t.slice(0,i)).done((()=>{i===t.length?n.resolve():e._expandGroupByPath(e,t,i).done(n.resolve).fail(n.reject)})).fail(n.reject),n.promise()}_calculateGlobalRowIndexByGroupedData(e){const t=this,i=t._dataSource,n=t._generateFilterByKey(e),o=new s.Deferred,a=Array.isArray(e),l=i.group();return a?o.resolve(-1).promise():i._grouping._updatePagingOptions?(i.load({filter:t._concatWithCombinedFilter(n),group:l}).done((i=>{if(!i||0===i.length||!(0,r.isDefined)(i[0].key)||-1===i[0].key)return o.resolve(-1).promise();const n=t._getGroupPath(i[0],l.length);t._expandGroupByPath(t,n,0).done((()=>{t._calculateExpandedRowGlobalIndex(o,e,n,l)})).fail(o.reject)})).fail(o.reject),o.promise()):(t._calculateGlobalRowIndexByFlatData(e,null,!0).done(o.resolve).fail(o.reject),o)}_calculateExpandedRowGlobalIndex(e,t,i,n){const a=(0,u.createGroupFilter)(i,{group:n}),s=this._dataSource,r=this.option("scrolling.mode"),l="virtual"===r||"infinite"===r,d=s.pageSize();let c;s._grouping._updatePagingOptions({skip:0,take:h},((e,t)=>{(0,o.equalByValue)(e.path,i)&&(c=t)})),this._calculateGlobalRowIndexByFlatData(t,a).done((t=>{let n,o;if(t<0)return void e.resolve(-1);n=(c%d||d)+t-i.length,o=l?0:Math.floor(n/(d-i.length))*i.length,n=c+t+o,e.resolve(n)})).fail(e.reject)}}})})}))},43983:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupingHeaderPanelExtender=void 0;var n=f(i(4671)),o=f(i(65951)),a=f(i(64553)),s=i(87739),r=i(21274),l=i(57653),d=i(11528),u=i(16191),c=i(68491),h=f(i(54353)),p=f(i(72208)),g=i(13729),_=i(27191);function f(e){return e&&e.__esModule?e:{default:e}}const m="dx-datagrid-group-panel",v="dx-group-panel-item",C="dx-toolbar-label";p.default.extend((e=>class extends e{init(){super.init.apply(this,arguments),this._initGroupingHelper()}_initGroupingHelper(e){const t=this._grouping,i=this.option("grouping.autoExpandAll"),n=this.option("focusedRowEnabled"),o=e?e.remoteOperations:this.remoteOperations();!(o.filtering&&o.sorting&&o.paging)||o.grouping||!i&&n?(!t||t instanceof _.GroupingHelper)&&(this._grouping=new g.GroupingHelper(this)):(!t||t instanceof g.GroupingHelper)&&(this._grouping=new _.GroupingHelper(this))}totalItemsCount(){const e=super.totalItemsCount();return e>0&&this._dataSource.group()&&this._dataSource.requireTotalCount()?e+this._grouping.totalCountCorrection():e}itemsCount(){return this._dataSource.group()?this._grouping.itemsCount()||0:super.itemsCount.apply(this,arguments)}allowCollapseAll(){return this._grouping.allowCollapseAll()}isGroupItemCountable(e){return this._grouping.isGroupItemCountable(e)}isRowExpanded(e){const t=this._grouping.findGroupInfo(e);return t?t.isExpanded:!this._grouping.allowCollapseAll()}collapseAll(e){return this._collapseExpandAll(e,!1)}expandAll(e){return this._collapseExpandAll(e,!0)}_collapseExpandAll(e,t){const i=this,n=i._dataSource,o=n.group(),a=h.default.normalizeSortingInfo(o||[]);if(a.length){for(let i=0;i<a.length;i++)void 0===e||e===i?a[i].isExpanded=t:o&&o[i]&&(a[i].isExpanded=o[i].isExpanded);n.group(a),i._grouping.foreachGroups(((i,n)=>{void 0!==e&&e!==n.length-1||(i.isExpanded=t)}),!1,!0),i.resetPagesCache()}return!0}refresh(){return super.refresh.apply(this,arguments),this._grouping.refresh.apply(this._grouping,arguments)}changeRowExpand(e){const t=this,i=t._dataSource;if(i.group())return i.beginLoading(),t._lastLoadOptions&&(t._lastLoadOptions.groupExpand=!0),t._changeRowExpandCore(e).always((()=>{i.endLoading()}))}_changeRowExpandCore(e){return this._grouping.changeRowExpand(e)}_hasGroupLevelsExpandState(e,t){if(e&&Array.isArray(e))for(let i=0;i<e.length;i++)if(e[i].isExpanded===t)return!0}_customizeRemoteOperations(e,t){const{remoteOperations:i}=e;e.storeLoadOptions.group?(i.grouping&&!e.isCustomLoading&&(i.groupPaging&&!this._hasGroupLevelsExpandState(e.storeLoadOptions.group,!0)||(i.paging=!1)),i.grouping||i.sorting&&i.filtering&&!e.isCustomLoading&&!this._hasGroupLevelsExpandState(e.storeLoadOptions.group,!1)||(i.paging=!1)):!e.isCustomLoading&&i.paging&&t.grouping&&this.resetCache(),super._customizeRemoteOperations.apply(this,arguments)}_handleDataLoading(e){return super._handleDataLoading(e),this._initGroupingHelper(e),this._grouping.handleDataLoading(e)}_handleDataLoaded(e){return this._grouping.handleDataLoaded(e,super._handleDataLoaded.bind(this))}_handleDataLoadedCore(e){return this._grouping.handleDataLoadedCore(e,super._handleDataLoadedCore.bind(this))}}));const y=function(e,t){const i=this._columnsController;switch(t.itemData.value){case"group":{const t=i._dataSource.group()||[];i.columnOption(e.dataField,"groupIndex",t.length);break}case"ungroup":i.columnOption(e.dataField,"groupIndex",-1);break;case"ungroupAll":this.component.clearGrouping()}},b=e=>{const t=null==e?void 0:e.visible;return"auto"===t?"desktop"===o.default.current().deviceType:!!t},x=(e,t)=>{const i=b(e),n=(null==e?void 0:e.allowColumnDragging)&&t.allowGrouping;return i&&!!n},w=e=>class extends e{_getToolbarItems(){const e=super._getToolbarItems();return this._appendGroupingItem(e)}_appendGroupingItem(e){if(this._isGroupPanelVisible()){let t=!1;const i={template:()=>{const e=(0,a.default)("<div>").addClass(m);return this._updateGroupPanelContent(e),(0,c.registerKeyboardAction)("groupPanel",this,e,void 0,this._handleActionKeyDown.bind(this)),e},name:"groupPanel",onItemRendered:()=>{t&&this.renderCompleted.fire(),t=!0},location:"before",locateInMenu:"never",sortIndex:1};e.push(i),this.updateToolbarDimensions()}return e}_handleActionKeyDown(e){const{event:t}=e,i=(0,a.default)(t.target),n=i.closest(`.${v}`).index(),o=this._columnsController.getGroupColumns()[n],s=o&&o.index;i.is(".dx-header-filter")?this._headerFilterController.showHeaderFilterMenu(s,!0):this._processGroupItemAction(s),t.preventDefault()}_isGroupPanelVisible(){return b(this.option("groupPanel"))}_renderGroupPanelItems(e,t){const i=this;e.empty(),(0,r.each)(t,((t,n)=>{i._createGroupPanelItem(e,n)})),(0,u.restoreFocus)(this)}_createGroupPanelItem(e,t){const i=(0,a.default)("<div>").addClass(t.cssClass).addClass(v).data("columnData",t).appendTo(e).text(t.caption);return(0,u.setTabIndex)(this,i),i}_columnOptionChanged(e){if(!this._requireReady&&!h.default.checkChanges(e.optionNames,["width","visibleWidth"])){const e=this.element(),t=e&&e.find(`.${m}`);t&&t.length&&(this._updateGroupPanelContent(t),this.updateToolbarDimensions(),this.renderCompleted.fire())}super._columnOptionChanged()}_updateGroupPanelContent(e){const t=this.getColumns(),i=this.option("groupPanel");this._renderGroupPanelItems(e,t),i.allowColumnDragging&&!t.length&&((0,a.default)("<div>").addClass("dx-group-panel-message").text(i.emptyPanelText).appendTo(e),e.closest(".dx-toolbar-item").addClass(C),e.closest(`.${C}`).css("maxWidth","none"))}allowDragging(e){const t=this.option("groupPanel");return x(t,e)}getColumnElements(){const e=this.element();return e&&e.find(`.${v}`)}getColumns(){return this._columnsController.getGroupColumns()}getBoundingRect(){const e=this.element();if(e&&e.find(`.${m}`).length){const t=e.offset();return{top:t.top,bottom:t.top+(0,l.getHeight)(e)}}return null}getName(){return"group"}getContextMenuItems(e){const t=this,i=t.option("grouping.contextMenuEnabled"),n=(0,a.default)(e.targetElement).closest(`.${v}`);let o;if(n.length&&(e.column=n.data("columnData")),i&&e.column){const{column:i}=e;if(!(0,d.isDefined)(i.allowGrouping)||i.allowGrouping){const e=(0,d.isDefined)(i.groupIndex)&&i.groupIndex>-1,n=t.option("grouping.texts"),a=y.bind(t,i);o=[{text:n.ungroup,value:"ungroup",disabled:!e,onItemClick:a},{text:n.ungroupAll,value:"ungroupAll",onItemClick:a}]}}return o}isVisible(){return super.isVisible()||this._isGroupPanelVisible()}hasGroupedColumns(){return this._isGroupPanelVisible()&&!!this.getColumns().length}optionChanged(e){"groupPanel"===e.name?(this._invalidate(),e.handled=!0):super.optionChanged(e)}};t.GroupingHeaderPanelExtender=w;h.default.registerModule("grouping",{defaultOptions:()=>({grouping:{autoExpandAll:!0,allowCollapsing:!0,contextMenuEnabled:!1,expandMode:"buttonClick",texts:{groupContinuesMessage:n.default.format("dxDataGrid-groupContinuesMessage"),groupContinuedMessage:n.default.format("dxDataGrid-groupContinuedMessage"),groupByThisColumn:n.default.format("dxDataGrid-groupHeaderText"),ungroup:n.default.format("dxDataGrid-ungroupHeaderText"),ungroupAll:n.default.format("dxDataGrid-ungroupAllText")}},groupPanel:{visible:!1,emptyPanelText:n.default.format("dxDataGrid-groupPanelEmptyText"),allowColumnDragging:!0}}),extenders:{controllers:{data:e=>class extends e{init(){const e=this;super.init(),e.createAction("onRowExpanding"),e.createAction("onRowExpanded"),e.createAction("onRowCollapsing"),e.createAction("onRowCollapsed")}_beforeProcessItems(e){const t=this._columnsController.getGroupColumns();return(e=super._beforeProcessItems(e)).length&&t.length&&(e=this._processGroupItems(e,t.length)),e}_processItem(e,t){return(0,d.isDefined)(e.groupIndex)&&(0,d.isString)(e.rowType)&&0===e.rowType.indexOf("group")?(e=this._processGroupItem(e,t),t.dataIndex=0):e=super._processItem.apply(this,arguments),e}_processGroupItem(e,t){return e}_processGroupItems(e,t,i){const n=this,o=n._columnsController.getGroupColumns(),a=o[o.length-t];if(!i){const e=n.option("scrolling.mode");i={collectContinuationItems:"virtual"!==e&&"infinite"!==e,resultItems:[],path:[],values:[]}}const{resultItems:s}=i;if(i.data&&(!i.collectContinuationItems&&i.data.isContinuation||s.push({rowType:"group",data:i.data,groupIndex:i.path.length-1,isExpanded:!!i.data.items,key:i.path.slice(0),values:i.values.slice(0)})),e)if(0===t)s.push.apply(s,e);else for(let o=0;o<e.length;o++){const r=e[o];r&&"items"in r?(i.data=r,i.path.push(r.key),i.values.push(a&&a.deserializeValue&&!a.calculateDisplayValue?a.deserializeValue(r.key):r.key),n._processGroupItems(r.items,t-1,i),i.data=void 0,i.path.pop(),i.values.pop()):s.push(r)}return s}publicMethods(){return super.publicMethods().concat(["collapseAll","expandAll","isRowExpanded","expandRow","collapseRow"])}collapseAll(e){const t=this._dataSource;t&&t.collapseAll(e)&&(t.pageIndex(0),t.reload())}expandAll(e){const t=this._dataSource;t&&t.expandAll(e)&&(t.pageIndex(0),t.reload())}changeRowExpand(e){const t=this,i=t.isRowExpanded(e),n={key:e,expanded:i};return t.executeAction(i?"onRowCollapsing":"onRowExpanding",n),n.cancel?(new s.Deferred).resolve():(0,s.when)(t._changeRowExpandCore(e)).done((()=>{n.expanded=!i,t.executeAction(i?"onRowCollapsed":"onRowExpanded",n)}))}_changeRowExpandCore(e){const t=this,i=this._dataSource,n=new s.Deferred;return i?(0,s.when)(i.changeRowExpand(e)).done((()=>{t.load().done(n.resolve).fail(n.reject)})).fail(n.reject):n.resolve(),n}isRowExpanded(e){const t=this._dataSource;return t&&t.isRowExpanded(e)}expandRow(e){return this.isRowExpanded(e)?(new s.Deferred).resolve():this.changeRowExpand(e)}collapseRow(e){return this.isRowExpanded(e)?this.changeRowExpand(e):(new s.Deferred).resolve()}optionChanged(e){"grouping"===e.name&&(e.name="dataSource"),super.optionChanged(e)}},columns:e=>class extends e{_getExpandColumnOptions(){const e=super._getExpandColumnOptions.apply(this,arguments);return e.cellTemplate=h.default.getExpandCellTemplate(),e}},editing:e=>class extends e{_isProcessedItem(e){return(0,d.isDefined)(e.groupIndex)&&(0,d.isString)(e.rowType)&&0===e.rowType.indexOf("group")}}},views:{headerPanel:w,rowsView:e=>class extends e{getContextMenuItems(e){const t=this;let i;if(t.option("grouping.contextMenuEnabled")&&e.row&&"group"===e.row.rowType){const n=t._columnsController.columnOption(`groupIndex:${e.row.groupIndex}`);if(n&&n.allowGrouping){const e=t.option("grouping.texts"),o=y.bind(t,n);i=[],i.push({text:e.ungroup,value:"ungroup",onItemClick:o},{text:e.ungroupAll,value:"ungroupAll",onItemClick:o})}}return i}_rowClick(e){const t=this,i=t.option("grouping.expandMode"),n="infinite"!==t.option("scrolling.mode")&&"rowClick"===i&&(0,a.default)(e.event.target).closest(".dx-group-row").length,o=(0,a.default)(e.event.target).closest(".dx-datagrid-expand").length;(n||o)&&t._changeGroupRowState(e),super._rowClick(e)}_changeGroupRowState(e){const t=this._dataController.items()[e.rowIndex],i=this._columnsController.columnOption(`groupIndex:${t.groupIndex}`,"allowCollapsing");("data"===t.rowType||"group"===t.rowType&&!1!==i)&&(this._dataController.changeRowExpand(t.key,!0),e.event.preventDefault(),e.handled=!0)}},columnHeadersView:e=>class extends e{getContextMenuItems(e){const t=this,i=t.option("grouping.contextMenuEnabled");let n=super.getContextMenuItems(e);if(i&&e.row&&("header"===e.row.rowType||"detailAdaptive"===e.row.rowType)){const{column:i}=e;if(!i.command&&(!(0,d.isDefined)(i.allowGrouping)||i.allowGrouping)){const e=t.option("grouping.texts"),o=(0,d.isDefined)(i.groupIndex)&&i.groupIndex>-1,a=y.bind(t,i);n=n||[],n.push({text:e.groupByThisColumn,value:"group",beginGroup:!0,disabled:o,onItemClick:a}),i.showWhenGrouped&&n.push({text:e.ungroup,value:"ungroup",disabled:!o,onItemClick:a}),n.push({text:e.ungroupAll,value:"ungroupAll",onItemClick:a})}}return n}allowDragging(e){const t=this.option("groupPanel");return x(t,e)||super.allowDragging(e)}}}}})},13729:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupingHelper=void 0;var n=i(82812),o=i(87739),a=i(52576),s=i(21274),r=c(i(35185)),l=c(i(54353)),d=i(73057),u=i(14385);function c(e){return e&&e.__esModule?e:{default:e}}function h(e,t,i,n){if(n=n||0,t>1&&i>0){let o=e-Math.floor(e/t)*t||t;return o+=i-n-2,o<0&&(o+=t),Math.floor(o/(t-n-1))}return 0}const p=function(e,t,i){return e.foreachGroups(((e,i)=>{if(e.isExpanded)return t(e,i)}),!0,!1,i,i)},g=function(e,t,i,n,o,a,s){let r;if(n.items=n.items||[],n.paths=n.paths||[],n.count=n.count||0,n.lastCount=n.lastCount||0,i)for(let l=0;l<t.length;l++){const d=t[l];if(void 0!==d.items){if(o.push(d.key),a)r=!0;else{const t=e.findGroupInfo(o);r=t&&t.isExpanded}r?d.items?g(e,d.items,i-1,n,o,a,s):1!==i||!d.count||a&&!s||(n.items.push(d),n.paths.push(o.slice(0)),n.count+=n.lastCount,n.lastCount=d.count):(d.collapsedItems=d.items,d.items=null),o.pop()}}},_=function(e,t,i,n,o){const a=e.findGroupInfo(n);let s;a?(i?a.count=t.count>0?t.count:t.items&&t.items.length||0:t.count=a.count||t.count,a.offset=o):(i&&(s=t.count>0?t.count:t.items.length),e.addGroupInfo({isExpanded:e._isGroupExpanded(n.length-1),path:n.slice(0),offset:o,count:s||0}))},f=function(e,t,i,n,o,a,s){const r=(t.group?t.group.length:0)===n;let l,d=0,u=0;if(o=o||0,a=a||[],t.remoteOperations.paging&&!s&&(d=0===o?t.skip||0:t.skips[o-1]||0),o>=n)return i.length;for(let s=0;s<i.length;s++){const c=i[s];if(c){if(a.push(c.key),!c.count&&!c.items||void 0===c.items)return-1;if(_(e,c,r,a,d+s),l=c.items?f(e,t,c.items,n,o+1,a,s):c.count||-1,l<0)return-1;u+=l,a.pop()}}return u},m=function(e,t){return e&&e.length&&e[t]&&!!e[t].isExpanded},v=function(e,t,i){let n,o=i;for(let i=0;i<e.length;i++)n=e[i].offset+1,i>0&&(n+=e[i-1].childrenTotalCount,t&&(n+=h(o,t,n,i-1)*i)),o+=n;return o};function C(e,t,i,n){const o=t.items[n],a=e.skips&&e.skips[i],s=e.takes&&e.takes[i],r=n===t.items.length-1,l=0===n,d=l&&a||0,u=o.count>s+d;l&&void 0!==a&&(o.isContinuation=!0),r&&void 0!==s&&u&&(o.isContinuationOnNextPage=!0)}function y(e){return!Array.isArray(e)}function b(e){y(e.data)||(e.data=new o.Deferred)}function x(e,t,i,n,r,u){t.isCustomLoading||(g(e,u,i,n={},[]),function(e,t,i){const n=i-1,o=e.group?e.group.length:0;t.skip=e.skips&&e.skips[n],e.takes&&void 0!==e.takes[n]&&(t.take=o===i&&t.count?t.count-(t.skip||0):0,t.take+=e.takes[n])}(t,n,i));const c=t.group?t.group.length:0;n.paths.length&&c-i>0?(b(t),function(e,t,i,n,a,r){const l=t.group||[],u=l[a+1],c=[];(0,s.each)(i.paths,(n=>{var s;const r={requireTotalCount:!1,requireGroupCount:!0,group:[u],groupSummary:t.storeLoadOptions.groupSummary,filter:(0,d.createGroupFilter)(i.paths[n],{filter:t.storeLoadOptions.filter,group:l}),select:t.storeLoadOptions.select,langParams:null===(s=t.storeLoadOptions)||void 0===s?void 0:s.langParams};0===n&&(r.skip=i.skip||0),n===i.paths.length-1&&(r.take=i.take);const h=0===r.take?[]:e._dataSource.loadFromStore(r);(0,o.when)(h).done((e=>{const o=i.items[n];C(t,i,a,n),o.items=e})),c.push(h)})),o.when.apply(null,c).done((()=>{f(e,t,r,n+1),x(e,t,n+1,i,a+1,r)}))}(e,t,n,i,r,u)):n.paths.length&&t.storeLoadOptions.group?(b(t),function(e,t,i,n){const r=[],u=t.group||[];(0,s.each)(i.paths,((e,i)=>{r.push((0,d.createGroupFilter)(i,{group:t.isCustomLoading?t.storeLoadOptions.group:u}))}));let{filter:c}=t.storeLoadOptions;t.storeLoadOptions.isLoadingAll||(c=l.default.combineFilters([c,l.default.combineFilters(r,"or")]));const h=(0,a.extend)({},t.storeLoadOptions,{requireTotalCount:!1,requireGroupCount:!1,group:null,sort:u.concat(l.default.normalizeSortingInfo(t.storeLoadOptions.sort||[])),filter:c}),p=e._dataSource.isLastLevelGroupItemsPagingLocal();p||(h.skip=i.skip,h.take=i.take);(0,o.when)(0===i.take?[]:e._dataSource.loadFromStore(h)).done((o=>{p&&(o=e._dataSource.sortLastLevelGroupItems(o,u,i.paths),o=i.skip?o.slice(i.skip):o,o=i.take?o.slice(0,i.take):o),(0,s.each)(i.items,((e,n)=>{const a=n.count-(0===e&&i.skip||0),s=o.splice(0,a);C(t,i,u.length-1,e),n.items=s})),t.data.resolve(n)})).fail(t.data.reject)}(e,t,n,u)):y(t.data)&&t.data.resolve(u)}const w=function(e,t){const i=new o.Deferred,s=!(!t.group||!t.group.length),r=(0,a.extend)({skip:0,take:1,requireGroupCount:s,requireTotalCount:!s},t,{group:s?t.group:null});return e.load(r).done(((e,t)=>{const o=t&&(s?t.groupCount:t.totalCount);isFinite(o)?i.resolve(o):i.reject(n.errors.Error(s?"E4022":"E4021"))})).fail(i.reject.bind(i)),i};class S extends u.GroupingHelper{updateTotalItemsCount(e){let t=0;const i=e.extra&&e.extra.totalCount||0,n=e.extra&&e.extra.groupCount||0,o=this._dataSource.pageSize(),a=this._isVirtualPaging();p(this,(e=>{e.childrenTotalCount=0})),p(this,((e,i)=>{const n=v(i,a?0:o,t);let s=e.count+e.childrenTotalCount;a||(s+=h(n,o,s,i.length-1)),i[i.length-2]?i[i.length-2].childrenTotalCount+=s:t+=s})),super.updateTotalItemsCount(t-i+n)}_isGroupExpanded(e){const t=this._dataSource.group();return m(t,e)}_updatePagingOptions(e,t){const i=this,n=i._isVirtualPaging(),o=i._dataSource.pageSize(),a=[],s=[];let r=0,l=0;e.take&&(p(this,(e=>{e.childrenTotalCount=0,e.skipChildrenTotalCount=0})),p(i,((i,d)=>{let u,c=0,p=0;const g=v(d,n?0:o,l);let _=0,f=0,m=i.count+i.childrenTotalCount,C=m;t&&t(i,g);const y=e.skip-g;g<=e.skip+e.take&&m&&(u=e.take,n||(_=h(g,o,m,d.length-1),m+=_*d.length,C+=_,o&&y>=0&&(c=d.length,p=d.length-1,f=Math.floor(y/o))),y>=0?(g+m>e.skip&&a.unshift(y-f*c-i.skipChildrenTotalCount),g+m>=e.skip+u&&s.unshift(u-c-i.childrenTotalCount+i.skipChildrenTotalCount)):g+m>=e.skip+u&&s.unshift(u+y-i.childrenTotalCount)),g<=e.skip&&(d[d.length-2]?d[d.length-2].skipChildrenTotalCount+=Math.min(C,y+1-f*p):r+=Math.min(C,y+1)),g<=e.skip+u&&(m=Math.min(C,y+u-(f+1)*p),d[d.length-2]?d[d.length-2].childrenTotalCount+=m:l+=m)})),e.skip-=r,e.take-=l-r),e.skips=a,e.takes=s}changeRowExpand(e){const t=this.findGroupInfo(e),i=this._dataSource,n=i.remoteOperations().groupPaging,a=l.default.normalizeSortingInfo(i.group());return t?(t.isExpanded=!t.isExpanded,n&&t.isExpanded&&e.length<a.length?w(i,{filter:(0,d.createGroupFilter)(e,{filter:i.lastLoadOptions().filter,group:i.group()}),group:[a[e.length]],select:i.select()}).done((e=>{t.count=e})):(new o.Deferred).resolve()):(new o.Deferred).reject()}handleDataLoading(e){const t=this,{storeLoadOptions:i}=e,n=l.default.normalizeSortingInfo(i.group||e.loadOptions.group);if(!e.isCustomLoading&&n.length){if(e.remoteOperations.grouping){const e=t._dataSource.remoteOperations().paging;i.group=l.default.normalizeSortingInfo(i.group),i.group.forEach(((t,n)=>{const o=n===i.group.length-1;t.isExpanded=!e||!o}))}e.group=e.group||n,e.remoteOperations.paging?(e.skip=i.skip,e.take=i.take,i.requireGroupCount=!0,i.group=n.slice(0,1),t._updatePagingOptions(e),i.skip=e.skip,i.take=e.take):(e.skip=e.loadOptions.skip,e.take=e.loadOptions.take,t._updatePagingOptions(e))}}handleDataLoadedCore(e,t){const i=this,a=l.default.normalizeSortingInfo(e.storeLoadOptions.group||e.loadOptions.group).length,s=e.group?e.group.length:0;let d;const u={};if(e.isCustomLoading)t(e),g(i,e.data,a,u,[],e.isCustomLoading,e.storeLoadOptions.isLoadingAll);else{if(e.remoteOperations.paging||i.foreachGroups((e=>{e.count=0})),d=f(i,e,e.data,a),d<0)return void(e.data=(new o.Deferred).reject(r.default.Error("E1037")));if(e.remoteOperations.paging||a&&e.extra&&e.loadOptions.requireTotalCount&&(e.extra.totalCount=d,e.extra.groupCount=e.data.length),s&&e.storeLoadOptions.requireGroupCount&&!isFinite(e.extra.groupCount))return void(e.data=(new o.Deferred).reject(n.errors.Error("E4022")));i.updateTotalItemsCount(e),e.remoteOperations.paging||(i._updatePagingOptions(e),e.lastLoadOptions.skips=e.skips,e.lastLoadOptions.takes=e.takes),t(e),e.remoteOperations.paging||i._processPaging(e,a)}x(i,e,a,u,0,e.data)}_processSkips(e,t,i){if(!i)return;const n=e[0],o=t[0],a=n&&n.items;void 0!==o&&(n.isContinuation=!0,a&&(n.items=a.slice(o),this._processSkips(n.items,t.slice(1),i-1)))}_processTakes(e,t,i,n,o){if(!n||!e)return;o=o||[];const a=e[e.length-1];let s=a&&a.items;const r=i[0],l=t[0];if(a){const e=a.count-(a.isContinuation&&l||0)||s.length;void 0!==r&&e>r&&(a.isContinuationOnNextPage=!0,o.forEach((e=>{e.isContinuationOnNextPage=!0})),s&&(s=s.slice(0,r),a.items=s)),o.push(a),this._processTakes(s,t.slice(1),i.slice(1),n-1,o)}}_processPaging(e,t){this._processSkips(e.data,e.skips,t),this._processTakes(e.data,e.skips,e.takes,t)}isLastLevelGroupItemsPagingLocal(){return!1}sortLastLevelGroupItems(e){return e}refresh(e,t){const i=this,n=i._dataSource,{storeLoadOptions:a}=e,s=e.group||e.storeLoadOptions.group,r=l.default.normalizeSortingInfo(i._group);let c,h;function g(e,t){t.length===h+1&&(e.isExpanded=c)}for(h=0;h<r.length;h++)c=m(s,h),m(i._group,h)!==c&&i.foreachGroups(g);if(super.refresh.apply(this,arguments),s&&e.remoteOperations.paging&&t.reload)return p(i,(t=>{const r=w(n,{filter:(0,d.createGroupFilter)(t.path,{filter:a.filter,group:s}),group:s.slice(t.path.length),select:a.select}),l=w(n,{filter:(0,u.createOffsetFilter)(t.path,{filter:a.filter,group:s},!0),group:s.slice(t.path.length-1,t.path.length),select:a.select});return(0,o.when)(l,r).done(((n,o)=>{n=parseInt(n.length?n[0]:n),o=parseInt(o.length?o[0]:o),t.offset=n,t.count!==o&&(t.count=o,i.updateTotalItemsCount(e))}))}),!0)}}t.GroupingHelper=S},14385:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupingHelper=void 0,t.createOffsetFilter=function(e,t,i){const o=(0,n.normalizeSortingInfo)(t.group);let a=[];for(let t=i?e.length-1:0;t<e.length;t++){const i=[];for(let n=0;n<=t;n++){const{selector:a}=o[n];if(t!==n||null!==e[n]&&!1!==e[n]&&!0!==e[n]){const s=[a,t===n?o[n].desc?">":"<":"=",e[n]];"<"===s[1]?i.push([s,"or",[a,"=",null]]):i.push(s)}else!1===e[n]?i.push([a,"=",!!o[n].desc||null]):(e[n]?!o[n].desc:o[n].desc)?i.push([a,"<>",e[n]]):(i.push([a,"<>",null]),i.push([a,"=",null]))}a.push(s.default.combineFilters(i))}return a=s.default.combineFilters(a,"or"),s.default.combineFilters([a,t.filter])};var n=i(89358),o=r(i(64553)),a=i(87739),s=r(i(54353));function r(e){return e&&e.__esModule?e:{default:e}}const l=function(e,t){const{hash:i}=e;return i&&i[JSON.stringify(t)]},d=function(e,t){let i,n=0,o=e.length-1;if(!e.length)return 0;do{const i=o+n>>1;e[i].offset>t?o=i:n=i}while(o-n>1);for(i=n;i<=o&&!(e[i].offset>t);i++);return i},u=function(e,t,i){for(let n=0;n<e.length;n++)t+1>=i?e[n].children=[]:u(e[n].children,t+1,i)},c=function(e,t,i){let n=0;if(t)if(i)for(let o=0;o<t.length;o++)e.isGroupItemCountable(t[o])&&n++,n+=c(e,t[o].items,i-1);else n=t.length;return n};t.GroupingHelper=class{constructor(e){this._dataSource=e,this.reset()}reset(){this._groupsInfo=[],this._totalCountCorrection=0}totalCountCorrection(){return this._totalCountCorrection}updateTotalItemsCount(e){this._totalCountCorrection=e||0}isGroupItemCountable(e){return!this._isVirtualPaging()||!e.isContinuation}_isVirtualPaging(){const e=this._dataSource.option("scrolling.mode");return"virtual"===e||"infinite"===e}itemsCount(){const e=this._dataSource._dataSource,t=s.default.normalizeSortingInfo(e.group()||[]).length;return c(this,e.items(),t)}foreachGroups(e,t,i,n,s){const r=this;return function e(t,l,d,u){const c=[];function h(e,t,i,n){const o=t&&e(t,i);return o&&n.push(o),o}for(let o=0;o<t.length;o++){if(u.push(t[o].data),!d&&!1===h(l,t[o].data,u,c))return!1;if(!t[o].data||t[o].data.isExpanded||i){const{children:i}=t[o],n=i.length&&e(i,l,d,u);if(n&&c.push(n),!1===n)return!1}if(d&&!1===h(l,t[o].data,u,c))return!1;t[o].data&&t[o].data.offset===t[o].offset||(n=!0),u.pop()}const p=s&&u.slice(0);return n&&a.when.apply(o.default,c).always((()=>{r._updateGroupInfoOffsets(t,p)}))}(r._groupsInfo,e,t,[])}_updateGroupInfoOffsets(e,t){t=t||[];for(let i=0;i<e.length;i++){const n=e[i];if(n.data&&n.data.offset!==n.offset){n.offset=n.data.offset;for(let e=0;e<t.length;e++)t[e].offset=n.offset}}e.sort(((e,t)=>e.offset-t.offset))}findGroupInfo(e){let t,i=this._groupsInfo;for(let n=0;i&&n<e.length;n++)t=l(i,e[n]),i=t&&t.children;return t&&t.data}addGroupInfo(e){const t=this;let i;const{path:n}=e;let o=t._groupsInfo;for(let a=0;a<n.length;a++){if(i=l(o,n[a]),!i){i={key:n[a],offset:e.offset,data:{offset:e.offset,isExpanded:!0,path:n.slice(0,a+1)},children:[]};const t=d(o,e.offset);o.splice(t,0,i),o.hash=o.hash||{},o.hash[JSON.stringify(i.key)]=i}a===n.length-1&&(i.data=e,i.offset!==e.offset&&t._updateGroupInfoOffsets(o)),o=i.children}}allowCollapseAll(){return!0}refresh(e){const t=this,{storeLoadOptions:i}=e,o=(0,n.normalizeSortingInfo)(i.group||[]),a="_group"in t?(0,n.normalizeSortingInfo)(t._group||[]):o;let s=Math.min(a.length,o.length);t._group=i.group;for(let e=0;e<s;e++)if(a[e].selector!==o[e].selector){s=e;break}s?u(t._groupsInfo,0,s):t.reset()}handleDataLoading(){}handleDataLoaded(e,t){t(e)}handleDataLoadedCore(e,t){t(e)}}},27191:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupingHelper=void 0;var n=p(i(30771)),o=p(i(66177)),a=i(89358),s=i(31e3),r=i(87739),l=i(52576),d=i(21274),u=p(i(54353)),c=i(73057),h=i(14385);function p(e){return e&&e.__esModule?e:{default:e}}const g=function(e,t){const i=new r.Deferred,n=(0,l.extend)({skip:0,take:1,requireTotalCount:!0},t);return e.load(n).done(((e,t)=>{i.resolve(t&&t.totalCount)})).fail(i.reject.bind(i)),i},_=function(e,t,i){return e.foreachGroups((e=>{if(!e.isExpanded)return t(e)}),!1,!1,i,!0)},f=function(e,t){let i=0,n=t||0;return t&&(_(e,(e=>{if(e.offset-i>=t)return!1;i+=e.count-1})),n+=i),n},m=function(e,t,i,n,o,a){let s=0,r=!1;for(let l=0;l<t.length;l++){const d=t[l];if(void 0!==d.items){i.push(d.key);const t=e.findGroupInfo(i);if(t&&!t.isExpanded)d.collapsedItems=d.items,d.items=null,n+=t.count,--a<0&&s++,o&&(r=!0);else if(d.items){const t=m(e,d.items,i,n,o,a);o&&(t.offset-n>1?d.isContinuation=!0:r=!0),n=t.offset,(a=t.take)<0&&(d.items.length?d.isContinuationOnNextPage=!0:s++)}i.pop()}else o&&(r=!0),n++,--a<0&&s++;o=!1}return r&&t.splice(0,1),s&&t.splice(-s,s),{offset:n,take:a}},v=function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!(0,a.keysEqual)(null,e[i],t[i]))return!1;return!0},C=function(e,t,i,n,o){if(t){for(let a=0;a<t.length;a++){const s=t[a];if("key"in s&&void 0!==s.items){i.push(s.key),o&&v(o.path,i)&&!s.isContinuation&&(o.offset=n);const t=e.findGroupInfo(i);t&&!s.isContinuation&&(t.offset=n),t&&!t.isExpanded?n+=t.count:n=C(e,s.items,i,n,o),i.pop()}else n++}return n}},y=function(e,t){let i=e.count||e.items.length;if(!e.count&&t>1){i=0;for(let n=0;n<e.items.length;n++)i+=y(e.items[n],t-1)}return i};class b extends h.GroupingHelper{handleDataLoading(e){const{storeLoadOptions:t}=e,i=[];let n,a=0,s=!1;const{group:r}=e.loadOptions;let c=0;if(function(e,t){if(t.group){const i=u.default.normalizeSortingInfo(t.group),n=u.default.normalizeSortingInfo(e.sort);e.sort=o.default.arrangeSortingInfo(i,n),delete t.group}}(t,e.loadOptions),e.group=e.group||r,e.isCustomLoading)return;const h=(0,l.extend)({},t);h.skip=f(this,t.skip),h.skip&&h.take&&r&&(h.skip--,h.take++,s=!0),h.take&&r&&(n=h.take,h.take++),_(this,(e=>{if(e.offset>=h.skip+h.take+c)return!1;e.offset>=h.skip+c&&e.count&&(c+=e.count-1,i.push(e),a+=e.count)})),(0,d.each)(i,(function(){h.filter=function(e,t,i){const n=u.default.normalizeSortingInfo(i||t.group);let o=[];for(let t=0;t<e.length;t++){const i=[];for(let o=0;o<=t;o++)i.push([n[o].selector,t===o?"<>":"=",e[o]]);o.push(u.default.combineFilters(i))}return o=u.default.combineFilters(o,"or"),u.default.combineFilters([o,t.filter])}(this.path,h,r)})),e.storeLoadOptions=h,e.collapsedGroups=i,e.collapsedItemsCount=a,e.skip=h.skip||0,e.skipFirstItem=s,e.take=n}handleDataLoaded(e,t){const i=this,{collapsedGroups:a}=e,r=u.default.normalizeSortingInfo(e.group),l=r.length;function d(e,t,i,n,o){if(!e||!t.length||!i.length)return;let a,r;const l=(0,s.toComparable)(t[0],!0);for(r=0;r<e.length&&(a=(0,s.toComparable)(e[r].key,!0),!(o>=n.offset||l===a));r++)o+=y(e[r],i.length);e.length&&l===a||e.splice(r,0,{key:t[0],items:[],count:1===t.length?n.count:void 0}),d(e[r].items,t.slice(1),i.slice(1),n,o)}if(e.collapsedItemsCount&&e.extra&&e.extra.totalCount>=0&&(e.extra._totalCountWasIncreasedByCollapsedItems||(e.extra.totalCount+=e.collapsedItemsCount,e.extra._totalCountWasIncreasedByCollapsedItems=!0)),t(e),l){let{data:t}=e;const s=(0,n.default)(t);if(o.default.multiLevelGroup(s,r).enumerate().done((e=>{t=e})),a)for(let i=0;i<a.length;i++)d(t,a[i].path,r,a[i],e.skip);e.isCustomLoading||m(i,t,[],e.skip,e.skipFirstItem,e.take),e.data=t}}isGroupItemCountable(e){return null===e.items}updateTotalItemsCount(){let e=0;_(this,(t=>{t.count&&(e-=t.count-1)})),super.updateTotalItemsCount(e)}changeRowExpand(e){const t=this,i=t._dataSource,n=i.beginPageIndex?i.beginPageIndex():i.pageIndex(),o=i.items(),a=f(t,n*i.pageSize());let s,l=t.findGroupInfo(e);return s=l&&!l.isExpanded?(new r.Deferred).resolve(l.count):g(i,{filter:(0,c.createGroupFilter)(e,{filter:i.filter(),group:i.group()})}),(0,r.when)(s).done((i=>{i=parseInt(i.length?i[0]:i),l?(C(t,o,[],a),l.isExpanded=!l.isExpanded,l.count=i):(l={offset:-1,count:i,path:e,isExpanded:!1},C(t,o,[],a,l),l.offset>=0&&t.addGroupInfo(l)),t.updateTotalItemsCount()})).fail((function(){i._eventsStrategy.fireEvent("loadError",arguments)}))}allowCollapseAll(){return!1}refresh(e,t){const i=this,{storeLoadOptions:n}=e,o=i._dataSource;if(super.refresh.apply(this,arguments),t.reload)return _(i,(e=>{const t=g(o,{filter:(0,c.createGroupFilter)(e.path,n)}),a=g(o,{filter:(0,h.createOffsetFilter)(e.path,n)});return(0,r.when)(a,t).done(((t,n)=>{t=parseInt(t.length?t[0]:t),n=parseInt(n.length?n[0]:n),e.offset=t,e.count!==n&&(e.count=n,i.updateTotalItemsCount())}))}),!0)}}t.GroupingHelper=b},89430:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(82812),o=i(89358),a=i(31e3),s=i(11528);function r(e,t,i,n){let o=0;if(e<t)for(;o<i.items.length;o++)r(e+1,t,i.items[o],n);e===t&&n(i)}function l(e,t){let i;if("map"in e)return e.map(t);const n=new Array(e.length);for(i in e)n[i]=t(e[i],i);return n}function d(e){const t=(0,a.compileGetter)(e.selector),i=!("skipEmptyValues"in e)||e.skipEmptyValues;let{aggregator:s}=e;if("string"==typeof s&&(s=o.aggregators[s],!s))throw n.errors.Error("E4001",e.aggregator);return{selector:t,aggregator:s,skipEmptyValues:i}}t.default=class{constructor(e){this._data=e.data,this._groupLevel=e.groupLevel||0,this._totalAggregates=l(e.totalAggregates||[],d),this._groupAggregates=l(e.groupAggregates||[],d),this._totals=[]}calculate(){this._totalAggregates.length&&this._calculateTotals(0,{items:this._data}),this._groupAggregates.length&&this._groupLevel>0&&this._calculateGroups({items:this._data})}totalAggregates(){return this._totals}_aggregate(e,t,i){const n=t.items?t.items.length:0;for(let a=0;a<e.length;a++)if(e[a].aggregator!==o.aggregators.count)for(let o=0;o<n;o++)this._accumulate(a,e[a],i,t.items[o]);else i[a]=(i[a]||0)+n}_calculateTotals(e,t){if(0===e&&(this._totals=this._seed(this._totalAggregates)),e===this._groupLevel)this._aggregate(this._totalAggregates,t,this._totals);else for(let i=0;i<t.items.length;i++)this._calculateTotals(e+1,t.items[i]);0===e&&(this._totals=this._finalize(this._totalAggregates,this._totals))}_calculateGroups(e){const t=this._groupLevel;let i=t+1;const n=this._seed.bind(this,this._groupAggregates),o=this._aggregate.bind(this,this._groupAggregates),a=this._finalize.bind(this,this._groupAggregates);function s(e){e.aggregates=n(i-1),i===t?o(e,e.aggregates):r(i,t,e,(t=>{o(t,e.aggregates)})),e.aggregates=a(e.aggregates)}for(;--i>0;)r(0,i,e,s)}_seed(e,t){return l(e,(e=>{const{aggregator:i}=e;return"seed"in i?(0,s.isFunction)(i.seed)?i.seed(t):i.seed:NaN}))}_accumulate(e,t,i,n){const o=t.selector(n),{aggregator:a}=t,{skipEmptyValues:s}=t;var r;(!s||(r=o)==r&&""!==r&&null!=r)&&(i[e]!=i[e]?i[e]=o:i[e]=a.step(i[e],o))}_finalize(e,t){return l(e,((e,i)=>{const n=e.aggregator.finalize;return n?n(t[i]):t[i]}))}}},34894:function(e,t,i){var n,o=i(52576),a=i(17798);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("columns",{defaultOptions:()=>(0,o.extend)(!0,{},a.columnsControllerModule.defaultOptions(),{commonColumnSettings:{allowExporting:!0}}),controllers:a.columnsControllerModule.controllers})},54353:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(i(74854)),o=a(i(53226));function a(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}t.default=s({},n.default,o.default,{modules:[]})},12937:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DataController=void 0;var n=r(i(35185)),o=i(32688),a=r(i(54353)),s=r(i(72208));function r(e){return e&&e.__esModule?e:{default:e}}class l extends o.DataController{_getDataSourceAdapter(){return s.default}_getSpecificDataSourceOption(){const e=this.option("dataSource");return e&&!Array.isArray(e)&&this.option("keyExpr")&&n.default.log("W1011"),super._getSpecificDataSourceOption()}}t.DataController=l,a.default.registerModule("data",{defaultOptions:o.dataControllerModule.defaultOptions,controllers:{data:l}})},72208:function(e,t,i){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;let o=((n=i(3120))&&n.__esModule?n:{default:n}).default;t.default={extend(e){o=e(o)},create:e=>new o(e)}},41636:function(e,t,i){i(9521);var n,o=i(13876);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("editing",a({},o.editingModule,{extenders:a({},o.editingModule.extenders,{controllers:a({},o.editingModule.extenders.controllers,{data:e=>class extends((0,o.dataControllerEditingExtenderMixin)(e)){_changeRowExpandCore(e){const t=this._editingController;return Array.isArray(e)&&t&&t.refresh(),super._changeRowExpandCore.apply(this,arguments)}}})})}))},73057:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createGroupFilter=function(e,t){const i=(0,o.normalizeSortingInfo)(t.group),n=[];for(let t=0;t<e.length;t++)n.push([i[t].selector,"=",e[t]]);t.filter&&n.push(t.filter);return a.default.combineFilters(n)};var n,o=i(89358),a=(n=i(53226))&&n.__esModule?n:{default:n}},89398:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(77456))&&n.__esModule?n:{default:n};i(15241),i(79495),i(45573),i(43983),i(50255),i(41636),i(93426),i(23002),i(36224),i(59352),i(1978),i(23808),i(39525),i(15277),i(11215),i(8030),i(1881),i(10150),i(65040),i(97209),i(8691),i(22382),i(94851),i(32048),i(85646),i(83189),i(30131),i(22949);t.default=o.default},77456:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(774),i(34894),i(12937),i(58261),i(57008),i(98094),i(99763),i(47513),i(47641);var n=p(i(92848)),o=p(i(64553)),a=p(i(48314)),s=i(31951),r=i(52576),l=i(11528),d=i(52071),u=p(i(53226)),c=p(i(99335)),h=p(i(54353));function p(e){return e&&e.__esModule?e:{default:e}}h.default.registerModulesOrder(["stateStoring","columns","selection","editorFactory","columnChooser","grouping","editing","editingRowBased","editingFormBased","editingCellBased","masterDetail","validating","adaptivity","data","virtualScrolling","columnHeaders","filterRow","headerPanel","headerFilter","sorting","search","rows","pager","columnsResizingReordering","contextMenu","keyboardNavigation","errorHandling","summary","columnFixing","export","gridView"]);class g extends c.default{_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:{platform:"ios"},options:{showRowLines:!0}},{device:()=>(0,d.isMaterialBased)(),options:{showRowLines:!0,showColumnLines:!1,headerFilter:{height:315},editing:{useIcons:!0},selection:{showCheckBoxesMode:"always"}}},{device:()=>a.default.webkit,options:{loadingTimeout:30,loadPanel:{animation:{show:{easing:"cubic-bezier(1, 0, 1, 0)",duration:500,from:{opacity:0},to:{opacity:1}}}}}},{device:e=>"desktop"!==e.deviceType,options:{grouping:{expandMode:"rowClick"}}}])}_init(){const e=this;super._init(),u.default.logHeaderFilterDeprecatedWarningIfNeed(e),h.default.processModules(e,h.default),h.default.callModuleItemsMethod(e,"init")}_initMarkup(){super._initMarkup.apply(this,arguments),this.getView("gridView").render(this.$element())}_setDeprecatedOptions(){super._setDeprecatedOptions(),(0,r.extend)(this._deprecatedOptions,{useKeyboard:{since:"19.2",alias:"keyboardNavigation.enabled"},rowTemplate:{since:"21.2",message:'Use the "dataRowTemplate" option instead'}})}static registerModule(e,t){h.default.registerModule(e,t)}getGridCoreHelper(){return h.default}_getTemplate(e){let t=e;return(0,l.isString)(t)&&t.startsWith("#")&&(t=(0,o.default)(e),s.logger.warn("Specifying grid templates with the jQuery selector name is now deprecated. Use the DOM Node or the jQuery object that references this selector instead.")),super._getTemplate(t)}focus(e){this.getController("keyboardNavigation").focus(e)}}(0,n.default)("dxDataGrid",g);t.default=g},32048:function(e,t,i){var n,o=i(8468);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("adaptivity",o.adaptivityModule)},45573:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnChooserView=t.ColumnChooserController=void 0;var n,o=i(69862),a=(n=i(54353))&&n.__esModule?n:{default:n};t.ColumnChooserController=o.columnChooserModule.controllers.columnChooser,t.ColumnChooserView=o.columnChooserModule.views.columnChooserView;a.default.registerModule("columnChooser",o.columnChooserModule)},94851:function(e,t,i){var n,o=i(54704);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("columnFixing",o.columnFixingModule)},774:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnHeadersView=void 0;var n,o=i(88568),a=(n=i(54353))&&n.__esModule?n:{default:n};t.ColumnHeadersView=o.columnHeadersModule.views.columnHeadersView;a.default.registerModule("columnHeaders",o.columnHeadersModule)},65040:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TrackerView=t.TablePositionViewController=t.DraggingHeaderViewController=t.DraggingHeaderView=t.ColumnsSeparatorView=t.ColumnsResizerViewController=void 0;var n,o=i(19448),a=(n=i(54353))&&n.__esModule?n:{default:n};const s=t.DraggingHeaderView=o.columnsResizingReorderingModule.views.draggingHeaderView,r=t.DraggingHeaderViewController=o.columnsResizingReorderingModule.controllers.draggingHeader,l=t.ColumnsSeparatorView=o.columnsResizingReorderingModule.views.columnsSeparatorView,d=t.TablePositionViewController=o.columnsResizingReorderingModule.controllers.tablePosition,u=t.ColumnsResizerViewController=o.columnsResizingReorderingModule.controllers.columnsResizer,c=t.TrackerView=o.columnsResizingReorderingModule.views.trackerView;a.default.registerModule("columnsResizingReordering",o.columnsResizingReorderingModule);t.default={DraggingHeaderView:s,DraggingHeaderViewController:r,ColumnsSeparatorView:l,TablePositionViewController:d,ColumnsResizerViewController:u,TrackerView:c}},98094:function(e,t,i){var n,o=i(73680);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("contextMenu",o.contextMenuModule)},36224:function(e,t,i){var n,o=i(48295);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("editingCellBased",o.editingCellBasedModule)},23002:function(e,t,i){var n,o=i(29657);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("editingFormBased",o.editingFormBasedModule)},93426:function(e,t,i){var n,o=i(56671);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("editingRowBased",o.editingRowBasedModule)},9521:function(e,t,i){var n,o=i(77862);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("editorFactory",o.editorFactoryModule)},99763:function(e,t,i){var n,o=i(82358);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("errorHandling",o.errorHandlingModule)},11215:function(e,t,i){var n,o=i(65382);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("filterBuilder",o.filterBuilderModule)},8030:function(e,t,i){var n,o=i(17887);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("filterPanel",o.filterPanelModule)},23808:function(e,t,i){var n,o=i(62289);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("filterRow",o.filterRowModule)},15277:function(e,t,i){var n,o=i(78746);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("filterSync",o.filterSyncModule)},47513:function(e,t,i){var n,o=i(33706);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("gridView",o.gridViewModule)},39525:function(e,t,i){var n,o=i(69952);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("headerFilter",o.headerFilterModule)},47641:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderPanel=void 0;var n,o=i(5542),a=(n=i(54353))&&n.__esModule?n:{default:n};t.HeaderPanel=o.headerPanelModule.views.headerPanel;a.default.registerModule("headerPanel",o.headerPanelModule)},97209:function(e,t,i){var n,o=i(4628);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("keyboardNavigation",o.keyboardNavigationModule)},50255:function(e,t,i){var n,o=i(11052);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("masterDetail",o.masterDetailModule)},10150:function(e,t,i){var n,o=i(66040);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("pager",o.pagerModule)},22949:function(e,t,i){var n,o=i(52714);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("rowDragging",o.rowDraggingModule)},57008:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RowsView=void 0;var n,o=i(77081),a=(n=i(54353))&&n.__esModule?n:{default:n};t.RowsView=o.rowsModule.views.rowsView;a.default.registerModule("rows",o.rowsModule)},1881:function(e,t,i){var n,o=i(7370);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("search",o.searchModule)},79495:function(e,t,i){var n,o=i(1620);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("selection",o.selectionModule)},58261:function(e,t,i){var n,o=i(8036);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("sorting",o.sortingModule)},15241:function(e,t,i){var n,o=i(87960);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("stateStoring",o.stateStoringModule)},22382:function(e,t,i){var n,o=i(67624);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("stickyColumns",o.stickyColumnsModule)},59352:function(e,t,i){var n,o=i(52932);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("validating",o.validatingModule)},85646:function(e,t,i){var n,o=i(74280);((n=i(54353))&&n.__esModule?n:{default:n}).default.registerModule("virtualColumns",o.virtualColumnsModule)},1978:function(e,t,i){var n=i(21640),o=s(i(54353)),a=s(i(72208));function s(e){return e&&e.__esModule?e:{default:e}}o.default.registerModule("virtualScrolling",n.virtualScrollingModule),a.default.extend(n.dataSourceAdapterExtender)},8691:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.renderSummaryCell=t.FooterView=void 0;var n=v(i(4671)),o=v(i(30771)),a=v(i(66177)),s=i(89358),r=v(i(64553)),l=i(17781),d=i(31e3),u=i(52576),c=i(21274),h=i(11528),p=v(i(35185)),g=i(48921),_=v(i(89430)),f=v(i(54353)),m=v(i(72208));function v(e){return e&&e.__esModule?e:{default:e}}const C="groupFooter",y="totalFooter",b=function(e,t){const i=(0,r.default)(e),{column:n}=t,{summaryItems:o}=t,a=[];if(!n.command&&o){for(let e=0;e<o.length;e++){const i=o[e],s=f.default.getSummaryText(i,t.summaryTexts);a.push((0,r.default)("<div>").css("textAlign",i.alignment||n.alignment).addClass("dx-datagrid-summary-item").addClass("dx-datagrid-text-content").addClass(i.cssClass).toggleClass("dx-datagrid-group-text-content","group"===t.rowType).text(s).attr("aria-label",`${n.caption} ${s}`))}i.append(a)}};t.renderSummaryCell=b;const x=function(e,t){const i=e.option("summary.texts")||{};return{totalItem:t.row,summaryItems:t.row.summaryCells[t.columnIndex],summaryTexts:i}},w=function(e){return e.summary||e.aggregates||[]},S=function(e){return e.option("summary.recalculateWhileEditing")},D=function(e,t,i,n){n=n||[];for(let o=0;o<e.length;o++)n.push(e[o].key),1===t?i(n,e[o].items):D(e[o].items,t-1,i,n),n.pop()},I=function(e,t,i){return i?I(e,t.map((e=>({items:[e]})),i-1)):e.concat(t)},E=function(e,t,i){return i?e.map((e=>{const n={},o=E(e.items||[],t,i-1);return Object.defineProperty(n,"aggregates",{get:()=>e.aggregates,set:t=>{e.aggregates=t}}),(0,u.extend)(n,e,{items:o})})):e.filter((e=>t.indexOf(e)<0))},T=function(e,t,i){if(!e||!t.length)return e;const n=t[0],a=i[0];let s;return n&&a&&a.length&&(s=(0,o.default)(e),(0,c.each)(a,(function(e){s=0===e?s.sortBy(this.selector,this.desc):s.thenBy(this.selector,this.desc)})),s.enumerate().done((t=>{e=t}))),t=t.slice(1),i=i.slice(1),t.length&&i.length&&(0,c.each)(e,(function(){this.items=T(this.items,t,i)})),e},A=function(e,t,i){const n=i&&i.sortByGroups&&i.sortByGroups();return n&&n.length?T(e,t,n):e},O=function(e,t,i,n){let o;if(S(e)){const t=e._editingController;if(t){const e=t.getInsertedData();e.length&&(i=I(i,e,n));const o=t.getRemovedData();o.length&&(i=E(i,o,n))}}return t&&(o=new _.default({totalAggregates:t.totalAggregates,groupAggregates:t.groupAggregates,data:i,groupLevel:n}),o.calculate()),o?o.totalAggregates():[]};class P extends g.ColumnsView{_getRows(){return this._dataController.footerItems()}_getCellOptions(e){return(0,u.extend)(super._getCellOptions(e),x(this,e))}_renderCellContent(e,t){b(e,t),super._renderCellContent.apply(this,arguments)}_renderCore(e){let t=!1;const i=this._dataController.footerItems()[0];e&&e.columnIndices||(this.element().empty().addClass("dx-datagrid-total-footer").toggleClass("dx-datagrid-nowrap",!this.option("wordWrapEnabled")),t=!0),i&&i.summaryCells&&i.summaryCells.length&&(this._updateContent(this._renderTable({change:e}),e),t&&this._updateScrollLeftPosition())}_updateContent(e,t){return t&&"update"===t.changeType&&t.columnIndices?this.waitAsyncTemplates().done((()=>{const i=this.getTableElement().find(".dx-row"),n=e.find(".dx-row");this._updateCells(i,n,t.columnIndices[0])})):super._updateContent.apply(this,arguments)}_rowClick(e){const t=this._dataController.footerItems()[e.rowIndex]||{};this.executeAction("onRowClick",(0,u.extend)({},e,t))}_columnOptionChanged(e){const{optionNames:t}=e;e.changeTypes.grouping||(t.width||t.visibleWidth)&&super._columnOptionChanged(e)}_handleDataChanged(e){const{changeType:t}=e;"update"===e.changeType&&e.repaintChangesOnly?e.totalColumnIndices?e.totalColumnIndices.length&&this.render(null,{changeType:"update",columnIndices:[e.totalColumnIndices]}):this.render():"refresh"!==t&&"append"!==t&&"prepend"!==t||this.render()}_createRow(e){const t=super._createRow.apply(this,arguments);return e.rowType===y&&(t.addClass("dx-footer-row"),t.addClass("dx-cell-focus-disabled"),t.attr("tabindex",0)),t}getHeight(){return this.getElementHeight()}isVisible(){return!!this._dataController.footerItems().length}}t.FooterView=P;m.default.extend((e=>class extends e{init(){super.init.apply(this,arguments),this._editingController=this.getController("editing"),this._totalAggregates=[],this._summaryGetter=l.noop}summaryGetter(e){if(!arguments.length)return this._summaryGetter;(0,h.isFunction)(e)&&(this._summaryGetter=e)}summary(e){if(!arguments.length)return this._summaryGetter();this._summaryGetter=function(){return e}}totalAggregates(){return this._totalAggregates}isLastLevelGroupItemsPagingLocal(){const e=this.summary(),t=null==e?void 0:e.sortByGroups();return null==t?void 0:t.length}sortLastLevelGroupItems(e,t,i){const n=a.default.multiLevelGroup((0,o.default)(e),t).toArray();let s=[];return i.forEach((e=>{D(n,t.length,((t,i)=>{e.toString()===t.toString()&&(s=s.concat(i))}))})),s}_customizeRemoteOperations(e){const t=this.summary();t&&(e.remoteOperations.summary?e.isCustomLoading&&!e.storeLoadOptions.isLoadingAll||(e.storeLoadOptions.group&&(e.remoteOperations.grouping?e.storeLoadOptions.groupSummary=t.groupAggregates:t.groupAggregates.length&&(e.remoteOperations.paging=!1)),e.storeLoadOptions.totalSummary=t.totalAggregates):(t.totalAggregates.length||t.groupAggregates.length&&e.storeLoadOptions.group)&&(e.remoteOperations.paging=!1)),super._customizeRemoteOperations.apply(this,arguments);const i=e.cachedData.extra;null!=i&&i.summary&&!e.isCustomLoading&&(e.storeLoadOptions.totalSummary=void 0)}_handleDataLoadedCore(e){const t=(0,s.normalizeSortingInfo)(e.storeLoadOptions.group||e.loadOptions.group||[]),i=e.remoteOperations||{},n=this.summaryGetter()(i);if(!e.isCustomLoading||e.storeLoadOptions.isLoadingAll)if(i.summary)!i.paging&&t.length&&n&&(i.grouping||O(this,{groupAggregates:n.groupAggregates},e.data,t.length),e.data=A(e.data,t,n));else if(!i.paging&&n){var o;const i=e.operationTypes||{};if(!Object.keys(i).some((e=>i[e]))||null===(o=e.cachedData)||void 0===o||null===(o=o.extra)||void 0===o||!o.summary||t.length&&n.groupAggregates.length){const i=O(this,n,e.data,t.length);e.extra=(0,h.isPlainObject)(e.extra)?e.extra:{},e.extra.summary=i,e.cachedData&&(e.cachedData.extra=e.extra)}e.data=A(e.data,t,n)}e.isCustomLoading||(this._totalAggregates=e.extra&&e.extra.summary||this._totalAggregates),super._handleDataLoadedCore(e)}}));f.default.registerModule("summary",{defaultOptions:()=>({summary:{groupItems:void 0,totalItems:void 0,calculateCustomSummary:void 0,skipEmptyValues:!0,recalculateWhileEditing:!1,texts:{sum:n.default.format("dxDataGrid-summarySum"),sumOtherColumn:n.default.format("dxDataGrid-summarySumOtherColumn"),min:n.default.format("dxDataGrid-summaryMin"),minOtherColumn:n.default.format("dxDataGrid-summaryMinOtherColumn"),max:n.default.format("dxDataGrid-summaryMax"),maxOtherColumn:n.default.format("dxDataGrid-summaryMaxOtherColumn"),avg:n.default.format("dxDataGrid-summaryAvg"),avgOtherColumn:n.default.format("dxDataGrid-summaryAvgOtherColumn"),count:n.default.format("dxDataGrid-summaryCount")}},sortByGroupSummaryInfo:void 0}),views:{footerView:P},extenders:{controllers:{data:e=>class extends e{_isDataColumn(e){return e&&(!(0,h.isDefined)(e.groupIndex)||e.showWhenGrouped)}_isGroupFooterVisible(){const e=this.option("summary.groupItems")||[];for(let t=0;t<e.length;t++){const i=e[t],n=this._columnsController.columnOption(i.showInColumn||i.column);if(i.showInGroupFooter&&this._isDataColumn(n))return!0}return!1}_processGroupItems(e,t,i){const n=i&&i.data,o=super._processGroupItems.apply(this,arguments);return i&&(void 0===i.isGroupFooterVisible&&(i.isGroupFooterVisible=this._isGroupFooterVisible()),n&&n.items&&i.isGroupFooterVisible&&(i.collectContinuationItems||!n.isContinuationOnNextPage)&&o.push({rowType:C,key:i.path.slice(),data:n,groupIndex:i.path.length-1,values:[]})),o}_processGroupItem(e,t){const i=this;if(t.summaryGroupItems||(t.summaryGroupItems=i.option("summary.groupItems")||[]),"group"===e.rowType){let i=-1,n=-1;(0,c.each)(t.visibleColumns,(function(o){const a=t.visibleColumns[o-1];e.groupIndex===this.groupIndex&&(i=this.index),o>0&&"expand"===a.command&&"expand"!==this.command&&(n=this.index)})),e.summaryCells=this._calculateSummaryCells(t.summaryGroupItems,w(e.data),t.visibleColumns,((e,t)=>e.showInGroupFooter?-1:e.alignByColumn&&t&&!(0,h.isDefined)(t.groupIndex)&&t.index!==n?t.index:i),!0)}return e.rowType===C&&(e.summaryCells=this._calculateSummaryCells(t.summaryGroupItems,w(e.data),t.visibleColumns,((e,t)=>e.showInGroupFooter&&i._isDataColumn(t)?t.index:-1))),e}_calculateSummaryCells(e,t,i,n,o){const a=this,s=[],r={};return(0,c.each)(e,((e,i)=>{const o=a._columnsController.columnOption(i.column),s=i.showInColumn&&a._columnsController.columnOption(i.showInColumn)||o,l=n(i,s);if(l>=0){r[l]||(r[l]=[]);const n=t[e];if(n==n){let e;(0,h.isDefined)(i.valueFormat)?e=i.valueFormat:"count"!==i.summaryType&&(e=f.default.getFormatByDataType(o&&o.dataType)),r[l].push((0,u.extend)({},i,{value:(0,h.isString)(n)&&o&&o.deserializeValue?o.deserializeValue(n):n,valueFormat:e,columnCaption:o&&o.index!==l?o.caption:void 0}))}}})),(0,h.isEmptyObject)(r)||i.forEach(((e,t)=>{const n=i[t-1],a=!o||"expand"!==(null==n?void 0:n.command)&&"expand"!==e.command?e.index:null==n?void 0:n.index;s.push(r[a]||[])})),s}_getSummaryCells(e,t){const i=this,n=i._columnsController;return i._calculateSummaryCells(e,t,n.getVisibleColumns(),((e,t)=>i._isDataColumn(t)?t.index:-1))}_updateItemsCore(e){const t=this;let i;const n=t._dataSource,o=t._footerItems,a=o&&o[0]&&o[0].summaryCells,s=t.option("summary.totalItems");if(t._footerItems=[],n&&s&&s.length){const o=n.totalAggregates();i=t._getSummaryCells(s,o),e&&e.repaintChangesOnly&&a&&(e.totalColumnIndices=i.map(((e,t)=>JSON.stringify(e)!==JSON.stringify(a[t])?t:-1)).filter((e=>e>=0))),i.length&&t._footerItems.push({rowType:y,summaryCells:i})}super._updateItemsCore(e)}_prepareUnsavedDataSelector(e){if(S(this)){const t=this._editingController;if(t)return function(i){return i=t.getUpdatedData(i),e(i)}}return e}_prepareAggregateSelector(e,t){return e=this._prepareUnsavedDataSelector(e),"avg"===t||"sum"===t?function(t){const i=e(t);return(0,h.isDefined)(i)?Number(i):i}:e}_getAggregates(e,t){const i=this;let n=i.option("summary.calculateCustomSummary");const o=i.option("summary.skipEmptyValues");return(0,c.map)(e||[],(e=>{const a=this._columnsController.columnOption(e.column),s=a&&a.calculateCellValue?a.calculateCellValue.bind(a):(0,d.compileGetter)(a?a.dataField:e.column);let r=e.summaryType||"count";const l=(0,h.isDefined)(e.skipEmptyValues)?e.skipEmptyValues:o;if(t)return{selector:e.column,summaryType:r};const u=i._prepareAggregateSelector(s,r);if("custom"===r){n||(p.default.log("E1026"),n=function(){});const t={component:i.component,name:e.name};n(t),t.summaryProcess="calculate",r={seed:e=>(t.summaryProcess="start",t.totalValue=void 0,t.groupIndex=e,delete t.value,n(t),t.totalValue),step:(e,i)=>(t.summaryProcess="calculate",t.totalValue=e,t.value=i,n(t),t.totalValue),finalize:e=>(t.summaryProcess="finalize",t.totalValue=e,delete t.value,n(t),t.totalValue)}}return{selector:u,aggregator:r,skipEmptyValues:l}}))}_addSortInfo(e,t,i,n){if(t){const{groupIndex:o}=t;n=n||t.sortOrder,(0,h.isDefined)(o)&&(e[o]=e[o]||[],e[o].push({selector:i,desc:"desc"===n}))}}_findSummaryItem(e,t){let i=-1;return(0,h.isDefined)(t)&&(0,c.each)(e||[],(function(e){if(this.name===t||e===t||this.summaryType===t||this.column===t||function(e){const{summaryType:t}=e,{column:i}=e;return t&&i&&`${t}_${i}`}(this)===t)return i=e,!1})),i}_getSummarySortByGroups(e,t){const i=this,n=i._columnsController,o=n.getGroupColumns(),a=[];if(t&&t.length)return(0,c.each)(e||[],(function(){const{sortOrder:e}=this;let{groupColumn:s}=this;const r=i._findSummaryItem(t,this.summaryItem);if(r<0)return;const l=function(e){return w(e)[r]};(0,h.isDefined)(s)?(s=n.columnOption(s),i._addSortInfo(a,s,l,e)):(0,c.each)(o,((t,n)=>{i._addSortInfo(a,n,l,e)}))})),a}_createDataSourceAdapterCore(e,t){const i=this,n=super._createDataSourceAdapterCore(e,t);return n.summaryGetter((e=>i._getSummaryOptions(e||t))),n}_getSummaryOptions(e){const t=this,i=t.option("summary.groupItems"),n=t.option("summary.totalItems"),o=t.option("sortByGroupSummaryInfo"),a=t._getAggregates(i,e&&e.grouping&&e.summary),s=t._getAggregates(n,e&&e.summary),r=function(){return t._getSummarySortByGroups(o,i)};if(a.length||s.length)return{groupAggregates:a,totalAggregates:s,sortByGroups:r}}publicMethods(){const e=super.publicMethods();return e.push("getTotalSummaryValue"),e}getTotalSummaryValue(e){const t=this._findSummaryItem(this.option("summary.totalItems"),e),i=this._dataSource.totalAggregates();if(i.length&&t>-1)return i[t]}optionChanged(e){"summary"!==e.name&&"sortByGroupSummaryInfo"!==e.name||(e.name="dataSource"),super.optionChanged(e)}init(){this._footerItems=[],super.init()}footerItems(){return this._footerItems}},editing:e=>class extends e{_refreshSummary(){S(this)&&!this.isSaving()&&this._dataController.refresh({load:!0,changesOnly:!0})}_addChange(e){const t=super._addChange.apply(this,arguments);return e.type&&this._refreshSummary(),t}_removeChange(){const e=super._removeChange.apply(this,arguments);return this._refreshSummary(),e}cancelEditData(){const e=super.cancelEditData.apply(this,arguments);return this._refreshSummary(),e}}},views:{rowsView:e=>class extends e{_createRow(e){const t=super._createRow.apply(this,arguments);return e&&t.addClass(e.rowType===C?"dx-datagrid-group-footer":""),t}_renderCells(e,t){super._renderCells.apply(this,arguments),"group"===t.row.rowType&&t.row.summaryCells&&t.row.summaryCells.length&&this._renderGroupSummaryCells(e,t)}_hasAlignByColumnSummaryItems(e,t){return!(0,h.isDefined)(t.columns[e].groupIndex)&&t.row.summaryCells[e].length}_getAlignByColumnCellCount(e,t){let i=0;for(let n=1;n<e;n++){const e=t.row.summaryCells.length-n;i=this._hasAlignByColumnSummaryItems(e,t)?n:i}return i}_renderGroupSummaryCells(e,t){const i=e.children().last(),n=Number(i.attr("colSpan"))||1,o=this._getAlignByColumnCellCount(n,t);this._renderGroupSummaryCellsCore(i,t,n,o)}_renderGroupSummaryCellsCore(e,t,i,n){if(n>0){e.attr("colSpan",i-n);for(let i=0;i<n;i++){const o=t.columns.length-n+i;this._renderCell(e.parent(),(0,u.extend)({column:t.columns[o],columnIndex:this._getSummaryCellIndex(o,t.columns)},t))}}}_getSummaryCellIndex(e,t){return e}_getCellTemplate(e){return!e.column.command&&!(0,h.isDefined)(e.column.groupIndex)&&e.summaryItems&&e.summaryItems.length?b:super._getCellTemplate(e)}_getCellOptions(e){const t=this,i=super._getCellOptions(e);return e.row.summaryCells?(0,u.extend)(i,x(t,e)):i}}}}})},26854:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HIDDEN_COLUMNS_WIDTH=void 0;t.HIDDEN_COLUMNS_WIDTH="adaptiveHidden"},8468:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.adaptivityModule=t.AdaptiveColumnsController=void 0;var n=i(64044),o=b(i(92774)),a=i(28630),s=i(98834),r=b(i(4671)),l=b(i(19427)),d=b(i(64553)),u=i(17781),c=i(87739),h=i(86858),p=i(52576),g=i(21274),_=i(57653),f=i(11528),m=b(i(74075)),v=i(52071),C=b(i(74854)),y=b(i(53226));function b(e){return e&&e.__esModule?e:{default:e}}const x="columnHeadersView",w="rowsView",S=[x,w,"footerView"],D="adaptiveHidden",I="detailAdaptive",E="dx-field-item-content",T="hidden-column",A="dx-command-adaptive",O="dx-command-adaptive-hidden",P="dx-adaptive-item-text",k="adaptive",M="row",R="dx-group-cell",L="dxDataGrid-ariaAdaptiveExpand";function B(e,t){return e._columnsController.getColumnId(t)}function V(e,t){let i;const a=(0,d.default)(e),r=t.component.getController("adaptiveColumns");"data"===t.rowType?(i=(0,d.default)("<span>").addClass(r.addWidgetPrefix("adaptive-more")),o.default.on(i,(0,s.addNamespace)(n.name,"dxDataGridAdaptivity"),r.createAction((()=>{r.toggleExpandAdaptiveDetailRow(t.key)}))),i.appendTo(a)):y.default.setEmptyText(a)}function F(e){var t;const i=null===(t=e.data)||void 0===t?void 0:t.$nextCell;o.default.off(i,"focus",F),o.default.trigger(i,"dxclick")}class H extends C.default.ViewController{init(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._editingController=this.getController("editing"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._rowsView=this.getView("rowsView"),this._columnsController.addCommandColumn({type:k,command:k,visible:!0,adaptiveHidden:!0,cssClass:A,alignment:"center",width:"auto",cellTemplate:V,fixedPosition:"right"}),this._columnsController.columnsChanged.add((()=>{const e=!!this.updateHidingQueue(this._columnsController.getColumns()).length;this._columnsController.columnOption("command:adaptive","adaptiveHidden",!e,!0)})),this._hidingColumnsQueue=[],this._hiddenColumns=[],this.createAction("onAdaptiveDetailRowPreparing"),super.init()}optionChanged(e){"columnHidingEnabled"===e.name&&this._columnsController.columnOption("command:adaptive","adaptiveHidden",!e.value),super.optionChanged(e)}publicMethods(){return["isAdaptiveDetailRowExpanded","expandAdaptiveDetailRow","collapseAdaptiveDetailRow"]}_isRowEditMode(){return this._getEditMode()===M}_isItemModified(e,t){const i=this._columnsController.getVisibleIndex(e.column.index),n=this._dataController.getRowIndexByKey(t.key),o=this._dataController.items()[n+1];return o&&o.modifiedValues&&(0,f.isDefined)(o.modifiedValues[i])}_renderFormViewTemplate(e,t,i){const a=this,{column:s}=e,r=a.createAction((()=>{a._editingController.isEditing()&&o.default.trigger(i,n.name)})),l=t.row.data,d=s.calculateCellValue(l),u=y.default.getDisplayValue(s,d,l,t.rowType),c=y.default.formatValue(u,s),g=this._editingController.isCellOrBatchEditMode(),_=a._rowsView;if(s.allowEditing&&this._keyboardNavigationController.isKeyboardEnabled()&&(i.attr("tabIndex",a.option("tabIndex")),g&&(o.default.off(i,"focus",r),o.default.on(i,"focus",r))),s.cellTemplate){const e=(0,p.extend)({},t,{value:d,displayValue:u,text:c,column:s});_.renderTemplate(i,s.cellTemplate,e,(0,h.isElementInDom)(i)).done((()=>{_._cellPrepared(i,t)}))}else{const n=i.get(0);s.encodeHtml?n.textContent=c:n.innerHTML=c,i.addClass(P),(0,f.isDefined)(c)&&""!==c||i.html("&nbsp;"),a._isRowEditMode()||a._isItemModified(e,t)&&i.addClass("dx-item-modified"),_._cellPrepared(i,t)}}_getTemplate(e,t,i){const n=this,{column:s}=e,r=this._editingController;return function(i,l){const u=(0,d.default)(l),c=n._columnsController.getVisibleIndex(s.index),h=(0,p.extend)({},t),g=function(){const o=n._isItemEdited(e);h.value=t.row.values[c],o||s.showEditorAlways?r.renderFormEditorTemplate(h,e,i,u,!o):(h.column=s,h.columnIndex=c,n._renderFormViewTemplate(e,h,u))};if(g(),h.watch){const i=h.watch((()=>({isItemEdited:n._isItemEdited(e),value:t.row.values[c]})),(()=>{u.contents().remove(),u.removeClass(P),g()}));o.default.on(u,a.removeEvent,i)}}}_isVisibleColumnsValid(e){return!(e<2)&&!(e.length-function(){let t=0;for(let i=0;i<e.length;i++){e[i].command&&t++}return t}()<=1)}_calculatePercentWidths(e,t){const i=this;let n=0;return t.forEach(((t,o)=>{e[o]!==D&&(n+=i._getItemPercentWidth(t))})),n}_isPercentWidth(e){return(0,f.isString)(e)&&e.endsWith("%")}_isColumnHidden(e){return this._hiddenColumns.filter((t=>t.index===e.index)).length>0}_getAverageColumnsWidth(e,t,i){const n=this;let o=0,a=0;return t.forEach((s=>{if(!n._isColumnHidden(s)){const{width:r}=s;(0,f.isDefined)(r)&&!isNaN(parseFloat(r))?o+=n._isPercentWidth(r)?n._calculatePercentWidth({visibleIndex:s.visibleIndex,columnsCount:t.length,columnsCanFit:i,bestFitWidth:s.bestFitWidth,columnWidth:r,containerWidth:e}):parseFloat(r):a++}})),(e-o)/a}_calculateColumnWidth(e,t,i,n){const o=B(this,e),a=this._columnsController.columnOption(o,"width"),s=this._columnsController.columnOption(o,"bestFitWidth"),r=i.length;let l;if(a&&"auto"!==a){if(!this._isPercentWidth(a))return parseFloat(a);l=this._calculatePercentWidth({visibleIndex:e.visibleIndex,columnsCount:r,columnsCanFit:n,bestFitWidth:s,columnWidth:a,containerWidth:t})}else{l=this.option("columnAutoWidth")||e.command?s:this._getAverageColumnsWidth(t,i,n)}return l}_calculatePercentWidth(e){const t=e.visibleIndex<e.columnsCount-1&&e.columnsCanFit,i=e.containerWidth*parseFloat(e.columnWidth)/100,n=e.columnsCanFit&&i<e.bestFitWidth?e.bestFitWidth:i;return t?e.containerWidth*parseFloat(e.columnWidth)/100:n}_getNotTruncatedColumnWidth(e,t,i,n){const o=B(this,e),a=this._columnsController.columnOption(o,"width"),s=this._columnsController.columnOption(o,"bestFitWidth");if(a&&"auto"!==a&&!this._isPercentWidth(a))return parseFloat(a);const r=this._calculateColumnWidth(e,t,i,n);return r<s?null:r}_getItemPercentWidth(e){let t=0;return e.width&&this._isPercentWidth(e.width)&&(t=parseFloat(e.width)),t}_getCommandColumnsWidth(){const e=this,t=e._columnsController.getVisibleColumns();let i=0;return(0,g.each)(t,((t,n)=>{(n.index<0||n.command)&&(i+=e._columnsController.columnOption(B(e,n),"bestFitWidth")||0)})),i}_isItemEdited(e){if(this.isFormOrPopupEditMode())return!1;if(!this._isRowEditMode()){const t=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,i=this._columnsController.getVisibleIndex(e.column.index);return this._editingController.isEditCell(t,i)}{const e=this.option("editing.editRowKey");if((0,u.equalByValue)(e,this._dataController.adaptiveExpandedKey()))return!0}}_getFormItemsByHiddenColumns(e){const t=[];return(0,g.each)(e,((e,i)=>{t.push({column:i,name:i.name,dataField:i.dataField,visibleIndex:i.visibleIndex})})),t}_getAdaptiveColumnVisibleIndex(e){for(let t=0;t<e.length;t++){if(e[t].command===k)return t}}_hideAdaptiveColumn(e,t){const i=this._getAdaptiveColumnVisibleIndex(t);(0,f.isDefined)(i)&&(e[i]=D,this._hideVisibleColumn({isCommandColumn:!0,visibleIndex:i}))}_showHiddenCellsInView(e){let{$cells:t,isCommandColumn:i}=e,n=this.addWidgetPrefix(T);i?(n=O,t.attr({tabIndex:0,"aria-hidden":null}).removeClass(n)):t.removeClass(n)}_showHiddenColumns(){for(let e=0;e<S.length;e++){const t=this.getView(S[e]);if(t&&t.isVisible()&&t.element()){const e=t.name,i=t.element().find(`.${O}`);this._showHiddenCellsInView({viewName:e,$cells:i,isCommandColumn:!0});const n=t.element().find(`.${this.addWidgetPrefix(T)}`);this._showHiddenCellsInView({viewName:e,$cells:n})}}}_isCellValid(e){return e&&e.length&&!e.hasClass("dx-master-detail-cell")&&!e.hasClass(R)}_hideVisibleColumn(e){let{isCommandColumn:t,visibleIndex:i}=e;const n=this;S.forEach((e=>{const o=n.getView(e);o&&n._hideVisibleColumnInView({view:o,isCommandColumn:t,visibleIndex:i})}))}_hideVisibleColumnInView(e){let{view:t,isCommandColumn:i,visibleIndex:n}=e;const o=t.name;let a;const s=this._columnsController.getVisibleColumns()[n],r=this._editingController&&this._editingController.getEditFormRowIndex();if(t&&t.isVisible()&&s){const e=t.getRowsCount(),l=t._getRowElements();for(let t=0;t<e;t++){if(!(t===r&&o===w&&"popup"!==this.option("editing.mode"))){const e=o===x?this._columnsController.getVisibleIndex(s.index,t):n;if(e>=0){const n=l.eq(t);a=this._findCellElementInRow(n,e),this._isCellValid(a)&&this._hideVisibleCellInView({viewName:o,isCommandColumn:i,$cell:a})}}}}}_findCellElementInRow(e,t){const i=e.children();let n=t,o=!1;if(e.hasClass("dx-group-row")){const i=e.find(`.${R}`),a=i.attr("colspan");if(i.length&&(0,f.isDefined)(a)){const e=parseInt(a);t>i.index()+e-1?n=t-e+1:o=!0}}return o?void 0:i.eq(n)}_hideVisibleCellInView(e){let{$cell:t,isCommandColumn:i}=e;const n=i?O:this.addWidgetPrefix(T);t.attr({tabIndex:-1,"aria-hidden":!0}).addClass(n)}_getEditMode(){return this._editingController.getEditMode()}isFormOrPopupEditMode(){const e=this._getEditMode();return"form"===e||"popup"===e}hideRedundantColumns(e,t,i){const n=this;if(this._hiddenColumns=[],n._isVisibleColumnsValid(t)&&i.length){let o=0;const a=n.component.$element();let s=(0,_.getWidth)(a)-n._getCommandColumnsWidth();const r=function(){return t.filter((e=>!e.command&&0===this._hiddenColumns.filter((t=>t.index===e.index)).length))}.bind(this);let l=r();const d=l.length;let u,c,h;do{h=!1,o=0;const d=n._calculatePercentWidths(e,t),p=d<100&&0!==d;for(u=0;u<t.length;u++){const i=t[u];let a=n._getNotTruncatedColumnWidth(i,s,l,p);const r=B(n,i),d=n._columnsController.columnOption(r,"width"),g=n._columnsController.columnOption(r,"minWidth"),_=n._columnsController.columnOption(r,"bestFitWidth");if(e[u]!==D){if(!a&&!i.command&&!i.fixed){h=!0;break}d&&"auto"!==d||(a=Math.max(_||0,g||0)),(i.command!==k||c)&&(o+=a)}else c=!0}if(h=h||o>(0,_.getWidth)(a),h){const t=i.pop(),o=n._columnsController.getVisibleIndex(t.index);s+=n._calculateColumnWidth(t,s,l,p),n._hideVisibleColumn({visibleIndex:o}),e[o]=D,this._hiddenColumns.push(t),l=r()}}while(h&&l.length>1&&i.length);d===l.length&&n._hideAdaptiveColumn(e,t)}else n._hideAdaptiveColumn(e,t)}getAdaptiveDetailItems(){return this._$itemContents}getItemContentByColumnIndex(e){let t;for(let i=0;i<this._$itemContents.length;i++){t=this._$itemContents.eq(i);const n=t.data("dx-form-item");if(n&&n.column&&this._columnsController.getVisibleIndex(n.column.index)===e)return t}}toggleExpandAdaptiveDetailRow(e,t){this.isFormOrPopupEditMode()&&this._editingController.isEditing()||this._dataController.toggleExpandAdaptiveDetailRow(e,t)}createFormByHiddenColumns(e,t){const i=this,n=(0,d.default)(e),o={items:i._getFormItemsByHiddenColumns(i._hiddenColumns),formID:`dx-${new l.default}`},a=(0,v.isMaterial)()?{colCount:2}:{};this.executeAction("onAdaptiveDetailRowPreparing",{formOptions:o}),i._$itemContents=null,i._form=i._createComponent((0,d.default)("<div>").appendTo(n),m.default,(0,p.extend)(a,o,{customizeItem(e){const n=e.column||i._columnsController.columnOption(e.name||e.dataField);n&&(e.label=e.label||{},e.label.text=e.label.text||n.caption,e.column=n,e.template=i._getTemplate(e,t,i.updateForm.bind(i))),o.customizeItem&&o.customizeItem.call(this,e)},onContentReady(e){o.onContentReady&&o.onContentReady.call(this,e),i._$itemContents=n.find(`.${E}`)}}))}hasAdaptiveDetailRowExpanded(){return(0,f.isDefined)(this._dataController.adaptiveExpandedKey())}updateForm(e){this.hasAdaptiveDetailRowExpanded()&&this._form&&(0,f.isDefined)(this._form._contentReadyAction)&&(e&&e.length?this._form.option("items",this._getFormItemsByHiddenColumns(e)):this._form.repaint())}updateHidingQueue(e){const t=this,i=e.filter((e=>e.visible&&!e.type&&!e.fixed&&!((0,f.isDefined)(e.groupIndex)&&e.groupIndex>=0)));let n,o;if(t._hidingColumnsQueue=[],t.option("allowColumnResizing")&&"widget"===t.option("columnResizingMode"))return t._hidingColumnsQueue;for(o=0;o<i.length;o++)(0,f.isDefined)(i[o].hidingPriority)&&i[o].hidingPriority>=0&&(n=!0,t._hidingColumnsQueue[i[o].hidingPriority]=i[o]);if(n)t._hidingColumnsQueue.reverse();else if(t.option("columnHidingEnabled"))for(o=0;o<i.length;o++){const e=t._columnsController.getVisibleIndex(i[o].index);t._hidingColumnsQueue[e]=i[o]}return t._hidingColumnsQueue=t._hidingColumnsQueue.filter(Object),t._hidingColumnsQueue}getHiddenColumns(){return this._hiddenColumns}hasHiddenColumns(){return this._hiddenColumns.length>0}getHidingColumnsQueue(){return this._hidingColumnsQueue}isAdaptiveDetailRowExpanded(e){const t=this._dataController;return t.adaptiveExpandedKey()&&(0,u.equalByValue)(t.adaptiveExpandedKey(),e)}expandAdaptiveDetailRow(e){this.hasAdaptiveDetailRowExpanded()||this.toggleExpandAdaptiveDetailRow(e)}collapseAdaptiveDetailRow(){this.hasAdaptiveDetailRowExpanded()&&this.toggleExpandAdaptiveDetailRow()}updateCommandAdaptiveAriaLabel(e,t){const i=this._dataController.getRowIndexByKey(e);if(-1===i)return;const n=(0,d.default)(this.component.getRowElement(i));this.setCommandAdaptiveAriaLabel(n,t)}setCommandAdaptiveAriaLabel(e,t){e.find(".dx-command-adaptive").attr("aria-label",r.default.format(t))}}t.AdaptiveColumnsController=H;t.adaptivityModule={defaultOptions:()=>({columnHidingEnabled:!1,onAdaptiveDetailRowPreparing:null}),controllers:{adaptiveColumns:H},extenders:{views:{rowsView:e=>class extends e{_getCellTemplate(e){const t=this,{column:i}=e;return e.rowType===I&&"detail"===i.command?function(e,i){t._adaptiveColumnsController.createFormByHiddenColumns((0,d.default)(e),i)}:super._getCellTemplate(e)}_createRow(e){const t=super._createRow.apply(this,arguments);return e&&e.rowType===I&&e.key===this._dataController.adaptiveExpandedKey()&&t.addClass("dx-adaptive-detail-row"),t}_renderCells(e,t){super._renderCells(e,t);const i=this._adaptiveColumnsController,n=i.getHidingColumnsQueue().length,o=i.getHiddenColumns().length;n&&!o&&function(e){return e.find("td:not(.dx-datagrid-hidden-column):not([class*='dx-command-'])")}(e).last().addClass("dx-last-data-cell"),"data"===t.row.rowType&&i.setCommandAdaptiveAriaLabel(e,L)}_getColumnIndexByElementCore(e){const t=e.closest(`.${E}`);if(t.length&&t.closest(this.component.$element()).length){const e=t.length?t.first().data("dx-form-item"):null;return e&&e.column&&this._columnsController.getVisibleIndex(e.column.index)}return super._getColumnIndexByElementCore(e)}_cellPrepared(e,t){super._cellPrepared.apply(this,arguments),t.row.rowType!==I&&t.column.visibleWidth===D&&e.addClass(this.addWidgetPrefix(T))}getCell(e,t){const i=this._dataController.items()[null==e?void 0:e.rowIndex];if((null==i?void 0:i.rowType)===I){const i=this._adaptiveColumnsController.getAdaptiveDetailItems();return super.getCell(e,t,i)}return super.getCell.apply(this,arguments)}_getCellElement(e,t){const i=this._dataController.items()[e];return i&&i.rowType===I?this._adaptiveColumnsController.getItemContentByColumnIndex(t):super._getCellElement.apply(this,arguments)}getContextMenuItems(e){var t;if(e.row&&"detailAdaptive"===e.row.rowType){const t=this._columnHeadersView,i=(0,d.default)(e.targetElement).closest(".dx-field-item-label").next().data("dx-form-item");return e.column=i?i.column:e.column,t.getContextMenuItems&&t.getContextMenuItems(e)}return null===(t=super.getContextMenuItems)||void 0===t?void 0:t.call(this,e)}isClickableElement(e){var t;return((null===(t=super.isClickableElement)||void 0===t?void 0:t.call(this,e))??!1)||!!e.closest(`.${A}`).length}}},controllers:{export:e=>class extends e{_updateColumnWidth(e,t){super._updateColumnWidth(e,e.visibleWidth===D?e.bestFitWidth:t)}},columnsResizer:e=>class extends e{_pointCreated(e,t,i){const n=super._pointCreated(e,t,i),o=i[e.columnIndex]||{},a=this._getNextColumnIndex(e.columnIndex),s=i[a]||{},r=a!==e.columnIndex+1&&s.command,l=o.visibleWidth===D||r;return n||l}_getNextColumnIndex(e){const t=this._columnsController.getVisibleColumns();let i=super._getNextColumnIndex(e);for(;t[i]&&t[i].visibleWidth===D;)i++;return i}},draggingHeader:e=>class extends e{_pointCreated(e,t,i,n){const o=super._pointCreated(e,t,i,n),a=(t[e.columnIndex-1]||{}).visibleWidth===D;return o||a}},editing:e=>class extends e{_isRowEditMode(){return this.getEditMode()===M}_getFormEditItemTemplate(e,t){return this.getEditMode()!==M&&"detailAdaptive"===e.rowType?(e.columnIndex=this._columnsController.getVisibleIndex(t.index),this.getColumnTemplate(e)):super._getFormEditItemTemplate(e,t)}_closeEditItem(e){const t=e.closest(`.${E}`),i=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,n=t.length?t.first().data("dx-form-item"):null,o=n&&n.column&&this._columnsController.getVisibleIndex(n.column.index);this.isEditCell(i,o)||super._closeEditItem(e)}_beforeUpdateItems(e,t){if(!this._adaptiveColumnsController.isFormOrPopupEditMode()&&this._adaptiveColumnsController.hasHiddenColumns()){const i=this._dataController.items(),n=i[t],o=y.default.getIndexByKey(this._dataController.adaptiveExpandedKey(),i);this._isForceRowAdaptiveExpand=!this._adaptiveColumnsController.hasAdaptiveDetailRowExpanded(),o>=0&&e.push(o+1),e.push(t+1),this._dataController.adaptiveExpandedKey(n.key)}}_afterInsertRow(e){super._afterInsertRow.apply(this,arguments),this._adaptiveColumnsController.hasHiddenColumns()&&(this._adaptiveColumnsController.toggleExpandAdaptiveDetailRow(e,this.isRowEditMode()),this._isForceRowAdaptiveExpand=!0)}_collapseAdaptiveDetailRow(){this._isRowEditMode()&&this._isForceRowAdaptiveExpand&&(this._adaptiveColumnsController.collapseAdaptiveDetailRow(),this._isForceRowAdaptiveExpand=!1)}_cancelEditAdaptiveDetailRow(){this._adaptiveColumnsController.hasHiddenColumns()&&this._collapseAdaptiveDetailRow()}_afterSaveEditData(){super._afterSaveEditData.apply(this,arguments);const e=new c.Deferred;return this._isRowEditMode()&&this._adaptiveColumnsController.hasHiddenColumns()?(0,c.when)(this._validatingController.validate(!0)).done((t=>{t&&this._cancelEditAdaptiveDetailRow(),e.resolve()})):e.resolve(),e.promise()}_beforeCancelEditData(){super._beforeCancelEditData(),this._cancelEditAdaptiveDetailRow()}_getRowIndicesForCascadeUpdating(e){const t=super._getRowIndicesForCascadeUpdating.apply(this,arguments);return this._adaptiveColumnsController.isAdaptiveDetailRowExpanded(e.key)&&t.push(e.rowType===I?e.rowIndex-1:e.rowIndex+1),t}_beforeCloseEditCellInBatchMode(e){const t=this._dataController._adaptiveExpandedKey;if(t){const i=y.default.getIndexByKey(t,this._dataController.items());i>-1&&e.unshift(i)}}editRow(e){return this._adaptiveColumnsController.isFormOrPopupEditMode()&&this._adaptiveColumnsController.collapseAdaptiveDetailRow(),super.editRow(e)}deleteRow(e){const t=this._dataController.getKeyByRowIndex(e);"batch"===this.getEditMode()&&this._adaptiveColumnsController.isAdaptiveDetailRowExpanded(t)&&this._adaptiveColumnsController.collapseAdaptiveDetailRow(),super.deleteRow(e)}},resizing:e=>class extends e{dispose(){super.dispose.apply(this,arguments),clearTimeout(this._updateScrollableTimeoutID)}_needBestFit(){return super._needBestFit()||!!this._adaptiveColumnsController.getHidingColumnsQueue().length}_correctColumnWidths(e,t){const i=this._adaptiveColumnsController,n=i.getHiddenColumns(),o=i.updateHidingQueue(this._columnsController.getColumns());i.hideRedundantColumns(e,t,o);const a=i.getHiddenColumns();return i.hasAdaptiveDetailRowExpanded()&&n.length!==a.length&&i.updateForm(a),!a.length&&i.collapseAdaptiveDetailRow(),super._correctColumnWidths.apply(this,arguments)}_toggleBestFitMode(e){e&&this._adaptiveColumnsController._showHiddenColumns(),super._toggleBestFitMode(e)}_needStretch(){const e=this._adaptiveColumnsController;return super._needStretch.apply(this,arguments)||e.getHidingColumnsQueue().length||e.hasHiddenColumns()}},data:e=>class extends e{init(){super.init(),this._adaptiveExpandedKey=void 0}_processItems(e,t){const{changeType:i}=t;if(e=super._processItems.apply(this,arguments),"loadingAll"===i||!(0,f.isDefined)(this._adaptiveExpandedKey))return e;const n=y.default.getIndexByKey(this._adaptiveExpandedKey,e),o=!1===this.option("scrolling.legacyMode");if(n>=0){const t=e[n];e.splice(n+1,0,{visible:!0,rowType:I,key:t.key,data:t.data,node:t.node,modifiedValues:t.modifiedValues,isNewRow:t.isNewRow,values:t.values})}else"refresh"!==i||o&&t.repaintChangesOnly||(this._adaptiveExpandedKey=void 0);return e}_getRowIndicesForExpand(e){const t=super._getRowIndicesForExpand.apply(this,arguments);if(this._adaptiveColumnsController.isAdaptiveDetailRowExpanded(e)){const e=t[t.length-1];t.push(e+1)}return t}adaptiveExpandedKey(e){if(!(0,f.isDefined)(e))return this._adaptiveExpandedKey;this._adaptiveExpandedKey=e}toggleExpandAdaptiveDetailRow(e,t){const i=this;let n=y.default.getIndexByKey(i._adaptiveExpandedKey,i._items),o=y.default.getIndexByKey(e,i._items);n>=0&&n===o&&!t&&(e=void 0,o=-1);const a=i._adaptiveExpandedKey;i._adaptiveExpandedKey=e,n>=0&&n++,o>=0&&o++;const s=i.getRowIndexDelta();i.updateItems({allowInvisibleRowIndices:!0,changeType:"update",rowIndices:[n-s,o-s]}),this._adaptiveColumnsController.updateCommandAdaptiveAriaLabel(e,"dxDataGrid-ariaAdaptiveCollapse"),this._adaptiveColumnsController.updateCommandAdaptiveAriaLabel(a,L)}},editorFactory:e=>class extends e{_needHideBorder(e){return super._needHideBorder(e)||(null==e?void 0:e.hasClass("dx-field-item-content"))&&(null==e?void 0:e.find(".dx-checkbox").length)}_getFocusCellSelector(){return`${super._getFocusCellSelector()}, .dx-adaptive-detail-row .dx-field-item > .dx-field-item-content`}_getRevertTooltipsSelector(){return`${super._getRevertTooltipsSelector()}, .dx-field-item-content .${this.addWidgetPrefix("revert-tooltip")}`}},columns:e=>class extends e{_isColumnVisible(e){return super._isColumnVisible(e)&&!e.adaptiveHidden}getVisibleDataColumnsByBandColumn(e){return super.getVisibleDataColumnsByBandColumn(e).filter((e=>e.visibleWidth!==D))}},keyboardNavigation:e=>class extends e{_isCellValid(e,t){return super._isCellValid(e,t)&&!e.hasClass(this.addWidgetPrefix(T))&&!e.hasClass(O)}_processNextCellInMasterDetail(e,t){super._processNextCellInMasterDetail(e,t);const i=this._editingController.isCellOrBatchEditMode();this._editingController.isEditing()&&e&&i&&!this._isInsideEditForm(e)&&(o.default.off(e,"focus",F),o.default.on(e,"focus",{$nextCell:e},F),o.default.trigger(t,"focus"))}_isCellElement(e){return super._isCellElement(e)||e.hasClass(P)}}}}}},69862:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.columnChooserModule=t.ColumnChooserView=t.ColumnChooserController=void 0;var n=m(i(4671)),o=m(i(65951)),a=m(i(64553)),s=i(17781),r=i(52576),l=i(21274),d=i(57653),u=i(11528),c=m(i(64973)),h=m(i(10720)),p=i(52071),g=m(i(4313)),_=m(i(74854)),f=i(48921);function m(e){return e&&e.__esModule?e:{default:e}}const v="column-chooser-button",C="notouch-action",y="column-chooser",b="dx-column-chooser-item",x=["showInColumnChooser","caption","allowHiding","visible","cssClass","ownerBand"];class w extends _.default.ViewController{init(){super.init(),this._rowsView=this.getView("rowsView")}renderShowColumnChooserButton(e){const t=this,i=t.addWidgetPrefix(v),n=t.option("columnChooser.enabled"),o=e.find(`.${i}`);let s;n?o.length?o.show():(s=(0,a.default)("<div>").addClass(i).appendTo(e),t._createComponent(s,c.default,{icon:y,onClick(){t.getView("columnChooserView").showColumnChooser()},hint:t.option("columnChooser.title"),integrationOptions:{}})):o.hide()}getPosition(){const e=this.option("columnChooser.position");return(0,u.isDefined)(e)?e:{my:"right bottom",at:"right bottom",of:this._rowsView&&this._rowsView.element(),collision:"fit",offset:"-2 -2",boundaryOffset:"2 2"}}}t.ColumnChooserController=w;class S extends f.ColumnsView{optionChanged(e){if("columnChooser"===e.name)this._initializePopupContainer(),this.render(null,"full");else super.optionChanged(e)}publicMethods(){return["showColumnChooser","hideColumnChooser"]}_resizeCore(){}_isWinDevice(){return!!o.default.real().win}_initializePopupContainer(){const e=this,t=e.addWidgetPrefix("column-chooser"),i=e.element().addClass(t),n=e.option("columnChooser"),o=this._columnChooserController.getPosition(),s=(0,p.current)(),l=(0,p.isGeneric)(s),d=(0,p.isMaterial)(s),c={visible:!1,shading:!1,showCloseButton:!1,dragEnabled:!0,resizeEnabled:!0,wrapperAttr:{class:t},toolbarItems:[{text:n.title,toolbar:"top",location:l||d?"before":"center"}],position:o,width:n.width,height:n.height,rtlEnabled:e.option("rtlEnabled"),onHidden(){e._isWinDevice()&&(0,a.default)("body").removeClass(e.addWidgetPrefix(C))},container:n.container,_loopFocus:!0};l||d?(0,r.extend)(c,{showCloseButton:!0}):c.toolbarItems[c.toolbarItems.length]={shortcut:"cancel"},(0,u.isDefined)(this._popupContainer)?this._popupContainer.option(c):(e._popupContainer=e._createComponent(i,h.default,c),e._popupContainer.on("optionChanged",(t=>{"visible"===t.name&&e.renderCompleted.fire()}))),this.setPopupAttributes()}setPopupAttributes(){const e=this.isSelectMode(),t=this._columnsController.isBandColumnsUsed();this._popupContainer.setAria({role:"dialog",label:n.default.format("dxDataGrid-columnChooserTitle")}),this._popupContainer.$wrapper().toggleClass(this.addWidgetPrefix("column-chooser-mode-drag"),!e).toggleClass(this.addWidgetPrefix("column-chooser-mode-select"),e),this._popupContainer.$content().addClass(this.addWidgetPrefix("column-chooser-list")),e&&!t&&this._popupContainer.$content().addClass(this.addWidgetPrefix("column-chooser-plain"))}_renderCore(e){if(this._popupContainer){const t=!this.isSelectMode();this._columnChooserList&&"full"!==e?t&&this._updateItems():this._renderTreeView()}}_renderTreeView(){var e,t,i;const n=this,o=this._popupContainer.$content(),a=this.option("columnChooser"),l=this.isSelectMode(),d={dataStructure:"plain",activeStateEnabled:!0,focusStateEnabled:!0,hoverStateEnabled:!0,itemTemplate:"item",showCheckBoxesMode:"none",rootValue:null,searchEnabled:(0,u.isDefined)(a.allowSearch)?a.allowSearch:null===(e=a.search)||void 0===e?void 0:e.enabled,searchTimeout:(0,u.isDefined)(a.searchTimeout)?a.searchTimeout:null===(t=a.search)||void 0===t?void 0:t.timeout,searchEditorOptions:null===(i=a.search)||void 0===i?void 0:i.editorOptions};if(this._isWinDevice()&&(d.useNativeScrolling=!1),(0,r.extend)(d,l?this._prepareSelectModeConfig():this._prepareDragModeConfig()),this._columnChooserList)d.searchEnabled||(d.searchValue=""),this._columnChooserList.option(d),this._updateItems();else{this._columnChooserList=this._createComponent(o,g.default,d),this._updateItems();let e=0;this._columnChooserList.on("optionChanged",(t=>{const i=t.component.getScrollable();e=i.scrollTop()})),this._columnChooserList.on("contentReady",(t=>{(0,s.deferUpdate)((()=>{t.component.getScrollable().scrollTo({y:e}),n.renderCompleted.fire()}))}))}}_prepareDragModeConfig(){return{noDataText:this.option("columnChooser").emptyPanelText,activeStateEnabled:!1,hoverStateEnabled:!1,itemTemplate(e,t,i){(0,a.default)(i).text(e.text).parent().addClass(e.cssClass).addClass(b)}}}_prepareSelectModeConfig(){const e=this,t=this.option("columnChooser.selection")??{};let i=!1;return{selectByClick:t.selectByClick,selectNodesRecursive:t.recursive,showCheckBoxesMode:t.allowSelectAll?"selectAll":"normal",onSelectionChanged:t=>{if(i)return;const n=(e=>{const t=(e,i)=>e.reduce(((e,i)=>(e.push(i),i.children.length&&t(i.children,e),e)),i);return t(e,[])})(t.component.getNodes());t.component.beginUpdate(),i=!0,((e,t)=>{t.filter((e=>!1===e.itemData.allowHiding)).forEach((t=>e.component.selectItem(t.key)))})(t,n),t.component.endUpdate(),i=!1,e.component.beginUpdate(),this._isUpdatingColumnVisibility=!0,(t=>{t.forEach((t=>{const i=t.itemData.id,n=!1!==t.selected;e._columnsController.columnOption(i,"visible",n)}))})(n),e.component.endUpdate(),this._isUpdatingColumnVisibility=!1}}}_updateItems(){const e=this.isSelectMode(),t=function(e,t){const i=[],n=e.isSelectMode(),o=e.option("columnChooser.selection.recursive");return t.length&&(0,l.each)(t,((e,t)=>{const a={text:t.caption,cssClass:t.cssClass,allowHiding:t.allowHiding,expanded:!0,id:t.index,disabled:!1===t.allowHiding,parentId:(0,u.isDefined)(t.ownerBand)?t.ownerBand:null},s=o&&t.hasColumns;n&&!s&&(a.selected=t.visible),i.push(a)})),i}(this,this._columnsController.getChooserColumns(e));this._columnChooserList.option("items",t)}_updateItemsSelection(e){const t=null==e?void 0:e.map((e=>this._columnsController.columnOption(e)));this._columnChooserList.beginUpdate(),null==t||t.forEach((e=>{let{visible:t,index:i}=e;t?this._columnChooserList.selectItem(i):this._columnChooserList.unselectItem(i)})),this._columnChooserList.endUpdate()}_columnOptionChanged(e){super._columnOptionChanged(e);if(this.isSelectMode()&&this._columnChooserList&&!this._isUpdatingColumnVisibility){const{optionNames:t}=e,i=t.visible&&1===t.length,n=(0,u.isDefined)(e.columnIndex)?[e.columnIndex]:e.columnIndices;(x.some((e=>t[e]))||e.changeTypes.columns&&t.all)&&(this._updateItemsSelection(n),i||this._updateItems())}}getColumnElements(){const e=[],t=this.isSelectMode(),i=this._columnsController.getChooserColumns(t),n=this._popupContainer&&this._popupContainer.$content(),o=n&&n.find(".dx-treeview-node");return o&&i.forEach((t=>{const i=o.filter(`[data-item-id = '${t.index}']`),n=i.length?i.children(`.${b}`).get(0):null;e.push(n)})),(0,a.default)(e)}getName(){return"columnChooser"}getColumns(){return this._columnsController.getChooserColumns()}allowDragging(e){const t=this._columnsController.isParentColumnVisible(e.index),i=!e.visible&&e.allowHiding;return this.isColumnChooserVisible()&&t&&i}allowColumnHeaderDragging(e){return!this.isSelectMode()&&this.isColumnChooserVisible()&&e.allowHiding}getBoundingRect(){const e=this._popupContainer&&this._popupContainer.$overlayContent();if(e&&e.is(":visible")){const t=e.offset();return{left:t.left,top:t.top,right:t.left+(0,d.getOuterWidth)(e),bottom:t.top+(0,d.getOuterHeight)(e)}}return null}showColumnChooser(){this._popupContainer||(this._initializePopupContainer(),this.render()),this._popupContainer.show(),this._isWinDevice()&&(0,a.default)("body").addClass(this.addWidgetPrefix(C))}hideColumnChooser(){this._popupContainer&&this._popupContainer.hide()}isColumnChooserVisible(){const e=this._popupContainer;return e&&e.option("visible")}isSelectMode(){return"select"===this.option("columnChooser.mode")}hasHiddenColumns(){const e=this.option("columnChooser.enabled"),t=this.getColumns().filter((e=>!e.visible));return e&&t.length}}t.ColumnChooserView=S;t.columnChooserModule={defaultOptions:()=>({columnChooser:{enabled:!1,search:{enabled:!1,timeout:500,editorOptions:{}},selection:{allowSelectAll:!1,selectByClick:!1,recursive:!1},position:void 0,mode:"dragAndDrop",width:250,height:260,title:n.default.format("dxDataGrid-columnChooserTitle"),emptyPanelText:n.default.format("dxDataGrid-columnChooserEmptyText"),container:void 0}}),controllers:{columnChooser:w},views:{columnChooserView:S},extenders:{views:{headerPanel:e=>class extends e{_getToolbarItems(){const e=super._getToolbarItems();return this._appendColumnChooserItem(e)}_appendColumnChooserItem(e){const t=this;if(t.option("columnChooser.enabled")){const i=function(){t.component.getView("columnChooserView").showColumnChooser()},n=function(e){(0,a.default)(e.element).addClass(t._getToolbarButtonClass(t.addWidgetPrefix(v)))},o=t.option("columnChooser.title"),s={widget:"dxButton",options:{icon:y,onClick:i,hint:o,text:o,onInitialized:n,elementAttr:{"aria-haspopup":"dialog"}},showText:"inMenu",location:"after",name:"columnChooserButton",locateInMenu:"auto",sortIndex:40};e.push(s)}return e}optionChanged(e){if("columnChooser"===e.name)this._invalidate(),e.handled=!0;else super.optionChanged(e)}isVisible(){const e=this.option("columnChooser.enabled");return super.isVisible()||e}},columnHeadersView:e=>class extends e{allowDragging(e){const t=!this._columnChooserView.isSelectMode(),i=this._columnChooserView.isColumnChooserVisible();return t&&i&&e.allowHiding||super.allowDragging(e)}}},controllers:{columns:e=>class extends e{allowMoveColumn(e,t,i,n){return!("select"===this.option("columnChooser.mode")&&"columnChooser"===n)&&super.allowMoveColumn(e,t,i,n)}}}}}},54704:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.columnFixingModule=void 0;var n=i(88603),o=v(i(92774)),a=i(37373),s=v(i(4671)),r=v(i(64553)),l=v(i(48314)),d=i(52576),u=i(21274),c=i(41639),h=i(57653),p=i(58515),g=i(11528),_=v(i(20876)),f=v(i(53226)),m=i(48921);function v(e){return e&&e.__esModule?e:{default:e}}const C="content",y="content-fixed",b="dx-first-cell",x="dx-state-hover",w="dx-col-fixed",S="dx-pointer-events-none",D="transparent",I="dx-group-row",E=function(e){let t=-1;return(0,u.each)(e,((e,i)=>{if(i.command===D)return t=e,!1})),t},T=function(e,t,i){let n=0;if(e&&t&&i)for(let o=0;o<e.length;o++)e[o].command===D?n+=e[o].colspan:(t[n]<i[o]&&(t[n]=i[o]),n++);return t},A=e=>class extends e{init(){super.init(),this._isFixedTableRendering=!1,this._isFixedColumns=!1}_createCol(e){return super._createCol(e).toggleClass(w,!(!this._isFixedTableRendering||!(e.fixed||e.command&&e.command!==D)))}isIndicesArray(e){return Array.isArray(e)&&e.length>0}_correctColumnIndicesForFixedColumns(e,t){var i;const n=null==t?void 0:t.columnIndices;if(!this.isIndicesArray(n))return;const o=E(e),a=e[o].colspan,s=o+a,r=null==t||null===(i=t.items)||void 0===i?void 0:i.map((e=>{let{rowType:t}=e;return t}));t.columnIndices=n.map(((e,t)=>{if(!this.isIndicesArray(e))return e;return r&&"group"===r[t]?[...e]:e.reduce(((e,t)=>{switch(!0){case t<o:e.push(t);break;case t>=s:e.push(t-a+1)}return e}),[])}))}_partialUpdateFixedTable(e,t){const i=this._fixedTableElement,n=this._getRowElementsCore(i);i.children("colgroup").replaceWith(this._createColGroup(e));for(let i=0;i<t.length;i++)this._partialUpdateFixedRow((0,r.default)(n[i]),e,t[i])}_partialUpdateFixedRow(e,t,i){const n=e.get(0).childNodes,o=E(t),a=t[o];let s,r=this._columnsController.getColumnIndexOffset()+1,{colspan:l}=a;if(e.hasClass("dx-master-detail-row")){var d;n[0].setAttribute("colspan",null===(d=this._columnsController.getVisibleColumns())||void 0===d?void 0:d.length)}else{if(e.hasClass(I)){s=this._getGroupCellOptions({row:i,columns:this._columnsController.getVisibleColumns()});if(i.summaryCells.length>0){const e=this._getAlignByColumnCellCount(s.colspan,{columns:this._columnsController.getVisibleColumns(),row:i,isFixed:!0});l=s.colspan-e}else l=s.colspan-Math.max(0,n.length-(s.columnIndex+2))}for(let e=0;e<n.length;e++){const t=s?e===s.columnIndex+1:e===o;n[e].setAttribute("aria-colindex",r),t?(n[e].setAttribute("colspan",l),r+=l):r++}}}_renderTable(e){let t;const i=this.getFixedColumns();this._isFixedColumns=this.isFixedColumns();const n=super._renderTable(e);if(this._isFixedColumns){var o;const n=null==e?void 0:e.change,s=this._getRowElements(this._fixedTableElement),r=(null==n?void 0:n.virtualColumnsScrolling)&&s.length===(null==n||null===(o=n.items)||void 0===o?void 0:o.length);if(this._isFixedTableRendering=!0,r&&!0!==this.option("scrolling.legacyMode")){var a;this._partialUpdateFixedTable(i,null==e||null===(a=e.change)||void 0===a?void 0:a.items),this._isFixedTableRendering=!1}else{const o=null==n?void 0:n.columnIndices;this._correctColumnIndicesForFixedColumns(i,n),t=this._createTable(i),this._renderRows(t,(0,d.extend)({},e,{columns:i})),this._updateContent(t,n,!0),o&&(n.columnIndices=o),this._isFixedTableRendering=!1}}else this._fixedTableElement&&this._fixedTableElement.parent().remove(),this._fixedTableElement=null;return n}_renderRow(e,t){let i,{cells:n}=t.row;if(super._renderRow.apply(this,arguments),this._isFixedTableRendering&&n&&n.length){i=0;const e=t.row.cells||[];n=n.slice(),t.row.cells=n;for(let t=0;t<e.length;t++)e[t].column&&e[t].column.command===D?i=(e[t].column.colspan||1)-1:n[t+i]=e[t]}}_createCell(e){const t=this,{column:i}=e,n=i&&i.command,{rowType:o}=e,a=super._createCell.apply(t,arguments);let s,r,d;(t._isFixedTableRendering||"filter"===o)&&(s=t.getFixedColumns(),d=E(s),r=s[d-1]),t._isFixedTableRendering?n===D&&(a.addClass(S).toggleClass(b,0===d||r&&"expand"===r.command).toggleClass("dx-last-cell",s.length&&d===s.length-1),"freeSpace"!==o&&f.default.setEmptyText(a)):"filter"===o&&a.toggleClass(b,e.columnIndex===d);const u=t.option("rowAlternationEnabled")&&e.isAltRow,c="multiple"===t.option("selection.mode")&&0===e.columnIndex&&"header"===e.rowType;return l.default.mozilla&&e.column.fixed&&"group"!==e.rowType&&!u&&!c&&a.addClass(w),a}_wrapTableInScrollContainer(e,t){const i=super._wrapTableInScrollContainer.apply(this,arguments);return(this._isFixedTableRendering||t)&&i.addClass(this.addWidgetPrefix(y)),i}_renderCellContent(e,t){let i;const{column:n}=t,o=this._isFixedTableRendering,a="group"===t.rowType&&(0,g.isDefined)(n.groupIndex);if(o&&a&&!n.command&&!n.groupCellTemplate&&e.css("pointerEvents","none"),!o&&this._isFixedColumns){if(i=n.fixed||n.command&&!1!==n.fixed,a&&(i=!1,t.row.summaryCells&&t.row.summaryCells.length)){var s;const e=this._columnsController.getVisibleColumns(),o=(null===(s=this._getAlignByColumnCellCount)||void 0===s?void 0:s.call(this,n.colspan,{columns:e,row:t.row,isFixed:!0}))??0;if(o>0){const t=E(this._columnsController.getFixedColumns());i=e.length-o<t}}if(i){if(n.command&&"buttons"!==n.type||"group"===t.rowType)return void e.html("&nbsp;").addClass(n.cssClass);e.addClass("dx-hidden-cell")}}n.command!==D&&super._renderCellContent.apply(this,arguments)}getContent(e){var t;return e?null===(t=this._fixedTableElement)||void 0===t?void 0:t.parent():super.getContent.apply(this,arguments)}_getCellElementsCore(e){const t=super._getCellElementsCore.apply(this,arguments),i=null==t?void 0:t.parent().hasClass(I),n="columnHeadersView"===this.name?e:void 0;if(this._fixedTableElement&&t){const o=this.getFixedColumns(n),a=this._getRowElements(this._fixedTableElement).eq(e).children("td");(0,u.each)(a,((e,s)=>{if(i)t[e]&&"hidden"!==s.style.visibility&&(t[e]=s);else{const i=o[e];if(i)if(i.command===D)a.eq(e).hasClass("dx-master-detail-cell")&&(t[e]=s||t[e]);else{const e=this._columnsController.getVisibleIndexByColumn(i,n);t[e]=s||t[e]}}}))}return t}getColumnWidths(e,t){const i=super.getColumnWidths(e,t),n=this.getFixedColumns(),o=this._fixedTableElement&&i.length?super.getColumnWidths(this._fixedTableElement):void 0;return T(n,i,o)}getTableElement(e){return(e=this._isFixedTableRendering||e)?this._fixedTableElement:super.getTableElement()}setTableElement(e,t){this._isFixedTableRendering||t?this._fixedTableElement=e.addClass(S):super.setTableElement(e)}getColumns(e){const t=this.getTableElement();return this._isFixedTableRendering?this.getFixedColumns(e):super.getColumns(e,t)}getRowIndex(e){const t=this._fixedTableElement;return t&&t.find(e).length?this._getRowElements(t).index(e):super.getRowIndex(e)}getTableElements(){let e=super.getTableElements.apply(this,arguments);return this._fixedTableElement&&(e=(0,r.default)([e.get(0),this._fixedTableElement.get(0)])),e}getFixedColumns(e){return this._columnsController.getFixedColumns(e)}getFixedColumnsOffset(){let e,t={left:0,right:0};if(this._fixedTableElement){e=this.getTransparentColumnElement();const i=e.position();t={left:i.left,right:(0,h.getOuterWidth)(this.element(),!0)-((0,h.getOuterWidth)(e,!0)+i.left)}}return t}getTransparentColumnElement(){return this._fixedTableElement&&this._fixedTableElement.find(`.${S}`).first()}getFixedTableElement(){return this._fixedTableElement}_resizeCore(){super._resizeCore(),this.synchronizeRows()}setColumnWidths(e){var t;const{widths:i}=e,n=this._columnsController.getVisibleColumns(),o=(null==i?void 0:i.length)&&n.some((e=>(0,g.isDefined)(e.visibleWidth))),a=null===(t=e.optionNames)||void 0===t?void 0:t.width;if(super.setColumnWidths(e),this._fixedTableElement){const e=(null==i?void 0:i.some((e=>"auto"===e||!(0,g.isDefined)(e))))&&(!o||!this.isScrollbarVisible(!0))?n:this.getFixedColumns();this.setFixedTableColumnWidths(e,i)}const s=this.option("wordWrapEnabled");(o||a&&s)&&this.synchronizeRows()}setFixedTableColumnWidths(e,t){if(!this._fixedTableElement||!t)return;const i=this._fixedTableElement.children("colgroup").children("col");i.toArray().forEach((e=>e.removeAttribute("style")));let n=0;e.forEach((e=>{if(e.colspan)return void(n+=e.colspan);const o=(0,m.normalizeWidth)(t[n]);(0,g.isDefined)(o)&&(0,p.setWidth)(i.eq(n),o),n+=1}))}_getClientHeight(e){const t=e.getBoundingClientRect&&(0,c.getBoundingRect)(e);return t&&t.height?t.height:e.clientHeight}synchronizeRows(){const e=[],t=[];let i,n,o,a;this.waitAsyncTemplates(!0).done((()=>{if(this._isFixedColumns&&this._tableElement&&this._fixedTableElement){const s=this._getClientHeight(this._tableElement.get(0)),r=this._getClientHeight(this._fixedTableElement.get(0));if(n=this._getRowElements(this._tableElement),o=this._getRowElements(this._fixedTableElement),a=this._findContentElement(),s!==r){for(a&&a.css("height",s),n.css("height",""),o.css("height",""),i=0;i<n.length;i++)e.push(this._getClientHeight(n.get(i))),t.push(this._getClientHeight(o.get(i)));for(i=0;i<n.length;i++){const a=e[i],s=t[i];a>s?o.eq(i).css("height",a):a<s&&n.eq(i).css("height",s)}a&&a.css("height","")}}}))}setScrollerSpacing(e,t){const i=this.option("rtlEnabled");super.setScrollerSpacing(e),this.element().children(`.${this.addWidgetPrefix(y)}`).css({paddingLeft:i?e:"",paddingRight:i?"":e})}isFixedColumns(){const e=this.getFixedColumns();return!0===this.option("columnFixing.legacyMode")&&!!e.length}};t.columnFixingModule={defaultOptions:()=>({columnFixing:{enabled:!1,legacyMode:!1,texts:{fix:s.default.format("dxDataGrid-columnFixingFix"),unfix:s.default.format("dxDataGrid-columnFixingUnfix"),leftPosition:s.default.format("dxDataGrid-columnFixingLeftPosition"),rightPosition:s.default.format("dxDataGrid-columnFixingRightPosition"),stickyPosition:s.default.format("dxDataGrid-columnFixingStickyPosition")},icons:{fix:"fix-column",unfix:"unfix-column",leftPosition:"fix-column-left",rightPosition:"fix-column-right",stickyPosition:"stick-column"}}}),extenders:{views:{columnHeadersView:e=>class extends(A(e)){_getRowVisibleColumns(e){return this._isFixedTableRendering?this.getFixedColumns(e):super._getRowVisibleColumns(e)}getFixedColumnElements(e){const t=this;if(!this._isFixedColumns)return;if((0,g.isDefined)(e))return this._fixedTableElement&&this._getRowElements(this._fixedTableElement).eq(e).children();const i=t.getColumnElements(),n=t.getTransparentColumnElement();if(i&&n&&n.length){var o;const e=E(t.getFixedColumns());[].splice.apply(i,[e,null===(o=n.get(0))||void 0===o?void 0:o.colSpan,n.get(0)])}return i}getColumnWidths(e,t){const i=this;let n;const o=super.getColumnWidths(e,t),a=i.getFixedColumnElements(),s=i.getFixedColumns();return i._fixedTableElement&&(n=a&&a.length?i._getWidths(a):super.getColumnWidths(i._fixedTableElement)),T(s,o,n)}},rowsView:e=>class extends(A(e)){dispose(){super.dispose.apply(this,arguments),clearTimeout(this._fixedScrollTimeout)}optionChanged(e){super.optionChanged(e),"hoverStateEnabled"===e.name&&this._isFixedColumns&&(e.value?this._attachHoverEvents():this._detachHoverEvents())}_detachHoverEvents(){const e=this.element();this._fixedTableElement&&this._tableElement&&o.default.off(e,"mouseover mouseout",".dx-data-row")}_attachHoverEvents(){this._fixedTableElement&&this._tableElement&&o.default.on(this.element(),"mouseover mouseout",".dx-data-row",this.createAction((e=>{const{event:t}=e,i=this.getRowIndex((0,r.default)(t.target).closest(".dx-row")),n="mouseover"===t.type;i>=0&&(this._tableElement&&this._getRowElements(this._tableElement).eq(i).toggleClass(x,n),this._fixedTableElement&&this._getRowElements(this._fixedTableElement).eq(i).toggleClass(x,n))})))}_getScrollDelay(){var e;return(null===(e=this._resizingController)||void 0===e?void 0:e.hasResizeTimeout())?this.option("scrolling.updateTimeout"):l.default.mozilla?60:0}_findContentElement(e){let t,i;const n=this.addWidgetPrefix(C),s=this.element();if(e=this._isFixedTableRendering||e,s&&e){t=s.children(`.${n}`);const e=this.getScrollable();return!t.length&&e&&(t=(0,r.default)("<div>").addClass(n),o.default.on(t,"scroll",(t=>{const{target:n}=t,o=this._getScrollDelay();clearTimeout(this._fixedScrollTimeout),this._fixedScrollTimeout=setTimeout((()=>{i=(0,r.default)(n).scrollTop(),e.scrollTo({y:i})}),o)})),o.default.on(t,a.name,(t=>{const n=(0,r.default)(t.target).closest(".dx-scrollable");let o=!1;if(e&&e.$element().is(n))o=!0;else{const e=n.length&&_.default.getInstance(n.get(0)),t=e&&e.scrollHeight()-e.clientHeight()>0;o=e&&!t}if(o){i=e.scrollTop(),e.scrollTo({y:i-t.delta});const n=e.scrollTop()+e.clientHeight(),o=e.scrollHeight()+this.getScrollbarWidth();if(e.scrollTop()>0&&n<o)return!1}})),t.appendTo(s)),t}return super._findContentElement()}_updateScrollable(){super._updateScrollable();const e=this.getScrollable();if(null!=e&&e._disposed)return;const t=e&&e.scrollOffset().top;this._updateFixedTablePosition(t)}_renderContent(e,t,i){return this._isFixedTableRendering||i?e.empty().addClass(`${this.addWidgetPrefix(C)} ${this.addWidgetPrefix(y)}`).append(t):super._renderContent(e,t)}_getGroupCellOptions(e){return this._isFixedTableRendering?super._getGroupCellOptions((0,d.extend)({},e,{columns:this._columnsController.getVisibleColumns()})):super._getGroupCellOptions(e)}_renderGroupedCells(e,t){return super._renderGroupedCells(e,(0,d.extend)({},t,{columns:this._columnsController.getVisibleColumns()}))}_renderGroupSummaryCells(e,t){this._isFixedTableRendering?super._renderGroupSummaryCells(e,(0,d.extend)({},t,{columns:this._columnsController.getVisibleColumns()})):super._renderGroupSummaryCells(e,t)}_hasAlignByColumnSummaryItems(e,t){const i=super._hasAlignByColumnSummaryItems.apply(this,arguments),n=t.columns[e];return t.isFixed?n.fixed&&(i||"right"===n.fixedPosition):i&&(!this._isFixedColumns||!n.fixed)}_renderGroupSummaryCellsCore(e,t,i,n){let o;if(this._isFixedTableRendering){t.isFixed=!0,o=this._getAlignByColumnCellCount(i,t),t.isFixed=!1;const a=t.columns.length-o;t=(0,d.extend)({},t,{columns:this.getFixedColumns()});const s=E(t.columns);a<s?(o-=t.columns[s].colspan-1||0,i-=t.columns[s].colspan-1||0):n>0&&e.css("visibility","hidden"),n=o}super._renderGroupSummaryCellsCore(e,t,i,n)}_getSummaryCellIndex(e,t){if(this._isFixedTableRendering){const i=E(t);return e>i&&(e+=t[i].colspan-1),e}return super._getSummaryCellIndex.apply(this,arguments)}_renderCore(e){this._detachHoverEvents();const t=super._renderCore(e),i=this._isFixedColumns;return this.element().toggleClass("dx-fixed-columns",i),this.option("hoverStateEnabled")&&i&&this._attachHoverEvents(),t}setAriaOwns(e,t,i){if(i){var n;const i=this.addWidgetPrefix(y),o=null===(n=this.element())||void 0===n?void 0:n.children(`.${i}`),a=this.getFixedTableElement();o.length&&null!=a&&a.length&&this.setAria("owns",`${e??""} ${a.attr("id")??""} ${t??""}`.trim(),o)}else super.setAriaOwns.apply(this,arguments)}toggleDraggableColumnClass(e,t){if(super.toggleDraggableColumnClass(e,t),this.isFixedColumns()){const i=this._getRowElements(this._fixedTableElement);this._toggleDraggableSourceColumnClass(i,this.getFixedColumns(),e,t)}}getCellIndex(e){const t=this._fixedTableElement;let i=0;if(t&&e.is("td")&&e.closest(t).length){const t=this.getFixedColumns();return(0,u.each)(t,((t,n)=>{if(t===e[0].cellIndex)return!1;n.colspan?i+=n.colspan:i++})),i}return super.getCellIndex.apply(this,arguments)}_updateFixedTablePosition(e,t){if(this._fixedTableElement&&this._tableElement){let i;this._fixedTableElement.parent().scrollTop(e),t&&this._editorFactoryController&&(i=this._editorFactoryController.focus(),i&&this._editorFactoryController.focus(i))}}setScrollerSpacing(e,t){const i=this,n={marginBottom:0},o=i.element().children(`.${this.addWidgetPrefix(y)}`);if(o.length&&i._fixedTableElement){o.css(n),i._fixedTableElement.css(n),n[i.option("rtlEnabled")?"marginLeft":"marginRight"]=e,n.marginBottom=t;(i._scrollable&&i._scrollable.option("useNative")?o:i._fixedTableElement).css(n)}}_getElasticScrollTop(e){let t=0;if(e.scrollOffset.top<0)t=-e.scrollOffset.top;else if(e.reachedBottom){const i=(0,r.default)(e.component.content()),n=(0,r.default)(e.component.container()),o=Math.max(i.get(0).clientHeight-n.get(0).clientHeight,0);t=Math.min(o-e.scrollOffset.top,0)}return Math.floor(t)}_applyElasticScrolling(e){if(this._fixedTableElement){const t=this._getElasticScrollTop(e);0!==Math.ceil(t)?(0,n.move)(this._fixedTableElement,{top:t}):this._fixedTableElement.css("transform","")}}_handleScroll(e){this._updateFixedTablePosition(e.scrollOffset.top,!0),this._applyElasticScrolling(e),super._handleScroll(e)}_updateContentPosition(e){super._updateContentPosition.apply(this,arguments),e||this._updateFixedTablePosition(this._scrollTop)}_afterRowPrepared(e){this._isFixedTableRendering||super._afterRowPrepared(e)}_scrollToElement(e,t){const i=this.isFixedColumns()?this.getFixedColumnsOffset():t;super._scrollToElement(e,i)}},footerView:e=>class extends(A(e)){}},controllers:{draggingHeader:e=>class extends e{_generatePointsByColumns(e,t){const i=e.columns,{targetDraggingPanel:n}=e;if(n&&"headers"===n.getName()&&n.isFixedColumns()&&e.sourceColumn.fixed){e.rowIndex||(e.columnElements=n.getFixedColumnElements(0)),e.columns=n.getFixedColumns(e.rowIndex);const o=super._generatePointsByColumns(e,t);return function(e,t,i){const n=E(t),o=e.length-t.length;(0,u.each)(i,((e,t)=>{t.index>n&&(t.columnIndex+=o,t.index+=o)}))}(i,e.columns,o),o}return super._generatePointsByColumns(e,t)}_pointCreated(e,t,i,n){const o=super._pointCreated.apply(this,arguments),a=t[e.columnIndex],s=this._columnHeadersView.getTransparentColumnElement();if(!o&&"headers"===i&&s&&s.length){const t=(0,c.getBoundingRect)(s.get(0));return n&&n.fixed?"right"===n.fixedPosition?e.x<t.right:e.x>t.left:!(!a||!a.fixed||"right"===a.fixedPosition)||(e.x<t.left||e.x>t.right)}return o}},columnsResizer:e=>class extends e{_generatePointsByColumns(e){const t=this,i=t._columnsController,n=i&&t._columnsController.getVisibleColumns(),o=i&&t._columnsController.getFixedColumns(),a=E(o),s=n.length-o.length,r=t._columnHeadersView.getFixedColumnElements();super._generatePointsByColumns(e),r&&r.length>0&&(t._pointsByFixedColumns=f.default.getPointsByColumns(r,(e=>(e.index>a&&(e.columnIndex+=s,e.index+=s),t._pointCreated(e,n.length,n)))))}_getTargetPoint(e,t,i){const n=this._columnHeadersView.getTransparentColumnElement();if(n&&n.length){const e=(0,c.getBoundingRect)(n.get(0));if(t<=e.left||t>=e.right)return super._getTargetPoint(this._pointsByFixedColumns,t,i)}return super._getTargetPoint(e,t,i)}},resizing:e=>class extends e{_setAriaOwns(){var e,t,i;super._setAriaOwns.apply(this,arguments);const n=null===(e=this._columnHeadersView)||void 0===e?void 0:e.getFixedTableElement(),o=null===(t=this._footerView)||void 0===t?void 0:t.getFixedTableElement();null===(i=this._rowsView)||void 0===i||i.setAriaOwns(null==n?void 0:n.attr("id"),null==o?void 0:o.attr("id"),!0)}},keyboardNavigation:e=>class extends e{_toggleInertAttr(e){var t;const i=null===(t=this._rowsView)||void 0===t?void 0:t.getFixedContentElement();e?null==i||i.attr("inert",!0):null==i||i.removeAttr("inert")}},editorFactory:e=>class extends e{getValidationMessageContainer(e){return this._rowsView.isFixedColumns()?this._rowsView.element():super.getValidationMessageContainer(e)}}}}}},88568:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.columnHeadersModule=t.ColumnHeadersView=void 0;var n=g(i(92774)),o=g(i(4671)),a=g(i(64960)),s=g(i(64553)),r=i(52576),l=i(21274),d=i(57653),u=i(11528),c=i(91066),h=i(68491),p=i(48921);function g(e){return e&&e.__esModule?e:{default:e}}const _="text-content",f="dx-header-row",m="dx-visibility-hidden",v="dx-text-content-alignment-",C=function(e,t,i){const n=(0,s.default)("<div>").addClass(e.addWidgetPrefix(_));e.setAria("role","presentation",n),y(e,t,i.column,n);const o=e.option("showColumnLines"),a=e.getController("columns").getHeaderContentAlignment(i.column.alignment);return n[o||"right"===a?"appendTo":"prependTo"](t)};function y(e,t,i,n){const o=e._getIndicatorElements(t,!0),a=e._getIndicatorElements(t),s=o&&o.length,r=e._getColumnAlignment(i.alignment),l=`.${e._getIndicatorClassName("sort")}`,d=`.${e._getIndicatorClassName("sortIndex")}`,u=a.filter(l),c=a.children().filter(d);(n=n||t.children(`.${e.addWidgetPrefix(_)}`)).toggleClass(v+r,s>0).toggleClass(v+("left"===r?"right":"left"),s>0&&"center"===i.alignment).toggleClass("dx-sort-indicator",!!u.length).toggleClass("dx-sort-index-indicator",!!c.length).toggleClass("dx-header-filter-indicator",!!a.filter(`.${e._getIndicatorClassName("headerFilter")}`).length)}class b extends p.ColumnsView{init(){super.init(),this._headerPanelView=this.getView("headerPanel"),this._headerFilterController=this.getController("headerFilter"),this._dataController=this.getController("data")}_createTable(){const e=super._createTable.apply(this,arguments);return n.default.on(e,"mousedown selectstart",this.createAction((e=>{const{event:t}=e;t.shiftKey&&t.preventDefault()}))),e}_isLegacyKeyboardNavigation(){return this.option("useLegacyKeyboardNavigation")}_getDefaultTemplate(e){const t=this;return function(i,n){const{caption:o}=e,a=!e.command||o&&"expand"!==e.command;if("empty"===e.command)t._renderEmptyMessage(i,n);else if(a){C(t,i,n).text(o)}else e.command&&i.html("&nbsp;")}}_renderEmptyMessage(e,t){const i=this._getEmptyHeaderText();if(!i)return void e.html("&nbsp;");const r=C(this,e,t);if(i.includes("{0}")){const[e,t]=i.split("{0}"),l=o.default.format("dxDataGrid-emptyHeaderColumnChooserText"),d=this._columnChooserView,u=(0,s.default)("<a>").text(l).addClass("dx-link");n.default.on(u,"click",this.createAction((()=>d.showColumnChooser()))),r.append(a.default.createTextNode(e)).append(u).append(a.default.createTextNode(t))}else r.text(i)}_getEmptyHeaderText(){const e=!!this._columnChooserView.hasHiddenColumns(),t=!!this._headerPanelView.hasGroupedColumns();switch(!0){case e&&t:return o.default.format("dxDataGrid-emptyHeaderWithColumnChooserAndGroupPanelText");case t:return o.default.format("dxDataGrid-emptyHeaderWithGroupPanelText");case e:return o.default.format("dxDataGrid-emptyHeaderWithColumnChooserText");default:return""}}_getHeaderTemplate(e){return e.headerCellTemplate||{allowRenderToDetachedContainer:!0,render:this._getDefaultTemplate(e)}}_processTemplate(e,t){const i=this;let n;const{column:o}=t,a=super._processTemplate(e);return n="header"===t.rowType&&a&&o.headerCellTemplate&&!o.command?{render(e){const t=C(i,e.container,e.model);a.render((0,r.extend)({},e,{container:t}))}}:a,n}_handleDataChanged(e){"refresh"===e.changeType&&(this._isGroupingChanged||this._requireReady)&&(this._isGroupingChanged=!1,this.render())}_renderCell(e,t){const i=super._renderCell(e,t);return"header"===t.row.rowType&&(i.addClass("dx-cell-focus-disabled"),this._isLegacyKeyboardNavigation()||t.column&&!t.column.type&&i.attr("tabindex",this.option("tabindex")||0)),i}_setCellAriaAttributes(e,t,i){super._setCellAriaAttributes(e,t,i),"header"===t.rowType&&(t.column.type||this.setAria("role","columnheader",e),!t.column||t.column.command||t.column.isBand||(e.attr("id",t.column.headerId),this.setAria("label",`${o.default.format("dxDataGrid-ariaColumn")} ${t.column.caption}`,e)))}_createRow(e){const t=super._createRow.apply(this,arguments);return t.toggleClass("dx-column-lines",this.option("showColumnLines")),"header"===e.rowType&&(t.addClass(f),this._isLegacyKeyboardNavigation()||(0,h.registerKeyboardAction)("columnHeaders",this,t,"td",this._handleActionKeyDown.bind(this))),t}_processHeaderAction(e,t){}_handleActionKeyDown(e){const{event:t}=e,i=(0,s.default)(t.target);if(this._lastActionElement=t.target,i.is(".dx-header-filter")){const e=this._headerFilterController,t=i.closest("td"),n=this.getColumnIndexByElement(t);n>=0&&e.showHeaderFilterMenu(n,!1)}else{const e=i.closest(".dx-row");this._processHeaderAction(t,e)}t.preventDefault()}_renderCore(){const e=this,t=e.element(),i={};if(e._tableElement&&!e._dataController.isLoaded()&&!e._hasRowElements)return;t.addClass(e.addWidgetPrefix("headers")).toggleClass(e.addWidgetPrefix("nowrap"),!e.option("wordWrapEnabled")).empty(),e.setAria("role","presentation",t);const n=e._updateContent(e._renderTable({change:i}),i);return t.toggleClass("dx-header-multi-row",e.getRowCount()>1),super._renderCore.apply(e,arguments),n}_renderRows(){const e=this;(e._dataController.isLoaded()||e._hasRowElements)&&(super._renderRows.apply(e,arguments),e._hasRowElements=!0)}_renderRow(e,t){const i=1===this.getRowCount()?null:t.row.rowIndex;t.columns=this.getColumns(i),super._renderRow(e,t)}_createCell(e){const{column:t}=e,i=super._createCell.apply(this,arguments);return t.rowspan>1&&"header"===e.rowType&&i.attr("rowSpan",t.rowspan),i}_getRows(){const e=[],t=this.getRowCount();if(this.option("showColumnHeaders"))for(let i=0;i<t;i++)e.push({rowType:"header",rowIndex:i});return e}_getCellTemplate(e){if("header"===e.rowType)return this._getHeaderTemplate(e.column)}_columnOptionChanged(e){const{changeTypes:t}=e,{optionNames:i}=e;t.grouping||t.groupExpanding?t.grouping&&(this._isGroupingChanged=!0):(super._columnOptionChanged(e),(i.width||i.visible)&&this.resizeCompleted.fire())}_isElementVisible(e){return e&&e.visible}_alignCaptionByCenter(e){let t=this._getIndicatorContainer(e,!0);t&&t.length&&(t.filter(`.${m}`).remove(),t=this._getIndicatorContainer(e),t.clone().addClass(m).css("float","").insertBefore(e.children(`.${this.addWidgetPrefix(_)}`)))}_updateCell(e,t){"header"===t.rowType&&"center"===t.column.alignment&&this._alignCaptionByCenter(e),super._updateCell.apply(this,arguments)}_updateIndicator(e,t,i){const n=super._updateIndicator.apply(this,arguments);return"center"===t.alignment&&this._alignCaptionByCenter(e),y(this,e,t),n}_getIndicatorContainer(e,t){const i=super._getIndicatorContainer(e);return t?i:i.filter(`:not(.${m})`)}_isSortableElement(e){return!0}getHeadersRowHeight(){const e=this.getTableElement(),t=e&&e.find(`.${f}`);return t&&t.toArray().reduce(((e,t)=>e+(0,d.getHeight)(t)),0)||0}getHeaderElement(e){const t=this.getColumnElements();return(null==t?void 0:t.eq(e))??(0,s.default)("")}getColumnElements(e,t){const i=this;let n;const o=i._columnsController,a=i.getRowCount();if(i.option("showColumnHeaders")){if(a>1&&(!(0,u.isDefined)(e)||(0,u.isDefined)(t))){const a=[],r=(0,u.isDefined)(t)?o.getChildrenByBandColumn(t,!0):o.getVisibleColumns();return(0,l.each)(r,((t,s)=>{const r=(0,u.isDefined)(e)?e:o.getRowIndex(s.index);n=i._getCellElement(r,o.getVisibleIndex(s.index,r)),n&&a.push(n.get(0))})),(0,s.default)(a)}if(!e||e<a)return i.getCellElements(e||0)}}getColumnIndexByElement(e){const t=this.getCellIndex(e),i=e.closest(".dx-row"),{rowIndex:n}=i[0],o=this.getColumns(n)[t];return o?o.index:-1}getVisibleColumnIndex(e,t){const i=this.getColumns()[e];return i?this._columnsController.getVisibleIndex(i.index,t):-1}getColumnWidths(e,t){const i=this.getColumnElements(t);return i&&i.length?this._getWidths(i):super.getColumnWidths.apply(this,arguments)}allowDragging(e){const t=e&&this._columnsController.getRowIndex(e.index),i=this.getColumns(t);return(this.option("allowColumnReordering")??this._columnsController.isColumnOptionUsed("allowReordering"))&&e.allowReordering&&i.length>1}getBoundingRect(){const e=this,t=e.getColumnElements();if(t&&t.length){return{top:e.getTableElement().offset().top}}return null}getName(){return"headers"}getColumnCount(){const e=this.getColumnElements();return e?e.length:0}isVisible(){return this.option("showColumnHeaders")}optionChanged(e){const t=this;switch(e.name){case"showColumnHeaders":case"wordWrapEnabled":case"showColumnLines":t._invalidate(!0,!0),e.handled=!0;break;default:super.optionChanged(e)}}getHeight(){return this.getElementHeight()}getContextMenuItems(e){const t=this,{column:i}=e;if(e.row&&("header"===e.row.rowType||"detailAdaptive"===e.row.rowType)){const e=t.option("sorting");if(e&&"none"!==e.mode&&i&&i.allowSorting){const n=function(e){setTimeout((()=>{t._columnsController.changeSortOrder(i.index,e.itemData.value)}))};return[{text:e.ascendingText,value:"asc",disabled:"asc"===i.sortOrder,icon:"context-menu-sort-asc",onItemClick:n},{text:e.descendingText,value:"desc",disabled:"desc"===i.sortOrder,icon:"context-menu-sort-desc",onItemClick:n},{text:e.clearText,value:"none",disabled:!i.sortOrder,icon:"context-menu-sort-none",onItemClick:n}]}}}getRowCount(){return this._columnsController&&this._columnsController.getRowCount()}toggleDraggableColumnClass(e,t,i){let n,o;const a=this.getRowCount(),s=this._columnsController.getColumns(),r=s&&s[e],l=r&&r.isBand&&r.index,d=(e,i)=>{e.ownerBand===l&&(o.eq(i).toggleClass(this.addWidgetPrefix(c.CLASSES.draggableColumn),t),e.isBand&&this.toggleDraggableColumnClass(e.index,t,n+1))};if((0,u.isDefined)(l))for(n=i=i||0;n<a;n++)if(o=this.getCellElements(n),o){this.getColumns(n).forEach(d)}}}t.ColumnHeadersView=b;t.columnHeadersModule={defaultOptions:()=>({showColumnHeaders:!0,cellHintEnabled:!0}),views:{columnHeadersView:b}}},96790:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ColumnStateMixin=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(52576),s=i(41639);const r="dx-column-indicators",l=e=>class extends e{_applyColumnState(e){var t;const i=this,n=this.option("rtlEnabled"),s=i._getColumnAlignment(e.column.alignment,n),r=(0,a.extend)(!0,{columnAlignment:s},e),l=r.rootElement.hasClass("dx-group-panel-item"),d=i._createIndicatorContainer(r,l),u=(0,o.default)("<span>").addClass(i._getIndicatorClassName(e.name)),c=null===(t=i.component)||void 0===t?void 0:t.getController("columns"),h=(null==c?void 0:c.getHeaderContentAlignment(s))||s;return r.container=d,r.indicator=u,i._renderIndicator(r),d[!l&&e.showColumnLines||"left"!==h?"prependTo":"appendTo"](e.rootElement),u}_getIndicatorClassName(e){}_getColumnAlignment(e,t){return t=t||this.option("rtlEnabled"),e&&"center"!==e?e:(0,s.getDefaultAlignment)(t)}_createIndicatorContainer(e,t){let i=this._getIndicatorContainer(e.rootElement);const n="left"===e.columnAlignment?"right":"left";return i.length||(i=(0,o.default)("<div>").addClass(r)),this.setAria("role","presentation",i),i.css("float",e.showColumnLines&&!t?n:null)}_getIndicatorContainer(e){return e&&e.find(`.${r}`)}_getIndicatorElements(e){const t=this._getIndicatorContainer(e);return t&&t.children()}_renderIndicator(e){const t=e.container,i=e.indicator;t&&i&&t.append(i)}_updateIndicators(e){const t=this,i=t.getColumns(),n=t.getColumnElements();let o;if(n&&i.length===n.length)for(let a=0;a<i.length;a++){o=n.eq(a),t._updateIndicator(o,i[a],e);const s=o.parent().data("options");s&&s.cells&&(s.cells[o.index()].column=i[a])}}_updateIndicator(e,t,i){if(!t.command)return this._applyColumnState({name:i,rootElement:e,column:t,showColumnLines:this.option("showColumnLines")})}};t.ColumnStateMixin=l;t.default=l},48795:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.USER_STATE_FIELD_NAMES_15_1=t.USER_STATE_FIELD_NAMES=t.MAX_SAFE_INTEGER=t.IGNORE_COLUMN_OPTION_NAMES=t.GROUP_LOCATION=t.GROUP_COMMAND_COLUMN_NAME=t.DETAIL_COMMAND_COLUMN_NAME=t.DEFAULT_COLUMN_OPTIONS=t.DATATYPE_OPERATIONS=t.COMMAND_EXPAND_CLASS=t.COLUMN_OPTION_REGEXP=t.COLUMN_INDEX_OPTIONS=t.COLUMN_CHOOSER_LOCATION=void 0;const i=t.USER_STATE_FIELD_NAMES_15_1=["filterValues","filterType","fixed","fixedPosition"];t.USER_STATE_FIELD_NAMES=["visibleIndex","dataField","name","dataType","width","visible","sortOrder","lastSortOrder","sortIndex","groupIndex","filterValue","bufferedFilterValue","selectedFilterOperation","bufferedSelectedFilterOperation","added"].concat(i),t.IGNORE_COLUMN_OPTION_NAMES={visibleWidth:!0,bestFitWidth:!0,bufferedFilterValue:!0},t.COMMAND_EXPAND_CLASS="dx-command-expand",t.MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991,t.GROUP_COMMAND_COLUMN_NAME="groupExpand",t.DETAIL_COMMAND_COLUMN_NAME="detailExpand",t.COLUMN_OPTION_REGEXP=/columns\[(\d+)\]\.?/gi,t.DEFAULT_COLUMN_OPTIONS={visible:!0,showInColumnChooser:!0},t.DATATYPE_OPERATIONS={number:["=","<>","<",">","<=",">=","between"],string:["contains","notcontains","startswith","endswith","=","<>"],date:["=","<>","<",">","<=",">=","between"],datetime:["=","<>","<",">","<=",">=","between"]},t.COLUMN_INDEX_OPTIONS={visibleIndex:!0,groupIndex:!0,grouped:!0,sortIndex:!0,sortOrder:!0},t.GROUP_LOCATION="group",t.COLUMN_CHOOSER_LOCATION="columnChooser"},17798:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.columnsControllerModule=t.ColumnsController=void 0;var n=I(i(38662)),o=I(i(4671)),a=i(68216),s=i(97169),r=I(i(66636)),l=I(i(64553)),d=I(i(84718)),u=i(31e3),c=i(87739),h=i(52576),p=i(21274),g=i(22263),_=i(11528),f=I(i(40216)),m=I(i(77735)),v=I(i(56417)),C=I(i(35185)),y=I(i(66122)),b=I(i(74854)),x=I(i(53226)),w=i(87396),S=i(48795),D=i(63904);function I(e){return e&&e.__esModule?e:{default:e}}function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},E.apply(null,arguments)}class T extends b.default.Controller{init(e){this._dataController=this.getController("data"),this._focusController=this.getController("focus"),this._stateStoringController=this.getController("stateStoring");const t=this.option("columns");this._commandColumns=this._commandColumns||[],this._columns=this._columns||[],this._isColumnsFromOptions=!!t,this._isColumnsFromOptions?((0,D.assignColumns)(this,t?(0,D.createColumnsFromOptions)(this,t):[]),(0,D.applyUserState)(this)):(0,D.assignColumns)(this,this._columnsUserState?(0,D.createColumnsFromOptions)(this,this._columnsUserState):this._columns),(0,D.addExpandColumn)(this),this._dataSourceApplied?this.applyDataSource(this._dataSource,!0,e):(0,D.updateIndexes)(this),this._checkColumns()}_getExpandColumnOptions(){return{type:"expand",command:"expand",width:"auto",cssClass:S.COMMAND_EXPAND_CLASS,allowEditing:!1,allowGrouping:!1,allowSorting:!1,allowResizing:!1,allowReordering:!1,allowHiding:!1}}_getFirstItems(e){let t,i=[];const n=function(e,t){if(!e||!t)return e;for(let i=0;i<e.length;i++){const o=n(e[i].items||e[i].collapsedItems,t-1);if(o&&o.length)return o}};return e&&e.items().length>0&&(t=x.default.normalizeSortingInfo(e.group()).length,i=n(e.items(),t)||[]),i}_endUpdateCore(){!this._skipProcessingColumnsChange&&(0,D.fireColumnsChanged)(this)}callbackNames(){return["columnsChanged"]}getColumnByPath(e,t){const i=this;let n;const o=[];return e.replace(S.COLUMN_OPTION_REGEXP,((e,t)=>(o.push(parseInt(t)),""))),o.length&&(n=t?o.reduce(((e,t)=>e&&e.columns&&e.columns[t]),{columns:t}):(0,D.getColumnByIndexes)(i,o)),n}optionChanged(e){let t;switch(e.name){case"adaptColumnWidthByRatio":e.handled=!0;break;case"dataSource":e.value===e.previousValue||this.option("columns")||Array.isArray(e.value)&&Array.isArray(e.previousValue)||(this._columns=[]);break;case"columns":t=this._skipProcessingColumnsChange,e.handled=!0,this._skipProcessingColumnsChange||(e.name===e.fullName?(this._columnsUserState=null,this._ignoreColumnOptionNames=null,this.init()):(this._columnOptionChanged(e),t=!0)),t&&this._updateRequireResize(e);break;case"commonColumnSettings":case"columnAutoWidth":case"allowColumnResizing":case"allowColumnReordering":case"columnFixing":case"grouping":case"groupPanel":case"regenerateColumnsByVisibleItems":case"customizeColumns":case"columnHidingEnabled":case"dateSerializationFormat":case"columnResizingMode":case"columnMinWidth":case"columnWidth":{e.handled=!0;const t="columnWidth"===e.fullName&&["width"];this.reinit(t);break}case"rtlEnabled":this.reinit();break;default:super.optionChanged(e)}}_columnOptionChanged(e){let t={};const i=this.getColumnByPath(e.fullName),n=e.fullName.replace(S.COLUMN_OPTION_REGEXP,"");i&&(n?t[n]=e.value:t=e.value,this._skipProcessingColumnsChange=e.fullName,this.columnOption(i.index,t),this._skipProcessingColumnsChange=!1)}_updateRequireResize(e){const{component:t}=this;"width"===e.fullName.replace(S.COLUMN_OPTION_REGEXP,"")&&t._updateLockCount&&(t._requireResize=!0)}publicMethods(){return["addColumn","deleteColumn","columnOption","columnCount","clearSorting","clearGrouping","getVisibleColumns","getVisibleColumnIndex"]}applyDataSource(e,t,i){const n=this,o=e&&e.isLoaded();if(n._dataSource=e,!n._dataSourceApplied||0===n._dataSourceColumnsCount||t||n.option("regenerateColumnsByVisibleItems")){if(o){if(!n._isColumnsFromOptions){const t=(0,D.createColumnsFromDataSource)(n,e);t.length&&((0,D.assignColumns)(n,t),n._dataSourceColumnsCount=n._columns.length,(0,D.applyUserState)(n))}return n.updateColumns(e,t,i)}n._dataSourceApplied=!1,(0,D.updateIndexes)(n)}else if(o&&!n.isAllDataTypesDefined(!0)&&n.updateColumnDataTypes(e))return(0,D.updateColumnChanges)(n,"columns"),(0,D.fireColumnsChanged)(n),(new c.Deferred).reject().promise()}reset(){this._dataSource=null,this._dataSourceApplied=!1,this._dataSourceColumnsCount=void 0,this.reinit()}resetColumnsCache(){const e=this;e._visibleColumns=void 0,e._fixedColumns=void 0,e._rowCount=void 0,(0,D.resetBandColumnsCache)(e)}reinit(e){this._columnsUserState=this.getUserState(),this._ignoreColumnOptionNames=e||null,this.init(),e&&(this._ignoreColumnOptionNames=null)}isInitialized(){return!!this._columns.length||!!this.option("columns")}isDataSourceApplied(){return this._dataSourceApplied}getCommonSettings(e){const t=(!e||!e.type)&&this.option("commonColumnSettings")||{},i=this.option("grouping")??{},n=this.option("groupPanel")??{};return(0,h.extend)({allowFixing:this.option("columnFixing.enabled"),allowResizing:this.option("allowColumnResizing")||void 0,allowReordering:this.option("allowColumnReordering"),minWidth:this.option("columnMinWidth"),width:this.option("columnWidth"),autoExpandGroup:i.autoExpandAll,allowCollapsing:i.allowCollapsing,allowGrouping:n.allowColumnDragging&&n.visible||i.contextMenuEnabled},t)}isColumnOptionUsed(e){for(let t=0;t<this._columns.length;t++)if(this._columns[t][e])return!0}isAllDataTypesDefined(e){const t=this._columns;if(!t.length)return!1;for(let i=0;i<t.length;i++)if((t[i].dataField||t[i].calculateCellValue!==t[i].defaultCalculateCellValue)&&(!t[i].dataType||e&&t[i].deserializeValue&&void 0===t[i].serializationFormat))return!1;return!0}getColumns(){return this._columns}isBandColumnsUsed(){return this.getColumns().some((e=>e.isBand))}getGroupColumns(){const e=[];return(0,p.each)(this._columns,(function(){const t=this;(0,_.isDefined)(t.groupIndex)&&(e[t.groupIndex]=t)})),e}_shouldReturnVisibleColumns(){return!0}_compileVisibleColumns(e){return this._visibleColumns=this._visibleColumns||this._compileVisibleColumnsCore(),e=(0,_.isDefined)(e)?e:this._visibleColumns.length-1,this._visibleColumns[e]||[]}getVisibleColumns(e,t){return this._shouldReturnVisibleColumns()?this._compileVisibleColumns.apply(this,arguments):[]}getFixedColumns(e){return this._fixedColumns=this._fixedColumns||this._getFixedColumnsCore(),e=(0,_.isDefined)(e)?e:this._fixedColumns.length-1,this._fixedColumns[e]||[]}getFilteringColumns(){return this.getColumns().filter((e=>(e.dataField||e.name)&&(e.allowFiltering||e.allowHeaderFiltering))).map((e=>{const t=(0,h.extend)(!0,{},e);return(0,_.isDefined)(t.dataField)||(t.dataField=t.name),t.filterOperations=e.filterOperations!==e.defaultFilterOperations?t.filterOperations:null,t}))}getColumnIndexOffset(){return 0}getStickyColumns(e){return this.getVisibleColumns(e,!0).filter((e=>e.fixed))}_getFixedColumnsCore(){const e=this,t=[],i=e.getRowCount(),n={command:"transparent"};let o,a,s,r=0;if(e._isColumnFixing())for(let l=0;l<=i;l++){o=0,s=null,a=null;const i=e.getVisibleColumns(l,!0);for(let t=0;t<i.length;t++){const n=i[t-1],d=i[t];d.fixed&&d.fixedPosition!==w.StickyPosition.Sticky?n&&n.fixed&&(0,D.getFixedPosition)(e,n)!==(0,D.getFixedPosition)(e,d)?(0,_.isDefined)(a)||(a=t):s=d.fixedPosition:(0===l&&(d.isBand&&d.colspan?r+=d.colspan:r++),o++,(0,_.isDefined)(a)||(a=t))}if(0===l&&(0===o||o>=i.length))return[];(0,_.isDefined)(a)||(a="right"===s?0:i.length),t[l]=i.slice(0),n.colspan||(n.colspan=r),t[l].splice(a,o,n)}return t.map((e=>e.map((e=>{const t=E({},e);return t.headerId&&(t.headerId+="-fixed"),t}))))}_isColumnFixing(){let e=this.option("columnFixing.enabled");return!e&&(0,p.each)(this._columns,((t,i)=>{if(i.fixed)return e=!0,!1})),e}_getExpandColumnsCore(){return this.getGroupColumns()}getExpandColumns(){let e,t=this._getExpandColumnsCore();const i=t.filter((e=>0===e.groupIndex))[0],n=i&&i.fixed,o=this._isColumnFixing(),a=this.option("rtlEnabled");return t.length&&(e=this.columnOption("command:expand")),t=(0,p.map)(t,(t=>(0,h.extend)({},t,{visibleWidth:null,minWidth:null,cellTemplate:(0,_.isDefined)(t.groupIndex)?null:t.cellTemplate,headerCellTemplate:null,fixed:!(!(0,_.isDefined)(t.groupIndex)||!n)||o,fixedPosition:a?"right":"left"},e,{index:t.index,type:t.type||S.GROUP_COMMAND_COLUMN_NAME}))),t}getBandColumnsCache(){if(!this._bandColumnsCache){const e=this._columns,t={},i={};let n=!0;e.forEach((o=>{const{ownerBand:a}=o;let s=(0,_.isObject)(a)?a.index:a;const r=e[s];o.hasColumns&&(n=!1),o.colspan&&(o.colspan=void 0),o.rowspan&&(o.rowspan=void 0),r?i[o.index]=r:s=-1,t[s]=t[s]||[],t[s].push(o)})),this._bandColumnsCache={isPlain:n,columnChildrenByIndex:t,columnParentByIndex:i}}return this._bandColumnsCache}_isColumnVisible(e){return e.visible&&this.isParentColumnVisible(e.index)}_isColumnInGroupPanel(e){return(0,_.isDefined)(e.groupIndex)&&!e.showWhenGrouped}hasVisibleDataColumns(){return this._columns.some((e=>{const t=this._isColumnVisible(e),i=this._isColumnInGroupPanel(e),n=!!e.command;return t&&!i&&!n}))}_compileVisibleColumnsCore(){const e=this.getBandColumnsCache(),t=(0,D.mergeColumns)(this,this._columns,this._commandColumns,!0);(0,D.processBandColumns)(this,t,e);const i=this._getIndexedColumns(t),n=this._getVisibleColumnsFromIndexed(i);return!this.hasVisibleDataColumns()&&this._columns.length&&n[n.length-1].push({command:"empty"}),n}_getIndexedColumns(e){const t=this.option("rtlEnabled"),i=this.getRowCount(),n=(0,D.digitsCount)(e.length),o=this.getBandColumnsCache(),a=[],s=[];for(let e=0;e<i;e+=1)s[e]=[{}],a[e]=[{},{},{}];return e.forEach((e=>{let i,{visibleIndex:r}=e;const l=(0,D.getParentBandColumns)(e.index,o.columnParentByIndex),d=this._isColumnVisible(e),u=this._isColumnInGroupPanel(e);if(d&&!u){const o=l.length;var c,h;if(r<0)r=-r,i=s[o];else if(e.fixed=(null===(c=l[0])||void 0===c?void 0:c.fixed)??e.fixed,e.fixedPosition=(null===(h=l[0])||void 0===h?void 0:h.fixedPosition)??e.fixedPosition,e.fixed&&e.fixedPosition!==w.StickyPosition.Sticky){const n=!!e.command&&!x.default.isCustomCommandColumn(this._columns,e);let s="right"===e.fixedPosition;t&&!n&&(s=!s),i=s?a[o][2]:a[o][0]}else i=a[o][1];if(l.length){r=(0,D.numberToString)(r,n);for(let e=l.length-1;e>=0;e-=1)r=(0,D.numberToString)(l[e].visibleIndex,n)+r}i[r]=i[r]||[],i[r].push(e)}})),{positiveIndexedColumns:a,negativeIndexedColumns:s}}_getVisibleColumnsFromIndexed(e){let{positiveIndexedColumns:t,negativeIndexedColumns:i}=e;const n=[],o=this.getRowCount(),a=(0,D.mergeColumns)(this,this.getExpandColumns(),this._columns);let s=0,r=0;for(let e=0;e<o;e+=1){n.push([]),(0,g.orderEach)(i[e],((t,i)=>{n[e].unshift.apply(n[e],i)}));const o=n[e].length;t[e].forEach((t=>{(0,g.orderEach)(t,((t,i)=>{n[e].push.apply(n[e],i)}))})),r<=e&&(r+=D.processExpandColumns.call(this,n[e],a,S.DETAIL_COMMAND_COLUMN_NAME,o)),s<=e&&(s+=D.processExpandColumns.call(this,n[e],a,S.GROUP_COMMAND_COLUMN_NAME,o))}return n.push((0,D.getDataColumns)(n)),n}getInvisibleColumns(e,t){const i=this;let n,o=[];return e=e||i._columns,(0,p.each)(e,((e,a)=>{if(a.ownerBand===t)return a.isBand?(n=a.visible?i.getInvisibleColumns(i.getChildrenByBandColumn(a.index),a.index):i.getChildrenByBandColumn(a.index),void(n.length&&(o.push(a),o=o.concat(n)))):void(a.visible||o.push(a))})),o}getChooserColumns(e){const t=(e?this.getColumns():this.getInvisibleColumns()).filter((e=>e.showInColumnChooser)),i=this.option("columnChooser.sortOrder");return(0,D.sortColumns)(t,i)}allowMoveColumn(e,t,i,n){const o=(0,D.getColumnIndexByVisibleIndex)(this,e,i),a=this._columns[o];return!(!a||!(a.allowReordering||a.allowGrouping||a.allowHiding))&&(i===n?i!==S.COLUMN_CHOOSER_LOCATION&&((e=(0,_.isObject)(e)?e.columnIndex:e)!==(t=(0,_.isObject)(t)?t.columnIndex:t)&&e+1!==t):i===S.GROUP_LOCATION&&n!==S.COLUMN_CHOOSER_LOCATION||n===S.GROUP_LOCATION?a&&a.allowGrouping:i!==S.COLUMN_CHOOSER_LOCATION&&n!==S.COLUMN_CHOOSER_LOCATION||a&&a.allowHiding)}moveColumn(e,t,i,n){const o=this,a={};let s;const r=(0,D.getColumnIndexByVisibleIndex)(o,e,i),l=(0,D.getColumnIndexByVisibleIndex)(o,t,n);let d;if(r>=0){const e=o._columns[r];if(t=(0,_.isObject)(t)?t.columnIndex:t,d=l>=0?o._columns[l].groupIndex:-1,(0,_.isDefined)(e.groupIndex)&&i===S.GROUP_LOCATION&&(d>e.groupIndex&&d--,n!==S.GROUP_LOCATION?a.groupIndex=void 0:(s=e.groupIndex,delete e.groupIndex,(0,D.updateColumnGroupIndexes)(o))),n===S.GROUP_LOCATION)a.groupIndex=(0,D.moveColumnToGroup)(o,e,d),e.groupIndex=s;else if(t>=0){const t=o._columns[l];t&&e.ownerBand===t.ownerBand?(0,D.isColumnFixed)(o,e)^(0,D.isColumnFixed)(o,t)?a.visibleIndex=S.MAX_SAFE_INTEGER:a.visibleIndex=t.visibleIndex:a.visibleIndex=S.MAX_SAFE_INTEGER}const u=n!==S.COLUMN_CHOOSER_LOCATION;e.visible!==u&&(a.visible=u),o.columnOption(e.index,a)}}changeSortOrder(e,t){const i=this,n={},o=i.option("sorting"),a=o&&o.mode,s="single"===a||!t,r="single"===a||"multiple"===a,l=i._columns[e];r&&l&&l.allowSorting&&(s&&!(0,_.isDefined)(l.groupIndex)&&(0,p.each)(i._columns,(function(t){t!==e&&this.sortOrder&&((0,_.isDefined)(this.groupIndex)||delete this.sortOrder,delete this.sortIndex)})),(0,D.isSortOrderValid)(t)?l.sortOrder!==t&&(n.sortOrder=t):"none"===t?l.sortOrder&&(n.sortIndex=void 0,n.sortOrder=void 0):function(e){if("ctrl"===t){if(!("sortOrder"in e)||!("sortIndex"in e))return!1;n.sortOrder=void 0,n.sortIndex=void 0}else(0,_.isDefined)(e.groupIndex)||(0,_.isDefined)(e.sortIndex)?n.sortOrder="desc"===e.sortOrder?"asc":"desc":n.sortOrder="asc"}(l)),i.columnOption(l.index,n)}getSortDataSourceParameters(e){const t=[],i=[];return(0,p.each)(this._columns,(function(){(this.dataField||this.selector||this.calculateCellValue)&&(0,_.isDefined)(this.sortIndex)&&!(0,_.isDefined)(this.groupIndex)&&(t[this.sortIndex]=this)})),(0,p.each)(t,(function(){const t=this&&this.sortOrder;if((0,D.isSortOrderValid)(t)){const t={selector:this.calculateSortValue||this.displayField||this.calculateDisplayValue||e&&this.selector||this.dataField||this.calculateCellValue,desc:"desc"===this.sortOrder};this.sortingMethod&&(t.compare=this.sortingMethod.bind(this)),i.push(t)}})),i.length>0?i:null}getGroupDataSourceParameters(e){const t=[];return(0,p.each)(this.getGroupColumns(),(function(){const i=this.calculateGroupValue||this.displayField||this.calculateDisplayValue||e&&this.selector||this.dataField||this.calculateCellValue;if(i){const e={selector:i,desc:"desc"===this.sortOrder,isExpanded:!!this.autoExpandGroup};this.sortingMethod&&(e.compare=this.sortingMethod.bind(this)),t.push(e)}})),t.length>0?t:null}refresh(e){const t=[];return(0,p.each)(this._columns,(function(){const{lookup:i}=this;if(i&&!this.calculateDisplayValue){if(e&&i.valueMap)return;i.update&&t.push(i.update())}})),c.when.apply(l.default,t).done(D.resetColumnsCache.bind(null,this))}_updateColumnOptions(e,t){var i,n;const o=this._reinitAfterLookupChanges&&(null===(i=this._previousColumns)||void 0===i?void 0:i[t]);e.selector=e.selector??(t=>e.calculateCellValue(t)),e.selector.columnIndex=t,e.selector.originalCallback=o?(null===(n=this._previousColumns[t].selector)||void 0===n?void 0:n.originalCallback)??e.selector:e.selector,(0,p.each)(["calculateSortValue","calculateGroupValue","calculateDisplayValue"],((i,n)=>{const o=e[n];if((0,_.isFunction)(o))if(o.originalCallback)e[n].context.column=e;else{const i={column:e};e[n]=function(e){return o.call(i.column,e)},e[n].originalCallback=o,e[n].columnIndex=t,e[n].context=i}})),(0,_.isString)(e.calculateDisplayValue)&&(e.displayField=e.calculateDisplayValue,e.calculateDisplayValue=(0,u.compileGetter)(e.displayField)),e.calculateDisplayValue&&(e.displayValueMap=e.displayValueMap||{}),(0,D.updateSerializers)(e,e.dataType);const{lookup:a}=e;a&&(0,D.updateSerializers)(a,a.dataType);const s=a?a.dataType:e.dataType;s&&(e.alignment=e.alignment||(0,D.getAlignmentByDataType)(s,this.option("rtlEnabled")),e.format=e.format||x.default.getFormatByDataType(s),e.customizeText=e.customizeText||(0,D.getCustomizeTextByDataType)(s),e.defaultFilterOperations=e.defaultFilterOperations||!a&&S.DATATYPE_OPERATIONS[s]||[],(0,_.isDefined)(e.filterOperations)||(0,D.setFilterOperationsAsDefaultValues)(e),e.defaultFilterOperation=e.filterOperations&&e.filterOperations[0]||"=",e.showEditorAlways=(0,_.isDefined)(e.showEditorAlways)?e.showEditorAlways:"boolean"===s&&!e.cellTemplate&&!e.lookup)}updateColumnDataTypes(e){const t=this,i=t.option("dateSerializationFormat"),n=t._getFirstItems(e);let o=!1;return(0,p.each)(t._columns,((e,a)=>{let s,r,l,d,u;const{lookup:c}=a;if(x.default.isDateType(a.dataType)&&void 0===a.serializationFormat&&(a.serializationFormat=i),c&&x.default.isDateType(c.dataType)&&void 0===a.serializationFormat&&(c.serializationFormat=i),a.calculateCellValue&&n.length){if(!a.dataType||c&&!c.dataType){for(s=0;s<n.length;s++)r=a.calculateCellValue(n[s]),a.dataType||(u=(0,D.getValueDataType)(r),l=l||u,l&&u&&l!==u&&(l="string")),c&&!c.dataType&&(u=(0,D.getValueDataType)(x.default.getDisplayValue(a,r,n[s])),d=d||u,d&&u&&d!==u&&(d="string"));(l||d)&&(l&&(a.dataType=l),c&&d&&(c.dataType=d),o=!0)}if(void 0===a.serializationFormat||c&&void 0===c.serializationFormat)for(s=0;s<n.length;s++)r=a.calculateCellValue(n[s],!0),void 0===a.serializationFormat&&(a.serializationFormat=(0,D.getSerializationFormat)(a.dataType,r)),c&&void 0===c.serializationFormat&&(c.serializationFormat=(0,D.getSerializationFormat)(c.dataType,c.calculateCellValue(r,!0)))}t._updateColumnOptions(a,e)})),o}_customizeColumns(e){const t=this,i=t.option("customizeColumns");if(i){e.some((e=>(0,_.isObject)(e.ownerBand)))&&(0,D.updateIndexes)(t),i(e),(0,D.assignColumns)(t,(0,D.createColumnsFromOptions)(t,e))}}updateColumns(e,t,i){if(t||this.updateSortingGrouping(e),!e||e.isLoaded()){const t=e?e.sort()||[]:this.getSortDataSourceParameters(),n=e?e.group()||[]:this.getGroupDataSourceParameters(),o=null==e?void 0:e.lastLoadOptions().filter;i||this._customizeColumns(this._columns),(0,D.updateIndexes)(this);const a=this._columns;return(0,c.when)(this.refresh(!0)).always((()=>{this._columns===a&&(this._updateChanges(e,{sorting:t,grouping:n,filtering:o}),(0,D.fireColumnsChanged)(this))}))}}_updateChanges(e,t){e&&(this.updateColumnDataTypes(e),this._dataSourceApplied=!0),x.default.equalSortParameters(t.sorting,this.getSortDataSourceParameters())||(0,D.updateColumnChanges)(this,"sorting"),x.default.equalSortParameters(t.grouping,this.getGroupDataSourceParameters())||(0,D.updateColumnChanges)(this,"grouping"),this._dataController&&!x.default.equalFilterParameters(t.filtering,this._dataController.getCombinedFilter())&&(0,D.updateColumnChanges)(this,"filtering"),(0,D.updateColumnChanges)(this,"columns")}updateSortingGrouping(e,t){const i=this;let n,o;const a=function(e,i,n){(0,p.each)(e,((e,o)=>{if(delete o[n],i)for(let e=0;e<i.length;e++){const{selector:a}=i[e],{isExpanded:s}=i[e];if(a===o.dataField||a===o.name||a===o.displayField||a===o.selector||a===o.calculateCellValue||a===o.calculateGroupValue||a===o.calculateDisplayValue){o.sortOrder=t?"sortOrder"in o?o.sortOrder:i[e].desc?"desc":"asc":o.sortOrder||(i[e].desc?"desc":"asc"),void 0!==s&&(o.autoExpandGroup=s),o[n]=e;break}}}))};if(e){n=x.default.normalizeSortingInfo(e.sort());const s=x.default.normalizeSortingInfo(e.group()),r=i.getGroupDataSourceParameters(),l=i.getSortDataSourceParameters(),d=!x.default.equalSortParameters(s,r,!0),u=!d&&!x.default.equalSortParameters(s,r);i._columns.length||((0,p.each)(s,((e,t)=>{i._columns.push(t.selector)})),(0,p.each)(n,((e,t)=>{(0,_.isFunction)(t.selector)||i._columns.push(t.selector)})),(0,D.assignColumns)(i,(0,D.createColumnsFromOptions)(i,i._columns))),!t&&(r||i._hasUserState)||!d&&!u||(a(i._columns,s,"groupIndex"),t&&(d&&(0,D.updateColumnChanges)(i,"grouping"),u&&(0,D.updateColumnChanges)(i,"groupExpanding"),o=!0)),!t&&(l||i._hasUserState)||x.default.equalSortParameters(n,l)||(a(i._columns,n,"sortIndex"),t&&((0,D.updateColumnChanges)(i,"sorting"),o=!0)),o&&(0,D.fireColumnsChanged)(i)}}updateFilter(e,t,i,n){const o=this;if(!Array.isArray(e))return e;if(i=void 0!==(e=(0,h.extend)([],e)).columnIndex?e.columnIndex:i,n=void 0!==e.filterValue?e.filterValue:n,(0,_.isString)(e[0])&&"!"!==e[0]){const i=o.columnOption(e[0]);t?(0,r.default)().forceIsoDateParsing&&i&&i.serializeValue&&e.length>1&&(e[e.length-1]=i.serializeValue(e[e.length-1],"filter")):i&&i.selector&&(e[0]=i.selector,e[0].columnIndex=i.index)}else(0,_.isFunction)(e[0])&&(e[0].columnIndex=i,e[0].filterValue=n,e[0].selectedFilterOperation=e.selectedFilterOperation);for(let a=0;a<e.length;a++)e[a]=o.updateFilter(e[a],t,i,n);return e}columnCount(){return this._columns?this._columns.length:0}columnOption(e,t,i,n){const o=this,a=o._columns.concat(o._commandColumns),s=(0,D.findColumn)(a,e);if(s){if(1===arguments.length)return(0,h.extend)({},s);if((0,_.isString)(t)){if(2===arguments.length)return(0,D.columnOptionCore)(o,s,t);(0,D.columnOptionCore)(o,s,t,i,n)}else(0,_.isObject)(t)&&(0,p.each)(t,((e,t)=>{(0,D.columnOptionCore)(o,s,e,t,n)}));(0,D.fireColumnsChanged)(o)}}clearSorting(){const e=this,t=this.columnCount();e.beginUpdate();for(let i=0;i<t;i++)e.columnOption(i,"sortOrder",void 0),delete(0,D.findColumn)(e._columns,i).sortOrder;e.endUpdate()}clearGrouping(){const e=this,t=this.columnCount();e.beginUpdate();for(let i=0;i<t;i++)e.columnOption(i,"groupIndex",void 0);e.endUpdate()}getVisibleIndex(e,t){const i=this.getVisibleColumns(t);for(let t=i.length-1;t>=0;t--)if(i[t].index===e)return t;return-1}getVisibleIndexByColumn(e,t){const i=this.getVisibleColumns(t),n=i.filter((t=>t.index===e.index&&t.command===e.command))[0];return i.indexOf(n)}getVisibleColumnIndex(e,t){const i=this.columnOption(e,"index");return this.getVisibleIndex(i,t)}addColumn(e){const t=this;let i=(0,D.createColumn)(t,e);const n=t._columns.length;t._columns.push(i),i.isBand&&(t._columns=(0,D.createColumnsFromOptions)(t,t._columns),i=t._columns[n]),i.added=e,(0,D.updateIndexes)(t,i),t.updateColumns(t._dataSource),t._checkColumns()}deleteColumn(e){const t=this,i=t.columnOption(e);if(i&&i.index>=0){if((0,D.convertOwnerBandToColumnReference)(t._columns),t._columns.splice(i.index,1),i.isBand){const e=t.getChildrenByBandColumn(i.index).map((e=>e.index));t._columns=t._columns.filter((t=>e.indexOf(t.index)<0))}(0,D.updateIndexes)(t),t.updateColumns(t._dataSource)}}addCommandColumn(e){let t=this._commandColumns.filter((t=>t.command===e.command))[0];t||(t=e,this._commandColumns.push(t))}getUserState(){const e=this._columns,t=[];let i;function n(n,o){void 0!==e[i][o]&&(t[i][o]=e[i][o])}for(i=0;i<e.length;i++)t[i]={},(0,p.each)(S.USER_STATE_FIELD_NAMES,n);return t}setName(e){e.name=e.name||e.dataField||e.type}setUserState(e){const t=this,i=t._dataSource;let n=t.option("stateStoring.ignoreColumnOptionNames");if(null==e||e.forEach(this.setName),!n){n=[];const e=t.getCommonSettings();t.option("columnChooser.enabled")||n.push("visible"),"none"===t.option("sorting.mode")&&n.push("sortIndex","sortOrder"),e.allowGrouping||n.push("groupIndex"),e.allowFixing||n.push("fixed","fixedPosition"),e.allowResizing||n.push("width","visibleWidth");const i=!t.option("filterPanel.visible");!t.option("filterRow.visible")&&i&&n.push("filterValue","selectedFilterOperation"),!t.option("headerFilter.visible")&&i&&n.push("filterValues","filterType")}t._columnsUserState=e,t._ignoreColumnOptionNames=n,t._hasUserState=!!e,(0,D.updateColumnChanges)(t,"filtering"),t.init(!0),i&&(i.sort(t.getSortDataSourceParameters()),i.group(t.getGroupDataSourceParameters()))}_checkColumns(){const e={};let t=!1;const i=[];this._columns.forEach((n=>{var o;const{name:a}=n,s=null===(o=n.columns)||void 0===o?void 0:o.length,r=n.allowEditing&&(n.dataField||n.setCellValue)&&!s;a?(e[a]&&i.push(`"${a}"`),e[a]=!0):r&&(t=!0)})),i.length&&C.default.log("E1059",i.join(", ")),t&&C.default.log("E1060")}_createCalculatedColumnOptions(e,t){let i={},{dataField:o}=e;if((Array.isArray(e.columns)&&e.columns.length||e.isBand)&&(i.isBand=!0,o=null),o){if((0,_.isString)(o)){const e=(0,u.compileGetter)(o);i={caption:y.default.captionize(o),calculateCellValue(t,i){const n=e(t);return this.deserializeValue&&!i?this.deserializeValue(n):n},setCellValue:D.defaultSetCellValue,parseValue(e){const t=this;let i,o;return"number"===t.dataType?(0,_.isString)(e)&&t.format?i=(0,D.strictParseNumber)(e.trim(),t.format):(0,_.isDefined)(e)&&(0,_.isNumeric)(e)&&(i=Number(e)):"boolean"===t.dataType?e===t.trueText?i=!0:e===t.falseText&&(i=!1):x.default.isDateType(t.dataType)?(o=n.default.parse(e,t.format),o&&(i=o)):i=e,i}}}i.allowFiltering=!0}else i.allowFiltering=!!e.calculateFilterExpression;return i.calculateFilterExpression=function(){return v.default.defaultCalculateFilterExpression.apply(this,arguments)},i.defaultFilterOperation="=",i.createFilterExpression=function(e,t){let i;return this.calculateFilterExpression&&(i=this.calculateFilterExpression.apply(this,arguments)),(0,_.isFunction)(i)&&(i=[i,"=",!0]),i&&(i.columnIndex=this.index,i.filterValue=e,i.selectedFilterOperation=t),i},o&&(0,_.isString)(o)||(0,h.extend)(!0,i,{allowSorting:!1,allowGrouping:!1,calculateCellValue:()=>null}),t&&(i.allowFixing=!1),e.dataType&&(i.userDataType=e.dataType),e.selectedFilterOperation&&!("defaultSelectedFilterOperation"in i)&&(i.defaultSelectedFilterOperation=e.selectedFilterOperation),e.lookup&&(i.lookup={calculateCellValue(e,t){return this.valueExpr&&(e=this.valueMap&&this.valueMap[e]),this.deserializeValue&&!t?this.deserializeValue(e):e},updateValueMap(){if(this.valueMap={},this.items){const e=(0,u.compileGetter)(this.valueExpr),t=(0,u.compileGetter)(this.displayExpr);for(let i=0;i<this.items.length;i++){const n=this.items[i],o=t(n);this.valueMap[e(n)]=o,this.dataType=this.dataType||(0,D.getValueDataType)(o)}}},update(){const e=this;let{dataSource:t}=e;if(t)if((0,_.isFunction)(t)&&!f.default.isWrapped(t)&&(t=t({})),(0,_.isPlainObject)(t)||t instanceof m.default||Array.isArray(t)){if(e.valueExpr){const i=(0,s.normalizeDataSourceOptions)(t);return i.paginate=!1,t=new a.DataSource(i),t.load().done((t=>{e.items=t,e.updateValueMap&&e.updateValueMap()}))}}else C.default.log("E1016");else e.updateValueMap&&e.updateValueMap()}}),i.resizedCallbacks=(0,d.default)(),e.resized&&i.resizedCallbacks.add(e.resized.bind(e)),(0,p.each)(i,(e=>{if((0,_.isFunction)(i[e])&&0!==e.indexOf("default")){const t=`default${e.charAt(0).toUpperCase()}${e.substr(1)}`;i[t]=i[e]}})),i}getRowCount(){return this._rowCount=this._rowCount||(0,D.getRowCount)(this),this._rowCount}getRowIndex(e,t){const i=this._columns[e],n=this.getBandColumnsCache();return i&&(t||i.visible&&!i.command&&!(0,_.isDefined)(i.groupIndex))?(0,D.getParentBandColumns)(e,n.columnParentByIndex).length:0}getChildrenByBandColumn(e,t){const i=this.getBandColumnsCache(),n=(0,D.getChildrenByBandColumn)(e,i.columnChildrenByIndex,!t);return t?n.filter((e=>e.visible&&!e.command)).sort(((e,t)=>e.visibleIndex-t.visibleIndex)):n}getVisibleDataColumnsByBandColumn(e){const t=this.getBandColumnsCache();return this.getChildrenByBandColumn(e,t.columnChildrenByIndex).filter((e=>!e.isBand&&e.visible))}isParentBandColumn(e,t){let i=!1;const n=this._columns[e],o=this.getBandColumnsCache(),a=n&&(0,D.getParentBandColumns)(e,o.columnParentByIndex);return a&&(0,p.each)(a,((e,n)=>{if(n.index===t)return i=!0,!1})),i}isParentColumnVisible(e){let t=!0;const i=this.getBandColumnsCache(),n=e>=0&&(0,D.getParentBandColumns)(e,i.columnParentByIndex);return n&&(0,p.each)(n,((e,i)=>(t=t&&i.visible,t))),t}getParentColumn(e){const t=this.getBandColumnsCache();return(0,D.getParentBandColumns)(e.index,t.columnParentByIndex)[0]}isFirstColumn(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;return(0,D.isFirstOrLastColumn)(this,e,t,i,!1,n)}isLastColumn(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;return(0,D.isFirstOrLastColumn)(this,e,t,i,!0,n)}getColumnId(e){return e.command&&e.type===S.GROUP_COMMAND_COLUMN_NAME?x.default.isCustomCommandColumn(this._columns,e)?`type:${e.type}`:`command:${e.command}`:e.index}getCustomizeTextByDataType(e){return(0,D.getCustomizeTextByDataType)(e)}getHeaderContentAlignment(e){return this.option("rtlEnabled")?"left"===e?"right":"left":e}isVirtualMode(){return!1}}t.ColumnsController=T;t.columnsControllerModule={defaultOptions:()=>({commonColumnSettings:{allowFiltering:!0,allowHiding:!0,allowSorting:!0,allowEditing:!0,encodeHtml:!0,trueText:o.default.format("dxDataGrid-trueText"),falseText:o.default.format("dxDataGrid-falseText")},allowColumnReordering:!1,allowColumnResizing:!1,columnResizingMode:"nextColumn",columnMinWidth:void 0,columnWidth:void 0,adaptColumnWidthByRatio:!0,columns:void 0,regenerateColumnsByVisibleItems:!1,customizeColumns:null,dateSerializationFormat:void 0}),controllers:{columns:T}}},63904:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.applyUserState=t.addExpandColumn=void 0,t.assignColumns=B,t.isFirstOrLastColumn=t.isColumnFixed=t.getValueDataType=t.getSerializationFormat=t.getRowCount=t.getParentBandColumns=t.getFixedPosition=t.getDataColumns=t.getCustomizeTextByDataType=t.getColumnIndexByVisibleIndex=t.getColumnFullPath=t.getColumnByIndexes=t.getChildrenByBandColumn=t.getAlignmentByDataType=t.fireOptionChanged=t.fireColumnsChanged=t.findColumn=t.digitsCount=t.defaultSetCellValue=t.customizeTextForBooleanDataType=t.createColumnsFromOptions=t.createColumnsFromDataSource=t.createColumn=t.convertOwnerBandToColumnReference=t.columnOptionCore=t.calculateColspan=void 0,t.isSortOrderValid=N,t.updateSortOrderWhenGrouping=t.updateSerializers=t.updateIndexes=t.updateColumnVisibleIndexes=t.updateColumnSortIndexes=t.updateColumnIndexes=t.updateColumnGroupIndexes=t.updateColumnChanges=t.strictParseNumber=t.sortColumns=t.setFilterOperationsAsDefaultValues=t.resetColumnsCache=t.resetBandColumnsCache=t.processExpandColumns=t.processBandColumns=t.numberToString=t.moveColumnToGroup=t.mergeColumns=void 0;var n=C(i(52771)),o=i(94487),a=i(17781),s=i(31e3),r=C(i(71051)),l=i(52576),d=i(21274),u=i(22263),c=i(41639),h=i(11528),p=C(i(40216)),g=i(26854),_=C(i(53226)),f=i(87396),m=i(24378),v=i(48795);function C(e){return e&&e.__esModule?e:{default:e}}const y=function(e){e.filterOperations=e.defaultFilterOperations};t.setFilterOperationsAsDefaultValues=y;let b=1;const x=function(e,t,i,n){let o={};if(t){(0,h.isString)(t)&&(t={dataField:t}),e.setName(t);let a={};if(t.command)a=(0,u.deepExtendArraySafe)(o,t);else{o=e.getCommonSettings(t),i&&i.name&&i.dataField&&(t=(0,l.extend)({},t,{dataField:i.dataField}));const s=e._createCalculatedColumnOptions(t,n);t.type||(a={headerId:"dx-col-"+b++}),a=(0,u.deepExtendArraySafe)(a,v.DEFAULT_COLUMN_OPTIONS,!1,!0),(0,u.deepExtendArraySafe)(a,o,!1,!0),(0,u.deepExtendArraySafe)(a,s,!1,!0),(0,u.deepExtendArraySafe)(a,t,!1,!0),(0,u.deepExtendArraySafe)(a,{selector:null},!1,!0)}return t.filterOperations===t.defaultFilterOperations&&y(a),a}};t.createColumn=x;const w=function(e,t,i,n){let o=[];return t&&(0,d.each)(t,((t,a)=>{const s=(n??0)+o.length,r=e._columnsUserState&&M(a,e._columnsUserState[s])&&e._columnsUserState[s],l=x(e,a,r,i);l&&(i&&(l.ownerBand=i),o.push(l),l.columns&&(o=o.concat(w(e,l.columns,l,o.length)),delete l.columns,l.hasColumns=!0))})),o};t.createColumnsFromOptions=w;const S=function(e,t){const i=[];let n=t[e];for(;n;)i.unshift(n),n=t[e=n.index];return i};t.getParentBandColumns=S;const D=function(e,t,i){let n=[];const o=t[e];if(o)for(let e=0;e<o.length;e++){const a=o[e];(0,h.isDefined)(a.groupIndex)&&!a.showWhenGrouped||(n.push(a),i&&a.isBand&&(n=n.concat(D(a.index,t,i))))}return n};t.getChildrenByBandColumn=D;t.getColumnByIndexes=function(e,t){let i,n;const o=function(e){const t=i?i.index:void 0;return e.ownerBand===t};if(e.getBandColumnsCache().isPlain)i=e._columns[t[0]];else{n=e._columns.filter(o);for(let a=0;a<t.length;a++)i=n[t[a]],i&&(n=e._columns.filter(o))}return i};const I=function(e,t){let i,n=[];const o=e.getBandColumnsCache(),a=function(e){return e.ownerBand===t.ownerBand};if(o.isPlain){const i=e._columns.indexOf(t);i>=0&&(n=[`columns[${i}]`])}else for(i=e._columns.filter(a);i.length&&-1!==i.indexOf(t);)n.unshift(`columns[${i.indexOf(t)}]`),i=(t=o.columnParentByIndex[t.index])?e._columns.filter(a):[];return n.join(".")};t.getColumnFullPath=I;const E=function(e,t){let i=0;const n=e.getChildrenByBandColumn(t,!0);return(0,d.each)(n,((t,n)=>{n.isBand?(n.colspan=n.colspan||E(e,n.index),i+=n.colspan||1):i+=1})),i};t.calculateColspan=E;t.processBandColumns=function(e,t,i){let n;for(let o=0;o<t.length;o++){const a=t[o];(a.visible||a.command)&&(a.isBand&&(a.colspan=a.colspan||E(e,a.index)),a.isBand&&a.colspan||(n=e.getRowCount(),a.command||(0,h.isDefined)(a.groupIndex)&&!a.showWhenGrouped||(n-=S(a.index,i.columnParentByIndex).length),n>1&&(a.rowspan=n)))}};t.getValueDataType=function(e){let t=(0,h.type)(e);return"string"!==t&&"boolean"!==t&&"number"!==t&&"date"!==t&&"object"!==t&&(t=void 0),t};t.getSerializationFormat=function(e,t){switch(e){case"date":case"datetime":return r.default.getDateSerializationFormat(t);case"number":if((0,h.isString)(t))return"string";if((0,h.isNumeric)(t))return null}};t.updateSerializers=function(e,t){e.deserializeValue||(_.default.isDateType(t)&&(e.deserializeValue=function(e){return r.default.deserializeDate(e)},e.serializeValue=function(e){return(0,h.isString)(e)?e:r.default.serializeDate(e,this.serializationFormat)}),"number"===t&&(e.deserializeValue=function(e){const t=parseFloat(e);return isNaN(t)?e:t},e.serializeValue=function(e,t){return"filter"===t?e:(0,h.isDefined)(e)&&"string"===this.serializationFormat?e.toString():e}))};t.getAlignmentByDataType=function(e,t){switch(e){case"number":return"right";case"boolean":return"center";default:return(0,c.getDefaultAlignment)(t)}};const T=function(e){return!0===e.value?this.trueText||"true":!1===e.value?this.falseText||"false":e.valueText||""};t.customizeTextForBooleanDataType=T;t.getCustomizeTextByDataType=function(e){if("boolean"===e)return T};t.createColumnsFromDataSource=function(e,t){const i=e._getFirstItems(t);let n;const o={},a=[];for(let e=0;e<i.length;e++)if(i[e])for(n in i[e])(0,h.isFunction)(i[e][n])&&!p.default.isWrapped(i[e][n])||(o[n]=!0);for(n in o)if(0!==n.indexOf("__")){const t=x(e,n);a.push(t)}return a};const A=function(e){(0,d.each)(e._columns,((e,t)=>{t.index=e})),(0,d.each)(e._columns,((e,t)=>{(0,h.isObject)(t.ownerBand)&&(t.ownerBand=t.ownerBand.index)})),(0,d.each)(e._commandColumns,((e,t)=>{t.index=-(e+1)}))};t.updateColumnIndexes=A;const O=function(e,t){(0,o.normalizeIndexes)(e._columns,"groupIndex",t,(e=>{const{grouped:t}=e;return delete e.grouped,t}))};t.updateColumnGroupIndexes=O;const P=function(e,t){(0,d.each)(e._columns,((e,t)=>{(0,h.isDefined)(t.sortIndex)&&!N(t.sortOrder)&&delete t.sortIndex})),(0,o.normalizeIndexes)(e._columns,"sortIndex",t,(e=>!(0,h.isDefined)(e.groupIndex)&&N(e.sortOrder)))};t.updateColumnSortIndexes=P;const k=function(e,t){let i;const n=[],a=e.getBandColumnsCache(),s=[],r=e._columns.filter((e=>!e.command));for(let e=0;e<r.length;e++){i=r[e];S(e,a.columnParentByIndex).length?s.push(i):n.push(i)}(0,o.normalizeIndexes)(s,"visibleIndex",t),(0,o.normalizeIndexes)(n,"visibleIndex",t)};t.updateColumnVisibleIndexes=k;t.getColumnIndexByVisibleIndex=function(e,t,i){const n=(0,h.isObject)(t)?t.rowIndex:null,o=i===v.GROUP_LOCATION?e.getGroupColumns():i===v.COLUMN_CHOOSER_LOCATION?e.getChooserColumns():e.getVisibleColumns(n);let a;return t=(0,h.isObject)(t)?t.columnIndex:t,a=o[t],a&&a.type===v.GROUP_COMMAND_COLUMN_NAME&&(a=e._columns.filter((e=>a.type===e.type))[0]||a),a&&(0,h.isDefined)(a.index)?a.index:-1};function M(e,t){return e&&t&&t.name===(e.name||e.dataField)&&(t.dataField===e.dataField||e.name)}t.moveColumnToGroup=function(e,t,i){const n=e.getGroupColumns();let o;if(i>=0)for(o=0;o<n.length;o++)n[o].groupIndex>=i&&n[o].groupIndex++;else for(i=0,o=0;o<n.length;o++)i=Math.max(i,n[o].groupIndex+1);return i};t.applyUserState=function(e){const t=e._columnsUserState,i=e._ignoreColumnOptionNames||[],n=e._columns,o={};let a=[],s=!0;const r=[];let l,d,u;function c(e,t){if(t)for(let n=0;n<v.USER_STATE_FIELD_NAMES.length;n++){const o=v.USER_STATE_FIELD_NAMES[n];i.includes(o)||("dataType"===o?e[o]=e[o]||t[o]:v.USER_STATE_FIELD_NAMES_15_1.includes(o)?o in t&&(e[o]=t[o]):("selectedFilterOperation"===o&&t[o]&&(e.defaultSelectedFilterOperation=e[o]||null),e[o]=t[o]))}}function p(e,t){const i=t.name||t.dataField;let n=o[i]||0;for(let a=0;a<e.length;a++)if(M(t,e[a])){if(!n)return o[i]=o[i]||0,o[i]++,a;n--}return-1}if(t){for(u=0;u<n.length;u++)d=p(t,n[u]),s=s&&d>=0,r.push(d);for(u=0;u<n.length;u++)l=n[u],d=r[u],(e._hasUserState||s)&&c(l,t[d]),d>=0&&(0,h.isDefined)(t[d].initialIndex)?a[d]=l:a.push(l);let i=!1;for(u=0;u<t.length;u++){const o=t[u];o.added&&p(n,o)<0&&(l=x(e,o.added),c(l,o),a.push(l),o.added.columns&&(i=!0))}i&&(A(e),a=w(e,a)),B(e,a)}};const R=function(e,t){A(e),O(e,t),P(e,t),W(e),k(e,t)};t.updateIndexes=R;const L=function(e){e.resetColumnsCache()};function B(e,t){e._previousColumns=e._columns,e._columns=t,L(e),e.updateColumnDataTypes()}t.resetColumnsCache=L;const V=function(e,t,i,n){const o=e._columnChanges||{optionNames:{length:0},changeTypes:{length:0},columnIndex:n};i=(i=i||"all").split(".")[0];const{changeTypes:a}=o;t&&!a[t]&&(a[t]=!0,a.length++);const{optionNames:s}=o;i&&!s[i]&&(s[i]=!0,s.length++),void 0!==n&&n===o.columnIndex||((0,h.isDefined)(n)&&(o.columnIndices??(o.columnIndices=[]),(0,h.isDefined)(o.columnIndex)&&o.columnIndices.push(o.columnIndex),o.columnIndices.push(n)),delete o.columnIndex),e._columnChanges=o,L(e)};t.updateColumnChanges=V;t.fireColumnsChanged=function(e){const t=e.option("onColumnsChanging"),i=e._columnChanges,n=["dataField","lookup","dataType","columns"];var o;e.isInitialized()&&!e._updateLockCount&&i&&(t&&(e._updateLockCount++,t((0,l.extend)({component:e.component},i)),e._updateLockCount--),e._columnChanges=void 0,(o=i.optionNames)&&n.some((e=>o[e]))?(e._reinitAfterLookupChanges=null==i?void 0:i.optionNames.lookup,e.reinit(),e._reinitAfterLookupChanges=void 0):e.columnsChanged.fire(i))};const F=function(e,t,i,n){if(i>=0)n>=0||(t.lastSortOrder=t.sortOrder);else{const i=e.option("sorting.mode");let n=t.lastSortOrder;if("single"===i){e._columns.some((e=>e!==t&&(0,h.isDefined)(e.sortIndex)))&&(n=void 0)}t.sortOrder=n}};t.updateSortOrderWhenGrouping=F;const H=function(e,t){const{value:i}=t,{optionName:n}=t,{prevValue:o}=t,{fullOptionName:a}=t,s=`${a}.${n}`;v.IGNORE_COLUMN_OPTION_NAMES[n]||e._skipProcessingColumnsChange===s||(e._skipProcessingColumnsChange=s,e.component._notifyOptionChanged(s,i,o),e._skipProcessingColumnsChange=!1)};t.fireOptionChanged=H;function N(e){return"asc"===e||"desc"===e}t.columnOptionCore=function(e,t,i,n,o){const r=(0,s.compileGetter)(i),l=t.index;let d,u,c;if(3===arguments.length)return r(t,{functionsAsIs:!0});const p=r(t,{functionsAsIs:!0});if(!(0,a.equalByValue)(p,n,{maxDepth:5})){"groupIndex"===i||"calculateGroupValue"===i?(u="grouping",F(e,t,n,p)):u="sortIndex"===i||"sortOrder"===i||"calculateSortValue"===i?"sorting":"columns";const a=(0,s.compileSetter)(i);a(t,n,{functionsAsIs:!0});const g=I(e,t);v.COLUMN_INDEX_OPTIONS[i]&&(R(e,t),n=r(t)),"name"!==i&&"allowEditing"!==i||e._checkColumns(),(0,h.isDefined)(p)||(0,h.isDefined)(n)||0===i.indexOf("buffer")||(o=!0),o?L(e):(v.USER_STATE_FIELD_NAMES.includes(i)||"visibleWidth"===i||(d=e.option("columns"),c=e.getColumnByPath(g,d),(0,h.isString)(c)&&(c=d[l]={dataField:c}),c&&M(c,t)&&a(c,n,{functionsAsIs:!0})),V(e,u,i,l)),g&&H(e,{fullOptionName:g,optionName:i,value:n,prevValue:p})}};t.addExpandColumn=function(e){const t=e._getExpandColumnOptions();e.addCommandColumn(t)};t.defaultSetCellValue=function(e,t){if(!this.dataField)return;const i=this.dataField.split("."),n=i.length-1;this.serializeValue&&(t=this.serializeValue(t));for(let t=0;t<n;t++){const n=i[t];e=e[n]=e[n]||{}}e[i[n]]=t};const z=function(e,t,i){const n=[];return e[t=t||0]&&(0,d.each)(e[t],((o,a)=>{a.ownerBand!==i&&a.type!==v.GROUP_COMMAND_COLUMN_NAME||(a.isBand&&a.colspan?n.push.apply(n,z(e,t+1,a.index)):(!a.command||t<1)&&n.push(a))})),n};t.getDataColumns=z;t.getRowCount=function(e){let t=1;const i=e.getBandColumnsCache(),{columnParentByIndex:n}=i;return e._columns.forEach((e=>{const i=S(e.index,n),o=i.filter((e=>!e.visible));e.visible&&!o.length&&(t=Math.max(t,i.length+1))})),t};t.getFixedPosition=function(e,t){const i=e.option("rtlEnabled");return t.command&&!_.default.isCustomCommandColumn(e._columns,t)||!t.fixedPosition?i?"right":"left":t.fixedPosition};t.processExpandColumns=function(e,t,i,n){let o;const a=this.getRowCount();let s=e[n]&&e[n].rowspan,r=t.filter((e=>e.type===i));return e.forEach(((t,n)=>{t.type===i&&(o=n,s=e[n+1]?e[n+1].rowspan:a)})),s>1&&(r=(0,d.map)(r,(e=>(0,l.extend)({},e,{rowspan:s})))),r.unshift.apply(r,(0,h.isDefined)(o)?[o,1]:[n,0]),e.splice.apply(e,r),s||1};t.digitsCount=function(e){let t;for(t=0;e>1;t++)e/=10;return t};t.numberToString=function(e,t){let i=e?e.toString():"0";for(;i.length<t;)i=`0${i}`;return i};t.mergeColumns=(e,t,i,n)=>{let o,a,s=t.slice().map((e=>(0,l.extend)({},e)));const r=e._isColumnFixing();let d=i.slice().map((e=>(0,l.extend)({fixed:r},e)));const u=e=>i.reduce(((t,i,o)=>{const a=n&&e.type===v.GROUP_COMMAND_COLUMN_NAME?"expand":e.type;return i.type===a||i.command===e.command?o:t}),-1),c=e=>e.command!==i[a].command;for(let e=0;e<t.length;e++)if(o=t[e],a=o&&(o.type||o.command)?u(o):-1,a>=0)if(n)s[e]=(0,l.extend)({fixed:r},i[a],o),o.type!==v.GROUP_COMMAND_COLUMN_NAME&&(d=d.filter(c));else{const t={visibleIndex:o.visibleIndex,index:o.index,headerId:o.headerId,allowFixing:0===o.groupIndex,allowReordering:0===o.groupIndex,groupIndex:o.groupIndex};s[e]=(0,l.extend)({},o,i[a],o.type===v.GROUP_COMMAND_COLUMN_NAME&&t)}return t.length&&n&&d.length&&(s=s.concat(d)),s};t.isColumnFixed=(e,t)=>(0,h.isDefined)(t.fixed)||!t.type?t.fixed&&t.fixedPosition!==f.StickyPosition.Sticky:e._isColumnFixing();t.convertOwnerBandToColumnReference=e=>{e.forEach((t=>{(0,h.isDefined)(t.ownerBand)&&(t.ownerBand=e[t.ownerBand])}))};const W=e=>{e._bandColumnsCache=void 0};t.resetBandColumnsCache=W;t.findColumn=(e,t)=>{const i=(0,h.isString)(t)&&t.substr(0,t.indexOf(":"));let n;if(void 0!==t)return i&&(t=t.substr(i.length+1)),i?n=e.filter((e=>`${e[i]}`===t))[0]:["index","name","dataField","caption"].some((i=>(n=e.filter((e=>e[i]===t))[0],!!n))),n};t.sortColumns=(e,t)=>{if("asc"!==t&&"desc"!==t)return e;const i="asc"===t?1:-1;return e.sort(((e,t)=>{const n=e.caption||"",o=t.caption||"";return i*n.localeCompare(o)})),e};t.strictParseNumber=function(e,t){const i=n.default.parse(e);if((0,h.isNumeric)(i)){const o=n.default.format(i,t),a=n.default.format(i,"decimal");if(o===e||a===e)return i}};const $=function(e,t,i){var n,o;let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=arguments.length>5?arguments[5]:void 0;const l=t.index,d=(u=i,e.getVisibleColumns(u).filter((i=>{let n=!0;return i.visibleWidth!==g.HIDDEN_COLUMNS_WIDTH&&(a&&t?n&&(n=i.ownerBand===t.ownerBand):r&&n&&(n=i.fixed&&(0,m.getColumnFixedPosition)(e,i)===r),n)})));var u;const c=e.getVisibleIndex(l,i);return s?c===e.getVisibleIndex(null===(n=d[d.length-1])||void 0===n?void 0:n.index,i):c===e.getVisibleIndex(null===(o=d[0])||void 0===o?void 0:o.index,i)};t.isFirstOrLastColumn=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5?arguments[5]:void 0;const s=t.index,r=e.getBandColumnsCache(),l=S(s,r.columnParentByIndex);return null!=l&&l.length?function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;return t.every(((t,a)=>i&&0===a||$(e,t,a,i,n,o)))}(e,l.concat([t]),n,o,a):n||$(e,t,i,n,o,a)}},91066:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CLASSES=void 0;t.CLASSES={draggableColumn:"draggable-column"}},19448:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.columnsResizingReorderingModule=t.TrackerView=t.TablePositionViewController=t.SeparatorView=t.DraggingHeaderViewController=t.DraggingHeaderView=t.ColumnsSeparatorView=t.ColumnsResizerViewController=t.BlockSeparatorView=void 0;var n=i(16826),o=y(i(92774)),a=i(59144),s=y(i(89797)),r=i(98834),l=y(i(64960)),d=y(i(64553)),u=y(i(84718)),c=i(52576),h=i(21274),p=i(41639),g=i(57653),_=i(11528),f=y(i(5080)),m=y(i(74854)),v=y(i(53226)),C=i(91066);function y(e){return e&&e.__esModule?e:{default:e}}const b="columns-separator-transparent",x="drag-header",w="drag-action",S="tracker",D="drop-highlight",I="dx-block-separator",E="dx-header-row",T="dxDataGridResizingReordering",A=function(e){return e.option("allowColumnResizing")||e.getController("columns").isColumnOptionUsed("allowResizing")},O=function(e){return e.option("allowColumnReordering")||e.getController("columns").isColumnOptionUsed("allowReordering")};class P extends m.default.View{init(){super.init(),this._tablePositionController=this.getController("tablePosition"),this._subscribeToCallback()}dispose(){this._unsubscribeFromCallback(),super.dispose()}optionChanged(e){"allowColumnResizing"===e.name&&(this._unsubscribeFromCallback(),e.value&&(this._subscribeToCallback(),this._invalidate())),super.optionChanged(e)}_renderCore(){const e=super._renderCore();return this.element().addClass(this.addWidgetPrefix(S)),this.hide(),e}_unsubscribeFromCallback(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)}_subscribeToCallback(){const e=this;e._positionChanged=function(t){const i=e.element();i&&i.hasClass(e.addWidgetPrefix(S))&&(i.css({top:t.top}),(0,g.setHeight)(i,t.height))},this._tablePositionController.positionChanged.add(e._positionChanged)}isVisible(){return A(this)}show(){this.element().show()}hide(){this.element()&&this.element().hide()}setHeight(e){(0,g.setHeight)(this.element(),e)}}t.TrackerView=P;class k extends m.default.View{_renderSeparator(){}_renderCore(e){const t=super._renderCore(e);return this._isShown=!0,this._renderSeparator(),this.hide(),t}show(){this._isShown=!0}hide(){this._isShown=!1}height(e){const t=this.element();if(t){if(!(0,_.isDefined)(e))return(0,g.getHeight)(t);(0,g.setHeight)(t,e)}}width(e){const t=this.element();if(t){if(!(0,_.isDefined)(e))return(0,g.getWidth)(t);(0,g.setWidth)(t,e)}}}t.SeparatorView=k;class M extends k{init(){super.init(),this._tablePositionController=this.getController("tablePosition"),this._init()}dispose(){this._unsubscribeFromCallback(),super.dispose()}optionChanged(e){"allowColumnResizing"===e.name&&(e.value?(this._init(),this._invalidate(),this.hide(!0)):(this._unsubscribeFromCallback(),this._isTransparent=A(this),this.hide(!0))),super.optionChanged(e)}_renderSeparator(){super._renderSeparator();this.element().addClass(this.addWidgetPrefix("columns-separator"))}_subscribeToCallback(){const e=this;let t;e._positionChanged=function(i){t=e.element(),t&&(t.css({top:i.top}),(0,g.setHeight)(t,i.height))},e._tablePositionController.positionChanged.add(e._positionChanged)}_unsubscribeFromCallback(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)}_init(){this._isTransparent=A(this),this.isVisible()&&this._subscribeToCallback()}isVisible(){return this.option("showColumnHeaders")&&(O(this)||A(this))}show(){const e=this,t=this.element();t&&!e._isShown&&(e._isTransparent?t.removeClass(e.addWidgetPrefix(b)):t.show()),super.show()}hide(e){const t=this.element(),i=this.addWidgetPrefix(b);t&&(this._isShown||e)&&(this._isTransparent?(t.addClass(i),t.css("left",""),t.show()):(t.hasClass(i)&&t.removeClass(i),t.hide())),super.hide()}moveByX(e){const t=this.element();t&&t.css("left",null===e?0:e-this._parentElement().offset().left)}changeCursor(e){e=(0,_.isDefined)(e)?e:"";const t=this.element();t&&t.css("cursor",e)}}t.ColumnsSeparatorView=M;class R extends k{init(){super.init();this.getController("data").loadingChanged.add((e=>{e||this.hide()}))}_renderSeparator(){super._renderSeparator(),this.element().addClass(I).html("&nbsp;")}hide(){const e=this,t=this._parentElement(),i=this.element();i&&this._isShown&&i.css("display","none"),t&&!t.children(`.${I}`).length&&t.prepend(e.element()),super.hide()}isVisible(){const e=this.option("groupPanel"),t=this.option("columnChooser");return e&&e.visible||t&&t.enabled}show(e){const t=this.element();if(t&&!this._isShown)switch(e){case"group":this.element().css("display","block");break;case"columnChooser":i={width:"100%",display:"block"},n.fx.stop(t,!0),n.fx.animate(t,{type:"slide",from:{width:0,display:i.display},to:i,duration:300,easing:"swing"});break;default:t.css("display","")}var i;super.show()}}t.BlockSeparatorView=R;class L extends m.default.View{init(){super.init();const e=this.getController("data");this._controller=this.getController("draggingHeader"),this._columnsResizerViewController=this.getController("columnsResizer"),this._columnsController=this.getController("columns"),this._isDragging=!1,e.loadingChanged.add((e=>{const t=this.element();!e&&t&&t.hide()}))}isDragging(){return this._isDragging}_getDraggingPanelByPos(e){let t;return(0,h.each)(this._dragOptions.draggingPanels,((i,n)=>{if(n){const i=n.getBoundingRect();if(i&&(void 0===i.bottom||e.y<i.bottom)&&(void 0===i.top||e.y>i.top)&&(void 0===i.left||e.x>i.left)&&(void 0===i.right||e.x<i.right))return t=n,!1}})),t}_renderCore(){this.element().addClass(`${this.addWidgetPrefix(x)} ${this.addWidgetPrefix("text-content")} dx-widget`).hide()}_resetTargetColumnOptions(){const e=this._dropOptions;e.targetColumnIndex=-1,delete e.targetColumnElement,delete e.isLast,delete e.posX,delete e.posY}_getVisibleIndexObject(e,t){return(0,_.isDefined)(e)?{columnIndex:t,rowIndex:e}:t}dispose(){const e=this.element();this._dragOptions=null,e&&e.parent().find(`.${this.addWidgetPrefix(x)}`).remove()}isVisible(){const e=this._columnsController.getCommonSettings();return this.option("showColumnHeaders")&&(O(this)||e.allowGrouping||e.allowHiding)}dragHeader(e){const t=this,{columnElement:i}=e,n=!!e.sourceColumn.type;t._isDragging=!0,t._dragOptions=e,t._dropOptions={sourceIndex:e.index,sourceColumnIndex:t._getVisibleIndexObject(e.rowIndex,e.columnIndex),sourceColumnElement:e.columnElement,sourceLocation:e.sourceLocation};const o=l.default.getDocument();t._onSelectStart=o.onselectstart,o.onselectstart=function(){return!1},t._controller.drag(t._dropOptions),t.element().css({textAlign:i&&i.css("textAlign"),height:i&&(n&&i.get(0).clientHeight||(0,g.getHeight)(i)),width:i&&(n&&i.get(0).clientWidth||(0,g.getWidth)(i)),whiteSpace:i&&i.css("whiteSpace")}).addClass(t.addWidgetPrefix(w)).toggleClass("dx-drag-command-cell",n).text(n?"":e.sourceColumn.caption),t.element().appendTo(f.default.getSwatchContainer(i))}moveHeader(e){const t=e.event,{that:i}=t.data,n=(0,r.eventData)(t),o=!!i._columnsResizerViewController&&i._columnsResizerViewController.isResizing(),a=i._dragOptions;if(i._isDragging&&!o){const e=i.element(),o=Math.abs(n.x-a.columnElement.offset().left-a.deltaX),s=Math.abs(n.y-a.columnElement.offset().top-a.deltaY);if(e.is(":visible")||o>5||s>5){e.show();const t=n.x-a.deltaX,o=n.y-a.deltaY;e.css({left:t,top:o}),i.dockHeader(n)}t.preventDefault()}}dockHeader(e){const t=this,i=t._getDraggingPanelByPos(e),n=t._controller,o=t._dropOptions,a=t._dragOptions;if(i){const s=t.option("rtlEnabled"),r="columnChooser"===i.getName(),l=r?"y":"x",u=i.getName(),h="headers"===u?a.rowIndex:void 0,{sourceColumn:p}=a,g=i.getColumnElements(h,null==p?void 0:p.ownerBand)||[],_=a.pointsByTarget=a.pointsByTarget||{},f="columnChooser"===u?[]:_[u]||n._generatePointsByColumns((0,c.extend)({},a,{targetDraggingPanel:i,columns:i.getColumns(h),columnElements:g,isVerticalOrientation:r,startColumnIndex:"headers"===u?(0,d.default)(g[0]).index():0}));if(_[u]=f,o.targetLocation=u,f.length>0)for(let i=0;i<f.length;i++){const a=f[i+1]&&(f[i][l]+f[i+1][l])/2;if(void 0===a||(s&&"x"===l?e[l]>a:e[l]<a)){o.targetColumnIndex=t._getVisibleIndexObject(h,f[i].columnIndex),g[i]?(o.targetColumnElement=g.eq(i),o.isLast=!1):(o.targetColumnElement=g.last(),o.isLast=!0),o.posX=f[i].x,o.posY=f[i].y,n.dock(o);break}}else t._resetTargetColumnOptions(),n.dock(o)}}dropHeader(e){const t=e.event,{that:i}=t.data,n=i._controller;i.element().hide(),n&&i._isDragging&&n.drop(i._dropOptions),i.element().appendTo(i._parentElement()),i._dragOptions=null,i._dropOptions=null,i._isDragging=!1,l.default.getDocument().onselectstart=i._onSelectStart||null}}t.DraggingHeaderView=L;const B=function(e){return"widget"!==e.option("columnResizingMode")};class V extends m.default.ViewController{init(){this._subscribesToCallbacks=[],A(this)&&this._init()}dispose(){this._unsubscribes(),super.dispose()}optionChanged(e){super.optionChanged(e),"allowColumnResizing"===e.name&&(e.value?(this._init(),this._subscribeToEvents()):this._unsubscribes())}_isHeadersRowArea(e){if(this._columnHeadersView){const t=this._columnHeadersView.element();if(t){const i=t.offset().top,n=this._columnHeadersView.getHeadersRowHeight();return e>=i&&e<=i+n}}return!1}_isRtlParentStyle(){var e;return this.option("rtlEnabled")&&"rtl"===(null===(e=this._$parentContainer)||void 0===e?void 0:e.parent().css("direction"))}_correctColumnIndexForPoint(e,t,i){e.columnIndex-=t}_pointCreated(e,t,i){const n=B(this),o=this.option("rtlEnabled"),a=this._isRtlParentStyle(),s=n||!o||a?1:0;if(e.index>=s&&e.index<t+(n||o&&!a?0:1)){this._correctColumnIndexForPoint(e,s,i);const t=i[e.columnIndex]||{},o=i[e.columnIndex+1]||{};return!(n?t.allowResizing&&o.allowResizing:t.allowResizing)}return!0}_getTargetPoint(e,t,i){if(e)for(let n=0;n<e.length;n++)if((e[n].x!==e[0].x||!e[n+1]||e[n].x!==e[n+1].x)&&e[n].x-i<=t&&t<=e[n].x+i)return e[n];return null}getSeparatorOffsetX(e){var t;const i=B(this),n=this.option("rtlEnabled"),o=this._isRtlParentStyle(),a=e[0].getBoundingClientRect().width;return((null===(t=e.offset())||void 0===t?void 0:t.left)??0)+((i||o)&&n?0:a)}_moveSeparator(e){var t;const i=e.event,n=i.data,o=n._columnsSeparatorView.width(),a=B(n),s=o/2,l=n._$parentContainer.offset(),d=l.left,u=(0,r.eventData)(i),c=this._isRtlParentStyle(),h=null===(t=n._draggingHeaderView)||void 0===t?void 0:t.isDragging();if(n._isResizing&&n._resizingInfo){if((d<=u.x||!a&&c)&&(!a||u.x<=d+(0,g.getWidth)(n._$parentContainer))&&n._updateColumnsWidthIfNeeded(u.x)){const e=n._columnHeadersView.getColumnElements().eq(n._resizingInfo.currentColumnIndex);if(e.length){const t=this.getSeparatorOffsetX(e);n._columnsSeparatorView.moveByX(t),n._tablePositionController.update(n._targetPoint.y),i.preventDefault()}}}else h||(n._isHeadersRowArea(u.y)?(n._previousParentOffset&&(n._previousParentOffset.left===l.left&&n._previousParentOffset.top===l.top||n.pointsByColumns(null)),n._targetPoint=n._getTargetPoint(n.pointsByColumns(),u.x,o),n._previousParentOffset=l,n._isReadyResizing=!1,n._targetPoint?(n._columnsSeparatorView.changeCursor("col-resize"),n._columnsSeparatorView.moveByX(n._targetPoint.x-s),n._tablePositionController.update(n._targetPoint.y),n._isReadyResizing=!0,i.preventDefault()):(n._columnsSeparatorView.changeCursor(),n._columnsSeparatorView.moveByX(null))):(n.pointsByColumns(null),n._isReadyResizing=!1,n._columnsSeparatorView.changeCursor(),n._columnsSeparatorView.moveByX(null)))}_endResizing(e){const t=e.event.data;t._isResizing&&(t.pointsByColumns(null),t._resizingInfo=null,t._columnsSeparatorView.hide(),t._columnsSeparatorView.changeCursor(),t._trackerView.hide(),t._isReadyResizing=!1,t._isResizing=!1)}_getNextColumnIndex(e){return e+1}_setupResizingInfo(e){const t=this._targetPoint.columnIndex,i=this._getNextColumnIndex(t),n=this._columnHeadersView.getHeaderElement(t),o=this._columnHeadersView.getHeaderElement(i);this._resizingInfo={startPosX:e,currentColumnIndex:t,currentColumnWidth:null!=n&&n.length?(0,p.getBoundingRect)(n[0]).width:0,nextColumnIndex:i,nextColumnWidth:null!=o&&o.length?(0,p.getBoundingRect)(o[0]).width:0,needToInvertResizing:this._needToInvertResizing(n)}}_startResizing(e){const t=e.event,i=t.data,n=(0,r.eventData)(t);if((0,r.isTouchEvent)(t)&&(i._isHeadersRowArea(n.y)?(i._targetPoint=i._getTargetPoint(i.pointsByColumns(),n.x,10),i._targetPoint&&(i._columnsSeparatorView.moveByX(i._targetPoint.x-i._columnsSeparatorView.width()/2),i._isReadyResizing=!0)):i._isReadyResizing=!1),i._isReadyResizing){i._setupResizingInfo(n.x),i._isResizing=!0,i._tablePositionController.update(i._targetPoint.y),i._columnsSeparatorView.show(),i._trackerView.show();const e=i.component.getScrollable();e&&i._isRtlParentStyle()&&(i._scrollRight=(0,g.getWidth)(e.$content())-(0,g.getWidth)(e.container())-e.scrollLeft()),t.preventDefault(),t.stopPropagation()}this.isResizing()&&this._editorFactoryController.loseFocus()}_generatePointsByColumns(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this,i=t._columnsController?t._columnsController.getVisibleColumns():[],n=t._columnHeadersView.getColumnElements();let o=[];n&&n.length>0&&(o=v.default.getPointsByColumns(n,(e=>t._pointCreated(e,n.length,i)),!1,0,e)),t._pointsByColumns=o}_needToInvertResizing(e){const t=this.option("rtlEnabled"),i=this._isRtlParentStyle();return(B(this)||i)&&t}_unsubscribeFromEvents(){this._moveSeparatorHandler&&o.default.off(l.default.getDocument(),(0,r.addNamespace)(s.default.move,T),this._moveSeparatorHandler),this._startResizingHandler&&o.default.off(this._$parentContainer,(0,r.addNamespace)(s.default.down,T),this._startResizingHandler),this._endResizingHandler&&(o.default.off(this._columnsSeparatorView.element(),(0,r.addNamespace)(s.default.up,T),this._endResizingHandler),o.default.off(l.default.getDocument(),(0,r.addNamespace)(s.default.up,T),this._endResizingHandler))}_subscribeToEvents(){this._moveSeparatorHandler=this.createAction(this._moveSeparator),this._startResizingHandler=this.createAction(this._startResizing),this._endResizingHandler=this.createAction(this._endResizing),o.default.on(l.default.getDocument(),(0,r.addNamespace)(s.default.move,T),this,this._moveSeparatorHandler),o.default.on(this._$parentContainer,(0,r.addNamespace)(s.default.down,T),this,this._startResizingHandler),o.default.on(this._columnsSeparatorView.element(),(0,r.addNamespace)(s.default.up,T),this,this._endResizingHandler),o.default.on(l.default.getDocument(),(0,r.addNamespace)(s.default.up,T),this,this._endResizingHandler)}_updateColumnsWidthIfNeeded(e){let t,i=!1,n=this._rowsView.contentWidth();const o=this._resizingInfo,a=this._columnsController,s=a.getVisibleColumns(),r=this._columnsSeparatorView.width(),l=B(this),d=l&&this.option("adaptColumnWidthByRatio")&&!this.option("columnAutoWidth"),u=this._isRtlParentStyle(),c=s[o.currentColumnIndex],h=s[o.nextColumnIndex],{needToInvertResizing:p}=o;function f(e){return(0,_.isString)(e)&&e.endsWith("%")}function m(e,t,i,n){if(e){const o=e.width;o&&(n=f(o)),n?(a.columnOption(e.index,"visibleWidth",t),a.columnOption(e.index,"width",`${(t/i*100).toFixed(3)}%`)):(a.columnOption(e.index,"visibleWidth",null),a.columnOption(e.index,"width",t))}}t=e-o.startPosX,p&&(t=-t);let{cellWidth:C,nextCellWidth:y}=function(e){let t,i,n;const a=o.currentColumnWidth+e,s=c&&c.minWidth||r,d={};return a>=s?d.cellWidth=a:(d.cellWidth=s,n=!0),l&&(i=o.nextColumnWidth-e,t=h&&h.minWidth||r,i>=t?d.nextCellWidth=n?o.nextColumnWidth-(e+s-a):i:(d.nextCellWidth=t,d.cellWidth=o.currentColumnWidth+(e-t+i))),d}(t);if(i=c.width!==C,i){if(a.beginUpdate(),C=Math.floor(C),n=function(e,t){const i=t.every((e=>e.width));if(i){const i=t.reduce(((e,t)=>(f(t.width)&&(e+=parseFloat(t.width)),e)),0);i>100&&(e=e/i*100)}return e}(n,s),m(c,C,n,d),l)y=Math.floor(y),m(h,y,n,d);else{const e=this._columnHeadersView.getColumnWidths();e[o.currentColumnIndex]=C;if(!(e.reduce(((e,t)=>e+t),0)>this._rowsView.contentWidth())){const e=v.default.getLastResizableColumnIndex(s);e>=0&&a.columnOption(s[e].index,"visibleWidth","auto")}for(let t=0;t<e.length;t++)s[t]&&s[t]!==c&&void 0===s[t].width&&a.columnOption(s[t].index,"width",e[t])}if(a.endUpdate(),!l){this.component.updateDimensions();const e=this.component.getScrollable();if(e&&u){const t=(0,g.getWidth)(e.$content())-(0,g.getWidth)(e.container())-this._scrollRight;e.scrollTo({left:t})}}}return i}_subscribeToCallback(e,t){e.add(t),this._subscribesToCallbacks.push({callback:e,handler:t})}_unsubscribeFromCallbacks(){for(let e=0;e<this._subscribesToCallbacks.length;e++){const t=this._subscribesToCallbacks[e];t.callback.remove(t.handler)}this._subscribesToCallbacks=[]}_unsubscribes(){this._unsubscribeFromEvents(),this._unsubscribeFromCallbacks()}_init(){const e=()=>{this._isResizing||this.pointsByColumns(null)},t=e=>{this._scrollLeft!==e.left&&(this._scrollLeft=e.left,this.pointsByColumns(null))};this._columnsSeparatorView=this.getView("columnsSeparatorView"),this._columnHeadersView=this.getView("columnHeadersView"),this._trackerView=this.getView("trackerView"),this._rowsView=this.getView("rowsView"),this._columnsController=this.getController("columns"),this._tablePositionController=this.getController("tablePosition"),this._editorFactoryController=this.getController("editorFactory"),this._draggingHeaderView=this.component.getView("draggingHeaderView"),this._$parentContainer=this.component.$element(),this._subscribeToCallback(this._columnHeadersView.renderCompleted,e),this._subscribeToCallback(this._columnHeadersView.resizeCompleted,e),this._subscribeToCallback(this._columnsSeparatorView.renderCompleted,(()=>{this._unsubscribeFromEvents(),this._subscribeToEvents()})),this._subscribeToCallback(this._rowsView.renderCompleted,(()=>{this._rowsView.scrollChanged.remove(t),this._rowsView.scrollChanged.add(t)}));let i=0!==this._rowsView.getScrollbarWidth(),n=0;this._subscribeToCallback(this._tablePositionController.positionChanged,(e=>{if(this._isResizing&&!this._rowsView.isResizing){const t=0!==this._rowsView.getScrollbarWidth();i!==t||n&&n!==e.height?(i=t,n=e.height,this.component.updateDimensions()):this._rowsView.updateFreeSpaceRowHeight()}n=e.height}))}isResizing(){return this._isResizing}pointsByColumns(e){if(void 0===e)return this._pointsByColumns||this._generatePointsByColumns(),this._pointsByColumns;this._pointsByColumns=e}}t.ColumnsResizerViewController=V;class F extends m.default.ViewController{constructor(e){super(e),this.positionChanged=(0,u.default)()}init(){super.init(),this._columnsResizerController=this.getController("columnsResizer"),this._columnHeadersView=this.getView("columnHeadersView"),this._rowsView=this.getView("rowsView"),this._pagerView=this.getView("pagerView"),this._rowsView.resizeCompleted.add((()=>{if(this.option("allowColumnResizing")){const e=this._columnsResizerController._targetPoint;this.update(e?e.y:null)}}))}update(e){const t=this,i={},n=t._columnHeadersView.element(),o=n&&n.offset(),a=o&&o.top||0,s=(0,_.isDefined)(e)?Math.abs(e-a):0,r=t._columnHeadersView?t._columnHeadersView.getHeight():0,l=t._rowsView.getScrollbarWidth(!0),d=t._rowsView?t._rowsView.height()-l:0,u=t.component.getView("draggingHeaderView");i.height=r;(this._columnsResizerController.isResizing()||u.isDragging())&&(i.height+=d-s),null!==e&&n&&n.length&&(i.top=n[0].offsetTop+s),t.positionChanged.fire(i)}}t.TablePositionViewController=F;class H extends m.default.ViewController{init(){super.init(),this._columnsController=this.getController("columns"),this._tablePositionController=this.getController("tablePosition"),this._columnHeadersView=this.getView("columnHeadersView"),this._columnsSeparatorView=this.getView("columnsSeparatorView"),this._draggingHeaderView=this.getView("draggingHeaderView"),this._rowsView=this.getView("rowsView"),this._blockSeparatorView=this.getView("blockSeparatorView"),this._headerPanelView=this.getView("headerPanel"),this._columnChooserView=this.getView("columnChooserView");const e=()=>{if(this._draggingHeaderView){const e=[this._columnChooserView,this._columnHeadersView,this._headerPanelView];this._unsubscribeFromEvents(this._draggingHeaderView,e),this._subscribeToEvents(this._draggingHeaderView,e)}};this._columnHeadersView.renderCompleted.add(e),this._headerPanelView&&this._headerPanelView.renderCompleted.add(e),this._columnChooserView&&this._columnChooserView.renderCompleted.add(e)}dispose(){this._draggingHeaderView&&this._unsubscribeFromEvents(this._draggingHeaderView,[this._columnChooserView,this._columnHeadersView,this._headerPanelView])}_generatePointsByColumns(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.isCustomGroupColumnPosition=this.checkIsCustomGroupColumnPosition(e);return v.default.getPointsByColumns(e.columnElements,(t=>this._pointCreated(t,e.columns,e.targetDraggingPanel.getName(),e.sourceColumn)),e.isVerticalOrientation,e.startColumnIndex,t)}checkIsCustomGroupColumnPosition(e){let t=!0;for(let i=0;i<e.columns.length;i+=1){const n=e.columns[i];if("expand"===n.command&&!t)return!0;n.command||(t=!1)}return!1}_pointCreated(e,t,i,n){const o=t[e.columnIndex],a=t[e.columnIndex-1],s="expand"===(null==a?void 0:a.command),r="expand"===(null==o?void 0:o.command)&&"expand"!==(null==a?void 0:a.command),l=n&&!n.allowReordering,d=!(null!=o&&o.allowReordering||null!=a&&a.allowReordering);switch(i){case"columnChooser":return!0;case"headers":if(l)return!0;if(!r)return s||d;if(this.isCustomGroupColumnPosition)return!1;for(;"expand"===(null===(u=t[e.columnIndex])||void 0===u?void 0:u.command);){var u;e.columnIndex+=1}return!1;default:return 0===t.length}}_subscribeToEvents(e,t){const i=this;(0,h.each)(t,((n,s)=>{if(s){let n;const l=s.getRowCount?s.getRowCount():1,u=s.getName(),c=function(l,c){if(!c)return;const h=(0,d.default)(c),p=n[l];p&&s.allowDragging(p)&&(h.addClass(i.addWidgetPrefix(w)),o.default.on(h,(0,r.addNamespace)(a.start,T),i.createAction((n=>{const o=n.event,a=(0,r.eventData)(o);e.dragHeader({deltaX:a.x-(0,d.default)(o.currentTarget).offset().left,deltaY:a.y-(0,d.default)(o.currentTarget).offset().top,sourceColumn:p,index:p.index,columnIndex:l,columnElement:h,sourceLocation:u,draggingPanels:t,rowIndex:i._columnsController.getRowIndex(p.index,!0)})}))),o.default.on(h,(0,r.addNamespace)(a.move,T),{that:e},i.createAction(e.moveHeader)),o.default.on(h,(0,r.addNamespace)(a.end,T),{that:e},i.createAction(e.dropHeader)))};for(let e=0;e<l;e++){const t=s.getColumnElements(e)||[];t.length&&(n=s.getColumns(e)||[],(0,h.each)(t,c))}}}))}_unsubscribeFromEvents(e,t){const i=this;(0,h.each)(t,((e,t)=>{if(t){const e=t.getColumnElements()||[];(0,h.each)(e,((e,t)=>{const n=(0,d.default)(t);o.default.off(n,(0,r.addNamespace)(a.start,T)),o.default.off(n,(0,r.addNamespace)(a.move,T)),o.default.off(n,(0,r.addNamespace)(a.end,T)),n.removeClass(i.addWidgetPrefix(w))}))}}))}_getSeparator(e){return"headers"===e?this._columnsSeparatorView:this._blockSeparatorView}hideSeparators(e){const t=this._blockSeparatorView,i=this._columnsSeparatorView;this._animationColumnIndex=void 0,t&&t.hide(),"block"!==e&&i&&i.hide()}allowDrop(e){return this._columnsController.allowMoveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)}drag(e){const{sourceIndex:t}=e,{sourceLocation:i}=e,{sourceColumnElement:n}=e,o=this._columnHeadersView,a=this._rowsView;n&&(n.addClass(this.addWidgetPrefix(C.CLASSES.draggableColumn)),"headers"===i&&(o&&o.toggleDraggableColumnClass(t,!0),a&&a.toggleDraggableColumnClass(t,!0)))}dock(e){const t=this,i=(0,_.isObject)(e.targetColumnIndex)?e.targetColumnIndex.columnIndex:e.targetColumnIndex,{sourceLocation:n}=e,{targetLocation:o}=e,a=t._getSeparator(o),s=i>=0;t._columnHeadersView.element().find(`.${E}`).toggleClass(t.addWidgetPrefix(D),"headers"!==n&&"headers"===o&&!s),a&&(t.allowDrop(e)&&s?"group"===o||"columnChooser"===o?t._animationColumnIndex!==i&&(t.hideSeparators(),a.element()[e.isLast?"insertAfter":"insertBefore"](e.targetColumnElement),t._animationColumnIndex=i,a.show(o)):(t.hideSeparators("block"),t._tablePositionController.update(e.posY),a.moveByX(e.posX-a.width()),a.show()):t.hideSeparators())}drop(e){const{sourceColumnElement:t}=e;if(t&&(t.removeClass(this.addWidgetPrefix(C.CLASSES.draggableColumn)),this._columnHeadersView.toggleDraggableColumnClass(e.sourceIndex,!1),this._rowsView.toggleDraggableColumnClass(e.sourceIndex,!1),this._columnHeadersView.element().find(`.${E}`).removeClass(this.addWidgetPrefix(D))),this.allowDrop(e)){const t=this._getSeparator(e.targetLocation);t&&t.hide(),this._columnsController.moveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)}}}t.DraggingHeaderViewController=H;t.columnsResizingReorderingModule={views:{columnsSeparatorView:M,blockSeparatorView:R,draggingHeaderView:L,trackerView:P},controllers:{draggingHeader:H,tablePosition:F,columnsResizer:V},extenders:{views:{rowsView:e=>class extends e{_needUpdateRowHeight(e){const t=this.option("wordWrapEnabled"),i=this._columnsResizerController.isResizing();return super._needUpdateRowHeight.apply(this,arguments)||e>0&&!!t&&!!i}}},controllers:{editorFactory:e=>class extends e{renderFocusOverlay(){if(!this._columnsResizerController.isResizing())return super.renderFocusOverlay.apply(this,arguments)}}}}}},73680:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.contextMenuModule=t.ContextMenuView=t.ContextMenuController=void 0;var n=i(61404),o=l(i(64553)),a=i(21274),s=l(i(34378)),r=l(i(74854));function l(e){return e&&e.__esModule?e:{default:e}}const d={columnHeadersView:"header",rowsView:"content",footerView:"footer",headerPanel:"headerPanel"},u=["columnHeadersView","rowsView","footerView","headerPanel"];class c extends r.default.ViewController{init(){this.createAction("onContextMenuPreparing")}getContextMenuItems(e){if(!e)return!1;const t=this,i=(0,o.default)(e.target);let s,r,l,c;return(0,a.each)(u,(function(){const o=t.getView(this);if(s=o&&o.element(),s&&(s.is(i)||s.find(i).length)){var a;l=i.closest(".dx-row > td, .dx-row > tr"),r=l.parent();const s=o.getRowIndex(r),u=l[0]&&l[0].cellIndex,h=r.data("options"),p={event:e,targetElement:(0,n.getPublicElement)(i),target:d[this],rowIndex:s,row:o._getRows()[s],columnIndex:u,column:null==h||null===(a=h.cells)||void 0===a||null===(a=a[u])||void 0===a?void 0:a.column};if(p.items=o.getContextMenuItems&&o.getContextMenuItems(p),t.executeAction("onContextMenuPreparing",p),t._contextMenuPrepared(p),c=p.items,c)return!1}})),c}_contextMenuPrepared(e){}}t.ContextMenuController=c;class h extends r.default.View{init(){super.init(),this._contextMenuController=this.getController("contextMenu")}_renderCore(){const e=this.element().addClass("dx-context-menu");this.setAria("role","presentation",e),this._createComponent(e,s.default,{onPositioning:e=>{const{event:t}=e,i=e.component,n=this._contextMenuController.getContextMenuItems(t);n?(i.option("items",n),t.stopPropagation()):e.cancel=!0},onItemClick(e){var t,i;null===(t=e.itemData)||void 0===t||null===(i=t.onItemClick)||void 0===i||i.call(t,e)},cssClass:this.getWidgetContainerClass(),target:this.component.$element()})}}t.ContextMenuView=h;t.contextMenuModule={defaultOptions:()=>({onContextMenuPreparing:null}),controllers:{contextMenu:c},views:{contextMenuView:h}}},32688:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.dataControllerModule=t.DataController=void 0;var n=f(i(80556)),o=i(63326),a=f(i(64553)),s=i(13387),r=i(17781),l=i(87739),d=i(52576),u=i(21274),c=i(11528),h=f(i(35185)),p=f(i(74854)),g=f(i(53226)),_=i(68910);function f(e){return e&&e.__esModule?e:{default:e}}const m=function(e,t,i){const n=e._dataSource;if(n){if(void 0!==i){if(e._getPagingOptionValue(t)!==i){"pageSize"===t&&n.pageIndex(0),n[t](i),e._skipProcessingPagingChange=!0,e.option(`paging.${t}`,i),e._skipProcessingPagingChange=!1;const o=n.pageIndex();return e._isPaging="pageIndex"===t,n["pageIndex"===t?"load":"reload"]().done((()=>{e._isPaging=!1,e.pageChanged.fire(o)}))}return(0,l.Deferred)().resolve().promise()}return n[t]()}return"pageIndex"===t&&void 0!==i?(0,l.Deferred)().resolve().promise():0};class v extends((0,_.DataHelperMixin)(p.default.Controller)){init(){this._items=[],this._cachedProcessedItems=null,this._columnsController=this.getController("columns"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._editingController=this.getController("editing"),this._editorFactoryController=this.getController("editorFactory"),this._errorHandlingController=this.getController("errorHandling"),this._filterSyncController=this.getController("filterSync"),this._applyFilterController=this.getController("applyFilter"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._focusController=this.getController("focus"),this._headerFilterController=this.getController("headerFilter"),this._selectionController=this.getController("selection"),this._stateStoringController=this.getController("stateStoring"),this._validatingController=this.getController("validating"),this._isPaging=!1,this._currentOperationTypes=null,this._dataChangedHandler=e=>{this._currentOperationTypes=this._dataSource.operationTypes(),this._handleDataChanged(e),this._currentOperationTypes=null},this._columnsChangedHandler=this._handleColumnsChanged.bind(this),this._loadingChangedHandler=this._handleLoadingChanged.bind(this),this._loadErrorHandler=this._handleLoadError.bind(this),this._customizeStoreLoadOptionsHandler=this._handleCustomizeStoreLoadOptions.bind(this),this._changingHandler=this._handleChanging.bind(this),this._dataPushedHandler=this._handleDataPushed.bind(this),this._columnsController.columnsChanged.add(this._columnsChangedHandler),this._isLoading=!1,this._isCustomLoading=!1,this._repaintChangesOnly=void 0,this._changes=[],this.createAction("onDataErrorOccurred"),this.dataErrorOccurred.add((e=>this.executeAction("onDataErrorOccurred",{error:e}))),this._refreshDataSource(),this.postCtor()}_getPagingOptionValue(e){return this._dataSource[e]()}callbackNames(){return["changed","loadingChanged","dataErrorOccurred","pageChanged","dataSourceChanged","pushed"]}callbackFlags(e){if("dataErrorOccurred"===e)return{stopOnFalse:!0}}publicMethods(){return["_disposeDataSource","beginCustomLoading","byKey","clearFilter","endCustomLoading","filter","getCombinedFilter","getDataByKeys","getDataSource","getKeyByRowIndex","getRowIndexByKey","getVisibleRows","keyOf","pageCount","pageIndex","pageSize","refresh","repaintRows","totalCount"]}reset(){this._columnsController.reset(),this._items=[],this._refreshDataSource()}_handleDataSourceChange(e){if(e.value===e.previousValue||this.option("columns")&&Array.isArray(e.value)&&Array.isArray(e.previousValue)){if(e.value!==e.previousValue){const t=this.store();t&&(t._array=e.value)}return this.needToRefreshOnDataSourceChange(e)&&this.refresh(this.option("repaintChangesOnly")),!0}return!1}needToRefreshOnDataSourceChange(e){return!0}optionChanged(e){const t=this;let i,n;function o(){e.handled=!0}if("dataSource"===e.name&&e.name===e.fullName&&this._handleDataSourceChange(e))o();else switch(e.name){case"cacheEnabled":case"repaintChangesOnly":case"highlightChanges":case"loadingTimeout":o();break;case"remoteOperations":case"keyExpr":case"dataSource":case"scrolling":o(),t.reset();break;case"paging":if(i=t.dataSource(),i&&(n=t._setPagingOptions(i),n)){const e=i.pageIndex();this._isPaging=n.isPageIndexChanged,i.load().done((()=>{this._isPaging=!1,t.pageChanged.fire(e)}))}o();break;case"rtlEnabled":t.reset();break;case"columns":i=t.dataSource(),i&&i.isLoading()&&e.name===e.fullName&&(this._useSortingGroupingFromColumns=!0,i.load());break;default:super.optionChanged(e)}}isReady(){return!this._isLoading}getDataSource(){return this._dataSource&&this._dataSource._dataSource}getCombinedFilter(e){return this.combinedFilter(void 0,e)}combinedFilter(e,t){if(!this._dataSource)return e;let i=e??this._dataSource.filter();if(this._columnsController.isDataSourceApplied()||this._columnsController.isAllDataTypesDefined()){const e=this._calculateAdditionalFilter();i=e?g.default.combineFilters([e,i]):i}const n=this._dataSource.remoteOperations().filtering||t;return i=this._columnsController.updateFilter(i,n),i}waitReady(){return this._updateLockCount?(this._readyDeferred=new l.Deferred,this._readyDeferred):(0,l.when)()}_endUpdateCore(){const e=this._changes;if(e.length){this._changes=[];const t=e.every((e=>e.repaintChangesOnly));this.updateItems(1===e.length?e[0]:{repaintChangesOnly:t})}this._readyDeferred&&(this._readyDeferred.resolve(),this._readyDeferred=null)}_handleCustomizeStoreLoadOptions(e){var t;const i=this._columnsController,n=this._dataSource,{storeLoadOptions:o}=e;e.isCustomLoading&&!o.isLoadingAll||(o.filter=this.combinedFilter(o.filter),1===(null===(t=o.filter)||void 0===t?void 0:t.length)&&"!"===o.filter[0]&&(e.data=[],e.extra=e.extra||{},e.extra.totalCount=0),i.isDataSourceApplied()||i.updateColumnDataTypes(n),this._columnsUpdating=!0,i.updateSortingGrouping(n,!this._useSortingGroupingFromColumns),this._columnsUpdating=!1,o.sort=i.getSortDataSourceParameters(),o.group=i.getGroupDataSourceParameters(),n.sort(o.sort),n.group(o.group),o.sort=i.getSortDataSourceParameters(!n.remoteOperations().sorting),e.group=i.getGroupDataSourceParameters(!n.remoteOperations().grouping))}_handleColumnsChanged(e){const t=this,{changeTypes:i}=e,{optionNames:n}=e;let o,a,s;const r=function(e){var i;t._columnsController.columnsChanged.remove(r),t.updateItems({repaintChangesOnly:!1,virtualColumnsScrolling:null==e||null===(i=e.changeTypes)||void 0===i?void 0:i.virtualColumnsScrolling})};if(i.sorting||i.grouping)t._dataSource&&!t._columnsUpdating&&(t._dataSource.group(t._columnsController.getGroupDataSourceParameters()),t._dataSource.sort(t._columnsController.getSortDataSourceParameters()),t.reload());else if(i.columns&&(a=t._columnsController.columnOption(e.columnIndex,"filterValues"),(n.filterValues||n.filterType&&Array.isArray(a)||n.filterValue||n.selectedFilterOperation||n.allowFiltering)&&(o=t._columnsController.columnOption(e.columnIndex,"filterValue"),(Array.isArray(a)||void 0===e.columnIndex||(0,c.isDefined)(o)||!n.selectedFilterOperation||n.filterValue)&&(t._applyFilter(),s=!0)),t._needApplyFilter||g.default.checkChanges(n,["width","visibleWidth","filterValue","bufferedFilterValue","selectedFilterOperation","filterValues","filterType"])||t._columnsController.columnsChanged.add(r),(0,c.isDefined)(n.visible))){const i=t._columnsController.columnOption(e.columnIndex);i&&((0,c.isDefined)(i.filterValue)||(0,c.isDefined)(i.filterValues))&&(t._applyFilter(),s=!0)}s||!i.filtering||this._needApplyFilter||t.reload()}_handleDataChanged(e){const t=this,i=t._dataSource,n=t._columnsController;let o=!1;this._useSortingGroupingFromColumns=!1,i&&!t._isDataSourceApplying&&(t._isDataSourceApplying=!0,(0,l.when)(t._columnsController.applyDataSource(i)).done((()=>{t._isLoading&&t._handleLoadingChanged(!1),o&&e&&e.isDelayed&&(e.isDelayed=!1),t._isDataSourceApplying=!1;const i=t._needApplyFilter;t._needApplyFilter=!1,i&&!t._isAllDataTypesDefined&&(()=>{const e=t._calculateAdditionalFilter();return e&&e.length})()?(h.default.log("W1005",t.component.NAME),t._applyFilter()):t.updateItems(e,!0)})).fail((()=>{t._isDataSourceApplying=!1})),t._isDataSourceApplying&&(o=!0,t._handleLoadingChanged(!0)),t._needApplyFilter=!t._columnsController.isDataSourceApplied(),t._isAllDataTypesDefined=n.isAllDataTypesDefined())}_handleLoadingChanged(e){this._isLoading=e,this._fireLoadingChanged()}_handleLoadError(e){this.dataErrorOccurred.fire(e)}_handleDataPushed(e){this.pushed.fire(e)}fireError(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.dataErrorOccurred.fire(h.default.Error.apply(h.default,t))}_setPagingOptions(e){const t=this.option("paging.pageIndex"),i=this.option("paging.pageSize"),n=this.option("paging.enabled"),o=this.option("scrolling.mode"),a="infinite"===o,s=n||"virtual"===o||a;let r=!1,l=!1,d=!1;return e.requireTotalCount(!a),void 0!==n&&e.paginate()!==s&&(e.paginate(s),r=!0),void 0!==i&&e.pageSize()!==i&&(e.pageSize(i),l=!0),void 0!==t&&e.pageIndex()!==t&&(e.pageIndex(t),d=!0),!!(r||l||d)&&{isPaginateChanged:r,isPageSizeChanged:l,isPageIndexChanged:d}}_getSpecificDataSourceOption(){const e=this.option("dataSource");return Array.isArray(e)?{store:{type:"array",data:e,key:this.option("keyExpr")}}:e}_initDataSource(){const e=this,t=this._dataSource;super._initDataSource();const i=e._dataSource;if(e._useSortingGroupingFromColumns=!0,e._cachedProcessedItems=null,i){const t=e._setPagingOptions(i);this._isPaging=null==t?void 0:t.isPageIndexChanged,e.setDataSource(i)}else t&&e.updateItems()}_loadDataSource(){const e=this,t=e._dataSource,i=new l.Deferred;return(0,l.when)(this._columnsController.refresh(!0)).always((()=>{t?t.load().done((function(){e._isPaging=!1,i.resolve.apply(i,arguments)})).fail(i.reject):i.resolve()})),i.promise()}_beforeProcessItems(e){return e.slice(0)}getRowIndexDelta(){return 0}getDataIndex(e){const t=this._items,i="append"===e.changeType&&t.length>0?t[t.length-1]:null;return(0,c.isDefined)(null==i?void 0:i.dataIndex)?i.dataIndex+1:0}_processItems(e,t){const i=this,n=i.getRowIndexDelta(),{changeType:o}=t,a={visibleColumns:i._columnsController.getVisibleColumns(null,"loadingAll"===o),dataIndex:this.getDataIndex(t)},s=[];return(0,u.each)(e,((e,t)=>{(0,c.isDefined)(t)&&(a.rowIndex=e-n,t=i._processItem(t,a),s.push(t))})),s}_processItem(e,t){return e=this._generateDataItem(e,t),(e=this._processDataItem(e,t)).dataIndex=t.dataIndex++,e}_generateDataItem(e,t){return{rowType:"data",data:e,key:this.keyOf(e)}}_processDataItem(e,t){return e.values=this.generateDataValues(e.data,t.visibleColumns),e}generateDataValues(e,t,i){const n=[];let o;for(let a=0;a<t.length;a++){const s=t[a];o=i?void 0:null,s.command||(s.calculateCellValue?o=s.calculateCellValue(e):s.dataField&&(o=e[s.dataField])),n.push(o)}return n}_applyChange(e){const t=this;"update"===e.changeType?t._applyChangeUpdate(e):t.items().length&&e.repaintChangesOnly&&"refresh"===e.changeType?t._applyChangesOnly(e):"refresh"===e.changeType&&t._applyChangeFull(e)}_applyChangeFull(e){this._items=e.items.slice(0)}_getRowIndices(e){const t=e.rowIndices.slice(0),i=this.getRowIndexDelta();t.sort(((e,t)=>e-t));for(let n=0;n<t.length;n++){let o=t[n];e.allowInvisibleRowIndices&&(o+=i),o<0&&(t.splice(n,1),n--)}return t}_applyChangeUpdate(e){const t=this,{items:i}=e,n=t._getRowIndices(e),o=t.getRowIndexDelta(),a=t.option("repaintChangesOnly");let s,l=-1,d=0;e.items=[],e.rowIndices=[],e.columnIndices=[],e.changeTypes=[];const c=function(e,t,i){let n=e&&t&&(0,r.equalByValue)(e.key,t.key);return n&&i&&(n=e.rowType===t.rowType&&("detail"!==t.rowType||e.isEditing===t.isEditing)),n};(0,u.each)(n,((n,r)=>{let u;if(l===(r+=d+o))return;l=r;const h=t._items[r],p=t._items[r+1],g=i[r],_=i[r+1],f=c(h,p)||c(g,_);if(g&&(g.rowIndex=r,e.items.push(g)),h&&g&&c(h,g,f))s="update",t._items[r]=g,h.visible!==g.visible?e.items.splice(-1,1,{visible:g.visible}):a&&!e.isFullUpdate&&(u=t._partialUpdateRow(h,g,r-o));else if(g&&!h||_&&c(h,_,f))s="insert",t._items.splice(r,0,g),d++;else if(h&&!g||p&&c(g,p,f))s="remove",t._items.splice(r,1),d--,l=-1;else{if(!g)return;s="update",t._items[r]=g}e.rowIndices.push(r-o),e.changeTypes.push(s),e.columnIndices.push(u)}))}_isCellChanged(e,t,i,n,o){if(JSON.stringify(e.values[n])!==JSON.stringify(t.values[n]))return!0;function a(e,t){return!!e.modifiedValues&&void 0!==e.modifiedValues[t]}return a(e,n)!==a(t,n)}_getChangedColumnIndices(e,t,i,n){let o;if(e.rowType===t.rowType){if("group"!==t.rowType&&"groupFooter"!==t.rowType&&(o=[],"detail"!==t.rowType))for(let a=0;a<e.values.length;a++)this._isCellChanged(e,t,i,a,n)&&o.push(a);if("group"===t.rowType&&e.cells){t.isExpanded===e.isExpanded&&t.data.isContinuation===e.data.isContinuation&&t.data.isContinuationOnNextPage===e.data.isContinuationOnNextPage&&(o=e.cells.map(((e,t)=>{var i;return"groupExpand"!==(null===(i=e.column)||void 0===i?void 0:i.type)?t:-1})).filter((e=>e>=0)))}}return o}_partialUpdateRow(e,t,i,n){var o;let a=this._getChangedColumnIndices(e,t,i,n);return null!==(o=a)&&void 0!==o&&o.length&&this.option("dataRowTemplate")&&(a=void 0),a&&(e.cells&&e.cells.forEach(((e,i)=>{!(a.indexOf(i)>=0)&&e&&e.update&&e.update(t)})),t.update=e.update,t.watch=e.watch,t.cells=e.cells,n&&(t.oldValues=e.values),e.update&&e.update(t)),a}_isItemEquals(e,t){if(JSON.stringify(e.values)!==JSON.stringify(t.values))return!1;if(["modified","isNewRow","removed","isEditing"].some((i=>e[i]!==t[i])))return!1;if("group"===e.rowType||"groupFooter"===e.rowType){var i,n,o,a;const s=e.isExpanded===t.isExpanded,r=JSON.stringify(e.summaryCells)===JSON.stringify(t.summaryCells),l=(null===(i=e.data)||void 0===i?void 0:i.isContinuation)===(null===(n=t.data)||void 0===n?void 0:n.isContinuation)&&(null===(o=e.data)||void 0===o?void 0:o.isContinuationOnNextPage)===(null===(a=t.data)||void 0===a?void 0:a.isContinuationOnNextPage);if(!s||!r||!l)return!1}return!0}_applyChangesOnly(e){const t=[],i=[],n=[],o=[],a={},r=(null==e?void 0:e.isLiveUpdate)??!0;function l(e){if(e)return`${e.rowType},${JSON.stringify(e.key)}`}const d=this._items,u=d.slice();e.items.forEach(((e,t)=>{const i=l(e);a[i]=t,e.rowIndex=t}));const c=(0,s.findChanges)(u,e.items,l,((e,t)=>!!this._isItemEquals(e,t)&&(e.cells&&(e.update&&e.update(t),e.cells.forEach((e=>{e&&e.update&&e.update(t,!0)}))),!0)));c?(c.forEach((e=>{switch(e.type){case"update":{const{index:a}=e,s=e.data,{oldItem:l}=e,u=this._partialUpdateRow(l,s,a,r);t.push(a),n.push("update"),o.push(s),d[a]=s,i.push(u);break}case"insert":t.push(e.index),n.push("insert"),o.push(e.data),i.push(void 0),d.splice(e.index,0,e.data);break;case"remove":t.push(e.index),n.push("remove"),d.splice(e.index,1),o.push(e.oldItem),i.push(void 0)}})),e.repaintChangesOnly=!0,e.changeType="update",e.rowIndices=t,e.columnIndices=i,e.changeTypes=n,e.items=o,u.length&&(e.isLiveUpdate=!0),this._correctRowIndices((e=>{const t=this._rowIndexOffset||0,i=this.getRowIndexOffset(),n=l(u[e-t]),o=a[n];return o>=0?o+i-e:0}))):this._applyChangeFull(e)}_correctRowIndices(e){}_afterProcessItems(e,t){return e}_updateItemsCore(e){let t;const i=this._dataSource,n=e.changeType||"refresh";if(e.changeType=n,i){const n=this._cachedProcessedItems;e.useProcessedItemsCache&&n?t=n:(t=e.items||i.items(),t=this._beforeProcessItems(t),t=this._processItems(t,e),this._cachedProcessedItems=t),t=this._afterProcessItems(t,e),e.items=t;const o=this._items.length===t.length&&this._items;this._applyChange(e);const a=this.getRowIndexDelta();(0,u.each)(this._items,((e,i)=>{i.rowIndex=e-a,o&&(i.cells=o[e].cells??[]);const n=t[e];n&&(i.loadIndex=n.loadIndex)})),this._rowIndexOffset=this.getRowIndexOffset()}else this._items=[]}_handleChanging(e){const t=this.getVisibleRows();this.dataSource()&&e.changes.forEach((e=>{if("insert"===e.type&&e.index>=0){let i=0;for(let n=0;n<e.index;n++){const e=t[n];!e||"data"!==e.rowType&&"group"!==e.rowType||i++}e.index=i}}))}updateItems(e,t){e=e||{};const i=this;if(void 0!==i._repaintChangesOnly)e.repaintChangesOnly=e.repaintChangesOnly??i._repaintChangesOnly,e.needUpdateDimensions=e.needUpdateDimensions||i._needUpdateDimensions;else if(e.changes)e.repaintChangesOnly=i.option("repaintChangesOnly");else if(t){const t=i.dataSource().operationTypes();e.repaintChangesOnly=t&&!t.grouping&&!t.filtering&&i.option("repaintChangesOnly"),e.isDataChanged=!0,t&&(t.reload||t.paging||t.groupExpanding)&&(e.needUpdateDimensions=!0)}!i._updateLockCount||e.cancel?(i._updateItemsCore(e),e.cancel||i._fireChanged(e)):i._changes.push(e)}loadingOperationTypes(){const e=this.dataSource();return e&&e.loadingOperationTypes()||{}}_fireChanged(e){this._currentOperationTypes&&(e.operationTypes=this._currentOperationTypes,this._currentOperationTypes=null),(0,r.deferRender)((()=>{this.changed.fire(e)}))}isLoading(){return this._isLoading||this._isCustomLoading}_fireLoadingChanged(){this.loadingChanged.fire(this.isLoading(),this._loadingText)}_calculateAdditionalFilter(){return null}_applyFilter(){const e=this._dataSource;return e?(e.pageIndex(0),this._isFilterApplying=!0,this.reload().done((()=>{this._isFilterApplying&&this.pageChanged.fire()}))):(new l.Deferred).resolve()}resetFilterApplying(){this._isFilterApplying=!1}filter(e){const t=this._dataSource,i=t&&t.filter();if(0===arguments.length)return i;e=arguments.length>1?Array.prototype.slice.call(arguments,0):e,g.default.equalFilterParameters(i,e)||(t&&t.filter(e),this._applyFilter())}clearFilter(e){const t=this,i=t._columnsController,n=function(e){const t=i.columnCount();for(let n=0;n<t;n++)i.columnOption(n,e,void 0)};if(t.component.beginUpdate(),arguments.length>0)switch(e){case"dataSource":t.filter(null);break;case"search":t.searchByText("");break;case"header":n("filterValues");break;case"row":n("filterValue")}else t.filter(null),t.searchByText(""),n("filterValue"),n("bufferedFilterValue"),n("filterValues");t.component.endUpdate()}_fireDataSourceChanged(){const e=this,t=function(){e.changed.remove(t),e.dataSourceChanged.fire()};e.changed.add(t)}_getDataSourceAdapter(){}_createDataSourceAdapterCore(e,t){const i=this._getDataSourceAdapter().create(this.component);return i.init(e,t),i}isLocalStore(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.store())instanceof n.default}isCustomStore(e){return(e=e||this.store())instanceof o.CustomStore}_createDataSourceAdapter(e){let t=this.option("remoteOperations");const i=e.store(),n={filtering:!0,sorting:!0,paging:!0,grouping:!0,summary:!0};return(0,c.isObject)(t)&&t.groupPaging&&(t=(0,d.extend)({},n,t)),"auto"===t&&(t=this.isLocalStore(i)||this.isCustomStore(i)?{}:{filtering:!0,sorting:!0,paging:!0}),!0===t&&(t=n),this._createDataSourceAdapterCore(e,t)}setDataSource(e){const t=this,i=t._dataSource;!e&&i&&(i.cancelAll(),i.changed.remove(t._dataChangedHandler),i.loadingChanged.remove(t._loadingChangedHandler),i.loadError.remove(t._loadErrorHandler),i.customizeStoreLoadOptions.remove(t._customizeStoreLoadOptionsHandler),i.changing.remove(t._changingHandler),i.pushed.remove(t._dataPushedHandler),i.dispose(t._isSharedDataSource)),e&&(e=t._createDataSourceAdapter(e)),t._dataSource=e,e&&(t._fireDataSourceChanged(),t._isLoading=!e.isLoaded(),t._needApplyFilter=!0,t._isAllDataTypesDefined=t._columnsController.isAllDataTypesDefined(),e.changed.add(t._dataChangedHandler),e.loadingChanged.add(t._loadingChangedHandler),e.loadError.add(t._loadErrorHandler),e.customizeStoreLoadOptions.add(t._customizeStoreLoadOptionsHandler),e.changing.add(t._changingHandler),e.pushed.add(t._dataPushedHandler))}items(e){return this._items}isEmpty(){return!this.items().length}pageCount(){return this._dataSource?this._dataSource.pageCount():1}dataSource(){return this._dataSource}store(){const e=this._dataSource;return e&&e.store()}loadAll(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this,n=new l.Deferred,o=i._dataSource;if(o)if(e){const a={data:e,isCustomLoading:!0,storeLoadOptions:{isLoadingAll:!0},loadOptions:{filter:t?null:i.getCombinedFilter(),group:o.group(),sort:o.sort()}};o._handleDataLoaded(a),(0,l.when)(a.data).done((e=>{var t;e=i._beforeProcessItems(e),n.resolve(i._processItems(e,{changeType:"loadingAll"}),null===(t=a.extra)||void 0===t?void 0:t.summary)})).fail(n.reject)}else if(o.isLoading())n.reject();else{const e=(0,d.extend)({},o.loadOptions(),{isLoadingAll:!0,requireTotalCount:!1});o.load(e).done(((e,t)=>{e=i._beforeProcessItems(e),e=i._processItems(e,{changeType:"loadingAll"}),n.resolve(e,t&&t.summary)})).fail(n.reject)}else n.resolve([]);return n}getKeyByRowIndex(e,t){const i=this.items(t)[e];if(i)return i.key}getRowIndexByKey(e,t){return g.default.getIndexByKey(e,this.items(t))}keyOf(e){const t=this.store();if(t)return t.keyOf(e)}byKey(e){const t=this.store(),i=this.getRowIndexByKey(e);let n;if(t)return i>=0&&(n=(new l.Deferred).resolve(this.items()[i].data)),n||t.byKey(e)}key(){const e=this.store();if(e)return e.key()}getRowIndexOffset(e){return 0}getDataByKeys(e){const t=this,i=new l.Deferred,n=[],o=[];return(0,u.each)(e,((e,i)=>{n.push(t.byKey(i).done((t=>{o[e]=t})))})),l.when.apply(a.default,n).always((()=>{i.resolve(o)})),i}pageIndex(e){return m(this,"pageIndex",e)}pageSize(e){return m(this,"pageSize",e)}beginCustomLoading(e){this._isCustomLoading=!0,this._loadingText=e||"",this._fireLoadingChanged()}endCustomLoading(){this._isCustomLoading=!1,this._loadingText=void 0,this._fireLoadingChanged()}refresh(e){!0===e?e={reload:!0,changesOnly:!0}:e||(e={lookup:!0,selection:!0,reload:!0});const t=this,i=t.getDataSource(),{changesOnly:n}=e,o=new l.Deferred,a=function(){t._repaintChangesOnly=!!n};return(0,l.when)(!e.lookup||t._columnsController.refresh()).always((()=>{e.load||e.reload?(i&&i.on("customizeLoadResult",a),(0,l.when)(t.reload(e.reload,n)).always((()=>{i&&i.off("customizeLoadResult",a),t._repaintChangesOnly=void 0})).done(o.resolve).fail(o.reject)):(t.updateItems({repaintChangesOnly:e.changesOnly}),o.resolve())})),o.promise()}getVisibleRows(){return this.items()}_disposeDataSource(){this._dataSource&&this._dataSource._eventsStrategy&&this._dataSource._eventsStrategy.off("loadingChanged",this.readyWatcher),this.setDataSource(null)}dispose(){this._disposeDataSource(),super.dispose()}repaintRows(e,t){((e=Array.isArray(e)?e:[e]).length>1||(0,c.isDefined)(e[0]))&&this.updateItems({changeType:"update",rowIndices:e,isFullUpdate:!t})}skipProcessingPagingChange(e){return this._skipProcessingPagingChange&&("paging.pageIndex"===e||"paging.pageSize"===e)}getUserState(){return{searchText:this.option("searchPanel.text"),pageIndex:this.pageIndex(),pageSize:this.pageSize()}}getCachedStoreData(){return this._dataSource&&this._dataSource.getCachedStoreData()}isLastPageLoaded(){return this.pageIndex()===this.pageCount()-1}load(){var e;return null===(e=this._dataSource)||void 0===e?void 0:e.load()}reload(e,t){var i;return null===(i=this._dataSource)||void 0===i?void 0:i.reload(e,t)}push(){for(var e,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return null===(e=this._dataSource)||void 0===e?void 0:e.push(...i)}itemsCount(){var e;return this._dataSource?null===(e=this._dataSource)||void 0===e?void 0:e.itemsCount():0}totalItemsCount(){var e;return this._dataSource?null===(e=this._dataSource)||void 0===e?void 0:e.totalItemsCount():0}hasKnownLastPage(){var e;return!this._dataSource||(null===(e=this._dataSource)||void 0===e?void 0:e.hasKnownLastPage())}isLoaded(){var e;return!this._dataSource||(null===(e=this._dataSource)||void 0===e?void 0:e.isLoaded())}totalCount(){var e;return this._dataSource?null===(e=this._dataSource)||void 0===e?void 0:e.totalCount():0}hasLoadOperation(){var e;const t=(null===(e=this._dataSource)||void 0===e?void 0:e.operationTypes())??{};return Object.keys(t).some((e=>t[e]))}}t.DataController=v;t.dataControllerModule={defaultOptions:()=>({loadingTimeout:0,dataSource:null,cacheEnabled:!0,repaintChangesOnly:!1,highlightChanges:!1,onDataErrorOccurred:null,remoteOperations:"auto",paging:{enabled:!0,pageSize:void 0,pageIndex:void 0}}),controllers:{data:v}}},68910:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DataHelperMixin=void 0;var n,o=i(68216),a=i(97169),s=i(52576),r=(n=i(5285))&&n.__esModule?n:{default:n};const l="_dataSourceOptions",d="_dataSourceChangedHandler",u="_dataSourceLoadErrorHandler",c="_dataSourceLoadingChangedHandler",h="_dataSourceFromUrlLoadMode",p="_getSpecificDataSourceOption",g="_normalizeDataSource";t.DataHelperMixin=e=>class extends e{postCtor(){this.on("disposing",(()=>{this._disposeDataSource()}))}_refreshDataSource(){this._initDataSource(),this._loadDataSource()}_initDataSource(){let e,t,i=p in this?this[p]():this.option("dataSource");this._disposeDataSource(),i&&(i instanceof o.DataSource?(this._isSharedDataSource=!0,this._dataSource=i):(e=l in this?this[l]():{},t=this._dataSourceType?this._dataSourceType():o.DataSource,i=(0,a.normalizeDataSourceOptions)(i,{fromUrlLoadMode:h in this&&this[h]()}),this._dataSource=new t((0,s.extend)(!0,{},e,i))),g in this&&(this._dataSource=this[g](this._dataSource)),this._addDataSourceHandlers(),this._initDataController())}_initDataController(){var e;const t=null===(e=this.option)||void 0===e?void 0:e.call(this,"_dataController"),i=this._dataSource;this._dataController=t||new r.default(i)}_addDataSourceHandlers(){d in this&&this._addDataSourceChangeHandler(),u in this&&this._addDataSourceLoadErrorHandler(),c in this&&this._addDataSourceLoadingChangedHandler(),this._addReadyWatcher()}_addReadyWatcher(){this.readyWatcher=function(e){this._ready&&this._ready(!e)}.bind(this),this._dataSource.on("loadingChanged",this.readyWatcher)}_addDataSourceChangeHandler(){const e=this._dataSource;this._proxiedDataSourceChangedHandler=function(t){this[d](e.items(),t)}.bind(this),e.on("changed",this._proxiedDataSourceChangedHandler)}_addDataSourceLoadErrorHandler(){this._proxiedDataSourceLoadErrorHandler=this[u].bind(this),this._dataSource.on("loadError",this._proxiedDataSourceLoadErrorHandler)}_addDataSourceLoadingChangedHandler(){this._proxiedDataSourceLoadingChangedHandler=this[c].bind(this),this._dataSource.on("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)}_loadDataSource(){const e=this._dataSource;e&&(e.isLoaded()?this._proxiedDataSourceChangedHandler&&this._proxiedDataSourceChangedHandler():e.load())}_loadSingle(e,t){return e="this"===e?this._dataSource.key()||"this":e,this._dataSource.loadSingle(e,t)}_isLastPage(){return!this._dataSource||this._dataSource.isLastPage()||!this._dataSource._pageSize}_isDataSourceLoading(){return this._dataSource&&this._dataSource.isLoading()}_disposeDataSource(){this._dataSource&&(this._isSharedDataSource?(delete this._isSharedDataSource,this._proxiedDataSourceChangedHandler&&this._dataSource.off("changed",this._proxiedDataSourceChangedHandler),this._proxiedDataSourceLoadErrorHandler&&this._dataSource.off("loadError",this._proxiedDataSourceLoadErrorHandler),this._proxiedDataSourceLoadingChangedHandler&&this._dataSource.off("loadingChanged",this._proxiedDataSourceLoadingChangedHandler),this._dataSource._eventsStrategy&&this._dataSource._eventsStrategy.off("loadingChanged",this.readyWatcher)):this._dataSource.dispose(),delete this._dataSource,delete this._proxiedDataSourceChangedHandler,delete this._proxiedDataSourceLoadErrorHandler,delete this._proxiedDataSourceLoadingChangedHandler)}getDataSource(){return this._dataSource||null}}},3120:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=g(i(80556)),o=i(43792),a=g(i(84718)),s=i(17781),r=i(87739),l=i(52576),d=i(21274),u=i(11528),c=g(i(74854)),h=g(i(53226)),p=i(39394);function g(e){return e&&e.__esModule?e:{default:e}}class _ extends c.default.Controller{init(e,t){const i=this;i._dataSource=e,i._remoteOperations=t||{},i._isLastPage=!e.isLastPage(),i._hasLastPage=!1,i._currentTotalCount=0,i._cachedData=(0,p.createEmptyCachedData)(),i._lastOperationTypes={},i._eventsStrategy=e._eventsStrategy,i._totalCountCorrection=0,i._isLoadingAll=!1,i.changed=(0,a.default)(),i.loadingChanged=(0,a.default)(),i.loadError=(0,a.default)(),i.customizeStoreLoadOptions=(0,a.default)(),i.changing=(0,a.default)(),i.pushed=(0,a.default)(),i._dataChangedHandler=i._handleDataChanged.bind(i),i._customizeStoreLoadOptionsHandler=i._handleCustomizeStoreLoadOptions.bind(i),i._dataLoadedHandler=i._handleDataLoaded.bind(i),i._loadingChangedHandler=i._handleLoadingChanged.bind(i),i._loadErrorHandler=i._handleLoadError.bind(i),i._pushHandler=i._handlePush.bind(i),i._changingHandler=i._handleChanging.bind(i),e.on("changed",i._dataChangedHandler),e.on("customizeStoreLoadOptions",i._customizeStoreLoadOptionsHandler),e.on("customizeLoadResult",i._dataLoadedHandler),e.on("loadingChanged",i._loadingChangedHandler),e.on("loadError",i._loadErrorHandler),e.on("changing",i._changingHandler),e.store().on("beforePush",i._pushHandler),(0,d.each)(e,((e,t)=>{!i[e]&&(0,u.isFunction)(t)&&(i[e]=function(){return this._dataSource[e].apply(this._dataSource,arguments)})}))}dispose(e){const t=this,i=t._dataSource,n=i.store();i.off("changed",t._dataChangedHandler),i.off("customizeStoreLoadOptions",t._customizeStoreLoadOptionsHandler),i.off("customizeLoadResult",t._dataLoadedHandler),i.off("loadingChanged",t._loadingChangedHandler),i.off("loadError",t._loadErrorHandler),i.off("changing",t._changingHandler),n&&n.off("beforePush",t._pushHandler),e||i.dispose()}remoteOperations(){return this._remoteOperations}refresh(e,t){const i=this,n=i._dataSource;t.reload&&(i.resetCurrentTotalCount(),i._isLastPage=!n.paginate(),i._hasLastPage=i._isLastPage)}resetCurrentTotalCount(){this._currentTotalCount=0,this._totalCountCorrection=0}resetCache(){this._cachedStoreData=void 0,this._cachedPagingData=void 0}resetPagesCache(e){this._cachedData=(0,p.createEmptyCachedData)()}_needClearStoreDataCache(){const e=this.remoteOperations(),t=(0,p.calculateOperationTypes)(this._lastLoadOptions||{},{});return!Object.keys(e).every((i=>!t[i]||!e[i]))}push(e,t){const i=this.store();this._needClearStoreDataCache()&&(this._cachedStoreData=void 0),this._cachedPagingData=void 0,this.resetPagesCache(!0),this._cachedStoreData&&(0,o.applyBatch)({keyInfo:i,data:this._cachedStoreData,changes:e}),t||this._applyBatch(e),this.pushed.fire(e)}getDataIndexGetter(){if(!this._dataIndexGetter){let e,t;const i=this.store();this._dataIndexGetter=n=>{const o=t&&t!==this._cachedStoreData;if(!e||o){t=this._cachedStoreData||[],e={};for(let n=0;n<t.length;n++)e[(0,s.getKeyHash)(i.keyOf(t[n]))]=n}return e[(0,s.getKeyHash)(i.keyOf(n))]}}return this._dataIndexGetter}_getKeyInfo(){return this.store()}_needToCopyDataObject(){return!0}_applyBatch(e,t){const i=this._getKeyInfo(),n=this._dataSource,a=h.default.normalizeSortingInfo(this.group()).length,s="reshape"===this.option("editing.refreshMode"),r="virtual"===this.option("scrolling.mode");e=e.filter((e=>!n.paginate()||"insert"!==e.type||void 0!==e.index));const l=()=>a?this.itemsCount():this.items().length,d=l();(0,o.applyBatch)({keyInfo:i,data:this._items,changes:e,groupCount:a,useInsertIndex:!0,skipCopying:!this._needToCopyDataObject()}),(0,o.applyBatch)({keyInfo:i,data:n.items(),changes:e,groupCount:a,useInsertIndex:!0,skipCopying:!this._needToCopyDataObject()});(this._currentTotalCount>0||(t||!s)&&r)&&(this._totalCountCorrection+=l()-d),e.splice(0,e.length)}_handlePush(e){let{changes:t}=e;this.push(t,!0)}_handleChanging(e){this.changing.fire(e),this._applyBatch(e.changes,!0)}_needCleanCacheByOperation(e,t){const i=["filtering","sorting","paging"],n=i.indexOf(e);return(n>=0?i.slice(n):[e]).some((e=>t[e]))}_customizeRemoteOperations(e,t){let i=this._cachedStoreData,n=this._cachedPagingData,o=this._cachedData;(e.storeLoadOptions.filter&&!e.remoteOperations.filtering||e.storeLoadOptions.sort&&!e.remoteOperations.sorting)&&(e.remoteOperations={filtering:e.remoteOperations.filtering,summary:e.remoteOperations.summary}),t.fullReload?(i=void 0,n=void 0,o=(0,p.createEmptyCachedData)()):(t.reload?(n=void 0,o=(0,p.createEmptyCachedData)()):t.groupExpanding&&(o=(0,p.createEmptyCachedData)()),(0,d.each)(t,((t,o)=>{o&&this._needCleanCacheByOperation(t,e.remoteOperations)&&(i=void 0,n=void 0)}))),n&&(e.remoteOperations.paging=!1),e.cachedStoreData=i,e.cachedPagingData=n,e.cachedData=o,e.isCustomLoading||(this._cachedStoreData=i,this._cachedPagingData=n,this._cachedData=o)}_handleCustomizeStoreLoadOptions(e){var t;this._handleDataLoading(e),0!==(null===(t=e.data)||void 0===t?void 0:t.length)&&(e.data=(0,p.getPageDataFromCache)(e,!0)||e.cachedStoreData)}_handleDataLoading(e){const t=this._dataSource,i=this._lastLoadOptions;this.customizeStoreLoadOptions.fire(e),e.delay=this.option("loadingTimeout"),e.originalStoreLoadOptions=e.storeLoadOptions,e.remoteOperations=(0,l.extend)({},this.remoteOperations());const n=!this.isLoaded()&&!this._isRefreshing;this.option("integrationOptions.renderedOnServer")&&!this.isLoaded()&&(e.delay=void 0);const o=(0,l.extend)({pageIndex:this.pageIndex(),pageSize:this.pageSize()},e.storeLoadOptions),a=(0,p.calculateOperationTypes)(o,i,n);if(this._customizeRemoteOperations(e,a),!e.isCustomLoading){const i=this._isRefreshing;e.pageIndex=t.pageIndex(),e.lastLoadOptions=o,e.operationTypes=a,this._loadingOperationTypes=a,this._isRefreshing=!0,(0,r.when)(i||this._isRefreshed||this.refresh(e,a)).done((()=>{this._lastOperationId===e.operationId&&(this._isRefreshed=!0,this.load().always((()=>{this._isRefreshed=!1})))})).fail((()=>{t.cancel(e.operationId)})).always((()=>{this._isRefreshing=!1})),t.cancel(this._lastOperationId),this._lastOperationId=e.operationId,this._isRefreshing&&t.cancel(this._lastOperationId)}this._handleDataLoadingCore(e)}_handleDataLoadingCore(e){const{remoteOperations:t}=e;e.loadOptions={};const i=e.cachedData.extra,n={filter:!t.filtering,sort:!t.sorting,group:!t.grouping,summary:!t.summary,skip:!t.paging,take:!t.paging,requireTotalCount:i&&"totalCount"in i||!t.paging,langParams:!t.filtering||!t.sorting};(0,d.each)(e.storeLoadOptions,((t,i)=>{n[t]&&(e.loadOptions[t]=i,delete e.storeLoadOptions[t])})),i&&(e.extra=i)}_handleDataLoaded(e){const{loadOptions:t}=e,i=e.remoteOperations&&!e.remoteOperations.paging,{cachedData:o}=e,{storeLoadOptions:a}=e,s=!1!==this.option("cacheEnabled")&&a,d=s&&!e.isCustomLoading&&o&&(!i||a.group),c=s&&i,g=c&&!e.isCustomLoading;if(!t)return void this._dataSource.cancel(e.operationId);i&&(e.skip=t.skip,e.take=t.take,delete t.skip,delete t.take),t.group&&(t.group=e.group||t.group);const _=h.default.normalizeSortingInfo(e.group||a.group||t.group).length;var f;(e.cachedDataPartBegin&&(e.data=e.cachedDataPartBegin.concat(e.data)),e.cachedDataPartEnd&&(e.data=e.data.concat(e.cachedDataPartEnd)),d&&(0,p.getPageDataFromCache)(e))||(c&&e.cachedPagingData?e.data=(0,p.cloneItems)(e.cachedPagingData,_):(g&&(this._cachedStoreData?e.mergeStoreLoadData&&(e.data=this._cachedStoreData=this._cachedStoreData.concat(e.data)):this._cachedStoreData=(0,p.cloneItems)(e.data,h.default.normalizeSortingInfo(a.group).length)),new n.default(e.data).load(t).done((t=>{e.data=t,g&&(this._cachedPagingData=(0,p.cloneItems)(e.data,_))})).fail((t=>{e.data=(new r.Deferred).reject(t)}))),t.requireTotalCount&&i&&(e.extra=(0,u.isPlainObject)(e.extra)?e.extra:{},e.extra.totalCount=e.data.length),e.extra&&e.extra.totalCount>=0&&(!1===a.requireTotalCount||!1===t.requireTotalCount)&&(e.extra.totalCount=-1),!t.data&&(a.requireTotalCount||((null===(f=e.extra)||void 0===f?void 0:f.totalCount)??-1)>=0)&&(this._totalCountCorrection=0),this._handleDataLoadedCore(e),d&&(o.extra=o.extra||(0,l.extend)({},e.extra),(0,r.when)(e.data).done((t=>{(0,p.setPageDataToCache)(e,t,_)}))));(0,r.when)(e.data).done((()=>{e.lastLoadOptions&&(this._lastLoadOptions=e.lastLoadOptions,Object.keys(e.operationTypes).forEach((t=>{this._lastOperationTypes[t]=this._lastOperationTypes[t]||e.operationTypes[t]})))})),e.storeLoadOptions=e.originalStoreLoadOptions}_handleDataLoadedCore(e){e.remoteOperations&&!e.remoteOperations.paging&&Array.isArray(e.data)&&(void 0!==e.skip&&(e.data=e.data.slice(e.skip)),void 0!==e.take&&(e.data=e.data.slice(0,e.take)))}_handleLoadingChanged(e){this.loadingChanged.fire(e)}_handleLoadError(e){this.loadError.fire(e),this.changed.fire({changeType:"loadError",error:e})}_loadPageSize(){return this.pageSize()}_handleDataChanged(e){let t;const i=this._dataSource;let n=!1;const o=!e||(0,u.isDefined)(e.changeType),a=this.itemsCount();o&&(this._isLastPage=!a||!this._loadPageSize()||a<this._loadPageSize(),this._isLastPage&&(this._hasLastPage=!0)),i.totalCount()>=0?i.pageIndex()>=this.pageCount()&&(i.pageIndex(this.pageCount()-1),this.pageIndex(i.pageIndex()),this.resetPagesCache(),i.load(),n=!0):o&&(t=i.pageIndex()*this.pageSize()+a,t>this._currentTotalCount&&(this._currentTotalCount=t,0!==i.pageIndex()&&this.option("scrolling.legacyMode")||(this._totalCountCorrection=0)),0===a&&i.pageIndex()>=this.pageCount()&&(i.pageIndex(this.pageCount()-1),"infinite"!==this.option("scrolling.mode")&&(i.load(),n=!0))),n||(this._operationTypes=this._lastOperationTypes,this._lastOperationTypes={},this.component._optionCache={},this.changed.fire(e),this.component._optionCache=void 0)}_scheduleCustomLoadCallbacks(e){const t=this;t._isCustomLoading=!0,e.always((()=>{t._isCustomLoading=!1}))}loadingOperationTypes(){return this._loadingOperationTypes}operationTypes(){return this._operationTypes}lastLoadOptions(){return this._lastLoadOptions||{}}isLastPage(){return this._isLastPage}_dataSourceTotalCount(){return this._dataSource.totalCount()}_changeRowExpandCore(e){}changeRowExpand(e){}totalCount(){return parseInt((this._currentTotalCount||this._dataSourceTotalCount())+this._totalCountCorrection)}totalCountCorrection(){return this._totalCountCorrection}items(){}itemsCount(){return this._dataSource.items().length}totalItemsCount(){return this.totalCount()}pageSize(){const e=this._dataSource;return arguments.length||e.paginate()?e.pageSize.apply(e,arguments):0}pageCount(){const e=this,t=e.totalItemsCount()-e._totalCountCorrection,i=e.pageSize();return i&&t>0?Math.max(1,Math.ceil(t/i)):1}hasKnownLastPage(){return this._hasLastPage||this._dataSource.totalCount()>=0}loadFromStore(e,t){const i=this._dataSource,n=new r.Deferred;if(i)return(t=t||i.store()).load(e).done(((e,t)=>{e&&!Array.isArray(e)&&Array.isArray(e.data)&&(t=e,e=e.data),n.resolve(e,t)})).fail(n.reject),n}isCustomLoading(){return!!this._isCustomLoading}load(e){const t=this,i=t._dataSource,n=new r.Deferred;if(e){const o=i.store(),a=i.loadOptions(),s={storeLoadOptions:(0,l.extend)({},e,{langParams:null==a?void 0:a.langParams}),isCustomLoading:!0};return(0,d.each)(o._customLoadOptions()||[],((e,t)=>{t in s.storeLoadOptions||(s.storeLoadOptions[t]=a[t])})),this._isLoadingAll=e.isLoadingAll,t._scheduleCustomLoadCallbacks(n),i._scheduleLoadCallbacks(n),t._handleCustomizeStoreLoadOptions(s),(0,p.executeTask)((()=>{if(!i.store())return n.reject("canceled");(0,r.when)(s.data||t.loadFromStore(s.storeLoadOptions)).done(((i,a)=>{s.data=i,s.extra=a||{},t._handleDataLoaded(s),e.requireTotalCount&&void 0===s.extra.totalCount&&(s.extra.totalCount=o.totalCount(s.storeLoadOptions)),(0,r.when)(s.data,s.extra.totalCount).done(((e,t)=>{s.extra.totalCount=t,n.resolve(e,s.extra)})).fail(n.reject)})).fail(n.reject)}),t.option("loadingTimeout")),n.fail((function(){t._eventsStrategy.fireEvent("loadError",arguments)})).always((()=>{this._isLoadingAll=!1})).promise()}return i.load()}reload(e){return e?this._dataSource.reload():this._dataSource.load()}getCachedStoreData(){return this._cachedStoreData}isLoaded(){}pageIndex(e){}}t.default=_},39394:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.updatePagingOptionsByCache=t.setPageDataToCache=t.getPageDataFromCache=t.getItemFromCache=t.getGroupItemFromCache=t.getCacheItem=t.fillItemsFromCache=t.executeTask=t.createEmptyCachedData=t.cloneItems=t.calculateOperationTypes=void 0;var n=i(52576),o=i(11528),a=r(i(39315)),s=r(i(53226));function r(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}const d=function(e,t){if(e&&(e=e.slice(0),t))for(let i=0;i<e.length;i++)e[i]=(0,n.extend)({key:e[i].key},e[i]),e[i].items=d(e[i].items,t-1);return e};t.cloneItems=d;t.calculateOperationTypes=function(e,t,i){let n={reload:!0,fullReload:!0};return t&&(n={sorting:!s.default.equalSortParameters(e.sort,t.sort),grouping:!s.default.equalSortParameters(e.group,t.group,!0),groupExpanding:!s.default.equalSortParameters(e.group,t.group)||t.groupExpand,filtering:!s.default.equalFilterParameters(e.filter,t.filter),pageIndex:e.pageIndex!==t.pageIndex,skip:e.skip!==t.skip,take:e.take!==t.take,pageSize:e.pageSize!==t.pageSize,fullReload:i,reload:!1,paging:!1},n.reload=i||n.sorting||n.grouping||n.filtering,n.paging=n.pageIndex||n.pageSize||n.take),n};t.executeTask=function(e,t){(0,o.isDefined)(t)?a.default.executeAsync(e,t):e()};t.createEmptyCachedData=function(){return{items:{}}};t.getPageDataFromCache=function(e,t){const i=s.default.normalizeSortingInfo(e.group||e.storeLoadOptions.group||e.loadOptions.group).length,n=[];if(u(n,e,i))return n;t&&p(n,e,i)};const u=function(e,t,i,n){var o;const{storeLoadOptions:a}=t,s=t.take??a.take??0,r=null===(o=t.cachedData)||void 0===o?void 0:o.items;if(s&&r){const o=t.skip??a.skip??0;for(let a=0;a<s;a+=1){const l=n?s-1-a:a,d=l+o,u=r[d];if(void 0===u&&d in r)return!0;const h=c(t,u,i,l,s);if(!h)return!1;e.push(h)}return!0}return!1};t.fillItemsFromCache=u;const c=function(e,t,i,n,o){if(i&&t){const a=0===n&&e.skips||[],s=n===o-1&&e.takes||[];return h(t,i,a,s)}return t};t.getItemFromCache=c;const h=function(e,t,i,n){if(t&&e){const o=l({},e),a=i[0]||0,s=n[0],{items:r}=e;if(r){if(void 0===s&&!r[a])return;o.items=[],i.length&&(o.isContinuation=!0),s&&(o.isContinuationOnNextPage=e.count>s);for(let e=0;void 0===s?r[e+a]:e<s;e+=1){const l=r[e+a],d=e+1===s,u=h(l,t-1,0===e?i.slice(1):[],d?n.slice(1):[]);if(void 0===u)return;o.items.push(u)}}return o}return e};t.getGroupItemFromCache=h;const p=function(e,t,i){const n=e.length,{storeLoadOptions:o}=t;if(void 0!==o.skip&&o.take&&!i){const a=[];u(a,t,i,!0);const s=a.length;(n||s)&&(t.skip=t.skip??o.skip,t.take=t.take??o.take),n&&(o.skip+=n,o.take-=n,t.cachedDataPartBegin=e),s&&(o.take-=s,t.cachedDataPartEnd=a.reverse())}};t.updatePagingOptionsByCache=p;t.setPageDataToCache=function(e,t,i){const{storeLoadOptions:n}=e,o=e.skip??n.skip??0,a=e.take??n.take??0;for(let n=0;n<a;n+=1){const a=n+o,s=e.cachedData.items,r=0===n&&e.skips||[];s[a]=g(s[a],t[n],i,r)}};const g=function(e,t,i,n){if(i&&t){const o=l({},t);delete o.isContinuation,delete o.isContinuationOnNextPage;const a=n[0]||0;return t.items&&(o.items=(null==e?void 0:e.items)||{},t.items.forEach(((e,t)=>{const s=t+a,r=0===t?n.slice(1):[];o.items[s]=g(o.items[s],e,i-1,r)}))),o}return t};t.getCacheItem=g},69699:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VIEWPORT_TOP_NEW_ROW_POSITION=t.VIEWPORT_BOTTOM_NEW_ROW_POSITION=t.TARGET_COMPONENT_NAME=t.ROW_SELECTED_CLASS=t.ROW_SELECTED=t.ROW_REMOVED=t.ROW_MODIFIED=t.ROW_INSERTED=t.ROW_CLASS=t.ROW_BASED_MODES=t.REQUIRED_EDITOR_LABELLEDBY_MODES=t.READONLY_CLASS=t.PAGE_TOP_NEW_ROW_POSITION=t.PAGE_BOTTOM_NEW_ROW_POSITION=t.MODES_WITH_DELAYED_FOCUS=t.METHOD_NAMES=t.LINK_ICON_CLASS=t.LINK_CLASS=t.LAST_NEW_ROW_POSITION=t.INSERT_INDEX=t.FORM_BUTTONS_CONTAINER_CLASS=t.FOCUS_OVERLAY_CLASS=t.FOCUSABLE_ELEMENT_SELECTOR=t.FOCUSABLE_ELEMENT_CLASS=t.FIRST_NEW_ROW_POSITION=t.FILTER_ROW_CLASS=t.EDIT_ROW=t.EDIT_POPUP_FORM_CLASS=t.EDIT_POPUP_CLASS=t.EDIT_MODE_ROW=t.EDIT_MODE_POPUP=t.EDIT_MODE_FORM=t.EDIT_MODE_CELL=t.EDIT_MODE_BATCH=t.EDIT_MODES=t.EDIT_LINK_CLASS=t.EDIT_ICON_CLASS=t.EDIT_FORM_ITEM_CLASS=t.EDIT_FORM_CLASS=t.EDIT_BUTTON_CLASS=t.EDITOR_CELL_CLASS=t.EDITORS_INPUT_SELECTOR=t.EDITING_POPUP_OPTION_NAME=t.EDITING_NAMESPACE=t.EDITING_FORM_OPTION_NAME=t.EDITING_EDITROWKEY_OPTION_NAME=t.EDITING_EDITCOLUMNNAME_OPTION_NAME=t.EDITING_CHANGES_OPTION_NAME=t.DROPDOWN_EDITOR_OVERLAY_CLASS=t.DEFAULT_START_EDIT_ACTION=t.DATA_ROW_CLASS=t.DATA_EDIT_DATA_UPDATE_TYPE=t.DATA_EDIT_DATA_REMOVE_TYPE=t.DATA_EDIT_DATA_INSERT_TYPE=t.COMMAND_EDIT_WITH_ICONS_CLASS=t.COMMAND_EDIT_CLASS=t.CELL_MODIFIED_CLASS=t.CELL_MODIFIED=t.CELL_FOCUS_DISABLED_CLASS=t.CELL_BASED_MODES=t.BUTTON_NAMES=t.BUTTON_CLASS=t.ADD_ROW_BUTTON_CLASS=t.ACTION_OPTION_NAMES=void 0;var n,o=(n=i(20876))&&n.__esModule?n:{default:n};t.EDITOR_CELL_CLASS="dx-editor-cell",t.ROW_CLASS="dx-row",t.CELL_MODIFIED_CLASS="dx-cell-modified",t.ROW_SELECTED_CLASS="dx-selection",t.EDIT_FORM_CLASS="edit-form",t.DATA_EDIT_DATA_INSERT_TYPE="insert",t.DATA_EDIT_DATA_REMOVE_TYPE="remove",t.EDITING_POPUP_OPTION_NAME="editing.popup",t.EDITING_FORM_OPTION_NAME="editing.form",t.EDITING_EDITROWKEY_OPTION_NAME="editing.editRowKey",t.EDITING_EDITCOLUMNNAME_OPTION_NAME="editing.editColumnName",t.TARGET_COMPONENT_NAME="targetComponent";const a=t.EDITORS_INPUT_SELECTOR="input:not([type='hidden'])",s=(t.FOCUSABLE_ELEMENT_SELECTOR=`[tabindex]:not([disabled]), ${a}:not([disabled])`,t.EDIT_MODE_BATCH="batch"),r=t.EDIT_MODE_ROW="row",l=t.EDIT_MODE_CELL="cell",d=t.EDIT_MODE_FORM="form",u=t.EDIT_MODE_POPUP="popup",c=(t.FIRST_NEW_ROW_POSITION="first",t.LAST_NEW_ROW_POSITION="last",t.PAGE_BOTTOM_NEW_ROW_POSITION="pageBottom",t.PAGE_TOP_NEW_ROW_POSITION="pageTop",t.VIEWPORT_BOTTOM_NEW_ROW_POSITION="viewportBottom",t.VIEWPORT_TOP_NEW_ROW_POSITION="viewportTop",t.EDIT_MODES=[s,r,l,d,u],t.ROW_BASED_MODES=[r,d,u],t.CELL_BASED_MODES=[s,l],t.REQUIRED_EDITOR_LABELLEDBY_MODES=[s,r,l],t.MODES_WITH_DELAYED_FOCUS=[r,d],t.READONLY_CLASS="readonly",t.LINK_CLASS="dx-link",t.LINK_ICON_CLASS="dx-link-icon",t.ROW_SELECTED="dx-selection",t.EDIT_BUTTON_CLASS="dx-edit-button",t.COMMAND_EDIT_CLASS="dx-command-edit"),h=(t.COMMAND_EDIT_WITH_ICONS_CLASS=`${c}-with-icons`,t.INSERT_INDEX="__DX_INSERT_INDEX__",t.ROW_INSERTED="dx-row-inserted",t.ROW_MODIFIED="dx-row-modified",t.CELL_MODIFIED="dx-cell-modified",t.EDITING_NAMESPACE="dxDataGridEditing",t.CELL_FOCUS_DISABLED_CLASS="dx-cell-focus-disabled",t.DATA_EDIT_DATA_UPDATE_TYPE="update",t.DEFAULT_START_EDIT_ACTION="click",t.EDIT_LINK_CLASS={save:"dx-link-save",cancel:"dx-link-cancel",edit:"dx-link-edit",undelete:"dx-link-undelete",delete:"dx-link-delete",add:"dx-link-add"},t.EDIT_ICON_CLASS={save:"save",cancel:"revert",edit:"edit",undelete:"revert",delete:"trash",add:"add"},t.METHOD_NAMES={edit:"editRow",delete:"deleteRow",undelete:"undeleteRow",save:"saveEditData",cancel:"cancelEditData",add:"addRowByRowIndex"},t.ACTION_OPTION_NAMES={add:"allowAdding",edit:"allowUpdating",delete:"allowDeleting"},t.BUTTON_NAMES=["edit","save","cancel","delete","undelete"],t.EDITING_CHANGES_OPTION_NAME="editing.changes",t.FOCUS_OVERLAY_CLASS="focus-overlay",t.ADD_ROW_BUTTON_CLASS="addrow-button",t.DROPDOWN_EDITOR_OVERLAY_CLASS="dx-dropdowneditor-overlay",t.DATA_ROW_CLASS="dx-data-row",t.ROW_REMOVED="dx-row-removed",t.FILTER_ROW_CLASS="filter-row",!!o.default.IS_RENOVATED_WIDGET);t.EDIT_FORM_ITEM_CLASS="edit-form-item",t.EDIT_POPUP_CLASS="edit-popup",t.EDIT_POPUP_FORM_CLASS="edit-popup-form",t.FOCUSABLE_ELEMENT_CLASS=h?"dx-scrollable":"dx-scrollable-container",t.BUTTON_CLASS="dx-button",t.FORM_BUTTONS_CONTAINER_CLASS="form-buttons-container",t.EDIT_ROW="dx-edit-row"},13876:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.editingModule=t.dataControllerEditingExtenderMixin=void 0;var n=i(64044),o=A(i(92774)),a=A(i(89797)),s=i(28630),r=i(98834),l=A(i(4671)),d=i(43792),u=A(i(65951)),c=A(i(64960)),h=A(i(19427)),p=A(i(64553)),g=i(17781),_=i(87739),f=i(52576),m=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=T(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(69629)),v=i(21274),C=i(22263),y=i(11528),b=i(35757),x=i(52071),w=A(i(76400)),S=A(i(74854)),D=A(i(53226)),I=i(69699),E=i(1414);function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(T=function(e){return e?i:t})(e)}function A(e){return e&&e.__esModule?e:{default:e}}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},O.apply(null,arguments)}class P extends S.default.ViewController{init(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._validatingController=this.getController("validating"),this._editorFactoryController=this.getController("editorFactory"),this._focusController=this.getController("focus"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._columnsResizerController=this.getController("columnsResizer"),this._errorHandlingController=this.getController("errorHandling"),this._rowsView=this.getView("rowsView"),this._headerPanelView=this.getView("headerPanel"),this._lastOperation=null,this._changes=[],this._deferreds&&this._deferreds.forEach((e=>{e.reject("cancel")})),this._deferreds=[],this._dataChangedHandler||(this._dataChangedHandler=this._handleDataChanged.bind(this),this._dataController.changed.add(this._dataChangedHandler)),this._saveEditorHandler||(this.createAction("onInitNewRow",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowInserting",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowInserted",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditingStart",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowUpdating",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowUpdated",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowRemoving",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowRemoved",{excludeValidators:["disabled","readOnly"]}),this.createAction("onSaved",{excludeValidators:["disabled","readOnly"]}),this.createAction("onSaving",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditCanceling",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditCanceled",{excludeValidators:["disabled","readOnly"]})),this._updateEditColumn(),this._updateEditButtons(),this._internalState||(this._internalState=new Map),this.component._optionsByReference[I.EDITING_EDITROWKEY_OPTION_NAME]=!0,this.component._optionsByReference[I.EDITING_CHANGES_OPTION_NAME]=!0}getEditMode(){const e=this.option("editing.mode")??I.EDIT_MODE_ROW;return I.EDIT_MODES.includes(e)?e:I.EDIT_MODE_ROW}isCellBasedEditMode(){const e=this.getEditMode();return I.CELL_BASED_MODES.includes(e)}_getDefaultEditorTemplate(){return(e,t)=>{const i=(0,p.default)("<div>").appendTo(e),n=(0,f.extend)({},t.column,{value:t.value,setValue:t.setValue,row:t.row,parentType:"dataRow",width:null,readOnly:!t.setValue,isOnForm:t.isOnForm,id:t.id});I.REQUIRED_EDITOR_LABELLEDBY_MODES.includes(this.getEditMode())&&(n["aria-labelledby"]=t.column.headerId),this._editorFactoryController.createEditor(i,n)}}_getNewRowPosition(){const e=this.option("editing.newRowPosition");if("virtual"===this.option("scrolling.mode"))switch(e){case I.PAGE_TOP_NEW_ROW_POSITION:return I.VIEWPORT_TOP_NEW_ROW_POSITION;case I.PAGE_BOTTOM_NEW_ROW_POSITION:return I.VIEWPORT_BOTTOM_NEW_ROW_POSITION;default:return e}return e}getChanges(){return this.option(I.EDITING_CHANGES_OPTION_NAME)}getInsertRowCount(){return this.option(I.EDITING_CHANGES_OPTION_NAME).filter((e=>"insert"===e.type)).length}resetChanges(){const e=this.getChanges();(null==e?void 0:e.length)&&this._silentOption(I.EDITING_CHANGES_OPTION_NAME,[])}_getInternalData(e){return this._internalState.get((0,g.getKeyHash)(e))}_addInternalData(e){const t=this._getInternalData(e.key);return t?(0,f.extend)(t,e):(this._internalState.set((0,g.getKeyHash)(e.key),e),e)}_getOldData(e){var t;return null===(t=this._getInternalData(e))||void 0===t?void 0:t.oldData}getUpdatedData(e){const t=this._dataController.keyOf(e),i=this.getChanges(),n=D.default.getIndexByKey(t,i);return i[n]?(0,d.createObjectWithChanges)(e,i[n].data):e}getInsertedData(){return this.getChanges().filter((e=>e.data&&e.type===I.DATA_EDIT_DATA_INSERT_TYPE)).map((e=>e.data))}getRemovedData(){return this.getChanges().filter((e=>this._getOldData(e.key)&&e.type===I.DATA_EDIT_DATA_REMOVE_TYPE)).map((e=>this._getOldData(e.key)))}_fireDataErrorOccurred(e){if("cancel"===e)return;const t=this.getPopupContent();this._dataController.dataErrorOccurred.fire(e,t)}_needToCloseEditableCell(e){}_closeEditItem(e){}_handleDataChanged(e){}_isDefaultButtonVisible(e,t){let i=!0;switch(e.name){case"delete":i=this.allowDeleting(t);break;case"undelete":i=!1}return i}isPopupEditMode(){return this.option("editing.mode")===I.EDIT_MODE_POPUP}_isButtonVisible(e,t){const{visible:i}=e;return(0,y.isDefined)(i)?(0,y.isFunction)(i)?i.call(e,{component:t.component,row:t.row,column:t.column}):i:this._isDefaultButtonVisible(e,t)}_isButtonDisabled(e,t){const{disabled:i}=e;return(0,y.isFunction)(i)?i.call(e,{component:t.component,row:t.row,column:t.column}):!!i}_getButtonConfig(e,t){const i=(0,y.isObject)(e)?e:{},n=(0,E.getButtonName)(e),o=(0,E.getEditingTexts)(t),a=I.METHOD_NAMES[n],s=this.option("editing"),r=I.ACTION_OPTION_NAMES[n],l=!r||s[r];return(0,f.extend)({name:n,text:o[n],cssClass:I.EDIT_LINK_CLASS[n]},{onClick:a&&(e=>{const{event:i}=e;i.stopPropagation(),i.preventDefault(),setTimeout((()=>{t.row&&l&&this[a]&&this[a](t.row.rowIndex)}))})},i)}_getEditingButtons(e){let t;const i=!!e.column.buttons;let n=(e.column.buttons||[]).slice();return i?(t=(0,E.getButtonIndex)(n,"edit"),t>=0&&((0,E.getButtonIndex)(n,"save")<0&&n.splice(t+1,0,"save"),(0,E.getButtonIndex)(n,"cancel")<0&&n.splice((0,E.getButtonIndex)(n,"save")+1,0,"cancel")),t=(0,E.getButtonIndex)(n,"delete"),t>=0&&(0,E.getButtonIndex)(n,"undelete")<0&&n.splice(t+1,0,"undelete")):n=I.BUTTON_NAMES.slice(),n.map((t=>this._getButtonConfig(t,e)))}_renderEditingButtons(e,t,i,n){t.forEach((t=>{this._isButtonVisible(t,i)&&this._createButton(e,t,i,n)}))}_getEditCommandCellTemplate(){return(e,t,i)=>{const n=(0,p.default)(e);if("data"===t.rowType){const e=this._getEditingButtons(t);if(this._renderEditingButtons(n,e,t,i),t.watch){const i=t.watch((()=>e.map((e=>({visible:this._isButtonVisible(e,t),disabled:this._isButtonDisabled(e,t)})))),(()=>{n.empty(),this._renderEditingButtons(n,e,t)}));o.default.on(n,s.removeEvent,i)}}else D.default.setEmptyText(n)}}isRowBasedEditMode(){const e=this.getEditMode();return I.ROW_BASED_MODES.includes(e)}getFirstEditableColumnIndex(){let e;const t=this._columnsController.getVisibleColumns();return(0,v.each)(t,((t,i)=>{if(i.allowEditing)return e=t,!1})),e}getFirstEditableCellInRow(e){var t;const i=this.getFirstEditableColumnIndex();return null===(t=this._rowsView)||void 0===t?void 0:t._getCellElement(e||0,i)}getFocusedCellInRow(e){return this.getFirstEditableCellInRow(e)}getIndexByKey(e,t){return D.default.getIndexByKey(e,t)}hasChanges(e){const t=this.getChanges();let i=!1;for(let n=0;n<(null==t?void 0:t.length);n++)if(t[n].type&&(!(0,y.isDefined)(e)||this._dataController.getRowIndexByKey(t[n].key)===e)){i=!0;break}return i}dispose(){super.dispose(),clearTimeout(this._inputFocusTimeoutID),o.default.off(c.default.getDocument(),a.default.up,this._pointerUpEditorHandler),o.default.off(c.default.getDocument(),a.default.down,this._pointerDownEditorHandler),o.default.off(c.default.getDocument(),n.name,this._saveEditorHandler)}_silentOption(e,t){"editing.changes"===e&&(this._changes=(0,C.deepExtendArraySafe)([],t)),super._silentOption(e,t)}optionChanged(e){if("editing"===e.name){const{fullName:t}=e;if(t===I.EDITING_EDITROWKEY_OPTION_NAME)this._handleEditRowKeyChange(e);else if(t===I.EDITING_CHANGES_OPTION_NAME){(0,g.equalByValue)(e.value,this._changes,{maxDepth:4})||(this._changes=(0,C.deepExtendArraySafe)([],e.value),this._handleChangesChange(e))}else e.handled||(this._columnsController.reinit(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey());e.handled=!0}else super.optionChanged(e)}_handleEditRowKeyChange(e){const t=this._dataController.getRowIndexByKey(e.value),i=this._getEditRowIndexCorrection(),n=this._dataController.getRowIndexByKey(e.previousValue)+i;(0,y.isDefined)(e.value)?e.value!==e.previousValue&&this._editRowFromOptionChanged(t,n):this.cancelEditData()}_handleChangesChange(e){const t=this._dataController,i=e.value;(e.value.length||e.previousValue.length)&&(i.forEach((e=>{if("insert"===e.type)this._addInsertInfo(e);else{var i;const n=t.getCachedStoreData()||(null===(i=t.items())||void 0===i?void 0:i.map((e=>e.data))),o=D.default.getIndexByKey(e.key,n,t.key());this._addInternalData({key:e.key,oldData:n[o]})}})),t.updateItems({repaintChangesOnly:!0,isLiveUpdate:!1,isOptionChanged:!0}))}publicMethods(){return["addRow","deleteRow","undeleteRow","editRow","saveEditData","cancelEditData","hasEditData"]}refresh(){(0,y.isDefined)(this._pageIndex)&&this._refreshCore.apply(this,arguments)}_refreshCore(e){}isEditing(){return(0,y.isDefined)(this.option(I.EDITING_EDITROWKEY_OPTION_NAME))}isEditRow(e){return!1}_setEditRowKey(e,t){t?this._silentOption(I.EDITING_EDITROWKEY_OPTION_NAME,e):this.option(I.EDITING_EDITROWKEY_OPTION_NAME,e),this._refocusEditCell&&(this._refocusEditCell=!1,this._focusEditingCell())}_setEditRowKeyByIndex(e,t){const i=this._dataController.getKeyByRowIndex(e);void 0!==i?this._setEditRowKey(i,t):this._dataController.fireError("E1043")}getEditRowIndex(){return this._getVisibleEditRowIndex()}getEditFormRowIndex(){return-1}isEditRowByIndex(e){const t=this._dataController.getKeyByRowIndex(e),i=(0,y.isDefined)(t)&&(0,g.equalByValue)(this.option(I.EDITING_EDITROWKEY_OPTION_NAME),t);return i?this._getVisibleEditRowIndex()===e:i}isEditCell(e,t){return this.isEditRowByIndex(e)&&this._getVisibleEditColumnIndex()===t}getPopupContent(){}_isProcessedItem(e){return!1}_getInsertRowIndex(e,t,i){let n=-1;const o=this._dataController,a=this._getInsertAfterOrBeforeKey(t);return(0,y.isDefined)(a)||0!==e.length?(0,y.isDefined)(a)&&e.some(((s,r)=>{const l=i||this._isProcessedItem(s);if((0,y.isObject)(s)&&(l||(0,y.isDefined)(s[I.INSERT_INDEX])?(0,g.equalByValue)(s.key,a)&&(n=r):(0,g.equalByValue)(o.keyOf(s),a)&&(n=r)),n>=0){const i=e[n+1];if(i&&("detail"===i.rowType||"detailAdaptive"===i.rowType)&&(0,y.isDefined)(t.insertAfterKey))return;return(0,y.isDefined)(t.insertAfterKey)&&(n+=1),!0}})):n=0,n}_generateNewItem(e){var t;const i={key:e},n=null===(t=this._getInternalData(e))||void 0===t?void 0:t.insertInfo;return null!=n&&n[I.INSERT_INDEX]&&(i[I.INSERT_INDEX]=n[I.INSERT_INDEX]),i}_getLoadedRowIndex(e,t,i){let n=this._getInsertRowIndex(e,t,i);const o=this._dataController;if(n<0){const i=this._getNewRowPosition(),a=o.pageIndex(),s=this._getInsertAfterOrBeforeKey(t);i===I.LAST_NEW_ROW_POSITION||0!==a||(0,y.isDefined)(s)?i===I.LAST_NEW_ROW_POSITION&&o.isLastPageLoaded()&&(n=e.length):n=0}return n}processItems(e,t){const{changeType:i}=t;this.update(i);return this.getChanges().forEach((t=>{var i;if(!(t.type===I.DATA_EDIT_DATA_INSERT_TYPE))return;let{key:n}=t,o=null===(i=this._getInternalData(n))||void 0===i?void 0:i.insertInfo;(0,y.isDefined)(n)&&(0,y.isDefined)(o)||(o=this._addInsertInfo(t),n=o.key);const a=this._getLoadedRowIndex(e,t),s=this._generateNewItem(n);a>=0&&e.splice(a,0,s)})),e}processDataItem(e,t,i){const n=t.visibleColumns,o=e.data[I.INSERT_INDEX]?e.data.key:e.key,a=this.getChanges(),s=D.default.getIndexByKey(o,a);e.isEditing=!1,s>=0&&this._processDataItemCore(e,a[s],o,n,i)}_processDataItemCore(e,t,i,n,o){const{data:a,type:s}=t;switch(s){case I.DATA_EDIT_DATA_INSERT_TYPE:e.isNewRow=!0,e.key=i,e.data=a;break;case I.DATA_EDIT_DATA_UPDATE_TYPE:e.modified=!0,e.oldData=e.data,e.data=(0,d.createObjectWithChanges)(e.data,a),e.modifiedValues=o(a,n,!0);break;case I.DATA_EDIT_DATA_REMOVE_TYPE:e.removed=!0}}_initNewRow(e){if(this.executeAction("onInitNewRow",e),e.promise){const t=new _.Deferred;return(0,_.when)((0,_.fromPromise)(e.promise)).done(t.resolve).fail((0,E.createFailureHandler)(t)).fail((e=>this._fireDataErrorOccurred(e))),t}}_createInsertInfo(){const e={};return e[I.INSERT_INDEX]=this._getInsertIndex(),e}_addInsertInfo(e,t){var i;let n;e.key=this.getChangeKeyValue(e);const{key:o}=e;if(n=null===(i=this._getInternalData(o))||void 0===i?void 0:i.insertInfo,!(0,y.isDefined)(n)){const i=this._getInsertAfterOrBeforeKey(e);n=this._createInsertInfo(),(0,y.isDefined)(i)||this._setInsertAfterOrBeforeKey(e,t)}return this._addInternalData({insertInfo:n,key:o}),{insertInfo:n,key:o}}getChangeKeyValue(e){if((0,y.isDefined)(e.key))return e.key;const t=this._dataController.key();let i;return e.data&&t&&!Array.isArray(t)&&(i=e.data[t]),(0,y.isDefined)(i)||(i=(0,E.generateNewRowTempKey)()),i}_setInsertAfterOrBeforeKey(e,t){const i=this.getView("rowsView"),n=this._dataController,o=n.items(!0),a=this._getNewRowPosition();switch(a){case I.FIRST_NEW_ROW_POSITION:case I.LAST_NEW_ROW_POSITION:break;case I.PAGE_TOP_NEW_ROW_POSITION:case I.PAGE_BOTTOM_NEW_ROW_POSITION:if(o.length){const t=a===I.PAGE_TOP_NEW_ROW_POSITION?0:o.length-1;e[0===t?"insertBeforeKey":"insertAfterKey"]=o[t].key}break;default:{let t=a===I.VIEWPORT_BOTTOM_NEW_ROW_POSITION?null==i?void 0:i.getBottomVisibleItemIndex():null==i?void 0:i.getTopVisibleItemIndex();const o=n.getVisibleRows()[t];o&&(!o.isEditing&&"detail"===o.rowType||"detailAdaptive"===o.rowType)&&t++;const s=n.getKeyByRowIndex(t);(0,y.isDefined)(s)&&(e.insertBeforeKey=s)}}}_getInsertIndex(){let e=0;return this.getChanges().forEach((t=>{var i;const n=null===(i=this._getInternalData(t.key))||void 0===i?void 0:i.insertInfo;(0,y.isDefined)(n)&&t.type===I.DATA_EDIT_DATA_INSERT_TYPE&&n[I.INSERT_INDEX]>e&&(e=n[I.INSERT_INDEX])})),e+1}_getInsertAfterOrBeforeKey(e){return e.insertAfterKey??e.insertBeforeKey}_getPageIndexToInsertRow(){const e=this._getNewRowPosition(),t=this._dataController,i=t.pageIndex(),n=t.pageCount()-1;return e===I.FIRST_NEW_ROW_POSITION&&0!==i?0:e===I.LAST_NEW_ROW_POSITION&&i!==n?n:-1}addRow(e){const t=this._dataController;return t.store()?this._addRow(e):(t.fireError("E1052",this.component.NAME),(new _.Deferred).reject())}_addRow(e){const t=this._dataController.store(),i=t&&t.key(),n={data:{}},o=this._getVisibleEditRowIndex(),a=new _.Deferred;return this.refresh({allowCancelEditing:!0}),this._allowRowAdding()?(i||(n.data.__KEY__=String(new h.default)),(0,_.when)(this._initNewRow(n,e)).done((()=>{this._allowRowAdding()?(0,_.when)(this._addRowCore(n.data,e,o)).done(a.resolve).fail(a.reject):a.reject("cancel")})).fail(a.reject),a.promise()):((0,_.when)(this._navigateToNewRow(o)).done(a.resolve).fail(a.reject),a.promise())}_allowRowAdding(e){return!(this._getInsertIndex()>1)}_addRowCore(e,t,i){const n={data:e,type:I.DATA_EDIT_DATA_INSERT_TYPE},o=this._getVisibleEditRowIndex(),a=this._addInsertInfo(n,t),{key:s}=a;return this._setEditRowKey(s,!0),this._addChange(n),this._navigateToNewRow(i,n,o)}_navigateToNewRow(e,t,i){const n=new _.Deferred,o=this._dataController;if(i=i??-1,!(t=t??this.getChanges().filter((e=>e.type===I.DATA_EDIT_DATA_INSERT_TYPE))[0]))return n.reject("cancel").promise();const a=this._getPageIndexToInsertRow();let s=this._getLoadedRowIndex(o.items(),t,!0);const r=e=>{var i;(0,_.when)(null===(i=this._focusController)||void 0===i?void 0:i.navigateToRow(e)).done((()=>{s=o.getRowIndexByKey(t.key),n.resolve()}))},l=this._getInsertAfterOrBeforeKey(t);return a>=0?o.pageIndex(a).done((()=>{r(t.key)})).fail(n.reject):s<0&&(0,y.isDefined)(l)?r(l):(o.updateItems({changeType:"update",rowIndices:[e,i,s]}),s=o.getRowIndexByKey(t.key),s<0?r(t.key):n.resolve()),n.done((()=>{var e;null===(e=this._rowsView)||void 0===e||e.waitAsyncTemplates(!0).done((()=>{this._showAddedRow(s),this._afterInsertRow(t.key)}))})),n.promise()}_showAddedRow(e){this._focusFirstEditableCellInRow(e)}_beforeFocusElementInRow(e){}_focusFirstEditableCellInRow(e){var t;const i=this._dataController,n=i.getKeyByRowIndex(e),o=this.getFirstEditableCellInRow(e);null===(t=this._keyboardNavigationController)||void 0===t||t.focus(o),this.option("focusedRowKey",n),this._editCellInProgress=!0,this._delayedInputFocus(o,(()=>{e=i.getRowIndexByKey(n),this._editCellInProgress=!1,this._beforeFocusElementInRow(e)}))}_isEditingStart(e){return this.executeAction("onEditingStart",e),e.cancel}_beforeUpdateItems(e,t){}_getVisibleEditColumnIndex(){const e=this.option(I.EDITING_EDITCOLUMNNAME_OPTION_NAME);return(0,y.isDefined)(e)?this._columnsController.getVisibleColumnIndex(e):-1}_setEditColumnNameByIndex(e,t){var i;const n=this._columnsController.getVisibleColumns();this._setEditColumnName(null===(i=n[e])||void 0===i?void 0:i.name,t)}_setEditColumnName(e,t){t?this._silentOption(I.EDITING_EDITCOLUMNNAME_OPTION_NAME,e):this.option(I.EDITING_EDITCOLUMNNAME_OPTION_NAME,e)}_resetEditColumnName(){this._setEditColumnName(null,!0)}_getEditColumn(){const e=this.option(I.EDITING_EDITCOLUMNNAME_OPTION_NAME);return this._getColumnByName(e)}_getColumnByName(e){const t=this._columnsController.getVisibleColumns();let i;return(0,y.isDefined)(e)&&t.some((t=>{if(t.name===e)return i=t,!0})),i}_getVisibleEditRowIndex(e){const t=this._dataController,i=this.option(I.EDITING_EDITROWKEY_OPTION_NAME),n=t.getRowIndexByKey(i);return-1===n?n:n+this._getEditRowIndexCorrection(e)}_getEditRowIndexCorrection(e){const t=e?this._getColumnByName(e):this._getEditColumn();return"adaptiveHidden"===(null==t?void 0:t.visibleWidth)?1:0}_resetEditRowKey(){this._refocusEditCell=!1,this._setEditRowKey(null,!0)}_resetEditIndices(){this._resetEditColumnName(),this._resetEditRowKey()}editRow(e){const t=this._dataController,i=t.items()[e],n={data:i&&i.data,cancel:!1},o=this._getVisibleEditRowIndex();if(i)return e===o||void(void 0!==i.key?(i.isNewRow||(n.key=i.key),this._isEditingStart(n)||(this.resetChanges(),this.init(),this._resetEditColumnName(),this._pageIndex=t.pageIndex(),this._addInternalData({key:i.key,oldData:i.oldData??i.data}),this._setEditRowKey(i.key))):this._dataController.fireError("E1043"))}_editRowFromOptionChanged(e,t){const i=[t,e];this._beforeUpdateItems(i,e,t),this._editRowFromOptionChangedCore(i,e)}_editRowFromOptionChangedCore(e,t,i){this._needFocusEditor=!0,this._dataController.updateItems({changeType:"update",rowIndices:e,cancel:i})}_focusEditorIfNeed(){}_showEditPopup(e,t){}_repaintEditPopup(){}_getEditPopupHiddenHandler(){return e=>{this.isEditing()&&this.cancelEditData()}}_getPopupEditFormTemplate(e){}_getSaveButtonConfig(){const e={text:this.option("editing.texts.saveRowChanges"),onClick:this.saveEditData.bind(this)};return(0,x.isFluent)((0,x.current)())&&(e.stylingMode="contained",e.type="default"),e}_getCancelButtonConfig(){const e={text:this.option("editing.texts.cancelRowChanges"),onClick:this.cancelEditData.bind(this)};return(0,x.isFluent)((0,x.current)())&&(e.stylingMode="outlined"),e}_removeInternalData(e){this._internalState.delete((0,g.getKeyHash)(e))}_updateInsertAfterOrBeforeKeys(e,t){const i=e[t];e.forEach((e=>{const t=this._getInsertAfterOrBeforeKey(e);(0,g.equalByValue)(t,i.key)&&(e[(0,y.isDefined)(e.insertAfterKey)?"insertAfterKey":"insertBeforeKey"]=this._getInsertAfterOrBeforeKey(i))}))}_removeChange(e){if(e>=0){const t=[...this.getChanges()],{key:i}=t[e];this._removeInternalData(i),this._updateInsertAfterOrBeforeKeys(t,e),t.splice(e,1),this._silentOption(I.EDITING_CHANGES_OPTION_NAME,t),(0,g.equalByValue)(this.option(I.EDITING_EDITROWKEY_OPTION_NAME),i)&&this._resetEditIndices()}}executeOperation(e,t){this._lastOperation&&this._lastOperation.reject(),this._lastOperation=e,this.waitForDeferredOperations().done((()=>{"rejected"!==e.state()&&(t(),this._lastOperation=null)})).fail((()=>{e.reject(),this._lastOperation=null}))}waitForDeferredOperations(){return(0,_.when)(...this._deferreds)}_processCanceledEditingCell(){}_repaintEditCell(e,t,i){!e||!e.showEditorAlways||t&&!t.showEditorAlways?(this._editCellInProgress=!0,this._needFocusEditor=!0,this._editorFactoryController.loseFocus(),this._dataController.updateItems({changeType:"update",rowIndices:[i,this._getVisibleEditRowIndex()]})):e!==t&&(this._needFocusEditor=!0,this._dataController.updateItems({changeType:"update",rowIndices:[]}))}_delayedInputFocus(e,t,i){const n=()=>{if(t&&t(),e){const t=e.find(I.FOCUSABLE_ELEMENT_SELECTOR).first();D.default.focusAndSelectElement(this,t)}this._beforeFocusCallback=null};u.default.real().ios||u.default.real().android?n():(this._beforeFocusCallback&&this._beforeFocusCallback(),clearTimeout(this._inputFocusTimeoutID),i&&(this._beforeFocusCallback=t),this._inputFocusTimeoutID=setTimeout(n))}_focusEditingCell(e,t,i){const n=this._getVisibleEditColumnIndex();(t=t||this._rowsView&&this._rowsView._getCellElement(this._getVisibleEditRowIndex(),n))&&this._delayedInputFocus(t,e,i)}deleteRow(e){this._checkAndDeleteRow(e)}_checkAndDeleteRow(e){const t=this.option("editing"),i=null==t?void 0:t.texts,n=null==t?void 0:t.confirmDelete,o=null==i?void 0:i.confirmDeleteMessage,a=this._dataController.items()[e],s=!this.isEditing()||a.isNewRow;if(a&&s)if(n&&o){const t=i&&i.confirmDeleteTitle,n=(0,y.isDefined)(t)&&t.length>0;(0,b.confirm)(o,t,n).done((t=>{t&&this._deleteRowCore(e)}))}else this._deleteRowCore(e)}_deleteRowCore(e){const t=this._dataController.items()[e],i=t&&t.key,n=this._getVisibleEditRowIndex();this.refresh();const o=this.getChanges(),a=D.default.getIndexByKey(i,o);return a>=0?o[a].type===I.DATA_EDIT_DATA_INSERT_TYPE?this._removeChange(a):this._addChange({key:i,type:I.DATA_EDIT_DATA_REMOVE_TYPE}):this._addChange({key:i,oldData:t.data,type:I.DATA_EDIT_DATA_REMOVE_TYPE}),this._afterDeleteRow(e,n)}_afterDeleteRow(e,t){return this.saveEditData()}undeleteRow(e){const t=this._dataController,i=t.items()[e],n=this._getVisibleEditRowIndex(),o=i&&i.key,a=this.getChanges();if(i){const i=D.default.getIndexByKey(o,a);if(i>=0){const{data:s}=a[i];(0,y.isEmptyObject)(s)?this._removeChange(i):this._addChange({key:o,type:I.DATA_EDIT_DATA_UPDATE_TYPE}),t.updateItems({changeType:"update",rowIndices:[n,e]})}}}_fireOnSaving(){const e={cancel:!1,promise:null,changes:[...this.getChanges()]};this.executeAction("onSaving",e);const t=new _.Deferred;return(0,_.when)((0,_.fromPromise)(e.promise)).done((()=>{t.resolve(e)})).fail((e=>{(0,E.createFailureHandler)(t),this._fireDataErrorOccurred(e),t.resolve({cancel:!0})})),t}_executeEditingAction(e,t,i){if(this.component._disposed)return null;const n=new _.Deferred;return this.executeAction(e,t),(0,_.when)((0,_.fromPromise)(t.cancel)).done((e=>{e?setTimeout((()=>{n.resolve("cancel")})):i(t).done(n.resolve).fail((0,E.createFailureHandler)(n))})).fail((0,E.createFailureHandler)(n)),n}_processChanges(e,t,i,n){const o=this._dataController.store();(0,v.each)(n,((a,s)=>{const r=this._getOldData(s.key),{data:l,type:d}=s,u=O({},s);let c,h;if(!this._beforeSaveEditData(s,a)){switch(d){case I.DATA_EDIT_DATA_REMOVE_TYPE:h={data:r,key:s.key,cancel:!1},c=this._executeEditingAction("onRowRemoving",h,(()=>o.remove(s.key).done((e=>{i.push({type:"remove",key:e})}))));break;case I.DATA_EDIT_DATA_INSERT_TYPE:h={data:l,cancel:!1},c=this._executeEditingAction("onRowInserting",h,(()=>o.insert(h.data).done(((e,t)=>{(0,y.isDefined)(t)&&(u.key=t),e&&(0,y.isObject)(e)&&e!==h.data&&(u.data=e),i.push({type:"insert",data:e,index:0})}))));break;case I.DATA_EDIT_DATA_UPDATE_TYPE:h={newData:l,oldData:r,key:s.key,cancel:!1},c=this._executeEditingAction("onRowUpdating",h,(()=>o.update(s.key,h.newData).done(((e,t)=>{e&&(0,y.isObject)(e)&&e!==h.newData&&(u.data=e),i.push({type:"update",key:t,data:e})}))))}if(n[a]=u,c){const i=new _.Deferred;c.always((e=>{t.push({key:s.key,result:e})})).always(i.resolve),e.push(i.promise())}}}))}_processRemoveIfError(e,t){const i=e[t];return(null==i?void 0:i.type)===I.DATA_EDIT_DATA_REMOVE_TYPE&&t>=0&&e.splice(t,1),!0}_processRemove(e,t,i){const n=e[t];if(!i||!n||n.type===I.DATA_EDIT_DATA_REMOVE_TYPE)return this._processRemoveCore(e,t,!i||!n)}_processRemoveCore(e,t,i){return t>=0&&e.splice(t,1),!0}_processSaveEditDataResult(e){let t=!1;const i=[...this.getChanges()],n=i.length;for(let n=0;n<e.length;n++){const o=e[n].result,a="cancel"===o,s=D.default.getIndexByKey(e[n].key,i),r=i[s];if(o&&o instanceof Error){if(r&&this._addInternalData({key:r.key,error:o}),this._fireDataErrorOccurred(o),this._processRemoveIfError(i,s))break}else this._processRemove(i,s,a)&&(t=!a)}return i.length<n&&this._silentOption(I.EDITING_CHANGES_OPTION_NAME,i),t}_fireSaveEditDataEvents(e){(0,v.each)(e,((e,t)=>{let{data:i,key:n,type:o}=t;const a=this._addInternalData({key:n}),s={key:n,data:i};switch(a.error&&(s.error=a.error),o){case I.DATA_EDIT_DATA_REMOVE_TYPE:this.executeAction("onRowRemoved",(0,f.extend)({},s,{data:a.oldData}));break;case I.DATA_EDIT_DATA_INSERT_TYPE:this.executeAction("onRowInserted",s);break;case I.DATA_EDIT_DATA_UPDATE_TYPE:this.executeAction("onRowUpdated",s)}})),this.executeAction("onSaved",{changes:e})}saveEditData(){const e=new _.Deferred;return this.waitForDeferredOperations().done((()=>{this.isSaving()?this._resolveAfterSave(e):(0,_.when)(this._beforeSaveEditData()).done((t=>{t?this._resolveAfterSave(e,{cancel:t}):(this._saving=!0,this._saveEditDataInner().always((()=>{this._saving=!1,this._refocusEditCell&&this._focusEditingCell()})).done(e.resolve).fail(e.reject))})).fail(e.reject)})).fail(e.reject),e.promise()}_resolveAfterSave(e){let{cancel:t,error:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,_.when)(this._afterSaveEditData(t)).done((()=>{e.resolve(i)})).fail(e.reject)}_saveEditDataInner(){const e=new _.Deferred,t=[],i=[],n=[],o=this._dataController.dataSource();return(0,_.when)(this._fireOnSaving()).done((a=>{let{cancel:s,changes:r}=a;return s?e.resolve().promise():(this._processChanges(i,t,n,r),i.length?(this._refocusEditCell=!0,null==o||o.beginLoading(),(0,_.when)(...i).done((()=>{this._processSaveEditDataResult(t)?this._endSaving(n,r,e):(null==o||o.endLoading(),e.resolve())})).fail((t=>{null==o||o.endLoading(),e.resolve(t)})),e.always((()=>{this._refocusEditCell=!0})).promise()):void this._cancelSaving(e))})).fail(e.reject),e.promise()}_beforeEndSaving(e){this._resetEditIndices()}_endSaving(e,t,i){const n=this._dataController.dataSource();this._beforeEndSaving(t),null==n||n.endLoading(),this._refreshDataAfterSave(e,t,i)}_cancelSaving(e){this.executeAction("onSaved",{changes:[]}),this._resolveAfterSave(e)}_refreshDataAfterSave(e,t,i){const n=this._dataController,o=this.option("editing.refreshMode"),a="reshape"!==o&&"repaint"!==o;a||n.push(e),(0,_.when)(n.refresh({selection:a,reload:a,load:"reshape"===o,changesOnly:this.option("repaintChangesOnly")})).always((()=>{this._fireSaveEditDataEvents(t)})).done((()=>{this._resolveAfterSave(i)})).fail((e=>{this._resolveAfterSave(i,{error:e})}))}isSaving(){return this._saving}_updateEditColumn(){const e=this._isEditColumnVisible(),t=this.option("editing.useIcons"),i=I.COMMAND_EDIT_CLASS+(t?` ${I.COMMAND_EDIT_WITH_ICONS_CLASS}`:"");this._columnsController.addCommandColumn({type:"buttons",command:"edit",visible:e,cssClass:i,width:"auto",alignment:"center",cellTemplate:this._getEditCommandCellTemplate(),fixedPosition:"right"}),this._columnsController.columnOption("command:edit",{visible:e,cssClass:i})}_isEditColumnVisible(){return this.option("editing").allowDeleting}_isEditButtonDisabled(){const e=this.hasChanges();return!((0,y.isDefined)(this.option("editing.editRowKey"))||e)}_updateEditButtons(){const e=this._isEditButtonDisabled();this._headerPanelView&&(this._headerPanelView.setToolbarItemDisabled("saveButton",e),this._headerPanelView.setToolbarItemDisabled("revertButton",e))}_applyModified(e,t){e&&e.addClass(I.CELL_MODIFIED)}_beforeCloseEditCellInBatchMode(e){}cancelEditData(){const e=this.getChanges(),t={cancel:!1,changes:e};this.executeAction("onEditCanceling",t),t.cancel||(this._cancelEditDataCore(),this.executeAction("onEditCanceled",{changes:e}))}_cancelEditDataCore(){const e=this._getVisibleEditRowIndex();this._beforeCancelEditData(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey(),this._afterCancelEditData(e)}_afterCancelEditData(e){this._dataController.updateItems({repaintChangesOnly:this.option("repaintChangesOnly")})}_hideEditPopup(){}hasEditData(){return this.hasChanges()}update(e){const t=this._dataController;t&&this._pageIndex!==t.pageIndex()&&("refresh"===e&&this.refresh({isPageChanged:!0}),this._pageIndex=t.pageIndex()),this._updateEditButtons()}_getRowIndicesForCascadeUpdating(e,t){return t?[]:[e.rowIndex]}addDeferred(e){this._deferreds.includes(e)||(this._deferreds.push(e),e.always((()=>{const t=this._deferreds.indexOf(e);t>=0&&this._deferreds.splice(t,1)})))}_prepareChange(e,t,i){var n;const o={},a=null===(n=e.row)||void 0===n?void 0:n.data,s=e.key,r=new _.Deferred;if(void 0!==s){e.value=t;(0,_.fromPromise)(e.column.setCellValue(o,t,(0,f.extend)(!0,{},a),i)).done((()=>{r.resolve({data:o,key:s,oldData:a,type:I.DATA_EDIT_DATA_UPDATE_TYPE})})).fail((0,E.createFailureHandler)(r)).fail((e=>this._fireDataErrorOccurred(e))),(0,y.isDefined)(i)&&e.column.displayValueMap&&(e.column.displayValueMap[t]=i),this._updateRowValues(e),this.addDeferred(r)}return r}_updateRowValues(e){if(e.values){const t=this._dataController,i=t.getRowIndexByKey(e.key),n=t.getVisibleRows()[i];n&&(e.row.values=n.values,e.values=n.values),e.values[e.columnIndex]=e.value}}updateFieldValue(e,t,i,n){const o=e.key,a=new _.Deferred;return void 0===o&&this._dataController.fireError("E1043"),e.column.setCellValue?this._prepareChange(e,t,i).done((t=>{(0,_.when)(this._applyChange(e,t,n)).always((()=>{a.resolve()}))})):a.resolve(),a.promise()}_focusPreviousEditingCellIfNeed(e){if(this.hasEditData()&&!this.isEditCell(e.rowIndex,e.columnIndex))return this._focusEditingCell(),this._updateEditRow(e.row,!0),!0}_needUpdateRow(e){const t=this._columnsController.getVisibleColumns();e||(e=this._getEditColumn());const i=e&&e.setCellValue!==e.defaultSetCellValue,n=t.some((e=>e.calculateCellValue!==e.defaultCalculateCellValue));return i||n}_applyChange(e,t,i){const n=O({},e,{forceUpdateRow:i});return this._addChange(t,n),this._updateEditButtons(),this._applyChangeCore(e,n.forceUpdateRow)}_applyChangeCore(e,t){const i=e.column.setCellValue!==e.column.defaultSetCellValue,{row:n}=e;n&&(t||i?this._updateEditRow(n,t,i):n.update&&n.update())}_updateEditRowCore(e,t,i){this._dataController.updateItems({changeType:"update",rowIndices:this._getRowIndicesForCascadeUpdating(e,t)})}_updateEditRow(e,t,i){t?this._updateRowImmediately(e,t,i):this._updateRowWithDelay(e,i)}_updateRowImmediately(e,t,i){this._updateEditRowCore(e,!t,i),this._validateEditFormAfterUpdate(e,i),t||this._focusEditingCell()}_updateRowWithDelay(e,t){const i=new _.Deferred;this.addDeferred(i),setTimeout((()=>{var n;const o=(null===(n=this._editForm)||void 0===n?void 0:n.element())||this.component.$element().get(0),a=(0,p.default)(c.default.getActiveElement(o)),s=this._rowsView.getCellIndex(a,e.rowIndex);let r=a.get(0);const l=D.default.getSelectionRange(r);if(this._updateEditRowCore(e,!1,t),this._validateEditFormAfterUpdate(e,t),s>=0){const t=this._rowsView._getCellElement(e.rowIndex,s);this._delayedInputFocus(t,(()=>{setTimeout((()=>{var e;r=c.default.getActiveElement(null===(e=this.component.$element())||void 0===e?void 0:e.get(0)),l.selectionStart>=0&&D.default.setSelectionRange(r,l)}))}))}i.resolve()}))}_validateEditFormAfterUpdate(){}_addChange(e,t){var i;const n=null==t?void 0:t.row,o=[...this.getChanges()];let a=D.default.getIndexByKey(e.key,o);a<0&&(a=o.length,this._addInternalData({key:e.key,oldData:e.oldData}),delete e.oldData,o.push(e));const s=O({},o[a]);return s&&(e.data&&(s.data=(0,d.createObjectWithChanges)(s.data,e.data)),s.type&&e.data||!e.type||(s.type=e.type),n&&(n.oldData=this._getOldData(n.key),n.data=(0,d.createObjectWithChanges)(n.data,e.data))),o[a]=s,this._silentOption(I.EDITING_CHANGES_OPTION_NAME,o),t&&s!==(null===(i=this.getChanges())||void 0===i?void 0:i[a])&&(t.forceUpdateRow=!0),s}_getFormEditItemTemplate(e,t){return t.editCellTemplate||this._getDefaultEditorTemplate()}getColumnTemplate(e){const{column:t}=e,i=e.row&&e.row.rowIndex;let n;const o=this.isRowBasedEditMode(),a=this.isEditRow(i),s=this.isEditCell(i,e.columnIndex);let r;if(!(t.showEditorAlways||t.setCellValue&&(a&&t.allowEditing||s))||"data"!==e.rowType&&"detailAdaptive"!==e.rowType||t.command)"detail"===t.command&&"detail"===e.rowType&&a&&(n=null==this?void 0:this.getEditFormTemplate(e));else{!((this.allowUpdating(e)||a)&&t.allowEditing||s)||!a&&o||(t.showEditorAlways&&!o&&(r={cancel:!1,key:e.row.isNewRow?void 0:e.row.key,data:e.row.data,column:t},this._isEditingStart(r)),r&&r.cancel||(e.setValue=(t,i)=>{this.updateFieldValue(e,t,i)})),n=t.editCellTemplate||this._getDefaultEditorTemplate()}return n}_createButton(e,t,i,n){let a=I.EDIT_ICON_CLASS[t.name];const s=this.option("editing.useIcons"),d=this.option("useLegacyColumnButtonTemplate");let u=(0,p.default)("<a>").attr("href","#").addClass(I.LINK_CLASS).addClass(t.cssClass);if(t.template&&d)this._rowsView.renderTemplate(e,t.template,i,!0);else{if(t.template)u=(0,p.default)("<span>").addClass(t.cssClass);else if(s&&a||t.icon){a=t.icon||a;const i=m.getImageSourceType(a);"image"===i||"svg"===i?u=m.getImageContainer(a).addClass(t.cssClass):u.addClass(`dx-icon${"dxIcon"===i?"-":" "}${a}`).attr("title",t.text),u.addClass(I.LINK_ICON_CLASS),e.addClass(I.COMMAND_EDIT_WITH_ICONS_CLASS);const n=this.getButtonLocalizationNames()[t.name];n&&u.attr("aria-label",l.default.format(n))}else u.text(t.text);(0,y.isDefined)(t.hint)&&u.attr("title",t.hint),this._isButtonDisabled(t,i)?u.addClass("dx-state-disabled"):t.template&&!t.onClick||o.default.on(u,(0,r.addNamespace)("click",I.EDITING_NAMESPACE),this.createAction((e=>{var n;null===(n=t.onClick)||void 0===n||n.call(t,(0,f.extend)({},e,{row:i.row,column:i.column})),e.event.preventDefault(),e.event.stopPropagation()}))),e.append(u),t.template&&(i.renderAsync=!1,this._rowsView.renderTemplate(u,t.template,i,!0,n))}}getButtonLocalizationNames(){return{edit:"dxDataGrid-editingEditRow",save:"dxDataGrid-editingSaveRowChanges",delete:"dxDataGrid-editingDeleteRow",undelete:"dxDataGrid-editingUndeleteRow",cancel:"dxDataGrid-editingCancelRowChanges"}}prepareButtonItem(e,t,i,n){const o=this.option("editing.texts")??{},a={revert:o.cancelAllChanges,save:o.saveAllChanges,addRow:o.addRow},s={revert:"cancel",save:"save",addRow:"addrow"}[t],r=a[t],l=("save"===s||"cancel"===s)&&this._isEditButtonDisabled();return{widget:"dxButton",options:{onInitialized:t=>{(0,p.default)(t.element).addClass(e._getToolbarButtonClass(`${I.EDIT_BUTTON_CLASS} ${this.addWidgetPrefix(s)}-button`))},icon:`edit-button-${s}`,disabled:l,onClick:()=>{setTimeout((()=>{this[i]()}))},text:r,hint:r},showText:"inMenu",name:`${t}Button`,location:"after",locateInMenu:"auto",sortIndex:n}}prepareEditButtons(e){const t=[];return(this.option("editing")??{}).allowAdding&&t.push(this.prepareButtonItem(e,"addRow","addRow",20)),t}highlightDataCell(e,t){this.shouldHighlightCell(t)&&e.addClass(I.CELL_MODIFIED)}_afterInsertRow(e){}_beforeSaveEditData(e){if(e&&!(0,y.isDefined)(e.key)&&(0,y.isDefined)(e.type))return!0}_afterSaveEditData(){}_beforeCancelEditData(){}_allowEditAction(e,t){let i=this.option(`editing.${e}`);return(0,y.isFunction)(i)&&(i=i({component:this.component,row:t.row})),i}allowUpdating(e,t){const i=this.option("editing.startEditAction")??I.DEFAULT_START_EDIT_ACTION;return(!(arguments.length>1)||(i===t||"down"===t))&&this._allowEditAction("allowUpdating",e)}allowDeleting(e){return this._allowEditAction("allowDeleting",e)}isCellModified(e){var t,i;const{columnIndex:n}=e;let o=null==e||null===(t=e.row)||void 0===t||null===(t=t.modifiedValues)||void 0===t?void 0:t[n];return null!=e&&null!==(i=e.row)&&void 0!==i&&i.isNewRow&&(o=e.value),void 0!==o}isNewRowInEditMode(){const e=this._getVisibleEditRowIndex(),t=this._dataController.items();return e>=0&&t[e].isNewRow}_isRowDeleteAllowed(){}shouldHighlightCell(e){return this.isCellModified(e)&&e.column.setCellValue&&(this.getEditMode()!==I.EDIT_MODE_ROW||!e.row.isEditing)}}const k=e=>class extends e{reload(e,t){return!t&&this._editingController.refresh(),super.reload.apply(this,arguments)}repaintRows(){if(!this._editingController.isSaving())return super.repaintRows.apply(this,arguments)}_updateEditRow(e){const t=this.option(I.EDITING_EDITROWKEY_OPTION_NAME),i=e[D.default.getIndexByKey(t,e)];var n;i&&(i.isEditing=!0,null===(n=this._updateEditItem)||void 0===n||n.call(this,i))}_updateItemsCore(e){super._updateItemsCore(e),this._updateEditRow(this.items(!0))}_applyChangeUpdate(e){this._updateEditRow(e.items),super._applyChangeUpdate(e)}_applyChangesOnly(e){this._updateEditRow(e.items),super._applyChangesOnly(e)}_processItems(e,t){return e=this._editingController.processItems(e,t),super._processItems(e,t)}_processDataItem(e,t){return this._editingController.processDataItem(e,t,this.generateDataValues),super._processDataItem(e,t)}_processItem(e,t){return(e=super._processItem(e,t)).isNewRow&&(t.dataIndex--,delete e.dataIndex),e}_getChangedColumnIndices(e,t,i,n){if(e.isNewRow===t.isNewRow&&e.removed===t.removed)return super._getChangedColumnIndices.apply(this,arguments)}_isCellChanged(e,t,i,n,o){const a=e.cells&&e.cells[n],s=this._editingController&&this._editingController.isEditCell(i,n);return(!o||!s)&&(!(!a||!a.column||a.column.showEditorAlways||a.isEditing===s)||super._isCellChanged.apply(this,arguments))}needToRefreshOnDataSourceChange(e){return!(Array.isArray(e.value)&&e.value===e.previousValue&&this._editingController.isSaving())}_handleDataSourceChange(e){const t=super._handleDataSourceChange(e),i=this.option("editing.changes"),n=e.value;if(Array.isArray(n)&&i.length){const e=n.map((e=>this.keyOf(e))),t=i.filter((t=>"insert"===t.type||e.some((e=>(0,g.equalByValue)(t.key,e)))));t.length!==i.length&&this.option("editing.changes",t);const o=this.option("editing.editRowKey");!t.some((e=>"insert"===e.type&&(0,g.equalByValue)(o,e.key)))&&e.every((e=>!(0,g.equalByValue)(o,e)))&&this.option("editing.editRowKey",null)}return t}};t.dataControllerEditingExtenderMixin=k;t.editingModule={defaultOptions:()=>({editing:{mode:"row",refreshMode:"full",newRowPosition:I.VIEWPORT_TOP_NEW_ROW_POSITION,allowAdding:!1,allowUpdating:!1,allowDeleting:!1,useIcons:!1,selectTextOnEditStart:!1,confirmDelete:!0,texts:{editRow:l.default.format("dxDataGrid-editingEditRow"),saveAllChanges:l.default.format("dxDataGrid-editingSaveAllChanges"),saveRowChanges:l.default.format("dxDataGrid-editingSaveRowChanges"),cancelAllChanges:l.default.format("dxDataGrid-editingCancelAllChanges"),cancelRowChanges:l.default.format("dxDataGrid-editingCancelRowChanges"),addRow:l.default.format("dxDataGrid-editingAddRow"),deleteRow:l.default.format("dxDataGrid-editingDeleteRow"),undeleteRow:l.default.format("dxDataGrid-editingUndeleteRow"),confirmDeleteMessage:l.default.format("dxDataGrid-editingConfirmDeleteMessage"),confirmDeleteTitle:""},form:{colCount:2},popup:{},startEditAction:"click",editRowKey:null,editColumnName:null,changes:[]},useLegacyColumnButtonTemplate:!1}),controllers:{editing:P},extenders:{controllers:{data:k},views:{rowsView:e=>class extends e{getCellIndex(e,t){if(!e.is("td")&&t>=0){const i=this.getCellElements(t);let n=-1;return(0,v.each)(i,((t,i)=>{(0,p.default)(i).find(e).length&&(n=t)})),n}return super.getCellIndex.apply(this,arguments)}publicMethods(){return super.publicMethods().concat(["cellValue"])}_getCellTemplate(e){return this._editingController.getColumnTemplate(e)||super._getCellTemplate(e)}_createRow(e){const t=super._createRow.apply(this,arguments);if(e){const i=!!e.removed,n=!!e.isNewRow,o=!!e.modified;n&&t.addClass(I.ROW_INSERTED),o&&t.addClass(I.ROW_MODIFIED),(n||i)&&t.removeClass(I.ROW_SELECTED)}return t}_getColumnIndexByElement(e){let t=e.closest("table");const i=this.getTableElements();for(;t.length&&!i.filter(t).length;)e=t.closest("td"),t=e.closest("table");return this._getColumnIndexByElementCore(e)}_getColumnIndexByElementCore(e){const t=e.closest(`.${I.ROW_CLASS}> td:not(.dx-master-detail-cell)`);return this.getCellIndex(t)}_editCellByClick(e,t){const i=this._editingController,n=(0,p.default)(e.event.target),o=this._getColumnIndexByElement(n),a=this._dataController.items()[e.rowIndex],s=i.allowUpdating({row:a},t)||a&&a.isNewRow,r=this._columnsController.getVisibleColumns()[o],l=i.isEditCell(e.rowIndex,o),d=s&&r&&(r.allowEditing||l),c=this.option("editing.startEditAction")||"click",h=r&&r.showEditorAlways;if(l)return!0;if("down"===t)return(u.default.real().ios||u.default.real().android)&&w.default.resetActiveElement(),h&&d&&i.editCell(e.rowIndex,o);if("click"===t&&"dblClick"===c&&this._pointerDownTarget===n.get(0)){const e=!1,t=null==a?void 0:a.isNewRow;i.closeEditCell(e,t)}return d&&t===c?i.editCell(e.rowIndex,o)||i.isEditRow(e.rowIndex):void 0}_rowPointerDown(e){this._pointerDownTarget=e.event.target,this._pointerDownTimeout=setTimeout((()=>{this._editCellByClick(e,"down")}))}_rowClickTreeListHack(e){super._rowClick.apply(this,arguments)}_rowClick(e){const t=(0,p.default)(e.rowElement).hasClass(this.addWidgetPrefix(I.EDIT_FORM_CLASS));e.event[I.TARGET_COMPONENT_NAME]=this.component,this._editCellByClick(e,"click")||t||super._rowClick.apply(this,arguments)}_rowDblClickTreeListHack(e){super._rowDblClick.apply(this,arguments)}_rowDblClick(e){this._editCellByClick(e,"dblClick")||super._rowDblClick.apply(this,arguments)}_cellPrepared(e,t){var i;const n=this._editingController,o=!!t.column.command,a=t.setValue,s=n.isEditRow(t.rowIndex),r=(0,E.isEditingCell)(s,t);if((0,E.isEditingOrShowEditorAlwaysDataCell)(s,t)){const{alignment:i}=t.column;e.toggleClass(this.addWidgetPrefix(I.READONLY_CLASS),!a).toggleClass(I.CELL_FOCUS_DISABLED_CLASS,!a),i&&e.find(I.EDITORS_INPUT_SELECTOR).first().css("textAlign",i)}r&&this._editCellPrepared(e);const l=!(null===(i=t.column)||void 0===i||!i.cellTemplate);!t.column||o||l&&!n.shouldHighlightCell(t)||n.highlightDataCell(e,t),super._cellPrepared.apply(this,arguments)}_getCellOptions(e){const t=super._getCellOptions(e),{columnIndex:i,row:n}=e;return t.isEditing=this._editingController.isEditCell(t.rowIndex,t.columnIndex),t.removed=n.removed,n.modified&&(t.modified=void 0!==n.modifiedValues[i]),t}_setCellAriaAttributes(e,t,i){super._setCellAriaAttributes(e,t,i),t.removed&&this.setAria("roledescription",l.default.format("dxDataGrid-ariaDeletedCell"),e),t.modified&&this.setAria("roledescription",l.default.format("dxDataGrid-ariaModifiedCell"),e);t.column.allowEditing&&!t.removed&&!t.modified&&"data"===t.rowType&&t.column.calculateCellValue===t.column.defaultCalculateCellValue&&this._editingController.isCellBasedEditMode()&&this.setAria("roledescription",l.default.format("dxDataGrid-ariaEditableCell"),e)}_createCell(e){const t=super._createCell(e),i=this._editingController.isEditRow(e.rowIndex);return(0,E.isEditingOrShowEditorAlwaysDataCell)(i,e)&&t.addClass(I.EDITOR_CELL_CLASS),t}cellValue(e,t,i,n){const o=this.getCellOptions(e,t);if(o){if(void 0===i)return o.value;this._editingController.updateFieldValue(o,i,n,!0)}}dispose(){super.dispose.apply(this,arguments),clearTimeout(this._pointerDownTimeout)}_renderCore(){return super._renderCore.apply(this,arguments),this.waitAsyncTemplates(!0).done((()=>{this._editingController._focusEditorIfNeed()}))}_editCellPrepared(){}_formItemPrepared(){}},headerPanel:e=>class extends e{optionChanged(e){const{fullName:t}=e;switch(e.name){case"editing":{const i=[I.EDITING_POPUP_OPTION_NAME,I.EDITING_CHANGES_OPTION_NAME,I.EDITING_EDITCOLUMNNAME_OPTION_NAME,I.EDITING_EDITROWKEY_OPTION_NAME];t&&!i.some((e=>e===t))&&this._invalidate(),super.optionChanged(e);break}case"useLegacyColumnButtonTemplate":e.handled=!0;break;default:super.optionChanged(e)}}_getToolbarItems(){const e=super._getToolbarItems();return this._editingController.prepareEditButtons(this).concat(e)}isVisible(){const e=this._editingController.option("editing");return super.isVisible()||(null==e?void 0:e.allowAdding)}}}}}},48295:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.editingCellBasedModule=void 0;var n=i(64044),o=m(i(92774)),a=m(i(68095)),s=m(i(89797)),r=i(98834),l=i(43792),d=m(i(64960)),u=m(i(64553)),c=i(17781),h=i(87739),p=i(86858),g=i(11528),_=i(69699),f=i(1414);function m(e){return e&&e.__esModule?e:{default:e}}t.editingCellBasedModule={extenders:{controllers:{editing:e=>class extends e{init(){const e=!this._saveEditorHandler;if(super.init(),e){let e,t;this._pointerUpEditorHandler=()=>{var e;t=null===(e=this._columnsResizerController)||void 0===e?void 0:e.isResizing()},this._pointerDownEditorHandler=t=>e=(0,u.default)(t.target),this._saveEditorHandler=this.createAction((function(i){const{event:n}=i,o=(0,u.default)(n.target),a=n[_.TARGET_COMPONENT_NAME],{component:s}=this;if((!(0,f.isEditable)(e)||e.is(o))&&this.isCellOrBatchEditMode()&&!this._editCellInProgress){const e=r(o)||r(null==a?void 0:a.$element()),i=a&&!a._disposed&&a!==this.component,n=!!o.closest(`.${this.addWidgetPrefix(_.ADD_ROW_BUTTON_CLASS)}`).length,s=o.hasClass(this.addWidgetPrefix(_.FOCUS_OVERLAY_CLASS)),l=this.isCellEditMode();t||e||s||n&&l&&this.isEditing()||!(0,p.isElementInDom)(o)&&!i||this._closeEditItem.bind(this)(o)}function r(e){if(!e)return!1;const t=e.closest(`.${_.DROPDOWN_EDITOR_OVERLAY_CLASS}`),i=s.$element();return t.length>0&&0===i.closest(t).length}})),o.default.on(d.default.getDocument(),s.default.up,this._pointerUpEditorHandler),o.default.on(d.default.getDocument(),s.default.down,this._pointerDownEditorHandler),o.default.on(d.default.getDocument(),n.name,this._saveEditorHandler)}}isCellEditMode(){return this.option("editing.mode")===_.EDIT_MODE_CELL}isBatchEditMode(){return this.option("editing.mode")===_.EDIT_MODE_BATCH}isCellOrBatchEditMode(){return this.isCellEditMode()||this.isBatchEditMode()}_needToCloseEditableCell(e){const t=this.component.$element();let i=this.isEditing();if(!t||!!e.closest(t).length){if(e.closest(`.${_.DATA_ROW_CLASS}`).length){const t=e.closest(`.${_.ROW_CLASS}> td`),o=this._rowsView.getRowIndex(t.parent()),a=this._rowsView.getCellElements(o);if(null!=a&&a.length){var n;const e=a.index(t),s=null===(n=this._columnsController.getVisibleColumns()[e])||void 0===n?void 0:n.allowEditing,r=this.isEditCell(o,e);i=i&&!s&&!r}}}return i||super._needToCloseEditableCell(e)}_closeEditItem(e){this._needToCloseEditableCell(e)&&this.closeEditCell()}_focusEditorIfNeed(){if(this._needFocusEditor&&this.isCellOrBatchEditMode()){var e;const t=this._getVisibleEditColumnIndex(),i=null===(e=this._rowsView)||void 0===e?void 0:e._getCellElement(this._getVisibleEditRowIndex(),t);this._refocusEditCell=!1,clearTimeout(this._inputFocusTimeoutID),i&&!i.find(":focus").length?this._focusEditingCell((()=>{this._editCellInProgress=!1}),i,!0):this._editCellInProgress=!1,this._needFocusEditor=!1}else super._focusEditorIfNeed()}isEditing(){if(this.isCellOrBatchEditMode()){const e=(0,g.isDefined)(this.option(_.EDITING_EDITROWKEY_OPTION_NAME)),t=(0,g.isDefined)(this.option(_.EDITING_EDITCOLUMNNAME_OPTION_NAME));return e&&t}return super.isEditing()}_handleEditColumnNameChange(e){const t=this._getVisibleEditRowIndex(e.previousValue);if(this.isCellOrBatchEditMode()&&-1!==t&&(0,g.isDefined)(e.value)&&e.value!==e.previousValue){const i=this._columnsController.getVisibleColumnIndex(e.value),n=this._columnsController.getVisibleColumnIndex(e.previousValue);this._editCellFromOptionChanged(i,n,t)}}_addRow(e){if(this.isCellEditMode()&&this.hasChanges()){const t=new h.Deferred;return this.saveEditData().done((()=>{this.hasChanges()?t.reject("cancel"):this.addRow(e).done(t.resolve).fail(t.reject)})),t.promise()}return super._addRow(e)}editCell(e,t){return this._editCell({rowIndex:e,columnIndex:t})}_editCell(e){const t=new h.Deferred;let i;return this.executeOperation(t,(()=>{i=this._editCellCore(e),(0,h.when)(i).done(t.resolve).fail(t.reject)})),void 0!==i?i:t.promise()}_editCellCore(e){const t=this._dataController,i=(0,g.isDefined)(e.oldColumnIndex)||(0,g.isDefined)(e.oldRowIndex),{columnIndex:n,rowIndex:o,column:a,item:s}=this._getNormalizedEditCellOptions(e),r={data:null==s?void 0:s.data,cancel:!1,column:a};if(void 0!==s.key){if(a&&("data"===s.rowType||"detailAdaptive"===s.rowType)&&!s.removed&&this.isCellOrBatchEditMode()){if(!i&&this.isEditCell(o,n))return!0;const e=o+t.getRowIndexOffset();return(0,h.when)(this._beforeEditCell(o,n,s)).done((t=>{t||this._prepareEditCell(r,s,n,e)||this._processCanceledEditingCell()}))}return!1}this._dataController.fireError("E1043")}_beforeEditCell(e,t,i){if(this.isCellEditMode()&&!i.isNewRow&&this.hasChanges()){const e=new h.Deferred;return this.saveEditData().always((()=>{e.resolve(this.hasChanges())})),this.addDeferred(e),e}return!1}publicMethods(){return super.publicMethods().concat(["editCell","closeEditCell"])}_getNormalizedEditCellOptions(e){let{oldColumnIndex:t,oldRowIndex:i,columnIndex:n,rowIndex:o}=e;const a=this._columnsController,s=a.getVisibleColumns(),r=this._dataController.items()[o];let l;l=(0,g.isDefined)(t)?s[t]:this._getEditColumn(),(0,g.isDefined)(i)||(i=this._getVisibleEditRowIndex()),(0,g.isString)(n)&&(n=a.columnOption(n,"index"),n=a.getVisibleIndex(n));return{oldColumn:l,columnIndex:n,oldRowIndex:i,rowIndex:o,column:s[n],item:r}}_prepareEditCell(e,t,i,n){return t.isNewRow||(e.key=t.key),!this._isEditingStart(e)&&(this._pageIndex=this._dataController.pageIndex(),this._setEditRowKey(t.key),this._setEditColumnNameByIndex(i),e.column.showEditorAlways||this._addInternalData({key:t.key,oldData:t.oldData??t.data}),!0)}closeEditCell(e,t){let i=(0,h.when)();const n=this._getVisibleEditRowIndex();if(this.isCellOrBatchEditMode()){const o=new h.Deferred;i=new h.Deferred,this.executeOperation(o,(()=>{this._closeEditCellCore(e,n,t).always(i.resolve)}))}return i.promise()}_closeEditCellCore(e,t,i){const n=this._dataController,o=new h.Deferred,a=o.promise();if(this.isCellEditMode()&&this.hasChanges()){if(!i)return this.saveEditData().done((e=>{this.hasChanges()?o.resolve():this.closeEditCell(!!e).always(o.resolve)})),a}else if(this._resetEditRowKey(),this._resetEditColumnName(),t>=0){const i=[t];this._beforeCloseEditCellInBatchMode(i),e||n.updateItems({changeType:"update",rowIndices:i})}return o.resolve(),a}_resetModifiedClassCells(e){if(this.isBatchEditMode()){const t=this._columnsController.getVisibleColumns().length;e.forEach((e=>{let{key:i}=e;const n=this._dataController.getRowIndexByKey(i);for(let e=0;e<t;e++){const t=this._rowsView._getCellElement(n,e);null==t||t.removeClass(_.CELL_MODIFIED_CLASS)}}))}}_prepareChange(e,t,i){const n=(0,u.default)(e.cellElement);return this.isBatchEditMode()&&void 0!==e.key&&this._applyModified(n,e),super._prepareChange(e,t,i)}_cancelSaving(e){const t=this._dataController;this.isCellOrBatchEditMode()&&(this.isBatchEditMode()&&this._resetEditIndices(),t.updateItems()),super._cancelSaving(e)}optionChanged(e){const{fullName:t}=e;"editing"===e.name&&t===_.EDITING_EDITCOLUMNNAME_OPTION_NAME?(this._handleEditColumnNameChange(e),e.handled=!0):super.optionChanged(e)}_editCellFromOptionChanged(e,t,i){const n=this._columnsController.getVisibleColumns();e>-1&&(0,c.deferRender)((()=>{this._repaintEditCell(n[e],n[t],i)}))}_handleEditRowKeyChange(e){if(this.isCellOrBatchEditMode()){const i=this._getVisibleEditColumnIndex(),n=this._getEditRowIndexCorrection(),o=this._dataController.getRowIndexByKey(e.previousValue)+n;var t;if((0,g.isDefined)(e.value)&&e.value!==e.previousValue)null===(t=this._editCellFromOptionChanged)||void 0===t||t.call(this,i,i,o)}else super._handleEditRowKeyChange(e)}deleteRow(e){if(this.isCellEditMode()&&this.isEditing()){const{isNewRow:t}=this._dataController.items()[e],i=this._dataController.getKeyByRowIndex(e);this.closeEditCell(null,t).always((()=>{e=this._dataController.getRowIndexByKey(i),this._checkAndDeleteRow(e)}))}else super.deleteRow(e)}_checkAndDeleteRow(e){this.isBatchEditMode()?this._deleteRowCore(e):super._checkAndDeleteRow(e)}_refreshCore(e){const{isPageChanged:t}=e??{},i=this.isBatchEditMode()||t&&"virtual"!==this.option("scrolling.mode");this.isCellOrBatchEditMode()?i&&(this._resetEditColumnName(),this._resetEditRowKey()):super._refreshCore(e)}_allowRowAdding(e){return!!this.isBatchEditMode()||super._allowRowAdding(e)}_afterDeleteRow(e,t){const i=this._dataController;return this.isBatchEditMode()?(i.updateItems({changeType:"update",rowIndices:[t,e]}),(new h.Deferred).resolve()):super._afterDeleteRow(e,t)}_updateEditRow(e,t,i){this.isCellOrBatchEditMode()?this._updateRowImmediately(e,t,i):super._updateEditRow(e,t,i)}_isDefaultButtonVisible(e,t){if(this.isCellOrBatchEditMode()){const i=this.isBatchEditMode();switch(e.name){case"save":case"cancel":case"edit":return!1;case"delete":return super._isDefaultButtonVisible(e,t)&&(!i||!t.row.removed);case"undelete":return i&&this.allowDeleting(t)&&t.row.removed;default:return super._isDefaultButtonVisible(e,t)}}return super._isDefaultButtonVisible(e,t)}_isRowDeleteAllowed(){return super._isRowDeleteAllowed()||this.isBatchEditMode()}_beforeEndSaving(e){var t;this.isCellEditMode()?"update"!==(null===(t=e[0])||void 0===t?void 0:t.type)&&super._beforeEndSaving(e):(this.isBatchEditMode()&&this._resetModifiedClassCells(e),super._beforeEndSaving(e))}prepareEditButtons(e){const t=this.option("editing")??{},i=super.prepareEditButtons(e);return(t.allowUpdating||t.allowAdding||t.allowDeleting)&&this.isBatchEditMode()&&(i.push(this.prepareButtonItem(e,"save","saveEditData",21)),i.push(this.prepareButtonItem(e,"revert","cancelEditData",22))),i}_saveEditDataInner(){var e;const t=this._dataController.getVisibleRows()[this.getEditRowIndex()],i=this._getEditColumn(),n=null==i?void 0:i.showEditorAlways;let o;return this.isCellEditMode()&&!(null!=t&&t.isNewRow)&&n&&(o=new h.Deferred,this.addDeferred(o)),super._saveEditDataInner().always(null===(e=o)||void 0===e?void 0:e.resolve)}_applyChange(e,t,i){const n=this.isCellEditMode()&&e.row&&!e.row.isNewRow,{showEditorAlways:o}=e.column,a=e.column.setCellValue!==e.column.defaultSetCellValue;return o&&!i&&n&&this.hasEditData()&&!this.isEditCell(e.rowIndex,e.columnIndex)?(this._focusEditingCell(),void this._updateEditRow(e.row,!0,a)):super._applyChange(e,t,i)}_applyChangeCore(e,t){const{showEditorAlways:i}=e.column,n=this.isCellEditMode()&&e.row&&!e.row.isNewRow;if(i&&!t){if(n)return this._setEditRowKey(e.row.key,!0),this._setEditColumnNameByIndex(e.columnIndex,!0),this.saveEditData();if(this.isBatchEditMode())return t=this._needUpdateRow(e.column),super._applyChangeCore(e,t)}return super._applyChangeCore(e,t)}_processDataItemCore(e,t,i,n,o){const{data:a,type:s}=t;this.isBatchEditMode()&&s===_.DATA_EDIT_DATA_REMOVE_TYPE&&(e.data=(0,l.createObjectWithChanges)(e.data,a)),super._processDataItemCore(e,t,i,n,o)}_processRemoveCore(e,t,i){if(!this.isBatchEditMode()||i)return super._processRemoveCore(e,t,i)}_processRemoveIfError(e,t){if(!this.isBatchEditMode())return super._processRemoveIfError(e,t)}_beforeFocusElementInRow(e){super._beforeFocusElementInRow(e);const t=e>=0?e:0,i=this.getFirstEditableColumnIndex();i>=0&&this.editCell(t,i)}}},views:{rowsView:e=>class extends e{_createTable(){const e=super._createTable.apply(this,arguments),t=this._editingController;return t.isCellOrBatchEditMode()&&this.option("editing.allowUpdating")&&o.default.on(e,(0,r.addNamespace)(a.default.name,"dxDataGridRowsView"),`td:not(.${_.EDITOR_CELL_CLASS})`,this.createAction((()=>{t.isEditing()&&t.closeEditCell()}))),e}_createRow(e){const t=super._createRow.apply(this,arguments);if(e){const i=this._editingController,n=!!e.removed;i.isBatchEditMode()&&n&&t.addClass(_.ROW_REMOVED)}return t}},headerPanel:e=>class extends e{isVisible(){const e=this._editingController.option("editing");return super.isVisible()||e&&(e.allowUpdating||e.allowDeleting)&&e.mode===_.EDIT_MODE_BATCH}}}}}},29657:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.editingFormBasedModule=void 0;var n=b(i(92774)),o=i(28630),a=b(i(65951)),s=b(i(19427)),r=b(i(64553)),l=i(17781),d=i(87739),u=i(86858),c=i(52576),h=i(21274),p=i(11528),g=b(i(64973)),_=b(i(74075)),f=b(i(10720)),m=b(i(20876)),v=b(i(53226)),C=i(69699),y=i(1414);function b(e){return e&&e.__esModule?e:{default:e}}t.editingFormBasedModule={extenders:{controllers:{editing:e=>class extends e{init(){this._editForm=null,this._updateEditFormDeferred=null,super.init()}isEditRow(e){return!this.isPopupEditMode()&&super.isEditRow(e)}isFormOrPopupEditMode(){return this.isPopupEditMode()||this.isFormEditMode()}isFormEditMode(){return this.option("editing.mode")===C.EDIT_MODE_FORM}getFirstEditableColumnIndex(){const e=this._firstFormItem;if(this.isFormEditMode()&&e){const t=this.option(C.EDITING_EDITROWKEY_OPTION_NAME),i=this._dataController.getRowIndexByKey(t),n=this._rowsView.getCellElements(i);return this._rowsView._getEditFormEditorVisibleIndex(n,e.column)}return super.getFirstEditableColumnIndex()}getEditFormRowIndex(){return this.isFormOrPopupEditMode()?this._getVisibleEditRowIndex():super.getEditFormRowIndex()}_isEditColumnVisible(){const e=super._isEditColumnVisible(),t=this.option("editing");return this.isFormOrPopupEditMode()&&t.allowUpdating||e}_handleDataChanged(e){if(this.isPopupEditMode()){var t,i;const n=this.option("editing.editRowKey"),o=null==e||null===(t=e.items)||void 0===t?void 0:t.some((e=>(0,l.equalByValue)(e.key,n))),a=(null===(i=e.changeTypes)||void 0===i?void 0:i.length)&&e.changeTypes.every((e=>"insert"===e));("refresh"===e.changeType||o&&e.isOptionChanged)&&!a&&this._repaintEditPopup()}super._handleDataChanged(e)}getPopupContent(){var e;const t=null===(e=this._editPopup)||void 0===e?void 0:e.option("visible");if(this.isPopupEditMode()&&t)return this._$popupContent}_showAddedRow(e){this.isPopupEditMode()?this._showEditPopup(e):super._showAddedRow(e)}_cancelEditDataCore(){super._cancelEditDataCore(),this.isPopupEditMode()&&this._hideEditPopup()}_updateEditRowCore(e,t,i){const n=this._editForm;var o;this.isPopupEditMode()?this.option("repaintChangesOnly")?(null===(o=e.update)||void 0===o||o.call(e,e),this._rowsView.renderDelayedTemplates()):n&&(this._updateEditFormDeferred=(new d.Deferred).done((()=>n.repaint())),this._updateLockCount||this._updateEditFormDeferred.resolve()):super._updateEditRowCore(e,t,i)}_showEditPopup(e,t){const i="desktop"!==a.default.current().deviceType,o=this.addWidgetPrefix(C.EDIT_POPUP_CLASS),s=(0,c.extend)({showTitle:!1,fullScreen:i,wrapperAttr:{class:o},toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:this._getSaveButtonConfig()},{toolbar:"bottom",location:"after",widget:"dxButton",options:this._getCancelButtonConfig()}],contentTemplate:this._getPopupEditFormTemplate(e)},this.option(C.EDITING_POPUP_OPTION_NAME));if(!this._editPopup){const e=(0,r.default)("<div>").appendTo(this.component.$element()).addClass(o);this._editPopup=this._createComponent(e,f.default),this._editPopup.on("hiding",this._getEditPopupHiddenHandler()),this._editPopup.on("shown",(e=>{var i;(n.default.trigger(e.component.$content().find(C.FOCUSABLE_ELEMENT_SELECTOR).not(`.${C.FOCUSABLE_ELEMENT_CLASS}`).first(),"focus"),t)&&(null===(i=this._editForm)||void 0===i||i.repaint())}))}this._editPopup.option(s),this._editPopup.show(),super._showEditPopup(e,t)}_getPopupEditFormTemplate(e){const t=this.component.getVisibleRows()[e],i={row:t,values:t.values,rowType:t.rowType,key:t.key,rowIndex:e};return this._rowsView._addWatchMethod(i,t),e=>{const t=this.getEditFormTemplate(),n=this._createComponent((0,r.default)("<div>").appendTo(e),m.default);this._$popupContent=(0,r.default)(n.content()),t(this._$popupContent,i,{isPopupForm:!0}),this._rowsView.renderDelayedTemplates(),(0,r.default)(e).parent().attr("aria-label",this.localize("dxDataGrid-ariaEditForm"))}}_repaintEditPopup(){const e=this._getVisibleEditRowIndex();if(e>=0){var t,i;const n=null===(t=this._editPopup)||void 0===t?void 0:t.option("animation");null===(i=this._editPopup)||void 0===i||i.option("animation",null),this._showEditPopup(e,!0),void 0!==n&&this._editPopup.option("animation",n)}}_hideEditPopup(){var e;null===(e=this._editPopup)||void 0===e||e.option("visible",!1)}optionChanged(e){if("editing"===e.name&&this.isFormOrPopupEditMode()){const{fullName:t}=e;0===t.indexOf(C.EDITING_FORM_OPTION_NAME)?(this._handleFormOptionChange(e),e.handled=!0):0===t.indexOf(C.EDITING_POPUP_OPTION_NAME)&&(this._handlePopupOptionChange(e),e.handled=!0)}super.optionChanged(e)}_handleFormOptionChange(e){var t;if(this.isFormEditMode()){const e=this._getVisibleEditRowIndex();e>=0&&this._dataController.updateItems({changeType:"update",rowIndices:[e]})}else null!==(t=this._editPopup)&&void 0!==t&&t.option("visible")&&0===e.fullName.indexOf(C.EDITING_FORM_OPTION_NAME)&&this._repaintEditPopup()}_handlePopupOptionChange(e){const t=this._editPopup;if(t){const i=e.fullName.slice(C.EDITING_POPUP_OPTION_NAME.length+1);i?t.option(i,e.value):t.option(e.value)}}renderFormEditorTemplate(e,t,i,n,o){const a=this,s=(0,r.default)(n),{column:l}=t,d=(0,y.getEditorType)(t),h=null==e?void 0:e.row,p=null==h?void 0:h.data,g=i.component,_=l.calculateCellValue(p),f=v.default.getDisplayValue(l,_,p,null==h?void 0:h.rowType),{label:m,labelMark:C,labelMode:b}=i.editorOptions||{},x=(0,c.extend)({},e,{data:p,cellElement:null,isOnForm:!0,item:t,id:g.getItemID(t.name||t.dataField),column:(0,c.extend)({},l,{editorType:d,editorOptions:(0,c.extend)({label:m,labelMark:C,labelMode:b},l.editorOptions,t.editorOptions)}),columnIndex:l.index,setValue:!o&&l.allowEditing&&function(e,t){a.updateFieldValue(x,e,t)}});x.value=_,x.displayValue=f,x.text=l.command?"":v.default.formatValue(f,l);const w=this._getFormEditItemTemplate.bind(this)(x,l);return this._rowsView.renderTemplate(s,w,x,!!(0,u.isElementInDom)(s)).done((()=>{this._rowsView._updateCell(s,x)})),x}getFormEditorTemplate(e,t){const i=this.component.columnOption(t.name||t.dataField);return(a,s)=>{const l=(0,r.default)(s),{row:d}=e;if(null!=d&&d.watch){const s=d.watch((()=>i.selector(d.data)),(()=>{var i;let n=l.find(".dx-widget").first(),o=n.data("dxValidator");const s=null===(i=o)||void 0===i?void 0:i.option();l.contents().remove(),e=this.renderFormEditorTemplate.bind(this)(e,t,a,l),n=l.find(".dx-widget").first(),o=n.data("dxValidator"),s&&!o&&n.dxValidator({validationRules:s.validationRules,validationGroup:s.validationGroup,dataGetter:s.dataGetter})}));n.default.on(l,o.removeEvent,s)}e=this.renderFormEditorTemplate.bind(this)(e,t,a,l)}}getEditFormOptions(e){var t;const i=null===(t=this._getValidationGroupsInForm)||void 0===t?void 0:t.call(this,e),n=this.option("editing.form.customizeItem"),o=this.addWidgetPrefix(C.EDIT_FORM_ITEM_CLASS);let a=this.option("editing.form.items");const r={};if(a)(0,y.forEachFormItems)(a,(e=>{const t=(null==e?void 0:e.name)||(null==e?void 0:e.dataField);t&&(r[t]=!!e.editorType)}));else{const e=this._columnsController.getColumns();a=[],(0,h.each)(e,((e,t)=>{t.isBand||t.type||a.push({column:t,name:t.name,dataField:t.dataField})}))}return(0,c.extend)({},i,{items:a,formID:`dx-${new s.default}`,customizeItem:t=>{let i;const a=t.name||t.dataField;if((t.column||a)&&(i=t.column||this._columnsController.columnOption(t.name?`name:${t.name}`:`dataField:${t.dataField}`)),i){if(t.label=t.label||{},t.label.text=t.label.text||i.caption,"boolean"===i.dataType&&void 0===t.label.visible){const e=this.option("editing.form.labelMode");"floating"!==e&&"static"!==e||(t.label.visible=!0)}t.template=t.template||this.getFormEditorTemplate(e,t),t.column=i,t.isCustomEditorType=r[a],i.formItem&&(0,c.extend)(t,i.formItem),void 0===t.isRequired&&i.validationRules&&(t.isRequired=i.validationRules.some((e=>"required"===e.type)),t.validationRules=[]);const n=!(0,p.isDefined)(t.visible)||t.visible;!this._firstFormItem&&n&&(this._firstFormItem=t)}null==n||n.call(this,t),t.cssClass=(0,p.isString)(t.cssClass)?`${t.cssClass} ${o}`:o}})}getEditFormTemplate(){return(e,t,i)=>{const n=this.option(C.EDITING_FORM_OPTION_NAME),o=this.getEditFormOptions(t),a=(0,r.default)("<div>").appendTo(e),s=null==i?void 0:i.isPopupForm;if(this._firstFormItem=void 0,s&&a.addClass(this.addWidgetPrefix(C.EDIT_POPUP_FORM_CLASS)),this._editForm=this._createComponent(a,_.default,(0,c.extend)({},n,o)),!s){const t=(0,r.default)("<div>").addClass(this.addWidgetPrefix(C.FORM_BUTTONS_CONTAINER_CLASS)).appendTo(e);this._createComponent((0,r.default)("<div>").appendTo(t),g.default,this._getSaveButtonConfig()),this._createComponent((0,r.default)("<div>").appendTo(t),g.default,this._getCancelButtonConfig())}this._editForm.on("contentReady",(()=>{var e;this._rowsView.renderDelayedTemplates(),null===(e=this._editPopup)||void 0===e||e.repaint()}))}}getEditForm(){return this._editForm}_endUpdateCore(){var e;null===(e=this._updateEditFormDeferred)||void 0===e||e.resolve()}_beforeEndSaving(e){var t;(super._beforeEndSaving(e),this.isPopupEditMode())&&(null===(t=this._editPopup)||void 0===t||t.hide())}_processDataItemCore(e,t,i,n,o){const{type:a}=t;this.isPopupEditMode()&&a===C.DATA_EDIT_DATA_INSERT_TYPE&&(e.visible=!1),super._processDataItemCore(e,t,i,n,o)}_editRowFromOptionChangedCore(e,t){const i=this.isPopupEditMode();super._editRowFromOptionChangedCore(e,t,i),i&&this._showEditPopup(t)}},data:e=>class extends e{_updateEditItem(e){this._editingController.isFormEditMode()&&(e.rowType="detail")}_getChangedColumnIndices(e,t,i,n){if(!1!==n||!t.isEditing||!this._editingController.isFormEditMode())return super._getChangedColumnIndices.apply(this,arguments)}}},views:{rowsView:e=>class extends e{_renderCellContent(e,t){"data"===t.rowType&&this._editingController.isPopupEditMode()&&!1===t.row.visible||super._renderCellContent.apply(this,arguments)}getCellElements(e){const t=super.getCellElements(e),i=this._editingController,n=i.getEditForm();return i.getEditFormRowIndex()===e&&t&&n?n.$element().find(`.${this.addWidgetPrefix(C.EDIT_FORM_ITEM_CLASS)}, .${C.BUTTON_CLASS}`):t}_getVisibleColumnIndex(e,t,i){if(this._editingController.getEditFormRowIndex()===t&&(0,p.isString)(i)){const t=this._columnsController.columnOption(i);return this._getEditFormEditorVisibleIndex(e,t)}return super._getVisibleColumnIndex.apply(this,arguments)}_getEditFormEditorVisibleIndex(e,t){let i=-1;return(0,h.each)(e,((e,n)=>{const o=(0,r.default)(n).find(".dx-field-item-content").data("dx-form-item");if(null!=o&&o.column&&t&&o.column.index===t.index)return i=e,!1})),i}_isFormItem(e){const t="detail"===e.rowType||"detailAdaptive"===e.rowType,i="data"===e.rowType&&this._editingController.isPopupEditMode();return(t||i)&&e.item}_updateCell(e,t){this._isFormItem(t)?this._formItemPrepared(t,e):super._updateCell(e,t)}_updateContent(){const e=this._editingController,t=e.getEditForm(),i=null==t?void 0:t.option("validationGroup");return super._updateContent.apply(this,arguments).done((()=>{const n=e.getEditForm();i&&n&&n!==t&&n.option("validationGroup",i)}))}}}}}},56671:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.editingRowBasedModule=void 0;var n=i(17781),o=i(69699);t.editingRowBasedModule={extenders:{controllers:{editing:e=>class extends e{isRowEditMode(){return this.getEditMode()===o.EDIT_MODE_ROW}_afterCancelEditData(e){const t=this._dataController;this.isRowBasedEditMode()&&e>=0?t.updateItems({changeType:"update",rowIndices:[e,e+1]}):super._afterCancelEditData(e)}_isDefaultButtonVisible(e,t){const i=this.isRowBasedEditMode(),a=!this.isPopupEditMode()&&t.row&&(0,n.equalByValue)(t.row.key,this.option(o.EDITING_EDITROWKEY_OPTION_NAME));if(i)switch(e.name){case"edit":return!a&&this.allowUpdating(t);case"delete":return super._isDefaultButtonVisible(e,t)&&!a;case"save":case"cancel":return a;default:return super._isDefaultButtonVisible(e,t)}return super._isDefaultButtonVisible(e,t)}isEditRow(e){return this.isRowBasedEditMode()&&this.isEditRowByIndex(e)}_cancelSaving(e){this.isRowBasedEditMode()&&(this.hasChanges()||this._cancelEditDataCore()),super._cancelSaving(e)}_refreshCore(e){const{allowCancelEditing:t}=e??{};if(this.isRowBasedEditMode()){const e=this.getChanges().filter((e=>"update"===e.type)).length>0;this.init(),t&&e&&this._cancelEditDataCore()}super._refreshCore(e)}_isEditColumnVisible(){const e=super._isEditColumnVisible(),t=this.option("editing"),i=this.isRowEditMode(),n=t.allowUpdating||t.allowAdding;return e||i&&n}_focusEditorIfNeed(){const e=this.getEditMode();if(this._needFocusEditor){if(o.MODES_WITH_DELAYED_FOCUS.includes(e)){const e=this.getFocusedCellInRow(this._getVisibleEditRowIndex());this._delayedInputFocus(e,(()=>{e&&this.component.focus(e)}))}this._needFocusEditor=!1}}},data:e=>class extends e{_getChangedColumnIndices(e,t,i,n){if(!this._editingController.isRowBasedEditMode()||e.isEditing===t.isEditing)return super._getChangedColumnIndices.apply(this,arguments)}}},views:{rowsView:e=>class extends e{_createRow(e){const t=super._createRow.apply(this,arguments);if(e){this._editingController.isEditRow(e.rowIndex)&&(t.addClass(o.EDIT_ROW),t.removeClass(o.ROW_SELECTED_CLASS),"detail"===e.rowType&&t.addClass(this.addWidgetPrefix(o.EDIT_FORM_CLASS)))}return t}_update(e){super._update(e),"updateSelection"===e.changeType&&this.getTableElements().children("tbody").children(`.${o.EDIT_ROW}`).removeClass(o.ROW_SELECTED_CLASS)}}}}}},1414:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getButtonIndex=t.generateNewRowTempKey=t.forEachFormItems=t.createFailureHandler=void 0,t.getButtonName=l,t.getEditorType=t.getEditingTexts=void 0,t.isEditable=function(e){return e&&(e.is("input")||e.is("textarea"))},t.isNewRowTempKey=t.isEditingOrShowEditorAlwaysDataCell=t.isEditingCell=void 0;var n,o=(n=i(19427))&&n.__esModule?n:{default:n},a=i(11528);const s="_DX_KEY_";t.createFailureHandler=function(e){return function(t){const i=t instanceof Error?t:new Error(t&&String(t)||"Unknown error");e.reject(i)}};const r=function(e,t){return t.isEditing||e&&t.column.allowEditing};t.isEditingCell=r;t.isEditingOrShowEditorAlwaysDataCell=function(e,t){const i=!!t.column.command,n=r(e,t),o=!i&&(n||t.column.showEditorAlways);return"data"===t.rowType&&o};t.getEditingTexts=e=>{const t=e.component.option("editing.texts")||{};return{save:t.saveRowChanges,cancel:t.cancelRowChanges,edit:t.editRow,undelete:t.undeleteRow,delete:t.deleteRow,add:t.addRowToNode}};t.generateNewRowTempKey=()=>`${s}${new o.default}`;t.isNewRowTempKey=e=>"string"==typeof e&&e.startsWith(s)&&44===e.length;function l(e){return(0,a.isObject)(e)?e.name:e}t.getButtonIndex=(e,t)=>{let i=-1;return e.some(((e,n)=>{if(l(e)===t)return i=n,!0})),i};t.getEditorType=e=>{var t;const{column:i}=e;return e.isCustomEditorType?e.editorType:null===(t=i.formItem)||void 0===t?void 0:t.editorType};const d=(e,t)=>{e.forEach((e=>{e.items||e.tabs?d(e.items||e.tabs,t):t(e)}))};t.forEachFormItems=d},77862:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.editorFactoryModule=t.EditorFactory=void 0;var n=m(i(3030)),o=i(64044),a=m(i(92774)),s=m(i(89797)),r=i(98834),l=m(i(64960)),d=m(i(64553)),u=m(i(48314)),c=i(52576),h=i(41639),p=i(57653),g=m(i(87093)),_=m(i(74854)),f=m(i(53226));function m(e){return e&&e.__esModule?e:{default:e}}const v="dx-cell-focus-disabled",C="focus-overlay",y="dx-focused",b="dxDataGridEditorFactory",x=(0,r.addNamespace)([s.default.down,"focusin",o.name].join(" "),b),w="dx-hidden",S=(0,g.default)(_.default.ViewController);class D extends S{init(){this.createAction("onEditorPreparing",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this.createAction("onEditorPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this._columnsResizerController=this.getController("columnsResizer"),this._editingController=this.getController("editing"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._columnsController=this.getController("columns"),this._validatingController=this.getController("validating"),this._rowsView=this.getView("rowsView"),this._updateFocusHandler=this._updateFocusHandler||this.createAction(this._updateFocus.bind(this)),this._subscribedContainerRoot=this._getContainerRoot(),a.default.on(this._subscribedContainerRoot,x,this._updateFocusHandler),this._attachContainerEventHandlers()}dispose(){clearTimeout(this._focusTimeoutID),clearTimeout(this._updateFocusTimeoutID),a.default.off(this._subscribedContainerRoot,x,this._updateFocusHandler)}_getFocusedElement(e){const t=["td[tabindex]:focus",`${this.option("focusedRowEnabled")?"tr[tabindex]:focus":"tr[tabindex]:not(.dx-data-row):focus"}`,"input:focus","button:focus","textarea:focus","div[tabindex]:focus",".dx-lookup-field:focus",".dx-checkbox:focus",".dx-switch:focus",".dx-dropdownbutton .dx-buttongroup:focus",".dx-adaptive-item-text:focus"].join(","),i=e.find(t);return this.elementIsInsideGrid(i)&&i}_getFocusCellSelector(){return".dx-row > td"}_updateFocusCore(){const e=this.component&&this.component.$element();if(e){let t=this._getFocusedElement(e);if(t&&t.length){let e;if(!t.hasClass(v)&&!t.hasClass("dx-row")){const i=t.closest(`${this._getFocusCellSelector()}, .${v}`);i.get(0)!==t.get(0)&&(e=this._needHideBorder(i),t=i)}if(t.length&&!t.hasClass(v))return void this.focus(t,e)}}this.loseFocus()}_needHideBorder(e){const t=this._rowsView.element(),i=e.closest(t).length>0,n=this._editingController.isEditing();return e.hasClass("dx-editor-inline-block")||i&&!n}_updateFocus(e){const t=this,i=e&&e.event&&(0,d.default)(e.event.target).hasClass(t.addWidgetPrefix(C));t._isFocusOverlay=t._isFocusOverlay||i,clearTimeout(t._updateFocusTimeoutID),t._updateFocusTimeoutID=setTimeout((()=>{delete t._updateFocusTimeoutID,t._isFocusOverlay||t._updateFocusCore(),t._isFocusOverlay=!1}))}updateFocusOverlaySize(e,t){e.hide();const i=n.default.calculate(e,(0,c.extend)({collision:"fit"},t));i.h.oversize>0&&(0,p.setOuterWidth)(e,(0,p.getOuterWidth)(e)-i.h.oversize),i.v.oversize>0&&(0,p.setOuterHeight)(e,(0,p.getOuterHeight)(e)-i.v.oversize),e.show()}callbackNames(){return["focused"]}getFocusOverlayContainer(e){return e.closest(`.${this.addWidgetPrefix("content")}`)}getFocusOverlaySize(e){const t=(0,h.getBoundingRect)(e.get(0));return{width:t.right-t.left+1,height:t.bottom-t.top+1}}updateFocusOverlay(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])this._$focusOverlay.addClass(w);else if(e.length){const t=u.default.mozilla?"right bottom":"left top",i=e.hasClass(this.addWidgetPrefix("invalid")),o=e.hasClass("dx-cell-modified")&&!i,a=this.getFocusOverlayContainer(e),s=this.getFocusOverlaySize(e);this._$focusOverlay.removeClass(w).toggleClass("dx-focused-cell-invalid",i).toggleClass("dx-focused-cell-modified",o).appendTo(a),(0,p.setOuterHeight)(this._$focusOverlay,s.height),(0,p.setOuterWidth)(this._$focusOverlay,s.width);const r={precise:!0,my:t,at:t,of:e,boundary:a.length&&a};this.updateFocusOverlaySize(this._$focusOverlay,r),n.default.setup(this._$focusOverlay,r),this._$focusOverlay.css("visibility","visible")}}renderFocusOverlay(e,t){f.default.isElementInCurrentGrid(this,e)&&(this._$focusOverlay||(this._$focusOverlay=(0,d.default)("<div>").addClass(this.addWidgetPrefix(C))),this.updateFocusOverlay(e,t))}focus(e,t){const i=this;if(void 0===e)return i._$focusedElement;e&&(e.is(i._$focusedElement)||i._$focusedElement&&i._$focusedElement.removeClass(y),i._$focusedElement=e,clearTimeout(i._focusTimeoutID),i._focusTimeoutID=setTimeout((()=>{delete i._focusTimeoutID,i.renderFocusOverlay(e,t),e.addClass(y),i.focused.fire(e)})))}refocus(){const e=this.focus();this.focus(e)}resize(){const e=this._$focusedElement;e&&this.focus(e)}loseFocus(e){this._$focusedElement&&this._$focusedElement.removeClass(y),this._$focusedElement=null,this._$focusOverlay&&this._$focusOverlay.addClass(w)}_getContainerRoot(){var e;const t=null===(e=this.component)||void 0===e?void 0:e.$element(),i=l.default.getRootNode(null==t?void 0:t.get(0));return i.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||i.host?i:l.default.getDocument()}_attachContainerEventHandlers(){const e=this,t=e.component&&e.component.$element();t&&a.default.on(t,(0,r.addNamespace)("keydown",b),(t=>{"tab"===(0,r.normalizeKeyName)(t)&&e._updateFocusHandler(t)}))}getFocusOverlay(){return this._$focusOverlay}hasOverlayElements(){var e;return!(null===(e=this._$focusOverlay)||void 0===e||!e.length||this._$focusOverlay.hasClass(w))}}t.EditorFactory=D;t.editorFactoryModule={defaultOptions:()=>({}),controllers:{editorFactory:D}}},82358:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.errorHandlingModule=t.ErrorHandlingController=void 0;var n=i(64044),o=d(i(92774)),a=d(i(4671)),s=d(i(64553)),r=i(21274),l=d(i(74854));function d(e){return e&&e.__esModule?e:{default:e}}const u="dx-error-row",c="dx-error-message";class h extends l.default.ViewController{init(){this._resizingController=this.getController("resizing"),this._columnsController=this.getController("columns"),this._columnHeadersView=this.getView("columnHeadersView"),this._rowsView=this.getView("rowsView")}_createErrorRow(e,t){let i,a;const l=this._renderErrorMessage(e);return t?(i=(0,s.default)("<tr>").attr("role","row").addClass(u),a=(0,s.default)("<div>").addClass("dx-closebutton").addClass(this.addWidgetPrefix("action")),o.default.on(a,n.name,this.createAction((e=>{var i,n;const o=e.event;let a;const l=(0,s.default)(o.currentTarget).closest(`.${u}`).index();o.stopPropagation(),(0,r.each)(t,((e,t)=>{a=(0,s.default)(t).children("tbody").children("tr").eq(l),this.removeErrorRow(a)})),null===(i=this._resizingController)||void 0===i||null===(n=i.fireContentReadyAction)||void 0===n||n.call(i)}))),(0,s.default)("<td>").attr({colSpan:this._columnsController.getVisibleColumns().length,role:"gridcell"}).prepend(a).append(l).appendTo(i),i):l}_renderErrorMessage(e){const t=e.url?e.message.replace(e.url,""):e.message||e,i=(0,s.default)("<div>").attr("role","alert").attr("aria-roledescription",a.default.format("dxDataGrid-ariaError")).addClass(c).text(t);return e.url&&(0,s.default)("<a>").attr("href",e.url).text(e.url).appendTo(i),i}renderErrorRow(e,t,i){var n,o;const a=this;let l,d;if(i)return i.find(`.${c}`).remove(),l=a._createErrorRow(e),i.prepend(l),l;const u=t>=0||!a._columnHeadersView.isVisible()?a._rowsView:a._columnHeadersView,h=u.getTableElements();return(0,r.each)(h,((i,n)=>{if(l=a._createErrorRow(e,h),d=d||l,t>=0){const e=u._getRowElements((0,s.default)(n)).eq(t);a.removeErrorRow(e.next()),l.insertAfter(e)}else{const e=(0,s.default)(n).children("tbody"),t=e.children("tr");a._columnHeadersView.isVisible()?(a.removeErrorRow(t.last()),(0,s.default)(n).append(l)):(a.removeErrorRow(t.first()),e.first().prepend(l))}})),null===(n=this._resizingController)||void 0===n||null===(o=n.fireContentReadyAction)||void 0===o||o.call(n),d}removeErrorRow(e){if(!e){const t=this._columnHeadersView&&this._columnHeadersView.element();if(!(e=t&&t.find(`.${u}`))||!e.length){const t=this._rowsView.element();e=t&&t.find(`.${u}`)}}e&&e.hasClass(u)&&e.remove()}optionChanged(e){if("errorRowEnabled"===e.name)e.handled=!0;else super.optionChanged(e)}}t.ErrorHandlingController=h;t.errorHandlingModule={defaultOptions:()=>({errorRowEnabled:!0}),controllers:{errorHandling:h},extenders:{controllers:{data:e=>class extends e{init(){super.init(),this.dataErrorOccurred.add(((e,t)=>{this.option("errorRowEnabled")&&this._errorHandlingController.renderErrorRow(e,void 0,t)})),this.changed.add((e=>{var t,i;e&&"loadError"===e.changeType||this._editingController&&!this._editingController.hasChanges()&&(null===(t=this._errorHandlingController)||void 0===t||null===(i=t.removeErrorRow)||void 0===i||i.call(t))}))}}}}}},65382:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.filterBuilderModule=t.FilterBuilderView=void 0;var n=c(i(4671)),o=c(i(64553)),a=i(52576),s=c(i(35299)),r=c(i(10720)),l=c(i(91374)),d=i(16191),u=c(i(74854));function c(e){return e&&e.__esModule?e:{default:e}}class h extends u.default.View{init(){super.init(),this._columnsController=this.getController("columns"),this._filterSyncController=this.getController("filterSync")}optionChanged(e){switch(e.name){case"filterBuilder":case"filterBuilderPopup":this._invalidate(),e.handled=!0;break;default:super.optionChanged(e)}}_renderCore(){this._updatePopupOptions()}_updatePopupOptions(){this.option("filterBuilderPopup.visible")?this._initPopup():this._filterBuilderPopup&&this._filterBuilderPopup.hide()}_disposePopup(){this._filterBuilderPopup&&(this._filterBuilderPopup.dispose(),this._filterBuilderPopup=void 0),this._filterBuilder&&(this._filterBuilder.dispose(),this._filterBuilder=void 0)}_initPopup(){const e=this;e._disposePopup(),e._filterBuilderPopup=e._createComponent(e.element(),r.default,(0,a.extend)({title:n.default.format("dxDataGrid-filterBuilderPopupTitle"),contentTemplate:t=>e._getPopupContentTemplate(t),onOptionChanged(t){"visible"===t.name&&e.option("filterBuilderPopup.visible",t.value)},toolbarItems:e._getPopupToolbarItems()},e.option("filterBuilderPopup"),{onHidden(){(0,d.restoreFocus)(e),e._disposePopup()}}))}_getPopupContentTemplate(e){const t=(0,o.default)(e),i=(0,o.default)("<div>").appendTo((0,o.default)(e));this._filterBuilder=this._createComponent(i,s.default,(0,a.extend)({value:this.option("filterValue"),fields:this._columnsController.getFilteringColumns()},this.option("filterBuilder"),{customOperations:this._filterSyncController.getCustomFilterOperations()})),this._createComponent(t,l.default,{direction:"both"})}_getPopupToolbarItems(){const e=this;return[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:n.default.format("OK"),onClick(){const t=e._filterBuilder.option("value");e.option("filterValue",t),e._filterBuilderPopup.hide()}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:n.default.format("Cancel"),onClick(){e._filterBuilderPopup.hide()}}}]}}t.FilterBuilderView=h;t.filterBuilderModule={defaultOptions:()=>({filterBuilder:{groupOperationDescriptions:{and:n.default.format("dxFilterBuilder-and"),or:n.default.format("dxFilterBuilder-or"),notAnd:n.default.format("dxFilterBuilder-notAnd"),notOr:n.default.format("dxFilterBuilder-notOr")},filterOperationDescriptions:{between:n.default.format("dxFilterBuilder-filterOperationBetween"),equal:n.default.format("dxFilterBuilder-filterOperationEquals"),notEqual:n.default.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:n.default.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:n.default.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:n.default.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:n.default.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:n.default.format("dxFilterBuilder-filterOperationStartsWith"),contains:n.default.format("dxFilterBuilder-filterOperationContains"),notContains:n.default.format("dxFilterBuilder-filterOperationNotContains"),endsWith:n.default.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:n.default.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:n.default.format("dxFilterBuilder-filterOperationIsNotBlank")}},filterBuilderPopup:{}}),views:{filterBuilderView:h}}},44651:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.anyOf=function(e){return(0,r.extend)(c(e),{name:"anyof",icon:"selectall",caption:n.default.format("dxFilterBuilder-filterOperationAnyOf")})},t.noneOf=function(e){const t=c(e);return(0,r.extend)({},t,{calculateFilterExpression(e,i,n){const o=t.calculateFilterExpression(e,i,n);return o&&0!==o.length?"!"===o[0]?o:["!",o]:null},name:"noneof",icon:"unselectall",caption:n.default.format("dxFilterBuilder-filterOperationNoneOf")})};var n=u(i(4671)),o=i(68216),a=u(i(64553)),s=i(87739),r=i(52576),l=u(i(35185)),d=i(29498);function u(e){return e&&e.__esModule?e:{default:e}}function c(e){const t=function(e,t){return t?`${t}/${e}`:e},i=function(e,n){let o=[];return e.forEach((e=>{if(e.items){const a=i(e.items,t(e.text,n));o=o.concat(a)}e.selected&&o.push(t(e.text,n))})),o},n=e&&e.getController("headerFilter");return{dataTypes:["string","date","datetime","number","boolean","object"],calculateFilterExpression:function(e,t,i){const n=[],o=e.length-1;return e&&e.forEach(((e,a)=>{if((0,d.isCondition)(e)||(0,d.isGroup)(e)){const t=(0,d.getFilterExpression)(e,i,[],"headerFilter");n.push(t)}else{const o=(0,d.getFilterExpression)([t.dataField,"=",e],i,[],"headerFilter");n.push(o)}a!==o&&n.push("or")})),1===n.length?n[0]:n},editorTemplate(t,i){const o=(0,a.default)("<div>").addClass("dx-filterbuilder-item-value-text").appendTo(i),s=(0,r.extend)(!0,{},e.columnOption(t.field.dataField));(0,d.renderValueText)(o,t.text&&t.text.split("|"));return s.filterType="include",s.filterValues=t.value?t.value.slice():[],n.showHeaderFilterMenuBase({columnElement:o,column:s,apply(){var e;e=this.filterValues,t.setValue(e),n.hideHeaderFilterMenu(),t.closeEditor()},onHidden(){t.closeEditor()},isFilterBuilder:!0}),i},customizeText:function(t,a){a=a||{};const{value:d}=t;let u=e.columnOption(t.field.dataField);const c=u&&u.headerFilter,h=u&&u.lookup,p=a.values||[d];if(c&&c.dataSource||h&&h.dataSource){const e=new s.Deferred,d=a.items||new s.Deferred;if(!a.items){u=(0,r.extend)({},u,{filterType:"include",filterValues:p});const e=n.getDataSource(u);e.paginate=!1;const i=new o.DataSource(e),s=i.store().key();if(s){const{values:e}=a;if(e&&e.length>1){const t=e.reduce(((e,t)=>(e.length&&e.push("or"),e.push([s,"=",t]),e)),[]);i.filter(t)}else i.filter([s,"=",t.value])}else t.field.calculateDisplayValue&&l.default.log("W1017");a.items=d,i.load().done(d.resolve)}return d.done((n=>{const o=p.indexOf(t.value);e.resolve(i(n,null)[o])})),e}return n.getHeaderItemText(d,u,0,e.option("headerFilter"))}}}},17887:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.filterPanelModule=t.FilterPanelView=void 0;var n=g(i(92774)),o=g(i(4671)),a=g(i(64553)),s=i(87739),r=i(11528),l=g(i(94319)),d=g(i(66122)),u=i(29498),c=i(68491),h=g(i(74854)),p=g(i(53226));function g(e){return e&&e.__esModule?e:{default:e}}const _="filter-panel",f=`${_}-text`,m=`${_}-checkbox`,v=`${_}-clear-filter`,C=`${_}-left`;class y extends h.default.View{init(){this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._filterSyncController=this.getController("filterSync"),this._dataController.dataSourceChanged.add((()=>this.render()))}isVisible(){return this.option("filterPanel.visible")&&this._dataController.dataSource()}_renderCore(){const e=this.element();e.empty();if(!!!this._columnsController.getColumns().length)return;e.addClass(this.addWidgetPrefix(_));const t=(0,a.default)("<div>").addClass(this.addWidgetPrefix(C)).appendTo(e);this._renderFilterBuilderText(e,t)}_renderFilterBuilderText(e,t){const i=this._getFilterElement(),n=this._getTextElement();if(this.option("filterValue")||this._filterValueBuffer){const o=this._getCheckElement(),a=this._getRemoveButtonElement();return t.append(o).append(i).append(n),void e.append(a)}t.append(i).append(n)}_getCheckElement(){const e=this,t=(0,a.default)("<div>").addClass(this.addWidgetPrefix(m));return e._createComponent(t,l.default,{value:e.option("filterPanel.filterEnabled"),onValueChanged(t){e.option("filterPanel.filterEnabled",t.value)}}),t.attr("title",this.option("filterPanel.texts.filterEnabledHint")),t}_getFilterElement(){const e=this,t=(0,a.default)("<div>").addClass("dx-icon-filter");return n.default.on(t,"click",(()=>e._showFilterBuilder())),(0,c.registerKeyboardAction)("filterPanel",e,t,void 0,(()=>e._showFilterBuilder())),e._addTabIndexToElement(t),t}_getTextElement(){const e=this,t=(0,a.default)("<div>").addClass(e.addWidgetPrefix(f));let i;const o=e.option("filterValue");return o?(0,s.when)(e.getFilterText(o,this._filterSyncController.getCustomFilterOperations())).done((i=>{const n=e.option("filterPanel.customizeText");if(n){const t=n({component:e.component,filterValue:o,text:i});"string"==typeof t&&(i=t)}t.text(i)})):(i=e.option("filterPanel.texts.createFilter"),t.text(i)),n.default.on(t,"click",(()=>e._showFilterBuilder())),(0,c.registerKeyboardAction)("filterPanel",e,t,void 0,(()=>e._showFilterBuilder())),e._addTabIndexToElement(t),t}_showFilterBuilder(){this.option("filterBuilderPopup.visible",!0)}_getRemoveButtonElement(){const e=this,t=()=>e.option("filterValue",null),i=(0,a.default)("<div>").addClass(e.addWidgetPrefix(v)).text(e.option("filterPanel.texts.clearFilter"));return n.default.on(i,"click",t),(0,c.registerKeyboardAction)("filterPanel",this,i,void 0,t),e._addTabIndexToElement(i),i}_addTabIndexToElement(e){if(!this.option("useLegacyKeyboardNavigation")){const t=this.option("tabindex")||0;e.attr("tabindex",t)}}optionChanged(e){switch(e.name){case"filterValue":this._invalidate(),this.option("filterPanel.filterEnabled",!0),e.handled=!0;break;case"filterPanel":this._invalidate(),e.handled=!0;break;default:super.optionChanged(e)}}_getConditionText(e,t,i){let n=`[${e}] ${t}`;return(0,r.isDefined)(i)&&(n+=i),n}_getValueMaskedText(e){return Array.isArray(e)?`('${e.join("', '")}')`:` '${e}'`}_getValueText(e,t,i){const n=new s.Deferred,o=t&&t.customizeText;if((0,r.isDefined)(i)||o)if(!o&&e.lookup)(0,u.getCurrentLookupValueText)(e,i,(e=>{n.resolve(this._getValueMaskedText(e))}));else{const o=Array.isArray(i)?i:p.default.getDisplayValue(e,i,null);(0,s.when)((0,u.getCurrentValueText)(e,o,t,"filterPanel")).done((e=>{n.resolve(this._getValueMaskedText(e))}))}else n.resolve("");return n.promise()}getConditionText(e,t){const i=this,n=e[1],o=new s.Deferred,a=(0,u.getCustomOperation)(t.customOperations,n);let r;const l=(0,u.getField)(e[0],t.columns),c=l.caption||"",h=e[2];return r=a?a.caption||d.default.captionize(a.name):null===h?(0,u.getCaptionByOperation)("="===n?"isblank":"isnotblank",t.filterOperationDescriptions):(0,u.getCaptionByOperation)(n,t.filterOperationDescriptions),this._getValueText(l,a,h).done((e=>{o.resolve(i._getConditionText(c,r,e))})),o}getGroupText(e,t,i){const n=this,o=new s.Deferred,a=[],r=(0,u.getGroupValue)(e);return e.forEach((e=>{(0,u.isCondition)(e)?a.push(n.getConditionText(e,t)):(0,u.isGroup)(e)&&a.push(n.getGroupText(e,t,!0))})),s.when.apply(this,a).done((function(){let e;for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];if(r.startsWith("!")){e=`${t.groupOperationDescriptions[`not${r.substring(1,2).toUpperCase()}${r.substring(2)}`].split(" ")[0]} ${a[0]}`}else e=a.join(` ${t.groupOperationDescriptions[r]} `);i&&(e=`(${e})`),o.resolve(e)})),o}getFilterText(e,t){const i={customOperations:t,columns:this._columnsController.getFilteringColumns(),filterOperationDescriptions:this.option("filterBuilder.filterOperationDescriptions"),groupOperationDescriptions:this.option("filterBuilder.groupOperationDescriptions")};return(0,u.isCondition)(e)?this.getConditionText(e,i):this.getGroupText(e,i)}}t.FilterPanelView=y;t.filterPanelModule={defaultOptions:()=>({filterPanel:{visible:!1,filterEnabled:!0,texts:{createFilter:o.default.format("dxDataGrid-filterPanelCreateFilter"),clearFilter:o.default.format("dxDataGrid-filterPanelClearFilter"),filterEnabledHint:o.default.format("dxDataGrid-filterPanelFilterEnabledHint")}}}),views:{filterPanelView:y},extenders:{controllers:{data:e=>class extends e{optionChanged(e){if("filterPanel"===e.name)this._applyFilter(),e.handled=!0;else super.optionChanged(e)}}}}}},62289:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.filterRowModule=t.ApplyFilterViewController=void 0;var n=v(i(92774)),o=i(98834),a=v(i(4671)),s=v(i(64553)),r=i(17781),l=i(52576),d=i(21274),u=i(57653),c=i(11528),h=v(i(78694)),p=v(i(1614)),g=v(i(89132)),_=i(16191),f=v(i(74854)),m=v(i(53226));function v(e){return e&&e.__esModule?e:{default:e}}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},C.apply(null,arguments)}const y={"=":"filter-operation-equals","<>":"filter-operation-not-equals","<":"filter-operation-less","<=":"filter-operation-less-equal",">":"filter-operation-greater",">=":"filter-operation-greater-equal",default:"filter-operation-default",notcontains:"filter-operation-not-contains",contains:"filter-operation-contains",startswith:"filter-operation-starts-with",endswith:"filter-operation-ends-with",between:"filter-operation-between"},b={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",between:"between"},x="filter-row",w="filter-range-overlay",S="filter-range-start",D="dx-menu",I="dx-editor-with-menu",E="dx-editor-container",T="dx-editor-cell",A="dx-highlight-outline",O="dx-focused",P="dx-filter-range-content",k="dx-filter-modified",M="input:not([type='hidden'])",R=["date","datetime","number"],L=a.default.format("dxDataGrid-ariaSearchBox");function B(e){return"onClick"===e.option("filterRow.applyFilter")}const V=function(e){const t=e&&e.children(),i=t&&t.data("dxComponents"),n=i&&i.length&&t.data(i[0]);return n instanceof h.default?n:null},F=function(e,t){let i="",n="";const o=H(e,t),a=m.default.getFormatOptionsByColumn(t,"filterRow");return Array.isArray(o)?(i=m.default.formatValue(o[0],a),n=m.default.formatValue(o[1],a),""!==n&&(i+=` - ${n}`)):(0,c.isDefined)(o)&&(i=m.default.formatValue(o,a)),i};function H(e,t){if(t)return B(e)&&void 0!==t.bufferedFilterValue?t.bufferedFilterValue:t.filterValue}const N=function(e,t){if(t)return B(e)&&void 0!==t.bufferedSelectedFilterOperation?t.bufferedSelectedFilterOperation:t.selectedFilterOperation},z=function(e,t,i){const n=e._columnsController.columnOption(t),o=H(e,n),a=i.closest(`.${e.addWidgetPrefix(w)}`).length,s=i.hasClass(e.addWidgetPrefix(S));return o&&Array.isArray(o)&&"between"===N(e,n)?s?o[0]:o[1]:!a&&function(e,t){return!(t&&R.includes(t.dataType)&&Array.isArray(e))&&void 0!==e}(o,n)?o:null},W=function(e,t){const i=""===t.value?null:t.value,n=t.container,o=e._columnsController.columnOption(t.column.index),a=z(e,o.index,n);if(!(0,c.isDefined)(a)&&!(0,c.isDefined)(i))return;e._applyFilterViewController.setHighLight(n,a!==i);const s=B(e)?"bufferedFilterValue":"filterValue",r=function(e,t,i,n){if("between"===N(e,i)){const o=H(e,i);return n.hasClass(e.addWidgetPrefix(S))?[t,Array.isArray(o)?o[1]:void 0]:[Array.isArray(o)?o[0]:o,t]}return t}(e,i,o,n),l="between"===N(e,o),d=t.notFireEvent||l&&Array.isArray(r)&&r.includes(void 0);e._columnsController.columnOption(o.index,s,r,d)};class $ extends f.default.ViewController{init(){this._columnsController=this.getController("columns")}_getHeaderPanel(){return this._headerPanel||(this._headerPanel=this.getView("headerPanel")),this._headerPanel}setHighLight(e,t){B(this)&&(e&&e.toggleClass(A,t)&&e.closest(`.${T}`).toggleClass(k,t),this._getHeaderPanel().enableApplyButton(t))}applyFilter(){const e=this._columnsController.getColumns();this._columnsController.beginUpdate();for(let t=0;t<e.length;t++){const i=e[t];void 0!==i.bufferedFilterValue&&(this._columnsController.columnOption(t,"filterValue",i.bufferedFilterValue),i.bufferedFilterValue=void 0),void 0!==i.bufferedSelectedFilterOperation&&(this._columnsController.columnOption(t,"selectedFilterOperation",i.bufferedSelectedFilterOperation),i.bufferedSelectedFilterOperation=void 0)}this._columnsController.endUpdate(),this.removeHighLights()}removeHighLights(){if(B(this)){const e=this.getView("columnHeadersView").element();e.find(`.${this.addWidgetPrefix(x)} .${A}`).removeClass(A),e.find(`.${this.addWidgetPrefix(x)} .${k}`).removeClass(k),this._getHeaderPanel().enableApplyButton(!1)}}setCurrentColumnForFiltering(e){this._currentColumn=e}getCurrentColumnForFiltering(){return this._currentColumn}}t.ApplyFilterViewController=$;t.filterRowModule={defaultOptions:()=>({syncLookupFilterValues:!0,filterRow:{visible:!1,showOperationChooser:!0,showAllText:a.default.format("dxDataGrid-filterRowShowAllText"),resetOperationText:a.default.format("dxDataGrid-filterRowResetOperationText"),applyFilter:"auto",applyFilterText:a.default.format("dxDataGrid-applyFilterText"),operationDescriptions:{equal:a.default.format("dxDataGrid-filterRowOperationEquals"),notEqual:a.default.format("dxDataGrid-filterRowOperationNotEquals"),lessThan:a.default.format("dxDataGrid-filterRowOperationLess"),lessThanOrEqual:a.default.format("dxDataGrid-filterRowOperationLessOrEquals"),greaterThan:a.default.format("dxDataGrid-filterRowOperationGreater"),greaterThanOrEqual:a.default.format("dxDataGrid-filterRowOperationGreaterOrEquals"),startsWith:a.default.format("dxDataGrid-filterRowOperationStartsWith"),contains:a.default.format("dxDataGrid-filterRowOperationContains"),notContains:a.default.format("dxDataGrid-filterRowOperationNotContains"),endsWith:a.default.format("dxDataGrid-filterRowOperationEndsWith"),between:a.default.format("dxDataGrid-filterRowOperationBetween"),isBlank:a.default.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:a.default.format("dxFilterBuilder-filterOperationIsNotBlank")},betweenStartText:a.default.format("dxDataGrid-filterRowOperationBetweenStartText"),betweenEndText:a.default.format("dxDataGrid-filterRowOperationBetweenEndText")}}),controllers:{applyFilter:$},extenders:{controllers:{data:e=>class extends e{skipCalculateColumnFilters(){return!1}_calculateAdditionalFilter(){if(this.skipCalculateColumnFilters())return super._calculateAdditionalFilter();const e=[super._calculateAdditionalFilter()],t=this._columnsController.getVisibleColumns(null,!0),i=this._applyFilterController;return(0,d.each)(t,(function(){var t;const n=(null===(t=i.getCurrentColumnForFiltering())||void 0===t?void 0:t.index)===this.index;if(this.allowFiltering&&this.calculateFilterExpression&&(0,c.isDefined)(this.filterValue)&&!n){const t=this.createFilterExpression(this.filterValue,this.selectedFilterOperation||this.defaultFilterOperation,"filterRow");e.push(t)}})),m.default.combineFilters(e)}},columnsResizer:e=>class extends e{_startResizing(){const e=this;if(super._startResizing.apply(e,arguments),e.isResizing()){const t=e._columnHeadersView.getFilterRangeOverlayInstance();if(t){const i=t.$element().closest("td").index();i!==e._targetPoint.columnIndex&&i!==e._targetPoint.columnIndex+1||t.$content().hide()}}}_endResizing(){const e=this;let t;if(e.isResizing()){const i=e._columnHeadersView.getFilterRangeOverlayInstance();i&&(t=i.$element().closest("td"),e._columnHeadersView._updateFilterRangeOverlay({width:(0,u.getOuterWidth)(t,!0)+1}),i.$content().show())}super._endResizing.apply(e,arguments)}},editing:e=>class extends e{updateFieldValue(e){return e.column.lookup&&(this._needUpdateLookupDataSource=!0),super.updateFieldValue.apply(this,arguments)}_afterSaveEditData(e){var t;this._needUpdateLookupDataSource&&!e&&(null===(t=this.getView("columnHeadersView"))||void 0===t||t.updateLookupDataSource());return this._needUpdateLookupDataSource=!1,super._afterSaveEditData.apply(this,arguments)}_afterCancelEditData(){return this._needUpdateLookupDataSource=!1,super._afterCancelEditData.apply(this,arguments)}}},views:{columnHeadersView:e=>class extends e{init(){super.init(),this._applyFilterViewController=this.getController("applyFilter")}optionChanged(e){switch(e.name){case"filterRow":case"showColumnLines":this._invalidate(!0,!0),e.handled=!0;break;case"syncLookupFilterValues":e.value?this.updateLookupDataSource():this.render(),e.handled=!0;break;default:super.optionChanged(e)}}_updateEditorValue(e,t){const i=V(t);i&&i.option("value",z(this,e.index,t))}_columnOptionChanged(e){const t=this,{optionNames:i}=e;let n,o,a,r;if(m.default.checkChanges(i,["filterValue","bufferedFilterValue","selectedFilterOperation","bufferedSelectedFilterOperation","filterValues","filterType"])&&void 0!==e.columnIndex){const l=t._columnsController.getVisibleIndex(e.columnIndex),d=t._columnsController.columnOption(e.columnIndex);if(n=t._getCellElement(t.element().find(`.${t.addWidgetPrefix(x)}`).index(),l)??(0,s.default)(),o=n.find(`.${E}`).first(),i.filterValue||i.bufferedFilterValue){t._updateEditorValue(d,o);const e=n.find(`.${t.addWidgetPrefix(w)}`).data("dxOverlay");e&&(a=e.$content().find(`.${E}`),t._updateEditorValue(d,a.first()),t._updateEditorValue(d,a.last())),e&&e.option("visible")||t._updateFilterRangeContent(n,F(t,d))}(i.selectedFilterOperation||i.bufferedSelectedFilterOperation)&&l>=0&&d&&(r=n.find(`.${D}`),r.length&&(t._updateFilterOperationChooser(r,d,o),"between"===N(t,d)?t._renderFilterRangeContent(n,d):o.find(`.${P}`).length&&(t._renderEditor(o,t._getEditorOptions(o,d)),t._hideFilterRange())))}else super._columnOptionChanged(e)}_renderCore(){return this._filterRangeOverlayInstance=null,super._renderCore.apply(this,arguments)}_resizeCore(){var e;super._resizeCore.apply(this,arguments),null===(e=this._filterRangeOverlayInstance)||void 0===e||e.repaint()}isFilterRowVisible(){return this._isElementVisible(this.option("filterRow"))}isVisible(){return super.isVisible()||this.isFilterRowVisible()}_initFilterRangeOverlay(e,t){const i=this,a={},r=e.find(".dx-editor-container"),l=i.addWidgetPrefix(w),d=(0,s.default)("<div>").addClass(l).appendTo(e);return i._createComponent(d,g.default,{height:"auto",shading:!1,showTitle:!1,focusStateEnabled:!1,hideOnOutsideClick:!0,wrapperAttr:{class:l},animation:!1,position:{my:"top",at:"top",of:r.length&&r||e,offset:"0 -1"},contentTemplate(r){let l,d=(0,s.default)("<div>").addClass(`${E} ${i.addWidgetPrefix(S)}`).appendTo(r);return t=i._columnsController.columnOption(t.index),l=i._getEditorOptions(d,t),l.sharedData=a,i._renderEditor(d,l),n.default.on(d.find(M),"keydown",(t=>{let a=e.find("[tabindex]").not(t.target).first();"tab"===(0,o.normalizeKeyName)(t)&&t.shiftKey&&(t.preventDefault(),i._hideFilterRange(),a.length||(a=e.prev().find("[tabindex]").last()),n.default.trigger(a,"focus"))})),d=(0,s.default)("<div>").addClass(`${E} ${i.addWidgetPrefix("filter-range-end")}`).appendTo(r),l=i._getEditorOptions(d,t),l.sharedData=a,i._renderEditor(d,l),n.default.on(d.find(M),"keydown",(t=>{"tab"!==(0,o.normalizeKeyName)(t)||t.shiftKey||(t.preventDefault(),i._hideFilterRange(),n.default.trigger(e.next().find("[tabindex]").first(),"focus"))})),(0,s.default)(r).addClass(i.getWidgetContainerClass())},onShown(e){const t=e.component.$content().find(`.${E}`).first();n.default.trigger(t.find(M),"focus")},onHidden(){t=i._columnsController.columnOption(t.index),e.find(`.${D}`).parent().addClass(I),"between"===N(i,t)&&(i._updateFilterRangeContent(e,F(i,t)),i.component.updateDimensions())}})}_updateFilterRangeOverlay(e){const t=this._filterRangeOverlayInstance;t&&t.option(e)}_showFilterRange(e,t){const i=this,n=e.children(`.${i.addWidgetPrefix(w)}`);let o=n.length&&n.data("dxOverlay");!o&&t&&(o=i._initFilterRangeOverlay(e,t)),o.option("visible")||(i._filterRangeOverlayInstance&&i._filterRangeOverlayInstance.hide(),i._filterRangeOverlayInstance=o,i._updateFilterRangeOverlay({width:(0,u.getOuterWidth)(e,!0)+1}),i._filterRangeOverlayInstance&&i._filterRangeOverlayInstance.show())}_hideFilterRange(){const e=this._filterRangeOverlayInstance;e&&e.hide()}getFilterRangeOverlayInstance(){return this._filterRangeOverlayInstance}_createRow(e){const t=super._createRow(e);return"filter"===e.rowType&&(t.addClass(this.addWidgetPrefix(x)),this.option("useLegacyKeyboardNavigation")||n.default.on(t,"keydown",(e=>(0,_.selectView)("filterRow",this,e)))),t}_getRows(){const e=super._getRows();return this.isFilterRowVisible()&&e.push({rowType:"filter"}),e}_renderFilterCell(e,t){const i=this,{column:n}=t,o=(0,s.default)(e);i.component.option("showColumnHeaders")&&i.setAria("describedby",n.headerId,o),i.setAria("label",a.default.format("dxDataGrid-ariaFilterCell"),o),o.addClass(T);const r=(0,s.default)("<div>").appendTo(o),l=(0,s.default)("<div>").addClass(E).appendTo(r);if("between"===N(i,n))i._renderFilterRangeContent(o,n);else{const e=i._getEditorOptions(l,n);i._renderEditor(l,e)}const{alignment:d}=n;d&&"center"!==d&&o.find(M).first().css("textAlign",n.alignment),n.filterOperations&&n.filterOperations.length&&i._renderFilterOperationChooser(r,n,l)}_renderCellContent(e,t){const i=this,{column:n}=t;if("filter"===t.rowType)if(n.command)e.html("&nbsp;");else if(n.allowFiltering)return void i.renderTemplate(e,i._renderFilterCell.bind(i),t).done((()=>{i._updateCell(e,t)}));super._renderCellContent.apply(this,arguments)}_getEditorOptions(e,t){const i=this,n={editorOptions:{inputAttr:i._getFilterInputAccessibilityAttributes(t)}},o=(0,l.extend)(n,t,{value:z(i,t.index,e),parentType:"filterRow",showAllText:i.option("filterRow.showAllText"),updateValueTimeout:"onClick"===i.option("filterRow.applyFilter")?0:700,width:null,setValue(n,o){W(i,{column:t,value:n,container:e,notFireEvent:o})}});return"between"===N(i,t)&&(e.hasClass(i.addWidgetPrefix(S))?o.placeholder=i.option("filterRow.betweenStartText"):o.placeholder=i.option("filterRow.betweenEndText")),o}_getFilterInputAccessibilityAttributes(e){const t=a.default.format("dxDataGrid-ariaFilterCell");return this.component.option("showColumnHeaders")?{"aria-label":t,"aria-describedby":e.headerId}:{"aria-label":t}}_renderEditor(e,t){e.empty();const i=(0,s.default)("<div>").appendTo(e),n=this._dataController.dataSource();if(t.lookup&&this.option("syncLookupFilterValues")){this._applyFilterViewController.setCurrentColumnForFiltering(t);const e=this._dataController.getCombinedFilter();this._applyFilterViewController.setCurrentColumnForFiltering(null);const o=m.default.getWrappedLookupDataSource(t,n,e),a=C({},t,{lookup:C({},t.lookup,{dataSource:o})});return this._editorFactoryController.createEditor(i,a)}return this._editorFactoryController.createEditor(i,t)}_renderFilterRangeContent(e,t){const i=this,o=e.find(`.${E}`).first();o.empty();const a=(0,s.default)("<div>").addClass(P).attr("tabindex",this.option("tabIndex"));n.default.on(a,"focusin",(()=>{i._showFilterRange(e,t)})),a.appendTo(o),i._updateFilterRangeContent(e,F(i,t))}_updateFilterRangeContent(e,t){const i=e.find(`.${P}`);i.length&&(""===t?i.html("&nbsp;"):i.text(t))}_updateFilterOperationChooser(e,t,i){const o=this;let a;const r=function(){const t=p.default.getInstance(e);t&&t.option("focusedElement",null),a&&o._focusEditor(i)},l=this._editorFactoryController;o._createComponent(e,p.default,{integrationOptions:{},activeStateEnabled:!1,selectionMode:"single",cssClass:`${o.getWidgetContainerClass()} dx-cell-focus-disabled dx-filter-menu`,showFirstSubmenuMode:"onHover",hideSubmenuOnMouseLeave:!0,items:[{disabled:!(t.filterOperations&&t.filterOperations.length),icon:y[N(o,t)||"default"],selectable:!1,items:o._getFilterOperationMenuItems(t)}],onItemRendered:e=>{let{itemElement:t}=e;this.setAria("label",L,(0,s.default)(t))},onItemClick(e){const n=e.itemData.name,a=N(o,t);let s=!1;const r=B(o),l={};if(!(e.itemData.items||n&&n===a)){if(n?(l[r?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=n,"between"!==n&&"between"!==a||(s="between"===n,l[r?"bufferedFilterValue":"filterValue"]=null)):(l[r?"bufferedFilterValue":"filterValue"]=null,l[r?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=t.defaultSelectedFilterOperation||null),o._columnsController.columnOption(t.index,l),o._applyFilterViewController.setHighLight(i,!0),!n){const e=V(i);e&&"dxDateBox"===e.NAME&&!e.option("isValid")&&(e.clear(),e.option("isValid",!0))}s?o._showFilterRange(i.closest(`.${T}`),t):o._focusEditor(i)}},onSubmenuShowing(){a=o._isEditorFocused(i),l.loseFocus()},onSubmenuHiding(){n.default.trigger(e,"blur"),r()},onContentReady(t){n.default.on(e,"blur",(()=>{t.component._hideSubmenuAfterTimeout(),r()}))},rtlEnabled:o.option("rtlEnabled")})}_isEditorFocused(e){return e.hasClass(O)||e.parents(`.${O}`).length}_focusEditor(e){this._editorFactoryController.focus(e),n.default.trigger(e.find(M),"focus")}_renderFilterOperationChooser(e,t,i){const n=this;let o;n.option("filterRow.showOperationChooser")&&(e.addClass(I),o=(0,s.default)("<div>").prependTo(e),n._updateFilterOperationChooser(o,t,i))}_getFilterOperationMenuItems(e){const t=this;let i=[{}];const n=t.option("filterRow"),o=n&&n.operationDescriptions||{};if(e.filterOperations&&e.filterOperations.length){const a=e.filterOperations.filter((e=>(0,c.isDefined)(b[e])));i=(0,d.map)(a,(i=>{const n=b[i];return{name:i,selected:(N(t,e)||e.defaultFilterOperation)===i,text:o[n],icon:y[i]}})),i.push({name:null,text:n&&n.resetOperationText,icon:y.default})}return i}_handleDataChanged(e){var t,i,n,o,a;const s=null===(t=this._dataController)||void 0===t||null===(i=t.dataSource)||void 0===i?void 0:i.call(t),r=null==s||null===(n=s.lastLoadOptions)||void 0===n?void 0:n.call(s);var l;(super._handleDataChanged.apply(this,arguments),null!==(o=e.operationTypes)&&void 0!==o&&o.filtering||null!==(a=e.operationTypes)&&void 0!==a&&a.fullReload)&&this.updateLookupDataSource((null===(l=e.operationTypes)||void 0===l?void 0:l.filtering)||(null==r?void 0:r.filter))}updateLookupDataSource(e){if(!this.option("syncLookupFilterValues"))return;if(!this.element())return;const t=this._columnsController.getVisibleColumns(),i=this._dataController.dataSource(),n=this._applyFilterViewController,o=this.element().find(`.${this.addWidgetPrefix(x)}`).index();-1!==o&&t.forEach(((t,a)=>{if(!t.lookup||t.calculateCellValue!==t.defaultCalculateCellValue)return;const s=this._getCellElement(o,a),l=V(null==s?void 0:s.find(".dx-editor-container"));if(l){n.setCurrentColumnForFiltering(t);const o=this._dataController.getCombinedFilter()||null;n.setCurrentColumnForFiltering(null);const a=l.option("dataSource");if(!e||!(0,r.equalByValue)(a.__dataGridSourceFilter||null,o)){const e=m.default.getWrappedLookupDataSource(t,i,o);l.option("dataSource",e)}}}))}getColumnElements(e,t){var i;const n=this._getRows();return"filter"===(null==n||null===(i=n[e])||void 0===i?void 0:i.rowType)&&arguments.length<2?this.getCellElements(e):super.getColumnElements(e,t)}},headerPanel:e=>class extends e{init(){super.init(),this._dataController=this.getController("data"),this._applyFilterViewController=this.getController("applyFilter")}optionChanged(e){"filterRow"===e.name?(this._invalidate(),e.handled=!0):super.optionChanged(e)}_getToolbarItems(){const e=super._getToolbarItems();return this._prepareFilterItem().concat(e)}_prepareFilterItem(){const e=this,t=[];if(e._isShowApplyFilterButton()){const i=e.option("filterRow.applyFilterText"),n={widget:"dxButton",options:{icon:"apply-filter",disabled:!e._columnsController.getColumns().filter((e=>void 0!==e.bufferedFilterValue)).length,onClick:function(){e._applyFilterViewController.applyFilter()},hint:i,text:i,onInitialized:function(t){(0,s.default)(t.element).addClass(e._getToolbarButtonClass("dx-apply-button"))}},showText:"inMenu",name:"applyFilterButton",location:"after",locateInMenu:"auto",sortIndex:10};t.push(n)}return t}_isShowApplyFilterButton(){const e=this.option("filterRow");return!(null==e||!e.visible)&&"onClick"===e.applyFilter}enableApplyButton(e){this.setToolbarItemDisabled("applyFilterButton",!e)}isVisible(){return super.isVisible()||this._isShowApplyFilterButton()}}}}}},78746:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.filterSyncModule=t.FilterSyncController=void 0;var n=i(87739),o=i(11528),a=c(i(56417)),s=c(i(35185)),r=i(29498),l=c(i(74854)),d=c(i(53226)),u=i(44651);function c(e){return e&&e.__esModule?e:{default:e}}const h=["=","<>","<","<=",">",">=","notcontains","contains","startswith","endswith","between"],p="include",g="exclude";function _(e){return e.name||e.dataField}const f=function(){return{filterType:p,filterValues:void 0}},m=function(e){const t=e.filterValues||[];return!a.default.getGroupInterval(e)&&!(e.headerFilter&&e.headerFilter.dataSource)||1===t.length&&null===t[0]},v=function(e){const t=e.filterValue;if((0,o.isDefined)(t)){const t=e.selectedFilterOperation||e.defaultFilterOperation||(0,r.getDefaultOperation)(e);return[_(e),t,e.filterValue]}return null},C=function(e){let t,i;const{filterValues:n}=e;return n?(1===n.length&&m(e)&&!Array.isArray(n[0])?(t=e.filterType===g?"<>":"=",i=n[0]):(t=e.filterType===g?"noneof":"anyof",i=n),[_(e),t,i]):null},y=function(e,t,i){const n=function(e,t){if(!e)return f();let i;const n=e[1],o=e[2],a=Array.isArray(o);if(!a&&!m(t))return f();switch(n){case"anyof":case"=":i=p;break;case"noneof":case"<>":i=g;break;default:return f()}return{filterType:i,filterValues:a?o:[o]}}(i,t);e.columnOption(_(t),n)},b=function(e,t,i){let n,a=null==i?void 0:i[1];const s=null==i?void 0:i[2],r=t.filterOperations||t.defaultFilterOperations;(!r||r.indexOf(a)>=0||a===t.defaultFilterOperation)&&h.includes(a)&&null!==s?(a!==t.defaultFilterOperation||(0,o.isDefined)(t.selectedFilterOperation)||(a=t.selectedFilterOperation),n={filterValue:s,selectedFilterOperation:a}):n={filterValue:void 0,selectedFilterOperation:void 0},e.columnOption(_(t),n)};class x extends l.default.Controller{init(){this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._dataController.isFilterSyncActive()&&(this._columnsController.isAllDataTypesDefined()?this._initSync():this._dataController.dataSourceChanged.add((()=>this._initSync())))}publicMethods(){return["getCustomFilterOperations"]}syncFilterValue(){const e=this,t=this._columnsController.getFilteringColumns();this._skipSyncColumnOptions=!0,t.forEach((t=>{const i=(0,r.getMatchedConditions)(e.option("filterValue"),_(t));if(1===i.length){const e=i[0];y(this._columnsController,t,e),b(this._columnsController,t,e)}else(0,o.isDefined)(t.filterValues)&&y(this._columnsController,t,null),(0,o.isDefined)(t.filterValue)&&b(this._columnsController,t,null)})),this._skipSyncColumnOptions=!1}_initSync(){const e=this._columnsController.getColumns(),t=this._dataController.pageIndex();if(function(e){e.forEach((e=>{const t=_(e);if(!(0,o.isDefined)(t)&&e.allowFiltering)throw new s.default.Error("E1049",e.caption)}))}(e),!this.option("filterValue")){const e=this._columnsController.getFilteringColumns(),t=this.getFilterValueFromColumns(e);this._silentOption("filterValue",t)}this.syncFilterValue(),this._dataController.pageIndex(t)}_getSyncFilterRow(e,t){const i=v(t);return(0,o.isDefined)(i)?(0,r.syncFilters)(e,i):(0,r.removeFieldConditionsFromFilter)(e,_(t))}_getSyncHeaderFilter(e,t){const i=C(t);return i?(0,r.syncFilters)(e,i):(0,r.removeFieldConditionsFromFilter)(e,_(t))}getFilterValueFromColumns(e){if(!this._dataController.isFilterSyncActive())return null;const t=["and"];return e&&e.forEach((e=>{const i=C(e),n=v(e);i&&(0,r.addItem)(i,t),n&&(0,r.addItem)(n,t)})),(0,r.getNormalizedFilter)(t)}syncFilterRow(e,t){this.option("filterValue",this._getSyncFilterRow(this.option("filterValue"),e))}syncHeaderFilter(e){this.option("filterValue",this._getSyncHeaderFilter(this.option("filterValue"),e))}getCustomFilterOperations(){const e=this.option("filterBuilder.customOperations")??[];return[(0,u.anyOf)(this.component),(0,u.noneOf)(this.component)].concat(e)}}t.FilterSyncController=x;t.filterSyncModule={defaultOptions:()=>({filterValue:null,filterSyncEnabled:"auto"}),controllers:{filterSync:x},extenders:{controllers:{data:e=>class extends e{optionChanged(e){switch(e.name){case"filterValue":this._applyFilter(),this.isFilterSyncActive()&&this._filterSyncController.syncFilterValue(),e.handled=!0;break;case"filterSyncEnabled":e.handled=!0;break;case"columns":if(this.isFilterSyncActive()){const t=this._columnsController.getColumnByPath(e.fullName);if(t&&!this._filterSyncController._skipSyncColumnOptions){const i=this._parseColumnPropertyName(e.fullName);this._filterSyncController._skipSyncColumnOptions=!0,"filterType"===i?g!==e.value&&g!==e.previousValue||this._filterSyncController.syncHeaderFilter(t):"filterValues"===i?this._filterSyncController.syncHeaderFilter(t):["filterValue","selectedFilterOperation"].includes(i)&&this._filterSyncController.syncFilterRow(t,t.filterValue),this._filterSyncController._skipSyncColumnOptions=!1}}super.optionChanged(e);break;default:super.optionChanged(e)}}isFilterSyncActive(){const e=this.option("filterSyncEnabled");return"auto"===e?this.option("filterPanel.visible"):e}skipCalculateColumnFilters(){return((0,o.isDefined)(this.option("filterValue"))||this._filterSyncController._skipSyncColumnOptions)&&this.isFilterSyncActive()}_calculateAdditionalFilter(){if(!1===this.option("filterPanel.filterEnabled"))return super._calculateAdditionalFilter();const e=[super._calculateAdditionalFilter()],t=this._columnsController.getFilteringColumns();let i=this.option("filterValue");if(this.isFilterSyncActive()){const e=this._headerFilterController.getCurrentColumn(),t=this._applyFilterController.getCurrentColumnForFiltering(),n=e||t;(e||(0,o.isDefined)(null==t?void 0:t.filterValue))&&i&&(i=(0,r.removeFieldConditionsFromFilter)(i,_(n)))}const n=this._filterSyncController.getCustomFilterOperations(),a=(0,r.getFilterExpression)(i,t,n,"filterBuilder");return a&&e.push(a),d.default.combineFilters(e)}_parseColumnPropertyName(e){const t=e.match(/.*\.(.*)/);return t?t[1]:null}clearFilter(e){this.component.beginUpdate(),arguments.length>0?("filterValue"===e&&this.option("filterValue",null),super.clearFilter(e)):(this.option("filterValue",null),super.clearFilter()),this.component.endUpdate()}_applyFilter(){return this._filterSyncController._skipSyncColumnOptions?(new n.Deferred).resolve():super._applyFilter.apply(this,arguments)}}},views:{columnHeadersView:e=>class extends e{optionChanged(e){"filterValue"===e.name?this._updateHeaderFilterIndicators():super.optionChanged(e)}_isHeaderFilterEmpty(e){return this._dataController.isFilterSyncActive()?!(0,r.filterHasField)(this.option("filterValue"),_(e)):super._isHeaderFilterEmpty(e)}_needUpdateFilterIndicators(){return!this._dataController.isFilterSyncActive()}}}}}},51628:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.focusModule=t.FocusController=void 0;var n=h(i(64553)),o=i(17781),a=i(87739),s=i(21274),r=i(11528),l=i(1414),d=h(i(74854)),u=h(i(53226)),c=i(21774);function h(e){return e&&e.__esModule?e:{default:e}}const p="dx-row-focused",g=`.dx-row.${p}`,_="dx-cell-focus-disabled";class f extends d.default.ViewController{getKeyboardController(){return this.getController("keyboardNavigation")}getDataController(){return this.getController("data")}init(){this.component._optionsByReference.focusedRowKey=!0}optionChanged(e){const{name:t,value:i,previousValue:n}=e;switch(t){case"focusedRowIndex":this._focusRowByIndex(i),this.getKeyboardController()._fireFocusedRowChanged(),e.handled=!0;break;case"focusedRowKey":if(Array.isArray(i)&&JSON.stringify(i)===JSON.stringify(n))return;this._focusRowByKey(i),this.getKeyboardController()._fireFocusedRowChanged(),e.handled=!0;break;case"focusedColumnIndex":case"focusedRowEnabled":case"autoNavigateToFocusedRow":e.handled=!0;break;default:super.optionChanged(e)}}publicMethods(){return["navigateToRow","isRowFocused"]}isAutoNavigateToFocusedRow(){return"infinite"!==this.option("scrolling.mode")&&this.option("autoNavigateToFocusedRow")}_focusRowByIndex(e,t){this.option("focusedRowEnabled")&&((e=void 0!==e?e:this.option("focusedRowIndex"))<0?this.isAutoNavigateToFocusedRow()&&this._resetFocusedRow():this._focusRowByIndexCore(e,t))}_focusRowByIndexCore(e,t){const i=this.getDataController().pageSize(),n=()=>{if(this._isValidFocusedRowIndex(e)){let i=e-this.getDataController().getRowIndexOffset(!0);if(!t||t.paging&&!t.filtering){const e=this.getDataController()._getLastItemIndex();i=Math.min(i,e)}const n=this.getDataController().getKeyByRowIndex(i,!0);(0,r.isDefined)(n)&&!this.isRowFocused(n)&&this.option("focusedRowKey",n)}};if(i>=0)if(this._isLocalRowIndex(e))n();else{const t=Math.floor(e/this.getDataController().pageSize());(0,a.when)(this.getDataController().pageIndex(t),this.getDataController().waitReady()).done((()=>{n()}))}}_isLocalRowIndex(e){if(this.getKeyboardController()._isVirtualScrolling()){const t=Math.floor(e/this.getDataController().pageSize()),i=this.getDataController().virtualItemsCount(),n=i?i.begin:-1,o=this.getDataController().getVisibleRows().length+this.getDataController().getRowIndexOffset(),a=Math.ceil(o/this.getDataController().pageSize());return n<=e&&a>t}return!0}_setFocusedRowKeyByIndex(e){if(this._isValidFocusedRowIndex(e)){const t=Math.min(e-this.getDataController().getRowIndexOffset(),this.getDataController().items().length-1),i=this.getDataController().getKeyByRowIndex(t);(0,r.isDefined)(i)&&!this.isRowFocused(i)&&this.option("focusedRowKey",i)}}_focusRowByKey(e){(0,r.isDefined)(e)?this._navigateToRow(e,!0):this._resetFocusedRow()}_resetFocusedRow(){const e=this.option("focusedRowKey"),t=(0,r.isDefined)(e);!t&&this.option("focusedRowIndex")<0||(t&&this.option("focusedRowKey",null),this.getKeyboardController().setFocusedRowIndex(-1),this.option("focusedRowIndex",-1),this.getDataController().updateItems({changeType:"updateFocusedRow",focusedRowKey:null}),this.getKeyboardController()._fireFocusedRowChanged())}_isValidFocusedRowIndex(e){const t=this.getDataController().getVisibleRows()[e];return!t||"data"===t.rowType||"group"===t.rowType}navigateToRow(e){return this.isAutoNavigateToFocusedRow()||this.option("focusedRowIndex",-1),this._navigateToRow(e)}_navigateToRow(e,t){const i=this,n=i.isAutoNavigateToFocusedRow(),o=new a.Deferred;if(void 0===e||!this.getDataController().dataSource())return o.reject().promise();const s=i.getFocusedRowIndexByKey(e);return!n&&t||s>=0?i._navigateTo(e,o,t):this.getDataController().getPageIndexByKey(e).done((n=>{n<0?o.resolve(-1):n===this.getDataController().pageIndex()?this.getDataController().reload().done((()=>{i.isRowFocused(e)&&this.getDataController().getRowIndexByKey(e)>=0?o.resolve(i.getFocusedRowIndexByKey(e)):i._navigateTo(e,o,t)})).fail(o.reject):this.getDataController().pageIndex(n).done((()=>{i._navigateTo(e,o,t)})).fail(o.reject)})).fail(o.reject),o.promise()}_navigateTo(e,t,i){const n=this.getDataController().getRowIndexByKey(e),o=u.default.isVirtualRowRendering(this);this.isAutoNavigateToFocusedRow()&&o&&n<0?this._navigateToVirtualRow(e,t,i):this._navigateToVisibleRow(e,t,i)}_navigateToVisibleRow(e,t,i){if(i)this._triggerUpdateFocusedRow(e,t);else{const i=this.getFocusedRowIndexByKey(e);this.getView("rowsView").scrollToRowElement(e,t).done((()=>{t.resolve(i)}))}}_navigateToVirtualRow(e,t,i){const n=this.getDataController()._rowsScrollController,o=u.default.getIndexByKey(e,this.getDataController().items(!0)),a=this.getView("rowsView").getScrollable();if(n&&a&&o>=0){const a=o+this.getDataController().getRowIndexOffset(!0),s=n.getItemOffset(a),r=()=>{this.getDataController().totalCount()&&!this.getDataController().items().length||(this.component.off("contentReady",r),i?this._triggerUpdateFocusedRow(e,t):t.resolve(a))};this.component.on("contentReady",r),this.getView("rowsView").scrollTopPosition(s)}else t.resolve(-1)}_triggerUpdateFocusedRow(e,t){const i=this.getFocusedRowIndexByKey(e);if(this._isValidFocusedRowIndex(i)){let n;this.option("focusedRowEnabled")?this.getDataController().updateItems({changeType:"updateFocusedRow",focusedRowKey:e}):n=this.getView("rowsView").scrollToRowElement(e),(0,a.when)(n).done((()=>{this.getKeyboardController().setFocusedRowIndex(i),t&&t.resolve(i)}))}else t&&t.resolve(-1)}getFocusedRowIndexByKey(e){const t=this.getDataController().getRowIndexByKey(e,!0);return t>=0?t+this.getDataController().getRowIndexOffset(!0):-1}_focusRowByKeyOrIndex(){const e=this.option("focusedRowKey");let t=this.option("focusedRowIndex");if((0,r.isDefined)(e)){const i=this.getDataController().getRowIndexByKey(e);i>=0?(this.getKeyboardController()._isVirtualScrolling()&&(t=i+this.getDataController().getRowIndexOffset()),this.getKeyboardController().setFocusedRowIndex(t),this._triggerUpdateFocusedRow(e)):this._navigateToRow(e,!0).done((e=>{t>=0&&e<0?this._focusRowByIndex():t<0&&e>=0&&this.getKeyboardController().setFocusedRowIndex(e)}))}else t>=0&&this._focusRowByIndex(t)}isRowFocused(e){const t=this.option("focusedRowKey");if((0,r.isDefined)(t))return(0,o.equalByValue)(e,this.option("focusedRowKey"))}updateFocusedRow(e){const t=this,i=t.getDataController().getRowIndexByKey(e.focusedRowKey),o=t.getView("rowsView");let a,r;(0,s.each)(o.getTableElements(),((e,o)=>{const s=0===e;a=(0,n.default)(o),t._clearPreviousFocusedRow(a,i);const l=t._prepareFocusedRow({changedItem:t.getDataController().getVisibleRows()[i],$tableElement:a,focusedRowIndex:i});s&&(r=l)})),!e.preventScroll&&r&&o.scrollToElementVertically(r)}_clearPreviousFocusedRow(e,t){const i=e.find(g).filter(((t,i)=>{const o=(0,n.default)(i).closest(`.${this.addWidgetPrefix("table")}`);return e.is(o)}));if(i.removeClass(p).removeClass(_).removeAttr("tabindex"),i.children("td").removeAttr("tabindex"),0!==t){(0,n.default)(this.getView("rowsView").getRowElement(0)).removeClass(_).removeAttr("tabIndex")}}_prepareFocusedRow(e){let t;const{changedItem:i}=e;if(i&&("data"===i.rowType||"group"===i.rowType)){const{focusedRowIndex:i}=e,{$tableElement:o}=e,a=this.option("tabindex")||0,s=this.getView("rowsView");t=(0,n.default)(s._getRowElements(o).eq(i)),t.addClass(p).attr("tabindex",a)}return t}}t.FocusController=f;t.focusModule={defaultOptions:()=>({focusedRowEnabled:!1,autoNavigateToFocusedRow:!0,focusedRowKey:null,focusedRowIndex:-1,focusedColumnIndex:-1}),controllers:{focus:f},extenders:{controllers:{keyboardNavigation:e=>class extends e{init(){const e=this.option("focusedRowIndex"),t=this.option("focusedColumnIndex");this.createAction("onFocusedRowChanging",{excludeValidators:["disabled","readOnly"]}),this.createAction("onFocusedRowChanged",{excludeValidators:["disabled","readOnly"]}),this.createAction("onFocusedCellChanging",{excludeValidators:["disabled","readOnly"]}),this.createAction("onFocusedCellChanged",{excludeValidators:["disabled","readOnly"]}),super.init(),this.setRowFocusType(),this._focusedCellPosition={},(0,r.isDefined)(e)&&e>=0&&(this._focusedCellPosition.rowIndex=e),(0,r.isDefined)(t)&&t>=0&&(this._focusedCellPosition.columnIndex=t)}setFocusedRowIndex(e){super.setFocusedRowIndex(e),this.option("focusedRowIndex",e)}setFocusedColumnIndex(e){super.setFocusedColumnIndex(e),this.option("focusedColumnIndex",e)}_escapeKeyHandler(e,t){return t||!this.option("focusedRowEnabled")?super._escapeKeyHandler(e,t):!!this.isCellFocusType()&&(this.setRowFocusType(),this._focus(this._getCellElementFromTarget(e.originalEvent.target),!0),!0)}_updateFocusedCellPosition(e,t){const i=super._updateFocusedCellPosition(e,t);return i&&i.columnIndex>=0&&this._fireFocusedCellChanged(e),i}},editorFactory:e=>class extends e{renderFocusOverlay(e,t){var i;const n=this.option("focusedRowEnabled");let o;if(n&&null!==(i=this._keyboardNavigationController)&&void 0!==i&&i.isRowFocusType()&&!this._editingController.isEditing()){if(n){"row"===this._keyboardNavigationController._getElementType(e)&&!e.hasClass(p)&&(o=this._keyboardNavigationController.getFirstValidCellInRow(e),this._keyboardNavigationController.focus(o))}}else super.renderFocusOverlay(e,t)}},columns:e=>class extends e{getSortDataSourceParameters(e,t){let i=super.getSortDataSourceParameters.apply(this,arguments);const n=this._dataController._dataSource,o=this._dataController.store();let a=o&&o.key();const s=n&&n.remoteOperations()||{},r=Object.keys(s).every((e=>!s[e]));if(a&&(this.option("focusedRowEnabled")&&!1!==this._focusController.isAutoNavigateToFocusedRow()||t)){a=Array.isArray(a)?a:[a];const e=a.filter((e=>!this.columnOption(e,"sortOrder")));e.length&&(i=i||[],r?i.push({selector:n.getDataIndexGetter(),desc:!1}):e.forEach((e=>i.push({selector:e,desc:!1}))))}return i}},data:e=>class extends e{constructor(){super(...arguments),this._needToUpdateFocusedRowByIndex=!1}_applyChange(e){if(!e||"updateFocusedRow"!==e.changeType)return super._applyChange.apply(this,arguments)}_fireChanged(e){if(super._fireChanged(e),this.option("focusedRowEnabled")&&this._dataSource){const t="update"===e.changeType&&e.repaintChangesOnly&&e.changeTypes&&e.changeTypes.indexOf("remove")>=0;this._needToUpdateFocusedRowByIndex?(this._needToUpdateFocusedRowByIndex=!1,this._focusController._focusRowByIndex()):"refresh"===e.changeType&&e.items.length||t?(this._updatePageIndexes(),this._updateFocusedRow(e)):"append"===e.changeType||"prepend"===e.changeType?this._updatePageIndexes():"update"===e.changeType&&e.repaintChangesOnly&&this._updateFocusedRow(e)}}_handleDataPushed(e){super._handleDataPushed(e);const t=this.option("focusedRowKey");this._needToUpdateFocusedRowByIndex=null==e?void 0:e.some((e=>"remove"===e.type&&(0,o.equalByValue)(e.key,t)))}_updatePageIndexes(){const e=this._lastRenderingPageIndex||0,t=this._rowsScrollController?this._rowsScrollController.pageIndex():0;this._lastRenderingPageIndex=t,this._isPagingByRendering=t!==e}isPagingByRendering(){return this._isPagingByRendering}_updateFocusedRow(e){const t=e.operationTypes||{},{reload:i,fullReload:n,pageIndex:o,paging:a}=t,s=this._keyboardNavigationController._isVirtualScrolling(),l=a&&!s,d=this.option("focusedRowKey"),u=this._focusController.isAutoNavigateToFocusedRow();if(i&&!1===o&&!n&&(0,r.isDefined)(d))this._focusController._navigateToRow(d,!0).done((e=>{e<0&&this._focusController._focusRowByIndex(void 0,t)}));else if(l&&u){const e=this.getRowIndexByKey(d),i=this.option("focusedRowIndex");!(i>=0)||!(i===e)&&e>=0||this._focusController._focusRowByIndex(i,t)}else l&&!u&&this.getRowIndexByKey(d)<0?this.option("focusedRowIndex",-1):t.fullReload&&this._focusController._focusRowByKeyOrIndex()}getPageIndexByKey(e){const t=this,i=new a.Deferred;return t.getGlobalRowIndexByKey(e).done((e=>{i.resolve(e>=0?Math.floor(e/t.pageSize()):-1)})).fail(i.reject),i.promise()}getGlobalRowIndexByKey(e){return this._dataSource.group()?this._calculateGlobalRowIndexByGroupedData(e):this._calculateGlobalRowIndexByFlatData(e)}_calculateGlobalRowIndexByFlatData(e,t,i){const n=this,o=new a.Deferred,s=n._dataSource;if(Array.isArray(e)||(0,l.isNewRowTempKey)(e))return o.resolve(-1).promise();let r=n._generateFilterByKey(e);return s.load({filter:n._concatWithCombinedFilter(r),skip:0,take:1}).done((a=>{a.length>0?(r=n._generateOperationFilterByKey(e,a[0],i),s.load({filter:n._concatWithCombinedFilter(r,t),skip:0,take:1,requireTotalCount:!0}).done(((e,t)=>{o.resolve(t.totalCount)}))):o.resolve(-1)})),o.promise()}_concatWithCombinedFilter(e,t){const i=this.getCombinedFilter();return u.default.combineFilters([e,i,t])}_generateBooleanFilter(e,t,i){const{desc:n}=i;switch(!0){case!1===t&&n:return[e,"=",!0];case!1===t&&!n:return[e,"=",null];case!0===t&&!n:case!(0,r.isBoolean)(t)&&n:return[e,"<>",t];default:return}}_generateOperationFilterByKey(e,t,i){const n=this,o=n.option("dateSerializationFormat"),a=n._dataSource.remoteOperations().filtering,s=n._dataSource.remoteOperations().sorting;let l=n._generateFilterByKey(e,"<"),d=n._columnsController.getSortDataSourceParameters(!a,!0);if(i){const e=n._columnsController.getGroupDataSourceParameters(!a);e&&(d=d?e.concat(d):e)}return d&&d.slice().reverse().forEach((e=>{const{selector:i,desc:d,compare:u}=e,{getter:h,rawValue:p,safeValue:g}=c.UiGridCoreFocusUtils.getSortFilterValue(e,t,{isRemoteFiltering:a,dateSerializationFormat:o,getSelector:e=>n._columnsController.columnOption(e,"selector")});if(l=[[i,"=",g],"and",l],null===p||(0,r.isBoolean)(p)){const e=n._generateBooleanFilter(i,g,d);e&&(l=[e,"or",l])}else{const e=d?">":"<";let t;u&&!s?t=t=>"<"===e?u(p,h(t))>=1:u(p,h(t))<=-1:(t=[i,e,g],d||(t=[t,"or",[i,"=",null]])),l=[t,"or",l]}})),l}_generateFilterByKey(e,t){const i=this._dataSource.key();let n=[];if(t||(t="="),Array.isArray(i))for(let o=0;o<i.length;++o){const a=e[i[o]];a&&(n.length>0&&n.push("and"),n.push([i[o],t,a]))}else n=[i,t,e];return n}_getLastItemIndex(){return this.items(!0).length-1}},editing:e=>class extends e{_deleteRowCore(e){const t=super._deleteRowCore.apply(this,arguments),i=this._dataController.getKeyByRowIndex(e);t.done((()=>{const e=this._dataController.getRowIndexByKey(i),t=this._dataController.getVisibleRows();-1!==e||t.length||this._focusController._resetFocusedRow()}))}}},views:{rowsView:e=>class extends e{_createRow(e){const t=super._createRow.apply(this,arguments);return this.option("focusedRowEnabled")&&e&&this._focusController.isRowFocused(e.key)&&t.addClass(p),t}_checkRowKeys(e){if(super._checkRowKeys.apply(this,arguments),this.option("focusedRowEnabled")&&this.option("dataSource")){const e=this._dataController.store();e&&!e.key()&&this._dataController.fireError("E1042","Row focusing")}}_update(e){"updateFocusedRow"===e.changeType?this.option("focusedRowEnabled")&&this._focusController.updateFocusedRow(e):super._update(e)}updateFocusElementTabIndex(e,t){this.option("focusedRowEnabled")?this._setFocusedRowElementTabIndex(t):super.updateFocusElementTabIndex(e)}_setFocusedRowElementTabIndex(e){const t=this.option("focusedRowKey"),i=this.option("tabIndex")??0,n=this._columnsController;let o=this._dataController.getRowIndexByKey(t),a=this.option("focusedColumnIndex");const s=this._findRowElementForTabIndex(),l=this._dataController.dataSource(),d=null==l?void 0:l.operationTypes(),u=!d||d.paging;(0,r.isDefined)(this._scrollToFocusOnResize)||(this._scrollToFocusOnResize=()=>{this.scrollToElementVertically(this._findRowElementForTabIndex()),this.resizeCompleted.remove(this._scrollToFocusOnResize)}),s.attr("tabIndex",i);const c=this.option("focusedRowIndex")-this._dataController.getRowIndexOffset(!0);!u&&o<0&&c>=0&&this._focusController.updateFocusedRow({focusedRowKey:t,preventScroll:e}),o>=0&&!e&&(a<0&&(a=0),o+=this._dataController.getRowIndexOffset(),a+=n.getColumnIndexOffset(),this._keyboardNavigationController.setFocusedCellPosition(o,a),this._focusController.isAutoNavigateToFocusedRow()&&(u||this._dataController.isPagingByRendering()||(this.resizeCompleted.remove(this._scrollToFocusOnResize),this.resizeCompleted.add(this._scrollToFocusOnResize))))}_findRowElementForTabIndex(){const e=this.option("focusedRowKey"),t=this._dataController.getRowIndexByKey(e);return(0,n.default)(this.getRowElement(t>=0?t:0))}scrollToRowElement(e){const t=this._dataController.getRowIndexByKey(e),i=(0,n.default)(this.getRow(t));return this.scrollToElementVertically(i)}scrollToElementVertically(e){const t=this.getScrollable();if(t&&e.length){const i=t.getScrollElementPosition(e,"vertical");return this.scrollTopPosition(i)}return(new a.Deferred).resolve()}scrollTopPosition(e){const t=new a.Deferred,i=this.getScrollable();if(i){const n=i.scrollTop(),o=()=>{i.off("scroll",o),t.resolve()};if(e!==n)return i.on("scroll",o),this._dataController.resetFilterApplying(),i.scrollTo({top:e}),t.promise()}return t.resolve()}}}}}},21774:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.UiGridCoreFocusUtils=void 0;var n,o=(n=i(71051))&&n.__esModule?n:{default:n},a=i(11528);t.UiGridCoreFocusUtils={getSortFilterValue:(e,t,i)=>{let{isRemoteFiltering:n,dateSerializationFormat:s,getSelector:r}=i;const{selector:l}=e,d=(0,a.isFunction)(l)?l:r(l),u=d?d(t):t[l];return{getter:d,rawValue:u,safeValue:n&&(0,a.isDate)(u)?o.default.serializeDate(u,s):u}}}},69952:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.headerFilterModule=t.HeaderFilterController=void 0,t.invertFilterExpression=function(e){return["!",e]};var n=i(64044),o=b(i(92774)),a=b(i(38662)),s=b(i(4671)),r=i(97169),l=b(i(30771)),d=b(i(66177)),u=i(31e3),c=i(87739),h=i(52576),p=i(21274),g=i(41639),_=i(11528),f=i(16191),m=b(i(56417)),v=b(i(74854)),C=b(i(53226)),y=i(83040);function b(e){return e&&e.__esModule?e:{default:e}}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},x.apply(null,arguments)}const w={month:e=>a.default.getMonthNames()[e-1],quarter:e=>a.default.format(new Date(2e3,3*e-1),"quarter")};function S(e,t,i){return t=t||[],i=i||[],e.forEach((e=>{if((0,_.isDefined)(e.key)){const n=1===t.length;if(t.push(n?e.key-1:e.key),e.items)S(e.items,t,i);else{const e=new Date(Date.UTC.apply(Date,t));i.push(e)}t.pop()}else i.push(null)})),i}function D(e,t){const i=S(e),n=(0,l.default)(i),o=C.default.getHeaderFilterGroupParameters(x({},t,{calculateCellValue:e=>e}));return d.default.queryByOptions(n,{group:o}).toArray()}class I extends v.default.ViewController{init(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._headerFilterView=this.getView("headerFilterView")}_updateSelectedState(e,t){let i=e.length;const n="exclude"===t.filterType;for(;i--;){const o=e[i];"items"in e[i]&&this._updateSelectedState(e[i].items,t),(0,y.updateHeaderFilterItemSelectionState)(o,C.default.getIndexByKey(e[i].value,t.filterValues,null)>-1,n)}}_normalizeGroupItem(e,t,i){let n,o;const{path:a}=i,{valueSelector:s}=i,{displaySelector:r}=i,{column:l}=i;return s&&r?(n=s(e),o=r(e)):(n=e.key,o=n),e=(0,_.isObject)(e)?(0,h.extend)({},e):{},a.push(n),1===a.length?e.value=a[0]:e.value=a.join("/"),e.text=this.getHeaderItemText(o,l,t,i.headerFilterOptions),e}getHeaderItemText(e,t,i,n){let o=C.default.formatValue(e,function(e,t,i){const n=m.default.getGroupInterval(t),o=C.default.getFormatOptionsByColumn(t,"headerFilter");return n&&(o.groupInterval=n[i],C.default.isDateType(t.dataType)?o.format=w[n[i]]:"number"===t.dataType&&(o.getDisplayFormat=function(){const o={format:t.format,target:"headerFilter"},a=C.default.formatValue(e,o),s=e+n[i],r=C.default.formatValue(s,o);return a&&r?`${a} - ${r}`:""})),o}(e,t,i));return o||(o=n.texts.emptyValue),o}_processGroupItems(e,t,i,n){const o=this;let a,s;const{column:r}=n,{lookup:l}=r,{level:d}=n;i=i||[],t=t||0,l&&(a=(0,u.compileGetter)(l.displayExpr),s=(0,u.compileGetter)(l.valueExpr));for(let r=0;r<e.length;r++)e[r]=o._normalizeGroupItem(e[r],t,{column:n.column,headerFilterOptions:n.headerFilterOptions,displaySelector:a,valueSelector:s,path:i}),"items"in e[r]&&(t!==d&&(0,_.isDefined)(e[r].value)?o._processGroupItems(e[r].items,t+1,i,n):delete e[r].items),i.pop()}getDataSource(e){var t;const i=this._dataController.dataSource(),n=null==i?void 0:i.remoteOperations().grouping,o=C.default.getHeaderFilterGroupParameters(e,n),a=null===(t=e.headerFilter)||void 0===t?void 0:t.dataSource,s=this.option("headerFilter");let l=!1;const d={component:this.component};if(!i)return;if((0,_.isDefined)(a)&&!(0,_.isFunction)(a))d.dataSource=(0,r.normalizeDataSourceOptions)(a);else if(e.lookup)if(l=!0,this.option("syncLookupFilterValues")){this._currentColumn=e;const t=this._dataController.getCombinedFilter();this._currentColumn=null,d.dataSource=C.default.getWrappedLookupDataSource(e,i,t)}else d.dataSource=C.default.normalizeLookupDataSource(e.lookup);else{const t=Array.isArray(o)?o.length-1:0;this._currentColumn=e;const a=this._dataController.getCombinedFilter();this._currentColumn=null,d.dataSource={filter:a,group:o,useDefaultSearch:!0,load:o=>{const a=new c.Deferred;return o.dataField=e.dataField||e.name,i.load(o).done((i=>{var o;n&&("Z"===(null==(o=e.serializationFormat)?void 0:o.slice(-1))||"'Z'"===(null==o?void 0:o.slice(-3)))&&t>3&&(i=D(i,e)),h._processGroupItems(i,null,null,{level:t,column:e,headerFilterOptions:s}),a.resolve(i)})).fail(a.reject),a}}}(0,_.isFunction)(a)&&a.call(e,d);const u=d.dataSource.postProcess,h=this;return d.dataSource.postProcess=function(t){let i=t;return l&&(i=i.filter((t=>null!==t[e.lookup.valueExpr])),0!==this.pageIndex()||this.searchValue()||(i=i.slice(0),i.unshift(null)),h._processGroupItems(i,null,null,{level:0,column:e,headerFilterOptions:s})),i=u&&u.call(this,i)||i,h._updateSelectedState(i,e),i},d.dataSource}getCurrentColumn(){return this._currentColumn}showHeaderFilterMenu(e,t){const i=this._columnsController,n=(0,h.extend)(!0,{},this._columnsController.getColumns()[e]);if(n){const o=i.getVisibleIndex(e),a=(t?this.getView("headerPanel"):this.getView("columnHeadersView")).getColumnElements().eq(t?n.groupIndex:o);this.showHeaderFilterMenuBase({columnElement:a,column:n,applyFilter:!0,apply(){i.columnOption(e,{filterValues:this.filterValues,filterType:this.filterType})}})}}showHeaderFilterMenuBase(e){const t=this,{column:i}=e;if(i){const n=m.default.getGroupInterval(i),o=t._dataController.dataSource(),a=o&&o.remoteOperations().filtering,s=e.onHidden;(0,h.extend)(e,i,{type:n&&n.length>1?"tree":"list",remoteFiltering:a,onShowing:t=>{const i=t.component.$overlayContent().dxResizable("instance");i&&i.option("onResizeEnd",(t=>{let i=this._columnsController.columnOption(e.dataField,"headerFilter");i=i||{},i.width=t.width,i.height=t.height,this._columnsController.columnOption(e.dataField,"headerFilter",i,!0)}))},onHidden:()=>{null==s||s(),(0,f.restoreFocus)(this)}}),e.dataSource=t.getDataSource(e),e.isFilterBuilder&&(e.dataSource.filter=null,e.alignment="right"),t._headerFilterView.showHeaderFilterMenu(e.columnElement,e)}}hideHeaderFilterMenu(){this._headerFilterView.hideHeaderFilterMenu()}}t.HeaderFilterController=I;t.headerFilterModule={defaultOptions:()=>({syncLookupFilterValues:!0,headerFilter:{visible:!1,width:252,height:325,allowSelectAll:!0,search:{enabled:!1,timeout:500,mode:"contains",editorOptions:{}},texts:{emptyValue:s.default.format("dxDataGrid-headerFilterEmptyValue"),ok:s.default.format("dxDataGrid-headerFilterOK"),cancel:s.default.format("dxDataGrid-headerFilterCancel")}}}),controllers:{headerFilter:I},views:{headerFilterView:y.HeaderFilterView},extenders:{controllers:{data:e=>class extends e{skipCalculateColumnFilters(){return!1}_calculateAdditionalFilter(){if(this.skipCalculateColumnFilters())return super._calculateAdditionalFilter();const e=[super._calculateAdditionalFilter()],t=this._columnsController.getVisibleColumns(null,!0),i=this._headerFilterController.getCurrentColumn();return(0,p.each)(t,((t,n)=>{let o;if((!i||i.index!==n.index)&&(0,y.allowHeaderFiltering)(n)&&n.calculateFilterExpression&&Array.isArray(n.filterValues)&&n.filterValues.length){let t=[];(0,p.each)(n.filterValues,((e,i)=>{Array.isArray(i)?o=i:(n.deserializeValue&&!C.default.isDateType(n.dataType)&&"number"!==n.dataType&&(i=n.deserializeValue(i)),o=n.createFilterExpression(i,"=","headerFilter")),o&&(o.columnIndex=n.index),t.push(o)})),t=C.default.combineFilters(t,"or"),e.push("exclude"===n.filterType?["!",t]:t)}})),C.default.combineFilters(e)}}},views:{columnHeadersView:e=>class extends((0,y.headerFilterMixin)(e)){_renderCellContent(e,t){const i=this;let n;const{column:o}=t;!o.command&&(0,y.allowHeaderFiltering)(o)&&i.option("headerFilter.visible")&&"header"===t.rowType&&(n=i._applyColumnState({name:"headerFilter",rootElement:e,column:o,showColumnLines:i.option("showColumnLines")}),n&&i._subscribeToIndicatorEvent(n,o,"headerFilter")),super._renderCellContent.apply(this,arguments)}_subscribeToIndicatorEvent(e,t,i){"headerFilter"===i&&o.default.on(e,n.name,this.createAction((i=>{i.event.stopPropagation(),(0,f.saveFocusedElementInfo)(e,this),this._headerFilterController.showHeaderFilterMenu(t.index,!1)})))}_updateIndicator(e,t,i){const n=super._updateIndicator(e,t,i);n&&this._subscribeToIndicatorEvent(n,t,i)}_updateHeaderFilterIndicators(){this.option("headerFilter.visible")&&this._updateIndicators("headerFilter")}_needUpdateFilterIndicators(){return!0}_columnOptionChanged(e){const{optionNames:t}=e,i=C.default.checkChanges(t,["filterValues","filterValue"]),n=C.default.checkChanges(t,["filterValues","filterType"]);(i||n)&&this._needUpdateFilterIndicators()&&this._updateHeaderFilterIndicators(),n||super._columnOptionChanged(e)}},headerPanel:e=>class extends((0,y.headerFilterMixin)(e)){_createGroupPanelItem(e,t){const i=this,a=super._createGroupPanelItem.apply(i,arguments);let s;return!t.command&&(0,y.allowHeaderFiltering)(t)&&i.option("headerFilter.visible")&&(s=i._applyColumnState({name:"headerFilter",rootElement:a,column:{alignment:(0,g.getDefaultAlignment)(i.option("rtlEnabled")),filterValues:t.filterValues,allowHeaderFiltering:!0,caption:t.caption},showColumnLines:!0}),s&&o.default.on(s,n.name,i.createAction((e=>{const{event:i}=e;i.stopPropagation(),this._headerFilterController.showHeaderFilterMenu(t.index,!0)})))),a}}}}}},83040:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.headerFilterMixin=t.allowHeaderFiltering=t.HeaderFilterView=void 0,t.updateHeaderFilterItemSelectionState=function(e,t,i){if(t^i){if(e.selected=!0,i&&e.items)for(let t=0;t<e.items.length;t++)if(!e.items[t].selected){e.selected=void 0;break}}else(i||e.selected)&&(e.selected=!1,f(e.items))},i(18928),i(44804);var n=p(i(4671)),o=p(i(64553)),a=i(52576),s=i(21274),r=i(11528),l=p(i(80070)),d=p(i(10720)),u=p(i(4313)),c=p(i(74854)),h=p(i(53226));function p(e){return e&&e.__esModule?e:{default:e}}const g="dx-header-filter",_="dx-header-filter-menu";function f(e){e=e||[];for(let t=0;t<e.length;t++)e[t].selected=!1,f(e[t].items)}function m(e){const t="dxTreeView"===e.NAME?".dx-treeview-select-all-item":".dx-list-select-all-checkbox";return e.$element().find(t).dxCheckBox("instance")}function v(e,t){if(e.component.option("searchValue"))return;const i=m(e.component);i&&t&&t.length&&i.option("value",void 0)}class C extends c.default.View{getPopupContainer(){return this._popupContainer}getListComponent(){return this._listComponent}applyHeaderFilter(e){const t=this.getListComponent(),i=t.option("searchValue"),n=m(t),o=!i&&!e.isFilterBuilder&&(null==n?void 0:n.option("value")),a=[],r=function(e,n,o){(0,s.each)(n,((n,a)=>{if(void 0!==a.selected&&!!a.selected^o){const n=t._getNode(a),o=t._hasChildren(n)&&a.items&&a.items.some((e=>e.selected));if(!i||!o)return void e.push(a.value)}a.items&&a.items.length&&r(e,a.items,o)}))};o?("tree"===e.type&&(e.filterType="exclude"),Array.isArray(e.filterValues)&&(e.filterValues=[])):"tree"===e.type&&(e.filterType&&(e.filterType="include"),r(a,t.option("items"),!1),e.filterValues=a),e.filterValues&&!e.filterValues.length&&(e.filterValues=null),e.apply(),this.hideHeaderFilterMenu()}showHeaderFilterMenu(e,t){const i=this;if(t){i._initializePopupContainer(t);const n=i.getPopupContainer();i.hideHeaderFilterMenu(),i.updatePopup(e,t),n.show()}}hideHeaderFilterMenu(){const e=this.getPopupContainer();e&&e.hide()}updatePopup(e,t){const i=this,o=this.option("showColumnLines"),a="right"===t.alignment^!o?"left":"right";i._popupContainer.setAria({role:"dialog",label:n.default.format("dxDataGrid-headerFilterLabel")}),i._popupContainer&&(i._cleanPopupContent(),i._popupContainer.option("position",{my:`${a} top`,at:`${a} bottom`,of:e,collision:"fit fit"}))}_getSearchExpr(e,t){const{lookup:i}=e,{useDefaultSearchExpr:n}=e,o=t.dataSource,a=t.search.searchExpr;if(a)return a;if(n||(0,r.isDefined)(o)&&!(0,r.isFunction)(o))return"text";if(i)return i.displayExpr||"this";if(e.dataSource){const{group:t}=e.dataSource;if(Array.isArray(t)&&t.length>0)return t[0].selector;if((0,r.isFunction)(t)&&!e.remoteFiltering)return t}return e.dataField||e.selector}_cleanPopupContent(){this._popupContainer&&this._popupContainer.$content().empty()}_initializePopupContainer(e){const t=this,i=t.element(),n=this._normalizeHeaderFilterOptions(e),{height:o,width:a}=n,s={width:a,height:o,visible:!1,shading:!1,showTitle:!1,showCloseButton:!1,hideOnParentScroll:!1,dragEnabled:!1,hideOnOutsideClick:!0,wrapperAttr:{class:_},focusStateEnabled:!1,toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:n.texts.ok,onClick(){t.applyHeaderFilter(e)}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:n.texts.cancel,onClick(){t.hideHeaderFilterMenu()}}}],resizeEnabled:!0,onShowing(i){i.component.$content().parent().addClass("dx-dropdowneditor-overlay"),t._initializeListContainer(e,n),e.onShowing&&e.onShowing(i)},onShown(){t.getListComponent().focus()},onHidden:e.onHidden,onInitialized(e){const{component:t}=e;t.option("animation",t._getDefaultOptions().animation)},_loopFocus:!0};(0,r.isDefined)(t._popupContainer)?t._popupContainer.option(s):t._popupContainer=t._createComponent(i,d.default,s)}_initializeListContainer(e,t){const i=this,n=i._popupContainer.$content(),r=!e.isFilterBuilder&&t.allowSelectAll,d={searchEnabled:t.search.enabled,searchTimeout:t.search.timeout,searchEditorOptions:t.search.editorOptions,searchMode:t.search.mode||"",dataSource:e.dataSource,onContentReady(){i.renderCompleted.fire()},itemTemplate(t,i,n){const a=(0,o.default)(n);return e.encodeHtml?a.text(t.text):a.html(t.text)}};function c(t){"searchValue"===t.fullName&&r&&!1!==i.option("headerFilter.hideSelectAllOnSearch")&&("tree"===e.type?t.component.option("showCheckBoxesMode",t.value?"normal":"selectAll"):t.component.option("selectionMode",t.value?"multiple":"all"))}"tree"===e.type?i._listComponent=i._createComponent((0,o.default)("<div>").appendTo(n),u.default,(0,a.extend)(d,{showCheckBoxesMode:r?"selectAll":"normal",onOptionChanged:c,keyExpr:"id"})):i._listComponent=i._createComponent((0,o.default)("<div>").appendTo(n),l.default,(0,a.extend)(d,{searchExpr:i._getSearchExpr(e,t),pageLoadMode:"scrollBottom",showSelectionControls:!0,selectionMode:r?"all":"multiple",onOptionChanged:c,onSelectionChanged(t){const i=t.component.option("items"),n=t.component.option("selectedItems");if(!t.component._selectedItemsUpdating&&!t.component.option("searchValue")&&!e.isFilterBuilder){const t=e.filterValues||[],o="exclude"===e.filterType;0===n.length&&i.length&&(t.length<=1||o&&t.length===i.length-1)?(e.filterType="include",e.filterValues=[]):n.length===i.length&&(e.filterType="exclude",e.filterValues=[])}(0,s.each)(i,((t,i)=>{const o=h.default.getIndexByKey(i,n,null)>=0;if(!!i.selected!==o){i.selected=o,e.filterValues=e.filterValues||[];const t=h.default.getIndexByKey(i.value,e.filterValues,null);t>=0&&e.filterValues.splice(t,1);o^"exclude"===e.filterType&&e.filterValues.push(i.value)}})),v(t,e.filterValues)},onContentReady(t){const{component:i}=t,n=i.option("items"),o=[];(0,s.each)(n,(function(){this.selected&&o.push(this)})),i._selectedItemsUpdating=!0,i.option("selectedItems",o),i._selectedItemsUpdating=!1,v(t,e.filterValues)}}))}_normalizeHeaderFilterOptions(e){const t=this.option("headerFilter")||{},i=e.headerFilter||{},n={search:{enabled:t.allowSearch,timeout:t.searchTimeout}},o={search:{enabled:i.allowSearch,mode:i.searchMode,timeout:i.searchTimeout}};return(0,a.extend)(!0,{},t,n,i,o)}_renderCore(){this.element().addClass(_)}}t.HeaderFilterView=C;const y=function(e){return(0,r.isDefined)(e.allowHeaderFiltering)?e.allowHeaderFiltering:e.allowFiltering};t.allowHeaderFiltering=y;t.headerFilterMixin=e=>class extends e{optionChanged(e){if("headerFilter"===e.name){const t="columnHeadersView"===this.name;this._invalidate(t,t),e.handled=!0}else super.optionChanged(e)}_applyColumnState(e){let t;const{rootElement:i}=e,{column:o}=e;if("headerFilter"===e.name){if(i.find(`.${g}`).remove(),y(o)){t=super._applyColumnState(e).toggleClass("dx-header-filter-empty",this._isHeaderFilterEmpty(o)),this.option("useLegacyKeyboardNavigation")||t.attr("tabindex",this.option("tabindex")||0);const i=n.default.format("dxDataGrid-headerFilterIndicatorLabel",o.caption);t.attr("aria-label",i),t.attr("aria-haspopup","dialog"),t.attr("role","button")}return t}return super._applyColumnState(e)}_isHeaderFilterEmpty(e){return!e.filterValues||!e.filterValues.length}_getIndicatorClassName(e){return"headerFilter"===e?g:super._getIndicatorClassName(e)}_renderIndicator(e){const t=e.container,i=e.indicator;if("headerFilter"===e.name){const n=this.option("rtlEnabled");if(t.children().length&&(!n&&"right"===e.columnAlignment||n&&"left"===e.columnAlignment))return void t.prepend(i)}super._renderIndicator(e)}}},5542:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.headerPanelModule=t.HeaderPanel=void 0;var n=u(i(4671)),o=u(i(64553)),a=i(31e3),s=i(52576),r=i(11528),l=u(i(2850)),d=i(48921);function u(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},c.apply(null,arguments)}const h="toolbar-button",p=["addRowButton","applyFilterButton","columnChooserButton","exportButton","groupPanel","revertButton","saveButton","searchPanel"];class g extends d.ColumnsView{init(){super.init(),this._editingController=this.getController("editing"),this._headerFilterController=this.getController("headerFilter"),this.createAction("onToolbarPreparing",{excludeValidators:["disabled","readOnly"]})}_getToolbarItems(){return[]}_getButtonContainer(){return(0,o.default)("<div>").addClass(this.addWidgetPrefix(h))}_getToolbarButtonClass(e){const t=e?` ${e}`:"";return this.addWidgetPrefix(h)+t}_getToolbarOptions(){const e=this.option("toolbar"),t={toolbarOptions:{items:this._getToolbarItems(),visible:null==e?void 0:e.visible,disabled:null==e?void 0:e.disabled,onItemRendered(e){const t=e.itemData.onItemRendered;t&&t(e)}}},i=null==e?void 0:e.items;if(t.toolbarOptions.items=this._normalizeToolbarItems(t.toolbarOptions.items,i),this.executeAction("onToolbarPreparing",t),t.toolbarOptions&&!(0,r.isDefined)(t.toolbarOptions.visible)){const e=t.toolbarOptions.items;t.toolbarOptions.visible=!(null==e||!e.length)}return t.toolbarOptions}_normalizeToolbarItems(e,t){e.forEach((e=>{if(!p.includes(e.name))throw new Error(`Default toolbar item '${e.name}' is not added to DEFAULT_TOOLBAR_ITEM_NAMES`)}));const i={location:"after"},n=Array.isArray(t);if(!(0,r.isDefined)(t))return e;n||(t=[t]);const o={};e.forEach((e=>{o[e.name]=e}));const a=t.map((e=>((0,r.isString)(e)&&(e={name:e}),(0,r.isDefined)(e.name)&&((0,r.isDefined)(o[e.name])?e=(0,s.extend)(!0,{},o[e.name],e):p.includes(e.name)&&(e=c({},e,{visible:!1}))),(0,s.extend)(!0,{},i,e))));return n?a:a[0]}_renderCore(){if(this._toolbar)this._toolbar.option(this._toolbarOptions);else{const e=this.element();e.addClass(this.addWidgetPrefix("header-panel"));const t=n.default.format(this.component.NAME+"-ariaToolbar"),i=(0,o.default)("<div>").attr("aria-label",t).appendTo(e);this._toolbar=this._createComponent(i,l.default,this._toolbarOptions)}}_columnOptionChanged(){}_handleDataChanged(){this._requireReady&&this.render()}_isDisabledDefinedByUser(e){var t;const i=null===(t=this.option("toolbar"))||void 0===t?void 0:t.items,n=null==i?void 0:i.find((t=>(null==t?void 0:t.name)===e));return(0,r.isDefined)(null==n?void 0:n.disabled)}render(){this._toolbarOptions=this._getToolbarOptions(),super.render.apply(this,arguments)}setToolbarItemDisabled(e,t){const i=this._toolbar,n=this._isDisabledDefinedByUser(e);if(!i||n)return;const o=(i.option("items")??[]).findIndex((t=>t.name===e));if(o<0)return;const a=i.option(`items[${o}]`);i.option(`items[${o}].disabled`,t),a.options&&i.option(`items[${o}].options.disabled`,t)}updateToolbarDimensions(){var e;null===(e=this._toolbar)||void 0===e||e.updateDimensions()}getHeaderPanel(){return this.element()}getHeight(){return this.getElementHeight()}optionChanged(e){if("onToolbarPreparing"===e.name&&(this._invalidate(),e.handled=!0),"toolbar"===e.name){const s=(0,a.getPathParts)(e.fullName),r=e.fullName.replace(/^toolbar\./,"");if(1===s.length||"visible"===s[1])this._invalidate();else if("items"===s[1]){if(2===s.length){var t;const e=this._getToolbarOptions();null===(t=this._toolbar)||void 0===t||t.option("items",e.items)}else if(3===s.length){var i;const t=this._normalizeToolbarItems(this._getToolbarItems(),e.value);null===(i=this._toolbar)||void 0===i||i.option(r,t)}else if(s.length>=4){var n;null===(n=this._toolbar)||void 0===n||n.option(r,e.value)}}else{var o;null===(o=this._toolbar)||void 0===o||o.option(r,e.value)}e.handled=!0}super.optionChanged(e)}isVisible(){return!(!this._toolbarOptions||!this._toolbarOptions.visible)}allowDragging(){}hasGroupedColumns(){}}t.HeaderPanel=g;t.headerPanelModule={defaultOptions:()=>({}),views:{headerPanel:g},extenders:{controllers:{resizing:e=>class extends e{_updateDimensionsCore(){super._updateDimensionsCore.apply(this,arguments),this.getView("headerPanel").updateToolbarDimensions()}}}}}},24171:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WIDGET_CLASS=t.VIRTUAL_ROW_CLASS=t.ROW_CLASS=t.ROWS_VIEW_CLASS=t.ROWS_VIEW=t.REVERT_BUTTON_CLASS=t.NON_FOCUSABLE_ELEMENTS_SELECTOR=t.MASTER_DETAIL_ROW_CLASS=t.MASTER_DETAIL_CELL_CLASS=t.INTERACTIVE_ELEMENTS_SELECTOR=t.HEADER_ROW_CLASS=t.GROUP_ROW_CLASS=t.GROUP_FOOTER_CLASS=t.FUNCTIONAL_KEYS=t.FREESPACE_ROW_CLASS=t.FOCUS_TYPE_ROW=t.FOCUS_TYPE_CELL=t.FOCUS_STATE_CLASS=t.FOCUSED_CLASS=t.FAST_EDITING_DELETE_KEY=t.EDIT_MODE_FORM=t.EDIT_FORM_ITEM_CLASS=t.EDIT_FORM_CLASS=t.EDITOR_CELL_CLASS=t.DROPDOWN_EDITOR_OVERLAY_CLASS=t.DATEBOX_WIDGET_NAME=t.DATA_ROW_CLASS=t.COMMAND_SELECT_CLASS=t.COMMAND_EXPAND_CLASS=t.COMMAND_EDIT_CLASS=t.COMMAND_CELL_SELECTOR=t.COLUMN_HEADERS_VIEW=t.CELL_FOCUS_DISABLED_CLASS=t.ATTRIBUTES=t.ADAPTIVE_ITEM_TEXT_CLASS=t.ADAPTIVE_COLUMN_NAME_CLASS=void 0;t.ATTRIBUTES={ariaColIndex:"aria-colindex",dragCell:"dx-drag-cell"},t.ROWS_VIEW_CLASS="rowsview",t.EDIT_FORM_CLASS="edit-form",t.GROUP_FOOTER_CLASS="group-footer",t.ROW_CLASS="dx-row",t.DATA_ROW_CLASS="dx-data-row",t.GROUP_ROW_CLASS="dx-group-row",t.HEADER_ROW_CLASS="dx-header-row",t.EDIT_FORM_ITEM_CLASS="edit-form-item",t.MASTER_DETAIL_ROW_CLASS="dx-master-detail-row",t.FREESPACE_ROW_CLASS="dx-freespace-row",t.VIRTUAL_ROW_CLASS="dx-virtual-row",t.MASTER_DETAIL_CELL_CLASS="dx-master-detail-cell",t.EDITOR_CELL_CLASS="dx-editor-cell",t.DROPDOWN_EDITOR_OVERLAY_CLASS="dx-dropdowneditor-overlay",t.COMMAND_EXPAND_CLASS="dx-command-expand",t.ADAPTIVE_COLUMN_NAME_CLASS="dx-command-adaptive",t.ADAPTIVE_ITEM_TEXT_CLASS="dx-adaptive-item-text",t.COMMAND_SELECT_CLASS="dx-command-select",t.COMMAND_EDIT_CLASS="dx-command-edit",t.COMMAND_CELL_SELECTOR="[class^=dx-command]",t.CELL_FOCUS_DISABLED_CLASS="dx-cell-focus-disabled",t.DATEBOX_WIDGET_NAME="dxDateBox",t.FOCUS_STATE_CLASS="dx-state-focused",t.WIDGET_CLASS="dx-widget",t.REVERT_BUTTON_CLASS="dx-revert-button",t.FOCUSED_CLASS="dx-focused",t.FAST_EDITING_DELETE_KEY="delete";const i=t.INTERACTIVE_ELEMENTS_SELECTOR='\n  input:not([type="hidden"]):not([disabled]),\n  textarea:not([disabled]),\n  a:not([disabled]),\n  select:not([disabled]),\n  button:not([disabled]),\n  [tabindex]:not([disabled]),\n  .dx-checkbox:not([disabled],.dx-state-readonly)\n';t.NON_FOCUSABLE_ELEMENTS_SELECTOR=`${i}, .dx-dropdowneditor-icon`,t.EDIT_MODE_FORM="form",t.FOCUS_TYPE_ROW="row",t.FOCUS_TYPE_CELL="cell",t.COLUMN_HEADERS_VIEW="columnHeadersView",t.ROWS_VIEW="rowsView",t.FUNCTIONAL_KEYS=["shift","control","alt"]},3024:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GridCoreKeyboardNavigationDom=void 0;var n=i(24171);t.GridCoreKeyboardNavigationDom={isDragCell:e=>void 0!==e.attr(n.ATTRIBUTES.dragCell),getCellToFocus:(e,t)=>e.filter((e=>[`[${n.ATTRIBUTES.ariaColIndex}="${e+1}"]`,`:not([${n.ATTRIBUTES.dragCell}])`,":not([aria-hidden=true])"].join(""))(t)).first()}},4628:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.keyboardNavigationModule=t.KeyboardNavigationController=void 0;var n=i(64044),o=E(i(92774)),a=E(i(89797)),s=i(42222),r=i(98834),l=i(17781),d=E(i(64960)),u=i(61404),c=E(i(64553)),h=E(i(48314)),p=i(87739),g=i(57653),_=i(11528),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=I(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(16191)),m=i(35944),v=i(78698),C=i(69699),y=E(i(74854)),b=E(i(53226)),x=i(24171),w=i(3024),S=i(93734),D=i(47526);function I(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(I=function(e){return e?i:t})(e)}function E(e){return e&&e.__esModule?e:{default:e}}class T extends y.default.ViewController{init(){var e,t;(this._dataController=this.getController("data"),this._selectionController=this.getController("selection"),this._editingController=this.getController("editing"),this._headerPanel=this.getView("headerPanel"),this._rowsView=this.getView("rowsView"),this._columnHeadersView=this.getView("columnHeadersView"),this._columnsController=this.getController("columns"),this._editorFactory=this.getController("editorFactory"),this._focusController=this.getController("focus"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._columnResizerController=this.getController("columnsResizer"),this._memoFireFocusedCellChanged=(0,v.memoize)(this._memoFireFocusedCellChanged.bind(this),{compareType:"value"}),this._memoFireFocusedRowChanged=(0,v.memoize)(this._memoFireFocusedRowChanged.bind(this),{compareType:"value"}),this.focusedHandlerWithContext=this.focusedHandlerWithContext||this.focusedHandler.bind(this),this.columnHeadersViewRenderCompletedWithContext=this.columnHeadersViewRenderCompletedWithContext||this.columnHeadersViewRenderCompleted.bind(this),this.rowsViewRenderCompletedWithContext=this.rowsViewRenderCompletedWithContext||this.rowsViewRenderCompleted.bind(this),this.rowsViewFocusHandlerContext=this.rowsViewFocusHandlerContext||this.rowsViewFocusHandler.bind(this),this.rowsViewFocusOutHandlerContext=this.rowsViewFocusOutHandlerContext??this.rowsViewFocusOutHandler.bind(this),this._updateFocusTimeout=null,this._fastEditingStarted=!1,this._focusedCellPosition={},this._canceledCellPosition=null,this.isKeyboardEnabled())?(f.subscribeVisibilityChange(),null===(e=this._editorFactory)||void 0===e||e.focused.add(this.focusedHandlerWithContext),this.createAction("onKeyDown")):(f.unsubscribeVisibilityChange(),null===(t=this._editorFactory)||void 0===t||t.focused.remove(this.focusedHandlerWithContext));this.initColumnHeadersViewHandler(),this.initRowsViewHandlers(),this.initDocumentHandlers()}dispose(){super.dispose(),this._resetFocusedView(),s.keyboard.off(this._rowsViewKeyDownListener),s.keyboard.off(this._columnHeadersViewKeyDownListener),o.default.off(d.default.getDocument(),(0,r.addNamespace)(a.default.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler),clearTimeout(this._updateFocusTimeout),f.unsubscribeVisibilityChange()}focusedHandler(e){this.setupFocusedView(),this._isNeedScroll&&e.is(":visible")&&this._focusedView&&this._focusedView.getScrollable()&&(this._focusedView._scrollToElement(e),this._isNeedScroll=!1)}rowsViewFocusHandler(e){const t=(0,c.default)(e.target),i=(0,c.default)(e.relatedTarget).closest(this._rowsView.element()).length,n=t.is("a");if(e.relatedTarget&&n&&!i&&this._isEventInCurrentGrid(e)){let i=this._getFocusedCell();i=(0,S.isElementDefined)(i)?i:this._rowsView.getCellElements(0).filter("[tabindex]").eq(0),t.closest(i).length||(e.preventDefault(),o.default.trigger(i,"focus"))}const a=t.is("td"),s=(this.option("focusedRowIndex")??-1)<0;a&&s&&this._updateFocusedCellPosition(t)}rowsViewFocusOutHandler(){this._toggleInertAttr(!1)}subscribeToRowsViewFocusEvent(){var e;const t=null===(e=this._rowsView)||void 0===e?void 0:e.element();o.default.on(t,"focusin",this.rowsViewFocusHandlerContext),o.default.on(t,"focusout",this.rowsViewFocusOutHandlerContext)}unsubscribeFromRowsViewFocusEvent(){var e;const t=null===(e=this._rowsView)||void 0===e?void 0:e.element();o.default.off(t,"focusin",this.rowsViewFocusHandlerContext),o.default.off(t,"focusout",this.rowsViewFocusOutHandlerContext)}columnHeadersViewRenderCompleted(){this.initColumnHeadersViewKeyDownHandler()}rowsViewRenderCompleted(e){const t=this._rowsView.element(),i=!e||"refresh"===e.changeType,n=this._focusedView&&this._focusedView.name===this._rowsView.name;let o=!1;const a=e&&("append"===e.changeType||"prepend"===e.changeType),s=(0,c.default)(d.default.getRootNode(t.get&&t.get(0))).find(":focus"),r=!s.length||s.closest(t).length;this.unsubscribeFromRowsViewFocusEvent(),this.subscribeToRowsViewFocusEvent(),this.initPointerEventHandler(),this.initRowsViewKeyDownHandler(),this._setRowsViewAttributes(),n&&r&&(o=this._isNeedFocus?!a:this._isHiddenFocus&&i&&!(null!=e&&e.virtualColumnsScrolling),o&&this._updateFocus(!0))}initColumnHeadersViewHandler(){var e,t;(this.unsubscribeFromColumnHeadersViewKeyDownEvent(),null===(e=this._columnHeadersView)||void 0===e||null===(e=e.renderCompleted)||void 0===e||e.remove(this.columnHeadersViewRenderCompletedWithContext),this.isKeyboardEnabled())&&(null===(t=this._columnHeadersView)||void 0===t||null===(t=t.renderCompleted)||void 0===t||t.add(this.columnHeadersViewRenderCompletedWithContext))}initRowsViewHandlers(){var e;this.unsubscribeFromRowsViewFocusEvent(),this.unsubscribeFromPointerEvent(),this.unsubscribeFromRowsViewKeyDownEvent(),null===(e=this._rowsView)||void 0===e||null===(e=e.renderCompleted)||void 0===e||e.remove(this.rowsViewRenderCompletedWithContext),this.isKeyboardEnabled()&&this._rowsView.renderCompleted.add(this.rowsViewRenderCompletedWithContext)}initDocumentHandlers(){const e=d.default.getDocument();this._documentClickHandler=this._documentClickHandler||this.createAction((e=>{const t=(0,c.default)(e.event.target),i=this._isEventInCurrentGrid(e.event)&&t.closest(`.${this.addWidgetPrefix(x.ROWS_VIEW_CLASS)}`).length,n=t.closest(`.${x.DROPDOWN_EDITOR_OVERLAY_CLASS}`).length,o=!!this._columnResizerController&&this._columnResizerController.isResizing();if(!i&&!n&&!o){!(!!this._focusedView&&t.parents().filter(this._focusedView.element()).length>0)&&this._resetFocusedCell(!0),this._resetFocusedView()}})),o.default.off(e,(0,r.addNamespace)(a.default.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler),this.isKeyboardEnabled()&&o.default.on(e,(0,r.addNamespace)(a.default.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler)}_setRowsViewAttributes(){const e=this._getRowsViewElement();!this._dataController.getVisibleRows().length&&this._applyTabIndexToElement(e)}unsubscribeFromPointerEvent(){const e=(0,S.isMobile)()?n.name:a.default.down,t=this._getRowsViewElement();this._pointerEventAction&&o.default.off(t,(0,r.addNamespace)(e,"dxDataGridKeyboardNavigation"),this._pointerEventAction)}subscribeToPointerEvent(){const e=(0,S.isMobile)()?n.name:a.default.down,t=this._getRowsViewElement(),i=`.${C.ROW_CLASS} > td, .${C.ROW_CLASS}`;o.default.on(t,(0,r.addNamespace)(e,"dxDataGridKeyboardNavigation"),i,this._pointerEventAction)}initPointerEventHandler(){this._pointerEventAction=this._pointerEventAction||this.createAction(this._pointerEventHandler),this.unsubscribeFromPointerEvent(),this.subscribeToPointerEvent()}unsubscribeFromColumnHeadersViewKeyDownEvent(){this._columnHeadersViewKeyDownListener&&s.keyboard.off(this._columnHeadersViewKeyDownListener)}subscribeToColumnHeadersViewKeyDownEvent(){const e=this._columnHeadersView.element();this._columnHeadersViewKeyDownListener=s.keyboard.on(e,null,(e=>this._columnHeadersViewKeyDownHandler(e)))}initColumnHeadersViewKeyDownHandler(){this.unsubscribeFromColumnHeadersViewKeyDownEvent(),this.subscribeToColumnHeadersViewKeyDownEvent()}unsubscribeFromRowsViewKeyDownEvent(){s.keyboard.off(this._rowsViewKeyDownListener)}subscribeToRowsViewKeyDownEvent(){const e=this._getRowsViewElement();this._rowsViewKeyDownListener=s.keyboard.on(e,null,(e=>this._rowsViewKeyDownHandler(e)))}initRowsViewKeyDownHandler(){this._rowsViewKeyDownListener&&this.unsubscribeFromRowsViewKeyDownEvent(),this.subscribeToRowsViewKeyDownEvent()}optionChanged(e){switch(e.name){case"keyboardNavigation":"keyboardNavigation.enabled"===e.fullName&&this.init(),e.handled=!0;break;case"useLegacyKeyboardNavigation":this.init(),e.handled=!0;break;default:super.optionChanged(e)}}isRowFocusType(){return this.focusType===x.FOCUS_TYPE_ROW}isCellFocusType(){return this.focusType===x.FOCUS_TYPE_CELL}setRowFocusType(){this.option("focusedRowEnabled")&&(this.focusType=x.FOCUS_TYPE_ROW)}setCellFocusType(){this.focusType=x.FOCUS_TYPE_CELL}headerTabKeyHandler(e){}_columnHeadersViewKeyDownHandler(e){"tab"===e.keyName&&this.headerTabKeyHandler(e)}_rowsViewKeyDownHandler(e){var t;let i=!0;this._isNeedFocus=!0,this._isNeedScroll=!0;let n=this._processOnKeyDown(e);const o=null===(t=this._editingController)||void 0===t?void 0:t.isEditing(),{originalEvent:a}=e;if(a.isDefaultPrevented())return this._isNeedFocus=!1,void(this._isNeedScroll=!1);if(!x.FUNCTIONAL_KEYS.includes(e.keyName)&&this._updateFocusedCellPositionByTarget(a.target),!n){switch(e.keyName){case"leftArrow":case"rightArrow":this._leftRightKeysHandler(e,o),n=!0;break;case"upArrow":case"downArrow":e.ctrl?f.selectView("rowsView",this,a):this._upDownKeysHandler(e,o),n=!0;break;case"pageUp":case"pageDown":this._pageUpDownKeyHandler(e),n=!0;break;case"space":n=this._spaceKeyHandler(e,o);break;case"A":(0,r.isCommandKeyPressed)(e.originalEvent)?(this._ctrlAKeyHandler(e,o),n=!0):n=this._beginFastEditing(e.originalEvent);break;case"tab":this._tabKeyHandler(e,o),n=!0;break;case"enter":this._enterKeyHandler(e,o),n=!0;break;case"escape":n=this._escapeKeyHandler(e,o);break;case"F":(0,r.isCommandKeyPressed)(e.originalEvent)?(this._ctrlFKeyHandler(e),n=!0):n=this._beginFastEditing(e.originalEvent);break;case"F2":this._f2KeyHandler(),n=!0;break;case"del":case"backspace":this._isFastEditingAllowed()&&!this._isFastEditingStarted()&&(n=this._beginFastEditing(a,!0))}n||this._beginFastEditing(a)||(this._isNeedFocus=!1,this._isNeedScroll=!1,i=!1),i&&a.stopPropagation()}}_processOnKeyDown(e){const{originalEvent:t}=e,i={handled:!1,event:t};return this.executeAction("onKeyDown",i),e.ctrl=t.ctrlKey,e.alt=t.altKey,e.shift=t.shiftKey,!!i.handled}_closeEditCell(){const e=(0,p.Deferred)();return setTimeout((()=>{this._editingController.closeEditCell().always(e.resolve)})),e}_leftRightKeysHandler(e,t){const i=this.getVisibleRowIndex(),n=e.originalEvent,o=this._focusedView&&this._focusedView.getRow(i),a=this._getDirectionCodeByKey(e.keyName),s=this._isFastEditingStarted();if((!t||s)&&(0,S.isDataRow)(o)){this.setCellFocusType(),s&&this._closeEditCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(a);const e=this._getNextCell(a);(0,S.isElementDefined)(e)&&this._arrowKeysHandlerFocusCell(n,e,a),n&&n.preventDefault()}}isInsideMasterDetail(e){const t=e.closest(`.${x.MASTER_DETAIL_CELL_CLASS}`);return!!t.get(0)&&this.elementIsInsideGrid(t)&&!e.is(t)}_upDownKeysHandler(e,t){var i,n;const o=this.getVisibleRowIndex(),a=this._focusedView&&this._focusedView.getRow(o),s=e.originalEvent,r="upArrow"===e.keyName,l=this._dataController.dataSource(),d=null===(i=this._editingController)||void 0===i||null===(n=i.isEditRowByIndex)||void 0===n?void 0:n.call(i,o),u=this._isFastEditingStarted(),h=this.isInsideMasterDetail((0,c.default)(null==s?void 0:s.target));if((!d||!t||u)&&a&&!(0,S.isEditForm)(a)&&!h){if(u&&this._closeEditCell(),!this._navigateNextCell(s,e.keyName)&&this._isVirtualRowRender()&&r&&l&&!l.isLoading()){const e=(0,g.getOuterHeight)(a),t=this._focusedCellPosition.rowIndex-1;this._scrollBy(0,-e,t,s)}s&&s.preventDefault()}}_pageUpDownKeyHandler(e){const t=this._dataController.pageIndex(),i=this._dataController.pageCount(),n=this.option("paging.enabled"),o="pageUp"===e.keyName,a=o?-1:1,s=this._rowsView.getScrollable();n&&!this._isVirtualScrolling()?(o?t>0:t<i-1)&&!this._isVirtualScrolling()&&(this._dataController.pageIndex(t+a),e.originalEvent.preventDefault()):s&&(0,g.getHeight)(s.container())<(0,g.getHeight)(s.$content())&&(this._scrollBy(0,(0,g.getHeight)(s.container())*a),e.originalEvent.preventDefault())}_spaceKeyHandler(e,t){const i=this.getVisibleRowIndex(),n=(0,c.default)(e.originalEvent&&e.originalEvent.target);if(this.option("selection")&&"none"!==this.option("selection").mode&&!t){const t="row"===this._getElementType(n)&&this.isRowFocusType()&&(0,S.isDataRow)(n);return n.hasClass(x.COMMAND_SELECT_CLASS)&&"onClick"===this.option("selection.showCheckBoxesMode")&&this._selectionController.startSelectionWithCheckboxes(),!!(t||n.parent().hasClass(x.DATA_ROW_CLASS)||n.hasClass(this.addWidgetPrefix(x.ROWS_VIEW_CLASS)))&&(this._selectionController.changeItemSelection(i,{shift:e.shift,control:e.ctrl}),e.originalEvent.preventDefault(),!0)}return this._beginFastEditing(e.originalEvent)}_ctrlAKeyHandler(e,t){t||e.alt||"multiple"!==this.option("selection.mode")||!this.option("selection.allowSelectAll")||(this._selectionController.selectAll(),e.originalEvent.preventDefault())}_toggleInertAttr(e){}_tabKeyHandler(e,t){const i=this.option("editing"),n=e.shift?"previous":"next",o=(0,_.isDefined)(this._focusedCellPosition)&&!(0,_.isEmptyObject)(this._focusedCellPosition),a=e.shift&&this._isFirstValidCell(this._focusedCellPosition),s=!e.shift&&this._isLastValidCell(this._focusedCellPosition);let r=!o||a||s;const l=e.originalEvent.target,d=this._focusedView&&this._focusedView.element();if(!this._handleTabKeyOnMasterDetailCell(l,n)){if((0,c.default)(d).addClass(x.FOCUS_STATE_CLASS),i&&l&&!r)if((0,c.default)(l).hasClass(this.addWidgetPrefix(x.ROWS_VIEW_CLASS))&&this._resetFocusedCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(n),t){if(!this._editingCellTabHandler(e,n))return}else this._targetCellTabHandler(e,n)&&(r=!0);if(r){const e=this._getFocusedCell().is(x.COMMAND_CELL_SELECTOR);s&&!e&&this._toggleInertAttr(!0),this._editorFactory.loseFocus(),this._editingController.isEditing()&&!this._isRowEditMode()&&(this._resetFocusedCell(!0),this._resetFocusedView(),this._closeEditCell())}else e.originalEvent.preventDefault()}}_getMaxHorizontalOffset(){const e=this.component.getScrollable();return e?e.scrollWidth()-(0,g.getWidth)(this._rowsView.element()):0}_isColumnRendered(e){const t=this._columnsController.getVisibleColumns(null,!0),i=this._columnsController.getVisibleColumns(),n=t[e];let o=!1;return n&&(o=i.indexOf(n)>=0),o}_isFixedColumn(e){const t=this._columnsController.getVisibleColumns(null,!0)[e];return!!t&&!!t.fixed}_isColumnVirtual(e){const t=e-this._columnsController.getColumnIndexOffset(),i=this._columnsController.getVisibleColumns()[t];return!!i&&"virtual"===i.command}_processVirtualHorizontalPosition(e){const t=this.component.getScrollable(),i=this.getColumnIndex();let n,o=0,a=!1;switch(e){case"next":case"nextInRow":{const t=this._getVisibleColumnCount();n=i+1,o=this.option("rtlEnabled")?this._getMaxHorizontalOffset():0,a="next"===e?t===n||this._isFixedColumn(i)&&!this._isColumnRendered(n):t>n&&this._isFixedColumn(i)&&!this._isColumnRendered(n);break}case"previous":case"previousInRow":if(n=i-1,o=this.option("rtlEnabled")?0:this._getMaxHorizontalOffset(),"previous"===e){const e=this._columnsController.getColumnIndexOffset();a=n<0&&0===e||this._isFixedColumn(i)&&!this._isColumnRendered(n)}else a=n>=0&&this._isFixedColumn(i)&&!this._isColumnRendered(n)}a?t.scrollTo({left:o}):(0,_.isDefined)(n)&&(0,_.isDefined)(e)&&this._isColumnVirtual(n)&&(o=this._getHorizontalScrollPositionOffset(e),0!==o&&t.scrollBy({left:o,top:0}))}_getHorizontalScrollPositionOffset(e){let t=0;const i=this._getCell(this._focusedCellPosition),n=i&&(0,g.getOuterWidth)(i);if(n>0){const i=this.option("rtlEnabled")?-1:1;t="nextInRow"===e||"next"===e?n*i:n*i*-1}return t}_editingCellTabHandler(e,t){const i=e.originalEvent.target;let n,o=this._getCellElementFromTarget(i);const a=e.originalEvent,s=this._getElementType(i);if(o.is(x.COMMAND_CELL_SELECTOR))return!this._targetCellTabHandler(e,t);this._updateFocusedCellPosition(o);const r=this._getNextCellByTabKey(a,t,s);if(o=r.$cell,!o||this._handleTabKeyOnMasterDetailCell(o,t))return!1;const l=this._getColumnByCellElement(o),d=o.parent(),u=this._getRowIndex(d),c=this._dataController.items()[u],h=this._editingController;if(l&&l.allowEditing){const e=!c||"data"===c.rowType;n=h.allowUpdating({row:c})?e:c&&c.isNewRow}return n||this._closeEditCell(),this._focusCell(o,!r.isHighlighted)&&(!this._isRowEditMode()&&n?this._editFocusedCell():this._focusInteractiveElement(o,e.shift)),!0}_targetCellTabHandler(e,t){const i=e.originalEvent;let n=i.target,o=this._getElementType(n),a=this._getCellElementFromTarget(n);const s="cell"===o&&this._getInteractiveElement(a,!e.shift);let r=!1;if(!(0,S.isEditorCell)(this,a)&&null!=s&&s.length&&n!==s.get(0))r=!0;else{void 0===this._focusedCellPosition.rowIndex&&(0,c.default)(n).hasClass(C.ROW_CLASS)&&this._updateFocusedCellPosition(a),o=this._getElementType(n),this.isRowFocusType()&&(this.setCellFocusType(),"row"===o&&(0,S.isDataRow)((0,c.default)(n))&&(n=this.getFirstValidCellInRow((0,c.default)(n)),o=this._getElementType(n)));const s=this._getNextCellByTabKey(i,t,o);if(a=s.$cell,!a)return!1;if(a=this._checkNewLineTransition(i,a),!a)return!1;this._focusCell(a,!s.isHighlighted),(0,S.isEditorCell)(this,a)||this._focusInteractiveElement(a,e.shift)}return r}_getNextCellByTabKey(e,t,i){let n=this._getNextCell(t,i);const o=n&&this._fireFocusedCellChanging(e,n,!0);return!o||o.cancel?{}:(o.$newCellElement&&(n=o.$newCellElement),{$cell:n,isHighlighted:o.isHighlighted})}_checkNewLineTransition(e,t){const i=this.getVisibleRowIndex(),n=t.parent();if(i!==this._getRowIndex(n)){const i=this._getCellPosition(t),o=this._fireFocusedRowChanging(e,n);if(o.cancel)return;o.rowIndexChanged&&i&&(this.setFocusedColumnIndex(i.columnIndex),t=this._getFocusedCell())}return t}_enterKeyHandler(e,t){var i,n;const o=this.getVisibleRowIndex(),a=this._dataController.getKeyByRowIndex(o),s=null===(i=this._focusedView)||void 0===i?void 0:i.getRow(o),r=this._getFocusedCell(),l=this.option("grouping.allowCollapsing")&&(0,S.isGroupRow)(s),d=this.option("masterDetail.enabled")&&(null==r?void 0:r.hasClass(x.COMMAND_EXPAND_CLASS)),u=null==r?void 0:r.hasClass(x.ADAPTIVE_COLUMN_NAME_CLASS);if(l||d){const e=this._dataController.items()[o],t=(null==e?void 0:e.data)&&!e.data.isContinuation;(0,_.isDefined)(a)&&t&&this._dataController.changeRowExpand(a)}else u?(this._adaptiveColumnsController.toggleExpandAdaptiveDetailRow(a),this._updateFocusedCellPosition(r)):null!==(n=this.getMasterDetailCell(r))&&void 0!==n&&n.is(r)?r.is(":focus")&&this.focusFirstInteractiveElementInside(r):null!=r&&r.hasClass(x.COMMAND_EDIT_CLASS)||this._processEnterKeyForDataCell(e,t)}focusFirstInteractiveElementInside(e){e.find(x.INTERACTIVE_ELEMENTS_SELECTOR).get(0).focus()}_processEnterKeyForDataCell(e,t){const i=this._getEnterKeyDirection(e),n=this._allowEditingOnEnterKey();t||!n&&i?this._handleEnterKeyEditingCell(e.originalEvent).done((()=>{"next"===i||"previous"===i?this._targetCellTabHandler(e,i):"upArrow"!==i&&"downArrow"!==i||this._navigateNextCell(e.originalEvent,i)})):n&&this._startEditing(e)}_getEnterKeyDirection(e){const t=this.option("keyboardNavigation.enterKeyDirection"),i=e.shift;return"column"===t?i?"upArrow":"downArrow":"row"===t?i?"previous":"next":void 0}_handleEnterKeyEditingCell(e){const t=(0,p.Deferred)(),{target:i}=e,n=this._getCellElementFromTarget(i),a=this._isRowEditMode();return this._updateFocusedCellPosition(n),a?(this._focusEditFormCell(n),setTimeout(this._editingController.saveEditData.bind(this._editingController)),t.resolve()):(o.default.trigger((0,c.default)(i),"change"),this._closeEditCell().always(t.resolve),e.preventDefault()),t}_escapeKeyHandler(e,t){const i=this._getCellElementFromTarget(e.originalEvent.target);if(t)return this._updateFocusedCellPosition(i),this._isRowEditMode()?(this._focusEditFormCell(i),this._editingController.cancelEditData(),0===this._dataController.items().length&&(this._resetFocusedCell(),this._editorFactory.loseFocus())):"cell"===this._editingController.getEditMode()?this._editingController.cancelEditData():this._closeEditCell(),e.originalEvent.preventDefault(),!0;const n=this.getMasterDetailCell(i);return!!n&&(this._focusCell(n),!0)}_ctrlFKeyHandler(e){if(this.option("searchPanel.visible")){const t=this._headerPanel.getSearchTextEditor();t&&(t.focus(),e.originalEvent.preventDefault())}}_f2KeyHandler(){const e=this._editingController.isEditing(),t=this.getVisibleRowIndex(),i=this._focusedView&&this._focusedView.getRow(t);!e&&(0,S.isDataRow)(i)&&this._startEditing()}_navigateNextCell(e,t){const i=this._getNextCell(t),n=this._getDirectionCodeByKey(t);return!!(i&&this._isCellValid(i))&&this._arrowKeysHandlerFocusCell(e,i,n)}_arrowKeysHandlerFocusCell(e,t,i){const n="prevRow"===i||"nextRow"===i,o=this._fireFocusChangingEvents(e,t,n,!0);return t=o.$newCellElement,!(o.cancel||!this._isCellValid(t))&&(this._focus(t,!o.isHighlighted),!0)}_beginFastEditing(e,t){if(!this._isFastEditingAllowed()||e.altKey||e.ctrlKey||this._editingController.isEditing())return!1;if(t)this._startEditing(e,x.FAST_EDITING_DELETE_KEY);else{const{key:t}=e,i=e.keyCode||e.which,n=t||i&&String.fromCharCode(i);!n||1!==n.length&&n!==x.FAST_EDITING_DELETE_KEY||this._startEditing(e,n)}return!0}_pointerEventHandler(e){var t;const i=e.event||e;let n=(0,c.default)(i.currentTarget);const o=null===(t=this._rowsView)||void 0===t?void 0:t.element(),a=n.parent(),s=(0,c.default)(i.target).is(x.INTERACTIVE_ELEMENTS_SELECTOR),r=!!(0,c.default)(i.target).closest(`.${x.REVERT_BUTTON_CLASS}`).length,l=n.hasClass(x.COMMAND_EXPAND_CLASS);this._isEventInCurrentGrid(i)&&(r||!this._isCellValid(n,!s)&&!l?n.is("td")&&this._resetFocusedCell():(n=this._isInsideEditForm(n)?(0,c.default)(i.target):n,this._focusView(),(0,c.default)(o).removeClass(x.FOCUS_STATE_CLASS),a.hasClass(x.FREESPACE_ROW_CLASS)?(this._updateFocusedCellPosition(n),this._applyTabIndexToElement(this._focusedView.element()),this._focusedView.focus(!0)):this.getMasterDetailCell(n)?this._updateFocusedCellPosition(n):this._clickTargetCellHandler(i,n)))}_clickTargetCellHandler(e,t){const i=this._getColumnByCellElement(t),n=this._isCellEditMode();this.setCellFocusType();const o=this._fireFocusChangingEvents(e,t,!0);if(t=o.$newCellElement,o.cancel)this.setRowFocusType(),this.setFocusedRowIndex(o.prevRowIndex),this._editingController.isEditing()&&n&&this._closeEditCell();else{if(o.resetFocusedRow)return void this._focusController._resetFocusedRow();if(o.rowIndexChanged&&(t=this._getFocusedCell()),o.isHighlighted||n||this.setRowFocusType(),this._updateFocusedCellPosition(t),this._allowRowUpdating()&&n&&i&&i.allowEditing)this._isNeedFocus=!1,this._isHiddenFocus=!1;else{t=this._getFocusedCell();const n=e&&(0,c.default)(e.target).closest(`${x.NON_FOCUSABLE_ELEMENTS_SELECTOR}, td`),a=n&&n.not(t).is(x.NON_FOCUSABLE_ELEMENTS_SELECTOR),s=!(!!i&&!i.command&&t.hasClass(C.EDITOR_CELL_CLASS))&&(!o.isHighlighted||a);this._focus(t,s,a)}}}_allowRowUpdating(){const e=this.getVisibleRowIndex(),t=this._dataController.items()[e];return this._editingController.allowUpdating({row:t},"click")}focus(e){let t;const i=this.option("focusedRowEnabled"),n=this._isCellElement((0,c.default)(e));e||(t=".dx-datagrid-rowsview .dx-row[tabindex]",i||(t+=", .dx-datagrid-rowsview .dx-row > td[tabindex]"),e=this.component.$element().find(t).first()),e&&this._focusElement((0,c.default)(e),n)}getFocusedView(){return this._focusedView}setupFocusedView(){this.isKeyboardEnabled()&&!(0,_.isDefined)(this._focusedView)&&this._focusView()}_focusElement(e,t){const i=(0,c.default)(this._getRowsViewElement()),n=e.closest(i),o=this.isRowFocusType();let a={};!n.length||this._isCellElement(e)&&!this._isCellValid(e)||(this._focusView(),this._isNeedFocus=!0,this._isNeedScroll=!0,(this._isCellElement(e)||(0,S.isGroupRow)(e))&&(this.setCellFocusType(),a=this._fireFocusChangingEvents(null,e,!0,t),e=a.$newCellElement,o&&!a.isHighlighted&&this.setRowFocusType()),a.cancel||(this._focus(e,!a.isHighlighted),this._focusInteractiveElement(e)))}_getFocusedViewByElement(e){const t=this.getFocusedView(),i=t&&(0,c.default)(t.element());return e&&0!==e.closest(i).length}_focusView(){this._focusedView=this._rowsView}_resetFocusedView(){this.setRowFocusType(),this._focusedView=null}_focusInteractiveElement(e,t){if(!e)return;const i=this._getInteractiveElement(e,t);b.default.focusAndSelectElement(this,i)}_focus(e,t,i){const n=e&&!e.hasClass(C.ROW_CLASS)?e.closest(`.${C.ROW_CLASS}`):e;if(n&&(0,S.isNotFocusedRow)(n))return;const a=this._focusedView,s=a&&a.element();let r;this._isHiddenFocus=t;const l=(0,S.isGroupRow)(n)||(0,S.isGroupFooterRow)(n)||this.isRowFocusType();l?(r=n,a&&this.setFocusedRowIndex(this._getRowIndex(n))):this._isCellElement(e)&&(r=e,this._updateFocusedCellPosition(e)),r&&(s&&s.find(".dx-row[tabindex], .dx-row > td[tabindex]").filter(((e,t)=>b.default.isElementInCurrentGrid(this,(0,c.default)(t)))).not(r).removeClass(x.CELL_FOCUS_DISABLED_CLASS).removeClass(x.FOCUSED_CLASS).removeAttr("tabindex"),o.default.one(r,"blur",(e=>{e.relatedTarget&&r.removeClass(x.CELL_FOCUS_DISABLED_CLASS).removeClass(x.FOCUSED_CLASS)})),i||(this._applyTabIndexToElement(r),o.default.trigger(r,"focus")),t?(r.addClass(x.CELL_FOCUS_DISABLED_CLASS),l&&e.addClass(x.CELL_FOCUS_DISABLED_CLASS)):this._editorFactory.focus(r))}_updateFocus(e){this._updateFocusTimeout=setTimeout((()=>{if(this._needFocusEditingCell())return void this._editingController._focusEditingCell();let t=this._getFocusedCell();const i=this._editingController.isEditing();if(!this.getMasterDetailCell(t)||this._isRowEditMode()){if(this._hasSkipRow(t.parent())){const e=this._focusedCellPosition&&this._focusedCellPosition.rowIndex>0?"upArrow":"downArrow";t=this._getNextCell(e)}if((0,S.isElementDefined)(t))if(t.is("td")||t.hasClass(this.addWidgetPrefix(x.EDIT_FORM_ITEM_CLASS))){const n=t.is(x.COMMAND_CELL_SELECTOR),o=t.find(":focus"),a=(0,S.isElementDefined)(o),s=this._getColumnByCellElement(t);if(!e&&n||!this._editorFactory.focus())a||!this._isNeedFocus&&!this._isHiddenFocus||this._focus(t,this._isHiddenFocus);else{if(n&&a)return void b.default.focusAndSelectElement(this,o);!a&&this._focus(t)}!i||null!=s&&s.showEditorAlways||this._focusInteractiveElement.bind(this)(t)}else o.default.trigger(t,"focus")}}))}_getColumnByCellElement(e){const t=this._rowsView.getCellIndex(e)+this._columnsController.getColumnIndexOffset();return this._columnsController.getVisibleColumns(null,!0)[t]}_needFocusEditingCell(){const e=this._editingController.getEditMode()===C.EDIT_MODE_CELL,t=this._editingController.getEditMode()===C.EDIT_MODE_BATCH,i=e&&this._editingController.hasChanges(),n=t&&this._editingController.isNewRowInEditMode(),o=this._getFocusedCell();return(0===o.children().length||o.find(C.FOCUSABLE_ELEMENT_SELECTOR).length>0)&&(i||n)}_getFocusedCell(){return(0,c.default)(this._getCell(this._focusedCellPosition))}_updateFocusedCellPositionByTarget(e){var t;if("row"===this._getElementType(e)&&(0,_.isDefined)(null===(t=this._focusedCellPosition)||void 0===t?void 0:t.columnIndex)){const t=(0,c.default)(e);this._focusedView&&(0,S.isGroupRow)(t)&&this.setFocusedRowIndex(this._getRowIndex(t))}else this._updateFocusedCellPosition(this._getCellElementFromTarget(e))}_updateFocusedCellPosition(e,t){const i=this._getCellPosition(e,t);return i&&(!e.length||i.rowIndex>=0&&i.columnIndex>=0)&&this.setFocusedCellPosition(i.rowIndex,i.columnIndex),i}_getFocusedColumnIndexOffset(e){let t=0;const i=this._columnsController.getVisibleColumns()[e];return i&&i.fixed?t=this._getFixedColumnIndexOffset(i):e>=0&&(t=this._columnsController.getColumnIndexOffset()),t}_getFixedColumnIndexOffset(e){return(0,S.isFixedColumnIndexOffsetRequired)(this,e)?this._getVisibleColumnCount()-this._columnsController.getVisibleColumns().length:0}_getCellPosition(e,t){let i;const n=(0,S.isElementDefined)(e)&&e.closest("tr");if((0,S.isElementDefined)(n)){const o=this._getRowIndex(n);return i=this._rowsView.getCellIndex(e,o),i+=this._getFocusedColumnIndexOffset(i),t&&(i="previous"===t?i-1:i+1,i=this._applyColumnIndexBoundaries(i)),{rowIndex:o,columnIndex:i}}}_focusCell(e,t){if(this._isCellValid(e))return this._focus(e,t),!0}_focusEditFormCell(e){e.hasClass(x.MASTER_DETAIL_CELL_CLASS)&&this._editorFactory.focus(e,!0)}_resetFocusedCell(e){var t;const i=this._getFocusedCell();(0,S.isElementDefined)(i)&&i.removeAttr("tabindex").removeClass(x.CELL_FOCUS_DISABLED_CLASS),this._isNeedFocus=!1,this._isNeedScroll=!1,this._focusedCellPosition={},clearTimeout(this._updateFocusTimeout),null===(t=this._focusedView)||void 0===t||t.renderFocusState({preventScroll:e})}restoreFocusableElement(e,t){const i=this;let n,a;const s=(0,_.isDefined)(e),r=this._rowsView.element(),{columnIndex:l}=i._focusedCellPosition,d=i._dataController.getRowIndexOffset();e=s?e:this._rowsView.getTopVisibleItemIndex()+d,s?(a=this._rowsView.getRow(e-d),n=i._fireFocusedRowChanging(t,a),!n.cancel&&n.rowIndexChanged&&(e=n.newRowIndex)):(i._editorFactory.loseFocus(),i._applyTabIndexToElement(r),o.default.trigger(r,"focus")),s&&n.cancel||i.setFocusedCellPosition(e,l),s&&i._updateFocus()}_getNewPositionByCode(e,t,i){let n,{columnIndex:o}=e,{rowIndex:a}=e;if(void 0===e.rowIndex&&"next"===i)return{columnIndex:0,rowIndex:0};switch(i){case"nextInRow":case"next":n=this._getVisibleColumnCount(),o<n-1&&"row"!==t&&this._hasValidCellAfterPosition({columnIndex:o,rowIndex:a})?o++:this._isLastRow(a)||"next"!==i||(o=0,a++);break;case"previousInRow":case"previous":o>0&&"row"!==t&&this._hasValidCellBeforePosition({columnIndex:o,rowIndex:a})?o--:a>0&&"previous"===i&&(a--,n=this._getVisibleColumnCount(),o=n-1);break;case"upArrow":a=a>0?a-1:a;break;case"downArrow":a=this._isLastRow(a)?a:a+1}return{columnIndex:o,rowIndex:a}}setFocusedCellPosition(e,t){this.setFocusedRowIndex(e),this.setFocusedColumnIndex(t)}setFocusedRowIndex(e){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.rowIndex=e}setFocusedColumnIndex(e){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.columnIndex=e}getRowIndex(){return this._focusedCellPosition?this._focusedCellPosition.rowIndex:-1}getColumnIndex(){return this._focusedCellPosition?this._focusedCellPosition.columnIndex:-1}getVisibleRowIndex(){var e;const t=null===(e=this._focusedCellPosition)||void 0===e?void 0:e.rowIndex;return!(0,_.isDefined)(t)||t<0?-1:t-this._dataController.getRowIndexOffset()}getVisibleColumnIndex(){var e;const t=null===(e=this._focusedCellPosition)||void 0===e?void 0:e.columnIndex;return(0,_.isDefined)(t)?t-this._columnsController.getColumnIndexOffset():-1}_applyColumnIndexBoundaries(e){const t=this._getVisibleColumnCount();return e<0?e=0:e>=t&&(e=t-1),e}_isCellByPositionValid(e){const t=(0,c.default)(this._getCell(e));return this._isCellValid(t)}_isLastRow(e){const t=this._dataController;if(this._isVirtualRowRender())return e>=t.getMaxRowIndex();return e===Math.max(...t.items().map(((e,t)=>!1!==e.visible?t:-1)))}_isFirstValidCell(e){let t=!1;return 0===e.rowIndex&&e.columnIndex>=0&&(t=t||!this._hasValidCellBeforePosition(e)),t}_hasValidCellBeforePosition(e){let{columnIndex:t}=e,i=!1;for(;t>0&&!i;){const n={columnIndex:--t,rowIndex:e.rowIndex};i=this._isCellByPositionValid(n)}return i}_hasValidCellAfterPosition(e){let{columnIndex:t}=e,i=!1;const n=this._getVisibleColumnCount();for(;t<n-1&&!i;){const n={columnIndex:++t,rowIndex:e.rowIndex};i=this._isCellByPositionValid(n)}return i}_isLastValidCell(e){const t=e.columnIndex>=0?e.columnIndex+1:0,{rowIndex:i}=e,n={columnIndex:t,rowIndex:i},o=this._dataController.getVisibleRows(),a=o&&o[i];if(!this._isLastRow(i))return!1;return!("group"!==(null==a?void 0:a.rowType)&&"groupFooter"!==(null==a?void 0:a.rowType)||!(e.columnIndex>0))||(e.columnIndex===this._getVisibleColumnCount()-1||!this._isCellByPositionValid(n)&&this._isLastValidCell(n))}_isCellValid(e,t){if((0,S.isElementDefined)(e)){const i=e.parent(),n=this._rowsView.getCellIndex(e)+this._columnsController.getColumnIndexOffset(),o=this._getColumnByCellElement(e),a=this._getVisibleColumnCount(),s=this._editingController,r=(0,S.isDetailRow)(i),l=o&&o.showWhenGrouped,d=o&&!e.hasClass(x.COMMAND_EXPAND_CLASS)&&(0,S.isDataRow)(i),u=function(){return!r&&o&&(!(0,_.isDefined)(o.groupIndex)||l&&d)||parseInt(e.attr("colspan"),10)>1};if(w.GridCoreKeyboardNavigationDom.isDragCell(e))return!1;if(this.getMasterDetailCell(e))return!0;if(a>n&&u()){const e=this._dataController.items(),n=this._rowsView.getRowIndex(i),a=e[n],r=s&&this._isCellEditMode()&&s.isEditing(),l=s&&s.isEditRow(n),d=l||r;return o.command?this._isLegacyNavigation()?!d&&"expand"===o.command:!r&&(l?"select"!==o.command:!d):(!r||!a||"data"===a.rowType)&&(!d||o.allowEditing||t)}}}getFirstValidCellInRow(e,t){const i=this,n=e.find("> td");let o,a;for(let e=t=t||0;e<n.length;++e)if(o=n.eq(e),i._isCellValid(o)){a=o;break}return a}_getNextCell(e,t,i){const n=i||this._focusedCellPosition,o=this.isRowFocusType(),a=o||["next","previous"].includes(e);let s,r;if(this._focusedView&&n){const i=this._getNewPositionByCode(n,t,e);s=(0,c.default)(this._getCell(i));const l="previous"===e?this._isFirstValidCell(i):this._isLastValidCell(i);if((0,S.isElementDefined)(s)&&!this._isCellValid(s)&&this._isCellInRow(i,a)&&!l&&(s=o?this.getFirstValidCellInRow(s.parent(),i.columnIndex):this._getNextCell(e,"cell",i)),r=(0,S.isElementDefined)(s)&&s.parent(),this._hasSkipRow(r)){const t=this._getRowIndex(r);if(this._isLastRow(t))return null;s=this._getNextCell(e,"row",{columnIndex:n.columnIndex,rowIndex:t})}return(0,S.isElementDefined)(s)?s:null}return null}_startEditing(e,t){const i=this._focusedCellPosition,n=this.getVisibleRowIndex(),o=this.getVisibleColumnIndex(),a=this._dataController.items()[n],s=this._columnsController.getVisibleColumns()[o];this._isAllowEditing(a,s)&&(this._isRowEditMode()?this._editingController.editRow(n):i&&this._startEditCell(e,t))}_isAllowEditing(e,t){return this._editingController.allowUpdating({row:e})&&t&&t.allowEditing}_editFocusedCell(){const e=this.getVisibleRowIndex(),t=this.getVisibleColumnIndex();return this._editingController.editCell(e,t)}_startEditCell(e,t){this._fastEditingStarted=(0,_.isDefined)(t);const i=this._editFocusedCell(),n=(0,_.isDeferred)(i);if(!this._isFastEditingStarted()||!n&&!i)return;const o=n&&t===x.FAST_EDITING_DELETE_KEY?"":t,a=n?i:(0,p.Deferred)().resolve(),s=this._rowsView.waitAsyncTemplates(!0);(0,p.when)(a,s).done((()=>{this._editingCellHandler(e,o)}))}_editingCellHandler(e,t){var i;const n=this._getFocusedCell().find(x.INTERACTIVE_ELEMENTS_SELECTOR).eq(0),a=n.get(0);if(!a)return;const s=(0,r.createEvent)(e,{type:"keydown",target:a}),l=(0,r.createEvent)(e,{type:"keypress",target:a}),d=(0,r.createEvent)(e,{type:"input",target:a});if(d.originalEvent&&(d.originalEvent=(0,r.createEvent)(d.originalEvent,{data:t})),null===(i=a.select)||void 0===i||i.call(a),o.default.trigger(n,s),!s.isDefaultPrevented()&&(o.default.trigger(n,l),!l.isDefaultPrevented())){const e=h.default.mozilla?25:0;setTimeout((()=>{const e=this._getKeyPressInputValue(n,t);n.val(e);const i=n.closest(`.${x.WIDGET_CLASS}`);o.default.off(i,"focusout"),o.default.one(i,"focusout",(()=>{o.default.trigger(n,"change")})),o.default.trigger(n,d)}),e)}}_getKeyPressInputValue(e,t){const i=e.val();return"-"===t&&"-0"===i?"-0":t}_fireFocusChangingEvents(e,t,i,n){let o={};const a=this._getCellPosition(t)??{};return this.isCellFocusType()&&(o=this._fireFocusedCellChanging(e,t,n),o.cancel||(a.columnIndex=o.newColumnIndex,a.rowIndex=o.newRowIndex,n=o.isHighlighted,t=(0,c.default)(this._getCell(a)))),!o.cancel&&i&&t&&(o=this._fireFocusedRowChanging(e,t.parent()),o.cancel||(a.rowIndex=o.newRowIndex,o.isHighlighted=n)),o.$newCellElement=(0,c.default)(this._getCell(a)),o.$newCellElement.length||(o.$newCellElement=t),o}_fireFocusedCellChanging(e,t,i){const n=this.option("focusedColumnIndex"),o=this.option("focusedRowIndex"),a=this._getCellPosition(t),s=a?a.columnIndex:-1,r=a?a.rowIndex:-1,l={cellElement:t,prevColumnIndex:n,prevRowIndex:o,newColumnIndex:s,newRowIndex:r,rows:this._dataController.getVisibleRows(),columns:this._columnsController.getVisibleColumns(),event:e,isHighlighted:i||!1,cancel:!1};return this._canceledCellPosition=null,this.executeAction("onFocusedCellChanging",l),l.newColumnIndex===s&&l.newRowIndex===r||(l.$newCellElement=(0,c.default)(this._getCell({columnIndex:l.newColumnIndex,rowIndex:l.newRowIndex}))),l.cancel&&(this._canceledCellPosition={rowIndex:r,columnIndex:s}),l}_fireFocusedCellChanged(e){const t=this._rowsView.getCellIndex(e),i=null==e?void 0:e.parent().data("options"),n=null==i?void 0:i.key;this._memoFireFocusedCellChanged(n,t)}_memoFireFocusedCellChanged(e,t){const i=this._getFocusedCell(),n=this._getRowIndex(null==i?void 0:i.parent()),o=Math.min(n-this._dataController.getRowIndexOffset(),this._dataController.items().length-1);if(this._editingController.isEditCell(o,t))return;const a=this._dataController.items()[o],s=this._columnsController.getVisibleColumns()[t];this.executeAction("onFocusedCellChanged",{cellElement:i?(0,u.getPublicElement)(i):void 0,columnIndex:t,rowIndex:n,row:a,column:s})}_fireFocusedRowChanging(e,t){const i=this._getRowIndex(t),n=this.option("focusedRowIndex"),o=this._dataController.loadingOperationTypes(),a={rowElement:t,prevRowIndex:n,newRowIndex:i,event:e,rows:this._dataController.getVisibleRows(),cancel:!1},s=o.sorting||o.grouping||o.filtering||o.paging;return!this._dataController||this._dataController.isLoading()&&s?(a.cancel=!0,a):(this.option("focusedRowEnabled")&&(this.executeAction("onFocusedRowChanging",a),a.cancel||a.newRowIndex===i||(a.resetFocusedRow=a.newRowIndex<0,a.resetFocusedRow||this.setFocusedRowIndex(a.newRowIndex),a.rowIndexChanged=!0)),a)}_fireFocusedRowChanged(){var e;const t=this.option("focusedRowEnabled"),i=this.option("focusedRowKey"),n=null===(e=this._focusController)||void 0===e?void 0:e.getFocusedRowIndexByKey(i);!t||(0,_.isDefined)(i)&&n<0||this._memoFireFocusedRowChanged(i,n)}_memoFireFocusedRowChanged(e,t){const i=t-this._dataController.getRowIndexOffset();this.executeAction("onFocusedRowChanged",{rowElement:t<0?void 0:this._rowsView.getRowElement(i),rowIndex:t,row:t<0?void 0:this._dataController.getVisibleRows()[i]})}_isEventInCurrentGrid(e){return b.default.isElementInCurrentGrid(this,(0,c.default)(e.target))}_isRowEditMode(){const e=this._editingController.getEditMode();return e===C.EDIT_MODE_ROW||e===C.EDIT_MODE_FORM}_isCellEditMode(){const e=this._editingController.getEditMode();return e===C.EDIT_MODE_CELL||e===C.EDIT_MODE_BATCH}_isFastEditingAllowed(){return this._isCellEditMode()&&this.option("keyboardNavigation.editOnKeyPress")}_getInteractiveElement(e,t){const i=e.find(x.INTERACTIVE_ELEMENTS_SELECTOR).filter(":visible");return t?i.last():i.first()}_applyTabIndexToElement(e){const t=this.option("tabIndex")??0;e.attr("tabindex",t)}_getCell(e){if(this._focusedView&&e){const t=this._dataController.getRowIndexOffset(),i=this._columnsController.getVisibleColumns(null,!0)[e.columnIndex],n=i&&i.fixed?this._getFixedColumnIndexOffset(i):this._columnsController.getColumnIndexOffset(),o=e.rowIndex>=0?e.rowIndex-t:-1,a=e.columnIndex>=0?e.columnIndex-n:-1;return this._focusedView.getCell({rowIndex:o,columnIndex:a})}}_getRowIndex(e){let t=this._rowsView.getRowIndex(e);return t>=0&&(t+=this._dataController.getRowIndexOffset()),t}_hasSkipRow(e){const t=e&&e.get(0);return t&&"none"===t.style.display}_allowEditingOnEnterKey(){return"startEdit"===this.option("keyboardNavigation.enterKeyAction")}_isLegacyNavigation(){return this.option("useLegacyKeyboardNavigation")}_getDirectionCodeByKey(e){let t;switch(e){case"upArrow":t="prevRow";break;case"downArrow":t="nextRow";break;case"leftArrow":t=this.option("rtlEnabled")?"nextInRow":"previousInRow";break;case"rightArrow":t=this.option("rtlEnabled")?"previousInRow":"nextInRow"}return t}_isVirtualScrolling(){const e=this.option("scrolling.mode");return"virtual"===e||"infinite"===e}_isVirtualRowRender(){return this._isVirtualScrolling()||b.default.isVirtualRowRendering(this)}_isVirtualColumnRender(){return"virtual"===this.option("scrolling.columnRenderingMode")}_scrollBy(e,t,i,n){const o=this,a=this._rowsView.getScrollable();if(o._focusedCellPosition){const e=function(){a.off("scroll",e),setTimeout(o.restoreFocusableElement.bind(o,i,n))};a.on("scroll",e)}return a.scrollBy({left:e,top:t})}_isInsideEditForm(e){const t=(0,c.default)(e).closest(`.${this.addWidgetPrefix(C.EDIT_FORM_CLASS)}`);return t.length&&this.elementIsInsideGrid(t)}getMasterDetailCell(e){const t=(0,c.default)(e).closest(`.${x.MASTER_DETAIL_CELL_CLASS}`);return t.length&&this.elementIsInsideGrid(t)?t:null}_processNextCellInMasterDetail(e,t){!this._isInsideEditForm(e)&&e&&this._applyTabIndexToElement(e)}_handleTabKeyOnMasterDetailCell(e,t){if(this.getMasterDetailCell(e)){this._updateFocusedCellPosition((0,c.default)(e),t);const i=this._getNextCell(t,"row");return this._processNextCellInMasterDetail(i,(0,c.default)(e)),!0}return!1}_getElementType(e){return(0,c.default)(e).is("tr")?"row":"cell"}_isFastEditingStarted(){return this._isFastEditingAllowed()&&this._fastEditingStarted}_getVisibleColumnCount(){return this._columnsController.getVisibleColumns(null,!0).length}_isCellInRow(e,t){const{columnIndex:i}=e,n=this._getVisibleColumnCount();return t?i>=0&&i<=n-1:i>0&&i<n-1}_isCellElement(e){return e.length&&"TD"===e[0].tagName}_getCellElementFromTarget(e){const t=this._getElementType(e),i=(0,c.default)(e);let n;return n="cell"===t?i.closest(`.${C.ROW_CLASS} > td`):i.children().not(`.${x.COMMAND_EXPAND_CLASS}`).first(),n}_getRowsViewElement(){var e;return null===(e=this._rowsView)||void 0===e?void 0:e.element()}isKeyboardEnabled(){return this.option("keyboardNavigation.enabled")}_processCanceledEditCellPosition(e,t){if(this._canceledCellPosition){const i=this._canceledCellPosition.rowIndex===e&&this._canceledCellPosition.columnIndex===t;return this._canceledCellPosition=null,i}}updateFocusedRowIndex(){const e=this._dataController,t=this.getVisibleRowIndex(),i=e.items(),n=i.length?i.length-1:-1,o=e.getRowIndexOffset();n>=0&&t>n&&this.setFocusedRowIndex(n+o)}}t.KeyboardNavigationController=T;t.keyboardNavigationModule={defaultOptions:()=>({useLegacyKeyboardNavigation:!1,keyboardNavigation:{enabled:!0,enterKeyAction:"startEdit",enterKeyDirection:"none",editOnKeyPress:!1}}),controllers:{keyboardNavigation:T},extenders:{views:{rowsView:e=>class extends e{_rowClick(e){const t=this._editingController.getEditRowIndex(),i=this._keyboardNavigationController.isKeyboardEnabled();t===e.rowIndex&&this._keyboardNavigationController.setCellFocusType();((0,S.isMobile)()||!i)&&this.option("focusedRowEnabled")&&this._triggerPointerDownEventHandler(e,!i),super._rowClick.apply(this,arguments)}_triggerPointerDownEventHandler(e,t){const{originalEvent:i}=e.event;if(i){const n=(0,c.default)(i.target),o=this.getCellIndex(n),a=this._columnsController.getVisibleColumns()[o],s=this._dataController.items()[e.rowIndex];if(this._keyboardNavigationController._isAllowEditing(s,a)||t){const e=(0,r.createEvent)(i,{currentTarget:i.target});this._keyboardNavigationController._pointerEventHandler(e)}}}renderFocusState(e){super.renderFocusState(e);const{preventScroll:t,pageSizeChanged:i}=e??{},n=this.element();n&&!(0,m.focused)(n)&&n.attr("tabindex",null),i&&this._keyboardNavigationController.updateFocusedRowIndex();let o=this._keyboardNavigationController.getVisibleRowIndex();(!(0,_.isDefined)(o)||o<0)&&(o=0);const a=this.getCellElements(o);this._keyboardNavigationController.isKeyboardEnabled()&&null!=a&&a.length&&this.updateFocusElementTabIndex(a,t)}updateFocusElementTabIndex(e,t){const i=e.eq(0).parent();if((0,S.isGroupRow)(i))this._keyboardNavigationController._applyTabIndexToElement(i);else{let t=this._keyboardNavigationController.getColumnIndex();(!(0,_.isDefined)(t)||t<0)&&(t=0),this._updateFocusedCellTabIndex(e,t)}}_updateFocusedCellTabIndex(e,t){const i=this._keyboardNavigationController,n=e?e.length:-1,o=function(e){const t=!!i.getMasterDetailCell(e),n=i._isCellValid(e);if(!t&&n&&i._isCellElement(e))return i._applyTabIndexToElement(e),i.setCellFocusType(),!0},a=w.GridCoreKeyboardNavigationDom.getCellToFocus(e,t);if(a.length)o(a);else{n<=t&&(t=n-1);for(let i=t;i<n&&!o((0,c.default)(e[i]));++i);}}renderDelayedTemplates(e){super.renderDelayedTemplates.apply(this,arguments),this.waitAsyncTemplates().done((()=>{this._renderFocusByChange(e)}))}_renderFocusByChange(e){var t;const{operationTypes:i,repaintChangesOnly:n}=e??{},{fullReload:o,pageSize:a}=i??{},s=!(null==e||null===(t=e.changeTypes)||void 0===t||!t.find((e=>"insert"===e||"remove"===e)));if(!e||!n||o||a||s){const e=(0,S.shouldPreventScroll)(this);this.renderFocusState({preventScroll:e,pageSizeChanged:a})}}_renderCore(e){const t=super._renderCore.apply(this,arguments);return this._renderFocusByChange(e),t}_editCellPrepared(e){var t;const i=this._getEditorInstance(e),n=null===(t=this._keyboardNavigationController)||void 0===t?void 0:t._isFastEditingStarted();i&&n&&this._handleEditingNavigationMode(i),super._editCellPrepared.apply(this,arguments)}_handleEditingNavigationMode(e){["downArrow","upArrow"].forEach((t=>{const i=e._supportedKeys()[t];e.registerKeyHandler(t,(t=>{if("true"===e._input().attr("aria-expanded"))return i&&i.call(e,t)}))})),e.registerKeyHandler("leftArrow",l.noop),e.registerKeyHandler("rightArrow",l.noop);e.NAME===x.DATEBOX_WIDGET_NAME&&e.option("useMaskBehavior")&&e.registerKeyHandler("enter",l.noop)}_getEditorInstance(e){const t=e.find(".dx-texteditor").eq(0);return b.default.getWidgetInstance(t)}}},controllers:{editing:e=>class extends e{editCell(e,t){if(this._keyboardNavigationController._processCanceledEditCellPosition(e,t))return!1;const i=super.editCell(e,t);return i&&this._keyboardNavigationController.setupFocusedView(),i}editRow(e){const t=this._keyboardNavigationController.getVisibleColumnIndex(),i=this._columnsController.getVisibleColumns()[t];(i&&i.type||this.option("editing.mode")===C.EDIT_MODE_FORM)&&this._keyboardNavigationController._resetFocusedCell(),super.editRow(e)}addRow(e){return this._keyboardNavigationController.setupFocusedView(),this._keyboardNavigationController.setCellFocusType(),super.addRow.apply(this,arguments)}getFocusedCellInRow(e){let t=super.getFocusedCellInRow(e);const i=this._dataController.getRowIndexOffset(),n=this._keyboardNavigationController._focusedCellPosition.rowIndex-i;if(this._keyboardNavigationController.isKeyboardEnabled()&&n===e){const e=this._keyboardNavigationController._getFocusedCell();(0,S.isElementDefined)(e)&&!e.hasClass(x.COMMAND_EDIT_CLASS)&&(t=e)}return t}_processCanceledEditingCell(){this.closeEditCell().done((()=>{this._keyboardNavigationController._updateFocus()}))}closeEditCell(){const e=this._keyboardNavigationController;e._fastEditingStarted=!1;const t=super.closeEditCell.apply(this,arguments);return!!this._getFocusedElement().closest(`.${this.addWidgetPrefix(C.FILTER_ROW_CLASS)}`).length||e._updateFocus(),t}_getFocusedElement(){var e,t;return(0,c.default)(null===(e=(t=this.component).element)||void 0===e?void 0:e.call(t)).find(":focus")}_delayedInputFocus(){this._keyboardNavigationController._isNeedScroll=!0,super._delayedInputFocus.apply(this,arguments)}_isEditingStart(){const e=super._isEditingStart.apply(this,arguments);if(e&&!this._keyboardNavigationController._isNeedFocus){const e=this._keyboardNavigationController._getFocusedCell();this._keyboardNavigationController._focus(e,!0)}return e}},data:e=>class extends e{_correctRowIndices(e){const t=this._keyboardNavigationController._focusedCellPosition;if(super._correctRowIndices.apply(this,arguments),t&&t.rowIndex>=0){const i=e(t.rowIndex);i&&(t.rowIndex+=i,this._editorFactoryController.refocus())}}getMaxRowIndex(){let e=this.items().length-1;const t=this.virtualItemsCount();if(t){e+=this.getRowIndexOffset()+t.end}return e}},adaptiveColumns:e=>class extends e{_showHiddenCellsInView(e){let{viewName:t,$cells:i,isCommandColumn:n}=e;super._showHiddenCellsInView.apply(this,arguments),t===x.COLUMN_HEADERS_VIEW&&!n&&i.each(((e,t)=>{const i=(0,c.default)(t);(0,S.isCellInHeaderRow)(i)&&i.attr("tabindex",0)}))}_hideVisibleCellInView(e){let{viewName:t,$cell:i,isCommandColumn:n}=e;super._hideVisibleCellInView.apply(this,arguments),t===x.COLUMN_HEADERS_VIEW&&!n&&(0,S.isCellInHeaderRow)(i)&&i.removeAttr("tabindex")}_hideVisibleColumnInView(e){let{view:t,isCommandColumn:i,visibleIndex:n}=e;super._hideVisibleColumnInView({view:t,isCommandColumn:i,visibleIndex:n}),t.name===x.ROWS_VIEW&&this._rowsView.renderFocusState(null)}},keyboardNavigation:D.keyboardNavigationScrollableA11yExtender}}}},93734:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isAdaptiveItem=function(e){return e&&e.hasClass(r.ADAPTIVE_ITEM_TEXT_CLASS)},t.isCellInHeaderRow=function(e){return!!e.parent(`.${r.HEADER_ROW_CLASS}`).length},t.isDataRow=function(e){return e&&e.hasClass(r.DATA_ROW_CLASS)},t.isDetailRow=function(e){return e&&e.hasClass(r.MASTER_DETAIL_ROW_CLASS)},t.isEditForm=function(e){return e&&e.hasClass(r.MASTER_DETAIL_ROW_CLASS)&&e.hasClass(r.EDIT_FORM_CLASS)},t.isEditorCell=function(e,t){return!e._isRowEditMode()&&t&&!t.hasClass(r.COMMAND_SELECT_CLASS)&&t.hasClass(s.EDITOR_CELL_CLASS)},t.isElementDefined=function(e){return(0,a.isDefined)(e)&&e.length>0},t.isFixedColumnIndexOffsetRequired=function(e,t){if(e.option("rtlEnabled"))return!("right"===t.fixedPosition||(0,a.isDefined)(t.command)&&!(0,a.isDefined)(t.fixedPosition));return!(!(0,a.isDefined)(t.fixedPosition)||"left"===t.fixedPosition)},t.isGroupFooterRow=function(e){return e&&e.hasClass(l)},t.isGroupRow=function(e){return e&&e.hasClass(r.GROUP_ROW_CLASS)},t.isMobile=function(){return"desktop"!==o.default.current().deviceType},t.isNotFocusedRow=function(e){return!e||e.hasClass(r.FREESPACE_ROW_CLASS)||e.hasClass(r.VIRTUAL_ROW_CLASS)},t.shouldPreventScroll=function(e){const t=e.getController("keyboardNavigation");return!!t._isVirtualScrolling()&&e.option("focusedRowIndex")===t.getRowIndex()};var n,o=(n=i(65951))&&n.__esModule?n:{default:n},a=i(11528),s=i(69699),r=i(24171);const l="dx-datagrid-group-footer"},47526:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.keyboardNavigationScrollableA11yExtender=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(11528);t.keyboardNavigationScrollableA11yExtender=e=>class extends e{rowsViewFocusHandler(e){const t=(0,o.default)(e.target);this.translateFocusIfNeed(e,t),super.rowsViewFocusHandler(e)}rowsViewFocusOutHandler(){super.rowsViewFocusOutHandler(),this.makeScrollableFocusableIfNeed()}translateFocusIfNeed(e,t){const i=this.isScrollableNeedFocusable(),n=this._isFixedColumn(0);if(!i||!n)return;const o=this._rowsView.getCell({rowIndex:0,columnIndex:0}),a=!!o.attr("tabindex"),s=t.is(this._$firstNotFixedCell);a&&s&&(e.preventDefault(),this._focus(o))}rowsViewRenderCompleted(e){this._$firstNotFixedCell=this.getFirstNotFixedCell(),this.makeScrollableFocusableIfNeed(),super.rowsViewRenderCompleted(e)}_focus(e,t,i){super._focus(e,t,i),this.makeScrollableFocusableIfNeed()}_tabKeyHandler(e,t){const i=!((0,a.isDefined)(this._focusedCellPosition)&&!(0,a.isEmptyObject)(this._focusedCellPosition))||!e.shift&&this._isLastValidCell(this._focusedCellPosition)||e.shift&&this._isFirstValidCell(this._focusedCellPosition),n=this.isScrollableNeedFocusable();var o;i&&n&&(null===(o=this._$firstNotFixedCell)||void 0===o||o.removeAttr("tabIndex"));super._tabKeyHandler(e,t)}getFirstNotFixedCell(){var e;const t=this._columnsController.getVisibleColumns().findIndex((e=>{let{fixed:t}=e;return!t})),i=null===(e=this._editingController)||void 0===e?void 0:e.isEditing();return-1===t||i?void 0:this._rowsView._getCellElement(0,t)}isScrollableNeedFocusable(){var e,t;const i=!!this._rowsView.getScrollable(),n=!(null===(e=this._rowsView._fixedTableElement)||void 0===e||!e.length),o=!(null===(t=this._rowsView.getCellElements(0))||void 0===t||!t.length);return i&&n&&o}makeScrollableFocusableIfNeed(){this.isScrollableNeedFocusable()&&this._$firstNotFixedCell&&this._applyTabIndexToElement(this._$firstNotFixedCell)}}},68491:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.registerKeyboardAction=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=o(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.hasOwnProperty.call(e,s)){var r=a?Object.getOwnPropertyDescriptor(e,s):null;r&&(r.get||r.set)?Object.defineProperty(n,s,r):n[s]=e[s]}return n.default=e,i&&i.set(e,n),n}(i(16191));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(o=function(e){return e?i:t})(e)}t.registerKeyboardAction=function(e,t,i,o,a){const s=t.getController("keyboardNavigation");if(t.option("useLegacyKeyboardNavigation")||s&&!s.isKeyboardEnabled())return;t.createAction("onKeyDown"),n.registerKeyboardAction(e,t,i,o,a,(e=>{t.executeAction("onKeyDown",e)}))}},47197:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.prepareItems=function(e,t){const i=e=>e||1,o=[],a=(e[0]||[]).reduce(((e,t)=>e+i(t.colspan)),0),s=(e=>{let t=0,n=0;return()=>{const o=e[t]||[],a=o[n++];return n>=o.length&&(t++,n=0),a&&(a.colspan=i(a.colspan),a.rowspan=i(a.rowspan)),a}})(e),r=(e,i,a)=>{if((o[e]=o[e]||[])[i]=a,a.colspan>1||a.rowspan>1){const o=(e=>(0,n.extend)({},e,t))(a);for(let t=1;t<a.colspan;t++)r(e,i+t,o);for(let t=1;t<a.rowspan;t++)for(let n=0;n<a.colspan;n++)r(e+t,i+n,o)}};let l=s(),d=0;for(;l;){for(let e=0;e<a&&l;e++)o[d]&&o[d][e]||(r(d,e,l),e+=l.colspan-1,l=s());d++}return o};var n=i(52576)},74854:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ViewController=t.View=t.ModuleItem=t.Controller=void 0,t.processModules=y;var n=h(i(4671)),o=h(i(64553)),a=h(i(84718)),s=i(17781),r=i(21274),l=i(11528),d=i(3104),u=h(i(35185)),c=i(20574);function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},p.apply(null,arguments)}class g{constructor(e){const t=this;t._updateLockCount=0,t.component=e,t._actions={},t._actionConfigs={},(0,r.each)(this.callbackNames()||[],(function(e,i){const n=t.callbackFlags(i)||{};n.unique=!0,n.syncStrategy=!0,t[this]=(0,a.default)(n)}))}_endUpdateCore(){}init(){}callbackNames(){}callbackFlags(e){}publicMethods(){return[]}beginUpdate(){this._updateLockCount++}endUpdate(){this._updateLockCount>0&&(this._updateLockCount--,this._updateLockCount||this._endUpdateCore())}option(e){const{component:t}=this,i=t._optionCache;return 1===arguments.length&&i?(e in i||(i[e]=t.option(e)),i[e]):t.option.apply(t,arguments)}_silentOption(e,t){const{component:i}=this,n=i._optionCache;return n&&(n[e]=t),i._setOptionWithoutOptionChange(e,t)}localize(e){const t=this.component._optionCache;return t?(e in t||(t[e]=n.default.format(e)),t[e]):n.default.format(e)}on(e,t){return this.component.on.apply(this.component,arguments)}off(){return this.component.off.apply(this.component,arguments)}optionChanged(e){e.name in this._actions&&(this.createAction(e.name,this._actionConfigs[e.name]),e.handled=!0)}getAction(e){return this._actions[e]}setAria(e,t,i){const n=i.get(0),o="role"!==e&&"id"!==e?"aria-":"";n.setAttribute?n.setAttribute(o+e,t):i.attr(o+e,t)}_createComponent(e,t,i){return this.component._createComponent(e,t,i)}getController(e){return this.component._controllers[e]}createAction(e,t){if((0,l.isFunction)(e)){const i=this.component._createAction(e.bind(this),t);return function(e){i({event:e})}}this._actions[e]=this.component._createActionByOption(e,t),this._actionConfigs[e]=t}executeAction(e,t){const i=this._actions[e];return i&&i(t)}dispose(){const e=this;(0,r.each)(e.callbackNames()||[],(function(){e[this].empty()}))}addWidgetPrefix(e){return`dx-${this.component.NAME.slice(2).toLowerCase()}${e?`-${e}`:""}`}getWidgetContainerClass(){const e="dxDataGrid"===this.component.NAME?null:"container";return this.addWidgetPrefix(e)}elementIsInsideGrid(e){return e.closest(`.${this.getWidgetContainerClass()}`).parent().is(this.component.$element())}}t.ModuleItem=g;class _ extends g{}t.Controller=_;class f extends _{getView(e){return this.component._views[e]}getViews(){return this.component._views}}t.ViewController=f;class m extends g{constructor(e){super(e),this.renderCompleted=(0,a.default)(),this.resizeCompleted=(0,a.default)()}_isReady(){return this.component.isReady()}_endUpdateCore(){super._endUpdateCore(),!this._isReady()&&this._requireReady&&(this._requireRender=!1,this.component._requireResize=!1),this._requireRender&&(this._requireRender=!1,this.render(this._$parent))}_invalidate(e,t){this._requireRender=!0,this.component._requireResize=(0,d.hasWindow)()&&(this.component._requireResize||e),this._requireReady=this._requireReady||t}_renderCore(e){}_resizeCore(){}_parentElement(){return this._$parent}element(){return this._$element}getElementHeight(){const e=this.element();if(!e)return 0;const t=parseFloat(e.css("marginTop"))||0,i=parseFloat(e.css("marginBottom"))||0,{offsetHeight:n}=e.get(0);return n+t+i}isVisible(){return!0}getTemplate(e){return this.component._getTemplate(e)}getView(e){return this.component._views[e]}_getBorderedViews(){return{columnHeadersView:this.component._views.columnHeadersView,rowsView:this.component._views.rowsView,filterPanelView:this.component._views.filterPanelView,footerView:this.component._views.footerView}}render(e,t){let i=this._$element;const n=this.isVisible();if((i||e)&&(this._requireReady=!1,i||(i=this._$element=(0,o.default)("<div>").appendTo(e),this._$parent=e),i.toggleClass("dx-hidden",!n),this.component._views&&(0,c.updateViewsBorders)(this.name,this._getBorderedViews()),n)){this.component._optionCache={};const e=this._renderCore(t);this.component._optionCache=void 0,e?e.done((()=>{this.renderCompleted.fire(t)})):this.renderCompleted.fire(t)}}resize(){this.isResizing=!0,this._resizeCore(),this.resizeCompleted.fire(),this.isResizing=!1}focus(e){this.element().get(0).focus({preventScroll:e})}}t.View=m;const v=1e6;function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i={};return Object.entries(t).forEach((t=>{let[n,o]=t;const a=e[n];if(a)if((0,l.isFunction)(o))i[n]=o(a);else{const e=a;i[n]=e.inherit(o)}})),i}function y(e,t){const{modules:i}=t,{modulesOrder:n}=t;function o(t){const i={};return(0,r.each)(t,((t,n)=>{const o=new n(e);o.name=t,function(e,t,i){const n=i.publicMethods();n&&(0,r.each)(n,((n,o)=>{if(!i[o])throw u.default.Error("E1006",t,o);if(e[o])throw u.default.Error("E1005",o);e[o]=function(){return i[o](...arguments)}}))}(e,t,o),i[t]=o})),i}n&&i.sort(((e,t)=>{let i=n.indexOf(e.name),o=n.indexOf(t.name);return i<0&&(i=v),o<0&&(o=v),i-o}));const a={},s={};i.forEach((e=>{let{name:t,controllers:i={},views:n={}}=e;Object.entries(i).forEach((e=>{let[i,n]=e;if(a[i])throw u.default.Error("E1001",t,i);if(!((null==n?void 0:n.prototype)instanceof _))throw u.default.Error("E1002",t,i);a[i]=n})),Object.entries(n).forEach((e=>{let[i,n]=e;if(s[i])throw u.default.Error("E1003",t,i);if(!((null==n?void 0:n.prototype)instanceof m))throw u.default.Error("E1004",t,i);s[i]=n}))}));const l=i.filter((e=>{let{extenders:t}=e;return!!t})),d=l.reduce(((e,t)=>{let{extenders:i}=t;return p({},e,C(e,null==i?void 0:i.controllers))}),a),c=l.reduce(((e,t)=>{let{extenders:i}=t;return p({},e,C(e,null==i?void 0:i.views))}),s);e._controllers=o(d),e._views=o(c)}t.default={modules:[],View:m,ViewController:f,Controller:_,registerModule(e,t){const{modules:i}=this;for(let t=0;t<i.length;t++)if(i[t].name===e)return;t.name=e,i.push(t)},registerModulesOrder(e){this.modulesOrder=e},unregisterModule(e){this.modules=(0,s.grep)(this.modules,(t=>t.name!==e))},processModules:y,callModuleItemsMethod:function(e,t,i){i=i||[],e._controllers&&(0,r.each)(e._controllers,(function(){this[t]&&this[t].apply(this,i)})),e._views&&(0,r.each)(e._views,(function(){this[t]&&this[t].apply(this,i)}))}}},53226:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=x(i(92774)),o=x(i(14479)),a=i(97169),s=i(89358),r=x(i(64553)),l=i(17781),d=i(31e3),u=i(87739),c=i(52576),h=i(21274),p=i(41639),g=i(57653),_=i(54497),f=i(11528),m=x(i(40216)),v=i(3104),C=x(i(2082)),y=x(i(31876)),b=x(i(56417));function x(e){return e&&e.__esModule?e:{default:e}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},w.apply(null,arguments)}const S="virtual",D="scrolling.mode",I={year:e=>e&&e.getFullYear(),month:e=>e&&e.getMonth()+1,day:e=>e&&e.getDate(),quarter:e=>e&&Math.floor(e.getMonth()/3)+1,hour:e=>e&&e.getHours(),minute:e=>e&&e.getMinutes(),second:e=>e&&e.getSeconds()},E=function(){const e=arguments[1],t=this.calculateCellValue(e);if(!(0,f.isDefined)(t))return null;if(T(this.dataType)){return I[arguments[0]](t)}if("number"===this.dataType){const e=arguments[0];return Math.floor(Number(t)/e)*e}};function T(e){return"date"===e||"datetime"===e}const A=function(e){e.get(0).textContent="\xa0"},O=function(e){e=e||[];const t=(0,s.normalizeSortingInfo)(e);for(let i=0;i<e.length;i++)e&&e[i]&&void 0!==e[i].isExpanded&&(t[i].isExpanded=e[i].isExpanded),e&&e[i]&&void 0!==e[i].groupInterval&&(t[i].groupInterval=e[i].groupInterval);return t},P=function(e,t){const i=C.default.format(e,t.format)||e&&e.toString()||"",n={value:e,valueText:t.getDisplayFormat?t.getDisplayFormat(i):i,target:t.target||"row",groupInterval:t.groupInterval};return t.customizeText?t.customizeText.call(t,n):n.valueText},k=function(e,t){const i=e.displayFormat||e.columnCaption&&t[`${e.summaryType}OtherColumn`]||t[e.summaryType];return P(e.value,{format:e.valueFormat,getDisplayFormat:t=>i?(0,_.format)(i,t,e.columnCaption):t,customizeText:e.customizeText})},M=function(e){const t=e.data&&e.data(),i=t&&t.dxComponents,n=i&&i[0];return n&&t[n]},R=function(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!R(e[i],t[i]))return!1;return!0}return(0,f.isFunction)(e)&&e.columnIndex>=0&&(0,f.isFunction)(t)&&t.columnIndex>=0?e.columnIndex===t.columnIndex&&(0,d.toComparable)(e.filterValue)===(0,d.toComparable)(t.filterValue)&&(0,d.toComparable)(e.selectedFilterOperation)===(0,d.toComparable)(t.selectedFilterOperation):(0,d.toComparable)(e)==(0,d.toComparable)(t)},L=function(e,t,i){let n=!1;if(i&&(n=i(t)),!n){const i={index:(o=t).index,columnIndex:o.columnIndex,x:o.x,y:o.y};e.push(i)}var o};t.default={renderNoDataText(e){const t=this;if(!(e=e||this.element()))return;const i=t.addWidgetPrefix("nodata");let n=e.find(`.${i}`).last();const o=this._dataController.isEmpty(),a=this._dataController.isLoading();n.length||(n=(0,r.default)("<span>").addClass(i)),n.parent().is(e)||n.appendTo(e),o&&!a?n.removeClass("dx-hidden").text(t._getNoDataText()):n.addClass("dx-hidden")},renderLoadPanel(e,t,i){const n=this;let o;n._loadPanel&&n._loadPanel.$element().remove(),o=n.option("loadPanel"),o&&("auto"===o.enabled?!i:o.enabled)?(o=(0,c.extend)({shading:!1,message:o.text,container:t},o),n._loadPanel=n._createComponent((0,r.default)("<div>").appendTo(t),y.default,o)):n._loadPanel=null},calculateLoadPanelPosition(e){const t=(0,r.default)((0,v.getWindow)());return(0,g.getHeight)(e)>(0,g.getHeight)(t)?{of:t,boundary:e,collision:"fit"}:{of:e}},getIndexByKey(e,t,i){let n=-1;if(void 0!==e&&Array.isArray(t)){i=arguments.length<=2?"key":i;for(let o=0;o<t.length;o++){const a=(0,f.isDefined)(i)?t[o][i]:t[o];if((0,l.equalByValue)(e,a)){n=o;break}}}return n},combineFilters(e,t){let i=[];t=t||"and";for(let o=0;o<e.length;o++){var n;if(e[o]){if(1===(null===(n=e[o])||void 0===n?void 0:n.length)&&"!"===e[o][0]){if("and"===t)return["!"];if("or"===t)continue}i.length&&i.push(t),i.push(e[o])}}if(1===i.length&&(i=i[0]),i.length)return i},checkChanges(e,t){let i=0;for(let n=0;n<t.length;n++)e[t[n]]&&i++;return e.length&&e.length===i},equalFilterParameters:R,proxyMethod(e,t,i){e[t]||(e[t]=function(){const e=this._dataSource;return e?e[t].apply(e,arguments):i})},formatValue:P,getFormatOptionsByColumn:(e,t)=>({format:e.format,getDisplayFormat:e.getDisplayFormat,customizeText:e.customizeText,target:t,trueText:e.trueText,falseText:e.falseText}),getDisplayValue:(e,t,i,n)=>e.displayValueMap&&void 0!==e.displayValueMap[t]?e.displayValueMap[t]:e.calculateDisplayValue&&i&&"group"!==n?e.calculateDisplayValue(i):!e.lookup||"group"===n&&(e.calculateGroupValue||e.calculateDisplayValue)?t:e.lookup.calculateCellValue(t),getGroupRowSummaryText(e,t){let i="(";for(let n=0;n<e.length;n++){const o=e[n];i+=(n>0?", ":"")+k(o,t)}return i+")"},getSummaryText:k,normalizeSortingInfo:O,getFormatByDataType(e){switch(e){case"date":return"shortDate";case"datetime":return"shortDateShortTime";default:return}},getHeaderFilterGroupParameters(e,t){let i=[];const n=e.dataField||e.name,o=b.default.getGroupInterval(e);return o?((0,h.each)(o,((a,s)=>{i.push(t?{selector:n,groupInterval:s,isExpanded:a<o.length-1}:E.bind(e,s))})),i):(t?i=[{selector:n,isExpanded:!1}]:(i=function(t){let i=e.calculateCellValue(t);return void 0!==i&&""!==i||(i=null),i},e.sortingMethod&&(i=[{selector:i,compare:e.sortingMethod.bind(e)}])),i)},equalSortParameters(e,t,i){if(e=O(e),t=O(t),Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(n=e[a].selector,o=t[a].selector,!((0,f.isFunction)(n)&&(0,f.isFunction)(o)&&n.originalCallback&&o.originalCallback?n.originalCallback===o.originalCallback&&n.columnIndex===o.columnIndex:n===o)||e[a].desc!==t[a].desc||e[a].groupInterval!==t[a].groupInterval||!i&&Boolean(e[a].isExpanded)!==Boolean(t[a].isExpanded))return!1;return!0}var n,o;return(!e||!e.length)==(!t||!t.length)},getPointsByColumns(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const a=[],s=e.length;let r,l,d={left:0,top:0},u={width:0,height:0},c=n;for(let n=0;n<=s;n++){var h;n<s&&(r=e.eq(n),d=r.offset(),u=(0,p.getBoundingRect)(r.get(0)),l="rtl"===r.css("direction"));const g=d.left+u.width,_=d.top+u.height,f={index:c,columnIndex:c,item:null===(h=r)||void 0===h?void 0:h.get(0),x:i||l===(n===s)?d.left:g,y:i&&n===s?_:d.top};if(!i&&n>0){const i=e.eq(n-1).offset(),{width:s}=(0,p.getBoundingRect)(e[n-1]),r=l?i.left:i.left+s;if(i.top<f.y&&(f.y=i.top),o&&Math.round(r)!==Math.round(f.x)){const i=w({},f,{item:e[n-1],x:r});l?(f.isRightBoundary=!0,i.isLeftBoundary=!0):(f.isLeftBoundary=!0,i.isRightBoundary=!0),L(a,i,t)}}L(a,f,t),c++}return a},getExpandCellTemplate:()=>({allowRenderToDetachedContainer:!0,render(e,t){const i=(0,r.default)(e);if(!(0,f.isDefined)(t.value)||t.data&&t.data.isContinuation||t.row.isNewRow)A(i);else{const e=t.component.getView("rowsView");i.addClass("dx-datagrid-expand").addClass("dx-selection-disabled"),(0,r.default)("<div>").addClass(t.value?"dx-datagrid-group-opened":"dx-datagrid-group-closed").appendTo(i),e.setAria("label",t.value?e.localize("dxDataGrid-ariaCollapse"):e.localize("dxDataGrid-ariaExpand"),i)}}}),setEmptyText:A,isDateType:T,getSelectionRange(e){try{if(e)return{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}catch(e){}return{}},setSelectionRange(e,t){try{e&&e.setSelectionRange&&e.setSelectionRange(t.selectionStart,t.selectionEnd)}catch(e){}},focusAndSelectElement(e,t){const i=t.is(":focus");n.default.trigger(t,"focus");const o=e.option("editing.selectTextOnEditStart"),a=t.get(0);if(!i&&o&&t.is(".dx-texteditor-input")&&!t.is("[readonly]")){const e=M(t.closest(".dx-texteditor"));(0,u.when)(e&&e._loadItemDeferred).done((()=>{a.select()}))}},getWidgetInstance:M,getLastResizableColumnIndex(e,t){const i=e.some((e=>e&&!e.command&&!e.fixed&&!1!==e.allowResizing));let n;for(n=e.length-1;e[n];n--){const o=e[n],a=t&&t[n],s=!i||!1!==o.allowResizing;if(!o.command&&!o.fixed&&"adaptiveHidden"!==a&&s)break}return n},isElementInCurrentGrid(e,t){if(t&&t.length){return t.closest(`.${e.getWidgetContainerClass()}`).parent().is(e.component.$element())}return!1},isVirtualRowRendering(e){const t=e.option("scrolling.rowRenderingMode"),i=e.option(D)===S,n="infinite"===e.option(D);return!(!1!==e.option("scrolling.legacyMode")||!i&&!n)||t===S},getPixelRatio:e=>e.devicePixelRatio||1,getContentHeightLimit(e){return e.mozilla?8e6:15e6/this.getPixelRatio((0,v.getWindow)())},normalizeLookupDataSource(e){let t;return e.items?t=e.items:(t=e.dataSource,(0,f.isFunction)(t)&&!m.default.isWrapped(t)&&(t=t({}))),(0,a.normalizeDataSourceOptions)(t)},getWrappedLookupDataSource(e,t,i){if(!t)return[];const n=this.normalizeLookupDataSource(e.lookup);if(e.calculateCellValue!==e.defaultCalculateCellValue)return n;const a=t.remoteOperations().groupPaging,s=e.displayField&&(0,f.isString)(e.displayField);let r,l,d;const c=(e,t)=>{const i=t.skip??0,n=t.take?i+t.take:e.length;return e.slice(i,n)},h=n=>{const o=function(e){return Array.isArray(e)||(e=[e]),e.map(((t,i)=>(0,f.isString)(t)?{selector:t,isExpanded:i<e.length-1}:t))}(s?[e.dataField,e.displayField]:e.dataField),h=new u.Deferred;return r&&(!a||n.skip===d&&n.take===l)?h.resolve(c(r,n)):(d=n.skip,l=n.take,t.load({filter:i,group:o,take:a?n.take:void 0,skip:a?n.skip:void 0}).done((e=>{r=e,h.resolve(a?e:c(e,n))})).fail(h.fail)),h},p=w({},n,{__dataGridSourceFilter:i,load:t=>{const i=new u.Deferred;return h(t).done((a=>{if(0===a.length)return void i.resolve([]);const s=this.combineFilters(a.flatMap((e=>e.key)).map((t=>[e.lookup.valueExpr,t])),"or");new o.default(w({},n,t,{filter:this.combineFilters([s,t.filter],"and"),paginate:!1})).load().done(i.resolve).fail(i.fail)})).fail(i.fail),i},key:e.lookup.valueExpr,byKey(t){const i=(0,u.Deferred)();return this.load({filter:[e.lookup.valueExpr,"=",t]}).done((e=>{i.resolve(e[0])})),i.promise()}});return p},logHeaderFilterDeprecatedWarningIfNeed(e){const t="23.1",i=e._logDeprecatedOptionWarning.bind(e);(0,f.isDefined)(e.option("headerFilter.allowSearch"))&&i("headerFilter.allowSearch",{since:t,alias:"headerFilter.search.enabled"}),(0,f.isDefined)(e.option("headerFilter.searchTimeout"))&&i("headerFilter.searchTimeout",{since:t,alias:"headerFilter.search.timeout"});const n="dxPivotGrid"===e.NAME?"dataSource.fields":"columns",o=e.option(n);if(!Array.isArray(o))return;const a=e=>{e.forEach((e=>{var o;const s=e.headerFilter||{};(0,f.isDefined)(s.allowSearch)&&i(`${n}[].headerFilter.allowSearch`,{since:t,alias:`${n}[].headerFilter.search.enabled`}),(0,f.isDefined)(s.searchMode)&&i(`${n}[].headerFilter.searchMode`,{since:t,alias:`${n}[].headerFilter.search.mode`}),null!==(o=e.columns)&&void 0!==o&&o.length&&a(e.columns)}))};a(o)},getComponentBorderWidth:(e,t)=>e.option("showBorders")?Math.ceil((0,g.getOuterWidth)(t)-(0,g.getInnerWidth)(t)):0,isCustomCommandColumn:(e,t)=>!!e.filter((e=>e.type===t.type)).length}},99335:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(17781),a=i(52576),s=i(21274),r=i(11528),l=(n=i(11118))&&n.__esModule?n:{default:n};class d extends l.default{_getDefaultOptions(){const e=super._getDefaultOptions();return(0,s.each)(this.getGridCoreHelper().modules,(function(){(0,r.isFunction)(this.defaultOptions)&&(0,a.extend)(!0,e,this.defaultOptions())})),e}_init(){this._activeStateUnit=".dx-row",super._init()}_setDeprecatedOptions(){super._setDeprecatedOptions(),(0,a.extend)(this._deprecatedOptions,{"columnChooser.allowSearch":{since:"23.1",message:'Use the "columnChooser.search.enabled" option instead'},"columnChooser.searchTimeout":{since:"23.1",message:'Use the "columnChooser.search.timeout" option instead'}})}_clean(){}_optionChanged(e){this.getGridCoreHelper().callModuleItemsMethod(this,"optionChanged",[e]),e.handled||super._optionChanged(e)}_dimensionChanged(){this.updateDimensions(!0)}_visibilityChanged(e){e&&this.updateDimensions()}_renderContentImpl(){this.getView("gridView").update()}_renderContent(){const e=this;(0,o.deferRender)((()=>{e._renderContentImpl()}))}_dispose(){super._dispose(),this.getGridCoreHelper().callModuleItemsMethod(this,"dispose")}isReady(){return this.getController("data").isReady()}getController(e){return this._controllers[e]}getView(e){return this._views[e]}getGridCoreHelper(){}beginUpdate(){super.beginUpdate(),this.getGridCoreHelper().callModuleItemsMethod(this,"beginUpdate")}endUpdate(){this.getGridCoreHelper().callModuleItemsMethod(this,"endUpdate"),super.endUpdate()}}t.default=d},9649:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CLASSES=void 0;t.CLASSES={detailRow:"dx-master-detail-row"}},11052:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.masterDetailModule=t.dataMasterDetailExtenderMixin=void 0;var n=c(i(4671)),o=c(i(64553)),a=i(17781),s=i(87739),r=i(21274),l=i(57653),d=i(11528),u=c(i(53226));function c(e){return e&&e.__esModule?e:{default:e}}const h="dx-master-detail-row",p=function(e){e._expandedItems=[],e._isExpandAll=e.option("masterDetail.autoExpandAll")},g=e=>class extends e{init(){p(this),super.init()}expandAll(e){const t=this;e<0?(t._isExpandAll=!0,t._expandedItems=[],t.updateItems()):super.expandAll.apply(t,arguments)}collapseAll(e){const t=this;e<0?(t._isExpandAll=!1,t._expandedItems=[],t.updateItems()):super.collapseAll.apply(t,arguments)}isRowExpandedHack(){return super.isRowExpanded.apply(this,arguments)}isRowExpanded(e){const t=this,i=u.default.getIndexByKey(e,t._expandedItems);return Array.isArray(e)?super.isRowExpanded.apply(t,arguments):!!(t._isExpandAll^(i>=0&&t._expandedItems[i].visible))}_getRowIndicesForExpand(e){const t=this.getRowIndexByKey(e);return[t,t+1]}_changeRowExpandCore(e){const t=this;let i;if(Array.isArray(e))i=super._changeRowExpandCore.apply(t,arguments);else{const n=u.default.getIndexByKey(e,t._expandedItems);if(n>=0){const{visible:e}=t._expandedItems[n];t._expandedItems[n].visible=!e}else t._expandedItems.push({key:e,visible:!0});t.updateItems({changeType:"update",rowIndices:t._getRowIndicesForExpand(e)}),i=(new s.Deferred).resolve()}return i}_processDataItemHack(){return super._processDataItem.apply(this,arguments)}_processDataItem(e,t){const i=super._processDataItem.apply(this,arguments);return i.isExpanded=this.isRowExpanded(i.key),void 0===t.detailColumnIndex&&(t.detailColumnIndex=-1,(0,r.each)(t.visibleColumns,((e,i)=>{if("expand"===i.command&&!(0,d.isDefined)(i.groupIndex))return t.detailColumnIndex=e,!1}))),t.detailColumnIndex>=0&&(i.values[t.detailColumnIndex]=i.isExpanded),i}_processItemsHack(){return super._processItems.apply(this,arguments)}_processItems(e,t){const i=this,{changeType:n}=t,o=[];return e=super._processItems.apply(i,arguments),"loadingAll"===n?e:("refresh"===n&&(i._expandedItems=(0,a.grep)(i._expandedItems,(e=>e.visible))),(0,r.each)(e,((e,t)=>{o.push(t);const n=u.default.getIndexByKey(t.key,i._expandedItems);"data"===t.rowType&&(t.isExpanded||n>=0)&&!t.isNewRow&&o.push({visible:t.isExpanded,rowType:"detail",key:t.key,data:t.data,values:[]})})),o)}optionChanged(e){const t=this;let i,n;if("masterDetail"===e.name){switch(e.name="dataSource",e.fullName){case"masterDetail":{const t=e.value||{},o=e.previousValue||{};i=t.enabled!==o.enabled,n=t.autoExpandAll!==o.autoExpandAll;break}case"masterDetail.template":p(t);break;case"masterDetail.enabled":i=!0;break;case"masterDetail.autoExpandAll":n=!0}(i||n)&&p(t)}super.optionChanged(e)}};t.dataMasterDetailExtenderMixin=g;t.masterDetailModule={defaultOptions:()=>({masterDetail:{enabled:!1,autoExpandAll:!1,template:null}}),extenders:{controllers:{columns:e=>class extends e{_getExpandColumnsCore(){const e=super._getExpandColumnsCore();return this.option("masterDetail.enabled")&&e.push({type:"detailExpand",cellTemplate:u.default.getExpandCellTemplate()}),e}},data:g,resizing:e=>class extends e{fireContentReadyAction(){super.fireContentReadyAction.apply(this,arguments),this._updateParentDataGrids(this.component.$element())}_updateParentDataGrids(e){const t=e.closest(`.${h}`);t.length&&(0,s.when)(this._updateMasterDataGrid(t,e)).done((()=>{this._updateParentDataGrids(t.parent())}))}_updateMasterDataGrid(e,t){const i=(0,o.default)(e).data("options"),n=(0,o.default)(e).closest(`.${this.getWidgetContainerClass()}`).parent().data("dxDataGrid");if(i&&n)return this._updateMasterDataGridCore(n,i)}_updateMasterDataGridCore(e,t){var i,n;const a=(0,s.Deferred)();if(null!==(i=e.getView("rowsView"))&&void 0!==i&&null!==(n=i.isFixedColumns)&&void 0!==n&&n.call(i))this._updateFixedMasterDetailGrids(e,t.rowIndex,(0,o.default)(t.rowElement)).done(a.resolve);else{if(!0===e.option("scrolling.useNative"))return void e.updateDimensions().done((()=>a.resolve(!0)));const t=e.getScrollable();t?null==t||t.update().done((()=>a.resolve())):a.resolve()}return a.promise()}_updateFixedMasterDetailGrids(e,t,i){const n=(0,s.Deferred)(),a=(0,o.default)(e.getRowElement(t)),r=(0,o.default)(e.getView("rowsView").getTableElements()),d=2===(null==a?void 0:a.length)&&(0,l.getHeight)(a.eq(0))!==(0,l.getHeight)(a.eq(1)),u=2===(null==r?void 0:r.length)&&(0,l.getHeight)(r.eq(0))!==(0,l.getHeight)(r.eq(1));if(d||u){const t=(0,l.getWidth)(i);return e.updateDimensions().done((()=>{const o=this.option("columnAutoWidth")&&!0===e.option("scrolling.useNative"),a=o&&t!==(0,l.getWidth)(i);o&&a?this.updateDimensions().done((()=>n.resolve(!0))):n.resolve(!0)})),n.promise()}return(0,s.Deferred)().resolve()}_toggleBestFitMode(e){if(super._toggleBestFitMode.apply(this,arguments),this.option("masterDetail.template")){const t=this._rowsView.getTableElement();t&&t.find(".dx-master-detail-cell").css("maxWidth",e?0:"")}}}},views:{rowsView:e=>class extends e{_getCellTemplate(e){const t=this,{column:i}=e,n=this._editingController,o=n&&n.isEditRow(e.rowIndex);let a;return a="detail"!==i.command||o?super._getCellTemplate.apply(t,arguments):t.option("masterDetail.template")||{allowRenderToDetachedContainer:!1,render:t._getDefaultTemplate(i)},a}_isDetailRow(e){return e&&e.rowType&&0===e.rowType.indexOf("detail")}_createRow(e){const t=super._createRow.apply(this,arguments);return e&&this._isDetailRow(e)&&(this.option("showRowLines")&&t.addClass("dx-row-lines"),t.addClass(h),(0,d.isDefined)(e.visible)&&t.toggle(e.visible)),t}_renderCells(e,t){const{row:i}=t;i.rowType&&this._isDetailRow(i)?this._needRenderCell(0,t.columnIndices)&&this._renderMasterDetailCell(e,i,t):super._renderCells.apply(this,arguments)}_renderMasterDetailCell(e,t,i){const o=this._columnsController.getVisibleColumns(),a=this._renderCell(e,{value:null,row:t,rowIndex:t.rowIndex,column:{command:"detail"},columnIndex:0,change:i.change});a.addClass("dx-cell-focus-disabled").addClass("dx-master-detail-cell").attr("colSpan",o.length);return t.isEditing||a.attr("aria-roledescription",n.default.format("dxDataGrid-masterDetail")),a}}}}}},66040:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.pagerModule=t.PagerView=void 0;var n=l(i(4671)),o=i(11528),a=i(3104),s=l(i(76988)),r=l(i(74854));function l(e){return e&&e.__esModule?e:{default:e}}const d=function(e){return 1+(parseInt(e.pageIndex())||0)};class u extends r.default.View{init(){const e=this.getController("data");e.changed.add((t=>{if(t&&t.repaintChangesOnly){const t=this._pager;t?t.option({pageIndex:d(e),pageSize:e.pageSize(),pageCount:e.pageCount(),itemCount:e.totalCount(),hasKnownLastPage:e.hasKnownLastPage()}):this.render()}else(!t||"update"!==t.changeType&&"updateSelection"!==t.changeType&&"updateFocusedRow"!==t.changeType)&&(this._pager=null,this.render())}))}dispose(){this._pager=null}optionChanged(e){const{name:t}=e,i="pager"===t,n="paging"===t,o="dataSource"===t,s="scrolling"===t,r=this.getController("data");if(i||n||s||o){if(e.handled=!0,r.skipProcessingPagingChange(e.fullName))return;(i||n)&&(this._pageSizes=null),o||(this._pager=null,this._invalidate(),(0,a.hasWindow)()&&i&&this.component&&this.component.resize())}}_renderCore(){const e=this,t=e.element().addClass(e.addWidgetPrefix("pager")),i=e.option("pager")??{},n=e.getController("data"),r=e.getController("keyboardNavigation"),l={maxPagesCount:10,pageIndex:d(n),pageCount:n.pageCount(),pageSize:n.pageSize(),showPageSizeSelector:i.showPageSizeSelector,showInfo:i.showInfo,displayMode:i.displayMode,pagesNavigatorVisible:i.visible,showNavigationButtons:i.showNavigationButtons,label:i.label,allowedPageSizes:e.getPageSizes(),itemCount:n.totalCount(),hasKnownLastPage:n.hasKnownLastPage(),rtlEnabled:e.option("rtlEnabled"),isGridCompatibilityMode:!0,_skipValidation:!0,pageIndexChanged(e){n.pageIndex()!==e-1&&n.pageIndex(e-1)},pageSizeChanged(e){n.pageSize(e)},onKeyDown:e=>r&&r.executeAction("onKeyDown",e)};(0,o.isDefined)(i.infoText)&&(l.infoText=i.infoText),this._pager?this._pager.repaint():(0,a.hasWindow)()?this._pager=e._createComponent(t,s.default,l):t.addClass("dx-pager").html('<div class="dx-pages"><div class="dx-page"></div></div>')}getPager(){return this._pager}getPageSizes(){const e=this,t=e.getController("data"),i=e.option("pager"),n=i&&i.allowedPageSizes,a=t.pageSize();return(0,o.isDefined)(e._pageSizes)&&e._pageSizes.includes(a)||(e._pageSizes=[],i&&(Array.isArray(n)?e._pageSizes=n:n&&a>1&&(e._pageSizes=[Math.floor(a/2),a,2*a]))),e._pageSizes}isVisible(){const e=this.getController("data"),t=this.option("pager");let i=t&&t.visible;const n=this.option("scrolling");return"auto"===i&&(i=(!n||"virtual"!==n.mode&&"infinite"!==n.mode)&&(e.pageCount()>1||e.isLoaded()&&!e.hasKnownLastPage())),!!i}getHeight(){return this.getElementHeight()}}t.PagerView=u;t.pagerModule={defaultOptions:()=>({pager:{visible:"auto",showPageSizeSelector:!1,allowedPageSizes:"auto",label:n.default.format("dxPager-ariaLabel")}}),views:{pagerView:u}}},88199:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CLASSES=t.ATTRIBUTES=void 0;t.ATTRIBUTES={dragCell:"dx-drag-cell"},t.CLASSES={cellFocusDisabled:"dx-cell-focus-disabled",handleIcon:"drag-icon",commandDrag:"dx-command-drag",sortableWithoutHandle:"dx-sortable-without-handle",rowsView:"rowsview",dragView:"dragview"}},84700:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GridCoreRowDraggingDom=void 0;var n=s(i(64553)),o=s(i(53226)),a=i(88199);function s(e){return e&&e.__esModule?e:{default:e}}t.GridCoreRowDraggingDom={createHandleTemplateFunc:e=>(t,i)=>{const s=(0,n.default)(t);if("data"===i.rowType)return s.addClass(a.CLASSES.cellFocusDisabled),(0,n.default)("<span>").addClass(e(a.CLASSES.handleIcon));o.default.setEmptyText(s)}}},52714:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.rowDraggingModule=void 0;var n=h(i(64553)),o=i(52576),a=i(17781),s=i(57653),r=i(11528),l=h(i(95305)),d=h(i(53226)),u=i(88199),c=i(84700);function h(e){return e&&e.__esModule?e:{default:e}}t.rowDraggingModule={defaultOptions:()=>({rowDragging:{showDragIcons:!0,dropFeedbackMode:"indicate",allowReordering:!1,allowDropInsideItem:!1}}),extenders:{views:{rowsView:e=>class extends e{init(){super.init.apply(this,arguments),this._updateHandleColumn()}optionChanged(e){"rowDragging"===e.name&&(this._updateHandleColumn(),this._invalidate(!0,!0),e.handled=!0),super.optionChanged.apply(this,arguments)}_allowReordering(){const e=this.option("rowDragging");return!(!e||!(e.allowReordering||e.allowDropInsideItem||e.group))}_updateHandleColumn(){const e=this.option("rowDragging"),t=this._allowReordering(),i=this._columnsController,n=t&&e.showDragIcons;null==i||i.addCommandColumn({type:"drag",command:"drag",visibleIndex:-2,alignment:"center",elementAttr:[{name:u.ATTRIBUTES.dragCell,value:""}],cssClass:u.CLASSES.commandDrag,width:"auto",cellTemplate:this._getHandleTemplate(),visible:n}),null==i||i.columnOption("type:drag","visible",n)}_renderContent(){const e=this.option("rowDragging"),t=this._allowReordering(),i=super._renderContent.apply(this,arguments),a=this._isFixedTableRendering,s="_sortable",r="_sortableFixed",d=a?r:s,c=a?s:r,h=e=>{var t;null===(t=this[r])||void 0===t||t.$element().css("pointerEvents",e?"auto":"")},p=".dx-row:not(.dx-freespace-row):not(.dx-virtual-row):not(.dx-header-row):not(.dx-footer-row)",g=this.option("dataRowTemplate")?`> table > tbody${p}`:`> table > tbody > ${p}`;return(t||this[d])&&i.length&&(this[d]=this._createComponent(i,l.default,(0,o.extend)({component:this.component,contentTemplate:null,filter:g,cursorOffset:e=>{const{event:t}=e,i=(0,n.default)(this.element()).offset();return{x:t.pageX-i.left}},onDraggableElementShown:t=>{if(e.dragTemplate)return;const i=(0,n.default)(t.dragElement).children(".dx-widget").data(this.component.NAME);this._synchronizeScrollLeftPosition(i)},dragTemplate:this._getDraggableRowTemplate(),handle:e.showDragIcons&&`.${u.CLASSES.commandDrag}`,dropFeedbackMode:"indicate"},e,{onDragStart:i=>{var n,o;null===(n=this.getController("keyboardNavigation"))||void 0===n||n._resetFocusedCell();const a=i.component.getVisibleRows()[i.fromIndex];i.itemData=a&&a.data;const s=a&&"data"===a.rowType;i.cancel=!t||!s,null===(o=e.onDragStart)||void 0===o||o.call(e,i)},onDragEnter:e=>{e.fromComponent!==e.toComponent&&h(!0)},onDragLeave:()=>{h(!1)},onDragEnd:t=>{var i;h(!1),null===(i=e.onDragEnd)||void 0===i||i.call(e,t)},onAdd:t=>{var i;h(!1),null===(i=e.onAdd)||void 0===i||i.call(e,t)},dropFeedbackMode:e.dropFeedbackMode,onOptionChanged:e=>{this[r]&&("fromIndex"!==e.name&&"toIndex"!==e.name||this[c].option(e.name,e.value))}})),i.toggleClass("dx-scrollable-container",a),i.toggleClass(u.CLASSES.sortableWithoutHandle,t&&!e.showDragIcons)),i}_renderCore(e){super._renderCore.apply(this,arguments),e&&"update"===e.changeType&&e.repaintChangesOnly&&d.default.isVirtualRowRendering(this)&&(0,a.deferUpdate)((()=>{this._updateSortable()}))}_updateSortable(){const e=this._dataController.getRowIndexOffset(),t=e-this._previousOffset;[this._sortable,this._sortableFixed].forEach((i=>{const n=null==i?void 0:i.option("toIndex");(0,r.isDefined)(n)&&(0,r.isDefined)(this._previousOffset)&&(null==i||i.option("toIndex",n-t)),null==i||i.option("offset",e),null==i||i.update()})),this._previousOffset=e}_resizeCore(){super._resizeCore.apply(this,arguments),this._updateSortable()}_getDraggableGridOptions(e){const t=this.option(),i=this.getColumns(),o=(0,n.default)(this.getRowElement(e.rowIndex));return{dataSource:[{id:1,parentId:0}],showBorders:!0,showColumnHeaders:!1,scrolling:{useNative:!1,showScrollbar:"never"},pager:{visible:!1},loadingTimeout:null,columnFixing:t.columnFixing,columnAutoWidth:t.columnAutoWidth,showColumnLines:t.showColumnLines,columns:i.map((e=>({width:e.width||e.visibleWidth,fixed:e.fixed,fixedPosition:e.fixedPosition}))),onRowPrepared:e=>{const t=e.component.getView("rowsView");(0,n.default)(e.rowElement).replaceWith(o.eq(t._isFixedTableRendering?1:0).clone())}}}_synchronizeScrollLeftPosition(e){const t=null==e?void 0:e.getScrollable();null==t||t.scrollTo({x:this._scrollLeft})}_getDraggableRowTemplate(){return e=>{const t=this.component.$element(),i=(0,n.default)("<div>");(0,s.setWidth)(i,(0,s.getWidth)(t));const o=this._dataController.items(),a=o&&o[e.fromIndex],r=this._getDraggableGridOptions(a);return this._createComponent(i,this.component.NAME,r),i.find(".dx-gridbase-container").children(`:not(.${this.addWidgetPrefix(u.CLASSES.rowsView)})`).hide(),i.addClass(this.addWidgetPrefix(u.CLASSES.dragView)),i}}_getHandleTemplate(){return c.GridCoreRowDraggingDom.createHandleTemplateFunc((e=>this.addWidgetPrefix(e)))}}}}}},7370:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.searchModule=void 0;var n=d(i(4671)),o=d(i(30771)),a=d(i(64960)),s=d(i(64553)),r=i(31e3),l=d(i(53226));function d(e){return e&&e.__esModule?e:{default:e}}const u="search-panel",c="search-text";function h(e){return!!(e.allowSearch??e.allowFiltering)}function p(e,t){const{lookup:i}=e;return e.parseValue?i?e.parseValue.call(i,t):e.parseValue(t):t}t.searchModule={defaultOptions:()=>({searchPanel:{visible:!1,width:160,placeholder:n.default.format("dxDataGrid-searchPanelPlaceholder"),highlightSearchText:!0,highlightCaseSensitive:!1,text:"",searchVisibleColumnsOnly:!1}}),extenders:{controllers:{data:e=>class extends e{optionChanged(e){switch(e.fullName){case"searchPanel.text":case"searchPanel":this._applyFilter(),e.handled=!0;break;default:super.optionChanged(e)}}publicMethods(){return super.publicMethods().concat(["searchByText"])}_calculateAdditionalFilter(){const e=super._calculateAdditionalFilter(),t=this.calculateSearchFilter(this.option("searchPanel.text"));return l.default.combineFilters([e,t])}searchByText(e){this.option("searchPanel.text",e)}calculateSearchFilter(e){let t,i;const n=this._columnsController.getColumns(),a=this.option("searchPanel.searchVisibleColumnsOnly");let s;const d=[];if(!e)return null;function u(e){const t=(0,r.compileGetter)(s.valueExpr);for(let n=0;n<e.length;n++){const o=t(e[n]);d.push(i.createFilterExpression(o,null,"search"))}}for(t=0;t<n.length;t++)if(i=n[t],(!a||i.visible)&&h(i)&&i.calculateFilterExpression){s=i.lookup;const t=p(i,e);s&&s.items?(0,o.default)(s.items).filter(i.createFilterExpression.call({dataField:s.displayExpr,dataType:s.dataType,calculateFilterExpression:i.calculateFilterExpression},t,null,"search")).enumerate().done(u):void 0!==t&&d.push(i.createFilterExpression(t,null,"search"))}return 0===d.length?["!"]:l.default.combineFilters(d,"or")}}},views:{headerPanel:e=>class extends e{optionChanged(e){if("searchPanel"===e.name){if("searchPanel.text"===e.fullName){const t=this.getSearchTextEditor();t&&t.option("value",e.value)}else this._invalidate();e.handled=!0}else super.optionChanged(e)}_getToolbarItems(){const e=super._getToolbarItems();return this._prepareSearchItem(e)}_prepareSearchItem(e){const t=this,i=this._dataController,o=this.option("searchPanel");if(o&&o.visible){const a={template(e,a,r){const l=(0,s.default)("<div>").addClass(t.addWidgetPrefix(u)).appendTo(r);t._editorFactoryController.createEditor(l,{width:o.width,placeholder:o.placeholder,parentType:"searchPanel",value:t.option("searchPanel.text"),updateValueTimeout:700,setValue(e){i.searchByText(e)},editorOptions:{inputAttr:{"aria-label":n.default.format(`${t.component.NAME}-ariaSearchInGrid`)}}}),t.resize()},name:"searchPanel",location:"after",locateInMenu:"never",sortIndex:40};e.push(a)}return e}getSearchTextEditor(){const e=this,t=e.element(),i=t.find(`.${e.addWidgetPrefix(u)}`).filter((function(){return(0,s.default)(this).closest(`.${e.addWidgetPrefix("header-panel")}`).is(t)}));return i.length?i.dxTextBox("instance"):null}isVisible(){const e=this.option("searchPanel");return super.isVisible()||!(null==e||!e.visible)}},rowsView:e=>class extends e{init(){super.init.apply(this,arguments),this._searchParams=[],this._dataController=this.getController("data")}dispose(){clearTimeout(this._highlightTimer),super.dispose()}_getFormattedSearchText(e,t){const i=p(e,t),n=l.default.getFormatOptionsByColumn(e,"search");return l.default.formatValue(i,n)}_getStringNormalizer(){var e,t,i;const n=this.option("searchPanel.highlightCaseSensitive"),o=null===(e=this._dataController)||void 0===e||null===(t=e.getDataSource)||void 0===t?void 0:t.call(e),a=null==o||null===(i=o.loadOptions)||void 0===i||null===(i=i.call(o))||void 0===i?void 0:i.langParams;return e=>(0,r.toComparable)(e,n,a)}_findHighlightingTextNodes(e,t,i){var n;const o=this;let a,r=t.parent();const l=this._getStringNormalizer(),d=l(i),u=[];if(r.length){if(e)if(e.groupIndex>=0&&!e.showWhenGrouped)a=t;else{const t=o._columnsController.getVisibleIndex(e.index);a=r.children("td").eq(t).find("*")}}else r=(0,s.default)("<div>").append(t);return a=null!==(n=a)&&void 0!==n&&n.length?a:r.find("*"),a.each(((e,t)=>{const i=(0,s.default)(t).contents();for(let e=0;e<i.length;e++){const t=i.get(e);if(3===t.nodeType){l(t.textContent??t.nodeValue??"").includes(d)&&u.push(t)}}})),u}_highlightSearchTextCore(e,t){const i=this,n=(0,s.default)("<span>").addClass(i.addWidgetPrefix(c)),o=e.text(),r=e[0],l=this._getStringNormalizer(),d=l(o).indexOf(l(t));if(d>=0)return r.textContent?r.textContent=o.substr(0,d):r.nodeValue=o.substr(0,d),e.after(n.text(o.substr(d,t.length))),e=(0,s.default)(a.default.createTextNode(o.substr(d+t.length))).insertAfter(n),i._highlightSearchTextCore(e,t)}_highlightSearchText(e,t,i){const n=this,o=this._getStringNormalizer();let a=n.option("searchPanel.text");if(t&&i&&(a=a&&n._getFormattedSearchText(i,a)),a&&n.option("searchPanel.highlightSearchText")){n._findHighlightingTextNodes(i,e,a).forEach((e=>{t?o((0,s.default)(e).text())===o(a??"")&&(0,s.default)(e).replaceWith((0,s.default)("<span>").addClass(n.addWidgetPrefix(c)).text((0,s.default)(e).text())):n._highlightSearchTextCore((0,s.default)(e),a)}))}}_renderCore(){const e=super._renderCore.apply(this,arguments);return(this.option().rowTemplate||this.option("dataRowTemplate"))&&(this.option("templatesRenderAsynchronously")?(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((()=>{this._highlightSearchText(this.getTableElement())}))):this._highlightSearchText(this.getTableElement())),e}_updateCell(e,t){const{column:i}=t,n="string"!==(i.lookup&&i.lookup.dataType||i.dataType);h(i)&&!t.isOnForm&&(this.option("templatesRenderAsynchronously")?(this._searchParams.length||(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((()=>{this._searchParams.forEach((e=>{this._highlightSearchText.apply(this,e)})),this._searchParams=[]}))),this._searchParams.push([e,n,i])):this._highlightSearchText(e,n,i)),super._updateCell(e,t)}}}}}},1620:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.selectionModule=t.rowsViewSelectionExtenderMixin=t.dataSelectionExtenderMixin=t.columnHeadersSelectionExtenderMixin=t.SelectionController=void 0;var n=i(64044),o=y(i(92774)),a=y(i(68095)),s=i(98834),r=y(i(4671)),l=i(43792),d=y(i(64553)),u=i(17781),c=i(87739),h=i(52576),p=i(21274),g=i(11528),_=y(i(35185)),f=y(i(85991)),m=y(i(53544)),v=y(i(74854)),C=y(i(53226));function y(e){return e&&e.__esModule?e:{default:e}}const b="dx-editor-cell",x="dx-selection",w="dx-select-checkbox",S="dx-command-select",D="dx-data-row",I="selection.showCheckBoxesMode",E="selection.mode",T=function(e,t){const i=e.getView("rowsView"),n=e.getController("selection"),o=(0,d.default)(t.target).closest(`.${D}`),a=i.getRowIndex(o);a<0||("onLongTap"===e.option(I)?n.isSelectionWithCheckboxes()?n.stopSelectionWithCheckboxes():n.startSelectionWithCheckboxes():("onClick"===e.option(I)&&n.startSelectionWithCheckboxes(),"always"!==e.option(I)&&n.changeItemSelection(a,{control:!0})))},A=(e,t)=>{const{component:i}=t,n=i.getView("rowsView");i.option("renderAsync")&&!i.option("selection.deferred")&&(t.value=i.isRowSelected(t.row.key)),n.renderSelectCheckBoxContainer((0,d.default)(e),t)},O=(e,t)=>{const{column:i}=t,n=(0,d.default)(e),o=t.component.getView("columnHeadersView");n.addClass(b),o._renderSelectAllCheckBox(n,i),o._attachSelectAllCheckBoxClickEvent(n)};class P extends v.default.Controller{init(){const{deferred:e,selectAllMode:t,mode:i}=this.option("selection")??{};"infinite"!==this.option("scrolling.mode")||e||"multiple"!==i||"allPages"!==t||_.default.log("W1018"),this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._stateStoringController=this.getController("stateStoring"),this._selectionMode=i,this._isSelectionWithCheckboxes=!1,this._selection=this._createSelection(),this._updateSelectColumn(),this.createAction("onSelectionChanged",{excludeValidators:["disabled","readOnly"]}),this._dataPushedHandler||(this._dataPushedHandler=this._handleDataPushed.bind(this),this._dataController.pushed.add(this._dataPushedHandler))}_handleDataPushed(e){this._deselectRemovedOnPush(e),this._updateSelectedOnPush(e)}_deselectRemovedOnPush(e){const t=this.option("selection.deferred");let i=e.filter((e=>"remove"===e.type)).map((e=>e.key));if(t){const e=this._dataController.items().filter((e=>e.isSelected)).map((e=>e.key));i=i.filter((t=>e.find((e=>(0,u.equalByValue)(e,t)))))}i.length&&this.deselectRows(i)}_updateSelectedOnPush(e){if(this.option("selection.deferred"))return;const t=e.filter((e=>"update"===e.type)),i=this.getSelectedRowsData();(0,l.applyBatch)({keyInfo:this._selection.options,data:i,changes:t})}_getSelectionConfig(){const e=this._dataController,t=this._columnsController,i=this.option("selection")??{},{deferred:n}=i,o=this.option("scrolling.mode"),a="virtual"===o||"infinite"===o,s=this.option("selection.allowSelectAll"),r=this.option("scrolling.legacyMode");return{selectedKeys:this.option("selectedRowKeys"),mode:this._selectionMode,deferred:n,alwaysSelectByShift:i.alwaysSelectByShift,maxFilterLengthInRequest:i.maxFilterLengthInRequest,selectionFilter:this.option("selectionFilter"),ignoreDisabledItems:!0,isVirtualPaging:a,sensitivity:this.option("selection.sensitivity"),allowLoadByRange(){const e=t.getGroupColumns().length>0;return a&&!r&&!e&&s&&!n},key:()=>null==e?void 0:e.key(),keyOf:t=>null==e?void 0:e.keyOf(t),dataFields(){var t;return null===(t=e.dataSource())||void 0===t?void 0:t.select()},load(t){var i;return(null===(i=e.dataSource())||void 0===i?void 0:i.load(t))||(new c.Deferred).resolve([])},plainItems:t=>e.items(!0),isItemSelected:e=>e.selected,isSelectableItem:e=>"data"===(null==e?void 0:e.rowType)&&!e.isNewRow,getItemData:e=>(0,g.isDefined)(null==e?void 0:e.rowType)?(null==e?void 0:e.oldData)||(null==e?void 0:e.data):e,filter:()=>e.getCombinedFilter(n),totalCount:()=>e.totalCount(),getLoadOptions(t,i,n){var o;const{sort:a,filter:s}=(null===(o=e.dataSource())||void 0===o?void 0:o.lastLoadOptions())??{};let r=Math.min(t,i),l=Math.max(t,i);(0,g.isDefined)(n)&&(r=Math.min(n,r),l=Math.max(n,l));return{skip:r,take:l-r+1,filter:s,sort:a}},onSelectionChanged:this._updateSelectedItems.bind(this)}}_updateSelectColumn(){const e=this._columnsController,t=this.isSelectColumnVisible();e.addCommandColumn({type:"selection",command:"select",visible:t,visibleIndex:-1,dataType:"boolean",alignment:"center",cssClass:S,width:"auto",cellTemplate:A,headerCellTemplate:O}),e.columnOption("command:select","visible",t)}_createSelection(){const e=this._getSelectionConfig();return new m.default(e)}_fireSelectionChanged(e){const t=this.option("selection.deferred")?{selectionFilter:this.option("selectionFilter")}:{selectedRowKeys:this.option("selectedRowKeys")};this.selectionChanged.fire(t),e&&this.executeAction("onSelectionChanged",e)}_updateCheckboxesState(e){const{isDeferredMode:t}=e,{selectionFilter:i}=e,{selectedItemKeys:n}=e,{removedItemKeys:o}=e;"onClick"===this.option(I)&&((t?i&&function(e,t){let i=0;const n=e._dataController.store(),o=n&&n.key(),a=Array.isArray(o);if(!t.length)return!1;if(a&&Array.isArray(t[0])&&"and"===t[1]){for(let e=0;e<t.length;e++)if(Array.isArray(t[e])){if(t[e][0]!==o[i]||"="!==t[e][1])return!0;i++}return!1}return o!==t[0]}(this,i):n.length>1)?this.startSelectionWithCheckboxes():(t?i&&!i.length:0===n.length&&o.length)&&this.stopSelectionWithCheckboxes())}_updateSelectedItems(e){const t=this;let i;const n=t.option("selection.deferred"),o=t._selection.selectionFilter(),a=t._dataController,s=a.items(!0),r=a.items();if(!s)return;const l=t.isSelectionWithCheckboxes(),d=t.getChangedItemIndexes(s),u=t.getChangedItemIndexes(r);t._updateCheckboxesState({selectedItemKeys:e.selectedItemKeys,removedItemKeys:e.removedItemKeys,selectionFilter:o,isDeferredMode:n}),(d.length||l!==t.isSelectionWithCheckboxes())&&a.updateItems({changeType:"updateSelection",itemIndexes:u}),n?(t.option("selectionFilter",o),i={}):(e.addedItemKeys.length||e.removedItemKeys.length)&&(t._selectedItemsInternalChange=!0,t.option("selectedRowKeys",e.selectedItemKeys.slice(0)),t._selectedItemsInternalChange=!1,i={selectedRowsData:e.selectedItems.slice(0),selectedRowKeys:e.selectedItemKeys.slice(0),currentSelectedRowKeys:e.addedItemKeys.slice(0),currentDeselectedRowKeys:e.removedItemKeys.slice(0)}),t._fireSelectionChanged(i)}getChangedItemIndexes(e){const t=this,i=[],n=this.option("selection.deferred");for(let o=0,{length:a}=e;o<a;o++){const a=e[o],s=t.isRowSelected(n?a.data:a.key);t._selection.isDataItem(a)&&a.isSelected!==s&&i.push(o)}return i}callbackNames(){return["selectionChanged"]}optionChanged(e){var t;super.optionChanged(e);const i=!(null===(t=this._selection)||void 0===t||!t.options);switch(e.name){case"selection":{const t=this._selectionMode;if(this.init(),i&&"selection.sensitivity"===e.fullName&&(this._selection.options.sensitivity=e.value),"selection.showCheckBoxesMode"!==e.fullName){const e=this._selectionMode;let i=this.option("selectedRowKeys");t!==e&&("single"===e?i.length>1&&(i=[i[0]]):"multiple"!==e&&(i=[])),this.selectRows(i).always((()=>{this._fireSelectionChanged()}))}this._columnsController.updateColumns(),e.handled=!0;break}case"selectionFilter":this._selection.selectionFilter(e.value),e.handled=!0;break;case"selectedRowKeys":{const t=e.value||[];!Array.isArray(t)||this._selectedItemsInternalChange||!this.component.getDataSource()&&t.length||this.selectRows(t),e.handled=!0;break}}}publicMethods(){return["selectRows","deselectRows","selectRowsByIndexes","getSelectedRowKeys","getSelectedRowsData","clearSelection","selectAll","deselectAll","startSelectionWithCheckboxes","stopSelectionWithCheckboxes","isRowSelected"]}isRowSelected(e){return this._selection.isItemSelected(e)}isSelectColumnVisible(){return"multiple"===this.option(E)&&("always"===this.option(I)||"onClick"===this.option(I)||this._isSelectionWithCheckboxes)}_isOnePageSelectAll(){return"page"===this.option("selection.selectAllMode")}isSelectAll(){return this._selection.getSelectAllState(this._isOnePageSelectAll())}selectAll(){return"onClick"===this.option(I)&&this.startSelectionWithCheckboxes(),this._selection.selectAll(this._isOnePageSelectAll())}deselectAll(){return this._selection.deselectAll(this._isOnePageSelectAll())}clearSelection(){return this.selectedItemKeys([])}refresh(){const e=this.option("selectedRowKeys")??[];return!this.option("selection.deferred")&&e.length?this.selectedItemKeys(e):(new c.Deferred).resolve().promise()}selectedItemKeys(e,t,i,n){return this._selection.selectedItemKeys(e,t,i,n)}getSelectedRowKeys(e){return this._selection.getSelectedItemKeys()}selectRows(e,t){return this.selectedItemKeys(e,t)}deselectRows(e){return this.selectedItemKeys(e,!0,!0)}selectRowsByIndexes(e){const t=this._dataController.items(),i=[];return Array.isArray(e)||(e=Array.prototype.slice.call(arguments,0)),(0,p.each)(e,(function(){const e=t[this];e&&"data"===e.rowType&&i.push(e.key)})),this.selectRows(i)}getSelectedRowsData(e){return this._selection.getSelectedItems()}loadSelectedItemsWithFilter(){return this._selection.loadSelectedItemsWithFilter()}changeItemSelection(e,t,i){t=t||{},this.isSelectionWithCheckboxes()&&(t.control=!0);const n=e+this._dataController.getRowIndexOffset()-this._dataController.getRowIndexOffset(!0);return this._selection.changeItemSelection(n,t,i)}focusedItemIndex(e){const t=this;if(!(0,g.isDefined)(e))return t._selection._focusedItemIndex;t._selection._focusedItemIndex=e}isSelectionWithCheckboxes(){return"multiple"===this.option(E)&&("always"===this.option(I)||this._isSelectionWithCheckboxes)}startSelectionWithCheckboxes(){const e=this;return"multiple"===e.option(E)&&!e.isSelectionWithCheckboxes()&&(e._isSelectionWithCheckboxes=!0,e._updateSelectColumn(),!0)}stopSelectionWithCheckboxes(){const e=this;return!!e._isSelectionWithCheckboxes&&(e._isSelectionWithCheckboxes=!1,e._updateSelectColumn(),!0)}}t.SelectionController=P;const k=e=>class extends e{init(){const e=this.option("selection.deferred");super.init.apply(this,arguments),e&&this._selectionController._updateCheckboxesState({isDeferredMode:!0,selectionFilter:this.option("selectionFilter")})}_loadDataSource(){const e=this;return super._loadDataSource().always((()=>{e._selectionController.refresh()}))}_processDataItem(e,t){const i=this._selectionController.isSelectColumnVisible(),n=t.isDeferredSelection=void 0===t.isDeferredSelection?this.option("selection.deferred"):t.isDeferredSelection,o=super._processDataItem.apply(this,arguments);if(o.isSelected=this._selectionController.isRowSelected(n?o.data:o.key),i&&o.values)for(let e=0;e<t.visibleColumns.length;e++)if("select"===t.visibleColumns[e].command){o.values[e]=o.isSelected;break}return o}refresh(e){const t=this,i=new c.Deferred;return super.refresh.apply(this,arguments).done((()=>{!e||e.selection?t._selectionController.refresh().done(i.resolve).fail(i.reject):i.resolve()})).fail(i.reject),i.promise()}_handleDataChanged(e){const t=this.hasLoadOperation();super._handleDataChanged.apply(this,arguments),t&&!this._repaintChangesOnly&&this._selectionController.focusedItemIndex(-1)}_applyChange(e){if(!e||"updateSelection"!==e.changeType)return super._applyChange.apply(this,arguments);e.items.forEach(((e,t)=>{const i=this._items[t];i&&(i.isSelected=e.isSelected,i.values=e.values)}))}_endUpdateCore(){const e=this._changes;if(e.length>1&&e.every((e=>"updateSelection"===e.changeType))){const t=e.map((e=>e.itemIndexes||[])).reduce(((e,t)=>e.concat(t)));this._changes=[{changeType:"updateSelection",itemIndexes:t}]}super._endUpdateCore.apply(this,arguments)}};t.dataSelectionExtenderMixin=k;const M=e=>class extends e{init(){super.init(),this._selectionController.selectionChanged.add(this._updateSelectAllValue.bind(this))}_updateSelectAllValue(){const e=this,t=e.element(),i=t&&t.find(`.${w}`);if(t&&i.length&&"multiple"===e.option("selection.mode")){const t=e._selectionController.isSelectAll(),n=!1!==t,o=e.option("selection.allowSelectAll")?!e._dataController.isEmpty():n;i.dxCheckBox("instance").option({visible:o,value:t})}}_handleDataChanged(e){super._handleDataChanged(e),(!e||"refresh"===e.changeType||e.repaintChangesOnly&&"update"===e.changeType)&&this.waitAsyncTemplates().done((()=>{this._updateSelectAllValue()}))}_renderSelectAllCheckBox(e,t){const i=this,n=i._dataController.isEmpty(),o=(0,d.default)("<div>").appendTo(e).addClass(w);return i.setAria("label",r.default.format("dxDataGrid-ariaSelectAll"),o),i._editorFactoryController.createEditor(o,(0,h.extend)({},t,{parentType:"headerRow",dataType:"boolean",value:this._selectionController.isSelectAll(),editorOptions:{visible:!n&&(i.option("selection.allowSelectAll")||!1!==this._selectionController.isSelectAll())},tabIndex:i.option("useLegacyKeyboardNavigation")?-1:i.option("tabIndex")||0,setValue:(e,t)=>{const n=i.option("selection.allowSelectAll");t.component.option("visible",n||!1!==t.component.option("value")),t.event&&this._selectionController.isSelectAll()!==e&&(t.value&&!n?t.component.option("value",!1):t.value?this._selectionController.selectAll():this._selectionController.deselectAll(),t.event.preventDefault())}})),o}_attachSelectAllCheckBoxClickEvent(e){o.default.on(e,n.name,this.createAction((e=>{const{event:t}=e;(0,d.default)(t.target).closest(`.${w}`).length||o.default.trigger((0,d.default)(t.currentTarget).children(`.${w}`),n.name),t.preventDefault()})))}};t.columnHeadersSelectionExtenderMixin=M;const R=e=>class extends e{renderSelectCheckBoxContainer(e,t){"data"!==t.rowType||t.row.isNewRow?C.default.setEmptyText(e):(e.addClass(b),this._attachCheckBoxClickEvent(e),this._renderSelectCheckBox(e,t))}_renderSelectCheckBox(e,t){const i=(0,d.default)("<div>").addClass(w).appendTo(e);return this.setAria("label",r.default.format("dxDataGrid-ariaSelectRow"),i),this._editorFactoryController.createEditor(i,(0,h.extend)({},t.column,{parentType:"dataRow",dataType:"boolean",lookup:null,value:t.value,setValue(e,t){var i;"keydown"===(null==t||null===(i=t.event)||void 0===i?void 0:i.type)&&o.default.trigger(t.element,n.name,t)},row:t.row})),i}_attachCheckBoxClickEvent(e){o.default.on(e,n.name,this.createAction((function(e){const{event:t}=e,i=this.getRowIndex((0,d.default)(t.currentTarget).closest(".dx-row"));i>=0&&(this._selectionController.startSelectionWithCheckboxes(),this._selectionController.changeItemSelection(i,{shift:t.shiftKey}),(0,d.default)(t.target).closest(`.${w}`).length&&this._dataController.updateItems({changeType:"updateSelection",itemIndexes:[i]}))})))}_update(e){const t=this,i=t.getTableElements();"updateSelection"===e.changeType?i.length>0&&((0,p.each)(i,((i,n)=>{(0,p.each)(e.itemIndexes||[],((i,o)=>{let a;if(e.items[o]&&(a=t._getRowElements((0,d.default)(n)).eq(o),a.length)){const{isSelected:i}=e.items[o];a.toggleClass(x,void 0!==i&&i).find(`.${w}`).dxCheckBox("option","value",i),t.setAria("selected",i,a)}}))})),t._updateCheckboxesClass()):super._update(e)}_createTable(){const e=this,t=e.option("selection.mode"),i=super._createTable.apply(e,arguments);return"none"!==t&&("onLongTap"!==e.option(I)&&f.default.touch||o.default.on(i,(0,s.addNamespace)(a.default.name,"dxDataGridRowsView"),`.${D}`,e.createAction((t=>{T(e.component,t.event),t.event.stopPropagation()}))),o.default.on(i,"mousedown selectstart",e.createAction((e=>{const{event:t}=e;t.shiftKey&&t.preventDefault()})))),i}_createRow(e){const t=super._createRow.apply(this,arguments);if(e){const{isSelected:i}=e;i&&t.addClass(x);"none"!==this.option(E)&&this.setAria("selected",i,t)}return t}_rowClickForTreeList(e){super._rowClick(e)}_rowClick(e){const t=this,i=e.event,n=(0,d.default)(i.target).closest(".dx-selection-disabled").length;t.isClickableElement((0,d.default)(i.target))||(n||"multiple"===t.option(E)&&"always"===t.option(I)||t._selectionController.changeItemSelection(e.rowIndex,{control:(0,s.isCommandKeyPressed)(i),shift:i.shiftKey})&&(i.preventDefault(),e.handled=!0),super._rowClick(e))}isClickableElement(e){return!!e.closest(`.${S}`).length}_renderCore(e){const t=super._renderCore(e);return this._updateCheckboxesClass(),t}_updateCheckboxesClass(){const e=this.getTableElements(),t=this._selectionController.isSelectColumnVisible()&&!this._selectionController.isSelectionWithCheckboxes();(0,p.each)(e,((e,i)=>{(0,d.default)(i).toggleClass("dx-select-checkboxes-hidden",t)}))}};t.rowsViewSelectionExtenderMixin=R;t.selectionModule={defaultOptions:()=>({selection:{mode:"none",showCheckBoxesMode:"onClick",allowSelectAll:!0,selectAllMode:"allPages",deferred:!1,maxFilterLengthInRequest:1500,alwaysSelectByShift:!1},selectionFilter:[],selectedRowKeys:[]}),controllers:{selection:P},extenders:{controllers:{data:k,contextMenu:e=>class extends e{_contextMenuPrepared(e){const t=e.event;t.originalEvent&&"dxhold"!==t.originalEvent.type||e.items&&e.items.length>0||T(this,t)}}},views:{columnHeadersView:M,rowsView:R}}}},8036:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.sortingModule=void 0;var n=i(64044),o=u(i(92774)),a=i(98834),s=u(i(4671)),r=u(i(64553)),l=i(11528),d=u(i(2242));function u(e){return e&&e.__esModule?e:{default:e}}t.sortingModule={defaultOptions:()=>({sorting:{mode:"single",ascendingText:s.default.format("dxDataGrid-sortingAscendingText"),descendingText:s.default.format("dxDataGrid-sortingDescendingText"),clearText:s.default.format("dxDataGrid-sortingClearText"),showSortIndexes:!0}}),extenders:{views:{columnHeadersView:e=>class extends((0,d.default)(e)){optionChanged(e){const t=this;if("sorting"===e.name)t._invalidate(),e.handled=!0;else super.optionChanged(e)}_createRow(e){const t=super._createRow(e);return"header"===e.rowType&&o.default.on(t,(0,a.addNamespace)(n.name,"dxDataGridColumnHeadersView"),"td",this.createAction((e=>{this._processHeaderAction(e.event,t)}))),t}_processHeaderAction(e,t){if((0,r.default)(e.currentTarget).parent().get(0)!==t.get(0))return;const i=this;let n=null;const o=(0,r.default)(e.currentTarget),s=o.parent().index();let d=-1;[].slice.call(i.getCellElements(s)).some(((e,t)=>{if(e===o.get(0))return d=t,!0}));const u=i._columnsController.getVisibleColumns(s)[d],c=i.getController("editing"),h=i.option("editing.mode");!(c&&c.isEditing()&&("batch"===h||"cell"===h))&&i._isSortableElement((0,r.default)(e.target))&&(!u||(0,l.isDefined)(u.groupIndex)||u.command||(e.shiftKey?n="shift":(0,a.isCommandKeyPressed)(e)&&(n="ctrl"),setTimeout((()=>{i._columnsController.changeSortOrder(u.index,n)}))))}_renderCellContent(e,t){const i=this,{column:n}=t;n.command||"header"!==t.rowType||i._applyColumnState({name:"sort",rootElement:e,column:n,showColumnLines:i.option("showColumnLines")}),super._renderCellContent.apply(this,arguments)}_columnOptionChanged(e){const{changeTypes:t}=e;1===t.length&&t.sorting?this._updateIndicators("sort"):super._columnOptionChanged(e)}},headerPanel:e=>class extends((0,d.default)(e)){optionChanged(e){const t=this;if("sorting"===e.name)t._invalidate(),e.handled=!0;else super.optionChanged(e)}_createGroupPanelItem(e,t){const i=this,s=super._createGroupPanelItem(...arguments);return o.default.on(s,(0,a.addNamespace)(n.name,"dxDataGridHeaderPanel"),i.createAction((()=>{i._processGroupItemAction(t.index)}))),i._applyColumnState({name:"sort",rootElement:s,column:{alignment:i.option("rtlEnabled")?"right":"left",allowSorting:t.allowSorting,sortOrder:"desc"===t.sortOrder?"desc":"asc",isGrouped:!0},showColumnLines:!0}),s}_processGroupItemAction(e){setTimeout((()=>this.getController("columns").changeSortOrder(e)))}}}}}},2242:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(4671)),o=s(i(64553)),a=i(11528);function s(e){return e&&e.__esModule?e:{default:e}}const r="dx-sort",l="dx-sort-none",d="dx-sort-index-icon";t.default=e=>class extends e{_applyColumnState(e){const t=this;let i,n;const s=t.option("sorting.mode"),{rootElement:l}=e,{column:u}=e,c=t._getIndicatorContainer(l);if("sort"===e.name){l.find(`.${r}`).remove(),!c.children().length&&c.remove();const h="none"!==s&&u.allowSorting,p=t.getController&&!!t.getController("columns").columnOption("sortIndex:1");return(0,a.isDefined)(u.groupIndex)||!h&&!(0,a.isDefined)(u.sortOrder)||(i="asc"===u.sortOrder?"ascending":"descending",n=super._applyColumnState(e).toggleClass("dx-sort-up","asc"===u.sortOrder).toggleClass("dx-sort-down","desc"===u.sortOrder),p&&t.option("sorting.showSortIndexes")&&u.sortIndex>=0&&((0,o.default)("<span>").addClass(d).text(u.sortIndex+1).appendTo(n),n.addClass("dx-sort-index")),h&&e.rootElement.addClass(t.addWidgetPrefix("action"))),this._setAriaSortAttribute(u,i,l,p),n}return super._applyColumnState(e)}_setAriaSortAttribute(e,t,i,o){if(i.removeAttr("aria-roledescription"),e.isGrouped){let t=this.localize("dxDataGrid-ariaNotSortedColumn");(0,a.isDefined)(e.sortOrder)&&(t="asc"===e.sortOrder?this.localize("dxDataGrid-ariaSortedAscendingColumn"):this.localize("dxDataGrid-ariaSortedDescendingColumn")),this.setAria("roledescription",t,i)}else if((0,a.isDefined)(e.sortOrder)){if(this.setAria("sort",t,i),o&&e.sortIndex>=0){const t=`${n.default.format("dxDataGrid-ariaColumnHeader")}, ${n.default.format("dxDataGrid-ariaSortIndex",e.sortIndex+1)}`;this.setAria("roledescription",t,i)}}else this.setAria("sort","none",i)}_getIndicatorClassName(e){return"sort"===e?r:"sortIndex"===e?d:super._getIndicatorClassName(e)}_renderIndicator(e){const{column:t}=e,i=e.container,n=e.indicator;if("sort"===e.name){const o=this.option("rtlEnabled");if((0,a.isDefined)(t.sortOrder)||n&&n.addClass(l),i.children().length&&(!o&&"left"===e.columnAlignment||o&&"right"===e.columnAlignment))return void i.prepend(n)}super._renderIndicator(e)}_updateIndicator(e,t,i){if("sort"!==i||!(0,a.isDefined)(t.groupIndex))return super._updateIndicator.apply(this,arguments)}_getIndicatorElements(e,t){const i=super._getIndicatorElements(e);return t?i:i&&i.not(`.${l}`)}}},87960:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.stateStoringModule=void 0;var n=i(17781),o=i(87739),a=i(52576),s=i(11528),r=i(93416);const l=e=>{const t=e.getController("columns"),i=e.getController("selection"),n=e.getController("export"),o=e.getController("data");t&&t.columnsChanged.add((()=>{e.updateState({columns:t.getUserState()})})),i&&i.selectionChanged.add((t=>{e.updateState({selectedRowKeys:t.selectedRowKeys,selectionFilter:t.selectionFilter})})),o&&(e._initialPageSize=e.option("paging.pageSize"),e._initialFilterValue=e.option("filterValue"),o.changed.add((()=>{const t=(e=>{const t=e.getView("pagerView"),i=e.getController("data"),n={allowedPageSizes:t?t.getPageSizes():void 0,filterPanel:{filterEnabled:e.option("filterPanel.filterEnabled")},filterValue:e.option("filterValue"),focusedRowKey:e.option("focusedRowEnabled")?e.option("focusedRowKey"):void 0};return(0,a.extend)(n,i.getUserState())})(e);e.updateState(t)}))),n&&n.selectionOnlyChanged.add((()=>{e.updateState({exportSelectionOnly:n.selectionOnly()})}))};t.stateStoringModule={defaultOptions:()=>({stateStoring:{enabled:!1,storageKey:null,type:"localStorage",customLoad:null,customSave:null,savingTimeout:2e3}}),controllers:{stateStoring:r.StateStoringController},extenders:{views:{rowsView:e=>class extends e{init(){super.init(),this._dataController.stateLoaded.add((()=>{if(this._dataController.isLoaded()&&!this._dataController.getDataSource()){this.setLoading(!1),this.renderNoDataText();const e=this.component.getView("columnHeadersView");e&&e.render(),this.component._fireContentReadyAction()}}))}}},controllers:{stateStoring:e=>class extends e{init(){return super.init.apply(this,arguments),l(this),this}isLoading(){return super.isLoading()||this.getDataController().isStateLoading()}state(e){const t=super.state.apply(this,arguments);return void 0!==e&&this.applyState((0,a.extend)(!0,{},e)),t}updateState(e){if(this.isEnabled()){const t=this.state(),i=(0,a.extend)({},t,e),o=(0,n.getKeyHash)(t),s=(0,n.getKeyHash)(i);(0,n.equalByValue)(o,s)||(e=(0,a.extend)(!0,{},e),(0,a.extend)(this._state,e),this.save())}else(0,a.extend)(this._state,e)}applyState(e){var t;const{allowedPageSizes:i}=e,{searchText:n}=e,{selectedRowKeys:o}=e,{selectionFilter:a}=e,r=this.option("scrolling.mode"),l="virtual"===r||"infinite"===r,d=!0===this.option("pager.visible")&&this.option("pager.showPageSizeSelector"),u=null===(t=this.getView("rowsView"))||void 0===t?void 0:t.hasHeight();this.component.beginUpdate(),this.getColumnsController()&&this.getColumnsController().setUserState(e.columns),this.getExportController()&&this.getExportController().selectionOnly(e.exportSelectionOnly),this.option("selection.deferred")||this.option("selectedRowKeys",o||[]),this.option("selectionFilter",a),i&&"auto"===this.option("pager.allowedPageSizes")&&(this.option("pager").allowedPageSizes=i),this.option("focusedRowEnabled")&&(this.option("focusedRowIndex",-1),this.option("focusedRowKey",e.focusedRowKey??null)),this.component.endUpdate(),this.option("searchPanel.text",n||""),this.option("filterValue",((e,t)=>{const i=e.getController("filterSync"),n=e.getController("columns"),o=t.columns||void 0!==t.filterValue;return i?o?t.filterValue||i.getFilterValueFromColumns(t.columns):e._initialFilterValue||i.getFilterValueFromColumns(n.getColumns()):null})(this,e)),this.option("filterPanel.filterEnabled",!e.filterPanel||e.filterPanel.filterEnabled),this.option("paging.pageIndex",(!l||u)&&e.pageIndex||0),this.option("paging.pageSize",l&&!d||!(0,s.isDefined)(e.pageSize)?this._initialPageSize:e.pageSize),this.getDataController()&&this.getDataController().reset()}},columns:e=>class extends e{_shouldReturnVisibleColumns(){return super._shouldReturnVisibleColumns.apply(this,arguments)&&(!this._stateStoringController.isEnabled()||this._stateStoringController.isLoaded())}},data:e=>class extends e{dispose(){clearTimeout(this._restoreStateTimeoutID),super.dispose()}callbackNames(){return super.callbackNames().concat(["stateLoaded"])}_refreshDataSource(){if(this._stateStoringController.isEnabled()&&!this._stateStoringController.isLoaded()){clearTimeout(this._restoreStateTimeoutID);const e=new o.Deferred;return this._restoreStateTimeoutID=setTimeout((()=>{this._stateStoringController.load().always((()=>{this._restoreStateTimeoutID=null})).done((()=>{super._refreshDataSource(),this.stateLoaded.fire(),e.resolve()})).fail((t=>{this.stateLoaded.fire(),this._handleLoadError(t||"Unknown error"),e.reject()}))})),e.promise()}this.isStateLoading()||super._refreshDataSource()}isLoading(){return super.isLoading()||this._stateStoringController.isLoading()}isStateLoading(){return(0,s.isDefined)(this._restoreStateTimeoutID)}isLoaded(){return super.isLoaded()&&!this.isStateLoading()}},selection:e=>class extends e{_fireSelectionChanged(e){const t=this.option("selection.deferred");this._stateStoringController.isLoading()&&t||super._fireSelectionChanged.apply(this,arguments)}}}}}},93416:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.StateStoringController=void 0;var n=h(i(92774)),o=i(87739),a=i(52576),s=i(21274),r=i(98479),l=i(11528),d=i(3104),u=h(i(35185)),c=h(i(74854));function h(e){return e&&e.__esModule?e:{default:e}}const p=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/,g=function(e){e&&(0,s.each)(e,((t,i)=>{if((0,l.isPlainObject)(i)||Array.isArray(i))g(i);else if("string"==typeof i){const n=p.exec(i);n&&(e[t]=new Date(Date.UTC(+n[1],+n[2]-1,+n[3],+n[4],+n[5],+n[6])))}}))},_=function(e){const t="sessionStorage"===e.type?(0,r.sessionStorage)():(0,d.getWindow)().localStorage;if(!t)throw new Error("E1007");return t},f=function(e){return(0,l.isDefined)(e.storageKey)?e.storageKey:"storage"};class m extends c.default.ViewController{getDataController(){return this.getController("data")}getExportController(){return this.getController("export")}getColumnsController(){return this.getController("columns")}init(){return this._state={},this._isLoaded=!1,this._isLoading=!1,this._windowUnloadHandler=()=>{void 0!==this._savingTimeoutID&&this._saveState(this.state())},n.default.on((0,d.getWindow)(),"visibilitychange",this._windowUnloadHandler),this}optionChanged(e){const t=this;if("stateStoring"===e.name)t.isEnabled()&&!t.isLoading()&&t.load(),e.handled=!0;else super.optionChanged(e)}dispose(){clearTimeout(this._savingTimeoutID),n.default.off((0,d.getWindow)(),"visibilitychange",this._windowUnloadHandler)}_loadState(){const e=this.option("stateStoring");if("custom"===e.type)return e.customLoad&&e.customLoad();try{return JSON.parse(_(e).getItem(f(e)))}catch(e){u.default.log("W1022","State storing",e.message)}}_saveState(e){const t=this.option("stateStoring");if("custom"!==t.type)try{_(t).setItem(f(t),JSON.stringify(e))}catch(e){u.default.log(e.message)}else t.customSave&&t.customSave(e)}publicMethods(){return["state"]}isEnabled(){return this.option("stateStoring.enabled")}isLoaded(){return this._isLoaded}isLoading(){return this._isLoading}load(){this._isLoading=!0;const e=(0,o.fromPromise)(this._loadState());return e.always((()=>{this._isLoaded=!0,this._isLoading=!1})).done((e=>{null===e||(0,l.isEmptyObject)(e)||this.state(e)})),e}state(e){const t=this;if(!arguments.length)return(0,a.extend)(!0,{},t._state);t._state=(0,a.extend)({},e),g(t._state)}save(){const e=this;clearTimeout(e._savingTimeoutID),e._savingTimeoutID=setTimeout((()=>{e._saveState(e.state()),e._savingTimeoutID=void 0}),e.option("stateStoring.savingTimeout"))}}t.StateStoringController=m;t.default={StateStoringController:m}},87396:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StickyPosition=t.STICKY_BORDER_WIDTH=t.CLASSES=void 0;t.STICKY_BORDER_WIDTH=2;var i;!function(e){e.Left="left",e.Right="right",e.Sticky="sticky"}(i||(t.StickyPosition=i={}));t.CLASSES={stickyColumn:"sticky-column",stickyColumnLeft:"sticky-column-left",stickyColumnRight:"sticky-column-right",stickyColumnBorderRight:"sticky-column-border-right",stickyColumnBorderLeft:"sticky-column-border-left",stickyColumns:"sticky-columns",firstHeader:"first-header",columnNoBorder:"column-no-border",groupRowContainer:"group-row-container",focusedFixedElement:"dx-focused-fixed-element",focused:"dx-focused",hidden:"dx-hidden"}},52511:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GridCoreStickyColumnsDom=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(41639),s=i(11528),r=i(87396),l=i(24378);const d=(e,t,i)=>{if(!e.hasClass(i(r.CLASSES.stickyColumn)))return!1;const n=parseFloat(e[0].style.left),o=(0,a.getBoundingRect)(e[0]),s=(0,a.getBoundingRect)(t[0]),l=o.left-s.left;return Math.round(n)>=Math.round(l)},u=(e,t,i)=>{if(!e.hasClass(i(r.CLASSES.stickyColumn)))return!1;const n=parseFloat(e[0].style.right),o=(0,a.getBoundingRect)(e[0]),s=(0,a.getBoundingRect)(t[0]).right-o.right;return Math.round(n)>=Math.round(s)},c=(e,t)=>e.hasClass(t(r.CLASSES.stickyColumnLeft))&&e.hasClass(t(r.CLASSES.stickyColumnBorderRight)),h=(e,t)=>e.hasClass(t(r.CLASSES.stickyColumnRight))&&e.hasClass(t(r.CLASSES.stickyColumnBorderLeft)),p=(e,t)=>e.hasClass(t(r.CLASSES.stickyColumnLeft))||e.hasClass(t(r.CLASSES.stickyColumnRight))||e.hasClass(t(r.CLASSES.stickyColumn)),g=(e,t,i)=>{const n=(0,a.getBoundingRect)(t.get(0)),s={left:n.left,right:n.right};if(null!=e&&e.length){const n=((e,t,i)=>{const n=("rtl"===t.css("direction")?e.toArray():e.toArray().reverse()).find((e=>d((0,o.default)(e),t,i)||c((0,o.default)(e),i)));return(0,o.default)(n??"")})(e,t,i),r=((e,t,i)=>{const n=("rtl"===t.css("direction")?e.toArray().reverse():e.toArray()).find((e=>u((0,o.default)(e),t,i)||h((0,o.default)(e),i)));return(0,o.default)(n??"")})(e,t,i);null!=n&&n.length&&(s.left=Math.round((0,a.getBoundingRect)(n[0]).right)),null!=r&&r.length&&(s.right=Math.round((0,a.getBoundingRect)(r[0]).left))}return s},_=e=>!e.is("[tabindex]");t.GridCoreStickyColumnsDom={toggleFirstHeaderClass:(e,t,i)=>{e.toggleClass(i(r.CLASSES.firstHeader),t)},toggleColumnNoBorderClass:(e,t,i)=>{e.toggleClass(i(r.CLASSES.columnNoBorder),t)},addStickyColumnClass:(e,t,i)=>{switch(t){case r.StickyPosition.Right:e.addClass(i(r.CLASSES.stickyColumnRight));break;case r.StickyPosition.Sticky:e.addClass(i(r.CLASSES.stickyColumn));break;default:e.addClass(i(r.CLASSES.stickyColumnLeft))}},addStickyColumnBorderLeftClass:(e,t)=>{e.addClass(t(r.CLASSES.stickyColumnBorderLeft))},addStickyColumnBorderRightClass:(e,t)=>{e.addClass(t(r.CLASSES.stickyColumnBorderRight))},doesGroupCellEndInFirstColumn:e=>{const t=e.parent().children().filter((t=>t<e.index()));return 1===e.attr("colspan")-t.length},toggleStickyColumnsClass:(e,t,i)=>{e.toggleClass(i(r.CLASSES.stickyColumns),t)},getLeftFixedCells:(e,t)=>e.filter(((e,i)=>(0,o.default)(i).hasClass(t(r.CLASSES.stickyColumnLeft)))),getRightFixedCells:(e,t)=>e.filter(((e,i)=>(0,o.default)(i).hasClass(t(r.CLASSES.stickyColumnRight)))),getNonFixedAndStickyCells:(e,t)=>e.filter(((e,i)=>(0,o.default)(i).hasClass(t(r.CLASSES.stickyColumn))||!p((0,o.default)(i),t))),getScrollPadding:(e,t,i)=>{const n=(0,a.getBoundingRect)(t.get(0)),o=g(e,t,i);return{left:o.left-n.left,right:n.right-o.right}},getNextHeaderCell:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"next",i=e,n=e.parent();do{i="next"===t?i.next():i.prev(),i.length||(n="next"===t?n.next():n.prev(),n.length&&(i="next"===t?n.children().first():n.children().last()))}while(i.length&&_(i));return i},noNeedToCreateResizingPoint:(e,t,i)=>{let{point:n,column:a,nextColumn:r}=t;const{item:p,isLeftBoundary:_,isRightBoundary:f}=n,m=(0,o.default)(p),v=Math.round(n.x),C=e.option("rtlEnabled"),y=(0,s.isDefined)(_)||(0,s.isDefined)(f),b=(0,o.default)(e.getColumnElements()??""),x=(0,o.default)(e.getContent()),w=(null==a?void 0:a.fixed)&&(null==r?void 0:r.fixed),S=g(b,x,i);if(w||(0,l.isFixedEdge)(n,a,r))return!1;if(y){if(c(m,i)||d(m,x,i))return _;if(h(m,i)||u(m,x,i))return f}const D=v<S.left||v>S.right,I=v===S.left||v===S.right,E=C?0===n.index:n.index===b.length;return D||!E&&I},isFixedCellPinnedToRight:(e,t,i)=>e.hasClass(i(r.CLASSES.stickyColumnRight))||u(e,t,i),noNeedToCreateReorderingPoint:(e,t,i,n)=>{const{item:a,isLeftBoundary:r,isRightBoundary:l}=e,c=(0,o.default)(a),h=Math.round(e.x),p=(0,s.isDefined)(r)||(0,s.isDefined)(l),_=g(t,i,n);return d(c,i,n)?p&&!r:u(c,i,n)?p&&!l:h<_.left||h>_.right},isFixedCell:p,isStickyCell:(e,t)=>e.hasClass(t(r.CLASSES.stickyColumn)),isStickyCellPinned:(e,t,i)=>d(e,t,i)||u(e,t,i),isOutsideVisibleArea:(e,t,i,n)=>{const o=(0,a.getBoundingRect)(e.get(0)),s=Math.round(o.left),r=Math.round(o.right),l=g(t,i,n);return s<l.left||r>l.right},isLastCell:e=>{if(!e.is("td"))return!1;const t=e.parent().children().last();return e[0]===t[0]}}},67624:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.stickyColumnsModule=void 0;var n=_(i(64553)),o=i(41639),a=i(57653),s=i(62504),r=i(26854),l=i(93734),d=_(i(53226)),u=i(9649),c=i(77081),h=i(87396),p=i(52511),g=i(24378);function _(e){return e&&e.__esModule?e:{default:e}}const f=e=>class extends e{_addStickyColumnBorderLeftClass(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;(0,g.isFirstFixedColumn)(this._columnsController,t,i,n,o)&&p.GridCoreStickyColumnsDom.addStickyColumnBorderLeftClass(e,this.addWidgetPrefix.bind(this))}_addStickyColumnBorderRightClass(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;(0,g.isLastFixedColumn)(this._columnsController,t,i,n,o)&&p.GridCoreStickyColumnsDom.addStickyColumnBorderRightClass(e,this.addWidgetPrefix.bind(this))}updateBorderCellClasses(e,t,i){const n=this._columnsController,o="rowsView"===this.name,a=(0,g.needToRemoveColumnBorder)(n,t,i,o),s=null==n?void 0:n.isFirstColumn(t,i);p.GridCoreStickyColumnsDom.toggleColumnNoBorderClass(e,a,this.addWidgetPrefix.bind(this)),p.GridCoreStickyColumnsDom.toggleFirstHeaderClass(e,s,this.addWidgetPrefix.bind(this))}_updateBorderClasses(){const e="columnHeadersView"===this.name;this._getRowElementsCore().not(`.${u.CLASSES.detailRow}`).toArray().forEach(((t,i)=>{const o=e?i:null,a=(0,n.default)(t).children("td").toArray();let s=this.getColumns(o);s=(0,g.processFixedColumns)(this._columnsController,s),a.forEach(((e,t)=>{const i=(0,n.default)(e),a=s[t];a.visibleWidth!==r.HIDDEN_COLUMNS_WIDTH&&this.updateBorderCellClasses(i,a,o)}))}))}_renderCore(e){super._renderCore(e);const t=this.element(),i=this.hasStickyColumns();p.GridCoreStickyColumnsDom.toggleStickyColumnsClass(t,i,this.addWidgetPrefix.bind(this))}_createCell(e){const{column:t}=e,{rowType:i}=e,n=super._createCell(e),o=this.hasStickyColumns(),a="header"===i?e.rowIndex:null,s="groupFooter"===i||"totalFooter"===i||"group"===i,r=t.command&&"expand"===t.command;if(o&&!(0,g.needToDisableStickyColumn)(this._columnsController,t)&&(this.updateBorderCellClasses(n,t,a),t.fixed)){const e=(0,g.getColumnFixedPosition)(this._columnsController,t);if(p.GridCoreStickyColumnsDom.addStickyColumnClass(n,e,this.addWidgetPrefix.bind(this)),!s&&!r)switch(e){case h.StickyPosition.Right:this._addStickyColumnBorderLeftClass(n,t,a,!1,h.StickyPosition.Right);break;case h.StickyPosition.Sticky:this._addStickyColumnBorderLeftClass(n,t,a,!0),this._addStickyColumnBorderRightClass(n,t,a,!0);break;default:this._addStickyColumnBorderRightClass(n,t,a,!1,h.StickyPosition.Left)}}return n}setStickyOffsets(e,t){const i=this._columnsController,n=this.option("rtlEnabled"),o=this.option("showColumnHeaders");let a=this.getColumnWidths(void 0,e),s=this.getColumns(o?e:void 0);s=(0,g.processFixedColumns)(this._columnsController,s),n&&(s=n?[...s].reverse():s,a=n?[...a].reverse():a),s.forEach(((o,r)=>{if(o.fixed){const l=n?s.length-r-1:r,d=(0,g.getStickyOffset)(i,s,a,r,t);t&&(t[o.index]=d);const u=(0,g.normalizeOffset)(d);this.setCellProperties(u,l,e)}}))}setColumnWidths(e){const t=this.hasStickyColumns(),i=this.getController("columnsResizer"),n=null==i?void 0:i.isResizing();super.setColumnWidths(e),t&&n&&this.setStickyOffsets()}_resizeCore(){const e=this.hasStickyColumns(),t=this.getController("adaptiveColumns"),i=null==t?void 0:t.getHidingColumnsQueue();super._resizeCore.apply(this,arguments),e&&(this.setStickyOffsets(),null!=i&&i.length&&this._updateBorderClasses())}hasStickyColumns(){var e;const t=null===(e=this._columnsController)||void 0===e?void 0:e.getStickyColumns();return!0!==this.option("columnFixing.legacyMode")&&!!t.length}};t.stickyColumnsModule={extenders:{views:{columnHeadersView:e=>class extends(f(e)){setStickyOffsets(){const e={},t=this._getRows();for(let n=0;n<t.length;n++){var i;const o="filter"===(null==t||null===(i=t[n])||void 0===i?void 0:i.rowType);super.setStickyOffsets(n,o?void 0:e)}}getContextMenuItems(e){const{column:t}=e,i=this._columnsController,n=this.option("columnFixing");let o=super.getContextMenuItems(e);if(e.row&&"header"===e.row.rowType&&!0===n.enabled&&t&&t.allowFixing){const e=e=>{switch(e.itemData.value){case"none":this._columnsController.columnOption(t.index,"fixed",!1);break;case"left":this._columnsController.columnOption(t.index,{fixed:!0,fixedPosition:"left"});break;case"right":this._columnsController.columnOption(t.index,{fixed:!0,fixedPosition:"right"});break;case"sticky":this._columnsController.columnOption(t.index,{fixed:!0,fixedPosition:"sticky"})}},a=[{text:n.texts.leftPosition,icon:n.icons.leftPosition,value:"left",disabled:t.fixed&&(!t.fixedPosition||"left"===t.fixedPosition),onItemClick:e},{text:n.texts.rightPosition,icon:n.icons.rightPosition,value:"right",disabled:t.fixed&&"right"===t.fixedPosition,onItemClick:e}];!0===this.option("columnFixing.legacyMode")||i.isVirtualMode()||a.push({text:n.texts.stickyPosition,icon:n.icons.stickyPosition,value:"sticky",disabled:t.fixed&&t.fixedPosition===h.StickyPosition.Sticky,onItemClick:e}),o=o||[],o.push({text:n.texts.fix,icon:n.icons.fix,beginGroup:!0,items:a},{text:n.texts.unfix,icon:n.icons.unfix,value:"none",disabled:!t.fixed,onItemClick:e})}return o}},rowsView:e=>class extends(f(e)){_getMasterDetailWidth(){var e,t;return((null===(e=(t=this.component.$element()).width)||void 0===e?void 0:e.call(t))??0)-d.default.getComponentBorderWidth(this,this._$element)-this.getScrollbarWidth()}_renderMasterDetailCell(e,t,i){const n=super._renderMasterDetailCell(e,t,i);return this.hasStickyColumns()&&n.addClass(this.addWidgetPrefix(h.CLASSES.stickyColumnLeft)).width(this._getMasterDetailWidth()),n}_updateMasterDetailWidths(){const e=this._getMasterDetailWidth(),t=this._getRowElements().children(".dx-master-detail-cell");(0,a.setWidth)(t,`${e}px`)}setStickyOffsets(e,t){super.setStickyOffsets(e,t),this.setStickyOffsetsForGroupCells()}setStickyOffsetsForGroupCells(){const e=this._columnsController.getGroupColumns();let t=this.getColumns(),i=this.getColumnWidths();const o=this._getColumnsCountBeforeGroups(t),a=this.option("rtlEnabled");a&&(t=a?[...t].reverse():t,i=a?[...i].reverse():i);const s=this.getTableElement();e.forEach((e=>{const r=o+e.groupIndex+1,l=a?t.length-r-1:r,d=(0,g.getStickyOffset)(this._columnsController,t,i,l),u=(0,g.normalizeOffset)(d),c=s.children().children(".dx-group-row").find(`.dx-group-cell[aria-colindex='${r+1}']`);for(let e=0;e<c.length;e+=1){const t=c.get(e),i=(0,n.default)(t).find(".dx-datagrid-group-row-container").get(0);Object.assign(t.style,u),Object.assign(i.style,u)}}))}_resizeCore(){const e=this.hasStickyColumns();super._resizeCore.apply(this,arguments),e&&this._updateMasterDetailWidths()}_renderCellContent(e,t,i){if(!(0,c.isGroupRow)(t)||!this.hasStickyColumns())return super._renderCellContent(e,t,i);const o=(0,n.default)("<div>").addClass(this.addWidgetPrefix(h.CLASSES.groupRowContainer)).appendTo(e);return super._renderCellContent(o,t,i)}_renderGroupSummaryCellsCore(e,t,i,n){super._renderGroupSummaryCellsCore(e,t,i,n);const o=`.${this.addWidgetPrefix(h.CLASSES.stickyColumn)}`;e.parent().find(o).length&&p.GridCoreStickyColumnsDom.doesGroupCellEndInFirstColumn(e)&&p.GridCoreStickyColumnsDom.addStickyColumnBorderRightClass(e,this.addWidgetPrefix.bind(this))}_handleScroll(e){const t=this.hasStickyColumns();if(super._handleScroll(e),t){const e=this.getController("editorFactory");if(e.hasOverlayElements()){const t=e.focus();e.focus(t)}}}_scrollToElement(e,t){let i=t;if(this.hasStickyColumns()){var n;const t=p.GridCoreStickyColumnsDom.isFixedCell(e,this.addWidgetPrefix.bind(this));if(!e.is("td")||t)return;const o=null==e?void 0:e.closest("tr"),a=null==o?void 0:o.children(),s=null===(n=this.getScrollable())||void 0===n?void 0:n.container();i=p.GridCoreStickyColumnsDom.getScrollPadding(a,s,this.addWidgetPrefix.bind(this))}super._scrollToElement(e,i)}},footerView:e=>class extends(f(e)){}},controllers:{columnsResizer:e=>class extends e{getSeparatorOffsetX(e){var t;if(null===(t=this._columnHeadersView)||void 0===t?void 0:t.hasStickyColumns()){const t=(0,n.default)(this._columnHeadersView.getContent()),o=p.GridCoreStickyColumnsDom.isFixedCellPinnedToRight(e,t,this.addWidgetPrefix.bind(this));var i;if("widget"===this.option("columnResizingMode")&&o)return(null===(i=e.offset())||void 0===i?void 0:i.left)??0}return super.getSeparatorOffsetX(e)}_correctColumnIndexForPoint(e,t,i){const o=this.option("rtlEnabled"),a="widget"===this.option("columnResizingMode"),s=Math.max(e.index-1,0),r=i[s],l=i[this._getNextColumnIndex(s)];if(a&&!(0,g.isFixedEdge)(e,r,l)){const t=(0,n.default)(this._columnHeadersView.getContent());if(p.GridCoreStickyColumnsDom.isFixedCellPinnedToRight((0,n.default)(e.item),t,this.addWidgetPrefix.bind(this)))return void(e.columnIndex-=o?1:0)}super._correctColumnIndexForPoint(e,t,i)}_needToInvertResizing(e){const t=super._needToInvertResizing(e),i="widget"===this.option("columnResizingMode");if(!t&&i){const t=(0,n.default)(this._columnHeadersView.getContent());return p.GridCoreStickyColumnsDom.isFixedCellPinnedToRight(e,t,this.addWidgetPrefix.bind(this))}return t}_generatePointsByColumns(){var e;const t=null===(e=this._columnHeadersView)||void 0===e?void 0:e.hasStickyColumns();super._generatePointsByColumns(t)}_pointCreated(e,t,i){var n;const o=null===(n=this._columnHeadersView)||void 0===n?void 0:n.hasStickyColumns(),a=super._pointCreated(e,t,i);if(o&&t>0&&!a){const t=i[e.index-1],n=i[this._getNextColumnIndex(e.index-1)];return p.GridCoreStickyColumnsDom.noNeedToCreateResizingPoint(this._columnHeadersView,{point:e,column:t,nextColumn:n},this.addWidgetPrefix.bind(this))}return a}},draggingHeader:e=>class extends e{_generatePointsByColumns(e){var t;const i=null===(t=this._columnHeadersView)||void 0===t?void 0:t.hasStickyColumns(),{sourceLocation:n,sourceColumn:o,targetDraggingPanel:a}=e,s="headers"===n&&"headers"===(null==a?void 0:a.getName());if(i&&s){const t=(0,g.getColumnFixedPosition)(this._columnsController,o);switch(!0){case o.fixed&&t===h.StickyPosition.Left:e.columnElements=p.GridCoreStickyColumnsDom.getLeftFixedCells(e.columnElements,this.addWidgetPrefix.bind(this)),e.startColumnIndex=e.columnElements.eq(0).index();break;case o.fixed&&t===h.StickyPosition.Right:e.columnElements=p.GridCoreStickyColumnsDom.getRightFixedCells(e.columnElements,this.addWidgetPrefix.bind(this)),e.startColumnIndex=e.columnElements.eq(0).index();break;default:e.columnElements=p.GridCoreStickyColumnsDom.getNonFixedAndStickyCells(e.columnElements,this.addWidgetPrefix.bind(this)),e.startColumnIndex=e.columnElements.eq(0).index()}}return super._generatePointsByColumns(e,i)}_pointCreated(e,t,i,o){const a=this._columnHeadersView.hasStickyColumns(),s=this._columnHeadersView.getColumnElements(),r=a&&"headers"===i&&(null==s?void 0:s.length)&&(!o.fixed||o.fixedPosition===h.StickyPosition.Sticky),l=super._pointCreated(e,t,i,o);return r&&!l?p.GridCoreStickyColumnsDom.noNeedToCreateReorderingPoint(e,s,(0,n.default)(this._columnHeadersView.getContent()),this.addWidgetPrefix.bind(this)):l}},editorFactory:e=>class extends e{getOverlayContainerIfNeeded(e){const t=this._rowsView.hasStickyColumns(),i=p.GridCoreStickyColumnsDom.isFixedCell(e,this.addWidgetPrefix.bind(this));if(t&&i)return e.closest(`.${this.addWidgetPrefix(h.CLASSES.stickyColumns)}`)}updateFocusOverlaySize(e,t){this._rowsView.hasStickyColumns()||super.updateFocusOverlaySize(e,t)}getFocusOverlaySize(e){if(this._rowsView.hasStickyColumns()){const t=(0,o.getBoundingRect)(e.get(0)),i=p.GridCoreStickyColumnsDom.isLastCell(e),n=p.GridCoreStickyColumnsDom.isFixedCell(e,this.addWidgetPrefix.bind(this));return{width:t.right-t.left+(i||n?0:1),height:t.bottom-t.top}}return super.getFocusOverlaySize(e)}getValidationMessageContainer(e){return this.getOverlayContainerIfNeeded(e)??super.getValidationMessageContainer(e)}getRevertButtonContainer(e){return this.getOverlayContainerIfNeeded(e)??super.getRevertButtonContainer(e)}getFocusOverlayContainer(e){return this.getOverlayContainerIfNeeded(e)??super.getFocusOverlayContainer(e)}overlayPositionedHandler(e,t){const i=this.getView("columnHeadersView"),o=i.hasStickyColumns();if(super.overlayPositionedHandler(e,t),o){const t=(0,n.default)(e.element).closest("td");if(!p.GridCoreStickyColumnsDom.isFixedCell(t,this.addWidgetPrefix.bind(this))){const t=e.component.$wrapper(),o=e.component.$content(),a=p.GridCoreStickyColumnsDom.isOutsideVisibleArea(o,(0,n.default)(i.getColumnElements()),(0,n.default)(i.getContent()),this.addWidgetPrefix.bind(this));t.css("zIndex",a?1:(null==this?void 0:this.getOverlayBaseZIndex())??0)}}}updateFocusOverlay(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t){const t=p.GridCoreStickyColumnsDom.isFixedCell(e,this.addWidgetPrefix.bind(this));this._$focusOverlay.toggleClass(h.CLASSES.focusedFixedElement,t);const i=(0,l.isGroupRow)(e),n=(0,l.isGroupFooterRow)(e),o=(0,l.isAdaptiveItem)(e);(t||i||n||o)&&this._$focusOverlay.toggleClass(h.CLASSES.focusedFixedElement,!0)}super.updateFocusOverlay(e,t)}},resizing:e=>class extends e{resize(){const e=super.resize();return this._columnHeadersView.hasStickyColumns()&&null!=this&&this.hasResizeTimeout()&&this._rowsView.setStickyOffsets(),e}},keyboardNavigation:e=>class extends e{headerTabKeyHandler(e){var t,i;let{originalEvent:o,shift:a}=e;const r=null===(t=this._columnHeadersView)||void 0===t?void 0:t.hasStickyColumns(),l=null===(i=this._rowsView)||void 0===i?void 0:i.getScrollable();if(r&&l){const e=(0,n.default)(o.target).closest("td"),t=p.GridCoreStickyColumnsDom.getNextHeaderCell(e,a?"previous":"next"),i=p.GridCoreStickyColumnsDom.isFixedCell(t,this.addWidgetPrefix.bind(this));if(t.length&&!i){const e=(0,n.default)(this._columnHeadersView.getColumnElements());if(p.GridCoreStickyColumnsDom.isOutsideVisibleArea(t,e,(0,n.default)(this._columnHeadersView.getContent()),this.addWidgetPrefix.bind(this))){const i=p.GridCoreStickyColumnsDom.getScrollPadding(e,l.container(),this.addWidgetPrefix.bind(this)),o=(0,s.getElementLocationInternal)(t[0],"horizontal",(0,n.default)(this._columnHeadersView.getContent())[0],l.scrollOffset(),i,this.addWidgetPrefix("table"));l.scrollTo({x:o})}}}}}}}}},24378:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.processFixedColumns=t.normalizeOffset=t.needToRemoveColumnBorder=t.needToDisableStickyColumn=t.isLastFixedColumn=t.isFixedEdge=t.isFirstFixedColumn=t.getStickyOffset=t.getColumnFixedPosition=void 0;var n,o=i(11528),a=(n=i(53226))&&n.__esModule?n:{default:n},s=i(26854),r=i(87396);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}const d=(e,t)=>{const{fixedPosition:i}=t,n=e.option("rtlEnabled"),o=t.command&&"expand"===t.command;return t.command&&!a.default.isCustomCommandColumn(e._columns,t)&&n&&!o?i===r.StickyPosition.Right?r.StickyPosition.Left:r.StickyPosition.Right:i??r.StickyPosition.Left};t.getColumnFixedPosition=d;const u=function(e,t){return e.isVirtualMode()&&!!t.fixed&&t.fixedPosition===r.StickyPosition.Sticky};t.needToDisableStickyColumn=u;t.processFixedColumns=function(e,t){return t.map((t=>u(e,t)?l({},t,{fixed:!1,fixedPosition:""}):t))};const c=function(e,t){return!(t.visibleWidth===s.HIDDEN_COLUMNS_WIDTH||t.isBand&&!e.getVisibleDataColumnsByBandColumn(t.index).length)},h=function(e,t){return!t.some((t=>!t.fixed&&c(e,t)))},p=function(e,t,i,n,a,s){const l=t[n],d=(0,o.isDefined)(l.ownerBand),u=a===r.StickyPosition.Right,p=l.fixedPosition===r.StickyPosition.Sticky,g=u?t.slice(n+1):t.slice(0,n).reverse(),_=u?i.slice(n+1):i.slice(0,n).reverse();let f=0,m=0,v=!h(e,g)&&p&&g.length?1:0;var C;return g.forEach(((t,i)=>{if(!t.fixed||(0,o.isDefined)(s)&&l.ownerBand!==t.ownerBand)c(e,t)||(m+=1);else{const n=t.fixedPosition===r.StickyPosition.Sticky;f+=_[i],p&&n&&!h(e,g.slice(i+1))&&(i!==m?(v+=1,m=i+1):m+=1)}})),d&&(0,o.isDefined)(s)?(f+=(null==s||null===(C=s[l.ownerBand])||void 0===C?void 0:C[a])??0,f):f-v*r.STICKY_BORDER_WIDTH},g=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5?arguments[5]:void 0;const s=e.option("rtlEnabled")!==o?"isLastColumn":"isFirstColumn";if(t.fixedPosition===r.StickyPosition.Sticky){const i=e.getParentColumn(t)??t;if(e[s](i,0))return!1}return e[s](t,i,n,a)};t.getStickyOffset=function(e,t,i,n,o){const a={},s=t[n];if(s){switch(d(e,s)){case r.StickyPosition.Sticky:{const s=p(e,t,i,n,r.StickyPosition.Left,o),l=p(e,t,i,n,r.StickyPosition.Right,o);a.left=s,a.right=l;break}case r.StickyPosition.Right:{const s=p(e,t,i,n,r.StickyPosition.Right,o);a.right=s;break}default:{const s=p(e,t,i,n,r.StickyPosition.Left,o);a.left=s}}}return a};const _=function(e,t,i,n){const o=function(e,t,i,n){const o=e.getVisibleIndex(t.index,n);return null==i?void 0:i.slice(0,o).reverse().find((t=>c(e,t)))}(e,t,i,n),a=d(e,t),s=o&&d(e,o);return!(null==o||!o.fixed||u(e,o)||t.fixed&&a!==r.StickyPosition.Sticky&&s!==r.StickyPosition.Sticky)};t.needToRemoveColumnBorder=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=e.getVisibleColumns(n?null:i),a=e.getParentColumn(t);if(a){return e.isFirstColumn(t,i,!0)&&_(e,a,e.getVisibleColumns(0),0)}return _(e,t,o,i)};t.normalizeOffset=function(e){const t={};return(0,o.isDefined)(e.left)&&(t.left=`${e.left}px`),(0,o.isDefined)(e.right)&&(t.right=`${e.right}px`),t};t.isFirstFixedColumn=function(e,t,i){return g(e,t,i,arguments.length>3&&void 0!==arguments[3]&&arguments[3],!1,arguments.length>4?arguments[4]:void 0)};t.isLastFixedColumn=function(e,t,i){return g(e,t,i,arguments.length>3&&void 0!==arguments[3]&&arguments[3],!0,arguments.length>4?arguments[4]:void 0)};t.isFixedEdge=function(e,t,i){return!((0,o.isDefined)(e.isLeftBoundary)||(0,o.isDefined)(e.isRightBoundary))&&!!t&&!!i&&t.fixed!==i.fixed}},52932:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.validatingRowsViewExtender=t.validatingModule=t.validatingEditorFactoryExtender=t.validatingEditingExtender=t.validatingDataControllerExtender=t.ValidatingController=void 0;var n=E(i(92774)),o=E(i(89797)),a=E(i(4671)),s=i(43792),r=E(i(64553)),l=E(i(48314)),d=i(17781),u=i(87739),c=i(52576),h=i(21274),p=i(57653),g=i(54497),_=i(11528),f=E(i(64973)),m=E(i(11979)),v=E(i(89132)),C=i(52071),y=E(i(19391)),b=E(i(71775)),x=i(35944),w=E(i(35185)),S=i(69699),D=E(i(74854)),I=E(i(53226));function E(e){return e&&e.__esModule?e:{default:e}}const T="invalid",A="revert-tooltip",O="dx-invalid-message",P="dxInvalidMessage",k="invalid-message",M="dx-invalid-message-always",R="dxRevertButton",L="validator",B="dx-pending-indicator",V="dx-validation-pending",F="content",H="__DX_INSERT_INDEX__",N="row",z="batch",W="cell",$=["popup","form"],G="valid",j="invalid",U="pending",K="insert",Z="cancel",q=function(e){return(0,_.isDefined)(e)&&e!==Z},Y=function(e,t){return void 0!==e||void 0===e&&t&&!t.isNewRow};class X extends D.default.Controller{constructor(){super(...arguments),this._isValidationInProgress=!1,this._disableApplyValidationResults=!1}init(){this._editingController=this.getController("editing"),this._editorFactoryController=this.getController("editorFactory"),this._columnsController=this.getController("columns"),this.createAction("onRowValidating"),this._validationState||this.initValidationState()}initValidationState(){this._validationState=[],this._validationStateCache={}}_rowIsValidated(e){const t=this._getValidationData(null==e?void 0:e.key);return!!t&&!!t.validated}_getValidationData(e,t){const i=(0,d.getKeyHash)(e),n=(0,_.isObject)(i);let o;return o=n?this._validationState.filter((t=>(0,d.equalByValue)(t.key,e)))[0]:this._validationStateCache[i],!o&&t&&(o={key:e,isValid:!0},this._validationState.push(o),n||(this._validationStateCache[i]=o)),o}_getBrokenRules(e,t){let i;return i=t?t.brokenRules||t.brokenRule&&[t.brokenRule]:e.brokenRules||[],i}_rowValidating(e,t){const i=new u.Deferred,n=this._editingController.getChangeByKey(null==e?void 0:e.key),o=this._getBrokenRules(e,t),a={brokenRules:o,isValid:t?t.isValid:e.isValid,key:n.key,newData:n.data,oldData:this._editingController._getOldData(n.key),promise:null,errorText:this.getHiddenValidatorsErrorText(o)};return this.executeAction("onRowValidating",a),(0,u.when)((0,u.fromPromise)(a.promise)).always((()=>{e.isValid=a.isValid,e.errorText=a.errorText,i.resolve(a)})),i.promise()}getHiddenValidatorsErrorText(e){const t=[];return(0,h.each)(e,((e,i)=>{const{column:n}=i,o=n&&void 0!==n.groupIndex&&!n.showWhenGrouped,a=n&&n.visible;i.validator.$element().parent().length||a&&!o||t.push(i.message)})),t.join(", ")}validate(e){let t=!0;const i=this._editingController,n=new u.Deferred,o=[],a=i.getEditMode();if(e=e||a===N,this._isValidationInProgress)return n.resolve(!1).promise();if(this._isValidationInProgress=!0,e){i.addDeferred(n);const e=i.getChanges();(0,h.each)(e,((e,i)=>{let{type:n,key:a}=i;if("remove"!==n){const e=this._getValidationData(a,!0),i=this.validateGroup(e);o.push(i),i.done((i=>{e.validated=!0,t=t&&i.isValid}))}}))}else if(this._currentCellValidator){const e=this.validateGroup(this._currentCellValidator._findGroup());o.push(e),e.done((e=>{t=e.isValid}))}return(0,u.when)(...o).done((()=>{this._isValidationInProgress=!1,n.resolve(t)})),n.promise()}validateGroup(e){var t;const i=new u.Deferred,n=e&&y.default.getGroupConfig(e);let o;return null!=n&&n.validators.length&&(this.resetRowValidationResults(e),o=y.default.validateGroup(e)),(0,u.when)((null===(t=o)||void 0===t?void 0:t.complete)||o).done((t=>{(0,u.when)(this._rowValidating(e,t)).done(i.resolve)})),i.promise()}isRowDataModified(e){return!(0,_.isEmptyObject)(e.data)}updateValidationState(e){const t=this._editingController.getEditMode(),{key:i}=e,n=this._getValidationData(i,!0);if($.includes(t))n.isValid=!0;else{if(e.type===K&&!this.isRowDataModified(e))return void(n.isValid=!0);this.setDisableApplyValidationResults(!0);if(y.default.getGroupConfig(n)){const e=y.default.validateGroup(n);(0,u.when)(e.complete||e).done((e=>{n.isValid=e.isValid,n.brokenRules=e.brokenRules}))}else n.brokenRules&&n.brokenRules.length||(n.isValid=!0);this.setDisableApplyValidationResults(!1)}}setValidator(e){this._currentCellValidator=e}renderCellPendingIndicator(e){let t=e.find(`.${B}`);if(!t.length){const i=e;t=(0,r.default)("<div>").appendTo(i).addClass(B),this._createComponent(t,m.default),e.addClass(V)}}disposeCellPendingIndicator(e){const t=e.find(`.${B}`);if(t.length){const i=m.default.getInstance(t);i&&(i.dispose(),i.$element().remove()),e.removeClass(V)}}validationStatusChanged(e){const{validator:t}=e,i=t.option("validationGroup"),{column:n}=t.option("dataGetter")();this.updateCellValidationResult({rowKey:i.key,columnIndex:n.index,validationResult:e})}validatorInitialized(e){e.component.on("validating",this.validationStatusChanged.bind(this)),e.component.on("validated",this.validationStatusChanged.bind(this))}validatorDisposing(e){const t=e.component,i=t.option("validationGroup"),{column:n}=t.option("dataGetter")(),o=this.getCellValidationResult({rowKey:null==i?void 0:i.key,columnIndex:n.index});q(o)&&o.status===U&&this.cancelCellValidationResult({change:i,columnIndex:n.index})}applyValidationResult(e,t){const{validator:i}=t,a=i.option("validationGroup"),{column:s}=i.option("dataGetter")();if(t.brokenRules&&t.brokenRules.forEach((e=>{e.columnIndex=s.index,e.column=s})),e){const i=this.getCellValidationResult({rowKey:a.key,columnIndex:s.index}),r=q(i)&&i.disabledPendingId===t.id;if(this._disableApplyValidationResults||r)return;if(t.status===j){const t=e.find(":focus");(0,x.focused)(t)||(n.default.trigger(t,"focus"),n.default.trigger(t,o.default.down))}const l=!s.editCellTemplate&&this._editorFactoryController.getEditorInstance(e);t.status===U?l?l.option("validationStatus",U):this.renderCellPendingIndicator(e):l?l.option("validationStatus",G):this.disposeCellPendingIndicator(e),e.toggleClass(this.addWidgetPrefix(T),t.status===j)}}_syncInternalEditingData(e){var t;const i=this._editingController,n=i.getChangeByKey(e.key),o=i._getOldData(e.key),a=null===(t=e.row)||void 0===t?void 0:t.oldData;n&&a&&!o&&i._addInternalData({key:e.key,oldData:a})}createValidator(e,t){const i=this._editingController,{column:n}=e;let{showEditorAlways:o}=n;if((0,_.isDefined)(n.command)||!n.validationRules||!Array.isArray(n.validationRules)||!n.validationRules.length)return;let a=i.getIndexByKey(e.key,i.getChanges())>-1;if(!a){if(!o){var l;o=((null===(l=this._columnsController)||void 0===l?void 0:l.getVisibleColumns())||[]).some((e=>e.showEditorAlways))}const t=(0,d.equalByValue)(this.option("editing.editRowKey"),e.key),n=i.isCellOrBatchEditMode()&&i.allowUpdating({row:e.row});var u;if(a=t||n&&o,n&&o)i._addInternalData({key:e.key,oldData:(null===(u=e.row)||void 0===u?void 0:u.oldData)??e.data})}if(a){if(t&&!t.length)return void w.default.log("E1050");this._syncInternalEditingData(e);const o=this._getValidationData(e.key,!0),a=()=>{const t=i.getChangeByKey(null==o?void 0:o.key),a=n.calculateCellValue((null==t?void 0:t.data)||{});return void 0!==a?a:e.value},l=t&&t.hasClass("dx-widget");t&&t.addClass(this.addWidgetPrefix(L));const d=new b.default(t||(0,r.default)("<div>"),{name:n.caption,validationRules:(0,c.extend)(!0,[],n.validationRules),validationGroup:o,adapter:l?null:{getValue:a,applyValidationResults:e=>{this.applyValidationResult(t,e)}},dataGetter(){const e=null==o?void 0:o.key,t=i.getChangeByKey(e),a=i._getOldData(e);return{data:(0,s.createObjectWithChanges)(a,null==t?void 0:t.data),column:n}},onInitialized:this.validatorInitialized.bind(this),onDisposing:this.validatorDisposing.bind(this)});if(l){const t=d.option("adapter");if(t){const n=t.bypass,o=()=>e.row.isNewRow&&!this._isValidationInProgress&&!i.isCellModified(e);t.getValue=a,t.validationRequestsCallbacks=[],t.bypass=()=>n.call(t)||o()}}return d}}setDisableApplyValidationResults(e){this._disableApplyValidationResults=e}getDisableApplyValidationResults(){return this._disableApplyValidationResults}isCurrentValidatorProcessing(e){let{rowKey:t,columnIndex:i}=e;return this._currentCellValidator&&(0,d.equalByValue)(this._currentCellValidator.option("validationGroup").key,t)&&this._currentCellValidator.option("dataGetter")().column.index===i}validateCell(e){const t={rowKey:e.option("validationGroup").key,columnIndex:e.option("dataGetter")().column.index,validationResult:null};let i=this.getCellValidationResult(t);const n=q(i),o=e.option("adapter");if(n){const t=o.getValue();(0,d.equalByValue)(t,i.value)||(i=e.validate())}else i=e.validate();const a=new u.Deferred;return n&&i.status===U&&(this.updateCellValidationResult(t),o.applyValidationResults(i)),(0,u.when)(i.complete||i).done((e=>{n&&o.applyValidationResults(e),a.resolve(e)})),a.promise()}updateCellValidationResult(e){let{rowKey:t,columnIndex:i,validationResult:n}=e;const o=this._getValidationData(t);if(!o)return;let a;if(o.validationResults||(o.validationResults={}),n){if(a=(0,c.extend)({},n),o.validationResults[i]=a,n.status===U&&(this._editingController.getEditMode()===W&&(a.deferred=new u.Deferred,a.complete.always((()=>{a.deferred.resolve()})),this._editingController.addDeferred(a.deferred)),this._disableApplyValidationResults))return void(a.disabledPendingId=n.id)}else a=o.validationResults[i];a&&a.disabledPendingId&&delete a.disabledPendingId}getCellValidationResult(e){var t;let{rowKey:i,columnIndex:n}=e;const o=this._getValidationData(i,!0);return null==o||null===(t=o.validationResults)||void 0===t?void 0:t[n]}removeCellValidationResult(e){let{change:t,columnIndex:i}=e;const n=this._getValidationData(null==t?void 0:t.key);n&&n.validationResults&&(this.cancelCellValidationResult({change:t,columnIndex:i}),delete n.validationResults[i])}cancelCellValidationResult(e){let{change:t,columnIndex:i}=e;const n=this._getValidationData(t.key);if(t&&n.validationResults){const e=n.validationResults[i];e&&(e.deferred&&e.deferred.reject(Z),n.validationResults[i]=Z)}}resetRowValidationResults(e){e&&(e.validationResults&&delete e.validationResults,delete e.validated)}isInvalidCell(e){let{rowKey:t,columnIndex:i}=e;const n=this.getCellValidationResult({rowKey:t,columnIndex:i});return q(n)&&n.status===j}getCellValidator(e){let{rowKey:t,columnIndex:i}=e;const n=this._getValidationData(t),o=n&&y.default.getGroupConfig(n),a=o&&o.validators;return a&&a.filter((e=>{const{column:t}=e.option("dataGetter")();return!!t&&t.index===i}))[0]}setCellValidationStatus(e){const t=this.getCellValidationResult({rowKey:e.key,columnIndex:e.column.index});(0,_.isDefined)(t)?e.validationStatus=t!==Z?t.status:Z:delete e.validationStatus}}t.ValidatingController=X;const Q=e=>class extends e{processDataItemTreeListHack(e){super.processDataItem.apply(this,arguments)}processItemsTreeListHack(e,t){return super.processItems.apply(this,arguments)}_addChange(e){const t=super._addChange.apply(this,arguments);return t&&"remove"!==e.type&&this._validatingController.updateValidationState(t),t}_handleChangesChange(e){super._handleChangesChange.apply(this,arguments),e.value.forEach((e=>{void 0===this._validatingController._getValidationData(e.key)&&this._validatingController.updateValidationState(e)}))}_updateRowAndPageIndices(){const e=this,t=e.getView("rowsView").getTopVisibleItemIndex();let i=t;(0,h.each)(e.getChanges(),((n,o)=>{let{key:a,type:s}=o;const r=this._validatingController._getValidationData(a);r&&!r.isValid&&r.pageIndex!==e._pageIndex&&(r.pageIndex=e._pageIndex,r.rowIndex=s===K?t:i,i++)}))}_getValidationGroupsInForm(e){return{validationGroup:this._validatingController._getValidationData(e.key,!0)}}_validateEditFormAfterUpdate(e,t){t&&this._editForm&&this._editForm.validate(),super._validateEditFormAfterUpdate.apply(this,arguments)}_prepareEditCell(e){const t=super._prepareEditCell.apply(this,arguments);return t&&e.column.showEditorAlways&&this._validatingController.updateValidationState({key:e.key}),t}processItems(e,t){const i=this.getChanges(),n=(e,t)=>{let i=-1;const n=e.type===K,{key:o}=e;return(0,h.each)(t,((e,t)=>{if((0,d.equalByValue)(o,n?t.key:this._dataController.keyOf(t)))return i=e,!1})),i},o=(e=super.processItems(e,t)).length;return this.getEditMode()===z&&"prepend"!==t&&"append"!==t&&i.forEach((t=>{const{key:i}=t,a=this._validatingController._getValidationData(i);a&&t.type&&a.pageIndex===this._pageIndex&&(null==t?void 0:t.pageIndex)!==this._pageIndex&&function(t,i){const a={key:t.key};if(n(t,e)>=0)return;i.rowIndex=i.rowIndex>o?i.rowIndex%o:i.rowIndex;const{rowIndex:s}=i;a[H]=1,e.splice(s,0,a)}(t,a)})),e}processDataItem(e){const t=e.data[H],i=t?e.data.key:e.key;if(this.getEditMode()===z&&t&&i){const t=this.getChanges(),n=I.default.getIndexByKey(i,t);if(n>=0){const o=t[n];if(o.type!==K){const t=this._getOldData(o.key);e.data=(0,c.extend)(!0,{},t,o.data),e.key=i}}}super.processDataItem.apply(this,arguments)}_createInvisibleColumnValidators(e){const t=this,i=this._columnsController.getColumns(),n=this._columnsController.getInvisibleColumns().filter((e=>!e.isBand)),o=this._columnsController.getGroupColumns().filter((e=>!e.showWhenGrouped&&-1===n.indexOf(e))),a=[],r=(e,t)=>this._dataController.getRowIndexByKey(t)>=0&&n.indexOf(e)<0;return n.push(...o),$.includes(this.getEditMode())||(0,h.each)(i,((i,n)=>{e.forEach((e=>{let i;if(!r(n,e.key)){if(e.type===K)i=e.data;else if("update"===e.type){const n=t._getOldData(e.key);if(!(0,_.isDefined)(n))return;i=(0,s.createObjectWithChanges)(n,e.data)}if(i){const t=this._validatingController.createValidator({column:n,key:e.key,value:n.calculateCellValue(i)});t&&a.push(t)}}}))})),function(){a.forEach((e=>{e.dispose()}))}}_beforeSaveEditData(e,t){let i=super._beforeSaveEditData.apply(this,arguments);const n=this._validatingController._getValidationData(null==e?void 0:e.key);if(e){const t="remove"===e.type||n.isValid;i=i||!t}else{const e=this._createInvisibleColumnValidators(this.getChanges());i=new u.Deferred,this.executeOperation(i,(()=>{this._validatingController.validate(!0).done((t=>{switch(e(),this._updateRowAndPageIndices(),this.getEditMode()){case W:t||this._focusEditingCell();break;case z:t||(this._resetEditRowKey(),this._resetEditColumnName(),this._dataController.updateItems())}i.resolve(!t)}))}))}return i.promise?i.promise():i}_beforeEditCell(e,t,i){const n=super._beforeEditCell(e,t,i);if(this.getEditMode()===W){const i=this._rowsView._getCellElement(e,t),o=i&&i.data("dxValidator"),a=i&&i.closest(".dx-row").data("options"),s=o&&o.option("adapter").getValue();if(o&&Y(s,a)){const e=new u.Deferred;return(0,u.when)(this._validatingController.validateCell(o),n).done(((t,i)=>{e.resolve(t.status===G&&i)})),e.promise()}if(!o)return n}return!1}_afterSaveEditData(e){let t;const i=this.getEditMode()===W;if((0,h.each)(this.getChanges(),((e,i)=>{const n=this._showErrorRow(i);t=t||n})),t){const e=this._rowsView.getScrollable();e&&(e.update(),e.scrollToElement(t))}if(e&&i&&this._needUpdateRow()){const e=this.getEditRowIndex();this._dataController.updateItems({changeType:"update",rowIndices:[e]}),this._focusEditingCell()}else if(!e){let e=!0;if(i){e=!(this._columnsController.getColumns().filter((e=>{var t;return e.showEditorAlways&&(null===(t=e.validationRules)||void 0===t?void 0:t.length)>0})).length>0)}e&&this._validatingController.initValidationState()}}_handleDataChanged(e){const t=this._validatingController._validationState;"standard"===this.option("scrolling.mode")&&this.resetRowAndPageIndices(),"prepend"===e.changeType&&(0,h.each)(t,((t,i)=>{i.rowIndex+=e.items.length})),super._handleDataChanged(e)}resetRowAndPageIndices(){const e=this._validatingController._validationState;(0,h.each)(e,((e,t)=>{t.pageIndex!==this._pageIndex&&(delete t.pageIndex,delete t.rowIndex)}))}_beforeCancelEditData(){this._validatingController.initValidationState(),super._beforeCancelEditData()}_showErrorRow(e){let t;const i=this._dataController.items(),n=this.getIndexByKey(e.key,i),o=this._validatingController._getValidationData(e.key);if((null==o||!o.isValid)&&null!=o&&o.errorText&&n>=0)return t=this.getPopupContent(),this._errorHandlingController&&this._errorHandlingController.renderErrorRow(null==o?void 0:o.errorText,n,t)}updateFieldValue(e){const t=new u.Deferred;return this._validatingController.removeCellValidationResult({change:this.getChangeByKey(e.key),columnIndex:e.column.index}),super.updateFieldValue.apply(this,arguments).done((()=>{const i=this._validatingController.getCellValidator({rowKey:e.key,columnIndex:e.column.index});(0,u.when)(i&&this._validatingController.validateCell(i)).done((e=>{this._editorFactoryController.refocus(),t.resolve(e)}))})),t.promise()}highlightDataCell(e,t){super.highlightDataCell.apply(this,arguments),this._validatingController.setCellValidationStatus(t);const i=!!t.setValue,n=this.isCellModified(t),o=(0,_.isDefined)(t.validationStatus);if(n&&t.column.setCellValue||i&&!n&&!(t.row.isNewRow||!o)){const i=e.data("dxValidator");i&&(0,u.when)(this._validatingController.validateCell(i)).done((()=>{this._validatingController.setCellValidationStatus(t)}))}}getChangeByKey(e){const t=this.getChanges();return t[I.default.getIndexByKey(e,t)]}isCellModified(e){const t=super.isCellModified(e),i=this.getChangeByKey(e.key),n=!!e.row&&this._validatingController.isInvalidCell({rowKey:e.key,columnIndex:e.column.index});return t||this._validatingController._rowIsValidated(i)&&n}};t.validatingEditingExtender=Q;const J=e=>class extends e{_showRevertButton(e){var t,i;let n=null===(t=this._revertTooltip)||void 0===t?void 0:t.$element();var o,s;if(!e||!e.length)return null===(o=n)||void 0===o||o.remove(),void(this._revertTooltip=void 0);if(e.find(n).length)return void(null===(s=this._revertTooltip)||void 0===s||s.repaint());const l=this.getRevertButtonContainer(e),d=this.addWidgetPrefix(A);null===(i=n)||void 0===i||i.remove(),n=(0,r.default)("<div>").addClass(d).appendTo(e);const u={animation:null,visible:!0,width:"auto",height:"auto",shading:!1,container:l,propagateOutsideClick:!0,hideOnOutsideClick:!1,wrapperAttr:{class:d},contentTemplate:()=>{const e=(0,r.default)("<div>").addClass("dx-revert-button"),t={icon:"revert",hint:this.option("editing.texts.validationCancelChanges"),elementAttr:{id:R,"aria-label":a.default.format("dxDataGrid-ariaRevertButton")},onClick:()=>{this._editingController.cancelEditData()}};return new f.default(e,t).$element()},position:{my:"left top",at:"right top",offset:"1 0",collision:"flip",boundaryOffset:"0 0",boundary:this._rowsView.element(),of:e},onPositioned:this.overlayPositionedHandler.bind(this)};this._revertTooltip=new v.default(n,u)}_hideFixedGroupCell(e,t){var i,n;let o,a;const s=null===(i=this._rowsView)||void 0===i||null===(n=i.isFixedColumns)||void 0===n?void 0:n.call(i),l=this._editingController.isFormOrPopupEditMode();if(s&&!l){const i=e.closest(".dx-row").next().data("options");i&&"group"===i.rowType&&(o=(0,r.default)(this._rowsView.getRowElement(i.rowIndex)).last(),a=o.find(".dx-group-cell"),a.length&&"hidden"!==a.get(0).style.visibility&&(a.css("visibility","hidden"),t.onDisposing=function(){a.css("visibility","")}))}}_showValidationMessage(e,t,i){const n=e.find(".dx-dropdowneditor-overlay").data("dxPopup"),o=n&&n.option("visible"),a=o?"top right":`top ${i}`,s=o?"top left":`bottom ${i}`,d=this.getValidationMessageContainer(e);let u="";t&&t.forEach((e=>{u+=(u.length?"<br/>":"")+(0,g.encodeHtml)(e)}));const c=this.addWidgetPrefix(k);this._rowsView.element().find(`.${c}`).remove();const h=(0,r.default)("<div>").addClass(O).addClass(M).addClass(c).html(u).appendTo(e),p={container:d,shading:!1,width:"auto",height:"auto",visible:!0,animation:!1,propagateOutsideClick:!0,hideOnOutsideClick:!1,wrapperAttr:{id:P,class:`${O} ${M} ${c}`},position:{collision:"flip",boundary:this._rowsView.element(),boundaryOffset:"0 0",offset:{x:0,y:!o&&l.default.mozilla?-1:0},my:a,at:s,of:e},onPositioned:t=>{this.overlayPositionedHandler(t,o),this._shiftValidationMessageIfNeed(t.component.$content(),e)}};this._hideFixedGroupCell(e,p),new v.default(h,p)}getValidationMessages(){var e;return null===(e=this._rowsView.element())||void 0===e?void 0:e.find(this._getValidationMessagesSelector())}getRevertButton(){var e;return(0,r.default)(null===(e=this._revertTooltip)||void 0===e?void 0:e.element())}_hideValidationMessage(){var e;const t=null===(e=this._rowsView.element())||void 0===e?void 0:e.find(this._getValidationMessagesSelector());null==t||t.remove()}_normalizeValidationMessagePositionAndMaxWidth(e,t,i){const n=this._columnsController.getFixedColumns();if(!n||!n.length)return;let o;const a=!t&&function(e,t){const i=(0,r.default)(t).closest("tr").index(),n=(0,r.default)(e._rowsView.getRowElement(i)).first().children().filter(":not(.dx-hidden-cell)");return e._rowsView._getWidths(n).reduce(((e,t)=>e+t),0)}(this,e.element),s=e.component.$content(),l=(0,p.getOuterWidth)(s,!0),d=!t&&l>a,u=this._rowsView.getCellIndex((0,r.default)(e.element).closest("td")),c=function(e){let t,i;return e.some(((n,o)=>{if("transparent"===n.command)return t=0===o?-1:o,i=o===e.length-1?-1:o+n.colspan-1,!0})),{startColumnIndex:t,endColumnIndex:i}}(n);return t||u!==c.startColumnIndex&&!d?u===c.endColumnIndex&&(o={collision:"none flip",my:"top right",at:t||i?"top left":"bottom right"},t&&(o.offset="-1 0")):o={collision:"none flip",my:"top left",at:i?"top right":"bottom left"},o&&{position:o,maxWidth:d?a-2:void 0}}_shiftValidationMessageIfNeed(e,t){const i=this._revertTooltip&&this._revertTooltip.$content();if(!i)return;const n=e.offset(),o=i.offset();if(n.top===o.top&&n.left+(0,p.getWidth)(e)>o.left){const n=(0,p.getWidth)(i)+2;e.css("left",o.left<t.offset().left?-n:n)}}getOverlayBaseZIndex(){return v.default.baseZIndex()}overlayPositionedHandler(e,t){if(!e.component.__skipPositionProcessing){const i=(0,r.default)(e.element).hasClass(this.addWidgetPrefix(A)),n=!i&&this._rowsView.updateFreeSpaceRowHeight(),o=this._normalizeValidationMessagePositionAndMaxWidth(e,i,t);e.component.__skipPositionProcessing=!(!n&&!o),o?e.component.option(o):n&&e.component.repaint()}}_getRevertTooltipsSelector(){return`.dx-editor-cell .${this.addWidgetPrefix(A)}`}_getValidationMessagesSelector(){const e=this.addWidgetPrefix(k);return`.dx-editor-cell .${e}, .dx-cell-modified .${e}`}loseFocus(e){e||this._validatingController.setValidator(null),super.loseFocus()}updateCellState(e,t,i){var n;const o=null==e?void 0:e.closest(this._getFocusCellSelector()),a=null!=o&&o.is("td")?o:null,s=null==o?void 0:o.closest(".dx-row").data("options"),r=s?this._editingController.getChangeByKey(s.key):null,l=a&&this._columnsController.getVisibleColumns()[a.index()],d=void 0!==(null==r||null===(n=r.data)||void 0===n?void 0:n[null==l?void 0:l.name])&&!this._editingController.isSaving(),u=[];this._editingController.getEditMode()===W&&((null==t?void 0:t.status)===j||d?(this._showRevertButton(o),u.push(R)):this._revertTooltip&&this._revertTooltip.$element().remove());if(t&&t.status===j&&a&&l&&t&&t.brokenRules){const e=[];t.brokenRules.forEach((t=>{t.message&&e.push(t.message)})),e.length&&(this._showValidationMessage(o,e,l.alignment||"left"),u.push(P))}this._updateAriaValidationAttributes(o,u),!i&&this._rowsView.element()&&this._rowsView.updateFreeSpaceRowHeight()}_updateAriaValidationAttributes(e,t){if(0===t.length)return;const i=this._editingController.getEditMode();if([W,z,N].includes(i)){const i=this._getCurrentFocusElement(e);i.attr("aria-labelledby",t.join(" ")),i.attr("aria-invalid",!0)}}_getCurrentFocusElement(e){return this._editingController.isEditing()?e.find(S.EDITORS_INPUT_SELECTOR).first():e}focus(e,t){if(!arguments.length)return super.focus();if(this._hideValidationMessage(),null!=e&&e.hasClass("dx-row")||null!=e&&e.hasClass("dx-master-detail-cell"))return super.focus(e,t);const i=null==e?void 0:e.closest(this._getFocusCellSelector()),n=i&&(i.data("dxValidator")||e.find(`.${this.addWidgetPrefix(L)}`).eq(0).data("dxValidator")),o=i&&i.closest(".dx-row").data("options"),a=o?this._editingController.getChangeByKey(o.key):null;let s;if(n){this._validatingController.setValidator(n);const i=n.option("adapter").getValue();if(Y(i,o)||this._validatingController._rowIsValidated(a))return this._editingController.waitForDeferredOperations().done((()=>{!this._rowsView.isElementInside(e)||(0,u.when)(this._validatingController.validateCell(n)).done((i=>{s=i;const{column:n}=s.validator.option("dataGetter")();a&&n&&!this._validatingController.isCurrentValidatorProcessing({rowKey:a.key,columnIndex:n.index})||((0,C.isFluent)((0,C.current)())||s.status!==j||(t=!0),this.updateCellState(e,s,t),super.focus.call(this,e,t))}))})),super.focus(e,t)}return this.updateCellState(e,s,t),super.focus(e,t)}getEditorInstance(e){const t=e.find(".dx-texteditor").eq(0);return I.default.getWidgetInstance(t)}getValidationMessageContainer(e){return e.closest(`.${this.addWidgetPrefix(F)}`)}getRevertButtonContainer(e){return e.closest(`.${this.addWidgetPrefix(F)}`).parent()}hasOverlayElements(){const e=this.getValidationMessages(),t=this.getRevertButton();return super.hasOverlayElements()||!(null==e||!e.length)||!(null==t||!t.length)}};t.validatingEditorFactoryExtender=J;const ee=e=>class extends e{_getValidationStatus(e){return(q(e)?e.status:e)||G}_isCellChanged(e,t,i,n,o){var a,s;const l=null===(a=e.cells)||void 0===a?void 0:a[n],d=this._getValidationStatus({status:null==l?void 0:l.validationStatus}),u=this._validatingController.getCellValidationResult({rowKey:e.key,columnIndex:n}),c=this._validatingController._getValidationData(e.key),h=this._getValidationStatus(u),p=JSON.stringify(t.modifiedValues)!==JSON.stringify(e.modifiedValues),g=d!==h&&p,_=(0,r.default)(null==l?void 0:l.cellElement).hasClass(this.addWidgetPrefix(T)),f=null==l||null===(s=l.column.validationRules)||void 0===s?void 0:s.length,m=e.isEditing!==t.isEditing&&f,v=g||c.isValid&&_;return!(!m&&!v)||super._isCellChanged.apply(this,arguments)}};t.validatingDataControllerExtender=ee;const te=e=>class extends e{updateFreeSpaceRowHeight(e){const t=this;let i,n,o;const a=t.element(),s=a&&a.find(`.${t.addWidgetPrefix(k)} .dx-overlay-content`);if(super.updateFreeSpaceRowHeight(e),s&&s.length&&(i=t._getRowElements(),o=t._getFreeSpaceRowElements(e),n=o.first(),n&&1===i.length&&(!n.is(":visible")||(0,p.getOuterHeight)(s)>(0,p.getOuterHeight)(n))))return o.show(),(0,p.setHeight)(o,(0,p.getOuterHeight)(s)),!0}_formItemPrepared(e,t){super._formItemPrepared.apply(this,arguments),(0,d.deferUpdate)((()=>{const i=t.find(".dx-widget").first();i.length&&!i.children().length||this._validatingController.createValidator(e,i)}))}_cellPrepared(e,t){this._editingController.isFormOrPopupEditMode()||this._validatingController.createValidator(t,e),super._cellPrepared.apply(this,arguments)}_restoreErrorRow(e){this._editingController&&this._editingController.hasChanges()&&this._getRowElements(e).each(((e,t)=>{const i=(0,r.default)(t).data("options");if(i){const e=this._editingController.getChangeByKey(i.key);e&&this._editingController._showErrorRow(e)}}))}};t.validatingRowsViewExtender=te;t.validatingModule={defaultOptions:()=>({editing:{texts:{validationCancelChanges:a.default.format("dxDataGrid-validationCancelChanges")}}}),controllers:{validating:X},extenders:{controllers:{editing:Q,editorFactory:J,data:ee},views:{rowsView:te}}}},34049:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.A11yStatusContainerComponent=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n};const a="dx-gridbase-a11y-status-container";t.A11yStatusContainerComponent=e=>{let{statusText:t}=e;return(0,o.default)("<div>").text(t??"").addClass(a).attr("role","status")}},48921:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeWidth=t.ColumnsView=void 0;var n=i(64044),o=T(i(92774)),a=i(5636),s=T(i(89797)),r=i(28630),l=T(i(64960)),d=i(61404),u=i(74663),c=T(i(19427)),h=T(i(64553)),p=T(i(48314)),g=i(17781),_=i(87739),f=i(52576),m=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=E(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(21274)),v=i(41639),C=i(57653),y=i(58515),b=i(11528),x=i(3104),w=T(i(85991)),S=i(96790),D=T(i(74854)),I=T(i(53226));function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(E=function(e){return e?i:t})(e)}function T(e){return e&&e.__esModule?e:{default:e}}const A="scroll-container",O="dx-row",P="dx-group-row",k="dx-master-detail-row",M="0.0001px",R="dxCellHintVisible",L={render(e){e.container.append(e.content)}},B=function(e){return"auto"===e?"":(0,b.isNumeric)(e)?`${e}px`:e},V=function(e){e.resolve()},F=e=>"number"==typeof e?`${e.toFixed(3)}px`:"adaptiveHidden"===e?M:e;t.normalizeWidth=F;class H extends((0,S.ColumnStateMixin)(D.default.View)){init(){this._scrollLeft=-1,this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._columnChooserController=this.getController("columnChooser"),this._editorFactoryController=this.getController("editorFactory"),this._selectionController=this.getController("selection"),this._columnChooserView=this.getView("columnChooserView"),this._delayedTemplates=[],this._templateDeferreds=new Set,this._templatesCache={},this._templateTimeouts=new Set,this.createAction("onCellClick"),this.createAction("onRowClick"),this.createAction("onCellDblClick"),this.createAction("onRowDblClick"),this.createAction("onCellHoverChanged",{excludeValidators:["disabled","readOnly"]}),this.createAction("onCellPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this.createAction("onRowPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering",afterExecute:e=>{this._afterRowPrepared(e)}}),this._columnsController.columnsChanged.add(this._columnOptionChanged.bind(this)),this._dataController&&this._dataController.changed.add(this._handleDataChanged.bind(this))}dispose(){if((0,x.hasWindow)()){var e,t;const i=(0,x.getWindow)();null===(e=this._templateTimeouts)||void 0===e||e.forEach((e=>i.clearTimeout(e))),null===(t=this._templateTimeouts)||void 0===t||t.clear()}}optionChanged(e){switch(super.optionChanged(e),e.name){case"cellHintEnabled":case"onCellPrepared":case"onRowPrepared":case"onCellHoverChanged":this._invalidate(!0,!0),e.handled=!0;break;case"keyboardNavigation":"keyboardNavigation.enabled"===e.fullName&&this._invalidate(!0,!0),e.handled=!0}}_createScrollableOptions(){const e=this.option("scrolling");let t=this.option("scrolling.useNative");const i=(0,f.extend)({},e,{direction:"both",bounceEnabled:!1,useKeyboard:!1});return void 0===t&&(t=!0),"auto"===t?(delete i.useNative,delete i.useSimulatedScrollbar):(i.useNative=!!t,i.useSimulatedScrollbar=!t),i}_updateCell(e,t){t.rowType&&this._cellPrepared(e,t)}_needToSetCellWidths(){return this.option("columnAutoWidth")}_createCell(e){const{column:t}=e,i=t.alignment||(0,v.getDefaultAlignment)(this.option("rtlEnabled")),n=this._needToSetCellWidths(),o=l.default.createElement("td");o.style.textAlign=i;const a=(0,h.default)(o);return"data"===e.rowType&&t.headerId&&!t.type&&this.component.option("showColumnHeaders")&&this.setAria("describedby",t.headerId,a),t.cssClass&&a.addClass(t.cssClass),Array.isArray(t.elementAttr)&&t.elementAttr.forEach((e=>{let{name:t,value:i}=e;a.attr(t,i)})),"expand"===t.command&&(a.addClass(t.cssClass),a.addClass(this.addWidgetPrefix("group-space"))),t.colspan>1?a.attr("colSpan",t.colspan):!t.isBand&&"auto"!==t.visibleWidth&&n&&((t.width||t.minWidth)&&(o.style.minWidth=B(t.minWidth||t.width)),t.width&&function(e,t,i){e.style.width=e.style.maxWidth="auto"===t.width?"":i}(o,t,B(t.width))),a}_createRow(e,t){t=t||"tr";const i=(0,h.default)(`<${t}>`).addClass(O);return"tr"===t&&this.setAria("role","row",i),i}_isAltRow(e){return e&&e.dataIndex%2==1}_createTable(e,t){const i=(0,h.default)("<table>").addClass(this.addWidgetPrefix("table")).addClass(this.addWidgetPrefix("table-fixed"));if(e&&!t?(i.attr("id",`dx-${new c.default}`).append(this._createColGroup(e)),p.default.safari&&i.append((0,h.default)("<thead>").append("<tr>")),this.setAria("role","presentation",i)):this.setAria("hidden",!0,i),this.setAria("role","presentation",(0,h.default)("<tbody>").appendTo(i)),t)return i;p.default.mozilla&&o.default.on(i,"mousedown","td",(e=>{e.ctrlKey&&e.preventDefault()})),this.option("cellHintEnabled")&&o.default.on(i,"mousemove",".dx-row > td",this.createAction((e=>{const t=e.event,i=(0,h.default)(t.target),n=(0,h.default)(t.currentTarget),o=n.parent(),a=this._columnsController.getVisibleColumns(),s=o.data("options"),r=n.index(),l=s&&s.cells&&s.cells[r],d=l?l.column:a[r],u=o.hasClass("dx-header-row"),c=o.hasClass("dx-data-row"),p=o.hasClass(k),g=o.hasClass(P),_=o.hasClass(this.addWidgetPrefix("filter-row")),f=c&&(!d||d.cellTemplate),m=c&&l&&(s.isEditing||l.isEditing||(null==d?void 0:d.showEditorAlways)),v=u&&(!d||d.headerCellTemplate),C=g&&(!d||d.groupIndex&&d.groupCellTemplate);if(!(p||_||m||f||v||C)){i.data(R)&&(i.removeAttr("title"),i.data(R,!1));i[0].scrollWidth-i[0].clientWidth>0&&!(0,b.isDefined)(i.attr("title"))&&(i.attr("title",i.text()),i.data(R,!0))}})));const r=e=>{const t=(0,h.default)(e.currentTarget),i=(0,h.default)(e.target).closest(".dx-field-item-content"),n=t.parent(),o=n.data("options"),a=o&&o.cells&&o.cells[t.index()];if(!t.closest("table").is(e.delegateTarget))return;const s=(0,f.extend)({},a,{cellElement:(0,d.getPublicElement)(t),event:e,eventType:e.type});if(s.rowIndex=this.getRowIndex(n),i.length){const e=i.data("dx-form-item");e.column&&(s.column=e.column,s.columnIndex=this._columnsController.getVisibleIndex(s.column.index))}return s};return o.default.on(i,"mouseover",".dx-row > td",(e=>{const t=r(e);t&&this.executeAction("onCellHoverChanged",t)})),o.default.on(i,"mouseout",".dx-row > td",(e=>{const t=r(e);t&&this.executeAction("onCellHoverChanged",t)})),o.default.on(i,n.name,".dx-row > td",(e=>{const t=r(e);t&&this.executeAction("onCellClick",t)})),o.default.on(i,a.name,".dx-row > td",(e=>{const t=r(e);t&&this.executeAction("onCellDblClick",t)})),function(e,t){let i,r,l;function u(e){return setTimeout((()=>{i=r=null}),e)}o.default.on(t,"touchstart touchend",".dx-row",(e=>{clearTimeout(l),"touchstart"===e.type?(i=e.target,r=e.currentTarget,l=u(1e3)):l=u()})),o.default.on(t,[n.name,a.name,s.default.down].join(" "),".dx-row",e.createAction((t=>{const{event:o}=t;i&&(o.target=i,o.currentTarget=r),(0,h.default)(o.target).closest("a").length||(t.rowIndex=e.getRowIndex(o.currentTarget),t.rowIndex>=0&&(t.rowElement=(0,d.getPublicElement)((0,h.default)(o.currentTarget)),t.columns=e.getColumns(),o.type===s.default.down?e._rowPointerDown(t):o.type===n.name?e._rowClick(t):e._rowDblClick(t)))})))}(this,i),i}_rowPointerDown(e){}_rowClick(){}_rowDblClick(){}_createColGroup(e){const t=(0,h.default)("<colgroup>");for(let i=0;i<e.length;i++){const n=e[i].colspan||1;for(let o=0;o<n;o++)t.append(this._createCol(e[i]))}return t}_createCol(e){let t=e.visibleWidth||e.width;"adaptiveHidden"===t&&(t=M);const i=(0,h.default)("<col>");return(0,y.setWidth)(i,t),i}renderDelayedTemplates(e){const t=this._delayedTemplates,i=t.filter((e=>!e.async)),n=t.filter((e=>e.async));this._delayedTemplates=[],this._renderDelayedTemplatesCore(i,!1,e),this._renderDelayedTemplatesCoreAsync(n)}_renderDelayedTemplatesCoreAsync(e){if(e.length){const t=(0,x.getWindow)().setTimeout((()=>{this._templateTimeouts.delete(t),this._renderDelayedTemplatesCore(e,!0)}));this._templateTimeouts.add(t)}}_renderDelayedTemplatesCore(e,t,i){const n=new Date;for(;e.length;){const o=e.shift(),{options:a}=o,s=l.default.getRootNode((0,h.default)(a.container).get(0)),r=this.needWaitAsyncTemplates();if((!t||(0,h.default)(a.container).closest(s).length||r)&&(i&&(a.change=i),o.template.render(a)),t&&new Date-n>30){this._renderDelayedTemplatesCoreAsync(e);break}}!e.length&&this._delayedTemplates.length&&this.renderDelayedTemplates()}_processTemplate(e,t){const i=this;let n;if(e&&e.render&&!(0,b.isRenderer)(e))n={allowRenderToDetachedContainer:e.allowRenderToDetachedContainer,render(t){e.render(t.container,t.model,t.change),t.deferred&&t.deferred.resolve()}};else if((0,b.isFunction)(e))n={render(t){const i=e((0,d.getPublicElement)(t.container),t.model,t.change);i&&(i.nodeType||(0,b.isRenderer)(i))&&t.container.append(i),t.deferred&&t.deferred.resolve()}};else{const t=(0,b.isString)(e)?e:(0,h.default)(e).attr("id");t?(i._templatesCache[t]||(i._templatesCache[t]=i.getTemplate(e)),n=i._templatesCache[t]):n=i.getTemplate(e)}return n}renderTemplate(e,t,i,n,a){const s=this._processTemplate(t,i),{column:l}=i,d="data"===i.rowType,u=new _.Deferred,c={container:e,model:i,deferred:u,onRendered:()=>{this.isDisposed()?u.reject():u.resolve()}};if(s){i.component=this.component;const t=l&&(l.renderAsync&&d||this.option("renderAsync")&&(!1!==l.renderAsync&&(l.command||l.showEditorAlways)&&d||"filter"===i.rowType)),a=i.renderAsync??t;!s.allowRenderToDetachedContainer&&!n||a?this._delayedTemplates.push({template:s,options:c,async:a}):s.render(c),this._templateDeferreds.add(u),o.default.on(e,r.removeEvent,V.bind(null,u))}else u.reject();return u.promise().always((()=>{this._templateDeferreds.delete(u)}))}_getBodies(e){return(0,h.default)(e).children("tbody").not(".dx-header").not(".dx-footer")}_needWrapRow(e){var t;return!!this.option().rowTemplate&&!(null===(t=this._getBodies(e))||void 0===t||!t.filter(`.${O}`).length)}_wrapRowIfNeed(e,t,i){const n=i?e||this._tableElement:this._tableElement||e;if(this._needWrapRow(n)){const e=(0,h.default)("<tbody>").addClass(t.attr("class"));return this.setAria("role","presentation",e),e.append(t)}return t}_appendRow(e,t,i){(i=i||L).render({content:t,container:e})}_resizeCore(){const e=this._scrollLeft;e>=0&&(this._scrollLeft=0,this.scrollTo({left:e}))}_renderCore(e){const t=this.element().parent();t&&!t.parent().length||this.renderDelayedTemplates(e)}_renderTable(e){(e=e||{}).columns=this._columnsController.getVisibleColumns();const t=e.change&&e.change.changeType,i=this._createTable(e.columns,"append"===t||"prepend"===t||"update"===t);return this._renderRows(i,e),i}_renderRows(e,t){const i=this,n=i._getRows(t.change),o=t.change&&t.change.columnIndices||[],a=t.change&&t.change.changeTypes||[];for(let s=0;s<n.length;s++)i._renderRow(e,(0,f.extend)({row:n[s],columnIndices:o[s],changeType:a[s]},t))}_renderRow(e,t){t.columnIndices||(t.row.cells=[]);const i=this._createRow(t.row),n=this._wrapRowIfNeed(e,i);"remove"!==t.changeType&&this._renderCells(i,t),this._appendRow(e,n);const o=(0,f.extend)({columns:t.columns},t.row);this._addWatchMethod(o,t.row),this._rowPrepared(n,o,t.row)}_needRenderCell(e,t){return!t||t.indexOf(e)>=0}_renderCells(e,t){const i=this;let n=0;const{row:o}=t,{columns:a}=t;for(let s=0;s<a.length;s++)this._needRenderCell(s,t.columnIndices)&&i._renderCell(e,(0,f.extend)({column:a[s],columnIndex:n,value:o.values&&o.values[n],oldValue:o.oldValues&&o.oldValues[n]},t)),a[s].colspan>1?n+=a[s].colspan:n++}_updateCells(e,t,i,n){var o;const a=this,s=e.children(),r=t.children(),l=this.option("highlightChanges"),d=this.addWidgetPrefix("cell-updated-animation");null!=n&&null!==(o=n.node)&&void 0!==o&&o.hasChildren&&s.each((function(){a.setAria("expanded",n.isExpanded,(0,h.default)(this))})),i.forEach(((e,t)=>{const i=s.eq(e),n=r.eq(t);i.replaceWith(n),l&&!n.hasClass("dx-command-expand")&&n.addClass(d)})),function(e,t){if(!e||!t)return;const i=e.attributes,n=t.attributes;let o;for(o=0;o<i.length;o++){const n=i[o].nodeName;t.hasAttribute(n)||e.removeAttribute(n)}for(o=0;o<n.length;o++)e.setAttribute(n[o].nodeName,n[o].nodeValue)}(e.get(0),t.get(0))}_setCellAriaAttributes(e,t,i){if("freeSpace"!==t.rowType){var n;if(this.setAria("role","gridcell",e),null!=i&&null!==(n=i.row)&&void 0!==n&&null!==(n=n.node)&&void 0!==n&&n.hasChildren){const{row:t}=i;this.setAria("expanded",t.isExpanded,e)}const o=this._columnsController.getColumnIndexOffset(),a=t.columnIndex+o+1;this.setAria("colindex",a,e)}}_renderCell(e,t){const i=this._getCellOptions(t);if(t.columnIndices){if(t.row.cells){const e=t.row.cells.findIndex((e=>e.columnIndex===i.columnIndex));t.row.cells[e]=i}}else t.row.cells.push(i);const n=this._createCell(i);return this._setCellAriaAttributes(n,i,t),this._renderCellContent(n,i,t),e.get(0).appendChild(n.get(0)),n}_renderCellContent(e,t,i){const n=this._getCellTemplate(t);(0,_.when)(!n||this.renderTemplate(e,n,t,void 0,i.change)).done((()=>{this._updateCell(e,t)}))}_getCellTemplate(e){}_getRows(e){return[]}_getCellOptions(e){const t={column:e.column,columnIndex:e.columnIndex,rowType:e.row.rowType,rowIndex:e.row.rowIndex,isAltRow:this._isAltRow(e.row)};return this._addWatchMethod(t),t}_addWatchMethod(e,t){if(!this.option("repaintChangesOnly"))return;const i=[];return(t=t||e).watch=t.watch||function(e,n,o){let a=e(t.data);const s=function(i){i&&o&&o(i);const s=e(t.data);JSON.stringify(a)!==JSON.stringify(s)&&(i&&n(s),a=s)};i.push(s);return function(){const e=i.indexOf(s);e>=0&&i.splice(e,1)}},t.update=t.update||function(t,n){t&&(this.data=e.data=t.data,this.rowIndex=e.rowIndex=t.rowIndex,this.dataIndex=e.dataIndex=t.dataIndex,this.isExpanded=e.isExpanded=t.isExpanded,e.row&&!n&&(e.row=t)),i.forEach((e=>{e(t)}))},t!==e&&(e.watch=t.watch.bind(t)),e}_cellPrepared(e,t){t.cellElement=(0,d.getPublicElement)((0,h.default)(e)),this.executeAction("onCellPrepared",t)}_rowPrepared(e,t,i){(0,u.data)(e.get(0),"options",t),t.rowElement=(0,d.getPublicElement)(e),this.executeAction("onRowPrepared",t)}_columnOptionChanged(e){const{optionNames:t}=e;if(I.default.checkChanges(t,["width","visibleWidth"])){const e=this._columnsController.getVisibleColumns().map((e=>e.visibleWidth||e.width));this.setColumnWidths({widths:e,optionNames:t})}else this._requireReady||this.render()}getCellIndex(e,t){return e.length?e[0].cellIndex:-1}getTableElements(){return this._tableElement||(0,h.default)()}getTableElement(e){return this._tableElement}setTableElement(e,t){this._tableElement=e}_afterRowPrepared(e){}_handleDataChanged(e){}callbackNames(){return["scrollChanged"]}_updateScrollLeftPosition(){const e=this._scrollLeft;e>=0&&(this._scrollLeft=0,this.scrollTo({left:e}))}scrollTo(e){const t=this.element(),i=t&&t.children(`.${this.addWidgetPrefix(A)}`).not(`.${this.addWidgetPrefix("content-fixed")}`);(0,b.isDefined)(e)&&(0,b.isDefined)(e.left)&&this._scrollLeft!==e.left&&(this._scrollLeft=e.left,i&&i.scrollLeft(e.left))}getContent(e){var t;return null===(t=this._tableElement)||void 0===t?void 0:t.parent()}_removeContent(e){const t=this.getContent(e);null!=t&&t.length&&t.remove()}_wrapTableInScrollContainer(e,t){const i=(0,h.default)("<div>"),n=this.option("scrolling.useNative");return(!1===n||"auto"===n&&!w.default.nativeScrolling)&&i.addClass(this.addWidgetPrefix("scrollable-simulated")),o.default.on(i,"scroll",(()=>{const e=i.scrollLeft();e!==this._scrollLeft&&this.scrollChanged.fire({left:e},this.name)})),i.addClass(this.addWidgetPrefix("content")).addClass(this.addWidgetPrefix(A)).append(e).appendTo(this.element()),this.setAria("role","presentation",i),i}needWaitAsyncTemplates(){return this.option("templatesRenderAsynchronously")&&!1===this.option("renderAsync")}waitAsyncTemplates(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=new _.Deferred;if(!(e||this.needWaitAsyncTemplates()))return t.resolve();const i=()=>_.when.apply(this,Array.from(this._templateDeferreds)).done((()=>{this.isDisposed()?t.reject():this._templateDeferreds.size>0?i():t.resolve()})).fail(t.reject);return i(),t.promise()}_updateContent(e,t,i){return this.waitAsyncTemplates().done((()=>{this._removeContent(i),this.setTableElement(e,i),this._wrapTableInScrollContainer(e,i)}))}_findContentElement(e){}_getWidths(e){if(!e)return[];const t=[];return e.toArray().forEach((e=>{let i=e.offsetWidth;if(e.getBoundingClientRect){const t=(0,v.getBoundingRect)(e);t.width>e.offsetWidth-1&&(i=t.width)}t.push(i)})),t}getColumnWidths(e,t){if((this.option("forceApplyBindings")||g.noop)(),e=e??this.getTableElement()){const t=e.children("tbody:not(.dx-header)").children();for(let e=0;e<t.length;e++){const i=t.eq(e),n=i.hasClass(P),o=i.hasClass(k),a=i.hasClass("dx-error-row");if("none"!==i.get(0).style.display&&!i.hasClass("dx-state-invisible")&&(!n&&!o&&!a)){const e=i.children("td");return this._getWidths(e)}}}return[]}getVisibleColumnIndex(e,t){return e}setCellPropertiesCore(e,t,i){const n=t.hasClass(P)?t.find(`td[aria-colindex='${i+1}']:not(.dx-group-cell)`):t.find("td").eq(i);for(let t=0;t<n.length;t+=1){const i=n.get(t);Object.assign(i.style,e)}}setCellProperties(e,t,i){const n=this.getTableElement();if(null==n||!n.length)return;const o=n.children().children(".dx-row").not(`.${k}`);if((0,b.isDefined)(i))this.setCellPropertiesCore(e,o.eq(i),t);else for(let i=0;i<o.length;i++){const n=this.getVisibleColumnIndex(t,i);n>=0&&this.setCellPropertiesCore(e,o.eq(i),n)}}setColumnWidths(e){let{widths:t,optionNames:i}=e;const n=this.getTableElement();if(null==n||!n.length||!t)return;const o=this.getColumns(),a=this._needToSetCellWidths(),s=n.children("colgroup").children("col");s.toArray().forEach((e=>e.removeAttribute("style"))),o.forEach(((e,i)=>{if(a&&e.width&&!e.command){const t={},n=B(e.visibleWidth||e.width),o=B(e.minWidth||n);t.width="auto"===e.width?"":n,t.maxWidth=t.width,t.minWidth=o,this.setCellProperties(t,i)}const n=F(t[i]);(0,b.isDefined)(n)&&(0,y.setWidth)(s.eq(i),n)}))}getCellElements(e){return this._getCellElementsCore(e)}_getCellElementsCore(e){if(e<0)return;return this._getRowElements().eq(e).children()}_getCellElement(e,t){const i=this.getCellElements(e),n=this._getVisibleColumnIndex(i,e,t);if(null==i||!i.length||n<0)return;const o=i.eq(n);return o.length>0?o:void 0}_getRowElement(e){const t=this;let i=(0,h.default)();const n=t.getTableElements();if(m.each(n,((n,o)=>{i=i.add(t._getRowElements((0,h.default)(o)).eq(e))})),i.length)return i}getCellElement(e,t){const i=this._getCellElement(e,t);if(i)return(0,d.getPublicElement)(i)}getRowElement(e){const t=this._getRowElement(e);let i=[];if(t&&!(0,d.getPublicElement)(t).get)for(let e=0;e<t.length;e++)i.push(t[e]);else i=t;return i}_getVisibleColumnIndex(e,t,i){if((0,b.isString)(i)){const e=this._columnsController.columnOption(i,"index");return this._columnsController.getVisibleIndex(e)}return i}getColumnElements(){}getColumns(e,t){return this._columnsController.getVisibleColumns(e)}getCell(e,t,i){const n=t||this._getRowElements();let o;var a;if(n.length>0&&e.rowIndex>=0&&("virtual"!==this.option("scrolling.mode")&&"virtual"!==this.option("scrolling.rowRenderingMode")&&(e.rowIndex=e.rowIndex<n.length?e.rowIndex:n.length-1),o=i||this.getCellElements(e.rowIndex),(null===(a=o)||void 0===a?void 0:a.length)>0))return o.eq(o.length>e.columnIndex?e.columnIndex:o.length-1)}getRowsCount(){const e=this.getTableElement();return e&&1===e.length?e[0].rows.length:0}_getRowElementsCore(e){if(e=e||this.getTableElement()){const t=(this.option().rowTemplate||this.option("dataRowTemplate"))&&e.find(`> tbody.${O}`);return t&&t.length?t:e.find(`> tbody > .${O}, > .${O}`)}return(0,h.default)()}_getRowElements(e){return this._getRowElementsCore(e)}getRowIndex(e){return this._getRowElements().index(e)}getBoundingRect(){}getName(){}setScrollerSpacing(e){const t=this.element(),i=this.option("rtlEnabled");t&&t.css({paddingLeft:i?e:"",paddingRight:i?"":e})}isScrollbarVisible(e){const t=this.element(),i=this._tableElement;return!(!t||!i)&&(e?(0,C.getOuterWidth)(i)-(0,C.getWidth)(t)>0:(0,C.getOuterHeight)(i)-(0,C.getHeight)(t)>0)}isDisposed(){var e;return null===(e=this.component)||void 0===e?void 0:e._disposed}}t.ColumnsView=H},33706:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.gridViewModule=t.SynchronizeScrollingController=t.ResizingController=t.GridView=void 0;var n=C(i(4671)),o=C(i(64960)),a=C(i(64553)),s=C(i(48314)),r=i(17781),l=i(87739),d=i(21274),u=i(41639),c=i(57653),h=i(11528),p=i(3104),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=v(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(16191)),_=i(34049),f=C(i(74854)),m=C(i(53226));function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(v=function(e){return e?i:t})(e)}function C(e){return e&&e.__esModule?e:{default:e}}const y="borders",b="dx-gridbase-container",x="adaptiveHidden",w=["columnsSeparatorView","blockSeparatorView","trackerView","headerPanel","columnHeadersView","rowsView","footerView","columnChooserView","filterPanelView","pagerView","draggingHeaderView","contextMenuView","errorView","headerFilterView","filterBuilderView"],S="e2e-a11y-general-status-container",D=function(e){return(0,h.isString)(e)&&e.endsWith("%")},I=function(e,t){const i=e._rowsView.contentWidth();return i-e._getTotalWidth(t,i)},E=function(e,t,i,n){return I(e,n.map(((e,n)=>n===t?i:e)))};class T extends f.default.ViewController{init(){this._prevContentMinHeight=null,this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._columnHeadersView=this.getView("columnHeadersView"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._editorFactoryController=this.getController("editorFactory"),this._footerView=this.getView("footerView"),this._rowsView=this.getView("rowsView"),this._gridView=this.getView("gridView")}_initPostRenderHandlers(){this._refreshSizesHandler||(this._refreshSizesHandler=e=>{let t=(new l.Deferred).resolve(null);const i=null==e?void 0:e.changeType,n=null==e?void 0:e.isDelayed,o=i&&"updateSelection"!==i&&"updateFocusedRow"!==i&&"pageIndex"!==i&&!n;this._dataController.changed.remove(this._refreshSizesHandler),this._checkSize()&&(t=this._refreshSizes(e)),o&&(0,l.when)(t).done((()=>{this._setAriaLabel(),this.fireContentReadyAction()}))},this._dataController.changed.add((()=>{this._dataController.changed.add(this._refreshSizesHandler)})))}_refreshSizes(e){let t=(new l.Deferred).resolve(null);const i=null==e?void 0:e.changeType,n=null==e?void 0:e.isDelayed,o=this._dataController.items();if(e&&"refresh"!==i&&"prepend"!==i&&"append"!==i){if("update"===i){var a;if(0===(null===(a=e.changeTypes)||void 0===a?void 0:a.length))return t;!(o.length>1||"insert"!==e.changeTypes[0])||0===o.length&&"remove"===e.changeTypes[0]||e.needUpdateDimensions?t=this.resize():(t=new l.Deferred,this._waitAsyncTemplates().done((()=>{(0,r.deferUpdate)((()=>(0,r.deferRender)((()=>(0,r.deferUpdate)((()=>{this._setScrollerSpacing(),this._rowsView.resize(),t.resolve()}))))))})).fail(t.reject))}}else n||(t=this.resize());return t}fireContentReadyAction(){this.component._fireContentReadyAction()}_getWidgetAriaLabel(){return"dxDataGrid-ariaDataGrid"}_setAriaLabel(){var e;const t=(null===(e=this._columnsController)||void 0===e||null===(e=e._columns)||void 0===e?void 0:e.filter((e=>{let{visible:t}=e;return!!t})).length)??0,i=Math.max(0,this._dataController.totalItemsCount()),o=this._getWidgetAriaLabel(),a=n.default.format(o,i,t),s=this.component.$element().children(`.${b}`),r=n.default.format(this._expandableWidgetAriaId),l=[a];r&&l.push(r),this.component.setAria("label",l.join(". "),s),this._gridView.setWidgetA11yStatusText(a)}_getBestFitWidths(){var e;const t=this._rowsView,i=this._columnHeadersView;let n=t.getColumnWidths();if(null===(e=n)||void 0===e||!e.length){var o;const e=i.getTableElement();i.setTableElement(null===(o=t.getTableElement())||void 0===o?void 0:o.children(".dx-header")),n=i.getColumnWidths(),i.setTableElement(e)}return n}_setVisibleWidths(e,t){const i=this._columnsController;i.beginUpdate(),(0,d.each)(e,((e,n)=>{const o=i.getColumnId(n);i.columnOption(o,"visibleWidth",t[e])})),i.endUpdate()}_toggleBestFitModeForView(e,t,i){if(!e||!e.isVisible())return;const n=this._rowsView.getTableElements(),o=e.getTableElements();(0,d.each)(n,((e,n)=>{let s;const r=(0,a.default)(n),l=o.eq(e);l&&l.length&&(s=i?l.children("tbody").appendTo(r):r.children(`.${t}`).appendTo(l),s.toggleClass(t,i),s.toggleClass(this.addWidgetPrefix("best-fit"),i))}))}_toggleBestFitMode(e){const t=this._rowsView.getTableElement(),i=this._rowsView.getTableElements().eq(1);t&&(t.css("tableLayout",e?"auto":"fixed"),t.children("colgroup").css("display",e?"none":""),(0,d.each)(i.find("tr.dx-group-row"),((t,i)=>{(0,a.default)(i).css("display",e?"none":"")})),i.toggleClass(this.addWidgetPrefix("table-fixed"),!e),this._toggleBestFitModeForView(this._columnHeadersView,"dx-header",e),this._toggleBestFitModeForView(this._footerView,"dx-footer",e),this._needStretch()&&(t.get(0).style.width=e?"auto":""))}_toggleContentMinHeight(e){const t=this._rowsView.getScrollable(),i=this._rowsView._findContentElement();!1===(null==t?void 0:t.option("useNative"))&&(!0===e&&(this._prevContentMinHeight=i.get(0).style.minHeight),(0,h.isDefined)(this._prevContentMinHeight)&&i.css({minHeight:e?m.default.getContentHeightLimit(s.default):this._prevContentMinHeight}))}_synchronizeColumns(){const e=this._columnsController,t=e.getVisibleColumns(),i=this.option("columnAutoWidth"),n=this.option("wordWrapEnabled"),a=t.some((e=>!(0,h.isDefined)(e.width)));let s,l,c,p=this._needBestFit(),_=!1,f=!1,v=[];!p&&(0,d.each)(t,((e,t)=>{if("auto"===t.width)return p=!0,!1})),(0,d.each)(t,((e,t)=>{if(t.minWidth)return _=!0,!1})),this._setVisibleWidths(t,[]);const C=this.component.$element();p&&(l=o.default.getActiveElement(C.get(0)),c=m.default.getSelectionRange(l),this._toggleBestFitMode(!0),s=!0),this._toggleContentMinHeight(n),C&&C.get(0)&&this._maxWidth&&(delete this._maxWidth,C[0].style.maxWidth=""),(0,r.deferUpdate)((()=>{if(p?(v=this._getBestFitWidths(),(0,d.each)(t,((t,i)=>{const n=e.getColumnId(i);e.columnOption(n,"bestFitWidth",v[t],!0)}))):_&&(v=this._getBestFitWidths()),(0,d.each)(t,(function(e){const{width:t}=this;"auto"!==t&&((0,h.isDefined)(t)?v[e]=(0,h.isNumeric)(t)||function(e){return(0,h.isString)(e)&&e.endsWith("px")}(t)?parseFloat(t):t:i||(v[e]=void 0))})),s&&(this._toggleBestFitMode(!1),s=!1,l&&l!==o.default.getActiveElement())){(0,u.getBoundingRect)(l).bottom<0||function(e,t){g.hiddenFocus(e,!0),m.default.setSelectionRange(e,t)}(l,c)}f=this._correctColumnWidths(v,t),i&&(!function(){let e;(0,d.each)(t,((t,i)=>{"groupExpand"===i.type&&(e=v[t])})),(0,d.each)(t,((t,i)=>{"groupExpand"===i.type&&e&&(v[t]=e)}))}(),this._needStretch()&&this._processStretch(v,t)),(0,r.deferRender)((()=>{(p||f||a)&&this._setVisibleWidths(t,v),n&&this._toggleContentMinHeight(!1)}))}))}_needBestFit(){return this.option("columnAutoWidth")}_needStretch(){return this._columnsController.getVisibleColumns().some((e=>"auto"===e.width&&!e.command))}_getAverageColumnsWidth(e){return I(this,e)/e.filter((e=>void 0===e)).length}_correctColumnWidths(e,t){const i=this;let n,o=!1,a=!1,s=!1;const r=i.component.$element(),l=i._hasWidth;for(n=0;n<t.length;n++){const r=n,l=t[r],d=e[r]===x;let u=e[r];const{minWidth:c}=l;if(c)if(void 0===u){const t=i._getAverageColumnsWidth(e);u=t}else if(D(u)){E(i,r,c,e)<0&&(u=-1)}const p=i._getRealColumnWidth(r,e.map(((e,t)=>r===t?u:e)));c&&!d&&p<c&&(e[r]=c,s=!0,n=-1),(0,h.isDefined)(l.width)||(a=!0),D(l.width)&&(o=!0)}if(!a&&e.length){const n=i._rowsView.element(),a=i._rowsView.contentWidth(),d=i._rowsView.getScrollbarWidth(),u=i._getTotalWidth(e,a);if(u<a){const a=m.default.getLastResizableColumnIndex(t,e);if(a>=0&&(e[a]="auto",s=!0,!1===l&&!o)){const e=m.default.getComponentBorderWidth(this,n);i._maxWidth=u+d+e,r.css("maxWidth",i._maxWidth)}}}return s}_processStretch(e,t){const i=this._rowsView.contentWidth(),n=this._getTotalWidth(e,i),o={length:0};if(!e.length)return;(0,d.each)(t,(function(t){(this.width||e[t]===x)&&(o[t]=!0,o.length++)}));const a=i-n,s=Math.floor(a/(e.length-o.length));let r=a-s*(e.length-o.length);if(a>=0)for(let t=0;t<e.length;t++)o[t]||(e[t]+=s,r>0&&(r<1?(e[t]+=r,r=0):(e[t]++,r--)))}_getRealColumnWidth(e,t,i){let n=1;const o=t[e];if(!D(o))return parseFloat(o);const a=t.reduce(((e,t,i)=>D(t)?e+parseFloat(t):e),0),s=t.reduce(((e,t)=>!t||t===x||D(t)?e:e+parseFloat(t)),0),r=(i=i||this._rowsView.contentWidth())-s,l=a*i/100;return s>0&&l+s>=i&&(n=l>r?r/l:1),parseFloat(o)*i*n/100}_getTotalWidth(e,t){let i=0;for(let n=0;n<e.length;n++){const o=e[n];o&&o!==x&&(i+=this._getRealColumnWidth(n,e,t))}return Math.ceil(i)}_getGroupElement(){return this.component.$element().children().get(0)}updateSize(e){const t=this,i=(0,a.default)(e),n=t.addWidgetPrefix("important-margin");if(void 0===t._hasHeight&&i&&i.is(":visible")&&(0,c.getWidth)(i)){const e=i.children(`.${t.getWidgetContainerClass()}`);e.length&&e.detach(),t._hasHeight=!!(0,c.getHeight)(i);const o=(0,c.getWidth)(i);i.addClass(n),t._hasWidth=(0,c.getWidth)(i)===o,i.removeClass(n),e.length&&e.appendTo(i)}}publicMethods(){return["resize","updateDimensions"]}_waitAsyncTemplates(){var e,t,i;return(0,l.when)(null===(e=this._columnHeadersView)||void 0===e?void 0:e.waitAsyncTemplates(!0),null===(t=this._rowsView)||void 0===t?void 0:t.waitAsyncTemplates(!0),null===(i=this._footerView)||void 0===i?void 0:i.waitAsyncTemplates(!0))}resize(){if(this.component._requireResize)return(new l.Deferred).resolve();const e=new l.Deferred;return this._waitAsyncTemplates().done((()=>{(0,l.when)(this.updateDimensions()).done(e.resolve).fail(e.reject)})).fail(e.reject),e.promise()}updateDimensions(e){const t=this;if(t._initPostRenderHandlers(),!t._checkSize(e))return;const i=t._resizeDeferred,n=t._resizeDeferred=new l.Deferred;return(0,l.when)(i).always((()=>{(0,r.deferRender)((()=>{t._dataController.isLoaded()&&t._synchronizeColumns(),t._resetGroupElementHeight(),(0,r.deferUpdate)((()=>{(0,r.deferRender)((()=>{(0,r.deferUpdate)((()=>{t._updateDimensionsCore()}))}))}))})).done(n.resolve).fail(n.reject)})),n.promise()}_resetGroupElementHeight(){const e=this._getGroupElement(),t=this._rowsView.getScrollable();!e||!e.style.height||t&&t.scrollTop()||(e.style.height="")}_checkSize(e){const t=this.component.$element(),i=t.is(":visible"),n=this._lastWidth!==(0,c.getWidth)(t)||this._lastHeight!==(0,c.getHeight)(t)||this._devicePixelRatio!==(0,p.getWindow)().devicePixelRatio;return i&&(!e||n)}_setScrollerSpacingCore(){const e=this,t=e._rowsView.getScrollbarWidth(),i=e._rowsView.getScrollbarWidth(!0);(0,r.deferRender)((()=>{e._columnHeadersView&&e._columnHeadersView.setScrollerSpacing(t),e._footerView&&e._footerView.setScrollerSpacing(t),e._rowsView.setScrollerSpacing(t,i)}))}_setScrollerSpacing(){const e=this._rowsView.getScrollable(),t=!0===this.option("scrolling.useNative");!e||t?(0,r.deferRender)((()=>{(0,r.deferUpdate)((()=>{this._setScrollerSpacingCore()}))})):this._setScrollerSpacingCore()}_setAriaOwns(){var e,t,i;const n=null===(e=this._columnHeadersView)||void 0===e?void 0:e.getTableElement(),o=null===(t=this._footerView)||void 0===t?void 0:t.getTableElement();null===(i=this._rowsView)||void 0===i||i.setAriaOwns(null==n?void 0:n.attr("id"),null==o?void 0:o.attr("id"))}_updateDimensionsCore(){const e=this,t=e._dataController,i=e._rowsView,n=e.component.$element(),o=this._getGroupElement(),s=(0,c.getHeight)(n),l=e.option("height")??n.get(0).style.height,u=!!l&&"auto"!==l,h=parseInt(n.css("maxHeight")),p=h&&s>=h,g=o&&o.scrollHeight===o.offsetHeight;e.updateSize(n),(0,r.deferRender)((()=>{const s=e._hasHeight||!!h||u;i.hasHeight(s),this._setAriaOwns(),p&&!g&&(0,a.default)(o).css("height",h),t.isLoaded()?(0,r.deferUpdate)((()=>{e._updateLastSizes(n),e._setScrollerSpacing(),(0,d.each)(w,((t,i)=>{const n=e.getView(i);n&&n.resize()})),this._editorFactoryController&&this._editorFactoryController.resize()})):i.setLoading(t.isLoading())}))}_updateLastSizes(e){this._lastWidth=(0,c.getWidth)(e),this._lastHeight=(0,c.getHeight)(e),this._devicePixelRatio=(0,p.getWindow)().devicePixelRatio}optionChanged(e){switch(e.name){case"width":case"height":this.component._renderDimensions(),this.resize();case"renderAsync":return void(e.handled=!0);default:super.optionChanged(e)}}}t.ResizingController=T;class A extends f.default.ViewController{_scrollChangedHandler(e,t,i){for(let n=0;n<e.length;n++)e[n]&&e[n].name!==i&&e[n].scrollTo({left:t.left,top:t.top})}init(){const e=[this.getView("columnHeadersView"),this.getView("footerView"),this.getView("rowsView")];for(let t=0;t<e.length;t++){const i=e[t];i&&i.scrollChanged.add(this._scrollChangedHandler.bind(this,e))}}}t.SynchronizeScrollingController=A;class O extends f.default.View{init(){this._resizingController=this.getController("resizing"),this._dataController=this.getController("data")}_endUpdateCore(){this.component._requireResize&&(this.component._requireResize=!1,this._resizingController.resize())}getView(e){return this.component._views[e]}element(){return this._groupElement}optionChanged(e){const t=this;(0,h.isDefined)(t._groupElement)&&"showBorders"===e.name?(t._groupElement.toggleClass(t.addWidgetPrefix(y),!!e.value),e.handled=!0):super.optionChanged(e)}_renderViews(e){const t=this;(0,d.each)(w,((i,n)=>{const o=t.getView(n);o&&o.render(e)}))}_getTableRoleName(){return"group"}render(e){const t=!this._groupElement,i=this._groupElement||(0,a.default)("<div>").addClass(this.getWidgetContainerClass());i.addClass(b),i.toggleClass(this.addWidgetPrefix(y),!!this.option("showBorders")),this.setAria("role","presentation",e),this.component.setAria("role",this._getTableRoleName(),i),this._rootElement=e||this._rootElement,t&&(this._groupElement=i,(0,p.hasWindow)()&&this._resizingController.updateSize(e),i.appendTo(e)),this._a11yGeneralStatusElement||(this._a11yGeneralStatusElement=(0,_.A11yStatusContainerComponent)({}),this._a11yGeneralStatusElement.attr(S,"true"),i.append(this._a11yGeneralStatusElement)),this._renderViews(i)}update(){const e=this,t=e._rootElement,i=e._groupElement;t&&i&&(this._resizingController.resize(),e._dataController.isLoaded()&&e._resizingController.fireContentReadyAction())}setWidgetA11yStatusText(e){var t;null===(t=this._a11yGeneralStatusElement)||void 0===t||t.text(e)}}t.GridView=O;t.gridViewModule={defaultOptions:()=>({showBorders:!1,renderAsync:!1}),controllers:{resizing:T,synchronizeScrolling:A},views:{gridView:O},VIEW_NAMES:w}},77081:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RowsView=t.ROW_LINES_CLASS=void 0,t.isGroupRow=R,t.rowsModule=void 0;var n=w(i(92774)),o=i(28630),a=w(i(4671)),s=w(i(64553)),r=w(i(48314)),l=i(17781),d=i(31e3),u=i(52576),c=i(21274),h=i(41639),p=i(57653),g=i(54497),_=i(58515),f=i(11528),m=i(3104),v=w(i(20876)),C=i(91066),y=w(i(53226)),b=i(87396),x=i(48921);function w(e){return e&&e.__esModule?e:{default:e}}function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},S.apply(null,arguments)}const D="rowsview",I="dx-group-row",E="dx-group-cell",T="dx-freespace-row",A="dx-column-lines",O="dx-row-alt",P="dx-last-row-border",k=t.ROW_LINES_CLASS="dx-row-lines";function M(e){return e?Math.round(e.scrollWidth()-e.clientWidth()):0}function R(e){let{rowType:t,column:i}=e;return"group"===t&&(0,f.isDefined)(i.groupIndex)&&!i.showWhenGrouped&&!i.command}function L(e){let{element:t,watch:i,getter:a,callBack:s}=e;if(i){const e=i(a,s);n.default.on(t,o.removeEvent,e)}}const B=function(e,t){const i=(0,g.isEmpty)(t.text)&&"data"===t.rowType,{text:n}=t,o=e.get(0);i?y.default.setEmptyText(e):t.column.encodeHtml?o.textContent=n:o.innerHTML=n};class V extends x.ColumnsView{init(){super.init(),this._editingController=this.getController("editing"),this._resizingController=this.getController("resizing"),this._columnsResizerController=this.getController("columnsResizer"),this._focusController=this.getController("focus"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._validatingController=this.getController("validating"),this._errorHandlingController=this.getController("errorHandling"),this._columnHeadersView=this.getView("columnHeadersView"),this._rowHeight=0,this._scrollTop=0,this._scrollLeft=-1,this._scrollRight=0,this._hasHeight=void 0,this._contentChanges=[],this._dataController.loadingChanged.add(((e,t)=>{this.setLoading(e,t)})),this._dataController.dataSourceChanged.add((()=>{this._scrollLeft>=0&&!this._dataController.isLoading()&&this._handleScroll({component:this.getScrollable(),forceUpdateScrollPosition:!0,scrollOffset:{top:this._scrollTop,left:this._scrollLeft}})}))}_getDefaultTemplate(e){return"empty"===e.command?function(e){e.html("&nbsp;")}:B}renderFocusState(e){}_getDefaultGroupTemplate(e){const t=this.option("summary.texts");return function(i,n){const{data:o}=n;let a=`${n.column.caption}: ${n.text}`;const s=i.get(0);n.summaryItems&&n.summaryItems.length&&(a+=` ${y.default.getGroupRowSummaryText(n.summaryItems,t)}`),o&&(n.groupContinuedMessage&&n.groupContinuesMessage?a+=` (${n.groupContinuedMessage}. ${n.groupContinuesMessage})`:n.groupContinuesMessage?a+=` (${n.groupContinuesMessage})`:n.groupContinuedMessage&&(a+=` (${n.groupContinuedMessage})`)),e.encodeHtml?s.textContent=a:s.innerHTML=a}}_update(e){}_updateCell(e,t){if(R(t)){(e.is(`.${this.addWidgetPrefix(b.CLASSES.groupRowContainer)}`)?e.parent():e).addClass(E)}super._updateCell.apply(this,arguments)}_getCellTemplate(e){const t=this,{column:i}=e;let n;return n=R(e)?i.groupCellTemplate||{allowRenderToDetachedContainer:!0,render:t._getDefaultGroupTemplate(i)}:("data"===e.rowType||i.command)&&i.cellTemplate?i.cellTemplate:{allowRenderToDetachedContainer:!0,render:t._getDefaultTemplate(i)},n}_createRow(e,t){const i=super._createRow.apply(this,arguments);if(e){const t="group"===e.rowType,n="data"===e.rowType;n&&i.addClass("dx-data-row"),n&&this.option("showRowLines")&&i.addClass(k),this.option("showColumnLines")&&i.addClass(A),!1===e.visible&&i.hide(),t&&(i.addClass(I),this.setAriaExpandedAttribute(i,e))}return i}_rowPrepared(e,t,i){"data"===t.rowType&&(this.option("rowAlternationEnabled")&&(this._isAltRow(i)&&e.addClass(O),L({element:e.get(0),watch:t.watch,getter:()=>this._isAltRow(i),callBack:t=>{e.toggleClass(O,t)}})),this._setAriaRowIndex(t,e),L({element:e.get(0),watch:t.watch,getter:()=>t.rowIndex,callBack:()=>this._setAriaRowIndex(t,e)})),super._rowPrepared.apply(this,arguments)}_setAriaRowIndex(e,t){if(!t.is("tr"))return;const{component:i}=this,n="standard"===i.option("scrolling.mode")&&!y.default.isVirtualRowRendering(i);let o=e.rowIndex+1;n?o=i.pageIndex()*i.pageSize()+o:o+=this._dataController.getRowIndexOffset(),this.setAria("rowindex",o,t)}setAriaExpandedAttribute(e,t){const i=t.isExpanded?this.localize("dxDataGrid-ariaExpandedRow"):this.localize("dxDataGrid-ariaCollapsedRow");this.setAria("roledescription",i,e)}_afterRowPrepared(e){const t=e.args[0],i=this._dataController,a=i.getVisibleRows()[t.rowIndex],s=this.option("integrationOptions.watchMethod");if(!t.data||"data"!==t.rowType||t.isNewRow||!this.option("twoWayBindingEnabled")||!s||!a)return;const r=s((()=>i.generateDataValues(t.data,t.columns)),(()=>{i.repaintRows([a.rowIndex],this.option("repaintChangesOnly"))}),{deep:!0,skipImmediate:!0});n.default.on(t.rowElement,o.removeEvent,r)}_renderScrollable(e){const t=this,i=t.element();if(i.children().length||i.append("<div>"),!e&&t._loadPanel||t._renderLoadPanel(i,i.parent(),t._dataController.isLocalStore()),(e||!t.getScrollable())&&t._dataController.isLoaded()){const e=t.getColumns();let n=!0;for(let t=0;t<e.length;t++)if(!e[t].width&&!e[t].minWidth){n=!1;break}(t.option("columnAutoWidth")||t._hasHeight||n||t._columnsController._isColumnFixing())&&t._renderScrollableCore(i)}}_handleScroll(e){const t=this,i=t.option("rtlEnabled"),n=e.component.option("useNative");t._scrollTop=e.scrollOffset.top,t._scrollLeft=e.scrollOffset.left;let o=e.scrollOffset.left;i&&(this._scrollRight=M(e.component)-this._scrollLeft,n&&(o=-this._scrollRight),this.isScrollbarVisible(!0)||(this._scrollLeft=-1)),t.scrollChanged.fire(S({},e.scrollOffset,{left:o}),t.name)}_renderScrollableCore(e){const t=this,i=t._createScrollableOptions(),n=t._handleScroll.bind(t);i.onScroll=n,t._scrollable=t._createComponent(e,v.default,i),t._scrollableContainer=t._scrollable&&(0,s.default)(t._scrollable.container())}_renderLoadPanel(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return y.default.renderLoadPanel.apply(this,arguments)}_renderContent(e,t,i){return e.empty().append(t),this._findContentElement()}_updateContent(e,t,i){return this._contentChanges.push({newTableElement:e,change:t,isFixedTableRendering:i}),this.waitAsyncTemplates().done((()=>{const e=this._contentChanges;this._contentChanges=[],e.forEach((e=>{let{newTableElement:t,change:i,isFixedTableRendering:n}=e;const o=this.getTableElement(n),a=this._findContentElement(n),s=null==i?void 0:i.changeType,r=[],l=this.option("highlightChanges"),d=this.addWidgetPrefix("row-inserted-animation");if("update"===s)(0,c.each)(i.rowIndices,((e,n)=>{var a;const s=this._getRowElements(t).eq(e),u=null===(a=i.changeTypes)||void 0===a?void 0:a[e],c=i.items&&i.items[e];r.push((()=>{const t=this._getRowElements(o),a=t.eq(n);switch(u){case"update":if(c){var r;const t=null===(r=i.columnIndices)||void 0===r?void 0:r[e];(0,f.isDefined)(c.visible)&&c.visible!==a.is(":visible")?a.toggle(c.visible):t?this._updateCells(a,s,t,c):a.replaceWith(s)}break;case"insert":if(t.length)a.length?s.insertBefore(a):s.insertAfter(t.last());else if(o){const e=s.is("tbody")?o:o.children("tbody");s.prependTo(e)}l&&i.isLiveUpdate&&s.addClass(d);break;case"remove":a.remove()}}))})),(0,c.each)(r,(function(){this()})),t.remove();else this.setTableElement(t,n),a.addClass(this.addWidgetPrefix("content")),this._setGridRole(a),this._renderContent(a,t,n)}))})).fail((()=>{this._contentChanges=[]}))}_getGridRoleName(){return"grid"}_setGridRole(e){var t;const i=!(null!==(t=this._dataController)&&void 0!==t&&t.isEmpty()),n=this._getGridRoleName();null!=e&&e.length&&i&&this.setAria("role",n,e)}_createEmptyRow(e,t,i){const n=this;let o;const a=n._createRow(),s=t?this.getFixedColumns():this.getColumns();a.addClass(e).toggleClass(A,n.option("showColumnLines"));for(let e=0;e<s.length;e++)o=n._createCell({column:s[e],rowType:"freeSpace",columnIndex:e,columns:s}),(0,f.isNumeric)(i)&&o.css("height",i),a.append(o);return n.setAria("role","presentation",a),a}getFixedColumns(){throw new Error("Method not implemented.")}_appendEmptyRow(e,t,i){const n=this._getBodies(e),o=!n.length||t.is("tbody"),a=o?e:n;if("top"===i){if(a.first().prepend(t),o){const e=a.children("colgroup");a.prepend(e)}}else a.last().append(t)}_renderFreeSpaceRow(e,t){let i=this._createEmptyRow(T);i=this._wrapRowIfNeed(e,i,"refresh"===(null==t?void 0:t.changeType)),this._appendEmptyRow(e,i)}_checkRowKeys(e){const t=this,i=t._getRows(e),n=t._dataController.store()&&t._dataController.store().key();n&&i.some((e=>{if("data"===e.rowType&&void 0===e.key)return t._dataController.fireError("E1046",n),!0}))}_needUpdateRowHeight(e){return e>0&&!this._rowHeight}_getRowsHeight(e){return(e=e||this._tableElement).children("tbody").children().not(".dx-virtual-row").not(`.${T}`).toArray().reduce(((e,t)=>e+(0,h.getBoundingRect)(t).height),0)}_updateRowHeight(){const e=this,t=e.getTableElement(),i=e._dataController.items().length;if(t&&e._needUpdateRowHeight(i)){const n=e._getRowsHeight(t);e._rowHeight=n/i}}_findContentElement(e){let t=this.element();const i=this.getScrollable();if(t)return i&&(t=(0,s.default)(i.content())),t.children().first()}_getRowElements(e){const t=super._getRowElements(e);return t&&t.not(`.${T}`)}_getFreeSpaceRowElements(e){const t=e||this.getTableElements();return t&&t.children("tbody").children(`.${T}`)}_getNoDataText(){return this.option("noDataText")}_rowClick(e){const t=this._dataController.items()[e.rowIndex]||{};this.executeAction("onRowClick",(0,u.extend)({evaluate:e=>(0,d.compileGetter)(e)(t.data)},e,t))}_rowDblClick(e){const t=this._dataController.items()[e.rowIndex]||{};this.executeAction("onRowDblClick",(0,u.extend)({},e,t))}_getColumnsCountBeforeGroups(e){for(let t=0;t<e.length;t++)if("groupExpand"===e[t].type)return t;return 0}_getGroupCellOptions(e){const t=this._getColumnsCountBeforeGroups(e.columns),i=(e.row.groupIndex||0)+t;return{columnIndex:i,colspan:e.columns.length-i-1}}_needWrapRow(){return super._needWrapRow.apply(this,arguments)||!!this.option("dataRowTemplate")}_renderCells(e,t){"group"===t.row.rowType?this._renderGroupedCells(e,t):t.row.values&&super._renderCells(e,t)}_renderGroupedCells(e,t){const{row:i}=t;let n;const{columns:o}=t,{rowIndex:a}=i;let s;const r=this._getGroupCellOptions(t);for(let l=0;l<=r.columnIndex;l++)l===r.columnIndex&&o[l].allowCollapsing&&"infinite"!==t.scrollingMode?(s=!!i.isExpanded,n=o[l]):(s=null,n={command:"expand",cssClass:o[l].cssClass,fixed:o[l].fixed}),this._needRenderCell(l,t.columnIndices)&&this._renderCell(e,{value:s,row:i,rowIndex:a,column:n,columnIndex:l,columnIndices:t.columnIndices,change:t.change});const l=(0,h.getDefaultAlignment)(this.option("rtlEnabled")),d=(0,u.extend)({},o[r.columnIndex],{command:null,type:null,cssClass:null,width:null,showWhenGrouped:!1,alignment:l});r.colspan>1&&(d.colspan=r.colspan),this._needRenderCell(r.columnIndex+1,t.columnIndices)&&this._renderCell(e,{value:i.values[i.groupIndex],row:i,rowIndex:a,column:d,columnIndex:r.columnIndex+1,columnIndices:t.columnIndices,change:t.change})}_renderRows(e,t){const i=this,n=i.option("scrolling.mode");super._renderRows(e,(0,u.extend)({scrollingMode:n},t)),i._checkRowKeys(t.change),i._renderFreeSpaceRow(e,t.change),i._hasHeight||i.updateFreeSpaceRowHeight(e)}_renderDataRowByTemplate(e,t,i){const{row:n}=t,o=(0,u.extend)({columns:t.columns},n),a=this._createRow(n,"tbody");a.appendTo(e),this.renderTemplate(a,i,o,!0,t.change),this._rowPrepared(a,o,t.row)}_renderRow(e,t){const{row:i}=t,{rowTemplate:n}=this.option(),o=this.option("dataRowTemplate");"data"===i.rowType&&o?this._renderDataRowByTemplate(e,t,o):"data"!==i.rowType&&"group"!==i.rowType||(0,f.isDefined)(i.groupIndex)||!n?super._renderRow(e,t):this.renderTemplate(e,n,(0,u.extend)({columns:t.columns},i),!0)}_renderTable(e){const t=this,i=super._renderTable(e),n=function(){const e=t.getScrollable();e&&t.element().closest((0,m.getWindow)().document).length&&(t.resizeCompleted.remove(n),e._visibilityChanged(!0))};return(0,f.isDefined)(t.getTableElement())?t._renderScrollable():(t.setTableElement(i),t._renderScrollable(!0),t.resizeCompleted.add(n)),i}_createTable(){const e=super._createTable.apply(this,arguments);return(this.option().rowTemplate||this.option().dataRowTemplate)&&e.appendTo(this.component.$element()),e}_renderCore(e){const t=this.element();t.addClass(this.addWidgetPrefix(D)).toggleClass(this.addWidgetPrefix("nowrap"),!this.option("wordWrapEnabled")),t.toggleClass("dx-empty",this._dataController.isEmpty()),this.setAria("role","presentation",t);const i=this._renderTable({change:e}),n=this._updateContent(i,e);return super._renderCore(e),this._lastColumnWidths=null,n}_getRows(e){return e&&e.items||this._dataController.items()}_getCellOptions(e){const t=this,{column:i}=e,{row:n}=e,{data:o}=n,a=n&&n.summaryCells,{value:s}=e,r=y.default.getDisplayValue(i,s,o,n.rowType),l=super._getCellOptions(e);if(l.value=s,l.oldValue=e.oldValue,l.displayValue=r,l.row=n,l.key=n.key,l.data=o,l.rowType=n.rowType,l.values=n.values,l.text=i.command?"":y.default.formatValue(r,i),l.rowIndex=n.rowIndex,l.summaryItems=a&&a[e.columnIndex],l.resized=i.resizedCallbacks,(0,f.isDefined)(i.groupIndex)&&!i.command){const e=t.option("grouping.texts"),i=t.option("scrolling.mode");"virtual"!==i&&"infinite"!==i&&(l.groupContinuesMessage=o&&o.isContinuationOnNextPage&&e&&e.groupContinuesMessage,l.groupContinuedMessage=o&&o.isContinuation&&e&&e.groupContinuedMessage)}return l}_toggleDraggableSourceColumnClass(e,t,i,n){const o=this._columnsController,a=o.getColumns(),r=a&&a[i],l=r&&r.isBand&&r.index;(0,c.each)(e,((a,r)=>{if(!(0,s.default)(r).hasClass(I))for(let s=0;s<t.length&&(!((0,f.isNumeric)(l)&&o.isParentBandColumn(t[s].index,l)||t[s].index===i)||(e.eq(a).children().eq(s).toggleClass(this.addWidgetPrefix(C.CLASSES.draggableColumn),n),(0,f.isNumeric)(l)));s++);}))}_getDevicePixelRatio(){return(0,m.getWindow)().devicePixelRatio}renderNoDataText(){return y.default.renderNoDataText.apply(this,arguments)}getCellOptions(e,t){const i=this._dataController.items()[e];let n,o;return i&&(o=(0,f.isString)(t)?this._columnsController.columnOption(t):this._columnsController.getVisibleColumns()[t],o&&(n=this._getCellOptions({value:o.calculateCellValue(i.data),rowIndex:i.rowIndex,row:i,column:o}))),n}getRow(e){if(e>=0){const t=this._getRowElements();if(t.length>e)return(0,s.default)(t[e])}}updateFreeSpaceRowHeight(e){const t=this._dataController,i=t.items(!0).length,n=this._findContentElement(),o=this._getFreeSpaceRowElements(e);if(o&&n&&t.totalCount()>=0){let a=!1;if(i>0)if(this._hasHeight)o.hide(),(0,l.deferUpdate)((()=>{const t=this.getScrollbarWidth(!0),i=(0,p.getHeight)(this.element())-t,s=i-(0,p.getOuterHeight)(n)>0,r=this._getRowsHeight(n.children().first()),d=e||this.getTableElements(),u=i-r-Math.ceil(parseFloat(d.css("borderTopWidth")))-this._getHeightCorrection();s&&(0,l.deferRender)((()=>{o.css("height",u),a=!0,o.show()})),(0,l.deferRender)((()=>this._updateLastRowBorder(a)))}));else{const n=t.pageSize()-i,s=this.option("scrolling.mode");n>0&&t.pageCount()>1&&"virtual"!==s&&"infinite"!==s&&((0,_.setHeight)(o,n*this._rowHeight),a=!0),!a&&e?(0,_.setHeight)(o,0):o.toggle(a),this._updateLastRowBorder(a)}else o.css("height",0),o.show(),this._updateLastRowBorder(!0)}}_getHeightCorrection(){const e=r.default.webkit&&this._getDevicePixelRatio()>=2,t=r.default.chrome&&r.default.version>=91,i=r.default.mozilla&&r.default.version>=70&&!this.option("showRowLines");return e||i||t?1:0}_columnOptionChanged(e){const{optionNames:t}=e;e.changeTypes.grouping||(t.width||t.visibleWidth)&&(super._columnOptionChanged(e),this._fireColumnResizedCallbacks())}getScrollable(){return this._scrollable}_handleDataChanged(e){const t=this;switch(e.changeType){case"refresh":case"prepend":case"append":case"update":t.render(null,e);break;default:t._update(e)}}publicMethods(){return["isScrollbarVisible","getTopVisibleRowData","getScrollbarWidth","getCellElement","getRowElement","getScrollable"]}contentWidth(){return(0,p.getWidth)(this.element())-this.getScrollbarWidth()}getScrollbarWidth(e){const t=this._scrollableContainer&&this._scrollableContainer.get(0);let i=0;return t&&(e?(i=t.clientHeight?t.offsetHeight-t.clientHeight:0,i+=function(e){const t=e.getScrollable();return t?Math.ceil(parseFloat((0,s.default)(t.content()).css("paddingBottom"))):0}(this)):i=t.clientWidth?t.offsetWidth-t.clientWidth:0),i>0?i:0}_fireColumnResizedCallbacks(){const e=this,t=e._lastColumnWidths||[],i=[],n=e.getColumns();for(let e=0;e<n.length;e++)i[e]=n[e].visibleWidth,n[e].resizedCallbacks&&!(0,f.isDefined)(n[e].groupIndex)&&t[e]!==i[e]&&n[e].resizedCallbacks.fire(i[e]);e._lastColumnWidths=i}_updateLastRowBorder(e){this.option("showBorders")&&!e?this.element().addClass(P):this.element().removeClass(P)}_updateScrollable(){const e=v.default.getInstance(this.element());e&&(e.update(),!e.option("useNative")&&null!=e&&e.isRenovated()||this._updateHorizontalScrollPosition())}_updateHorizontalScrollPosition(){const e=this.getScrollable(),t=e&&e.scrollOffset().left;if(this.option("rtlEnabled")){const i=M(e);i-t!==this._scrollRight&&(this._scrollLeft=i-this._scrollRight)}this._scrollLeft>=0&&t!==this._scrollLeft&&e.scrollTo({x:this._scrollLeft})}_resizeCore(){const e=this;e._fireColumnResizedCallbacks(),e._updateRowHeight(),(0,l.deferRender)((()=>{e._renderScrollable(),e.renderNoDataText(),e.updateFreeSpaceRowHeight(),(0,l.deferUpdate)((()=>{e._updateScrollable()}))}))}scrollTo(e){const t=this.element(),i=t&&v.default.getInstance(t);i&&i.scrollTo(e)}height(e){const t=this,i=this.element();if(0===arguments.length)return i?(0,p.getOuterHeight)(i,!0):0;(0,f.isDefined)(e)&&i&&(t.hasHeight("auto"!==e),(0,_.setHeight)(i,e))}hasHeight(e){if(0===arguments.length)return!!this._hasHeight;this._hasHeight=e}setLoading(e,t){const i=this;let n=i._loadPanel;const o=i._dataController,a=i.option("loadPanel")||{},s=o.isLoaded()?a.animation:null,r=i.element();if((0,m.hasWindow)()&&(!n&&void 0!==t&&o.isLocalStore()&&"auto"===a.enabled&&r&&(i._renderLoadPanel(r,r.parent()),n=i._loadPanel),n)){const o={message:t||a.text,animation:s,visible:e};e&&(o.position=y.default.calculateLoadPanelPosition(r)),clearTimeout(i._hideLoadingTimeoutID),n.option("visible")&&!e?i._hideLoadingTimeoutID=setTimeout((()=>{n.option(o)}),200):n.option(o)}}toggleDraggableColumnClass(e,t){const i=this._getRowElements().not(`.${I}`)||[];this._toggleDraggableSourceColumnClass(i,this.getColumns(),e,t)}_getCellElementsCore(e){const t=super._getCellElementsCore.apply(this,arguments);if(t){const e=t.filter(`.${E}`).index();if(e>=0&&t.length>e+1)return t.slice(0,e+1)}return t}_getBoundaryVisibleItemIndex(e,t){const i=this;let n=0,o=0,a=0,r=i._scrollTop;const l=i._findContentElement(),d=l&&l.offset().top,u=this._dataController.items(),c=i.getTableElement();if(u.length&&c){const l=i._getRowElements(c).filter(":visible");if(!e){r+=(0,p.getOuterHeight)(this._hasHeight?this.element():(0,m.getWindow)())}for(n=0;n<u.length;n++){o=a;const i=(0,s.default)(l).eq(n);if(i.length&&(a=i.offset(),a=(e?a.top:a.top+(0,p.getOuterHeight)(i))-d,a>r)){n&&(t||2*r<Math.round(a+o))&&n--;break}}n&&n===u.length&&n--}return n}getTopVisibleItemIndex(e){return this._getBoundaryVisibleItemIndex(!0,e)}getBottomVisibleItemIndex(e){return this._getBoundaryVisibleItemIndex(!1,e)}getTopVisibleRowData(){const e=this.getTopVisibleItemIndex(),t=this._dataController.items();if(t[e])return t[e].data}_scrollToElement(e,t){const i=this.getScrollable();i&&i.scrollToElement(e,t)}optionChanged(e){const t=this;switch(super.optionChanged(e),e.name){case"wordWrapEnabled":case"showColumnLines":case"showRowLines":case"rowAlternationEnabled":case"rowTemplate":case"dataRowTemplate":case"twoWayBindingEnabled":t._invalidate(!0,!0),e.handled=!0;break;case"scrolling":t._rowHeight=null,t._tableElement=null,e.handled=!0;break;case"rtlEnabled":t._rowHeight=null,t._tableElement=null;break;case"loadPanel":t._tableElement=null,t._invalidate(!0,"loadPanel.enabled"!==e.fullName),e.handled=!0;break;case"noDataText":t.renderNoDataText(),e.handled=!0}}setAriaOwns(e,t,i){const n=this._findContentElement(),o=this.getTableElement();null!=o&&o.length&&this.setAria("owns",`${e??""} ${o.attr("id")??""} ${t??""}`.trim(),n)}dispose(){super.dispose(),clearTimeout(this._hideLoadingTimeoutID),this._scrollable&&this._scrollable.dispose()}setScrollerSpacing(e,t){}getFixedContentElement(){var e;const t=this.addWidgetPrefix("content-fixed");return null===(e=this.element())||void 0===e?void 0:e.children(`.${t}`)}_restoreErrorRow(e){}isElementInside(e){return e.closest(`.${this.addWidgetPrefix(D)}`).is(this.element())}}t.RowsView=V;t.rowsModule={defaultOptions:()=>({hoverStateEnabled:!1,scrolling:{useNative:"auto"},loadPanel:{enabled:"auto",text:a.default.format("Loading"),width:200,height:90,showIndicator:!0,indicatorSrc:"",showPane:!0},dataRowTemplate:null,columnAutoWidth:!1,noDataText:a.default.format("dxDataGrid-noDataText"),wordWrapEnabled:!1,showColumnLines:!0,showRowLines:!1,rowAlternationEnabled:!1,activeStateEnabled:!1,twoWayBindingEnabled:!0}),views:{rowsView:V}}},20574:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.updateViewsBorders=void 0;var n=i(11528);const o=["rowsView"];const a="dx-bordered-top-view",s="dx-bordered-bottom-view",r=(e,t)=>{const i=Object.values(e).find((e=>{var i;return null==e||null===(i=e.element())||void 0===i?void 0:i.hasClass(t)}));return(null==i?void 0:i.element())??null};t.updateViewsBorders=(e,t)=>{if(!((e,t)=>{var i;if(!Object.keys(t).includes(e))return!1;const{rowsView:a}=t,s=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(t,o);return!!(0,n.isDefined)(null==a||null===(i=a.element)||void 0===i?void 0:i.call(a))&&Object.values(s).filter((e=>{var t;return null==e||null===(t=e.isVisible)||void 0===t?void 0:t.call(e)})).every((e=>(0,n.isDefined)(null==e?void 0:e.element())))})(e,t))return;const i=r(t,a),l=r(t,s),d=(e=>{let{columnHeadersView:t,rowsView:i}=e;return null!=t&&t.isVisible()?t.element():i.element()})(t),u=(e=>{let{filterPanelView:t,footerView:i,rowsView:n}=e;return null!=t&&t.isVisible()?t.element():null!=i&&i.isVisible()?i.element():n.element()})(t);i&&!i.is(d)&&i.removeClass(a),l&&!l.is(u)&&l.removeClass(s),d.hasClass(a)||d.addClass(a),u.hasClass(s)||u.addClass(s)}},74280:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.virtualColumnsModule=void 0;var n=d(i(48314)),o=i(57653),a=i(11528),s=i(3104),r=d(i(53226)),l=i(32760);function d(e){return e&&e.__esModule?e:{default:e}}const u=e=>class extends e{_needToSetCellWidths(){let e=super._needToSetCellWidths();if(!e&&this._columnsController.isVirtualMode()){e=this._columnsController.getColumns().some((e=>"auto"===e.width))}return e}},c=function(e){return e.map((e=>e.visibleWidth||parseFloat(e.width)||50))};t.virtualColumnsModule={defaultOptions:()=>({scrolling:{columnRenderingMode:"standard",columnPageSize:5,columnRenderingThreshold:300}}),extenders:{controllers:{columns:e=>class extends e{init(){const e=this;super.init.apply(this,arguments),this._resizingController=this.getController("resizing"),e._beginPageIndex=null,e._endPageIndex=null,e._position??(e._position=0),e._virtualVisibleColumns={}}dispose(){clearTimeout(this._changedTimeout),super.dispose.apply(this,arguments)}resetColumnsCache(){super.resetColumnsCache(),this._virtualVisibleColumns={}}getBeginPageIndex(e){const t=this.getVisibleColumns(void 0,!0),i=c(t);let n=0;for(let t=0;t<i.length;t++){if(n>=e)return Math.floor(t/this.getColumnPageSize());n+=i[t]}return 0}getTotalWidth(){const e=this.option("width");return"number"==typeof e?e:this._resizingController._lastWidth||(0,o.getOuterWidth)(this.component.$element())}getEndPageIndex(e){const t=this.getVisibleColumns(void 0,!0),i=c(t);let n=0;e+=this.getTotalWidth();for(let t=0;t<i.length;t++){if(n>=e)return Math.ceil(t/this.getColumnPageSize());n+=i[t]}return Math.ceil(i.length/this.getColumnPageSize())}getColumnPageSize(){return this.option("scrolling.columnPageSize")}_fireColumnsChanged(){const e=new Date;this.columnsChanged.fire({optionNames:{all:!0,length:1},changeTypes:{columns:!0,virtualColumnsScrolling:!0,length:2}}),this._renderTime=new Date-e}getScrollingTimeout(){const e=this.option("scrolling.columnRenderingThreshold"),t=this.option("scrolling.renderAsync");let i=0;return(!(0,a.isDefined)(t)&&this._renderTime>e||t)&&(i=this.option("scrolling.timeout")),i}setScrollPosition(e){const t=this.getScrollingTimeout();t>0?(clearTimeout(this._changedTimeout),this._changedTimeout=setTimeout((()=>{this._setScrollPositionCore(e)}),t)):this._setScrollPositionCore(e)}resize(){this._setScrollPositionCore(this._position)}_setScrollPositionCore(e){const t=this;if(t.isVirtualMode()){const i=t.getBeginPageIndex(e),n=t.getEndPageIndex(e),o=e<t._position?t._beginPageIndex>i:t._endPageIndex<n;t._position=e,o&&(t._beginPageIndex=i,t._endPageIndex=n,t._fireColumnsChanged())}}getFixedColumns(e,t){const i=super.getFixedColumns(e);if(this.isVirtualMode()&&!t&&i.length){const e=i.map((e=>e.command)).indexOf("transparent");return i[e].colspan=this.getVisibleColumns().length-super.getFixedColumns().length+1,i}return i}_compileVisibleColumns(e,t){var i;if(t||!this.isVirtualMode()||!this._shouldReturnVisibleColumns())return super._compileVisibleColumns(e);null===(i=this._columns)||void 0===i||!i.length||(0,a.isDefined)(this._beginPageIndex)||(0,a.isDefined)(this._endPageIndex)||(this._beginPageIndex=this.getBeginPageIndex(this._position),this._endPageIndex=this.getEndPageIndex(this._position));const n=this._beginPageIndex,o=this._endPageIndex,s=`${e}-${n}-${o}`;if(this._virtualVisibleColumns[s])return this._virtualVisibleColumns[s];let r=super._compileVisibleColumns();const d=this.getRowCount(),u=this.getColumnPageSize();let h=n*u,p=o*u;const g=this.getFixedColumns(void 0,!0),_=g.map((e=>e.command)).indexOf("transparent"),f=g.length?_:0;let m=r.slice(0,f);const v=r.slice(f,h),C=c(v).reduce(((e,t)=>e+t),0);C||(h=0);const y=g.length?g.length-_-1:0;let b=r.slice(r.length-y);const x=r.slice(p,r.length-y),w=c(x).reduce(((e,t)=>e+t),0);if(w||(p=r.length),d>1&&"number"==typeof e){const t=[];for(let e=0;e<=d;e++)t.push(super._compileVisibleColumns(e));m=(0,l.createColumnsInfo)(t,0,m.length)[e]||[],b=(0,l.createColumnsInfo)(t,r.length-b.length,r.length)[e]||[],r=(0,l.createColumnsInfo)(t,h,p)[e]||[]}else r=r.slice(h,p);return C&&(r.unshift({command:"virtual",type:"virtual",width:C}),r=m.concat(r)),w&&(r.push({command:"virtual",type:"virtual",width:w}),r=r.concat(b)),this._virtualVisibleColumns[s]=r,r}getColumnIndexOffset(){let e=0;if(this._beginPageIndex>0){const t=this.getFixedColumns().map((e=>e.command)).indexOf("transparent"),i=t>=0?t:0;e=this._beginPageIndex*this.getColumnPageSize()-i-1}return e>0?e:0}isVirtualMode(){return(0,s.hasWindow)()&&"virtual"===this.option("scrolling.columnRenderingMode")}}},views:{columnHeadersView:e=>class extends(u(e)){_renderCore(){const e=super._renderCore.apply(this,arguments);return this._columnsController.isVirtualMode()&&this._updateScrollLeftPosition(),e}},rowsView:e=>class extends(u(e)){_resizeCore(){super._resizeCore.apply(this,arguments),this._columnsController.resize()}_handleScroll(e){const t=this,i=this.getScrollable();let{left:n}=e.scrollOffset;super._handleScroll.apply(t,arguments),t.option("rtlEnabled")&&i&&(n=(0,o.getWidth)(i.$content())-(0,o.getWidth)(i.$element())-n),t._columnsController.setScrollPosition(n)}_renderCore(e){if(null!=e&&e.virtualColumnsScrolling){var t,i;const e=this._findContentElement(),a=null===(t=this._columnsController)||void 0===t?void 0:t.getFixedColumns(),s=null===(i=this._scrollable)||void 0===i?void 0:i.option("useNative");if(null!=a&&a.length){e.css({minHeight:s?(0,o.getHeight)(e):r.default.getContentHeightLimit(n.default)});const t=()=>{this.resizeCompleted.remove(t),e.css({minHeight:""})};this.resizeCompleted.add(t)}}return super._renderCore.apply(this,arguments)}}}}}},32760:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createColumnsInfo=function(e,t,i){const a=[];o(e,((e,o,s)=>{let r,l=e;const d=l.colspan||1,u=o+d-1>=t&&o<i;if(a[s]=a[s]||[],u)o<t?(r=d-(t-o),o=t):r=d,o+r>i&&(r=i-o),r!==d&&(l=(0,n.extend)({},l,{colspan:r})),a[s].push(l);else if(o>i)return!1}));for(let e=0;e<a.length;e++)a[e]=a[e]||[];return a},t.foreachColumnInfo=o;var n=i(52576);function o(e,t,i,n,a,s){s=s||[],(n=n||[])[i=i||0]=n[i]||0;const r=e[i],l=s[i]+1||0;let d,u=0;if(r){for(d=l;d<r.length;d++){const l=r[d],c=d+n[i],h=l.colspan||1;if(o(e,t,i+(l.rowspan||1),n,h,s),n[i]+=h-1,u+=h,l.rowspan)for(let e=i+1;e<i+l.rowspan;e++)n[e]=n[e]||0,n[e]+=l.colspan||1;if(!1===t(l,c,i,d))break;if(void 0!==a&&u>=a)break}s[i]=d}}},54988:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualDataLoader=void 0;var n=i(87739),o=i(11528);const a="scrolling.legacyMode",s=e=>e.option("scrolling.loadTwoPagesOnStart")||e._controller.isVirtual()||e._controller.getViewportItemIndex()>0,r=e=>e._cache.length?e._cache[0].pageIndex:-1,l=e=>e._cache.length?e._cache[e._cache.length-1].pageIndex:-1,d=(e,t,i)=>{e._isChangedFiring=!0,t(i),e._isChangedFiring=!1},u=(e,t,i)=>{if(e._isDelayChanged)return e._isDelayChanged=!1,d(e,t,i),!0},c=(e,t)=>{const i=e.option("scrolling.preloadEnabled");let n=(e=>{const t=e._dataOptions.pageSize();if(e.option("scrolling.preventPreload"))return 0;let i=e._controller.viewportSize();if(e._controller.isVirtualMode()&&e.option("scrolling.removeInvisiblePages")){i=0;const t=e._controller.viewportSize()*e._controller.viewportItemSize();let n=e._controller.getContentOffset();const o=e._controller.getViewportPosition(),a=e._controller.virtualItemsCount(),s=e._dataOptions.totalItemsCount();for(let r=a.begin;r<s&&!(n>=o+t);r++)n+=e._controller.getItemSizes()[r]||e._controller.viewportItemSize(),n>=o&&i++}return t&&i>0?Math.ceil(i/t):1})(e);const o=e._controller.isAppendMode();return n&&(t?n=i?1:0:(i&&n++,!o&&s(e)||n--)),n},h=(e,t,i,n,a)=>{const s=e._dataOptions,r=s.items().slice();let l=(0,o.isObject)(i)?i:void 0;const u="prepend"===i,c=s.viewportItems();i&&(0,o.isString)(i)&&!e._isDelayChanged&&(l={changeType:i,items:r},a&&(l.removeCount=a.itemsCount,l.removeCount&&s.correctCount&&(l.removeCount=s.correctCount(c,l.removeCount,u))));let h=a?a.itemsLength:0;h&&s.correctCount&&(h=s.correctCount(c,h,u)),"append"===i?(c.push.apply(c,r),a&&c.splice(0,h)):u?(c.unshift.apply(c,r),a&&c.splice(-h)):e._dataOptions.viewportItems(r),s.updateLoading(),e._lastPageIndex=e.pageIndex(),e._isDelayChanged=n,n||d(e,t,l)};t.VirtualDataLoader=class{constructor(e,t){this._dataOptions=t,this._controller=e,this._pageIndex=this._lastPageIndex=t.pageIndex(),this._cache=[],this._loadingPageIndexes={}}option(){return this._controller.option.apply(this._controller,arguments)}viewportItemIndexChanged(e){const t=this._dataOptions.pageSize(),i=this._dataOptions.pageCount(),n=this._controller.isVirtualMode(),o=this._controller.isAppendMode(),a=this._dataOptions.totalItemsCount();let s;if(t&&(n||o)&&a>=0){const n=this._controller.viewportSize();if(n&&e+n>=a&&!this._controller.isVirtual())if(this._dataOptions.hasKnownLastPage()){s=i-1;const e=a%t;s>0&&e>0&&e<n&&s--}else s=i;else{s=Math.floor(e/t);const n=i-1;s=Math.max(s,0),s=Math.min(s,n)}return this.pageIndex(s),this.load()}}pageIndex(e){const t=this._controller.isVirtualMode(),i=this._controller.isAppendMode();return!1!==this.option(a)&&(t||i)?(void 0!==e&&(this._pageIndex=e),this._pageIndex):this._dataOptions.pageIndex(e)}beginPageIndex(e){let t=r(this);return t<0&&(t=void 0!==e?e:this.pageIndex()),t}endPageIndex(){const e=l(this);return e>0?e:this._lastPageIndex}pageSize(){return this._dataOptions.pageSize()}load(){const e=this._dataOptions;let t;const i=this._controller.isVirtualMode(),o=this._controller.isAppendMode();if(!1!==this.option(a)&&(i||o)){const i=(e=>{let t=-1;const i=r(e),n=e._dataOptions;i<0?t=e._pageIndex:e._cache[e._pageIndex-i]?i>=0&&e._controller.viewportSize()>=0&&(i>0&&(l(e)+1===n.pageCount()&&e._cache.length<c(e)+1||e._pageIndex===i&&c(e,!0))&&(t=i-1),t<0&&i+e._cache.length<=e._pageIndex+c(e)&&(t=i+e._cache.length)):t=e._pageIndex;return e._loadingPageIndexes[t]&&(t=-1),t})(this);if(i>=0){const o=((e,t)=>{const i=e._dataOptions;if(t===e.pageIndex()||!i.isLoading()&&t<i.pageCount()||!i.hasKnownLastPage()&&t===i.pageCount())return i.pageIndex(t),e._loadingPageIndexes[t]=!0,(0,n.when)(i.load()).always((()=>{e._loadingPageIndexes[t]=!1}))})(this,i);o&&(t=new n.Deferred,o.done((()=>{const e=this._delayDeferred;e?e.done(t.resolve).fail(t.reject):t.resolve()})).fail(t.reject),e.updateLoading())}}else t=e.load();return t||this._lastPageIndex===this.pageIndex()||this._dataOptions.onChanged({changeType:"pageIndex"}),t||(new n.Deferred).resolve()}loadIfNeed(){const e=this._controller.isVirtualMode(),t=this._controller.isAppendMode();if((e||t)&&!this._dataOptions.isLoading()&&(!this._isChangedFiring||this._controller.isVirtual())){const e=this._controller.getViewportPosition();e>0?this._controller._setViewportPositionCore(e):this.load()}}handleDataChanged(e,t){const i=this._dataOptions;let n,o,p=this._cache.length;const g=this._controller.isVirtualMode(),_=this._controller.isAppendMode();if(t&&t.changes)d(this,e,t);else if(!1!==this.option(a)&&(g||_)){const t=r(this);if(t>=0&&(g&&t+this._cache.length!==i.pageIndex()&&t-1!==i.pageIndex()&&(p=0,this._cache=[]),_))if(0===i.pageIndex())this._cache=[];else if(i.pageIndex()<l(this))return void d(this,e,{changeType:"append",items:[]});const a={pageIndex:i.pageIndex(),itemsLength:i.items(!0).length,itemsCount:this.itemsCount(!0)};let f;this.option("scrolling.removeInvisiblePages")&&g?o=this._cache.length>Math.max(c(this)+(this.option("scrolling.preloadEnabled")?1:0),2):u(this,e,{isDelayed:!0}),t===i.pageIndex()+1?(o&&(f=this._cache.pop()),n="prepend",this._cache.unshift(a)):(o&&(f=this._cache.shift()),n="append",this._cache.push(a));const m=g&&0===p&&s(this);h(this,e,this._cache.length>1?n:void 0,m,f),this._delayDeferred=this.load().done((()=>{u(this,e)&&this.load()}))}else h(this,e,t)}getDelayDeferred(){return this._delayDeferred}itemsCount(e){let t=0;const i=this._controller.isVirtualMode();return!e&&i?this._cache.forEach((e=>{t+=e.itemsCount})):t=this._dataOptions.itemsCount(),t}virtualItemsCount(){let e=r(this);e<0&&(e=this._dataOptions.pageIndex());const t=e*this._dataOptions.pageSize(),i=this._cache.length*this._dataOptions.pageSize();return{begin:t,end:Math.max(0,this._dataOptions.totalItemsCount()-i-t)}}reset(){this._loadingPageIndexes={},this._cache=[]}}},21640:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.virtualScrollingModule=t.rowsView=t.resizing=t.dataSourceAdapterExtender=t.data=void 0;var n=f(i(64553)),o=f(i(48314)),a=i(87739),s=i(86858),r=i(21274),l=i(41639),d=i(57653),u=i(11528),c=i(3104),h=f(i(11979)),p=f(i(35185)),g=f(i(53226)),_=i(89272);function f(e){return e&&e.__esModule?e:{default:e}}const m="bottom-load-panel",v="dx-freespace-row",C="dx-virtual-row",y="scrolling.legacyMode",b="paging.pageIndex",x=["beginPageIndex","endPageIndex","pageIndex"],w=function(e){return"virtual"===e.option("scrolling.mode")},S=function(e){return"infinite"===e.option("scrolling.mode")},D=function(e){return w(e)||S(e)},I=function(e,t,i,n){for(let o=0;o<t+1;o++){const a=e[i?e.length-1-o:o];a&&!n(a,o===t,i)&&t++}return t},E=function(e,t){return"data"===e.rowType&&!e.isNewRow||"group"===e.rowType&&t.isGroupItemCountable(e.data)},T=function(e){const t=e._virtualScrollController.beginPageIndex(-1);w(e)&&(t<0||e.viewportSize()>=0&&e.getViewportItemIndex()>=0&&(t*e.pageSize()>e.getViewportItemIndex()||t*e.pageSize()+e.itemsCount()<e.getViewportItemIndex()+e.viewportSize())&&e._dataSource.isLoading()?e._isLoading||(e._isLoading=!0,e.loadingChanged.fire(!0)):e._isLoading&&(e._isLoading=!1,e.loadingChanged.fire(!1)))},A=function(e,t,i){if(!1===e.option(y)&&x.includes(t)){const t=e._dataSource;return t.pageIndex.apply(t,i)}const n=e._virtualScrollController;return n[t].apply(n,i)},O=function(e,t){const i=e.toArray().map((e=>(0,n.default)(e).parent(`.${t}`).get(0))).filter((e=>e));i.length&&(e=(0,n.default)(i));const o=t===v?e.length-1:e.length;for(let t=0;t<o;t++)e.eq(t).remove()};t.dataSourceAdapterExtender=e=>class extends e{init(){super.init.apply(this,arguments),this._items=[],this._totalCount=-1,this._isLoaded=!0,this._loadPageCount=1,this._virtualScrollController=new _.VirtualScrollController(this.component,this._getVirtualScrollDataOptions())}dispose(){this._virtualScrollController.dispose(),super.dispose.apply(this,arguments)}_getVirtualScrollDataOptions(){const e=this;return{pageSize:()=>e.pageSize(),totalItemsCount:()=>e.totalItemsCount(),hasKnownLastPage:()=>e.hasKnownLastPage(),pageIndex:t=>e._dataSource.pageIndex(t),isLoading:()=>e._dataSource.isLoading()&&!e.isCustomLoading(),pageCount:()=>e.pageCount(),load:()=>e._dataSource.load(),updateLoading(){T(e)},itemsCount:()=>e.itemsCount(!0),items:()=>e._dataSource.items(),viewportItems:t=>(t&&(e._items=t),e._items),onChanged(t){e.changed.fire(t)},changingDuration:()=>e.isLoading()?300:e._renderTime||0}}_handleLoadingChanged(e){!1!==this.option(y)?(w(this)&&!this._isLoadingAll||(this._isLoading=e,super._handleLoadingChanged.apply(this,arguments)),this._startLoadTime=e?new Date:void 0):super._handleLoadingChanged.apply(this,arguments)}_handleLoadError(){!1!==this.option(y)&&(this._isLoading=!1,this.loadingChanged.fire(!1)),super._handleLoadError.apply(this,arguments)}_handleDataChanged(e){if(!1===this.option(y))return this._items=this._dataSource.items().slice(),this._totalCount=this._dataSourceTotalCount(!0),void super._handleDataChanged.apply(this,arguments);const t=super._handleDataChanged.bind(this);this._virtualScrollController.handleDataChanged(t,e)}_customizeRemoteOperations(e,t){const i=!1===this.option(y);let n=this.option("scrolling.renderAsync");(0,u.isDefined)(n)||(n=this._renderTime>=this.option("scrolling.renderingThreshold")),!(w(this)||S(this)&&i)||t.reload||!t.skip&&!i||n||(e.delay=void 0),super._customizeRemoteOperations.apply(this,arguments)}items(){return this._items}_dataSourceTotalCount(e){return!1===this.option(y)&&w(this)&&!e?this._totalCount:super._dataSourceTotalCount()}itemsCount(e){return e||!1===this.option(y)?super.itemsCount():this._virtualScrollController.itemsCount()}load(e){return!1===this.option(y)||e?super.load(e):this._virtualScrollController.load()}isLoading(){return!1===this.option(y)?this._dataSource.isLoading():this._isLoading}isLoaded(){return this._dataSource.isLoaded()&&this._isLoaded}resetPagesCache(e){e||this._virtualScrollController.reset(!0),super.resetPagesCache.apply(this,arguments)}_changeRowExpandCore(){const e=super._changeRowExpandCore.apply(this,arguments);return!1===this.option(y)||(this.resetPagesCache(),T(this)),e}reload(){this._dataSource.pageIndex(this.pageIndex());const e=this._virtualScrollController;if(!1!==this.option(y)&&e){const t=new a.Deferred;return super.reload.apply(this,arguments).done((i=>{const n=e.getDelayDeferred();n?n.done(t.resolve).fail(t.reject):t.resolve(i)})).fail(t.reject),t}return super.reload.apply(this,arguments)}refresh(e,t){if(!1!==this.option(y)){const{storeLoadOptions:i}=e,n=this._dataSource;t.reload?(this._virtualScrollController.reset(),n.items().length=0,this._isLoaded=!1,T(this),this._isLoaded=!0,S(this)?(this.pageIndex(0),n.pageIndex(0),i.pageIndex=0,e.pageIndex=0,i.skip=0):(n.pageIndex(this.pageIndex()),n.paginate()&&(e.pageIndex=this.pageIndex(),i.skip=this.pageIndex()*this.pageSize()))):S(this)&&i.skip&&this._totalCountCorrection<0&&(i.skip+=this._totalCountCorrection)}return super.refresh.apply(this,arguments)}loadPageCount(e){if(!(0,u.isDefined)(e))return this._loadPageCount;this._loadPageCount=e}_handleDataLoading(e){const t=this.loadPageCount(),i=this.pageSize(),n=!1===this.option(y),{storeLoadOptions:o}=e,a=(0,u.isDefined)(o.take);e.loadPageCount=t,!e.isCustomLoading&&n&&a&&t>1&&i>0&&(o.take=t*i),super._handleDataLoading.apply(this,arguments)}_loadPageSize(){return super._loadPageSize.apply(this,arguments)*this.loadPageCount()}beginPageIndex(){return A(this,"beginPageIndex",[...arguments])}endPageIndex(){return A(this,"endPageIndex",[...arguments])}pageIndex(e){return A(this,"pageIndex",[...arguments])}virtualItemsCount(){return A(this,"virtualItemsCount",[...arguments])}getContentOffset(){return A(this,"getContentOffset",[...arguments])}getVirtualContentSize(){return A(this,"getVirtualContentSize",[...arguments])}setContentItemSizes(){return A(this,"setContentItemSizes",[...arguments])}setViewportPosition(){return A(this,"setViewportPosition",[...arguments])}getViewportItemIndex(){return A(this,"getViewportItemIndex",[...arguments])}setViewportItemIndex(e){return A(this,"setViewportItemIndex",[...arguments])}getItemIndexByPosition(){return A(this,"getItemIndexByPosition",[...arguments])}viewportSize(){return A(this,"viewportSize",[...arguments])}viewportItemSize(){return A(this,"viewportItemSize",[...arguments])}getItemSize(){return A(this,"getItemSize",[...arguments])}getItemSizes(){return A(this,"getItemSizes",[...arguments])}loadIfNeed(){return A(this,"loadIfNeed",[...arguments])}};const P=e=>class extends e{dispose(){const e=this._rowsScrollController;e&&e.dispose(),super.dispose.apply(this,arguments)}_refreshDataSource(){const e=super._refreshDataSource.apply(this,arguments)||(new a.Deferred).resolve().promise();return e.done(this.initVirtualRows.bind(this)),e}_loadDataSource(){if(this._rowsScrollController&&D(this)){var e;const{loadPageCount:t}=(0,u.isDefined)(this._loadViewportParams)?this.getLoadPageParams():{loadPageCount:0};t>=1&&(null===(e=this._dataSource)||void 0===e||e.loadPageCount(t))}return super._loadDataSource.apply(this,arguments)}getRowPageSize(){const e=this.option("scrolling.rowPageSize"),t=this.pageSize();return t&&t<e?t:e}reload(){const e=this._rowsScrollController||this._dataSource,t=e&&e.getItemIndexByPosition(),i=super.reload.apply(this,arguments);return i&&i.done((()=>{if(w(this)||g.default.isVirtualRowRendering(this)){const i=this.getRowIndexOffset(),a=Math.floor(t)-i,{component:s}=this,r=s.getScrollable&&s.getScrollable(),l=this.dataSource().operationTypes().sorting;if(r&&!l&&a>=0){var e;const i=s.getRowElement(a),l=i&&i[0]&&(0,n.default)(i[0]);let u=l&&(null===(e=l.position())||void 0===e?void 0:e.top);const c=o.default.chrome&&Number(o.default.version??0)>=91,h=o.default.mozilla||c?1:0;u&&u>h&&(u=Math.round(u+(0,d.getOuterHeight)(l)*(t%1)),r.scrollTo({y:u}))}}}))}initVirtualRows(){const e=g.default.isVirtualRowRendering(this);if(this._allItems=null,this._loadViewportParams=null,"virtual"!==this.option("scrolling.mode")&&!e||!e||!1!==this.option(y)&&!this.option("scrolling.rowPageSize"))return this._visibleItems=null,void(this._rowsScrollController=null);const t=!w(this)&&this.pageIndex()>=this.pageCount()?this.pageCount()-1:this.pageIndex();this._rowPageIndex=Math.ceil(t*this.pageSize()/this.getRowPageSize()),this._visibleItems=!1===this.option(y)?null:[],this._viewportChanging=!1,this._needUpdateViewportAfterLoading=!1,this._rowsScrollController||(this._rowsScrollController=new _.VirtualScrollController(this.component,this._getRowsScrollDataOptions(),!0),this._rowsScrollController.positionChanged.add((()=>{var e;if(!1===this.option(y))return this._viewportChanging=!0,this.loadViewport(),void(this._viewportChanging=!1);null===(e=this._dataSource)||void 0===e||e.setViewportItemIndex(this._rowsScrollController.getViewportItemIndex())}))),!1===this.option(y)&&this._updateLoadViewportParams(),this.isLoaded()&&!1!==this.option(y)&&this._rowsScrollController.load()}isViewportChanging(){return this._viewportChanging}_getRowsScrollDataOptions(){const e=this,t=function(t){return E(t,e._dataSource)};return{pageSize:()=>e.getRowPageSize(),loadedOffset(){var t;return w(e)&&(null===(t=e._dataSource)||void 0===t?void 0:t.lastLoadOptions().skip)||0},loadedItemCount:()=>e._itemCount,totalItemsCount:()=>D(e)?e.totalItemsCount():!1===e.option(y)?e._itemCount:e._items.filter(t).length,hasKnownLastPage:()=>!1!==e.option(y)||e.hasKnownLastPage(),pageIndex:t=>(void 0!==t&&(e._rowPageIndex=t),e._rowPageIndex),isLoading:()=>e.isLoading(),pageCount(){return Math.ceil(this.totalItemsCount()/this.pageSize())||1},load(){e._rowsScrollController.pageIndex()>=this.pageCount()&&(e._rowPageIndex=this.pageCount()-1,e._rowsScrollController.pageIndex(e._rowPageIndex)),!this.items().length&&this.totalItemsCount()||e._rowsScrollController.handleDataChanged((t=>{(t=t||{}).changeType=t.changeType||"refresh",t.items=t.items||e._visibleItems,e._visibleItems.forEach(((e,t)=>{e.rowIndex=t})),e._fireChanged(t)}))},updateLoading(){},itemsCount(){return this.items(!0).length},correctCount:(e,i,n)=>I(e,i,n,((e,i,n)=>e.isNewRow?i&&!n:i&&n?!e.isNewRow:t(e))),items(i){let n=e._items;if(e.option(y)){const t=e.dataSource(),i=null==t?void 0:t.virtualItemsCount(),o=i?i.begin:0,a=e.getRowPageSize();let s=e._rowPageIndex*a-o,r=a;if(s<0)return[];s&&(s=this.correctCount(n,s),n=n.slice(s)),r&&(r=this.correctCount(n,r),n=n.slice(0,r))}return i?n.filter(t):n},viewportItems:t=>(t&&!1!==e.option(y)&&(e._visibleItems=t),e._visibleItems),onChanged(){},changingDuration(){const t=e.dataSource();return null!=t&&t.isLoading()&&!1!==e.option(y)?300:(null==t?void 0:t._renderTime)||0}}}_updateItemsCore(e){const t=this.getRowIndexDelta();if(super._updateItemsCore.apply(this,arguments),!1===this.option(y)&&g.default.isVirtualRowRendering(this))return void("update"===e.changeType&&0===e.rowIndices.length&&e.cancelEmptyChanges&&(e.cancel=!0));const i=this._rowsScrollController;if(i){const n=this._visibleItems,o="refresh"===e.changeType||e.isLiveUpdate;if("append"===e.changeType&&e.items&&!e.items.length)return;o||"append"===e.changeType||"prepend"===e.changeType?(e.cancel=!0,o&&i.reset(!0),i.load()):("update"===e.changeType?e.rowIndices.forEach(((t,i)=>{const o=e.changeTypes[i],a=e.items[i];"update"===o?n[t]=a:"insert"===o?n.splice(t,0,a):"remove"===o&&n.splice(t,1)})):(n.forEach(((e,i)=>{n[i]=this._items[i+t]||n[i]})),e.items=n),n.forEach(((e,t)=>{e.rowIndex=t})))}}_updateLoadViewportParams(){const e=this._rowsScrollController.getViewportParams(),t=this.pageSize();if(e&&!D(this)&&t>0){const i=this.pageIndex()*t;e.skip+=i}this._loadViewportParams=e}_processItems(){const e=super._processItems.apply(this,arguments);if(!1===this.option(y)){const t=this._dataSource;let i,n,o,a=(null==t?void 0:t.lastLoadOptions().skip)??0,s=!1,r=[];e.forEach((e=>{const{rowType:l}=e,d=E(e,t),c="group"===l&&(i||d||"group"!==n&&a>0),h="data"===l&&d&&(i||"group"!==n);if(!e.isNewRow&&(0,u.isDefined)(i)){!c&&!h||o&&!s||a++}(c||h)&&(s=!0),e.isNewRow?r.push(e):(r.forEach((e=>{e.loadIndex=a})),r=[]),e.loadIndex=a,i=d,n=l,o=e.isNewRow})),r.forEach((e=>{e.loadIndex=a}))}return e}_afterProcessItems(e){if(this._itemCount=e.filter((e=>E(e,this._dataSource))).length,(0,u.isDefined)(this._loadViewportParams)){this._updateLoadViewportParams();let t=e;if(this._allItems=e,e.length){const{skipForCurrentPage:i}=this.getLoadPageParams(!0),n=e[0].loadIndex+i,{take:o}=this._loadViewportParams;t=e.filter((e=>{const t=e.isNewRow&&e.loadIndex===n&&0===o,i=e.loadIndex>=n,a=e.loadIndex<n+o||t;return i&&a}))}return t}return super._afterProcessItems.apply(this,arguments)}_applyChange(e){const t=this,{items:i}=e,{changeType:n}=e;let{removeCount:o}=e;if(o){const i="prepend"===n;o=I(t._items,o,i,((e,i)=>"data"===e.rowType&&!e.isNewRow||"group"===e.rowType&&(t._dataSource.isGroupItemCountable(e.data)||i))),e.removeCount=o}switch(n){case"prepend":t._items.unshift.apply(t._items,i),o&&t._items.splice(-o);break;case"append":t._items.push.apply(t._items,i),o&&t._items.splice(0,o);break;default:super._applyChange(e)}}items(e){return e?this._allItems||this._items:this._visibleItems||this._items}getRowIndexDelta(){let e=0;if(this.option(y)){const t=this._visibleItems;t&&t[0]&&(e=this._items.indexOf(t[0]))}return e<0?0:e}getRowIndexOffset(e,t){let i=0;const n=this.dataSource(),o=this._rowsScrollController,a=!1===this.option(y),s=D(this);if(o&&!e)if(a&&(0,u.isDefined)(this._loadViewportParams)){const{skipForCurrentPage:e,pageIndex:t}=this.getLoadPageParams(!0),n=this.items(!0);if(i=s?t*this.pageSize():0,n.length){const t=n[0].loadIndex;i+=n.filter((i=>i.loadIndex<t+e)).length}}else i=o.beginPageIndex()*o.pageSize();else if(s&&a&&n){var r;const e=n.lastLoadOptions();i=t&&null!==(r=e.skips)&&void 0!==r&&r.length?e.skips.reduce(((e,t)=>e+t),0):e.skip??0}else w(this)&&n&&(i=n.beginPageIndex()*n.pageSize());return i}getDataIndex(){return!1===this.option(y)?this.getRowIndexOffset(!0,!0):super.getDataIndex.apply(this,arguments)}viewportSize(){const e=this._rowsScrollController,t=this._dataSource,i=null==e?void 0:e.viewportSize.apply(e,arguments);return!1===this.option(y)?i:null==t?void 0:t.viewportSize.apply(t,arguments)}viewportHeight(e,t){var i;null===(i=this._rowsScrollController)||void 0===i||i.viewportHeight(e,t)}viewportItemSize(){const e=this._rowsScrollController,t=this._dataSource,i=null==e?void 0:e.viewportItemSize.apply(e,arguments);return!1===this.option(y)?i:null==t?void 0:t.viewportItemSize.apply(t,arguments)}setViewportPosition(){const e=this._rowsScrollController,t=this._dataSource;this._isPaging=!1,e?e.setViewportPosition.apply(e,arguments):null==t||t.setViewportPosition.apply(t,arguments)}setContentItemSizes(e){const t=this._rowsScrollController,i=this._dataSource,n=null==t?void 0:t.setContentItemSizes(e);return!1===this.option(y)?n:null==i?void 0:i.setContentItemSizes(e)}getPreloadedRowCount(){const e=this.option("scrolling.preloadedRowCount"),t=this.option("scrolling.preloadEnabled");if((0,u.isDefined)(e))return e;const i=this.viewportSize();return t?2*i:i}getLoadPageParams(e){var t,i;const n=this.pageSize(),o=this._loadViewportParams,a=null===(t=this._dataSource)||void 0===t?void 0:t.lastLoadOptions(),s=(null==a?void 0:a.pageIndex)||0,r=(null==a?void 0:a.take)||0,l=this._rowsScrollController.isScrollingBack(),d=l?this.getPreloadedRowCount():0,u=l?0:this.getPreloadedRowCount(),c=(null===(i=this._dataSource)||void 0===i?void 0:i.totalCountCorrection())||0,h=Math.max(0,o.skip-d),p=e?s:Math.floor(n?h/n:0),g=p*n,_=o.skip-g,f=o.take+_+u-c,m=e?r:f,v=Math.ceil(n?m/n:0);return{pageIndex:p,loadPageCount:Math.max(1,v),skipForCurrentPage:Math.max(0,_)}}_updateVisiblePageIndex(e){if(!this._rowsScrollController)return;if((0,u.isDefined)(e))return this._silentOption(b,e),void this.pageChanged.fire();const t=this._rowsScrollController.getViewportItemIndex(),i=Math.floor(t/this.pageSize());this.pageIndex()!==i&&(this._silentOption(b,i),this.updateItems({changeType:"pageIndex"}))}_getChangedLoadParams(){const e=this.getLoadPageParams(!0),{pageIndex:t,loadPageCount:i}=this.getLoadPageParams(),n=this._pageIndexIsValid(t);let o=null;return this._isLoading||!n||t===e.pageIndex&&i===e.loadPageCount||(o={pageIndex:t,loadPageCount:i}),o}_pageIndexIsValid(e){let t=!0;return(S(this)&&this.hasKnownLastPage()||w(this))&&(t=e*this.pageSize()<this.totalItemsCount()),t}_loadItems(e,t){const i=D(this),n=this._dataSource,o=this._getChangedLoadParams(),a=(null==n?void 0:n.loadPageCount())??0,s=this.pageSize()*a,r=(null==n?void 0:n.pageIndex())??0,l=(null==o?void 0:o.pageIndex)===r,d=S(this)&&this.totalItemsCount()<s,u="repaint"===this.option("editing.refreshMode"),c=(null==o?void 0:o.pageIndex)>r;let h=!1;if(!n||i&&e&&(u&&t||c||l&&d))return h;if(i&&this._isLoading&&(this._needUpdateViewportAfterLoading=!0),i&&o){h=!0,n.pageIndex(o.pageIndex),n.loadPageCount(o.loadPageCount),this._repaintChangesOnly=!0,this._needUpdateDimensions=!0;const e=this._viewportChanging;this.load().always((()=>{this._repaintChangesOnly=void 0,this._needUpdateDimensions=void 0})).done((()=>{const t=this.pageCount()>0&&this.pageIndex()===this.pageCount()-1;(e||t)&&this._updateVisiblePageIndex(),this._needUpdateViewportAfterLoading&&(this._needUpdateViewportAfterLoading=!1,this.loadViewport({checkLoadedParamsOnly:!0}))}))}return h}loadViewport(e){const{checkLoadedParamsOnly:t,checkLoading:i,viewportIsNotFilled:n}=e??{};if(D(this)||g.default.isVirtualRowRendering(this)){var o;this._updateLoadViewportParams();const e=this._loadItems(i,!n),s=null===(o=this._dataSource)||void 0===o?void 0:o.isCustomLoading(),r=i&&!s&&this._isLoading;if(!(e||r||t)){var a;const e=!(null!==(a=this._editingController)&&void 0!==a&&null!==(a=a.getChanges())&&void 0!==a&&a.length);this.updateItems({repaintChangesOnly:!0,needUpdateDimensions:!0,useProcessedItemsCache:e,cancelEmptyChanges:!0})}}}updateViewport(){var e;const t=this.viewportSize(),i=this.items().length,n=t>i,o=(null===(e=this._loadViewportParams)||void 0===e?void 0:e.take)??0,a=this._rowsScrollController,s=null==a?void 0:a.getViewportParams().take;(n||o<s)&&!this._isPaging&&i&&this.loadViewport({checkLoading:!0,viewportIsNotFilled:n})}loadIfNeed(){if(!1===this.option(y))return;const e=this._rowsScrollController;e&&e.loadIfNeed();const t=this._dataSource;return t&&t.loadIfNeed()}getItemSize(){const e=this._rowsScrollController;if(e)return e.getItemSize.apply(e,arguments);const t=this._dataSource;return t&&t.getItemSize.apply(t,arguments)}getItemSizes(){const e=this._rowsScrollController;if(e)return e.getItemSizes.apply(e,arguments);const t=this._dataSource;return t&&t.getItemSizes.apply(t,arguments)}getContentOffset(){const e=this._rowsScrollController;if(e)return e.getContentOffset.apply(e,arguments);const t=this._dataSource;return t&&t.getContentOffset.apply(t,arguments)}refresh(e){const t=this._dataSource;return t&&e&&e.load&&S(this)&&t.resetCurrentTotalCount(),super.refresh.apply(this,arguments)}topItemIndex(){var e;return null===(e=this._loadViewportParams)||void 0===e?void 0:e.skip}bottomItemIndex(){const e=this._loadViewportParams;return e&&e.skip+e.take}virtualItemsCount(){const e=this._rowsScrollController;if(e)return e.virtualItemsCount.apply(e,arguments);const t=this._dataSource;return null==t?void 0:t.virtualItemsCount.apply(t,arguments)}pageIndex(e){const t=D(this),i=this._rowsScrollController;return!1===this.option(y)&&t&&i&&void 0===e?this.option(b)??0:super.pageIndex.apply(this,arguments)}_fireChanged(e){super._fireChanged.apply(this,arguments);const{operationTypes:t}=e;if(!1===this.option(y)&&D(this)&&t){const{fullReload:i,pageIndex:n}=t;e.isDataChanged&&!i&&n&&this._updateVisiblePageIndex(this._dataSource.pageIndex())}}_getPagingOptionValue(e){let t=super._getPagingOptionValue.apply(this,arguments);return!1===this.option(y)&&D(this)&&(t=this[e]()),t}isEmpty(){return!1===this.option(y)?!this.items(!0).length:super.isEmpty.apply(this,arguments)}isLastPageLoaded(){let e=!1;if(!1===this.option(y)&&D(this)){const{pageIndex:t,loadPageCount:i}=this.getLoadPageParams(!0);e=t+i>=this.pageCount()}else e=super.isLastPageLoaded.apply(this,arguments);return e}reset(){this._itemCount=0,this._allItems=null,super.reset.apply(this,arguments)}_applyFilter(){var e;return null===(e=this._dataSource)||void 0===e||e.loadPageCount(1),super._applyFilter.apply(this,arguments)}getVirtualContentSize(){var e;return null===(e=this._dataSource)||void 0===e?void 0:e.getVirtualContentSize.apply(this._dataSource,arguments)}setViewportItemIndex(){var e;return null===(e=this._dataSource)||void 0===e?void 0:e.setViewportItemIndex.apply(this._dataSource,arguments)}};t.data=P;const k=e=>class extends e{dispose(){super.dispose.apply(this,arguments),clearTimeout(this._resizeTimeout)}_updateMasterDataGridCore(e){return(0,a.when)(super._updateMasterDataGridCore.apply(this,arguments)).done((t=>{const i=w(e)&&!1===e.option(y);if(!t&&i){e.getScrollable()&&e.updateDimensions()}}))}hasResizeTimeout(){return(0,u.isDefined)(this._resizeTimeout)}resize(){let e;if(w(this)||g.default.isVirtualRowRendering(this)){clearTimeout(this._resizeTimeout),this._resizeTimeout=null;const t=new Date-this._lastTime,i=this.option("scrolling.updateTimeout");this._lastTime&&t<i?(e=new a.Deferred,this._resizeTimeout=setTimeout((()=>{this._resizeTimeout=null,super.resize.apply(this).done(e.resolve).fail(e.reject),this._lastTime=new Date}),i),this._lastTime=new Date):(e=super.resize.apply(this),this._dataController.isLoaded()&&(this._lastTime=new Date))}else e=super.resize.apply(this);return e}};t.resizing=k;const M=e=>class extends e{init(){var e;super.init(),this._dataController.pageChanged.add((e=>{const t=this._scrollTop;this.scrollToPage(e??this._dataController.pageIndex()),!1===this.option(y)&&this._scrollTop===t&&this._dataController.updateViewport()})),this._dataController.dataSourceChanged.add((()=>{!this._scrollTop&&this._scrollToCurrentPageOnResize()})),null===(e=this._dataController.stateLoaded)||void 0===e||e.add((()=>{this._scrollToCurrentPageOnResize()})),this._scrollToCurrentPageOnResize()}dispose(){clearTimeout(this._scrollTimeoutID),super.dispose()}_scrollToCurrentPageOnResize(){if(this._dataController.pageIndex()>0){const e=()=>{this.resizeCompleted.remove(e),this.scrollToPage(this._dataController.pageIndex())};this.resizeCompleted.add(e)}}scrollToPage(e){const t=this._dataController?this._dataController.pageSize():0;let i;if(w(this)||S(this)){const n=this._dataController.getItemSize(),o=this._dataController.getItemSizes(),a=e*t;i=a*n;for(const e in o)parseInt(e)<a&&(i+=o[e]-n)}else i=0;this.scrollTo({y:i,x:this._scrollLeft})}renderDelayedTemplates(){this.waitAsyncTemplates().done((()=>{this._updateContentPosition(!0)})),super.renderDelayedTemplates.apply(this,arguments)}_renderCore(e){const t=new Date,i=super._renderCore.apply(this,arguments),n=this._dataController._dataSource;if(n&&e){const i=e.items?e.items.length:20,o=this._dataController.viewportSize()||20;g.default.isVirtualRowRendering(this)&&i>0&&!1!==this.option(y)?n._renderTime=(new Date-t)*o/i:n._renderTime=new Date-t}return i}_getRowElements(e){const t=super._getRowElements(e);return t&&t.not(`.${C}`)}_removeRowsElements(e,t,i){let o=this._getRowElements(e).toArray();o="append"===i?o.slice(0,t):o.slice(-t),o.map((e=>{const t=(0,n.default)(e);this._errorHandlingController&&this._errorHandlingController.removeErrorRow(t.next()),t.remove()}))}_updateContent(e,t){let i;const n=this._findContentElement(),o=t&&t.changeType,s=(0,a.Deferred)(),r=n.children().first();return"append"===o||"prepend"===o?this.waitAsyncTemplates().done((()=>{const n=this._getBodies(e);1===n.length?this._getBodies(r)["append"===o?"append":"prepend"](n.children()):n["append"===o?"appendTo":"prependTo"](r),e.remove(),i=this._getFreeSpaceRowElements(r),O(i,v),t.removeCount&&this._removeRowsElements(r,t.removeCount,o),this._restoreErrorRow(r),s.resolve()})).fail(s.reject):super._updateContent.apply(this,arguments).done((()=>{"update"===o&&this._restoreErrorRow(r),s.resolve()})).fail(s.reject),s.promise().done((()=>{this._updateBottomLoading()}))}_addVirtualRow(e,t,i,n){if(!n)return;let o=this._createEmptyRow(C,t,n);o=this._wrapRowIfNeed(e,o),this._appendEmptyRow(e,o,i)}_updateContentItemSizes(){const e=this._getRowHeights(),t=this._correctRowHeights(e);this._dataController.setContentItemSizes(t)}_updateViewportSize(e,t){(0,u.isDefined)(e)||(e=this._hasHeight?(0,d.getOuterHeight)(this.element()):(0,d.getOuterHeight)((0,c.getWindow)())),this._dataController.viewportHeight(e,t)}_getRowHeights(){var e,t;const i=null===(e=this._editingController)||void 0===e||null===(t=e.isPopupEditMode)||void 0===t?void 0:t.call(e);let o=this._getRowElements(this._tableElement).toArray();return i&&(o=o.filter((e=>!(0,n.default)(e).hasClass("dx-row-inserted")))),o.map((e=>(0,l.getBoundingRect)(e).height))}_correctRowHeights(e){const t=this._dataController,i=t._dataSource,n=[],o=t.getVisibleRows();let a=0,s=!0,r=-1;for(let t=0;t<e.length;t++){const l=o[t];(0,u.isDefined)(l)&&(!1===this.option(y)?(r>=0&&r!==l.loadIndex&&(n.push(a),a=0),r=l.loadIndex):E(l,i)&&(s?s=!1:(n.push(a),a=0)),a+=e[t])}return a>0&&n.push(a),n}_updateContentPosition(e){const t=this._rowHeight||20;if(this._dataController.viewportItemSize(t),w(this)||g.default.isVirtualRowRendering(this)){e||this._updateContentItemSizes();const t=this._dataController.getContentOffset("begin"),i=this._dataController.getContentOffset("end"),o=this.getTableElements(),a=o.children("tbody").children(`.${C}`);O(a,C),o.each(((e,o)=>{const a=e>0,s=this._isFixedTableRendering;this._isFixedTableRendering=a,this._addVirtualRow((0,n.default)(o),a,"top",t),this._addVirtualRow((0,n.default)(o),a,"bottom",i),this._isFixedTableRendering=s}))}}_isTableLinesDisplaysCorrect(e){return e.find(".dx-column-lines").length>0===this.option("showColumnLines")}_isColumnElementsEqual(e,t){let i=e.length===t.length;return i&&(0,r.each)(e,((e,n)=>{if(n.style.width!==t[e].style.width)return i=!1,i})),i}_getCellClasses(e){const t=[],{cssClass:i}=e,n="expand"===e.command;return i&&t.push(i),n&&t.push(this.addWidgetPrefix("group-space")),t}_findBottomLoadPanel(e){const t=e||this.element(),i=t&&t.find(`.${this.addWidgetPrefix(m)}`);if(i&&i.length)return i}_updateBottomLoading(){const e=this,t=w(this),i=S(this),o=!e._dataController.hasKnownLastPage()&&e._dataController.isLoaded()&&(t||i),a=e._findContentElement(),s=e._findBottomLoadPanel(a);o?s||(0,n.default)("<div>").addClass(e.addWidgetPrefix(m)).append(e._createComponent((0,n.default)("<div>"),h.default,{elementAttr:{role:null,"aria-label":null}}).$element()).appendTo(a):s&&s.remove()}_handleScroll(e){const t=!0===this.option(y),i=0===e.scrollOffset.top,n=this._scrollTop!==e.scrollOffset.top||e.forceUpdateScrollPosition,o=this._hasHeight||!t&&i;if(n&&o&&this._rowHeight){this._scrollTop=e.scrollOffset.top;(w(this)||"standard"!==this.option("scrolling.rowRenderingMode"))&&!1===this.option(y)&&(this._updateContentItemSizes(),this._updateViewportSize(null,this._scrollTop)),this._dataController.setViewportPosition(e.scrollOffset.top)}super._handleScroll.apply(this,arguments)}_needUpdateRowHeight(e){return super._needUpdateRowHeight.apply(this,arguments)||e>0&&S(this)&&!g.default.isVirtualRowRendering(this)}_updateRowHeight(){if(super._updateRowHeight.apply(this,arguments),this._rowHeight){this._updateContentPosition();const e=this._hasHeight?(0,d.getOuterHeight)(this.element()):(0,d.getOuterHeight)((0,c.getWindow)());!1===this.option(y)?(this._updateViewportSize(e),this._dataController.updateViewport()):this._dataController.viewportSize(Math.ceil(e/this._rowHeight))}}updateFreeSpaceRowHeight(){const e=super.updateFreeSpaceRowHeight.apply(this,arguments);return e&&this._updateContentPosition(),e}setLoading(e,t){const i=this._dataController,n=i.pageIndex()>0&&i.isLoaded()&&!!this._findBottomLoadPanel();!1===this.option(y)&&e&&i.isViewportChanging()||(n&&(e=!1),super.setLoading.call(this,e,t))}throwHeightWarningIfNeed(){if(void 0===this._hasHeight)return;!this._hasHeight&&D(this)&&!this._heightWarningIsThrown&&(this._heightWarningIsThrown=!0,p.default.log("W1025"))}_resizeCore(){const e=this,t=e.element();super._resizeCore(),this.throwHeightWarningIfNeed(),e.component.$element()&&!e._windowScroll&&(0,s.isElementInDom)(t)&&(e._windowScroll=(0,_.subscribeToExternalScrollers)(t,(t=>{!e._hasHeight&&e._rowHeight&&e._dataController.setViewportPosition(t)}),e.component.$element()),e.on("disposing",(()=>{e._windowScroll.dispose()}))),!1!==this.option(y)&&e.loadIfNeed()}loadIfNeed(){var e,t;null===(e=this._dataController)||void 0===e||null===(t=e.loadIfNeed)||void 0===t||t.call(e)}_restoreErrorRow(e){var t;!1===this.option(y)&&(null===(t=this._errorHandlingController)||void 0===t||t.removeErrorRow());super._restoreErrorRow.apply(this,arguments)}};t.rowsView=M;t.virtualScrollingModule={defaultOptions:()=>({scrolling:{timeout:300,updateTimeout:300,minTimeout:0,renderingThreshold:100,removeInvisiblePages:!0,rowPageSize:5,prerenderedRowChunkSize:1,mode:"standard",preloadEnabled:!1,rowRenderingMode:"standard",loadTwoPagesOnStart:!1,legacyMode:!1,prerenderedRowCount:1}}),extenders:{controllers:{data:P,resizing:k},views:{rowsView:M}}}},89272:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.VirtualScrollController=void 0,t.subscribeToExternalScrollers=v;var n=g(i(3030)),o=g(i(92774)),a=g(i(64553)),s=g(i(48314)),r=g(i(84718)),l=i(87739),d=i(21274),u=i(11528),c=i(3104),h=g(i(53226)),p=i(54988);function g(e){return e&&e.__esModule?e:{default:e}}const _="virtual",f="scrolling.legacyMode",m=e=>e.option("scrolling.mode")===_||e._isVirtual;function v(e,t,i){let s;const r=[],l=[],u=[];function h(t){const i=t.element?t.$element():t,o=n.default.offset(i);return o?t.scrollTop()-(o.top-e.offset().top):e.offset().top}i=i||e;const p={on(e,t,i){e.on("scroll",i)},off(e,t,i){e.off("scroll",i)}};function g(e){const i="#document"===e.get(0).nodeName,n=e.get(0).nodeType===(0,c.getWindow)().Node.ELEMENT_NODE;let s=e.data("dxScrollable"),d=p;if(!s&&(s=i&&(0,a.default)((0,c.getWindow)())||n&&"auto"===e.css("overflowY")&&e,d=o.default,!s))return;const g=function(e){return function(){let i=e.scrollTop()-h(e);i=i>0?i:0,t(i)}}(s);d.on(s,"scroll",g),l.push((e=>{const t=h(s),i=s.scrollTo?"scrollTo":"scrollTop";e-t>=0&&s[i](e+t)})),r.push(s),u.push((()=>{d.off(s,"scroll",g)}))}const _=e=>(0,a.default)(e.get(0).parentNode??e.get(0).host);for(s=i.parent();s.length;s=_(s))g(s);return{scrollTo(e){(0,d.each)(l,((t,i)=>{i(e)}))},dispose(){(0,d.each)(u,((e,t)=>{t()}))}}}class C{constructor(e,t,i){this._dataOptions=t,this.component=e,this._viewportSize=!1===e.option(f)?15:0,this._viewportItemSize=20,this._viewportItemIndex=0,this._position=0,this._isScrollingBack=!1,this._contentSize=0,this._itemSizes={},this._sizeRatio=1,this._isVirtual=i,this.positionChanged=(0,r.default)(),this._dataLoader=new p.VirtualDataLoader(this,this._dataOptions)}getItemSizes(){return this._itemSizes}option(e,t){return this.component.option.apply(this.component,arguments)}isVirtual(){return this._isVirtual}virtualItemsCount(){if(m(this)){const e=this._dataOptions,t=e.totalItemsCount();if(!1===this.option(f)&&-1!==t){const i=this.getViewportParams(),n=e.loadedOffset(),o=e.loadedItemCount(),a=Math.max(i.skip,n),s=Math.min(i.take,o);return{begin:a,end:Math.max(t-(a+s),0)}}return this._dataLoader.virtualItemsCount.apply(this._dataLoader,arguments)}}getScrollingTimeout(){const e=this.option("scrolling.renderAsync");let t=0;return(0,u.isDefined)(e)?e&&(t=this.option("scrolling.timeout")??0):(t=Math.min(this.option("scrolling.timeout")||0,this._dataOptions.changingDuration()),t<this.option("scrolling.renderingThreshold")&&(t=this.option("scrolling.minTimeout")||0)),t}setViewportPosition(e){const t=new l.Deferred,i=this.getScrollingTimeout();return clearTimeout(this._scrollTimeoutID),i>0?this._scrollTimeoutID=setTimeout((()=>{this._setViewportPositionCore(e),t.resolve()}),i):(this._setViewportPositionCore(e),t.resolve()),t.promise()}getViewportPosition(){return this._position}getItemIndexByPosition(e,t,i){e=e??this._position;const n=this.getItemSize();let o=0,a=0;const s=Object.keys(this._itemSizes).concat(-1);for(let r=0;r<s.length&&o<e;r++){const l=parseInt(s[r]);let d=(e-o)/n;if(l<0||a+d<l){a+=d,this._sizeRatio<1&&(0,u.isDefined)(t)&&(a=t+i/this._viewportItemSize);break}d=l-a,o+=d*n,a+=d;const c=this._itemSizes[l];o+=c,a+=o<e?1:(e-o+c)/c}return Math.round(50*a)/50}isScrollingBack(){return this._isScrollingBack}_setViewportPositionCore(e){const t=this._position||0;this._position=e,t!==this._position&&(this._isScrollingBack=this._position<t);const i=this.getItemIndexByPosition(),n=this.setViewportItemIndex(i);return this.positionChanged.fire(),n}setContentItemSizes(e){const t=this.virtualItemsCount();if(this._contentSize=e.reduce(((e,t)=>e+t),0),t){e.forEach(((e,i)=>{this._itemSizes[t.begin+i]=e}));const i=(t.begin+t.end+this.itemsCount())*this._viewportItemSize,n=h.default.getContentHeightLimit(s.default);this._sizeRatio=i>n?n/i:1}}getItemSize(){return this._viewportItemSize*this._sizeRatio}getItemOffset(e,t){const i=this.virtualItemsCount();let n=e;if(!i)return 0;let o=0;const a=this._dataOptions.totalItemsCount();return Object.keys(this._itemSizes).forEach((i=>{n&&(t?i>=a-e:i<e)&&(o+=this._itemSizes[i],n--)})),Math.floor(o+n*this._viewportItemSize*this._sizeRatio)}getContentOffset(e){const t="end"===e,i=this.virtualItemsCount();return i?this.getItemOffset(t?i.end:i.begin,t):0}getVirtualContentSize(){return this.virtualItemsCount()?this.getContentOffset("begin")+this.getContentOffset("end")+this._contentSize:0}getViewportItemIndex(){return this._viewportItemIndex}setViewportItemIndex(e){if(this._viewportItemIndex=e,!1!==this.option(f))return this._dataLoader.viewportItemIndexChanged.apply(this._dataLoader,arguments)}viewportItemSize(e){return void 0!==e&&(this._viewportItemSize=e),this._viewportItemSize}viewportSize(e){return void 0!==e&&(this._viewportSize=e),this._viewportSize}viewportHeight(e,t){const i=t??this._position,n=this.getItemIndexByPosition(i),o=this.getItemIndexByPosition(i+e,n,e);this.viewportSize(Math.ceil(o-n)),(0,u.isDefined)(t)||this._viewportItemIndex===n||this._setViewportPositionCore(i)}reset(e){this._dataLoader.reset(),e||(this._itemSizes={})}subscribeToWindowScrollEvents(e){this._windowScroll=this._windowScroll||v(e,(e=>{this.viewportItemSize()&&this.setViewportPosition(e)}))}dispose(){clearTimeout(this._scrollTimeoutID),this._windowScroll&&this._windowScroll.dispose(),this._windowScroll=null}scrollTo(e){this._windowScroll&&this._windowScroll.scrollTo(e)}isVirtualMode(){return m(this)}isAppendMode(){return"infinite"===(e=this).option("scrolling.mode")&&!e._isVirtual;var e}getViewportParams(){const e=this.option("scrolling.mode")===_,t=this._dataOptions.totalItemsCount(),i=this._dataOptions.hasKnownLastPage()&&this._viewportItemIndex>t?t:this._viewportItemIndex,n=this._viewportSize+i,o=this.option("scrolling.prerenderedRowChunkSize")||1,a=this.isScrollingBack(),s=this.option("scrolling.prerenderedRowCount")??1,r=a?s:0,l=a?0:s,d=Math.floor(Math.max(0,i-r)/o)*o;let u=Math.ceil((n+l-d)/o)*o;if(e){const e=Math.max(0,t-d);u=Math.min(u,e)}return{skip:d,take:u}}itemsCount(){let e=0;return e=this.option(f)?this._dataLoader.itemsCount.apply(this._dataLoader,arguments):this._dataOptions.itemsCount(),e}pageIndex(){return this._dataLoader.pageIndex(...arguments)}beginPageIndex(){return this._dataLoader.beginPageIndex(...arguments)}endPageIndex(){return this._dataLoader.endPageIndex(...arguments)}pageSize(){return this._dataLoader.pageSize(...arguments)}load(){return this._dataLoader.load(...arguments)}loadIfNeed(){return this._dataLoader.loadIfNeed(...arguments)}handleDataChanged(){return this._dataLoader.handleDataChanged(...arguments)}getDelayDeferred(){return this._dataLoader.getDelayDeferred()}}t.VirtualScrollController=C;t.default={VirtualScrollController:C}},96273:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getRealElementWidth=t.default=t.AreaItem=void 0;var n=p(i(55620)),o=p(i(64960)),a=i(61404),s=p(i(64553)),r=i(52576),l=i(41639),d=i(57653),u=i(58515),c=i(11528),h=i(11371);function p(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},g.apply(null,arguments)}const _=function(e){let t=0;const{offsetWidth:i}=e;if(e.getBoundingClientRect){const n=(0,l.getBoundingRect)(e);t=n.width,t||(t=n.right-n.left),t<=i-1&&(t=i)}return t>0?t:i};function f(e,t,i,n){let o=0,a=0;const s=i/2;return e+n-(t+i)>1?(e>=t+i+s&&(a=parseInt((e-(t+i))/s,10)),o=t+i+s*a):e<t?(e<=t-s&&(a=parseInt((e-(t-s))/s,10)),o=t-(i-s*a)):o=t,o}t.getRealElementWidth=_;const m=t.AreaItem=n.default.inherit({ctor(e){this.component=e},option(){return this.component.option.apply(this.component,arguments)},_getRowElement(e){const t=this;return t._tableElement&&t._tableElement.length>0?t._tableElement[0].rows[e]:null},_createGroupElement:()=>(0,s.default)("<div>"),_createTableElement:()=>(0,s.default)("<table>"),_getCellText(e,t){let i=e.isWhiteSpace?"&nbsp":e.text||"&nbsp";return!t||-1===i.indexOf("<")&&-1===i.indexOf(">")||(i=(0,s.default)("<div>").text(i).html()),i},_getRowClassNames(){},_applyCustomStyles(e){e.cell.width&&e.cssArray.push(`min-width:${e.cell.width}px`),e.cell.sorted&&e.classArray.push("dx-pivotgrid-sorted")},_getMainElementMarkup:()=>o.default.createElement("tbody"),_getCloseMainElementMarkup:()=>"</tbody>",_renderTableContent(e,t){const i=this,n=t.length;let a,s,r,l,d;const h=i.option("rtlEnabled"),p=i.option("encodeHtml");let g;e.data("area",i._getAreaName()),e.data("data",t),e.css("width","");const _=this._getMainElementMarkup();for(r=0;r<n;r+=1){a=t[r],g=[];const e=o.default.createElement("tr");for(l=0;l<a.length;l+=1){s=a[l],this._getRowClassNames(r,s,g);const t=o.default.createElement("td");if(s){s.rowspan&&t.setAttribute("rowspan",s.rowspan||1),s.colspan&&t.setAttribute("colspan",s.colspan||1);const e={cellElement:undefined,cell:s,cellsCount:a.length,cellIndex:l,rowElement:undefined,rowIndex:r,rowsCount:n,rtlEnabled:h,classArray:[],cssArray:[]};if(i._applyCustomStyles(e),e.cssArray.length&&(0,u.setStyle)(t,e.cssArray.join(";")),e.classArray.length&&t.setAttribute("class",e.classArray.join(" ")),(0,c.isDefined)(s.expanded)){const e=o.default.createElement("div");e.classList.add("dx-expand-icon-container");const i=o.default.createElement("span");i.classList.add("dx-expand"),e.appendChild(i),t.appendChild(e)}d=this._getCellText(s,p)}else d="";const _=o.default.createElement("span");if((0,c.isDefined)(s.wordWrapEnabled)&&(_.style.whiteSpace=s.wordWrapEnabled?"normal":"nowrap"),_.innerHTML=d,t.appendChild(_),s.sorted){const e=o.default.createElement("span");e.classList.add("dx-icon-sorted"),t.appendChild(e)}e.appendChild(t)}g.length&&e.setAttribute("class",g.join(" ")),_.appendChild(e)}e.append(_),this._triggerOnCellPrepared(e,t)},_triggerOnCellPrepared(e,t){const i=this,n=e.find("tr"),o=i._getAreaName(),s=i.option("onCellPrepared"),l=i.component._eventsStrategy.hasEvent("cellPrepared");let d,u,c;const h=this.component._defaultActionArgs();let p,g,_,f;if(s||l)for(_=0;_<t.length;_+=1)for(p=t[_],d=n.eq(_),f=0;f<p.length;f+=1)g=p[f],u=d.children().eq(f),c={area:o,rowIndex:_,columnIndex:f,cellElement:(0,a.getPublicElement)(u),cell:g},l?i.component._trigger("onCellPrepared",c):s((0,r.extend)(c,h))},_getRowHeight(e){const t=this._getRowElement(e);let i=0;const{offsetHeight:n}=t;if(t&&t.lastChild){if(t.getBoundingClientRect){i=(0,l.getBoundingRect)(t).height,i<=n-1&&(i=n)}return i>0?i:n}return 0},_setRowHeight(e,t){const i=this._getRowElement(e);i&&(i.style.height=`${t}px`)},getRowsLength(){const e=this;return e._tableElement&&e._tableElement.length>0?e._tableElement[0].rows.length:0},getRowsHeight(){const e=this,t=[],i=e.getRowsLength();for(let n=0;n<i;n+=1)t.push(e._getRowHeight(n));return t},setRowsHeight(e){const t=this;let i=0;const n=e.length;for(let o=0;o<n;o+=1)i+=e[o],t._setRowHeight(o,e[o]);this._tableHeight=i,this._tableElement[0].style.height=`${i}px`},getColumnsWidth(){const e=this.getRowsLength();let t,i,n,o;const a=[],s=[],r=function(e,t,i,n,o){let a,s;for(a=0;a<n;a+=1)for(s=0;s<o;s+=1)e[t+a]=e[t+a]||[],e[t+a][i+s]=!0};if(e)for(t=0;t<e;t+=1)for(a[t]=a[t]||[],i=this._getRowElement(t),n=0;n<i.cells.length;n+=1){for(o=0;a[t][o];o+=1);r(a,t,o,i.cells[n].rowSpan,i.cells[n].colSpan),1===i.cells[n].colSpan&&(s[o]=s[o]||_(i.cells[n]))}return s},setColumnsWidth(e){let t;const i=this._tableElement[0];this._colgroupElement.html("");const n=this.getColumnsCount(),a=[];for(t=0;t<n;t+=1)a.push(e[t]||0);for(t=n;t<e.length&&e;t+=1)a[n-1]+=e[t];for(t=0;t<n;t+=1){const e=o.default.createElement("col");e.style.width=`${a[t]}px`,this._colgroupElement.append(e)}this._tableWidth=a.reduce(((e,t)=>e+t),0),i.style.width=`${this._tableWidth}px`,i.style.tableLayout="fixed"},resetColumnsWidth(){(0,d.setWidth)(this._colgroupElement.find("col"),"auto"),this._tableElement.css({width:"",tableLayout:""})},setGroupWidth(e){this._getScrollable().option("width",e)},setGroupHeight(e){this._getScrollable().option("height",e)},getGroupHeight(){return this._getGroupElementSize("height")},getGroupWidth(){return this._getGroupElementSize("width")},_getGroupElementSize(e){const t=this.groupElement()[0].style[e];return t.indexOf("px")>0?parseFloat(t):null},groupElement(){return this._groupElement},tableElement(){return this._tableElement},element(){return this._rootElement},headElement(){return this._tableElement.find("thead")},_setTableCss(e){this.option("rtlEnabled")&&(e.right=e.left,delete e.left),this.tableElement().css(e)},setVirtualContentParams(e){this._virtualContent.css({width:e.width,height:e.height});const t=this._getScrollable();null!=t&&t.isRenovated()?this._getScrollable().option("classes","dx-virtual-mode"):this.groupElement().addClass("dx-virtual-mode")},disableVirtualMode(){const e=this._getScrollable();null!=e&&e.isRenovated()?this._getScrollable().option("classes",""):this.groupElement().removeClass("dx-virtual-mode")},_renderVirtualContent(){const e=this;e._virtualContent||"virtual"!==e.option("scrolling.mode")||(e._virtualContent=(0,s.default)("<div>").addClass("dx-virtual-content").insertBefore(e._tableElement))},reset(){const e=this,t=e._tableElement[0];if(e._fakeTable&&e._fakeTable.detach(),e._fakeTable=null,e.disableVirtualMode(),e.setGroupWidth("100%"),e.setGroupHeight("auto"),e.resetColumnsWidth(),t){for(let e=0;e<t.rows.length;e+=1)t.rows[e].style.height="";t.style.height="",t.style.width="100%"}},_updateFakeTableVisibility(){const e=this,t=e.tableElement()[0],i=e.option("rtlEnabled")?"right":"left",n=e._fakeTable[0];t.style.top===n.style.top&&n.style[i]===t.style[i]?e._fakeTable.addClass("dx-hidden"):e._fakeTable.removeClass("dx-hidden")},_moveFakeTableHorizontally(e){const t=this,i=t.option("rtlEnabled")?"right":"left",n=f(e,parseFloat(t.tableElement()[0].style[i]),t._tableWidth,t.getGroupWidth());parseFloat(t._fakeTable[0].style[i])!==n&&(t._fakeTable[0].style[i]=`${n}px`)},_moveFakeTableTop(e){const t=this,i=f(e,parseFloat(t.tableElement()[0].style.top),t._tableHeight,t.getGroupHeight());parseFloat(t._fakeTable[0].style.top)!==i&&(t._fakeTable[0].style.top=`${i}px`)},_moveFakeTable(){this._updateFakeTableVisibility()},_createFakeTable(){const e=this;e._fakeTable||(e._fakeTable=e.tableElement().clone().addClass("dx-pivot-grid-fake-table").appendTo(e._virtualContent))},render(e,t){const i=this;if(i._tableElement){try{i._tableElement[0].innerHTML=""}catch(e){i._tableElement.empty()}i._tableElement.removeAttr("style")}else i._groupElement=i._createGroupElement(),i._tableElement=i._createTableElement(),i._tableElement.appendTo(i._groupElement),i._groupElement.appendTo(e),i._rootElement=e;i._colgroupElement=(0,s.default)("<colgroup>").appendTo(i._tableElement),i._renderTableContent(i._tableElement,t),i._renderVirtualContent()},_getScrollable(){return this.groupElement().data("dxScrollable")},_getMemoizeScrollTo(){return this._memoizeScrollTo=this._memoizeScrollTo??(0,h.getMemoizeScrollTo)((()=>this._getScrollable())),this._memoizeScrollTo},_getMaxLeftOffset(e){const t=(0,s.default)(e.container()).get(0);return t.scrollWidth-t.clientWidth},on(e,t){const i=this,n=i._getScrollable();return n&&n.on(e,(e=>{i.option("rtlEnabled")&&(0,c.isDefined)(e.scrollOffset.left)&&(e.scrollOffset.left=i._getMaxLeftOffset(n)-e.scrollOffset.left),t(e)})),this},off(e){const t=this._getScrollable();return t&&t.off(e),this},scrollTo(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this._getScrollable();if(!i)return;const n=this.option("rtlEnabled"),o=this._getAreaName(),a=g({},e,{left:!n||"column"!==o&&"data"!==o?e.left:this._getMaxLeftOffset(i)-e.left});this._getMemoizeScrollTo()(a,t),this._virtualContent&&(this._createFakeTable(),this._moveFakeTable(e))},updateScrollable(){const e=this._getScrollable();if(e)return e.update()},getColumnsCount(){let e=0;const t=this._getRowElement(0);let i;if(t){i=t.cells;for(let t=0,n=i.length;t<n;++t)e+=i[t].colSpan}return e},getData(){const e=this._tableElement;return e?e.data("data"):[]}});t.default={AreaItem:m,getRealElementWidth:_}},67705:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ChartIntegrationMixin=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(52576),s=i(21274),r=i(12062);const l={number:"numeric",date:"datetime"},d="dxPivotGridUnbinding";function u(e,t){const i=[],n=t.length-1;return(0,s.each)(e,((e,o)=>{i.push(o.text||(0,r.formatValue)(o.value,t[n-e]))})),i.reverse()}function c(e){let t=0;return(0,r.foreachTree)(e,(e=>{t=Math.max(t,e.length-1)})),t}function h(e,t,i){const n=e.getData(),o=[],l=e.getAreaFields("data"),d=e.getAreaFields("row"),h=e.getAreaFields("column"),p=[{index:n.grandTotalColumnIndex,children:n.columns}],g=[{index:n.grandTotalRowIndex,children:n.rows}],_=c(g),f=c(p);let m,v,C,y,b,x,w,S,D,I;function E(){const e=(n.values[C]||[])[w]||[],s=e[m];let r,u={rowPath:x,maxRowLevel:_,rowPathFormatted:b,rowFields:d,columnPathFormatted:I,maxColumnLevel:f,columnPath:D,columnFields:h,dataFields:l,dataIndex:m,dataValues:e,visible:S&&y},c=(t.inverted?I:b).join(" - "),p=(t.inverted?b:I).join("/");l.length>1&&("args"!==t.putDataFieldsInto&&"both"!==t.putDataFieldsInto||(p+=` | ${v.caption}`),"args"!==t.putDataFieldsInto&&(c+=` | ${v.caption}`,"singleAxis"!==t.dataFieldsDisplayMode&&(r=v.caption))),u.chartDataItem={val:void 0===s?null:s,series:c,arg:p},u=function(e,t){let{chartDataItem:i}=e,n=t&&t(e);return n?(i=(0,a.extend)({},i,n.chartDataItem),n=(0,a.extend)({},e,n,{chartDataItem:i}),n):e}(u,t.processCell),u.visible&&(i[u.chartDataItem.series]=i[u.chartDataItem.series]||r,o.push(u.chartDataItem))}function T(e){(0,r.foreachTree)(g,(i=>{C=i[0].index,i=i.slice(0,i.length-1),y=_===i.length,x=(0,r.createPath)(i),b=u(i,d),0===x.length&&(b=[t.grandTotalText]),(0,r.foreachTree)(p,(i=>{w=i[0].index,i=i.slice(0,i.length-1),S=f===i.length,D=(0,r.createPath)(i),I=u(i,h),0===D.length&&(I=[t.grandTotalText]),e()}))}))}function A(e){(0,s.each)(l,((t,i)=>{v=i,m=t,e()}))}return!1===t.alternateDataFields?A((()=>{T(E)})):T((()=>{A(E)})),o}function p(e,t){const i=e.getAreaFields("data");if("args"!==t.putDataFieldsInto&&"singleAxis"!==t.dataFieldsDisplayMode||1===i.length){const e=[];return(0,s.each)(i,((i,n)=>{const o={name:n.caption,title:n.caption,valueType:l[n.dataType]||n.dataType,label:{format:n.format}};n.customizeText&&(o.label.customizeText=function(e){return n.customizeText.call(n,e)}),"splitPanes"===t.dataFieldsDisplayMode&&(o.pane=n.caption),e.push(o)})),e}return[{}]}function g(e,t){const i=[],n=e.getAreaFields("data");return n.length>1&&"splitPanes"===t.dataFieldsDisplayMode&&"args"!==t.putDataFieldsInto&&(0,s.each)(n,((e,t)=>{i.push({name:t.caption})})),i.length||i.push({}),i}const _=t.ChartIntegrationMixin={bindChart(e,t){t=(0,a.extend)({},t);const i=this,n=function(){t.grandTotalText=i.option("texts.grandTotal");const n=function(e,t){const{customizeSeries:i}=t,{customizeChart:n}=t;let o={valueAxis:p(e,t),panes:g(e,t)};const s={};return n&&(o=(0,a.extend)(!0,{},o,n(o))),o.dataSource=h(e,t,s),o.seriesTemplate={nameField:"series",customizeSeries(e){let n={};return"splitPanes"===t.dataFieldsDisplayMode?n.pane=s[e]:"singleAxis"!==t.dataFieldsDisplayMode&&(n.axis=s[e]),i&&(n=(0,a.extend)(n,i(e,n))),n}},o}(i.getDataSource(),t);e.option(n)};if(!(e=function(e){if(!e)return!1;if(e.NAME)return"dxChart"===e.NAME&&e;const t=(0,o.default)(e);return t.data("dxChart")&&t.dxChart("instance")}(e)))return null;!function(e){const t=e.$element().data(d);t&&t()}(e),i.on("changed",n),n();const s=function(){e.$element().removeData(d),i.off("changed",n)};return e.on("disposing",s),this.on("disposing",s),e.$element().data(d,s),s}};t.default={ChartIntegrationMixin:_}},58537:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CLASSES=void 0;t.CLASSES={scrollBarMeasureElement:"dx-pivotgrid-scrollbar-measure-element"}},31045:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DataArea=void 0;var n=r(i(64553)),o=r(i(85991)),a=i(96273),s=i(12062);function r(e){return e&&e.__esModule?e:{default:e}}const l=t.DataArea=a.AreaItem.inherit({_getAreaName:()=>"data",_createGroupElement:()=>(0,n.default)("<div>").addClass("dx-pivotgrid-area").addClass("dx-pivotgrid-area-data").css("borderTopWidth",0),_applyCustomStyles(e){const{cell:t}=e,{classArray:i}=e;"T"!==t.rowType&&"T"!==t.columnType||i.push("dx-total"),"GT"!==t.rowType&&"GT"!==t.columnType||i.push("dx-grandtotal"),"T"!==t.rowType&&"GT"!==t.rowType||i.push("dx-row-total"),e.rowIndex===e.rowsCount-1&&e.cssArray.push("border-bottom: 0px"),this.callBase(e)},_moveFakeTable(e){this._moveFakeTableHorizontally(e.x),this._moveFakeTableTop(e.y),this.callBase()},renderScrollable(){this._groupElement.dxScrollable({useNative:this.getUseNativeValue(),useSimulatedScrollbar:!1,rtlEnabled:this.component.option("rtlEnabled"),bounceEnabled:!1,updateManually:!0})},getUseNativeValue(){const{useNative:e}=this.component.option("scrolling");return"auto"===e?!!o.default.nativeScrolling:!!e},getScrollbarWidth(){return this.getUseNativeValue()?(0,s.calculateScrollbarWidth)():0},updateScrollableOptions(e){let{direction:t,rtlEnabled:i}=e;const n=this._getScrollable();n.option("useNative",this.getUseNativeValue()),n.option({direction:t,rtlEnabled:i})},getScrollableDirection:(e,t)=>e&&!t?"horizontal":!e&&t?"vertical":"both",reset(){this.callBase(),this._virtualContent&&this._virtualContent.parent().css("height","auto")},setVirtualContentParams(e){this.callBase(e),this._virtualContent.parent().css("height",e.height),this._setTableCss({top:e.top,left:e.left})}});t.default={DataArea:l}},18509:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DataController__internals=t.DataController=void 0;var n=f(i(55620)),o=f(i(84718)),a=i(17781),s=i(87739),r=i(52576),l=i(21274),d=i(54497),u=i(11528),c=f(i(93416)),h=i(32760),p=f(i(89272)),g=i(87993),_=i(12062);function f(e){return e&&e.__esModule?e:{default:e}}const m=Math,v="GT",C="T",y="D",b="#N/A",x=function(e,t,i){e[t]||(e[t]=function(){const e=this._dataSource;return e?e[t].apply(e,arguments):i})},w=t.DataController=n.default.inherit(function(){function e(e,t,i){return e===b?i:(0,_.formatValue)(e,t)}const t=function(){const e=function(e,t){const i=t.lastIndex-t.index||1,n=function(e,t,i,n){const o={type:e.type,text:e.text};return e.path&&(o.path=e.path),e.width&&(o.width=e.width),(0,u.isDefined)(e.wordWrapEnabled)&&(o.wordWrapEnabled=e.wordWrapEnabled),e.isLast&&(o.isLast=!0),e.sorted&&(o.sorted=!0),e.isMetric&&(o.dataIndex=e.dataIndex),(0,u.isDefined)(e.expanded)&&(o.expanded=e.expanded),t>1&&(o[i?"colspan":"rowspan"]=t),e.depthSize&&e.depthSize>1&&(o[i?"rowspan":"colspan"]=e.depthSize),e.index>=0&&(o.dataSourceIndex=e.index),n&&e.children&&e.children.length&&!e.children[0].isMetric&&(o.width=null,o.isWhiteSpace=!0),o}(t.headerItem,i,t.isHorizontal,t.isTree);return function(e,t,i,n,o){const a=o?n:i;for(;!e[a];)e.push([]);o?e[a].push(t):e[a].unshift(t)}(e,n,t.index,t.depth,t.isHorizontal),t.headerItem.children&&0!==t.headerItem.children.length?t.lastIndex:t.lastIndex+1},t=function(e,t,o,a,c){const h=o.length,p=function(e,t){const n=t&&t.length||0,o=[],a=new s.Deferred;let r;return(0,s.when)((0,_.foreachTreeAsync)(e,((e,t)=>{const a=e[0],s=(0,_.createPath)(e);r=i(o,s.length,t),r.type=y,r.value=a.value,r.path=s,r.text=a.text,r.index=a.index,r.displayText=a.displayText,r.key=a.key,r.isEmpty=a.isEmpty,s.length<n&&(!a.children||0!==a.children.length)&&(r.expanded=!!a.children)}))).done((()=>{a.resolve(i(o,0,0).children||[])})),a}(e,t),{dataFields:g}=c,f=new s.Deferred;return(0,s.when)(p).done((e=>{c.notifyProgress(.5),c.showGrandTotals&&e[c.showTotalsPrior?"unshift":"push"]({type:v,isEmpty:c.isEmptyGrandTotal});const i=!1===c.showTotals||g.length>0&&g.length===c.hiddenTotals.length,p=g.length>0&&c.hiddenValues.length===g.length;p&&i&&(a=1),i&&"tree"!==c.layout||function(e,t,i,n){i=i||n,(0,_.foreachTree)(e,((o,a)=>{const s=o[0],l=(o[1]?o[1].children:e)||[],d=t[o.length-1];s.type===y&&s.expanded&&(!1!==d.showTotals||n)&&(-1!==a&&l.splice(i?a:a+1,0,(0,r.extend)({},s,{children:null,type:"T",expanded:!!i||null,isAdditionalTotal:!0})),i&&(s.expanded=null))}))}(e,t,c.showTotalsPrior,"tree"===c.layout),(0,s.when)((0,_.foreachTreeAsync)(e,(e=>{const t=e[0];t.children&&0!==t.children.length||(t.depthSize=a-e.length+1)}))).done((()=>{h>1&&function(e,t,i){(0,_.foreachTree)(e,(e=>{const n=e[0];let o;if(!n.children||0===n.children.length)for(n.children=[],o=0;o<t.length;o+=1){const e=n.type===v,a=n.type===C,s=n.type===y;!1===t[o].visible||e&&i.hiddenGrandTotals.includes(o)||a&&i.hiddenTotals.includes(o)||s&&i.hiddenValues.includes(o)||n.children.push({caption:t[o].caption,path:n.path,type:n.type,value:o,index:n.index,dataIndex:o,isMetric:!0,isEmpty:n.isEmpty&&n.isEmpty[o]})}}))}(e,o,c),!c.showEmpty&&function(e){(0,_.foreachTree)([{children:e}],((t,i)=>{const o=t[0],a=(t[1]?t[1].children:e)||[];let{isEmpty:s}=o;s&&s.length&&(s=o.isEmpty.filter((e=>e)).length===s.length),o&&!o.children&&s&&(a.splice(i,1),n(t,1))}))}(e),c.notifyProgress(.75),(0,s.when)((0,_.foreachTreeAsync)(e,(i=>{const n=i[0],{isMetric:a}=n,s=t[i.length-1]||{};if(n.type!==y||a||(n.width=s.width),p&&n.type===y){const t=(i[1]?i[1].children:e)||[];t.splice(t.indexOf(n),1)}else n.wordWrapEnabled=a?o[n.dataIndex].wordWrapEnabled:s.wordWrapEnabled,n.isLast=!n.children||!n.children.length,n.isLast&&(0,l.each)(c.sortBySummaryPaths,((e,t)=>{if((0,u.isDefined)(n.dataIndex)||(t=t.slice(0)).pop(),function(e,t){let i;const n=e[0],o=(0,u.isString)(t[0]),a=n.dataIndex>=0?e[1]:n;return i=o&&-1!==t[0].indexOf("&[")&&a.key||!a.key?(0,_.createPath)(e):(0,l.map)(e,(e=>e.dataIndex>=0?e.value:e.text)).reverse(),n.type===v&&(i=i.slice(1)),i.join("/")===t.join("/")}(i,t))return n.sorted=!0,!1})),n.text=function(e,t,i){let{text:n}=e;return(0,u.isDefined)(e.displayText)?n=e.displayText:(0,u.isDefined)(e.caption)?n=e.caption:e.type===v&&(n=i.texts.grandTotal),e.isAdditionalTotal&&(n=(0,d.format)(i.texts.total||"",n)),n}(n,0,c)}))).done((()=>{e.length||e.push({}),c.notifyProgress(1),f.resolve(e)}))}))})),f};function i(e,t,i){const n=(e[t]=e[t]||[])[i]={};if(e[t+1]){n.children=e[t+1];for(let i=t+1;i<e.length;i+=1)e[i]=void 0;e.length=t+1}return n}const n=function(e,t){const i=e[t+1];!e[t].children.length&&i&&i.children&&(i.children.splice(i.children.indexOf(e[t]),1),n(e,t+1))};return function(i,n,o,a,r){const l=[],d=function(e){let t=0;return(0,_.foreachTree)(e,(e=>{t=m.max(t,e.length)})),t}(i)||1,u=new s.Deferred;return t(i,n,o,d,r).done((t=>{!function(t,i,n,o,a){let s,r,l=0;const d=[0];(0,_.foreachTree)(i,(i=>{const u=i[0];for(r=u.isMetric?n:i.length-1;d.length-1<r;)d.push(d[d.length-1]);s=d[r]||0,l=e(t,{headerItem:u,index:s,lastIndex:l,depth:r,isHorizontal:o,isTree:a}),d.length=r,d.push(l)}))}(l,t,d,a,"tree"===r.layout),r.notifyProgress(1),u.resolve(l)})),u}}();function i(e,t){const i=[];return(0,l.each)(e,((e,n)=>{const o=(0,_.findField)(t,n.sortBySummaryField);o>=0&&i.push((n.sortBySummaryPath||[]).concat([o]))})),i}function n(e,t){let i=0;const n=[];for(let o=0;o<e.length;o+=1)for(let a=0;a<e[o].length;a+=1){const s=o+((e[o][a].rowspan||1)-1);if(n[o]&&(i-=n[o],n[o]=0),!1===t(e[o][a],s,o,a,i))break;n[o+(e[o][a].rowspan||1)]=(n[o+(e[o][a].rowspan||1)]||0)+1,i+=1}}function f(e,t){let i=0;const n=[];return(0,_.foreachTree)(e,(e=>{const o=e[0],a=(0,_.createPath)(e);if(o.children&&!1===t.showTotals)return;const s=(0,r.extend)(!0,{},o,{visibleIndex:i+=1,path:a});(0,u.isDefined)(s.index)?n[s.index]=s:n.push(s)})),n}function w(e,t,i){return new p.default.VirtualScrollController(t,(0,r.extend)({hasKnownLastPage:()=>!0,pageCount(){return m.ceil(this.totalItemsCount()/this.pageSize())},updateLoading(){},itemsCount(){return this.pageIndex()<this.pageCount()-1?this.pageSize():this.totalItemsCount()%this.pageSize()},items:()=>[],viewportItems:()=>[],onChanged(){},isLoading:()=>e.isLoading(),changingDuration:()=>e._dataSource.paginate()?300:e._changingDuration||0},i))}const S={ctor(e){const t=this,i=t._fireChanged.bind(t);e=t._options=e||{},t.dataSourceChanged=(0,o.default)(),t._dataSource=t._createDataSource(e),e.component&&"virtual"===e.component.option("scrolling.mode")&&(t._rowsScrollController=w(t,e.component,{totalItemsCount:()=>t.totalRowCount(),pageIndex:e=>t.rowPageIndex(e),pageSize:()=>t.rowPageSize(),load(){return t._rowsScrollController.pageIndex()>=this.pageCount()&&t._rowsScrollController.pageIndex(this.pageCount()-1),t._rowsScrollController.handleDataChanged((function(){t._dataSource.paginate()?t._dataSource.load():i.apply(this,arguments)}))}}),t._columnsScrollController=w(t,e.component,{totalItemsCount:()=>t.totalColumnCount(),pageIndex:e=>t.columnPageIndex(e),pageSize:()=>t.columnPageSize(),load(){return t._columnsScrollController.pageIndex()>=this.pageCount()&&t._columnsScrollController.pageIndex(this.pageCount()-1),t._columnsScrollController.handleDataChanged((function(){t._dataSource.paginate()?t._dataSource.load():i.apply(this,arguments)}))}})),t._stateStoringController=new c.default.StateStoringController(e.component).init(),t._columnsInfo=[],t._rowsInfo=[],t._cellsInfo=[],t.expandValueChanging=(0,o.default)(),t.loadingChanged=(0,o.default)(),t.progressChanged=(0,o.default)(),t.scrollChanged=(0,o.default)(),t.load(),t._update(),t.changed=(0,o.default)()},_fireChanged(){const e=this,t=new Date;e.changed&&!e._lockChanged&&e.changed.fire(),e._changingDuration=new Date-t},_correctSkipsTakes(e,t,i,n,o,a){const s=i?e+i-1:e;o[n.length]=o[n.length]||0,a[n.length]=a[n.length]||0,s<t?o[n.length]+=1:a[n.length]+=1},_calculatePagingForRowExpandedPaths(e,t,i,n,o){const a=this._rowsInfo,s=Math.min(e.rowSkip+e.rowTake,a.length),{rowExpandedPaths:r}=e;let l=[];const d={};let u,c,h;for(r.forEach(((e,t)=>{d[e]=t})),u=0;u<s;u+=1){for(i.length=t.length=l.length+1,c=0;c<a[u].length;c+=1){const s=a[u][c];if("D"===s.type){this._correctSkipsTakes(u,e.rowSkip,s.rowspan,l,t,i),h=s.path||h;const a=h&&h.length>1?d[h.slice(0,-1)]:-1;a>=0&&(n[a]=t[l.length]||0,o[a]=i[l.length]||0),s.rowspan&&l.push(s.rowspan)}}l=l.map((e=>e-1)).filter((e=>e>0))}},_calculatePagingForColumnExpandedPaths(e,t,i,n,o){const a={},s={};(0,h.foreachColumnInfo)(this._columnsInfo,((t,i)=>{if("D"===t.type&&t.path&&void 0===t.dataIndex){const n=t.colspan||1,o=t.path.slice(0,-1).toString();a[o]=a[o]||0,s[o]=s[o]||0,i+n<=e.columnSkip?a[o]+=1:i<e.columnSkip+e.columnTake&&(s[o]+=1)}})),t[0]=a[""],i[0]=s[""],e.columnExpandedPaths.forEach(((e,t)=>{const i=a[e],r=s[e];void 0!==i&&(n[t]=i),void 0!==r&&(o[t]=r)}))},_processPagingForExpandedPaths(e,t,i,n){const o=e[`${t}ExpandedPaths`],a=o.map((()=>0)),s=o.map((()=>n?e.pageSize:0)),r=[],l=[];n||("row"===t?this._calculatePagingForRowExpandedPaths(e,r,l,a,s):this._calculatePagingForColumnExpandedPaths(e,r,l,a,s)),this._savePagingForExpandedPaths(e,t,i,r[0],l[0],a,s)},_savePagingForExpandedPaths(e,t,i,n,o,a,s){const l=e[`${t}ExpandedPaths`];e[`${t}ExpandedPaths`]=[],e[`${t}Skip`]=void 0!==n?n:e[`${t}Skip`],e[`${t}Take`]=void 0!==o?o:e[`${t}Take`];for(let n=0;n<l.length;n+=1)if(s[n]){const o=e.area&&e.area!==t;i.push((0,r.extend)({area:t,headerName:`${t}s`},e,{[`${t}Skip`]:a[n],[`${t}Take`]:s[n],[o?"oppositePath":"path"]:l[n]}))}},_handleCustomizeStoreLoadOptions(e,t){const i=e[0],n=this._rowsScrollController;if(this._dataSource.paginate()&&n){const o=n.pageSize();"rows"===i.headerName?(i.rowSkip=0,i.rowTake=o,i.rowExpandedPaths=[]):(i.rowSkip=n.beginPageIndex()*o,i.rowTake=(n.endPageIndex()-n.beginPageIndex()+1)*o,this._processPagingForExpandedPaths(i,"row",e,t))}const o=this._columnsScrollController;if(this._dataSource.paginate()&&o){const i=o.pageSize();e.forEach((n=>{"columns"===n.headerName?(n.columnSkip=0,n.columnTake=i,n.columnExpandedPaths=[]):(n.columnSkip=o.beginPageIndex()*i,n.columnTake=(o.endPageIndex()-o.beginPageIndex()+1)*i,this._processPagingForExpandedPaths(n,"column",e,t))}))}},load(){const e=this,t=this._stateStoringController;t.isEnabled()&&!t.isLoaded()?t.load().always((t=>{t?e._dataSource.state(t):e._dataSource.load()})):e._dataSource.load()},calculateVirtualContentParams(e){const t=this,i=t._rowsScrollController,n=t._columnsScrollController;if(i&&n)return i.viewportItemSize(e.virtualRowHeight),i.viewportSize(e.viewportHeight/i.viewportItemSize()),i.setContentItemSizes(e.itemHeights),n.viewportItemSize(e.virtualColumnWidth),n.viewportSize(e.viewportWidth/n.viewportItemSize()),n.setContentItemSizes(e.itemWidths),(0,a.deferUpdate)((()=>{n.loadIfNeed(),i.loadIfNeed()})),t.scrollChanged.fire({left:n.getViewportPosition(),top:i.getViewportPosition()}),{contentTop:i.getContentOffset(),contentLeft:n.getContentOffset(),width:n.getVirtualContentSize(),height:i.getVirtualContentSize()}},setViewportPosition(e,t){this._rowsScrollController.setViewportPosition(t||0),this._columnsScrollController.setViewportPosition(e||0)},subscribeToWindowScrollEvents(e){var t;null===(t=this._rowsScrollController)||void 0===t||t.subscribeToWindowScrollEvents(e)},updateWindowScrollPosition(e){var t;null===(t=this._rowsScrollController)||void 0===t||t.scrollTo(e)},updateViewOptions(e){(0,r.extend)(this._options,e),this._update()},_handleExpandValueChanging(e){this.expandValueChanging.fire(e)},_handleLoadingChanged(e){this.loadingChanged.fire(e)},_handleProgressChanged(e){this.progressChanged.fire(e)},_handleFieldsPrepared(e){this._options.onFieldsPrepared&&this._options.onFieldsPrepared(e)},_createDataSource(e){const t=this,i=e.dataSource;let n;return t._isSharedDataSource=i instanceof g.PivotGridDataSource,n=t._isSharedDataSource?i:new g.PivotGridDataSource(i),t._expandValueChangingHandler=t._handleExpandValueChanging.bind(t),t._loadingChangedHandler=t._handleLoadingChanged.bind(t),t._fieldsPreparedHandler=t._handleFieldsPrepared.bind(t),t._customizeStoreLoadOptionsHandler=t._handleCustomizeStoreLoadOptions.bind(t),t._changedHandler=function(){t._update(),t.dataSourceChanged.fire()},t._progressChangedHandler=function(e){t._handleProgressChanged(.8*e)},n.on("changed",t._changedHandler),n.on("expandValueChanging",t._expandValueChangingHandler),n.on("loadingChanged",t._loadingChangedHandler),n.on("progressChanged",t._progressChangedHandler),n.on("fieldsPrepared",t._fieldsPreparedHandler),n.on("customizeStoreLoadOptions",t._customizeStoreLoadOptionsHandler),n},getDataSource(){return this._dataSource},isLoading(){return this._dataSource.isLoading()},beginLoading(){this._dataSource.beginLoading()},endLoading(){this._dataSource.endLoading()},_update(){const e=this,n=e._dataSource,o=e._options,a=n.getAreaFields("column"),r=n.getAreaFields("row"),d=n.getAreaFields("data"),c="row"===o.dataFieldArea?d:[],h="row"!==o.dataFieldArea?d:[],p=n.getData(),g=function(e){const t=[];return(0,l.each)(e,((e,i)=>{!1===i.showTotals&&t.push(e)})),t}(d),_=function(e){const t=[];return e.forEach(((e,i)=>{(void 0===e.showValues&&!1===e.showTotals||!1===e.showValues)&&t.push(i)})),t}(d),m=function(e,t){let i=[];return(0,l.each)(e,((e,t)=>{!1===t.showGrandTotals&&i.push(e)})),0===t.length&&i.length===e.length&&(i=[]),i}(d,a),v=!(d.length>0)||m.length!==d.length,C={isEmptyGrandTotal:p.isEmptyGrandTotalRow,texts:o.texts||{},hiddenTotals:g,hiddenValues:_,hiddenGrandTotals:[],showTotals:o.showRowTotals,showGrandTotals:!1!==o.showRowGrandTotals&&v,sortBySummaryPaths:i(a,d),showTotalsPrior:"rows"===o.showTotalsPrior||"both"===o.showTotalsPrior,showEmpty:!o.hideEmptySummaryCells,layout:o.rowHeaderLayout,fields:r,dataFields:d,progress:0},y={isEmptyGrandTotal:p.isEmptyGrandTotalColumn,texts:o.texts||{},hiddenTotals:g,hiddenValues:_,hiddenGrandTotals:m,showTotals:o.showColumnTotals,showTotalsPrior:"columns"===o.showTotalsPrior||"both"===o.showTotalsPrior,showGrandTotals:!1!==o.showColumnGrandTotals&&v,sortBySummaryPaths:i(r,d),showEmpty:!o.hideEmptySummaryCells,fields:a,dataFields:d,progress:0},b=function(t){this.progress=t,e._handleProgressChanged(.8+.1*C.progress+.1*y.progress)};C.notifyProgress=b,y.notifyProgress=b,(0,u.isDefined)(p.grandTotalRowIndex)||(p.grandTotalRowIndex=f(p.rows,C).length),(0,u.isDefined)(p.grandTotalColumnIndex)||(p.grandTotalColumnIndex=f(p.columns,y).length),n._changeLoadingCount(1),(0,s.when)(t(p.columns,a,h,!0,y),t(p.rows,r,c,!1,C)).always((()=>{n._changeLoadingCount(-1)})).done(((t,i)=>{e._columnsInfo=t,e._rowsInfo=i,e._rowsScrollController&&e._columnsScrollController&&e.changed&&!e._dataSource.paginate()&&(e._rowsScrollController.reset(!0),e._columnsScrollController.reset(!0),e._lockChanged=!0,e._rowsScrollController.load(),e._columnsScrollController.load(),e._lockChanged=!1)})).done((()=>{e._fireChanged(),e._stateStoringController.isEnabled()&&!e._dataSource.isLoading()&&(e._stateStoringController.state(e._dataSource.state()),e._stateStoringController.save())}))},getRowsInfo(e){const t=this,i=t._rowsInfo,o=t._rowsScrollController;let a;if(o&&!e){const e=o.beginPageIndex()*t.rowPageSize(),s=o.endPageIndex()*t.rowPageSize()+t.rowPageSize(),l=t._dataSource.getSummaryFields(),d="row"===this._options.dataFieldArea,u=[];let c=1;return n(i,((t,i,n,o,h)=>{const p=n<e?0:n-e;let g=t;if(!(i>=e&&n<s))return!1;{u[p]=u[p]||[],a=n<e?t.rowspan-(e-n)||1:t.rowspan,e+p+a>s&&(a=s-(p+e)||1),a!==t.rowspan&&(g=(0,r.extend)({},g,{rowspan:a})),u[p].push(g);const i=l.some((e=>e.caption===g.text));d&&i||(c=m.max(c,h+1))}})),n(u,((e,t,i,n,o)=>{o+(e.colspan||1)>c&&(u[i][n]=(0,r.extend)({},e,{colspan:c-o||1}))})),u}return i},getColumnsInfo(e){const t=this;let i=t._columnsInfo;const n=t._columnsScrollController;if(n&&!e){const e=n.beginPageIndex()*t.columnPageSize(),o=n.endPageIndex()*t.columnPageSize()+t.columnPageSize();i=(0,h.createColumnsInfo)(i,e,o)}return i},totalRowCount(){return this._rowsInfo.length},rowPageIndex(e){return void 0!==e&&(this._rowPageIndex=e),this._rowPageIndex||0},totalColumnCount(){let e=0;if(this._columnsInfo&&this._columnsInfo.length)for(let t=0;t<this._columnsInfo[0].length;t+=1)e+=this._columnsInfo[0][t].colspan||1;return e},rowPageSize(e){return void 0!==e&&(this._rowPageSize=e),this._rowPageSize||20},columnPageSize(e){return void 0!==e&&(this._columnPageSize=e),this._columnPageSize||20},columnPageIndex(e){return void 0!==e&&(this._columnPageIndex=e),this._columnPageIndex||0},getCellsInfo(t){const i=this.getRowsInfo(t),o=this.getColumnsInfo(t),a=this._dataSource.getData(),s=this._options.texts||{};return function(t,i,o,a,s,r){const l=[],d="row"===s,u=o.values;return u.length&&n(t,((t,n)=>{const s=l[n]=[],c=u[t.dataSourceIndex>=0?t.dataSourceIndex:o.grandTotalRowIndex]||[];t.isLast&&(0,h.foreachColumnInfo)(i,((i,n)=>{const l=(d?t.dataIndex:i.dataIndex)||0,u=a[l];if(i.isLast&&u&&!1!==u.visible){let a=c[i.dataSourceIndex>=0?i.dataSourceIndex:o.grandTotalColumnIndex];Array.isArray(a)||(a=[a]);const d=a[l];s[n]={text:e(d,u,r),value:d,format:u.format,dataType:u.dataType,columnType:i.type,rowType:t.type,rowPath:t.path||[],columnPath:i.path||[],dataIndex:l},u.width&&(s[n].width=u.width)}}))})),l}(i,o,a,this._dataSource.getAreaFields("data"),this._options.dataFieldArea,s.dataNotAvailable)},dispose(){const e=this;e._isSharedDataSource?(e._dataSource.off("changed",e._changedHandler),e._dataSource.off("expandValueChanging",e._expandValueChangingHandler),e._dataSource.off("loadingChanged",e._loadingChangedHandler),e._dataSource.off("progressChanged",e._progressChangedHandler),e._dataSource.off("fieldsPrepared",e._fieldsPreparedHandler),e._dataSource.off("customizeStoreLoadOptions",e._customizeStoreLoadOptionsHandler)):e._dataSource.dispose(),e._columnsScrollController&&e._columnsScrollController.dispose(),e._rowsScrollController&&e._rowsScrollController.dispose(),e._stateStoringController.dispose(),e.expandValueChanging.empty(),e.changed.empty(),e.loadingChanged.empty(),e.progressChanged.empty(),e.scrollChanged.empty(),e.dataSourceChanged.empty()}};return x(S,"applyPartialDataSource"),x(S,"collapseHeaderItem"),x(S,"expandHeaderItem"),x(S,"getData"),x(S,"isEmpty"),S}()),S=t.DataController__internals={NO_DATA_AVAILABLE_TEXT:b};t.default={DataController:w,DataController__internals:S}},87993:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PivotGridDataSource=void 0;var n=i(97169),o=y(i(55620)),a=i(2607),s=i(94487),r=i(87739),l=i(52576),d=i(21274),u=i(11528),c=y(i(77735)),h=y(i(39315)),p=y(i(66122)),g=i(47825),_=i(12062),f=i(81383),m=y(i(81221)),v=y(i(48063)),C=i(11075);function y(e){return e&&e.__esModule?e:{default:e}}const b={row:"rows",column:"columns",data:"values",filter:"filters"},x=["area","areaIndex","sortOrder","filterType","filterValues","sortBy","sortBySummaryField","sortBySummaryPath","expanded","summaryType","summaryDisplayMode"],w=["format","selector","customizeText","caption"],S=w.concat(["allowSorting","allowSortingBySummary","allowFiltering","allowExpandAll"]);function D(e,t){const i=e._initProperties||{};(0,d.each)(t,((t,n)=>{Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}))}function I(e,t){D(e,t),(0,u.isDefined)(e.caption)||(0,_.setFieldProperty)(e,"caption",function(e){let t=e.dataField||e.groupName||"",i=(e.summaryType||"").toLowerCase();return(0,u.isString)(e.groupInterval)&&(t+=`_${e.groupInterval}`),i&&"custom"!==i?(i=i.replace(/^./,i[0].toUpperCase()),t.length&&(i=` (${i})`)):i="",p.default.titleize(t)+i}(e))}function E(e){return e.rows.length||e.columns.length||e.values.length}const T=t.PivotGridDataSource=o.default.inherit(function(){const e=function(e,t){if(e._cacheByPath)return e._cacheByPath[t.join(".")]||null},t=function(e,i){let n,o,a=-1;if(e)for(n=0;n<e.length;n+=1)o=e[n],void 0!==o.index&&(a=Math.max(a,o.index)),o.children?a=Math.max(a,t(o.children)):o.collapsedChildren&&(a=Math.max(a,t(o.collapsedChildren)));return(0,u.isDefined)(i)&&(a=Math.max(a,i)),a},i=function(e,i,n,o){const a=t(n)+1;let s,l=t(e,o)+1;const d=[];let u=!1;const c=new r.Deferred;if(i.children&&i.children.length===n.length)for(let e=0;e<n.length;e+=1){const t=n[e];void 0!==t.index&&(void 0===i.children[e].index?(t.index=d[t.index]=l++,i.children[e]=t):d[t.index]=i.children[e].index)}else{for(u=!0,s=0;s<a;s+=1)d[s]=l++;i.children=n}return(0,r.when)((0,_.foreachTreeAsync)(i.children,(e=>{u&&(e[0].index=d[e[0].index])}))).done((()=>{c.resolve(d)})),c},p=function(i,n,o){const a=new r.Deferred;let s=o>=0&&t(i,o)+1;const l=[];return(0,r.when)((0,_.foreachTreeAsync)(i,(e=>{delete e[0].collapsedChildren}))).done((()=>{(0,r.when)((0,_.foreachTreeAsync)(n,((t,n)=>{const o=t[0];if(o.index>=0){let a=e(i,(0,_.createPath)(t));if(a&&a.index>=0)l[o.index]=a.index;else if(s){const r=(0,_.createPath)(t.slice(1));a=e(i,r);const d=r.length?a&&a.children:i;d&&(d[n]=o,o.index=l[o.index]=s++)}}}))).done((()=>{a.resolve(l)}))})),a},y=function(e,t,i,n){let o,a,s,r,l,d;const c=e.values;if(t)for(o=0;o<t.length;o+=1)if(s=t[o],l=i[o],(0,u.isDefined)(l)||(l=e.grandTotalRowIndex),s&&(0,u.isDefined)(l))for(c[l]||(c[l]=[]),a=0;a<s.length;a+=1)r=s[a],d=n[a],(0,u.isDefined)(d)||(d=e.grandTotalColumnIndex),(0,u.isDefined)(r)&&(0,u.isDefined)(d)&&(c[l][d]=r)};function T(e,t){return new(e.remoteOperations||e.paginate?f.RemoteStore:g.LocalStore)((0,l.extend)((0,n.normalizeDataSourceOptions)(e),{onChanged:null,onLoadingChanged:null,onProgressChanged:t}))}function A(e,t,i,n){const o=[],a=t&&t[i]||[],s=n&&n[i]||[];return(0,_.foreachTree)(e[i],(e=>{const t=e[0],i=(0,_.createPath)(e);t.children&&a[i.length-1]&&!a[i.length-1].expanded&&i.length<a.length&&(!n||function(e,t,i){for(let n=0;n<i;n+=1)if(!e[n]||!t[n]||e[n].index!==t[n].index)return!1;return!0}(a,s,i.length))&&o.push(i.slice())}),!0),o}function O(e,t,i,n){return t?(0,d.each)(n,((n,o)=>{if(i)e[o]=t[o];else{if(("summaryType"===o||"summaryDisplayMode"===o)&&void 0===t[o])return;(0,_.setFieldProperty)(e,o,t[o])}})):D(e,n),e}function P(e,t){const i=[];return(0,d.each)(e,((e,n)=>{i.push(O({dataField:n.dataField,name:n.name},n,!0,t))})),i}function k(e){return e.name?e.name:`${e.dataField}`}function M(e,t){const i=[];return(0,d.each)(e||[],((e,n)=>{k(n)===t&&i.push(n)})),i}function R(e,t){e=e||[];const i={};let n;return(0,d.each)(t,((e,o)=>{n=k(o),i[n]||(i[n]=M(t,k(o)))})),(0,d.each)(i,((t,i)=>{!function(e,t){e=e||[],(0,d.each)(t,((t,i)=>{O(i,e[t],!1,x),I(i,w)}))}(M(e,t),i)})),t}function L(e){e.sort(((e,t)=>e.areaIndex-t.areaIndex||e.groupIndex-t.groupIndex))}function B(e,t){const i=e.groupName||"";return(e.dataField||i)+(e.groupInterval?i+e.groupInterval:"NOGROUP")+(t?"":i)}function V(e,t,i){let n=[];const o={},a={},s=(0,_.getFieldsDataType)(e);return t?((0,d.each)(t,((e,t)=>{o[B(t,i)]=t})),(0,d.each)(e,((e,t)=>{const r=B(t,i),d=o[r]||a[r];let u;d?(d._initProperties&&D(d,S),u=(0,l.extend)({},d,t,{_initProperties:null})):o[r]=u=t,!u.dataType&&s[t.dataField]&&(u.dataType=s[t.dataField]),delete o[r],a[r]=d,n.push(u)})),i&&(0,d.each)(o,((e,t)=>{n.push(t)}))):n=e,n.push.apply(n,[]),function(e){e.forEach((t=>{if(t.groupName&&t.groupInterval&&void 0===t.groupIndex){const i=e.filter((e=>e.groupName===t.groupName&&(0,u.isNumeric)(e.groupIndex))).map((e=>e.groupIndex)).reduce(((e,t)=>Math.max(e,t)),-1);t.groupIndex=i+1}}))}(n),n}function F(e){const t=new r.Deferred,i=e._store,n=i&&i.getFields(e._fields);let o;return(0,r.when)(n).done((i=>{e._storeFields=i,o=V(e._fields,i,e._retrieveFields),t.resolve(o)})).fail(t.reject),t}function H(e,t,i){return(0,_.foreachTreeAsync)(e[i],(e=>{const n=e[0];n.text=n.text||(0,_.formatValue)(n.value,t[i][(0,_.createPath)(e).length-1])}))}function N(e,t){return(0,r.when)(H(t,e,"columns"),H(t,e,"rows"))}function z(e){const t=new r.Deferred,i={};return(0,r.when)((0,_.foreachTreeAsync)(e,(e=>{const t=(0,_.createPath)(e).join(".");i[t]=e[0]}))).done(t.resolve),e._cacheByPath=i,t}function W(e,t){const i=[];return(0,d.each)(e,(function(){(function(e,t){const i="data"===t||!1!==e.visible;return e.area===t&&!(0,u.isDefined)(e.groupIndex)&&i})(this,t)&&i.push(this)})),i}return{ctor(e){e=e||{},this._eventsStrategy=new a.EventsStrategy(this);const t=this,i=function(e,t){let i,n;return(0,u.isPlainObject)(e)&&e.load?i=T(e,t):(e&&!e.store&&(e={store:e}),n=e.store,"xmla"===n.type?i=new v.default.XmlaStore(n):(0,u.isPlainObject)(n)&&n.type||n instanceof c.default||Array.isArray(n)?i=T(e,t):n instanceof o.default&&(i=n)),i}(e,(e=>{t._eventsStrategy.fireEvent("progressChanged",[e])}));t._store=i,t._paginate=!!e.paginate,t._pageSize=e.pageSize||40,t._data={rows:[],columns:[],values:[]},t._loadingCount=0,t._isFieldsModified=!1,(0,d.each)(["changed","loadError","loadingChanged","progressChanged","fieldsPrepared","expandValueChanging"],((t,i)=>{const n=`on${i[0].toUpperCase()}${i.slice(1)}`;Object.prototype.hasOwnProperty.call(e,n)&&this.on(i,e[n])})),t._retrieveFields=!(0,u.isDefined)(e.retrieveFields)||e.retrieveFields,t._fields=e.fields||[],t._descriptions=e.descriptions?(0,l.extend)(t._createDescriptions(),e.descriptions):void 0,i||(0,l.extend)(!0,t._data,e.store||e)},getData(){return this._data},getAreaFields(e,t){let i,n=[];return t||"data"===e?(n=W(this._fields,e),L(n)):(i=this._descriptions||{},n=i[b[e]]||[]),n},getSummaryFields(){return this.getAreaFields("data").filter((e=>(0,u.isDefined)(e.summaryType)))},fields(e){const t=this;return e&&(t._fields=V(e,t._storeFields,t._retrieveFields),t._fieldsPrepared(t._fields)),t._fields},field(e,t){const i=this,n=i._fields,o=n&&n[(0,u.isNumeric)(e)?e:(0,_.findField)(n,e)];let a;return o&&t&&((0,d.each)(t,((e,t)=>{const i=!x.includes(e);if((0,_.setFieldProperty)(o,e,t,i),"sortOrder"===e){a=o.levels||[];for(let i=0;i<a.length;i+=1)a[i][e]=t}})),I(o,w),i._descriptions=i._createDescriptions(o),i._isFieldsModified=!0,i._eventsStrategy.fireEvent("fieldChanged",[o])),o},getFieldValues(e,t,i){const n=this,o=this._fields&&this._fields[e],a=this.store(),s=[],u={columns:s,rows:[],values:this.getAreaFields("data"),filters:t?this._fields.filter((e=>e!==o&&e.area&&e.filterValues&&e.filterValues.length)):[],skipValues:!0};let c;const h=new r.Deferred;return i&&(c=i.searchValue,u.columnSkip=i.skip,u.columnTake=i.take),o&&a?((0,d.each)(o.levels||[o],(function(){s.push((0,l.extend)({},this,{expanded:!0,filterValues:null,sortOrder:"asc",sortBySummaryField:null,searchValue:c}))})),a.load(u).done((e=>{u.columnSkip&&(e.columns=e.columns.slice(u.columnSkip)),u.columnTake&&(e.columns=e.columns.slice(0,u.columnTake)),N(u,e),u.columnTake||n._sort(u,e),h.resolve(e.columns)})).fail(h)):h.reject(),h},reload(){return this.load({reload:!0})},filter(){const e=this._store;return e.filter.apply(e,arguments)},load:function(e){const t=this,i=new r.Deferred;function n(){t._delayedLoadTask=void 0,t._descriptions?t._loadCore(e,i):(0,r.when)(F(t)).done((n=>{t._fieldsPrepared(n),t._loadCore(e,i)})).fail(i.reject).fail(t._loadErrorHandler)}return e=e||{},t.beginLoading(),i.fail((e=>{t._eventsStrategy.fireEvent("loadError",[e])})).always((()=>{t.endLoading()})),t.store()?t._delayedLoadTask=h.default.executeAsync(n):n(),i},createDrillDownDataSource(e){return this._store.createDrillDownDataSource(this._descriptions,e)},_createDescriptions(e){const t=this.fields(),i={rows:[],columns:[],values:[],filters:[]};(0,d.each)(["row","column","data","filter"],((i,n)=>{(0,s.normalizeIndexes)(W(t,n),"areaIndex",e)})),(0,d.each)(t||[],((e,n)=>{const o=b[n.area],a=i[o],{groupName:s}=n;s&&!(0,u.isNumeric)(n.groupIndex)&&(n.levels=function(e,t){return e.filter((e=>e.groupName===t.groupName&&(0,u.isNumeric)(e.groupIndex)&&!1!==e.visible)).map((e=>(0,l.extend)(e,{areaIndex:t.areaIndex,area:t.area,expanded:(0,u.isDefined)(e.expanded)?e.expanded:t.expanded,dataField:e.dataField||t.dataField,dataType:e.dataType||t.dataType,sortBy:e.sortBy||t.sortBy,sortOrder:e.sortOrder||t.sortOrder,sortBySummaryField:e.sortBySummaryField||t.sortBySummaryField,sortBySummaryPath:e.sortBySummaryPath||t.sortBySummaryPath,visible:e.visible||t.visible,showTotals:(0,u.isDefined)(e.showTotals)?e.showTotals:t.showTotals,showGrandTotals:(0,u.isDefined)(e.showGrandTotals)?e.showGrandTotals:t.showGrandTotals}))).sort(((e,t)=>e.groupIndex-t.groupIndex))}(t,n)),!a||s&&(0,u.isNumeric)(n.groupIndex)||!1===n.visible&&"data"!==n.area&&"filter"!==n.area||(n.levels&&a!==i.filters&&a!==i.values?(a.push.apply(a,n.levels),n.filterValues&&n.filterValues.length&&i.filters.push(n)):a.push(n))})),(0,d.each)(i,((e,t)=>{L(t)}));const n={};return(0,d.each)(i.values,((e,o)=>{const a=o.calculateSummaryValue;if((0,u.isFunction)(a)){a(m.default.createMockSummaryCell(i,t,n))}})),i},_fieldsPrepared(e){const t=this;t._fields=e,(0,d.each)(e,((e,t)=>{t.index=e,I(t,S)}));const i=P(e,["caption"]);t._eventsStrategy.fireEvent("fieldsPrepared",[e]);for(let t=0;t<e.length;t+=1)e[t].caption!==i[t].caption&&(0,_.setFieldProperty)(e[t],"caption",e[t].caption,!0);t._descriptions=t._createDescriptions()},isLoading(){return this._loadingCount>0},state(e,t){const i=this;return arguments.length?(e=(0,l.extend)({rowExpandedPaths:[],columnExpandedPaths:[]},e),void(i._descriptions?(i._fields=R(e.fields,i._fields),i._descriptions=i._createDescriptions(),!t&&i.load(e)):(i.beginLoading(),(0,r.when)(F(i)).done((n=>{i._fields=R(e.fields,n),i._fieldsPrepared(n),!t&&i.load(e)})).always((()=>{i.endLoading()}))))):{fields:P(i._fields,x),columnExpandedPaths:A(i._data,i._descriptions,"columns",i._lastLoadOptions),rowExpandedPaths:A(i._data,i._descriptions,"rows",i._lastLoadOptions)}},beginLoading(){this._changeLoadingCount(1)},endLoading(){this._changeLoadingCount(-1)},_changeLoadingCount(e){const t=this.isLoading();this._loadingCount+=e;const i=this.isLoading();t^i&&this._eventsStrategy.fireEvent("loadingChanged",[i])},_hasPagingValues(t,i,n){const o=`${i}Take`,a=`${i}Skip`,{values:s}=this._data;let r=this._data[`${i}s`];const l="row"===i?"column":"row",d=[];if(t.path&&t.area===i){const i=e(r,t.path);if(r=i&&i.children,!r)return!1}if(t.oppositePath&&t.area===l){const i=e(r,t.oppositePath);if(r=i&&i.children,!r)return!1}for(let e=t[a];e<t[a]+t[o];e+=1)r[e]&&d.push(r[e].index);return d.every((e=>{if(void 0!==e)return"row"===i?(s[e]||[])[n]:(s[n]||[])[e]}))},_processPagingCacheByArea(t,i,n){const o=`${n}Take`,a=`${n}Skip`;let s=this._data[`${n}s`];const r="row"===n?"column":"row";let l;if(t[o]){if(t.path&&t.area===n){const i=e(s,t.path);s=i&&i.children||[]}if(t.oppositePath&&t.area===r){const i=e(s,t.oppositePath);s=i&&i.children||[]}do{if(l=s[t[a]],l&&void 0!==l.index){if(!this._hasPagingValues(t,r,l.index))break;t[a]++,t[o]--}}while(l&&void 0!==l.index&&t[o]);if(t[o]){const e=Math.floor(t[a]/i)*i,n=Math.ceil((t[a]+t[o])/i)*i;t[a]=e,t[o]=n-e}}},_processPagingCache(e){const t=this._pageSize;if(!(t<0))for(let i=0;i<e.length;i+=1)this._processPagingCacheByArea(e[i],t,"row"),this._processPagingCacheByArea(e[i],t,"column")},_loadCore(e,t){const i=this,n=this._store,o=this._descriptions,a=e.reload||this.paginate()&&i._isFieldsModified,s=this.paginate(),d=b[e.area];if(e=e||{},n){(0,l.extend)(e,o),e.columnExpandedPaths=e.columnExpandedPaths||A(this._data,e,"columns",i._lastLoadOptions),e.rowExpandedPaths=e.rowExpandedPaths||A(this._data,e,"rows",i._lastLoadOptions),s&&(e.pageSize=this._pageSize),d&&(e.headerName=d),i.beginLoading(),t.always((()=>{i.endLoading()}));let u=[e];if(i._eventsStrategy.fireEvent("customizeStoreLoadOptions",[u,a]),a||i._processPagingCache(u),u=u.filter((e=>!(e.rows.length&&0===e.rowTake||e.columns.length&&0===e.columnTake))),!u.length)return void i._update(t);const c=u.map((e=>n.load(e)));r.when.apply(null,c).done((function(){const e=arguments;for(let n=0;n<e.length;n+=1){const o=u[n],r=e[n],d=n===e.length-1;o.path?i.applyPartialDataSource(o.area,o.path,r,!!d&&t,o.oppositePath):s&&!a&&E(i._data)?i.mergePartialDataSource(r,!!d&&t):((0,l.extend)(i._data,r),i._lastLoadOptions=o,i._update(!!d&&t))}})).fail(t.reject)}else i._update(t)},_sort(e,t,i){this._store&&!this._paginate&&(0,C.sort)(e,t,i)},sortLocal(){this._sort(this._descriptions,this._data),this._eventsStrategy.fireEvent("changed")},paginate(){return this._paginate&&this._store&&this._store.supportPaging()},isEmpty(){const e=this.getAreaFields("data").filter((e=>!1!==e.visible)),t=this.getData();return!e.length||!t.values.length},_update(e){const t=this,i=t._descriptions,n=t._data,o=i.values,a=function(e){return e.some((e=>e.summaryDisplayMode||e.calculateSummaryValue))}(o);return(0,r.when)(N(i,n),z(n.rows),z(n.columns)).done((()=>{a&&(t._sort(i,n,a),!t.isEmpty()&&m.default.applyDisplaySummaryMode(i,n)),t._sort(i,n),!t.isEmpty()&&function(e){return e.some((e=>!!e.runningTotal))}(o)&&m.default.applyRunningTotal(i,n),t._data=n,!1!==e&&(0,r.when)(e).done((()=>{t._isFieldsModified=!1,t._eventsStrategy.fireEvent("changed"),(0,u.isDefined)(t._data.grandTotalRowIndex)&&(n.grandTotalRowIndex=t._data.grandTotalRowIndex),(0,u.isDefined)(t._data.grandTotalColumnIndex)&&(n.grandTotalColumnIndex=t._data.grandTotalColumnIndex)})),e&&e.resolve(t._data)})),e},store(){return this._store},collapseHeaderItem(t,i){const n=this,o="column"===t?n._data.columns:n._data.rows,a=e(o,i),s=n.getAreaFields(t)[i.length-1];return!(!a||!a.children)&&(n._eventsStrategy.fireEvent("expandValueChanging",[{area:t,path:i,expanded:!1}]),s&&(s.expanded=!1),a.collapsedChildren=a.children,delete a.children,n._update(),n.paginate()&&n.load(),!0)},collapseAll(e){let t=!1;const i=this.field(e)||{};let n=[this.getAreaFields(i.area).indexOf(i)];i.expanded=!1,i&&i.levels&&(n=[],i.levels.forEach((e=>{n.push(this.getAreaFields(i.area).indexOf(e)),e.expanded=!1}))),(0,_.foreachTree)(this._data[`${i.area}s`],(e=>{const i=e[0],o=(0,_.createPath)(e);i&&i.children&&n.includes(o.length-1)&&(i.collapsedChildren=i.children,delete i.children,t=!0)}),!0),t&&this._update()},expandAll(e){const t=this.field(e);t&&t.area&&(t.expanded=!0,t&&t.levels&&t.levels.forEach((e=>{e.expanded=!0})),this.load())},expandHeaderItem(t,i){const n=this,o="column"===t?n._data.columns:n._data.rows,a=e(o,i);if(a&&!a.children){const e=!!a.collapsedChildren,o={area:t,path:i,expanded:!0,needExpandData:!e};return n._eventsStrategy.fireEvent("expandValueChanging",[o]),e?(a.children=a.collapsedChildren,delete a.collapsedChildren,n._update()):this.store()&&n.load(o),e}return!1},mergePartialDataSource(e,t){const i=this,n=i._data;let o,a;e&&e.values&&(e.rows=e.rows||[],e.columns=e.columns||[],o=p(n.rows,e.rows,n.grandTotalColumnIndex),a=p(n.columns,e.columns,n.grandTotalColumnIndex),(0,r.when)(o,a).done(((o,a)=>{(o.length||a.length)&&y(n,e.values,o,a),i._update(t)})))},applyPartialDataSource(t,n,o,a,s){const l=this,d=l._data,u="column"===t?d.columns:d.rows;let c;const h="column"===t?d.rows:d.columns;let g,_,f;o&&o.values&&(o.rows=o.rows||[],o.columns=o.columns||[],c=e(u,n),g=s&&e(h,s),c&&("column"===t?(f=i(u,c,o.columns,d.grandTotalColumnIndex),_=g?i(h,g,o.rows,d.grandTotalRowIndex):p(d.rows,o.rows,d.grandTotalRowIndex)):(_=i(u,c,o.rows,d.grandTotalRowIndex),f=g?i(h,g,o.columns,d.grandTotalColumnIndex):p(d.columns,o.columns,d.grandTotalColumnIndex)),(0,r.when)(_,f).done(((e,i)=>{("row"===t&&e.length||"column"===t&&i.length)&&y(d,o.values,e,i),l._update(a)}))))},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this},dispose(){const e=this._delayedLoadTask;this._eventsStrategy.dispose(),e&&e.abort(),this._isDisposed=!0},isDisposed(){return!!this._isDisposed}}}());t.default={PivotGridDataSource:T}},11075:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.sort=s;var n=i(21274),o=i(11528),a=i(12062);function s(e,t,i){r(t,e,"rows",i),r(t,e,"columns",i)}function r(e,t,i,s){const r=t[i]||[],l=t.headerName===i?t.path.length:0,d=[];(0,a.foreachDataLevel)(e[i],((l,u)=>{const c=r[u]||{},h=d[u]=d[u]||function(e,t,i,s,r){const l=r?"asc":e.sortOrder,d=function(e,t){let i="text";"none"===e?i="index":(t||"displayText"!==e)&&(i="value");return i}(e.sortBy,r),u=e.sortingMethod?function(t,i){return e.sortingMethod(t,i)}:(0,a.getCompareFunction)((e=>e[d])),c=!r&&function(e,t,i,s){const{values:r}=t,l=(0,a.findField)(i.values,e.sortBySummaryField),d="rows"===s,u=d?t.columns:t.rows,c=d?t.grandTotalRowIndex:t.grandTotalColumnIndex,h=e.sortBySummaryPath||[],p=h.length?function(e,t){let i=null;const o=(t||[]).join(".");o.length&&(0,a.foreachTree)(e,(e=>{const t=e[0],s=(0,a.createPath)(e).join("."),r=(0,n.map)(e,(e=>e.text)).reverse().join(".");if(o===s||t.key&&r===o)return i=e[0].index,!1}));return i}(u,h):c;if(r&&r.length&&l>=0&&(0,o.isDefined)(p))return function(e){const t=d?e.index:p,i=d?p:e.index,n=((r[t]||[[]])[i]||[])[l];return(0,o.isDefined)(n)?n:null};return}(e,t,i,s),h=c&&(0,a.getCompareFunction)(c),p=function(e,t){const i=h&&h(e,t)||u(e,t);return"desc"===l?-i:i};return p}(c,e,t,i,s);l.sort(h)}),l)}t.default={sort:s}},12867:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PivotGridExport=t.ExportController=t.DataProvider=void 0;var n=p(i(52771)),o=p(i(55620)),a=i(87739),s=i(52576),r=i(21274),l=i(41639),d=i(11528),u=i(3104),c=p(i(2082)),h=i(47197);function p(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},g.apply(null,arguments)}const _=t.ExportController={exportTo(){const e=this._createActionByOption("onExporting"),t={rtlEnabled:this.option("rtlEnabled"),fileName:"PivotGrid",cancel:!1};(0,d.isFunction)(e)&&e(t)},_getLength(e){let t;const i=e[0].length;let n=0;for(t=0;t<i;t+=1)n+=e[0][t].colspan||1;return n},_correctCellsInfoItemLengths(e,t){for(let i=0;i<e.length;i+=1)for(;e[i].length<t;)e[i].push({});return e},_calculateCellInfoItemLength(e){let t=0;for(let i=0;i<e.length;i+=1)t+=(0,d.isDefined)(e[i].colspan)?e[i].colspan:1;return t},_getEmptyCell:()=>({text:"",value:void 0,colspan:1,rowspan:1}),_getAllItems(e,t,i){let n,o,a=i;const r=this._getLength(t),u=e.length;if(e.length>0&&e[0].length>0&&i.length>0&&0===i[0].length){const t=this._calculateCellInfoItemLength(e[0]);t>0&&(a=this._correctCellsInfoItemLengths(i,t))}if(0===a.length){const i=t.length,n=e.map((e=>e.filter((e=>!e.expanded)).length)).reduce(((e,t)=>e+t),0);for(let e=0;e<i;e+=1){a[e]=[];for(let t=0;t<n;t+=1)a[e][t]=this._getEmptyCell()}}const c=e.concat(a);for(o=0;o<t.length;o+=1)for(n=t[o].length-1;n>=0;n-=1)(0,d.isDefined)(c[o+u])||(c[o+u]=[]),c[o+u].splice(0,0,(0,s.extend)({},t[o][n]));return c[0].splice(0,0,(0,s.extend)({},this._getEmptyCell(),{alignment:(0,l.getDefaultAlignment)(this._options.rtlEnabled),colspan:r,rowspan:u})),(0,h.prepareItems)(c,this._getEmptyCell())},getDataProvider(){return new f(this)}},f=t.DataProvider=o.default.inherit({ctor(e){this._exportController=e},ready(){this._initOptions();const e=this._options;return(0,a.when)(e.items).done((t=>{const i=t[t[0][0].rowspan-1];(0,r.each)(i,((e,t)=>{t.width=100})),e.columns=i,e.items=t}))},_initOptions(){const e=this._exportController,t=e._dataController,i=new a.Deferred;t.beginLoading(),setTimeout((()=>{const n=(0,s.extend)(!0,[],t.getColumnsInfo(!0)),o=(0,s.extend)(!0,[],t.getRowsInfo(!0)),a=t.getCellsInfo(!0);i.resolve(e._getAllItems(n,o,a)),t.endLoading()})),this._options={items:i,rtlEnabled:e.option("rtlEnabled"),dataFields:e.getDataSource().getAreaFields("data"),rowsArea:e._rowsArea,columnsArea:e._columnsArea}},getColumns(){return this._options.columns},getColumnsWidths(){const e=this._options.columnsArea,{rowsArea:t}=this._options,{columns:i}=this._options;return!(0,u.hasWindow)()||"virtual"===e.option("scrolling.mode")||e.element().is(":hidden")?i.map((()=>100)):t.getColumnsWidth().concat(e.getColumnsWidth())},getRowsCount(){return this._options.items.length},getGroupLevel:()=>0,getCellMerging(e,t){const{items:i}=this._options,n=i[e]&&i[e][t];return n?{colspan:n.colspan-1,rowspan:n.rowspan-1}:{colspan:0,rowspan:0}},getFrozenArea(){return{x:this.getRowAreaColCount(),y:this.getColumnAreaRowCount()}},getCellType(e,t){const i=this.getStyles()[this.getStyleId(e,t)];return i&&i.dataType||"string"},getCellData(e,t,i){const n={},{items:o}=this._options,a=o[e]&&o[e][t]||{};if(i){n.cellSourceData=a;const i=this._tryGetAreaName(a,e,t);i&&(n.cellSourceData.area=i),n.cellSourceData.rowIndex=e,n.cellSourceData.columnIndex=t}return"string"===this.getCellType(e,t)?n.value=a.text:n.value=a.value,n.cellSourceData&&n.cellSourceData.isWhiteSpace&&(n.value=""),n},_tryGetAreaName(e,t,i){return this.isColumnAreaCell(t,i)?"column":this.isRowAreaCell(t,i)?"row":(0,d.isDefined)(e.dataIndex)?"data":void 0},isRowAreaCell(e,t){return e>=this.getColumnAreaRowCount()&&t<this.getRowAreaColCount()},isColumnAreaCell(e,t){return t>=this.getRowAreaColCount()&&e<this.getColumnAreaRowCount()},getColumnAreaRowCount(){return this._options.items[0][0].rowspan},getRowAreaColCount(){return this._options.items[0][0].colspan},getHeaderStyles(){return[{alignment:"center",dataType:"string"},{alignment:(0,l.getDefaultAlignment)(this._options.rtlEnabled),dataType:"string"}]},getDataFieldStyles(){const{dataFields:e}=this._options,t={alignment:this._options.rtlEnabled?"left":"right"},i=[];return e.length?(e.forEach((e=>{i.push(g({},t,{format:e.format,dataType:this.getCellDataType(e)}))})),i):[t]},getStyles(){return this._styles||(this._styles=[...this.getHeaderStyles(),...this.getDataFieldStyles()]),this._styles},getCellDataType(e){if(e&&e.customizeText)return"string";if(e.dataType)return e.dataType;if(e.format){if(1===n.default.parse(c.default.format(1,e.format)))return"number";if(c.default.format(new Date,e.format))return"date"}return"string"},getStyleId(e,t){const{items:i}=this._options,n=i[e]&&i[e][t]||{};return 0===t&&0===e||this.isColumnAreaCell(e,t)?0:this.isRowAreaCell(e,t)?1:this.getHeaderStyles().length+(n.dataIndex||0)}}),m=t.PivotGridExport={DEFAUL_COLUMN_WIDTH:100};t.default={ExportController:_,PivotGridExport:m,DataProvider:f}},73944:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SORT_ORDER=t.SORTABLE_CONST=t.ICONS=t.CLASSES=t.ATTRIBUTES=void 0;t.ATTRIBUTES={treeViewItem:"tree-view-item",allowScrolling:"allow-scrolling",itemGroup:"item-group"},t.CLASSES={area:{self:"dx-area",box:"dx-area-box",caption:"dx-area-caption",icon:"dx-area-icon",field:"dx-area-field",fieldContainer:"dx-area-field-container",fieldContent:"dx-area-field-content",fieldList:"dx-area-fields",fieldListHeader:"dx-area-fields-header"},pivotGrid:{dragAction:"dx-pivotgrid-drag-action",fieldsContainer:"dx-pivotgrid-fields-container"},fieldChooser:{self:"dx-pivotgridfieldchooser",container:"dx-pivotgridfieldchooser-container",contextMenu:"dx-pivotgridfieldchooser-context-menu"},layout:{zero:"dx-layout-0",second:"dx-layout-2"},treeView:{self:"dx-treeview",borderVisible:"dx-treeview-border-visible"},scrollable:{self:"dx-scrollable"},allFields:"dx-all-fields",col:"dx-col",headerFilter:"dx-header-filter",row:"dx-row",widget:"dx-widget"},t.ICONS={all:"smalliconslayout",column:"columnfield",row:"rowfield",filter:"filter",data:"formula",measure:"formula",hierarchy:"hierarchy",dimension:"detailslayout"},t.SORTABLE_CONST={targets:{drag:"drag"}},t.SORT_ORDER={descending:"desc",ascending:"asc"}},47331:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.dragAndDropItemRender=function(e,t){const i=function(e,t){const i=e.hasClass(s.CLASSES.area.box),n=e.attr(s.ATTRIBUTES.treeViewItem);if(i)return function(e,t){const i=e.clone();t===s.SORTABLE_CONST.targets.drag&&e.each(((e,t)=>{const n=parseFloat((0,a.getOuterWidth)(t));return i.eq(e).css("width",n),!0}));return i}(e,t);if(n)return function(e){return e.clone().addClass(s.CLASSES.area.box).css("width",parseFloat((0,a.getOuterWidth)(e)))}(e);return function(e){return(0,o.default)("<div>").addClass(s.CLASSES.area.field).addClass(s.CLASSES.area.box).text(e.text())}(e)}(e,t);if(t===s.SORTABLE_CONST.targets.drag)return function(e){const t=(0,o.default)("<div>");return e.each(((e,i)=>{const n=(0,o.default)("<div>").addClass(s.CLASSES.pivotGrid.fieldsContainer).addClass(s.CLASSES.widget).append((0,o.default)(i));return t.append(n),!0})),t.children()}(i);return i};var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(57653),s=i(73944)},62989:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FieldChooser=void 0,i(87993);var n=f(i(4671)),o=f(i(92848)),a=f(i(64553)),s=i(52576),r=i(69629),l=i(21274),d=i(11528),u=i(3104),c=f(i(34378)),h=f(i(4313)),p=i(12062),g=i(73944),_=i(70317);function f(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(null,arguments)}const v="<div>",C=(0,u.hasWindow)();function y(e,t){const i=[];if(e.items)for(let n=0;n<e.items.length;n+=1)i.push.apply(i,y(e.items[n],t));else(0,d.isDefined)(e.index)&&i.push(t[e.index]);return i}function b(e,t){if(e.items)for(let i=0;i<e.items.length;i+=1){const n=b(e.items[i],t);if(n)return n}if(t(e))return e}const x=[function(e,t){return-!!e.isMeasure+ +!!t.isMeasure},function(e,t){return-!(!e.items||!e.items.length)+ +!(!t.items||!t.items.length)},function(e,t){return+!!(!1===e.isMeasure&&e.field&&e.field.levels&&e.field.levels.length)+-!!(!1===t.isMeasure&&t.field&&t.field.levels&&t.field.levels.length)},(0,p.getCompareFunction)((e=>e.text))];function w(e,t){let i=0,n=0;for(;!i&&x[n];)i=x[n++](e,t);return i}function S(e){return e.find(`.${g.CLASSES.scrollable.self}`).dxScrollable("instance")}class D extends _.FieldChooserBase{_getDefaultOptions(){return m({},super._getDefaultOptions(),{height:400,layout:0,dataSource:null,encodeHtml:!0,onContextMenuPreparing:null,allowSearch:!1,searchTimeout:500,texts:{columnFields:n.default.format("dxPivotGrid-columnFields"),rowFields:n.default.format("dxPivotGrid-rowFields"),dataFields:n.default.format("dxPivotGrid-dataFields"),filterFields:n.default.format("dxPivotGrid-filterFields"),allFields:n.default.format("dxPivotGrid-allFields")}})}_refreshDataSource(){const e=this;e._expandedPaths=[],e._changedHandler=e._changedHandler||function(){(0,l.each)(e._dataChangedHandlers,((e,t)=>{t()})),e._fireContentReadyAction(),e._skipStateChange=!0,e.option("state",e._dataSource.state()),e._skipStateChange=!1},e._disposeDataSource(),super._refreshDataSource(),e._dataSource&&e._dataSource.on("changed",e._changedHandler)}_disposeDataSource(){const e=this,t=e._dataSource;t&&(t.off("changed",e._changedHandler),e._dataSource=void 0)}_dispose(){this._disposeDataSource(),super._dispose.apply(this,arguments)}_init(){super._init(),this._refreshDataSource(),this._dataChangedHandlers=[],this._initActions()}_initActions(){this._actions={onContextMenuPreparing:this._createActionByOption("onContextMenuPreparing")}}_trigger(e,t){this._actions[e](t)}_setOptionsByReference(){super._setOptionsByReference(),(0,s.extend)(this._optionsByReference,{dataSource:!0})}_optionChanged(e){const t=this;switch(e.name){case"dataSource":t._refreshDataSource(),t._invalidate();break;case"layout":case"texts":case"allowSearch":case"searchTimeout":case"encodeHtml":t._invalidate();break;case"onContextMenuPreparing":t._actions[e.name]=t._createActionByOption(e.name);break;default:super._optionChanged(e)}}_clean(e){!e&&this._dataSource&&this.option("state",this._dataSource.state()),this.$element().children(`.${g.CLASSES.fieldChooser.container}`).remove()}_renderLayout0(e){const t=this;e.addClass(g.CLASSES.layout.zero);const i=(0,a.default)(v).addClass(g.CLASSES.row).appendTo(e),n=(0,a.default)(v).addClass(g.CLASSES.row).appendTo(e),o=(0,a.default)(v).addClass(g.CLASSES.col).appendTo(i),s=(0,a.default)(v).addClass(g.CLASSES.col).appendTo(i),r=(0,a.default)(v).addClass(g.CLASSES.col).appendTo(n),l=(0,a.default)(v).addClass(g.CLASSES.col).appendTo(n);t._renderArea(o,"all"),t._renderArea(s,"row"),t._renderArea(s,"column"),t._renderArea(r,"filter"),t._renderArea(l,"data")}_renderLayout1(e){const t=this,i=(0,a.default)(v).addClass(g.CLASSES.col).appendTo(e),n=(0,a.default)(v).addClass(g.CLASSES.col).appendTo(e);t._renderArea(i,"all"),t._renderArea(n,"filter"),t._renderArea(n,"row"),t._renderArea(n,"column"),t._renderArea(n,"data")}_renderLayout2(e){const t=this;e.addClass(g.CLASSES.layout.second);const i=(0,a.default)(v).addClass(g.CLASSES.row).appendTo(e);t._renderArea(i,"all");const n=(0,a.default)(v).addClass(g.CLASSES.row).appendTo(e),o=(0,a.default)(v).addClass(g.CLASSES.col).appendTo(n),s=(0,a.default)(v).addClass(g.CLASSES.col).appendTo(n);t._renderArea(o,"filter"),t._renderArea(o,"row"),t._renderArea(s,"column"),t._renderArea(s,"data")}_initMarkup(){const e=this,t=this.$element(),i=(0,a.default)(v).addClass(g.CLASSES.fieldChooser.container).appendTo(t),n=e.option("layout");super._initMarkup(),t.addClass(g.CLASSES.fieldChooser.self).addClass(g.CLASSES.pivotGrid.fieldsContainer),e._dataChangedHandlers=[];const o=this._dataSource,s="instantly"!==e.option("applyChangesMode")&&o&&o.state();s&&e.option("state")&&o.state(e.option("state"),!0),0===n?e._renderLayout0(i):1===n?e._renderLayout1(i):e._renderLayout2(i),s&&o.state(s,!0)}_renderContentImpl(){super._renderContentImpl(),this.renderSortable(),this._renderContextMenu(),this.updateDimensions()}_fireContentReadyAction(){this._dataSource&&this._dataSource.isLoading()||super._fireContentReadyAction()}_getContextMenuArgs(e){const t=(0,a.default)(e.target).closest(`.${g.CLASSES.area.field}`),i=(0,a.default)(e.target).closest(`.${g.CLASSES.area.fieldList}`);let n,o;if(t.length){const e=t.data("field");e&&(n=this.getDataSource().field(e.index)||e)}return i.length&&(o=i.attr("group")),{event:e,field:n,area:o,items:[]}}_renderContextMenu(){const e=this,t=e.$element();e._contextMenu&&e._contextMenu.$element().remove(),e._contextMenu=e._createComponent((0,a.default)(v).appendTo(t),c.default,{onPositioning(t){const{event:i}=t;if(!i)return;const n=e._getContextMenuArgs(i);e._trigger("onContextMenuPreparing",n),n.items&&n.items.length?t.component.option("items",n.items):t.cancel=!0},target:t,onItemClick(e){e.itemData.onItemClick&&e.itemData.onItemClick(e)},cssClass:g.CLASSES.fieldChooser.contextMenu})}_createTreeItems(e,t,i){const n=this;let o,a=[];const s=[],r=t[0],u={};return r?((0,l.each)(e,((e,t)=>{const i=t[r]||"";u[i]=u[i]||[],u[i].push(t),void 0===o&&(o=!0),o=o&&!0===t.isMeasure})),(0,l.each)(u,((e,o)=>{const r=i?`${i}.${e}`:e,l=n._createTreeItems(o,t.slice(1),r);e?s.push({key:e,text:e,path:r,isMeasure:l.isMeasure,expanded:n._expandedPaths.includes(r),items:l}):a=l})),a=s.concat(a),a.isMeasure=o):(0,l.each)(e,((e,t)=>{let i;!0===t.isMeasure&&(i=g.ICONS.measure),!1===t.isMeasure&&(i=t.groupName?g.ICONS.hierarchy:g.ICONS.dimension),a.push({index:t.index,field:t,key:t.dataField,selected:(0,d.isDefined)(t.area),text:t.caption||t.dataField,icon:i,isMeasure:t.isMeasure,isDefault:t.isDefault})})),a}_createFieldsDataSource(e){let t=e&&e.fields()||[];t=t.filter((e=>!1!==e.visible&&!(0,d.isDefined)(e.groupIndex)));const i=this._createTreeItems(t,["dimension","displayFolder"]);return(0,p.foreachDataLevel)(i,(e=>{e.sort(w)}),0,"items"),i}_renderFieldsTreeView(e){const t=this,i=t._dataSource,n=t._createComponent(e,h.default,{dataSource:t._createFieldsDataSource(i),showCheckBoxesMode:"normal",expandNodesRecursive:!1,searchEnabled:t.option("allowSearch"),searchTimeout:t.option("searchTimeout"),useNativeScrolling:!1,itemTemplate(e,t,i){const n=(0,a.default)("<div>").toggleClass(g.CLASSES.area.field,!e.items).attr(g.ATTRIBUTES.treeViewItem,!0).data("field",e.field).appendTo(i);var o;e.icon&&(null===(o=(0,r.getImageContainer)(e.icon))||void 0===o||o.appendTo(n));(0,a.default)("<span>").text(e.text).appendTo(n)},onItemCollapsed(e){const i=t._expandedPaths.indexOf(e.itemData.path);i>=0&&t._expandedPaths.splice(i,1)},onItemExpanded(e){t._expandedPaths.indexOf(e.itemData.path)<0&&t._expandedPaths.push(e.itemData.path)},onItemSelectionChanged(e){const o=e.itemData;let a,s,r,l=!0;if(o.items){if(o.selected)return void n.unselectItem(o);if(t._processDemandState((()=>{s=y(o,i.fields());for(let e=0;e<s.length;e+=1)if(s[e].area){l=!1;break}})),l){const e=b(o,(e=>e.isDefault))||b(o,(e=>(0,d.isDefined)(e.index)));return void(e&&n.selectItem(e))}}else a=i.fields()[o.index],o.selected&&(r=a.isMeasure?"data":"column"),a&&(s=[a]);t._applyChanges(s,{area:r,areaIndex:void 0})}});t._dataChangedHandlers.push((function(){let o=S(e);const a=o?o.scrollTop():0;n.option({dataSource:t._createFieldsDataSource(i)}),o=S(e),o&&(o.scrollTo({y:a}),o.update())}))}_renderAreaFields(e,t){const i=this,n=i._dataSource,o=n?(0,s.extend)(!0,[],n.getAreaFields(t,!0)):[];e.empty(),(0,l.each)(o,((t,n)=>{!1!==n.visible&&i.renderField(n,!0).appendTo(e)}))}_renderArea(e,t){const i=this,n=(0,a.default)(v).addClass(g.CLASSES.area.self).appendTo(e),o=(0,a.default)(v).addClass(g.CLASSES.area.fieldListHeader).appendTo(n),s=i.option(`texts.${t}Fields`);let r,l;(0,a.default)("<span>").addClass(g.CLASSES.area.icon).addClass(`dx-icon-${g.ICONS[t]}`).appendTo(o),(0,a.default)("<span>").html("&nbsp;").appendTo(o),(0,a.default)("<span>").addClass(g.CLASSES.area.caption).text(s).appendTo(o);const d=(0,a.default)(v).addClass(g.CLASSES.area.fieldList).addClass(g.CLASSES.pivotGrid.dragAction).appendTo(n);"all"!==t?(d.attr("group",t).attr(g.ATTRIBUTES.allowScrolling,!0),r=(0,a.default)(v).addClass(g.CLASSES.area.fieldContainer).appendTo(d),l=function(){i._renderAreaFields(r,t)},i._dataChangedHandlers.push(l),l(),d.dxScrollable({useNative:!1})):(n.addClass(g.CLASSES.allFields),d.addClass(g.CLASSES.treeView.borderVisible),i._renderFieldsTreeView(d))}_getSortableOptions(){return{direction:""}}_adjustSortableOnChangedArgs(){}resetTreeView(){const e=this.$element().find(`.${g.CLASSES.treeView.self}`).dxTreeView("instance");e&&(e.option("searchValue",""),e.collapseAll())}applyChanges(){const e=this.option("state");(0,d.isDefined)(e)&&this._dataSource.state(e)}cancelChanges(){const e=this._dataSource;return!e.isLoading()&&(this.option("state",e.state()),!0)}getDataSource(){return this._dataSource}updateDimensions(){this.$element().find(`.${g.CLASSES.area.self} .${g.CLASSES.scrollable.self}`).dxScrollable("update")}_visibilityChanged(e){e&&C&&this.updateDimensions()}}t.FieldChooser=D,(0,o.default)("dxPivotGridFieldChooser",D);t.default={FieldChooser:D}},70317:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FieldChooserBase=void 0;var n=i(64044),o=w(i(92774)),a=w(i(4671)),s=w(i(80556)),r=w(i(92848)),l=w(i(64553)),d=i(87739),u=i(52576),c=i(21274),h=i(11528),p=w(i(11118)),g=w(i(96790)),_=i(83040),f=w(i(53226)),m=w(i(2242)),v=i(12062),C=w(i(87691)),y=i(73944),b=i(47331),x=i(56958);function w(e){return e&&e.__esModule?e:{default:e}}function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},S.apply(null,arguments)}const{Sortable:D}=C.default,I="<div>";class E extends _.HeaderFilterView{_getSearchExpr(e,t){return e.useDefaultSearchExpr=!0,super._getSearchExpr(e,t)}}function T(e,t){let i=t;return(0,h.isDefined)(t.groupIndex)&&(i=e.getAreaFields(t.area,!0)[t.areaIndex]),i}function A(e){return e=e||{},JSON.stringify([e.fields,e.columnExpandedPaths,e.rowExpandedPaths])}const O=(0,_.headerFilterMixin)((0,m.default)((0,g.default)(p.default)));class P extends O{_getDefaultOptions(){return S({},super._getDefaultOptions(),{allowFieldDragging:!0,applyChangesMode:"instantly",state:null,headerFilter:{width:252,height:325,allowSelectAll:!0,showRelevantValues:!1,search:{enabled:!1,timeout:500,editorOptions:{},mode:"contains"},texts:{emptyValue:a.default.format("dxDataGrid-headerFilterEmptyValue"),ok:a.default.format("dxDataGrid-headerFilterOK"),cancel:a.default.format("dxDataGrid-headerFilterCancel")}},remoteSort:!1})}_init(){super._init(),this._headerFilterView=new E(this),this._refreshDataSource(),this.subscribeToEvents(),f.default.logHeaderFilterDeprecatedWarningIfNeed(this)}_refreshDataSource(){const e=this.option("dataSource");e&&e.fields&&e.load&&(this._dataSource=e)}_optionChanged(e){switch(e.name){case"dataSource":this._refreshDataSource();break;case"applyChangesMode":case"remoteSort":break;case"state":if(this._skipStateChange||!this._dataSource)break;"instantly"===this.option("applyChangesMode")&&A(this._dataSource.state())!==A(e.value)?this._dataSource.state(e.value):(this._clean(!0),this._renderComponent());break;case"headerFilter":case"allowFieldDragging":this._invalidate();break;default:super._optionChanged(e)}}renderField(e,t){const i=this,n=(0,l.default)(I).addClass(y.CLASSES.area.fieldContent).text(e.caption||e.dataField),o=(0,l.default)(I).addClass(y.CLASSES.area.field).addClass(y.CLASSES.area.box).data("field",e).append(n),a=T(i._dataSource,e);return"data"!==e.area&&(e.allowSorting&&i._applyColumnState({name:"sort",rootElement:o,column:{alignment:i.option("rtlEnabled")?"right":"left",sortOrder:"desc"===e.sortOrder?"desc":"asc",allowSorting:e.allowSorting},showColumnLines:t}),i._applyColumnState({name:"headerFilter",rootElement:o,column:{alignment:i.option("rtlEnabled")?"right":"left",filterValues:a.filterValues,allowFiltering:a.allowFiltering&&!e.groupIndex,allowSorting:e.allowSorting},showColumnLines:t})),e.groupName&&o.attr(y.ATTRIBUTES.itemGroup,e.groupName),o}_clean(e){}_render(){super._render(),this._headerFilterView.render(this.$element())}renderSortable(){const e=this;e._createComponent(e.$element(),D,(0,u.extend)({allowDragging:e.option("allowFieldDragging"),itemSelector:`.${y.CLASSES.area.field}`,itemContainerSelector:`.${y.CLASSES.area.fieldContainer}`,groupSelector:`.${y.CLASSES.area.fieldList}`,groupFilter(){const t=e._dataSource,i=(0,l.default)(this).closest(".dx-sortable-old"),n=i.data("dxPivotGrid"),o=i.data("dxPivotGridFieldChooser");return n?n.getDataSource()===t:!!o&&o.option("dataSource")===t},itemRender:b.dragAndDropItemRender,onDragging(e){const t=e.sourceElement.data("field"),{targetGroup:i}=e;e.cancel=!1,!0===t.isMeasure?"column"!==i&&"row"!==i&&"filter"!==i||(e.cancel=!0):!1===t.isMeasure&&"data"===i&&(e.cancel=!0)},useIndicator:!0,onChanged(t){const i=t.sourceElement.data("field");if(t.removeSourceElement=!!t.sourceGroup,e._adjustSortableOnChangedArgs(t),i){const{targetIndex:n}=t;let o,a=0;e._processDemandState((e=>{const t=e.getAreaFields(i.area,!0);o=T(e,i);const s=t.filter((e=>!1!==e.visible))[n-1];s&&(a=t.filter((e=>!1===e.visible&&e.areaIndex<=s.areaIndex)).length)})),e._applyChanges([o],{area:t.targetGroup,areaIndex:n+a})}}},e._getSortableOptions()))}_processDemandState(e){const t=this,i="instantly"===t.option("applyChangesMode"),n=t._dataSource;if(i)e(n,i);else{const o=n.state(),a=t.option("state");a&&n.state(a,!0),e(n,i),n.state(o,!0)}}_applyChanges(e,t){const i=this;i._processDemandState(((n,o)=>{e.forEach((e=>{let{index:i}=e;n.field(i,t)})),o?n.load():i._changedHandler()}))}_applyLocalSortChanges(e,t){this._processDemandState((i=>{i.field(e,{sortOrder:t}),i.sortLocal()}))}_adjustSortableOnChangedArgs(e){e.removeSourceElement=!1,e.removeTargetElement=!0,e.removeSourceClass=!1}_getSortableOptions(){return{direction:"auto"}}subscribeToEvents(e){const t=this,i=function(e){const i=(0,l.default)(e.currentTarget).data("field"),n=(0,u.extend)(!0,{},T(t._dataSource,i)),o=(0,l.default)(e.target).hasClass(y.CLASSES.headerFilter),a=t._dataSource,r=n.groupName?"tree":"list",h=a.paginate()&&"list"===r;if(o)t._headerFilterView.showHeaderFilterMenu((0,l.default)(e.currentTarget),(0,u.extend)(n,{type:r,encodeHtml:t.option("encodeHtml"),dataSource:{useDefaultSearch:!h,load(e){const{userData:i}=e;if(i.store)return i.store.load(e);const o=new d.Deferred;return a.getFieldValues(n.index,t.option("headerFilter.showRelevantValues"),h?e:void 0).done((n=>{const a=t.option("headerFilter.texts.emptyValue");n.forEach((e=>{e.text||(e.text=a)})),h?o.resolve(n):(i.store=new s.default(n),i.store.load(e).done(o.resolve).fail(o.reject))})).fail(o.reject),o},postProcess:e=>(function(e,t){const i=[],n=!!t.groupName,o="exclude"===t.filterType;t.filterValues&&(0,c.each)(t.filterValues,((e,t)=>{i.push(Array.isArray(t)?t.join("/"):t&&t.valueOf())})),(0,v.foreachTree)(e,(e=>{const t=e[0],a=(0,v.createPath)(e),s=n?(0,c.map)(e,(e=>e.text)).reverse().join("/"):t.text;t.value=n?a.slice(0):t.key||t.value;const r=n?a.join("/"):t.value&&t.value.valueOf();t.children&&(t.items=t.children,t.children=null),(0,_.updateHeaderFilterItemSelectionState)(t,t.key&&i.includes(s)||i.includes(r),o)}))}(e,n),e)},apply(){t._applyChanges([n],{filterValues:this.filterValues,filterType:this.filterType})}}));else if(i.allowSorting&&"data"!==i.area){const e=t.option("remoteSort"),n=(0,x.reverseSortOrder)(i.sortOrder);e?t._applyChanges([i],{sortOrder:n}):t._applyLocalSortChanges(i.index,n)}};e?o.default.on(e,n.name,`.${y.CLASSES.area.field}.${y.CLASSES.area.box}`,i):o.default.on(t.$element(),n.name,`.${y.CLASSES.area.field}.${y.CLASSES.area.box}`,i)}_initTemplates(){}addWidgetPrefix(e){return`dx-pivotgrid-${e}`}}t.FieldChooserBase=P,(0,r.default)("dxPivotGridFieldChooserBase",P);t.default={FieldChooserBase:P}},56958:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.reverseSortOrder=void 0;var n=i(73944);t.reverseSortOrder=e=>e===n.SORT_ORDER.descending?n.SORT_ORDER.ascending:n.SORT_ORDER.descending},2997:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FieldsArea=void 0,i(70317);var n=c(i(64553)),o=i(17781),a=i(21274),s=i(58515),r=c(i(64973)),l=c(i(10720)),d=i(96273),u=i(12062);function c(e){return e&&e.__esModule?e:{default:e}}const h="<div>";const p=t.FieldsArea=d.AreaItem.inherit({ctor(e,t){this.callBase(e),this._area=t},_getAreaName:()=>"fields",_createGroupElement(){return(0,n.default)(h).addClass("dx-pivotgrid-fields-area").addClass("dx-area-fields").addClass("dx-pivotgrid-drag-action").attr("group",this._area)},isVisible(){return!!this.option("fieldPanel.visible")&&this.option(`fieldPanel.show${(0,u.capitalizeFirstLetter)(this._area)}Fields`)},_renderButton(e){const t=this,i=(0,n.default)("<td>").appendTo((0,n.default)("<tr>").appendTo(e));t.component._createComponent((0,n.default)(h).appendTo(i),r.default,{text:"Fields",icon:"menu",width:"auto",onClick(){const e=t.tableElement().find(".dx-fields-area-popup").dxPopup("instance");e.option("visible")||e.show()}}).$element().addClass("dx-pivotgrid-fields-area-hamburger")},_getPopupOptions:(e,t)=>({contentTemplate:()=>(0,n.default)("<table>").addClass("dx-area-field-container").append((0,n.default)("<thead>").addClass("dx-pivotgrid-fields-area-head").append(e)),height:"auto",width:"auto",position:{at:"left",my:"left",of:t},dragEnabled:!1,animation:{show:{type:"pop",duration:200}},shading:!1,showTitle:!1,hideOnOutsideClick:!0,container:t.parent()}),_renderPopup(e,t){const i=this,o=e.find(".dx-button"),a=i._getPopupOptions(t,o),s=i.component.$element().dxPivotGridFieldChooserBase("instance");i._rowPopup&&i._rowPopup.$element().remove(),i._rowPopup=i.component._createComponent((0,n.default)(h).appendTo(e),l.default,a),i._rowPopup.$element().addClass("dx-fields-area-popup"),i._rowPopup.content().addClass("dx-pivotgrid-fields-container"),i._rowPopup.content().parent().attr("group","row"),s.subscribeToEvents(i._rowPopup.content()),s.renderSortable(i._rowPopup.content())},_shouldCreateButton:()=>!1,_renderTableContent(e,t){const i=this,o=this.groupElement(),s=this.isVisible(),r=i.component.$element().dxPivotGridFieldChooserBase("instance"),l=(0,n.default)("<thead>").addClass("dx-pivotgrid-fields-area-head").appendTo(e),d=i._area,u=(0,n.default)("<tr>");o.toggleClass("dx-hidden",!s),e.addClass("dx-area-field-container"),s&&((0,a.each)(t,((e,o)=>{if(o.area===d&&!1!==o.visible){const a=(0,n.default)("<td>").append(r.renderField(o,"row"===o.area)),s=a.find(".dx-column-indicators");s.length&&i._shouldCreateButton()&&s.insertAfter(s.next()),a.appendTo(u),function(e,t,i,o){i&&i.groupName&&i.groupName===e.groupName&&(0,n.default)(h).addClass("dx-group-connector").addClass("dx-group-connector-prev").appendTo(o),t&&t.groupName&&t.groupName===e.groupName&&(0,n.default)(h).addClass("dx-group-connector").addClass("dx-group-connector-next").appendTo(o)}(o,t[e+1],t[e-1],a)}})),u.children().length||(0,n.default)("<td>").append((0,n.default)(h).addClass("dx-empty-area-text").text(this.option(`fieldPanel.texts.${d}FieldArea`))).appendTo(u),i._shouldCreateButton()?(i._renderButton(l),i._renderPopup(e,u)):l.append(u))},setGroupWidth(e){(0,s.setWidth)(this.groupElement(),e)},setGroupHeight(e){(0,s.setHeight)(this.groupElement(),e)},reset(){this.callBase(),this.groupElement().css("marginTop",0)},_renderVirtualContent:o.noop});t.default={FieldsArea:p}},77195:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.VerticalHeadersArea=t.HorizontalHeadersArea=void 0;var n=u(i(64960)),o=u(i(64553)),a=i(21274),s=i(57653),r=i(11528),l=u(i(20876)),d=i(96273);function u(e){return e&&e.__esModule?e:{default:e}}const c="dx-expand-border",h=!!l.default.IS_RENOVATED_WIDGET;function p(e,t){if(t){const{data:i}=e.data(),{rowIndex:n}=t.parentNode,{cellIndex:o}=t;return i[n]&&i[n][o]&&i[n][o].path}}const g=t.HorizontalHeadersArea=d.AreaItem.inherit({ctor(e){this.callBase(e),this._scrollBarWidth=0},_getAreaName:()=>"column",_getAreaClassName:()=>"dx-pivotgrid-horizontal-headers",_createGroupElement(){return(0,o.default)("<div>").addClass(this._getAreaClassName()).addClass("dx-pivotgrid-area")},_applyCustomStyles(e){const{cssArray:t}=e,{cell:i}=e,{rowsCount:n}=e,{classArray:o}=e;e.cellIndex===e.cellsCount-1&&t.push((e.rtlEnabled?"border-left:":"border-right:")+"0px"),i.rowspan!==n-e.rowIndex&&e.rowIndex+1!==n||t.push("border-bottom-width:0px"),"T"!==i.type&&"GT"!==i.type||o.push("dx-row-total"),"T"===e.cell.type&&o.push("dx-total"),"GT"===e.cell.type&&o.push("dx-grandtotal"),(0,r.isDefined)(i.expanded)&&o.push(i.expanded?"dx-pivotgrid-expanded":"dx-pivotgrid-collapsed"),this.callBase(e)},_getMainElementMarkup(){const e=n.default.createElement("thead");return e.setAttribute("class",this._getAreaClassName()),e},_getCloseMainElementMarkup:()=>"</thead>",setVirtualContentParams(e){this.callBase(e),this._setTableCss({left:e.left,top:0}),this._virtualContentWidth=e.width},hasScroll(){const e=this._virtualContent?this._virtualContentWidth:this._tableWidth,t=this.getGroupWidth();return!(!t||!e)&&e-t>=1},renderScrollable(){this._groupElement.dxScrollable({useNative:!1,useSimulatedScrollbar:!1,showScrollbar:"never",bounceEnabled:!1,direction:"horizontal",rtlEnabled:!!h&&this.component.option("rtlEnabled"),updateManually:!0})},updateScrollableOptions(e){let{rtlEnabled:t}=e;const i=this._getScrollable();h&&i.option({rtlEnabled:t})},processScrollBarSpacing(e){const t=this.option("rtlEnabled")?"right":"left",i=this.getGroupWidth();i&&this.setGroupWidth(i-e),this._scrollBarWidth&&this._groupElement.next().remove(),this._groupElement.toggleClass("dx-vertical-scroll",e>0),(0,s.setWidth)(this._groupElement.css("float",t),this.getGroupHeight()),this._scrollBarWidth=e},getScrollPath(e){const t=this.tableElement();let i;return e-=parseInt(t[0].style.left,10)||0,(0,a.each)(t.find("td"),((t,n)=>{if(1===n.colSpan&&n.offsetLeft<=e&&n.offsetWidth+n.offsetLeft>e)return i=n,!1})),p(t,i)},_moveFakeTable(e){this._moveFakeTableHorizontally(e),this.callBase()}}),_=t.VerticalHeadersArea=g.inherit({_getAreaClassName:()=>"dx-pivotgrid-vertical-headers",_applyCustomStyles(e){this.callBase(e),e.cellIndex===e.cellsCount-1&&e.classArray.push("dx-last-cell"),e.rowIndex===e.rowsCount-1&&e.cssArray.push("border-bottom: 0px"),e.cell.isWhiteSpace&&e.classArray.push("dx-white-space-column")},_getAreaName:()=>"row",setVirtualContentParams(e){this.callBase(e),this._setTableCss({top:e.top,left:0}),this._virtualContentHeight=e.height},hasScroll(){const e=this._virtualContent?this._virtualContentHeight:this._tableHeight,t=this.getGroupHeight();return!(!t||!e)&&e-t>=1},renderScrollable(){this._groupElement.dxScrollable({useNative:!1,useSimulatedScrollbar:!1,showScrollbar:"never",bounceEnabled:!1,direction:"vertical",updateManually:!0})},processScrollBarSpacing(e){const t=this.getGroupHeight();if(t&&this.setGroupHeight(t-e),this._scrollBarWidth&&this._groupElement.next().remove(),e){const t=(0,o.default)("<div>");(0,s.setWidth)(t,"100%"),(0,s.setHeight)(t,e-1),this._groupElement.after(t)}this._scrollBarWidth=e},getScrollPath(e){const t=this.tableElement();let i;return e-=parseInt(t[0].style.top,10)||0,(0,a.each)(t.find("tr"),((t,n)=>{const o=n.childNodes[n.childNodes.length-1];if(o&&1===o.rowSpan&&o.offsetTop<=e&&o.offsetHeight+o.offsetTop>e)return i=o,!1})),p(t,i)},_moveFakeTable(e){this._moveFakeTableTop(e),this.callBase()},_getRowClassNames(e,t,i){0!==e&t.expanded&&!i.includes(c)&&i.push(c)},_getMainElementMarkup(){const e=n.default.createElement("tbody");return e.classList.add(this._getAreaClassName()),e},_getCloseMainElementMarkup:()=>"</tbody>",updateColspans(e){const{rows:t}=this.tableElement()[0];let i=0;const n=[];if(!(this.getColumnsCount()-e>0))for(let o=0;o<t.length;o+=1)for(let a=0;a<t[o].cells.length;a+=1){const s=t[o].cells[a],{rowSpan:r}=s;n[o]&&(i-=n[o],n[o]=0);const l=e-(i+s.colSpan);a===t[o].cells.length-1&&l>0&&(s.colSpan+=l),n[o+r]=(n[o+r]||0)+s.colSpan,i+=s.colSpan}}});t.default={HorizontalHeadersArea:g,VerticalHeadersArea:_}},47825:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LocalStore=void 0;var n=f(i(80556)),o=i(63326),a=i(68216),s=f(i(30771)),r=i(89358),l=f(i(55620)),d=i(17781),u=i(31e3),c=f(i(71051)),h=i(87739),p=i(21274),g=i(11528),_=i(12062);function f(e){return e&&e.__esModule?e:{default:e}}const m=t.LocalStore=l.default.inherit(function(){const e={year:e=>e&&e.getFullYear(),quarter:e=>e&&Math.floor(e.getMonth()/3)+1,month:e=>e&&e.getMonth()+1,day:e=>e&&e.getDate(),dayOfWeek:e=>e&&e.getDay()};function t(e){return-1!==e.indexOf(".")?(0,u.compileGetter)(e):function(t){return t[e]}}function i(e){return function(t){let i=e(t);return!i||i instanceof Date||(i=c.default.deserializeDate(i)),i}}function l(n){(0,p.each)(n||[],((n,o)=>{let a,s;const{dataField:r}=o;let d;const{levels:u}=o;let c;if(!o.selector){if(c=r?t(r):function(e){return e},u&&l(u),"date"===o.dataType){s=e[o.groupInterval];const t=i(c);a=function(e){const i=t(e);return s?s(i):i}}else"number"===o.dataType?(d=(0,g.isNumeric)(o.groupInterval)&&o.groupInterval>0&&o.groupInterval,a=function(e){let t=c(e);return(0,g.isString)(t)&&(t=Number(t)),d?Math.floor(t/d)*d:t}):a=c;(0,_.setDefaultFieldValueFormatting)(o),(0,_.setFieldProperty)(o,"selector",a)}}))}function f(e,t,i,n,o){const a=t.dimensions[n],{expandedPathsHash:s}=t;let r,l;a&&(r=a.selector(t.data),l=function(e,t,i,n){let o=n[i];return o||(o={value:e,index:n.length++},n[i]=o,t.push(o)),o}(r,i,o=void 0!==o?o+"/./"+r:`${r}`,t.childrenHash),e.push(l.index),(s&&s[o]||a.expanded)&&(l.children||(l.children=[]),f(e,t,l.children,n+1,o)))}function m(e,t,i,n){const o=[0],a=t.headerName===n?t.path.length:0,s="rows"===n?t.rowExpandedPaths:t.columnExpandedPaths;return f(o,{data:e,childrenHash:i[`${n}Hash`],dimensions:t[n],expandedPathsHash:t.headerName!==n&&s&&s.hash},i[n],a),o}function v(e,t,i,n){const o=[];let a,s,r,l;const d=m(e,n,i,"rows"),u=m(e,n,i,"columns");for(s=0;s<d.length;s+=1)for(r=d[s],t[r]=t[r]||[],a=0;a<u.length;a+=1)l=u[a],o.push(t[r][l]=t[r][l]||[]);return o}function C(e){if(e){const t=e.hash={};e.forEach((e=>{const i=e.map((e=>`${e}`)).join("/./");t[i]=!0}))}}function y(e){e.rows=e.rows||[],e.columns=e.columns||[],e.filters=e.filters||[],C(e.columnExpandedPaths),C(e.rowExpandedPaths),l(e.columns),l(e.rows),l(e.values),l(e.filters)}function b(e){return"custom"===e.summaryType?(e.calculateCustomSummary=e.calculateCustomSummary||d.noop,{seed(){const t={summaryProcess:"start",totalValue:void 0};return e.calculateCustomSummary(t),t},step:(t,i)=>(t.summaryProcess="calculate",t.value=i,e.calculateCustomSummary(t),t),finalize:t=>(t.summaryProcess="finalize",delete t.value,e.calculateCustomSummary(t),t.totalValue)}):r.aggregators[e.summaryType]||r.aggregators.count}function x(e,t,i){for(let n=0;n<e.length;n+=1){const o=e[n],a=o.selector(i),s=b(o),r="function"==typeof s.seed;for(let e=0;e<t.length;e+=1){const i=t[e];i.length<=n&&(i[n]=r?s.seed():s.seed),void 0===i[n]?i[n]=a:(0,g.isDefined)(a)&&(i[n]=s.step(i[n],a))}}}function w(e,t){let i=e&&e.valueOf(),n=t&&t.valueOf();if(Array.isArray(e)){t=t||[];for(let o=0;o<e.length;o+=1)if(i=e[o]&&e[o].valueOf(),n=t[o]&&t[o].valueOf(),i!==n)return!1;return!0}return i===n}function S(e){const t=[];return(0,p.each)(e,((e,i)=>{const n=i.filterValues||[],{groupName:o}=i;if(o&&(0,g.isNumeric)(i.groupIndex))return;n.length&&t.push((function(e){const t=i.levels?function(e,t){const i=[];return(0,p.each)(e,((e,n)=>{i.push(n.selector(t))})),i}(i.levels,e):i.selector(e);let o=!1;for(let e=0;e<n.length;e+=1)if(w(n[e],t)){o=!0;break}return"exclude"===i.filterType?!o:o}))})),t}function D(e){const t=S(e.rows).concat(S(e.columns)).concat(S(e.filters)),i=e[e.headerName],{path:n}=e;return i&&t.push((e=>{let t;for(let o=0;o<n.length;o+=1)if(t=i[o].selector(e),(0,u.toComparable)(t,!0)!==(0,u.toComparable)(n[o],!0))return!1;return!0})),function(e){for(let i=0;i<t.length;i+=1)if(!t[i](e))return!1;return!0}}function I(e,t,i){const n={columns:[],rows:[],columnsHash:{length:1},rowsHash:{length:1}},o=[];let a,s;const r=new h.Deferred;let l=0;const d=D(t);return function u(){const c=new Date,h=l;for(;l<e.length;l+=1){if(l>h&&l%1e4==0&&new Date-c>=300)return i(l/e.length),void setTimeout(u,0);s=e[l],d(s)&&(a=v(s,o,n,t),x(t.values,a,s))}var g,_;g=t.values,_=o,(0,p.each)(g,((e,t)=>{const i=b(t);i.finalize&&(0,p.each)(_,((t,n)=>{(0,p.each)(n,((t,n)=>{n&&void 0!==n[e]&&(n[e]=i.finalize(n[e]))}))}))})),i(1),r.resolve({rows:n.rows,columns:n.columns,values:o,grandTotalRowIndex:0,grandTotalColumnIndex:0})}(),r}function E(e,t){let i=e.filter();return e.store()instanceof o.CustomStore&&i?(i=P(i,t),(0,s.default)(e.items()).filter(i).toArray()):e.items()}function T(e,t,i){const o=new h.Deferred,a=function(i){e.store()instanceof n.default&&(i.storeLoadOptions.filter=P(i.storeLoadOptions.filter,t))};if(e.on("customizeStoreLoadOptions",a),!e.isLoaded()||i){const n=i?e.load():e.reload();(0,h.when)(n).done((()=>{T(e,t).done((()=>{o.resolve(E(e,t))})).fail(o.reject)})).fail(o.reject)}else o.resolve(E(e,t));return o.always((()=>{e.off("customizeStoreLoadOptions",a)}))}function A(e,n){n.forEach((n=>{if(n.dataField&&"date"===n.dataType){const o=i(t(n.dataField));e[n.dataField]=function(e){return o(e)}}}))}function O(e){const t={};return Array.isArray(e)?A(t,e):e&&["rows","columns","filters"].forEach((i=>{e[i]&&A(t,e[i])})),t}function P(e,t){if(!Array.isArray(e))return e;e=e.slice(0),(0,g.isString)(e[0])&&(e[1]instanceof Date||e[2]instanceof Date)&&(e[0]=t[e[0]]);for(let i=0;i<e.length;i+=1)e[i]=P(e[i],t);return e}return{ctor(e){this._progressChanged=e.onProgressChanged||d.noop,this._dataSource=new a.DataSource(e),this._dataSource.paginate(!1)},getFields(e){const t=this._dataSource,i=new h.Deferred;return T(t,O(e)).done((t=>{i.resolve((0,_.discoverObjectFields)(t,e))})).fail(i.reject),i},key(){return this._dataSource.key()},load(e){const t=this,i=t._dataSource,n=new h.Deferred;return y(e),T(i,O(e),e.reload).done((i=>{(0,h.when)(I(i,e,t._progressChanged)).done(n.resolve)})).fail(n.reject),n},filter(){const e=this._dataSource;return e.filter.apply(e,arguments)},supportPaging:()=>!1,getDrillDownItems(e,t){t=t||{},y(e=e||{});const i=[],n=this._dataSource.items();let o;const{maxRowCount:a}=t,{customColumns:s}=t,r=D(e),l=D({rows:(0,_.getFiltersByPath)(e.rows,t.rowPath),columns:(0,_.getFiltersByPath)(e.columns,t.columnPath),filters:[]});for(let e=0;e<n.length;e+=1){if(l(n[e])&&r(n[e])){if(s){o={};for(let t=0;t<s.length;t+=1)o[s[t]]=n[e][s[t]]}else o=n[e];i.push(o)}if(a>0&&i.length===a)break}return i}}}()).include(_.storeDrillDownMixin);t.default={LocalStore:m}},16508:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PivotGrid=void 0;var n=i(64044),o=M(i(92774)),a=i(98834),s=M(i(4671)),r=M(i(92848)),l=i(61404),d=M(i(64553)),u=i(17781),c=i(87739),h=i(52576),p=i(21274),g=i(57653),_=i(54497),f=i(11528),m=i(3104),v=M(i(64973)),C=M(i(34378)),y=M(i(10720)),b=i(52071),x=M(i(11118)),w=M(i(53226)),S=i(67705),D=M(i(31045)),I=M(i(18509)),E=i(12867),T=i(62989),A=i(70317),O=i(2997),P=M(i(77195)),k=i(12062);function M(e){return e&&e.__esModule?e:{default:e}}const R=(0,m.getWindow)(),L="dx-area-data-cell",B="dx-area-row-cell",V="dx-area-column-cell",F="dx-area-description-cell",H="dx-pivotgrid-border",N="dx-pivotgrid",z="dx-bottom-border",W="dx-area-fields",$="dx-incompressible-fields",G="dx-overflow-hidden",j="<tr>",U="<td>",K="<div>",Z=["allowSorting","allowSortingBySummary","allowFiltering","allowExpandAll"];function q(e){let t=0;return(0,p.each)(e,((e,i)=>{t+=i||0})),t}function Y(e,t){const i=t/e.length;for(let t=0;t<e.length;t+=1)e[t]-=i}function X(e){e.off("scroll").off("stop")}function Q(e,t){const i="width"===t?["borderLeftWidth","borderRightWidth"]:["borderTopWidth","borderBottomWidth"];let n=0;return(0,p.each)(e,((e,t)=>{const o=R.getComputedStyle(t.get(0));i.forEach((e=>{n+=parseFloat(o[e])||0}))})),n}const J=t.PivotGrid=x.default.inherit({_getDefaultOptions(){return(0,h.extend)(this.callBase(),{scrolling:{timeout:300,renderingThreshold:150,minTimeout:10,mode:"standard",useNative:"auto",removeInvisiblePages:!0,virtualRowHeight:50,virtualColumnWidth:100,loadTwoPagesOnStart:!0},encodeHtml:!0,dataSource:null,activeStateEnabled:!1,fieldChooser:{minWidth:250,minHeight:250,enabled:!0,allowSearch:!1,searchTimeout:500,layout:0,title:s.default.format("dxPivotGrid-fieldChooserTitle"),width:600,height:600,applyChangesMode:"instantly"},onContextMenuPreparing:null,allowSorting:!1,allowSortingBySummary:!1,allowFiltering:!1,allowExpandAll:!1,wordWrapEnabled:!0,fieldPanel:{showColumnFields:!0,showFilterFields:!0,showDataFields:!0,showRowFields:!0,allowFieldDragging:!0,visible:!1,texts:{columnFieldArea:s.default.format("dxPivotGrid-columnFieldArea"),rowFieldArea:s.default.format("dxPivotGrid-rowFieldArea"),filterFieldArea:s.default.format("dxPivotGrid-filterFieldArea"),dataFieldArea:s.default.format("dxPivotGrid-dataFieldArea")}},dataFieldArea:"column",export:{enabled:!1,fileName:"PivotGrid"},showRowTotals:!0,showRowGrandTotals:!0,showColumnTotals:!0,showColumnGrandTotals:!0,hideEmptySummaryCells:!0,showTotalsPrior:"none",rowHeaderLayout:"standard",loadPanel:{enabled:!0,text:s.default.format("Loading"),width:200,height:70,showIndicator:!0,indicatorSrc:"",showPane:!0},texts:{grandTotal:s.default.format("dxPivotGrid-grandTotal"),total:s.default.getFormatter("dxPivotGrid-total"),noData:s.default.format("dxDataGrid-noDataText"),showFieldChooser:s.default.format("dxPivotGrid-showFieldChooser"),expandAll:s.default.format("dxPivotGrid-expandAll"),collapseAll:s.default.format("dxPivotGrid-collapseAll"),sortColumnBySummary:s.default.getFormatter("dxPivotGrid-sortColumnBySummary"),sortRowBySummary:s.default.getFormatter("dxPivotGrid-sortRowBySummary"),removeAllSorting:s.default.format("dxPivotGrid-removeAllSorting"),exportToExcel:s.default.format("dxDataGrid-exportToExcel"),dataNotAvailable:s.default.format("dxPivotGrid-dataNotAvailable")},onCellClick:null,onCellPrepared:null,showBorders:!1,stateStoring:{enabled:!1,storageKey:null,type:"localStorage",customLoad:null,customSave:null,savingTimeout:2e3},onExpandValueChanging:null,renderCellCountLimit:2e4,onExporting:null,headerFilter:{width:252,height:325,allowSelectAll:!0,showRelevantValues:!1,search:{enabled:!1,timeout:500,editorOptions:{},mode:"contains"},texts:{emptyValue:s.default.format("dxDataGrid-headerFilterEmptyValue"),ok:s.default.format("dxDataGrid-headerFilterOK"),cancel:s.default.format("dxDataGrid-headerFilterCancel")}}})},_updateCalculatedOptions(e){const t=this;(0,p.each)(e,((e,i)=>{(0,p.each)(Z,((e,n)=>{const o=i._initProperties&&n in i._initProperties&&void 0===i._initProperties[n];(void 0===i[n]||o)&&(0,k.setFieldProperty)(i,n,t.option(n))}))}))},_getDataControllerOptions(){const e=this;return{component:e,dataSource:e.option("dataSource"),texts:e.option("texts"),showRowTotals:e.option("showRowTotals"),showRowGrandTotals:e.option("showRowGrandTotals"),showColumnTotals:e.option("showColumnTotals"),showTotalsPrior:e.option("showTotalsPrior"),showColumnGrandTotals:e.option("showColumnGrandTotals"),dataFieldArea:e.option("dataFieldArea"),rowHeaderLayout:e.option("rowHeaderLayout"),hideEmptySummaryCells:e.option("hideEmptySummaryCells"),onFieldsPrepared(t){e._updateCalculatedOptions(t)}}},_initDataController(){const e=this;e._dataController&&e._dataController.dispose(),e._dataController=new I.default.DataController(e._getDataControllerOptions()),(0,m.hasWindow)()&&e._dataController.changed.add((()=>{e._render()})),e._dataController.scrollChanged.add((t=>{e._scrollLeft=t.left,e._scrollTop=t.top})),e._dataController.loadingChanged.add((()=>{e._updateLoading()})),e._dataController.progressChanged.add(e._updateLoading.bind(e)),e._dataController.dataSourceChanged.add((()=>{e._trigger("onChanged")}));const t=e.option("onExpandValueChanging");t&&e._dataController.expandValueChanging.add((e=>{t(e)}))},_init(){const e=this;e.callBase(),e._initDataController(),w.default.logHeaderFilterDeprecatedWarningIfNeed(this),e._scrollLeft=e._scrollTop=null,e._initActions()},_initActions(){const e=this;e._actions={onChanged:e._createActionByOption("onChanged"),onContextMenuPreparing:e._createActionByOption("onContextMenuPreparing"),onCellClick:e._createActionByOption("onCellClick"),onExporting:e._createActionByOption("onExporting"),onCellPrepared:e._createActionByOption("onCellPrepared")}},_trigger(e,t){this._actions[e](t)},_optionChanged(e){const t=this;if(Z.includes(e.name)){const e=this.getDataSource().fields();this._updateCalculatedOptions(e)}switch(e.name){case"dataSource":case"allowSorting":case"allowFiltering":case"allowExpandAll":case"allowSortingBySummary":case"scrolling":case"stateStoring":t._initDataController(),t._fieldChooserPopup.hide(),t._renderFieldChooser(),t._invalidate();break;case"texts":case"showTotalsPrior":case"showRowTotals":case"showRowGrandTotals":case"showColumnTotals":case"showColumnGrandTotals":case"hideEmptySummaryCells":case"dataFieldArea":t._dataController.updateViewOptions(t._getDataControllerOptions());break;case"useNativeScrolling":case"encodeHtml":case"renderCellCountLimit":case"onExpandValueChanging":break;case"rtlEnabled":t.callBase(e),t._renderFieldChooser(),t._renderContextMenu(),(0,m.hasWindow)()&&t._renderLoadPanel(t._dataArea.groupElement(),t.$element()),t._invalidate();break;case"export":t._renderDescriptionArea();break;case"onCellClick":case"onContextMenuPreparing":case"onExporting":case"onExported":case"onFileSaving":case"onCellPrepared":t._actions[e.name]=t._createActionByOption(e.name);break;case"fieldChooser":t._renderFieldChooser(),t._renderDescriptionArea();break;case"loadPanel":(0,m.hasWindow)()&&("loadPanel.enabled"===e.fullName?(clearTimeout(this._hideLoadingTimeoutID),t._renderLoadPanel(t._dataArea.groupElement(),t.$element())):(t._renderLoadPanel(t._dataArea.groupElement(),t.$element()),t._invalidate()));break;case"fieldPanel":t._renderDescriptionArea(),t._invalidate();break;case"headerFilter":t._renderFieldChooser(),t._invalidate();break;case"showBorders":t._tableElement().toggleClass(H,!!e.value),t.updateDimensions();break;case"wordWrapEnabled":t._tableElement().toggleClass("dx-word-wrap",!!e.value),t.updateDimensions();break;case"rowHeaderLayout":t._tableElement().find(`.${B}`).toggleClass("dx-area-tree-view","tree"===e.value),t._dataController.updateViewOptions(t._getDataControllerOptions());break;case"height":case"width":t._hasHeight=null,t.callBase(e),t.resize();break;default:t.callBase(e)}},_updateScrollPosition(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=this;let a,s;const r=o._scrollTop||o._scrollLeft;o._scrollUpdating||(o._scrollUpdating=!0,t&&!t.hasScroll()&&o._hasHeight&&(o._scrollTop=null),e&&!e.hasScroll()&&(o._scrollLeft=null),(null!==o._scrollTop||null!==o._scrollLeft||r||o.option("rtlEnabled"))&&(a=o._scrollTop||0,s=o._scrollLeft||0,i.scrollTo({left:s,top:a},n),e.scrollTo({left:s},n),t.scrollTo({top:a},n),o._dataController.updateWindowScrollPosition(o._scrollTop)),o._scrollUpdating=!1)},_subscribeToEvents(e,t,i){const n=this;(0,p.each)([e,t,i],((o,a)=>{!function(e,t){X(e),e.on("scroll",t).on("stop",t)}(a,(o=>function(o,a){const{scrollOffset:s}=o,r=a._getScrollable(),l="vertical"!==r.option("direction")?s.left:n._scrollLeft,d="horizontal"!==r.option("direction")&&n._hasHeight?s.top:n._scrollTop;(n._scrollLeft||0)===(l||0)&&(n._scrollTop||0)===(d||0)||(n._scrollLeft=l,n._scrollTop=d,n._updateScrollPosition(e,t,i),"virtual"===n.option("scrolling.mode")&&n._dataController.setViewportPosition(n._scrollLeft,n._scrollTop))}(o,a)))})),!n._hasHeight&&n._dataController.subscribeToWindowScrollEvents(i.groupElement())},_clean:u.noop,_needDelayResizing(e){return e.length*(e.length?e[0].length:0)>this.option("renderCellCountLimit")},_renderFieldChooser(){const e=this,t=e._pivotGridContainer,i=e.option("fieldChooser")||{},n="onDemand"===i.applyChangesMode?[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:s.default.format("OK"),onClick(){e._fieldChooserPopup.$content().dxPivotGridFieldChooser("applyChanges"),e._fieldChooserPopup.hide()}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:s.default.format("Cancel"),onClick(){e._fieldChooserPopup.hide()}}}]:[],o={layout:i.layout,texts:i.texts||{},dataSource:e.getDataSource(),allowSearch:i.allowSearch,searchTimeout:i.searchTimeout,width:void 0,height:void 0,headerFilter:e.option("headerFilter"),encodeHtml:e.option("fieldChooser.encodeHtml")??e.option("encodeHtml"),applyChangesMode:i.applyChangesMode,onContextMenuPreparing(t){e._trigger("onContextMenuPreparing",t)}},a={shading:!1,title:i.title,width:i.width,height:i.height,showCloseButton:!0,resizeEnabled:!0,minWidth:i.minWidth,minHeight:i.minHeight,toolbarItems:n,onResize(e){e.component.$content().dxPivotGridFieldChooser("updateDimensions")},onShown(t){e._createComponent(t.component.content(),T.FieldChooser,o)},onHidden(e){const t=e.component.$content().dxPivotGridFieldChooser("instance");t.resetTreeView(),t.cancelChanges()}};e._fieldChooserPopup?(e._fieldChooserPopup.option(a),e._fieldChooserPopup.$content().dxPivotGridFieldChooser(o)):e._fieldChooserPopup=e._createComponent((0,d.default)(K).addClass("dx-fieldchooser-popup").appendTo(t),y.default,a)},_renderContextMenu(){const e=this,t=e._pivotGridContainer;e._contextMenu&&e._contextMenu.$element().remove(),e._contextMenu=e._createComponent((0,d.default)(K).appendTo(t),C.default,{onPositioning(t){const{event:i}=t;if(t.cancel=!0,!i)return;const n=i.target.cellIndex>=0?i.target:(0,d.default)(i.target).closest("td").get(0);if(!n)return;const o=e._createEventArgs(n,i),a=e._getContextMenuItems(o);a&&(t.component.option("items",a),t.cancel=!1)},onItemClick(e){e.itemData.onItemClick&&e.itemData.onItemClick(e)},cssClass:N,target:e.$element()})},_getContextMenuItems(e){const t=this;let i=[];const n=t.option("texts");if("row"===e.area||"column"===e.area){const o=e[`${e.area}Fields`],a=e["column"===e.area?"rowFields":"columnFields"],s=e.cell.path&&o[e.cell.path.length-1],r=t.getDataSource();if(s&&s.allowExpandAll&&e.cell.path.length<e[`${e.area}Fields`].length&&!r.paginate()&&(i.push({beginGroup:!0,icon:"none",text:n.expandAll,onItemClick(){r.expandAll(s.index)}}),i.push({text:n.collapseAll,icon:"none",onItemClick(){r.collapseAll(s.index)}})),e.cell.isLast&&!r.paginate()){let t=0;(0,p.each)(a,((o,a)=>{a.allowSortingBySummary&&(0,p.each)(e.dataFields,((o,s)=>{if((0,f.isDefined)(e.cell.dataIndex)&&e.cell.dataIndex!==o)return;const l=!(0,f.isDefined)(e.cell.dataIndex)&&e.dataFields.length>1,d="column"===e.area?n.sortColumnBySummary:n.sortRowBySummary,u=(0,k.findField)(e.dataFields,a.sortBySummaryField)===o&&(e.cell.path||[]).join("/")===(a.sortBySummaryPath||[]).join("/"),c=(0,_.format)(d,l?`${a.caption} - ${s.caption}`:a.caption);i.push({beginGroup:0===t,icon:u?"desc"===a.sortOrder?"sortdowntext":"sortuptext":"none",text:c,onItemClick(){r.field(a.index,{sortBySummaryField:s.name||s.caption||s.dataField,sortBySummaryPath:e.cell.path,sortOrder:"desc"===a.sortOrder?"asc":"desc"}),r.load()}}),t+=1}))})),(0,p.each)(a,((e,o)=>{if(o.allowSortingBySummary&&(0,f.isDefined)(o.sortBySummaryField))return i.push({beginGroup:0===t,icon:"none",text:n.removeAllSorting,onItemClick(){(0,p.each)(a,((e,t)=>{r.field(t.index,{sortBySummaryField:void 0,sortBySummaryPath:void 0,sortOrder:void 0})})),r.load()}}),!1}))}}if(t.option("fieldChooser.enabled")&&i.push({beginGroup:!0,icon:"columnchooser",text:n.showFieldChooser,onItemClick(){t._fieldChooserPopup.show()}}),t.option("export.enabled")&&i.push({beginGroup:!0,icon:"xlsxfile",text:n.exportToExcel,onItemClick(){t.exportTo()}}),e.items=i,t._trigger("onContextMenuPreparing",e),i=e.items,i&&i.length)return i},_createEventArgs(e,t){const i=this,n=i.getDataSource(),o={rowFields:n.getAreaFields("row"),columnFields:n.getAreaFields("column"),dataFields:n.getAreaFields("data"),event:t};return(a=(0,d.default)(e)).closest(`.${W}`).length||a.find(`.${W}`).length?(0,h.extend)(i._createFieldArgs(e),o):(0,h.extend)(i._createCellArgs(e),o);var a},_createFieldArgs(e){const t=(0,d.default)(e).children().data("field"),i={field:t};return(0,f.isDefined)(t)?i:{}},_createCellArgs(e){const t=(0,d.default)(e),i=e.cellIndex,{rowIndex:n}=e.parentElement,o=t.closest("table"),a=o.data("data"),s=a&&a[n]&&a[n][i];return{area:o.data("area"),rowIndex:n,columnIndex:i,cellElement:(0,l.getPublicElement)(t),cell:s}},_handleCellClick(e){const t=this,i=t._createEventArgs(e.currentTarget,e),{cell:n}=i;n&&(i.area||!i.rowIndex&&!i.columnIndex)&&(t._trigger("onCellClick",i),n&&!i.cancel&&(0,f.isDefined)(n.expanded)&&setTimeout((()=>{t._dataController[n.expanded?"collapseHeaderItem":"expandHeaderItem"](i.area,n.path)})))},_getNoDataText(){return this.option("texts.noData")},_renderNoDataText:w.default.renderNoDataText,_renderLoadPanel:w.default.renderLoadPanel,_updateLoading(e){const t=this,i=t._dataController.isLoading();if(!t._loadPanel)return;const n=t._loadPanel.option("visible");if(n||(t._startLoadingTime=new Date),i&&(e?new Date-t._startLoadingTime>=1e3&&t._loadPanel.option("message",`${Math.floor(100*e)}%`):t._loadPanel.option("message",t.option("loadPanel.text"))),clearTimeout(t._hideLoadingTimeoutID),n&&!i)t._hideLoadingTimeoutID=setTimeout((()=>{t._loadPanel.option("visible",!1),t.$element().removeClass(G)}));else{const e={visible:i};i&&(e.position=w.default.calculateLoadPanelPosition(t._dataArea.groupElement())),t._loadPanel.option(e),t.$element().toggleClass(G,!i)}},_renderDescriptionArea(){const e=this.$element(),t=e.find(`.${F}`),i=(0,d.default)(K).addClass("dx-pivotgrid-toolbar"),n=this.option("fieldPanel"),o=e.find(".dx-filter-header"),a=e.find(".dx-column-header");let s;s=n.visible&&n.showFilterFields?o:n.visible&&(n.showDataFields||n.showColumnFields)?a:t,a.toggleClass(z,!(!n.visible||!n.showDataFields&&!n.showColumnFields)),o.toggleClass(z,!(!n.visible||!n.showFilterFields)),t.toggleClass("dx-pivotgrid-background",n.visible&&(n.showDataFields||n.showColumnFields||n.showRowFields)),this.$element().find(".dx-pivotgrid-toolbar").remove(),i.prependTo(s);const r=(0,b.isFluent)((0,b.current)())?"text":"contained";if(this.option("fieldChooser.enabled")){const e=(0,d.default)(K).appendTo(i).addClass("dx-pivotgrid-field-chooser-button"),t={icon:"columnchooser",hint:this.option("texts.showFieldChooser"),stylingMode:r,onClick:()=>{this.getFieldChooserPopup().show()}};this._createComponent(e,v.default,t)}if(this.option("export.enabled")){const e=(0,d.default)(K).appendTo(i).addClass("dx-pivotgrid-export-button"),t={icon:"xlsxfile",hint:this.option("texts.exportToExcel"),stylingMode:r,onClick:()=>{this.exportTo()}};this._createComponent(e,v.default,t)}},_detectHasContainerHeight(){const e=this,t=e.$element();if((0,f.isDefined)(e._hasHeight)){const t=e.option("height")||e.$element().get(0).style.height;t&&e._hasHeight^"auto"!==t&&(e._hasHeight=null)}if((0,f.isDefined)(e._hasHeight)||t.is(":hidden"))return;e._pivotGridContainer.addClass("dx-hidden");const i=(0,d.default)(K);(0,g.setHeight)(i,66666),t.append(i),e._hasHeight=66666!==(0,g.getHeight)(t),e._pivotGridContainer.removeClass("dx-hidden"),i.remove()},_renderHeaders(e,t,i,n){const o=this,a=o.getDataSource();o._rowFields=o._rowFields||new O.FieldsArea(o,"row"),o._rowFields.render(e,a.getAreaFields("row")),o._columnFields=o._columnFields||new O.FieldsArea(o,"column"),o._columnFields.render(t,a.getAreaFields("column")),o._filterFields=o._filterFields||new O.FieldsArea(o,"filter"),o._filterFields.render(i,a.getAreaFields("filter")),o._dataFields=o._dataFields||new O.FieldsArea(o,"data"),o._dataFields.render(n,a.getAreaFields("data")),o.$element().dxPivotGridFieldChooserBase("instance").renderSortable()},_createTableElement(){const e=this,t=(0,d.default)("<table>").css({width:"100%"}).toggleClass(H,!!e.option("showBorders")).toggleClass("dx-word-wrap",!!e.option("wordWrapEnabled"));return o.default.on(t,(0,a.addNamespace)(n.name,"dxPivotGrid"),"td",e._handleCellClick.bind(e)),t},_renderDataArea(e){const t=this,i=t._dataArea||new D.default.DataArea(t);return t._dataArea=i,i.render(e,t._dataController.getCellsInfo()),i},_renderRowsArea(e){const t=this,i=t._rowsArea||new P.default.VerticalHeadersArea(t);return t._rowsArea=i,i.render(e,t._dataController.getRowsInfo()),i},_renderColumnsArea(e){const t=this,i=t._columnsArea||new P.default.HorizontalHeadersArea(t);return t._columnsArea=i,i.render(e,t._dataController.getColumnsInfo()),i},_initMarkup(){this.callBase.apply(this,arguments),this.$element().addClass(N)},_renderContentImpl(){const e=this;let t,i,n,o;const a=!e._pivotGridContainer;let s,r,l,u;o=!a&&e._tableElement(),o||(e.$element().addClass("dx-row-lines").addClass("dx-pivotgrid-fields-container"),e._pivotGridContainer=(0,d.default)(K).addClass("dx-pivotgrid-container"),e._renderFieldChooser(),e._renderContextMenu(),t=(0,d.default)(U).addClass(V),i=(0,d.default)(U).addClass(B),n=(0,d.default)(U).addClass(L),o=e._createTableElement(),u=(0,d.default)(U).addClass("dx-data-header"),l=(0,d.default)("<td>").attr("colspan","2").addClass("dx-filter-header"),r=(0,d.default)(U).addClass("dx-column-header"),s=(0,d.default)(U).addClass(F),(0,d.default)(j).append(l).appendTo(o),(0,d.default)(j).append(u).append(r).appendTo(o),(0,d.default)(j).append(s).append(t).appendTo(o),(0,d.default)(j).addClass("dx-bottom-row").append(i).append(n).appendTo(o),e._pivotGridContainer.append(o),e.$element().append(e._pivotGridContainer),"tree"===e.option("rowHeaderLayout")&&i.addClass("dx-area-tree-view")),e.$element().addClass(G),e._createComponent(e.$element(),A.FieldChooserBase,{dataSource:e.getDataSource(),encodeHtml:e.option("encodeHtml"),allowFieldDragging:e.option("fieldPanel.allowFieldDragging"),headerFilter:e.option("headerFilter"),visible:e.option("visible"),remoteSort:"virtual"===e.option("scrolling.mode")});const c=e._renderDataArea(n),h=e._renderRowsArea(i),p=e._renderColumnsArea(t);c.tableElement().prepend(p.headElement()),a&&(e._renderLoadPanel(c.groupElement().parent(),e.$element()),e._renderDescriptionArea(),h.renderScrollable(),p.renderScrollable(),c.renderScrollable()),[c,h,p].forEach((e=>{X(e)})),e._renderHeaders(s,r,l,u),e._update(a)},_update(e){const t=this,i=function(){t.updateDimensions()};t._needDelayResizing(t._dataArea.getData())&&e?setTimeout(i):i()},_fireContentReadyAction(){this._dataController.isLoading()||this.callBase()},getScrollPath(e){const t=this;return"column"===e?t._columnsArea.getScrollPath(t._scrollLeft):t._rowsArea.getScrollPath(t._scrollTop)},getDataSource(){return this._dataController.getDataSource()},getFieldChooserPopup(){return this._fieldChooserPopup},hasScroll(e){return"column"===e?this._columnsArea.hasScroll():this._rowsArea.hasScroll()},_dimensionChanged(){this.updateDimensions()},_visibilityChanged(e){e&&this.updateDimensions()},_dispose(){const e=this;clearTimeout(e._hideLoadingTimeoutID),e.callBase.apply(e,arguments),e._dataController&&e._dataController.dispose()},_tableElement(){return this.$element().find("table").first()},addWidgetPrefix:e=>`dx-pivotgrid-${e}`,resize(){this.updateDimensions()},isReady(){return this.callBase()&&!this._dataController.isLoading()},updateDimensions(){const e=this;let t;const i=e._tableElement();let n,o,a,s=0,r=0,l=0;const h=i.find(`.${L}`),_=i.find(`.${B}`),f=i.find(`.${V}`),v=i.find(`.${F}`),C=i.find(".dx-filter-header"),y=i.find(".dx-column-header"),b=e._rowFields,x=new c.Deferred;if(!(0,m.hasWindow)())return;const w=b.isVisible()&&"tree"!==e.option("rowHeaderLayout");e._detectHasContainerHeight(),e._dataArea.headElement().length||e._dataArea.tableElement().prepend(e._columnsArea.headElement()),w&&(e._rowsArea.updateColspans(b.getColumnsCount()),e._rowsArea.tableElement().prepend(b.headElement())),i.addClass($),e._dataArea.reset(),e._rowsArea.reset(),e._columnsArea.reset(),b.reset();const S=(e,t)=>t-e>=1,D=(e,t,i,n,o)=>i?e:t+(n?o:0);return(0,u.deferUpdate)((()=>{const m=e._rowsArea.getRowsHeight(),I=(0,g.getOuterHeight)(v[0],!0)+(w?m[0]:0);let E=0,T=0;if(e._hasHeight){E=(0,g.getHeight)(C);const t=i.find(".dx-data-header"),o=(0,g.getHeight)(t);n=Q([f,h,i,y,C],"height"),T=(0,g.getHeight)(e.$element())-E-o-(Math.max((0,g.getHeight)(e._dataArea.headElement()),(0,g.getHeight)(f),I)+n)}const A=e._dataArea.getScrollbarWidth(),O=(0,g.getHeight)(e._dataArea.tableElement())-(0,g.getHeight)(e._dataArea.headElement()),P=S(T,O);e._dataArea.tableElement().css({width:e._hasHeight&&P&&A?`calc(100% - ${A}px)`:"100%"});const M=e._dataArea.getColumnsWidth(),R=w?m.slice(1):m,L=e._dataArea.getRowsHeight(),B=e._dataController.getColumnsInfo().length,V=(0,k.mergeArraysByMaxValue)(R,L.slice(B)),F=L.slice(0,B),H=q(F),N=e._rowsArea.getColumnsWidth();if(s=(0,g.getWidth)(e._dataArea.tableElement()),r=q(V),!s||!r)return void x.resolve();l=q(N);const W=(0,g.getWidth)(e.$element());n=Q([_,h,i],"width"),t=W-l-n,t=t>0?t:s;const G=s-t;G>=0&&G<=2&&(Y(M,G),s=t),o=e._hasHeight&&S(T,r),a=S(t,s);const j=D(T,r,o,a,A);(0,u.deferRender)((()=>{if(e._columnsArea.tableElement().append(e._dataArea.headElement()),b.tableElement().append(e._rowsArea.headElement()),I>H&&(Y(F,H-I),e._columnsArea.setRowsHeight(F)),i.removeClass($),y.children().css("maxWidth",t),e._columnsArea.setGroupWidth(t),e._columnsArea.processScrollBarSpacing(o?A:0),e._columnsArea.setColumnsWidth(M),e._rowsArea.setGroupHeight(e._hasHeight?j:"auto"),e._rowsArea.processScrollBarSpacing(a?A:0),e._rowsArea.setColumnsWidth(N),e._rowsArea.setRowsHeight(V),e._dataArea.setColumnsWidth(M),e._dataArea.setRowsHeight(V),e._dataArea.setGroupWidth(t),e._dataArea.setGroupHeight(e._hasHeight?j:"auto"),w&&b.setColumnsWidth(N),h.toggleClass(z,!o),_.toggleClass(z,!o),!e._hasHeight&&W!==(0,g.getWidth)(e.$element())){const i=W-(0,g.getWidth)(e.$element());a||(Y(M,i),e._columnsArea.setColumnsWidth(M),e._dataArea.setColumnsWidth(M)),e._dataArea.setGroupWidth(t-i),e._columnsArea.setGroupWidth(t-i)}if(e._hasHeight&&e._filterFields.isVisible()&&(0,g.getHeight)(C)!==E){const t=(0,g.getHeight)(C)-E;if(t>0){o=S(T-t,r);const i=D(T-t,r,o,a,A);e._dataArea.setGroupHeight(i),e._rowsArea.setGroupHeight(i)}}const n=e.option("scrolling");"virtual"===n.mode&&e._setVirtualContentParams(n,M,V,t,j,e._hasHeight,l);const s=[];e._dataArea.updateScrollableOptions({direction:e._dataArea.getScrollableDirection(a,o),rtlEnabled:e.option("rtlEnabled")}),e._columnsArea.updateScrollableOptions({rtlEnabled:e.option("rtlEnabled")}),(0,p.each)([e._columnsArea,e._rowsArea,e._dataArea],((e,t)=>{s.push(t&&t.updateScrollable())})),e._updateLoading(),e._renderNoDataText(h),c.when.apply(d.default,s).done((()=>{e._updateScrollPosition(e._columnsArea,e._rowsArea,e._dataArea,!0),e._subscribeToEvents(e._columnsArea,e._rowsArea,e._dataArea),x.resolve()}))}))})),x},_setVirtualContentParams(e,t,i,n,o,a,s){const r=this._dataController.calculateVirtualContentParams({virtualRowHeight:e.virtualRowHeight,virtualColumnWidth:e.virtualColumnWidth,itemWidths:t,itemHeights:i,rowCount:i.length,columnCount:t.length,viewportWidth:n,viewportHeight:a?o:(0,g.getOuterHeight)(R)});this._dataArea.setVirtualContentParams({top:r.contentTop,left:r.contentLeft,width:r.width,height:r.height}),this._rowsArea.setVirtualContentParams({top:r.contentTop,width:s,height:r.height}),this._columnsArea.setVirtualContentParams({left:r.contentLeft,width:r.width,height:(0,g.getHeight)(this._columnsArea.groupElement())})},applyPartialDataSource(e,t,i){this._dataController.applyPartialDataSource(e,t,i)}}).inherit(E.ExportController).include(S.ChartIntegrationMixin);(0,r.default)("dxPivotGrid",J);t.default={PivotGrid:J}},12062:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateScrollbarWidth=void 0,t.capitalizeFirstLetter=V,t.createPath=I,t.default=void 0,t.discoverObjectFields=P,t.findField=w,t.foreachDataLevel=E,t.foreachTreeAsync=t.foreachTree=void 0,t.formatValue=S,t.getCompareFunction=D,t.getExpandedLevel=A,t.getFieldsDataType=k,t.getFiltersByPath=L,t.getScrollbarWidth=void 0,t.mergeArraysByMaxValue=T,t.sendRequest=v,t.setDefaultFieldValueFormatting=R,t.storeDrillDownMixin=t.setFieldProperty=void 0;var n=f(i(38662)),o=f(i(80556)),a=i(68216),s=f(i(64960)),r=f(i(78670)),l=f(i(13630)),d=i(31e3),u=i(87739),c=i(52576),h=i(21274),p=i(11528),g=f(i(2082)),_=i(58537);function f(e){return e&&e.__esModule?e:{default:e}}const m=function(e,t,i,n){const o=e._initProperties=e._initProperties||{},a=n?i:e[t];(!Object.prototype.hasOwnProperty.call(o,t)||n)&&"_initProperties"!==t&&(o[t]=a),e[t]=i};function v(e){return r.default.sendRequest(e)}t.setFieldProperty=m;let C=new Date;function y(e){const t=function(i,n,o,a,s,r){let l,d;function c(e,s,r){(0,u.when)(t(i,n,o,a,s,r)).done(e.resolve)}for(a=a||[],i=i||[],l=s=s||0;l<i.length;l+=1){if(e&&l>s&&l%1e4==0&&new Date-C>=300)return C=new Date,d=new u.Deferred,c(d,l,!1),d;const h=i[l];if(!r){if(a.unshift(h),o&&!1===n(a,l))return;if(h.children){const i=t(h.children,n,o,a);if(e&&i)return d=new u.Deferred,i.done(c(d,l,!0)),d}}if(r=!1,!o&&!1===n(a,l))return;a.shift(),i[l]!==h&&(l-=1)}};return t}const b=t.foreachTree=y(!1),x=t.foreachTreeAsync=y(!0);function w(e,t){if(e&&(0,p.isDefined)(t))for(let i=0;i<e.length;i+=1){const n=e[i];if(n.name===t||n.caption===t||n.dataField===t||n.index===t)return i}return-1}function S(e,t){const i={value:e,valueText:e==e&&g.default.format(e,t.format)||""};return t.customizeText?t.customizeText.call(t,i):i.valueText}function D(e){return function(t,i){let n=0;const o=e(t),a=e(i),s=(0,p.isDefined)(o),r=(0,p.isDefined)(a);return s&&r&&(o>a?n=1:o<a&&(n=-1)),s&&!r&&(n=1),!s&&r&&(n=-1),n}}function I(e){const t=[];for(let i=e.length-1;i>=0;i-=1)t.push(e[i].key||e[i].value);return t}function E(e,t,i,n){i=i||0,n=n||"children",e.length&&t(e,i);for(let o=0;o<e.length;o+=1){const a=e[o];a[n]&&a[n].length&&E(a[n],t,i+1,n)}}function T(e,t){const i=[];for(let n=0;n<e.length;n+=1)i.push(Math.max(e[n]||0,t[n]||0));return i}function A(e,t){const i=e[t];let n=0;const o=("columns"===t?e.columnExpandedPaths:e.rowExpandedPaths)||[];for(e.headerName===t?n=e.path.length:e.headerName&&e.headerName!==t&&e.oppositePath?n=e.oppositePath.length:(0,h.each)(o,((e,t)=>{n=Math.max(n,t.length)}));i[n+1]&&i[n].expanded;)n+=1;return n}function O(e,t,i,n){const o=[];return Object.keys(t||[]).forEach((a=>{if(a&&a.startsWith("__"))return;let s=1;const r=i.length?`${i}.${a}`:a;let l=n[r];const u=(0,d.compileGetter)(r);let g,_=t[a];for(;!(0,p.isDefined)(_)&&e[s];)_=u(e[s]),s+=1;var f;!l&&(0,p.isDefined)(_)&&(l=(0,p.type)(_)),g=[{dataField:r,dataType:l,groupName:"date"===l?a:void 0,groupInterval:void 0,displayFolder:i}],"date"===l?g=g.concat((f=g[0],(0,h.map)(["year","quarter","month"],((e,t)=>(0,c.extend)({},f,{groupInterval:e,groupIndex:t}))))):"object"===l&&(g=O(e,_,r,n)),o.push.apply(o,g)})),o}function P(e,t){const i=k(t);return O(e,e[0],"",i)}function k(e){const t={};return(0,h.each)(e,((e,i)=>{t[i.dataField]=t[i.dataField]||i.dataType})),t}const M={month:e=>n.default.getMonthNames()[e-1],quarter:e=>n.default.format(new Date(2e3,3*e-1),"quarter"),dayOfWeek:e=>n.default.getDayNames()[e]};function R(e){if("date"===e.dataType)e.format||m(e,"format",M[e.groupInterval]);else if("number"===e.dataType){const t=(0,p.isNumeric)(e.groupInterval)&&e.groupInterval>0&&e.groupInterval;t&&!e.customizeText&&m(e,"customizeText",(i=>{const n=i.value+t,o=g.default.format(n,e.format);return i.valueText&&o?`${i.valueText} - ${o}`:""}))}}function L(e,t){const i=[];t=t||[];for(let n=0;n<t.length;n+=1)i.push((0,c.extend)({},e[n],{groupIndex:null,groupName:null,filterType:"include",filterValues:[t[n]]}));return i}const B=t.storeDrillDownMixin={createDrillDownDataSource(e,t){const i=this.getDrillDownItems(e,t);function n(e){return function(t){let n;return n=new u.Deferred,(0,u.when)(i).done((i=>{new o.default(i)[e](t).done(n.resolve).fail(n.reject)})).fail(n.reject),n}}return new a.DataSource({load:n("load"),totalCount:n("totalCount"),key:this.key()})}};function V(e){return e.charAt(0).toUpperCase()+e.slice(1)}const F=e=>e.offsetWidth-e.clientWidth;t.getScrollbarWidth=F;const H=t.calculateScrollbarWidth=(0,l.default)((()=>{const e=s.default.getDocument();e.body.insertAdjacentHTML("beforeend",`<div class="${_.CLASSES.scrollBarMeasureElement}"></div>`);const t=e.body.lastElementChild,i=F(t);return t&&e.body.removeChild(t),i}));t.default={setFieldProperty:m,sendRequest:v,foreachTree:b,foreachTreeAsync:x,findField:w,formatValue:S,getCompareFunction:D,createPath:I,foreachDataLevel:E,mergeArraysByMaxValue:T,getExpandedLevel:A,discoverObjectFields:P,getFieldsDataType:k,setDefaultFieldValueFormatting:R,getFiltersByPath:L,storeDrillDownMixin:B,capitalizeFirstLetter:V,getScrollbarWidth:F,calculateScrollbarWidth:H}},81383:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RemoteStore=void 0;var n=i(68216),o=i(97169),a=g(i(55620)),s=g(i(71051)),r=i(87739),l=i(52576),d=i(21274),u=i(11528),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=p(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(12062)),h=i(84265);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(p=function(e){return e?i:t})(e)}function g(e){return e&&e.__esModule?e:{default:e}}function _(e,t){const i=[];return(0,d.each)(e,((n,o)=>{i.push({selector:o.dataField,groupInterval:o.groupInterval,desc:t&&"desc"===o.sortOrder,isExpanded:n<e.length-1})})),i}function f(e,t,i,n){return[[e,n?"<":">=",i],n?"or":"and",[e,n?">=":"<",i+t]]}function m(e,t){const i=function(e){let t=e.dataField,{groupInterval:i}=e;return"date"===e.dataType&&"string"==typeof i&&("quarter"===i.toLowerCase()&&(i="Month"),t=`${t}.${(0,c.capitalizeFirstLetter)(i)}`),t}(e),n="exclude"===e.filterType;let o=[i,n?"<>":"=",t];return(0,u.isDefined)(e.groupInterval)&&("string"==typeof e.groupInterval&&"quarter"===e.groupInterval.toLowerCase()?o=f(i,3,3*(t-1)+1,n):"number"==typeof e.groupInterval&&"date"!==e.dataType&&(o=f(i,e.groupInterval,t,n))),o}function v(e,t){const i=[];return e.searchValue?[e.dataField,"contains",e.searchValue]:(t="exclude"===e.filterType?t||"and":t||"or",(0,d.each)(e.filterValues,((n,o)=>{let a=[];if(Array.isArray(o)){e.levels&&e.levels.length&&(a=v({filterValues:o,filterType:e.filterType,levels:e.levels},"and"))}else{a=m(e.levels?e.levels[n]:e,o)}a.length&&(i.length&&i.push(t),i.push(a))})),i)}function C(e){let t=[];return(0,d.each)(e,((e,i)=>{const n=v(i);if(!n.length)return[];t.length&&t.push("and"),t.push(n)})),1===t.length&&(t=t[0]),t}function y(e,t){let i;const n=function(e){return e&&e.length};return i=n(e)&&n(t)?[e,"and",t]:n(e)?e:t,i}function b(e,t,i,n,o){e[i]=e[i]||[],e[i][n]=e[i][n]||[],(0,u.isDefined)(e[i][n][o])||(e[i][n][o]=t)}function x(e,t){return t&&"number"===t.dataType&&(0,u.isString)(e)?Number(e):!t||"date"!==t.dataType||t.groupInterval||e instanceof Date?e:s.default.deserializeDate(e)}function w(e){return(e||[]).filter((e=>e.filterValues&&e.filterValues.length||e.searchValue))}function S(e,t){if(e.headerName){if(t===e.headerName)return e.path.length;if(e.oppositePath)return e.oppositePath.length}return 0}function D(e,t,i,n){const o=[],a=i>n?0:n,s=e.headerName!==t?e[t].slice(a,i):[],r="rows"===t?e.rowExpandedPaths:e.columnExpandedPaths;return(0,d.each)(s,((e,t)=>{const n=[];(0,d.each)(r,((t,o)=>{if(o=o.slice(a,i),e<o.length){const t=o[e];n.includes(t)||n.push(t)}})),n.length&&o.push((0,l.extend)({},t,{filterType:"include",filterValues:n}))})),o}function I(e,t,i,n,o,a){const s=("columns"===t?e.columnExpandedPaths:e.rowExpandedPaths)||[],r="columns"===t?"rows":"columns",d=e[t],u=[];let c;if(s.length)for(let s=i;s<n+1;s+=1)c={filters:o.concat(D(e,t,s,a))},c[t]=d.slice(i,s+1),c[r]=[],u.push((0,l.extend)({},e,c));else c={filters:o},c[t]=d.slice(i,n+1),c[r]=[],u.push((0,l.extend)({},e,c));return u[0].includeTotalSummary=!0,u}function E(e){let t=0;return(0,d.each)(e,((e,i)=>{if(!i.expanded)return t=e,!1})),t}function T(e){const t=(0,c.getExpandedLevel)(e,"rows"),i=(0,c.getExpandedLevel)(e,"columns");let n=e.filters||[];const o=S(e,"columns"),a=E(e.columns),s=E(e.rows),r=S(e,"rows");let d=[];n=n.concat(w(e.rows)).concat(w(e.columns)).concat(function(e){return(0,c.getFiltersByPath)(e[e.headerName],e.path).concat((0,c.getFiltersByPath)(e["rows"===e.headerName?"columns":"rows"],e.oppositePath||[]))}(e));const u=I(e,"columns",o,i,n,a);if(e.rows.length&&e.columns.length){"rows"!==e.headerName&&(d=d.concat(u));for(let u=r;u<t+1;u+=1){const t=e.rows.slice(r,u+1),c=D(e,"rows",u,s);for(let s=o;s<i+1;s+=1){const i=(0,l.extend)({},e,{columns:e.columns.slice(o,s+1),rows:t,filters:n.concat(D(e,"columns",s,a)).concat(c)});d.push(i)}}}else d=e.columns.length?u:I(e,"rows",r,t,n,s);return d}function A(e){(0,d.each)(e||[],((e,t)=>{const{levels:i}=t;i&&A(i),(0,c.setDefaultFieldValueFormatting)(t)}))}const O=t.RemoteStore=a.default.inherit({ctor(e){this._dataSource=new n.DataSource(e),this._store=this._dataSource.store()},getFields(e){const t=new r.Deferred;return this._store.load({skip:0,take:20}).done((i=>{const n=(0,o.normalizeLoadResult)(i);t.resolve(c.default.discoverObjectFields(n.data,e))})).fail(t.reject),t},key(){return this._store.key()},load(e){const t=this,i=new r.Deferred,n={rows:[],columns:[],values:[],grandTotalRowIndex:0,grandTotalColumnIndex:0,rowHash:{},columnHash:{},rowIndex:1,columnIndex:1},a=T(e),s=[];return A(e.rows),A(e.columns),A(e.filters),(0,d.each)(a,((i,n)=>{s.push(t._store.load(function(e,t,i){let n=C(e.filters);const o=_(e.rows,e.rowTake).concat(_(e.columns,e.columnTake)),a={groupSummary:[],totalSummary:[],group:o.length?o:void 0,take:o.length?void 0:1};return e.rows.length&&e.rowTake?(a.skip=e.rowSkip,a.take=e.rowTake,a.requireGroupCount=!0):e.columns.length&&e.columnTake&&!i&&(a.skip=e.columnSkip,a.take=e.columnTake,a.requireGroupCount=!0),t&&(n=y(n,t)),n.length&&(a.filter=n),(0,d.each)(e.values,((t,i)=>{const n={selector:i.dataField,summaryType:i.summaryType||"count"};a.groupSummary.push(n),e.includeTotalSummary&&a.totalSummary.push(n)})),a}(n,t.filter(),e.rows.length)))})),r.when.apply(null,s).done((function(){const e=s.length>1?arguments:[arguments];(0,d.each)(e,((e,t)=>{const i=(0,o.normalizeLoadResult)(t[0],t[1]);!function(e,t,i,n){const o=[];let a=[];const{rowHash:s}=n,{columnHash:r}=n;if(t&&t.summary&&(0,d.each)(t.summary,((e,t)=>{b(n.values,t,n.grandTotalRowIndex,n.grandTotalColumnIndex,e)})),t&&t.groupCount>=0){const n=i.rows.length?i.rowSkip:i.columnSkip;(e=[...Array(n)].concat(e)).length=t.groupCount}function l(e,t,i,o,a){const s=n[`${t}Hash`];let r,l,d;const u=i.slice(0,o+1).join("/");let c;return void 0!==s[u]?d=s[u]:(d={value:x(e.key,a),index:n[`${t}Index`]++,displayText:e.displayText},c=i.slice(0,o).join("/"),o>0&&void 0!==s[c]?(r=s[c],l=r.children=r.children||[]):l=n[`${t}s`],l.push(d),s[u]=d),d}(0,h.forEachGroup)(e,((e,t)=>{const u=t>=i.rows.length?i.rows.length:t,c=t>=i.rows.length?t-i.rows.length:0;let h,p;if(t>=i.rows.length&&c>=i.columns.length)return;t<i.rows.length&&(a=[]),t>=i.rows.length?e?(a[c]=`${e.key}`,h=l(e,"column",a,c,i.columns[c]),p=s[o.slice(0,u+1).join("/")]):n.columns.push({}):e?(o[u]=`${e.key}`,p=l(e,"row",o,u,i.rows[u]),h=r[a.slice(0,c+1).join("/")]):n.rows.push({});const g=p&&p.index||n.grandTotalRowIndex,_=h&&h.index||n.grandTotalColumnIndex;(0,d.each)(e&&e.summary||[],((e,t)=>{b(n.values,t,g,_,e)}))}))}(i.data,i.extra,a[e],n)})),i.resolve({rows:n.rows,columns:n.columns,values:n.values,grandTotalRowIndex:n.grandTotalRowIndex,grandTotalColumnIndex:n.grandTotalColumnIndex})})).fail(i.reject),i},filter(){return this._dataSource.filter.apply(this._dataSource,arguments)},supportPaging:()=>!1,createDrillDownDataSource(e,t){e=e||{},t=t||{};const i=this._store,o=C((0,c.getFiltersByPath)(e.rows,t.rowPath).concat((0,c.getFiltersByPath)(e.columns,t.columnPath)).concat(w(e.rows)).concat(e.filters||[]).concat(w(e.columns)));return new n.DataSource({load:e=>i.load((0,l.extend)({},e,{filter:y(o,e.filter),select:t.customColumns}))})}});t.default={RemoteStore:O}},84265:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.forEachGroup=t.default=void 0;const i=function(e,t,n){e=e||[],n=n||0;for(let o=0;o<e.length;o+=1){const a=e[o];t(a,n),a&&a.items&&a.items.length&&i(a.items,t,n+1)}};t.forEachGroup=i;t.default={forEachGroup:i}},87691:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Sortable=void 0;var n=_(i(92774)),o=i(59144),a=i(98834),s=_(i(92848)),r=_(i(64960)),l=_(i(97832)),d=_(i(64553)),u=i(52576),c=i(21274),h=i(57653),p=i(11528),g=_(i(5080));function _(e){return e&&e.__esModule?e:{default:e}}const{getSwatchContainer:f}=g.default,m="dxSortable",v="dx-sortable-old";function C(e,t){let i;return(0,c.each)(t,(function(){(function(e,t,i){const n=(0,d.default)(e),o=n.offset();if(t>=o.left&&t<=o.left+(0,h.getOuterWidth)(n,!0)&&i>=o.top&&i<=o.top+(0,h.getOuterHeight)(n,!0))return!0})(this,e.pageX,e.pageY)&&(i=(0,d.default)(this))})),i}const y=t.Sortable=l.default.inherit({_getDefaultOptions(){return(0,u.extend)(this.callBase(),{onChanged:null,onDragging:null,itemRender:null,groupSelector:null,itemSelector:".dx-sort-item",itemContainerSelector:".dx-sortable-old",sourceClass:"dx-drag-source",dragClass:"dx-drag",targetClass:"dx-drag-target",direction:"vertical",allowDragging:!0,groupFilter:null,useIndicator:!1})},_renderItem(e,t){const i=this.option("itemRender");let n;return i?n=i(e,t):(n=e.clone(),n.css({width:(0,h.getWidth)(e),height:(0,h.getHeight)(e)})),n},_renderIndicator(e,t,i,n){const o=(0,h.getOuterHeight)(e,!0),a=(0,h.getOuterWidth)(e,!0),s=e.offset().top-i.offset().top,r=e.offset().left-i.offset().left;this._indicator.css({position:"absolute",top:n&&t?s+o:s,left:n&&!t?r+a:r}).toggleClass("dx-position-indicator-horizontal",!t).toggleClass("dx-position-indicator-vertical",!!t).toggleClass("dx-position-indicator-last",!!n).appendTo(i),(0,h.setHeight)(this._indicator,""),(0,h.setWidth)(this._indicator,""),t?(0,h.setWidth)(this._indicator,a):(0,h.setHeight)(this._indicator,o)},_renderDraggable(e){this._$draggable&&this._$draggable.remove(),this._$draggable=this._renderItem(e,"drag").addClass(this.option("dragClass")).appendTo(f(e)).css({zIndex:1e6,position:"absolute"})},_detachEventHandlers(){const e=[o.move,o.start,o.end,o.enter,o.leave,o.drop].join(" ");n.default.off(this._getEventListener(),(0,a.addNamespace)(e,m),void 0)},_getItemOffset(e,t,i){for(let s=0;s<t.length;s+=1){let r;const l=i.pageY<t[s].posVertical;if(e?r=l:l&&(n=i.pageX,o=t[s],a=this.option("rtlEnabled"),r=!(0,p.isDefined)(o.posHorizontal)||(a?n>o.posHorizontal:n<o.posHorizontal),!r&&t[s+1]&&t[s+1].posVertical>t[s].posVertical&&(r=!0)),r)return t[s]}var n,o,a},_getEventListener(){const e=this.option("groupSelector"),t=this.$element();return e?t.find(e):t},_attachEventHandlers(){const e=this,t=e.option("itemSelector"),i=e.option("itemContainerSelector"),s=e.option("groupSelector"),l=e.option("sourceClass"),u=e.option("targetClass"),p=e.option("onDragging"),g=e.option("groupFilter");let _,f,y,b,x,w;const S=e.$element();let D,I=null,E=-1;const T=function(){var e;null===(e=I)||void 0===e||e.dispose(),I=null};if(e._detachEventHandlers(),e.option("allowDragging")){const A=e._getEventListener();n.default.on(A,(0,a.addNamespace)(o.start,m),t,(i=>{_=(0,d.default)(i.currentTarget);const n=_.closest(s);w=n.attr("group"),f=function(e,t){let i=-1;const n=t.get(0);return(0,c.each)(e,((t,o)=>{const a=(0,d.default)(o);if(a.attr("item-group")&&a.attr("item-group")===e.eq(t-1).attr("item-group")||(i+=1),o===n)return!1})),i===e.length?-1:i}((s?n:S).find(t),_),_.attr("item-group")&&(_=n.find(`[item-group='${_.attr("item-group")}']`)),e._renderDraggable(_),y=e._renderItem(_,"target").addClass(u),_.addClass(l),x=[],(0,c.each)(_,((e,t)=>{x.push((0,d.default)(t).offset())})),D=function(){const t=r.default.getRootNode(e.$element().get(0));return s?g?(0,d.default)(t).find(s).filter(g):S.find(s):S}(),e._indicator=(0,d.default)("<div>").addClass("dx-position-indicator")})),n.default.on(A,(0,a.addNamespace)(o.move,m),(n=>{let o,a,s;if(!_)return;if(E=-1,e._indicator.detach(),(0,c.each)(e._$draggable,((e,t)=>{(0,d.default)(t).css({top:x[e].top+n.offset.y,left:x[e].left+n.offset.x})})),b&&b.removeClass(u),b=C(n,D),b&&function(){const e={sourceGroup:w,sourceIndex:f,sourceElement:_,targetGroup:b.attr("group"),targetIndex:b.find(t).index(y)};p&&p(e),e.cancel&&(b=void 0)}(),b&&I&&b.get(0)!==I.element().get(0)&&T(),I&&I.moveIfNeed(n),!b)return void y.detach();!I&&b.attr("allow-scrolling")&&(I=function(e){let t,i=e.scrollTop();const n=e.$element(),{top:o}=n.offset(),a=(0,h.getHeight)(n);let s=0;function r(e){i=e.scrollOffset.top}function l(){d(),e.scrollTo(i+=s),t=setTimeout(l,10)}function d(){clearTimeout(t)}return e.on("scroll",r),{moveIfNeed:function(e){if(e.pageY<=o+20)s=-2;else{if(!(e.pageY>=o+a-20))return s=0,void d();s=2}l()},element:()=>n,dispose(){d(),e.off("scroll",r)}}}(b.dxScrollable("instance"))),b.addClass(u);const r=b.find(i),g=r.find(t),m=b.closest(`.${v}`).data("dxSortableOld"),S=m.option("useIndicator"),A="vertical"===(m||e).option("direction"),O=function(e,t,i){const n=[];let o=[];for(let a=0;a<e.length;a+=o.length)if(o=e.eq(a),o.attr("item-group")&&(o=i.find(`[item-group='${o.attr("item-group")}']`)),o.is(":visible")){const e={item:o,index:n.length,posVertical:t?(o.last().offset().top+o.offset().top+(0,h.getOuterHeight)(o.last(),!0))/2:(0,h.getOuterHeight)(o.last(),!0)+o.last().offset().top,posHorizontal:t?void 0:((0,h.getOuterWidth)(o.last(),!0)+o.last().offset().left+o.offset().left)/2};n.push(e)}return n}(g,A,r),P=e._getItemOffset(A,O,n);if(P){if(o=P.item,s=O[P.index-1]&&O[P.index-1].item,o.hasClass(l)||s&&s.hasClass(l)&&s.is(":visible"))return void y.detach();if(E=P.index,!S)return void y.insertBefore(o);const t=b.attr("group")!==w,i=E===f,n=E===f+1;if(t)return void e._renderIndicator(o,A,b,e.option("rtlEnabled")&&!A);i||n||e._renderIndicator(o,A,b,e.option("rtlEnabled")&&!A)}else{if(a=g.last(),a.is(":visible")&&a.hasClass(l))return;r.length&&(E=O.length?O[O.length-1].index+1:0),S?g.length&&e._renderIndicator(a,A,b,!e.option("rtlEnabled")||A):y.appendTo(r)}})),n.default.on(A,(0,a.addNamespace)(o.end,m),(()=>{if(T(),!_)return;const t=e.option("onChanged"),i={sourceIndex:f,sourceElement:_,sourceGroup:w,targetIndex:E,removeSourceElement:!0,removeTargetElement:!1,removeSourceClass:!0};b&&(b.removeClass(u),i.targetGroup=b.attr("group"),(w!==i.targetGroup||E>-1)&&(t&&t(i),i.removeSourceElement&&_.remove())),e._indicator.detach(),i.removeSourceClass&&_.removeClass(l),_=null,e._$draggable.remove(),e._$draggable=null,i.removeTargetElement&&y.remove(),y.removeClass(u),y=null}))}},_init(){this.callBase(),this._attachEventHandlers()},_render(){this.callBase(),this.$element().addClass(v)},_dispose(){const e=this;e.callBase.apply(e,arguments),e._$draggable&&e._$draggable.detach(),e._indicator&&e._indicator.detach()},_optionChanged(e){const t=this;switch(e.name){case"onDragging":case"onChanged":case"itemRender":case"groupSelector":case"itemSelector":case"itemContainerSelector":case"sourceClass":case"targetClass":case"dragClass":case"allowDragging":case"groupFilter":case"useIndicator":t._attachEventHandlers();break;case"direction":break;default:t.callBase(e)}},_useTemplates:()=>!1});(0,s.default)("dxSortableOld",y);t.default={Sortable:y}},81221:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Cell=void 0,t.applyDisplaySummaryMode=w,t.applyRunningTotal=S,t.createMockSummaryCell=D,t.default=void 0,t.getExpression=b,t.summaryDictionary=void 0;var n=i(52576),o=i(11528),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=s(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var r=o?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(n,a,r):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(12062));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(s=function(e){return e?i:t})(e)}const r="column",l="row",d=null,u=function(e,t){let i=e/t;return(0,o.isDefined)(e)&&!isNaN(i)||(i=d),i},c=function(e,t){return u(e.value(),e.grandTotal(t).value())},h=function(e,t){const i=e.parent(t),n=i?i.value():e.value();return u(e.value(),n)},p=function(e){return function(t){const i=t.prev(r,e),n=i&&i.value();return(0,o.isDefined)(n)&&(0,o.isDefined)(t.value())?t.value()-n:d}},g=function(e){const t=p(e);return function(i){const n=t(i),o=i.prev(r,e),a=o&&o.value();return n!==d&&a?n/a:d}},_=t.summaryDictionary={percentOfColumnTotal:e=>h(e,l),percentOfRowTotal:e=>h(e,r),percentOfColumnGrandTotal:e=>c(e,l),percentOfRowGrandTotal:e=>c(e,r),percentOfGrandTotal:e=>c(e)},f=function(e,t){if(!e||!e.parent(t))return;let i=e.prev(t);return i||(i=f(e.parent(t),t)),i},m=e=>{if(!e.runningTotal)return;const t=e.runningTotal===r?l:r;return i=>{const n=e.allowCrossGroupCalculation?f(i,t):i.prev(t,!1),a=i.value(!0),s=i.value(!1),r=null==n?void 0:n.value(!0);switch(!0){case(0,o.isDefined)(a)&&(0,o.isDefined)(s)&&(0,o.isDefined)(r):return r+a;case(0,o.isDefined)(r):return r;default:return a}}};function v(e,t,i){let n={index:-1};if(!(0,o.isObject)(t))if(i.fields[t])t=i[t];else{const n=e.columns.concat(e.rows).concat(e.values),o=(0,a.findField)(n,t);t=i[t]=n[o]}if(t){const o=t.area||"data";n=i.positions[t.index]=i.positions[t.index]||{area:o,index:e["data"===o?"values":`${o}s`].indexOf(t)}}return n}function C(e){return e===l?"_rowPath":"_columnPath"}const y=function(e,t,i,n,o,a){this._columnPath=e,this._rowPath=t,this._fieldIndex=o,this._fieldsCache=a||{fields:{},positions:{}},this._data=i,this._descriptions=n;const s=i.values&&i.values[t[0].index]&&i.values[t[0].index][e[0].index];s&&(s.originalCell=s.originalCell||s.slice(),s.postProcessedFlags=s.postProcessedFlags||[],this._cell=s)};function b(e){const{summaryDisplayMode:t}=e,i=e.allowCrossGroupCalculation;let n=d;return(0,o.isFunction)(e.calculateSummaryValue)?n=e.calculateSummaryValue:t&&(n="absoluteVariation"===t?p(i):"percentVariation"===t?g(i):_[t],n&&!e.format&&-1!==t.indexOf("percent")&&a.default.setFieldProperty(e,"format","percent")),n}function x(e,t,i,n){const o=e.values[t][i]=e.values[t][i]||[],{originalCell:a}=o;a&&(!o.allowResetting&&n||(e.values[t][i]=a.slice()),e.values[t][i].allowResetting=n)}function w(e,t){const i=[],n=[{index:t.grandTotalColumnIndex,children:t.columns}],o=[{index:t.grandTotalRowIndex,children:t.rows}],s=e.values,r={fields:{},positions:{}};t.values=t.values||[],(0,a.foreachTree)(n,(e=>{e[0].isEmpty=[]}),!1),(0,a.foreachTree)(o,(o=>{const l=o[0];l.isEmpty=[],t.values[l.index]=t.values[l.index]||[],(0,a.foreachTree)(n,(n=>{const a=n[0];let d;x(t,l.index,a.index,!1);for(let u=0;u<s.length;u+=1){const c=s[u],h=i[u]=void 0===i[u]?b(c):i[u];if(d=!1,h){const i=new y(n,o,t,e,u,r),a=i.cell(),s=a[u]=h(i);a.postProcessedFlags[u]=!0,d=null==s}void 0===a.isEmpty[u]&&(a.isEmpty[u]=!0),void 0===l.isEmpty[u]&&(l.isEmpty[u]=!0),d||(l.isEmpty[u]=a.isEmpty[u]=!1)}}),!1)}),!1),t.isEmptyGrandTotalRow=o[0].isEmpty,t.isEmptyGrandTotalColumn=n[0].isEmpty}function S(e,t){const i=[],n=[{index:t.grandTotalColumnIndex,children:t.columns}],o=[{index:t.grandTotalRowIndex,children:t.rows}],s=e.values,r={fields:{},positions:{}};t.values=t.values||[],(0,a.foreachTree)(o,(o=>{const l=o[0];t.values[l.index]=t.values[l.index]||[],(0,a.foreachTree)(n,(n=>{const a=n[0];x(t,l.index,a.index,!0);for(let a=0;a<s.length;a+=1){const l=s[a],d=i[a]=void 0===i[a]?m(l):i[a];if(d){const i=new y(n,o,t,e,a,r),s=i.cell();s[a]=d(i),s.postProcessedFlags[a]=!0}}}),!1)}),!1)}function D(e,t,i){const n=new y([],[],{},e,0);return n.value=function(n){if((0,o.isDefined)(n)){const s=(0,a.findField)(t,n),r=t[s];i[s]||!r||(0,o.isDefined)(r.area)||(e.values.push(r),i[s]=!0)}},n.grandTotal=function(){return this},n.children=function(){return[]},n}t.Cell=y,y.prototype=(0,n.extend)(y.prototype,{_getPath(e){return this[C(e)]},_getDimension(e){return e=e===l?"rows":"columns",this._descriptions[e]},_createCell(e){const t=this;return new y(e._columnPath||t._columnPath,e._rowPath||t._rowPath,t._data,t._descriptions,t._fieldIndex)},parent(e){const t=this._getPath(e).slice(),i={};return t.shift(),t.length?(i[C(e)]=t,this._createCell(i)):d},children(e){const t=this._getPath(e).slice(),i=t[0],n=[],o={};if(i.children)for(let a=0;a<i.children.length;a+=1)o[C(e)]=[i.children[a]].concat(t.slice()),n.push(this._createCell(o));return n},grandTotal(e){const t={},i=this._rowPath,n=this._columnPath,o=this._getPath(e),a=C(e);return e?t[a]=[o[o.length-1]]:(t._rowPath=[i[i.length-1]],t._columnPath=[n[n.length-1]]),this._createCell(t)},next(e,t){const i=this._getPath(e),n=i[0];let o,a=this.parent(e);if(a){const t=i[1].children.indexOf(n);if(o=a.children(e),o[t+1])return o[t+1]}if(t&&a){do{a=a.next(e,t),o=a?a.children(e):[]}while(a&&!o.length);return o[0]||d}return d},prev(e,t){const i=this._getPath(e),n=i[0];let o,a=this.parent(e);if(a){const t=i[1].children.indexOf(n);if(o=a.children(e),o[t-1])return o[t-1]}if(t&&a){do{a=a.prev(e,t),o=a?a.children(e):[]}while(a&&!o.length);return o[o.length-1]||d}return d},cell(){return this._cell},field(e){if("data"===e)return this._descriptions.values[this._fieldIndex];const t=this._getPath(e);return this._getDimension(e)[t.length-2]||d},child(e,t){let i;const n=this.children(e);for(let o=0;o<n.length;o+=1)if(i=i||n[o].field(e),n[o].value(i)===t)return n[o];return d},slice(e,t){const i=this,n={},o=v(this._descriptions,e,this._fieldsCache),{area:a}=o,s=o.index;let u=d;const c=[];if(a===l||a===r){const e=this._getPath(a).slice(),o=-1!==s&&e.length-2-s;if(e[o]){c[e.length-1]=e[e.length-1];for(let i=o;i>=0;i-=1){if(e[i+1]){const n=e[i+1].children||[],a=i===o?t:e[i].value;e[i]=void 0;for(let t=0;t<n.length;t+=1)if(n[t].value===a){e[i]=n[t];break}}if(void 0===e[i])return u}n[C(a)]=e,u=i._createCell(n)}}return u},value(e,t){const i=this._cell;let n=this._fieldIndex;const a=!0===e||!1===e,s=a?d:e,r=a&&e||t;if((0,o.isDefined)(s)){const e=v(this._descriptions,s,this._fieldsCache);if(n=e.index,"data"!==e.area){const t=this._getPath(e.area),i=-1!==n&&t.length-2-n;return t[i]&&t[i].value}}return i&&i.originalCell?r?i[n]:i.originalCell[n]:d},isPostProcessed(e){let t=this._fieldIndex;if((0,o.isDefined)(e)){const i=v(this._descriptions,e,this._fieldsCache);if(t=i.index,"data"!==i.area)return!1}return!(!this._cell||!this._cell.postProcessedFlags[t])}});t.default={Cell:y,summaryDictionary:_,getExpression:b,applyRunningTotal:S,createMockSummaryCell:D,applyDisplaySummaryMode:w}},48063:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.XmlaStore=void 0;var n=i(64333),o=i(82812),a=f(i(55620)),s=f(i(64553)),r=i(17781),l=i(87739),d=i(52576),u=i(21274),c=i(54497),h=i(11528),p=i(3104),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=_(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(12062));function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(_=function(e){return e?i:t})(e)}function f(e){return e&&e.__esModule?e:{default:e}}const m=(0,p.getWindow)(),v=t.XmlaStore=a.default.inherit(function(){const e='<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis"><RequestType>{2}</RequestType><Restrictions><RestrictionList><CATALOG_NAME>{0}</CATALOG_NAME><CUBE_NAME>{1}</CUBE_NAME></RestrictionList></Restrictions><Properties><PropertyList><Catalog>{0}</Catalog>{3}</PropertyList></Properties></Discover></Body></Envelope>',t="Subset({0}, {1}, {2})",i="{{0}}",a="DX_MEASURES";function p(e,t){const i=new l.Deferred,{beforeSend:n}=e,a={url:e.url,dataType:"text",data:t,headers:{"Content-Type":"text/xml"},xhrFields:{},method:"POST"};return(0,h.isFunction)(n)&&n(a),g.default.sendRequest(a).fail((function(){i.reject(arguments)})).done((e=>{const t=new m.DOMParser;let n;try{try{n=t.parseFromString(e,"text/xml")}catch(e){n=void 0}if(!n||n.getElementsByTagName("parsererror").length||0===n.childNodes.length)throw o.errors.Error("E4023",e)}catch(t){i.reject({statusText:t.message,stack:t.stack,responseText:e})}i.resolve(n)})),i}function _(){const e=(0,n.getLanguageId)();return void 0!==e?(0,c.format)("<LocaleIdentifier>{0}</LocaleIdentifier>",e):""}function f(e){return`${e.hierarchyName||e.dataField}.[All]`}function v(e){let t=`${e.dataField}.allMembers`,{searchValue:i}=e;return i&&(i=i.replace(/'/g,"''"),t=`Filter(${t}, instr(${e.dataField}.currentmember.member_caption,'${i}') > 0)`),t}function C(e){const t=e.join(",");return e.length>1?(0,c.format)("CrossJoin({0})",t):t}function y(e,t,n,o,a,s,r,l){const d=[],u=s[r],h=[];let p,g,_;for(let s=o;s<=t;s+=1){const t=u[s],{dataField:r}=t,C=u[s-1]&&u[s-1].hierarchyName,{hierarchyName:y}=t,b=!y||!u[s+1]||u[s+1].hierarchyName!==y,x=e.length+n+o;if(p=null,h.push(t),s<e.length)b&&(p=`(${r}.${R(e[s],r)})`);else if(s<=x)if(0===s&&0===n){const e=f(u[o]);p=y?`${e},${u[o].dataField}`:v(u[o])}else y?(_=R(a[a.length-1]),(b||s===x)&&(C===y?(a.length&&(g=u[a.length-1]),g&&g.hierarchyName===y||(g=u[s-1],_=""),m=g.dataField,p=`Descendants({${_||m}}, ${r}, SELF_AND_BEFORE)`):p=v(t))):p=v(t);else{(!y||C!==y)&&(p=`(${f(t)})`)}if(p){if(p=(0,c.format)(i,p),l){const e=(t.hierarchyName||t.dataField)+("displayText"===t.sortBy?".MEMBER_CAPTION":".MEMBER_VALUE");p=(0,c.format)("Order({0}, {1}, {2})",p,e,"desc"===t.sortOrder?"DESC":"ASC")}d.push(p)}}var m;return C(d)}function b(e,t,i,n,o,a,s,r,l,d){let u=-1;const h=a[s];let p;do{u+=1,p=t.length+u+n;let h=y(t,i,u,n,o,a,s,l);l||d||(h=(0,c.format)("NonEmpty({0}, {1})",h,r)),e.push(h)}while(h[p]&&h[p+1]&&h[p].expanded)}function x(e,t,i,n){return i=i||`[DX_Set_${t.length}]`,n=n||"set",t.push((0,c.format)("{0} {1} as {2}",n,i,e)),i}function w(e,n,o,a,s){const r=e[n],l=[];let d=[],h=[],p=0,_=0;const f=[],m=(0,c.format)(i,o.join(","));if(r&&r.length){e.headerName===n?(d=e.path,p=d.length):e.headerName&&e.oppositePath?(d=e.oppositePath,p=d.length):h=("columns"===n?e.columnExpandedPaths:e.rowExpandedPaths)||h,_=(0,g.getExpandedLevel)(e,n),b(l,[],_,p,d,e,n,m,"rows"===n?e.rowTake:e.columnTake,e.totalsOnly),(0,u.each)(h,((t,i)=>{b(l,i,_,p,i,e,n,m)}));for(let e=_;e>=d.length;e-=1)r[e].hierarchyName&&(s.visibleLevels[r[e].hierarchyName]=s.visibleLevels[r[e].hierarchyName]||[],s.visibleLevels[r[e].hierarchyName].push(r[e].dataField))}if(l.length){let i=function(e){const t=e.join(",");return e.length>1?`Union(${t})`:t}(l);"rows"===n&&e.rowTake&&(i=(0,c.format)(t,i,e.rowSkip>0?e.rowSkip+1:0,e.rowSkip>0?e.rowTake:e.rowTake+1)),"columns"===n&&e.columnTake&&(i=(0,c.format)(t,i,e.columnSkip>0?e.columnSkip+1:0,e.columnSkip>0?e.columnTake:e.columnTake+1));const o=`[DX_${n}]`;f.push(x(i,a,o)),e.totalsOnly&&f.push(x(`COUNT(${o})`,a,`[DX_${n}_count]`,"member"))}return"columns"===n&&o.length&&!e.skipValues&&f.push(m),(0,c.format)("{0} DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME, MEMBER_VALUE ON {1}",C(f),n)}function S(e){const t=[];return(0,u.each)(e,((e,n)=>{const{dataField:o}=n,a=[],s=n.filterValues||[];let r;n.hierarchyName&&(0,h.isNumeric)(n.groupIndex)||((0,u.each)(s,((e,t)=>{let i=`${o}.${R(Array.isArray(t)?t[t.length-1]:t,o)}`;"exclude"===n.filterType&&(a.push(`${i}.parent`),i=`Descendants(${i})`),a.push(i)})),s.length&&(r=(0,c.format)(i,a.join(",")),"exclude"===n.filterType&&(r=`Except(${v(n)},${r})`),t.push(r)))})),t.length?C(t):""}function D(e,t,i,n,o,a,s){let r=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l="";const d=(t.length?`with ${t.join(" ")}`:"")+" ";if(e.length){let t;if(r.totalsOnly){const e=[];n.length&&e.push("[DX_rows_count]"),i.length&&e.push("[DX_columns_count]"),t=`{${e.join(",")}} on columns`}else t=e.join(",");l=d+(0,c.format)("SELECT {2} FROM {0} {1} CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS",function(e,t,i,n){let o=`[${n}]`;return(0,u.each)([e,t,i],((e,t)=>{t&&(o=(0,c.format)("(SELECT {0} FROM {1})",`${t}on 0`,o))})),o}(S(i),S(n),S(o||[]),s),a.length?(0,c.format)("WHERE ({0})",a.join(",")):"",t)}return l}function I(e,t){return(0,u.map)(t,(t=>((0,h.isString)(t.expression)&&x(t.expression,e,t.dataField,"member"),t.dataField)))}function E(e,t,i,n){(0,u.each)(n,((n,o)=>{const a=t[i][n];a.hierarchyName&&a.hierarchyName===t[i][n+1].hierarchyName||e.push(`${a.dataField}.${R(o,a.dataField)}`)}))}function T(e,t,i){const n=e.columns||[],o=e.rows||[],a=e.values&&e.values.length?e.values:[{dataField:"[Measures]"}],s=[],r=[],l=[],d=I(r,a);return i.measureCount=e.skipValues?1:a.length,i.visibleLevels={},e.headerName&&e.path&&E(s,e,e.headerName,e.path),e.headerName&&e.oppositePath&&E(s,e,"rows"===e.headerName?"columns":"rows",e.oppositePath),(n.length||d.length)&&l.push(w(e,"columns",d,r,i)),o.length&&l.push(w(e,"rows",d,r,i)),D(l,r,n,o,e.filters,s,t,e)}function A(e,t,i){(0,u.each)(i,((i,n)=>{const o=t[i];o.hierarchyName&&(t[i+1]||{}).hierarchyName===o.hierarchyName||e.push(`${o.dataField}.${R(n,o.dataField)}`)}))}function O(e){return parseInt(e,10)}function P(e,t){return k(function(e,t){return(e.getElementsByTagName(t)||[])[0]}(e,t))}function k(e){return e&&(e.textContent||e.text||e.innerHTML)||""}function M(e,t,i){const n=[];let a=[],s=0;const r=[],l=e.getElementsByTagName("Cell"),d={};for(let e=0;e<l.length;e+=1){const t=l[e],i=t.getElementsByTagName("Value")[0],n=i&&i.getElementsByTagName("Error")||[],o=0===n.length?k(i):"#N/A",a=parseFloat(o),s=o-a+1>0,u=O(t.getAttribute("CellOrdinal"));n.length&&(d[k(n[0].getElementsByTagName("ErrorCode")[0])]=k(n[0].getElementsByTagName("Description")[0])),r[u]={value:s?a:o||null}}return(0,u.each)(t[1],(()=>{const e=[];n.push(e),(0,u.each)(t[0],(()=>{0===s%i&&(a=[],e.push(a)),a.push(r[s]?r[s].value:null),s+=1}))})),Object.keys(d).forEach((e=>{o.errors.log("W4002",d[e])})),n}function R(e,t){if(e){const i=(0,h.isString)(e)&&(e.includes("&")||e.startsWith(`${t}.`));e=i?e:`[${e}]`,t&&0===e.indexOf(`${t}.`)&&(e=e.slice(t.length+1,e.length))}return e}function L(e,t,i,n){let o=e[t];return o||(o={},e[t]=o),!(0,h.isDefined)(o.value)&&i&&(o.text=i.caption,o.value=i.value,o.key=t||"",o.levelName=i.levelName,o.hierarchyName=i.hierarchyName,o.parentName=i.parentName,o.index=n,o.level=i.level),o}function B(e,t){const i=[],n=e.children&&(e.children.length?e.children:Object.keys(e.children.grandTotalHash||{}).reduce(((t,i)=>t.concat(e.children.grandTotalHash[i].children)),[])),o=n&&n[0];if(o&&(t[o.hierarchyName]&&t[o.hierarchyName].includes(o.levelName)||!t[o.hierarchyName]||0===o.level)){const e=n.filter((e=>e.hierarchyName===o.hierarchyName));return e.grandTotalHash=n.grandTotalHash,e}if(o)for(let e=0;e<n.length;e+=1)n[e].hierarchyName===o.hierarchyName&&i.push.apply(i,B(n[e],t));return i}function V(e,t,i,n){const o=[];(0,u.each)(t,((e,t)=>{let n={children:o};const a=(0,h.isDefined)(i)?Math.floor(e/i):e;(0,u.each)(t,((e,t)=>{n=function(e,t,i){let n=i.children=i.children||[];const o=n.hash=n.hash||{},a=n.grandTotalHash=n.grandTotalHash||{};t.parentName&&(n=(i=L(o,t.parentName)).children=i.children||[]);const s=L(o,t.name,t,e);return t.hasValue&&!s.added&&(s.index=e,s.added=!0,n.push(s)),i.value&&i.parentName||!t.parentName?a[i.name]&&delete a[t.parentName]:a[t.parentName]=i,s}(a,t,n)}))}));const a={children:o};a.children=B(a,n);const s=function(e,t){let i;if(1===e.children.length&&""===e.children[0].parentName){i=e.children[0].index;const{grandTotalHash:n}=e.children;e.children=e.children[0].children||[],e.children.grandTotalHash=n,e.children=B(e,t)}else 0===e.children.length&&(i=0);return i}(a,n);return(0,g.foreachTree)(a.children,(e=>{const t=e[0],i=B(t,n);i.length?t.children=i:delete t.children,delete t.levelName,delete t.hierarchyName,delete t.added,delete t.parentName,delete t.level}),!0),(0,u.each)(a.children||[],((t,i)=>{e.push(i)})),s}function F(e){const t=e.getElementsByTagName("soap:Fault"),i=e.getElementsByTagName("Fault"),n=(0,s.default)([].slice.call(i.length?i:t)).find("Error");if(n.length){const e=n.attr("Description"),t=o.errors.Error("E4000",e);return o.errors.log("E4000",e),t}return null}function H(e,t){const i={columns:[],rows:[]},{measureCount:n}=t,o=function(e,t){const i=[];for((0,u.each)(e.getElementsByTagName("Axis"),((e,n)=>{const o=n.getAttribute("name"),a=[];let s=0;0===o.indexOf("Axis")&&(0,h.isNumeric)(O(o.substr(4)))&&(i.push(a),(0,u.each)(n.getElementsByTagName("Tuple"),((e,n)=>{const o=n.childNodes;let r=0;const l=[];let d=t?o.length:o.length-1;1===i.length&&(d-=1),a.push(l);for(let e=d;e>=0;e-=1){const t=o[e],i=O(P(t,"LNum"));l[e]={caption:P(t,"Caption"),value:(u=P(t,"MEMBER_VALUE"),(0,h.isNumeric)(u)?parseFloat(u):u),level:i,index:s++,hasValue:!(r||!i&&0!==e),name:P(t,"UName"),hierarchyName:o[e].getAttribute("Hierarchy"),parentName:P(t,"PARENT_UNIQUE_NAME"),levelName:P(t,"LName")},r+=i}var u})))}));i.length<2;)i.push([[{level:0}]]);return i}(e,t.skipValues);return i.grandTotalColumnIndex=V(i.columns,o[0],n,t.visibleLevels),i.grandTotalRowIndex=V(i.rows,o[1],void 0,t.visibleLevels),i.values=M(e,o,n),i}function N(e,t,i,n){const o=[],s="MEASURE"===t,r=s?"MEASUREGROUP_NAME":`${t}_DISPLAY_FOLDER`;return(0,u.each)(e.getElementsByTagName("row"),((e,l)=>{const d="LEVEL"===t?P(l,"HIERARCHY_UNIQUE_NAME"):void 0,u=P(l,"LEVEL_NUMBER");let c=P(l,r);if(s&&(c=n[c]||c),("0"!==u||"true"!==P(l,`${t}_IS_VISIBLE`))&&"2"!==P(l,"DIMENSION_TYPE")){const e=s?a:P(l,"DIMENSION_UNIQUE_NAME"),n=P(l,`${t}_UNIQUE_NAME`);o.push({dimension:i.names[e]||e,groupIndex:u?O(u)-1:void 0,dataField:n,caption:P(l,`${t}_CAPTION`),hierarchyName:d,groupName:d,displayFolder:c,isMeasure:s,isDefault:!!i.defaultHierarchies[n]})}})),o}function z(e){const t=(e=e.replace(/_x(....)_/g,((e,t)=>String.fromCharCode(parseInt(t,16))))).match(/\[.+?\]/gi);return t&&t.length&&(e=t[t.length-1]),e.replace(/\[/gi,"").replace(/\]/gi,"").replace(/\$/gi,"").replace(/\./gi," ")}function W(e,t){return t=(0,s.default)("<div>").text(t).html(),p(e,(0,c.format)('<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><Execute xmlns="urn:schemas-microsoft-com:xml-analysis"><Command><Statement>{0}</Statement></Command><Properties><PropertyList><Catalog>{1}</Catalog><ShowHiddenCubes>True</ShowHiddenCubes><SspropInitAppName>Microsoft SQL Server Management Studio</SspropInitAppName><Timeout>3600</Timeout>{2}</PropertyList></Properties></Execute></Body></Envelope>',t,e.catalog,_()))}return{ctor(e){this._options=e},getFields(){const t=this._options,{catalog:i}=t,{cube:n}=t,o=_(),r=p(t,(0,c.format)(e,i,n,"MDSCHEMA_DIMENSIONS",o)),d=p(t,(0,c.format)(e,i,n,"MDSCHEMA_MEASURES",o)),h=p(t,(0,c.format)(e,i,n,"MDSCHEMA_HIERARCHIES",o)),g=p(t,(0,c.format)(e,i,n,"MDSCHEMA_LEVELS",o)),f=new l.Deferred;return(0,l.when)(r,d,h,g).then(((r,l,d,h)=>{p(t,(0,c.format)(e,i,n,"MDSCHEMA_MEASUREGROUPS",o)).done((e=>{const t=function(e){const t={names:{},defaultHierarchies:{}};return(0,u.each)((0,s.default)(e).find("row"),(function(){const e=(0,s.default)(this),i="2"===e.children("DIMENSION_TYPE").text()?a:e.children("DIMENSION_UNIQUE_NAME").text();t.names[i]=e.children("DIMENSION_CAPTION").text(),t.defaultHierarchies[e.children("DEFAULT_HIERARCHY").text()]=!0})),t}(r),i=N(d,"HIERARCHY",t),n=N(h,"LEVEL",t),o=function(e){const t={};return(0,u.each)(e.getElementsByTagName("row"),((e,i)=>{t[P(i,"MEASUREGROUP_NAME")]=P(i,"MEASUREGROUP_CAPTION")})),t}(e),c=N(l,"MEASURE",t,o).concat(i),p={};(0,u.each)(n,((e,t)=>{p[t.hierarchyName]=p[t.hierarchyName]||[],p[t.hierarchyName].push(t)})),(0,u.each)(i,((e,t)=>{p[t.dataField]&&p[t.dataField].length>1&&(t.groupName=t.hierarchyName=t.dataField,c.push.apply(c,p[t.hierarchyName]))})),f.resolve(c)})).fail(f.reject)})).fail(f.reject),f},load(e){const t=new l.Deferred,i=this._options,n={skipValues:e.skipValues},o=T(e,i.cube,n);let a;(e.rowSkip||e.rowTake||e.columnTake||e.columnSkip)&&(a=T((0,d.extend)({},e,{totalsOnly:!0,rowSkip:null,rowTake:null,columnSkip:null,columnTake:null}),i.cube,{}));const s=()=>{o?(0,l.when)(W(i,o),a&&W(i,a)).done(((i,o)=>{const a=F(i)||o&&F(o);if(a)t.reject(a);else{const a=H(i,n);o&&function(e,t,i){const n=[],o=t.columns||[],a=t.rows||[];o.length&&n.push({}),a.length&&n.push({});const s=M(i,[[{}],[{},{}]],1);if(!o.length&&a.length&&(e.rowCount=Math.max(s[0][0][0]-1,0)),!a.length&&o.length&&(e.columnCount=Math.max(s[0][0][0]-1,0)),a.length&&o.length&&(e.rowCount=Math.max(s[0][0][0]-1,0),e.columnCount=Math.max(s[1][0][0]-1,0)),void 0!==e.rowCount&&t.rowTake){e.rows=[...Array(t.rowSkip)].concat(e.rows),e.rows.length=e.rowCount;for(let t=0;t<e.rows.length;t+=1)e.rows[t]=e.rows[t]||{}}if(void 0!==e.columnCount&&t.columnTake){e.columns=[...Array(t.columnSkip)].concat(e.columns),e.columns.length=e.columnCount;for(let t=0;t<e.columns.length;t+=1)e.columns[t]=e.columns[t]||{}}}(a,e,o),t.resolve(a)}})).fail(t.reject):t.resolve({columns:[],rows:[],values:[],grandTotalColumnIndex:0,grandTotalRowIndex:0})};return e.delay?setTimeout(s,e.delay):s(),t},supportPaging:()=>!0,getDrillDownItems(e,t){const i=new l.Deferred,n=this._options,o=function(e,t,i){const n=e.columns||[],o=e.rows||[],a=[],s=[],r=[],l=I(s,e.values&&e.values.length?e.values:[{dataField:"[Measures]"}]),{maxRowCount:d}=i,u=i.customColumns||[],c=u.length>0?` return ${u.join(",")}`:"";A(a,n,i.columnPath||[]),A(a,o,i.rowPath||[]),(n.length||l.length)&&r.push([`${l[i.dataIndex]||l[0]} on 0`]);const h=D(r,s,n,o,e.filters,a,t);return h?`drillthrough${d>0?` maxrows ${d}`:""}${h}${c}`:h}(e,n.cube,t);return o?(0,l.when)(W(n,o)).done((e=>{const t=F(e);t?i.reject(t):i.resolve(function(e){const t=e.getElementsByTagName("row"),i=[],n={};for(let e=0;e<t.length;e+=1){const o=t[e].childNodes,a={};for(let e=0;e<o.length;e+=1){const{tagName:t}=o[e];a[n[t]=n[t]||z(t)]=k(o[e])}i.push(a)}return i}(e))})).fail(i.reject):i.resolve([]),i},key:r.noop,filter:r.noop}}()).include(g.storeDrillDownMixin);t.default={XmlaStore:v}},46331:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TreeListDataController=void 0;var n=i(17781),o=i(87739),a=i(52576),s=i(32688),r=d(i(39051)),l=d(i(99477));function d(e){return e&&e.__esModule?e:{default:e}}class u extends s.DataController{_getDataSourceAdapter(){return r.default}_getNodeLevel(e){let t=-1;for(;e.parent;)e.visible&&t++,e=e.parent;return t}_generateDataItem(e,t){return{rowType:"data",node:e,key:e.key,data:e.data,isExpanded:this.isRowExpanded(e.key,t),level:this._getNodeLevel(e)}}_loadOnOptionChange(){this._dataSource.load()}_isItemEquals(e,t){return e.isSelected===t.isSelected&&((!e.node||!t.node||e.node.hasChildren===t.node.hasChildren)&&(e.level===t.level&&e.isExpanded===t.isExpanded&&super._isItemEquals.apply(this,arguments)))}_isCellChanged(e,t,i,n,o){return n===this._columnsController.getFirstDataColumnIndex()&&e.isSelected!==t.isSelected||super._isCellChanged.apply(this,arguments)}init(){this.createAction("onRowExpanding"),this.createAction("onRowExpanded"),this.createAction("onRowCollapsing"),this.createAction("onRowCollapsed"),super.init.apply(this,arguments)}keyOf(e){const t=this._dataSource;if(t)return t.keyOf(e)}key(){const e=this._dataSource;if(e)return e.getKeyExpr()}publicMethods(){return super.publicMethods().concat(["expandRow","collapseRow","isRowExpanded","getRootNode","getNodeByKey","loadDescendants","forEachNode"])}changeRowExpand(e){if(this._dataSource){const t={key:e},i=this.isRowExpanded(e);if(this.executeAction(i?"onRowCollapsing":"onRowExpanding",t),!t.cancel)return this._dataSource.changeRowExpand(e).done((()=>{this.executeAction(i?"onRowCollapsed":"onRowExpanded",t)}))}return(new o.Deferred).resolve()}isRowExpanded(e,t){return this._dataSource&&this._dataSource.isRowExpanded(e,t)}expandRow(e){return this.isRowExpanded(e)?(new o.Deferred).resolve():this.changeRowExpand(e)}collapseRow(e){return this.isRowExpanded(e)?this.changeRowExpand(e):(new o.Deferred).resolve()}getRootNode(){return this._dataSource&&this._dataSource.getRootNode()}optionChanged(e){switch(e.name){case"rootValue":case"parentIdExpr":case"itemsExpr":case"filterMode":case"expandNodesOnFiltering":case"autoExpandAll":case"hasItemsExpr":case"dataStructure":this._columnsController.reset(),this._items=[],this._refreshDataSource(),e.handled=!0;break;case"expandedRowKeys":case"onNodesInitialized":!this._dataSource||this._dataSource._isNodesInitializing||(0,n.equalByValue)(e.value,e.previousValue)||this._loadOnOptionChange(),e.handled=!0;break;case"maxFilterLengthInRequest":e.handled=!0;break;default:super.optionChanged(e)}}getNodeByKey(e){if(this._dataSource)return this._dataSource.getNodeByKey(e)}getChildNodeKeys(e){if(this._dataSource)return this._dataSource.getChildNodeKeys(e)}loadDescendants(e,t){if(this._dataSource)return this._dataSource.loadDescendants(e,t)}forEachNode(){this._dataSource.forEachNode.apply(this,arguments)}}t.TreeListDataController=u,l.default.registerModule("data",{defaultOptions:()=>(0,a.extend)({},s.dataControllerModule.defaultOptions(),{itemsExpr:"items",parentIdExpr:"parentId",rootValue:0,dataStructure:"plain",expandedRowKeys:[],filterMode:"withAncestors",expandNodesOnFiltering:!0,autoExpandAll:!1,onNodesInitialized:null,maxFilterLengthInRequest:1500,paging:{enabled:!1}}),controllers:{data:u}})},39051:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=m(i(80556)),o=i(43792),a=m(i(30771)),s=m(i(66177)),r=i(17781),l=i(31e3),d=i(87739),u=i(52576),c=i(21274),h=i(11528),p=m(i(35185)),g=m(i(3120)),_=m(i(53226)),f=m(i(99477));function m(e){return e&&e.__esModule?e:{default:e}}const{queryByOptions:v}=s.default,C=e=>"fullBranch"===e.option("filterMode"),y=(e,t)=>v((0,a.default)(e),{sort:t}).toArray();class b extends g.default{_createKeyGetter(){const e=this.getKeyExpr();return(0,l.compileGetter)(e)}_createKeySetter(){const e=this.getKeyExpr();return(0,h.isFunction)(e)?e:(0,l.compileSetter)(e)}createParentIdGetter(){return(0,l.compileGetter)(this.option("parentIdExpr"))}createParentIdSetter(){const e=this.option("parentIdExpr");return(0,h.isFunction)(e)?e:(0,l.compileSetter)(e)}_createItemsGetter(){return(0,l.compileGetter)(this.option("itemsExpr"))}_createHasItemsGetter(){const e=this.option("hasItemsExpr");return e&&(0,l.compileGetter)(e)}_createHasItemsSetter(){const e=this.option("hasItemsExpr");return(0,h.isFunction)(e)?e:e&&(0,l.compileSetter)(e)}_updateIndexByKeyObject(e){const t=this;t._indexByKey={},(0,c.each)(e,((e,i)=>{t._indexByKey[i.key]=e}))}_calculateHasItems(e,t){const i=this,{parentIds:n}=t.storeLoadOptions;let o;const a=C(i);return i._hasItemsGetter&&(n||!t.storeLoadOptions.filter||a)&&(o=i._hasItemsGetter(e.data)),void 0===o&&(o=!(i._isChildrenLoaded[e.key]||!t.remoteOperations.filtering||!n&&!a)||(t.loadOptions.filter&&!t.remoteOperations.filtering&&a?e.children.length:e.hasChildren)),!!o}_fillVisibleItemsByNodes(e,t,i){for(let n=0;n<e.length;n++)e[n].visible&&i.push(e[n]),(this.isRowExpanded(e[n].key,t)||!e[n].visible)&&e[n].hasChildren&&e[n].children.length&&this._fillVisibleItemsByNodes(e[n].children,t,i)}_convertItemToNode(e,t,i){const n=this._keyGetter(e);let o=this._parentIdGetter(e);o=(0,h.isDefined)(o)?o:t;const a=i[o]=i[o]||{key:o,children:[]},s=i[n]=i[n]||{key:n,children:[]};return s.data=e,s.parent=a,s}_createNodesByItems(e,t){const i=this,n=i.option("rootValue"),o={},a=i._nodeByKey={};let s;if(t)for(s=0;s<t.length;s++)o[this._keyGetter(t[s])]=!0;for(s=0;s<e.length;s++){const r=i._convertItemToNode(e[s],n,a);if(void 0===r.key)return;r.visible=!t||!!o[r.key],r.parent&&r.parent.children.push(r)}const r=a[n]||{key:n,children:[]};return r.level=-1,r}_convertDataToPlainStructure(e,t,i){let n;if(this._itemsGetter&&!e.isConverted){i=i||[];for(let a=0;a<e.length;a++){const s=(0,o.createObjectWithChanges)(e[a]);n=this._keyGetter(s),void 0===n&&(n=i.length+1,this._keySetter(s,n)),this._parentIdSetter(s,void 0===t?this.option("rootValue"):t),i.push(s);const r=this._itemsGetter(s);if(r&&r.length){this._convertDataToPlainStructure(r,n,i);const e=this.option("itemsExpr");(0,h.isFunction)(e)||delete s[e]}}return i.isConverted=!0,i}return e}_createIdFilter(e,t){const i=[];for(let n=0;n<t.length;n++)i.push([e,"=",t[n]]);return _.default.combineFilters(i,"or")}_customizeRemoteOperations(e,t){super._customizeRemoteOperations.apply(this,arguments),e.remoteOperations.paging=!1;let i=!1;this.option("autoExpandAll")&&(e.remoteOperations.sorting=!1,e.remoteOperations.filtering=!1,this._lastLoadOptions&&(!t.filtering||e.storeLoadOptions.filter)||e.isCustomLoading||(i=!0)),e.isCustomLoading||(this._isReload=this._isReload||t.reload,e.cachedStoreData||(this._isChildrenLoaded={},this._isReload&&(this._nodeByKey={})),this.option("expandNodesOnFiltering")&&(t.filtering||this._isReload&&e.storeLoadOptions.filter)&&(e.storeLoadOptions.filter?i=!0:e.collapseVisibleNodes=!0)),e.expandVisibleNodes=i}_getParentIdsToLoad(e){const t=[];for(let i=0;i<e.length;i++){const n=this.getNodeByKey(e[i]);(!n||n.hasChildren&&!n.children.length)&&t.push(e[i])}return t}_handleCustomizeStoreLoadOptions(e){const t=this.option("rootValue"),i=this.option("parentIdExpr");let{parentIds:n}=e.storeLoadOptions;if(n&&(e.isCustomLoading=!1),super._handleCustomizeStoreLoadOptions.apply(this,arguments),e.remoteOperations.filtering&&!e.isCustomLoading&&(C(this)&&e.cachedStoreData||!e.storeLoadOptions.filter)){const o=e.collapseVisibleNodes?[]:this.option("expandedRowKeys");n=[t].concat(o).concat(n||[]);const a=e.data?this._getParentIdsToLoad(n):n;a.length&&(e.cachedPagingData=void 0,e.data=void 0,e.mergeStoreLoadData=!0,e.delay=this.option("loadingTimeout")),e.storeLoadOptions.parentIds=a,e.storeLoadOptions.filter=this._createIdFilter(i,a)}}_generateInfoToLoad(e,t){const i=this;let n;const o={},a={},s=[],r=i.option("rootValue");let l;for(l=0;l<e.length;l++)n=t?i._parentIdGetter(e[l]):i._keyGetter(e[l]),o[n]=!0;for(l=0;l<e.length;l++){n=t?i._keyGetter(e[l]):i._parentIdGetter(e[l]);const d=t?i.isRowExpanded(n):n!==r;o[n]||a[n]||!d||(a[n]=!0,s.push(n))}return{keyMap:a,keys:s}}_loadParentsOrChildren(e,t,i){var o,s;let r,l;const{keys:c,keyMap:h}=this._generateInfoToLoad(e,i),p=new d.Deferred,g=t.remoteOperations.filtering,_=this.option("maxFilterLengthInRequest"),f=(null===(o=t.storeLoadOptions)||void 0===o?void 0:o.sort)??(null===(s=t.loadOptions)||void 0===s?void 0:s.sort);let m=g?t.storeLoadOptions:t.loadOptions;const v=t=>(g&&(this._cachedStoreData=y(this._cachedStoreData.concat(t),f)),y(e.concat(t),f));if(!c.length)return p.resolve(e);let C=c.map((e=>this.getNodeByKey(e))).filter((e=>e&&e.data));if(C.length===c.length&&(i&&(C=C.reduce(((e,t)=>e.concat(t.children)),[])),C.length))return this._loadParentsOrChildren(v(C.map((e=>e.data))),t,i);const b=i?this.option("parentIdExpr"):this.getKeyExpr();r=this._createIdFilter(b,c);encodeURI(JSON.stringify(r)).length>_&&(r=e=>h[i?this._parentIdGetter(e):this._keyGetter(e)],l=g),m=(0,u.extend)({},m,{filter:l?null:r});const x=t.fullData?new n.default(t.fullData):this._dataSource.store();return this.loadFromStore(m,x).done((n=>{n.length?(l&&(n=(0,a.default)(n).filter(r).toArray()),this._loadParentsOrChildren(v(n),t,i).done(p.resolve).fail(p.reject)):p.resolve(e)})).fail(p.reject),p}_loadParents(e,t){return this._loadParentsOrChildren(e,t)}_loadChildrenIfNeed(e,t){return C(this)?this._loadParentsOrChildren(e,t,!0):(0,d.when)(e)}_updateHasItemsMap(e){const{parentIds:t}=e.storeLoadOptions;if(t)for(let e=0;e<t.length;e++)this._isChildrenLoaded[t[e]]=!0}_getKeyInfo(){return{key:()=>"key",keyOf:e=>e.key}}_processChanges(e){let t=[];return e.forEach((e=>{"insert"===e.type?t=t.concat(this._applyInsert(e)):"remove"===e.type?t=t.concat(this._applyRemove(e)):"update"===e.type&&t.push({type:e.type,key:e.key,data:{data:e.data}})})),t}_handleChanging(e){super._handleChanging.apply(this,arguments);e.postProcessChanges=e=>{const t=e.filter((e=>"update"===e.type));return this._processChanges(t)}}_applyBatch(e){const t=this._processChanges(e);super._applyBatch(t)}_setHasItems(e,t){const i=this._hasItemsSetter;e.hasChildren=t,i&&e.data&&i(e.data,t)}_applyInsert(e){const t=this,i=[],n=t.parentKeyOf(e.data),o=t.getNodeByKey(n);if(o){const n=t.option("rootValue"),a=t._convertItemToNode(e.data,n,t._nodeByKey);if(a.hasChildren=!1,a.level=o.level+1,a.visible=!0,o.children.push(a),t._isChildrenLoaded[a.key]=!0,t._setHasItems(o,!0),(!o.parent||t.isRowExpanded(o.key))&&void 0!==e.index){let n=t.items().indexOf(o)+1;n+=e.index>=0?Math.min(e.index,o.children.length):o.children.length,i.push({type:e.type,data:a,index:n})}}return i}_needToCopyDataObject(){return!1}_applyRemove(e){let t=[];const i=this.getNodeByKey(e.key),n=i&&i.parent;if(n){const o=n.children.indexOf(i);o>=0&&(n.children.splice(o,1),n.children.length||this._setHasItems(n,!1),t.push(e),t=t.concat(this.getChildNodeKeys(e.key).map((t=>({type:e.type,key:t})))))}return t}_handleDataLoaded(e){const t=e.data=this._convertDataToPlainStructure(e.data);!e.remoteOperations.filtering&&e.loadOptions.filter&&(e.fullData=v((0,a.default)(e.data),{sort:e.loadOptions&&e.loadOptions.sort}).toArray()),this._updateHasItemsMap(e),super._handleDataLoaded(e),t.isConverted&&this._cachedStoreData&&(this._cachedStoreData.isConverted=!0)}_fillNodes(e,t,i,n){const o=C(this);n=n||0;for(let a=0;a<e.length;a++){const s=e[a];let r=!1;this._fillNodes(e[a].children,t,i,n+1),s.level=n,s.hasChildren=this._calculateHasItems(s,t),s.visible&&s.hasChildren&&(o?s.children.filter((e=>e.visible)).length?r=!0:s.children.length&&f.default.foreachNodes(s.children,(e=>{e.visible=!0})):r=!0,t.expandVisibleNodes&&r&&i.push(s.key)),(s.visible||s.hasChildren)&&(s.parent.hasChildren=!0)}}_processTreeStructure(e,t){let{data:i}=e;const{parentIds:n}=e.storeLoadOptions,o=[];if(n&&n.length||this._isReload){if(e.fullData&&e.fullData.length>e.data.length&&(i=e.fullData,t=t||e.data),this._rootNode=this._createNodesByItems(i,t),!this._rootNode)return void(e.data=(new d.Deferred).reject(p.default.Error("E1046",this.getKeyExpr())));this._fillNodes(this._rootNode.children,e,o),this._isNodesInitializing=!0,(e.collapseVisibleNodes||o.length)&&this.option("expandedRowKeys",o),this._isReload=!1,this.executeAction("onNodesInitialized",{root:this._rootNode}),this._isNodesInitializing=!1}const a=[];this._fillVisibleItemsByNodes(this._rootNode.children,e,a),e.data=a,this._totalItemsCount=a.length}_handleDataLoadedCore(e){const t=this,{data:i}=e,n=e.storeLoadOptions.filter||e.loadOptions.filter,o=t.option("filterMode");let a;const{parentIds:s}=e.storeLoadOptions,r=n&&(!s||!s.length)&&"standard"!==o;if(!e.isCustomLoading){if(r){const n=e.data=new d.Deferred;return"matchOnly"===o&&(a=i),t._loadParents(i,e).done((i=>{t._loadChildrenIfNeed(i,e).done((i=>{e.data=i,t._processTreeStructure(e,a),super._handleDataLoadedCore.call(t,e),n.resolve(e.data)}))})).fail(n.reject)}t._processTreeStructure(e)}super._handleDataLoadedCore(e)}_handlePush(e){let{changes:t}=e;this._dataSource._reshapeOnPush&&!!t.length&&(this._isReload=!0),t.forEach((e=>{e.index??(e.index=-1)})),super._handlePush.apply(this,arguments)}init(e,t){super.init.apply(this,arguments);const i=this.option("dataStructure");this._keyGetter=this._createKeyGetter(),this._parentIdGetter=this.createParentIdGetter(),this._hasItemsGetter=this._createHasItemsGetter(),this._hasItemsSetter=this._createHasItemsSetter(),"tree"===i&&(this._itemsGetter=this._createItemsGetter(),this._keySetter=this._createKeySetter(),this._parentIdSetter=this.createParentIdSetter()),this._nodeByKey={},this._isChildrenLoaded={},this._totalItemsCount=0,this.createAction("onNodesInitialized")}getKeyExpr(){const e=this.store(),t=e&&e.key(),i=this.option("keyExpr");if((0,h.isDefined)(t)&&(0,h.isDefined)(i)&&!(0,r.equalByValue)(t,i))throw p.default.Error("E1044");return t||i||"id"}keyOf(e){return this._keyGetter&&this._keyGetter(e)}parentKeyOf(e){return this._parentIdGetter&&this._parentIdGetter(e)}getRootNode(){return this._rootNode}totalItemsCount(){return this._totalItemsCount+this._totalCountCorrection}isRowExpanded(e,t){if(t){let{isExpandedByKey:i}=t;if(!i){const e=this.option("expandedRowKeys")??[];i=t.isExpandedByKey={},e.forEach((e=>{i[e]=!0}))}return!!i[e]}return _.default.getIndexByKey(e,this.option("expandedRowKeys"),null)>=0}_changeRowExpandCore(e){const t=this.option("expandedRowKeys").slice(),i=_.default.getIndexByKey(e,t,null);i<0?t.push(e):t.splice(i,1),this.option("expandedRowKeys",t)}changeRowExpand(e){return this._changeRowExpandCore(e),this._isNodesInitializing?(new d.Deferred).resolve():this.load()}getNodeByKey(e){if(this._nodeByKey)return this._nodeByKey[e]}getNodeLeafKeys(){const e=this,t=[];return(e._rootNode?[e._rootNode.key]:[]).forEach((i=>{const n=e.getNodeByKey(i);n&&f.default.foreachNodes([n],(e=>{!e.children.length&&t.push(e.key)}))})),t}getChildNodeKeys(e){const t=this.getNodeByKey(e),i=[];return t&&f.default.foreachNodes(t.children,(e=>{i.push(e.key)})),i}loadDescendants(e,t){const i=this,n=new d.Deferred,o=i.remoteOperations();if(e=(0,h.isDefined)(e)?Array.isArray(e)?e:[e]:i.getNodeLeafKeys(),!o.filtering||!e.length)return n.resolve();const a=i._dataSource._createStoreLoadOptions();return a.parentIds=e,i.load(a).done((()=>{if(!t){const o=function(e,t){const i=[];return t.forEach((t=>{const n=e.getNodeByKey(t);n&&n.children.forEach((e=>{i.push(e.key)}))})),i}(i,e);if(o.length)return void i.loadDescendants(o,t).done(n.resolve).fail(n.reject)}n.resolve()})).fail(n.reject),n.promise()}forEachNode(){let e,t=[];if(1===arguments.length){e=arguments[0];const i=this.getRootNode();t=i&&i.children||[]}else 2===arguments.length&&(e=arguments[1],t=arguments[0],t=Array.isArray(t)?t:[t]);f.default.foreachNodes(t,e)}}let x=b;t.default={extend(e){x=e(x)},create:e=>new x(e)}},53343:function(e,t,i){i(16109);var n=h(i(4671)),o=h(i(64553)),a=i(87739),s=i(52576),r=i(11528),l=h(i(35185)),d=i(13876),u=h(i(53226)),c=h(i(99477));function h(e){return e&&e.__esModule?e:{default:e}}const p="dx-treelist-icon-container";class g extends d.editingModule.controllers.editing{_generateNewItem(e){const t=super._generateNewItem(e);return t.data={key:e},t.children=[],t.level=0,t.parentKey=this.option("rootValue"),t}_isProcessedItem(){return!0}_setInsertAfterOrBeforeKey(e,t){void 0!==t&&t!==this.option("rootValue")?e.insertAfterKey=t:super._setInsertAfterOrBeforeKey.apply(this,arguments)}_getLoadedRowIndex(e,t){const i=this._dataController.dataSource(),n=null==i?void 0:i.parentKeyOf(t.data);if(void 0!==n&&n!==this.option("rootValue")){const t=u.default.getIndexByKey(n,e);return t>=0&&this._dataController.isRowExpanded(n)?t+1:-1}return super._getLoadedRowIndex.apply(this,arguments)}_isEditColumnVisible(){const e=super._isEditColumnVisible.apply(this,arguments),t=this.option("editing");return e||t.allowAdding}_isDefaultButtonVisible(e,t){const i=super._isDefaultButtonVisible.apply(this,arguments),{row:n}=t;return"add"===e.name?this.allowAdding(t)&&n.rowIndex!==this._getVisibleEditRowIndex()&&!(n.removed||n.isNewRow):i}_getEditingButtons(e){const t=super._getEditingButtons.apply(this,arguments);return e.column.buttons||t.unshift(this._getButtonConfig("add",e)),t}_beforeSaveEditData(e){const t=super._beforeSaveEditData.apply(this,arguments);if(e&&"insert"!==e.type){var i;const e=null===(i=this._dataController)||void 0===i?void 0:i.store(),t=null==e?void 0:e.key();if(!(0,r.isDefined)(t))throw l.default.Error("E1045")}return t}addRowByRowIndex(e){const t=this._dataController.getVisibleRows()[e];return this.addRow(t?t.key:void 0)}addRow(e){return void 0===e&&(e=this.option("rootValue")),super.addRow.call(this,e)}_addRowCore(e,t,i){const n=this.option("rootValue"),o=this._dataController.dataSource().createParentIdGetter();if(void 0!==(t=o(e))&&t!==n&&!this._dataController.isRowExpanded(t)){const n=new a.Deferred;return this._dataController.expandRow(t).done((()=>{setTimeout((()=>{super._addRowCore.call(this,e,t,i).done(n.resolve).fail(n.reject)}))})).fail(n.reject),n.promise()}return super._addRowCore.call(this,e,t,i)}_initNewRow(e,t){return this._dataController.dataSource().createParentIdSetter()(e.data,t),super._initNewRow.apply(this,arguments)}allowAdding(e){return this._allowEditAction("allowAdding",e)}_needToCloseEditableCell(e){return super._needToCloseEditableCell.apply(this,arguments)||e.closest(`.${p}`).length&&this.isEditing()}getButtonLocalizationNames(){const e=super.getButtonLocalizationNames.apply(this);return e.add="dxTreeList-editingAddRowToNode",e}}c.default.registerModule("editing",{defaultOptions:()=>(0,s.extend)(!0,d.editingModule.defaultOptions(),{editing:{texts:{addRowToNode:n.default.format("dxTreeList-editingAddRowToNode")}}}),controllers:{editing:g},extenders:{controllers:{data:e=>class extends((0,d.dataControllerEditingExtenderMixin)(e)){changeRowExpand(){return this._editingController.refresh(),super.changeRowExpand.apply(this,arguments)}}},views:{rowsView:e=>class extends(d.editingModule.extenders.views.rowsView(e)){_renderCellCommandContent(e,t){const i=this._editingController,n=t.row&&i.isEditRow(t.row.rowIndex),o=t.isEditing||n;return!t.isOnForm&&!o&&super._renderCellCommandContent.apply(this,arguments)}validateClick(e){const t=(0,o.default)(e.event.target),i="dxdblclick"===e.event.type?super._rowDblClick:super._rowClick;return!t.closest(".dx-select-checkbox").length&&!this.needToCallOriginalClickHandler(e,i)}needToCallOriginalClickHandler(e,t){return!(0,o.default)(e.event.target).closest(`.${p}`).length&&(t.call(this,e),!0)}_rowClick(e){this.validateClick(e)&&super._rowClickTreeListHack.apply(this,arguments)}_rowDblClick(e){this.validateClick(e)&&super._rowDblClickTreeListHack.apply(this,arguments)}},headerPanel:d.editingModule.extenders.views.headerPanel}}})},84538:function(e,t,i){var n,o=i(11528),a=i(17798),s=(n=i(99477))&&n.__esModule?n:{default:n};class r extends a.ColumnsController{_getFirstItems(e){return super._getFirstItems(e).map((e=>e.data))}getFirstDataColumnIndex(){const e=this.getVisibleColumns(),t=e.length;let i=0;for(let n=0;n<=t-1;n++)if(!(0,o.isDefined)(e[n].command)){i=e[n].index;break}return i}}s.default.registerModule("columns",{defaultOptions:a.columnsControllerModule.defaultOptions,controllers:{columns:r}})},99477:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(52576),a=(n=i(74854))&&n.__esModule?n:{default:n};t.default=(0,o.extend)({},a.default,{modules:[],foreachNodes(e,t,i){for(let n=0;n<e.length;n++)!1!==t(e[n])&&(i||e[n].hasChildren)&&e[n].children.length&&this.foreachNodes(e[n].children,t,i)}})},4788:function(e,t,i){var n,o=i(87739),a=i(51628);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("focus",s({},a.focusModule,{extenders:s({},a.focusModule.extenders,{controllers:s({},a.focusModule.extenders.controllers,{data:e=>class extends(a.focusModule.extenders.controllers.data(e)){changeRowExpand(e){return this.option("focusedRowEnabled")&&this.isRowExpanded(e)&&this._isFocusedRowInside(e)&&this.option("focusedRowKey",e),super.changeRowExpand.apply(this,arguments)}_isFocusedRowInside(e){const t=this.option("focusedRowKey"),i=this.getRowIndexByKey(t),n=i>=0&&this.getVisibleRows()[i];let o=n&&n.node.parent;for(;o;){if(o.key===e)return!0;o=o.parent}return!1}getParentKey(e){const t=this._dataSource,i=this.getNodeByKey(e),n=new o.Deferred;return i?n.resolve(i.parent?i.parent.key:void 0):t.load({filter:[t.getKeyExpr(),"=",e]}).done((e=>{const i=e[0];i?n.resolve(t.parentKeyOf(i)):n.resolve()})).fail(n.reject),n.promise()}expandAscendants(e){const t=this,i=t._dataSource,n=new o.Deferred;return t.getParentKey(e).done((e=>{i&&void 0!==e&&e!==t.option("rootValue")?(i._isNodesInitializing=!0,t.expandRow(e),i._isNodesInitializing=!1,t.expandAscendants(e).done(n.resolve).fail(n.reject)):n.resolve()})).fail(n.reject),n.promise()}getPageIndexByKey(e){const t=this,i=t._dataSource,n=new o.Deferred;return t.expandAscendants(e).done((()=>{i.load({parentIds:[]}).done((i=>{const o=function(e,t){let i=-1;return e.forEach(((e,n)=>{t(e)&&(i=n)})),i}(i,(i=>t.keyOf(i.data)===e));let a=-1;o>=0&&(a=Math.floor(o/t.pageSize())),n.resolve(a)})).fail(n.reject)})).fail(n.reject),n.promise()}}})})}))},77188:function(e,t,i){var n,o=i(33706),a=(n=i(99477))&&n.__esModule?n:{default:n};function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}class r extends o.ResizingController{constructor(){super(...arguments),this._expandableWidgetAriaId="dxTreeList-ariaExpandableInstruction"}_getWidgetAriaLabel(){return"dxTreeList-ariaTreeList"}_toggleBestFitMode(e){super._toggleBestFitMode(e);this._rowsView.getTableElement().find(".dx-treelist-cell-expandable").toggleClass(this.addWidgetPrefix("best-fit"),e)}}a.default.registerModule("gridView",{defaultOptions:o.gridViewModule.defaultOptions,controllers:s({},o.gridViewModule.controllers,{resizing:r}),views:o.gridViewModule.views})},90264:function(e,t,i){var n,o=i(52576),a=i(4628),s=i(47526);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("keyboardNavigation",(0,o.extend)(!0,{},a.keyboardNavigationModule,{extenders:{controllers:{keyboardNavigation:e=>class extends((0,s.keyboardNavigationScrollableA11yExtender)(e)){_leftRightKeysHandler(e,t){const i=this.getVisibleRowIndex(),n=this._dataController;if(!e.ctrl)return super._leftRightKeysHandler.apply(this,arguments);{const t=this._getDirectionCodeByKey(e.keyName),o=n.getKeyByRowIndex(i);"nextInRow"===t?n.expandRow(o):n.collapseRow(o)}}}}}}))},62434:function(e,t,i){var n,o=i(52576),a=i(11052);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("masterDetail",(0,o.extend)(!0,{},a.masterDetailModule,{extenders:{controllers:{data:e=>class extends((0,a.dataMasterDetailExtenderMixin)(e)){isRowExpanded(){return this.isRowExpandedHack.apply(this,arguments)}_processItems(){return this._processItemsHack.apply(this,arguments)}_processDataItem(){return this._processDataItemHack.apply(this,arguments)}}}}}))},30816:function(e,t,i){var n,o=i(87960);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("stateStoring",a({},o.stateStoringModule,{extenders:a({},o.stateStoringModule.extenders,{controllers:a({},o.stateStoringModule.extenders.controllers,{stateStoring:e=>class extends(o.stateStoringModule.extenders.controllers.stateStoring(e)){applyState(e){super.applyState(e),this.option("expandedRowKeys",e.expandedRowKeys?e.expandedRowKeys.slice():[])}},data:e=>class extends(o.stateStoringModule.extenders.controllers.data(e)){getUserState(){const e=super.getUserState();return this.option("autoExpandAll")||(e.expandedRowKeys=this.option("expandedRowKeys")),e}}})})}))},52735:function(e,t,i){var n,o=i(52932);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("validating",{defaultOptions:o.validatingModule.defaultOptions,controllers:o.validatingModule.controllers,extenders:{controllers:{editing:e=>class extends(o.validatingModule.extenders.controllers.editing(e)){processDataItem(e){super.processDataItemTreeListHack.apply(this,arguments)}processItems(e,t){return super.processItemsTreeListHack.apply(this,arguments)}},editorFactory:o.validatingModule.extenders.controllers.editorFactory},views:o.validatingModule.extenders.views}})},21291:function(e,t,i){var n=i(52576),o=i(21640),a=r(i(39051)),s=r(i(99477));function r(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}const d=o.virtualScrollingModule.defaultOptions;o.virtualScrollingModule.extenders.controllers.data=e=>class extends((0,o.data)(e)){_loadOnOptionChange(){var e;const t=null===(e=this._dataSource)||void 0===e?void 0:e._virtualScrollController;null==t||t.reset(),super._loadOnOptionChange()}};s.default.registerModule("virtualScrolling",l({},o.virtualScrollingModule,{defaultOptions:()=>(0,n.extend)(!0,d(),{scrolling:{mode:"virtual"}})})),a.default.extend((e=>class extends((0,o.dataSourceAdapterExtender)(e)){changeRowExpand(){return super.changeRowExpand.apply(this,arguments).done((()=>{const e=this.getViewportItemIndex();e>=0&&this.setViewportItemIndex(e)}))}}))},62514:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(7444))&&n.__esModule?n:{default:n};i(30816),i(22697),i(62434),i(53343),i(76446),i(99446),i(56876),i(52735),i(21291),i(47988),i(63449),i(56065),i(49219),i(53242),i(92906),i(11956),i(40882),i(3967),i(73996),i(17463),i(51565),i(90264),i(47890),i(4788),i(40190);t.default=o.default},7444:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(62602),i(84538),i(46331),i(63017),i(86435),i(72714),i(60607),i(77188),i(2765);var n=d(i(92848)),o=i(11528),a=i(52071),s=d(i(53226)),r=d(i(99335)),l=d(i(99477));function d(e){return e&&e.__esModule?e:{default:e}}l.default.registerModulesOrder(["stateStoring","columns","selection","editorFactory","columnChooser","editingRowBased","editingFormBased","editingCellBased","editing","grouping","masterDetail","validating","adaptivity","data","virtualScrolling","columnHeaders","filterRow","headerPanel","headerFilter","sorting","search","rows","pager","columnsResizingReordering","contextMenu","keyboardNavigation","errorHandling","summary","columnFixing","export","gridView"]);class u extends r.default{_initMarkup(){super._initMarkup.apply(this,arguments),this.$element().addClass("dx-treelist"),this.getView("gridView").render(this.$element())}static registerModule(){l.default.registerModule.apply(l.default,arguments)}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,a.isMaterialBased)(),options:{showRowLines:!0,showColumnLines:!1,headerFilter:{height:315},editing:{useIcons:!0}}}])}_init(){super._init(),this.option("_disableDeprecationWarnings")||s.default.logHeaderFilterDeprecatedWarningIfNeed(this),l.default.processModules(this,l.default),l.default.callModuleItemsMethod(this,"init")}getGridCoreHelper(){return l.default}focus(e){super.focus(),(0,o.isDefined)(e)&&this.getController("keyboardNavigation").focus(e)}}(0,n.default)("dxTreeList",u);t.default=u},73996:function(e,t,i){var n,o=i(8468);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("adaptivity",o.adaptivityModule)},22697:function(e,t,i){var n,o=i(69862);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("columnChooser",o.columnChooserModule)},3967:function(e,t,i){var n,o=i(54704);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("columnFixing",o.columnFixingModule)},62602:function(e,t,i){var n,o=i(88568);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("columnHeaders",o.columnHeadersModule)},11956:function(e,t,i){var n,o=i(19448);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("columnsResizingReordering",o.columnsResizingReorderingModule)},72714:function(e,t,i){var n,o=i(73680);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("contextMenu",o.contextMenuModule)},56876:function(e,t,i){var n,o=i(48295);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("editingCellBased",o.editingCellBasedModule)},99446:function(e,t,i){var n,o=i(29657);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("editingFormBased",o.editingFormBasedModule)},76446:function(e,t,i){var n,o=i(56671);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("editingRowBased",o.editingRowBasedModule)},16109:function(e,t,i){var n,o=i(77862);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("editorFactory",o.editorFactoryModule)},60607:function(e,t,i){var n,o=i(82358);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("errorHandling",o.errorHandlingModule)},49219:function(e,t,i){var n,o=i(65382);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("filterBuilder",o.filterBuilderModule)},53242:function(e,t,i){var n,o=i(17887);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("filterPanel",o.filterPanelModule)},47988:function(e,t,i){var n,o=i(62289);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("filterRow",o.filterRowModule)},56065:function(e,t,i){var n,o=i(78746);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("filterSync",o.filterSyncModule)},63449:function(e,t,i){var n,o=i(69952);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("headerFilter",o.headerFilterModule)},2765:function(e,t,i){var n,o=i(5542);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("headerPanel",o.headerPanelModule)},92906:function(e,t,i){var n,o=i(66040);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("pager",o.pagerModule)},40190:function(e,t,i){var n,o=i(52714);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("rowDragging",o.rowDraggingModule)},51565:function(e,t,i){var n,o=i(7370);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("search",o.searchModule)},63017:function(e,t,i){var n,o=i(8036);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("sorting",o.sortingModule)},40882:function(e,t,i){var n,o=i(67624);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("stickyColumns",o.stickyColumnsModule)},47890:function(e,t,i){var n,o=i(74280);((n=i(99477))&&n.__esModule?n:{default:n}).default.registerModule("virtualColumns",o.virtualColumnsModule)},86435:function(e,t,i){var n=d(i(92774)),o=i(28630),a=d(i(64553)),s=i(11528),r=i(77081),l=d(i(99477));function d(e){return e&&e.__esModule?e:{default:e}}const u="dx-treelist-text-content",c="dx-treelist-expanded",h="dx-treelist-collapsed",p=function(e,t){const i=(0,a.default)("<div>").addClass("dx-treelist-empty-space");return e&&i.toggleClass(c,t).toggleClass(h,!t).append((0,a.default)("<span>")),i};class g extends r.RowsView{_renderIconContainer(e,t){const i=(0,a.default)("<div>").addClass("dx-treelist-icon-container").appendTo(e);if(t.watch){const e=t.watch((()=>[t.row.level,t.row.isExpanded,t.row.node.hasChildren]),(()=>{i.empty(),this._renderIcons(i,t)}));n.default.on(i,o.removeEvent,e)}return e.addClass("dx-treelist-cell-expandable"),this._renderIcons(i,t)}_renderIcons(e,t){const{row:i}=t,{level:n}=i;for(let t=0;t<=n;t++)e.append(p(t===n&&i.node.hasChildren,i.isExpanded));return e}_renderCellCommandContent(e,t){return this._renderIconContainer(e,t),!0}_processTemplate(e,t){var i;const n=this;let o;const s=super._processTemplate(e),r=n._columnsController.getFirstDataColumnIndex();return o=s&&(null===(i=t.column)||void 0===i?void 0:i.index)===r?{render(e){const t=e.container;n._renderCellCommandContent(t,e.model)&&(e.container=function(e){return(0,a.default)("<div>").addClass(u).appendTo(e)}(t)),s.render(e)}}:s,o}_updateCell(e,t){e=e.hasClass(u)?e.parent():e,super._updateCell(e,t)}_rowClick(e){const t=this._dataController,i=(0,a.default)(e.event.target),n=this.isExpandIcon(i),o=null==t?void 0:t.items()[e.rowIndex];n&&o&&t.changeRowExpand(o.key),super._rowClick(e)}_createRow(e){const t=e&&e.node,i=super._createRow.apply(this,arguments);return t&&(this.setAria("level",e.level+1,i),t.hasChildren&&this.setAriaExpandedAttribute(i,e)),i}_getGridRoleName(){return"treegrid"}isExpandIcon(e){return!!e.closest(`.${c}, .${h}`).length}setAriaExpandedAttribute(e,t){const i=t.isExpanded;this.setAria("expanded",(0,s.isDefined)(i)&&i.toString(),e)}}l.default.registerModule("rows",{defaultOptions:r.rowsModule.defaultOptions,views:{rowsView:g}})},17463:function(e,t,i){var n=d(i(64553)),o=i(17781),a=i(52576),s=i(11528),r=i(1620),l=d(i(99477));function d(e){return e&&e.__esModule?e:{default:e}}const u=function(e,t){return!!e.filter((e=>e===t)).length};l.default.registerModule("selection",(0,a.extend)(!0,{},r.selectionModule,{defaultOptions:()=>(0,a.extend)(!0,r.selectionModule.defaultOptions(),{selection:{showCheckBoxesMode:"always",recursive:!1}}),extenders:{controllers:{data:e=>class extends((0,r.dataSelectionExtenderMixin)(e)){_handleDataChanged(e){!this._selectionController.isRecursiveSelection()||e&&"updateSelectionState"===e.changeType||this._selectionController.updateSelectionState({selectedItemKeys:this.option("selectedRowKeys")}),super._handleDataChanged.apply(this,arguments)}loadDescendants(){const e=this,t=super.loadDescendants.apply(e,arguments);return this._selectionController.isRecursiveSelection()&&t.done((()=>{this._selectionController.updateSelectionState({selectedItemKeys:e.option("selectedRowKeys")})})),t}},selection:e=>class extends e{constructor(){super(...arguments),this._updateSelectColumn=o.noop}init(){super.init.apply(this,arguments),this._selectionStateByKey={}}_getSelectionConfig(){const e=super._getSelectionConfig.apply(this,arguments),{plainItems:t}=e;return e.plainItems=e=>{let i;return e&&(i=this._dataController.getCachedStoreData()),i||(i=t.apply(this,arguments).map((e=>e.data))),i||[]},e.isItemSelected=e=>{const t=this._dataController.keyOf(e);return this.isRowSelected(t)},e.isSelectableItem=e=>!!e,e.getItemData=e=>e,e.allowLoadByRange=void 0,e}renderSelectCheckBoxContainer(e,t){const i=this.component.getView("rowsView"),n=i._renderSelectCheckBox(e,{value:t.row.isSelected,row:t.row,column:t.column});i._attachCheckBoxClickEvent(n)}_getSelectAllNodeKeys(){const{component:e}=this,t=e.getRootNode(),i={},n=[],o=this.isRecursiveSelection();return t&&l.default.foreachNodes(t.children,(t=>(void 0!==t.key&&(t.visible||o)&&n.push(t.key),!t.visible||!o&&e.isRowExpanded(t.key,i)))),n}isSelectAll(){if(0===(this.option("selectedRowKeys")||[]).length)return!1;const{component:e}=this,t=this._getSelectAllNodeKeys(),i=this.isRecursiveSelection();let n=!1;const o=t.filter((t=>{const o=e.isRowSelected(t,i);return void 0===o&&(n=!0),o}));return o.length?o.length===t.length||void 0:!!n&&void 0}selectAll(){const e=this._getSelectAllNodeKeys().filter((e=>!this.isRowSelected(e)));return this.focusedItemIndex(-1),this.selectRows(e,!0)}deselectAll(){const e=this._getSelectAllNodeKeys();return this.focusedItemIndex(-1),this.deselectRows(e)}selectedItemKeys(e,t,i,n){const a=this,r=a.option("selectedRowKeys"),l=this.isRecursiveSelection()&&a._normalizeSelectionArgs({keys:(0,s.isDefined)(e)?e:[]},t,!i);return l&&!(0,o.equalByValue)(l.selectedRowKeys,r)?(a._isSelectionNormalizing=!0,super.selectedItemKeys(l.selectedRowKeys,!1,!1,!1).always((()=>{a._isSelectionNormalizing=!1})).done((e=>{l.selectedRowsData=e,a._fireSelectionChanged(l)}))):super.selectedItemKeys(e,t,i,n)}changeItemSelection(e,t,i){const n=this.isRecursiveSelection(),o=super.changeItemSelection.bind(this);if(n&&!t.shift){const i=this._dataController.getKeyByRowIndex(e);return this.selectedItemKeys(i,!0,this.isRowSelected(i)).done((()=>{this.isRowSelected(i)&&o(e,t,!0)}))}return super.changeItemSelection.apply(this,arguments)}_updateParentSelectionState(e,t){const i=this;let n=t;const o=e.parent;if(o){if(o.children.length>1)if(!1===t){n=!!o.children.some((e=>i._selectionStateByKey[e.key]))&&void 0}else if(!0===t){n=!o.children.some((e=>!i._selectionStateByKey[e.key]))||void 0}this._selectionStateByKey[o.key]=n,o.parent&&o.parent.level>=0&&this._updateParentSelectionState(o,n)}}_updateChildrenSelectionState(e,t){const i=this,{children:n}=e;n&&n.forEach((e=>{i._selectionStateByKey[e.key]=t,e.children.length>0&&i._updateChildrenSelectionState(e,t)}))}_updateSelectionStateCore(e,t){const i=this._dataController;for(let n=0;n<e.length;n++){this._selectionStateByKey[e[n]]=t;const o=i.getNodeByKey(e[n]);o&&(this._updateParentSelectionState(o,t),this._updateChildrenSelectionState(o,t))}}_getSelectedParentKeys(e,t,i){let n;const o=this._dataController.getNodeByKey(e);let a=o&&o.parent,s=[];for(;a&&a.level>=0;){s.unshift(a.key);if(i?!u(t,a.key)&&this.isRowSelected(a.key):t.indexOf(a.key)>=0){n=a,s=this._getSelectedParentKeys(n.key,t,i).concat(s);break}if(i)break;a=a.parent}return n&&s||[]}_getSelectedChildKeys(e,t){const i=[],n=this._dataController.getNodeByKey(e);return n&&l.default.foreachNodes(n.children,(e=>{const n=t.indexOf(e.key);return n<0&&i.push(e.key),n>0||n<0&&void 0===this._selectionStateByKey[e.key]})),i}_normalizeParentKeys(e,t){const i=this;let n=[e];const o=i._getSelectedParentKeys(e,t.selectedRowKeys);if(o.length){n=n.concat(o),n.forEach((e=>{const i=t.selectedRowKeys.indexOf(e);i>=0&&t.selectedRowKeys.splice(i,1)}));const e=i._getSelectedChildKeys(o[0],n);t.selectedRowKeys=t.selectedRowKeys.concat(e)}}_normalizeChildrenKeys(e,t){const i=this._dataController.getNodeByKey(e);i&&i.children.forEach((e=>{const i=t.selectedRowKeys.indexOf(e.key);i>=0&&t.selectedRowKeys.splice(i,1),this._normalizeChildrenKeys(e.key,t)}))}_normalizeSelectedRowKeysCore(e,t,i,n){const o=this;e.forEach((e=>{if(i&&o.isRowSelected(e)===n)return;o._normalizeChildrenKeys(e,t);const a=t.selectedRowKeys.indexOf(e);n?(a<0&&t.selectedRowKeys.push(e),t.currentSelectedRowKeys.push(e)):(a>=0&&t.selectedRowKeys.splice(a,1),t.currentDeselectedRowKeys.push(e),o._normalizeParentKeys(e,t))}))}_normalizeSelectionArgs(e,t,i){let n;const o=Array.isArray(e.keys)?e.keys:[e.keys],a=this.option("selectedRowKeys")||[];return o.length&&(n={currentSelectedRowKeys:[],currentDeselectedRowKeys:[],selectedRowKeys:t?a.slice(0):[]},this._normalizeSelectedRowKeysCore(o,n,t,i)),n}_updateSelectedItems(e){this.updateSelectionState(e),super._updateSelectedItems(e)}_fireSelectionChanged(){this._isSelectionNormalizing||super._fireSelectionChanged.apply(this,arguments)}_isModeLeavesOnly(e){return"leavesOnly"===e}_removeDuplicatedKeys(e){const t=[],i={};return e.forEach((e=>{i[e]||(i[e]=!0,t.push(e))})),t}_getAllChildKeys(e){const t=[],i=this._dataController.getNodeByKey(e);return i&&l.default.foreachNodes(i.children,(e=>{t.push(e.key)}),!0),t}_getAllSelectedRowKeys(e){let t=[];return e.forEach((e=>{const i=this._getSelectedParentKeys(e,[],!0),n=this._getAllChildKeys(e);t.push.apply(t,i.concat([e],n))})),t=this._removeDuplicatedKeys(t),t}_getParentSelectedRowKeys(e){const t=this,i=[];return e.forEach((n=>{!t._getSelectedParentKeys(n,e).length&&i.push(n)})),i}_getLeafSelectedRowKeys(e){const t=[],i=this._dataController;return e.forEach((e=>{const n=i.getNodeByKey(e);n&&!n.hasChildren&&t.push(e)})),t}isRecursiveSelection(){const e=this.option("selection.mode"),t=this.option("selection.recursive");return"multiple"===e&&t}updateSelectionState(e){const t=e.removedItemKeys||[],i=e.selectedItemKeys||[];this.isRecursiveSelection()&&(this._updateSelectionStateCore(t,!1),this._updateSelectionStateCore(i,!0))}isRowSelected(e,t){const i=super.isRowSelected.apply(this,arguments);return t=t??this.isRecursiveSelection(),!i&&t?e in this._selectionStateByKey&&this._selectionStateByKey[e]:i}getSelectedRowKeys(e){const t=this;if(!t._dataController)return[];let i=super.getSelectedRowKeys.apply(t,arguments);return e&&(this.isRecursiveSelection()&&(i=this._getAllSelectedRowKeys(i)),"all"!==e&&("excludeRecursive"===e?i=t._getParentSelectedRowKeys(i):t._isModeLeavesOnly(e)&&(i=t._getLeafSelectedRowKeys(i)))),i}getSelectedRowsData(e){const t=this._dataController,i=this.getSelectedRowKeys(e)||[],n=[];return i.forEach((e=>{const i=t.getNodeByKey(e);i&&n.push(i.data)})),n}refresh(){return this._selectionStateByKey={},super.refresh.apply(this,arguments)}}},views:{columnHeadersView:e=>class extends((0,r.columnHeadersSelectionExtenderMixin)(e)){_processTemplate(e,t){const i=this;let n;const o=super._processTemplate(e,t),a=i._columnsController.getFirstDataColumnIndex();return n=o&&"header"===t.rowType&&t.column.index===a?{render(e){"multiple"===i.option("selection.mode")&&i.renderSelectAll(e.container,e.model),o.render(e)}}:o,n}renderSelectAll(e,t){e.addClass("dx-treelist-select-all"),this._renderSelectAllCheckBox(e)}_isSortableElement(e){return super._isSortableElement(e)&&!e.closest(".dx-select-checkbox").length}},rowsView:e=>class extends((0,r.rowsViewSelectionExtenderMixin)(e)){_renderIcons(e,t){return super._renderIcons.apply(this,arguments),t.row.isNewRow||"multiple"!==this.option("selection.mode")||this._selectionController.renderSelectCheckBoxContainer(e,t),e}_rowClick(e){const t=(0,n.default)(e.event.target);this.isExpandIcon(t)?super._rowClickForTreeList.apply(this,arguments):super._rowClick.apply(this,arguments)}}}}}))},89983:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=I(i(3030)),o=i(88603),a=I(i(92774)),s=i(59144),r=I(i(89797)),l=i(98834),d=I(i(92848)),u=I(i(64960)),c=I(i(97832)),h=i(61404),p=I(i(64553)),g=i(48650),_=i(17781),f=i(87739),m=i(52576),v=i(53124),C=i(41639),y=i(57653),b=i(54497),x=i(11528),w=i(55355),S=i(3104),D=I(i(99762));function I(e){return e&&e.__esModule?e:{default:e}}function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},E.apply(null,arguments)}const T=(0,S.getWindow)(),A="dxDraggable",O=(0,l.addNamespace)(s.start,A),P=(0,l.addNamespace)(s.move,A),k=(0,l.addNamespace)(s.end,A),M=(0,l.addNamespace)(s.enter,A),R=(0,l.addNamespace)(s.leave,A),L=(0,l.addNamespace)(r.default.down,A),B=(0,l.addNamespace)("keydown",A),V="clone";let F,H;const N=e=>({x:e.pageX-(0,p.default)(T).scrollLeft(),y:e.pageY-(0,p.default)(T).scrollTop()});class z{constructor(e,t){this._$scrollableAtPointer=null,this._preventScroll=!0,this._component=t,"vertical"===e?(this._scrollValue="scrollTop",this._overFlowAttr="overflowY",this._sizeAttr="height",this._scrollSizeProp="scrollHeight",this._clientSizeProp="clientHeight",this._limitProps={start:"top",end:"bottom"}):(this._scrollValue="scrollLeft",this._overFlowAttr="overflowX",this._sizeAttr="width",this._scrollSizeProp="scrollWidth",this._clientSizeProp="clientWidth",this._limitProps={start:"left",end:"right"})}updateScrollable(e,t){let i=!1;e.some((e=>{const n=(0,p.default)(e),o=n.hasClass("dx-overlay-wrapper"),a=n.hasClass("dx-overlay-content");return!(!o&&!a)||(i=this._trySetScrollable(e,t),i)})),i||(this._$scrollableAtPointer=null,this._scrollSpeed=0)}isScrolling(){return!!this._scrollSpeed}isScrollable(e){return("auto"===e.css(this._overFlowAttr)||e.hasClass("dx-scrollable-container"))&&e.prop(this._scrollSizeProp)>Math.ceil("width"===this._sizeAttr?(0,y.getWidth)(e):(0,y.getHeight)(e))}_trySetScrollable(e,t){const i=this,n=(0,p.default)(e);let o;const a=i._component.option("scrollSensitivity");let s=i.isScrollable(n);return s&&(o=i._calculateDistanceToBorders(n,t),a>o[i._limitProps.start]?i._preventScroll||(i._scrollSpeed=-i._calculateScrollSpeed(o[i._limitProps.start]),i._$scrollableAtPointer=n):a>o[i._limitProps.end]?i._preventScroll||(i._scrollSpeed=i._calculateScrollSpeed(o[i._limitProps.end]),i._$scrollableAtPointer=n):(s=!1,i._preventScroll=!1)),s}_calculateDistanceToBorders(e,t){const i=e.get(0);let n;return i?(n=(0,C.getBoundingRect)(i),{left:t.x-n.left,top:t.y-n.top,right:n.right-t.x,bottom:n.bottom-t.y}):{}}_calculateScrollSpeed(e){const t=this._component,i=t.option("scrollSensitivity"),n=t.option("scrollSpeed");return Math.ceil(((i-e)/i)**2*n)}scrollByStep(){const e=this;if(e._$scrollableAtPointer&&e._scrollSpeed){if(e._$scrollableAtPointer.hasClass("dx-scrollable-container")){const t=e._$scrollableAtPointer.closest(".dx-scrollable"),i=t.data("dxScrollable")||t.data("dxScrollView");if(i){const t=i.scrollOffset()[e._limitProps.start]+e._scrollSpeed;i.scrollTo({[e._limitProps.start]:t})}}else{const t=e._$scrollableAtPointer[e._scrollValue]()+e._scrollSpeed;e._$scrollableAtPointer[e._scrollValue](t)}const t=e._component._dragMoveArgs;t&&e._component._dragMoveHandler(t)}}reset(){this._$scrollableAtPointer=null,this._scrollSpeed=0,this._preventScroll=!0}isOutsideScrollable(e,t){if(!e)return!1;const i=(0,C.getBoundingRect)(e.get(0)),n=i[this._limitProps.start],o=i[this._sizeAttr],a=N(t),s="width"===this._sizeAttr?a.x:a.y;return s<n||s>n+o}}const W=D.default.inherit({ctor(e){this.callBase(),this._strategy=e},_step(){const e=this._strategy._horizontalScrollHelper,t=this._strategy._verticalScrollHelper;e&&e.scrollByStep(),t&&t.scrollByStep()}}),$=c.default.inherit({reset:_.noop,dragMove:_.noop,dragEnter:_.noop,dragLeave:_.noop,dragEnd(e){return this._getSourceDraggable()._fireRemoveEvent(e),(0,f.Deferred)().resolve()},_fireRemoveEvent:_.noop,_getDefaultOptions(){return(0,m.extend)(this.callBase(),{onDragStart:null,onDragMove:null,onDragEnd:null,onDragEnter:null,onDragLeave:null,onDragCancel:null,onCancelByEsc:!1,onDrop:null,immediate:!0,dragDirection:"both",boundary:void 0,boundOffset:0,allowMoveByClick:!1,itemData:null,container:void 0,dragTemplate:void 0,contentTemplate:"content",handle:"",filter:"",clone:!1,autoScroll:!0,scrollSpeed:30,scrollSensitivity:60,group:void 0,data:void 0})},_setOptionsByReference(){this.callBase.apply(this,arguments),(0,m.extend)(this._optionsByReference,{component:!0,group:!0,itemData:!0,data:!0})},_init(){this.callBase(),this._attachEventHandlers(),this._scrollAnimator=new W(this),this._horizontalScrollHelper=new z("horizontal",this),this._verticalScrollHelper=new z("vertical",this),this._initScrollTop=0,this._initScrollLeft=0},_normalizeCursorOffset:e=>((0,x.isObject)(e)&&(e={h:e.x,v:e.y}),{left:(e=(0,_.splitPair)(e).map((e=>parseFloat(e))))[0],top:1===e.length?e[0]:e[1]}),_getNormalizedCursorOffset(e,t){return(0,x.isFunction)(e)&&(e=e.call(this,t)),this._normalizeCursorOffset(e)},_calculateElementOffset(e){let t,i;const{event:n}=e,a=(0,p.default)(e.itemElement),s=(0,p.default)(e.dragElement),r=this._dragElementIsCloned(),l=this.option("cursorOffset");let d={left:0,top:0};const u=this._initialLocate=(0,o.locate)(s);return(r||e.initialOffset||l)&&(t=e.initialOffset||a.offset(),l&&(d=this._getNormalizedCursorOffset(l,e),isFinite(d.left)&&(t.left=n.pageX),isFinite(d.top)&&(t.top=n.pageY)),i=s.offset(),t.top-=i.top+(d.top||0)-u.top,t.left-=i.left+(d.left||0)-u.left),t},_initPosition(e){const t=(0,p.default)(e.dragElement),i=this._calculateElementOffset(e);i&&this._move(i,t),this._startPosition=(0,o.locate)(t)},_startAnimator(){this._scrollAnimator.inProgress()||this._scrollAnimator.start()},_stopAnimator(){this._scrollAnimator.stop()},_addWidgetPrefix(e){const t=this.NAME;return(0,v.dasherize)(t)+(e?`-${e}`:"")},_getItemsSelector(){return this.option("filter")||""},_$content(){const e=this.$element(),t=e.children(".dx-template-wrapper");return t.length?t:e},_attachEventHandlers(){if(this.option("disabled"))return;let e=this._$content(),t=this._getItemsSelector();const i=this.option("allowMoveByClick"),n={direction:this.option("dragDirection"),immediate:this.option("immediate"),checkDropTarget:(e,t)=>{const i=this.option("group"),n=this._getSourceDraggable().option("group"),o=this._getScrollable(e);return!this._verticalScrollHelper.isOutsideScrollable(o,t)&&!this._horizontalScrollHelper.isOutsideScrollable(o,t)&&(n&&n===i)}};i&&(e=this._getArea(),a.default.on(e,L,n,this._pointerDownHandler.bind(this))),">"===t[0]&&(t=t.slice(1)),a.default.on(e,O,t,n,this._dragStartHandler.bind(this)),a.default.on(e,P,n,this._dragMoveHandler.bind(this)),a.default.on(e,k,n,this._dragEndHandler.bind(this)),a.default.on(e,M,n,this._dragEnterHandler.bind(this)),a.default.on(e,R,n,this._dragLeaveHandler.bind(this)),this.option("onCancelByEsc")&&a.default.on(e,B,this._keydownHandler.bind(this))},_dragElementIsCloned(){return this._$dragElement&&this._$dragElement.hasClass(this._addWidgetPrefix(V))},_getDragTemplateArgs(e,t){return{container:(0,h.getPublicElement)(t),model:{itemData:this.option("itemData"),itemElement:(0,h.getPublicElement)(e)}}},_createDragElement(e){let t=e;const i=this.option("clone"),n=this._getContainer();let o=this.option("dragTemplate");return o?(o=this._getTemplate(o),t=(0,p.default)("<div>").appendTo(n),o.render(this._getDragTemplateArgs(e,t))):i&&(t=(0,p.default)("<div>").appendTo(n),e.clone().css({width:e.css("width"),height:e.css("height")}).appendTo(t)),t.toggleClass(this._addWidgetPrefix(V),t.get(0)!==e.get(0)).toggleClass("dx-rtl",this.option("rtlEnabled"))},_resetDragElement(){this._dragElementIsCloned()?this._$dragElement.remove():this._toggleDraggingClass(!1),this._$dragElement=null},_resetSourceElement(){this._toggleDragSourceClass(!1),this._$sourceElement=null},_detachEventHandlers(){a.default.off(this._$content(),`.${A}`),a.default.off(this._getArea(),`.${A}`)},_move(e,t){(0,o.move)(t||this._$dragElement,e)},_getDraggableElement(e){const t=this._getSourceElement();if(t)return t;if(this.option("allowMoveByClick"))return this.$element();let i=(0,p.default)(e&&e.target);const n=this._getItemsSelector();if(">"===n[0]){const e=this._$content().find(n);e.is(i)||(i=i.closest(e))}return i},_getSourceElement(){return this._getSourceDraggable()._$sourceElement},_pointerDownHandler(e){if((0,l.needSkipEvent)(e))return;const t={},i=this.$element(),n=this.option("dragDirection");"horizontal"!==n&&"both"!==n||(t.left=e.pageX-i.offset().left+(0,o.locate)(i).left-(0,y.getWidth)(i)/2),"vertical"!==n&&"both"!==n||(t.top=e.pageY-i.offset().top+(0,o.locate)(i).top-(0,y.getHeight)(i)/2),this._move(t,i),this._getAction("onDragMove")(this._getEventArgs(e))},_isValidElement(e,t){const i=this.option("handle"),n=(0,p.default)(e.originalEvent&&e.originalEvent.target);return!(i&&!n.closest(i).length)&&(!!t.length&&!t.is(".dx-state-disabled, .dx-state-disabled *"))},_dragStartHandler(e){const t=this._getDraggableElement(e);if(this.dragInProgress=!0,!this._isValidElement(e,t))return void(e.cancel=!0);if(this._$sourceElement)return;const i=this._getDragStartArgs(e,t);if(this._getAction("onDragStart")(i),i.cancel)return void(e.cancel=!0);this.option("itemData",i.itemData),this._setSourceDraggable(),this._$sourceElement=t;let n=t.offset();!this._hasClonedDraggable()&&this.option("autoScroll")&&(this._initScrollTop=this._getScrollableScrollTop(),this._initScrollLeft=this._getScrollableScrollLeft(),n=this._getDraggableElementOffset(n.left,n.top));const o=this._$dragElement=this._createDragElement(t);this._toggleDraggingClass(!0),this._toggleDragSourceClass(!0),this._setGestureCoverCursor(o.children());const a="fixed"===o.css("position");this._initPosition((0,m.extend)({},i,{dragElement:o.get(0),initialOffset:a&&n})),this._getAction("onDraggableElementShown")(E({},i,{dragElement:o}));const s=this._getArea(),r=this._getAreaOffset(s),l=this._getBoundOffset(),d=(0,y.getOuterWidth)(s),u=(0,y.getOuterHeight)(s),c=(0,y.getWidth)(o),h=(0,y.getHeight)(o),p=o.offset().left-r.left,g=o.offset().top-r.top;s.length&&(e.maxLeftOffset=p-l.left,e.maxRightOffset=d-p-c-l.right,e.maxTopOffset=g-l.top,e.maxBottomOffset=u-g-h-l.bottom),this.option("autoScroll")&&this._startAnimator()},_getAreaOffset:e=>e&&n.default.offset(e)||{left:0,top:0},_toggleDraggingClass(e){this._$dragElement&&this._$dragElement.toggleClass(this._addWidgetPrefix("dragging"),e)},_toggleDragSourceClass(e,t){const i=t||this._$sourceElement;i&&i.toggleClass(this._addWidgetPrefix("source"),e)},_setGestureCoverCursor(e){(0,p.default)(".dx-gesture-cover").css("cursor",e.css("cursor"))},_getBoundOffset(){let e=this.option("boundOffset");return(0,x.isFunction)(e)&&(e=e.call(this)),(0,b.quadToObject)(e)},_getArea(){let e=this.option("boundary");return(0,x.isFunction)(e)&&(e=e.call(this)),(0,p.default)(e)},_getContainer(){let e=this.option("container");return void 0===e&&(e=(0,w.value)()),(0,p.default)(e)},_getDraggableElementOffset(e,t){var i,n;const o=this._initScrollTop,a=this._initScrollLeft,s=this._getScrollableScrollTop(),r=this._getScrollableScrollLeft(),l="fixed"===(0,p.default)(this.element()).css("position"),d={left:((null===(i=this._startPosition)||void 0===i?void 0:i.left)??0)+e,top:((null===(n=this._startPosition)||void 0===n?void 0:n.top)??0)+t};return l||this._hasClonedDraggable()?d:{left:(0,x.isNumeric)(r)?d.left+r-a:d.left,top:(0,x.isNumeric)(s)?d.top+s-o:d.top}},_hasClonedDraggable(){return this.option("clone")||this.option("dragTemplate")},_dragMoveHandler(e){if(this._dragMoveArgs=e,!this._$dragElement)return void(e.cancel=!0);const t=this._getDraggableElementOffset(e.offset.x,e.offset.y);this._move(t),this._updateScrollable(e);const i=this._getEventArgs(e);if(this._getAction("onDragMove")(i),!0===i.cancel)return;this._getTargetDraggable().dragMove(e,scrollBy)},_updateScrollable(e){const t=this;if(t.option("autoScroll")){const i=N(e),n=u.default.elementsFromPoint(i.x,i.y,this.$element().get(0));t._verticalScrollHelper.updateScrollable(n,i),t._horizontalScrollHelper.updateScrollable(n,i)}},_getScrollable(e){let t;return e.parents().toArray().some((e=>{const i=(0,p.default)(e);return!(!this._horizontalScrollHelper.isScrollable(i)&&!this._verticalScrollHelper.isScrollable(i))&&(t=i,!0)})),t},_getScrollableScrollTop(){var e;return(null===(e=this._getScrollable((0,p.default)(this.element())))||void 0===e?void 0:e.scrollTop())??0},_getScrollableScrollLeft(){var e;return(null===(e=this._getScrollable((0,p.default)(this.element())))||void 0===e?void 0:e.scrollLeft())??0},_defaultActionArgs(){const e=this.callBase.apply(this,arguments),t=this.option("component");return t&&(e.component=t,e.element=t.element()),e},_getEventArgs(e){const t=this._getSourceDraggable(),i=this._getTargetDraggable();return{event:e,itemData:t.option("itemData"),itemElement:(0,h.getPublicElement)(t._$sourceElement),fromComponent:t.option("component")||t,toComponent:i.option("component")||i,fromData:t.option("data"),toData:i.option("data")}},_getDragStartArgs(e,t){const i=this._getEventArgs(e);return{event:i.event,itemData:i.itemData,itemElement:t,fromData:i.fromData}},_revertItemToInitialPosition(){!this._dragElementIsCloned()&&this._move(this._initialLocate,this._$sourceElement)},_dragEndHandler(e){const t=(0,f.Deferred)(),i=this._getEventArgs(e),n=this._getEventArgs(e),o=this._getTargetDraggable();let a=!0;this.dragInProgress=!1;try{this._getAction("onDragEnd")(i)}finally{(0,f.when)((0,f.fromPromise)(i.cancel)).done((e=>{if(!e&&(o!==this&&o._getAction("onDrop")(n),!n.cancel))return a=!1,void(0,f.when)((0,f.fromPromise)(o.dragEnd(i))).always(t.resolve);t.resolve()})).fail(t.resolve),t.done((()=>{a&&this._revertItemToInitialPosition(),this._resetDragOptions(o)}))}},_isTargetOverAnotherDraggable(e){const t=this._getSourceDraggable();if(this===t)return!1;const i=t._$dragElement,n=t.$element(),o=this.$element(),a=N(e),s=u.default.elementsFromPoint(a.x,a.y,this.element()).filter((e=>{const t=(0,p.default)(e);return!!t.hasClass(this._addWidgetPrefix())&&!t.closest(i).length}))[0],r=this._getSourceElement(),l=s===n.get(0),d=(0,p.default)(s).closest(r).length;return!s||s===o.get(0)&&!l&&!d},_dragEnterHandler(e){this._fireDragEnterEvent(e),this._isTargetOverAnotherDraggable(e)&&this._setTargetDraggable();this._getSourceDraggable().dragEnter(e)},_dragLeaveHandler(e){this._fireDragLeaveEvent(e),this._resetTargetDraggable(),this!==this._getSourceDraggable()&&this.reset();this._getSourceDraggable().dragLeave(e)},_keydownHandler(e){this.dragInProgress&&"Escape"===e.key&&this._keydownEscapeHandler(e)},_keydownEscapeHandler(e){var t;if(!this._getSourceElement())return;const i=this._getEventArgs(e);if(this._getAction("onDragCancel")(i),i.cancel)return;this.dragInProgress=!1,null===(t=H)||void 0===t||t._toggleDraggingClass(!1),this._detachEventHandlers(),this._revertItemToInitialPosition();const n=this._getTargetDraggable();this._resetDragOptions(n),this._attachEventHandlers()},_getAction(e){return this[`_${e}Action`]||this._createActionByOption(e)},_getAnonymousTemplateName:()=>"content",_initTemplates(){this.option("contentTemplate")&&(this._templateManager.addDefaultTemplates({content:new g.EmptyTemplate}),this.callBase.apply(this,arguments))},_render(){this.callBase(),this.$element().addClass(this._addWidgetPrefix());const e=this._templateManager.anonymousTemplateName===this.option("contentTemplate"),t=this._getTemplateByOption("contentTemplate");t&&(0,p.default)(t.render({container:this.element(),transclude:e}))},_optionChanged(e){const{name:t}=e;switch(t){case"onDragStart":case"onDragMove":case"onDragEnd":case"onDrop":case"onDragEnter":case"onDragLeave":case"onDragCancel":case"onDraggableElementShown":this[`_${t}Action`]=this._createActionByOption(t);break;case"dragTemplate":case"contentTemplate":case"container":case"clone":case"scrollSensitivity":case"scrollSpeed":case"boundOffset":case"handle":case"group":case"data":case"itemData":break;case"allowMoveByClick":case"dragDirection":case"disabled":case"boundary":case"filter":case"immediate":this._resetDragElement(),this._detachEventHandlers(),this._attachEventHandlers();break;case"onCancelByEsc":this._keydownHandler();break;case"autoScroll":this._verticalScrollHelper.reset(),this._horizontalScrollHelper.reset();break;default:this.callBase(e)}},_getTargetDraggable(){return F||this},_getSourceDraggable(){return H||this},_setTargetDraggable(){const e=this.option("group"),t=this._getSourceDraggable();e&&e===t.option("group")&&(F=this)},_setSourceDraggable(){H=this},_resetSourceDraggable(){H=null},_resetTargetDraggable(){F=null},_resetDragOptions(e){this.reset(),e.reset(),this._stopAnimator(),this._horizontalScrollHelper.reset(),this._verticalScrollHelper.reset(),this._resetDragElement(),this._resetSourceElement(),this._resetTargetDraggable(),this._resetSourceDraggable()},_dispose(){this.callBase(),this._detachEventHandlers(),this._resetDragElement(),this._resetTargetDraggable(),this._resetSourceDraggable(),this._$sourceElement=null,this._stopAnimator()},_fireDragEnterEvent(e){const t=this._getEventArgs(e);this._getAction("onDragEnter")(t)},_fireDragLeaveEvent(e){const t=this._getEventArgs(e);this._getAction("onDragLeave")(t)}});(0,d.default)(A,$);t.default=$},96334:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=i(88603),a=f(i(92774)),s=f(i(92848)),r=i(61404),l=f(i(64553)),d=i(87739),u=i(52576),c=i(41639),h=i(57653),p=i(3104),g=f(i(89983)),_=i(11528);function f(e){return e&&e.__esModule?e:{default:e}}const m=(0,p.getWindow)(),v="placeholder",C=e=>(0,l.default)(e).is(":visible"),y=(e,t)=>{var i,o;if(!e)return;const a=(null===(i=t.to)||void 0===i?void 0:i.left)||0,s=(null===(o=t.to)||void 0===o?void 0:o.top)||0;e.style.transform=`translate(${a}px,${s}px)`,e.style.transition=n.fx.off?"":`transform ${t.duration}ms ${t.easing}`};const b=g.default.inherit({_init(){this.callBase(),this._sourceScrollHandler=this._handleSourceScroll.bind(this),this._sourceScrollableInfo=null},_getDefaultOptions(){return(0,u.extend)(this.callBase(),{clone:!0,filter:"> *",itemOrientation:"vertical",dropFeedbackMode:"push",allowDropInsideItem:!1,allowReordering:!0,moveItemOnDrop:!1,onDragChange:null,onAdd:null,onRemove:null,onReorder:null,onPlaceholderPrepared:null,animation:{type:"slide",duration:300,easing:"ease"},fromIndex:null,toIndex:null,dropInsideItem:!1,itemPoints:null,fromIndexOffset:0,offset:0,autoUpdate:!1,draggableElementSize:0})},reset(){this.option({dropInsideItem:!1,toIndex:null,fromIndex:null,itemPoints:null,fromIndexOffset:0,draggableElementSize:0}),this._$placeholderElement&&this._$placeholderElement.remove(),this._$placeholderElement=null,!this._isIndicateMode()&&this._$modifiedItem&&(this._$modifiedItem.css("marginBottom",this._modifiedItemMargin),this._$modifiedItem=null)},_getPrevVisibleItem:(e,t)=>e.slice(0,t).reverse().filter(C)[0],_dragStartHandler(e){if(this.callBase.apply(this,arguments),!0===e.cancel)return;const t=this._getSourceElement();this._updateItemPoints(),this._subscribeToSourceScroll(e),this.option("fromIndex",this._getElementIndex(t)),this.option("fromIndexOffset",this.option("offset"))},_subscribeToSourceScroll(e){const t=this._getScrollable((0,l.default)(e.target));t&&(this._sourceScrollableInfo={element:t,scrollLeft:t.scrollLeft(),scrollTop:t.scrollTop()},a.default.off(t,"scroll",this._sourceScrollHandler),a.default.on(t,"scroll",this._sourceScrollHandler))},_unsubscribeFromSourceScroll(){this._sourceScrollableInfo&&(a.default.off(this._sourceScrollableInfo.element,"scroll",this._sourceScrollHandler),this._sourceScrollableInfo=null)},_handleSourceScroll(e){const t=this._sourceScrollableInfo;t&&["scrollLeft","scrollTop"].forEach((i=>{if(e.target[i]!==t[i]){const n=e.target[i]-t[i];this._correctItemPoints(n),this._movePlaceholder(),t[i]=e.target[i]}}))},_dragEnterHandler(e){if(this.callBase.apply(this,arguments),this!==this._getSourceDraggable()&&(this._subscribeToSourceScroll(e),this._updateItemPoints(),this.option("fromIndex",-1),!this._isIndicateMode())){const e=this.option("itemPoints"),t=e[e.length-1];if(t){const e=this.$element(),i=this._getSourceElement(),n=this._isVerticalOrientation(),o=n?(0,h.getOuterHeight)(i,!0):(0,h.getOuterWidth)(i,!0),a=e.get(0)[n?"scrollHeight":"scrollWidth"],s=e.get(0)[n?"scrollTop":"scrollLeft"],r=n?"top":"left",d=t[r],u=e.offset()[r]+a-s-d;if(u<o&&n){const e=this._getItems(),t=(0,l.default)(this._getPrevVisibleItem(e));this._$modifiedItem=t,this._modifiedItemMargin=t.get(0).style.marginBottom,t.css("marginBottom",o-u);const i=t.closest(".dx-sortable"),n=i.data("dxScrollable")||i.data("dxScrollView");n&&n.update()}}}},_dragLeaveHandler(){this.callBase.apply(this,arguments),this!==this._getSourceDraggable()&&this._unsubscribeFromSourceScroll()},dragEnter(){this!==this._getTargetDraggable()&&this.option("toIndex",-1)},dragLeave(){this!==this._getTargetDraggable()&&this.option("toIndex",this.option("fromIndex"))},_allowDrop(e){const t=this._getTargetDraggable().$element(),i=this._getScrollable(t);if(i){const{left:e,right:t,top:n,bottom:o}=function(e){const t=e.offset(),{style:i}=e[0],n=parseFloat(i.paddingLeft)||0,o=parseFloat(i.paddingRight)||0,a=parseFloat(i.paddingTop)||0,s=e[0].clientWidth-(n+o),r=(0,h.getHeight)(e),l=t.left+n,d=t.top+a;return{left:l,right:l+s,top:d,bottom:d+r}}(i),a=this.option("toIndex"),s=this.option("itemPoints"),r=null==s?void 0:s.filter((e=>e.index===a))[0];if(r&&void 0!==r.top){return this._isVerticalOrientation()?n<=Math.ceil(r.top)&&Math.floor(r.top)<=o:e<=Math.ceil(r.left)&&Math.floor(r.left)<=t}}return!0},dragEnd(e){this._unsubscribeFromSourceScroll();const t=this._getSourceElement(),i=this._getSourceDraggable(),n=i.NAME!==this.NAME,a=this.option("toIndex"),{event:s}=e,r=this._allowDrop(s);if(null!==a&&a>=0&&r){let e,r;if(i!==this&&(e=this._fireAddEvent(s),e||(r=this._fireRemoveEvent(s))),n&&(0,o.resetPosition)(t),this.option("moveItemOnDrop")&&!e&&this._moveItem(t,a,r),i===this)return this._fireReorderEvent(s)}return(0,d.Deferred)().resolve()},dragMove(e){const t=this.option("itemPoints");if(!t)return;const i=this._isVerticalOrientation(),n=i?"top":"left",o=i?e.pageY:e.pageX,a=this.option("rtlEnabled");let s;for(let e=t.length-1;e>=0;e--){const r=t[e+1]&&(t[e][n]+t[e+1][n])/2;if(!(!i&&a?o>r:r>o)&&void 0!==r)break;s=t[e]}s&&(this._updatePlaceholderPosition(e,s),this._verticalScrollHelper.isScrolling()&&this._isIndicateMode()&&this._movePlaceholder())},_isIndicateMode(){return"indicate"===this.option("dropFeedbackMode")||this.option("allowDropInsideItem")},_createPlaceholder(){let e;return this._isIndicateMode()&&(e=(0,l.default)("<div>").addClass(this._addWidgetPrefix(v)).insertBefore(this._getSourceDraggable()._$dragElement)),this._$placeholderElement=e,e},_getItems(){const e=this._getItemsSelector();return this._$content().find(e).not(`.${this._addWidgetPrefix(v)}`).not(`.${this._addWidgetPrefix("clone")}`).toArray()},_allowReordering(){return this._getSourceDraggable()!==this._getTargetDraggable()||this.option("allowReordering")},_isValidPoint(e,t,i){const n=this.option("allowDropInsideItem");return!!(i||this._allowReordering()||0===e&&n)&&(!this._isIndicateMode()||(-1===t||e!==t&&(i||e!==t+1)))},_getItemPoints(){const e=this;let t,i,n,o=[];const a=e.option("rtlEnabled"),s=e._isVerticalOrientation(),r=e._getItems(),d=r.filter(C),c=d.length,p=this._getDraggableElement(),g=d.indexOf(p.get(0));if(c){for(let u=0;u<=c;u++){const p=!s&&a^u===c,_=s&&u===c;u<c&&(t=(0,l.default)(d[u]),i=t.offset(),n=(0,h.getOuterWidth)(t)),o.push({dropInsideItem:!1,left:i.left+(p?n:0),top:i.top+(_?o[u-1].height:0),index:u===c?r.length:r.indexOf(t.get(0)),$item:t,width:(0,h.getOuterWidth)(t),height:(0,h.getOuterHeight)(t),isValid:e._isValidPoint(u,g)})}if(this.option("allowDropInsideItem")){const e=o;o=[];for(let t=0;t<e.length;t++)o.push(e[t]),e[t+1]&&o.push((0,u.extend)({},e[t],{dropInsideItem:!0,top:Math.floor((e[t].top+e[t+1].top)/2),left:Math.floor((e[t].left+e[t+1].left)/2),isValid:this._isValidPoint(t,g,!0)}))}}else o.push({dropInsideItem:!1,index:0,isValid:!0});return o},_updateItemPoints(e){(e||this.option("autoUpdate")||!this.option("itemPoints"))&&this.option("itemPoints",this._getItemPoints())},_correctItemPoints(e){const t=this.option("itemPoints");if(e&&t&&!this.option("autoUpdate")){const i=this._isVerticalOrientation()?"top":"left";t.forEach((t=>{t[i]-=e}))}},_getElementIndex(e){return this._getItems().indexOf(e.get(0))},_getDragTemplateArgs(e){const t=this.callBase.apply(this,arguments);return t.model.fromIndex=this._getElementIndex(e),t},_togglePlaceholder(e){this._$placeholderElement&&this._$placeholderElement.toggle(e)},_isVerticalOrientation(){return"vertical"===this.option("itemOrientation")},_normalizeToIndex(e,t){const i=this._getSourceDraggable()!==this._getTargetDraggable(),n=this._getActualFromIndex();return null===e?n:Math.max(i||n>=e||t?e:e-1,0)},_updatePlaceholderPosition(e,t){const i=this._getSourceDraggable(),n=this._normalizeToIndex(t.index,t.dropInsideItem),o=(0,u.extend)(this._getEventArgs(e),{toIndex:n,dropInsideItem:t.dropInsideItem});t.isValid&&this._getAction("onDragChange")(o),!o.cancel&&t.isValid?(this.option({dropInsideItem:t.dropInsideItem,toIndex:t.index}),this._getAction("onPlaceholderPrepared")((0,u.extend)(this._getEventArgs(e),{placeholderElement:(0,r.getPublicElement)(this._$placeholderElement),dragElement:(0,r.getPublicElement)(i._$dragElement)})),this._updateItemPoints()):t.isValid||this.option({dropInsideItem:!1,toIndex:null})},_makeWidthCorrection(e,t){if(this._$scrollable=this._getScrollable(e),this._$scrollable){const i=(0,h.getWidth)(this._$scrollable),n=this._$scrollable.offset().left-e.offset().left,o=(0,h.getOuterWidth)(e)-n-i;n>0&&(t-=n),o>0&&(t-=o)}return t},_updatePlaceholderSizes(e,t){const i=this,n=i.option("dropInsideItem"),o=(0,l.default)(t),a=i._isVerticalOrientation();let s="",r="";e.toggleClass(i._addWidgetPrefix("placeholder-inside"),n),(a||n)&&(s=(0,h.getOuterWidth)(o)),a&&!n||(r=(0,h.getOuterHeight)(o)),s=i._makeWidthCorrection(o,s),e.css({width:s,height:r})},_moveItem(e,t,i){let n;const o=this._getItems(),a=o[t],s=this._getSourceDraggable();i&&(e=e.clone(),s._toggleDragSourceClass(!1,e)),a||(n=o[t-1]),this._moveItemCore(e,a,n)},_moveItemCore(e,t,i){t||i?i?e.insertAfter((0,l.default)(i)):e.insertBefore((0,l.default)(t)):e.appendTo(this.$element())},_getDragStartArgs(e,t){return(0,u.extend)(this.callBase.apply(this,arguments),{fromIndex:this._getElementIndex(t)})},_getEventArgs(e){const t=this._getSourceDraggable(),i=this._getTargetDraggable(),n=i.option("dropInsideItem");return(0,u.extend)(this.callBase.apply(this,arguments),{fromIndex:t.option("fromIndex"),toIndex:this._normalizeToIndex(i.option("toIndex"),n),dropInsideItem:n})},_optionChanged(e){const{name:t}=e;switch(t){case"onDragChange":case"onPlaceholderPrepared":case"onAdd":case"onRemove":case"onReorder":this[`_${t}Action`]=this._createActionByOption(t);break;case"itemOrientation":case"allowDropInsideItem":case"moveItemOnDrop":case"dropFeedbackMode":case"itemPoints":case"animation":case"allowReordering":case"fromIndexOffset":case"offset":case"draggableElementSize":case"autoUpdate":break;case"fromIndex":[!1,!0].forEach((t=>{const i=t?e.value:e.previousValue;if(null!==i){const e=(0,l.default)(this._getItems()[i]);this._toggleDragSourceClass(t,e)}}));break;case"dropInsideItem":this._optionChangedDropInsideItem(e);break;case"toIndex":this._optionChangedToIndex(e);break;default:this.callBase(e)}},_optionChangedDropInsideItem(){this._isIndicateMode()&&this._$placeholderElement&&this._movePlaceholder()},_isPositionVisible(e){const t=this.$element();let i;if("hidden"!==t.css("overflow")?i=t.get(0):t.parents().each((function(){if("visible"!==(0,l.default)(this).css("overflow"))return i=this,!1})),i){const t=(0,c.getBoundingRect)(i),n=this._isVerticalOrientation(),o=n?"top":"left",a=n?"bottom":"right",s=n?m.pageYOffset:m.pageXOffset;if(e[o]<t[o]+s||e[o]>t[a]+s)return!1}return!0},_optionChangedToIndex(e){const t=e.value;if(this._isIndicateMode()){const e=null!==t&&t>=0;this._togglePlaceholder(e),e&&this._movePlaceholder()}else this._moveItems(e.previousValue,e.value,e.fullUpdate)},update(){if(null===this.option("fromIndex")&&null===this.option("toIndex"))return;this._updateItemPoints(!0),this._updateDragSourceClass();const e=this.option("toIndex");this._optionChangedToIndex({value:e,fullUpdate:!0})},_updateDragSourceClass(){const e=this._getActualFromIndex(),t=(0,l.default)(this._getItems()[e]);t.length&&(this._$sourceElement=t,this._toggleDragSourceClass(!0,t))},_makeLeftCorrection(e){const t=this._$scrollable;if(t&&this._isVerticalOrientation()){const i=t.offset().left-e;i>0&&(e+=i)}return e},_movePlaceholder(){const e=this,t=e._$placeholderElement||e._createPlaceholder();if(!t)return;const i=e._getItems(),n=e.option("toIndex"),o=e._isVerticalOrientation(),a=this.option("rtlEnabled"),s=e.option("dropInsideItem");let r=null,d=i[n];if(d){const e=(0,l.default)(d);r=e.offset(),o||!a||s||(r.left+=(0,h.getOuterWidth)(e,!0))}else{const e=d=this._getPrevVisibleItem(i,n);e&&(r=(0,l.default)(e).offset(),o?r.top+=(0,h.getOuterHeight)(e,!0):a||(r.left+=(0,h.getOuterWidth)(e,!0)))}if(e._updatePlaceholderSizes(t,d),r&&!e._isPositionVisible(r)&&(r=null),r){const a=o&&n===i.length,s=(0,h.getOuterHeight)(t);r.left=e._makeLeftCorrection(r.left),r.top=a&&r.top>=s?r.top-s:r.top,e._move(r,t)}t.toggle(!!r)},_getPositions(e,t,i,n){const o=[];for(let a=0;a<e.length;a++){let e=0;null!==n&&null!==i?(-1===i?a>=n&&(e=t):-1===n?a>i&&(e=-t):i<n?a>i&&a<n&&(e=-t):i>n&&a>=n&&a<i&&(e=t),o.push(e)):o.push(e)}return o},_getDraggableElementSize(e){const t=this._getDraggableElement();let i=this.option("draggableElementSize");return i||(i=e?((0,h.getOuterHeight)(t)+(0,h.getOuterHeight)(t,!0))/2:((0,h.getOuterWidth)(t)+(0,h.getOuterWidth)(t,!0))/2,this.option("autoUpdate")||this.option("draggableElementSize",i)),i},_getActualFromIndex(){const{fromIndex:e,fromIndexOffset:t,offset:i}=this.option();return null==e?null:e+t-i},_moveItems(e,t,i){const n=this._getActualFromIndex(),o=this._isVerticalOrientation(),a=o?"top":"left",s=this._getDraggableElementSize(o),r=this._getItems(),l=this._getPositions(r,s,n,e),d=this._getPositions(r,s,n,t),c=this.option("animation"),h=this.option("rtlEnabled");for(let e=0;e<r.length;e++){const s=r[e],g=l[e],f=d[e];null===t||null===n?(p=s)&&(p.style.transform="",p.style.transition=""):(g!==f||i&&(0,_.isDefined)(f))&&y(s,(0,u.extend)({},c,{to:{[a]:!o&&h?-f:f}}))}var p},_toggleDragSourceClass(e,t){const i=t||this._$sourceElement;this.callBase.apply(this,arguments),this._isIndicateMode()||i&&i.toggleClass(this._addWidgetPrefix("source-hidden"),e)},_dispose(){this.reset(),this.callBase()},_fireAddEvent(e){const t=this._getEventArgs(e);return this._getAction("onAdd")(t),t.cancel},_fireRemoveEvent(e){const t=this._getSourceDraggable(),i=this._getEventArgs(e);return t._getAction("onRemove")(i),i.cancel},_fireReorderEvent(e){const t=this._getEventArgs(e);return this._getAction("onReorder")(t),t.promise||(0,d.Deferred)().resolve()}});(0,s.default)("dxSortable",b);t.default=b},48500:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BasePaginationDefaultProps=void 0;var n,o=i(28112),a=(n=i(4671))&&n.__esModule?n:{default:n};function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}t.BasePaginationDefaultProps=s({},o.BaseWidgetDefaultProps,{isGridCompatibilityMode:!1,showInfo:!1,displayMode:"adaptive",maxPagesCount:10,pageCount:1,visible:!0,hasKnownLastPage:!0,pagesNavigatorVisible:"auto",showPageSizeSelector:!0,allowedPageSizes:[5,10],showNavigationButtons:!1,itemCount:1,label:a.default.format("dxPagination-ariaLabel")})},54623:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PAGINATION_SELECTION_CLASS=t.PAGINATION_SELECTED_PAGE_SIZE_CLASS=t.PAGINATION_PAGE_SIZE_CLASS=t.PAGINATION_PAGE_SIZES_CLASS=t.PAGINATION_PAGE_INDEXES_CLASS=t.PAGINATION_PAGE_CLASS=t.PAGINATION_PAGES_CLASS=t.PAGINATION_CLASS=t.PAGER_CLASS=t.LIGHT_MODE_CLASS=t.FIRST_CHILD_CLASS=void 0;t.PAGER_CLASS="dx-pager",t.PAGINATION_CLASS="dx-pagination",t.LIGHT_MODE_CLASS="dx-light-mode",t.PAGINATION_PAGES_CLASS="dx-pages",t.PAGINATION_PAGE_INDEXES_CLASS="dx-page-indexes",t.PAGINATION_PAGE_CLASS="dx-page";const i=t.PAGINATION_SELECTION_CLASS="dx-selection",n=t.PAGINATION_PAGE_SIZE_CLASS="dx-page-size";t.PAGINATION_PAGE_SIZES_CLASS="dx-page-sizes",t.PAGINATION_SELECTED_PAGE_SIZE_CLASS=`${n} ${i}`,t.FIRST_CHILD_CLASS="dx-first-child"},5655:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardActionContext=void 0;var n=i(49714);t.KeyboardActionContext=(0,n.createContext)(void 0)},17286:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.LightButtonDefaultProps=t.LightButton=void 0;var n=i(81167),o=i(49714),a=i(28677),s=i(5655);const r=t.LightButtonDefaultProps={className:"",label:"",tabIndex:0,selected:!1};class l extends o.InfernoComponent{constructor(e){super(e),this.state={},this.refs=null,this.widgetRef=(0,n.createRef)(),this.keyboardEffect=this.keyboardEffect.bind(this),this.subscribeToClick=this.subscribeToClick.bind(this)}getComponentProps(){return this.props}getKeyboardContext(){return this.context[s.KeyboardActionContext.id]?this.context[s.KeyboardActionContext.id]:s.KeyboardActionContext.defaultValue}componentWillUpdate(e,t,i){super.componentWillUpdate(e,t,i)}createEffects(){return[new o.InfernoEffect(this.keyboardEffect,[this.getKeyboardContext(),this.props.onClick]),new o.InfernoEffect(this.subscribeToClick,[this.props.onClick])]}updateEffects(){var e,t;null===(e=this._effects[0])||void 0===e||e.update([this.getKeyboardContext(),this.props.onClick]),null===(t=this._effects[1])||void 0===t||t.update([this.props.onClick])}keyboardEffect(){return this.getKeyboardContext().registerKeyboardAction(this.widgetRef.current,this.props.onClick)}subscribeToClick(){return(0,a.subscribeToClickEvent)(this.widgetRef.current,this.props.onClick)}render(){return(0,n.createVNode)(1,"div",this.props.className,this.props.children,0,{tabIndex:this.props.tabIndex,role:"button","aria-label":this.props.label,"aria-current":this.props.selected?"page":void 0},null,this.widgetRef)}}t.LightButton=l,l.defaultProps=r},32576:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PaginationConfigContext=void 0;var n=i(49714);t.PaginationConfigContext=(0,n.createContext)(void 0)},62502:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PaginationConfigProviderDefaultProps=t.PaginationConfigProvider=void 0;var n=i(49714),o=i(32576);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}const s=t.PaginationConfigProviderDefaultProps={};class r extends n.BaseInfernoComponent{constructor(){super(...arguments),this.state={}}getConfig(){return{isGridCompatibilityMode:this.props.isGridCompatibilityMode}}getChildContext(){return a({},this.context,{[o.PaginationConfigContext.id]:this.getConfig()||o.PaginationConfigContext.defaultValue})}render(){return this.props.children}}t.PaginationConfigProvider=r,r.defaultProps=s},64522:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PaginationDefaultProps=void 0;var n=i(48500);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}t.PaginationDefaultProps=o({},n.BasePaginationDefaultProps,{pageSize:5,pageIndex:1,pageIndexChangedInternal:()=>{},pageSizeChangedInternal:()=>{}})},62388:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PaginationContentDefaultProps=t.PaginationContent=void 0;var n=i(81167),o=i(49714),a=i(93796),s=i(16191),r=i(71312),l=i(54623),d=i(5655),u=i(62502),c=i(64522),h=i(49329),p=i(1542),g=i(33494);function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_.apply(null,arguments)}const f=t.PaginationContentDefaultProps=_({},c.PaginationDefaultProps,{infoTextVisible:!0,isLargeDisplayMode:!0});class m extends o.InfernoComponent{constructor(e){super(e),this.state={},this.refs=null,this.widgetElementRef=(0,n.createRef)(),this.widgetRootElementRef=(0,n.createRef)(),this.pagesRef=(0,n.createRef)(),this.infoTextRef=(0,n.createRef)(),this.__getterCache={keyboardAction:void 0},this.state={},this.__getterCache={},this.setRootElementRef=this.setRootElementRef.bind(this),this.createFakeInstance=this.createFakeInstance.bind(this)}createEffects(){return[new o.InfernoEffect(this.setRootElementRef,[])]}getChildContext(){return _({},this.context,{[d.KeyboardActionContext.id]:this.getKeyboardAction()||d.KeyboardActionContext.defaultValue})}setRootElementRef(){const{rootElementRef:e}=this.props;e&&this.widgetRootElementRef&&(e.current=this.widgetRootElementRef.current)}createFakeInstance(){return{option:()=>!1,element:()=>{var e;return null===(e=this.widgetRootElementRef)||void 0===e?void 0:e.current},_createActionByOption:()=>e=>{var t,i;null===(t=(i=this.props).onKeyDown)||void 0===t||t.call(i,e)}}}getKeyboardAction(){return{registerKeyboardAction:(e,t)=>{const i=this.createFakeInstance();return(0,s.registerKeyboardAction)("pager",i,e,void 0,t)}}}getInfoVisible(){const{infoTextVisible:e,showInfo:t}=this.props;return!!t&&e}getPageIndexSelectorVisible(){return 0!==this.props.pageSize}getNormalizedDisplayMode(){const{displayMode:e,lightModeEnabled:t}=this.props;return"adaptive"===e&&void 0!==t?t?"compact":"full":e??"adaptive"}getPagesContainerVisible(){return!!this.props.pagesNavigatorVisible&&this.props.pageCount>0}getPagesContainerVisibility(){if("auto"===this.props.pagesNavigatorVisible&&1===this.props.pageCount&&this.props.hasKnownLastPage)return"hidden"}getIsLargeDisplayMode(){const e=this.getNormalizedDisplayMode();let t=!1;return t="adaptive"===e?this.props.isLargeDisplayMode:"full"===e,t}getClasses(){const e={[`${this.props.className}`]:!!this.props.className,[l.PAGER_CLASS]:!!this.props.isGridCompatibilityMode,[l.PAGINATION_CLASS]:!this.props.isGridCompatibilityMode,[l.LIGHT_MODE_CLASS]:!this.getIsLargeDisplayMode()};return(0,r.combineClasses)(e)}getAria(){return{role:"navigation",label:this.props.label??""}}componentWillUpdate(e){super.componentWillUpdate(),this.props.onKeyDown!==e.onKeyDown&&(this.__getterCache.keyboardAction=void 0)}render(){const{isGridCompatibilityMode:e,rtlEnabled:t,visible:i,showPageSizeSelector:o,allowedPageSizesRef:s,pageSize:r,pageSizeChangedInternal:d,allowedPageSizes:c,infoTextRef:f,infoText:m,pageCount:v,pageIndex:C,itemCount:y,pagesRef:b,hasKnownLastPage:x,maxPagesCount:w,pageIndexChangedInternal:S,pagesCountText:D,showNavigationButtons:I,style:E,width:T,height:A,elementAttr:O,hint:P,disabled:k,tabIndex:M,accessKey:R,activeStateEnabled:L,focusStateEnabled:B,hoverStateEnabled:V}=this.props,F=(0,n.normalizeProps)((0,n.createComponentVNode)(2,a.Widget,_({rootElementRef:this.widgetRootElementRef,rtlEnabled:t,classes:this.getClasses(),visible:i,aria:this.getAria(),style:E,width:T,height:A,hint:P,disabled:k,tabIndex:M,accessKey:R,activeStateEnabled:L,focusStateEnabled:B,hoverStateEnabled:V},O,{children:[o&&(0,n.createComponentVNode)(2,p.PageSizeSelector,{rootElementRef:s,isLargeDisplayMode:this.getIsLargeDisplayMode(),pageSize:r,pageSizeChangedInternal:d,allowedPageSizes:c}),this.getPagesContainerVisible()&&(0,n.createVNode)(1,"div",l.PAGINATION_PAGES_CLASS,[this.getInfoVisible()&&(0,n.createComponentVNode)(2,h.InfoText,{rootElementRef:f,infoText:m,pageCount:v,pageIndex:C,itemCount:y}),this.getPageIndexSelectorVisible()&&(0,n.createVNode)(1,"div",l.PAGINATION_PAGE_INDEXES_CLASS,(0,n.createComponentVNode)(2,g.PageIndexSelector,{hasKnownLastPage:x,isLargeDisplayMode:this.getIsLargeDisplayMode(),maxPagesCount:w,pageCount:v,pageIndex:C,pageIndexChangedInternal:S,pagesCountText:D,showNavigationButtons:I,itemCount:y}),2,null,null,b)],0,{style:{visibility:this.getPagesContainerVisibility()}})]})));return(0,n.createComponentVNode)(2,u.PaginationConfigProvider,{isGridCompatibilityMode:e,children:F})}}t.PaginationContent=m,m.defaultProps=f},567:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectBox=t.NumberBoxDefaultProps=void 0;var n,o=i(81167),a=i(49714),s=(n=i(60695))&&n.__esModule?n:{default:n},r=i(10922),l=i(71027),d=i(90650),u=i(49916);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},c.apply(null,arguments)}const h=t.NumberBoxDefaultProps=c({},d.EditorDefaultProps,u.EditorStateDefaultProps,l.EditorLabelDefaultProps,{placeholder:"",hoverStateEnabled:!0,searchEnabled:!1,value:null,isReactComponentWrapper:!0});class p extends a.BaseInfernoComponent{constructor(){super(...arguments),this.state={},this.refs=null}get componentProps(){return this.props}render(){return(0,o.createComponentVNode)(2,r.DomComponentWrapper,{componentType:s.default,componentProps:this.componentProps,templateNames:["dropDownButtonTemplate","groupTemplate","itemTemplate"]})}}t.SelectBox=p,p.defaultProps=h},25435:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWidgetDefaultProps=void 0;t.BaseWidgetDefaultProps={className:"",activeStateEnabled:!1,disabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,tabIndex:0,visible:!0,rtlEnabled:!1}},71027:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.EditorLabelDefaultProps=void 0;var n=i(52071);t.EditorLabelDefaultProps={label:"",labelMode:(0,n.isMaterial)((0,n.current)())?"floating":"static"}},90650:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDefaultProps=void 0;var n=i(25435),o=i(34211);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}t.EditorDefaultProps=a({},n.BaseWidgetDefaultProps,{aria:o.WidgetDefaultProps.aria,classes:o.WidgetDefaultProps.classes,readOnly:!1,name:"",value:null,validationError:null,validationErrors:null,validationMessageMode:"auto",validationMessagePosition:"bottom",validationStatus:"valid",isValid:!0,isDirty:!1,inputAttr:{}})},49916:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.EditorStateDefaultProps=void 0;var n,o=(n=i(65951))&&n.__esModule?n:{default:n};t.EditorStateDefaultProps={hoverStateEnabled:!0,activeStateEnabled:!0,focusStateEnabled:"desktop"===o.default.real().deviceType&&!o.default.isSimulator()}},34211:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetDefaultProps=void 0;var n=i(28112);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}t.WidgetDefaultProps=o({},n.BaseWidgetDefaultProps,{_feedbackHideTimeout:400,_feedbackShowTimeout:30,cssText:"",aria:{},classes:"",name:"",addWidgetClass:!0})},71897:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.NumberBoxDefaultProps=t.NumberBox=void 0;var n,o=i(81167),a=i(49714),s=(n=i(48042))&&n.__esModule?n:{default:n},r=i(10922),l=i(71027),d=i(90650),u=i(49916);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},c.apply(null,arguments)}const h=t.NumberBoxDefaultProps=c({},d.EditorDefaultProps,u.EditorStateDefaultProps,l.EditorLabelDefaultProps,{value:0,isReactComponentWrapper:!0});class p extends a.BaseInfernoComponent{constructor(){super(...arguments),this.state={},this.refs=null}get componentProps(){return this.props}render(){return(0,o.createComponentVNode)(2,r.DomComponentWrapper,{componentType:s.default,componentProps:this.componentProps,templateNames:[]})}}t.NumberBox=p,p.defaultProps=h},49329:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PAGER_INFO_CLASS=t.InfoText=void 0;var n=i(81167),o=i(49714),a=i(54497),s=i(64522),r=i(4917);const l=t.PAGER_INFO_CLASS="dx-info",d={pageCount:s.PaginationDefaultProps.pageCount,pageIndex:s.PaginationDefaultProps.pageIndex,itemCount:s.PaginationDefaultProps.itemCount};class u extends o.BaseInfernoComponent{constructor(){super(...arguments),this.state={},this.refs=null,this.rootElementRef=(0,n.createRef)()}getInfoText(){return this.props.infoText??(0,r.getLocalizationMessage)(this.context,"dxPagination-infoText")}getText(){const{pageCount:e,pageIndex:t,itemCount:i}=this.props;return(0,a.format)(this.getInfoText(),(t+1).toString(),null==e?void 0:e.toString(),null==i?void 0:i.toString())}render(){return(0,n.createVNode)(1,"div",l,this.getText(),0,null,null,this.props.rootElementRef)}}t.InfoText=u,u.defaultProps=d},40340:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PageSizeLargeDefaultProps=t.PageSizeLarge=void 0;var n=i(81167),o=i(49714),a=i(54497),s=i(71312),r=i(54623),l=i(17286),d=i(64522),u=i(4917);const c=t.PageSizeLargeDefaultProps={allowedPageSizes:[],pageSize:d.PaginationDefaultProps.pageSize,pageSizeChangedInternal:d.PaginationDefaultProps.pageSizeChangedInternal};class h extends o.BaseInfernoComponent{constructor(e){super(e),this.state={},this.refs=null,this.__getterCache={pageSizesText:void 0},this.state={},this.onPageSizeChange=this.onPageSizeChange.bind(this)}getPageSizesText(){if(void 0!==this.__getterCache.pageSizesText)return this.__getterCache.pageSizesText;const e=(()=>{const{pageSize:e,allowedPageSizes:t}=this.props;return t.map(((t,i)=>{const{text:n,value:o}=t,l=o===e;return{className:(0,s.combineClasses)({[l?r.PAGINATION_SELECTED_PAGE_SIZE_CLASS:r.PAGINATION_PAGE_SIZE_CLASS]:!0,[r.FIRST_CHILD_CLASS]:0===i}),click:this.onPageSizeChange(o),label:(0,a.format)((0,u.getLocalizationMessage)(this.context,"dxPagination-pageSize"),o||(0,u.getLocalizationMessage)(this.context,"dxPagination-pageSizesAllText")),text:n}}))})();return this.__getterCache.pageSizesText=e,e}onPageSizeChange(e){return()=>(this.props.pageSizeChangedInternal(e),this.props.pageSize)}componentWillUpdate(e){(this.props.pageSize!==e.pageSize||this.props.allowedPageSizes!==e.allowedPageSizes||this.props.pageSizeChangedInternal!==e.pageSizeChangedInternal)&&(this.__getterCache.pageSizesText=void 0)}render(){return(0,n.createFragment)(this.getPageSizesText().map((e=>{let{text:t,className:i,label:o,click:a}=e;return(0,n.createComponentVNode)(2,l.LightButton,{className:i,label:o,onClick:a,children:t},t)})),0)}}t.PageSizeLarge=h,h.defaultProps=c},1542:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PageSizeSelector=void 0;var n=i(81167),o=i(49714),a=i(54623),s=i(64522),r=i(4917),l=i(40340),d=i(54892);const u={isLargeDisplayMode:!0,pageSize:s.PaginationDefaultProps.pageSize,pageSizeChangedInternal:s.PaginationDefaultProps.pageSizeChangedInternal,allowedPageSizes:s.PaginationDefaultProps.allowedPageSizes};class c extends o.InfernoComponent{constructor(e){super(e),this.state={},this.refs=null,this.rootElementRef=(0,n.createRef)(),this.htmlRef=(0,n.createRef)(),this.__getterCache={normalizedPageSizes:void 0},this.setRootElementRef=this.setRootElementRef.bind(this)}createEffects(){return[new o.InfernoEffect(this.setRootElementRef,[])]}setRootElementRef(){const{rootElementRef:e}=this.props;e&&(e.current=this.htmlRef.current)}getAllText(){return(0,r.getLocalizationMessage)(this.context,"dxPagination-pageSizesAllText")}getNormalizedPageSizes(){if(void 0!==this.__getterCache.normalizedPageSizes)return this.__getterCache.normalizedPageSizes;const e=this.props.allowedPageSizes.map((e=>"all"===e||0===e?{text:this.getAllText(),value:0}:{text:String(e),value:e}));return this.__getterCache.normalizedPageSizes=e,e}componentWillUpdate(e){super.componentWillUpdate(),this.props.allowedPageSizes!==e.allowedPageSizes&&(this.__getterCache.normalizedPageSizes=void 0)}render(){const e=this.getNormalizedPageSizes(),{pageSize:t,pageSizeChangedInternal:i,isLargeDisplayMode:o}=this.props;return(0,n.createVNode)(1,"div",a.PAGINATION_PAGE_SIZES_CLASS,[o&&(0,n.createComponentVNode)(2,l.PageSizeLarge,{allowedPageSizes:this.getNormalizedPageSizes(),pageSize:t,pageSizeChangedInternal:i}),!o&&(0,n.createComponentVNode)(2,d.PageSizeSmall,{parentRef:this.htmlRef,allowedPageSizes:e,pageSize:t,pageSizeChangedInternal:i})],0,null,null,this.htmlRef)}}t.PageSizeSelector=c,c.defaultProps=u},54892:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PageSizeSmall=void 0;var n=i(81167),o=i(49714),a=i(64522),s=i(567),r=i(19e3),l=i(4917),d=i(70267);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}const c=u({},{allowedPageSizes:[]},{pageSize:a.PaginationDefaultProps.pageSize,pageSizeChangedInternal:a.PaginationDefaultProps.pageSizeChangedInternal});class h extends o.InfernoComponent{constructor(e){super(e),this.state={minWidth:10},this.refs=null,this.updateWidth=this.updateWidth.bind(this)}componentWillUpdate(e,t,i){super.componentWillUpdate(e,t,i)}createEffects(){const e=[this.props,this.state.minWidth,this.props.pageSize,this.props.pageSizeChangedInternal,this.props.allowedPageSizes];return[new o.InfernoEffect(this.updateWidth,e)]}updateEffects(){var e;const t=[this.props,this.state.minWidth,this.props.pageSize,this.props.pageSizeChangedInternal,this.props.allowedPageSizes];null===(e=this._effects[0])||void 0===e||e.update(t)}updateWidth(){this.setState((e=>{var t;return{minWidth:(0,d.getElementMinWidth)(null===(t=this.props.parentRef)||void 0===t?void 0:t.current)||e.minWidth}}))}getWidth(){var e;return(0,r.calculateValuesFittedWidth)(this.state.minWidth,null===(e=this.props.allowedPageSizes)||void 0===e?void 0:e.map((e=>e.value)))}getInputAttributes(){return{"aria-label":(0,l.getLocalizationMessage)(this.context,"dxPagination-ariaPageSize")}}render(){const{allowedPageSizes:e,pageSize:t,pageSizeChangedInternal:i}=this.props;return(0,n.createComponentVNode)(2,s.SelectBox,{displayExpr:"text",valueExpr:"value",dataSource:e,value:t,valueChange:i,width:this.getWidth(),inputAttr:this.getInputAttributes()})}}t.PageSizeSmall=h,h.defaultProps=c},35853:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PagesLarge=void 0;var n=i(81167),o=i(49714),a=i(12274),s=i(64522),r=i(12363);const l={maxPagesCount:s.PaginationDefaultProps.maxPagesCount,pageCount:s.PaginationDefaultProps.pageCount,pageIndex:s.PaginationDefaultProps.pageIndex,pageIndexChangedInternal:s.PaginationDefaultProps.pageIndexChangedInternal};function d(e,t,i){switch(!0){case 1===e:return"high";case e+t===i-1:return"low";default:return"both"}}function u(e,t,i){let n=[],o=[];switch(i){case"none":n=[...e];break;case"both":n=[0,"low",...e,"high",t-1],o=e.slice(1,-1);break;case"high":n=[0,...e,"high",t-1],o=e.slice(0,-1);break;case"low":n=[0,"low",...e,t-1],o=e.slice(1)}return{slidingWindowIndexes:e,indexesForReuse:o,pageIndexes:n}}function c(e,t,i,n){const o=[];for(let i=0;i<t;i+=1)o.push(i+e);return u(o,i,n)}class h extends o.BaseInfernoComponent{constructor(e){super(e),this.state={},this.refs=null,this.canReuseSlidingWindow=this.canReuseSlidingWindow.bind(this),this.generatePageIndexes=this.generatePageIndexes.bind(this),this.isSlidingWindowMode=this.isSlidingWindowMode.bind(this),this.onPageClick=this.onPageClick.bind(this)}getConfig(){return this.context[a.ConfigContext.id]?this.context[a.ConfigContext.id]:a.ConfigContext.defaultValue}getSlidingWindowState(){const e=this.slidingWindowStateHolder;return e||{indexesForReuse:[],slidingWindowIndexes:[]}}canReuseSlidingWindow(e,t){const{indexesForReuse:i}=this.getSlidingWindowState(),n=i.slice(-1)[0]<e-1,o=i.includes(t);return n&&o}generatePageIndexes(){const{pageCount:e,pageIndex:t}=this.props;let i=0;const{slidingWindowIndexes:n}=this.getSlidingWindowState();i=t===n[0]?t-1:t===n[n.length-1]?t+2-4:t<4?1:t>=e-4?e-4-1:t-1;const o=c(i,4,e,d(i,4,e)),{pageIndexes:a}=o;return this.slidingWindowStateHolder=o,a}isSlidingWindowMode(){const{maxPagesCount:e,pageCount:t}=this.props;return t<=4||t<=e}onPageClick(e){this.props.pageIndexChangedInternal(e)}getPageIndexes(){const{pageCount:e}=this.props;if(this.isSlidingWindowMode())return c(0,e,e,"none").pageIndexes;if(this.canReuseSlidingWindow(e,this.props.pageIndex)){const{slidingWindowIndexes:t}=this.getSlidingWindowState();return u(t,e,d(t[0],4,e)).pageIndexes}return this.generatePageIndexes()}getPages(){var e;const{pageIndex:t}=this.props,i=e=>{const i="low"===e||"high"===e?null:{index:e,onClick:()=>this.onPageClick(e),selected:t===e};return{key:e.toString(),pageProps:i}},n=this.getPageIndexes();return(null!==(e=this.getConfig())&&void 0!==e&&e.rtlEnabled?[...n].reverse():n).map((e=>i(e)))}render(){const e=this.getPages().map((e=>{let{key:t,pageProps:i}=e;return i?(0,n.createComponentVNode)(2,r.Page,{index:i.index,selected:i.selected,onClick:i.onClick},t):(0,n.createVNode)(1,"div","dx-separator",". . .",16,null,t)}));return(0,n.createFragment)(e,0)}}t.PagesLarge=h,h.defaultProps=l},12363:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PageDefaultProps=t.Page=void 0;var n=i(81167),o=i(49714),a=i(54497),s=i(71312),r=i(54623),l=i(17286),d=i(4917);const u=t.PageDefaultProps={index:0,selected:!1,className:r.PAGINATION_PAGE_CLASS};class c extends o.BaseInfernoComponent{constructor(){super(...arguments),this.state={},this.refs=null}getLabel(){return(0,a.format)((0,d.getLocalizationMessage)(this.context,"dxPagination-page"),this.getValue())}getValue(){return this.props.index+1}getClassName(){return(0,s.combineClasses)({[`${this.props.className}`]:!!this.props.className,[r.PAGINATION_SELECTION_CLASS]:!!this.props.selected})}render(){return(0,n.createComponentVNode)(2,l.LightButton,{className:this.getClassName(),label:this.getLabel(),onClick:this.props.onClick,selected:this.props.selected,children:this.getValue()})}}t.Page=c,c.defaultProps=u},33494:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PageIndexSelector=t.PAGER_BUTTON_DISABLE_CLASS=void 0;var n=i(81167),o=i(49714),a=i(12274),s=i(17286),r=i(64522),l=i(4917),d=i(35853),u=i(70057);const c="dx-navigate-button",h="dx-prev-button",p="dx-next-button",g=t.PAGER_BUTTON_DISABLE_CLASS="dx-button-disable",_={nextEnabledClass:`${c} ${p}`,prevEnabledClass:`${c} ${h}`,nextDisabledClass:`${g} ${c} ${p}`,prevDisabledClass:`${g} ${c} ${h}`},f={next:"prev",prev:"next"};const m={isLargeDisplayMode:!0,maxPagesCount:r.PaginationDefaultProps.maxPagesCount,pageCount:r.PaginationDefaultProps.pageCount,pageIndex:r.PaginationDefaultProps.pageIndex,pageIndexChangedInternal:r.PaginationDefaultProps.pageIndexChangedInternal,showNavigationButtons:r.PaginationDefaultProps.showNavigationButtons,itemCount:r.PaginationDefaultProps.itemCount};class v extends o.BaseInfernoComponent{constructor(e){super(e),this.state={},this.refs=null,this.__getterCache={prevButtonProps:void 0,nextButtonProps:void 0},this.pageIndexChangedInternal=this.pageIndexChangedInternal.bind(this),this.getButtonProps=this.getButtonProps.bind(this),this.canNavigateToPage=this.canNavigateToPage.bind(this),this.getNextPageIndex=this.getNextPageIndex.bind(this),this.canNavigateTo=this.canNavigateTo.bind(this),this.navigateToPage=this.navigateToPage.bind(this)}getConfig(){return this.context[a.ConfigContext.id]?this.context[a.ConfigContext.id]:a.ConfigContext.defaultValue}pageIndexChangedInternal(e){this.canNavigateToPage(e)&&this.props.pageIndexChangedInternal(e)}getButtonProps(e){var t;const i=null!==(t=this.getConfig())&&void 0!==t&&t.rtlEnabled?f[e]:e,n=this.canNavigateTo(i);return{className:_[`${e}${n?"Enabled":"Disabled"}Class`],tabIndex:n?0:-1,navigate:()=>this.navigateToPage(i)}}canNavigateToPage(e){return this.props.hasKnownLastPage?e>=0&&e<=this.props.pageCount-1:e>=0}getNextPageIndex(e){return this.props.pageIndex+function(e){return"next"===e?1:-1}(e)}canNavigateTo(e){return this.canNavigateToPage(this.getNextPageIndex(e))}navigateToPage(e){this.pageIndexChangedInternal(this.getNextPageIndex(e))}getRenderPrevButton(){const{isLargeDisplayMode:e,showNavigationButtons:t}=this.props;return(!e||t)??!1}getRenderNextButton(){return this.getRenderPrevButton()||!this.props.hasKnownLastPage}getPrevButtonProps(){if(void 0!==this.__getterCache.prevButtonProps)return this.__getterCache.prevButtonProps;const e=(()=>this.getButtonProps("prev"))();return this.__getterCache.prevButtonProps=e,e}getNextButtonProps(){if(void 0!==this.__getterCache.nextButtonProps)return this.__getterCache.nextButtonProps;const e=(()=>this.getButtonProps("next"))();return this.__getterCache.nextButtonProps=e,e}componentWillUpdate(e,t,i){(this.context[a.ConfigContext.id]!==i[a.ConfigContext.id]||this.props.hasKnownLastPage!==e.hasKnownLastPage||this.props.pageCount!==e.pageCount||this.props.pageIndex!==e.pageIndex||this.props.pageIndexChangedInternal!==e.pageIndexChangedInternal)&&(this.__getterCache.prevButtonProps=void 0,this.__getterCache.nextButtonProps=void 0)}getPrevButtonLabel(){return(0,l.getLocalizationMessage)(this.context,"dxPagination-prevPage")}getNextButtonLabel(){return(0,l.getLocalizationMessage)(this.context,"dxPagination-nextPage")}render(){const{className:e,tabIndex:t,navigate:i}=this.getPrevButtonProps(),{isLargeDisplayMode:o,maxPagesCount:a,pageCount:r,pageIndex:l,pagesCountText:c}=this.props;return(0,n.createFragment)([this.getRenderPrevButton()&&(0,n.createComponentVNode)(2,s.LightButton,{label:this.getPrevButtonLabel(),className:e,tabIndex:t,onClick:i}),o&&(0,n.createComponentVNode)(2,d.PagesLarge,{maxPagesCount:a,pageCount:r,pageIndex:l,pageIndexChangedInternal:this.pageIndexChangedInternal}),!o&&(0,n.createComponentVNode)(2,u.PagesSmall,{pageCount:r,pageIndex:l,pageIndexChangedInternal:this.pageIndexChangedInternal,pagesCountText:c}),this.getRenderNextButton()&&(0,n.createComponentVNode)(2,s.LightButton,{label:this.getNextButtonLabel(),className:this.getNextButtonProps().className,tabIndex:this.getNextButtonProps().tabIndex,onClick:this.getNextButtonProps().navigate})],0)}}t.PageIndexSelector=v,v.defaultProps=m},70057:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PaginationSmallDefaultProps=t.PagesSmall=void 0;var n=i(81167),o=i(49714),a=i(64522),s=i(71897),r=i(49329),l=i(19e3),d=i(4917),u=i(70267),c=i(12363);const h=`${r.PAGER_INFO_CLASS}  dx-info-text`,p="dx-page-index",g=t.PaginationSmallDefaultProps={pageIndex:a.PaginationDefaultProps.pageIndex,pageCount:a.PaginationDefaultProps.pageCount,pageIndexChangedInternal:a.PaginationDefaultProps.pageIndexChangedInternal};class _ extends o.InfernoComponent{constructor(e){super(e),this.state={minWidth:10},this.refs=null,this.pageIndexRef=(0,n.createRef)(),this.updateWidth=this.updateWidth.bind(this),this.selectLastPageIndex=this.selectLastPageIndex.bind(this),this.valueChange=this.valueChange.bind(this)}componentWillUpdate(e,t,i){super.componentWillUpdate(e,t,i)}createEffects(){return[new o.InfernoEffect(this.updateWidth,[this.state.minWidth])]}updateEffects(){var e;null===(e=this._effects[0])||void 0===e||e.update([this.state.minWidth])}updateWidth(){var e;const t=null===(e=this.pageIndexRef.current)||void 0===e?void 0:e.querySelector(`.${p}`);this.setState((e=>({minWidth:t&&(0,u.getElementMinWidth)(t)||e.minWidth})))}getValue(){return this.props.pageIndex+1}getWidth(){return(0,l.calculateValuesFittedWidth)(this.state.minWidth,[this.props.pageCount])}getPagesCountText(){return(this.props.pagesCountText??"")||(0,d.getLocalizationMessage)(this.context,"dxPagination-pagesCountText")}getInputAttributes(){return{"aria-label":(0,d.getLocalizationMessage)(this.context,"dxPagination-ariaPageNumber")}}selectLastPageIndex(){this.props.pageIndexChangedInternal(this.props.pageCount-1)}valueChange(e){this.props.pageIndexChangedInternal(e-1)}render(){return(0,n.createVNode)(1,"div","dx-light-pages",[(0,n.createComponentVNode)(2,s.NumberBox,{className:p,min:1,max:Math.max(this.props.pageCount,this.getValue()),width:this.getWidth(),value:this.getValue(),valueChange:this.valueChange,inputAttr:this.getInputAttributes()}),(0,n.createVNode)(1,"span",h,this.getPagesCountText(),0),(0,n.createComponentVNode)(2,c.Page,{className:"dx-pages-count",selected:!1,index:this.props.pageCount-1,onClick:this.selectLastPageIndex})],4,null,null,this.pageIndexRef)}}t.PagesSmall=_,_.defaultProps=g},94585:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Pagination=void 0;var n=i(81167),o=i(49714),a=i(71312),s=i(64522),r=i(62388),l=i(30980),d=i(4917);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}class c extends o.InfernoWrapperComponent{constructor(e){super(e),this.__getterCache={},this.pageIndexChangedInternal=this.pageIndexChangedInternal.bind(this),this.pageSizeChangedInternal=this.pageSizeChangedInternal.bind(this)}createEffects(){return[(0,o.createReRenderEffect)()]}pageIndexChangedInternal(e){const t=e+1;this.setState((()=>({pageIndex:t}))),this.props.pageIndexChangedInternal(t)}getPageIndex(){return this.props.pageIndex-1}pageSizeChangedInternal(e){this.setState((()=>({pageSize:e}))),this.props.pageSizeChangedInternal(e)}getClassName(){return(0,a.combineClasses)({"dx-datagrid-pager":(0,d.isGridCompatibilityMode)(this.context),[`${this.props.className}`]:!!this.props.className})}getPaginationProps(){return u({},this.props,{className:this.getClassName(),pageIndex:this.getPageIndex(),pageIndexChangedInternal:e=>this.pageIndexChangedInternal(e),pageSizeChangedInternal:e=>this.pageSizeChangedInternal(e)})}render(){return(0,n.createComponentVNode)(2,l.ResizableContainer,{contentTemplate:r.PaginationContent,paginationProps:this.getPaginationProps()})}}t.Pagination=c,c.defaultProps=s.PaginationDefaultProps},30980:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ResizableContainerDefaultProps=t.ResizableContainer=void 0,t.calculateInfoTextVisible=h,t.calculateLargeDisplayMode=c;var n,o=i(81167),a=i(49714),s=(n=i(63283))&&n.__esModule?n:{default:n},r=i(11528),l=i(64522),d=i(70267);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}function c(e){let{parent:t,allowedPageSizes:i,pages:n}=e;return t-(i+n)>0}function h(e){let{parent:t,allowedPageSizes:i,pages:n,info:o}=e;return t-(i+n+o)>0}const p=t.ResizableContainerDefaultProps={paginationProps:u({},l.PaginationDefaultProps)};class g extends a.InfernoComponent{constructor(e){super(e),this.state={infoTextVisible:!0,isLargeDisplayMode:!0},this.refs=null,this.parentRef=(0,o.createRef)(),this.infoTextRef=(0,o.createRef)(),this.pagesRef=(0,o.createRef)(),this.allowedPageSizesRef=(0,o.createRef)(),this.elementsWidth={},this.actualIsLargeDisplayMode=!0,this.actualInfoTextVisible=!0,this.subscribeToResize=this.subscribeToResize.bind(this),this.effectUpdateChildProps=this.effectUpdateChildProps.bind(this),this.updateAdaptivityProps=this.updateAdaptivityProps.bind(this)}componentWillUpdate(e,t,i){super.componentWillUpdate(e,t,i)}createEffects(){return[new a.InfernoEffect(this.subscribeToResize,[this.state.infoTextVisible,this.state.isLargeDisplayMode]),new a.InfernoEffect(this.effectUpdateChildProps,[this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.paginationProps,this.props.contentTemplate])]}updateEffects(){var e,t;null===(e=this._effects[0])||void 0===e||e.update([this.state.infoTextVisible,this.state.isLargeDisplayMode]),null===(t=this._effects[1])||void 0===t||t.update([this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.paginationProps,this.props.contentTemplate])}subscribeToResize(){const e=()=>{this.getParentWidth()>0&&this.updateAdaptivityProps()};return s.default.add(e),()=>{s.default.remove(e)}}effectUpdateChildProps(){this.getParentWidth()>0&&this.updateAdaptivityProps()}getContentAttributes(){const{className:e,displayMode:t,isGridCompatibilityMode:i,hasKnownLastPage:n,infoText:o,label:a,lightModeEnabled:s,maxPagesCount:r,onKeyDown:l,pageCount:d,pageIndex:u,pageIndexChangedInternal:c,pageSize:h,pageSizeChangedInternal:p,allowedPageSizes:g,pagesCountText:_,pagesNavigatorVisible:f,rtlEnabled:m,showInfo:v,showNavigationButtons:C,showPageSizeSelector:y,itemCount:b,visible:x,style:w,width:S,height:D,elementAttr:I,hint:E,disabled:T,tabIndex:A,accessKey:O,activeStateEnabled:P,focusStateEnabled:k,hoverStateEnabled:M}=this.props.paginationProps;return{pageSize:h,pageIndex:u,pageIndexChangedInternal:c,pageSizeChangedInternal:p,isGridCompatibilityMode:i,className:e,showInfo:v,infoText:o,lightModeEnabled:s,displayMode:t,maxPagesCount:r,pageCount:d,pagesCountText:_,visible:x,hasKnownLastPage:n,pagesNavigatorVisible:f,showPageSizeSelector:y,allowedPageSizes:g,rtlEnabled:m,showNavigationButtons:C,itemCount:b,onKeyDown:l,label:a,style:w,width:S,height:D,elementAttr:I,hint:E,disabled:T,tabIndex:A,accessKey:O,activeStateEnabled:P,focusStateEnabled:k,hoverStateEnabled:M}}getParentWidth(){var e;return null!==(e=this.parentRef)&&void 0!==e&&e.current?(0,d.getElementWidth)(this.parentRef.current):0}updateAdaptivityProps(){var e,t,i,n;const o=function(e){let{parent:t,allowedPageSizes:i,pages:n,info:o}=e;const a=(0,d.getElementContentWidth)(t),s=(0,d.getElementWidth)(i),r=(0,d.getElementWidth)(o),l=(0,d.getElementWidth)(n);return{parent:a,allowedPageSizes:s,info:r+(0,d.getElementStyle)("marginLeft",o)+(0,d.getElementStyle)("marginRight",o),pages:l}}({parent:null===(e=this.parentRef)||void 0===e?void 0:e.current,allowedPageSizes:null===(t=this.allowedPageSizesRef)||void 0===t?void 0:t.current,info:null===(i=this.infoTextRef)||void 0===i?void 0:i.current,pages:null===(n=this.pagesRef)||void 0===n?void 0:n.current});if(this.actualInfoTextVisible!==this.state.infoTextVisible||this.actualIsLargeDisplayMode!==this.state.isLargeDisplayMode)return;const a=!(0,r.isDefined)(this.elementsWidth);a&&(this.elementsWidth={}),(a||this.state.isLargeDisplayMode)&&(this.elementsWidth.allowedPageSizes=o.allowedPageSizes,this.elementsWidth.pages=o.pages),(a||this.state.infoTextVisible)&&(this.elementsWidth.info=o.info),this.actualIsLargeDisplayMode=c({parent:o.parent,allowedPageSizes:this.elementsWidth.allowedPageSizes,pages:this.elementsWidth.pages}),this.actualInfoTextVisible=h(u({},o,{info:this.elementsWidth.info})),this.setState((()=>({infoTextVisible:this.actualInfoTextVisible}))),this.setState((()=>({isLargeDisplayMode:this.actualIsLargeDisplayMode})))}render(){const{infoTextVisible:e,isLargeDisplayMode:t}=this.state,{props:{contentTemplate:i}}=this;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i,u({rootElementRef:this.parentRef,allowedPageSizesRef:this.allowedPageSizesRef,infoTextRef:this.infoTextRef,pagesRef:this.pagesRef,infoTextVisible:e,isLargeDisplayMode:t},this.getContentAttributes())))}}t.ResizableContainer=g,g.defaultProps=p},19e3:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateValuesFittedWidth=function(e,t){return e+i*Math.max(...t).toString().length},t.oneDigitWidth=void 0;const i=t.oneDigitWidth=10},4917:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalizationMessage=function(e,t){let i=t;s(e)&&(i=t.replace("dxPagination","dxPager"));return o.default.getFormatter(i)()},t.isGridCompatibilityMode=s;var n,o=(n=i(4671))&&n.__esModule?n:{default:n},a=i(32576);function s(e){var t;return!(null===(t=function(e){return e[a.PaginationConfigContext.id]?e[a.PaginationConfigContext.id]:a.PaginationConfigContext.defaultValue}(e))||void 0===t||!t.isGridCompatibilityMode)}},70267:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getElementContentWidth=function(e){const t=s("paddingLeft",e)+s("paddingRight",e);return s("width",e)-t},t.getElementMinWidth=function(e){return s("minWidth",e)},t.getElementStyle=s,t.getElementWidth=function(e){const t=s("marginLeft",e)+s("marginRight",e),i=s("width",e);return t+i};var n,o=(n=i(31006))&&n.__esModule?n:{default:n},a=i(7529);function s(e,t){const i=(0,o.default)(t)??{};return(0,a.toNumber)(i[e])}},28462:function(e,t){function i(e,t){return e>0&&t>0?Math.max(1,Math.ceil(t/e)):1}Object.defineProperty(t,"__esModule",{value:!0}),t.validateOptions=function(e,t,n){const o=function(e){if(e<1)return 1;return e}(e),a=function(e){if(e<0)return 0;return e}(n),s=i(o,n),r=function(e,t,n){if(e<1)return 1;const o=i(t,n);return Math.min(e,o)}(t,o,a);return{pageSize:o,pageIndex:r,itemCount:a,pageCount:s}}},76988:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(94585),o=i(16952);class a extends o.PaginationWrapper{getProps(){const e=super.getProps();return e.onKeyDown=this._wrapKeyDownHandler(e.onKeyDown),e}get _propsInfo(){return{twoWay:[["pageSize","defaultPageSize","pageSizeChangedInternal","pageSizeChanged"],["pageIndex","defaultPageIndex","pageIndexChangedInternal","pageIndexChanged"]],allowNull:[],elements:[],templates:[],props:["defaultPageSize","pageSizeChanged","pageSizeChangedInternal","defaultPageIndex","pageIndexChanged","pageIndexChangedInternal","isGridCompatibilityMode","className","showInfo","infoText","lightModeEnabled","displayMode","maxPagesCount","pageCount","pagesCountText","visible","hasKnownLastPage","pagesNavigatorVisible","showPageSizeSelector","allowedPageSizes","rtlEnabled","showNavigationButtons","itemCount","label","onKeyDown","pageSize","pageIndex","width","height","elementAttr","hint","disabled","tabIndex","accessKey","activeStateEnabled","focusStateEnabled","hoverStateEnabled","_skipValidation"]}}get _viewComponent(){return n.Pagination}}t.default=a},16952:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PaginationWrapper=void 0;var n=i(34993),o=i(28462);const a=["pageSize","pageIndex","itemCount"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}class r extends n.ComponentWrapper{_optionChanged(e){switch(e.name){case"pageIndex":{const t=this.option("pageIndexChanged");t&&t(e.value);break}case"pageSize":{const t=this.option("pageSizeChanged");t&&t(e.value);break}}super._optionChanged(e)}getPageCount(){return this.option("pageCount")}_validateOptions(e){if(e._skipValidation||this.option("_skipValidation"))return e;const t=super._validateOptions(e);let{pageSize:i,pageIndex:n,itemCount:r}=t,l=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(t,a);void 0===i&&(i=this.option("pageSize")),void 0===n&&(n=this.option("pageIndex")),void 0===r&&(r=this.option("itemCount"));return s({},l,(0,o.validateOptions)(i,n,r))}}t.PaginationWrapper=r},8107:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AppointmentForm=t.APPOINTMENT_FORM_GROUP_NAMES=void 0,i(84056),i(23116),i(4575),i(91029),i(60695);var n=f(i(4671)),o=f(i(14479)),a=f(i(65951)),s=f(i(64553)),r=f(i(41380)),l=f(i(71051)),d=i(52576),u=f(i(74075)),c=i(52071),h=i(26012),p=i(90023),g=i(66823),_=f(i(18648));function f(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(null,arguments)}const v=t.APPOINTMENT_FORM_GROUP_NAMES={Main:"mainGroup",Recurrence:"recurrenceGroup"},C="e2e-dx-scheduler-form",y="e2e-dx-scheduler-form-text",b="e2e-dx-scheduler-form-description",x="e2e-dx-scheduler-form-start-date",w="e2e-dx-scheduler-form-end-date",S="e2e-dx-scheduler-form-start-date-timezone",D="e2e-dx-scheduler-form-end-date-timezone",I="e2e-dx-scheduler-form-all-day-switch",E="e2e-dx-scheduler-form-recurrence-switch",T=()=>(0,c.isFluent)((0,c.current)())?"filled":void 0;t.AppointmentForm=class{constructor(e){this.scheduler=e,this.form=null,this.semaphore=new p.Semaphore}get dxForm(){return this.form}set readOnly(e){this.form.option("readOnly",e);const{recurrenceRuleExpr:t}=this.scheduler.getDataAccessors().expr,i=this.form.getEditor(t);null==i||i.option("readOnly",e)}get formData(){return this.form.option("formData")}set formData(e){this.form.option("formData",e)}create(e,t,i){const{allowTimeZoneEditing:n}=this.scheduler.getEditingConfig(),o=this.scheduler.getDataAccessors(),{expr:r}=o,l=!!h.ExpressionUtils.getField(o,"recurrenceRule",i),d=l?1:2,c=[...this._createMainItems(r,e,t,n),...this.scheduler.createResourceEditorModel()];t(l);const p=[{itemType:"group",name:v.Main,colCountByScreen:{lg:2,xs:1},colSpan:d,items:c},{itemType:"group",name:v.Recurrence,visible:l,colSpan:d,items:this._createRecurrenceEditor(r)}],g=(0,s.default)("<div>");this.scheduler.createComponent(g,u.default,{items:p,showValidationSummary:!0,scrollingEnabled:!0,colCount:"auto",colCountByScreen:{lg:2,xs:1},formData:i,showColonAfterLabel:!1,labelLocation:"top",onInitialized:e=>{this.form=e.component},customizeItem:e=>{if(this.form&&"group"===e.itemType){const t=this.scheduler.getDataAccessors().expr,i=new Date(this.formData[t.startDateExpr]),n=new Date(this.formData[t.endDateExpr]),o=e.items.find((e=>e.dataField===t.startDateTimeZoneExpr)),a=e.items.find((e=>e.dataField===t.endDateTimeZoneExpr));o&&(o.editorOptions.dataSource=this.createTimeZoneDataSource(i)),a&&(a.editorOptions.dataSource=this.createTimeZoneDataSource(n))}},screenByWidth:e=>e<600||"desktop"!==a.default.current().deviceType?"xs":"lg",elementAttr:{class:C}})}createTimeZoneDataSource(e){return new o.default({store:_.default.getTimeZones(e),paginate:!0,pageSize:10})}_createAppointmentAdapter(e){return(0,g.createAppointmentAdapter)(e,this.scheduler.getDataAccessors())}_dateBoxValueChanged(e,t,i){((e,t,i)=>{null!==t&&!t&&(null===i||i)&&e.option("value",i)})(e.component,e.value,e.previousValue);const n=l.default.deserializeDate(e.value),o=l.default.deserializeDate(e.previousValue),a=this.form.getEditor(t),s=l.default.deserializeDate(a.option("value"));if(this.semaphore.isFree()&&s&&n&&i(s,n)){const e=o?s.getTime()-o.getTime():0;a.option("value",new Date(n.getTime()+e))}}_createTimezoneEditor(e,t,i,o,a,s){let r=arguments.length>6&&void 0!==arguments[6]&&arguments[6];const l=n.default.format("dxScheduler-noTimezoneTitle");return{name:this.normalizeEditorName(e),dataField:e,editorType:"dxSelectBox",visibleIndex:i,colSpan:o,cssClass:s,label:{text:" "},editorOptions:{displayExpr:"title",valueExpr:"id",placeholder:l,searchEnabled:!0,onValueChanged:e=>{const{form:i}=this,n=i.getEditor(t);a&&n.option("value",e.value)}},visible:r}}_createDateBoxItems(e,t){const i=t?2:1,n=this.scheduler.getFirstDayOfWeek();return[this.createDateBoxEditor(e.startDateExpr,i,n,"dxScheduler-editorLabelStartDate",x,(t=>{this._dateBoxValueChanged(t,e.endDateExpr,((e,t)=>e<t))})),this._createTimezoneEditor(e.startDateTimeZoneExpr,e.endDateTimeZoneExpr,1,i,!0,S,t),this.createDateBoxEditor(e.endDateExpr,i,n,"dxScheduler-editorLabelEndDate",w,(t=>{this._dateBoxValueChanged(t,e.startDateExpr,((e,t)=>t<e))})),this._createTimezoneEditor(e.endDateTimeZoneExpr,e.startDateTimeZoneExpr,3,i,!1,D,t)]}_changeFormItemDateType(e,t,i){const n=this.getEditorPath(e,t),o=m({},this.form.itemOption(n).editorOptions,{type:i?"date":"datetime"});this.form.itemOption(n,"editorOptions",o)}_createMainItems(e,t,i,o){return[{name:this.normalizeEditorName(e.textExpr),dataField:e.textExpr,cssClass:y,editorType:"dxTextBox",colSpan:2,label:{text:n.default.format("dxScheduler-editorLabelTitle")},editorOptions:{stylingMode:T()}},{itemType:"group",colSpan:2,colCountByScreen:{lg:2,xs:1},items:this._createDateBoxItems(e,o)},{itemType:"group",colSpan:2,colCountByScreen:{lg:2,xs:2},items:[{name:this.normalizeEditorName(e.allDayExpr),dataField:e.allDayExpr,cssClass:`dx-appointment-form-switch ${I}`,editorType:"dxSwitch",label:{text:n.default.format("dxScheduler-allDay"),location:"right"},editorOptions:{onValueChanged:t=>{const{value:i}=t,n=this.form.getEditor(e.startDateExpr),o=this.form.getEditor(e.endDateExpr),a=l.default.deserializeDate(n.option("value"));if(this.semaphore.isFree()&&a)if(i){const e=r.default.trimTime(a);n.option("value",new Date(e)),o.option("value",new Date(e))}else{const e=((e,t)=>new Date(new Date(e).setHours(t)))(a,this.scheduler.getStartDayHour()),t=this.scheduler.getCalculatedEndDate(e);n.option("value",e),o.option("value",t)}this._changeFormItemDateType(e.startDateExpr,"Main",i),this._changeFormItemDateType(e.endDateExpr,"Main",i)}}},{editorType:"dxSwitch",dataField:"repeat",cssClass:`dx-appointment-form-switch ${E}`,name:"visibilityChanged",label:{text:n.default.format("dxScheduler-editorLabelRecurrence"),location:"right"},editorOptions:{onValueChanged:n=>{const{form:o}=this,a=n.value?1:2;o.itemOption(v.Main,"colSpan",a),o.itemOption(v.Recurrence,"colSpan",a),((e,t,i)=>{var n;i.itemOption(v.Recurrence,"visible",t),null===(n=i.getEditor(e))||void 0===n||n.changeValueByVisibility(t)})(e.recurrenceRuleExpr,n.value,o),i(n.value),t()}}}]},{itemType:"empty",colSpan:2},{name:this.normalizeEditorName(e.descriptionExpr),dataField:e.descriptionExpr,cssClass:b,editorType:"dxTextArea",colSpan:2,label:{text:n.default.format("dxScheduler-editorLabelDescription")},editorOptions:{stylingMode:T()}},{itemType:"empty",colSpan:2}]}_createRecurrenceEditor(e){return[{name:this.normalizeEditorName(e.recurrenceRuleExpr),dataField:e.recurrenceRuleExpr,editorType:"dxRecurrenceEditor",editorOptions:{firstDayOfWeek:this.scheduler.getFirstDayOfWeek(),timeZoneCalculator:this.scheduler.getTimeZoneCalculator(),getStartDateTimeZone:()=>this._createAppointmentAdapter(this.formData).startDateTimeZone},label:{text:" ",visible:!1}}]}setEditorsType(e){const{startDateExpr:t,endDateExpr:i}=this.scheduler.getDataAccessors().expr,n=this.getEditorPath(t,"Main"),o=this.getEditorPath(i,"Main"),a=this.form.itemOption(n),s=this.form.itemOption(o);if(a&&s){const t=a.editorOptions,i=s.editorOptions;t.type=i.type=e?"date":"datetime",this.form.itemOption(n,"editorOptions",t),this.form.itemOption(o,"editorOptions",i)}}updateRecurrenceEditorStartDate(e,t){const i={startDate:e};this.setEditorOptions(t,"Recurrence",i)}setEditorOptions(e,t,i){const n=this.getEditorPath(e,t),o=this.form.itemOption(n);o&&this.form.itemOption(n,"editorOptions",(0,d.extend)({},o.editorOptions,i))}setTimeZoneEditorDataSource(e,t){const i=this.createTimeZoneDataSource(e);this.setEditorOptions(t,"Main",{dataSource:i})}updateFormData(e){this.semaphore.take(),this.form.option("formData",e);const t=this.scheduler.getDataAccessors(),{expr:i}=t,n=h.ExpressionUtils.getField(t,"startDate",e),o=h.ExpressionUtils.getField(t,"endDate",e),a=h.ExpressionUtils.getField(t,"allDay",e),s=new Date(n),r=new Date(o);this.setTimeZoneEditorDataSource(s,i.startDateTimeZoneExpr),this.setTimeZoneEditorDataSource(r,i.endDateTimeZoneExpr),this.updateRecurrenceEditorStartDate(s,i.recurrenceRuleExpr),this.setEditorsType(a),this.semaphore.release()}createDateBoxEditor(e,t,i,o,a,s){return{editorType:"dxDateBox",name:this.normalizeEditorName(e),dataField:e,colSpan:t,cssClass:a,label:{text:n.default.format(o)},validationRules:[{type:"required"}],editorOptions:{stylingMode:T(),width:"100%",calendarOptions:{firstDayOfWeek:i},onValueChanged:s,useMaskBehavior:!0}}}getEditorPath(e,t){const i=this.normalizeEditorName(e);return`${v[t]}.${i}`}normalizeEditorName(e){return e?e.replace(/\./g,"_"):e}}},27483:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AppointmentPopup=t.ACTION_TO_APPOINTMENT=void 0;var n=i(18029),o=_(i(4671)),a=_(i(65951)),s=_(i(64553)),r=_(i(41380)),l=i(87739),d=_(i(10720)),u=i(26012),c=i(8181),h=i(66823),p=i(73922),g=i(45629);function _(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},f.apply(null,arguments)}const m=r.default.dateToMilliseconds,v="dx-scheduler-appointment-popup",C=m("day"),y={height:"auto",maxHeight:"100%",showCloseButton:!1,showTitle:!1,preventScrollEvents:!1,enableBodyScroll:!1,defaultOptionsRules:[{device:()=>a.default.current().android,options:{showTitle:!1}}],_ignorePreventScrollEventsDeprecation:!0},b=t.ACTION_TO_APPOINTMENT={CREATE:0,UPDATE:1,EXCLUDE_FROM_SERIES:2};t.AppointmentPopup=class{constructor(e,t){this.scheduler=e,this.form=t,this.popup=null,this.state={action:null,lastEditData:null,saveChangesLocker:!1,appointment:{data:null}}}get visible(){return!!this.popup&&this.popup.option("visible")}show(e,t){if(this.state.appointment.data=e,this.state.action=t.action,this.state.excludeInfo=t.excludeInfo,!this.popup){const e=this._createPopupConfig();this.popup=this._createPopup(e)}this.popup.option("toolbarItems",(0,c.getPopupToolbarItems)(t.isToolbarVisible,(e=>this._doneButtonClickHandler(e)))),this.popup.show()}hide(){this.popup.hide()}dispose(){var e;null===(e=this.popup)||void 0===e||e.$element().remove()}_createPopup(e){const t=(0,s.default)("<div>").addClass(v).appendTo(this.scheduler.getElement());return this.scheduler.createComponent(t,d.default,e)}_createPopupConfig(){return f({},y,{onHiding:()=>this.scheduler.focus(),contentTemplate:()=>this._createPopupContent(),onShowing:e=>this._onShowing(e),wrapperAttr:{class:v}})}_onShowing(e){this._updateForm(),e.component.$overlayContent().attr("aria-label",o.default.format("dxScheduler-ariaEditForm"));const t={form:this.form.dxForm,popup:this.popup,appointmentData:this.state.appointment.data,cancel:!1};this.scheduler.getAppointmentFormOpening()(t),this.scheduler.processActionResult(t,(t=>{t?e.cancel=!0:this.updatePopupFullScreenMode()}))}_createPopupContent(){return this._createForm(),this.form.dxForm.$element()}_createFormData(e){const t=this._createAppointmentAdapter(e),i=this.scheduler.getDataAccessors(),n=this.scheduler.getResources();return f({},e,(0,g.getNormalizedResources)(e,i,n),{repeat:!!t.recurrenceRule})}_createForm(){const e=this.state.appointment.data,t=this._createFormData(e);this.form.create(this.triggerResize.bind(this),this.changeSize.bind(this),t)}_isReadOnly(e){const t=this._createAppointmentAdapter(e);return!(!e||!t.disabled)||this.state.action!==b.CREATE&&!this.scheduler.getEditingConfig().allowUpdating}_createAppointmentAdapter(e){return(0,h.createAppointmentAdapter)(e,this.scheduler.getDataAccessors(),this.scheduler.getTimeZoneCalculator())}_updateForm(){const{data:e}=this.state.appointment,t=this._createAppointmentAdapter(this._createFormData(e));t.startDate&&(t.startDate=t.calculateStartDate("toAppointment")),t.endDate&&(t.endDate=t.calculateEndDate("toAppointment"));const i=t.clone().source();this.form.readOnly=this._isReadOnly(i),this.form.updateFormData(i)}triggerResize(){this.popup&&(0,n.triggerResizeEvent)(this.popup.$element())}changeSize(e){if(this.popup){const t=(0,c.isPopupFullScreenNeeded)(),i=t?"100%":(0,c.getMaxWidth)(e);this.popup.option("fullScreen",t),this.popup.option("maxWidth",i)}}updatePopupFullScreenMode(){if(this.form.dxForm&&this.visible){const{formData:e}=this.form,t=this.scheduler.getDataAccessors(),i=u.ExpressionUtils.getField(t,"recurrenceRule",e);this.changeSize(i)}}saveChangesAsync(e){const t=new l.Deferred,i=this.form.dxForm.validate();return e&&this._showLoadPanel(),(0,l.when)(i&&i.complete||i).done((e=>{if(e&&!e.isValid)return(0,p.hide)(),void t.resolve(!1);const{repeat:i}=this.form.formData,n=this._createAppointmentAdapter(this.form.formData),o=n.clone({pathTimeZone:"fromAppointment"}),a=!i&&!!o.recurrenceRule;this._addMissingDSTTime(n,o),a&&(o.recurrenceRule="");const s=o.source();switch(delete s.repeat,this.state.action){case b.CREATE:this.scheduler.addAppointment(s).done(t.resolve);break;case b.UPDATE:this.scheduler.updateAppointment(this.state.appointment.data,s).done(t.resolve);break;case b.EXCLUDE_FROM_SERIES:this.scheduler.updateAppointment(this.state.excludeInfo.sourceAppointment,this.state.excludeInfo.updatedAppointment),this.scheduler.addAppointment(s).done(t.resolve)}t.done((()=>{(0,p.hide)(),this.state.lastEditData=s}))})),t.promise()}_doneButtonClickHandler(e){e.cancel=!0,this.saveEditDataAsync()}saveEditDataAsync(){const e=new l.Deferred;return this._tryLockSaveChanges()&&(0,l.when)(this.saveChangesAsync(!0)).done((()=>{if(this.state.lastEditData){const e=this._createAppointmentAdapter(this.state.lastEditData),{startDate:t,endDate:i,allDay:n}=e,o=t.getTime(),a=i.getTime(),s=n||a-o>=C,r=this.scheduler.getDataAccessors(),l=this.scheduler.getResources(),d=(0,g.getNormalizedResources)(this.state.lastEditData,r,l);this.scheduler.updateScrollPosition(t,d,s),this.state.lastEditData=null}this._unlockSaveChanges(),e.resolve()})),e.promise()}_showLoadPanel(){const e=this.popup.$overlayContent();(0,p.show)({container:e,position:{of:e}})}_tryLockSaveChanges(){return!1===this.state.saveChangesLocker&&(this.state.saveChangesLocker=!0,!0)}_unlockSaveChanges(){this.state.saveChangesLocker=!1}_addMissingDSTTime(e,t){const i=this.scheduler.getTimeZoneCalculator();t.startDate=this._addMissingDSTShiftToDate(i,e.startDate,t.startDate),t.endDate&&(t.endDate=this._addMissingDSTShiftToDate(i,e.endDate,t.endDate))}_addMissingDSTShiftToDate(e,t,i){var n,o;const a=(null===(n=e.getOffsets(t))||void 0===n?void 0:n.common)-(null===(o=e.getOffsets(i))||void 0===o?void 0:o.common);return a?new Date(i.getTime()+a*m("hour")):i}}},64836:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AppointmentDataProvider=void 0;var n,o=(n=i(66636))&&n.__esModule?n:{default:n},a=i(78133),s=i(12524),r=i(42648);const l="virtual",d="standard";t.AppointmentDataProvider=class{constructor(e){this.options=e,this.dataSource=this.options.dataSource,this.dataAccessors=this.options.dataAccessors,this.timeZoneCalculator=this.options.timeZoneCalculator,this.appointmentDataSource=new s.AppointmentDataSource(this.dataSource),this.initFilterStrategy()}get keyName(){return this.appointmentDataSource.keyName}get isDataSourceInit(){return!!this.dataSource}get filterStrategyName(){return this.options.getIsVirtualScrolling()?l:d}getFilterStrategy(){return this.filterStrategy&&this.filterStrategy.strategyName===this.filterStrategyName||this.initFilterStrategy(),this.filterStrategy}initFilterStrategy(){const e={resources:this.options.resources,dataAccessors:this.dataAccessors,startDayHour:this.options.startDayHour,endDayHour:this.options.endDayHour,viewOffset:this.options.viewOffset,showAllDayPanel:this.options.showAllDayPanel,timeZoneCalculator:this.options.timeZoneCalculator,loadedResources:this.options.getLoadedResources,supportAllDayRow:this.options.getSupportAllDayRow,viewType:this.options.getViewType,viewDirection:this.options.getViewDirection,dateRange:this.options.getDateRange,groupCount:this.options.getGroupCount,viewDataProvider:this.options.getViewDataProvider,allDayPanelMode:this.options.allDayPanelMode};this.filterStrategy=this.filterStrategyName===l?new r.AppointmentFilterVirtualStrategy(e):new r.AppointmentFilterBaseStrategy(e)}setDataSource(e){this.dataSource=e,this.initFilterStrategy(),this.appointmentDataSource.setDataSource(this.dataSource)}updateDataAccessors(e){this.dataAccessors=e,this.initFilterStrategy()}filter(e){return this.getFilterStrategy().filter(e)}filterByDate(e,t,i,n){if(!this.dataSource||!i)return;const s=this.dataSource.filter(),r=(0,a.combineRemoteFilter)({dataSourceFilter:s,dataAccessors:this.dataAccessors,min:e,max:t,dateSerializationFormat:n,forceIsoDateParsing:(0,o.default)().forceIsoDateParsing});this.dataSource.filter(r)}hasAllDayAppointments(e,t){return this.getFilterStrategy().hasAllDayAppointments(e,t)}filterLoadedAppointments(e,t){return this.getFilterStrategy().filterLoadedAppointments(e,t)}calculateAppointmentEndDate(e,t){return this.getFilterStrategy().calculateAppointmentEndDate(e,t)}cleanState(){this.appointmentDataSource.cleanState()}getUpdatedAppointment(){return this.appointmentDataSource._updatedAppointment}getUpdatedAppointmentKeys(){return this.appointmentDataSource._updatedAppointmentKeys}add(e){return this.appointmentDataSource.add(e)}update(e,t){return this.appointmentDataSource.update(e,t)}remove(e){return this.appointmentDataSource.remove(e)}destroy(){this.appointmentDataSource.destroy()}}},12524:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AppointmentDataSource=void 0;var n=i(87739);const o="updating",a="push";t.AppointmentDataSource=class{constructor(e){this.setDataSource(e),this._updatedAppointmentKeys=[]}get keyName(){return this._dataSource.store().key()}get isDataSourceInit(){return!!this._dataSource}_getStoreKey(e){return this._dataSource.store().keyOf(e)}setDataSource(e){this._dataSource=e,this.cleanState(),this._initStoreChangeHandlers()}_initStoreChangeHandlers(){const e=this._dataSource,t=null==e?void 0:e.store();t&&(t.on(o,(e=>{const i=t.key();i?this._updatedAppointmentKeys.push({key:i,value:e}):this._updatedAppointment=e})),t.on(a,(i=>{const n=e.items(),o=t.key();i.forEach((e=>{if(0!==n.filter((t=>t[o]===e.key)).length)this._updatedAppointmentKeys.push({key:o,value:e.key});else{const{data:t}=e;t&&n.push(t)}})),e.load()})))}getUpdatedAppointment(){return this._updatedAppointment}getUpdatedAppointmentKeys(){return this._updatedAppointmentKeys}cleanState(){this._updatedAppointment=null,this._updatedAppointmentKeys=[]}add(e){return this._dataSource.store().insert(e).done((()=>this._dataSource.load()))}update(e,t){const i=this._getStoreKey(e),o=new n.Deferred;return this._dataSource.store().update(i,t).done((e=>this._dataSource.load().done((()=>o.resolve(e))).fail(o.reject))).fail(o.reject),o.promise()}remove(e){const t=this._getStoreKey(e);return this._dataSource.store().remove(t).done((()=>this._dataSource.load()))}destroy(){var e;const t=null===(e=this._dataSource)||void 0===e?void 0:e.store();t&&(t.off(o),t.off(a))}}},42648:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AppointmentFilterVirtualStrategy=t.AppointmentFilterBaseStrategy=void 0;var n=g(i(30771)),o=i(94487),a=g(i(41380)),s=i(21274),r=i(11528),l=i(55594),d=i(34396),u=i(66823),c=i(55122),h=i(45629),p=i(2807);function g(e){return e&&e.__esModule?e:{default:e}}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_.apply(null,arguments)}const f=a.default.dateToMilliseconds,m="virtual",v="standard";class C{constructor(e){this.options=e,this.dataAccessors=this.options.dataAccessors,this._init()}get strategyName(){return v}get timeZoneCalculator(){return this.options.timeZoneCalculator}get viewStartDayHour(){return this.options.startDayHour}get viewEndDayHour(){return this.options.endDayHour}get timezone(){return this.options.timezone}get firstDayOfWeek(){return this.options.firstDayOfWeek}get showAllDayPanel(){return this.options.showAllDayPanel}get loadedResources(){return this._resolveOption("loadedResources")}get supportAllDayRow(){return this._resolveOption("supportAllDayRow")}get viewType(){return this._resolveOption("viewType")}get viewDirection(){return this._resolveOption("viewDirection")}get dateRange(){return this._resolveOption("dateRange")}get groupCount(){return this._resolveOption("groupCount")}get viewDataProvider(){return this._resolveOption("viewDataProvider")}get allDayPanelMode(){return this._resolveOption("allDayPanelMode")}_resolveOption(e){const t=this.options[e];return"function"==typeof t?t():t}_init(){this.setDataAccessors(this.dataAccessors)}filter(e){const[t,i]=this.dateRange,{viewOffset:n}=this.options,o=!(!this.showAllDayPanel&&this.supportAllDayRow)&&void 0;return this.filterLoadedAppointments({startDayHour:this.viewStartDayHour,endDayHour:this.viewEndDayHour,viewOffset:n,viewStartDayHour:this.viewStartDayHour,viewEndDayHour:this.viewEndDayHour,min:t,max:i,resources:this.loadedResources,allDay:o,supportMultiDayAppointments:(0,d.isTimelineView)(this.viewType),firstDayOfWeek:this.firstDayOfWeek},e)}hasAllDayAppointments(e,t){const i=e.map((e=>(0,u.createAppointmentAdapter)(e,this.dataAccessors,this.timeZoneCalculator)));let n=!1;return(0,s.each)(i,((e,t)=>{if((0,d.getAppointmentTakesAllDay)(t,this.allDayPanelMode))return n=!0,!1})),n}setDataAccessors(e){this.dataAccessors=e}_createAllDayAppointmentFilter(){return[[e=>(0,d.getAppointmentTakesAllDay)(e,this.allDayPanelMode)]]}_createCombinedFilter(e){const t=new Date(e.min),i=new Date(e.max),{startDayHour:n,endDayHour:o,viewOffset:s,viewStartDayHour:u,viewEndDayHour:c,resources:h,firstDayOfWeek:g,checkIntersectViewport:f,supportMultiDayAppointments:m}=e,[v,C]=(0,d.getDatesWithoutTime)(t,i),y=(0,r.isDefined)(this.dataAccessors.getter.recurrenceRule);return[[b=>{if(!(b.visible??!0))return!1;const{allDay:x,hasRecurrenceRule:w}=b,S=l.dateUtilsTs.addOffsets(b.startDate,[-s]),D=l.dateUtilsTs.addOffsets(b.endDate,[-s]),I=(0,d.getAppointmentTakesAllDay)(b,this.allDayPanelMode);if(!w&&!(D>=v&&S<C||a.default.sameDate(D,v)&&a.default.sameDate(S,v)))return!1;const E=(0,p.getAppointmentTakesSeveralDays)(b),T=E||I;if(null!=h&&h.length&&!this._filterAppointmentByResources(b.rawAppointment,h))return!1;if(I&&!1===e.allDay)return!1;if(w){const e=(0,p.getRecurrenceException)(b,this.timeZoneCalculator,this.timezone);if(!this._filterAppointmentByRRule(_({},b,{recurrenceException:e,allDay:I}),t,i,n,o,g))return!1}return!(!x&&m&&T&&D<t&&(!y||y&&!w))&&(!!(x||!(0,r.isDefined)(n)||y&&e.isVirtualScrolling||(0,p.compareDateWithStartDayHour)(S,D,n,I,E))&&(!(!x&&(0,r.isDefined)(o)&&!(0,p.compareDateWithEndDayHour)({startDate:S,endDate:D,startDayHour:n,endDayHour:o,viewOffset:s,viewStartDayHour:u,viewEndDayHour:c,allDay:I,severalDays:E,min:t,max:i,checkIntersectViewport:f}))&&!(!(x||T&&!m)&&D<t&&y&&!w)))}]]}_createAppointmentFilter(e){return this._createCombinedFilter(e)}_filterAppointmentByResources(e,t){const i=(i,n)=>{const a=this.dataAccessors.resources.getter[i];let l;(0,r.isFunction)(a)&&(l=a(e));const u=(0,o.wrapToArray)(l),c=(0,s.map)(t[n].items,(e=>{let{id:t}=e;return t}));for(let e=0;e<u.length;e++)if((0,d.hasResourceValue)(c,u[e]))return!0;return!1};let n=!1;for(let e=0;e<t.length;e++){if(n=i(t[e].name,e),!n)return!1}return n}_filterAppointmentByRRule(e,t,i,n,o,a){const{recurrenceRule:s}=e,{recurrenceException:r}=e,{allDay:u}=e;let h=!0;const g=e.startDate,_=e.endDate,m=(0,c.getRecurrenceProcessor)();if(u||(0,p._appointmentPartInInterval)(g,_,n,o)){const[e,n]=(0,d.getDatesWithoutTime)(t,i);t=e,i=new Date(n.getTime()-f("minute"))}if(s&&!m.isValidRecurrenceRule(s)&&(h=_>t&&g<=i),h&&m.isValidRecurrenceRule(s)){const{viewOffset:n}=this.options;h=m.hasRecurrence({rule:s,exception:r,start:g,end:_,min:l.dateUtilsTs.addOffsets(t,[n]),max:l.dateUtilsTs.addOffsets(i,[n]),firstDayOfWeek:a,appointmentTimezoneOffset:this.timeZoneCalculator.getOriginStartDateOffsetInMs(g,e.startDateTimeZone,!1)})}return h}filterLoadedAppointments(e,t){return this.filterPreparedItems(e,t).map((e=>{let{rawAppointment:t}=e;return t}))}filterPreparedItems(e,t){const i=this._createAppointmentFilter(e);return(0,n.default)(t).filter(i).toArray()}filterAllDayAppointments(e){const t=this._createAllDayAppointmentFilter();return(0,n.default)(e).filter(t).toArray().map((e=>{let{rawAppointment:t}=e;return t}))}}t.AppointmentFilterBaseStrategy=C;t.AppointmentFilterVirtualStrategy=class extends C{get strategyName(){return m}get resources(){return this.options.resources}filter(e){const{viewOffset:t}=this.options,i=f("hour"),n=(0,d.isDateAndTimeView)(this.viewType),o=n&&"horizontal"===this.viewDirection,a=!this.supportAllDayRow,s=this.showAllDayPanel||a,r=this.viewDataProvider.getLastViewDateByEndDayHour(this.viewEndDayHour),u=l.dateUtilsTs.addOffsets(r,[t]),c=[];return this.viewDataProvider.getCompletedGroupsInfo().forEach((e=>{const{groupIndex:r}=e,h=e.startDate,p=new Date(Math.min(e.endDate.getTime(),u.getTime())),g=n?h.getHours():this.viewStartDayHour,_=n?g+h.getMinutes()/60+(p.getTime()-h.getTime())/i:this.viewEndDayHour,f=this._getPrerenderFilterResources(r),m=this.viewDataProvider.hasGroupAllDayPanel(r),v=a||!!s&&m;c.push({isVirtualScrolling:!0,startDayHour:g,endDayHour:_,viewOffset:t,viewStartDayHour:this.viewStartDayHour,viewEndDayHour:this.viewEndDayHour,min:l.dateUtilsTs.addOffsets(h,[-t]),max:l.dateUtilsTs.addOffsets(p,[-t]),supportMultiDayAppointments:(0,d.isTimelineView)(this.viewType),allDay:v,resources:f,firstDayOfWeek:this.firstDayOfWeek,checkIntersectViewport:o})})),this.filterLoadedAppointments({filterOptions:c,groupCount:this.groupCount},e)}filterPreparedItems(e,t){let{filterOptions:i,groupCount:o}=e;const a=[];let s=t;return o>0&&(s=s.filter((e=>{let{rawAppointment:t}=e;for(let e=0;e<i.length;++e){const{resources:n}=i[e];if(this._filterAppointmentByResources(t,n))return!0}}))),i.forEach((e=>{a.length&&a.push("or");const t=this._createAppointmentFilter(e);a.push(t)})),(0,n.default)(s).filter(a).toArray()}hasAllDayAppointments(e,t){return this.filterAllDayAppointments(t).length>0}_getPrerenderFilterResources(e){const t=this.viewDataProvider.getCellsGroup(e);return(0,h.getResourcesDataByGroups)(this.loadedResources,this.resources,[t])}}},2807:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.sortAppointmentsByStartDate=t.replaceWrongEndDate=t.getRecurrenceException=t.getAppointmentTakesSeveralDays=t.compareDateWithStartDayHour=t.compareDateWithEndDayHour=t._isEndDateWrong=t._convertRecurrenceException=t._appointmentPartInInterval=void 0;var n=r(i(41380)),o=r(i(71051)),a=i(26012),s=r(i(18648));function r(e){return e&&e.__esModule?e:{default:e}}const l=n.default.dateToMilliseconds;t.compareDateWithStartDayHour=(e,t,i,o,a)=>{const s=n.default.dateTimeFromDecimal(i);return e.getHours()>=s.hours&&e.getMinutes()>=s.minutes||t.getHours()===s.hours&&t.getMinutes()>s.minutes||t.getHours()>s.hours||a||o};t.compareDateWithEndDayHour=e=>{const{startDate:t,endDate:i,startDayHour:o,endDayHour:a,viewStartDayHour:s,viewEndDayHour:r,allDay:d,severalDays:u,min:c,max:h,checkIntersectViewport:p}=e,g=(24-r+s)*l("hour"),_=i.getTime()-t.getTime(),f=(g-_)/l("hour"),m=t.getHours(),v=t.getMinutes();let C;const y=n.default.dateTimeFromDecimal(a),b=n.default.dateTimeFromDecimal(o),x=t<h&&i>c;return C=p&&x||m<y.hours||m===y.hours&&v<y.minutes||d&&t<=h||u&&x&&(m<y.hours||60*i.getHours()+i.getMinutes()>60*b.hours),_<g&&m>y.hours&&v>y.minutes&&f<=m-a&&(C=!1),C};t.getAppointmentTakesSeveralDays=e=>!n.default.sameDate(e.startDate,e.endDate);const d=(e,t)=>!t||isNaN(t.getTime())||e.getTime()>t.getTime();t._isEndDateWrong=d;t._appointmentPartInInterval=(e,t,i,n)=>{const o=e.getHours(),a=t.getHours();return o<=i&&a<=n&&a>=i||a>=n&&o<=n&&o>=i};t.getRecurrenceException=(e,t,i)=>{const{recurrenceException:n}=e;if(n){const o=n.split(",");for(let n=0;n<o.length;n++)o[n]=u(o[n],e.startDate,t,i);return o.join()}return n};const u=(e,t,i,n)=>{e=e.replace(/\s/g,"");const a=e=>i.createDate(e,{path:"toGrid"}),r=o.default.deserializeDate(e),l=a(t);let d=a(r);return d=s.default.correctRecurrenceExceptionByTimezone(d,l,n),e=o.default.serializeDate(d,"yyyyMMddTHHmmss")};t._convertRecurrenceException=u;t.replaceWrongEndDate=(e,t,i,o,s)=>{if(d(t,i)){const i=((e,t)=>e?n.default.setToDayEnd(new Date(t)):new Date(t.getTime()+o*l("minute")))(a.ExpressionUtils.getField(s,"allDay",e),t);s.setter.endDate(e,i)}};t.sortAppointmentsByStartDate=(e,t)=>{e.sort(((e,i)=>{const n=new Date(a.ExpressionUtils.getField(t,"startDate",e.settings||e)),o=new Date(a.ExpressionUtils.getField(t,"startDate",i.settings||i));return Math.sign(n.getTime()-o.getTime())}))}},23e3:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Appointment=t.AgendaAppointment=void 0;var n=i(88603),o=b(i(92774)),a=b(i(89797)),s=i(98834),r=b(i(38662)),l=b(i(4671)),d=b(i(92848)),u=b(i(97832)),c=b(i(19427)),h=b(i(64553)),p=i(87739),g=i(52576),_=i(11528),f=b(i(28416)),m=i(33476),v=i(80126),C=i(26012),y=i(55122);function b(e){return e&&e.__esModule?e:{default:e}}const x=(0,s.addNamespace)(a.default.enter,"dxSchedulerAppointment"),w=(0,s.addNamespace)(a.default.leave,"dxSchedulerAppointment");class S extends u.default{get coloredElement(){return this.$element()}get rawAppointment(){return this.option("data")}_getDefaultOptions(){return(0,g.extend)(super._getDefaultOptions(),{data:{},groupIndex:-1,groups:[],geometry:{top:0,left:0,width:0,height:0},allowDrag:!0,allowResize:!0,reduced:null,isCompact:!1,direction:"vertical",resizableConfig:{keepAspectRatio:!1},cellHeight:0,cellWidth:0,isDragSource:!1})}notifyObserver(e,t){const i=this.option("observer");i&&i.fire(e,t)}invoke(e){const t=this.option("observer");if(t)return t.fire.apply(t,arguments)}_optionChanged(e){switch(e.name){case"data":case"groupIndex":case"groupTexts":case"geometry":case"allowDrag":case"allowResize":case"reduced":case"sortedIndex":case"isCompact":case"direction":case"resizableConfig":case"cellHeight":case"cellWidth":this._invalidate();break;case"isDragSource":this._renderDragSourceClass();break;default:super._optionChanged(e)}}_getHorizontalResizingRule(){const e={head:this.option("rtlEnabled")?"right":"left",body:"",tail:this.option("rtlEnabled")?"left":"right"},t=this.option("getResizableStep"),i=t?t():0;return{handles:this.option("reduced")?e[this.option("reduced")]:"left right",minHeight:0,minWidth:this.invoke("getCellWidth"),step:i,roundStepValue:!1}}_getVerticalResizingRule(){const e=Math.round(this.invoke("getCellHeight"));return{handles:"top bottom",minWidth:0,minHeight:e,step:e,roundStepValue:!0}}_render(){super._render(),this._renderAppointmentGeometry(),this._renderAriaLabel(),this._renderEmptyClass(),this._renderReducedAppointment(),this._renderAllDayClass(),this._renderDragSourceClass(),this._renderDirection(),this.$element().data("dxAppointmentStartDate",this.option("startDate")),this.$element().attr("role","application"),this._renderRecurrenceClass(),this._renderResizable(),this._setResourceColor()}_setResourceColor(){const e={itemData:this.rawAppointment,groupIndex:this.option("groupIndex"),groups:this.option("groups")};this.option("getAppointmentColor")(e).done((e=>{e&&(this.coloredElement.css("backgroundColor",e),this.coloredElement.addClass(v.APPOINTMENT_HAS_RESOURCE_COLOR_CLASS))}))}_getGroupText(){const e=this.option("groupTexts");if(null==e||!e.length)return"";const t=e.join(", ");return l.default.format("dxScheduler-appointmentAriaLabel-group",t)}_getDateText(){const e=this._localizeDate(this._getStartDate()),t=this._localizeDate(this._getEndDate()),i=e===t?`${e}`:`${e} - ${t}`,{partIndex:n,partTotalCount:o}=this.option();return`${i}${(0,_.isDefined)(n)?` (${n+1}/${o})`:""}`}_renderAriaLabel(){const e=this.$element(),t=[this._getDateText(),this._getGroupText()].filter((e=>!!e)).join(", ");e.attr("aria-roledescription",`${t}, `);const i=`dx-${new c.default}`;e.attr("aria-describedby",i),e.find(".dx-item-content").attr("id",i)}_renderAppointmentGeometry(){const e=this.option("geometry"),t=this.$element();(0,n.move)(t,{top:e.top,left:e.left}),t.css({width:e.width<0?0:e.width,height:e.height<0?0:e.height})}_renderEmptyClass(){(this.option("geometry").empty||this.option("isCompact"))&&this.$element().addClass(v.EMPTY_APPOINTMENT_CLASS)}_renderReducedAppointment(){const e=this.option("reduced");e&&(this.$element().toggleClass(v.REDUCED_APPOINTMENT_CLASS,!0).toggleClass(v.REDUCED_APPOINTMENT_PARTS_CLASSES[e],!0),this._renderAppointmentReducedIcon())}_localizeDate(e){return`${r.default.format(e,"monthAndDay")}, ${r.default.format(e,"year")}`}_renderAppointmentReducedIcon(){const e=(0,h.default)("<div>").addClass(v.REDUCED_APPOINTMENT_ICON).appendTo(this.$element()),t=this._getEndDate(),i=[l.default.format("dxScheduler-editorLabelEndDate"),": ",this._localizeDate(t)].join("");o.default.off(e,x),o.default.on(e,x,(()=>{(0,m.show)({target:e,content:i})})),o.default.off(e,w),o.default.on(e,w,(()=>{(0,m.hide)()}))}_getDate(e){const t=C.ExpressionUtils.getField(this.option("dataAccessors"),e,this.rawAppointment);if(!t)return t;const i=new Date(t),n=this.option("timeZoneCalculator");return n?n.createDate(i,{path:"toGrid"}):i}_getEndDate(){return this._getDate("endDate")}_getStartDate(){return this._getDate("startDate")}_renderAllDayClass(){this.$element().toggleClass(v.ALL_DAY_APPOINTMENT_CLASS,!!this.option("allDay"))}_renderDragSourceClass(){this.$element().toggleClass(v.APPOINTMENT_DRAG_SOURCE_CLASS,!!this.option("isDragSource"))}_renderRecurrenceClass(){const e=C.ExpressionUtils.getField(this.option("dataAccessors"),"recurrenceRule",this.rawAppointment);(0,y.getRecurrenceProcessor)().isValidRecurrenceRule(e)&&this.$element().addClass(v.RECURRENCE_APPOINTMENT_CLASS)}_renderDirection(){this.$element().addClass(v.DIRECTION_APPOINTMENT_CLASSES[this.option("direction")])}_createResizingConfig(){const e="vertical"===this.option("direction")?this._getVerticalResizingRule():this._getHorizontalResizingRule();return this.invoke("isGroupedByDate")||(e.stepPrecision="strict"),e}_renderResizable(){this.option("allowResize")&&this._createComponent(this.$element(),f.default,(0,g.extend)(this._createResizingConfig(),this.option("resizableConfig")))}_useTemplates(){return!1}}t.Appointment=S,(0,d.default)("dxSchedulerAppointment",S);t.AgendaAppointment=class extends S{get coloredElement(){return this.$element().find(`.${v.APPOINTMENT_CONTENT_CLASSES.AGENDA_MARKER}`)}_getDefaultOptions(){return(0,g.extend)(super._getDefaultOptions(),{createPlainResourceListAsync:new p.Deferred})}_renderResourceList(e,t){t.forEach((t=>{const i=(0,h.default)("<div>").addClass(v.APPOINTMENT_CONTENT_CLASSES.AGENDA_RESOURCE_LIST_ITEM).appendTo(e);(0,h.default)("<div>").text(`${t.label}:`).appendTo(i),(0,h.default)("<div>").addClass(v.APPOINTMENT_CONTENT_CLASSES.AGENDA_RESOURCE_LIST_ITEM_VALUE).text(t.values.join(", ")).appendTo(i)}))}_render(){super._render();this.option("createPlainResourceListAsync")(this.rawAppointment).done((e=>{const t=this.$element().find(`.${v.APPOINTMENT_CONTENT_CLASSES.APPOINTMENT_CONTENT_DETAILS}`),i=(0,h.default)("<div>").addClass(v.APPOINTMENT_CONTENT_CLASSES.AGENDA_RESOURCE_LIST).appendTo(t);this._renderResourceList(i,e)}))}}},5311:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=L(i(92774)),a=i(5636),s=i(98834),r=L(i(92848)),l=L(i(64960)),d=i(61404),u=i(74663),c=L(i(64553)),h=i(94487),p=i(17781),g=L(i(41380)),_=i(86858),f=i(52576),m=i(21274),v=i(22263),C=i(41639),y=i(57653),b=i(11528),x=L(i(7607)),w=i(55594),S=i(66823),D=i(80126),I=i(8687),E=i(26012),T=i(55122),A=L(i(18648)),O=i(45629),P=i(2807),k=i(23e3),M=i(18413),R=i(57498);function L(e){return e&&e.__esModule?e:{default:e}}function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},B.apply(null,arguments)}const V=(0,s.addNamespace)(a.name,"dxSchedulerAppointment"),F=g.default.dateToMilliseconds;class H extends x.default{get isAgendaView(){return this.invoke("isCurrentViewAgenda")}get isVirtualScrolling(){return this.invoke("isVirtualScrolling")}get appointmentDataProvider(){return this.option("getAppointmentDataProvider")()}constructor(e,t){super(e,t),this._virtualAppointments={}}option(e,t){return super.option(...arguments)}notifyObserver(e,t){const i=this.option("observer");i&&i.fire(e,t)}invoke(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];const o=this.option("observer");if(o)return o.fire.apply(o,arguments)}_dispose(){clearTimeout(this._appointmentClickTimeout),super._dispose()}_supportedKeys(){const e=super._supportedKeys(),t=this._$currentAppointment;return(0,f.extend)(e,{escape:function(){var e,i,n;this.resizeOccur&&(this.moveAppointmentBack(),this.resizeOccur=!1,null===(e=t.dxResizable("instance"))||void 0===e||e._detachEventHandlers(),null===(i=t.dxResizable("instance"))||void 0===i||i._attachEventHandlers(),null===(n=t.dxResizable("instance"))||void 0===n||n._toggleResizingClass(!1))}.bind(this),del:function(e){if(this.option("allowDelete")){e.preventDefault();const t=this._getItemData(e.target);this.notifyObserver("onDeleteButtonPress",{data:t,target:e.target})}}.bind(this),tab:function(e){const t=this._getNavigatableItems();let i=t.filter(".dx-state-focused").data(I.APPOINTMENT_SETTINGS_KEY).sortedIndex;const n=t.length-1;if(i>0&&e.shiftKey||i<n&&!e.shiftKey){e.preventDefault(),e.shiftKey?i--:i++;const t=this._getNavigatableItemByIndex(i);this._resetTabIndex(t),o.default.trigger(t,"focus")}}})}_getNavigatableItemByIndex(e){return this._getNavigatableItems().filter(((t,i)=>(0,u.data)(i,I.APPOINTMENT_SETTINGS_KEY).sortedIndex===e)).eq(0)}_getNavigatableItems(){const e=this._itemElements().filter(":visible").not(".dx-state-disabled"),t=this.$element().find(".dx-scheduler-appointment-collector");return e.add(t)}_resetTabIndex(e){this._focusTarget().attr("tabIndex",-1),e.attr("tabIndex",this.option("tabIndex"))}_moveFocus(){}_focusTarget(){return this._getNavigatableItems()}_renderFocusTarget(){const e=this._getNavigatableItemByIndex(0);this._resetTabIndex(e)}_focusInHandler(e){super._focusInHandler(e),this._$currentAppointment=(0,c.default)(e.target),this.option("focusedElement",(0,d.getPublicElement)((0,c.default)(e.target)))}_focusOutHandler(e){const t=this._getNavigatableItemByIndex(0);this.option("focusedElement",(0,d.getPublicElement)(t)),super._focusOutHandler(e)}_eventBindingTarget(){return this._itemContainer()}_getDefaultOptions(){return(0,f.extend)(super._getDefaultOptions(),{noDataText:null,activeStateEnabled:!0,hoverStateEnabled:!0,tabIndex:0,fixedContainer:null,allDayContainer:null,allowDrag:!0,allowResize:!0,allowAllDayResize:!0,onAppointmentDblClick:null,_collectorOffset:0,groups:[],resources:[]})}_optionChanged(e){switch(e.name){case"items":this._cleanFocusState(),this._clearDropDownItems(),this._clearDropDownItemsElements(),this._repaintAppointments(e.value),this._renderDropDownAppointments(),this._attachAppointmentsEvents();break;case"fixedContainer":case"allDayContainer":case"onAppointmentDblClick":case"allowDelete":break;case"allowDrag":case"allowResize":case"allowAllDayResize":this._invalidate();break;case"focusedElement":this._resetTabIndex((0,c.default)(e.value)),super._optionChanged(e);break;case"focusStateEnabled":this._clearDropDownItemsElements(),this._renderDropDownAppointments(),super._optionChanged(e);break;default:super._optionChanged(e)}}_isAllDayAppointment(e){return e.settings.length&&e.settings[0].allDay||!1}_isRepaintAppointment(e){return!(0,b.isDefined)(e.needRepaint)||!0===e.needRepaint}_isRepaintAll(e){if(this.isAgendaView)return!0;for(let t=0;t<e.length;t++)if(!this._isRepaintAppointment(e[t]))return!1;return!0}_applyFragment(e,t){e.children().length>0&&this._getAppointmentContainer(t).append(e)}_onEachAppointment(e,t,i,n){const o=()=>{e.needRepaint=!1,this._clearItem(e),this._renderItem(t,e,i)};!0===(null==e?void 0:e.needRemove)?this._clearItem(e):(n||this._isRepaintAppointment(e))&&o()}_repaintAppointments(e){this._renderByFragments(((t,i)=>{const n=this._isRepaintAll(e);n&&(this._getAppointmentContainer(!0).html(""),this._getAppointmentContainer(!1).html("")),!e.length&&this._cleanItemContainer(),e.forEach(((e,o)=>{const a=this._isAllDayAppointment(e)?i:t;this._onEachAppointment(e,o,a,n)}))}))}_renderByFragments(e){if(this.isVirtualScrolling){const t=(0,c.default)(l.default.createDocumentFragment()),i=(0,c.default)(l.default.createDocumentFragment());e(t,i),this._applyFragment(t,!1),this._applyFragment(i,!0)}else e(this._getAppointmentContainer(!1),this._getAppointmentContainer(!0))}_refreshActiveDescendant(){}_attachAppointmentsEvents(){this._attachClickEvent(),this._attachHoldEvent(),this._attachContextMenuEvent(),this._attachAppointmentDblClick(),this._renderFocusState(),this._attachFeedbackEvents(),this._attachHoverEvents()}_clearItem(e){const t=this._findItemElementByItem(e.itemData);t.length&&(0,m.each)(t,((e,t)=>{t.detach(),t.remove()}))}_clearDropDownItems(){this._virtualAppointments={}}_clearDropDownItemsElements(){this.invoke("clearCompactAppointments")}_findItemElementByItem(e){const t=[],i=this;return this.itemElements().each((function(){const n=(0,c.default)(this);n.data(i._itemDataKey())===e&&t.push(n)})),t}_itemClass(){return D.APPOINTMENT_ITEM_CLASS}_itemContainer(){const e=super._itemContainer();let t=e;const i=this.option("allDayContainer");return i&&(t=e.add(i)),t}_cleanItemContainer(){super._cleanItemContainer();const e=this.option("allDayContainer");e&&e.empty(),this._virtualAppointments={}}_clean(){super._clean(),delete this._$currentAppointment,delete this._initialSize,delete this._initialCoordinates}_init(){super._init(),this.$element().addClass("dx-scheduler-scrollable-appointments"),this._preventSingleAppointmentClick=!1}_renderAppointmentTemplate(e,t,i){var n;const o={isAllDay:t.allDay,isRecurrence:t.recurrenceRule,html:(0,b.isPlainObject)(t)&&t.html?t.html:void 0},a=this.invoke("getTextAndFormatDate",i.appointmentData,(null===(n=this._currentAppointmentSettings)||void 0===n?void 0:n.agendaSettings)||i.targetedAppointmentData,"TIME");e.append(this.isAgendaView?(0,M.createAgendaAppointmentLayout)(a,o):(0,M.createAppointmentLayout)(a,o)),this.isAgendaView||e.parent().prepend((0,c.default)("<div>").addClass(D.APPOINTMENT_CONTENT_CLASSES.STRIP))}_executeItemRenderAction(e,t,i){const n=this._getItemRenderAction();n&&n(this.invoke("mapAppointmentFields",{itemData:t,itemElement:i})),delete this._currentAppointmentSettings}_itemClickHandler(e){super._itemClickHandler(e,{},{afterExecute:function(e){this._processItemClick(e.args[0].event)}.bind(this)})}_processItemClick(e){const t=(0,c.default)(e.currentTarget),i=this._getItemData(t);t.is(".dx-scheduler-appointment-collector")||("keydown"===e.type||(0,s.isFakeClickEvent)(e)?this.notifyObserver("showEditAppointmentPopup",{data:i,target:t}):this._appointmentClickTimeout=setTimeout((()=>{!this._preventSingleAppointmentClick&&(0,_.isElementInDom)(t)&&this.notifyObserver("showAppointmentTooltip",{data:i,target:t}),this._preventSingleAppointmentClick=!1}),300))}_extendActionArgs(e){const t=super._extendActionArgs(e);return this.invoke("mapAppointmentFields",t)}_render(){super._render(),this._attachAppointmentDblClick()}_attachAppointmentDblClick(){const e=this,t=e._itemSelector(),i=this._itemContainer();o.default.off(i,V,t),o.default.on(i,V,t,(t=>{e._itemDXEventHandler(t,"onAppointmentDblClick",{},{afterExecute(t){e._dblClickHandler(t.args[0].event)}})}))}_dblClickHandler(e){const t=(0,c.default)(e.currentTarget),i=this._getItemData(t);clearTimeout(this._appointmentClickTimeout),this._preventSingleAppointmentClick=!0,this.notifyObserver("showEditAppointmentPopup",{data:i,target:t})}_renderItem(e,t,i){const{itemData:n}=t,o=[];for(let a=0;a<t.settings.length;a++){const s=t.settings[a];this._currentAppointmentSettings=s;const r=super._renderItem(e,n,i);r.data(I.APPOINTMENT_SETTINGS_KEY,s),o.push(r)}return o}_getItemContent(e){e.data(I.APPOINTMENT_SETTINGS_KEY,this._currentAppointmentSettings);return super._getItemContent(e)}_createItemByTemplate(e,t){const{itemData:i,container:n,index:o}=t;return e.render({model:{appointmentData:i,targetedAppointmentData:this.invoke("getTargetedAppointmentData",i,(0,c.default)(n).parent())},container:n,index:o})}_getAppointmentContainer(e){const t=this.option("allDayContainer");let i=this.itemsContainer().not(t);return e&&t&&(i=t),i}_postprocessRenderItem(e){this._renderAppointment(e.itemElement,this._currentAppointmentSettings)}_getGroupTexts(e,t){if(null==t||!t.length)return[];return(0,O.getPathToLeaf)(e,t).map(((e,i)=>t[i].items.find((t=>t.id===e)).text))}_renderAppointment(e,t){e.data(I.APPOINTMENT_SETTINGS_KEY,t),this._applyResourceDataAttr(e);const i=this._getItemData(e),n=this.invoke("getAppointmentGeometry",t),o=this.option("allowResize")&&(!(0,b.isDefined)(t.skipResizing)||(0,b.isString)(t.skipResizing)),a=this.option("allowDrag"),{allDay:s}=t;if(this.invoke("setCellDataCacheAlias",this._currentAppointmentSettings,n),t.virtual){const n={itemData:i,groupIndex:t.groupIndex,groups:this.option("groups")},o=this.option("getAppointmentColor")(n);this._processVirtualAppointment(t,e,i,o)}else{var r;const l={data:i,groupIndex:t.groupIndex,groupTexts:this._getGroupTexts(t.groupIndex,this.option("getLoadedResources")()),observer:this.option("observer"),geometry:n,direction:t.direction||"vertical",allowResize:o,allowDrag:a,allDay:s,reduced:t.appointmentReduced,isCompact:t.isCompact,startDate:new Date(null===(r=t.info)||void 0===r?void 0:r.appointment.startDate),cellWidth:this.invoke("getCellWidth"),cellHeight:this.invoke("getCellHeight"),resizableConfig:this._resizableConfig(i,t),groups:this.option("groups"),partIndex:t.partIndex,partTotalCount:t.partTotalCount,getAppointmentColor:this.option("getAppointmentColor"),getResourceDataAccessors:this.option("getResourceDataAccessors"),timeZoneCalculator:this.option("timeZoneCalculator")};if(this.isAgendaView){const e=this.option("getAgendaResourceProcessor")();l.createPlainResourceListAsync=t=>e.createListAsync(t)}this._createComponent(e,this.isAgendaView?k.AgendaAppointment:k.Appointment,B({},l,{dataAccessors:this.option("dataAccessors"),getResizableStep:this.option("getResizableStep")}))}}_applyResourceDataAttr(e){const t=this.option("getResourceDataAccessors")(),i=this._getItemData(e);(0,m.each)(t.getter,(n=>{const o=t.getter[n](i);if((0,b.isDefined)(o)){const t=`data-${(0,p.normalizeKey)(n.toLowerCase())}-`;(0,h.wrapToArray)(o).forEach((i=>e.attr(t+(0,p.normalizeKey)(i),!0)))}}))}_resizableConfig(e,t){return{area:this._calculateResizableArea(t,e),onResizeStart:function(e){if(this.resizeOccur=!0,this._$currentAppointment=(0,c.default)(e.element),this.invoke("needRecalculateResizableArea")){const t=this._calculateResizableArea(this._$currentAppointment.data(I.APPOINTMENT_SETTINGS_KEY),this._$currentAppointment.data("dxItemData"));e.component.option("area",t),e.component._renderDragOffsets(e.event)}this._initialSize={width:e.width,height:e.height},this._initialCoordinates=(0,n.locate)(this._$currentAppointment)}.bind(this),onResizeEnd:function(e){this.resizeOccur=!1,this._resizeEndHandler(e)}.bind(this)}}_calculateResizableArea(e,t){const i=this.$element().closest(".dx-scrollable-content");return this.invoke("getResizableAppointmentArea",{coordinates:{left:e.left,top:0,groupIndex:e.groupIndex},allDay:e.allDay})||i}_resizeEndHandler(e){const t=(0,c.default)(e.element),{allDay:i,info:n}=t.data("dxAppointmentSettings"),o=this._getItemData(t),a=this.invoke("getViewOffsetMs");let s;if(i)s=this.resizeAllDay(e);else{const t=this._getEndResizeAppointmentStartDate(e,o,n.appointment),{endDate:i}=n.appointment,r=w.dateUtilsTs.addOffsets(t,[-a]),l=w.dateUtilsTs.addOffsets(i,[-a]);s=this._getDateRange(e,r,l),s.startDate=w.dateUtilsTs.addOffsets(s.startDate,[a]),s.endDate=w.dateUtilsTs.addOffsets(s.endDate,[a])}this.updateResizedAppointment(t,s,this.option("dataAccessors"),this.option("timeZoneCalculator"))}resizeAllDay(e){const t=(0,c.default)(e.element),i=this.option("timeZoneCalculator"),n=this.option("dataAccessors");return(0,R.getAppointmentDateRange)({handles:e.handles,appointmentSettings:t.data("dxAppointmentSettings"),isVerticalViewDirection:this.option("isVerticalViewDirection")(),isVerticalGroupedWorkSpace:this.option("isVerticalGroupedWorkSpace")(),appointmentRect:(0,C.getBoundingRect)(t[0]),parentAppointmentRect:(0,C.getBoundingRect)(t.parent()[0]),viewDataProvider:this.option("getViewDataProvider")(),isDateAndTimeView:this.option("isDateAndTimeView")(),startDayHour:this.invoke("getStartDayHour"),endDayHour:this.invoke("getEndDayHour"),timeZoneCalculator:i,dataAccessors:n,rtlEnabled:this.option("rtlEnabled"),DOMMetaData:this.option("getDOMElementsMetaData")(),viewOffset:this.invoke("getViewOffsetMs")})}updateResizedAppointment(e,t,i,n){const o=this._getItemData(e),a=(0,S.createAppointmentAdapter)(o,i,n).clone();a.startDate=new Date(t.startDate),a.endDate=new Date(t.endDate),this.notifyObserver("updateAppointmentAfterResize",{target:o,data:a.clone({pathTimeZone:"fromGrid"}).source(),$appointment:e})}_getEndResizeAppointmentStartDate(e,t,i){const n=this.option("timeZoneCalculator"),o=(0,S.createAppointmentAdapter)(t,this.option("dataAccessors"),n);let{startDate:a}=i;const s=(0,T.getRecurrenceProcessor)(),{recurrenceRule:r,startDateTimeZone:l}=o,d=this.invoke("isAllDay",t),u=s.isValidRecurrenceRule(r);return e.handles.top||u||d||(a=n.createDate(o.startDate,{appointmentTimeZone:l,path:"toGrid"})),a}_getDateRange(e,t,i){const n=this._getItemData(e.element),o=this.invoke("getDeltaTime",e,this._initialSize,n),a=this.invoke("getRenderingStrategyDirection");let s=!1;const r=this.invoke("isAllDay",n),l=this.invoke("needCorrectAppointmentDates")&&!r;let d,u;return s="vertical"!==a||r?this.option("rtlEnabled")?e.handles.right:e.handles.left:e.handles.top,s?(d=l?this._correctStartDateByDelta(t,o):t.getTime()-o,d+=A.default.getTimezoneOffsetChangeInMs(t,i,d,i),u=i.getTime()):(d=t.getTime(),u=l?this._correctEndDateByDelta(i,o):i.getTime()+o,u-=A.default.getTimezoneOffsetChangeInMs(t,i,t,u)),{startDate:new Date(d),endDate:new Date(u)}}_correctEndDateByDelta(e,t){const i=this.invoke("getEndDayHour"),n=this.invoke("getStartDayHour"),o=new Date(e),a=new Date(e),s=new Date(e);a.setHours(n,0,0,0),o.setHours(i,0,0,0),s>o&&s.setHours(i,0,0,0);let r=s.getTime()+t;const l=(i-n)*F("hour"),d=t>0?Math.ceil(t/l):Math.floor(t/l);if(r>o.getTime()||r<=a.getTime()){const e=t-(o.getTime()-s.getTime()),i=new Date(s).setDate(s.getDate()+d),a=new Date(i);a.setHours(n,0,0,0),r=a.getTime()+e-l*(d-1)}return r}_correctStartDateByDelta(e,t){const i=this.invoke("getEndDayHour"),n=this.invoke("getStartDayHour"),o=new Date(e),a=new Date(e),s=new Date(e);a.setHours(n,0,0,0),o.setHours(i,0,0,0),s<a&&s.setHours(n,0,0,0);let r=s.getTime()-t;const l=(i-n)*F("hour"),d=t>0?Math.ceil(t/l):Math.floor(t/l);if(r<a.getTime()||r>=o.getTime()){const e=t-(s.getTime()-a.getTime()),n=new Date(s.setDate(s.getDate()-d));n.setHours(i,0,0,0),r=n.getTime()-e+l*(d-1)}return r}_processVirtualAppointment(e,t,i,n){const o=e.virtual,a=o.index;(0,b.isDefined)(this._virtualAppointments[a])||(this._virtualAppointments[a]={coordinates:{top:o.top,left:o.left},items:{data:[],colors:[],settings:[]},isAllDay:!!o.isAllDay,buttonColor:n,sortedIndex:e.sortedIndex}),e.targetedAppointmentData=this.invoke("getTargetedAppointmentData",i,t),this._virtualAppointments[a].items.settings.push(e),this._virtualAppointments[a].items.data.push(i),this._virtualAppointments[a].items.colors.push(n),t.remove()}_renderContentImpl(){super._renderContentImpl(),this._renderDropDownAppointments()}_renderDropDownAppointments(){this._renderByFragments(((e,t)=>{(0,m.each)(this._virtualAppointments,(i=>{const n=this._virtualAppointments[i],o=n.items,a=n.coordinates,s=n.isAllDay?t:e,{left:r}=a,l=this.invoke("getDropDownAppointmentWidth",n.isAllDay),d=this.invoke("getDropDownAppointmentHeight"),u=this.option("rtlEnabled")?l:0;this.notifyObserver("renderCompactAppointments",{$container:s,coordinates:{top:a.top,left:r+u},items:o,buttonColor:n.buttonColor,sortedIndex:n.sortedIndex,width:l-this.option("_collectorOffset"),height:d,onAppointmentClick:this.option("onItemClick"),allowDrag:this.option("allowDrag"),cellWidth:this.invoke("getCellWidth"),isCompact:this.invoke("isAdaptive")||this._isGroupCompact(n)})}))}))}_isGroupCompact(e){return!e.isAllDay&&this.invoke("supportCompactDropDownAppointments")}_sortAppointmentsByStartDate(e){return(0,P.sortAppointmentsByStartDate)(e,this.option("dataAccessors"))}_processRecurrenceAppointment(e,t,i){const n=E.ExpressionUtils.getField(this.option("dataAccessors"),"recurrenceRule",e),o={parts:[],indexes:[]};if(n){const a=e.settings||e,s=new Date(E.ExpressionUtils.getField(this.option("dataAccessors"),"startDate",a)),r=E.ExpressionUtils.getField(this.option("dataAccessors"),"startDateTimeZone",e),l=new Date(E.ExpressionUtils.getField(this.option("dataAccessors"),"endDate",a)),d=l.getTime()-s.getTime(),u=E.ExpressionUtils.getField(this.option("dataAccessors"),"recurrenceException",e),c=this.invoke("getStartViewDate"),h=this.invoke("getEndViewDate"),p=this.option("timeZoneCalculator"),g=(0,T.getRecurrenceProcessor)().generateDates({rule:n,exception:u,start:s,end:l,min:c,max:h,appointmentTimezoneOffset:p.getOriginStartDateOffsetInMs(s,r,!1)}),_=e.settings?1:g.length;for(let t=0;t<_;t++){const n=(0,f.extend)({},e,!0);if(g[t]){const e=this._applyStartDateToObj(g[t],{});this._applyEndDateToObj(new Date(g[t].getTime()+d),e),n.settings=e}else n.settings=a;o.parts.push(n),i||this._processLongAppointment(n,o)}o.indexes.push(t)}return o}_processLongAppointment(e,t){const i=this.splitAppointmentByDay(e),n=i.length,o=this.invoke("getEndViewDate").getTime(),a=this.invoke("getStartViewDate").getTime(),s=this.option("timeZoneCalculator");if(t=t||{parts:[]},n>1){(0,f.extend)(e,i[0]);for(let e=1;e<n;e++){let n=E.ExpressionUtils.getField(this.option("dataAccessors"),"startDate",i[e].settings).getTime();n=s.createDate(n,{path:"toGrid"}),n<o&&n>a&&t.parts.push(i[e])}}return t}_reduceRecurrenceAppointments(e,t){(0,m.each)(e,((e,i)=>{t.splice(i-e,1)}))}_combineAppointments(e,t){t.length&&e.push(...t),this._sortAppointmentsByStartDate(e)}_applyStartDateToObj(e,t){return E.ExpressionUtils.setField(this.option("dataAccessors"),"startDate",t,e),t}_applyEndDateToObj(e,t){return E.ExpressionUtils.setField(this.option("dataAccessors"),"endDate",t,e),t}moveAppointmentBack(e){const t=this._$currentAppointment,i=this._initialSize,o=this._initialCoordinates;e&&(this._removeDragSourceClassFromDraggedAppointment(),(0,b.isDeferred)(e.cancel)?e.cancel.resolve(!0):e.cancel=!0),t&&!e&&(o&&((0,n.move)(t,o),delete this._initialSize),i&&((0,y.setOuterWidth)(t,i.width),(0,y.setOuterHeight)(t,i.height),delete this._initialCoordinates))}focus(){if(this._$currentAppointment){const e=(0,d.getPublicElement)(this._$currentAppointment);this.option("focusedElement",e),o.default.trigger(e,"focus")}}splitAppointmentByDay(e){const t=e.settings||e,i=this.option("dataAccessors"),n=new Date(E.ExpressionUtils.getField(i,"startDate",t));let o=g.default.makeDate(n),a=g.default.makeDate(E.ExpressionUtils.getField(i,"endDate",t));const s=this.invoke("getEndViewDate"),r=this.invoke("getStartDayHour"),l=this.invoke("getEndDayHour"),d=this.option("timeZoneCalculator"),u=(0,S.createAppointmentAdapter)(e,i,d),c=(0,P.getAppointmentTakesSeveralDays)(u),h=[];for(o=d.createDate(o,{path:"toGrid"}),a=d.createDate(a,{path:"toGrid"}),o.getHours()<=l&&o.getHours()>=r&&!c&&(h.push(this._applyStartDateToObj(new Date(o),{appointmentData:e})),o.setDate(o.getDate()+1));c&&o.getTime()<a.getTime()&&o<s;){const t=new Date(o),i=new Date(o);this._checkStartDate(t,n,r),this._checkEndDate(i,a,l);const s=(0,v.deepExtendArraySafe)({},e,!0),d={};this._applyStartDateToObj(t,d),this._applyEndDateToObj(i,d),s.settings=d,h.push(s),o=g.default.trimTime(o),o.setDate(o.getDate()+1),o.setHours(r)}return h}_checkStartDate(e,t,i){!g.default.sameDate(e,t)||e.getHours()<=i?e.setHours(i,0,0,0):e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}_checkEndDate(e,t,i){!g.default.sameDate(e,t)||e.getHours()>i?e.setHours(i,0,0,0):e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}_removeDragSourceClassFromDraggedAppointment(){this._itemElements().filter(`.${D.APPOINTMENT_DRAG_SOURCE_CLASS}`).each(((e,t)=>{(0,c.default)(t).dxSchedulerAppointment("instance").option("isDragSource",!1)}))}_setDragSourceAppointment(e,t){const i=this._findItemElementByItem(e),{startDate:n,endDate:o}=t.info.sourceAppointment,{groupIndex:a}=t;i.forEach((e=>{const{info:t,groupIndex:i}=e.data(I.APPOINTMENT_SETTINGS_KEY),{startDate:s,endDate:r}=t.sourceAppointment,l=e.dxSchedulerAppointment("instance"),d=n.getTime()===s.getTime()&&o.getTime()===r.getTime()&&a===i;l.option("isDragSource",d)}))}updateResizableArea(){const e=this.$element().find(".dx-scheduler-appointment.dx-resizable"),t=(0,p.grep)(e,(e=>{const t=(0,c.default)(e).dxResizable("instance"),{area:i,handles:n}=t.option();return("right left"===n||"left right"===n)&&(0,b.isPlainObject)(i)}));(0,m.each)(t,((e,t)=>{const i=(0,c.default)(t),o=(0,n.locate)(i),a=this._getItemData(i),s=this._calculateResizableArea({left:o.left},a);i.dxResizable("instance").option("area",s)}))}}(0,r.default)("dxSchedulerAppointments",H);t.default=H},18413:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createAppointmentLayout=t.createAgendaAppointmentLayout=void 0;var n=r(i(4671)),o=r(i(64960)),a=r(i(64553)),s=i(80126);function r(e){return e&&e.__esModule?e:{default:e}}const l=` ${n.default.format("dxScheduler-allDay")}: `,d=n.default.format("dxScheduler-appointmentAriaLabel-recurring");t.createAppointmentLayout=(e,t)=>{const i=(0,a.default)(o.default.createDocumentFragment());(0,a.default)("<div>").text(e.text).addClass(s.APPOINTMENT_CONTENT_CLASSES.APPOINTMENT_TITLE).appendTo(i),t.html&&i.html(t.html);const n=(0,a.default)("<div>").addClass(s.APPOINTMENT_CONTENT_CLASSES.APPOINTMENT_CONTENT_DETAILS).appendTo(i);return(0,a.default)("<div>").addClass(s.APPOINTMENT_CONTENT_CLASSES.APPOINTMENT_DATE).text(e.formatDate).appendTo(n),t.isRecurrence&&(0,a.default)("<span>").addClass(`${s.APPOINTMENT_CONTENT_CLASSES.RECURRING_ICON} dx-icon-repeat`).attr("aria-label",d).attr("role","img").appendTo(i),t.isAllDay&&(0,a.default)("<div>").text(l).addClass(s.APPOINTMENT_CONTENT_CLASSES.ALL_DAY_CONTENT).prependTo(n),i};t.createAgendaAppointmentLayout=(e,t)=>{const i=(0,a.default)(o.default.createDocumentFragment()),n=(0,a.default)("<div>").addClass("dx-scheduler-agenda-appointment-left-layout").appendTo(i),r=(0,a.default)("<div>").addClass("dx-scheduler-agenda-appointment-right-layout").appendTo(i),u=(0,a.default)("<div>").addClass(s.APPOINTMENT_CONTENT_CLASSES.AGENDA_MARKER).appendTo(n);t.isRecurrence&&(0,a.default)("<span>").addClass(`${s.APPOINTMENT_CONTENT_CLASSES.RECURRING_ICON} dx-icon-repeat`).attr("aria-label",d).appendTo(u);(0,a.default)("<div>").addClass(s.APPOINTMENT_CONTENT_CLASSES.APPOINTMENT_TITLE).text(e.text).appendTo(r);const c=(0,a.default)("<div>").addClass(s.APPOINTMENT_CONTENT_CLASSES.APPOINTMENT_CONTENT_DETAILS).appendTo(r);(0,a.default)("<div>").addClass(s.APPOINTMENT_CONTENT_CLASSES.APPOINTMENT_DATE).text(e.formatDate).appendTo(c);return t.isAllDay&&(0,a.default)("<div>").text(l).addClass(s.APPOINTMENT_CONTENT_CLASSES.ALL_DAY_CONTENT).prependTo(c),i}},71358:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CellPositionCalculator=void 0;var n=i(11528),o=i(55594);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}class s{constructor(e){this.isVirtualScrolling=!1,this.options=e}get DOMMetaData(){return this.options.DOMMetaData}get appointments(){return this.options.dateSettings}get viewDataProvider(){return this.options.viewDataProvider}get positionHelper(){return this.options.positionHelper}get startViewDate(){return this.options.startViewDate}get viewStartDayHour(){return this.options.viewStartDayHour}get viewEndDayHour(){return this.options.viewEndDayHour}get cellDuration(){return this.options.cellDuration}get getPositionShift(){return this.options.getPositionShiftCallback}get groupCount(){return this.options.groupCount}get rtlEnabled(){return this.options.rtlEnabled}get isVerticalGrouping(){return this.options.isVerticalGroupOrientation}get showAllDayPanel(){return this.options.showAllDayPanel}get supportAllDayRow(){return this.options.supportAllDayRow}get isGroupedAllDayPanel(){return this.options.isGroupedAllDayPanel}calculateCellPositions(e,t,i){const n=[];return this.appointments.forEach(((o,a)=>{this.getCoordinateInfos({appointment:o,groupIndices:e,isAllDayRowAppointment:t,isRecurrentAppointment:i}).forEach((e=>{e&&n.push(this._prepareObject(e,a))}))})),n}getCoordinateInfos(e){const{appointment:t,isAllDayRowAppointment:i,groupIndices:n,recurrent:o}=e,{startDate:a}=t,s=o?void 0:t.source.groupIndex;return this.getCoordinatesByDateInGroup(a,n,i,s)}_prepareObject(e,t){return e.dateSettingIndex=t,{coordinates:e,dateSettingIndex:t}}getCoordinatesByDate(e,t,i){const n=t||0,o={groupIndex:n,startDate:e,isAllDay:i},a=this.viewDataProvider.findCellPositionInMap(o,!0);if(!a)return;const s=this.getCellPosition(a,i&&!this.isVerticalGrouping),r=this.viewDataProvider.getGroupEdgeIndices(n),{top:l}=this.getCellPosition({columnIndex:a.columnIndex,rowIndex:r.firstRowIndex},i&&!this.isVerticalGrouping),d=i?0:this.getTimeShiftRatio(a,e),u=this.getPositionShift(d,i),c=this.positionHelper.getHorizontalMax(n,e),h=this.positionHelper.getVerticalMax({groupIndex:n,isVirtualScrolling:this.isVirtualScrolling,showAllDayPanel:this.showAllDayPanel,supportAllDayRow:this.supportAllDayRow,isGroupedAllDayPanel:this.isGroupedAllDayPanel,isVerticalGrouping:this.isVerticalGrouping});return{positionByMap:a,cellPosition:s.left+u.cellPosition,top:s.top+u.top,left:s.left+u.left,rowIndex:s.rowIndex,columnIndex:s.columnIndex,hMax:c,vMax:h,vMin:l,groupIndex:n}}getCoordinatesByDateInGroup(e,t,i,o){const a=[];if(this.viewDataProvider.isSkippedDate(e))return a;let s=[o];return(0,n.isDefined)(o)||(s=this.groupCount?t:[0]),s.forEach((t=>{const n=this.getCoordinatesByDate(e,t,i);n&&a.push(n)})),a}getCellPosition(e,t){const{dateTableCellsMeta:i,allDayPanelCellsMeta:n}=this.DOMMetaData,{columnIndex:o,rowIndex:s}=e,r=t?n[o]:i[s][o],l=a({},r);return this.rtlEnabled&&(l.left+=r.width),l&&(l.rowIndex=e.rowIndex,l.columnIndex=e.columnIndex),l}getTimeShiftRatio(e,t){const{cellDuration:i,viewOffset:n}=this.options,{rowIndex:a,columnIndex:s}=e,r=this.viewDataProvider.viewDataMap.dateTableMap[a][s],l=o.dateUtilsTs.addOffsets(r.cellData.startDate,[-n]);return(t.getTime()-l.getTime())/i%1}}class r extends s{constructor(){super(...arguments),this.isVirtualScrolling=!0}calculateCellPositions(e,t,i){const n=t?this.appointments:this.appointments.filter((e=>{let{source:t,startDate:i,endDate:n}=e;return this.viewDataProvider.isGroupIntersectDateInterval(t.groupIndex,i,n)}));return i?this.createRecurrentAppointmentInfos(n,t):super.calculateCellPositions(e,t,i)}createRecurrentAppointmentInfos(e,t){const i=[];return e.forEach(((e,n)=>{let{source:o,startDate:a}=e;const s=this.getCoordinatesByDate(a,o.groupIndex,t);s&&i.push(this._prepareObject(s,n))})),i}}t.CellPositionCalculator=class{constructor(e){this.options=e}calculateCellPositions(e,t,i){return(this.options.isVirtualScrolling?new r(this.options):new s(this.options)).calculateCellPositions(e,t,i)}}},91658:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateGeneratorVirtualStrategy=t.DateGeneratorBaseStrategy=t.AppointmentSettingsGenerator=void 0;var n=_(i(41380)),o=i(52576),a=i(11528),s=i(55594),r=i(34396),l=i(66823),d=i(26012),u=i(55122),c=_(i(18648)),h=i(45629),p=i(71358),g=i(9680);function _(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},f.apply(null,arguments)}const m=n.default.dateToMilliseconds;class v{constructor(e){this.options=e}get rawAppointment(){return this.options.rawAppointment}get timeZoneCalculator(){return this.options.timeZoneCalculator}get viewDataProvider(){return this.options.viewDataProvider}get appointmentTakesAllDay(){return this.options.appointmentTakesAllDay}get supportAllDayRow(){return this.options.supportAllDayRow}get isAllDayRowAppointment(){return this.options.isAllDayRowAppointment}get timeZone(){return this.options.timeZone}get dateRange(){return this.options.dateRange}get firstDayOfWeek(){return this.options.firstDayOfWeek}get viewStartDayHour(){return this.options.viewStartDayHour}get viewEndDayHour(){return this.options.viewEndDayHour}get endViewDate(){return this.options.endViewDate}get viewType(){return this.options.viewType}get isGroupedByDate(){return this.options.isGroupedByDate}get isVerticalOrientation(){return this.options.isVerticalGroupOrientation}get dataAccessors(){return this.options.dataAccessors}get loadedResources(){return this.options.loadedResources}get isDateAppointment(){return!(0,r.isDateAndTimeView)(this.viewType)&&this.appointmentTakesAllDay}getIntervalDuration(){return this.appointmentTakesAllDay?this.options.allDayIntervalDuration:this.options.intervalDuration}generate(e){const{isRecurrent:t}=e,i=this._getGroupIndices(this.rawAppointment);let n=this._createAppointments(e,i);n=this._getProcessedByAppointmentTimeZone(n,e),this._canProcessNotNativeTimezoneDates(e)&&(n=this._getProcessedNotNativeTimezoneDates(n,e));let o=this._createGridAppointmentList(n,e);const a=this._getAppointmentsFirstViewDate(o);return o=this._fillNormalizedStartDate(o,a),o=this._cropAppointmentsByStartDayHour(o,a),o=this._fillNormalizedEndDate(o,this.rawAppointment),this._needSeparateLongParts()&&(o=this._separateLongParts(o,e)),o=this.shiftSourceAppointmentDates(o),{dateSettings:o,itemGroupIndices:i,isRecurrent:t}}shiftSourceAppointmentDates(e){const{viewOffset:t}=this.options;return e.map((e=>f({},e,{source:f({},e.source,{startDate:s.dateUtilsTs.addOffsets(e.source.startDate,[t]),endDate:s.dateUtilsTs.addOffsets(e.source.endDate,[t])})})))}_getProcessedByAppointmentTimeZone(e,t){if(!(0,a.isEmptyObject)(t.startDateTimeZone)||!(0,a.isEmptyObject)(t.endDateTimeZone)){const i={startDate:this.timeZoneCalculator.getOffsets(t.startDate,t.startDateTimeZone),endDate:this.timeZoneCalculator.getOffsets(t.endDate,t.endDateTimeZone)};e.forEach((e=>{const n=this.timeZoneCalculator.getOffsets(e.startDate,t.startDateTimeZone),o=this.timeZoneCalculator.getOffsets(e.endDate,t.endDateTimeZone),a=i.startDate.appointment-n.appointment,s=i.endDate.appointment-o.appointment;n.appointment!==n.common&&(e.startDate=new Date(e.startDate.getTime()+a*m("hour"))),o.appointment!==o.common&&(e.endDate=new Date(e.endDate.getTime()+s*m("hour")))}))}return e}_createAppointments(e,t){let i=this._createRecurrenceAppointments(e,t);return e.isRecurrent||0!==i.length||i.push({startDate:e.startDate,endDate:e.endDate}),i=i.map((e=>{var t;const i=null===(t=e.endDate)||void 0===t?void 0:t.getTime();return e.startDate.getTime()===i&&e.endDate.setTime(i+m("minute")),f({},e,{exceptionDate:new Date(e.startDate)})})),i}_canProcessNotNativeTimezoneDates(e){return!(0,a.isEmptyObject)(this.timeZone)&&(!!e.isRecurrent&&!c.default.isEqualLocalTimeZone(this.timeZone,e.startDate))}_getProcessedNotNativeDateIfCrossDST(e,t){if(t<0){const t=new Date(e),i=new Date(t);i.setHours(i.getHours()-1);if(this.timeZoneCalculator.getOffsets(t).common!==this.timeZoneCalculator.getOffsets(i).common)return 0}return t}_getCommonOffset(e){return this.timeZoneCalculator.getOffsets(e).common}_getProcessedNotNativeTimezoneDates(e,t){return e.map((e=>{let i=this._getCommonOffset(t.startDate)-this._getCommonOffset(e.startDate),n=this._getCommonOffset(t.endDate)-this._getCommonOffset(e.endDate);if(0===i&&0===n)return e;i=this._getProcessedNotNativeDateIfCrossDST(e.startDate,i),n=this._getProcessedNotNativeDateIfCrossDST(e.endDate,n);const o=new Date(e.startDate.getTime()+i*m("hour"));let a=new Date(e.endDate.getTime()+n*m("hour"));const s=this.timeZoneCalculator.createDate(o,{path:"toGrid"}),r=this.timeZoneCalculator.createDate(a,{path:"toGrid"});return t.duration>r.getTime()-s.getTime()&&(a=new Date(o.getTime()+t.duration)),f({},e,{startDate:o,endDate:a,exceptionDate:new Date(o)})}))}_needSeparateLongParts(){return this.isVerticalOrientation?this.isGroupedByDate:this.isGroupedByDate&&this.appointmentTakesAllDay}normalizeEndDateByViewEnd(e,t){let i=new Date(t.getTime());if(!((0,r.isDateAndTimeView)(this.viewType)&&this.appointmentTakesAllDay)){const e=n.default.roundToHour(this.endViewDate);i>e&&(i=e)}const o=this.viewEndDayHour,a=d.ExpressionUtils.getField(this.dataAccessors,"allDay",e),s=new Date(new Date(t.getTime()).setHours(o,0,0,0));return(i.getTime()>s.getTime()||a&&i.getHours()<o)&&(i=s),i}_fillNormalizedEndDate(e,t){return e.map((e=>f({},e,{normalizedEndDate:this.normalizeEndDateByViewEnd(t,e.endDate)})))}_separateLongParts(e,t){let i=[];return e.forEach((e=>{const o=new Date(this.dateRange[1]),{startDate:a,normalizedEndDate:s}=e,r=n.default.getDatesOfInterval(a,s,{milliseconds:this.getIntervalDuration()}).filter((e=>new Date(e)<o)).map((i=>{const n=new Date(new Date(i).setMilliseconds(t.duration));return{startDate:i,endDate:n,normalizedEndDate:this.normalizeEndDateByViewEnd(this.rawAppointment,n),source:e.source}}));i=i.concat(r)})),i}_createGridAppointmentList(e,t){return e.map((e=>{const i=t.startDate.getTimezoneOffset()-e.startDate.getTimezoneOffset();0!==i&&this._canProcessNotNativeTimezoneDates(t)&&(e.startDate=s.dateUtilsTs.addOffsets(e.startDate,[i*m("minute")]),e.endDate=s.dateUtilsTs.addOffsets(e.endDate,[i*m("minute")]),e.exceptionDate=new Date(e.startDate));const n=e.endDate.getTime()-e.startDate.getTime(),o=this.timeZoneCalculator.createDate(e.startDate,{path:"toGrid"});return{startDate:o,endDate:s.dateUtilsTs.addOffsets(o,[n]),allDay:t.allDay||!1,source:e}}))}_createExtremeRecurrenceDates(e){let t=this.appointmentTakesAllDay?n.default.trimTime(this.dateRange[0]):this.dateRange[0],i=this.dateRange[1];if(this.timeZone){t=this.timeZoneCalculator.createDate(t,{path:"fromGrid"}),i=this.timeZoneCalculator.createDate(i,{path:"fromGrid"});const e=c.default.getDaylightOffsetInMs(t,i);e&&(i=new Date(i.getTime()+e))}return[t,i]}_createRecurrenceOptions(e,t){const{viewOffset:i}=this.options,o=s.dateUtilsTs.addOffsets(e.startDate,[i]),r=s.dateUtilsTs.addOffsets(e.endDate,[i]),[l,d]=this._createExtremeRecurrenceDates(t),u=s.dateUtilsTs.addOffsets(l,[i]),h=s.dateUtilsTs.addOffsets(d,[i]);return{rule:e.recurrenceRule,exception:e.recurrenceException,min:u,max:h,firstDayOfWeek:this.firstDayOfWeek,start:o,end:r,appointmentTimezoneOffset:this.timeZoneCalculator.getOriginStartDateOffsetInMs(o,e.rawAppointment.startDateTimeZone,!0),getPostProcessedException:e=>{if((0,a.isEmptyObject)(this.timeZone)||c.default.isEqualLocalTimeZone(this.timeZone,e))return e;let t=this.timeZoneCalculator.getOffsets(o).common-this.timeZoneCalculator.getOffsets(e).common;return t=this._getProcessedNotNativeDateIfCrossDST(e,t),new Date(e.getTime()-t*n.default.dateToMilliseconds("hour"))}}}_createRecurrenceAppointments(e,t){const{duration:i}=e,{viewOffset:n}=this.options,o=this._createRecurrenceOptions(e);return(0,u.getRecurrenceProcessor)().generateDates(o).map((e=>{const t=c.default.createUTCDateWithLocalOffset(e);t.setTime(t.getTime()+i);const n=c.default.createDateFromUTCWithLocalOffset(t);return{startDate:new Date(e),endDate:n}})).map((e=>{let{startDate:t,endDate:i}=e;return{startDate:s.dateUtilsTs.addOffsets(t,[-n]),endDate:s.dateUtilsTs.addOffsets(i,[-n])}}))}_getAppointmentsFirstViewDate(e){const{viewOffset:t}=this.options;return e.map((e=>{const i=this._getAppointmentFirstViewDate(f({},e,{startDate:s.dateUtilsTs.addOffsets(e.startDate,[t]),endDate:s.dateUtilsTs.addOffsets(e.endDate,[t])}));if(!i)return e.startDate;const n=s.dateUtilsTs.addOffsets(i,[-t]);return n>e.startDate?n:e.startDate}))}_fillNormalizedStartDate(e,t,i){return e.map(((e,n)=>f({},e,{startDate:this._getAppointmentResultDate({appointment:e,rawAppointment:i,startDate:new Date(e.startDate),startDayHour:this.viewStartDayHour,firstViewDate:t[n]})})))}_cropAppointmentsByStartDayHour(e,t){return e.filter(((e,i)=>!!t[i]&&(!!this.appointmentTakesAllDay||e.endDate>e.startDate)))}_getAppointmentResultDate(e){const{appointment:t,startDayHour:i,firstViewDate:o}=e;let a,{startDate:s}=e;return this.appointmentTakesAllDay?a=n.default.normalizeDate(s,o):(s<o&&(s=o),a=n.default.normalizeDate(t.startDate,s)),this.isDateAppointment?a:n.default.roundDateByStartDayHour(a,i)}_getAppointmentFirstViewDate(e){const t=e.source.groupIndex||0,{startDate:i,endDate:n}=e;return this.isAllDayRowAppointment||e.allDay?this.viewDataProvider.findAllDayGroupCellStartDate(t):this.viewDataProvider.findGroupCellStartDate(t,i,n,this.isDateAppointment)}_getGroupIndices(e){let t=[];if(e&&this.loadedResources.length){const i=(0,h.createResourcesTree)(this.loadedResources);t=(0,h.getResourceTreeLeaves)(((e,t)=>(0,h.getDataAccessors)(this.options.dataAccessors.resources,e,t)),i,e)}return t}}t.DateGeneratorBaseStrategy=v;class C extends v{get groupCount(){return(0,r.getGroupCount)(this.loadedResources)}_createRecurrenceAppointments(e,t){const{duration:i}=e,n=[];return(this.groupCount?t:[0]).forEach((t=>{const o=this._createRecurrenceOptions(e,t),a=(0,u.getRecurrenceProcessor)().generateDates(o).map((e=>{const n=new Date(e),o=c.default.createUTCDateWithLocalOffset(e);o.setTime(o.getTime()+i);return{startDate:n,endDate:c.default.createDateFromUTCWithLocalOffset(o),groupIndex:t}}));n.push(...a)})),n}_updateGroupIndices(e,t){const i=[];return t.forEach((t=>{this.viewDataProvider.getGroupStartDate(t)&&e.forEach((e=>{const n=(0,o.extend)({},e);n.groupIndex=t,i.push(n)}))})),i}_getGroupIndices(e){var t;let i=super._getGroupIndices(e);const n=this.viewDataProvider.getGroupIndices();return null!==(t=i)&&void 0!==t&&t.length||(i=[0]),i.filter((e=>-1!==n.indexOf(e)))}_createAppointments(e,t){const i=super._createAppointments(e,t);return e.isRecurrent?i:this._updateGroupIndices(i,t)}}t.DateGeneratorVirtualStrategy=C;t.AppointmentSettingsGenerator=class{constructor(e){this.options=e,this.appointmentAdapter=(0,l.createAppointmentAdapter)(this.rawAppointment,this.dataAccessors,this.timeZoneCalculator)}get rawAppointment(){return this.options.rawAppointment}get dataAccessors(){return this.options.dataAccessors}get timeZoneCalculator(){return this.options.timeZoneCalculator}get isAllDayRowAppointment(){return this.options.appointmentTakesAllDay&&this.options.supportAllDayRow}get groups(){return this.options.groups}get dateSettingsStrategy(){const e=f({},this.options,{isAllDayRowAppointment:this.isAllDayRowAppointment});return this.options.isVirtualScrolling?new C(e):new v(e)}create(){const{dateSettings:e,itemGroupIndices:t,isRecurrent:i}=this._generateDateSettings(),n=this._calculateCellPositions(e,t);return this._prepareAppointmentInfos(e,n,i)}_generateDateSettings(){return this.dateSettingsStrategy.generate(this.appointmentAdapter)}_calculateCellPositions(e,t){return new p.CellPositionCalculator(f({},this.options,{dateSettings:e})).calculateCellPositions(t,this.isAllDayRowAppointment,this.appointmentAdapter.isRecurrent)}_prepareAppointmentInfos(e,t,i){const n=[];return t.forEach((t=>{let{coordinates:o,dateSettingIndex:a}=t;const s=e[a],r=this._getAppointmentDateText(s),l={appointment:s,sourceAppointment:s.source,dateText:r,isRecurrent:i};n.push(f({},o,{info:l}))})),n}_getAppointmentDateText(e){const{startDate:t,endDate:i,allDay:n}=e;return(0,g.createFormattedDateText)({startDate:t,endDate:i,allDay:n,format:"TIME"})}}},9680:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getFormatType=t.formatDates=t.createFormattedDateText=void 0;var n=a(i(38662)),o=a(i(41380));function a(e){return e&&e.__esModule?e:{default:e}}t.createFormattedDateText=e=>{const{startDate:t,endDate:i,allDay:n,format:o}=e,a=o||s(t,i,n);return r(t,i,a)};const s=(e,t,i,n)=>i?"DATE":n&&o.default.sameDate(e,t)?"TIME":"DATETIME";t.getFormatType=s;const r=(e,t,i)=>{const o="monthandday",a="shorttime",s=e.getDate()===t.getDate();switch(i){case"DATETIME":return[n.default.format(e,o)," ",n.default.format(e,a)," - ",s?"":`${n.default.format(t,o)} `,n.default.format(t,a)].join("");case"TIME":return`${n.default.format(e,a)} - ${n.default.format(t,a)}`;case"DATE":return`${n.default.format(e,o)}${s?"":` - ${n.default.format(t,o)}`}`}};t.formatDates=r},91200:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AppointmentViewModelGenerator=void 0;var n=i(55594),o=i(34396),a=c(i(28440)),s=c(i(75064)),r=c(i(2101)),l=c(i(99198)),d=c(i(1670)),u=c(i(27488));function c(e){return e&&e.__esModule?e:{default:e}}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},h.apply(null,arguments)}const p={horizontal:s.default,horizontalMonth:r.default,horizontalMonthLine:l.default,vertical:d.default,week:u.default,agenda:a.default};t.AppointmentViewModelGenerator=class{initRenderingStrategy(e){const t=p[e.appointmentRenderingStrategyName];this.renderingStrategy=new t(e)}generate(e,t){const{viewOffset:i}=t,n=e?e.slice():[];this.initRenderingStrategy(t);const o=this.getRenderingStrategy().createTaskPositionMap(n),a=this.postProcess(n,o);return{positionMap:o,viewModel:this.unshiftViewModelAppointmentsByViewOffset(a,i)}}postProcess(e,t){const i=this.getRenderingStrategy();return e.map(((e,n)=>{i.keepAppointmentSettings()||delete e.settings;const o=t[n];o.forEach((e=>{e.direction="vertical"!==i.getDirection()||e.allDay?"horizontal":"vertical"}));const a={itemData:e,settings:o,needRepaint:!0,needRemove:!1};return a}))}makeRenovatedViewModels(e,t,i){const n=this.getRenderingStrategy(),o=[],a=[],s=[],r=t&&!i;e.forEach((e=>{let{itemData:t,settings:i}=e;i.forEach((e=>{const i=this.prepareViewModel(e,n,t);e.isCompact?s.push({compactViewModel:e.virtual,appointmentViewModel:i}):e.allDay&&r?a.push(i):o.push(i)}))}));const l=this.prepareCompactViewModels(s,t);return h({allDay:a,regular:o},l)}prepareViewModel(e,t,i){const n=t.getAppointmentGeometry(e);return{key:(0,o.getAppointmentKey)(n),appointment:i,geometry:h({},n,{leftVirtualWidth:e.leftVirtualWidth,topVirtualHeight:e.topVirtualHeight}),info:h({},e.info,{allDay:e.allDay,direction:e.direction,appointmentReduced:e.appointmentReduced,groupIndex:e.groupIndex})}}getCompactViewModelFrame(e){return{isAllDay:!!e.isAllDay,isCompact:e.isCompact,groupIndex:e.groupIndex,geometry:{left:e.left,top:e.top,width:e.width,height:e.height},items:{colors:[],data:[],settings:[]}}}prepareCompactViewModels(e,t){const i={},n={};e.forEach((e=>{let{compactViewModel:o,appointmentViewModel:a}=e;const{index:s,isAllDay:r}=o,l=r&&t?n:i;l[s]||(l[s]=this.getCompactViewModelFrame(o));const{settings:d,data:u,colors:c}=l[s].items;d.push(a),u.push(a.appointment),c.push(a.info.resourceColor)}));const o=e=>Object.keys(e).map((t=>h({key:t},e[t])));return{allDayCompact:o(n),regularCompact:o(i)}}getRenderingStrategy(){return this.renderingStrategy}unshiftViewModelAppointmentsByViewOffset(e,t){const i=new Set;for(const a of e)for(const e of a.settings??[]){var o;const a=null==e||null===(o=e.info)||void 0===o?void 0:o.appointment;a&&!i.has(a)&&(a.startDate=n.dateUtilsTs.addOffsets(a.startDate,[t]),a.endDate=n.dateUtilsTs.addOffsets(a.endDate,[t]),a.normalizedEndDate=n.dateUtilsTs.addOffsets(a.normalizedEndDate,[t]),i.add(a))}return e}}},1987:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(50292))&&n.__esModule?n:{default:n};class a extends o.default{getDropDownAppointmentWidth(e,t){return this.getDropDownButtonAdaptiveSize()}getDropDownButtonAdaptiveSize(){return 28}getCollectorTopOffset(e){const t=this._renderingStrategy;return t.allDaySupported()&&e?(t.allDayHeight-t.getDropDownButtonAdaptiveSize())/2:this._renderingStrategy.cellHeight-40}getCollectorLeftOffset(){const e=this._renderingStrategy.getDropDownAppointmentWidth();return(this._renderingStrategy.cellWidth-e)/2}getAppointmentDefaultOffset(){return 35}getDynamicAppointmentCountPerCell(){return this._renderingStrategy.allDaySupported()?{allDay:0,simple:this._calculateDynamicAppointmentCountPerCell()||this._getAppointmentMinCount()}:0}getDropDownAppointmentHeight(){return 28}_getAppointmentMinCount(){return 0}_getAppointmentDefaultWidth(){return this._renderingStrategy.allDaySupported()?30:super._getAppointmentDefaultWidth()}_calculateDynamicAppointmentCountPerCell(){return Math.floor(this._renderingStrategy._getAppointmentMaxWidth()/this._renderingStrategy._getAppointmentDefaultWidth())}}t.default=a},50292:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(11528);t.default=class{constructor(e){this._renderingStrategy=e}getDropDownAppointmentWidth(e,t){return t||!(0,n.isDefined)(t)?75*this._renderingStrategy.cellWidth/100:24}getCollectorTopOffset(e){return 3}getCollectorLeftOffset(){return 3}getAppointmentDefaultOffset(){return this._renderingStrategy._isCompactTheme()?22:this._renderingStrategy.appointmentOffset}getDynamicAppointmentCountPerCell(){const e=this._renderingStrategy,{cellHeight:t}=e,i=Math.floor((t-e._getAppointmentDefaultOffset())/e._getAppointmentDefaultHeight())||this._getAppointmentMinCount();return e.allDaySupported()?{allDay:"vertical"===e.groupOrientation?i:this._renderingStrategy.appointmentCountPerCell,simple:this._calculateDynamicAppointmentCountPerCell()||this._getAppointmentMinCount()}:i}getDropDownAppointmentHeight(){}_getAppointmentMinCount(){return 1}_calculateDynamicAppointmentCountPerCell(){return Math.floor(this._renderingStrategy._getAppointmentMaxWidth()/50)}_getAppointmentDefaultWidth(){return 40}}},28440:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(41380)),o=i(21274),a=i(66823),s=i(26012),r=i(45629),l=i(2807),d=u(i(53137));function u(e){return e&&e.__esModule?e:{default:e}}class c extends d.default{get instance(){return this.options.instance}get agendaDuration(){return this.options.agendaDuration}getAppointmentMinSize(){}getDeltaTime(){}keepAppointmentSettings(){return!0}getAppointmentGeometry(e){return e}groupAppointmentByResources(e){const t=this.instance._getCurrentViewOption("groups"),i={loadedResources:this.options.loadedResources,resources:this.options.resources,dataAccessors:this.dataAccessors.resources};return(0,r.groupAppointmentsByResources)(i,e,t)}createTaskPositionMap(e){let t,i;if(this.calculateRows(e,this.agendaDuration,this.currentDate),e.length){t=this.instance.fire("getAgendaVerticalStepHeight"),i=this.groupAppointmentByResources(e);let n=[];(0,o.each)(i,((e,t)=>{let i=[],a=[];(0,o.each)(t,((e,t)=>{const n=this.instance.getAppointmentsInstance()._processRecurrenceAppointment(t,e);let o=null;n.indexes.length||(o=this.instance.getAppointmentsInstance()._processLongAppointment(t),i=i.concat(o.parts)),i=i.concat(n.parts),a=a.concat(n.indexes)})),this.instance.getAppointmentsInstance()._reduceRecurrenceAppointments(a,t),this.instance.getAppointmentsInstance()._combineAppointments(t,i),n=n.concat(t)})),Array.prototype.splice.apply(e,[0,e.length].concat(n))}const n=[];let a=0;return e.forEach(((e,o)=>{n.push([{height:t,width:"100%",sortedIndex:a++,groupIndex:this._calculateGroupIndex(o,i),agendaSettings:e.settings}]),delete e.settings})),n}_calculateGroupIndex(e,t){let i,n=0;for(const o in t){const a=t[o].length;if(e>=n&&e<n+a){i=Number(o);break}n+=a}return i}_getDeltaWidth(e,t){}_getAppointmentMaxWidth(){return this.cellWidth}_needVerifyItemSize(){return!1}_getAppointmentParts(e,t){}_reduceMultiWeekAppointment(){}calculateAppointmentHeight(){return 0}calculateAppointmentWidth(){return 0}isAppointmentGreaterThan(e,t){}isAllDay(){return!1}_sortCondition(){}_rowCondition(e,t){}_columnCondition(e,t){}_findIndexByKey(e,t,i,n,o){}_markAppointmentAsVirtual(){}getDropDownAppointmentWidth(){}getCollectorLeftOffset(){}getCollectorTopOffset(){}replaceWrongAppointmentEndDate(e,t,i){const n=(0,a.createAppointmentAdapter)(e,this.dataAccessors,this.timeZoneCalculator);(0,l.replaceWrongEndDate)(n,t,i,this.cellDuration,this.dataAccessors)}calculateRows(e,t,i,r){this._rows=[],i=n.default.trimTime(new Date(i));const d=this.groupAppointmentByResources(e);return(0,o.each)(d,((e,n)=>{const d=[],u={indexes:[],parts:[]};if(!n.length)return this._rows.push([]),!0;(0,o.each)(n,((e,t)=>{const i=s.ExpressionUtils.getField(this.dataAccessors,"startDate",t),n=s.ExpressionUtils.getField(this.dataAccessors,"endDate",t);this.replaceWrongAppointmentEndDate(t,i,n),r&&delete t.settings;const o=this.instance.getAppointmentsInstance()._processRecurrenceAppointment(t,e,!1);u.parts=u.parts.concat(o.parts),u.indexes=u.indexes.concat(o.indexes)})),this.instance.getAppointmentsInstance()._reduceRecurrenceAppointments(u.indexes,n),n.push(...u.parts);const c=n.length;for(let e=0;e<t;e++){const t=new Date(i);t.setMilliseconds(t.getMilliseconds()+864e5*e),void 0===d[e]&&(d[e]=0);for(let i=0;i<c;i++){const o=n[i].settings||n[i],r=(0,a.createAppointmentAdapter)(n[i],this.dataAccessors,this.timeZoneCalculator),u=(0,l.getAppointmentTakesSeveralDays)(r),c=s.ExpressionUtils.getField(this.dataAccessors,"recurrenceRule",n[i]);(this.instance.fire("dayHasAppointment",t,o,!0)||!c&&u&&this.instance.fire("dayHasAppointment",t,n[i],!0))&&(d[e]+=1)}}this._rows.push(d)})),this._rows}_iterateRow(e,t,i){for(let n=0;n<e.length;n++)if(t.counter+=e[n],t.counter>=i){t.indexInRow=n;break}}getDateByIndex(e,t,i){const n={counter:0,indexInRow:0};e++;for(let i=0;i<t.length&&(this._iterateRow(t[i],n,e),!n.indexInRow);i++);return new Date(new Date(i).setDate(i.getDate()+n.indexInRow))}getAppointmentDataCalculator(){return(e,t)=>{const i=e.index(),n=this.instance.getStartViewDate(),o=this.getDateByIndex(i,this._rows,n),a=new Date(t);return{startDate:new Date(o.setHours(a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()))}}}}t.default=c},53137:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_(i(41380)),o=i(52576),a=i(11528),s=i(52071),r=i(55594),l=i(26012),d=i(34396),u=i(66823),c=_(i(18648)),h=i(91658),p=_(i(1987)),g=_(i(50292));function _(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},f.apply(null,arguments)}const m=n.default.dateToMilliseconds;t.default=class{constructor(e){this.options=e,this._initPositioningStrategy()}get isAdaptive(){return this.options.adaptivityEnabled}get rtlEnabled(){return this.options.rtlEnabled}get startDayHour(){return this.options.startDayHour}get endDayHour(){return this.options.endDayHour}get maxAppointmentsPerCell(){return this.options.maxAppointmentsPerCell}get cellWidth(){return this.options.cellWidth}get cellHeight(){return this.options.cellHeight}get allDayHeight(){return this.options.allDayHeight}get resizableStep(){return this.options.resizableStep}get isGroupedByDate(){return this.options.isGroupedByDate}get visibleDayDuration(){return this.options.visibleDayDuration}get viewStartDayHour(){return this.options.viewStartDayHour}get viewEndDayHour(){return this.options.viewEndDayHour}get cellDuration(){return this.options.cellDuration}get cellDurationInMinutes(){return this.options.cellDurationInMinutes}get leftVirtualCellCount(){return this.options.leftVirtualCellCount}get topVirtualCellCount(){return this.options.topVirtualCellCount}get positionHelper(){return this.options.positionHelper}get showAllDayPanel(){return this.options.showAllDayPanel}get isGroupedAllDayPanel(){return this.options.isGroupedAllDayPanel}get groupOrientation(){return this.options.groupOrientation}get rowCount(){return this.options.rowCount}get groupCount(){return this.options.groupCount}get currentDate(){return this.options.currentDate}get appointmentCountPerCell(){return this.options.appointmentCountPerCell}get appointmentOffset(){return this.options.appointmentOffset}get allowResizing(){return this.options.allowResizing}get allowAllDayResizing(){return this.options.allowAllDayResizing}get viewDataProvider(){return this.options.viewDataProvider}get dataAccessors(){return this.options.dataAccessors}get timeZoneCalculator(){return this.options.timeZoneCalculator}get intervalCount(){return this.options.intervalCount}get allDayPanelMode(){return this.options.allDayPanelMode}get isVirtualScrolling(){return this.options.isVirtualScrolling}_correctCollectorCoordinatesInAdaptive(e,t){e.top+=this.getCollectorTopOffset(t),e.left+=this.getCollectorLeftOffset()}_initPositioningStrategy(){this._positioningStrategy=this.isAdaptive?new p.default(this):new g.default(this)}getPositioningStrategy(){return this._positioningStrategy}getAppointmentMinSize(){return 2}keepAppointmentSettings(){return!1}getDeltaTime(e,t,i){}getAppointmentGeometry(e){return e}needCorrectAppointmentDates(){return!0}getDirection(){return"horizontal"}createTaskPositionMap(e,t){delete this._maxAppointmentCountPerCell;const i=null==e?void 0:e.length;if(!i)return;const n=[];for(let t=0;t<i;t++){let i=this._getItemPosition(e[t]);i.length&&this.rtlEnabled&&(i=this._correctRtlCoordinates(i)),i.forEach((e=>{e.leftVirtualCellCount=this.leftVirtualCellCount,e.topVirtualCellCount=this.topVirtualCellCount,e.leftVirtualWidth=this.leftVirtualCellCount*this.cellWidth,e.topVirtualHeight=this.topVirtualCellCount*this.cellHeight})),n.push(i)}const o=this._getSortedPositions(n),a=this._getResultPositions(o);return this._getExtendedPositionMap(n,a)}_getDeltaWidth(e,t){const i=this.resizableStep||this.getAppointmentMinSize(),n=t.width;return Math.round((e.width-n)/i)}_correctRtlCoordinates(e){const t=e[0].width||this._getAppointmentMaxWidth();return e.forEach((e=>{e.appointmentReduced||(e.left-=t)})),e}_getAppointmentMaxWidth(){return this.cellWidth}_getItemPosition(e){const t=this.shiftAppointmentByViewOffset(e),i=this.generateAppointmentSettings(t),n=this.isAllDay(t);let a=[];for(let e=0;e<i.length;e++){const s=this.calculateAppointmentHeight(t,i[e]),r=this.calculateAppointmentWidth(t,i[e]);let l=r,d=null,u=[],c=i[e].rowIndex,h=i[e].columnIndex;if(this._needVerifyItemSize()||n){const t=i[e].hMax;this.isAppointmentGreaterThan(t,{left:i[e].left,width:r})&&(d="head",c=i[e].rowIndex,h=i[e].columnIndex,l=this._reduceMultiWeekAppointment(r,{left:i[e].left,right:t}),u=this._getAppointmentParts({sourceAppointmentWidth:r,reducedWidth:l,height:s},i[e]),this.rtlEnabled&&(i[e].left=t))}(0,o.extend)(i[e],{height:s,width:l,allDay:n,rowIndex:c,columnIndex:h,appointmentReduced:d}),a=this._getAppointmentPartsPosition(u,i[e],a)}return a}_getAppointmentPartsPosition(e,t,i){return e.length?(e.unshift(t),e.forEach(((t,i)=>{t.partIndex=i,t.partTotalCount=e.length})),i=i.concat(e)):i.push(t),i}getAppointmentSettingsGenerator(e){return new h.AppointmentSettingsGenerator(f({rawAppointment:e,appointmentTakesAllDay:this.isAppointmentTakesAllDay(e),getPositionShiftCallback:this.getPositionShift.bind(this)},this.options))}generateAppointmentSettings(e){return this.getAppointmentSettingsGenerator(e).create()}isAppointmentTakesAllDay(e){const t=(0,u.createAppointmentAdapter)(e,this.dataAccessors,this.timeZoneCalculator);return(0,d.getAppointmentTakesAllDay)(t,this.allDayPanelMode)}_getAppointmentParts(e,t){return[]}_getCompactAppointmentParts(e){const t=this.cellWidth||this.getAppointmentMinSize();return Math.round(e/t)}_reduceMultiWeekAppointment(e,t){return this.rtlEnabled?Math.floor(t.left-t.right):t.right-Math.floor(t.left)}calculateAppointmentHeight(e,t){return 0}calculateAppointmentWidth(e,t){return 0}isAppointmentGreaterThan(e,t){let i=t.left+t.width-e;return this.rtlEnabled&&(i=e+t.width-t.left),i>this.cellWidth/2}isAllDay(e){return!1}cropAppointmentWidth(e,t){return this.isGroupedByDate?t:e}_getSortedPositions(e,t){const i=[],n=e=>Math.round(100*e)/100,o=(e,t,i,o,a,s,r,l)=>({i:e,j:t,top:n(i),left:n(o),bottom:n(a),right:n(s),cellPosition:r,allDay:l});for(let t=0,n=e.length;t<n;t++)for(let n=0,a=e[t].length;n<a;n++){const{top:a,left:s,height:r,width:l,cellPosition:d,allDay:u}=e[t][n];i.push(o(t,n,a,s,a+r,s+l,d,u))}return i.sort(((e,t)=>this._sortCondition(e,t)))}_sortCondition(e,t){}_getConditions(e,t){const i=this._isSomeEdge(e,t);return{columnCondition:i||this._normalizeCondition(e.left,t.left),rowCondition:i||this._normalizeCondition(e.top,t.top),cellPositionCondition:i||this._normalizeCondition(e.cellPosition,t.cellPosition)}}_rowCondition(e,t){const i=this._getConditions(e,t);return i.columnCondition||i.rowCondition}_columnCondition(e,t){const i=this._getConditions(e,t);return i.rowCondition||i.columnCondition}_isSomeEdge(e,t){return e.i===t.i&&e.j===t.j}_normalizeCondition(e,t){const i=e-t;return Math.abs(i)>1?i:0}_isItemsCross(e,t){const i=!!e.allDay==!!t.allDay,n=e.allDay&&t.allDay;if(i){const i=this._getOrientation(n);return this._checkItemsCrossing(e,t,i)}return!1}_checkItemsCrossing(e,t,i){const n=Math.floor(e[i[0]]),o=Math.floor(e[i[1]]),a=Math.ceil(t[i[0]]),s=Math.ceil(t[i[1]]);return Math.abs(e[i[2]]-t[i[2]])<=1&&(n<=a&&o>a||n<s&&o>=s||n===a&&o===s)}_getOrientation(e){return e?["left","right","top"]:["top","bottom","left"]}_getResultPositions(e){const t=[];let i,n,o,a,s=0,r=0,l={};const d=(e,t)=>e.some((e=>e===t))?d(e,++t):t,u=(e,t)=>{const i=t||0,n=this._skipSortedIndex(i);return n&&(l.shouldShiftAfterSkip=!0),{index:i,i:e.i,j:e.j,left:e.left,right:e.right,top:e.top,bottom:e.bottom,allDay:e.allDay,sortedIndex:n?l.startSortedIndex:s++}},c=e=>{l.items=[u(e)],l.left=e.left,l.right=e.right,l.top=e.top,l.bottom=e.bottom,l.allDay=e.allDay,l.startSortedIndex=l.items[0].sortedIndex},h=e=>{e.items.forEach((i=>{t.push({index:i.index,count:r+1,i:i.i,j:i.j,sortedIndex:e.shouldShiftAfterSkip&&!this._skipSortedIndex(i.index)?i.sortedIndex+1:i.sortedIndex})})),e.shouldShiftAfterSkip&&(s+=1)};for(i=0;i<e.length;i++)n=e[i],o=[],l.items?this._isItemsCross(l,n)?(l.items.forEach((e=>{this._isItemsCross(e,n)&&o.push(e.index)})),a=o.length?d(o,0):0,l.items.push(u(n,a)),r=Math.max(a,r),l.left=Math.min(l.left,n.left),l.right=Math.max(l.right,n.right),l.top=Math.min(l.top,n.top),l.bottom=Math.max(l.bottom,n.bottom),l.allDay=n.allDay):(h(l),l={},c(n),r=0):c(n);return l.items&&h(l),t.sort(((e,t)=>{const i=e.j-t.j;return e.i-t.i||i}))}_skipSortedIndex(e){return e>this._getMaxAppointmentCountPerCell()-1}_findIndexByKey(e,t,i,n,o){let a=0;for(let s=0,r=e.length;s<r;s++)if(e[s][t]===n&&e[s][i]===o){a=s;break}return a}_getExtendedPositionMap(e,t){let i=0;const n=[];for(let o=0,a=e.length;o<a;o++){const a=[];for(let n=0,s=e[o].length;n<s;n++)e[o][n].index=t[i].index,e[o][n].sortedIndex=t[i].sortedIndex,e[o][n].count=t[i++].count,a.push(e[o][n]),this._checkLongCompactAppointment(e[o][n],a);n.push(a)}return n}_checkLongCompactAppointment(e,t){return this._splitLongCompactAppointment(e,t),t}_splitLongCompactAppointment(e,t){const i=this._getMaxAppointmentCountPerCellByType(e.allDay);let n=0;if(void 0!==i&&e.index>i-1){e.isCompact=!0,n=this._getCompactAppointmentParts(e.width);for(let i=1;i<n;i++){const n=(0,o.extend)(!0,{},e);n.left=this._getCompactLeftCoordinate(e.left,i),n.columnIndex+=i,n.sortedIndex=null,t.push(n)}}return t}_adjustDurationByDaylightDiff(e,t,i){const{viewOffset:n}=this.options,o=r.dateUtilsTs.addOffsets(t,[n]),a=r.dateUtilsTs.addOffsets(i,[n]),s=c.default.getDaylightOffset(o,a),l=this._needAdjustDuration(s)?this._calculateDurationByDaylightDiff(e,s):e;return l<=Math.abs(s)?e:l}_needAdjustDuration(e){return 0!==e}_calculateDurationByDaylightDiff(e,t){return e+t*m("minute")}_getCollectorLeftOffset(e){if(e||!this.isApplyCompactAppointmentOffset())return 0;const t=this.getDropDownAppointmentWidth(this.intervalCount,e),i=this._isCompactTheme()?1:5;return this.cellWidth-t-i}_markAppointmentAsVirtual(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this._getMaxAppointmentCountPerCellByType(t);if(e.count-i>0){const{top:i,left:n}=e,o=this.isAdaptive||!t&&this.supportCompactDropDownAppointments();e.virtual={left:n+this._getCollectorLeftOffset(t),top:i,width:this.getDropDownAppointmentWidth(this.intervalCount,t),height:this.getDropDownAppointmentHeight(),index:this._generateAppointmentCollectorIndex(e,t),isAllDay:t,groupIndex:e.groupIndex,isCompact:o}}}isApplyCompactAppointmentOffset(){return this.supportCompactDropDownAppointments()}supportCompactDropDownAppointments(){return!0}_generateAppointmentCollectorIndex(e,t){let{groupIndex:i,rowIndex:n,columnIndex:o}=e;return`${i}-${n}-${o}-${t}`}_getMaxAppointmentCountPerCellByType(e){const t=this._getMaxAppointmentCountPerCell();return(0,a.isObject)(t)?e?t.allDay:t.simple:t}getDropDownAppointmentWidth(e,t){return this.getPositioningStrategy().getDropDownAppointmentWidth(e,t)}getDropDownAppointmentHeight(){return this.getPositioningStrategy().getDropDownAppointmentHeight()}getDropDownButtonAdaptiveSize(){return 28}getCollectorTopOffset(e){return this.getPositioningStrategy().getCollectorTopOffset(e)}getCollectorLeftOffset(){return this.getPositioningStrategy().getCollectorLeftOffset()}getAppointmentDataCalculator(){}getVerticalAppointmentHeight(e,t,i){let n=i;if((0,a.isNumeric)(this.maxAppointmentsPerCell)){const e=this._getDynamicAppointmentCountPerCell(),o=e.allDay||e,a=Math.max(t,o);n=Math.min(a,i)}return e/n}_customizeCoordinates(e,t,i,n,o){const{index:a,count:s}=e,r=this.getVerticalAppointmentHeight(t,s,i),l=e.top+a*r+n,{width:d}=e,{left:u}=e;return e.isCompact&&(this.isAdaptive&&this._correctCollectorCoordinatesInAdaptive(e,o),this._markAppointmentAsVirtual(e,o)),{height:r,width:d,top:l,left:u,empty:this._isAppointmentEmpty(t,d)}}_isAppointmentEmpty(e,t){return e<this._getAppointmentMinHeight()||t<this._getAppointmentMinWidth()}_calculateGeometryConfig(e){const t=this.maxAppointmentsPerCell,i=this._getOffsets(),n=this._getAppointmentDefaultOffset();let o=this._getAppointmentCount(t,e),s=this._getDefaultRatio(e,o),r=this._getMaxHeight();(0,a.isNumeric)(o)||(o=e.count,s=(r-i.unlimited)/r);let l=(1-s)*r;return("auto"===t||(0,a.isNumeric)(t))&&(s=1,r-=n,l=n),{height:s*r,appointmentCountPerCell:o,offset:l}}_getAppointmentCount(e,t){}_getDefaultRatio(e,t){}_getOffsets(){}_getMaxHeight(){}_needVerifyItemSize(){return!1}_getMaxAppointmentCountPerCell(){if(!this._maxAppointmentCountPerCell){const e=this.maxAppointmentsPerCell;let t;(0,a.isNumeric)(e)&&(t=e),"auto"===e&&(t=this._getDynamicAppointmentCountPerCell()),"unlimited"===e&&(t=void 0),this._maxAppointmentCountPerCell=t}return this._maxAppointmentCountPerCell}_getDynamicAppointmentCountPerCell(){return this.getPositioningStrategy().getDynamicAppointmentCountPerCell()}allDaySupported(){return!1}_isCompactTheme(){return"compact"===((0,s.current)()||"").split(".").pop()}_getAppointmentDefaultOffset(){return this.getPositioningStrategy().getAppointmentDefaultOffset()}_getAppointmentDefaultHeight(){return this._getAppointmentHeightByTheme()}_getAppointmentMinHeight(){return this._getAppointmentDefaultHeight()}_getAppointmentHeightByTheme(){return this._isCompactTheme()?18:20}_getAppointmentDefaultWidth(){return this.getPositioningStrategy()._getAppointmentDefaultWidth()}_getAppointmentMinWidth(){return this._getAppointmentDefaultWidth()}_needVerticalGroupBounds(e){return!1}_needHorizontalGroupBounds(){return!1}getAppointmentDurationInMs(e,t,i){if(i){const i=t.getTime()-e.getTime();return Math.ceil(i/m("day"))*this.visibleDayDuration}const o=m("hour"),a=n.default.trimTime(e),s=n.default.trimTime(t),r=(s-a)/m("day")+1,l=this.endDayHour-this.startDayHour,d=l*r,u=(e-a)/o,c=Math.max(0,u-this.startDayHour),h=Math.max(0,(t-s)/o-this.startDayHour);return(d-(c+Math.max(0,l-h)))*o}getPositionShift(e,t){return{top:e*this.cellHeight,left:0,cellPosition:0}}shiftAppointmentByViewOffset(e){const{viewOffset:t}=this.options,i=this.dataAccessors.expr.startDateExpr,n=this.dataAccessors.expr.endDateExpr;let o=new Date(l.ExpressionUtils.getField(this.dataAccessors,"startDate",e));o=r.dateUtilsTs.addOffsets(o,[-t]);let a=new Date(l.ExpressionUtils.getField(this.dataAccessors,"endDate",e));return a=r.dateUtilsTs.addOffsets(a,[-t]),f({},e,{[i]:o,[n]:a})}}},75064:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(41380)),o=i(34396),a=i(26012),s=r(i(53137));function r(e){return e&&e.__esModule?e:{default:e}}const l=n.default.dateToMilliseconds;class d extends s.default{_needVerifyItemSize(){return!0}calculateAppointmentWidth(e,t){const i=this.cellWidth||this.getAppointmentMinSize(),n=a.ExpressionUtils.getField(this.dataAccessors,"allDay",e),{startDate:s,endDate:r,normalizedEndDate:d}=t.info.appointment;let u=this.getAppointmentDurationInMs(s,d,n);u=this._adjustDurationByDaylightDiff(u,s,d);const c=this.cellDurationInMinutes*l("minute"),h=(u-(0,o.getSkippedHoursInRange)(s,r,e.allDay,this.viewDataProvider)*l("hour"))/c;return this.cropAppointmentWidth(h*i,i)}_needAdjustDuration(e){return e<0}getAppointmentGeometry(e){const t=this._customizeAppointmentGeometry(e);return super.getAppointmentGeometry(t)}_customizeAppointmentGeometry(e){const t=this._calculateGeometryConfig(e);return this._customizeCoordinates(e,t.height,t.appointmentCountPerCell,t.offset)}_getOffsets(){return{unlimited:0,auto:0}}_getCompactLeftCoordinate(e,t){return e+(this.cellWidth||this.getAppointmentMinSize())*t}_getMaxHeight(){return this.cellHeight||this.getAppointmentMinSize()}_getAppointmentCount(e,t){return this._getMaxAppointmentCountPerCellByType(!1)}_getAppointmentDefaultHeight(){return 60}_getAppointmentMinHeight(){return 35}_sortCondition(e,t){return this._columnCondition(e,t)}_getOrientation(){return["left","right","top"]}getDropDownAppointmentWidth(e,t){return this.cellWidth-4}getDeltaTime(e,t){let i=0;const n=e.width-t.width;return i=l("minute")*Math.round(n/this.cellWidth*this.cellDurationInMinutes),i}isAllDay(e){return a.ExpressionUtils.getField(this.dataAccessors,"allDay",e)}_isItemsCross(e,t){const i=this._getOrientation();return this._checkItemsCrossing(e,t,i)}getPositionShift(e){const t=super.getPositionShift(e);let i=this.cellWidth*e;return this.rtlEnabled&&(i*=-1),i+=t.left,{top:0,left:i,cellPosition:i}}supportCompactDropDownAppointments(){return!1}}t.default=d},2101:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(41380)),o=i(39979),a=s(i(99198));function s(e){return e&&e.__esModule?e:{default:e}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}const l=n.default.dateToMilliseconds;class d extends a.default{get endViewDate(){return this.options.endViewDate}get adaptivityEnabled(){return this.options.adaptivityEnabled}get DOMMetaData(){return this.options.DOMMetaData}_getLeftPosition(e){const t=this.getGroupWidth(e.groupIndex);return this._calculateMultiWeekAppointmentLeftOffset(e.hMax,t)}_getChunkCount(e,t,i,n){const{groupIndex:o,info:{appointment:{startDate:a}}}=n,s=e-t+i,r=Math.ceil(s/i),l=this._tryGetRowIndexInView(a);if(void 0!==l){const e=this.viewDataProvider.getRowCountInGroup(o)-l;return r<=e?r:e}return r}_tryGetRowIndexInView(e){var t;const i=this.viewDataProvider.getColumnsCount();if((null===(t=this.options.dataRange)||void 0===t?void 0:t.length)<1||!i)return;const[n]=this.options.dateRange,o=l("day"),a=e.getTime()-n.getTime();return Math.floor(a/o/i)}_getChunkWidths(e,t,i){const n=e.reducedWidth,o=Math.floor(e.sourceAppointmentWidth);return[n,o,o-n]}_getTailChunkSettings(e,t,i){const n=e%t||t,o=i+(t-n);return[n,this.rtlEnabled?o:i]}_getAppointmentParts(e,t){const i=[],n=Math.round(this.getGroupWidth(t.groupIndex)),[o,a,s]=this._getChunkWidths(e,t,n),l=this._getLeftPosition(t),{endDate:d}=t.info.appointment,u=this.endViewDate>d,c=this._getChunkCount(a,o,n,t),[h,p]=this._getTailChunkSettings(s,n,l);for(let o=1;o<c;o++){const a=t.top+this.cellHeight*o,s=u&&o===c-1;i.push(r({},t,{top:a,left:s?p:l,height:e.height,width:s?h:n,appointmentReduced:s?"tail":"body",rowIndex:++t.rowIndex,columnIndex:0}))}return i}_calculateMultiWeekAppointmentLeftOffset(e,t){return this.rtlEnabled?e:e-t}getGroupWidth(e){return(0,o.getGroupWidth)(e,this.viewDataProvider,{intervalCount:this.options.intervalCount,currentDate:this.options.currentDate,viewType:this.options.viewType,hoursInterval:this.options.hoursInterval,startDayHour:this.options.startDayHour,endDayHour:this.options.endDayHour,isVirtualScrolling:this.isVirtualScrolling,rtlEnabled:this.rtlEnabled,DOMMetaData:this.DOMMetaData})}_getAppointmentDefaultHeight(){return this._getAppointmentHeightByTheme()}_getAppointmentMinHeight(){return this._getAppointmentDefaultHeight()}createTaskPositionMap(e){return super.createTaskPositionMap(e,!0)}_getSortedPositions(e){return super._getSortedPositions(e,!0)}_getDefaultRatio(){return.6}_getOffsets(){return{unlimited:26,auto:30}}getDropDownAppointmentWidth(e,t){if(this.adaptivityEnabled)return this.getDropDownButtonAdaptiveSize();const i=e>1?60:36;return this.cellWidth-i}needCorrectAppointmentDates(){return!1}_needVerticalGroupBounds(){return!1}_needHorizontalGroupBounds(){return!0}}t.default=d},99198:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(30771)),o=r(i(41380)),a=i(2807),s=r(i(75064));function r(e){return e&&e.__esModule?e:{default:e}}class l extends s.default{calculateAppointmentWidth(e,t){const{startDate:i,normalizedEndDate:n}=t.info.appointment,a=o.default.trimTime(i),s=this.cellWidth||this.getAppointmentMinSize(),r=Math.ceil(this._getDurationInDays(a,n));let l=this.cropAppointmentWidth(r*s,s);if(this.isVirtualScrolling){l-=this.viewDataProvider.getSkippedDaysCount(t.groupIndex,a,n,r)*s}return l}_columnCondition(e,t){const i=this._getConditions(e,t);return i.rowCondition||i.columnCondition||i.cellPositionCondition}_getDurationInDays(e,t){return this._adjustDurationByDaylightDiff(t.getTime()-e.getTime(),e,t)/o.default.dateToMilliseconds("day")||1}getDeltaTime(e,t){return 864e5*this._getDeltaWidth(e,t)}isAllDay(){return!1}createTaskPositionMap(e,t){return t||(0,a.sortAppointmentsByStartDate)(e,this.dataAccessors),super.createTaskPositionMap(e)}_getSortedPositions(e,t){let i=super._getSortedPositions(e);return t||(i=(0,n.default)(i).sortBy("top").thenBy("left").thenBy("cellPosition").thenBy("i").toArray()),i}needCorrectAppointmentDates(){return!1}getPositionShift(e){return{top:0,left:0,cellPosition:e*this.cellWidth}}}t.default=l},1670:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(41380)),o=i(52576),a=i(50254),s=i(11528),r=i(34396),l=i(66823),d=i(26012),u=h(i(18648)),c=h(i(53137));function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},p.apply(null,arguments)}const g=n.default.dateToMilliseconds;class _ extends c.default{getDeltaTime(e,t,i){let n=0;if(this.isAllDay(i))n=this._getDeltaWidth(e,t)*g("day");else{const i=e.height-t.height;n=g("minute")*Math.round(i/this.cellHeight*this.cellDurationInMinutes)}return n}_correctCollectorCoordinatesInAdaptive(e,t){if(t)super._correctCollectorCoordinatesInAdaptive(e,t);else if(0===this._getMaxAppointmentCountPerCellByType()){const{cellHeight:t}=this,{cellWidth:i}=this;e.top+=(t-this.getDropDownButtonAdaptiveSize())/2,e.left+=(i-this.getDropDownButtonAdaptiveSize())/2}}getAppointmentGeometry(e){let t=null;return t=e.allDay?this._getAllDayAppointmentGeometry(e):this.isAdaptive&&e.isCompact?this._getAdaptiveGeometry(e):this._getVerticalAppointmentGeometry(e),super.getAppointmentGeometry(t)}_getAdaptiveGeometry(e){const t=this._calculateGeometryConfig(e);return this._customizeCoordinates(e,t.height,t.appointmentCountPerCell,t.offset)}_getItemPosition(e){const t=this.isAllDay(e);if(t)return super._getItemPosition(e);const i=super.shiftAppointmentByViewOffset(e),a=(0,l.createAppointmentAdapter)(i,this.dataAccessors,this.timeZoneCalculator),s=!!a.recurrenceRule,r=a.calculateStartDate("toGrid"),d=a.calculateEndDate("toGrid"),c=d-r,h=this.options.startViewDate<r,p=!u.default.isSameAppointmentDates(r,d),g=this.generateAppointmentSettings(i);let _=[];for(let e=0;e<g.length;e++){const a=g[e],l=this.calculateAppointmentHeight(i,a),d=this.calculateAppointmentWidth(i,a);let u=l,f=null,m=[];const v=a.vMax;if(this._isMultiViewAppointment(a,l)||p&&!s){(n.default.trimTime(r)<=n.default.trimTime(a.info.appointment.startDate)||s)&&(u=this._reduceMultiDayAppointment(l,{top:a.top,bottom:v}),m=this._getAppointmentParts({sourceAppointmentHeight:l,reducedHeight:u,width:d},a));const{startDate:e,normalizedEndDate:t}=a.info.appointment;f=t-e<c?h?"head":"body":h?"head":"tail"}(0,o.extend)(a,{height:u,width:d,allDay:t,appointmentReduced:f}),_=this._getAppointmentPartsPosition(m,a,_)}return _}_isMultiViewAppointment(e,t){let{vMax:i,top:n}=e;return(0,a.roundFloatPart)(t,2)>(0,a.roundFloatPart)(i-n,2)}_reduceMultiDayAppointment(e,t){return Math.min(e,t.bottom-Math.floor(t.top))}_getGroupHeight(){return this.cellHeight*this.rowCount}_getGroupTopOffset(e){const{groupIndex:t}=e,i=Math.max(0,this.positionHelper.getGroupTop({groupIndex:t,showAllDayPanel:this.showAllDayPanel,isGroupedAllDayPanel:this.isGroupedAllDayPanel})),n=this.positionHelper.getOffsetByAllDayPanel({groupIndex:t,supportAllDayRow:this.allDaySupported(),showAllDayPanel:this.showAllDayPanel});return e.top-i-n}_getTailHeight(e,t){if(!this.isVirtualScrolling)return e.sourceAppointmentHeight-e.reducedHeight;const i=this._getGroupTopOffset(t),{sourceAppointmentHeight:n}=e;return i+n-this._getGroupHeight()}_getAppointmentParts(e,t){const{width:i}=e,n=[];let o=Math.max(0,this.positionHelper.getGroupTop({groupIndex:t.groupIndex,showAllDayPanel:this.showAllDayPanel,isGroupedAllDayPanel:this.isGroupedAllDayPanel}));const a=this.isGroupedByDate?this.groupCount:1,s=this.cellWidth*a;o+=this.positionHelper.getOffsetByAllDayPanel({groupIndex:t.groupIndex,supportAllDayRow:this.allDaySupported(),showAllDayPanel:this.showAllDayPanel});const r=this.getAppointmentMinSize(),{hMax:l,vMax:d,vMin:u}=t,c=this.isVirtualScrolling?d:d-u,h=this.options.endViewDate>t.info.appointment.endDate;let g=Math.round(t.left+s),_=this._getTailHeight(e,t),{columnIndex:f}=t;for(;_>0&&g<l;){_=Math.max(r,_),f+=a;const e=Math.min(_,c);n.push(p({},t,{top:o,left:g,height:e,width:i,appointmentReduced:"body",rowIndex:0,columnIndex:f})),g+=s,_-=c}return h&&n.length>0&&(n[n.length-1].appointmentReduced="tail"),n}_getMinuteHeight(){return this.cellHeight/this.cellDurationInMinutes}_getCompactLeftCoordinate(e,t){return e+(1+(this.cellWidth||this.getAppointmentMinSize()))*t}_getVerticalAppointmentGeometry(e){const t=this._calculateVerticalGeometryConfig(e);return this._customizeVerticalCoordinates(e,t.width,t.appointmentCountPerCell,t.offset)}_customizeVerticalCoordinates(e,t,i,n,o){const a=Math.max(t/i,t/e.count),{height:s}=e,r=e.left+e.index*a,{top:l}=e;return e.isCompact&&this._markAppointmentAsVirtual(e,o),{height:s,width:a,top:l,left:r,empty:this._isAppointmentEmpty(s,t)}}_calculateVerticalGeometryConfig(e){const t=this.maxAppointmentsPerCell,i=this._getOffsets(),n=this._getAppointmentDefaultOffset();let o=this._getAppointmentCount(t,e),a=this._getDefaultRatio(e,o),r=this._getMaxWidth();o||(o=e.count,a=(r-i.unlimited)/r);let l=(1-a)*r;return("auto"===t||(0,s.isNumeric)(t))&&(a=1,r-=n,l=0),{width:a*r,appointmentCountPerCell:o,offset:l}}_getMaxWidth(){return this.cellWidth}isAllDay(e){return(0,r.getAppointmentTakesAllDay)((0,l.createAppointmentAdapter)(e,this.dataAccessors,this.timeZoneCalculator),this.allDayPanelMode)}_getAppointmentMaxWidth(){return this.cellWidth-this._getAppointmentDefaultOffset()}calculateAppointmentWidth(e,t){if(!this.isAllDay(e))return 0;const{startDate:i,endDate:o,normalizedEndDate:a}=t.info.appointment,s=n.default.trimTime(i),l=this.cellWidth||this.getAppointmentMinSize(),d=(a.getTime()-s.getTime())/g("hour"),u=(0,r.getSkippedHoursInRange)(s,o,e.allDay,this.viewDataProvider);let c=Math.ceil((d-u)/24)*l;return c=this.cropAppointmentWidth(c,l),c}calculateAppointmentHeight(e,t){if(this.isAllDay(e))return 0;const{startDate:i,normalizedEndDate:n}=t.info.appointment,o=d.ExpressionUtils.getField(this.dataAccessors,"allDay",e),a=this.getAppointmentDurationInMs(i,n,o),s=60*(0,r.getSkippedHoursInRange)(i,n,e.allDay,this.viewDataProvider);return(this._adjustDurationByDaylightDiff(a,i,n)/g("minute")-s)*this._getMinuteHeight()}getDirection(){return"vertical"}_sortCondition(e,t){if(!!e.allDay!=!!t.allDay)return e.allDay?1:-1;const i=e.allDay&&t.allDay;return"vertical"===this.groupOrientation&&i?this._columnCondition(e,t):this._rowCondition(e,t)}allDaySupported(){return!0}_getAllDayAppointmentGeometry(e){const t=this._calculateGeometryConfig(e);return this._customizeCoordinates(e,t.height,t.appointmentCountPerCell,t.offset,!0)}_calculateGeometryConfig(e){this.allowResizing&&this.allowAllDayResizing||(e.skipResizing=!0);const t=super._calculateGeometryConfig(e),i=Math.min(t.appointmentCountPerCell,this._getDynamicAppointmentCountPerCell().allDay);return e.allDay&&e.count<=i&&(t.offset=0),t}_getAppointmentCount(e,t){return"auto"===e||1!==t.count||(0,s.isNumeric)(e)?this._getMaxAppointmentCountPerCellByType(t.allDay):t.count}_getDefaultRatio(e,t){return e.count>this.appointmentCountPerCell?.65:1}_getOffsets(){return{unlimited:5,auto:20}}_getMaxHeight(){return this.allDayHeight||this.getAppointmentMinSize()}_needVerticalGroupBounds(e){return!e}_needHorizontalGroupBounds(){return!1}getPositionShift(e,t){return!t&&this.isAdaptive&&0===this._getMaxAppointmentCountPerCellByType(t)?{top:0,left:0,cellPosition:0}:super.getPositionShift(e,t)}}t.default=_},27488:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(1670))&&n.__esModule?n:{default:n};class a extends o.default{isApplyCompactAppointmentOffset(){return(!this.isAdaptive||0!==this._getMaxAppointmentCountPerCellByType())&&this.supportCompactDropDownAppointments()}}t.default=a},57498:function(e,t){function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},i.apply(null,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.getAppointmentDateRange=void 0;const n=e=>{const{cellHeight:t,cellWidth:i,viewDataProvider:n,relativeAppointmentRect:o,appointmentSettings:a,rtlEnabled:s}=e,r=Math.floor(o.top/t),l=Math.round(o.left/i);return n.getCellData(r,l,a.allDay,s)};t.getAppointmentDateRange=e=>{const{appointmentSettings:t}=e,o=((e,t)=>{const i=e.left-t.left,n=e.top-t.top,o=i<0?e.width+i:e.width,a=n<0?e.height+n:e.height;return{left:Math.max(0,i),top:Math.max(0,n),width:o,height:a}})(e.appointmentRect,e.parentAppointmentRect),a=(e=>{const{appointmentSettings:t,isVerticalGroupedWorkSpace:i,DOMMetaData:n}=e,o=t.allDay&&!i?[n.allDayPanelCellsMeta]:n.dateTableCellsMeta,{positionByMap:a}=t,{height:s,width:r}=o[a.rowIndex][a.columnIndex];return{cellWidth:r,cellHeight:s,cellCountInRow:o[a.rowIndex].length}})(e),s=i({},e,a,{considerTime:!e.isDateAndTimeView||t.allDay,relativeAppointmentRect:o});return e.rtlEnabled?(e=>{const{viewDataProvider:t,cellCountInRow:i,appointmentSettings:o,handles:a,cellWidth:s,relativeAppointmentRect:r}=e,l=n(e),{sourceAppointment:d}=o.info,{allDay:u}=o.info.appointment;if(a.right){const e=l.index,n=e-Math.round(r.width/s)+1,o=Math.floor(e/i),a=t.getCellData(o,n,u,!0);return{startDate:a.startDate,endDate:a.startDate>d.endDate?a.startDate:d.endDate}}const c=e.considerTime?l.startDate:l.endDate;return{startDate:c<d.startDate?c:d.startDate,endDate:c}})(s):(e=>{const{cellWidth:t,cellCountInRow:i,relativeAppointmentRect:o,viewDataProvider:a,appointmentSettings:s,handles:r}=e,l=n(e),d=Math.round(o.width/t),u=l.index+(d-1),{sourceAppointment:c}=s.info,{allDay:h}=s.info.appointment;if(r.left)return{startDate:l.startDate,endDate:l.startDate>c.endDate?l.startDate:c.endDate};const p=Math.floor(u/i),g=u%i,_=a.getCellData(p,g,h),f=e.considerTime?_.startDate:_.endDate;return{startDate:f<c.startDate?f:c.startDate,endDate:f}})(s)}},69133:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(11118))&&n.__esModule?n:{default:n};class a extends o.default{notifyObserver(e,t){const i=this.option("observer");i&&i.fire(e,t)}invoke(){const e=this.option("observer");if(e)return e.fire.apply(e,arguments)}}t.default=a},52170:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(i(92848)),o=c(i(65951)),a=c(i(64553)),s=c(i(22195)),r=c(i(98894)),l=c(i(10720)),d=c(i(20876)),u=c(i(11118));function c(e){return e&&e.__esModule?e:{default:e}}class h extends u.default{show(e){this._isMobileLayout()||this._overlay.option("target",e),this._overlay.show()}hide(){this._overlay.hide()}_keyboardHandler(e){var t;null===(t=this._calendar)||void 0===t||t._keyboardHandler(e)}_init(){super._init(),this.$element()}_render(){super._render(),this._renderOverlay()}_renderOverlay(){this.$element().addClass("dx-scheduler-navigator-calendar-popover");const e=this._isMobileLayout(),t=e?l.default:r.default;this._overlay=this._createComponent(this.$element(),t,{contentTemplate:()=>this._createOverlayContent(),onShown:()=>this._calendar.focus(),defaultOptionsRules:[{device:()=>e,options:{fullScreen:!0,showCloseButton:!1,toolbarItems:[{shortcut:"cancel"}],_ignorePreventScrollEventsDeprecation:!0,preventScrollEvents:!1,enableBodyScroll:!1}}]})}_createOverlayContent(){const e=(0,a.default)("<div>").addClass("dx-scheduler-navigator-calendar");if(this._calendar=this._createComponent(e,s.default,this._getCalendarOptions()),this._isMobileLayout()){return this._createScrollable(e).$element()}return e}_createScrollable(e){const t=this._createComponent("<div>",d.default,{height:"auto",direction:"both"});return t.$content().append(e),t}_optionChanged(e){var t;let{name:i,value:n}=e;if("value"===i)null===(t=this._calendar)||void 0===t||t.option("value",n)}_getCalendarOptions(){return{value:this.option("value"),min:this.option("min"),max:this.option("max"),firstDayOfWeek:this.option("firstDayOfWeek"),focusStateEnabled:this.option("focusStateEnabled"),onValueChanged:this.option("onValueChanged"),skipFocusCheck:!0,tabIndex:this.option("tabIndex")}}_isMobileLayout(){return!o.default.current().generic}}t.default=h,(0,n.default)("dxSchedulerCalendarPopup",h)},13842:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getDateNavigator=void 0;var n=s(i(4671)),o=s(i(41380)),a=i(52071);function s(e){return e&&e.__esModule?e:{default:e}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}const{trimTime:l}=o.default;t.getDateNavigator=(e,t)=>r({widget:"dxButtonGroup",cssClass:"dx-scheduler-navigator",options:{items:[d(e),u(e),c(e)],stylingMode:(0,a.isMaterialBased)()?"text":"contained",selectionMode:"none",onItemClick:e=>{e.itemData.clickHandler(e)}}},t);const d=e=>({key:"previous",icon:"chevronprev",elementAttr:{class:"dx-scheduler-navigator-previous","aria-label":n.default.format("dxScheduler-navigationPrevious")},clickHandler:()=>e._updateDateByDirection(-1),onContentReady:t=>{const i=t.component;i.option("disabled",h(e)),e._addEvent("min",(()=>{i.option("disabled",h(e))})),e._addEvent("currentDate",(()=>{i.option("disabled",h(e))})),e._addEvent("startViewDate",(()=>{i.option("disabled",h(e))}))}}),u=e=>({key:"calendar",text:e.captionText,elementAttr:{class:"dx-scheduler-navigator-caption"},clickHandler:t=>e._showCalendar(t),onContentReady:t=>{const i=t.component;e._addEvent("currentView",(()=>{i.option("text",e.captionText)})),e._addEvent("currentDate",(()=>{i.option("text",e.captionText)})),e._addEvent("startViewDate",(()=>{i.option("text",e.captionText)})),e._addEvent("views",(()=>{i.option("text",e.captionText)})),e._addEvent("firstDayOfWeek",(()=>{i.option("text",e.captionText)}))}}),c=e=>({key:"next",icon:"chevronnext",elementAttr:{class:"dx-scheduler-navigator-next","aria-label":n.default.format("dxScheduler-navigationNext")},clickHandler:()=>e._updateDateByDirection(1),onContentReady:t=>{const i=t.component;i.option("disabled",p(e)),e._addEvent("min",(()=>{i.option("disabled",p(e))})),e._addEvent("currentDate",(()=>{i.option("disabled",p(e))})),e._addEvent("startViewDate",(()=>{i.option("disabled",p(e))}))}}),h=e=>{let t=e.option("min");if(!t)return!1;t=new Date(t);const i=e._getCaption();t=l(t);return e._getNextDate(-1,i.endDate)<t},p=e=>{let t=e.option("max");if(!t)return!1;t=new Date(t);const i=e._getCaption();t=t.setHours(23,59,59);return e._getNextDate(1,i.startDate)>t}},84829:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SchedulerHeader=void 0,i(17809),i(56582);var n=f(i(92848)),o=f(i(65951)),a=f(i(87129)),s=f(i(64553)),r=f(i(41380)),l=i(52576),d=f(i(2850)),u=f(i(11118)),c=i(34396),h=f(i(52170)),p=i(13842),g=i(25379),_=i(94791);function f(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(null,arguments)}const v="defaultElement";class C extends u.default{get views(){return this.option("views")}get captionText(){return this._getCaption().text}get intervalOptions(){return{step:(0,g.getStep)(this.currentView),intervalCount:this.option("intervalCount"),firstDayOfWeek:this.option("firstDayOfWeek"),agendaDuration:this.option("agendaDuration")}}_getDefaultOptions(){return(0,l.extend)(super._getDefaultOptions(),{_useShortDateFormat:!o.default.real().generic||o.default.isSimulator()})}_createEventMap(){this.eventMap=new Map([["currentView",[e=>{this.currentView=c.viewsUtils.getCurrentView((0,g.getViewName)(e),this.option("views"))}]],["items",[this.repaint.bind(this)]],["views",[g.validateViews]],["currentDate",[this._getCalendarOptionUpdater("value")]],["min",[this._getCalendarOptionUpdater("min")]],["max",[this._getCalendarOptionUpdater("max")]],["tabIndex",[this.repaint.bind(this)]],["focusStateEnabled",[this.repaint.bind(this)]],["useDropDownViewSwitcher",[this.repaint.bind(this)]]])}_addEvent(e,t){this.eventMap.has(e)||this.eventMap.set(e,[]);const i=this.eventMap.get(e);this.eventMap.set(e,[...i,t])}_optionChanged(e){const{name:t,value:i}=e;if(this.eventMap.has(t)){this.eventMap.get(t).forEach((e=>{e(i)}))}}_init(){super._init(),this._createEventMap(),this.$element().addClass("dx-scheduler-header"),this.currentView=c.viewsUtils.getCurrentView((0,g.getViewName)(this.option("currentView")),this.option("views"))}_render(){super._render(),this._createEventMap(),this._renderToolbar()}_renderToolbar(){const e=this._createToolbarConfig(),t=(0,s.default)("<div>");t.appendTo(this.$element()),this._toolbar=this._createComponent(t,d.default,e)}_createToolbarConfig(){return{items:this.option("items").map((e=>this._parseItem(e)))}}_parseItem(e){if(this._isDefaultItem(e)){const t=e[v];switch(t){case"viewSwitcher":return this.option("useDropDownViewSwitcher")?(0,_.getDropDownViewSwitcher)(this,e):(0,_.getViewSwitcher)(this,e);case"dateNavigator":return this._renderCalendar(),(0,p.getDateNavigator)(this,e);default:a.default.log(`Unknown default element type: ${t}`)}}return e}_callEvent(e,t){if(this.eventMap.has(e)){this.eventMap.get(e).forEach((e=>e(t)))}}_updateCurrentView(e){this.option("onCurrentViewChange")(e.name),this._callEvent("currentView",e)}_updateCalendarValueAndCurrentDate(e){this._updateCurrentDate(e),this._calendar.option("value",e)}_updateCurrentDate(e){this.option("onCurrentDateChange")(e),this._callEvent("currentDate",e)}_renderCalendar(){this._calendar=this._createComponent("<div>",h.default,{value:this.option("currentDate"),min:this.option("min"),max:this.option("max"),firstDayOfWeek:this.option("firstDayOfWeek"),focusStateEnabled:this.option("focusStateEnabled"),tabIndex:this.option("tabIndex"),onValueChanged:e=>{this._updateCurrentDate(e.value),this._calendar.hide()}}),this._calendar.$element().appendTo(this.$element())}_getCalendarOptionUpdater(e){return t=>{this._calendar&&this._calendar.option(e,t)}}_getNextDate(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)??this.option("currentDate"),i=m({},this.intervalOptions,{date:t});return(0,g.getNextIntervalDate)(i,e)}_isMonth(){const{currentView:e}=this;return"month"===(0,g.getViewType)(e)}_getDisplayedDate(){const e=this.option("startViewDate");return this._isMonth()?(0,g.nextWeek)(e):new Date(e)}_getCaption(){let e=this.option("currentDate");this.option("startViewDate")&&(e=this._getDisplayedDate()),e=r.default.trimTime(e);const t=m({},this.intervalOptions,{date:e}),i=this.option("customizeDateNavigatorText"),n=this.option("_useShortDateFormat");return(0,g.getCaption)(t,n,i)}_updateDateByDirection(e){const t=this._getNextDate(e);this._updateCalendarValueAndCurrentDate(t)}_showCalendar(e){this._calendar.show(e.element)}_hideCalendar(){this._calendar.hide()}_isDefaultItem(e){return Object.prototype.hasOwnProperty.call(e,v)}}t.SchedulerHeader=C,(0,n.default)("dxSchedulerHeader",C)},25379:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.validateViews=t.nextWeek=t.isOneView=t.getViewType=t.getViewText=t.getViewName=t.getStep=t.getNextIntervalDate=t.getCaption=t.formatViews=void 0;var n=u(i(38662)),o=u(i(4671)),a=u(i(87129)),s=u(i(41380)),r=i(53124),l=i(11528),d=i(8687);function u(e){return e&&e.__esModule?e:{default:e}}const{correctDateWithUnitBeginning:c,getFirstWeekDate:h,getLastMonthDay:p,addDateInterval:g}=s.default,{format:_}=n.default,f={milliseconds:1},m={days:1},v={days:7},C=e=>g(e,m,1),y=e=>g(e,v,1);t.nextWeek=y;const b=e=>6===e.getDay()||0===e.getDay(),x=e=>{const{date:t,step:i,firstDayOfWeek:n}=e;switch(i){case"day":case"week":case"month":return c(t,i,!1,n);case"workWeek":return(e=>{let t=new Date(e);for(;b(t);)t=C(t);return t})(h(t,n));case"agenda":return new Date(t)}},w=(e,t)=>{const{intervalCount:i,step:n,agendaDuration:o}=t;let a,s,r=new Date(e);for(let e=0;e<i;e++)a=r,s=S(a,n,o),r=D(s,n);return s},S=(e,t,i)=>{let n;switch(t){case"day":n=C(e);break;case"week":n=y(e);break;case"month":n=(e=>{const t=p(e);return g(e,{days:t},1)})(e);break;case"workWeek":n=(e=>{let t=new Date(e),i=0;for(;i<5;)b(t)||i++,t=C(t);return t})(e);break;case"agenda":n=((e,t)=>g(e,{days:t},1))(e,i)}return(e=>g(e,f,-1))(n)},D=(e,t)=>{let i=(e=>g(e,f,1))(e);if("workWeek"===t)for(;b(i);)i=C(i);return i};t.getNextIntervalDate=(e,t)=>{const{date:i,step:n,intervalCount:o,agendaDuration:a}=e;let s;switch(n){case"day":s=1*o;break;case"week":case"workWeek":s=7*o;break;case"agenda":s=a;break;case"month":return I(i,o,t)}return g(i,{days:s},t)};const I=(e,t,i)=>{const n=e.getDate(),o=new Date(new Date(e.getTime()).setDate(1)),a=new Date(o.setMonth(o.getMonth()+t*i)),s=p(a),r=n<s?n:s,l=new Date(new Date(e.getTime()).setDate(r));return new Date(l.setMonth(l.getMonth()+t*i))},E=e=>{const t=e?"abbreviated":"wide",i=n.default.getMonthNames(t);return e=>`${_(e,"day")} ${i[e.getMonth()]}`},T=e=>`${n.default.getMonthNames("abbreviated")[e.getMonth()]} ${_(e,"year")}`,A=e=>t=>`${E(e)(t)} ${_(t,"year")}`,O=(e,t,i)=>e.getFullYear()!==t.getFullYear()?((e,t)=>`${_(e,A(!0))}-${_(t,A(!0))}`)(e,t):((e,t,i)=>{const n=e.getMonth()!==t.getMonth(),o=n||i,a=n?E(o):"d";return`${_(e,a)}-${_(t,A(o))}`})(e,t,i),P=(e,t,i,o)=>s.default.sameDate(e,t)?((e,t,i)=>`${E("agenda"===t&&i)(e)} ${_(e,"year")}`)(e,o,i):"month"===o?((e,t)=>s.default.sameMonth(e,t)?_(e,"monthandyear"):`${s.default.sameYear(e,t)?n.default.getMonthNames("abbreviated")[e.getMonth()]:T(e)}-${T(t)}`)(e,t):O(e,t,i);t.getCaption=(e,t,i)=>{const{startDate:n,endDate:o}=(e=>{const t=x(e);return{startDate:t,endDate:w(t,e)}})(e);let a=P(n,o,t,e.step);return(0,l.isFunction)(i)&&(a=i({startDate:n,endDate:o,text:a})),{startDate:n,endDate:o,text:a}};const k={day:"day",week:"week",workWeek:"workWeek",month:"month",timelineDay:"day",timelineWeek:"week",timelineWorkWeek:"workWeek",timelineMonth:"month",agenda:"agenda"};t.getStep=e=>k[M(e)];const M=e=>(0,l.isObject)(e)&&e.type?e.type:e;t.getViewType=M;const R=e=>(0,l.isObject)(e)?e.name?e.name:e.type:e;t.getViewName=R;const L=e=>{if(e.name)return e.name;const t=(0,r.camelize)(e.type||e,!0);return o.default.format(`dxScheduler-switcher${t}`)};t.getViewText=L;const B=e=>{e.forEach((e=>{const t=M(e);(e=>Object.values(d.VIEWS).includes(e))(t)||a.default.log("W0008",t)}))};t.validateViews=B;t.formatViews=e=>(B(e),e.map((e=>{const t=L(e),i=M(e),n=R(e);return{text:t,name:n,view:{text:t,type:i,name:n}}})));t.isOneView=(e,t)=>1===e.length&&e[0].name===t},94791:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getViewSwitcher=t.getDropDownViewSwitcher=void 0;var n=i(52071),o=i(25379);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}const s="dx-scheduler-view-switcher",r=e=>{const t=(0,o.formatViews)(e.views);let i=(0,o.getViewName)(e.currentView);const n=t.some((e=>e.name===i));return i=n?i:void 0,{selectedView:i,views:t}};t.getViewSwitcher=(e,t)=>{const{selectedView:i,views:l}=r(e),d=(0,n.isFluent)()?"outlined":"contained";return a({widget:"dxButtonGroup",locateInMenu:"auto",cssClass:s,options:{items:l,keyExpr:"name",selectedItemKeys:[i],stylingMode:d,onItemClick:t=>{const{view:i}=t.itemData;e._updateCurrentView(i)},onContentReady:t=>{const i=t.component;e._addEvent("currentView",(e=>{i.option("selectedItemKeys",[(0,o.getViewName)(e)])}))}}},t)};t.getDropDownViewSwitcher=(e,t)=>{const{selectedView:i,views:n}=r(e),l=(0,o.isOneView)(n,i);return a({widget:"dxDropDownButton",locateInMenu:"never",cssClass:s,options:{items:n,useSelectMode:!0,keyExpr:"name",selectedItemKey:i,displayExpr:"text",showArrowIcon:!l,elementAttr:{class:"dx-scheduler-view-switcher-dropdown-button"},onItemClick:t=>{const{view:i}=t.itemData;e._updateCurrentView(i)},onContentReady:t=>{const i=t.component;e._addEvent("currentView",(t=>{const n=(0,o.formatViews)(e.views);(0,o.isOneView)(n,t)&&e.repaint(),i.option("selectedItemKey",(0,o.getViewName)(t))}))},dropDownOptions:{onShowing:e=>{l&&(e.cancel=!0)},width:"max-content",_wrapperClassExternal:"dx-scheduler-view-switcher-dropdown-button-content"}}},t)}},66823:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.createAppointmentAdapter=void 0;var n,o=i(52576),a=i(22263),s=(n=i(35185))&&n.__esModule?n:{default:n},r=i(26012),l=i(55122);const d="startDate",u="endDate",c="allDay",h="text",p="description",g="startDateTimeZone",_="endDateTimeZone",f="recurrenceRule",m="recurrenceException",v="disabled";class C{constructor(e,t,i,n){this.rawAppointment=e,this.dataAccessors=t,this.timeZoneCalculator=i,this.options=n}get duration(){return this.endDate?this.endDate-this.startDate:0}get startDate(){const e=this.getField(d);return void 0===e?e:new Date(e)}set startDate(e){this.setField(d,e)}get endDate(){const e=this.getField(u);return void 0===e?e:new Date(e)}set endDate(e){this.setField(u,e)}get allDay(){return this.getField(c)}set allDay(e){this.setField(c,e)}get text(){return this.getField(h)}set text(e){this.setField(h,e)}get description(){return this.getField(p)}set description(e){this.setField(p,e)}get startDateTimeZone(){return this.getField(g)}get endDateTimeZone(){return this.getField(_)}get recurrenceRule(){return this.getField(f)}set recurrenceRule(e){this.setField(f,e)}get recurrenceException(){return this.getField(m)}set recurrenceException(e){this.setField(m,e)}get disabled(){return!!this.getField(v)}get isRecurrent(){return(0,l.getRecurrenceProcessor)().isValidRecurrenceRule(this.recurrenceRule)}getField(e){return r.ExpressionUtils.getField(this.dataAccessors,e,this.rawAppointment)}setField(e,t){return r.ExpressionUtils.setField(this.dataAccessors,e,this.rawAppointment,t)}calculateStartDate(e){if(!this.startDate||isNaN(this.startDate.getTime()))throw s.default.Error("E1032",this.text);return this.calculateDate(this.startDate,this.startDateTimeZone,e)}calculateEndDate(e){return this.calculateDate(this.endDate,this.endDateTimeZone,e)}calculateDate(e,t,i){if(e)return this.timeZoneCalculator.createDate(e,{appointmentTimeZone:t,path:i})}clone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;const t=new C((0,a.deepExtendArraySafe)({},this.rawAppointment,!1,!1,!1,!0),this.dataAccessors,this.timeZoneCalculator,e);return null!=e&&e.pathTimeZone&&(t.startDate=t.calculateStartDate(e.pathTimeZone),t.endDate=t.calculateEndDate(e.pathTimeZone)),t}source(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]){const e=this.clone();return e.startDate=this.startDate,e.endDate=this.endDate,e.source()}return(0,o.extend)({},this.rawAppointment)}}t.default=C;t.createAppointmentAdapter=(e,t,i,n)=>new C(e,t,i,n)},80621:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(64553)),o=i(87739),a=i(52576),s=d(i(5298)),r=i(8687),l=i(28740);function d(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(e){this.scheduler=e,this.workspace=this.scheduler._workSpace,this.appointments=this.scheduler._appointments,this.initialPosition={left:0,top:0},this.appointmentInfo=null,this.dragBetweenComponentsPromise=null}isAllDay(e){return e.data("dxAppointmentSettings").allDay}onDragStart(e){const{itemSettings:t,itemData:i,initialPosition:n}=e;this.initialPosition=n,this.appointmentInfo={appointment:i,settings:t},this.appointments.notifyObserver("hideAppointmentTooltip")}onDragMove(e){e.fromComponent!==e.toComponent&&this.appointments.notifyObserver("removeDroppableCellClass")}getAppointmentElement(e){const t=e.event.data&&e.event.data.itemElement||e.itemElement;return(0,n.default)(t)}onDragEnd(e){const t=this.getAppointmentElement(e),i=this.appointments._getItemData(t);this.appointments._getAppointmentContainer(this.isAllDay(t)).append(t);const n=this.workspace.getDroppableCellIndex(),o=this.workspace.getCellIndexByCoordinates(this.initialPosition);this.appointments.notifyObserver("updateAppointmentAfterDrag",{event:e,element:t,rawAppointment:i,newCellIndex:n,oldCellIndex:o})}onDragCancel(){this.removeDroppableClasses()}getItemData(e){const t=(0,n.default)(e).data(r.LIST_ITEM_DATA_KEY),i=null==t?void 0:t.appointment,o=this.appointments._getItemData(e);return i||o}getItemSettings(e){const t=(0,n.default)(e).data(r.LIST_ITEM_DATA_KEY);return t&&t.settings||[]}createDragStartHandler(e,t){return i=>{i.itemData=this.getItemData(i.itemElement),i.itemSettings=this.getItemSettings(i.itemElement),t.onDragStart&&t.onDragStart(i),i.cancel||e.onDragStart(i)}}createDragMoveHandler(e,t){return i=>{t.onDragMove&&t.onDragMove(i),i.cancel||e.onDragMove(i)}}createDragEndHandler(e,t){return i=>{const n=this.appointments.invoke("getUpdatedData",i.itemData);if(this.appointmentInfo=null,i.toItemData=(0,a.extend)({},i.itemData,n),t.onDragEnd&&t.onDragEnd(i),i.cancel||(e.onDragEnd(i),i.fromComponent!==i.toComponent&&t.onRemove&&t.onRemove(i)),!0===i.cancel&&this.removeDroppableClasses(),!0!==i.cancel&&(0,l.isSchedulerComponent)(i.toComponent)){i.toComponent._getDragBehavior().dragBetweenComponentsPromise=new o.Deferred}}}createDropHandler(e){return t=>{const i=this.appointments.invoke("getUpdatedData",t.itemData);t.itemData=(0,a.extend)({},t.itemData,i),t.fromComponent!==t.toComponent&&e.onAdd&&e.onAdd(t),this.dragBetweenComponentsPromise&&this.dragBetweenComponentsPromise.resolve()}}addTo(e,t){const i=this.scheduler.option("appointmentDragging")||{},n=(0,a.extend)({component:this.scheduler,contentTemplate:null,filter:".dx-scheduler-appointment",immediate:!1,onDragStart:this.onDragStart.bind(this),onDragMove:this.onDragMove.bind(this),onDragEnd:this.onDragEnd.bind(this),onDragCancel:this.onDragCancel.bind(this)},t);this.appointments._createComponent(e,s.default,(0,a.extend)({},n,i,{onDragStart:this.createDragStartHandler(n,i),onDragMove:this.createDragMoveHandler(n,i),onDragEnd:this.createDragEndHandler(n,i),onDrop:this.createDropHandler(i),onCancelByEsc:!0}))}updateDragSource(e,t){const{appointmentInfo:i}=this;if(i||e){const n=e||i.appointment,o=t||i.settings;this.appointments._setDragSourceAppointment(n,o)}}removeDroppableClasses(){this.appointments._removeDragSourceClassFromDraggedAppointment(),this.workspace.removeDroppableCellClass()}}},17851:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(17781),a=(n=i(41380))&&n.__esModule?n:{default:n},s=i(34396),r=i(91200),l=i(39979);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}const u=a.default.dateToMilliseconds;t.default=class{constructor(e){this.instance=e,this.appointmentViewModel=new r.AppointmentViewModelGenerator}get appointmentRenderingStrategyName(){return(0,s.getAppointmentRenderingStrategyName)(this.instance.currentViewType)}getCellDimensions(e){if(this.instance._workSpace)return{width:this.instance._workSpace.getCellWidth(),height:this.instance._workSpace.getCellHeight(),allDayHeight:this.instance._workSpace.getAllDayHeight()}}_getRenderingStrategyOptions(){const e=this.instance.getWorkSpace(),{virtualScrollingDispatcher:t}=this.instance.getWorkSpace(),{cellCountInsideLeftVirtualCell:i,cellCountInsideTopVirtualRow:n}=t,o=(0,s.getGroupCount)(this.instance.option("loadedResources")),a=e.getDOMElementsMetaData(),r=(0,l.getAllDayHeight)(e.option("showAllDayPanel"),e._isVerticalGroupedWorkSpace(),a),d=e._getRowCount(),{positionHelper:c,viewDataProvider:h}=e,p=h.getVisibleDayDuration(e.option("startDayHour"),e.option("endDayHour"),e.option("hoursInterval")),g=(0,s.getCellDuration)(e.type,e.option("startDayHour"),e.option("endDayHour"),e.option("hoursInterval"));return{resources:this.instance.option("resources"),loadedResources:this.instance.option("loadedResources"),getAppointmentColor:this.instance.createGetAppointmentColor(),dataAccessors:this.instance._dataAccessors,appointmentRenderingStrategyName:this.appointmentRenderingStrategyName,adaptivityEnabled:this.instance.option("adaptivityEnabled"),rtlEnabled:this.instance.option("rtlEnabled"),startDayHour:this.instance._getCurrentViewOption("startDayHour"),endDayHour:this.instance._getCurrentViewOption("endDayHour"),viewOffset:this.instance._getCurrentViewOption("offset")*u("minute"),maxAppointmentsPerCell:this.instance._getCurrentViewOption("maxAppointmentsPerCell"),currentDate:this.instance.option("currentDate"),isVirtualScrolling:this.instance.isVirtualScrolling(),leftVirtualCellCount:i,topVirtualCellCount:n,intervalCount:e.option("intervalCount"),hoursInterval:e.option("hoursInterval"),showAllDayPanel:e.option("showAllDayPanel"),isGroupedAllDayPanel:e.isGroupedAllDayPanel(),groups:this.instance._getCurrentViewOption("groups"),groupCount:o,rowCount:d,appointmentCountPerCell:this.instance.option("_appointmentCountPerCell"),appointmentOffset:this.instance.option("_appointmentOffset"),allowResizing:this.instance._allowResizing(),allowAllDayResizing:this.instance._allowAllDayResizing(),startViewDate:e.getStartViewDate(),groupOrientation:e._getRealGroupOrientation(),cellWidth:(0,l.getCellWidth)(a),cellHeight:(0,l.getCellHeight)(a),allDayHeight:r,resizableStep:c.getResizableStep(),visibleDayDuration:p,allDayPanelMode:this.instance._getCurrentViewOption("allDayPanelMode"),timeZoneCalculator:this.instance.timeZoneCalculator,timeZone:this.instance.option("timeZone"),firstDayOfWeek:this.instance.getFirstDayOfWeek(),viewStartDayHour:this.instance._getCurrentViewOption("startDayHour"),viewEndDayHour:this.instance._getCurrentViewOption("endDayHour"),viewType:e.type,endViewDate:e.getEndViewDate(),positionHelper:c,isGroupedByDate:e.isGroupedByDate(),cellDuration:g,cellDurationInMinutes:e.option("cellDuration"),viewDataProvider:e.viewDataProvider,supportAllDayRow:e.supportAllDayRow(),dateRange:e.getDateRange(),intervalDuration:e.getIntervalDuration(),allDayIntervalDuration:e.getIntervalDuration(!0),isVerticalGroupOrientation:e.isVerticalOrientation(),DOMMetaData:a,instance:this.instance,agendaDuration:e.option("agendaDuration")}}createAppointmentsMap(e){const t=this._getRenderingStrategyOptions(),{viewModel:i,positionMap:n}=this.appointmentViewModel.generate(e,t);return this._positionMap=n,i}_isDataChanged(e){const{appointmentDataProvider:t}=this.instance;return t.getUpdatedAppointment()===e||t.getUpdatedAppointmentKeys().some((t=>e[t.key]===t.value))}_isAppointmentShouldAppear(e,t){return e.needRepaint&&t.needRemove}_isSettingChanged(e,t){if(e.length!==t.length)return!0;const i=(e,t)=>{const i=e[t],n=i.leftVirtualCellCount||0,o=i.topVirtualCellCount||0;return d({},i,{columnIndex:i.columnIndex+n,rowIndex:i.rowIndex+o,positionByMap:void 0,topVirtualCellCount:void 0,leftVirtualCellCount:void 0,leftVirtualWidth:void 0,topVirtualHeight:void 0,hMax:i.reduced?i.hMax:void 0,vMax:i.reduced?i.vMax:void 0,info:{}})};for(let n=0;n<e.length;n++){const a=i(e,n),s=i(t,n);if(s&&(s.sortedIndex=a.sortedIndex),!(0,o.equalByValue)(a,s))return!0}return!1}_getAssociatedSourceAppointment(e,t){for(let i=0;i<t.length;i++){const n=t[i];if(n.itemData===e.itemData)return n}return null}_getDeletedAppointments(e,t){const i=[];for(let n=0;n<t.length;n++){const o=t[n];this._getAssociatedSourceAppointment(o,e)||(o.needRemove=!0,i.push(o))}return i}getRepaintedAppointments(e,t){return 0===t.length||"agenda"===this.appointmentRenderingStrategyName?e:(e.forEach((e=>{const i=this._getAssociatedSourceAppointment(e,t);if(i){const t=this._isDataChanged(e.itemData),n=this._isSettingChanged(e.settings,i.settings),o=this._isAppointmentShouldAppear(e,i);e.needRepaint=t||n||o}})),e.concat(this._getDeletedAppointments(e,t)))}getRenderingStrategyInstance(){if(!this.appointmentViewModel.getRenderingStrategy()){const e=this._getRenderingStrategyOptions();this.appointmentViewModel.initRenderingStrategy(e)}return this.appointmentViewModel.getRenderingStrategy()}}},80126:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VIRTUAL_CELL_CLASS=t.VERTICAL_GROUP_COUNT_CLASSES=t.TIME_PANEL_CLASS=t.REDUCED_APPOINTMENT_PARTS_CLASSES=t.REDUCED_APPOINTMENT_ICON=t.REDUCED_APPOINTMENT_CLASS=t.RECURRENCE_APPOINTMENT_CLASS=t.LAST_GROUP_CELL_CLASS=t.HEADER_CURRENT_TIME_CELL_CLASS=t.GROUP_ROW_CLASS=t.GROUP_HEADER_CONTENT_CLASS=t.FIXED_CONTAINER_CLASS=t.FIRST_GROUP_CELL_CLASS=t.EMPTY_APPOINTMENT_CLASS=t.DIRECTION_APPOINTMENT_CLASSES=t.DATE_TABLE_ROW_CLASS=t.DATE_TABLE_CLASS=t.APPOINTMENT_ITEM_CLASS=t.APPOINTMENT_HAS_RESOURCE_COLOR_CLASS=t.APPOINTMENT_DRAG_SOURCE_CLASS=t.APPOINTMENT_CONTENT_CLASSES=t.ALL_DAY_APPOINTMENT_CLASS=t.AGENDA_LAST_IN_DATE_APPOINTMENT_CLASS=void 0;t.FIXED_CONTAINER_CLASS="dx-scheduler-fixed-appointments",t.REDUCED_APPOINTMENT_CLASS="dx-scheduler-appointment-reduced",t.REDUCED_APPOINTMENT_ICON="dx-scheduler-appointment-reduced-icon",t.RECURRENCE_APPOINTMENT_CLASS="dx-scheduler-appointment-recurrence",t.EMPTY_APPOINTMENT_CLASS="dx-scheduler-appointment-empty",t.ALL_DAY_APPOINTMENT_CLASS="dx-scheduler-all-day-appointment",t.REDUCED_APPOINTMENT_PARTS_CLASSES={head:"dx-scheduler-appointment-head",body:"dx-scheduler-appointment-body",tail:"dx-scheduler-appointment-tail"},t.DIRECTION_APPOINTMENT_CLASSES={horizontal:"dx-scheduler-appointment-horizontal",vertical:"dx-scheduler-appointment-vertical"},t.APPOINTMENT_DRAG_SOURCE_CLASS="dx-scheduler-appointment-drag-source",t.APPOINTMENT_ITEM_CLASS="dx-scheduler-appointment",t.APPOINTMENT_CONTENT_CLASSES={APPOINTMENT_CONTENT_DETAILS:"dx-scheduler-appointment-content-details",RECURRING_ICON:"dx-scheduler-appointment-recurrence-icon",APPOINTMENT_TITLE:"dx-scheduler-appointment-title",APPOINTMENT_DATE:"dx-scheduler-appointment-content-date",ALL_DAY_CONTENT:"dx-scheduler-appointment-content-allday",ITEM:"dx-scheduler-appointment",STRIP:"dx-scheduler-appointment-strip",AGENDA_MARKER:"dx-scheduler-agenda-appointment-marker",AGENDA_RESOURCE_LIST:"dx-scheduler-appointment-resource-list",AGENDA_RESOURCE_LIST_ITEM:"dx-scheduler-appointment-resource-item",AGENDA_RESOURCE_LIST_ITEM_VALUE:"dx-scheduler-appointment-resource-item-value"},t.AGENDA_LAST_IN_DATE_APPOINTMENT_CLASS="dx-scheduler-last-in-date-agenda-appointment",t.APPOINTMENT_HAS_RESOURCE_COLOR_CLASS="dx-scheduler-appointment-has-resource-color",t.HEADER_CURRENT_TIME_CELL_CLASS="dx-scheduler-header-panel-current-time-cell",t.VIRTUAL_CELL_CLASS="dx-scheduler-virtual-cell",t.TIME_PANEL_CLASS="dx-scheduler-time-panel",t.DATE_TABLE_CLASS="dx-scheduler-date-table",t.DATE_TABLE_ROW_CLASS="dx-scheduler-date-table-row",t.GROUP_ROW_CLASS="dx-scheduler-group-row",t.GROUP_HEADER_CONTENT_CLASS="dx-scheduler-group-header-content",t.LAST_GROUP_CELL_CLASS="dx-scheduler-last-group-cell",t.FIRST_GROUP_CELL_CLASS="dx-scheduler-first-group-cell",t.VERTICAL_GROUP_COUNT_CLASSES=["dx-scheduler-group-column-count-one","dx-scheduler-group-column-count-two","dx-scheduler-group-column-count-three"]},64787:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CompactAppointmentsHelper=void 0;var n=i(88603),o=h(i(38662)),a=h(i(4671)),s=h(i(64553)),r=i(38699),l=h(i(64973)),d=i(66823),u=i(8687),c=i(95965);function h(e){return e&&e.__esModule?e:{default:e}}const p="dx-scheduler-appointment-collector",g=`${p}-compact`,_=`${p}-content`;t.CompactAppointmentsHelper=class{constructor(e){this.instance=e,this.elements=[]}render(e){const{isCompact:t,items:i}=e,n=this._createTemplate(i.data.length,t),o=this._createCompactButton(n,e).$element();return this.elements.push(o),o.data("items",this._createTooltipInfos(i)),o}clear(){this.elements.forEach((e=>{e.detach(),e.remove()})),this.elements=[]}_createTooltipInfos(e){return e.data.map(((t,i)=>{var n;const o=(0,d.createAppointmentAdapter)(t,this.instance._dataAccessors,this.instance.timeZoneCalculator).clone();if((null===(n=e.settings)||void 0===n?void 0:n.length)>0){const{info:t}=e.settings[i];o.startDate=t.sourceAppointment.startDate,o.endDate=t.sourceAppointment.endDate}return new c.AppointmentTooltipInfo(t,o.source(),e.colors[i],e.settings[i])}))}_onButtonClick(e,t){const i=(0,s.default)(e.element);this.instance.showAppointmentTooltipCore(i,i.data("items"),this._getExtraOptionsForTooltip(t,i))}_getExtraOptionsForTooltip(e,t){return{clickEvent:this._clickEvent(e.onAppointmentClick).bind(this),dragBehavior:e.allowDrag&&this._createTooltipDragBehavior(t).bind(this),dropDownAppointmentTemplate:this.instance.option().dropDownAppointmentTemplate,isButtonClick:!0,_loopFocus:!0}}_clickEvent(e){return t=>{const i=this.instance._createEventArgs(t);e(i)}}_createTooltipDragBehavior(e){return t=>{const i=(0,s.default)(t.element),o=(0,s.default)(this.instance.element()),a=this.instance.getWorkSpace(),r=(0,n.locate)(e),l={filter:`.${u.LIST_ITEM_CLASS}`,isSetCursorOffset:!0,initialPosition:r,getItemData:e=>{var t;return null===(t=(0,s.default)(e).data(u.LIST_ITEM_DATA_KEY))||void 0===t?void 0:t.appointment},getItemSettings:(e,t)=>t.itemSettings};a._createDragBehaviorBase(i,o,l)}}_getCollectorOffset(e,t){return t-e-this._getCollectorRightOffset()}_getCollectorRightOffset(){return this.instance.getRenderingStrategyInstance()._isCompactTheme()?1:5}_setPosition(e,t){(0,n.move)(e,{top:t.top,left:t.left})}_createCompactButton(e,t){const i=this._createCompactButtonElement(t);return this.instance._createComponent(i,l.default,{type:"default",width:t.width,height:t.height,onClick:e=>this._onButtonClick(e,t),template:this._renderTemplate(e,t.items,t.isCompact)})}_createCompactButtonElement(e){let{isCompact:t,$container:i,coordinates:n,sortedIndex:o,items:a}=e;const r=this._getDateText(a.data[0]),l=(0,s.default)("<div>").addClass(p).attr("aria-roledescription",r).toggleClass(g,t).appendTo(i);return l.data("dxAppointmentSettings",{sortedIndex:o}),this._setPosition(l,n),l}_renderTemplate(e,t,i){return new r.FunctionTemplate((n=>e.render({model:{appointmentCount:t.data.length,isCompact:i},container:n.container})))}_createTemplate(e,t){return this._initButtonTemplate(e,t),this.instance._getAppointmentTemplate("appointmentCollectorTemplate")}_initButtonTemplate(e,t){this.instance._templateManager.addDefaultTemplates({appointmentCollector:new r.FunctionTemplate((i=>this._createButtonTemplate(e,(0,s.default)(i.container),t)))})}_createButtonTemplate(e,t,i){const n=i?e:a.default.getFormatter("dxScheduler-moreAppointments")(e);return t.append((0,s.default)("<span>").text(n)).addClass(_)}_localizeDate(e){return`${o.default.format(e,"monthAndDay")}, ${o.default.format(e,"year")}`}_getStartDate(e){const t=e.startDate;return t?new Date(t):null}_getEndDate(e){const t=e.endDate;return t?new Date(t):null}_getDateText(e){const t=this._getStartDate(e),i=this._getEndDate(e),n=t?this._localizeDate(t):"",o=i?this._localizeDate(i):"";return`${n===o?`${n}`:`${n} - ${o}`}`}}},8687:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VIEWS=t.LIST_ITEM_DATA_KEY=t.LIST_ITEM_CLASS=t.HORIZONTAL_GROUP_ORIENTATION=t.APPOINTMENT_SETTINGS_KEY=void 0;t.LIST_ITEM_DATA_KEY="dxListItemData",t.LIST_ITEM_CLASS="dx-list-item",t.APPOINTMENT_SETTINGS_KEY="dxAppointmentSettings",t.HORIZONTAL_GROUP_ORIENTATION="horizontal",t.VIEWS={DAY:"day",WEEK:"week",WORK_WEEK:"workWeek",MONTH:"month",TIMELINE_DAY:"timelineDay",TIMELINE_WEEK:"timelineWeek",TIMELINE_WORK_WEEK:"timelineWorkWeek",TIMELINE_MONTH:"timelineMonth",AGENDA:"agenda"}},95965:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AppointmentTooltipInfo=void 0;t.AppointmentTooltipInfo=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];this.appointment=e,this.targetedAppointment=t,this.color=i,this.settings=n}}},19576:function(e,t,i){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const o=((n=i(41380))&&n.__esModule?n:{default:n}).default.dateToMilliseconds;class a{constructor(e){this._source=new Date(e.getTime?e.getTime():e)}get source(){return this._source}result(){return this._source}getTimezoneOffset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;const t=this._source.getTimezoneOffset();return"minute"===e?t*o("minute"):t}getTime(){return this._source.getTime()}setTime(e){return this._source.setTime(e),this}addTime(e){return this._source.setTime(this._source.getTime()+e),this}setMinutes(e){return this._source.setMinutes(e),this}addMinutes(e){return this._source.setMinutes(this._source.getMinutes()+e),this}subtractMinutes(e){return this._source.setMinutes(this._source.getMinutes()-e),this}}t.default=e=>new a(e)},26012:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionUtils=void 0;var n=i(11528);t.ExpressionUtils={getField:(e,t,i)=>{if((0,n.isDefined)(e.getter[t]))return e.getter[t](i)},setField:(e,t,i,o)=>{if((0,n.isDefined)(e.setter[t]))return e.setter[t](i,o),i}}},73922:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.hide=function(){if(!l)return(new o.Deferred).resolve();return l.hide().done(u).promise()},t.show=function(e){return u(),l=d(e),l.show()};var n=r(i(64553)),o=i(87739),a=i(55355),s=r(i(31876));function r(e){return e&&e.__esModule?e:{default:e}}let l=null;const d=function(e){return new s.default((0,n.default)("<div>").appendTo(e&&e.container||(0,a.value)()),e)},u=function(){l&&(l.$element().remove(),l=null)}},55122:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getRecurrenceProcessor=m;var n=l(i(87129)),o=l(i(41380)),a=i(21274),s=i(4755),r=l(i(18648));function l(e){return e&&e.__esModule?e:{default:e}}const d=o.default.dateToMilliseconds,u=["freq","interval","byday","byweekno","byyearday","bymonth","bymonthday","count","until","byhour","byminute","bysecond","bysetpos","wkst"],c=["DAILY","WEEKLY","MONTHLY","YEARLY","SECONDLY","MINUTELY","HOURLY"],h={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},p=[],g=36e5,_=["Etc/GMT-13","MIT","Pacific/Apia","Pacific/Enderbury","Pacific/Tongatapu","Etc/GMT-14","Pacific/Kiritimati"];let f=null;function m(){return f||(f=new v),f}class v{constructor(){this.rRule=null,this.rRuleSet=null,this.validator=new C}generateDates(e){const t=this.evalRecurrenceRule(e.rule),{rule:i}=t;if(!t.isValid||!i.freq)return[];const n=this._createRruleIntervalParams(e);return this._initializeRRule(e,n.startIntervalDate,i.until),this.rRuleSet.between(n.minViewDate,n.maxViewDate,!0).filter((e=>e.getTime()+n.appointmentDuration>=n.minViewTime)).map((t=>this._convertRruleResult(n,e,t)))}_createRruleIntervalParams(e){const{start:t,min:i,max:n,appointmentTimezoneOffset:o}=e,a=r.default.getClientTimezoneOffset(t),s=r.default.getClientTimezoneOffset(i),l=r.default.getClientTimezoneOffset(n),d=e.end?e.end.getTime()-e.start.getTime():0,u=r.default.setOffsetsToDate(e.start,[-a,o]),c=e.min.getTime()-s+o,h=new Date(c-d),p=r.default.setOffsetsToDate(e.max,[-l,o]),g=r.default.getDiffBetweenClientTimezoneOffsets(e.start,u);return{startIntervalDate:u,minViewTime:c,minViewDate:h,maxViewDate:p,startIntervalDateDSTShift:g<0?0:g,appointmentDuration:d}}_convertRruleResult(e,t,i){const n=r.default.setOffsetsToDate(i,[...this._getLocalMachineOffset(i),-t.appointmentTimezoneOffset,e.startIntervalDateDSTShift]),o=r.default.getDiffBetweenClientTimezoneOffsets(n,i),a=o<0,s=r.default.setOffsetsToDate(n,[o]),l=r.default.getDiffBetweenClientTimezoneOffsets(s,n);return l&&a?new Date(s.getTime()+l):s}_getLocalMachineOffset(e){const t=r.default.getClientTimezoneOffset(e),i=o.default.getMachineTimezoneName(),n=[t],a=t/g<=-13,s=!i||_.some((e=>i.includes(e)));return a&&s&&n.push(-864e5),n}hasRecurrence(e){return!!this.generateDates(e).length}evalRecurrenceRule(e){const t={rule:{},isValid:!1};return e&&(t.rule=this._parseRecurrenceRule(e),t.isValid=this.validator.validateRRule(t.rule,e)),t}isValidRecurrenceRule(e){return this.evalRecurrenceRule(e).isValid}daysFromByDayRule(e){let t=[];return e.byday&&(t=Array.isArray(e.byday)?e.byday:e.byday.split(",")),t.map((e=>{const t=e.match(/[A-Za-z]+/);return!!t&&t[0]})).filter((e=>!!e))}getAsciiStringByDate(e){const t=e.getTimezoneOffset()*d("minute"),i=new Date(e.getTime()+t);return`${i.getFullYear()+`0${i.getMonth()+1}`.slice(-2)+`0${i.getDate()}`.slice(-2)}T${`0${i.getHours()}`.slice(-2)}${`0${i.getMinutes()}`.slice(-2)}${`0${i.getSeconds()}`.slice(-2)}Z`}getRecurrenceString(e){if(!e||!e.freq)return;let t="";for(const i in e){let n=e[i];"interval"===i&&n<2||("until"===i&&(n=this.getAsciiStringByDate(n)),t+=`${i}=${n};`)}return t=t.substring(0,t.length-1),t.toUpperCase()}_parseExceptionToRawArray(e){return e.match(/(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2}))?(Z)?/)}getDateByAsciiString(e){if("string"!=typeof e)return e;const t=this._parseExceptionToRawArray(e);if(!t)return null;const[i,n,o,a,s,r,l]=this._createDateTuple(t);return l?new Date(Date.UTC(i,n,o,a,s,r)):new Date(i,n,o,a,s,r)}_dispose(){this.rRuleSet&&(delete this.rRuleSet,this.rRuleSet=null),this.rRule&&(delete this.rRule,this.rRule=null)}_getTimeZoneOffset(){return(new Date).getTimezoneOffset()}_initializeRRule(e,t,i){const n=s.RRule.parseString(e.rule),{firstDayOfWeek:o}=e;if(n.dtstart=t,!n.wkst&&o){const e=[6,0,1,2,3,4,5];n.wkst=e[o]}if(i&&(n.until=r.default.setOffsetsToDate(i,[-r.default.getClientTimezoneOffset(i),e.appointmentTimezoneOffset])),this._createRRule(n),e.exception){e.exception.split(",").map((e=>this.getDateByAsciiString(e))).forEach((t=>{e.getPostProcessedException&&(t=e.getPostProcessedException(t));const i=r.default.setOffsetsToDate(t,[-r.default.getClientTimezoneOffset(t),e.appointmentTimezoneOffset]);this.rRuleSet.exdate(i)}))}}_createRRule(e){this._dispose(),this.rRuleSet=new s.RRuleSet,this.rRule=new s.RRule(e),this.rRuleSet.rrule(this.rRule)}_parseRecurrenceRule(e){const t={},i=e.split(";");for(let e=0,n=i.length;e<n;e++){const n=i[e].split("="),o=n[0].toLowerCase(),a=n[1];t[o]=a}const n=parseInt(t.count);if(isNaN(n)||(t.count=n),t.interval){const e=parseInt(t.interval);isNaN(e)||(t.interval=e)}else t.interval=1;return t.freq&&t.until&&(t.until=this.getDateByAsciiString(t.until)),t}_createDateTuple(e){const t=void 0!==e[8];return e.shift(),void 0===e[3]?e.splice(3):(e.splice(3,1),e.splice(6)),e[1]--,e.unshift(null),[parseInt(e[1]),parseInt(e[2]),parseInt(e[3]),parseInt(e[4])||0,parseInt(e[5])||0,parseInt(e[6])||0,t]}}class C{validateRRule(e,t){return!(this._brokenRuleNameExists(e)||!c.includes(e.freq)||this._wrongCountRule(e)||this._wrongIntervalRule(e)||this._wrongDayOfWeek(e)||this._wrongByMonthDayRule(e)||this._wrongByMonth(e)||this._wrongUntilRule(e))||(this._logBrokenRule(t),!1)}_wrongUntilRule(e){let t=!1;const{until:i}=e;return void 0===i||i instanceof Date||(t=!0),t}_wrongCountRule(e){let t=!1;const{count:i}=e;return i&&"string"==typeof i&&(t=!0),t}_wrongByMonthDayRule(e){let t=!1;const i=e.bymonthday;return i&&isNaN(parseInt(i))&&(t=!0),t}_wrongByMonth(e){let t=!1;const i=e.bymonth;return i&&isNaN(parseInt(i))&&(t=!0),t}_wrongIntervalRule(e){let t=!1;const{interval:i}=e;return i&&"string"==typeof i&&(t=!0),t}_wrongDayOfWeek(e){const t=e.byday,i=m().daysFromByDayRule(e);let n=!1;return""===t&&(n=!0),(0,a.each)(i,((e,t)=>{if(!Object.prototype.hasOwnProperty.call(h,t))return n=!0,!1})),n}_brokenRuleNameExists(e){let t=!1;return(0,a.each)(e,(e=>{if(!u.includes(e))return t=!0,!1})),t}_logBrokenRule(e){p.includes(e)||(n.default.log("W0006",e),p.push(e))}}},84056:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(84798);var n=C(i(38662)),o=C(i(4671)),a=C(i(92848)),s=C(i(19427)),r=C(i(64553)),l=C(i(41380)),d=i(52576),u=i(11528),c=C(i(17809)),h=C(i(2739)),p=C(i(78694)),g=C(i(74075)),_=C(i(48042)),f=i(52071),m=i(97777),v=i(55122);function C(e){return e&&e.__esModule?e:{default:e}}const y="-label",b="-wrapper",x="dx-recurrence-repeat-end",w="dx-recurrence-selectbox-freq",S="dx-recurrence-numberbox-interval",D="dx-recurrence-repeat-on",I=[{recurrence:"dxScheduler-recurrenceHourly",value:"hourly"},{recurrence:"dxScheduler-recurrenceDaily",value:"daily"},{recurrence:"dxScheduler-recurrenceWeekly",value:"weekly"},{recurrence:"dxScheduler-recurrenceMonthly",value:"monthly"},{recurrence:"dxScheduler-recurrenceYearly",value:"yearly"}],E=I.map((e=>({text:()=>o.default.format(e.recurrence),value:e.value}))),T=[{type:"never"},{type:"until"},{type:"count"}],A=["SU","MO","TU","WE","TH","FR","SA"],O=()=>(0,f.isFluent)((0,f.current)())?"filled":void 0;class P{constructor(e){this._recurrenceProcessor=(0,v.getRecurrenceProcessor)(),this._recurrenceProcessor=(0,v.getRecurrenceProcessor)(),this._recurrenceRule=this._recurrenceProcessor.evalRecurrenceRule(e).rule}makeRules(e){this._recurrenceRule=this._recurrenceProcessor.evalRecurrenceRule(e).rule}makeRule(e,t){!t||Array.isArray(t)&&!t.length?delete this._recurrenceRule[e]:(0,u.isDefined)(e)&&("until"===e&&delete this._recurrenceRule.count,"count"===e&&delete this._recurrenceRule.until,this._recurrenceRule[e]=t)}getRepeatEndRule(){const e=this._recurrenceRule;return"count"in e?"count":"until"in e?"until":"never"}getRecurrenceString(){return this._recurrenceProcessor.getRecurrenceString(this._recurrenceRule)}getRules(){return this._recurrenceRule}getDaysFromByDayRule(){return this._recurrenceProcessor.daysFromByDayRule(this._recurrenceRule)}}class k extends p.default{_getDefaultOptions(){const e=super._getDefaultOptions();return(0,d.extend)(e,{value:null,startDate:new Date,firstDayOfWeek:void 0})}_getFirstDayOfWeek(){const e=this.option("firstDayOfWeek");return(0,u.isDefined)(e)?e:n.default.firstDayOfWeekIndex()}_createComponent(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._extendConfig(i,{readOnly:this.option("readOnly")}),super._createComponent(e,t,i)}_init(){super._init(),this._recurrenceRule=new P(this.option("value"))}_render(){super._render(),this.$element().addClass("dx-recurrence-editor"),this._$container=(0,r.default)("<div>").addClass("dx-recurrence-editor-container").appendTo(this.$element()),this._prepareEditors(),this._renderEditors(this._$container)}getEditorByField(e){let t=this.getRecurrenceForm().getEditor(e);if(!(0,u.isDefined)(t))switch(e){case"byday":t=this._weekEditor;break;case"count":t=this._repeatCountEditor;break;case"until":t=this._repeatUntilDate}return t}_prepareEditors(){const e=(this._recurrenceRule.getRules().freq||I[1].value).toLowerCase();return this._editors=[this._createFreqEditor(e),this._createIntervalEditor(e),this._createRepeatOnLabel(e),{itemType:"group",cssClass:D,colCount:2,colCountByScreen:{xs:2},items:this._createRepeatOnEditor(e)},{itemType:"group",items:this._createRepeatEndEditor()}],this._editors}_createFreqEditor(e){return{dataField:"freq",name:"FREQ",editorType:"dxSelectBox",cssClass:w,editorOptions:{stylingMode:O(),items:E,value:e,field:"freq",valueExpr:"value",displayExpr:"text",layout:"horizontal",elementAttr:{class:w},onValueChanged:e=>this._valueChangedHandler(e)},label:{text:o.default.format("dxScheduler-editorLabelRecurrence")}}}_createIntervalEditor(e){const t=this._recurrenceRule.getRules().interval||1;return{itemType:"group",colCount:2,cssClass:`${S}${b}`,colCountByScreen:{xs:2},items:[{dataField:"interval",editorType:"dxNumberBox",editorOptions:{stylingMode:O(),format:"#",width:70,min:1,field:"interval",value:t,showSpinButtons:!0,useLargeSpinButtons:!1,elementAttr:{class:S},onValueChanged:e=>this._valueChangedHandler(e)},label:{text:o.default.format("dxScheduler-recurrenceRepeatEvery")}},{name:"intervalLabel",cssClass:`${S}${y}`,template:()=>o.default.format(`dxScheduler-recurrenceRepeat${e.charAt(0).toUpperCase()}${e.substr(1).toLowerCase()}`)}]}}_createRepeatOnLabel(e){return{itemType:"group",cssClass:`${D}${y}`,items:[{name:"repeatOnLabel",colSpan:2,template:()=>o.default.format("dxScheduler-recurrenceRepeatOn"),visible:e&&"daily"!==e&&"hourly"!==e}]}}_createRepeatOnEditor(e){return[this._createByDayEditor(e),this._createByMonthEditor(e),this._createByMonthDayEditor(e)]}_createByDayEditor(e){return{dataField:"byday",colSpan:2,template:(e,t)=>{const i=this._getFirstDayOfWeek(),o=this._daysOfWeekByRules(),a=n.default.getDayNames("abbreviated"),s=A.slice(i).concat(A.slice(0,i)),l=a.slice(i).concat(a.slice(0,i)).map(((e,t)=>({text:e,key:s[t]})));this._$repeatOnWeek=(0,r.default)("<div>").addClass("dx-recurrence-button-group").appendTo(t),this._weekEditor=this._createComponent(this._$repeatOnWeek,c.default,{items:l,field:"byday",selectionMode:"multiple",selectedItemKeys:o,keyExpr:"key",onSelectionChanged:e=>{const t=e.component.option("selectedItemKeys"),i=null!=t&&t.length?t:this._getDefaultByDayValue();this._recurrenceRule.makeRule("byday",i),this._changeEditorValue()}})},visible:"weekly"===e,label:{visible:!1}}}_createByMonthEditor(e){const t=n.default.getMonthNames("wide"),i=[...Array(12)].map(((e,i)=>({value:`${i+1}`,text:t[i]})));return{dataField:"bymonth",editorType:"dxSelectBox",editorOptions:{stylingMode:O(),field:"bymonth",items:i,value:this._monthOfYearByRules(),width:120,displayExpr:"text",valueExpr:"value",elementAttr:{class:"dx-recurrence-selectbox-month-of-year"},onValueChanged:e=>this._valueChangedHandler(e)},visible:"yearly"===e,label:{visible:!1}}}_createByMonthDayEditor(e){return{dataField:"bymonthday",editorType:"dxNumberBox",editorOptions:{stylingMode:O(),min:1,max:31,format:"#",width:70,field:"bymonthday",showSpinButtons:!0,useLargeSpinButtons:!1,value:this._dayOfMonthByRules(),elementAttr:{class:"dx-recurrence-numberbox-day-of-month"},onValueChanged:e=>this._valueChangedHandler(e)},visible:"monthly"===e||"yearly"===e,label:{visible:!1}}}_createRepeatEndEditor(){const e=this._recurrenceRule.getRepeatEndRule();return[{dataField:"repeatEnd",editorType:"dxRadioGroup",editorOptions:{items:T,value:e,valueExpr:"type",field:"repeatEnd",itemTemplate:e=>"count"===e.type?this._renderRepeatCountEditor():"until"===e.type?this._renderRepeatUntilEditor():this._renderDefaultRepeatEnd(),layout:"vertical",elementAttr:{class:"dx-recurrence-radiogroup-repeat-type"},onValueChanged:e=>this._repeatEndValueChangedHandler(e)},label:{text:o.default.format("dxScheduler-recurrenceEnd")}}]}_renderEditors(e){this._recurrenceForm=this._createComponent(e,g.default,{items:this._editors,showValidationSummary:!1,scrollingEnabled:!0,showColonAfterLabel:!1,labelLocation:"top"}),this._disableRepeatEndParts()}_setAriaDescribedBy(e,t){const i=`label-${new s.default}`;e.setAria("describedby",i),e.setAria("id",i,t)}getRecurrenceForm(){return this._recurrenceForm}changeValueByVisibility(e){e?this.option("value")||this._handleDefaults():(this._recurrenceRule.makeRules(""),this.option("value",""))}_handleDefaults(){this._recurrenceRule.makeRule("freq",I[1].value),this._changeEditorValue()}_changeEditorValue(){this.option("value",this._recurrenceRule.getRecurrenceString()||"")}_daysOfWeekByRules(){let e=this._recurrenceRule.getDaysFromByDayRule();return e.length||(e=this._getDefaultByDayValue()),e}_getDefaultByDayValue(){const e=this.option("startDate").getDay();return[A[e]]}_dayOfMonthByRules(){let e=this._recurrenceRule.getRules().bymonthday;return e||(e=this.option("startDate").getDate()),e}_monthOfYearByRules(){let e=this._recurrenceRule.getRules().bymonth;return e||(e=this.option("startDate").getMonth()+1),String(e)}_renderDefaultRepeatEnd(){const e=(0,r.default)("<div>").addClass(x+b);return(0,r.default)("<div>").text(o.default.format("dxScheduler-recurrenceNever")).addClass(x+y).appendTo(e),e}_repeatEndValueChangedHandler(e){const{value:t}=e;this._disableRepeatEndParts(t),"until"===t&&this._recurrenceRule.makeRule(t,this._getUntilValue()),"count"===t&&this._recurrenceRule.makeRule(t,this._repeatCountEditor.option("value")),"never"===t&&(this._recurrenceRule.makeRule("count",""),this._recurrenceRule.makeRule("until","")),this._changeEditorValue()}_disableRepeatEndParts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._recurrenceRule.getRepeatEndRule();"until"===e&&(this._repeatCountEditor.option("disabled",!0),this._repeatUntilDate.option("disabled",!1)),"count"===e&&(this._repeatCountEditor.option("disabled",!1),this._repeatUntilDate.option("disabled",!0)),"never"===e&&(this._repeatCountEditor.option("disabled",!0),this._repeatUntilDate.option("disabled",!0))}_renderRepeatCountEditor(){const e=this._recurrenceRule.getRules().count||1,t=(0,r.default)("<div>").addClass(x+b);return(0,r.default)("<div>").text(o.default.format("dxScheduler-recurrenceAfter")).addClass(x+y).appendTo(t),this._$repeatCountEditor=(0,r.default)("<div>").addClass("dx-recurrence-numberbox-repeat-count").appendTo(t),(0,r.default)("<div>").text(o.default.format("dxScheduler-recurrenceRepeatCount")).addClass(x+y).appendTo(t),this._repeatCountEditor=this._createComponent(this._$repeatCountEditor,_.default,{stylingMode:O(),field:"count",format:"#",width:70,min:1,showSpinButtons:!0,useLargeSpinButtons:!1,value:e,onValueChanged:this._repeatCountValueChangeHandler.bind(this)}),t}_repeatCountValueChangeHandler(e){if("count"===this._recurrenceRule.getRepeatEndRule()){const{value:t}=e;this._recurrenceRule.makeRule("count",t),this._changeEditorValue()}}_formatUntilDate(e){return this._recurrenceRule.getRules().until&&l.default.sameDate(this._recurrenceRule.getRules().until,e)?e:l.default.setToDayEnd(e)}_renderRepeatUntilEditor(){const e=this._getUntilValue(),t=(0,r.default)("<div>").addClass(x+b);return(0,r.default)("<div>").text(o.default.format("dxScheduler-recurrenceOn")).addClass(x+y).appendTo(t),this._$repeatDateEditor=(0,r.default)("<div>").addClass("dx-recurrence-datebox-until-date").appendTo(t),this._repeatUntilDate=this._createComponent(this._$repeatDateEditor,h.default,{stylingMode:O(),field:"until",value:e,type:"date",onValueChanged:this._repeatUntilValueChangeHandler.bind(this),calendarOptions:{firstDayOfWeek:this._getFirstDayOfWeek()},useMaskBehavior:!0}),t}_repeatUntilValueChangeHandler(e){if("until"===this._recurrenceRule.getRepeatEndRule()){const t=this._formatUntilDate(new Date(e.value)),i=this.option("getStartDateTimeZone")(),n=i?m.PathTimeZoneConversion.fromAppointmentToSource:m.PathTimeZoneConversion.fromGridToSource,o=this.option("timeZoneCalculator").createDate(t,{path:n,appointmentTimeZone:i});this._recurrenceRule.makeRule("until",o),this._changeEditorValue()}}_valueChangedHandler(e){const{value:t,previousValue:i}=e,n=e.component.option("field");this.option("visible")?(this._recurrenceRule.makeRule(n,t),"freq"===n&&(this._makeRepeatOnRule(t),this._changeRepeatOnVisibility(t,i)),this._changeEditorValue()):this.option("value","")}_makeRepeatOnRule(e){"daily"!==e&&"hourly"!==e||(this._recurrenceRule.makeRule("byday",""),this._recurrenceRule.makeRule("bymonth",""),this._recurrenceRule.makeRule("bymonthday","")),"weekly"===e&&(this._recurrenceRule.makeRule("byday",this._daysOfWeekByRules()),this._recurrenceRule.makeRule("bymonth",""),this._recurrenceRule.makeRule("bymonthday","")),"monthly"===e&&(this._recurrenceRule.makeRule("bymonthday",this._dayOfMonthByRules()),this._recurrenceRule.makeRule("bymonth",""),this._recurrenceRule.makeRule("byday","")),"yearly"===e&&(this._recurrenceRule.makeRule("bymonthday",this._dayOfMonthByRules()),this._recurrenceRule.makeRule("bymonth",this._monthOfYearByRules()),this._recurrenceRule.makeRule("byday",""))}_optionChanged(e){var t,i,o,a;switch(e.name){case"readOnly":null===(t=this._recurrenceForm)||void 0===t||t.option("readOnly",e.value),null===(i=this._repeatCountEditor)||void 0===i||i.option("readOnly",e.value),null===(o=this._weekEditor)||void 0===o||o.option("readOnly",e.value),null===(a=this._repeatUntilDate)||void 0===a||a.option("readOnly",e.value),super._optionChanged(e);break;case"value":this._recurrenceRule.makeRules(e.value),this._changeRepeatIntervalLabel(),this._disableRepeatEndParts(),this._changeEditorsValue(this._recurrenceRule.getRules()),super._optionChanged(e);break;case"startDate":this._makeRepeatOnRule(this._recurrenceRule.getRules().freq),(0,u.isDefined)(this._recurrenceRule.getRecurrenceString())&&this._changeEditorValue();break;case"firstDayOfWeek":if(this._weekEditor){const t=n.default.getDayNames("abbreviated"),i=A.slice(e.value).concat(A.slice(0,e.value)),o=t.slice(e.value).concat(t.slice(0,e.value)).map(((e,t)=>({text:e,key:i[t]})));this._weekEditor.option("items",o)}this._$repeatDateEditor&&this._repeatUntilDate.option("calendarOptions.firstDayOfWeek",this._getFirstDayOfWeek());break;default:super._optionChanged(e)}}_changeRepeatOnVisibility(e,t){e!==t&&(this._recurrenceForm.itemOption("byday","visible",!1),this._recurrenceForm.itemOption("bymonthday","visible",!1),this._recurrenceForm.itemOption("bymonth","visible",!1),this._recurrenceForm.itemOption("repeatOnLabel","visible",e&&"daily"!==e&&"hourly"!==e),"weekly"===e&&this._recurrenceForm.itemOption("byday","visible",!0),"monthly"===e&&this._recurrenceForm.itemOption("bymonthday","visible",!0),"yearly"===e&&(this._recurrenceForm.itemOption("bymonthday","visible",!0),this._recurrenceForm.itemOption("bymonth","visible",!0)))}_changeRepeatIntervalLabel(){const{freq:e}=this._recurrenceRule.getRules();e&&this._recurrenceForm.itemOption("intervalLabel","template",o.default.format(`dxScheduler-recurrenceRepeat${e.charAt(0).toUpperCase()}${e.substr(1).toLowerCase()}`))}_changeEditorsValue(e){this._recurrenceForm.getEditor("freq").option("value",(e.freq||I[1].value).toLowerCase()),this._changeDayOfWeekValue(),this._changeDayOfMonthValue(),this._changeMonthOfYearValue(),this._changeIntervalValue(e.interval),this._changeRepeatCountValue(),this._changeRepeatEndValue(),this._changeRepeatUntilValue()}_changeIntervalValue(e){this._recurrenceForm.getEditor("interval").option("value",e||1)}_changeRepeatEndValue(){const e=this._recurrenceRule.getRepeatEndRule();this._recurrenceForm.getEditor("repeatEnd").option("value",e)}_changeDayOfWeekValue(){if(this._recurrenceForm.itemOption("byday").visible){const e=this._daysOfWeekByRules();this.getEditorByField("byday").option("selectedItemKeys",e)}}_changeDayOfMonthValue(){if(this._recurrenceForm.itemOption("bymonthday").visible){const e=this._dayOfMonthByRules();this._recurrenceForm.getEditor("bymonthday").option("value",e)}}_changeMonthOfYearValue(){if(this._recurrenceForm.itemOption("bymonth").visible){const e=this._monthOfYearByRules();this._recurrenceForm.getEditor("bymonth").option("value",e)}}_changeRepeatCountValue(){const e=this._recurrenceRule.getRules().count||1;this._repeatCountEditor.option("value",e)}_changeRepeatUntilValue(){this._repeatUntilDate.option("value",this._getUntilValue())}_getUntilValue(){const e=this._recurrenceRule.getRules().until;if(!e)return this._formatUntilDate(new Date);const t=this.option("getStartDateTimeZone")(),i=t?m.PathTimeZoneConversion.fromSourceToAppointment:m.PathTimeZoneConversion.fromSourceToGrid;return this.option("timeZoneCalculator").createDate(e,{path:i,appointmentTimeZone:t})}toggle(){this._freqEditor.focus()}setAria(){this._switchEditor&&this._switchEditor.setAria(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1])}}(0,a.default)("dxRecurrenceEditor",k);t.default=k},21155:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(18029),o=le(i(38662)),a=le(i(4671)),s=le(i(75990)),r=le(i(92848)),l=le(i(66636)),d=le(i(65951)),u=i(61404),c=le(i(64553)),h=i(27286),p=i(48650),g=le(i(84718)),_=i(17781),f=i(31e3),m=le(i(41380)),v=le(i(71051)),C=i(87739),y=i(52576),b=i(21274),x=i(41639),w=i(11528),S=i(3104),D=i(35757),I=i(52071),E=le(i(35185)),T=le(i(11118)),A=i(55594),O=i(97777),P=i(34396),k=i(8107),M=i(27483),R=i(64836),L=le(i(5311)),B=i(84829),V=i(66823),F=le(i(17851)),H=i(64787),N=i(8687),z=i(95965),W=i(26012),$=i(73922),G=i(55122),j=le(i(58713)),U=i(5327),K=le(i(18648)),Z=i(98602),q=i(14834),Y=i(45629),X=i(93048),Q=i(96588),J=le(i(11129)),ee=le(i(52515)),te=le(i(23791)),ie=le(i(10621)),ne=le(i(64063)),oe=le(i(83216)),ae=le(i(3416)),se=le(i(23276)),re=le(i(27420));function le(e){return e&&e.__esModule?e:{default:e}}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},de.apply(null,arguments)}const ue=m.default.dateToMilliseconds,ce="dx-scheduler",he=`${ce}-small`,pe=`${ce}-adaptive`,ge=`${ce}-readonly`,_e={day:{workSpace:oe.default,renderingStrategy:"vertical"},week:{workSpace:se.default,renderingStrategy:"vertical"},workWeek:{workSpace:re.default,renderingStrategy:"vertical"},month:{workSpace:ae.default,renderingStrategy:"horizontalMonth"},timelineDay:{workSpace:ee.default,renderingStrategy:"horizontal"},timelineWeek:{workSpace:ie.default,renderingStrategy:"horizontal"},timelineWorkWeek:{workSpace:ne.default,renderingStrategy:"horizontal"},timelineMonth:{workSpace:te.default,renderingStrategy:"horizontalMonthLine"},agenda:{workSpace:J.default,renderingStrategy:"agenda"}},fe="onAppointmentAdding",me="onAppointmentAdded",ve="onAppointmentDeleting",Ce="onAppointmentDeleted",ye="onAppointmentUpdating",be="onAppointmentUpdated",xe="editSeries",we="editOccurence",Se="cancel";class De extends T.default{_getDefaultOptions(){const e=(0,y.extend)(super._getDefaultOptions(),{views:["day","week"],currentView:"day",currentDate:m.default.trimTime(new Date),min:void 0,max:void 0,dateSerializationFormat:void 0,firstDayOfWeek:void 0,groups:[],resources:[],loadedResources:[],resourceLoaderMap:new Map,dataSource:null,customizeDateNavigatorText:void 0,appointmentTemplate:"item",dropDownAppointmentTemplate:"dropDownAppointment",appointmentCollectorTemplate:"appointmentCollector",dataCellTemplate:null,timeCellTemplate:null,resourceCellTemplate:null,dateCellTemplate:null,startDayHour:0,endDayHour:24,offset:0,editing:{allowAdding:!0,allowDeleting:!0,allowDragging:!0,allowResizing:!0,allowUpdating:!0,allowTimeZoneEditing:!1},showAllDayPanel:!0,showCurrentTimeIndicator:!0,shadeUntilCurrentTime:!1,indicatorUpdateInterval:3e5,indicatorTime:void 0,recurrenceEditMode:"dialog",cellDuration:30,maxAppointmentsPerCell:"auto",selectedCellData:[],groupByDate:!1,onAppointmentRendered:null,onAppointmentClick:null,onAppointmentDblClick:null,onAppointmentContextMenu:null,onCellClick:null,onCellContextMenu:null,onAppointmentAdding:null,onAppointmentAdded:null,onAppointmentUpdating:null,onAppointmentUpdated:null,onAppointmentDeleting:null,onAppointmentDeleted:null,onAppointmentFormOpening:null,onAppointmentTooltipShowing:null,appointmentTooltipTemplate:"appointmentTooltip",appointmentPopupTemplate:"appointmentPopup",crossScrollingEnabled:!1,useDropDownViewSwitcher:!1,startDateExpr:"startDate",endDateExpr:"endDate",textExpr:"text",descriptionExpr:"description",allDayExpr:"allDay",recurrenceRuleExpr:"recurrenceRule",recurrenceExceptionExpr:"recurrenceException",disabledExpr:"disabled",remoteFiltering:!1,timeZone:"",startDateTimeZoneExpr:"startDateTimeZone",endDateTimeZoneExpr:"endDateTimeZone",noDataText:a.default.format("dxCollectionWidget-noDataText"),adaptivityEnabled:!1,allowMultipleCellSelection:!0,scrolling:{mode:"standard"},allDayPanelMode:"all",renovateRender:!0,_draggingMode:"outlook",_appointmentTooltipOffset:{x:0,y:0},_appointmentTooltipButtonsPosition:"bottom",_appointmentTooltipOpenButtonText:a.default.format("dxScheduler-openAppointment"),_appointmentCountPerCell:2,_collectorOffset:0,_appointmentOffset:26,toolbar:[{location:"before",defaultElement:"dateNavigator"},{location:"after",defaultElement:"viewSwitcher"}]});return(0,y.extend)(!0,e,{integrationOptions:{useDeferUpdateForTemplates:!1}})}get filteredItems(){return this._filteredItems||(this._filteredItems=[]),this._filteredItems}set filteredItems(e){this._filteredItems=e}get preparedItems(){return this._preparedItems||(this._preparedItems=[]),this._preparedItems}set preparedItems(e){this._preparedItems=e}get currentView(){return P.viewsUtils.getCurrentView(this.option("currentView"),this.option("views"))}get currentViewType(){return(0,w.isObject)(this.currentView)?this.currentView.type:this.currentView}get timeZoneCalculator(){return this._timeZoneCalculator||(this._timeZoneCalculator=(0,O.createTimeZoneCalculator)(this.option("timeZone"))),this._timeZoneCalculator}_setDeprecatedOptions(){super._setDeprecatedOptions(),(0,y.extend)(this._deprecatedOptions,{dropDownAppointmentTemplate:{since:"19.2",message:"appointmentTooltipTemplate"}})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>"desktop"===d.default.real().deviceType&&!d.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>!d.default.current().generic,options:{useDropDownViewSwitcher:!0,editing:{allowDragging:!1,allowResizing:!1}}},{device:()=>(0,I.isMaterialBased)(),options:{useDropDownViewSwitcher:!0,dateCellTemplate(e,t,i){const{text:n}=e;n.split(" ").forEach(((e,t)=>{const n=(0,c.default)("<span>").text(e).addClass("dx-scheduler-header-panel-cell-date");(0,c.default)(i).append(n),t||(0,c.default)(i).append(" ")}))},_appointmentTooltipButtonsPosition:"top",_appointmentTooltipOpenButtonText:null,_appointmentCountPerCell:1,_collectorOffset:20,_appointmentOffset:30}},{device:()=>(0,I.isMaterial)(),options:{_appointmentTooltipOffset:{x:0,y:11}}}])}_postponeDataSourceLoading(e){this.postponedOperations.add("_reloadDataSource",this._reloadDataSource.bind(this),e)}_postponeResourceLoading(){const e=this.postponedOperations.add("loadResources",(()=>{const e=this._getCurrentViewOption("groups");return(0,Y.loadResources)(e,this.option("resources"),this.option("resourceLoaderMap"))})),t=new C.Deferred;return e.done((e=>{this.option("loadedResources",e),t.resolve(e)})),this._postponeDataSourceLoading(e),t.promise()}_optionChanged(e){var t,i,n;this.validateOptions();let{value:o}=e;const{name:a}=e;switch(e.name){case"customizeDateNavigatorText":this._updateOption("header",a,o);break;case"firstDayOfWeek":this._updateOption("workSpace",a,o),this._updateOption("header",a,o);break;case"currentDate":o=this._dateOption(a),o=m.default.trimTime(new Date(o)),this.option("selectedCellData",[]),this._workSpace.option(a,new Date(o)),null===(t=this._header)||void 0===t||t.option(a,new Date(o)),null===(i=this._header)||void 0===i||i.option("startViewDate",this.getStartViewDate()),this._appointments.option("items",[]),this._filterAppointmentsByDate(),this._postponeDataSourceLoading();break;case"dataSource":this._initDataSource(),this.appointmentDataProvider.setDataSource(this._dataSource),this._postponeResourceLoading().done((()=>{this._filterAppointmentsByDate(),this._updateOption("workSpace","showAllDayPanel",this.option("showAllDayPanel"))}));break;case"min":case"max":o=this._dateOption(a),this._updateOption("header",a,new Date(o)),this._updateOption("workSpace",a,new Date(o));break;case"views":var s;if(this._getCurrentViewOptions())this.repaint();else null===(s=this._header)||void 0===s||s.option(a,o);break;case"useDropDownViewSwitcher":null===(n=this._header)||void 0===n||n.option(a,o);break;case"currentView":this._renderAriaAttributes(),this._appointments.option({items:[],allowDrag:this._allowDragging(),allowResize:this._allowResizing(),itemTemplate:this._getAppointmentTemplate("appointmentTemplate")}),this._postponeResourceLoading().done((e=>{var t;this._refreshWorkSpace(e),null===(t=this._header)||void 0===t||t.option(this._headerConfig()),this._filterAppointmentsByDate(),this._appointments.option("allowAllDayResize","day"!==o)})),this.postponedOperations.callPostponedOperations();break;case"appointmentTemplate":this._appointments.option("itemTemplate",o);break;case"dateCellTemplate":case"resourceCellTemplate":case"dataCellTemplate":case"timeCellTemplate":this.repaint();break;case"groups":this._postponeResourceLoading().done((e=>{this._refreshWorkSpace(e),this._filterAppointmentsByDate()}));break;case"resources":this._dataAccessors.resources=(0,Y.createExpressions)(this.option("resources")),this.agendaResourceProcessor.initializeState(this.option("resources")),this.updateInstances(),this.option("resourceLoaderMap").clear(),this._postponeResourceLoading().done((e=>{this._appointments.option("items",[]),this._refreshWorkSpace(e),this._filterAppointmentsByDate(),this._createAppointmentPopupForm()}));break;case"startDayHour":case"endDayHour":this.updateInstances(),this._appointments.option("items",[]),this._updateOption("workSpace",a,o),this._appointments.repaint(),this._filterAppointmentsByDate(),this._postponeDataSourceLoading();break;case"offset":this.updateInstances(),this._appointments.option("items",[]),this._updateOption("workSpace","viewOffset",this.normalizeViewOffsetValue(o)),this._appointments.repaint(),this._filterAppointmentsByDate(),this._postponeDataSourceLoading();break;case fe:case me:case ye:case be:case ve:case Ce:case"onAppointmentFormOpening":case"onAppointmentTooltipShowing":this._actions[a]=this._createActionByOption(a);break;case"onAppointmentRendered":this._appointments.option("onItemRendered",this._getAppointmentRenderedAction());break;case"onAppointmentClick":this._appointments.option("onItemClick",this._createActionByOption(a));break;case"onAppointmentDblClick":this._appointments.option(a,this._createActionByOption(a));break;case"onAppointmentContextMenu":this._appointments.option("onItemContextMenu",this._createActionByOption(a)),this._appointmentTooltip._options.onItemContextMenu=this._createActionByOption(a);break;case"noDataText":case"allowMultipleCellSelection":case"selectedCellData":case"accessKey":case"onCellClick":case"onCellContextMenu":this._workSpace.option(a,o);break;case"crossScrollingEnabled":this._postponeResourceLoading().done((e=>{this._appointments.option("items",[]),this._refreshWorkSpace(e),this._readyToRenderAppointments&&this._appointments.option("items",this._getAppointmentsToRepaint())}));break;case"cellDuration":this._updateOption("workSpace",a,o),this._appointments.option("items",[]),this._readyToRenderAppointments&&(this._updateOption("workSpace","hoursInterval",o/60),this._appointments.option("items",this._getAppointmentsToRepaint()));break;case"tabIndex":case"focusStateEnabled":this._updateOption("header",a,o),this._updateOption("workSpace",a,o),this._appointments.option(a,o),super._optionChanged(e);break;case"width":this._updateOption("header",a,o),this.option("crossScrollingEnabled")&&this._updateOption("workSpace","width",o),this._updateOption("workSpace","schedulerWidth",o),super._optionChanged(e),this._dimensionChanged(null,!0);break;case"height":super._optionChanged(e),this._dimensionChanged(null,!0),this._updateOption("workSpace","schedulerHeight",o);break;case"editing":{this._initEditing();const e=this._editing;this._bringEditingModeToAppointments(e),this.hideAppointmentTooltip(),this._cleanPopup();break}case"showAllDayPanel":this.updateInstances(),this.repaint();break;case"showCurrentTimeIndicator":case"indicatorTime":case"indicatorUpdateInterval":case"shadeUntilCurrentTime":case"groupByDate":this._updateOption("workSpace",a,o),this.repaint();break;case"appointmentDragging":case"appointmentTooltipTemplate":case"appointmentPopupTemplate":case"recurrenceEditMode":case"remoteFiltering":case"timeZone":this.updateInstances(),this.repaint();break;case"dropDownAppointmentTemplate":case"appointmentCollectorTemplate":case"_appointmentTooltipOffset":case"_appointmentTooltipButtonsPosition":case"_appointmentTooltipOpenButtonText":case"_appointmentCountPerCell":case"_collectorOffset":case"_appointmentOffset":this.repaint();break;case"dateSerializationFormat":case"maxAppointmentsPerCell":break;case"startDateExpr":case"endDateExpr":case"startDateTimeZoneExpr":case"endDateTimeZoneExpr":case"textExpr":case"descriptionExpr":case"allDayExpr":case"recurrenceRuleExpr":case"recurrenceExceptionExpr":case"disabledExpr":this._updateExpression(a,o),this.appointmentDataProvider.updateDataAccessors(this._dataAccessors),this._initAppointmentTemplate(),this.repaint();break;case"adaptivityEnabled":this._toggleAdaptiveClass(),this.repaint();break;case"scrolling":this.option("crossScrollingEnabled",this._isHorizontalVirtualScrolling()||this.option("crossScrollingEnabled")),this._updateOption("workSpace",e.fullName,o);break;case"allDayPanelMode":this.updateInstances(),this._updateOption("workSpace",e.fullName,o);break;case"renovateRender":this._updateOption("workSpace",a,o);break;case"_draggingMode":this._workSpace.option("draggingMode",o);break;case"toolbar":this._header?this._header.option("items",o):this.repaint();break;case"loadedResources":case"resourceLoaderMap":break;default:super._optionChanged(e)}}_dateOption(e){const t=this._getCurrentViewOption(e);return v.default.deserializeDate(t)}_getSerializationFormat(e){const t=this._getCurrentViewOption(e);return"number"==typeof t?"number":(0,w.isString)(t)?v.default.getDateSerializationFormat(t):void 0}_bringEditingModeToAppointments(e){const t={allowDelete:e.allowUpdating&&e.allowDeleting};this._isAgenda()||(t.allowDrag=e.allowDragging,t.allowResize=e.allowResizing,t.allowAllDayResize=e.allowResizing&&this._supportAllDayResizing()),this._appointments.option(t),this.repaint()}_isAgenda(){return"agenda"===this.getLayoutManager().appointmentRenderingStrategyName}_allowDragging(){return this._editing.allowDragging&&!this._isAgenda()}_allowResizing(){return this._editing.allowResizing&&!this._isAgenda()}_allowAllDayResizing(){return this._editing.allowResizing&&this._supportAllDayResizing()}_supportAllDayResizing(){return"day"!==this.currentViewType||this.currentView.intervalCount>1}_isAllDayExpanded(){return this.option("showAllDayPanel")&&this.appointmentDataProvider.hasAllDayAppointments(this.filteredItems,this.preparedItems)}_getTimezoneOffsetByOption(e){return K.default.calculateTimezoneByValue(this.option("timeZone"),e)}_filterAppointmentsByDate(){const e=this._workSpace.getDateRange(),t=this.timeZoneCalculator.createDate(e[0],{path:"fromGrid"}),i=this.timeZoneCalculator.createDate(e[1],{path:"fromGrid"});this.appointmentDataProvider.filterByDate(t,i,this.option("remoteFiltering"),this.option("dateSerializationFormat"))}_reloadDataSource(){const e=new C.Deferred;return this._dataSource?(this._dataSource.load().done((()=>{(0,$.hide)(),this._fireContentReadyAction(e)})).fail((()=>{(0,$.hide)(),e.reject()})),this._dataSource.isLoading()&&(0,$.show)({container:this.$element(),position:{of:this.$element()}})):this._fireContentReadyAction(e),e.promise()}_fireContentReadyAction(e){const t=super._fireContentReadyAction.bind(this),i=()=>{t(),null==e||e.resolve()};var n;this._workSpaceRecalculation?null===(n=this._workSpaceRecalculation)||void 0===n||n.done((()=>{i()})):i()}_dimensionChanged(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i="number"==typeof this.option("height"),n="number"==typeof this.option("width");if(!this._isVisible())return;this._toggleSmallClass();const o=this.getWorkSpace();if(!this._isAgenda()&&this.filteredItems&&o&&(t||!i||!n)){o.option("allDayExpanded",this._isAllDayExpanded()),o._dimensionChanged();const e=this.getLayoutManager().createAppointmentsMap(this.filteredItems);this._appointments.option("items",e)}this.hideAppointmentTooltip(),this._appointmentPopup.triggerResize(),this._appointmentPopup.updatePopupFullScreenMode()}_clean(){this._cleanPopup(),super._clean()}_toggleSmallClass(){const{width:e}=(0,x.getBoundingRect)(this.$element().get(0));this.$element().toggleClass(he,e<400)}_toggleAdaptiveClass(){this.$element().toggleClass(pe,this.option("adaptivityEnabled"))}_visibilityChanged(e){e&&this._dimensionChanged(null,!0)}_dataSourceOptions(){return{paginate:!1}}_initAllDayPanel(){"hidden"===this.option("allDayPanelMode")&&this.option("showAllDayPanel",!1)}_init(){this._initExpressions({startDate:this.option("startDateExpr"),endDate:this.option("endDateExpr"),startDateTimeZone:this.option("startDateTimeZoneExpr"),endDateTimeZone:this.option("endDateTimeZoneExpr"),allDay:this.option("allDayExpr"),text:this.option("textExpr"),description:this.option("descriptionExpr"),recurrenceRule:this.option("recurrenceRuleExpr"),recurrenceException:this.option("recurrenceExceptionExpr"),disabled:this.option("disabledExpr")}),super._init(),this._initAllDayPanel(),this._initDataSource(),this._customizeDataSourceLoadOptions(),this.$element().addClass(ce),this._initEditing(),this.updateInstances(),this._initActions(),this._compactAppointmentsHelper=new H.CompactAppointmentsHelper(this),this._asyncTemplatesTimers=[],this._dataSourceLoadedCallback=(0,g.default)(),this._subscribes=j.default,this.agendaResourceProcessor=new q.AgendaResourceProcessor(this.option("resources")),this._optionsValidator=new Z.SchedulerOptionsValidator,this._optionsValidatorErrorHandler=new Z.SchedulerOptionsValidatorErrorsHandler}createAppointmentDataProvider(){var e;null===(e=this.appointmentDataProvider)||void 0===e||e.destroy(),this.appointmentDataProvider=new R.AppointmentDataProvider({dataSource:this._dataSource,dataAccessors:this._dataAccessors,timeZoneCalculator:this.timeZoneCalculator,dateSerializationFormat:this.option("dateSerializationFormat"),resources:this.option("resources"),startDayHour:this._getCurrentViewOption("startDayHour"),endDayHour:this._getCurrentViewOption("endDayHour"),viewOffset:this.getViewOffsetMs(),appointmentDuration:this._getCurrentViewOption("cellDuration"),allDayPanelMode:this._getCurrentViewOption("allDayPanelMode"),showAllDayPanel:this.option("showAllDayPanel"),getLoadedResources:()=>this.option("loadedResources"),getIsVirtualScrolling:()=>this.isVirtualScrolling(),getSupportAllDayRow:()=>this._workSpace.supportAllDayRow(),getViewType:()=>this._workSpace.type,getViewDirection:()=>this._workSpace.viewDirection,getDateRange:()=>this._workSpace.getDateRange(),getGroupCount:()=>this._workSpace._getGroupCount(),getViewDataProvider:()=>this._workSpace.viewDataProvider})}updateInstances(){this._timeZoneCalculator=null,this.getWorkSpace()&&this.createAppointmentDataProvider()}_customizeDataSourceLoadOptions(){var e;null===(e=this._dataSource)||void 0===e||e.on("customizeStoreLoadOptions",(e=>{let{storeLoadOptions:t}=e;t.startDate=this.getStartViewDate(),t.endDate=this.getEndViewDate()}))}_initTemplates(){this._initAppointmentTemplate(),this._templateManager.addDefaultTemplates({appointmentTooltip:new p.EmptyTemplate,dropDownAppointment:new p.EmptyTemplate}),super._initTemplates()}_initAppointmentTemplate(){const{expr:e}=this._dataAccessors,t=e=>(0,f.compileGetter)(`appointmentData.${e}`),i=e=>t=>{const i=e(t);return i instanceof Date?i.valueOf():i};this._templateManager.addDefaultTemplates({item:new h.BindableTemplate(((e,t,i)=>this.getAppointmentsInstance()._renderAppointmentTemplate(e,t,i)),["html","text","startDate","endDate","allDay","description","recurrenceRule","recurrenceException","startDateTimeZone","endDateTimeZone"],this.option("integrationOptions.watchMethod"),{text:t(e.textExpr),startDate:i(t(e.startDateExpr)),endDate:i(t(e.endDateExpr)),startDateTimeZone:t(e.startDateTimeZoneExpr),endDateTimeZone:t(e.endDateTimeZoneExpr),allDay:t(e.allDayExpr),recurrenceRule:t(e.recurrenceRuleExpr)})})}_renderContent(){this._renderContentImpl()}_updatePreparedItems(e){this.preparedItems=(0,P.getPreparedDataItems)(e,this._dataAccessors,this._getCurrentViewOption("cellDuration"),this.timeZoneCalculator)}_dataSourceChangedHandler(e){this._readyToRenderAppointments&&this._workSpaceRecalculation.done((()=>{this._updatePreparedItems(e),this._renderAppointments(),this.getWorkSpace().onDataSourceChanged(this.filteredItems)}))}isVirtualScrolling(){var e;const t=this.getWorkSpace();if(t)return t.isVirtualScrolling();const i=this._getCurrentViewOptions(),n=this.option("scrolling");return"virtual"===(null==n?void 0:n.mode)||"virtual"===(null==i||null===(e=i.scrolling)||void 0===e?void 0:e.mode)}_filterAppointments(){this.filteredItems=this.appointmentDataProvider.filter(this.preparedItems)}_renderAppointments(){const e=this.getWorkSpace();this._filterAppointments(),e.option("allDayExpanded",this._isAllDayExpanded());let t=[];this._isVisible()&&(t=this._getAppointmentsToRepaint()),this._appointments.option("items",t),this.appointmentDataProvider.cleanState()}_getAppointmentsToRepaint(){const e=this.getLayoutManager(),t=e.createAppointmentsMap(this.filteredItems);return e.getRepaintedAppointments(t,this.getAppointmentsInstance().option("items"))}_initExpressions(e){this._dataAccessors=U.utils.dataAccessors.create(e,this._dataAccessors,(0,l.default)().forceIsoDateParsing,this.option("dateSerializationFormat")),this._dataAccessors.resources=(0,Y.createExpressions)(this.option("resources"))}_updateExpression(e,t){const i={};i[e.replace("Expr","")]=t,this._initExpressions(i)}getResourceDataAccessors(){return this._dataAccessors.resources}_initEditing(){const e=this.option("editing");this._editing={allowAdding:!!e,allowUpdating:!!e,allowDeleting:!!e,allowResizing:!!e,allowDragging:!!e},(0,w.isObject)(e)&&(this._editing=(0,y.extend)(this._editing,e)),this._editing.allowDragging=this._editing.allowDragging&&this._editing.allowUpdating,this._editing.allowResizing=this._editing.allowResizing&&this._editing.allowUpdating,this.$element().toggleClass(ge,this._isReadOnly())}_isReadOnly(){let e=!0;const t=this._editing;for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e=e&&!t[i]);return e}_dispose(){var e;this._appointmentTooltip&&this._appointmentTooltip.dispose(),null===(e=this._recurrenceDialog)||void 0===e||e.hide(Se),this.hideAppointmentPopup(),this.hideAppointmentTooltip(),this._asyncTemplatesTimers.forEach(clearTimeout),this._asyncTemplatesTimers=[],super._dispose()}_initActions(){this._actions={onAppointmentAdding:this._createActionByOption(fe),onAppointmentAdded:this._createActionByOption(me),onAppointmentUpdating:this._createActionByOption(ye),onAppointmentUpdated:this._createActionByOption(be),onAppointmentDeleting:this._createActionByOption(ve),onAppointmentDeleted:this._createActionByOption(Ce),onAppointmentFormOpening:this._createActionByOption("onAppointmentFormOpening"),onAppointmentTooltipShowing:this._createActionByOption("onAppointmentTooltipShowing")}}_getAppointmentRenderedAction(){return this._createActionByOption("onAppointmentRendered",{excludeValidators:["disabled","readOnly"]})}_renderFocusTarget(){return(0,_.noop)()}_renderAriaAttributes(){const e=a.default.format({agenda:"dxScheduler-switcherAgenda",day:"dxScheduler-switcherDay",month:"dxScheduler-switcherMonth",week:"dxScheduler-switcherWeek",workWeek:"dxScheduler-switcherWorkWeek",timelineDay:"dxScheduler-switcherTimelineDay",timelineMonth:"dxScheduler-switcherTimelineMonth",timelineWeek:"dxScheduler-switcherTimelineWeek",timelineWorkWeek:"dxScheduler-switcherTimelineWorkWeek"}[this.currentViewType]),t=a.default.format("dxScheduler-ariaLabel",e);this.setAria({label:t,role:"group"})}_initMarkup(){if(super._initMarkup(),this._renderMainContainer(),this._renderAriaAttributes(),this._renderHeader(),this._layoutManager=new F.default(this),this._appointments=this._createComponent("<div>",L.default,this._appointmentsConfig()),this._appointments.option("itemTemplate",this._getAppointmentTemplate("appointmentTemplate")),this._appointmentTooltip=new(this.option("adaptivityEnabled")?Q.MobileTooltipStrategy:X.DesktopTooltipStrategy)(this._getAppointmentTooltipOptions()),this._createAppointmentPopupForm(),this._isDataSourceLoaded()||this._isDataSourceLoading())this._initMarkupCore(this.option("loadedResources")),this._dataSourceChangedHandler(this._dataSource.items()),this._fireContentReadyAction();else{const e=this._getCurrentViewOption("groups");(0,Y.loadResources)(e,this.option("resources"),this.option("resourceLoaderMap")).done((e=>{this.option("loadedResources",e),this._initMarkupCore(e),this._reloadDataSource()}))}}_createAppointmentPopupForm(){var e,t;this._appointmentForm&&(null===(t=this._appointmentForm.form)||void 0===t||t.dispose());this._appointmentForm=this.createAppointmentForm(),null===(e=this._appointmentPopup)||void 0===e||e.dispose(),this._appointmentPopup=this.createAppointmentPopup(this._appointmentForm)}_renderMainContainer(){this._mainContainer=(0,c.default)("<div>").addClass("dx-scheduler-container"),this.$element().append(this._mainContainer)}createAppointmentForm(){const e={createResourceEditorModel:()=>(0,Y.createResourceEditorModel)(this.option("resources"),this.option("loadedResources")),getDataAccessors:()=>this._dataAccessors,createComponent:(e,t,i)=>this._createComponent(e,t,i),getEditingConfig:()=>this._editing,getFirstDayOfWeek:()=>this.option("firstDayOfWeek"),getStartDayHour:()=>this.option("startDayHour"),getCalculatedEndDate:e=>this._workSpace.calculateEndDate(e),getTimeZoneCalculator:()=>this.timeZoneCalculator};return new k.AppointmentForm(e)}createAppointmentPopup(e){const t={getElement:()=>this.$element(),createComponent:(e,t,i)=>this._createComponent(e,t,i),focus:()=>this.focus(),getResources:()=>this.option("resources"),getEditingConfig:()=>this._editing,getTimeZoneCalculator:()=>this.timeZoneCalculator,getDataAccessors:()=>this._dataAccessors,getAppointmentFormOpening:()=>this._actions.onAppointmentFormOpening,processActionResult:(e,t)=>this._processActionResult(e,t),addAppointment:e=>this.addAppointment(e),updateAppointment:(e,t)=>this.updateAppointment(e,t),updateScrollPosition:(e,t,i)=>{this._workSpace.updateScrollPosition(e,t,i)}};return new M.AppointmentPopup(t,e)}_getAppointmentTooltipOptions(){const e=this;return{createComponent:e._createComponent.bind(e),container:e.$element(),getScrollableContainer:e.getWorkSpaceScrollableContainer.bind(e),addDefaultTemplates:e._templateManager.addDefaultTemplates.bind(e._templateManager),getAppointmentTemplate:e._getAppointmentTemplate.bind(e),showAppointmentPopup:e.showAppointmentPopup.bind(e),checkAndDeleteAppointment:e.checkAndDeleteAppointment.bind(e),isAppointmentInAllDayPanel:e.isAppointmentInAllDayPanel.bind(e),createFormattedDateText:(e,t,i)=>this.fire("getTextAndFormatDate",e,t,i),getAppointmentDisabled:e=>(0,V.createAppointmentAdapter)(e,this._dataAccessors,this.timeZoneCalculator).disabled,onItemContextMenu:e._createActionByOption("onAppointmentContextMenu"),createEventArgs:e._createEventArgs.bind(e)}}_createEventArgs(e){const t={itemData:e.itemData.appointment,itemElement:e.itemElement,targetedAppointment:e.itemData.targetedAppointment};return(0,y.extend)({},this.fire("mapAppointmentFields",t),{component:e.component,element:e.element,event:e.event,model:e.model})}checkAndDeleteAppointment(e,t){const i=(0,V.createAppointmentAdapter)(t,this._dataAccessors,this.timeZoneCalculator),n=this.fireOnAppointmentDeleting(e,i);this._checkRecurringAppointment(e,t,i.startDate,(()=>{this.processDeleteAppointment(e,n)}),!0)}_getExtraAppointmentTooltipOptions(){return{rtlEnabled:this.option("rtlEnabled"),focusStateEnabled:this.option("focusStateEnabled"),editing:this.option("editing"),offset:this.option("_appointmentTooltipOffset")}}isAppointmentInAllDayPanel(e){const t=this._workSpace;return this.appointmentTakesAllDay(e)&&t.supportAllDayRow()&&t.option("showAllDayPanel")}_initMarkupCore(e){this._readyToRenderAppointments=(0,S.hasWindow)(),this._workSpace&&this._cleanWorkspace(),this._renderWorkSpace(e),this._appointments.option({fixedContainer:this._workSpace.getFixedContainer(),allDayContainer:this._workSpace.getAllDayContainer()}),this._waitAsyncTemplate((()=>{var e;return null===(e=this._workSpaceRecalculation)||void 0===e?void 0:e.resolve()})),this.createAppointmentDataProvider(),this._filterAppointmentsByDate(),this._validateKeyFieldIfAgendaExist()}_isDataSourceLoaded(){return this._dataSource&&this._dataSource.isLoaded()}_render(){var e;this._toggleSmallClass(),this._toggleAdaptiveClass(),null===(e=this.getWorkSpace())||void 0===e||e.updateHeaderEmptyCellWidth(),super._render()}_renderHeader(){if(0!==this.option("toolbar").length){const e=(0,c.default)("<div>").appendTo(this._mainContainer);this._header=this._createComponent(e,B.SchedulerHeader,this._headerConfig())}}_headerConfig(){const e=this._getCurrentViewOptions(),t=this._getViewCountConfig(),i=(0,y.extend)({firstDayOfWeek:this.getFirstDayOfWeek(),currentView:this.option("currentView"),isAdaptive:this.option("adaptivityEnabled"),tabIndex:this.option("tabIndex"),focusStateEnabled:this.option("focusStateEnabled"),rtlEnabled:this.option("rtlEnabled"),useDropDownViewSwitcher:this.option("useDropDownViewSwitcher"),customizeDateNavigatorText:this.option("customizeDateNavigatorText"),agendaDuration:e.agendaDuration||7},e);return i.intervalCount=t.intervalCount,i.views=this.option("views"),i.min=new Date(this._dateOption("min")),i.max=new Date(this._dateOption("max")),i.currentDate=m.default.trimTime(new Date(this._dateOption("currentDate"))),i.onCurrentViewChange=e=>{this.option("currentView",e)},i.onCurrentDateChange=e=>{this.option("currentDate",e)},i.items=this.option("toolbar"),i.startViewDate=this.getStartViewDate(),i.todayDate=()=>this.timeZoneCalculator.createDate(new Date,{path:"toGrid"}),i}_appointmentsConfig(){return{getResources:()=>this.option("resources"),getLoadedResources:()=>this.option("loadedResources"),getResourceDataAccessors:this.getResourceDataAccessors.bind(this),getAgendaResourceProcessor:()=>this.agendaResourceProcessor,getAppointmentColor:this.createGetAppointmentColor(),getAppointmentDataProvider:()=>this.appointmentDataProvider,dataAccessors:this._dataAccessors,observer:this,onItemRendered:this._getAppointmentRenderedAction(),onItemClick:this._createActionByOption("onAppointmentClick"),onItemContextMenu:this._createActionByOption("onAppointmentContextMenu"),onAppointmentDblClick:this._createActionByOption("onAppointmentDblClick"),tabIndex:this.option("tabIndex"),focusStateEnabled:this.option("focusStateEnabled"),allowDrag:this._allowDragging(),allowDelete:this._editing.allowUpdating&&this._editing.allowDeleting,allowResize:this._allowResizing(),allowAllDayResize:this._allowAllDayResizing(),rtlEnabled:this.option("rtlEnabled"),currentView:this.currentView,groups:this._getCurrentViewOption("groups"),timeZoneCalculator:this.timeZoneCalculator,getResizableStep:()=>this._workSpace?this._workSpace.positionHelper.getResizableStep():0,getDOMElementsMetaData:()=>{var e;return null===(e=this._workSpace)||void 0===e?void 0:e.getDOMElementsMetaData()},getViewDataProvider:()=>{var e;return null===(e=this._workSpace)||void 0===e?void 0:e.viewDataProvider},isVerticalViewDirection:()=>"vertical"===this.getRenderingStrategyInstance().getDirection(),isVerticalGroupedWorkSpace:()=>this._workSpace._isVerticalGroupedWorkSpace(),isDateAndTimeView:()=>(0,P.isDateAndTimeView)(this._workSpace.type),onContentReady:()=>{var e;null===(e=this._workSpace)||void 0===e||e.option("allDayExpanded",this._isAllDayExpanded())}}}getCollectorOffset(){return this._workSpace.needApplyCollectorOffset()&&!this.option("adaptivityEnabled")?this.option("_collectorOffset"):0}getAppointmentDurationInMinutes(){return this._getCurrentViewOption("cellDuration")}_getCurrentViewType(){return this.currentViewType}_renderWorkSpace(e){var t;this._readyToRenderAppointments&&this._toggleSmallClass();const i=(0,c.default)("<div>").appendTo(this._mainContainer),n=this._getViewCountConfig(),o=_e[this._getCurrentViewType()].workSpace,a=this._workSpaceConfig(e,n);this._workSpace=this._createComponent(i,o,a),this._allowDragging()&&this._workSpace.initDragBehavior(this,this._all),this._workSpace._attachTablesEvents(),this._workSpace.getWorkArea().append(this._appointments.$element()),this._recalculateWorkspace(),n.startDate&&(null===(t=this._header)||void 0===t||t.option("currentDate",this._workSpace._getHeaderDate())),this._appointments.option("_collectorOffset",this.getCollectorOffset())}_getViewCountConfig(){const e=this.option("currentView"),t=this._getViewByName(e);return{intervalCount:t&&t.intervalCount||1,startDate:t&&t.startDate||null}}_getViewByName(e){const t=this.option("views");for(let i=0;i<t.length;i++)if(t[i].name===e||t[i].type===e||t[i]===e)return t[i]}_recalculateWorkspace(){this._workSpaceRecalculation=new C.Deferred,this._waitAsyncTemplate((()=>{(0,n.triggerResizeEvent)(this._workSpace.$element()),this._workSpace.renderCurrentDateTimeLineAndShader()}))}_workSpaceConfig(e,t){var i;const n=this._getCurrentViewOptions(),o=this.option("scrolling"),a="virtual"===o.mode||"virtual"===(null===(i=n.scrolling)||void 0===i?void 0:i.mode),s=a&&(!(0,w.isDefined)(o.orientation)||["horizontal","both"].filter((e=>{var t;return o.orientation===e||(null===(t=n.scrolling)||void 0===t?void 0:t.orientation)===e})).length>0),r=this.option("crossScrollingEnabled")||s||(0,P.isTimelineView)(this.currentViewType),l=(0,y.extend)({resources:this.option("resources"),loadedResources:this.option("loadedResources"),getFilteredItems:()=>this.filteredItems,getResourceDataAccessors:this.getResourceDataAccessors.bind(this),noDataText:this.option("noDataText"),firstDayOfWeek:this.option("firstDayOfWeek"),startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour"),viewOffset:this.getViewOffsetMs(),tabIndex:this.option("tabIndex"),accessKey:this.option("accessKey"),focusStateEnabled:this.option("focusStateEnabled"),cellDuration:this.option("cellDuration"),showAllDayPanel:this.option("showAllDayPanel"),showCurrentTimeIndicator:this.option("showCurrentTimeIndicator"),indicatorTime:this.option("indicatorTime"),indicatorUpdateInterval:this.option("indicatorUpdateInterval"),shadeUntilCurrentTime:this.option("shadeUntilCurrentTime"),allDayExpanded:this._appointments.option("items"),crossScrollingEnabled:r,dataCellTemplate:this.option("dataCellTemplate"),timeCellTemplate:this.option("timeCellTemplate"),resourceCellTemplate:this.option("resourceCellTemplate"),dateCellTemplate:this.option("dateCellTemplate"),allowMultipleCellSelection:this.option("allowMultipleCellSelection"),selectedCellData:this.option("selectedCellData"),onSelectionChanged:e=>{this.option("selectedCellData",e.selectedCellData)},groupByDate:this._getCurrentViewOption("groupByDate"),scrolling:o,draggingMode:this.option("_draggingMode"),timeZoneCalculator:this.timeZoneCalculator,schedulerHeight:this.option("height"),schedulerWidth:this.option("width"),allDayPanelMode:this.option("allDayPanelMode"),onSelectedCellsClick:this.showAddAppointmentPopup.bind(this),onRenderAppointments:this._renderAppointments.bind(this),onShowAllDayPanel:e=>this.option("showAllDayPanel",e),getHeaderHeight:()=>U.utils.DOM.getHeaderHeight(this._header),onScrollEnd:()=>this._appointments.updateResizableArea(),renovateRender:this._isRenovatedRender(a)},n);return l.observer=this,l.intervalCount=t.intervalCount,l.startDate=t.startDate,l.groups=e,l.onCellClick=this._createActionByOption("onCellClick"),l.onCellContextMenu=this._createActionByOption("onCellContextMenu"),l.currentDate=m.default.trimTime(new Date(this._dateOption("currentDate"))),l.hoursInterval=l.cellDuration/60,l.allDayExpanded=!1,l.dataCellTemplate=l.dataCellTemplate?this._getTemplate(l.dataCellTemplate):null,l.timeCellTemplate=l.timeCellTemplate?this._getTemplate(l.timeCellTemplate):null,l.resourceCellTemplate=l.resourceCellTemplate?this._getTemplate(l.resourceCellTemplate):null,l.dateCellTemplate=l.dateCellTemplate?this._getTemplate(l.dateCellTemplate):null,l.getAppointmentDataProvider=()=>this.appointmentDataProvider,l}_isRenovatedRender(e){return this.option("renovateRender")&&(0,S.hasWindow)()||e}_waitAsyncTemplate(e){if(this._options.silent("templatesRenderAsynchronously")){const t=setTimeout((()=>{e(),clearTimeout(t)}));this._asyncTemplatesTimers.push(t)}else e()}_getCurrentViewOptions(){return this.currentView}_getCurrentViewOption(e){return this.currentView&&void 0!==this.currentView[e]?this.currentView[e]:this.option(e)}_getAppointmentTemplate(e){const t=this._getCurrentViewOptions();return t&&t[e]?this._getTemplate(t[e]):this._getTemplateByOption(e)}_updateOption(e,t,i){const n=this._getCurrentViewOptions();n&&(0,w.isDefined)(n[t])||this[`_${e}`].option(t,i)}_refreshWorkSpace(e){this._cleanWorkspace(),delete this._workSpace,this._renderWorkSpace(e),this._readyToRenderAppointments&&(this._appointments.option({fixedContainer:this._workSpace.getFixedContainer(),allDayContainer:this._workSpace.getAllDayContainer()}),this._waitAsyncTemplate((()=>this._workSpaceRecalculation.resolve())))}_cleanWorkspace(){this._appointments.$element().detach(),this._workSpace._dispose(),this._workSpace.$element().remove(),this.option("selectedCellData",[])}getWorkSpaceScrollable(){return this._workSpace.getScrollable()}getWorkSpaceScrollableContainer(){return this._workSpace.getScrollableContainer()}getWorkSpace(){return this._workSpace}getHeader(){return this._header}_cleanPopup(){var e;null===(e=this._appointmentPopup)||void 0===e||e.dispose()}_checkRecurringAppointment(e,t,i,n,o,a,s,r){const l=W.ExpressionUtils.getField(this._dataAccessors,"recurrenceRule",e);if(!(0,G.getRecurrenceProcessor)().evalRecurrenceRule(l).isValid||!this._editing.allowUpdating)return void n();switch(r||this.option("recurrenceEditMode")){case"series":n();break;case"occurrence":this._excludeAppointmentFromSeries(e,t,i,o,a,s);break;default:s&&(s.cancel=new C.Deferred),this._showRecurrenceChangeConfirm(o).done((r=>{r===xe&&n(),r===we&&this._excludeAppointmentFromSeries(e,t,i,o,a,s)})).fail((()=>this._appointments.moveAppointmentBack(s)))}}_excludeAppointmentFromSeries(e,t,i,n,o,a){const s=(0,P.excludeFromRecurrence)(e,i,this._dataAccessors,this._timeZoneCalculator),r=de({},t);delete r[this._dataAccessors.expr.recurrenceExceptionExpr],delete r[this._dataAccessors.expr.recurrenceRuleExpr];delete r[this.appointmentDataProvider.keyName];!n&&!o&&this.addAppointment(r),o?(this._appointmentPopup.show(r,{isToolbarVisible:!0,action:M.ACTION_TO_APPOINTMENT.EXCLUDE_FROM_SERIES,excludeInfo:{sourceAppointment:e,updatedAppointment:s.source()}}),this._editAppointmentData=e):this._updateAppointment(e,s.source(),(()=>{this._appointments.moveAppointmentBack(a)}),a)}_createRecurrenceException(e,t){const i=[];return e.recurrenceException&&i.push(e.recurrenceException),i.push(this._getSerializedDate(t,e.startDate,e.allDay)),i.join()}_getSerializedDate(e,t,i){return i&&e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),v.default.serializeDate(e,"yyyyMMddTHHmmssZ")}_showRecurrenceChangeConfirm(e){const t=a.default.format(e?"dxScheduler-confirmRecurrenceDeleteTitle":"dxScheduler-confirmRecurrenceEditTitle"),i=a.default.format(e?"dxScheduler-confirmRecurrenceDeleteMessage":"dxScheduler-confirmRecurrenceEditMessage"),n=a.default.format(e?"dxScheduler-confirmRecurrenceDeleteSeries":"dxScheduler-confirmRecurrenceEditSeries"),o=a.default.format(e?"dxScheduler-confirmRecurrenceDeleteOccurrence":"dxScheduler-confirmRecurrenceEditOccurrence");return this._recurrenceDialog=(0,D.custom)({title:t,messageHtml:i,showCloseButton:!0,showTitle:!0,buttons:[{text:n,onClick:()=>xe},{text:o,onClick:()=>we}],popupOptions:{wrapperAttr:{class:"dx-dialog"}}}),this._recurrenceDialog.show()}_getUpdatedData(e){const t=this.getViewOffsetMs(),i=e=>{if(!e)return;const i=this.timeZoneCalculator.createDate(e,{path:"fromGrid"});return A.dateUtilsTs.addOffsets(i,[-t])},n=e=>!isNaN(new Date(e).getTime()),o=this.getTargetCellData(),a=(0,V.createAppointmentAdapter)(e,this._dataAccessors,this.timeZoneCalculator),s=i(o.startDate),r=i(o.endDate);let l=new Date(a.startDate);l=A.dateUtilsTs.addOffsets(l,[-t]);let d=new Date(a.endDate);d=A.dateUtilsTs.addOffsets(d,[-t]);let u=s??l;n(l)||(l=u),n(d)||(d=r);const c=d.getTime()-l.getTime();if(this._workSpace.keepOriginalHours()&&n(a.startDate)&&n(s)){const e=this.timeZoneCalculator.createDate(l,{path:"toGrid"}),i=e.getTime()-m.default.trimTime(e).getTime(),n=A.dateUtilsTs.addOffsets(o.startDate,[-t]);u=new Date(m.default.trimTime(n).getTime()+i),u=this.timeZoneCalculator.createDate(u,{path:"fromGrid"})}const h=(0,V.createAppointmentAdapter)({},this._dataAccessors,this.timeZoneCalculator);void 0!==o.allDay&&(h.allDay=o.allDay),h.startDate=u;let p=new Date(u.getTime()+c);if(this.appointmentTakesAllDay(e)&&!h.allDay&&this._workSpace.supportAllDayRow()&&(p=this._workSpace.calculateEndDate(u)),a.allDay&&!this._workSpace.supportAllDayRow()&&!this._workSpace.keepOriginalHours()){const e=new Date(u);e.setHours(0),p=new Date(e.getTime()+c),0!==p.getHours()&&p.setHours(this._getCurrentViewOption("endDayHour"))}h.startDate=A.dateUtilsTs.addOffsets(h.startDate,[t]),h.endDate=A.dateUtilsTs.addOffsets(p,[t]);const g=h.source();return(0,Y.setResourceToAppointment)(this.option("resources"),this.getResourceDataAccessors(),g,o.groups),g}getTargetedAppointment(e,t){const i=U.utils.dataAccessors.getAppointmentSettings(t),n=U.utils.dataAccessors.getAppointmentInfo(t),o=(0,c.default)(t).data(this._appointments._itemIndexKey()),a=(0,V.createAppointmentAdapter)(e,this._dataAccessors,this.timeZoneCalculator),s=a.clone();if(this._isAgenda()&&a.isRecurrent){const{agendaSettings:e}=i;s.startDate=W.ExpressionUtils.getField(this._dataAccessors,"startDate",e),s.endDate=W.ExpressionUtils.getField(this._dataAccessors,"endDate",e)}else i&&(s.startDate=n?n.sourceAppointment.startDate:a.startDate,s.endDate=n?n.sourceAppointment.endDate:a.endDate);const r=s.source();return t&&this.setTargetedAppointmentResources(r,t,o),n&&(r.displayStartDate=new Date(n.appointment.startDate),r.displayEndDate=new Date(n.appointment.endDate)),r}subscribe(e,t){this._subscribes[e]=j.default[e]=t}fire(e){const t=this._subscribes[e],i=Array.prototype.slice.call(arguments);if(!(0,w.isFunction)(t))throw E.default.Error("E1031",e);return t.apply(this,i.slice(1))}getTargetCellData(){return this._workSpace.getDataByDroppableCell()}_updateAppointment(e,t,i,n){const o={newData:t,oldData:(0,y.extend)({},e),cancel:!1},a=function(e){if(i&&i.call(this),e&&"Error"===e.name)throw e}.bind(this);return this._actions[ye](o),n&&!(0,w.isDeferred)(n.cancel)&&(n.cancel=new C.Deferred),this._processActionResult(o,(function(i){let o=new C.Deferred;if(i)a(),o.resolve();else{this._expandAllDayPanel(t);try{o=this.appointmentDataProvider.update(e,t).done((()=>{n&&n.cancel.resolve(!1)})).always((e=>this._onDataPromiseCompleted(be,e))).fail((()=>a()))}catch(e){a(e),o.resolve()}}return o.promise()}))}_processActionResult(e,t){const i=new C.Deferred,n=e=>{(0,C.when)((0,C.fromPromise)(e)).always(i.resolve)};return(0,w.isPromise)(e.cancel)?(0,C.when)((0,C.fromPromise)(e.cancel)).always((i=>{(0,w.isDefined)(i)||(i="rejected"===e.cancel.state()),n(t.call(this,i))})):n(t.call(this,e.cancel)),i.promise()}_expandAllDayPanel(e){!this._isAllDayExpanded()&&this.appointmentTakesAllDay(e)&&this._workSpace.option("allDayExpanded",!0)}_onDataPromiseCompleted(e,t,i){const n={appointmentData:i||t};t instanceof Error?n.error=t:this._appointmentPopup.visible&&this._appointmentPopup.hide(),this._actions[e](n),this._fireContentReadyAction()}getAppointmentsInstance(){return this._appointments}getLayoutManager(){return this._layoutManager}getRenderingStrategyInstance(){return this.getLayoutManager().getRenderingStrategyInstance()}getActions(){return this._actions}appointmentTakesAllDay(e){const t=(0,V.createAppointmentAdapter)(e,this._dataAccessors,this.timeZoneCalculator);return(0,P.getAppointmentTakesAllDay)(t,this._getCurrentViewOption("allDayPanelMode"))}dayHasAppointment(e,t,i){const n=e=>this.timeZoneCalculator.createDate(e,{path:"toGrid"}),o=(0,V.createAppointmentAdapter)(t,this._dataAccessors,this.timeZoneCalculator);let a=new Date(o.startDate),s=new Date(o.endDate);if(a=n(a),s=n(s),e.getTime()===s.getTime())return a.getTime()===s.getTime();i&&(e=m.default.trimTime(e),a=m.default.trimTime(a),s=m.default.trimTime(s));const r=e.getTime(),l=a.getTime(),d=s.getTime();return l<=r&&r<=d}setTargetedAppointmentResources(e,t,i){const n=this._getCurrentViewOption("groups");if(null!=n&&n.length){const n=this.getResourceDataAccessors().setter,o=this._workSpace;let a,s;this._isAgenda()?(a=function(){const e=this.getLayoutManager()._positionMap[i];return(0,Y.getCellGroups)(e[0].groupIndex,this.getWorkSpace().option("groups"))},s=function(t,i){n[i.name](e,i.id)}):(a=function(){const e=U.utils.dataAccessors.getAppointmentSettings(t)||{};return o.getCellDataByCoordinates({left:e.left,top:e.top}).groups},s=function(t,i){n[t](e,i)}),(0,b.each)(a.call(this),s)}}getStartViewDate(){var e;return null===(e=this._workSpace)||void 0===e?void 0:e.getStartViewDate()}getEndViewDate(){return this._workSpace.getEndViewDate()}showAddAppointmentPopup(e,t){const i=(0,V.createAppointmentAdapter)({},this._dataAccessors,this.timeZoneCalculator);i.allDay=e.allDay,i.startDate=this.timeZoneCalculator.createDate(e.startDate,{path:"fromGrid"}),i.endDate=this.timeZoneCalculator.createDate(e.endDate,{path:"fromGrid"});const n=(0,y.extend)(i.source(),t);this.showAppointmentPopup(n,!0)}showAppointmentPopup(e,t,i){const n=de({},i);n&&(delete n.displayStartDate,delete n.displayEndDate);const o=(0,V.createAppointmentAdapter)(n||e,this._dataAccessors,this.timeZoneCalculator),a=(0,y.extend)({},e,n),s=t??(0,w.isEmptyObject)(e);(0,w.isEmptyObject)(e)&&(e=this.createPopupAppointment()),s?(delete this._editAppointmentData,this._editing.allowAdding&&this._appointmentPopup.show(e,{isToolbarVisible:!0,action:M.ACTION_TO_APPOINTMENT.CREATE})):this._checkRecurringAppointment(e,a,o.startDate,(()=>{this._editAppointmentData=e,this._appointmentPopup.show(e,{isToolbarVisible:this._editing.allowUpdating,action:M.ACTION_TO_APPOINTMENT.UPDATE})}),!1,!0)}createPopupAppointment(){const e={},t=m.default.dateToMilliseconds,i=new Date(this.option("currentDate")),n=new Date(i.getTime()+this.option("cellDuration")*t("minute"));return W.ExpressionUtils.setField(this._dataAccessors,"startDate",e,i),W.ExpressionUtils.setField(this._dataAccessors,"endDate",e,n),e}hideAppointmentPopup(e){var t;null!==(t=this._appointmentPopup)&&void 0!==t&&t.visible&&(e&&this._appointmentPopup.saveChangesAsync(),this._appointmentPopup.hide())}showAppointmentTooltip(e,t,i){if(e){const n=U.utils.dataAccessors.getAppointmentSettings(t),o={itemData:i||e,groupIndex:null==n?void 0:n.groupIndex,groups:this.option("groups")},a=this.createGetAppointmentColor()(o),s=new z.AppointmentTooltipInfo(e,i,a);this.showAppointmentTooltipCore(t,[s])}}createGetAppointmentColor(){return e=>{const t={resources:this.option("resources"),dataAccessors:this.getResourceDataAccessors(),loadedResources:this.option("loadedResources"),resourceLoaderMap:this.option("resourceLoaderMap")};return(0,Y.getAppointmentColor)(t,e)}}showAppointmentTooltipCore(e,t,i){const n={cancel:!1,appointments:t.map((e=>{const t={appointmentData:e.appointment,currentAppointmentData:de({},e.targetedAppointment),color:e.color};if(e.settings.info){const{startDate:i,endDate:n}=e.settings.info.appointment;t.currentAppointmentData.displayStartDate=i,t.currentAppointmentData.displayEndDate=n}return t})),targetElement:(0,u.getPublicElement)(e)};this._createActionByOption("onAppointmentTooltipShowing")(n),this._appointmentTooltip.isAlreadyShown(e)?this.hideAppointmentTooltip():this._processActionResult(n,(n=>{!n&&this._appointmentTooltip.show(e,t,de({},this._getExtraAppointmentTooltipOptions(),i))}))}hideAppointmentTooltip(){this._appointmentTooltip&&this._appointmentTooltip.hide()}scrollToTime(e,t,i){E.default.log("W0002","dxScheduler","scrollToTime","21.1",'Use the "scrollTo" method instead'),this._workSpace.scrollToTime(e,t,i)}scrollTo(e,t,i){this._workSpace.scrollTo(e,t,i)}_isHorizontalVirtualScrolling(){const e=this.option("scrolling"),{orientation:t,mode:i}=e;return"virtual"===i&&("horizontal"===t||"both"===t)}addAppointment(e){const t=(0,V.createAppointmentAdapter)(e,this._dataAccessors,this.timeZoneCalculator);t.text=t.text||"";const i=t.source(!0),n={appointmentData:i,cancel:!1};return this._actions[fe](n),this._processActionResult(n,(e=>e?(new C.Deferred).resolve():(this._expandAllDayPanel(i),this.appointmentDataProvider.add(i).always((e=>this._onDataPromiseCompleted(me,e))))))}updateAppointment(e,t){return this._updateAppointment(e,t)}deleteAppointment(e){const t=this.fireOnAppointmentDeleting(e);this.processDeleteAppointment(e,t)}fireOnAppointmentDeleting(e,t){const i={appointmentData:e,targetedAppointmentData:t,cancel:!1};return this._actions[ve](i),i}processDeleteAppointment(e,t){this._processActionResult(t,(function(t){t||this.appointmentDataProvider.remove(e).always((t=>this._onDataPromiseCompleted(Ce,t,e)))}))}deleteRecurrence(e,t,i){"string"==typeof t&&(t=new Date(t)),this._checkRecurringAppointment(e,{},t,(()=>{this.processDeleteAppointment(e,{cancel:!1})}),!0,!1,null,i)}focus(){this._editAppointmentData?this._appointments.focus():this._workSpace.focus()}getFirstDayOfWeek(){return(0,w.isDefined)(this.option("firstDayOfWeek"))?this.option("firstDayOfWeek"):o.default.firstDayOfWeekIndex()}_validateKeyFieldIfAgendaExist(){if(!this.appointmentDataProvider.isDataSourceInit)return;const e=!!this._getViewByName("agenda"),t=!!this.appointmentDataProvider.keyName;e&&!t&&E.default.log("W1023")}_getDragBehavior(){return this._workSpace.dragBehavior}getViewOffsetMs(){const e=this._getCurrentViewOption("offset");return this.normalizeViewOffsetValue(e)}normalizeViewOffsetValue(e){return(0,w.isDefined)(e)&&this.currentViewType!==N.VIEWS.AGENDA?e*ue("minute"):0}validateOptions(){const e=de({},this.option(),{startDayHour:this._getCurrentViewOption("startDayHour"),endDayHour:this._getCurrentViewOption("endDayHour"),offset:this._getCurrentViewOption("offset"),cellDuration:this._getCurrentViewOption("cellDuration")}),t=this._optionsValidator.validate(e);this._optionsValidatorErrorHandler.handleValidationResult(t)}}De.include(s.default),(0,r.default)("dxScheduler",De);t.default=De},58713:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(64553)),o=h(i(41380)),a=i(52576),s=i(21274),r=i(11528),l=i(9680),d=i(66823),u=i(80126),c=i(5327);function h(e){return e&&e.__esModule?e:{default:e}}const p=o.default.dateToMilliseconds,g={isCurrentViewAgenda(){return"agenda"===this.currentViewType},currentViewUpdated(e){this.option("currentView",e)},currentDateUpdated(e){this.option("currentDate",e)},getOption(e){return this.option(e)},getWorkspaceOption(e){return this.getWorkSpace().option(e)},isVirtualScrolling(){return this.isVirtualScrolling()},setCellDataCacheAlias(e,t){this._workSpace.setCellDataCacheAlias(e,t)},isGroupedByDate(){return this.getWorkSpace().isGroupedByDate()},showAppointmentTooltip(e){const t=this.getTargetedAppointment(e.data,e.target);this.showAppointmentTooltip(e.data,e.target,t)},hideAppointmentTooltip(){this.hideAppointmentTooltip()},showEditAppointmentPopup(e){const t=this.getTargetedAppointment(e.data,e.target);this.showAppointmentPopup(e.data,!1,t)},updateAppointmentAfterResize(e){const t=c.utils.dataAccessors.getAppointmentInfo(e.$appointment),{exceptionDate:i}=t.sourceAppointment;this._checkRecurringAppointment(e.target,e.data,i,(()=>{this._updateAppointment(e.target,e.data,(function(){this._appointments.moveAppointmentBack()}))}))},getUpdatedData(e){return this._getUpdatedData(e)},updateAppointmentAfterDrag(e){let{event:t,element:i,rawAppointment:n,newCellIndex:o,oldCellIndex:s}=e;const r=c.utils.dataAccessors.getAppointmentInfo(i),l=(0,d.createAppointmentAdapter)(n,this._dataAccessors,this.timeZoneCalculator),u=(0,d.createAppointmentAdapter)((0,a.extend)({},n,this._getUpdatedData(n)),this._dataAccessors,this.timeZoneCalculator),h=u.source(),p=u.allDay,g=l.allDay,_=this._workSpace.supportAllDayRow()&&(g&&!p||!g&&p),f=t.fromComponent!==t.toComponent;-1!==o?o!==s||f||_?this._checkRecurringAppointment(n,h,r.sourceAppointment.exceptionDate,(()=>{this._updateAppointment(n,h,(function(){this._appointments.moveAppointmentBack(t)}),t)}),void 0,void 0,t):this._appointments.moveAppointmentBack(t):f||this._appointments.moveAppointmentBack(t)},onDeleteButtonPress(e){const t=this.getTargetedAppointment(e.data,(0,n.default)(e.target));this.checkAndDeleteAppointment(e.data,t),this.hideAppointmentTooltip()},getTextAndFormatDate(e,t,i){const n=(0,d.createAppointmentAdapter)(e,this._dataAccessors,this.timeZoneCalculator),o=(0,d.createAppointmentAdapter)(t||e,this._dataAccessors,this.timeZoneCalculator),a=this.timeZoneCalculator.createDate(o.startDate,{path:"toGrid"}),s=this.timeZoneCalculator.createDate(o.endDate,{path:"toGrid"}),r=i||(0,l.getFormatType)(a,s,o.allDay,"month"!==this.currentViewType);return{text:o.text||n.text,formatDate:(0,l.formatDates)(a,s,r)}},_createAppointmentTitle:e=>(0,r.isPlainObject)(e)?e.text:String(e),getResizableAppointmentArea(e){const{allDay:t}=e,i=this._getCurrentViewOption("groups");if(i&&i.length){if(t||this.getLayoutManager().getRenderingStrategyInstance()._needHorizontalGroupBounds()){const t=this._workSpace.getGroupBounds(e.coordinates);return{left:t.left,right:t.right,top:0,bottom:0}}if(this.getLayoutManager().getRenderingStrategyInstance()._needVerticalGroupBounds(t)&&this._workSpace._isVerticalGroupedWorkSpace()){const t=this._workSpace.getGroupBounds(e.coordinates);return{left:0,right:0,top:t.top,bottom:t.bottom}}}},needRecalculateResizableArea(){return this.getWorkSpace().needRecalculateResizableArea()},getAppointmentGeometry(e){return this.getLayoutManager().getRenderingStrategyInstance().getAppointmentGeometry(e)},isAllDay(e){return this.getLayoutManager().getRenderingStrategyInstance().isAllDay(e)},getDeltaTime(e,t,i){return this.getLayoutManager().getRenderingStrategyInstance().getDeltaTime(e,t,i)},getDropDownAppointmentWidth(e){return this.getLayoutManager().getRenderingStrategyInstance().getDropDownAppointmentWidth(this._getViewCountConfig().intervalCount,e)},getDropDownAppointmentHeight(){return this.getLayoutManager().getRenderingStrategyInstance().getDropDownAppointmentHeight()},getCellWidth(){return this.getWorkSpace().getCellWidth()},getCellHeight(){return this.getWorkSpace().getCellHeight()},getMaxAppointmentCountPerCellByType(e){return this.getRenderingStrategyInstance()._getMaxAppointmentCountPerCellByType(e)},needCorrectAppointmentDates(){return this.getRenderingStrategyInstance().needCorrectAppointmentDates()},getRenderingStrategyDirection(){return this.getRenderingStrategyInstance().getDirection()},updateAppointmentEndDate(e){const{endDate:t}=e,i=this._getCurrentViewOption("endDayHour"),n=this._getCurrentViewOption("startDayHour");let o=t;return t.getHours()>=i?o.setHours(i,0,0,0):!e.isSameDate&&n>0&&60*t.getHours()+t.getMinutes()<60*n&&(o=new Date(o.getTime()-p("day")),o.setHours(i,0,0,0)),o},renderCompactAppointments(e){this._compactAppointmentsHelper.render(e)},clearCompactAppointments(){this._compactAppointmentsHelper.clear()},supportCompactDropDownAppointments(){return this.getLayoutManager().getRenderingStrategyInstance().supportCompactDropDownAppointments()},getGroupCount(){return this._workSpace._getGroupCount()},mapAppointmentFields(e){const{itemData:t,itemElement:i,targetedAppointment:n}=e,o=n||this.getTargetedAppointment(t,i);return{appointmentData:e.itemData,appointmentElement:e.itemElement,targetedAppointmentData:o}},dayHasAppointment(e,t,i){return this.dayHasAppointment(e,t,i)},getLayoutManager(){return this._layoutManager},getAgendaVerticalStepHeight(){return this.getWorkSpace().getAgendaVerticalStepHeight()},getAgendaDuration(){return this._getCurrentViewOption("agendaDuration")},getStartViewDate(){return this.getStartViewDate()},getEndViewDate(){return this.getEndViewDate()},forceMaxAppointmentPerCell(){return this.forceMaxAppointmentPerCell()},onAgendaReady(e){const t=this.getAppointmentsInstance()._itemElements();let i=0;const n=function(e,n){const o=n+i-1;t.eq(o).addClass(u.AGENDA_LAST_IN_DATE_APPOINTMENT_CLASS),i+=n};for(let t=0;t<e.length;t++)(0,s.each)(e[t],n)},getTimezone(){return this._getTimezoneOffsetByOption()},getTargetedAppointmentData(e,t){return this.getTargetedAppointment(e,t)},getEndDayHour(){return this._workSpace.option("endDayHour")||this.option("endDayHour")},getStartDayHour(){return this._workSpace.option("startDayHour")||this.option("startDayHour")},getViewOffsetMs(){return this.getViewOffsetMs()},isAdaptive(){return this.option("adaptivityEnabled")},removeDroppableCellClass(){this._workSpace.removeDroppableCellClass()}};t.default=g},92201:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(64960)),o=i(61404),a=i(74663),s=l(i(64553)),r=i(11528);function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}const u="tr";t.default={tableCreator:new class{constructor(){this.VERTICAL="vertical",this.HORIZONTAL="horizontal"}insertAllDayRow(e,t,i){if(e[i]){let o=e[i].find(u);o.length||(o=(0,s.default)(n.default.createElement(u)),o.append(e[i].get(0))),t.appendChild(o.get?o.get(0):o)}}makeTable(e){const t=n.default.createElement("tbody"),i=[];let l;const c=e.groupCount?e.rowCount/e.groupCount:e.rowCount;let h=0;const{allDayElements:p}=e,{groupIndex:g}=e,{rowCount:_}=e;(0,s.default)(e.container).append(t),p&&(this.insertAllDayRow(p,t,0),h++);for(let m=0;m<_;m++){l=n.default.createElement(u),t.appendChild(l);const _=(m+1)%c==0;e.rowClass&&(l.className=e.rowClass);for(let t=0;t<e.cellCount;t++){var f;const u=n.default.createElement("td");let c,h,p;if(l.appendChild(u),e.cellClass&&((0,r.isFunction)(e.cellClass)?u.className=e.cellClass(m,t):u.className=e.cellClass),e.getCellData&&(c=e.getCellData(u,m,t,g),h=c.key,p=c.value,h&&(0,a.data)(u,h,p)),null===(f=e.setAdditionalClasses)||void 0===f||f.call(e,(0,s.default)(u),p),e.cellTemplate&&e.cellTemplate.render){const n=e.getTemplateData?e.getTemplateData(m):{},a={model:d({text:e.getCellText?e.getCellText(m,t):"",date:e.getCellDate?e.getCellDate(m):void 0},n),container:(0,o.getPublicElement)((0,s.default)(u)),index:m*e.cellCount+t};p&&(p.startDate&&(a.model.startDate=p.startDate),p.endDate&&(a.model.endDate=p.endDate),p.groups&&(a.model.groups=p.groups),p.allDay&&(a.model.allDay=p.allDay)),i.push(e.cellTemplate.render.bind(e.cellTemplate,a))}else e.getCellText&&(0,s.default)("<div>").text(e.getCellText(m,t)).addClass(e.getCellTextClass).appendTo((0,s.default)(u))}p&&_&&(this.insertAllDayRow(p,t,h),h++)}return i}makeGroupedTable(e,t,i,n,o,a,s){let r=[];return r=e===this.VERTICAL?this._makeVerticalGroupedRows(t,i,o,a):this._makeHorizontalGroupedRows(t,i,n,o,s),r}makeGroupedTableFromJSON(e,t,i){let o;const a=[];let s=0;const r=(i=i||{}).cellTag||"td",l=i.childrenField||"children",d=i.titleField||"title",{groupTableClass:c}=i,{groupRowClass:h}=i,{groupCellClass:p}=i,{groupCellCustomContent:g}=i;function _(e,t,i,o){const a={element:n.default.createElement(r),childCount:t};p&&(a.element.className=p);const s=n.default.createTextNode(e);return"function"==typeof g?g(a.element,s,i,o):a.element.appendChild(s),a}return o=n.default.createElement("table"),c&&(o.className=c),function e(t){for(let n=0;n<t.length;n++){const o=(i=t[n])[l]?i[l].length:0,r=_(t[n][d],o,n,t[n]);a[s]||(a[s]=[]),a[s].push(r),o?e(t[n][l]):s++}var i}(t),a.forEach((e=>{const t=n.default.createElement(u);h&&(t.className=h);const i=[];for(let t=e.length-1;t>=0;t--){const n=e[t+1];let o=e[t].childCount;n&&n.childCount&&(o*=n.childCount),i.push(o)}i.reverse(),e.forEach(((e,n)=>{i[n]&&e.element.setAttribute("rowSpan",i[n]),t.appendChild(e.element)})),o.appendChild(t)})),o}_makeFlexGroupedRowCells(e,t,i,n){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;const l=[],{items:d}=e,u=d.length;for(let c=0;c<t*a;c++)for(let t=0;t<u;t++){let a=(0,s.default)("<div>");const h={};if(n&&n.render){const i={model:d[t],container:(0,o.getPublicElement)(a),index:c*u+t};e.data&&(i.model.data=e.data[t]),h.template=n.render.bind(n,i)}else a.text(d[t].text).attr("title",d[t].text).addClass("dx-scheduler-group-header-content"),a=(0,s.default)("<div>").append(a);const p=(0,r.isFunction)(i.groupHeaderClass)?i.groupHeaderClass(t):i.groupHeaderClass;h.element=a.addClass(p),l.push(h)}return l}_makeVerticalGroupedRows(e,t,i,n){const o=[];let a=1;const r=[],l=function(e){e.template&&o.push(e.template)};for(let n=0;n<e.length;n++){n>0&&(a=e[n-1].items.length*a);const o=this._makeFlexGroupedRowCells(e[n],a,t,i);o.forEach(l),r.push(o)}const d=[],u=r.length;for(let e=0;e<u;e++)d.push((0,s.default)("<div>").addClass(t.groupHeaderRowClass));for(let e=u-1;e>=0;e--){const t=r[e].length;for(let i=0;i<t;i++)d[e].append(r[e][i].element)}return{elements:(0,s.default)("<div>").addClass("dx-scheduler-group-flex-container").append(d),cellTemplates:o}}_makeHorizontalGroupedRows(e,t,i,n,o){let a=1;const r=e.length,l=[],d=[],u=o?i:1,c=function(e){return e.template&&d.push(e.template),e.element};for(let i=0;i<r;i++){i>0&&(a=e[i-1].items.length*a);const o=this._makeGroupedRowCells(e[i],a,t,n,u);l.push((0,s.default)("<tr>").addClass(t.groupRowClass).append(o.map(c)))}const h=l[r-1].find("th").length;for(let e=0;e<r;e++){const t=l[e].find("th");let n=h/t.length;o||(n*=i),(n>1&&1===u||o&&r>1)&&t.attr("colSpan",n)}return{elements:l,cellTemplates:d}}_makeGroupedRowCells(e,t,i,n,a){t*=a=a||1;const l=[],{items:d}=e,u=d.length;for(let a=0;a<t;a++)for(let t=0;t<u;t++){let c=(0,s.default)("<div>");const h={};if(n&&n.render){const i={model:d[t],container:(0,o.getPublicElement)(c),index:a*u+t};e.data&&(i.model.data=e.data[t]),h.template=n.render.bind(n,i)}else c.text(d[t].text),c=(0,s.default)("<div>").append(c);let p;c.addClass(i.groupHeaderContentClass),p=(0,r.isFunction)(i.groupHeaderClass)?i.groupHeaderClass(t):i.groupHeaderClass,h.element=(0,s.default)("<th>").addClass(p).append(c),l.push(h)}return l}}}},5327:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.utils=void 0;var n=i(61404),o=u(i(64553)),a=i(31e3),s=u(i(71051)),r=i(21274),l=i(57653),d=i(8687);function u(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},c.apply(null,arguments)}const h=t.utils={dataAccessors:{getAppointmentSettings:e=>(0,o.default)(e).data(d.APPOINTMENT_SETTINGS_KEY),getAppointmentInfo:e=>{const t=h.dataAccessors.getAppointmentSettings(e);return null==t?void 0:t.info},create:(e,t,i,n)=>{const o=t?c({},t):{getter:{},setter:{},expr:{}};return(0,r.each)(e,((e,t)=>{if(t){const l=(0,a.compileGetter)(t),d=(0,a.compileSetter)(t);let u,c,h;("startDate"===(r=e)||"endDate"===r)&&(u=e=>{let t=l(e);return i&&(t=s.default.deserializeDate(t)),t},c=(e,t)=>{if(n)h=n;else if(i&&!h){const t=l(e);h=s.default.getDateSerializationFormat(t)}const o=s.default.serializeDate(t,h);d(e,o)}),o.getter[e]=u||l,o.setter[e]=c||d,o.expr[`${e}Expr`]=t}else delete o.getter[e],delete o.setter[e],delete o.expr[`${e}Expr`];var r})),o}},DOM:{getHeaderHeight:e=>e?e._$element&&parseInt((0,l.getOuterHeight)(e._$element),10):0},renovation:{renderComponent:(e,t,i,o,a)=>{let s=e[o];if(s){const e=s.$element(),t=e.get(0).style,{height:i}=t,{width:n}=t;s.option(a),i&&(0,l.setHeight)(e,i),n&&(0,l.setWidth)(e,n)}else{const r=(0,n.getPublicElement)(t);s=e._createComponent(r,i,a),e[o]=s}}}}},18648:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(87129)),o=i(55594),a=d(i(41380)),s=d(i(19576)),r=d(i(73862)),l=d(i(95053));function d(e){return e&&e.__esModule?e:{default:e}}const u=a.default.dateToMilliseconds,c="GMT",h=/^GMT(?:[+-]\d{2}:\d{2})?$/,p=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes())),g=(e,t,i,n)=>_(i,n)-_(e,t),_=(e,t)=>new Date(e).getTimezoneOffset()-new Date(t).getTimezoneOffset(),f=(e,t)=>_(e,t)*u("minute"),m=e=>e instanceof Date&&!isNaN(e.valueOf()),v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(!e)return;if(!l.default.value.includes(e))return void n.default.log("W0009",e);if(!m(t))return;let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(0===r.default.getTimeZonesOld().length)return;const i=p(t);return r.default.getTimeZoneOffsetById(e,i.getTime())}(e,t);return void 0===i&&(i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;const i=C(e,t);if(void 0===i)return;if(i===c)return 0;const n="-"===i.substring(3,4),o=i.substring(4,6),a=i.substring(7,9),s=parseInt(o,10)+parseInt(a,10)/60;return n?-s:s}(e,t)),i},C=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,i="";try{var o;i=(null===(o=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).formatToParts(t).find((e=>{let{type:t}=e;return"timeZoneName"===t})))||void 0===o?void 0:o.value)??""}catch(t){return void n.default.log("W0009",e)}if(h.test(i))return i;n.default.log("W0009",e)},y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(!m(t))return"";const i=e.replace(/\//g," - ").replace(/_/g," "),n=C(e,t);if(void 0===n)return;const o=(e=>e===c?`${e} +00:00`:e.replace(c,`${c} `))(n);return`(${o}) ${i}`},b=(e,t,i)=>{const n=v(i,e),o=v(i,t);return void 0===n||void 0===o?0:n-o},x=e=>{const t=new Date(new Date(e).setHours(0,0,0,0)),i=new Date(new Date(e).setHours(23,59,59,0));return t.getTimezoneOffset()-i.getTimezoneOffset()!=0},w=function(){return 6e4*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date).getTimezoneOffset()},S=()=>{const[e,t]=T();return e.getTimezoneOffset()!==t.getTimezoneOffset()},D=e=>-e.getTimezoneOffset()/60,I=e=>new Date(e-u("hour")),E=(e,t)=>1===r.default.getTimeZonesOld().filter((t=>t.id===e)).length&&((e,t)=>{const i=t.getFullYear(),n=r.default.getTimeZoneDeclarationTuple(e,i),[o,a]=n;if(n.length<2)return r.default.getTimeZoneOffsetById(e,t)===D(t)&&!S();const s=D(new Date(o.date)),l=D(new Date(a.date));return s===o.offset&&s!==D(I(o.date))&&l===a.offset&&l!==D(I(a.date))})(e,t),T=()=>{const e=new Date(Date.now()),t=new Date,i=new Date;return t.setFullYear(e.getFullYear(),0,1),i.setFullYear(e.getFullYear(),6,1),[t,i]},A={getDaylightOffset:_,getDaylightOffsetInMs:f,getTimezoneOffsetChangeInMinutes:g,getTimezoneOffsetChangeInMs:(e,t,i,n)=>g(e,t,i,n)*u("minute"),calculateTimezoneByValue:v,getCorrectedDateByDaylightOffsets:(e,t,i,n,o)=>{const a=b(e,t,n)-b(e,t,o);return new Date(i.getTime()-a*u("hour"))},isSameAppointmentDates:(e,t)=>(t=new Date(t.getTime()-1),a.default.sameDate(e,t)),correctRecurrenceExceptionByTimezone:function(e,t,i,n){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=(e.getTimezoneOffset()-t.getTimezoneOffset())/60;return n?a=b(t,e,n):i&&(a=b(t,e,i)),new Date(e.getTime()+(o?-1:1)*a*u("hour"))},getClientTimezoneOffset:w,getDiffBetweenClientTimezoneOffsets:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return w(e)-w(t)},createUTCDateWithLocalOffset:e=>e?new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())):null,createDateFromUTCWithLocalOffset:e=>{const t=(0,s.default)(e),i=t.getTimezoneOffset();return t.addTime(t.getTimezoneOffset("minute")),t.subtractMinutes(i-t.getTimezoneOffset()),t.source},createUTCDate:p,isTimezoneChangeInDate:x,getDateWithoutTimezoneChange:e=>{const t=new Date(e);if(x(t)){const e=new Date(t);return new Date(e.setDate(e.getDate()+1))}return t},hasDSTInLocalTimeZone:S,isEqualLocalTimeZone:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(Intl){if(Intl.DateTimeFormat().resolvedOptions().timeZone===e)return!0}return E(e,t)},isEqualLocalTimeZoneByDeclaration:E,getTimeZones:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return l.default.value.map((t=>({offset:v(t,e),title:y(t,e),id:t})))},setOffsetsToDate:(e,t)=>{const i=t.reduce(((e,t)=>e+t),e.getTime());return new Date(i)},addOffsetsWithoutDST:function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];const a=o.dateUtilsTs.addOffsets(e,i),s=f(e,a);if(!s)return a;const r=o.dateUtilsTs.addOffsets(a,[-s]);return f(a,r)?a:r}};t.default=A},25166:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(25377);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=i(71528);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},25377:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.lessThan=t.isInteger=t.inRange=t.greaterThan=t.divisibleBy=void 0;t.isInteger=e=>Number.isInteger(e);t.greaterThan=function(e,t){return!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?e>t:e>=t};t.lessThan=function(e,t){return!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?e<t:e<=t};t.inRange=(e,t)=>{let[i,n]=t;return e>=i&&e<=n};t.divisibleBy=(e,t)=>e%t==0},71528:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.mustBeLessThan=t.mustBeInteger=t.mustBeInRange=t.mustBeGreaterThan=t.mustBeDivisibleBy=void 0;var n=i(44664),o=i(25377);t.mustBeInteger=(0,n.createValidatorRule)("mustBeInteger",(e=>(0,o.isInteger)(e)||`${e} must be an integer.`));t.mustBeGreaterThan=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,n.createValidatorRule)("mustBeGreaterThan",(i=>(0,o.greaterThan)(i,e,t)||`${i} must be ${t?">":">="} than ${e}.`))};t.mustBeLessThan=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,n.createValidatorRule)("mustBeLessThan",(i=>(0,o.lessThan)(i,e,t)||`${i} must be ${t?"<":"<="} than ${e}.`))};t.mustBeInRange=e=>(0,n.createValidatorRule)("mustBeInRange",(t=>(0,o.inRange)(t,e)||`${t} must be in range [${e[0]}, ${e[1]}].`));t.mustBeDivisibleBy=e=>(0,n.createValidatorRule)("mustBeDivisibleBy",(t=>(0,o.divisibleBy)(t,e)||`${t} must be divisible by ${e}.`))},44664:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n={OptionsValidator:!0,OptionsValidatorErrorHandler:!0,Validator:!0};Object.defineProperty(t,"OptionsValidator",{enumerable:!0,get:function(){return o.OptionsValidator}}),Object.defineProperty(t,"OptionsValidatorErrorHandler",{enumerable:!0,get:function(){return a.OptionsValidatorErrorHandler}}),Object.defineProperty(t,"Validator",{enumerable:!0,get:function(){return r.Validator}});var o=i(69067),a=i(7993),s=i(50397);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var r=i(90290),l=i(99478);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},69067:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsValidator=void 0;t.OptionsValidator=class{constructor(e){this.validators=e}validate(e){const t=Object.entries(this.validators).reduce(((t,i)=>{let[n,o]=i;const a=o.validate(e);return!0!==a&&(t[n]=a),t}),{});return!(Object.keys(t).length>0)||t}}},7993:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsValidatorErrorHandler=void 0;t.OptionsValidatorErrorHandler=class{constructor(e,t){this.validatorNameToErrorCodeMap=e,this.globalErrorHandler=t}handleValidationResult(e){if(!0===e)return;const t=[...Object.keys(e).reduce(((e,t)=>{const i=this.validatorNameToErrorCodeMap[t];return i&&e.add(i),e}),new Set)];t.forEach(((e,i)=>{i===t.length-1?this.globalErrorHandler.throwError(e):this.globalErrorHandler.logError(e)}))}}},50397:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.REDUNDANT_EXPORT=void 0;t.REDUNDANT_EXPORT=void 0},90290:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;t.Validator=class{constructor(e,t){this.valueSelector=e,this.rules=t}validate(e){const t=this.valueSelector(e),i=this.rules.reduce(((e,i)=>{const n=i(t);return!0!==n&&(e[i.name]=n),e}),{});return!Object.keys(i).length||i}}},99478:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createValidatorRule=void 0;t.createValidatorRule=(e,t)=>(Object.defineProperty(t,"name",{value:e,writable:!1}),t)},98602:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SchedulerOptionsValidator",{enumerable:!0,get:function(){return n.SchedulerOptionsValidator}}),Object.defineProperty(t,"SchedulerOptionsValidatorErrorsHandler",{enumerable:!0,get:function(){return o.SchedulerOptionsValidatorErrorsHandler}});var n=i(36913),o=i(26200)},36913:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SchedulerOptionsValidator=void 0;var n=i(25166),o=i(44664),a=i(93332);class s extends o.OptionsValidator{constructor(){super({startDayHour:new o.Validator((e=>{let{startDayHour:t}=e;return t}),[n.mustBeInteger,(0,n.mustBeInRange)([0,24])]),endDayHour:new o.Validator((e=>{let{endDayHour:t}=e;return t}),[n.mustBeInteger,(0,n.mustBeInRange)([0,24])]),offset:new o.Validator((e=>{let{offset:t}=e;return t}),[n.mustBeInteger,(0,n.mustBeInRange)([-1440,1440]),(0,n.mustBeDivisibleBy)(5)]),cellDuration:new o.Validator((e=>{let{cellDuration:t}=e;return t}),[n.mustBeInteger,(0,n.mustBeGreaterThan)(0)]),startDayHourAndEndDayHour:new o.Validator((e=>e),[a.endDayHourMustBeGreaterThanStartDayHour]),cellDurationAndVisibleInterval:new o.Validator((e=>e),[a.visibleIntervalMustBeDivisibleByCellDuration,a.cellDurationMustBeLessThanVisibleInterval])})}}t.SchedulerOptionsValidator=s},26200:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SchedulerOptionsValidatorErrorsHandler=void 0;var n,o=(n=i(35185))&&n.__esModule?n:{default:n},a=i(44664);const s={logError:e=>{o.default.log(e)},throwError:e=>{throw o.default.Error(e)}};class r extends a.OptionsValidatorErrorHandler{constructor(){super({startDayHour:"E1058",endDayHour:"E1058",startDayHourAndEndDayHour:"E1058",offset:"E1061",cellDuration:"E1062",cellDurationAndVisibleInterval:"E1062"},s)}}t.SchedulerOptionsValidatorErrorsHandler=r},93332:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.visibleIntervalMustBeDivisibleByCellDuration=t.endDayHourMustBeGreaterThanStartDayHour=t.cellDurationMustBeLessThanVisibleInterval=void 0;var n=i(25166),o=i(44664);t.endDayHourMustBeGreaterThanStartDayHour=(0,o.createValidatorRule)("endDayHourGreaterThanStartDayHour",(e=>{let{startDayHour:t,endDayHour:i}=e;return(0,n.greaterThan)(i,t)||`endDayHour: ${i} must be greater that startDayHour: ${t}.`})),t.visibleIntervalMustBeDivisibleByCellDuration=(0,o.createValidatorRule)("visibleIntervalMustBeDivisibleByCellDuration",(e=>{let{cellDuration:t,startDayHour:i,endDayHour:o}=e;const a=60*(o-i);return(0,n.divisibleBy)(a,t)||`endDayHour - startDayHour: ${a} (minutes), must be divisible by cellDuration: ${t} (minutes).`})),t.cellDurationMustBeLessThanVisibleInterval=(0,o.createValidatorRule)("cellDurationMustBeLessThanVisibleInterval",(e=>{let{cellDuration:t,startDayHour:i,endDayHour:o}=e;const a=60*(o-i);return(0,n.lessThan)(t,a,!1)||`endDayHour - startDayHour: ${a} (minutes), must be greater or equal the cellDuration: ${t} (minutes).`}))},77143:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isPopupFullScreenNeeded=t.getPopupToolbarItems=t.getPopupSize=t.getMaxWidth=t.defaultAnimation=t.POPUP_WIDTH=void 0;var n=r(i(4671)),o=r(i(65951)),a=i(57653),s=i(3104);function r(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}const d=t.POPUP_WIDTH={DEFAULT:485,RECURRENCE:970,FULLSCREEN:1e3,MOBILE:{DEFAULT:350,FULLSCREEN:500}},u=(t.defaultAnimation={show:{type:"pop",duration:300,from:{scale:.55}},hide:{type:"pop",duration:300,to:{opacity:0,scale:.55},from:{opacity:1,scale:1}}},()=>"desktop"!==o.default.current().deviceType),c="after",h="before";t.getPopupToolbarItems=(e,t)=>{const i=[],a={doneButton:{shortcut:"done",options:{text:n.default.format("Done")},location:c},cancelButton:{shortcut:"cancel",location:"ios"===o.default.current().platform?h:c}};return e&&i.push(l({},a.doneButton,{onClick:t})),i.push(a.cancelButton),i};const p=()=>{const e=(0,s.getWindow)(),t=e&&(0,a.getWidth)(e);return!!t&&(u()?t<d.MOBILE.FULLSCREEN:t<d.FULLSCREEN)};t.isPopupFullScreenNeeded=p;const g=e=>u()?d.MOBILE.DEFAULT:e?d.RECURRENCE:d.DEFAULT;t.getMaxWidth=g;t.getPopupSize=e=>({fullScreen:p(),maxWidth:g(e)})},8181:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"POPUP_WIDTH",{enumerable:!0,get:function(){return n.POPUP_WIDTH}}),Object.defineProperty(t,"defaultAnimation",{enumerable:!0,get:function(){return n.defaultAnimation}}),Object.defineProperty(t,"getMaxWidth",{enumerable:!0,get:function(){return n.getMaxWidth}}),Object.defineProperty(t,"getPopupSize",{enumerable:!0,get:function(){return n.getPopupSize}}),Object.defineProperty(t,"getPopupToolbarItems",{enumerable:!0,get:function(){return n.getPopupToolbarItems}}),Object.defineProperty(t,"isPopupFullScreenNeeded",{enumerable:!0,get:function(){return n.isPopupFullScreenNeeded}});var n=i(77143)},83061:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AllDayPanelCell=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(52728),r=i(48661);class l extends o.BaseInfernoComponent{render(){const{className:e,viewContext:t,dataCellTemplate:i,endDate:o,groupIndex:l,groups:d,index:u,isFirstGroupCell:c,isFocused:h,isLastGroupCell:p,isSelected:g,startDate:_}=this.props,f=(0,a.getTemplate)(i);return(0,n.createComponentVNode)(2,r.DateTableCellBase,{className:`${s.ALL_DAY_PANEL_CELL_CLASS} ${e}`,viewContext:t,startDate:_,endDate:o,groups:d,groupIndex:l,allDay:!0,isFirstGroupCell:c,isLastGroupCell:p,index:u,dataCellTemplate:f,isSelected:g,isFocused:h})}}t.AllDayPanelCell=l,l.defaultProps=r.DateTableCallBaseDefaultProps},49673:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AllDayTable=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(52728),r=i(99552),l=i(76322),d=i(46189);class u extends o.InfernoWrapperComponent{constructor(){super(...arguments),this.allDayPanelData=null}createEffects(){return[(0,o.createReRenderEffect)()]}getAllDayPanelData(){return null!==this.allDayPanelData||(this.allDayPanelData=this.props.viewData.groupedData[0].allDayPanel),this.allDayPanelData}componentWillUpdate(e){super.componentWillUpdate(),this.props.viewData!==e.viewData&&(this.allDayPanelData=null)}render(){const{viewData:e,viewContext:t,width:i,tableRef:o,dataCellTemplate:l}=this.props,u=this.getAllDayPanelData(),c=(0,a.getTemplate)(l);return(0,n.createComponentVNode)(2,d.Table,{className:"dx-scheduler-all-day-table",height:u?void 0:s.DefaultSizes.allDayPanelHeight,width:i,tableRef:o,children:(0,n.createComponentVNode)(2,r.AllDayPanelTableBody,{viewData:u??r.AllDayPanelTableBodyDefaultProps.viewData,viewContext:t,leftVirtualCellWidth:e.leftVirtualCellWidth??r.AllDayPanelTableBodyDefaultProps.leftVirtualCellWidth,rightVirtualCellWidth:e.rightVirtualCellWidth??r.AllDayPanelTableBodyDefaultProps.rightVirtualCellWidth,leftVirtualCellCount:e.leftVirtualCellCount,rightVirtualCellCount:e.rightVirtualCellCount,dataCellTemplate:c})})}}t.AllDayTable=u,u.defaultProps=l.LayoutDefaultProps},99552:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AllDayPanelTableBodyDefaultProps=t.AllDayPanelTableBody=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(71312),r=i(83061),l=i(21541);const d=t.AllDayPanelTableBodyDefaultProps={viewData:[],isVerticalGroupOrientation:!1,className:"",leftVirtualCellWidth:0,rightVirtualCellWidth:0};class u extends o.BaseInfernoComponent{render(){const{className:e,viewData:t,viewContext:i,leftVirtualCellWidth:o,rightVirtualCellWidth:d,leftVirtualCellCount:u,rightVirtualCellCount:c,isVerticalGroupOrientation:h,dataCellTemplate:p}=this.props,g=(0,s.combineClasses)({"dx-scheduler-all-day-table-row":!0,[e??""]:!!e}),_=(0,a.getTemplate)(p);return(0,n.createComponentVNode)(2,l.Row,{leftVirtualCellWidth:o,rightVirtualCellWidth:d,leftVirtualCellCount:u,rightVirtualCellCount:c,className:g,children:t.map((e=>{let{endDate:t,groupIndex:o,groups:a,index:s,isFirstGroupCell:l,isFocused:d,isLastGroupCell:u,isSelected:c,key:p,startDate:g}=e;return(0,n.createComponentVNode)(2,r.AllDayPanelCell,{viewContext:i,isFirstGroupCell:!h&&l,isLastGroupCell:!h&&u,startDate:g,endDate:t,groups:a,groupIndex:o,index:s,dataCellTemplate:_,isSelected:c??!1,isFocused:d??!1},p)}))})}}t.AllDayPanelTableBody=u,u.defaultProps=d},4011:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AllDayPanelTitle=void 0;var n,o=i(81167),a=i(49714),s=(n=i(4671))&&n.__esModule?n:{default:n};class r extends a.InfernoWrapperComponent{createEffects(){return[(0,a.createReRenderEffect)()]}render(){const e=s.default.format("dxScheduler-allDay");return(0,o.createVNode)(1,"div","dx-scheduler-all-day-title",e,0)}}t.AllDayPanelTitle=r,r.defaultProps={}},85409:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CellBaseDefaultProps=t.CellBase=void 0;var n=i(81167),o=i(49714),a=i(34396);const s=t.CellBaseDefaultProps={className:"",isFirstGroupCell:!1,isLastGroupCell:!1,startDate:new Date,endDate:new Date,allDay:!1,text:"",index:0,contentTemplateProps:{data:{},index:0}};class r extends o.BaseInfernoComponent{render(){const{className:e,isFirstGroupCell:t,isLastGroupCell:i,children:o,ariaLabel:s}=this.props,r=a.renderUtils.getGroupCellClasses(t,i,e);return(0,n.createVNode)(1,"td",r,o,0,{"aria-label":s})}}t.CellBase=r,r.defaultProps=s},35689:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateHeaderDefaultProps=t.DateHeader=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(34396),r=i(60932),l=i(21541);const{isMaterialBased:d}=s.themeUtils.getThemeType(),u=t.DateHeaderDefaultProps={groupOrientation:"horizontal",groupByDate:!1,groups:[]};class c extends o.BaseInfernoComponent{render(){const{viewContext:e,dateCellTemplate:t,dateHeaderData:{dataMap:i,leftVirtualCellCount:o,leftVirtualCellWidth:u,rightVirtualCellCount:c,rightVirtualCellWidth:h},groupByDate:p,groupOrientation:g,groups:_}=this.props,f=(0,s.isHorizontalGroupingApplied)(_,g)&&!p,m=(0,a.getTemplate)(t);return(0,n.createFragment)(i.map(((t,i)=>(0,n.createComponentVNode)(2,l.Row,{className:"dx-scheduler-header-row",leftVirtualCellWidth:u,leftVirtualCellCount:o,rightVirtualCellWidth:h,rightVirtualCellCount:c,isHeaderRow:!0,children:t.map((t=>{let{colSpan:i,endDate:o,groupIndex:a,groups:s,index:l,isFirstGroupCell:u,isLastGroupCell:c,key:h,startDate:p,text:g,today:_}=t;return(0,n.createComponentVNode)(2,r.DateHeaderCell,{viewContext:e,startDate:p,endDate:o,groups:f?s:void 0,groupIndex:f?a:void 0,today:_??!1,isWeekDayCell:!1,isTimeCellTemplate:!1,index:l,text:g,isFirstGroupCell:u,isLastGroupCell:c,dateCellTemplate:m,colSpan:i,splitText:d},h)}))},i.toString()))),0)}}t.DateHeader=c,c.defaultProps=u},60932:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateHeaderCellDefaultProps=t.DateHeaderCell=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(71312),r=i(34396),l=i(85409),d=i(63491);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}const c=t.DateHeaderCellDefaultProps=u({},l.CellBaseDefaultProps,{today:!1,colSpan:1,isWeekDayCell:!1,splitText:!1,isTimeCellTemplate:!1});class h extends o.BaseInfernoComponent{render(){const{viewContext:{view:{type:e},crossScrollingEnabled:t},colSpan:i,dateCellTemplate:o,groupIndex:l,groups:u,index:c,isTimeCellTemplate:h,splitText:p,startDate:g,text:_,timeCellTemplate:f,className:m,isFirstGroupCell:v,isLastGroupCell:C,isWeekDayCell:y,today:b}=this.props,x=r.renderUtils.getCellSizeHorizontalClass(e,t),w=(0,s.combineClasses)({"dx-scheduler-header-panel-cell":!0,[x]:!0,"dx-scheduler-header-panel-current-time-cell":b,"dx-scheduler-header-panel-week-cell":y,[m??""]:!!m}),S=r.renderUtils.getGroupCellClasses(v,C,w),D=!h&&!!o||h&&!!f,I=(0,a.getTemplate)(f),E=(0,a.getTemplate)(o),T=D?(0,n.createFragment)([h&&I&&I({data:{date:g,text:_,groups:u,groupIndex:l},index:c}),!h&&E&&E({data:{date:g,text:_,groups:u,groupIndex:l},index:c})],0):(0,n.createComponentVNode)(2,d.DateHeaderText,{splitText:p,text:_});return(0,n.createVNode)(1,"th",S,T,0,{colSpan:i,title:_})}}t.DateHeaderCell=h,h.defaultProps=c},63491:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateHeaderText=void 0;var n=i(81167),o=i(49714);class a extends o.BaseInfernoComponent{constructor(){super(...arguments),this._textCache=null}getTextParts(){if(null!==this._textCache)return this._textCache;const{text:e}=this.props;return this._textCache=e?e.split(" "):[""],this._textCache}componentWillUpdate(e){this.props.text!==e.text&&(this._textCache=null)}render(){const{splitText:e,text:t}=this.props,i=this.getTextParts();return(0,n.createFragment)(e?i.map((e=>(0,n.createVNode)(1,"div","dx-scheduler-header-panel-cell-date",(0,n.createVNode)(1,"span",null,e,0),2))):t,0)}}t.DateHeaderText=a,a.defaultProps={text:"",splitText:!1}},74282:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateTableDefaultProps=t.DateTable=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(28201),r=i(48661),l=i(76322),d=i(46189);const u=["viewData","viewContext","tableRef","addDateTableClass","width","cellTemplate","dataCellTemplate","groupOrientation","addVerticalSizesClassToRows"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},c.apply(null,arguments)}const h=t.DateTableDefaultProps=c({},l.LayoutDefaultProps,{cellTemplate:r.DateTableCellBase});class p extends o.InfernoWrapperComponent{createEffects(){return[(0,o.createReRenderEffect)()]}render(){const e=this.props,{viewData:t,viewContext:i,tableRef:o,addDateTableClass:r,width:l,cellTemplate:h,dataCellTemplate:p,groupOrientation:g,addVerticalSizesClassToRows:_}=e,f=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,u),m=r?"dx-scheduler-date-table":void 0,v=t.topVirtualRowHeight??0,C=t.bottomVirtualRowHeight??0,y=t.leftVirtualCellWidth??0,b=t.rightVirtualCellWidth??0,x=t.groupedData[0].dateTable[0].cells.length,w=(0,a.getTemplate)(h),S=(0,a.getTemplate)(p);return(0,n.normalizeProps)((0,n.createComponentVNode)(2,d.Table,c({},f,{tableRef:o,topVirtualRowHeight:v,bottomVirtualRowHeight:C,leftVirtualCellWidth:y,rightVirtualCellWidth:b,leftVirtualCellCount:t.leftVirtualCellCount,rightVirtualCellCount:t.rightVirtualCellCount,virtualCellsCount:x,className:m,width:l,children:(0,n.createComponentVNode)(2,s.DateTableBody,{viewData:t,viewContext:i,cellTemplate:w,dataCellTemplate:S,leftVirtualCellWidth:y,rightVirtualCellWidth:b,groupOrientation:g,addVerticalSizesClassToRows:_,topVirtualRowHeight:s.DateTableBodyDefaultProps.topVirtualRowHeight,bottomVirtualRowHeight:s.DateTableBodyDefaultProps.bottomVirtualRowHeight,addDateTableClass:s.DateTableBodyDefaultProps.addDateTableClass})})))}}t.DateTable=p,p.defaultProps=h},28201:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateTableBodyDefaultProps=t.DateTableBody=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(71312),r=i(52728),l=i(99552),d=i(48661),u=i(76322),c=i(21541);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},h.apply(null,arguments)}const p=t.DateTableBodyDefaultProps=h({},u.LayoutDefaultProps,{cellTemplate:d.DateTableCellBase});class g extends o.BaseInfernoComponent{render(){const{viewData:e,viewContext:t,addVerticalSizesClassToRows:i,cellTemplate:o,dataCellTemplate:d}=this.props,u=(0,s.combineClasses)({[r.DATE_TABLE_ROW_CLASS]:!0,"dx-scheduler-cell-sizes-vertical":i}),h=(0,a.getTemplate)(o),p=(0,a.getTemplate)(d);return(0,n.createFragment)(e.groupedData.map((i=>{let{allDayPanel:o,dateTable:a,isGroupedAllDayPanel:s,key:r}=i;return(0,n.createFragment)([s&&(0,n.createComponentVNode)(2,l.AllDayPanelTableBody,{viewData:o??l.AllDayPanelTableBodyDefaultProps.viewData,viewContext:t,dataCellTemplate:p,isVerticalGroupOrientation:!0,leftVirtualCellWidth:e.leftVirtualCellWidth??l.AllDayPanelTableBodyDefaultProps.leftVirtualCellWidth,rightVirtualCellWidth:e.rightVirtualCellWidth??l.AllDayPanelTableBodyDefaultProps.rightVirtualCellWidth,leftVirtualCellCount:e.leftVirtualCellCount,rightVirtualCellCount:e.rightVirtualCellCount}),a.map((i=>{let{cells:o,key:a}=i;return(0,n.createComponentVNode)(2,c.Row,{className:u,leftVirtualCellWidth:e.leftVirtualCellWidth??c.RowDefaultProps.leftVirtualCellWidth,rightVirtualCellWidth:e.rightVirtualCellWidth??c.RowDefaultProps.rightVirtualCellWidth,leftVirtualCellCount:e.leftVirtualCellCount,rightVirtualCellCount:e.rightVirtualCellCount,children:o.map((e=>{let{key:i,endDate:n,firstDayOfMonth:o,groupIndex:a,groups:s,index:r,isFirstGroupCell:l,isFocused:d,isLastGroupCell:u,isSelected:c,otherMonth:g,startDate:_,text:f,today:m}=e;return h({key:i,viewContext:t,isFirstGroupCell:l,isLastGroupCell:u,startDate:_,endDate:n,groups:s,groupIndex:a,index:r,dataCellTemplate:p,text:f,today:m,otherMonth:g,firstDayOfMonth:o,isSelected:c,isFocused:d})}))},a)}))],0,r)})),0)}}t.DateTableBody=g,g.defaultProps=p},48661:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateTableCellBase=t.DateTableCallBaseDefaultProps=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(71312),r=i(34396),l=i(52728),d=i(85409);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}const c=t.DateTableCallBaseDefaultProps=u({},d.CellBaseDefaultProps,{otherMonth:!1,today:!1,firstDayOfMonth:!1,isSelected:!1,isFocused:!1});class h extends o.BaseInfernoComponent{constructor(){super(...arguments),this.dataCellTemplateProps=null}getDataCellTemplateProps(){if(null!==this.dataCellTemplateProps)return this.dataCellTemplateProps;const{allDay:e,contentTemplateProps:t,endDate:i,groupIndex:n,groups:o,index:a,startDate:s}=this.props;return this.dataCellTemplateProps={data:u({startDate:s,endDate:i,groups:o,groupIndex:o?n:void 0,text:"",allDay:!!e||void 0},null==t?void 0:t.data),index:a},this.dataCellTemplateProps}componentWillUpdate(e){this.props.allDay===e.allDay&&this.props.contentTemplateProps===e.contentTemplateProps&&this.props.endDate===e.endDate&&this.props.groupIndex===e.groupIndex&&this.props.groups===e.groups&&this.props.index===e.index&&this.props.startDate===e.startDate||(this.dataCellTemplateProps=null)}render(){const{viewContext:e,allDay:t,className:i,isFocused:o,isSelected:u,isFirstGroupCell:c,isLastGroupCell:h,dataCellTemplate:p,children:g}=this.props,{view:{type:_},crossScrollingEnabled:f}=e,m=r.renderUtils.getCellSizeHorizontalClass(_,f),v=r.renderUtils.getCellSizeVerticalClass(!!t),C=(0,s.combineClasses)({[m]:!0,[v]:!0,[l.DATE_TABLE_CELL_CLASS]:!t,"dx-state-focused":u,"dx-scheduler-focused-cell":o,[i??""]:!0}),y=u?"Add appointment":void 0,b=this.getDataCellTemplateProps(),x=(0,a.getTemplate)(p);return(0,n.createComponentVNode)(2,d.CellBase,{className:C,viewContext:e,isFirstGroupCell:c,isLastGroupCell:h,ariaLabel:y,startDate:d.CellBaseDefaultProps.startDate,endDate:d.CellBaseDefaultProps.endDate,index:d.CellBaseDefaultProps.index,children:(0,n.createFragment)([!x&&g,!!x&&x({index:b.index,data:b.data})],0)})}}t.DateTableCellBase=h,h.defaultProps=c},31055:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPanelDefaultProps=t.GroupPanel=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(68969),r=i(34396),l=i(4130),d=i(3234),u=i(75816);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},c.apply(null,arguments)}const h=t.GroupPanelDefaultProps=c({},d.GroupPanelBaseDefaultProps,{groups:[],groupOrientation:s.VERTICAL_GROUP_ORIENTATION});class p extends o.InfernoWrapperComponent{createEffects(){return[(0,o.createReRenderEffect)()]}render(){const{className:e,viewContext:t,elementRef:i,groupPanelData:o,height:s,resourceCellTemplate:d,groupOrientation:c,groups:p,styles:g}=this.props,_=(0,a.getTemplate)(d),f=(0,r.isVerticalGroupingApplied)(p,c)?u.GroupPanelVertical:l.GroupPanelHorizontal;return(0,n.createComponentVNode)(2,f,{viewContext:t,height:s,resourceCellTemplate:_,className:e,groupPanelData:o,elementRef:i,styles:g,groups:h.groups,groupOrientation:h.groupOrientation,groupByDate:h.groupByDate})}}t.GroupPanel=p,p.defaultProps=h},4130:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPanelHorizontal=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(6305),r=i(3234);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}class d extends o.BaseInfernoComponent{constructor(){super(...arguments),this._groupPanelItems=null}getGroupPanelItems(){if(null!==this._groupPanelItems)return this._groupPanelItems;const{groupPanelData:{baseColSpan:e,groupPanelItems:t}}=this.props,i=t.reduceRight(((i,n,o)=>{const a=i,s=n.length,r=o===t.length-1?e:i[o+1],l=(o===t.length-1?s:t[o+1].length)/s;return a[o]=l*r,a}),[...new Array(t.length)]);return this._groupPanelItems=t.map(((e,t)=>{const n=i[t];return e.map((e=>l({},e,{colSpan:n})))})),this._groupPanelItems}componentWillUpdate(e){this.props.groupPanelData!==e.groupPanelData&&(this._groupPanelItems=null)}render(){const{resourceCellTemplate:e}=this.props,t=this.getGroupPanelItems(),i=(0,a.getTemplate)(e);return(0,n.createFragment)(t.map((e=>(0,n.createComponentVNode)(2,s.GroupPanelHorizontalRow,{groupItems:e,cellTemplate:i},e[0].key))),0)}}t.GroupPanelHorizontal=d,d.defaultProps=r.GroupPanelBaseDefaultProps},91117:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPanelHorizontalCellDefaultProps=t.GroupPanelHorizontalCell=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(71312),r=i(3234);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}const d=t.GroupPanelHorizontalCellDefaultProps=l({},r.GroupPanelCellDefaultProps,{isFirstGroupCell:!1,isLastGroupCell:!1,colSpan:1});class u extends o.BaseInfernoComponent{render(){const{cellTemplate:e,colSpan:t,color:i,data:o,id:r,index:l,text:d,className:u,isFirstGroupCell:c,isLastGroupCell:h}=this.props,p=(0,s.combineClasses)({"dx-scheduler-group-header":!0,"dx-scheduler-first-group-cell":c,"dx-scheduler-last-group-cell":h,[u??""]:!!u}),g=(0,a.getTemplate)(e);return(0,n.createVNode)(1,"th",p,(0,n.createVNode)(1,"div","dx-scheduler-group-header-content",g?g({data:{data:o,id:r,color:i,text:d},index:l}):(0,n.createVNode)(1,"div",null,d,0),0),2,{colSpan:t})}}t.GroupPanelHorizontalCell=u,u.defaultProps=d},6305:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPanelHorizontalRow=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(91117),r=i(3234);class l extends o.BaseInfernoComponent{render(){const{cellTemplate:e,className:t,groupItems:i}=this.props,o=(0,a.getTemplate)(e);return(0,n.createVNode)(1,"tr",`dx-scheduler-group-row ${t}`,i.map(((e,t)=>{let{colSpan:i,color:a,data:r,id:l,isFirstGroupCell:d,isLastGroupCell:u,key:c,text:h}=e;return(0,n.createComponentVNode)(2,s.GroupPanelHorizontalCell,{text:h,id:l,data:r,index:t,color:a,colSpan:i??s.GroupPanelHorizontalCellDefaultProps.colSpan,isFirstGroupCell:!!d,isLastGroupCell:!!u,cellTemplate:o},c)})),0)}}t.GroupPanelHorizontalRow=l,l.defaultProps=r.GroupPanelRowDefaultProps},3234:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPanelRowDefaultProps=t.GroupPanelCellDefaultProps=t.GroupPanelBaseDefaultProps=void 0;t.GroupPanelBaseDefaultProps={groupPanelData:{groupPanelItems:[],baseColSpan:1},groupByDate:!1,styles:{}},t.GroupPanelCellDefaultProps={id:0,text:"",data:{id:0},className:""},t.GroupPanelRowDefaultProps={groupItems:[],className:""}},75816:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPanelVertical=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(34396),r=i(3234),l=i(73783);class d extends o.BaseInfernoComponent{render(){const{className:e,elementRef:t,groupPanelData:i,resourceCellTemplate:r,height:d,styles:u}=this.props,c=(0,o.normalizeStyles)(s.renderUtils.addHeightToStyle(d,u)),h=(0,a.getTemplate)(r);return(0,n.createVNode)(1,"div",e,(0,n.createVNode)(1,"div","dx-scheduler-group-flex-container",i.groupPanelItems.map((e=>(0,n.createComponentVNode)(2,l.GroupPanelVerticalRow,{groupItems:e,cellTemplate:h},e[0].key))),0),2,{style:c},null,t)}}t.GroupPanelVertical=d,d.defaultProps=r.GroupPanelBaseDefaultProps},47231:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPanelVerticalCell=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(3234);class r extends o.BaseInfernoComponent{render(){const{className:e,data:t,id:i,color:o,text:s,index:r,cellTemplate:l}=this.props,d=(0,a.getTemplate)(l);return(0,n.createVNode)(1,"div",`dx-scheduler-group-header ${e}`,d?d({data:{data:t,id:i,color:o,text:s},index:r}):(0,n.createVNode)(1,"div","dx-scheduler-group-header-content",s,0),0)}}t.GroupPanelVerticalCell=r,r.defaultProps=s.GroupPanelCellDefaultProps},73783:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPanelVerticalRow=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(3234),r=i(47231);class l extends o.BaseInfernoComponent{render(){const{className:e,groupItems:t,cellTemplate:i}=this.props,o=(0,a.getTemplate)(i);return(0,n.createVNode)(1,"div",`dx-scheduler-group-row ${e}`,t.map(((e,t)=>{let{color:i,data:a,id:s,key:l,text:d}=e;return(0,n.createComponentVNode)(2,r.GroupPanelVerticalCell,{text:d,id:s,data:a,index:t,color:i,cellTemplate:o},l)})),0)}}t.GroupPanelVerticalRow=l,l.defaultProps=s.GroupPanelRowDefaultProps},21339:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderCell=void 0;var n=i(81167),o=i(49714),a=i(12802);class s extends o.BaseInfernoComponent{render(){const{children:e,className:t,colSpan:i,styles:a}=this.props;return(0,n.createVNode)(1,"th",t,e,0,{style:(0,o.normalizeStyles)(a),colSpan:i})}}t.HeaderCell=s,s.defaultProps=a.OrdinaryCellDefaultProps},20025:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderPanelDefaultProps=t.HeaderPanel=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(34396),r=i(35689),l=i(31055);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}const u=t.HeaderPanelDefaultProps=d({},l.GroupPanelDefaultProps,{isRenderDateHeader:!0,dateHeaderTemplate:r.DateHeader});class c extends o.InfernoWrapperComponent{createEffects(){return[(0,o.createReRenderEffect)()]}render(){const{viewContext:e,dateHeaderData:t,groupByDate:i,groupOrientation:o,groupPanelData:r,groups:d,isRenderDateHeader:u,dateCellTemplate:c,dateHeaderTemplate:h,resourceCellTemplate:p,timeCellTemplate:g}=this.props,_=(0,s.isHorizontalGroupingApplied)(d,o),f=(0,a.getTemplate)(c),m=(0,a.getTemplate)(h),v=(0,a.getTemplate)(p),C=(0,a.getTemplate)(g);return(0,n.createVNode)(1,"thead",null,[_&&!i&&(0,n.createComponentVNode)(2,l.GroupPanel,{viewContext:e,groupPanelData:r,groups:d,groupByDate:i,groupOrientation:o,resourceCellTemplate:v}),u&&m({viewContext:e,groupByDate:i,dateHeaderData:t,groupOrientation:o,groups:d,dateCellTemplate:f,timeCellTemplate:C}),i&&(0,n.createComponentVNode)(2,l.GroupPanel,{viewContext:e,groupPanelData:r,groups:d,groupByDate:i,groupOrientation:o,resourceCellTemplate:v})],0)}}t.HeaderPanel=c,c.defaultProps=u},76322:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutDefaultProps=void 0;t.LayoutDefaultProps={viewData:{groupedData:[],leftVirtualCellCount:0,rightVirtualCellCount:0,topVirtualRowCount:0,bottomVirtualRowCount:0},leftVirtualCellWidth:0,rightVirtualCellWidth:0,topVirtualRowHeight:0,bottomVirtualRowHeight:0,addDateTableClass:!0,addVerticalSizesClassToRows:!0}},12802:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.OrdinaryCellDefaultProps=t.OrdinaryCell=void 0;var n=i(81167),o=i(49714);const a=t.OrdinaryCellDefaultProps={};class s extends o.BaseInfernoComponent{render(){const{children:e,className:t,colSpan:i,styles:a}=this.props;return(0,n.createVNode)(1,"td",t,e,0,{style:(0,o.normalizeStyles)(a),colSpan:i})}}t.OrdinaryCell=s,s.defaultProps=a},21541:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RowDefaultProps=t.Row=void 0;var n=i(81167),o=i(49714),a=i(34396),s=i(46033);const r=t.RowDefaultProps={className:"",leftVirtualCellWidth:0,rightVirtualCellWidth:0,isHeaderRow:!1};class l extends o.BaseInfernoComponent{render(){const{children:e,className:t,isHeaderRow:i,leftVirtualCellCount:r,leftVirtualCellWidth:l,rightVirtualCellCount:d,rightVirtualCellWidth:u,styles:c}=this.props,h=!!r,p=!!d;return(0,n.createVNode)(1,"tr",t,[h&&null!=r&&(0,a.splitNumber)(r,1e3).map(((e,t)=>(0,n.createComponentVNode)(2,s.VirtualCell,{className:`left-virtual-cell-${t}`,width:l*(e/r),colSpan:e,isHeaderCell:i??s.VirtualCellDefaultProps.isHeaderCell}))),e,p&&null!=d&&(0,a.splitNumber)(d,1e3).map(((e,t)=>(0,n.createComponentVNode)(2,s.VirtualCell,{className:`right-virtual-cell-${t}`,width:u*(e/d),colSpan:e,isHeaderCell:i??s.VirtualCellDefaultProps.isHeaderCell})))],0,{style:(0,o.normalizeStyles)(c)})}}t.Row=l,l.defaultProps=r},46189:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TableDefaultProps=t.Table=void 0;var n=i(81167),o=i(49714),a=i(34396),s=i(4053);const r=t.TableDefaultProps={topVirtualRowHeight:0,bottomVirtualRowHeight:0,leftVirtualCellWidth:0,rightVirtualCellWidth:0,virtualCellsCount:0};class l extends o.BaseInfernoComponent{getResultStyles(){const{height:e,width:t,styles:i}=this.props,n=a.renderUtils.addHeightToStyle(e,i);return a.renderUtils.addWidthToStyle(t,n)}render(){const{className:e,topVirtualRowHeight:t,bottomVirtualRowHeight:i,children:a,leftVirtualCellCount:r,leftVirtualCellWidth:l,rightVirtualCellCount:d,rightVirtualCellWidth:u,tableRef:c,virtualCellsCount:h}=this.props,p=!!t,g=!!i,_=this.getResultStyles();return(0,n.createVNode)(1,"table",e,(0,n.createVNode)(1,"tbody",null,[p&&(0,n.createComponentVNode)(2,s.VirtualRow,{height:t,cellsCount:h??s.VirtualRowDefaultProps.cellsCount,leftVirtualCellWidth:l??s.VirtualRowDefaultProps.leftVirtualCellWidth,rightVirtualCellWidth:u??s.VirtualRowDefaultProps.rightVirtualCellWidth,leftVirtualCellCount:r,rightVirtualCellCount:d}),a,g&&(0,n.createComponentVNode)(2,s.VirtualRow,{height:i,cellsCount:h??s.VirtualRowDefaultProps.cellsCount,leftVirtualCellWidth:l??s.VirtualRowDefaultProps.leftVirtualCellWidth,rightVirtualCellWidth:u??s.VirtualRowDefaultProps.rightVirtualCellWidth,leftVirtualCellCount:r,rightVirtualCellCount:d})],0),2,{style:(0,o.normalizeStyles)(_),"aria-hidden":!0},null,c)}}t.Table=l,l.defaultProps=r},88332:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimePanelCell=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(71312),r=i(34396),l=i(85409);class d extends o.BaseInfernoComponent{constructor(){super(...arguments),this.timeCellTemplateProps=null}getTimeCellTemplateProps(){if(null!==this.timeCellTemplateProps)return this.timeCellTemplateProps;const{groupIndex:e,groups:t,index:i,startDate:n,text:o}=this.props;return this.timeCellTemplateProps={data:{date:n,groups:t,groupIndex:e,text:o},index:i},this.timeCellTemplateProps}componentWillUpdate(e){this.props.groupIndex===e.groupIndex&&this.props.groups===e.groups&&this.props.index===e.index&&this.props.startDate===e.startDate&&this.props.text===e.text||(this.timeCellTemplateProps=null)}render(){const{className:e,viewContext:t,highlighted:i,isFirstGroupCell:o,isLastGroupCell:d,text:u,timeCellTemplate:c}=this.props,h=r.renderUtils.getCellSizeVerticalClass(!1),p=(0,s.combineClasses)({"dx-scheduler-time-panel-cell":!0,[h]:!0,"dx-scheduler-time-panel-current-time-cell":!!i,[e??""]:!0}),g=this.getTimeCellTemplateProps(),_=(0,a.getTemplate)(c);return(0,n.createComponentVNode)(2,l.CellBase,{className:p,viewContext:t,isFirstGroupCell:o,isLastGroupCell:d,startDate:l.CellBaseDefaultProps.startDate,endDate:l.CellBaseDefaultProps.endDate,index:l.CellBaseDefaultProps.index,children:_?_({index:g.index,data:g.data}):(0,n.createVNode)(1,"div",null,u,0)})}}t.TimePanelCell=d,d.defaultProps=l.CellBaseDefaultProps},2302:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimePanelTableDefaultProps=t.TimePanelTable=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(4011),r=i(85409),l=i(21541),d=i(46189),u=i(88332);const c=["timePanelData","viewContext","tableRef","timeCellTemplate"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},h.apply(null,arguments)}const p=t.TimePanelTableDefaultProps={timePanelData:{groupedData:[],leftVirtualCellCount:0,rightVirtualCellCount:0,topVirtualRowCount:0,bottomVirtualRowCount:0}};class g extends o.InfernoWrapperComponent{createEffects(){return[(0,o.createReRenderEffect)()]}render(){const e=this.props,{timePanelData:t,viewContext:i,tableRef:o,timeCellTemplate:p}=e,g=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,c),{topVirtualRowHeight:_,bottomVirtualRowHeight:f}=t,m=(0,a.getTemplate)(p);return(0,n.normalizeProps)((0,n.createComponentVNode)(2,d.Table,h({},g,{className:"dx-scheduler-time-panel",topVirtualRowHeight:_??0,bottomVirtualRowHeight:f??0,virtualCellsCount:1,tableRef:o,children:t.groupedData.map((e=>{let{dateTable:t,groupIndex:o,isGroupedAllDayPanel:a,key:d}=e;return(0,n.createFragment)([a&&(0,n.createComponentVNode)(2,l.Row,{leftVirtualCellWidth:l.RowDefaultProps.leftVirtualCellWidth,rightVirtualCellWidth:l.RowDefaultProps.rightVirtualCellWidth,children:(0,n.createComponentVNode)(2,r.CellBase,{className:"dx-scheduler-time-panel-title-cell",viewContext:i,startDate:r.CellBaseDefaultProps.startDate,endDate:r.CellBaseDefaultProps.endDate,index:r.CellBaseDefaultProps.index,children:(0,n.createComponentVNode)(2,s.AllDayPanelTitle)})}),t.map((e=>{let{groups:t,highlighted:a,index:s,isFirstGroupCell:d,isLastGroupCell:c,key:h,startDate:p,text:g}=e;return(0,n.createComponentVNode)(2,l.Row,{className:"dx-scheduler-time-panel-row",leftVirtualCellWidth:l.RowDefaultProps.leftVirtualCellWidth,rightVirtualCellWidth:l.RowDefaultProps.rightVirtualCellWidth,children:(0,n.createComponentVNode)(2,u.TimePanelCell,{viewContext:i,startDate:p,endDate:r.CellBaseDefaultProps.endDate,text:g,groups:t,groupIndex:o,isFirstGroupCell:d,isLastGroupCell:c,index:s,timeCellTemplate:m,highlighted:a})},h)}))],0,d)}))})))}}t.TimePanelTable=g,g.defaultProps=p},46033:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualCellDefaultProps=t.VirtualCell=void 0;var n=i(81167),o=i(49714),a=i(34396),s=i(21339),r=i(12802);const l=t.VirtualCellDefaultProps={width:0,isHeaderCell:!1};class d extends o.BaseInfernoComponent{render(){const{colSpan:e,isHeaderCell:t,width:i,styles:o}=this.props,l=a.renderUtils.addWidthToStyle(i,o),d=t?s.HeaderCell:r.OrdinaryCell;return(0,n.createComponentVNode)(2,d,{className:"dx-scheduler-virtual-cell",styles:l,colSpan:e})}}t.VirtualCell=d,d.defaultProps=l},4053:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualRowDefaultProps=t.VirtualRow=void 0;var n=i(81167),o=i(49714),a=i(34396),s=i(21541),r=i(46033);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}const d=t.VirtualRowDefaultProps=l({},s.RowDefaultProps,{leftVirtualCellWidth:0,rightVirtualCellWidth:0,cellsCount:1});class u extends o.BaseInfernoComponent{constructor(){super(...arguments),this.virtualCells=null}getVirtualCells(){if(null!==this.virtualCells)return this.virtualCells;const{cellsCount:e}=this.props;return this.virtualCells=[...Array(e)],this.virtualCells}componentWillUpdate(e){this.props.cellsCount!==e.cellsCount&&(this.virtualCells=null)}render(){const{className:e,leftVirtualCellCount:t,leftVirtualCellWidth:i,rightVirtualCellCount:o,rightVirtualCellWidth:l,styles:d,height:u}=this.props,c=`dx-scheduler-virtual-row ${e}`,h=a.renderUtils.addHeightToStyle(u,d),p=this.getVirtualCells();return(0,n.createComponentVNode)(2,s.Row,{className:c,styles:h,leftVirtualCellWidth:i,rightVirtualCellWidth:l,leftVirtualCellCount:t,rightVirtualCellCount:o,children:p.map(((e,t)=>(0,n.createComponentVNode)(2,r.VirtualCell,{width:r.VirtualCellDefaultProps.width,isHeaderCell:r.VirtualCellDefaultProps.isHeaderCell},t.toString())))})}}t.VirtualRow=u,u.defaultProps=d},52728:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSizes=t.DATE_TABLE_ROW_CLASS=t.DATE_TABLE_CELL_CLASS=t.ALL_DAY_PANEL_CELL_CLASS=void 0;t.DefaultSizes={allDayPanelHeight:25},t.DATE_TABLE_CELL_CLASS="dx-scheduler-date-table-cell",t.DATE_TABLE_ROW_CLASS="dx-scheduler-date-table-row",t.ALL_DAY_PANEL_CELL_CLASS="dx-scheduler-all-day-table-cell"},19747:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AllDayPanelTitleComponent",{enumerable:!0,get:function(){return n.AllDayPanelTitleComponent}}),Object.defineProperty(t,"AllDayTableComponent",{enumerable:!0,get:function(){return o.AllDayTableComponent}}),Object.defineProperty(t,"DateTableComponent",{enumerable:!0,get:function(){return a.DateTableComponent}}),Object.defineProperty(t,"DateTableMonthComponent",{enumerable:!0,get:function(){return s.DateTableMonthComponent}}),Object.defineProperty(t,"GroupPanelComponent",{enumerable:!0,get:function(){return r.GroupPanelComponent}}),Object.defineProperty(t,"HeaderPanelComponent",{enumerable:!0,get:function(){return l.HeaderPanelComponent}}),Object.defineProperty(t,"HeaderPanelTimelineComponent",{enumerable:!0,get:function(){return d.HeaderPanelTimelineComponent}}),Object.defineProperty(t,"TimePanelComponent",{enumerable:!0,get:function(){return u.TimePanelComponent}});var n=i(83562),o=i(63273),a=i(97641),s=i(71212),r=i(74290),l=i(87286),d=i(96774),u=i(54322)},40802:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateTableMonth=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(74282),r=i(83725);const l=["viewData","viewContext","addDateTableClass","addVerticalSizesClassToRows","dataCellTemplate","groupOrientation","tableRef","width"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}class u extends o.InfernoWrapperComponent{createEffects(){return[(0,o.createReRenderEffect)()]}render(){const e=this.props,{viewData:t,viewContext:i,addDateTableClass:o,addVerticalSizesClassToRows:u,dataCellTemplate:c,groupOrientation:h,tableRef:p,width:g}=e,_=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,l),f=(0,a.getTemplate)(c);return(0,n.normalizeProps)((0,n.createComponentVNode)(2,s.DateTable,d({},_,{viewData:t,viewContext:i,groupOrientation:h,addDateTableClass:o,dataCellTemplate:f,cellTemplate:r.DateTableMonthCell,tableRef:p,addVerticalSizesClassToRows:u,width:g})))}}t.DateTableMonth=u,u.defaultProps=s.DateTableDefaultProps},83725:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateTableMonthCell=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(71312),r=i(48661);class l extends o.BaseInfernoComponent{constructor(){super(...arguments),this.contentTemplateProps=null}getContentTemplateProps(){if(null!==this.contentTemplateProps)return this.contentTemplateProps;const{index:e,text:t}=this.props;return this.contentTemplateProps={data:{text:t},index:e},this.contentTemplateProps}componentWillUpdate(e){this.props.index===e.index&&this.props.text===e.text||(this.contentTemplateProps=null)}render(){const{viewContext:e,dataCellTemplate:t,endDate:i,groupIndex:o,groups:l,index:d,isFirstGroupCell:u,isFocused:c,isLastGroupCell:h,isSelected:p,startDate:g,text:_,className:f,firstDayOfMonth:m,otherMonth:v,today:C}=this.props,y=(0,s.combineClasses)({"dx-scheduler-date-table-other-month":!!v,"dx-scheduler-date-table-current-date":!!C,"dx-scheduler-date-table-first-of-month":!!m,[f??""]:!!f}),b=this.getContentTemplateProps(),x=(0,a.getTemplate)(t);return(0,n.createComponentVNode)(2,r.DateTableCellBase,{className:y,viewContext:e,dataCellTemplate:x,startDate:g,endDate:i,text:_,groups:l,groupIndex:o,index:d,isFirstGroupCell:u,isLastGroupCell:h,isSelected:p,isFocused:c,contentTemplateProps:b,children:(0,n.createVNode)(1,"div","dx-scheduler-date-table-cell-text",_,0)})}}t.DateTableMonthCell=l,l.defaultProps=r.DateTableCallBaseDefaultProps},30737:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimelineDateHeaderLayout=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(3108),r=i(34396),l=i(35689),d=i(60932),u=i(21541);const{isMaterialBased:c}=(0,s.getThemeType)();class h extends o.BaseInfernoComponent{render(){const{viewContext:e,groupByDate:t,groupOrientation:i,groups:o,dateHeaderData:s,dateCellTemplate:l,timeCellTemplate:h}=this.props,{dataMap:p,isMonthDateHeader:g,leftVirtualCellCount:_,leftVirtualCellWidth:f,rightVirtualCellCount:m,rightVirtualCellWidth:v,weekDayLeftVirtualCellCount:C,weekDayLeftVirtualCellWidth:y,weekDayRightVirtualCellCount:b,weekDayRightVirtualCellWidth:x}=s,w=(0,r.isHorizontalGroupingApplied)(o,i)&&!t,S=(0,a.getTemplate)(l),D=(0,a.getTemplate)(h);return(0,n.createFragment)(p.map(((t,i)=>{const o=p.length,a=o-1===i,s=o>1&&0===i,r=c&&(g||s);let l=_,h=m,I=v,E=f;return s&&(l=C,h=b,I=x,E=y),(0,n.createComponentVNode)(2,u.Row,{className:"dx-scheduler-header-row",leftVirtualCellWidth:E??u.RowDefaultProps.leftVirtualCellWidth,leftVirtualCellCount:l,rightVirtualCellWidth:I??u.RowDefaultProps.rightVirtualCellWidth,rightVirtualCellCount:h,children:t.map((t=>{let{colSpan:i,endDate:o,groupIndex:l,groups:u,index:c,isFirstGroupCell:h,isLastGroupCell:p,key:g,startDate:_,text:f,today:m}=t;return(0,n.createComponentVNode)(2,d.DateHeaderCell,{viewContext:e,startDate:_,endDate:o,groups:w?u:void 0,groupIndex:w?l:void 0,today:m??d.DateHeaderCellDefaultProps.today,index:c,text:f,isFirstGroupCell:h,isLastGroupCell:p,isWeekDayCell:s,colSpan:i,splitText:r,dateCellTemplate:S,timeCellTemplate:D,isTimeCellTemplate:a},g)}))},i.toString())})),0)}}t.TimelineDateHeaderLayout=h,h.defaultProps=l.DateHeaderDefaultProps},66921:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderPanelTimeline=void 0;var n=i(81167),o=i(49714),a=i(10632),s=i(20025),r=i(30737);class l extends o.InfernoWrapperComponent{createEffects(){return[(0,o.createReRenderEffect)()]}render(){const{viewContext:e,dateCellTemplate:t,dateHeaderData:i,groupByDate:o,groupOrientation:l,groupPanelData:d,groups:u,isRenderDateHeader:c,resourceCellTemplate:h,timeCellTemplate:p}=this.props,g=(0,a.getTemplate)(t),_=(0,a.getTemplate)(h),f=(0,a.getTemplate)(p);return(0,n.createComponentVNode)(2,s.HeaderPanel,{viewContext:e,dateHeaderData:i,groupPanelData:d,groupByDate:o,groups:u,groupOrientation:l,isRenderDateHeader:c,dateHeaderTemplate:r.TimelineDateHeaderLayout,resourceCellTemplate:_,dateCellTemplate:g,timeCellTemplate:f})}}t.HeaderPanelTimeline=l,l.defaultProps=s.HeaderPanelDefaultProps},83562:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AllDayPanelTitleComponent=void 0;var n,o=(n=i(92848))&&n.__esModule?n:{default:n},a=i(84766),s=i(4011);class r extends a.ComponentWrapper{get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:[],props:[]}}get _viewComponent(){return s.AllDayPanelTitle}}t.AllDayPanelTitleComponent=r,(0,o.default)("dxAllDayPanelTitle",r)},63273:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AllDayTableComponent=void 0;var n,o=(n=i(92848))&&n.__esModule?n:{default:n},a=i(49673),s=i(97641);class r extends s.DateTableComponent{get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["dataCellTemplate"],props:["viewData","viewContext","groupOrientation","leftVirtualCellWidth","rightVirtualCellWidth","topVirtualRowHeight","bottomVirtualRowHeight","addDateTableClass","addVerticalSizesClassToRows","width","dataCellTemplate"]}}get _viewComponent(){return a.AllDayTable}}t.AllDayTableComponent=r,(0,o.default)("dxAllDayTable",r)},97641:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateTableComponent=void 0;var n,o=(n=i(92848))&&n.__esModule?n:{default:n},a=i(84766),s=i(74282);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}class l extends a.ComponentWrapper{_setOptionsByReference(){super._setOptionsByReference(),this._optionsByReference=r({},this._optionsByReference,{dataCellTemplate:!0})}get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["cellTemplate","dataCellTemplate"],props:["viewData","viewContext","cellTemplate","groupOrientation","leftVirtualCellWidth","rightVirtualCellWidth","topVirtualRowHeight","bottomVirtualRowHeight","addDateTableClass","addVerticalSizesClassToRows","width","dataCellTemplate"]}}get _viewComponent(){return s.DateTable}}t.DateTableComponent=l,(0,o.default)("dxDateTableLayoutBase",l)},71212:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateTableMonthComponent=void 0;var n,o=(n=i(92848))&&n.__esModule?n:{default:n},a=i(40802),s=i(97641);class r extends s.DateTableComponent{get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["cellTemplate","dataCellTemplate"],props:["viewData","viewContext","cellTemplate","groupOrientation","leftVirtualCellWidth","rightVirtualCellWidth","topVirtualRowHeight","bottomVirtualRowHeight","addDateTableClass","addVerticalSizesClassToRows","width","dataCellTemplate"]}}get _viewComponent(){return a.DateTableMonth}}t.DateTableMonthComponent=r,(0,o.default)("dxMonthDateTableLayout",r)},74290:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPanelComponent=void 0;var n,o=(n=i(92848))&&n.__esModule?n:{default:n},a=i(84766),s=i(31055);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}class l extends a.ComponentWrapper{_setOptionsByReference(){super._setOptionsByReference(),this._optionsByReference=r({},this._optionsByReference,{resourceCellTemplate:!0})}get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["resourceCellTemplate"],props:["viewContext","groups","groupOrientation","groupPanelData","groupByDate","height","className","resourceCellTemplate"]}}get _viewComponent(){return s.GroupPanel}}t.GroupPanelComponent=l,(0,o.default)("dxGroupPanel",l)},87286:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderPanelComponent=void 0;var n,o=(n=i(92848))&&n.__esModule?n:{default:n},a=i(84766),s=i(20025);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}class l extends a.ComponentWrapper{_setOptionsByReference(){super._setOptionsByReference(),this._optionsByReference=r({},this._optionsByReference,{dateHeaderData:!0,resourceCellTemplate:!0,dateCellTemplate:!0,timeCellTemplate:!0})}get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["dateCellTemplate","timeCellTemplate","dateHeaderTemplate","resourceCellTemplate"],props:["viewContext","dateHeaderData","isRenderDateHeader","dateCellTemplate","timeCellTemplate","dateHeaderTemplate","groups","groupOrientation","groupPanelData","groupByDate","height","className","resourceCellTemplate"]}}get _viewComponent(){return s.HeaderPanel}}t.HeaderPanelComponent=l,(0,o.default)("dxHeaderPanelLayout",l)},96774:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderPanelTimelineComponent=void 0;var n,o=(n=i(92848))&&n.__esModule?n:{default:n},a=i(66921),s=i(87286);class r extends s.HeaderPanelComponent{get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["dateCellTemplate","timeCellTemplate","dateHeaderTemplate","resourceCellTemplate"],props:["viewContext","dateHeaderData","isRenderDateHeader","dateCellTemplate","timeCellTemplate","dateHeaderTemplate","groups","groupOrientation","groupPanelData","groupByDate","height","className","resourceCellTemplate"]}}get _viewComponent(){return a.HeaderPanelTimeline}}t.HeaderPanelTimelineComponent=r,(0,o.default)("dxTimelineHeaderPanelLayout",r)},54322:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimePanelComponent=void 0;var n,o=(n=i(92848))&&n.__esModule?n:{default:n},a=i(84766),s=i(2302);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}class l extends a.ComponentWrapper{_setOptionsByReference(){super._setOptionsByReference(),this._optionsByReference=r({},this._optionsByReference,{timeCellTemplate:!0})}get _propsInfo(){return{twoWay:[],allowNull:[],elements:[],templates:["timeCellTemplate"],props:["viewContext","groupOrientation","timePanelData","timeCellTemplate"]}}get _viewComponent(){return s.TimePanelTable}}t.TimePanelComponent=l,(0,o.default)("dxTimePanelTableLayout",l)},68969:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_TYPES=t.VERTICAL_GROUP_ORIENTATION=t.TIMELINE_VIEWS=t.HORIZONTAL_GROUP_ORIENTATION=void 0;t.VERTICAL_GROUP_ORIENTATION="vertical",t.HORIZONTAL_GROUP_ORIENTATION="horizontal",t.TIMELINE_VIEWS={timelineDay:!0,timelineWeek:!0,timelineWorkWeek:!0,timelineMonth:!0},t.VIEW_TYPES=["day","week","workWeek","month","timelineDay","timelineWeek","timelineWorkWeek","timelineMonth","agenda"]},78133:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"combineRemoteFilter",{enumerable:!0,get:function(){return n.combineRemoteFilter}});var n=i(89755)},89755:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.combineRemoteFilter=void 0;var n,o=i(17781),a=(n=i(71051))&&n.__esModule?n:{default:n},s=i(52576),r=i(11528),l=i(34396);const d=0,u=1;class c{constructor(e){this.options=e}get dataAccessors(){return this.options.dataAccessors}get dataSourceFilter(){return this.options.dataSourceFilter}get dateSerializationFormat(){return this.options.dateSerializationFormat}get forceIsoDateParsing(){return!(0,r.isDefined)(this.options.forceIsoDateParsing)||this.options.forceIsoDateParsing}makeDateFilter(e,t){const{startDateExpr:i,endDateExpr:n,recurrenceRuleExpr:o}=this.dataAccessors.expr,a=[[[n,">=",e],[i,"<",t]],"or",[o,"startswith","freq"],"or",[[n,e],[i,e]]];return o||a.splice(1,2),a}combineFilters(e,t){const i=[];return e&&i.push(e),t&&i.push(t),this.serializeRemoteFilter(i)}serializeRemoteFilter(e){if(!Array.isArray(e))return e;const{startDateExpr:t,endDateExpr:i}=this.dataAccessors.expr,n=(0,s.extend)([],e);if((0,r.isString)(n[0])&&this.forceIsoDateParsing&&n.length>1&&(n[0]===t||n[0]===i)){const e=n[n.length-1];n[n.length-1]=a.default.serializeDate(new Date(e),this.dateSerializationFormat)}for(let e=0;e<n.length;e+=1)n[e]=this.serializeRemoteFilter(n[e]);return n}getUserFilter(e){if(!this.dataSourceFilter||(0,o.equalByValue)(this.dataSourceFilter,e))return;return this.dataSourceFilter.length>0&&(0,o.equalByValue)(this.dataSourceFilter[d],e)?this.dataSourceFilter[u]:this.dataSourceFilter}combine(e,t){const[i,n]=(0,l.getDatesWithoutTime)(e,t),o=this.makeDateFilter(i,n),a=this.getUserFilter(o);return this.combineFilters(o,a)}}t.combineRemoteFilter=e=>new c(e).combine(e.min,e.max)},90023:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;t.Semaphore=class{constructor(){this.counter=0}isFree(){return 0===this.counter}take(){this.counter+=1}release(){this.counter-=1,this.counter<0&&(this.counter=0)}}},25109:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimeZoneCalculator=void 0;var n,o=(n=i(41380))&&n.__esModule?n:{default:n},a=i(11528),s=i(55594),r=i(47554);const l=o.default.dateToMilliseconds;t.TimeZoneCalculator=class{constructor(e){this.options=e}createDate(e,t){const i=new Date(e);switch(t.path){case r.PathTimeZoneConversion.fromSourceToAppointment:return this.getConvertedDate(i,t.appointmentTimeZone,!0,!1);case r.PathTimeZoneConversion.fromAppointmentToSource:return this.getConvertedDate(i,t.appointmentTimeZone,!0,!0);case r.PathTimeZoneConversion.fromSourceToGrid:return this.getConvertedDate(i,t.appointmentTimeZone,!1,!1);case r.PathTimeZoneConversion.fromGridToSource:return this.getConvertedDate(i,t.appointmentTimeZone,!1,!0);default:throw new Error("not specified pathTimeZoneConversion")}}getOffsets(e,t){const i=-this.getClientOffset(e)/o.default.dateToMilliseconds("hour"),n=this.getCommonOffset(e),s=this.getAppointmentOffset(e,t);return{client:i,common:(0,a.isDefined)(n)?n:i,appointment:"number"!=typeof s?i:s}}getConvertedDateByOffsets(e,t,i,n){const o=n?-1:1,a=new Date(e);return s.dateUtilsTs.addOffsets(a,[o*(l("hour")*i),-o*(l("hour")*t)])}getOriginStartDateOffsetInMs(e,t,i){return 36e5*this.getOffsetInHours(e,t,i)}getOffsetInHours(e,t,i){const{client:n,appointment:o,common:a}=this.getOffsets(e,t);return t&&i?o-n:t&&!i?o-a:!t&&i?a-n:0}getClientOffset(e){return this.options.getClientOffset(e)}getCommonOffset(e){return this.options.tryGetCommonOffset(e)}getAppointmentOffset(e,t){return this.options.tryGetAppointmentOffset(e,t)}getConvertedDate(e,t,i,n){const o=new Date(e.getTime()),a=this.getOffsets(o,t);return i&&t?this.getConvertedDateByOffsets(e,a.client,a.appointment,n):this.getConvertedDateByOffsets(e,a.client,a.common,n)}}},47554:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PathTimeZoneConversion=void 0,function(e){e.fromSourceToAppointment="toAppointment",e.fromAppointmentToSource="fromAppointment",e.fromSourceToGrid="toGrid",e.fromGridToSource="fromGrid"}(i||(t.PathTimeZoneConversion=i={}))},97777:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PathTimeZoneConversion",{enumerable:!0,get:function(){return o.PathTimeZoneConversion}}),Object.defineProperty(t,"TimeZoneCalculator",{enumerable:!0,get:function(){return n.TimeZoneCalculator}}),Object.defineProperty(t,"createTimeZoneCalculator",{enumerable:!0,get:function(){return a.createTimeZoneCalculator}});var n=i(25109),o=i(47554),a=i(88476)},88476:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createTimeZoneCalculator=void 0;var n,o=(n=i(18648))&&n.__esModule?n:{default:n},a=i(25109);t.createTimeZoneCalculator=e=>new a.TimeZoneCalculator({getClientOffset:e=>o.default.getClientTimezoneOffset(e),tryGetCommonOffset:t=>o.default.calculateTimezoneByValue(e,t),tryGetAppointmentOffset:(e,t)=>o.default.calculateTimezoneByValue(t,e)})},64722:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateStartViewDate=void 0;var n=i(44611);t.calculateStartViewDate=(e,t)=>{const i=new Date(e);return(0,n.setOptionHour)(i,t)}},44611:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.splitNumber=t.setOptionHour=t.isVerticalGroupingApplied=t.isTimelineView=t.isHorizontalView=t.isHorizontalGroupingApplied=t.isGroupingByDate=t.isFirstCellInMonthWithIntervalCount=t.isDateInRange=t.isDateAndTimeView=t.isDataOnWeekend=t.hasResourceValue=t.getWeekendsCount=t.getViewStartByOptions=t.getVerticalGroupCountClass=t.getValidCellDateForLocalTimeFormat=t.getTotalRowCountByCompleteData=t.getTotalCellCountByCompleteData=t.getToday=t.getStartViewDateWithoutDST=t.getStartViewDateTimeOffset=t.getSkippedHoursInRange=t.getOverflowIndicatorColor=t.getKeyByGroup=t.getIsGroupedAllDayPanel=t.getHorizontalGroupCount=t.getHeaderCellText=t.getGroupPanelData=t.getGroupCount=t.getDisplayedRowCount=t.getDisplayedCellCount=t.getDatesWithoutTime=t.getCellDuration=t.getCalculatedFirstDayOfWeek=t.getAppointmentTakesAllDay=t.getAppointmentRenderingStrategyName=t.getAppointmentKey=t.extendGroupItemsForGroupingByDate=t.calculateViewStartDate=t.calculateIsGroupedAllDayPanel=t.calculateDayDuration=t.calculateCellIndex=void 0;var n=h(i(38662)),o=i(17781),a=h(i(41380)),s=i(11528),r=i(55594),l=i(80126),d=i(8687),u=h(i(18648)),c=i(68969);function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},p.apply(null,arguments)}const g=a.default.dateToMilliseconds,_=36e5;t.getDatesWithoutTime=(e,t)=>{const i=a.default.trimTime(e),n=a.default.trimTime(t);return n.setDate(n.getDate()+1),[i,n]};t.getAppointmentRenderingStrategyName=e=>{const{renderingStrategy:t}={day:{renderingStrategy:"vertical"},week:{renderingStrategy:"week"},workWeek:{renderingStrategy:"week"},month:{renderingStrategy:"horizontalMonth"},timelineDay:{renderingStrategy:"horizontal"},timelineWeek:{renderingStrategy:"horizontal"},timelineWorkWeek:{renderingStrategy:"horizontal"},timelineMonth:{renderingStrategy:"horizontalMonthLine"},agenda:{renderingStrategy:"agenda"}}[e];return t};t.getAppointmentTakesAllDay=(e,t)=>{const{startDate:i,endDate:n,allDay:o}=e;switch(t){case"hidden":return!1;case"allDay":return o;default:return!!o||!!(0,s.isDefined)(n)&&((e,t)=>Math.floor((t.getTime()-e.getTime())/g("hour")))(i,n)>=24}};t.getAppointmentKey=e=>{const{left:t,top:i,width:n,height:o}=e;return`${t}-${i}-${n}-${o}`};t.hasResourceValue=(e,t)=>(0,s.isDefined)(e.find((e=>(0,o.equalByValue)(e,t))));t.getOverflowIndicatorColor=(e,t)=>t.length&&0!==t.filter((t=>t!==e)).length?void 0:e;t.getVerticalGroupCountClass=e=>{switch(null==e?void 0:e.length){case 1:return l.VERTICAL_GROUP_COUNT_CLASSES[0];case 2:return l.VERTICAL_GROUP_COUNT_CLASSES[1];case 3:return l.VERTICAL_GROUP_COUNT_CLASSES[2];default:return}};t.setOptionHour=(e,t)=>{const i=new Date(e);return(0,s.isDefined)(t)?(i.setHours(t,t%1*60,0,0),i):i};const f=(e,t)=>t-e;t.calculateDayDuration=f;const m=(e,t)=>{const i=Math.floor(t);return u.default.isTimezoneChangeInDate(e)&&i!==e.getHours()?a.default.dateToMilliseconds("hour"):0};t.getStartViewDateTimeOffset=m;t.getValidCellDateForLocalTimeFormat=(e,t)=>{let{startViewDate:i,startDayHour:n,cellIndexShift:o,viewOffset:a}=t;const s=r.dateUtilsTs.addOffsets(e,[-a]);if(!u.default.isTimezoneChangeInDate(s))return e;const l=new Date(new Date(i).setDate(i.getDate()+2)),d=m(i,n);return r.dateUtilsTs.addOffsets(l,[a,o,-d])};const v=e=>e[e.length-1].length;t.getTotalCellCountByCompleteData=v;t.getDisplayedCellCount=(e,t)=>e??v(t);t.getHeaderCellText=(e,t,i,o,a)=>{const s=o(e,t,a);return n.default.format(s,i)};const C=(e,t)=>t===c.VERTICAL_GROUP_ORIENTATION&&!!e.length;t.isVerticalGroupingApplied=C;const y=e=>{let t=0;for(let i=0,n=e.length;i<n;i+=1)i?t*=e[i].items.length:t=e[i].items.length;return t};t.getGroupCount=y;t.getHorizontalGroupCount=(e,t)=>{const i=y(e)||1;return C(e,t)?1:i};t.isTimelineView=e=>!!c.TIMELINE_VIEWS[e];t.isDateAndTimeView=e=>e!==d.VIEWS.TIMELINE_MONTH&&e!==d.VIEWS.MONTH;t.isHorizontalView=e=>{switch(e){case d.VIEWS.TIMELINE_DAY:case d.VIEWS.TIMELINE_WEEK:case d.VIEWS.TIMELINE_WORK_WEEK:case d.VIEWS.TIMELINE_MONTH:case d.VIEWS.MONTH:return!0;default:return!1}};const b=(e,t,i,n)=>n>0?a.default.dateInRange(e,t,new Date(i.getTime()-1)):a.default.dateInRange(e,i,t,"date");t.isDateInRange=b;t.isFirstCellInMonthWithIntervalCount=(e,t)=>1===e.getDate()&&t>1;t.getViewStartByOptions=(e,t,i,n)=>{if(!e)return new Date(t);let o=a.default.trimTime(n);const s=o.getTime()<=t.getTime()?1:-1;let r=new Date(o.getTime()+i*s);for(;!b(t,o,r,s);)o=r,r=new Date(o.getTime()+i*s);return s>0?o:r};t.calculateIsGroupedAllDayPanel=(e,t,i)=>C(e,t)&&i;t.calculateViewStartDate=e=>e;t.getCellDuration=(e,t,i,n)=>{switch(e){case"month":return 36e5*f(t,i);case"timelineMonth":return a.default.dateToMilliseconds("day");default:return 36e5*n}};t.calculateCellIndex=(e,t,i)=>t*i+e;const x=e=>e.length;t.getTotalRowCountByCompleteData=x;t.getDisplayedRowCount=(e,t)=>e??x(t);t.getStartViewDateWithoutDST=(e,t)=>{const i=u.default.getDateWithoutTimezoneChange(e);return i.setHours(t),i};t.getIsGroupedAllDayPanel=(e,t)=>e&&t;t.getKeyByGroup=(e,t)=>t&&e?e.toString():"0";t.getToday=(e,t)=>{const i=e??new Date;return(null==t?void 0:t.createDate(i,{path:"toGrid"}))||i};t.getCalculatedFirstDayOfWeek=e=>(0,s.isDefined)(e)?e:n.default.firstDayOfWeekIndex();const w=(e,t)=>t===c.HORIZONTAL_GROUP_ORIENTATION&&!!e.length;t.isHorizontalGroupingApplied=w;t.isGroupingByDate=(e,t,i)=>{const n=w(e,t);return i&&n};t.getSkippedHoursInRange=(e,t,i,n)=>{const o=i&&!n.viewType.includes("timeline");let a=0;const s=new Date(e);s.setDate(s.getDate()+1),s.setHours(0,0,0,0);const r=new Date(t);r.setHours(0,0,0,0);const{startDayHour:l,endDayHour:d}=n.getViewOptions(),u=o?24:d-l;for(;s<r;)n.isSkippedDate(s)&&(a+=u),s.setDate(s.getDate()+1);const c=e.getHours(),h=t.getHours()+t.getTime()%_/_;return n.isSkippedDate(e)&&(o?a+=24:c<l?a+=u:c<d&&(a+=d-c)),n.isSkippedDate(t)&&(o?a+=24:h>d?a+=u:h>l&&(a+=h-l)),a};t.isDataOnWeekend=e=>{const t=e.getDay();return 6===t||0===t};t.getWeekendsCount=e=>2*Math.floor(e/7);const S=(e,t)=>[...new Array(t)].reduce(((t,i,n)=>e.map(((e,i)=>[...t[i]||[],...e.map(((t,i)=>p({},t,{key:`${t.key}_group_by_date_${n}`,isFirstGroupCell:0===i,isLastGroupCell:i===e.length-1})))]))),[]);t.extendGroupItemsForGroupingByDate=S;t.getGroupPanelData=(e,t,i,n)=>{let o=1,a=e.map((e=>{const t=[],{name:i,items:n,data:a}=e;for(let e=0;e<o;e+=1)t.push(...n.map(((t,n)=>{let{id:o,text:s,color:r}=t;return{id:o,text:s,color:r,key:`${e}_${i}_${o}`,resourceName:i,data:null==a?void 0:a[n]}})));return o*=n.length,t}));return i&&(a=S(a,t)),{groupPanelItems:a,baseColSpan:n}};t.splitNumber=(e,t)=>Array.from({length:Math.ceil(e/t)},((i,n)=>Math.min(e-t*n,t)))},2498:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveDataItems=t.getPreparedDataItems=void 0;var n=i(11528),o=i(2807),a=i(66823);t.getPreparedDataItems=(e,t,i,s)=>{const r=[];return null==e||e.forEach((e=>{var l;const d=new Date(t.getter.startDate(e)),u=new Date(t.getter.endDate(e));(0,o.replaceWrongEndDate)(e,d,u,i,t);const c=(0,a.createAppointmentAdapter)(e,t,s),h=c.startDate&&c.calculateStartDate("toGrid"),p=c.endDate&&c.calculateEndDate("toGrid"),g=new RegExp("freq","gi"),_=c.recurrenceRule,f=!(null==_||null===(l=_.match(g))||void 0===l||!l.length),m=!(0,n.isDefined)(e.visible)||!!e.visible;h&&p&&r.push({allDay:!!c.allDay,startDate:h,startDateTimeZone:e.startDateTimeZone,endDate:p,endDateTimeZone:e.endDateTimeZone,recurrenceRule:c.recurrenceRule,recurrenceException:c.recurrenceException,hasRecurrenceRule:f,visible:m,rawAppointment:e})})),r};t.resolveDataItems=e=>Array.isArray(e)?e:e.data},69082:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateStartViewDate=void 0;var n=i(44611);t.calculateStartViewDate=(e,t,i,o)=>{const a=(0,n.getViewStartByOptions)(i,e,o,i);return(0,n.setOptionHour)(a,t)}},98090:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.excludeFromRecurrence=void 0;var n,o=(n=i(71051))&&n.__esModule?n:{default:n},a=i(66823);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}const r=(e,t)=>{const i=[];var n,a;return e.recurrenceException&&i.push(e.recurrenceException),i.push((n=t,a=e.startDate,e.allDay&&n.setHours(a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()),o.default.serializeDate(n,"yyyyMMddTHHmmssZ"))),i.join()};t.excludeFromRecurrence=(e,t,i,n)=>{const o=(0,a.createAppointmentAdapter)(s({},e),i,n);return o.recurrenceException=r(o,t),o}},28524:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.formatWeekdayAndDay=t.formatWeekday=void 0;var n,o=(n=i(38662))&&n.__esModule?n:{default:n};const a=e=>o.default.getDayNames("abbreviated")[e.getDay()];t.formatWeekday=a;t.formatWeekdayAndDay=e=>`${a(e)} ${o.default.format(e,"day")}`},34396:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.agendaUtils=void 0,Object.defineProperty(t,"calculateCellIndex",{enumerable:!0,get:function(){return p.calculateCellIndex}}),Object.defineProperty(t,"calculateDayDuration",{enumerable:!0,get:function(){return p.calculateDayDuration}}),Object.defineProperty(t,"calculateIsGroupedAllDayPanel",{enumerable:!0,get:function(){return p.calculateIsGroupedAllDayPanel}}),Object.defineProperty(t,"calculateViewStartDate",{enumerable:!0,get:function(){return p.calculateViewStartDate}}),t.dayUtils=void 0,Object.defineProperty(t,"excludeFromRecurrence",{enumerable:!0,get:function(){return _.excludeFromRecurrence}}),Object.defineProperty(t,"extendGroupItemsForGroupingByDate",{enumerable:!0,get:function(){return p.extendGroupItemsForGroupingByDate}}),Object.defineProperty(t,"formatWeekday",{enumerable:!0,get:function(){return f.formatWeekday}}),Object.defineProperty(t,"formatWeekdayAndDay",{enumerable:!0,get:function(){return f.formatWeekdayAndDay}}),Object.defineProperty(t,"getAppointmentKey",{enumerable:!0,get:function(){return p.getAppointmentKey}}),Object.defineProperty(t,"getAppointmentRenderingStrategyName",{enumerable:!0,get:function(){return p.getAppointmentRenderingStrategyName}}),Object.defineProperty(t,"getAppointmentTakesAllDay",{enumerable:!0,get:function(){return p.getAppointmentTakesAllDay}}),Object.defineProperty(t,"getCalculatedFirstDayOfWeek",{enumerable:!0,get:function(){return p.getCalculatedFirstDayOfWeek}}),Object.defineProperty(t,"getCellDuration",{enumerable:!0,get:function(){return p.getCellDuration}}),Object.defineProperty(t,"getDatesWithoutTime",{enumerable:!0,get:function(){return p.getDatesWithoutTime}}),Object.defineProperty(t,"getDisplayedCellCount",{enumerable:!0,get:function(){return p.getDisplayedCellCount}}),Object.defineProperty(t,"getDisplayedRowCount",{enumerable:!0,get:function(){return p.getDisplayedRowCount}}),Object.defineProperty(t,"getGroupCount",{enumerable:!0,get:function(){return p.getGroupCount}}),Object.defineProperty(t,"getGroupPanelData",{enumerable:!0,get:function(){return p.getGroupPanelData}}),Object.defineProperty(t,"getHeaderCellText",{enumerable:!0,get:function(){return p.getHeaderCellText}}),Object.defineProperty(t,"getHorizontalGroupCount",{enumerable:!0,get:function(){return p.getHorizontalGroupCount}}),Object.defineProperty(t,"getIsGroupedAllDayPanel",{enumerable:!0,get:function(){return p.getIsGroupedAllDayPanel}}),Object.defineProperty(t,"getKeyByGroup",{enumerable:!0,get:function(){return p.getKeyByGroup}}),Object.defineProperty(t,"getOverflowIndicatorColor",{enumerable:!0,get:function(){return p.getOverflowIndicatorColor}}),Object.defineProperty(t,"getPreparedDataItems",{enumerable:!0,get:function(){return g.getPreparedDataItems}}),Object.defineProperty(t,"getSkippedHoursInRange",{enumerable:!0,get:function(){return p.getSkippedHoursInRange}}),Object.defineProperty(t,"getStartViewDateTimeOffset",{enumerable:!0,get:function(){return p.getStartViewDateTimeOffset}}),Object.defineProperty(t,"getStartViewDateWithoutDST",{enumerable:!0,get:function(){return p.getStartViewDateWithoutDST}}),Object.defineProperty(t,"getToday",{enumerable:!0,get:function(){return p.getToday}}),Object.defineProperty(t,"getTotalCellCountByCompleteData",{enumerable:!0,get:function(){return p.getTotalCellCountByCompleteData}}),Object.defineProperty(t,"getTotalRowCountByCompleteData",{enumerable:!0,get:function(){return p.getTotalRowCountByCompleteData}}),Object.defineProperty(t,"getValidCellDateForLocalTimeFormat",{enumerable:!0,get:function(){return p.getValidCellDateForLocalTimeFormat}}),Object.defineProperty(t,"getVerticalGroupCountClass",{enumerable:!0,get:function(){return p.getVerticalGroupCountClass}}),Object.defineProperty(t,"getViewStartByOptions",{enumerable:!0,get:function(){return p.getViewStartByOptions}}),Object.defineProperty(t,"getWeekendsCount",{enumerable:!0,get:function(){return p.getWeekendsCount}}),Object.defineProperty(t,"hasResourceValue",{enumerable:!0,get:function(){return p.hasResourceValue}}),Object.defineProperty(t,"isDataOnWeekend",{enumerable:!0,get:function(){return p.isDataOnWeekend}}),Object.defineProperty(t,"isDateAndTimeView",{enumerable:!0,get:function(){return p.isDateAndTimeView}}),Object.defineProperty(t,"isDateInRange",{enumerable:!0,get:function(){return p.isDateInRange}}),Object.defineProperty(t,"isFirstCellInMonthWithIntervalCount",{enumerable:!0,get:function(){return p.isFirstCellInMonthWithIntervalCount}}),Object.defineProperty(t,"isGroupingByDate",{enumerable:!0,get:function(){return p.isGroupingByDate}}),Object.defineProperty(t,"isHorizontalGroupingApplied",{enumerable:!0,get:function(){return p.isHorizontalGroupingApplied}}),Object.defineProperty(t,"isHorizontalView",{enumerable:!0,get:function(){return p.isHorizontalView}}),Object.defineProperty(t,"isTimelineView",{enumerable:!0,get:function(){return p.isTimelineView}}),Object.defineProperty(t,"isVerticalGroupingApplied",{enumerable:!0,get:function(){return p.isVerticalGroupingApplied}}),t.renderUtils=t.monthUtils=void 0,Object.defineProperty(t,"setOptionHour",{enumerable:!0,get:function(){return p.setOptionHour}}),Object.defineProperty(t,"splitNumber",{enumerable:!0,get:function(){return p.splitNumber}}),t.workWeekUtils=t.weekUtils=t.viewsUtils=t.timelineWeekUtils=t.timelineMonthUtils=t.themeUtils=void 0;var n=i(3108),o=i(64722),a=i(69082),s=i(82722),r=i(33930),l=i(98616),d=i(13516),u=i(22150),c=i(3962),h=i(19442),p=i(44611),g=i(2498),_=i(98090),f=i(28524);t.agendaUtils={calculateStartViewDate:o.calculateStartViewDate},t.dayUtils={calculateStartViewDate:a.calculateStartViewDate},t.weekUtils={getIntervalDuration:c.getIntervalDuration,getTimePanelCellText:c.getTimePanelCellText,calculateStartViewDate:c.calculateStartViewDate,calculateViewStartDate:c.calculateViewStartDate},t.workWeekUtils={calculateStartViewDate:h.calculateStartViewDate},t.monthUtils={getViewStartByOptions:s.getViewStartByOptions,getCellText:s.getCellText,calculateCellIndex:s.calculateCellIndex,calculateStartViewDate:s.calculateStartViewDate},t.timelineWeekUtils={getDateForHeaderText:d.getDateForHeaderText},t.timelineMonthUtils={calculateStartViewDate:l.calculateStartViewDate},t.viewsUtils={getCurrentView:u.getCurrentView},t.renderUtils={addToStyles:r.addToStyles,addWidthToStyle:r.addWidthToStyle,addHeightToStyle:r.addHeightToStyle,getGroupCellClasses:r.getGroupCellClasses,getCellSizeHorizontalClass:r.getCellSizeHorizontalClass,getCellSizeVerticalClass:r.getCellSizeVerticalClass},t.themeUtils={getThemeType:n.getThemeType}},82722:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getViewStartByOptions=t.getCellText=t.calculateStartViewDate=t.calculateCellIndex=void 0;var n=s(i(38662)),o=s(i(41380)),a=i(44611);function s(e){return e&&e.__esModule?e:{default:e}}t.calculateCellIndex=(e,t,i,n)=>e*n+t;const r=(e,t,i,n)=>{if(!e)return new Date(t);let o=new Date(n);const s=new Date(n),r=o.getTime()<=t.getTime()?1:-1;let l=new Date(new Date(s.setMonth(s.getMonth()+r*i)));for(;!(0,a.isDateInRange)(t,o,l,r);)o=new Date(l),r>0&&o.setDate(1),l=new Date(new Date(l.setMonth(l.getMonth()+r*i)));return r>0?o:l};t.getViewStartByOptions=r;t.getCellText=(e,t)=>{if((0,a.isFirstCellInMonthWithIntervalCount)(e,t)){return[n.default.getMonthNames("abbreviated")[e.getMonth()],n.default.format(e,"day")].join(" ")}return n.default.format(e,"dd")};t.calculateStartViewDate=(e,t,i,n,s)=>{const l=r(i,e,n,o.default.getFirstMonthDate(i)),d=o.default.getFirstMonthDate(l),u=(0,a.getCalculatedFirstDayOfWeek)(s),c=o.default.getFirstWeekDate(d,u);return(0,a.setOptionHour)(c,t)}},33930:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getGroupCellClasses=t.getCellSizeVerticalClass=t.getCellSizeHorizontalClass=t.addWidthToStyle=t.addToStyles=t.addHeightToStyle=void 0;var n=i(71312);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}const a=(e,t)=>{const i=t??{},n=o({},i);return e.forEach((e=>{let{attr:t,value:o}=e;n[t]=o||i[t]})),n};t.addToStyles=a;t.addWidthToStyle=(e,t)=>a([{attr:"width",value:e?`${e}px`:""}],t);t.addHeightToStyle=(e,t)=>a([{attr:"height",value:e?`${e}px`:""}],t);t.getGroupCellClasses=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,n.combineClasses)({"dx-scheduler-first-group-cell":e,"dx-scheduler-last-group-cell":t,[i]:!0})};t.getCellSizeHorizontalClass=(e,t)=>{const i="dx-scheduler-cell-sizes-horizontal";switch(e){case"day":case"week":case"workWeek":case"month":return t?i:"";default:return i}};t.getCellSizeVerticalClass=e=>e?"":"dx-scheduler-cell-sizes-vertical"},3108:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getThemeType=void 0;var n=i(52071);t.getThemeType=()=>{const e=(0,n.current)();return{isCompact:(0,n.isCompact)(e),isMaterial:(0,n.isMaterial)(e),isFluent:(0,n.isFluent)(e),isMaterialBased:(0,n.isMaterialBased)(e)}}},98616:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateStartViewDate=void 0;var n,o=(n=i(41380))&&n.__esModule?n:{default:n},a=i(44611),s=i(82722);t.calculateStartViewDate=(e,t,i,n)=>{const r=o.default.getFirstMonthDate((0,s.getViewStartByOptions)(i,e,n,o.default.getFirstMonthDate(i)));return(0,a.setOptionHour)(r,t)}},13516:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getDateForHeaderText=void 0;var n=i(44611);t.getDateForHeaderText=(e,t,i)=>{let{startDayHour:o,startViewDate:a,cellCountInDay:s,interval:r,viewOffset:l}=i;return(0,n.getValidCellDateForLocalTimeFormat)(t,{startViewDate:a,startDayHour:o,cellIndexShift:e%s*r,viewOffset:l})}},22150:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentView=void 0;var n=i(11528),o=i(68969);t.getCurrentView=(e,t)=>{let i=t.find((t=>!!((0,n.isObject)(t)?[t.name,t.type]:[t]).includes(e)));return void 0===i&&(o.VIEW_TYPES.includes(e)?i=e:[i]=t),i}},3962:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getValidStartDate=t.getTimePanelCellText=t.getIntervalDuration=t.calculateViewStartDate=t.calculateStartViewDate=void 0;var n=s(i(38662)),o=s(i(41380)),a=i(44611);function s(e){return e&&e.__esModule?e:{default:e}}t.getTimePanelCellText=(e,t,i,o,s,r)=>{if(e%2!=0)return"";const l=(0,a.getValidCellDateForLocalTimeFormat)(t,{startViewDate:i,startDayHour:s,cellIndexShift:Math.round(o)*e,viewOffset:r});return n.default.format(l,"shorttime")};t.getIntervalDuration=e=>7*o.default.dateToMilliseconds("day")*e;const r=(e,t)=>e?o.default.getFirstWeekDate(e,t):void 0;t.getValidStartDate=r;t.calculateStartViewDate=(e,t,i,n,s)=>{const l=(0,a.getCalculatedFirstDayOfWeek)(s),d=(0,a.getViewStartByOptions)(i,e,n,r(i,l)),u=o.default.getFirstWeekDate(d,l);return(0,a.setOptionHour)(u,t)};t.calculateViewStartDate=(e,t)=>{const i=t??n.default.firstDayOfWeekIndex();return o.default.getFirstWeekDate(e,i)}},19442:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateStartViewDate=void 0;var n,o=(n=i(41380))&&n.__esModule?n:{default:n},a=i(44611),s=i(3962);t.calculateStartViewDate=(e,t,i,n,r)=>{const l=(0,a.getViewStartByOptions)(i,e,n,(0,s.getValidStartDate)(i,r)),d=o.default.getFirstWeekDate(l,r);if((0,a.isDataOnWeekend)(d)){const e=(8-d.getDay())%7;d.setDate(d.getDate()+e)}return(0,a.setOptionHour)(d,t)}},14834:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AgendaResourceProcessor=void 0;var n=i(94487),o=i(87739),a=i(45629);class s{constructor(e,t){this.rawAppointment=e,this.promise=t}}t.AgendaResourceProcessor=class{get resourceDeclarations(){return this._resourceDeclarations}set resourceDeclarations(e){this._resourceDeclarations=e,this.isLoaded=!1,this.isLoading=!1,this.resourceMap.clear(),this.appointmentPromiseQueue=[]}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._resourceDeclarations=e,this.isLoaded=!1,this.isLoading=!1,this.resourceMap=new Map,this.appointmentPromiseQueue=[]}_pushAllResources(){this.appointmentPromiseQueue.forEach((e=>{let{promise:t,rawAppointment:i}=e;const o=[];this.resourceMap.forEach(((e,t)=>{const a={label:e.label,values:[]};t in i&&(0,n.wrapToArray)(i[t]).forEach((t=>a.values.push(e.map.get(t)))),a.values.length&&o.push(a)})),t.resolve(o)})),this.appointmentPromiseQueue=[]}_onPullResource(e,t,i,n,o){const a=new Map;o.forEach((e=>a.set(e[t],e[i]))),this.resourceMap.set(e,{label:n,map:a})}_hasResourceDeclarations(e){return 0!==e.length||(this.appointmentPromiseQueue.forEach((e=>{let{promise:t}=e;return t.resolve([])})),this.appointmentPromiseQueue=[],!1)}_tryPullResources(e,t){if(!this.isLoading){this.isLoading=!0;const i=[];e.forEach((e=>{const t=(new o.Deferred).done((t=>this._onPullResource((0,a.getFieldExpr)(e),(0,a.getValueExpr)(e),(0,a.getDisplayExpr)(e),e.label,t)));i.push(t);const n=(0,a.getWrappedDataSource)(e.dataSource);n.isLoaded()?t.resolve(n.items()):n.load().done((e=>t.resolve(e))).fail((()=>t.reject()))})),o.when.apply(null,i).done((()=>{this.isLoaded=!0,this.isLoading=!1,this._pushAllResources()})).fail((()=>t.reject()))}}initializeState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.resourceDeclarations=e}createListAsync(e){const t=new o.Deferred;return this.appointmentPromiseQueue.push(new s(e,t)),this._hasResourceDeclarations(this.resourceDeclarations)&&(this.isLoaded?this._pushAllResources():this._tryPullResources(this.resourceDeclarations,t)),t.promise()}}},45629:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setResourceToAppointment=t.reduceResourcesTree=t.loadResources=t.isResourceMultiple=t.groupAppointmentsByResourcesCore=t.groupAppointmentsByResources=t.getWrappedDataSource=t.getValueExpr=t.getResourcesDataByGroups=t.getResourceTreeLeaves=t.getResourceColor=t.getResourceByField=t.getPathToLeaf=t.getPaintedResources=t.getOrLoadResourceItem=t.getNormalizedResources=t.getGroupsObjectFromGroupsArray=t.getFieldExpr=t.getDisplayExpr=t.getDataAccessors=t.getCellGroups=t.getAppointmentColor=t.getAllGroups=t.filterResources=t.createResourcesTree=t.createResourceEditorModel=t.createReducedResourcesTree=t.createExpressions=void 0;var n=i(68216),o=i(97169),a=i(94487),s=i(17781),r=i(31e3),l=i(87739),d=i(52576),u=i(21274),c=i(22263),h=i(11528),p=i(52071),g=i(34396);function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_.apply(null,arguments)}const f=e=>e.valueExpr||"id";t.getValueExpr=f;const m=e=>e.displayExpr||"text";t.getDisplayExpr=m;const v=e=>e.fieldExpr||e.field;t.getFieldExpr=v;const C=e=>{if(e instanceof n.DataSource)return e;const t=_({},(0,o.normalizeDataSourceOptions)(e),{pageSize:0});return Array.isArray(e)||(t.filter=e.filter),new n.DataSource(t)};t.getWrappedDataSource=C;const y=e=>{let t=0;const i=(n,o,a,s)=>{a=a||[];for(let l=0;l<n.items.length;l++){var r;const d=n.items[l],u={name:n.name,value:d.id,title:d.text,data:null===(r=n.data)||void 0===r?void 0:r[l],children:[],parent:s||null},c=o+1;e[c]&&i(e[c],c,u.children,u),u.children.length||(u.leafIndex=t,t++),a.push(u)}return a};return i(e[0],0)};t.createResourcesTree=y;const b=(e,t)=>{const i=y(t),n=(e,t)=>{for(let i=0;i<e.length;i++){if(e[i].leafIndex===t)return e[i];const o=n(e[i].children,t);if(o)return o}},o=(e,t)=>((t=t||[]).push(e.value),e.parent&&o(e.parent,t),t),a=n(i,e);return o(a).reverse()};t.getPathToLeaf=b;const x=(e,t)=>{const i=[];if((0,g.getGroupCount)(t)){if(e<0)return;const n=b(e,t);for(let e=0;e<t.length;e++)i.push({name:t[e].name,id:n[e]})}return i};t.getCellGroups=x;const w=e=>e.reduce(((e,t)=>{let{name:i,id:n}=t;return _({},e,{[i]:n})}),{});t.getGroupsObjectFromGroupsArray=w;t.getAllGroups=e=>{const t=(0,g.getGroupCount)(e);return[...new Array(t)].map(((t,i)=>{const n=x(i,e);return w(n)}))};const S=(e,t)=>{for(let i=0;i<t.length;i++){const n=t[i];if(n.name===e)return n.data}return[]};t.getResourceByField=S;t.createResourceEditorModel=(e,t)=>e.map((e=>{const i=v(e),n=S(i,t);return{editorOptions:{dataSource:n.length?n:C(e.dataSource),displayExpr:m(e),valueExpr:f(e),stylingMode:(0,p.isFluent)((0,p.current)())?"filled":"outlined"},dataField:i,editorType:e.allowMultiple?"dxTagBox":"dxSelectBox",label:{text:e.label||i}}}));const D=(e,t)=>{const i=e.find((e=>v(e)===t));return!(null==i||!i.allowMultiple)};t.isResourceMultiple=D;const I=(e,t)=>e.filter((e=>{const i=v(e);return t.indexOf(i)>-1}));t.filterResources=I;const E=(e,t)=>{const i=t||[],n=e.find((e=>e.useColorAsDefault));if(n)return n;const o=i.length?I(e,i):e;return o[o.length-1]};t.getPaintedResources=E;const T=(e,t,i,n)=>{const o=new l.Deferred;return e.filter((e=>v(e)===i&&(0,h.isDefined)(e.dataSource))).forEach((e=>{const a=C(e.dataSource),l=f(e);t.has(i)||t.set(i,a.load()),t.get(i).done((e=>{const t=(0,r.compileGetter)(l),i=e.filter((e=>(0,s.equalByValue)(t(e),n)));o.resolve(i[0])})).fail((()=>{t.delete(i),o.reject()}))})),o.promise()};t.getOrLoadResourceItem=T;const A=(e,t,i)=>e[i][t];t.getDataAccessors=A;t.groupAppointmentsByResources=function(e,t){let i={0:t};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).length&&e.loadedResources.length&&(i=O(e,t,e.loadedResources));let n=0;e.loadedResources.forEach(((e,t)=>{t?n*=e.items.length:n=e.items.length}));for(let e=0;e<n;e++){const t=e.toString();i[t]||(i[t]=[])}return i};const O=(e,t,i)=>{const n=y(i),o={};return t.forEach((t=>{const i=P(((t,i)=>A(e.dataAccessors,t,i)),n,t);for(let e=0;e<i.length;e++)o[i[e]]||(o[i[e]]=[]),o[i[e]].push((0,c.deepExtendArraySafe)({},t,!0))})),o};t.groupAppointmentsByResourcesCore=O;const P=(e,t,i,n)=>{n=n||[];for(let o=0;o<t.length;o++)k(e,i,t[o].name,t[o].value)&&((0,h.isDefined)(t[o].leafIndex)&&n.push(t[o].leafIndex),t[o].children&&P(e,t[o].children,i,n));return n};t.getResourceTreeLeaves=P;const k=(e,t,i,n)=>{const o=e(i,"getter")(t);return(0,g.hasResourceValue)((0,a.wrapToArray)(o),n)};t.createReducedResourcesTree=(e,t,i)=>{const n=y(e);return M(t,n,i)};const M=(e,t,i,n)=>(n=n?n.children:[],t.forEach(((t,o)=>{let a=!1;const s=t.name,r=t.value,l=t.title,d=t.data,u=e(s,"getter");i.forEach((e=>{if(!a){const t=u(e);Array.isArray(t)?t.includes(r)&&(n.push({name:s,value:r,title:l,data:d,children:[]}),a=!0):t===r&&(n.push({name:s,value:r,title:l,data:d,children:[]}),a=!0)}})),a&&t.children&&t.children.length&&M(e,t.children,i,n[o])})),n);t.reduceResourcesTree=M;t.getResourcesDataByGroups=(e,t,i)=>{if(!i||!i.length)return e;const n={},o=[];i.forEach((e=>{(0,u.each)(e,((e,t)=>{n[e]=t}))}));return e.filter((e=>{let{name:t}=e;return(0,h.isDefined)(n[t])})).forEach((e=>o.push((0,d.extend)({},e)))),o.forEach((e=>{const{items:n,data:o,name:a}=e,s=I(t,[a])[0]||{},r=f(s),l=[],d=[];i.filter((e=>(0,h.isDefined)(e[a]))).forEach((e=>{(0,u.each)(e,((e,t)=>{if(!l.filter((i=>i.id===t&&i[r]===e)).length){const e=n.filter((e=>e.id===t)),i=o.filter((e=>e[r]===t));l.push(...e),d.push(...i)}}))})),e.items=l,e.data=d})),o};t.setResourceToAppointment=(e,t,i,n)=>{const o=t.setter;for(const t in n){const s=n[t],r=D(e,t)?(0,a.wrapToArray)(s):s;o[t](i,r)}};const R=(e,t,i,n)=>{const o=new l.Deferred,a=(I(e,[i])[0]||{}).colorExpr||"color",s=(0,r.compileGetter)(a);return T(e,t,i,n).done((e=>o.resolve(s(e)))).fail((()=>o.reject())),o.promise()};t.getResourceColor=R;t.getAppointmentColor=(e,t)=>{const{resources:i,dataAccessors:n,loadedResources:o,resourceLoaderMap:s}=e,{groupIndex:r,groups:d,itemData:u}=t,c=E(i||[],d);if(c){const e=v(c),t=x(r,o),l=A(n,e,"getter");let d=(0,a.wrapToArray)(l(u))[0];for(let i=0;i<t.length;i++)if(t[i].name===e){d=t[i].id;break}return R(i,s,e,d)}return(new l.Deferred).resolve().promise()};t.createExpressions=function(){const e={getter:{},setter:{}};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{const i=v(t);e.getter[i]=(0,r.compileGetter)(i),e.setter[i]=(0,r.compileSetter)(i)})),e};t.loadResources=(e,t,i)=>{const n=new l.Deferred,o=[];let a=[];return I(t||[],e||[]).forEach((e=>{const t=new l.Deferred,n=v(e);o.push(t);const a=C(e.dataSource).load();i.set(n,a),a.done((i=>{const o=((e,t)=>{const i=(0,r.compileGetter)(f(e)),n=(0,r.compileGetter)(m(e));return t.map((e=>{const t={id:i(e),text:n(e)};return e.color&&(t.color=e.color),t}))})(e,i);t.resolve({name:n,items:o,data:i})})).fail((()=>t.reject()))})),o.length?(l.when.apply(null,o).done((function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const o=t.some((e=>0===e.items.length));a=o?[]:t,n.resolve(a)})).fail((()=>n.reject())),n.promise()):n.resolve(a)};t.getNormalizedResources=(e,t,i)=>{const n={};return(0,u.each)(t.resources.getter,(o=>{const s=t.resources.getter[o](e);if((0,h.isDefined)(s)){const e=D(i,o)?(0,a.wrapToArray)(s):s;n[o]=e}})),n}},40226:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n};const a="dx-scheduler-date-time-shader";t.default=class{constructor(e){this._workSpace=e,this._$container=this._workSpace._dateTableScrollable.$content()}render(){this.initShaderElements(),this.renderShader(),this._shader.forEach((e=>{this._$container.append(e)}))}initShaderElements(){this._$shader=this.createShader(),this._shader=[],this._shader.push(this._$shader)}renderShader(){}createShader(){return(0,o.default)("<div>").addClass(a)}clean(){this._$container&&this._$container.find(`.${a}`).remove()}}},18129:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(41639),a=i(57653),s=(n=i(40226))&&n.__esModule?n:{default:n};class r extends s.default{renderShader(){const e=this._workSpace._isHorizontalGroupedWorkSpace()?this._workSpace._getGroupCount():1;for(let t=0;t<e;t+=1){const e=0===t,i=e?this._$shader:this.createShader();this._workSpace.isGroupedByDate()?this._customizeGroupedByDateShader(i,t):this._customizeShader(i,t),!e&&this._shader.push(i)}}_customizeShader(e,t){const i=this._workSpace.getIndicationWidth();if(this._applyShaderWidth(e,i),t>=1){const t=this._workSpace,i=t._getCellCount()*t.getCellWidth();e.css("left",i)}else e.css("left",0)}_applyShaderWidth(e,t){const i=(0,o.getBoundingRect)(this._$container.get(0)).width;t>i&&(t=i),t>0&&(0,a.setWidth)(e,t)}_customizeGroupedByDateShader(e,t){const i=this._workSpace.getIndicationCellCount(),n=Math.floor(i),o=i-n,a=0===t,s=this._workSpace,r=a?s.getIndicationWidth():o*s.getCellWidth();let l;this._applyShaderWidth(e,r),l=a?s._getCellCount()*s.getCellWidth()*t:s.getCellWidth()*n*s._getGroupCount()+t*s.getCellWidth(),e.css("left",l)}}t.default=r},28471:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(64553)),o=i(57653),a=s(i(40226));function s(e){return e&&e.__esModule?e:{default:e}}const r="dx-scheduler-date-time-shader-all-day";class l extends a.default{renderShader(){let e=this._getShaderHeight();const t=this._getShaderMaxHeight(),i=e>t;e>t&&(e=t),(0,o.setHeight)(this._$shader,e);const n=this._workSpace._getGroupCount()||1;this._workSpace.isGroupedByDate()?this._renderGroupedByDateShaderParts(n,e,t,i):this._renderShaderParts(n,e,t,i)}_renderShaderParts(e,t,i,n){for(let o=0;o<e;o++){const e=this._getShaderWidth(o);this._renderTopShader(this._$shader,t,e,o),!n&&this._renderBottomShader(this._$shader,i,t,e,o),this._renderAllDayShader(e,o)}}_renderGroupedByDateShaderParts(e,t,i,n){const o=this._getShaderWidth(0);let a=o-this._workSpace.getCellWidth();t<0&&(t=0,a=o),this._renderTopShader(this._$shader,t,o*e,0),!n&&this._renderBottomShader(this._$shader,i,t,a*e+this._workSpace.getCellWidth(),0),this._renderAllDayShader(o*e,0)}_renderTopShader(e,t,i,a){this._$topShader=(0,n.default)("<div>").addClass("dx-scheduler-date-time-shader-top"),i&&(0,o.setWidth)(this._$topShader,i),t&&(0,o.setHeight)(this._$topShader,t),this._$topShader.css("marginTop",this._getShaderTopOffset(a)),this._$topShader.css("left",this._getShaderOffset(a,i)),e.append(this._$topShader)}_renderBottomShader(e,t,i,a,s){this._$bottomShader=(0,n.default)("<div>").addClass("dx-scheduler-date-time-shader-bottom");const r=i<0?a:a-this._workSpace.getCellWidth(),l=i<0?t:t-i;(0,o.setWidth)(this._$bottomShader,r),(0,o.setHeight)(this._$bottomShader,l),this._$bottomShader.css("left",this._getShaderOffset(s,a-this._workSpace.getCellWidth())),e.append(this._$bottomShader)}_renderAllDayShader(e,t){this._workSpace.option("showAllDayPanel")&&(this._$allDayIndicator=(0,n.default)("<div>").addClass(r),(0,o.setHeight)(this._$allDayIndicator,this._workSpace.getAllDayHeight()),(0,o.setWidth)(this._$allDayIndicator,e),this._$allDayIndicator.css("left",this._getShaderOffset(t,e)),this._workSpace._$allDayPanel.prepend(this._$allDayIndicator))}_getShaderOffset(e,t){return this._workSpace.getGroupedStrategy().getShaderOffset(e,t)}_getShaderTopOffset(e){return this._workSpace.getGroupedStrategy().getShaderTopOffset(e)}_getShaderHeight(){return this._workSpace.getGroupedStrategy().getShaderHeight()}_getShaderMaxHeight(){return this._workSpace.getGroupedStrategy().getShaderMaxHeight()}_getShaderWidth(e){return this._workSpace.getGroupedStrategy().getShaderWidth(e)}clean(){super.clean(),this._workSpace&&this._workSpace._$allDayPanel&&this._workSpace._$allDayPanel.find(`.${r}`).remove()}}t.default=l},73862:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(50254),a=(n=i(66636))&&n.__esModule?n:{default:n};const s=e=>{const{offsets:t}=e,{offsetIndices:i}=e,{untils:n}=e,o=t.split("|").map((e=>parseInt(e))),a=i.split("").map((e=>parseInt(e)));var s,r;return{offsetList:o,offsetIndexList:a,dateList:(r=n,r.split("|").map((e=>"Infinity"===e?null:1e3*parseInt(e,36)))).map((s=0,e=>s+=e))}};const r=new class{constructor(){this.map=new Map}tryGet(e){if(!this.map.get(e)){const t=l.getTimezoneById(e);if(!t)return!1;const i=s(t);this.map.set(e,i)}return this.map.get(e)}},l={_tzCache:r,getTimeZonesOld:()=>(0,a.default)().timezones??[],formatOffset(e){const t=Math.floor(e),i=e-t;return((0,o.sign)(e)>=0?"+":"-")+`0${Math.abs(t)}`.slice(-2)+(i>0?":"+60*i:":00")},formatId:e=>e.split("/").join(" - ").split("_").join(" "),getTimezoneById(e){if(!e)return;const t=this.getTimeZonesOld();for(let i=0;i<t.length;i++){if(t[i].id===e)return t[i]}},getTimeZoneOffsetById(e,t){const i=r.tryGet(e);return i?this.getUtcOffset(i,t):void 0},getTimeZoneDeclarationTuple(e,t){const i=r.tryGet(e);return i?this.getTimeZoneDeclarationTupleCore(i,t):[]},getTimeZoneDeclarationTupleCore(e,t){const{offsetList:i}=e,{offsetIndexList:n}=e,{dateList:o}=e,a=[];for(let e=0;e<o.length;e++){const s=o[e],r=new Date(s).getFullYear();if(r===t){const t=i[n[e+1]];a.push({date:s,offset:-t/60})}if(r>t)break}return a},getUtcOffset(e,t){const{offsetList:i}=e,{offsetIndexList:n}=e,{dateList:o}=e;let a=o.length-1-1;for(;a>=0&&t<o[a];)a--;const s=i[n[a+1]];return-s/60||s}};t.default=l},95053:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={value:["Etc/GMT+12","Etc/GMT+11","Pacific/Midway","Pacific/Niue","Pacific/Pago_Pago","Pacific/Samoa","US/Samoa","Etc/GMT+10","HST","Pacific/Honolulu","Pacific/Johnston","Pacific/Rarotonga","Pacific/Tahiti","US/Hawaii","Pacific/Marquesas","America/Adak","America/Atka","Etc/GMT+9","Pacific/Gambier","US/Aleutian","America/Anchorage","America/Juneau","America/Metlakatla","America/Nome","America/Sitka","America/Yakutat","Etc/GMT+8","Pacific/Pitcairn","US/Alaska","America/Creston","America/Dawson_Creek","America/Dawson","America/Ensenada","America/Fort_Nelson","America/Hermosillo","America/Los_Angeles","America/Phoenix","America/Santa_Isabel","America/Tijuana","America/Vancouver","America/Whitehorse","Canada/Pacific","Canada/Yukon","Etc/GMT+7","Mexico/BajaNorte","MST","PST8PDT","US/Arizona","US/Pacific","America/Belize","America/Boise","America/Cambridge_Bay","America/Chihuahua","America/Costa_Rica","America/Denver","America/Edmonton","America/El_Salvador","America/Guatemala","America/Inuvik","America/Managua","America/Mazatlan","America/Monterrey","America/Ojinaga","America/Regina","America/Shiprock","America/Swift_Current","America/Tegucigalpa","America/Yellowknife","Canada/Mountain","Canada/Saskatchewan","Chile/EasterIsland","Etc/GMT+6","Mexico/BajaSur","MST7MDT","Navajo","Pacific/Easter","Pacific/Galapagos","US/Mountain","America/Atikokan","America/Bahia_Banderas","America/Bogota","America/Cancun","America/Cayman","America/Chicago","America/Coral_Harbour","America/Eirunepe","America/Guayaquil","America/Indiana/Knox","America/Indiana/Tell_City","America/Jamaica","America/Knox_IN","America/Lima","America/Matamoros","America/Menominee","America/Merida","America/Mexico_City","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Panama","America/Porto_Acre","America/Rainy_River","America/Rankin_Inlet","America/Resolute","America/Rio_Branco","America/Winnipeg","Brazil/Acre","Canada/Central","CST6CDT","EST","Etc/GMT+5","Jamaica","Mexico/General","US/Central","US/Indiana-Starke","America/Anguilla","America/Antigua","America/Aruba","America/Asuncion","America/Barbados","America/Blanc-Sablon","America/Boa_Vista","America/Campo_Grande","America/Caracas","America/Cuiaba","America/Curacao","America/Detroit","America/Dominica","America/Fort_Wayne","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guyana","America/Havana","America/Indiana/Indianapolis","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Iqaluit","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Louisville","America/Lower_Princes","America/Manaus","America/Marigot","America/Martinique","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port_of_Spain","America/Port-au-Prince","America/Porto_Velho","America/Puerto_Rico","America/Santiago","America/Santo_Domingo","America/St_Barthelemy","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Thunder_Bay","America/Toronto","America/Tortola","America/Virgin","Brazil/West","Canada/Eastern","Chile/Continental","Cuba","EST5EDT","Etc/GMT+4","US/East-Indiana","US/Eastern","US/Michigan","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Bahia","America/Belem","America/Buenos_Aires","America/Catamarca","America/Cayenne","America/Cordoba","America/Fortaleza","America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Jujuy","America/Maceio","America/Mendoza","America/Moncton","America/Montevideo","America/Paramaribo","America/Punta_Arenas","America/Recife","America/Rosario","America/Santarem","America/Sao_Paulo","America/Thule","Antarctica/Palmer","Antarctica/Rothera","Atlantic/Bermuda","Atlantic/Stanley","Brazil/East","Canada/Atlantic","Etc/GMT+3","America/St_Johns","Canada/Newfoundland","America/Godthab","America/Miquelon","America/Noronha","America/Nuuk","Atlantic/South_Georgia","Brazil/DeNoronha","Etc/GMT+2","Atlantic/Cape_Verde","Etc/GMT+1","Africa/Abidjan","Africa/Accra","Africa/Bamako","Africa/Banjul","Africa/Bissau","Africa/Conakry","Africa/Dakar","Africa/Freetown","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Africa/Sao_Tome","Africa/Timbuktu","America/Danmarkshavn","America/Scoresbysund","Atlantic/Azores","Atlantic/Reykjavik","Atlantic/St_Helena","Etc/GMT-0","Etc/GMT","Etc/GMT+0","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/Universal","Etc/UTC","Etc/Zulu","GMT-0","GMT","GMT+0","GMT0","Greenwich","Iceland","UCT","Universal","UTC","Zulu","Africa/Algiers","Africa/Bangui","Africa/Brazzaville","Africa/Casablanca","Africa/Douala","Africa/El_Aaiun","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Malabo","Africa/Ndjamena","Africa/Niamey","Africa/Porto-Novo","Africa/Tunis","Atlantic/Canary","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Madeira","Eire","Etc/GMT-1","Europe/Belfast","Europe/Dublin","Europe/Guernsey","Europe/Isle_of_Man","Europe/Jersey","Europe/Lisbon","Europe/London","GB-Eire","GB","Portugal","WET","Africa/Blantyre","Africa/Bujumbura","Africa/Cairo","Africa/Ceuta","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Khartoum","Africa/Kigali","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Tripoli","Africa/Windhoek","Antarctica/Troll","Arctic/Longyearbyen","Atlantic/Jan_Mayen","CET","Egypt","Etc/GMT-2","Europe/Amsterdam","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Busingen","Europe/Copenhagen","Europe/Gibraltar","Europe/Kaliningrad","Europe/Ljubljana","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/San_Marino","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Libya","MET","Poland","Africa/Addis_Ababa","Africa/Asmara","Africa/Asmera","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Juba","Africa/Kampala","Africa/Mogadishu","Africa/Nairobi","Antarctica/Syowa","Asia/Aden","Asia/Amman","Asia/Baghdad","Asia/Bahrain","Asia/Beirut","Asia/Damascus","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Istanbul","Asia/Jerusalem","Asia/Kuwait","Asia/Nicosia","Asia/Qatar","Asia/Riyadh","Asia/Tel_Aviv","EET","Etc/GMT-3","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Istanbul","Europe/Kiev","Europe/Kirov","Europe/Mariehamn","Europe/Minsk","Europe/Moscow","Europe/Nicosia","Europe/Riga","Europe/Simferopol","Europe/Sofia","Europe/Tallinn","Europe/Tiraspol","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye","Indian/Antananarivo","Indian/Comoro","Indian/Mayotte","Israel","Turkey","W-SU","Asia/Baku","Asia/Dubai","Asia/Muscat","Asia/Tbilisi","Asia/Yerevan","Etc/GMT-4","Europe/Astrakhan","Europe/Samara","Europe/Saratov","Europe/Ulyanovsk","Europe/Volgograd","Indian/Mahe","Indian/Mauritius","Indian/Reunion","Asia/Kabul","Asia/Tehran","Iran","Antarctica/Mawson","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Dushanbe","Asia/Karachi","Asia/Oral","Asia/Qyzylorda","Asia/Samarkand","Asia/Tashkent","Asia/Yekaterinburg","Etc/GMT-5","Indian/Kerguelen","Indian/Maldives","Asia/Calcutta","Asia/Colombo","Asia/Kolkata","Asia/Kathmandu","Asia/Katmandu","Antarctica/Vostok","Asia/Almaty","Asia/Bishkek","Asia/Dacca","Asia/Dhaka","Asia/Kashgar","Asia/Omsk","Asia/Qostanay","Asia/Thimbu","Asia/Thimphu","Asia/Urumqi","Etc/GMT-6","Indian/Chagos","Asia/Rangoon","Asia/Yangon","Indian/Cocos","Antarctica/Davis","Asia/Bangkok","Asia/Barnaul","Asia/Ho_Chi_Minh","Asia/Hovd","Asia/Jakarta","Asia/Krasnoyarsk","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Phnom_Penh","Asia/Pontianak","Asia/Saigon","Asia/Tomsk","Asia/Vientiane","Etc/GMT-7","Indian/Christmas","Antarctica/Casey","Asia/Brunei","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Harbin","Asia/Hong_Kong","Asia/Irkutsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Macao","Asia/Macau","Asia/Makassar","Asia/Manila","Asia/Shanghai","Asia/Singapore","Asia/Taipei","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Australia/Perth","Australia/West","Etc/GMT-8","Hongkong","PRC","ROC","Singapore","Australia/Eucla","Asia/Chita","Asia/Dili","Asia/Jayapura","Asia/Khandyga","Asia/Pyongyang","Asia/Seoul","Asia/Tokyo","Asia/Yakutsk","Etc/GMT-9","Japan","Pacific/Palau","ROK","Australia/Adelaide","Australia/Broken_Hill","Australia/Darwin","Australia/North","Australia/South","Australia/Yancowinna","Antarctica/DumontDUrville","Asia/Ust-Nera","Asia/Vladivostok","Australia/ACT","Australia/Brisbane","Australia/Canberra","Australia/Currie","Australia/Hobart","Australia/Lindeman","Australia/Melbourne","Australia/NSW","Australia/Queensland","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Etc/GMT-10","Pacific/Chuuk","Pacific/Guam","Pacific/Port_Moresby","Pacific/Saipan","Pacific/Truk","Pacific/Yap","Australia/LHI","Australia/Lord_Howe","Antarctica/Macquarie","Asia/Magadan","Asia/Sakhalin","Asia/Srednekolymsk","Etc/GMT-11","Pacific/Bougainville","Pacific/Efate","Pacific/Guadalcanal","Pacific/Kosrae","Pacific/Norfolk","Pacific/Noumea","Pacific/Pohnpei","Pacific/Ponape","Antarctica/McMurdo","Antarctica/South_Pole","Asia/Anadyr","Asia/Kamchatka","Etc/GMT-12","Kwajalein","NZ","Pacific/Auckland","Pacific/Fiji","Pacific/Funafuti","Pacific/Kwajalein","Pacific/Majuro","Pacific/Nauru","Pacific/Tarawa","Pacific/Wake","Pacific/Wallis","NZ-CHAT","Pacific/Chatham","Etc/GMT-13","Pacific/Apia","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Tongatapu","Etc/GMT-14","Pacific/Kiritimati"]}},93048:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DesktopTooltipStrategy=void 0;var n=r(i(4671)),o=r(i(85991)),a=r(i(3504)),s=i(32789);function r(e){return e&&e.__esModule?e:{default:e}}const l="dx-scheduler-appointment-tooltip-wrapper";class d extends s.TooltipStrategyBase{_prepareBeforeVisibleChanged(e){this._tooltip.option("position",{my:"bottom",at:"top",boundary:this._getBoundary(e),offset:this._extraOptions.offset,collision:"fit flipfit"})}_getBoundary(e){return this._options.isAppointmentInAllDayPanel(e[0].appointment)?this._options.container:this._options.getScrollableContainer()}_onShown(){super._onShown(),this._extraOptions.isButtonClick&&(this._list.focus(),this._list.option("focusedElement",null))}_createListOption(e,t){const i=super._createListOption(e,t);return i.showScrollbar=o.default.touch?"always":"onHover",i}_createTooltip(e,t){const i=this._createTooltipElement(l),o=this._options.createComponent(i,a.default,{target:e,maxHeight:200,rtlEnabled:this._extraOptions.rtlEnabled,onShown:this._onShown.bind(this),contentTemplate:this._getContentTemplate(t),wrapperAttr:{class:l},_loopFocus:this._extraOptions._loopFocus});return o.setAria({role:"dialog",label:n.default.format("dxScheduler-appointmentListAriaLabel")}),o}_onListRender(e){return this._extraOptions.dragBehavior&&this._extraOptions.dragBehavior(e)}_onListItemContextMenu(e){const t=this._options.createEventArgs(e);this._options.onItemContextMenu(t)}}t.DesktopTooltipStrategy=d},96588:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MobileTooltipStrategy=void 0;var n,o=i(57653),a=i(3104),s=(n=i(89132))&&n.__esModule?n:{default:n},r=i(32789);const l="dx-scheduler-overlay-panel",d=".dx-scrollable-content",u=250,c="90%",h="auto",p="100%",g="80%",_={show:{type:"slide",duration:300,from:{position:{my:"top",at:"bottom",of:(0,a.getWindow)()}},to:{position:{my:"center",at:"center",of:(0,a.getWindow)()}}},hide:{type:"slide",duration:300,to:{position:{my:"top",at:"bottom",of:(0,a.getWindow)()}},from:{position:{my:"center",at:"center",of:(0,a.getWindow)()}}}};class f extends r.TooltipStrategyBase{_shouldUseTarget(){return!1}setTooltipConfig(){const e=(0,o.getWidth)((0,a.getWindow)())>700,t=(0,o.getOuterHeight)(this._list.$element().find(d));this._tooltip.option(e?(e=>{const t=.9*(0,o.getHeight)((0,a.getWindow)());return{shading:!0,width:g,height:e>t?c:h,position:{my:"center",at:"center",of:(0,a.getWindow)()}}})(t):(e=>({shading:!1,width:p,height:e>u?u:h,position:{my:"bottom",at:"bottom",of:(0,a.getWindow)()}}))(t))}async _onShowing(){this._tooltip.option("height",h),this.setTooltipConfig(),await Promise.all([...this.asyncTemplatePromises]),this.setTooltipConfig()}_createTooltip(e,t){const i=this._createTooltipElement(l);return this._options.createComponent(i,s.default,{target:(0,a.getWindow)(),hideOnOutsideClick:!0,animation:_,onShowing:()=>this._onShowing(),onShown:this._onShown.bind(this),contentTemplate:this._getContentTemplate(t),wrapperAttr:{class:l}})}}t.MobileTooltipStrategy=f},32789:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TooltipStrategyBase=void 0;var n=d(i(64553)),o=i(38699),a=i(11528),s=d(i(64973)),r=i(51413),l=d(i(71058));function d(e){return e&&e.__esModule?e:{default:e}}const u="dx-tooltip-appointment-item",c=`${u}-content`,h=`${u}-content-subject`,p=`${u}-content-date`,g=`${u}-marker`,_=`${u}-marker-body`,f=`${u}-delete-button-container`,m=`${u}-delete-button`;t.TooltipStrategyBase=class{constructor(e){this.asyncTemplatePromises=new Set,this._tooltip=null,this._options=e,this._extraOptions=null}show(e,t,i){this._canShowTooltip(t)&&(this.hide(),this._extraOptions=i,this._showCore(e,t))}_showCore(e,t){const i=(0,a.isRenderer)(e)&&e.attr("aria-describedby");this._tooltip?(this._shouldUseTarget()&&this._tooltip.option("target",e),this._list.option("dataSource",t)):this._tooltip=this._createTooltip(e,t),this._prepareBeforeVisibleChanged(t),this._tooltip.option("visible",!0),i&&e.attr("aria-describedby",i)}_prepareBeforeVisibleChanged(e){}_getContentTemplate(e){return t=>{var i,o;const a=(0,n.default)("<div>");(0,n.default)(t).append(a),this._list=this._createList(a,e),null===(i=(o=this._list).registerKeyHandler)||void 0===i||i.call(o,"escape",(()=>{this.hide(),this._tooltip.option("target").focus()}))}}isAlreadyShown(e){if(this._tooltip&&this._tooltip.option("visible"))return this._tooltip.option("target")[0]===e[0]}_onShown(){this._list.option("focusStateEnabled",this._extraOptions.focusStateEnabled)}dispose(){}hide(){this._tooltip&&this._tooltip.option("visible",!1)}_shouldUseTarget(){return!0}_createTooltip(e,t){}_canShowTooltip(e){return!!e.length}_createListOption(e){return{dataSource:e,onContentReady:this._onListRender.bind(this),onItemClick:e=>this._onListItemClick(e),onItemContextMenu:this._onListItemContextMenu.bind(this),itemTemplate:(e,t)=>this._renderTemplate(e.appointment,e.targetedAppointment,t,e.color),_swipeEnabled:!1,pageLoadMode:"scrollBottom"}}_onListRender(e){}_createTooltipElement(e){return(0,n.default)("<div>").appendTo(this._options.container).addClass(e)}_createList(e,t){return this._options.createComponent(e,l.default,this._createListOption(t))}_renderTemplate(e,t,i,a){const s=this._createItemListContent(e,t,a);this._options.addDefaultTemplates({[this._getItemListTemplateName()]:new o.FunctionTemplate((e=>{const t=(0,n.default)(e.container);return t.append(s),t}))});const r=this._options.getAppointmentTemplate(`${this._getItemListTemplateName()}Template`);return this._createFunctionTemplate(r,e,t,i)}_createFunctionTemplate(e,t,i,n){const a=!!this._extraOptions.isButtonClick,s=this._isEmptyDropDownAppointmentTemplate();return new o.FunctionTemplate((o=>{const{promise:l,resolve:d}=(0,r.createPromise)();return this.asyncTemplatePromises.add(l),e.render({model:s?{appointmentData:t,targetedAppointmentData:i,isButtonClicked:a}:t,container:o.container,index:n,onRendered:()=>{this.asyncTemplatePromises.delete(l),d()}})}))}_getItemListTemplateName(){return this._isEmptyDropDownAppointmentTemplate()?"appointmentTooltip":"dropDownAppointment"}_isEmptyDropDownAppointmentTemplate(){return!this._extraOptions.dropDownAppointmentTemplate||"dropDownAppointment"===this._extraOptions.dropDownAppointmentTemplate}_onListItemClick(e){this.hide(),this._extraOptions.clickEvent&&this._extraOptions.clickEvent(e),this._options.showAppointmentPopup(e.itemData.appointment,!1,e.itemData.targetedAppointment)}_onListItemContextMenu(e){}_createItemListContent(e,t,i){const{editing:o}=this._extraOptions,a=(0,n.default)("<div>").addClass(u);a.append(this._createItemListMarker(i)),a.append(this._createItemListInfo(this._options.createFormattedDateText(e,t)));return!this._options.getAppointmentDisabled(e)&&(o&&!0===o.allowDeleting||!0===o)&&a.append(this._createDeleteButton(e,t)),a}_createItemListMarker(e){const t=(0,n.default)("<div>").addClass(g),i=(0,n.default)("<div>").addClass(_);return t.append(i),e&&e.done((e=>i.css("background",e))),t}_createItemListInfo(e){const t=(0,n.default)("<div>").addClass(c),i=(0,n.default)("<div>").addClass(h).text(e.text),o=(0,n.default)("<div>").addClass(p).text(e.formatDate);return t.append(i).append(o)}_createDeleteButton(e,t){const i=(0,n.default)("<div>").addClass(f),o=(0,n.default)("<div>").addClass(m);return i.append(o),this._options.createComponent(o,s.default,{icon:"trash",stylingMode:"text",onClick:i=>{this.hide(),i.event.stopPropagation(),this._options.checkAndDeleteAppointment(e,t)}}),i}}},28740:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isSchedulerComponent=function(e){return e.NAME===i};const i="dxScheduler"},79674:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WORK_SPACE_BORDER_PX=void 0;t.WORK_SPACE_BORDER_PX=1},39979:function(e,t){function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},i.apply(null,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.getMaxAllowedPosition=t.getGroupWidth=t.getCellWidth=t.getCellHeight=t.getAllDayHeight=t.PositionHelper=void 0;const n=e=>{const{dateTableCellsMeta:t}=e,i=null==t?void 0:t.length;if(!i)return{width:0,height:0};const n=t[i>1?1:0][0];return{width:n.width,height:n.height}},o=e=>n(e).height;t.getCellHeight=o;const a=e=>n(e).width;t.getCellWidth=a;const s=(e,t,i)=>{if(!e)return 0;if(t){const{dateTableCellsMeta:e}=i;return(null==e?void 0:e.length)?e[0][0].height:0}const{allDayPanelCellsMeta:n}=i;return null!=n&&n.length?n[0].height:0};t.getAllDayHeight=s;const r=(e,t,i,n)=>((e,t,i,n)=>{const{dateTableCellsMeta:o}=n,a=o[0];if(!a)return 0;const{columnIndex:s}=t.getLastGroupCellPosition(e),r=a[s];return r?i?r.left:r.left+r.width:0})(e||0,t,i,n);t.getMaxAllowedPosition=r;t.getGroupWidth=(e,t,i)=>{const{isVirtualScrolling:n,rtlEnabled:o,DOMMetaData:s}=i,l=a(s);let d=t.getCellCount(i)*l;if(n){d=t.groupedDataMap.dateTableGroupedMap[e][0].length*l}const u=r(e,t,o,s),c=u[e];return c&&(d=o?c-u[e+1]:0===e?c:c-u[e-1]),d};t.PositionHelper=class{get viewDataProvider(){return this.options.viewDataProvider}get rtlEnabled(){return this.options.rtlEnabled}get isGroupedByDate(){return this.options.isGroupedByDate}get groupCount(){return this.options.groupCount}get DOMMetaData(){return this.options.getDOMMetaDataCallback()}constructor(e){this.options=e,this.groupStrategy=this.options.isVerticalGrouping?new l(this.options):new d(this.options)}getHorizontalMax(e){const t=e=>r(e,this.viewDataProvider,this.rtlEnabled,this.DOMMetaData);if(this.isGroupedByDate){const i=this.viewDataProvider.getViewPortGroupCount();return Math.max(t(e),t(i-1))}return t(e)}getResizableStep(){const e=a(this.DOMMetaData);return this.isGroupedByDate?this.groupCount*e:e}getVerticalMax(e){return this.groupStrategy.getVerticalMax(e)}getOffsetByAllDayPanel(e){return this.groupStrategy.getOffsetByAllDayPanel(e)}getGroupTop(e){return this.groupStrategy.getGroupTop(e)}};class l{constructor(e){this.options=e}get viewDataProvider(){return this.options.viewDataProvider}get isGroupedByDate(){return this.options.isGroupedByDate}get rtlEnabled(){return this.options.rtlEnabled}get groupCount(){return this.options.groupCount}get DOMMetaData(){return this.options.getDOMMetaDataCallback()}getOffsetByAllDayPanel(e){let{groupIndex:t,supportAllDayRow:i,showAllDayPanel:n}=e,o=0;if(i&&n){o=s(n,!0,this.DOMMetaData)*(t+1)}return o}getVerticalMax(e){let t=this._getMaxAllowedVerticalPosition(i({},e,{viewDataProvider:this.viewDataProvider,rtlEnabled:this.rtlEnabled,DOMMetaData:this.DOMMetaData}));return t+=this.getOffsetByAllDayPanel(e),t}getGroupTop(e){let{groupIndex:t,showAllDayPanel:i,isGroupedAllDayPanel:n}=e;const a=this.viewDataProvider.getRowCountInGroup(t);return this._getMaxAllowedVerticalPosition({groupIndex:t,viewDataProvider:this.viewDataProvider,showAllDayPanel:i,isGroupedAllDayPanel:n,isVerticalGrouping:!0,DOMMetaData:this.DOMMetaData})-o(this.DOMMetaData)*a}_getAllDayHeight(e){return s(e,!0,this.DOMMetaData)}_getMaxAllowedVerticalPosition(e){let{groupIndex:t,showAllDayPanel:i,isGroupedAllDayPanel:n}=e;const{rowIndex:o}=this.viewDataProvider.getLastGroupCellPosition(t),{dateTableCellsMeta:a}=this.DOMMetaData,s=a[o];if(!s)return 0;let r=s[0].top+s[0].height;return n&&(r-=(t+1)*this._getAllDayHeight(i)),r}}class d extends l{getOffsetByAllDayPanel(){return 0}getVerticalMax(e){const{isVirtualScrolling:t,groupIndex:n}=e,o=t?n:0;return this._getMaxAllowedVerticalPosition(i({},e,{groupIndex:o}))}getGroupTop(){return 0}_getAllDayHeight(e){return s(e,!1,this.DOMMetaData)}}},11129:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=C(i(38662)),o=C(i(92848)),a=C(i(64960)),s=i(61404),r=C(i(64553)),l=i(17781),d=C(i(41380)),u=i(52576),c=i(21274),h=i(57653),p=i(34396),g=i(80126),_=i(8687),f=C(i(92201)),m=i(45629),v=C(i(45277));function C(e){return e&&e.__esModule?e:{default:e}}const{tableCreator:y}=f.default,b="dx-scheduler-group-table";class x extends v.default{get type(){return _.VIEWS.AGENDA}get renderingStrategy(){return this.invoke("getLayoutManager").getRenderingStrategyInstance()}get appointmentDataProvider(){return this.option("getAppointmentDataProvider")()}getStartViewDate(){return this._startViewDate}_init(){super._init(),this._activeStateUnit=void 0}_getDefaultOptions(){return(0,u.extend)(super._getDefaultOptions(),{agendaDuration:7,rowHeight:60,noDataText:""})}_optionChanged(e){const{name:t}=e,{value:i}=e;switch(t){case"agendaDuration":break;case"noDataText":case"rowHeight":this._recalculateAgenda(this._rows);break;case"groups":i&&i.length?this._$groupTable||(this._initGroupTable(),this._dateTableScrollable.$content().prepend(this._$groupTable)):this._$groupTable&&(this._$groupTable.remove(),this._$groupTable=null,this._detachGroupCountClass()),super._optionChanged(e);break;default:super._optionChanged(e)}}_renderFocusState(){return(0,l.noop)()}_renderFocusTarget(){return(0,l.noop)()}_cleanFocusState(){return(0,l.noop)()}supportAllDayRow(){return!1}_isVerticalGroupedWorkSpace(){return!1}_getElementClass(){return"dx-scheduler-agenda"}_calculateStartViewDate(){return p.agendaUtils.calculateStartViewDate(this.option("currentDate"),this.option("startDayHour"))}_getRowCount(){return this.option("agendaDuration")}_getCellCount(){return 1}_getTimePanelRowCount(){return this.option("agendaDuration")}_renderAllDayPanel(){return(0,l.noop)()}_toggleAllDayVisibility(){return(0,l.noop)()}_initWorkSpaceUnits(){this._initGroupTable(),this._$timePanel=(0,r.default)("<table>").attr("aria-hidden",!0).addClass(g.TIME_PANEL_CLASS),this._$dateTable=(0,r.default)("<table>").attr("aria-hidden",!0).addClass(g.DATE_TABLE_CLASS),this._$dateTableScrollableContent=(0,r.default)("<div>").addClass("dx-scheduler-date-table-scrollable-content"),this._$dateTableContainer=(0,r.default)("<div>").addClass("dx-scheduler-date-table-container")}_initGroupTable(){const e=this.option("groups");e&&e.length&&(this._$groupTable=(0,r.default)("<table>").attr("aria-hidden",!0).addClass(b))}_renderView(){this._startViewDate=this._calculateStartViewDate(),this._rows=[],this._initPositionHelper()}_recalculateAgenda(e){let t=[];this._cleanView(),this._rowsIsEmpty(e)?this._renderNoData():(this._rows=e,this._$groupTable&&(t=this._renderGroupHeader(),this._setGroupHeaderCellsHeight()),this._renderTimePanel(),this._renderDateTable(),this.invoke("onAgendaReady",e),this._applyCellTemplates(t),this._dateTableScrollable.update())}_renderNoData(){this._$noDataContainer=(0,r.default)("<div>").addClass("dx-scheduler-agenda-nodata").html(this.option("noDataText")),this._dateTableScrollable.$content().append(this._$noDataContainer)}_setTableSizes(){return(0,l.noop)()}_toggleHorizontalScrollClass(){return(0,l.noop)()}_createCrossScrollingConfig(e){return(0,l.noop)()}_setGroupHeaderCellsHeight(){const e=this._getGroupHeaderCells().filter(((e,t)=>!t.getAttribute("rowSpan"))),t=this._removeEmptyRows(this._rows);if(t.length)for(let i=0;i<e.length;i++){const n=e.eq(i).find(".dx-scheduler-group-header-content");(0,h.setOuterHeight)(n,this._getGroupRowHeight(t[i]))}}_rowsIsEmpty(e){let t=!0;for(let i=0;i<e.length;i++){const n=e[i];for(let e=0;e<n.length;e++)if(n[e]){t=!1;break}}return t}_attachGroupCountClass(){const e=(0,p.getVerticalGroupCountClass)(this.option("groups"));this.$element().addClass(e)}_removeEmptyRows(e){const t=[];for(let i=0;i<e.length;i++)e[i].length&&e[i].some((e=>e>0))&&t.push(e[i]);return t}_getGroupHeaderContainer(){return this._$groupTable}_makeGroupRows(){const e=(0,m.createReducedResourcesTree)(this.option("loadedResources"),((e,t)=>(0,m.getDataAccessors)(this.option("getResourceDataAccessors")(),e,t)),this.option("getFilteredItems")()),t=this.option("resourceCellTemplate"),i=g.GROUP_HEADER_CONTENT_CLASS,n=[],o=y.makeGroupedTableFromJSON(y.VERTICAL,e,{cellTag:"th",groupTableClass:b,groupRowClass:g.GROUP_ROW_CLASS,groupCellClass:this._getGroupHeaderClass(),groupCellCustomContent(e,o,l,d){const u=a.default.createElement("div");if(u.className=i,t&&t.render)n.push(t.render.bind(t,{model:{data:d.data,id:d.value,color:d.color,text:o.textContent},container:(0,s.getPublicElement)((0,r.default)(u)),index:l}));else{const e=a.default.createElement("div");e.appendChild(o),u.appendChild(e)}e.appendChild(u)},cellTemplate:t});return{elements:(0,r.default)(o).find(`.${g.GROUP_ROW_CLASS}`),cellTemplates:n}}_cleanView(){this._$dateTable.empty(),this._$timePanel.empty(),this._$groupTable&&this._$groupTable.empty(),this._$noDataContainer&&(this._$noDataContainer.empty(),this._$noDataContainer.remove(),delete this._$noDataContainer)}_createWorkSpaceElements(){this._createWorkSpaceStaticElements()}_createWorkSpaceStaticElements(){this._$dateTableContainer.append(this._$dateTable),this._dateTableScrollable.$content().append(this._$dateTableScrollableContent),this._$groupTable&&this._$dateTableScrollableContent.prepend(this._$groupTable),this._$dateTableScrollableContent.append(this._$timePanel,this._$dateTableContainer),this.$element().append(this._dateTableScrollable.$element())}_renderDateTable(){this._renderTableBody({container:(0,s.getPublicElement)(this._$dateTable),rowClass:g.DATE_TABLE_ROW_CLASS,cellClass:this._getDateTableCellClass()})}_attachTablesEvents(){return(0,l.noop)()}_attachEvents(){return(0,l.noop)()}_cleanCellDataCache(){return(0,l.noop)()}isIndicationAvailable(){return!1}_prepareCellTemplateOptions(e,t,i,n){const o=this.option("groups"),a={},r=!!o.length;(r&&(0,m.getPathToLeaf)(i,o)||[]).forEach(((e,t)=>{const i=o[t].name;a[i]=e}));const l=r?this._getGroupIndexByResourceId(a):void 0;return{model:{text:e,date:t,groups:a,groupIndex:l},container:(0,s.getPublicElement)(n),index:i}}_renderTableBody(e,t){const i=[],o=e.cellTemplate;let a;this._$rows=[];const s=function(t,s){if(s){let l,d,u;const c=(0,r.default)("<tr>"),g=(0,r.default)("<td>");if((0,h.setHeight)(g,this._getRowHeight(s)),e.getStartDate&&(l=e.getStartDate&&e.getStartDate(t),d=n.default.format(l,"d"),u=n.default.format(l,p.formatWeekday)),o&&o.render){const e=this._prepareCellTemplateOptions(`${d} ${u}`,l,a,g);i.push(o.render.bind(o,e))}else d&&u&&g.addClass("dx-scheduler-agenda-date").text(`${d} ${u}`);e.rowClass&&c.addClass(e.rowClass),e.cellClass&&g.addClass(e.cellClass),c.append(g),this._$rows.push(c)}}.bind(this);for(a=0;a<this._rows.length;a++)(0,c.each)(this._rows[a],s),this._setLastRowClass();(0,r.default)(e.container).append((0,r.default)("<tbody>").append(this._$rows)),this._applyCellTemplates(i)}_setLastRowClass(){if(this._rows.length>1&&this._$rows.length){this._$rows[this._$rows.length-1].addClass("dx-scheduler-date-table-last-row")}}_renderTimePanel(){this._renderTableBody({container:(0,s.getPublicElement)(this._$timePanel),rowCount:this._getTimePanelRowCount(),cellCount:1,rowClass:"dx-scheduler-time-panel-row",cellClass:"dx-scheduler-time-panel-cell",cellTemplate:this.option("dateCellTemplate"),getStartDate:this._getTimePanelStartDate.bind(this)})}_getTimePanelStartDate(e){const t=new Date(this.option("currentDate"));return new Date(t.setDate(t.getDate()+e))}_getRowHeight(e){const t=this.option("rowHeight");return e?t*e+5*(e-1)+20:0}_getGroupRowHeight(e){if(!e)return;let t=0;for(let i=0;i<e.length;i++)t+=this._getRowHeight(e[i]);return t}_calculateRows(e){return this.renderingStrategy.calculateRows(e,this.option("agendaDuration"),this.option("currentDate"))}onDataSourceChanged(e){super.onDataSourceChanged(),this._renderView();const t=this._calculateRows(e);this._recalculateAgenda(t)}getAgendaVerticalStepHeight(){return this.option("rowHeight")}getEndViewDate(){const e=new Date(this.option("currentDate")),t=this.option("agendaDuration");e.setHours(this.option("endDayHour"));const i=e.setDate(e.getDate()+t-1)-6e4;return new Date(i)}getEndViewDateByEndDayHour(){return this.getEndViewDate()}getCellDataByCoordinates(){return{startDate:null,endDate:null}}updateScrollPosition(e){const t=this.timeZoneCalculator.createDate(e,{path:"toGrid"}),i=this.getVisibleBounds(),n=t.getHours(),o=t.getMinutes();this.needUpdateScrollPosition(n,o,i,t)&&this.scrollToTime(n,o,t)}needUpdateScrollPosition(e,t,i,n){let o=!1;return(e<i.top.hours||e>i.bottom.hours)&&(o=!0),e===i.top.hours&&t<i.top.minutes&&(o=!0),e===i.bottom.hours&&t>i.top.minutes&&(o=!0),o}renovatedRenderSupported(){return!1}_setSelectedCellsByCellData(){}_getIntervalDuration(){return d.default.dateToMilliseconds("day")*this.option("intervalCount")}getDOMElementsMetaData(){return{dateTableCellsMeta:[[{}]],allDayPanelCellsMeta:[{}]}}}(0,o.default)("dxSchedulerAgenda",x);t.default=x},26691:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;var n=i(11528);t.Cache=class{constructor(){this._cache=new Map}get size(){return this._cache.size}clear(){this._cache.clear()}get(e,t){return!this._cache.has(e)&&t&&this.set(e,t()),this._cache.get(e)}set(e,t){(0,n.isDefined)(t)&&this._cache.set(e,t)}}},46380:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CellsSelectionController=void 0;var n=i(34396);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}t.CellsSelectionController=class{handleArrowClick(e){const{key:t,focusedCellPosition:i,edgeIndices:n,getCellDataByPosition:a,isAllDayPanelCell:s}=e;let r;switch(t){case"down":r=this.getCellFromNextRowPosition(i,"next",n);break;case"up":r=this.getCellFromNextRowPosition(i,"prev",n);break;case"left":r=this.getCellFromNextColumnPosition(o({},e,{direction:"prev"}));break;case"right":r=this.getCellFromNextColumnPosition(o({},e,{direction:"next"}))}const l=a(r.rowIndex,r.columnIndex,s);return this.moveToCell(o({},e,{currentCellData:l}))}getCellFromNextRowPosition(e,t,i){const{columnIndex:n,rowIndex:o}=e,a=o+("next"===t?1:-1);return{columnIndex:n,rowIndex:a>=0&&a<=i.lastRowIndex?a:o}}getCellFromNextColumnPosition(e){const{focusedCellPosition:t,direction:i,edgeIndices:o,isRTL:a,isGroupedByDate:s,groupCount:r,isMultiSelection:l,viewType:d}=e,{columnIndex:u,rowIndex:c}=t,{firstColumnIndex:h,lastColumnIndex:p,firstRowIndex:g,lastRowIndex:_}=o,f=s&&l?r:1,m=a?-1:1,v=u+("next"===i?m*f:-1*m*f);return v>=h&&v<=p?{columnIndex:v,rowIndex:c}:(0,n.isDateAndTimeView)(d)?t:this._processEdgeCell({nextColumnIndex:v,rowIndex:c,columnIndex:u,firstColumnIndex:h,lastColumnIndex:p,firstRowIndex:g,lastRowIndex:_,step:f})}_processEdgeCell(e){const{nextColumnIndex:t,rowIndex:i,columnIndex:n,firstColumnIndex:o,lastColumnIndex:a,firstRowIndex:s,lastRowIndex:r,step:l}=e;let d=t,u=i;if(t<o){const e=i-1,t=e>=s;u=t?e:i,d=t?a-(l-n%l-1):n}if(t>a){const e=i+1,t=e<=r;u=t?e:i,d=t?o+n%l:n}return{columnIndex:d,rowIndex:u}}moveToCell(e){const{isMultiSelection:t,isMultiSelectionAllowed:i,focusedCellData:n,currentCellData:o}=e;return t&&i?this._getNextCellData(o,n):o}_getNextCellData(e,t,i){if(i)return t;return this._isValidNextFocusedCell(e,t)?e:t}_isValidNextFocusedCell(e,t){if(!t)return!0;const{groupIndex:i,allDay:n}=t,{groupIndex:o,allDay:a}=e;return i===o&&n===a}}},37331:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(e){this._viewDataProvider=e,this._focusedCell=null,this._selectedCells=null,this._firstSelectedCell=null,this._prevFocusedCell=null,this._prevSelectedCells=null}get viewDataProvider(){return this._viewDataProvider}get focusedCell(){const e=this._focusedCell;if(!e)return;const{groupIndex:t,startDate:i,allDay:n}=e,o={groupIndex:t,startDate:i,isAllDay:n,index:e.index};return{coordinates:this.viewDataProvider.findCellPositionInMap(o),cellData:e}}setFocusedCell(e,t,i){if(e>=0){const n=this._viewDataProvider.getCellData(e,t,i);this._focusedCell=n}}setSelectedCells(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const i=this._viewDataProvider,{rowIndex:n,columnIndex:o,allDay:a}=e;if(n<0)return;const s=t?i.getCellData(t.rowIndex,t.columnIndex,t.allDay):this._firstSelectedCell,r=i.getCellData(n,o,a);this._firstSelectedCell=s,this._selectedCells=this._viewDataProvider.getCellsBetween(s,r)}setSelectedCellsByData(e){this._selectedCells=e}getSelectedCells(){return this._selectedCells}releaseSelectedAndFocusedCells(){this.releaseSelectedCells(),this.releaseFocusedCell()}releaseSelectedCells(){this._prevSelectedCells=this._selectedCells,this._prevFirstSelectedCell=this._firstSelectedCell,this._selectedCells=null,this._firstSelectedCell=null}releaseFocusedCell(){this._prevFocusedCell=this._focusedCell,this._focusedCell=null}restoreSelectedAndFocusedCells(){this._selectedCells=this._selectedCells||this._prevSelectedCells,this._focusedCell=this._focusedCell||this._prevFocusedCell,this._firstSelectedCell=this._firstSelectedCell||this._prevFirstSelectedCell,this._prevSelectedCells=null,this._prevFirstSelectedCell=null,this._prevFocusedCell=null}clearSelectedAndFocusedCells(){this._prevSelectedCells=null,this._selectedCells=null,this._prevFocusedCell=null,this._focusedCell=null}}},90214:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=v(i(92848)),o=v(i(64553)),a=i(17781),s=v(i(41380)),r=i(52576),l=i(41639),d=i(57653),u=i(3104),c=i(19747),h=i(34396),p=i(80126),g=v(i(92201)),_=v(i(18648)),f=v(i(18129)),m=v(i(6523));function v(e){return e&&e.__esModule?e:{default:e}}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},C.apply(null,arguments)}const{tableCreator:y}=g.default,b="dx-scheduler-group-table",x="dx-scheduler-header-panel-cell",w="dx-scheduler-header-panel-week-cell",S=s.default.dateToMilliseconds;class D extends m.default{constructor(){super(...arguments),this.viewDirection="horizontal"}get verticalGroupTableClass(){return b}get renovatedHeaderPanelComponent(){return c.HeaderPanelTimelineComponent}getGroupTableWidth(){return this._$sidebarTable?(0,d.getOuterWidth)(this._$sidebarTable):0}_getTotalRowCount(e){return this._isHorizontalGroupedWorkSpace()?this._getRowCount():(e=e||1,this._getRowCount()*e)}_getFormat(){return"shorttime"}_getWorkSpaceHeight(){return this.option("crossScrollingEnabled")&&(0,u.hasWindow)()?(0,l.getBoundingRect)(this._$dateTable.get(0)).height:(0,l.getBoundingRect)(this.$element().get(0)).height}_dateTableScrollableConfig(){const e=super._dateTableScrollableConfig(),t={direction:"horizontal"};return this.option("crossScrollingEnabled")?e:(0,r.extend)(e,t)}_needCreateCrossScrolling(){return!0}_headerScrollableConfig(){const e=super._headerScrollableConfig();return(0,r.extend)(e,{scrollByContent:!0})}supportAllDayRow(){return!1}_getGroupHeaderContainer(){return this._isHorizontalGroupedWorkSpace()?this._$thead:this._$sidebarTable}_insertAllDayRowsIntoDateTable(){return!1}_needRenderWeekHeader(){return!1}_incrementDate(e){e.setDate(e.getDate()+1)}getIndicationCellCount(){const e=this._getTimeDiff();return this._calculateDurationInCells(e)}_getTimeDiff(){let e=this._getToday();const t=this._getIndicationFirstViewDate(),i=this.getStartViewDate(),n=_.default.getDaylightOffsetInMs(i,e);return n&&(e=new Date(e.getTime()+n)),e.getTime()-t.getTime()}_calculateDurationInCells(e){const t=this._getToday(),i=Math.floor(e/S("day"));let n=(e-i*S("day")-this.option("startDayHour")*S("hour"))/this.getCellDuration();return t.getHours()>this.option("endDayHour")&&(n=this._getCellCountInDay()),n<0&&(n=0),i*this._getCellCountInDay()+n}getIndicationWidth(){if(this.isGroupedByDate()){const e=this.getIndicationCellCount(),t=Math.floor(e),i=e-t;return this.getCellWidth()*(t*this._getGroupCount()+i)}return this.getIndicationCellCount()*this.getCellWidth()}_isVerticalShader(){return!1}_isCurrentTimeHeaderCell(){return!1}_setTableSizes(){super._setTableSizes();const e=this._getWorkSpaceMinHeight();(0,d.setHeight)(this._$sidebarTable,e),(0,d.setHeight)(this._$dateTable,e),this.virtualScrollingDispatcher.updateDimensions()}_getWorkSpaceMinHeight(){let e=this._getWorkSpaceHeight();const t=(0,d.getOuterHeight)(this._$flexContainer,!0);return e<t&&(e=t),e}_getCellCoordinatesByIndex(e){return{columnIndex:e%this._getCellCount(),rowIndex:0}}_getCellByCoordinates(e,t){const i=this._groupedStrategy.prepareCellIndexes(e,t);return this._$dateTable.find("tr").eq(i.rowIndex).find("td").eq(i.columnIndex)}_getWorkSpaceWidth(){return(0,d.getOuterWidth)(this._$dateTable,!0)}_getIndicationFirstViewDate(){return s.default.trimTime(new Date(this.getStartViewDate()))}_getIntervalBetween(e,t){const i=this.option("startDayHour"),n=this.option("endDayHour"),o=this.getStartViewDate(),a=o.getTime(),r=(24-n+i)*S("hour"),l=s.default.getTimezonesDifference(o,e),d=e.getTime(),u=d-a-l,c=Math.floor(u/S("day")),h=u-c*S("day");let p=0;const g=this._getCellCountInDay()*(c-this._getWeekendsCount(c)),_=d-s.default.trimTime(new Date(e)).getTime();let f=g*this.option("hoursInterval")*S("hour");return t||(e.getHours()<i?p=h-r+_:e.getHours()>=i&&e.getHours()<n?p=h:e.getHours()>=i&&e.getHours()>=n?p=h-(_-n*S("hour")):c||(f=u),f+=p),f}_getWeekendsCount(e){return 0}getAllDayContainer(){return null}getTimePanelWidth(){return 0}getIntervalDuration(e){return this.getCellDuration()}getCellMinWidth(){return 0}getWorkSpaceLeftOffset(){return 0}scrollToTime(e,t,i){const n=this._getScrollCoordinates(e,t,i),o=this.getScrollable(),a=this.option("rtlEnabled")?(0,l.getBoundingRect)(this.getScrollableContainer().get(0)).width:0;this.option("templatesRenderAsynchronously")?setTimeout((()=>{o.scrollBy({left:n.left-o.scrollLeft()-a,top:0})})):o.scrollBy({left:n.left-o.scrollLeft()-a,top:0})}renderRAllDayPanel(){}renderRTimeTable(){}_renderGroupAllDayPanel(){}generateRenderOptions(e){return C({},super.generateRenderOptions(!0),{isGenerateWeekDaysHeaderData:this._needRenderWeekHeader(),getDateForHeaderText:h.timelineWeekUtils.getDateForHeaderText})}_init(){super._init(),this.$element().addClass("dx-scheduler-timeline"),this._$sidebarTable=(0,o.default)("<div>").addClass(b)}_getDefaultGroupStrategy(){return"vertical"}_toggleGroupingDirectionClass(){this.$element().toggleClass("dx-scheduler-work-space-horizontal-grouped",this._isHorizontalGroupedWorkSpace())}_getDefaultOptions(){return(0,r.extend)(super._getDefaultOptions(),{groupOrientation:"vertical"})}_createWorkSpaceElements(){this._createWorkSpaceScrollableElements()}_toggleAllDayVisibility(){return(0,a.noop)()}_changeAllDayVisibility(){return(0,a.noop)()}_getDateHeaderTemplate(){return this.option("timeCellTemplate")}_renderView(){let e;this.isRenovatedRender()||(e=this._renderGroupHeader()),this.renderWorkSpace(),this.isRenovatedRender()&&this.virtualScrollingDispatcher.updateDimensions(),this._shader=new f.default(this),this._$sidebarTable.appendTo(this._sidebarScrollable.$content()),this.isRenovatedRender()&&this._isVerticalGroupedWorkSpace()&&this.renderRGroupPanel(),this.updateHeaderEmptyCellWidth(),this._applyCellTemplates(e)}_setHorizontalGroupHeaderCellsHeight(){return(0,a.noop)()}_getTimePanelCells(){return this.$element().find(`.${x}:not(.${w})`)}_getCurrentTimePanelCellIndices(){const e=this._getCellCount(),t=this._getToday(),i=this.getCellIndexByDate(t),{columnIndex:n}=this._getCellCoordinatesByIndex(i);if(void 0===n)return[];const o=this._isHorizontalGroupedWorkSpace()&&!this.isGroupedByDate()?this._getGroupCount():1;return[...new Array(o)].map(((t,i)=>e*i+n))}_renderTimePanel(){return(0,a.noop)()}_renderAllDayPanel(){return(0,a.noop)()}_createAllDayPanelElements(){return(0,a.noop)()}_renderDateHeader(){const e=super._renderDateHeader();if(this._needRenderWeekHeader()){const t=new Date(this.getStartViewDate());let i=new Date(t);const n=[],a=this._getGroupCount(),s=this._getCellCountInDay(),r=this.isGroupedByDate()?s*a:s,l=this.option("dateCellTemplate"),d=this._isHorizontalGroupedWorkSpace()&&!this.isGroupedByDate()?a:1,u=this.viewDataProvider.viewDataGenerator.daysInInterval*this.option("intervalCount"),c=u*d;for(let e=0;e<c;e++){const a=(0,o.default)("<th>"),s=(0,h.formatWeekdayAndDay)(i);if(l){const t={model:C({text:s,date:new Date(i)},this._getGroupsForDateHeaderTemplate(e,r)),container:a,index:e};l.render(t)}else a.text(s);a.addClass(x).addClass(w).attr("colSpan",r),n.push(a),e%u==u-1?i=new Date(t):this._incrementDate(i)}const p=(0,o.default)("<tr>").addClass("dx-scheduler-header-row").append(n);e.before(p)}}_renderIndicator(e,t,i,n){let o;const a=this.getIndicationWidth();if("vertical"===this.option("groupOrientation"))o=this._createIndicator(i),(0,d.setHeight)(o,(0,l.getBoundingRect)(i.get(0)).height),o.css("left",t?t-a:a);else for(let e=0;e<n;e++){const n=this.isGroupedByDate()?e*this.getCellWidth():this._getCellCount()*this.getCellWidth()*e;o=this._createIndicator(i),(0,d.setHeight)(o,(0,l.getBoundingRect)(i.get(0)).height),o.css("left",t?t-a-n:a+n)}}_makeGroupRows(e,t){const i="vertical"===this.option("groupOrientation")?y.VERTICAL:y.HORIZONTAL;return y.makeGroupedTable(i,e,{groupRowClass:p.GROUP_ROW_CLASS,groupHeaderRowClass:p.GROUP_ROW_CLASS,groupHeaderClass:this._getGroupHeaderClass.bind(this),groupHeaderContentClass:p.GROUP_HEADER_CONTENT_CLASS},this._getCellCount()||1,this.option("resourceCellTemplate"),this._getTotalRowCount(this._getGroupCount()),t)}_setCurrentTimeCells(){const e=this._getTimePanelCells();this._getCurrentTimePanelCellIndices().forEach((t=>{e.eq(t).addClass(p.HEADER_CURRENT_TIME_CELL_CLASS)}))}_cleanCurrentTimeCells(){this.$element().find(`.${p.HEADER_CURRENT_TIME_CELL_CLASS}`).removeClass(p.HEADER_CURRENT_TIME_CELL_CLASS)}}(0,n.default)("dxSchedulerTimeline",D);t.default=D},52515:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(92848)),o=i(8687),a=s(i(90214));function s(e){return e&&e.__esModule?e:{default:e}}class r extends a.default{get type(){return o.VIEWS.TIMELINE_DAY}_getElementClass(){return"dx-scheduler-timeline-day"}_needRenderWeekHeader(){return this._isWorkSpaceWithCount()}}(0,n.default)("dxSchedulerTimelineDay",r);t.default=r},23791:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(92848)),o=d(i(41380)),a=i(19747),s=i(34396),r=i(8687),l=d(i(90214));function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}class c extends l.default{constructor(){super(...arguments),this.viewDirection="horizontal"}get type(){return r.VIEWS.TIMELINE_MONTH}get renovatedHeaderPanelComponent(){return a.HeaderPanelComponent}_renderView(){super._renderView(),this._updateScrollable()}_getElementClass(){return"dx-scheduler-timeline-month"}_getDateHeaderTemplate(){return this.option("dateCellTemplate")}_calculateDurationInCells(e){return e/this.getCellDuration()}isIndicatorVisible(){return!0}_getFormat(){return s.formatWeekdayAndDay}_getIntervalBetween(e){const t=this.getStartViewDate(),i=o.default.getTimezonesDifference(t,e);return e.getTime()-(t.getTime()-36e5*this.option("startDayHour"))-i}_getViewStartByOptions(){return s.monthUtils.getViewStartByOptions(this.option("startDate"),this.option("currentDate"),this.option("intervalCount"),o.default.getFirstMonthDate(this.option("startDate")))}generateRenderOptions(){return u({},super.generateRenderOptions(!0),{getDateForHeaderText:(e,t)=>t})}keepOriginalHours(){return!0}}(0,n.default)("dxSchedulerTimelineMonth",c);t.default=c},10621:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(92848)),o=i(41639),a=i(8687),s=r(i(90214));function r(e){return e&&e.__esModule?e:{default:e}}class l extends s.default{get type(){return a.VIEWS.TIMELINE_WEEK}_getElementClass(){return"dx-scheduler-timeline-week"}_getHeaderPanelCellWidth(e){return(0,o.getBoundingRect)(e.children().first().get(0)).width}_needRenderWeekHeader(){return!0}_incrementDate(e){e.setDate(e.getDate()+1)}}t.default=l,(0,n.default)("dxSchedulerTimelineWeek",l)},64063:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(92848)),o=i(34396),a=i(8687),s=r(i(10621));function r(e){return e&&e.__esModule?e:{default:e}}class l extends s.default{get type(){return a.VIEWS.TIMELINE_WORK_WEEK}constructor(){super(...arguments),this._getWeekendsCount=o.getWeekendsCount}_getElementClass(){return"dx-scheduler-timeline-work-week"}_incrementDate(e){5===e.getDay()&&e.setDate(e.getDate()+2),super._incrementDate(e)}}(0,n.default)("dxSchedulerTimelineWorkWeek",l);t.default=l},65874:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualScrollingRenderer=t.VirtualScrollingDispatcher=void 0;var n=l(i(92774)),o=i(98834),a=l(i(64960)),s=i(11528),r=i(3104);function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}const u=(0,o.addNamespace)("scroll","dxSchedulerVirtualScrolling"),c="vertical",h="horizontal",p="both",g="none",_=p;t.VirtualScrollingDispatcher=class{constructor(e){this.options=e,e&&(this._rowHeight=this.getCellHeight(),this._cellWidth=this.getCellWidth(),this._createVirtualScrollingBase())}get isRTL(){return this.options.isRTL()}get verticalVirtualScrolling(){return this._verticalVirtualScrolling}set verticalVirtualScrolling(e){this._verticalVirtualScrolling=e}get horizontalVirtualScrolling(){return this._horizontalVirtualScrolling}set horizontalVirtualScrolling(e){this._horizontalVirtualScrolling=e}get document(){return a.default.getDocument()}get height(){return this.options.getSchedulerHeight()}get width(){return this.options.getSchedulerWidth()}get rowHeight(){return this._rowHeight}set rowHeight(e){this._rowHeight=e}get outlineCount(){return this.options.getScrolling().outlineCount}get cellWidth(){return this._cellWidth}set cellWidth(e){this._cellWidth=e}get viewportWidth(){const e=this.width&&this.options.getViewWidth();return e>0?e:this.options.getWindowWidth()}get viewportHeight(){const e=this.height&&this.options.getViewHeight();return e>0?e:this.options.getWindowHeight()}get cellCountInsideTopVirtualRow(){var e;return(null===(e=this.verticalScrollingState)||void 0===e?void 0:e.virtualItemCountBefore)||0}get cellCountInsideLeftVirtualCell(){var e;return(null===(e=this.horizontalScrollingState)||void 0===e?void 0:e.virtualItemCountBefore)||0}get cellCountInsideRightVirtualCell(){var e;return(null===(e=this.horizontalScrollingState)||void 0===e?void 0:e.virtualItemCountAfter)||0}get topVirtualRowsCount(){return this.cellCountInsideTopVirtualRow>0?1:0}get leftVirtualCellsCount(){const e=this.isRTL?this.cellCountInsideRightVirtualCell:this.cellCountInsideLeftVirtualCell;return Math.ceil(e/1e3)}get virtualRowOffset(){var e;return(null===(e=this.verticalScrollingState)||void 0===e?void 0:e.virtualItemSizeBefore)||0}get virtualCellOffset(){var e;return(null===(e=this.horizontalScrollingState)||void 0===e?void 0:e.virtualItemSizeBefore)||0}get scrollingState(){var e,t;return{vertical:null===(e=this.verticalVirtualScrolling)||void 0===e?void 0:e.state,horizontal:null===(t=this.horizontalVirtualScrolling)||void 0===t?void 0:t.state}}get verticalScrollingState(){return this.scrollingState.vertical}get horizontalScrollingState(){return this.scrollingState.horizontal}get scrollingOrientation(){const e=this.options.getScrolling();return"standard"===e.mode?g:e.orientation||_}get verticalScrollingAllowed(){return this.scrollingOrientation===c||this.scrollingOrientation===p}get horizontalScrollingAllowed(){return this.scrollingOrientation===h||this.scrollingOrientation===p}setViewOptions(e){this.options=e,this.verticalVirtualScrolling&&(this.verticalVirtualScrolling.options=e,this.verticalVirtualScrolling.itemSize=this.rowHeight,this.verticalVirtualScrolling.viewportSize=this.viewportHeight),this.horizontalVirtualScrolling&&(this.horizontalVirtualScrolling.options=e,this.verticalVirtualScrolling.itemSize=this.cellWidth,this.verticalVirtualScrolling.viewportSize=this.viewportWidth)}getRenderState(){var e,t;return d({},(null===(e=this.verticalVirtualScrolling)||void 0===e?void 0:e.getRenderState())||{},(null===(t=this.horizontalVirtualScrolling)||void 0===t?void 0:t.getRenderState())||{})}getCellHeight(){const e=this.options.getCellHeight(),t=e>0?e:50;return Math.floor(t)}getCellWidth(){let e=this.options.getCellWidth();const t=this.options.getCellMinWidth();(!e||e<t)&&(e=t);const i=e>0?e:1;return Math.floor(i)}calculateCoordinatesByDataAndPosition(e,t,i,n,o){const{rowIndex:a,columnIndex:s}=t,{startDate:r,endDate:l,allDay:d}=e,u=i.getTime(),c=r.getTime(),h=l.getTime(),p=d||!n?0:(u-c)/(h-c),g=this.getCellWidth(),_=this.getCellHeight(),f=o?(a+p)*_:a*_;let m=o?s*g:(s+p)*g;return this.isRTL&&(m=this.options.getScrollableOuterWidth()-m),{top:f,left:m}}dispose(){this._onScrollHandler&&n.default.off(this.document,u,this._onScrollHandler)}createVirtualScrolling(){const e=!!this.verticalVirtualScrolling,t=!!this.horizontalVirtualScrolling;this.verticalScrollingAllowed===e&&this.horizontalScrollingAllowed===t||(this._rowHeight=this.getCellHeight(),this._cellWidth=this.getCellWidth(),this._createVirtualScrollingBase())}_createVirtualScrollingBase(){this.verticalScrollingAllowed&&(this.verticalVirtualScrolling=new m(d({},this.options,{viewportHeight:this.viewportHeight,rowHeight:this.rowHeight,outlineCount:this.outlineCount}))),this.horizontalScrollingAllowed&&(this.horizontalVirtualScrolling=new v(d({},this.options,{viewportWidth:this.viewportWidth,cellWidth:this.cellWidth,outlineCount:this.outlineCount})))}isAttachWindowScrollEvent(){return(this.horizontalScrollingAllowed||this.verticalScrollingAllowed)&&!this.height}attachScrollableEvents(){this.isAttachWindowScrollEvent()&&this._attachWindowScroll()}_attachWindowScroll(){const e=(0,r.getWindow)();this._onScrollHandler=this.options.createAction((()=>{const{scrollX:t,scrollY:i}=e;(t>=10||i>=10)&&this.handleOnScrollEvent({left:t,top:i})})),n.default.on(this.document,u,this._onScrollHandler)}handleOnScrollEvent(e){if(e){var t,i;const{left:a,top:r}=e,l=(0,s.isDefined)(r)&&(null===(t=this.verticalVirtualScrolling)||void 0===t?void 0:t.updateState(r)),d=(0,s.isDefined)(a)&&(null===(i=this.horizontalVirtualScrolling)||void 0===i?void 0:i.updateState(a));var n,o;if(l||d)null===(n=(o=this.options).updateRender)||void 0===n||n.call(o)}}updateDimensions(e){const t=this.getCellHeight(),i=this.verticalScrollingAllowed&&t!==this.rowHeight;(i||e)&&this.verticalVirtualScrolling&&(this.rowHeight=t,this.verticalVirtualScrolling.viewportSize=this.viewportHeight,this.verticalVirtualScrolling.reinitState(t,e));const n=this.getCellWidth(),o=this.horizontalScrollingAllowed&&n!==this.cellWidth;var a,s;((o||e)&&this.horizontalVirtualScrolling&&(this.cellWidth=n,this.horizontalVirtualScrolling.viewportSize=this.viewportWidth,this.horizontalVirtualScrolling.reinitState(n,e)),i||o)&&(null===(a=(s=this.options).updateGrid)||void 0===a||a.call(s))}};class f{constructor(e){this.options=e,this._state=this.defaultState,this.viewportSize=this.options.viewportSize,this._itemSize=this.options.itemSize,this._position=-1,this._itemSizeChanged=!1,this.updateState(0)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSizeChanged=this._itemSize!==e,this._itemSize=e}get state(){return this._state}set state(e){this._state=e}get startIndex(){return this.state.startIndex}get pageSize(){return Math.ceil(this.viewportSize/this.itemSize)}get outlineCount(){return(0,s.isDefined)(this.options.outlineCount)?this.options.outlineCount:Math.floor(this.pageSize/2)}get groupCount(){return this.options.getGroupCount()}get isVerticalGrouping(){return this.options.isVerticalGrouping()}get defaultState(){return{prevPosition:0,startIndex:-1,itemCount:0,virtualItemCountBefore:0,virtualItemCountAfter:0,outlineCountBefore:0,outlineCountAfter:0,virtualItemSizeBefore:0,virtualItemSizeAfter:0,outlineSizeBefore:0,outlineSizeAfter:0}}get maxScrollPosition(){return this.getTotalItemCount()*this.itemSize-this.viewportSize}get position(){return this._position}set position(e){this._position=e}needUpdateState(e){const{prevPosition:t,startIndex:i}=this.state;if(i<0)return!0;let n=!1;if(this._validateAndSavePosition(e)){if(0===e||e===this.maxScrollPosition)return!0;const i=t,o=Math.floor(i/this.itemSize),a=Math.floor(e/this.itemSize);n=Math.abs(o-a)>=this.outlineCount}return n}_validateAndSavePosition(e){if(!(0,s.isDefined)(e))return!1;const t=this.position!==e;return this.position=e,t}_correctPosition(e){return e>=0?Math.min(e,this.maxScrollPosition):-1}updateState(e,t){if(e=this._correctPosition(e),!this.needUpdateState(e)&&!t)return!1;const i=this._calcItemInfoBefore(e),n=this._calcItemDeltaBefore(i),{outlineCountAfter:o,virtualItemCountAfter:a,itemCountWithAfter:s}=this._calcItemInfoAfter(n),{virtualItemCountBefore:r,outlineCountBefore:l}=i,d=l+s+o,u=Math.floor(e/this.itemSize);return this.state.prevPosition=u*this.itemSize,this.state.startIndex=u-l,this.state.virtualItemCountBefore=r,this.state.outlineCountBefore=l,this.state.itemCount=d,this.state.outlineCountAfter=o,this.state.virtualItemCountAfter=a,this._updateStateCore(),!0}reinitState(e,t){const{position:i}=this;this.itemSize=e,this.updateState(0,t),i>0&&this.updateState(i,t)}_calcItemInfoBefore(e){let t=Math.floor(e/this.itemSize);const i=Math.min(t,this.outlineCount);return t-=i,{virtualItemCountBefore:t,outlineCountBefore:i}}_calcItemDeltaBefore(e){const{virtualItemCountBefore:t,outlineCountBefore:i}=e;return this.getTotalItemCount()-t-i}getTotalItemCount(){throw"getTotalItemCount method should be implemented"}getRenderState(){throw"getRenderState method should be implemented"}_calcItemInfoAfter(e){const t=e>=this.pageSize?this.pageSize:e;let i=e-t;const n=i>0?Math.min(i,this.outlineCount):0;return i>0&&(i-=n),{virtualItemCountAfter:i,outlineCountAfter:n,itemCountWithAfter:t}}_updateStateCore(){const{state:e}=this,{virtualItemCountBefore:t}=e,{virtualItemCountAfter:i}=e,{outlineCountBefore:n}=e,{outlineCountAfter:o}=e,a=e.virtualItemSizeBefore,s=e.virtualItemSizeAfter,r=e.outlineSizeBefore,l=e.outlineSizeAfter,d=this.itemSize*t,u=this.itemSize*i,c=a+r<d+this.itemSize*n,h=s+l<u+this.itemSize*o;(this._itemSizeChanged||c||h)&&this._updateStateVirtualItems(d,u)}_updateStateVirtualItems(e,t){const{state:i}=this;i.virtualItemSizeBefore=e,i.virtualItemSizeAfter=t}}class m extends f{constructor(e){super(d({},e,{itemSize:e.rowHeight,viewportSize:e.viewportHeight}))}get prevTopPosition(){return this.state.prevPosition}get rowCount(){return this.state.itemCount}get topVirtualRowCount(){return this.state.virtualItemCountBefore}get bottomVirtualRowCount(){return this.state.virtualItemCountAfter}getTotalItemCount(){return this.options.getTotalRowCount(this.groupCount,this.isVerticalGrouping)}getRenderState(){return{topVirtualRowHeight:this.state.virtualItemSizeBefore,bottomVirtualRowHeight:this.state.virtualItemSizeAfter,startRowIndex:this.state.startIndex,rowCount:this.state.itemCount,startIndex:this.state.startIndex}}}class v extends f{constructor(e){super(d({},e,{itemSize:e.cellWidth,viewportSize:e.viewportWidth}))}get isRTL(){return this.options.isRTL()}getTotalItemCount(){return this.options.getTotalCellCount(this.groupCount,this.isVerticalGrouping)}getRenderState(){return{leftVirtualCellWidth:this.state.virtualItemSizeBefore,rightVirtualCellWidth:this.state.virtualItemSizeAfter,startCellIndex:this.state.startIndex,cellCount:this.state.itemCount,cellWidth:this.itemSize}}_updateStateVirtualItems(e,t){if(this.isRTL){const{state:i}=this;i.virtualItemSizeAfter=e,i.virtualItemSizeBefore=t,i.startIndex=this.getTotalItemCount()-this.startIndex-this.state.itemCount}else super._updateStateVirtualItems(e,t)}}t.VirtualScrollingRenderer=class{constructor(e){this._workspace=e,this._renderAppointmentTimeoutID=null}getRenderTimeout(){return 15}get workspace(){return this._workspace}updateRender(){this._renderGrid(),this._renderAppointments()}_renderGrid(){this.workspace.renderWorkSpace(!1)}_renderAppointments(){const e=this.getRenderTimeout();e>=0?(clearTimeout(this._renderAppointmentTimeoutID),this._renderAppointmentTimeoutID=setTimeout((()=>this.workspace.updateAppointments()),e)):this.workspace.updateAppointments()}}},45277:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=i(64044),a=i(80248),s=$(i(92774)),r=i(59144),l=$(i(89797)),d=i(98834),u=$(i(4671)),c=$(i(64960)),h=i(61404),p=$(i(64553)),g=i(17781),_=i(31e3),f=$(i(41380)),m=i(52576),v=i(41639),C=i(57653),y=i(11528),b=i(3104),x=$(i(20876)),w=$(i(35185)),S=i(11371),D=i(19747),I=i(34396),E=$(i(69133)),T=$(i(80621)),A=i(80126),O=i(8687),P=$(i(92201)),k=i(5327),M=i(45629),R=$(i(28471)),L=i(39979),B=i(26691),V=i(46380),F=$(i(37331)),H=i(65874),N=$(i(24005)),z=$(i(16259)),W=$(i(6051));function $(e){return e&&e.__esModule?e:{default:e}}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},G.apply(null,arguments)}const{tableCreator:j}=P.default,{abstract:U}=E.default,K=f.default.dateToMilliseconds,Z="dx-scheduler-work-space-vertical-group-table",q="dx-scheduler-time-panel-cell",Y="dx-scheduler-all-day-panel",X="dx-scheduler-all-day-table",Q="dx-scheduler-all-day-title",J="dx-scheduler-all-day-table-cell",ee="dx-scheduler-work-space-mouse-selection",te="dx-scheduler-cell-sizes-horizontal",ie="dx-scheduler-cell-sizes-vertical",ne="dx-scheduler-group-header",oe="dx-scheduler-date-table-cell",ae="dx-scheduler-date-table-droppable-cell",se=(0,d.addNamespace)(l.default.down,"dxSchedulerWorkSpace"),re={ENTER:(0,d.addNamespace)(r.enter,"dxSchedulerDateTable"),DROP:(0,d.addNamespace)(r.drop,"dxSchedulerDateTable"),LEAVE:(0,d.addNamespace)(r.leave,"dxSchedulerDateTable")},le=(0,d.addNamespace)(o.name,"dxSchedulerDateTable"),de=(0,d.addNamespace)(l.default.down,"dxSchedulerDateTable"),ue=(0,d.addNamespace)(l.default.up,"dxSchedulerDateTable"),ce=(0,d.addNamespace)(l.default.move,"dxSchedulerDateTable"),he="dxCellData",pe=K("day"),ge=K("hour"),_e=`.${A.DATE_TABLE_CLASS} td, .${X} td`,fe=`.${oe}, .${J}`,me={renderComponents:{header:!0,timePanel:!0,dateTable:!0,allDayPanel:!0},generateNewData:!0};class ve extends E.default{constructor(){super(...arguments),this.viewDirection="vertical"}get type(){return""}get viewDataProvider(){return this._viewDataProvider||(this._viewDataProvider=new W.default(this.type)),this._viewDataProvider}get cache(){return this._cache||(this._cache=new B.Cache),this._cache}get cellsSelectionState(){if(!this._cellsSelectionState){this._cellsSelectionState=new F.default(this.viewDataProvider);const e=this.option("selectedCellData");if((null==e?void 0:e.length)>0){const t=e.map((e=>{const{groups:t}=e;if(!t||0===this._getGroupCount())return G({},e,{groupIndex:0});return G({},e,{groupIndex:this._getGroupIndexByResourceId(t)})}));this._cellsSelectionState.setSelectedCellsByData(t)}}return this._cellsSelectionState}get cellsSelectionController(){return this._cellsSelectionController||(this._cellsSelectionController=new V.CellsSelectionController),this._cellsSelectionController}get isAllDayPanelVisible(){return this._isShowAllDayPanel()&&this.supportAllDayRow()}get verticalGroupTableClass(){return Z}get renovatedHeaderPanelComponent(){return D.HeaderPanelComponent}get timeZoneCalculator(){return this.option("timeZoneCalculator")}get isDefaultDraggingMode(){return"default"===this.option("draggingMode")}_supportedKeys(){const e=function(e){e.preventDefault(),e.stopPropagation();const t=this.cellsSelectionState.getSelectedCells();if(null!=t&&t.length){const i=t.map((e=>this._getCellByData(e))).filter((e=>!!e));e.target=i,this._showPopup=!0,this._cellClickAction({event:e,cellElement:(0,p.default)(i),cellData:t[0]})}},t=(e,t)=>{var i;e.preventDefault(),e.stopPropagation();const n=null===(i=this.cellsSelectionState.focusedCell)||void 0===i?void 0:i.cellData;if(n){const i=n.allDay&&!this._isVerticalGroupedWorkSpace(),o=e.shiftKey,a=this.option("allowMultipleCellSelection"),s=this._isRTL(),r=this._getGroupCount(),l=this.isGroupedByDate(),d=this._isHorizontalGroupedWorkSpace(),u=this.viewDataProvider.findCellPositionInMap(G({},n,{isAllDay:n.allDay})),c=d&&o&&!l?this.viewDataProvider.getGroupEdgeIndices(n.groupIndex,i):this.viewDataProvider.getViewEdgeIndices(i),h=this.cellsSelectionController.handleArrowClick({focusedCellPosition:u,edgeIndices:c,isRTL:s,isGroupedByDate:l,groupCount:r,isMultiSelection:o,isMultiSelectionAllowed:a,viewType:this.type,key:t,getCellDataByPosition:this.viewDataProvider.getCellData.bind(this.viewDataProvider),isAllDayPanelCell:i,focusedCellData:n});this._processNextSelectedCell(h,n,o&&a)}};return(0,m.extend)(super._supportedKeys(),{enter:e,space:e,downArrow:e=>{t(e,"down")},upArrow:e=>{t(e,"up")},rightArrow:e=>{t(e,"right")},leftArrow:e=>{t(e,"left")}})}_isRTL(){return this.option("rtlEnabled")}_moveToCell(e,t){if(!(0,y.isDefined)(e)||!e.length)return;const i=this.option("allowMultipleCellSelection"),n=this._getFullCellData(e),o=this.cellsSelectionState.focusedCell.cellData,a=this.cellsSelectionController.moveToCell({isMultiSelection:t,isMultiSelectionAllowed:i,currentCellData:n,focusedCellData:o,isVirtualCell:e.hasClass(A.VIRTUAL_CELL_CLASS)});this._processNextSelectedCell(a,o,i&&t)}_processNextSelectedCell(e,t,i){const n=this.viewDataProvider.findCellPositionInMap({startDate:e.startDate,groupIndex:e.groupIndex,isAllDay:e.allDay,index:e.index});if(!this.viewDataProvider.isSameCell(t,e)){const t=e.allDay&&!this._isVerticalGroupedWorkSpace()?this._dom_getAllDayPanelCell(n.columnIndex):this._dom_getDateCell(n),o=e.allDay;this._setSelectedCellsStateAndUpdateSelection(o,n,i,t),this._dateTableScrollable.scrollToElement(t)}}_setSelectedCellsStateAndUpdateSelection(e,t,i,n){const o={rowIndex:t.rowIndex,columnIndex:t.columnIndex,allDay:e};this.cellsSelectionState.setFocusedCell(o.rowIndex,o.columnIndex,e),i?this.cellsSelectionState.setSelectedCells(o):this.cellsSelectionState.setSelectedCells(o,o),this.updateCellsSelection(),this._updateSelectedCellDataOption(this.cellsSelectionState.getSelectedCells(),n)}_hasAllDayClass(e){return e.hasClass(J)}_focusInHandler(e){if((0,p.default)(e.target).is(this._focusTarget())&&this._isCellClick){if(delete this._isCellClick,delete this._contextMenuHandled,super._focusInHandler.apply(this,arguments),this.cellsSelectionState.restoreSelectedAndFocusedCells(),!this.cellsSelectionState.focusedCell){const e={columnIndex:0,rowIndex:0,allDay:this._isVerticalGroupedWorkSpace()&&this.isAllDayPanelVisible};this.cellsSelectionState.setFocusedCell(e.rowIndex,e.columnIndex,e.allDay),this.cellsSelectionState.setSelectedCells(e,e)}this.updateCellsSelection(),this._updateSelectedCellDataOption(this.cellsSelectionState.getSelectedCells())}}_focusOutHandler(){super._focusOutHandler.apply(this,arguments),this._contextMenuHandled||this._disposed||(this.cellsSelectionState.releaseSelectedAndFocusedCells(),this.viewDataProvider.updateViewData(this.generateRenderOptions()),this.updateCellsSelection())}_focusTarget(){return this.$element()}_isVerticalGroupedWorkSpace(){var e;return!(null===(e=this.option("groups"))||void 0===e||!e.length)&&"vertical"===this.option("groupOrientation")}_isHorizontalGroupedWorkSpace(){var e;return!(null===(e=this.option("groups"))||void 0===e||!e.length)&&"horizontal"===this.option("groupOrientation")}_isWorkSpaceWithCount(){return this.option("intervalCount")>1}_isWorkspaceWithOddCells(){return.5===this.option("hoursInterval")&&!this.isVirtualScrolling()}_getRealGroupOrientation(){return this._isVerticalGroupedWorkSpace()?"vertical":"horizontal"}createRAllDayPanelElements(){this._$allDayPanel=(0,p.default)("<div>").addClass(Y),this._$allDayTitle=(0,p.default)("<div>").appendTo(this._$headerPanelEmptyCell)}_dateTableScrollableConfig(){let e={useKeyboard:!1,bounceEnabled:!1,updateManually:!0,onScroll:()=>{var e;null===(e=this._groupedStrategy.cache)||void 0===e||e.clear()}};if(this._needCreateCrossScrolling()&&(e=(0,m.extend)(e,this._createCrossScrollingConfig(e))),this.isVirtualScrolling()&&(this.virtualScrollingDispatcher.horizontalScrollingAllowed||this.virtualScrollingDispatcher.height)){const t=e.onScroll;e=G({},e,{onScroll:e=>{null==t||t(e),this.virtualScrollingDispatcher.handleOnScrollEvent(null==e?void 0:e.scrollOffset)}})}return e}_createCrossScrollingConfig(e){let{onScroll:t}=e;return{direction:"both",onScroll:e=>{null==t||t(),this._scrollSync.sidebar({top:e.scrollOffset.top}),this._scrollSync.header({left:e.scrollOffset.left})},onEnd:()=>{this.option("onScrollEnd")()}}}_headerScrollableConfig(){return{useKeyboard:!1,showScrollbar:"never",direction:"horizontal",useNative:!1,updateManually:!0,bounceEnabled:!1,onScroll:e=>{this._scrollSync.dateTable({left:e.scrollOffset.left})}}}_visibilityChanged(e){this.cache.clear(),e&&this._updateGroupTableHeight(),e&&this._needCreateCrossScrolling()&&this._setTableSizes()}_setTableSizes(){this.cache.clear(),this._attachTableClasses();let e=this.getCellWidth();e<this.getCellMinWidth()&&(e=this.getCellMinWidth());const t=this.getWorkSpaceMinWidth(),i=this._getGroupCount();let n=e*this._getTotalCellCount(i);n<t&&(n=t),(0,C.setWidth)(this._$headerPanel,n),(0,C.setWidth)(this._$dateTable,n),this._$allDayTable&&(0,C.setWidth)(this._$allDayTable,n),this._attachHeaderTableClasses(),this._updateGroupTableHeight(),this._updateScrollable()}getWorkSpaceMinWidth(){return this._groupedStrategy.getWorkSpaceMinWidth()}_dimensionChanged(){this._isVisible()&&(this.option("crossScrollingEnabled")&&this._setTableSizes(),this.updateHeaderEmptyCellWidth(),this._updateScrollable(),this.cache.clear())}_needCreateCrossScrolling(){return this.option("crossScrollingEnabled")}_getElementClass(){return(0,g.noop)()}_getRowCount(){return this.viewDataProvider.getRowCount({intervalCount:this.option("intervalCount"),currentDate:this.option("currentDate"),viewType:this.type,hoursInterval:this.option("hoursInterval"),startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour")})}_getCellCount(){return this.viewDataProvider.getCellCount({intervalCount:this.option("intervalCount"),currentDate:this.option("currentDate"),viewType:this.type,hoursInterval:this.option("hoursInterval"),startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour")})}isRenovatedRender(){return this.renovatedRenderSupported()&&this.option("renovateRender")}_isVirtualModeOn(){return"virtual"===this.option("scrolling.mode")}isVirtualScrolling(){return this.isRenovatedRender()&&this._isVirtualModeOn()}_initVirtualScrolling(){this.virtualScrollingDispatcher&&(this.virtualScrollingDispatcher.dispose(),this.virtualScrollingDispatcher=null),this.virtualScrollingDispatcher=new H.VirtualScrollingDispatcher(this._getVirtualScrollingDispatcherOptions()),this.virtualScrollingDispatcher.attachScrollableEvents(),this.renderer=new H.VirtualScrollingRenderer(this)}onDataSourceChanged(e){}isGroupedAllDayPanel(){return(0,I.calculateIsGroupedAllDayPanel)(this.option("groups"),this.option("groupOrientation"),this.isAllDayPanelVisible)}generateRenderOptions(e){var t;const i=this._getGroupCount()>0?this.option("groupOrientation"):this._getDefaultGroupStrategy();return G({groupByDate:this.option("groupByDate"),startRowIndex:0,startCellIndex:0,groupOrientation:i,today:null===(t=this._getToday)||void 0===t?void 0:t.call(this),groups:this.option("groups"),isProvideVirtualCellsWidth:e,isAllDayPanelVisible:this.isAllDayPanelVisible,selectedCells:this.cellsSelectionState.getSelectedCells(),focusedCell:this.cellsSelectionState.focusedCell,headerCellTextFormat:this._getFormat(),getDateForHeaderText:(e,t)=>t,viewOffset:this.option("viewOffset"),startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour"),cellDuration:this.getCellDuration(),viewType:this.type,intervalCount:this.option("intervalCount"),hoursInterval:this.option("hoursInterval"),currentDate:this.option("currentDate"),startDate:this.option("startDate"),firstDayOfWeek:this.option("firstDayOfWeek"),showCurrentTimeIndicator:this.option("showCurrentTimeIndicator")},this.virtualScrollingDispatcher.getRenderState())}renovatedRenderSupported(){return!0}_updateGroupTableHeight(){this._isVerticalGroupedWorkSpace()&&(0,b.hasWindow)()&&this._setHorizontalGroupHeaderCellsHeight()}updateHeaderEmptyCellWidth(){if((0,b.hasWindow)()&&this._isRenderHeaderPanelEmptyCell()){const e=this.getTimePanelWidth(),t=this.getGroupTableWidth();this._$headerPanelEmptyCell.css("width",e+t)}}_isGroupsSpecified(e){var t;return(null===(t=this.option("groups"))||void 0===t?void 0:t.length)&&e}_getGroupIndexByResourceId(e){const t=this.option("groups"),i=(0,M.createResourcesTree)(t);return i.length?this._getGroupIndexRecursively(i,e):0}_getGroupIndexRecursively(e,t){const i=e[0].name,n=t[i];return e.reduce(((e,i)=>{let{leafIndex:o,value:a,children:s}=i;const r=n===a;return r&&void 0!==o?o:r?this._getGroupIndexRecursively(s,t):e}),0)}_getViewStartByOptions(){return(0,I.getViewStartByOptions)(this.option("startDate"),this.option("currentDate"),this._getIntervalDuration(),this.option("startDate")?this._calculateViewStartDate():void 0)}_getIntervalDuration(){return this.viewDataProvider.getIntervalDuration(this.option("intervalCount"))}_getHeaderDate(){return this.getStartViewDate()}_calculateViewStartDate(){return(0,I.calculateViewStartDate)(this.option("startDate"))}_firstDayOfWeek(){return this.viewDataProvider.getFirstDayOfWeek(this.option("firstDayOfWeek"))}_attachEvents(){this._createSelectionChangedAction(),this._attachClickEvent(),this._attachContextMenuEvent()}_attachClickEvent(){const e=this,t=this._createAction((t=>{e._pointerDownHandler(t.event)}));this._createCellClickAction();const i=`.${oe},.${J}`,n=this.$element();s.default.off(n,se),s.default.off(n,le),s.default.on(n,se,(e=>{(0,d.isMouseEvent)(e)&&e.which>1?e.preventDefault():t({event:e})})),s.default.on(n,le,i,(t=>{const i=(0,p.default)(t.target);e._cellClickAction({event:t,cellElement:(0,h.getPublicElement)(i),cellData:e.getCellData(i)})}))}_createCellClickAction(){this._cellClickAction=this._createActionByOption("onCellClick",{afterExecute:e=>this._cellClickHandler(e.args[0].event)})}_createSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged")}_cellClickHandler(e){this._showPopup&&(delete this._showPopup,this._handleSelectedCellsClick())}_pointerDownHandler(e){const t=(0,p.default)(e.target);if(t.hasClass(oe)||t.hasClass(J))if(this._isCellClick=!0,t.hasClass("dx-scheduler-focused-cell"))this._showPopup=!0;else{const e=this._getCoordinatesByCell(t),i=this._hasAllDayClass(t);this._setSelectedCellsStateAndUpdateSelection(i,e,!1,t)}else this._isCellClick=!1}_handleSelectedCellsClick(){const e=this.cellsSelectionState.getSelectedCells(),t=e[0],i=e[e.length-1],n={startDate:t.startDate,endDate:i.endDate};void 0!==i.allDay&&(n.allDay=i.allDay),this.option("onSelectedCellsClick")(n,i.groups)}_attachContextMenuEvent(){this._createContextMenuAction();const e=`.${oe},.${J}`,t=this.$element(),i=(0,d.addNamespace)(a.name,this.NAME);s.default.off(t,i,e),s.default.on(t,i,e,this._contextMenuHandler.bind(this))}_contextMenuHandler(e){const t=(0,p.default)(e.target);this._contextMenuAction({event:e,cellElement:(0,h.getPublicElement)(t),cellData:this.getCellData(t)}),this._contextMenuHandled=!0}_createContextMenuAction(){this._contextMenuAction=this._createActionByOption("onCellContextMenu")}_getGroupHeaderContainer(){return this._isVerticalGroupedWorkSpace()?this._$groupTable:this._$thead}_getDateHeaderContainer(){return this._$thead}_getCalculateHeaderCellRepeatCount(){return this._groupedStrategy.calculateHeaderCellRepeatCount()}_updateScrollable(){var e,t;this._dateTableScrollable.update(),null===(e=this._headerScrollable)||void 0===e||e.update(),null===(t=this._sidebarScrollable)||void 0===t||t.update()}_getTimePanelRowCount(){return this._getCellCountInDay()}_getCellCountInDay(){const e=this.option("hoursInterval"),t=this.option("startDayHour"),i=this.option("endDayHour");return this.viewDataProvider.getCellCountInDay(t,i,e)}_getTotalCellCount(e){return this._groupedStrategy.getTotalCellCount(e)}_getTotalRowCount(e,t){let i=this._groupedStrategy.getTotalRowCount(e);return t&&this.isAllDayPanelVisible&&(i+=e),i}_getGroupIndex(e,t){return this._groupedStrategy.getGroupIndex(e,t)}calculateEndDate(e){const{viewDataGenerator:t}=this.viewDataProvider;return t.calculateEndDate(e,t.getInterval(this.option("hoursInterval")),this.option("endDayHour"))}_getGroupCount(){return(0,I.getGroupCount)(this.option("groups"))}_attachTablesEvents(){const e=this.$element();this._attachDragEvents(e),this._attachPointerEvents(e)}_detachDragEvents(e){s.default.off(e,re.ENTER),s.default.off(e,re.LEAVE),s.default.off(e,re.DROP)}_attachDragEvents(e){this._detachDragEvents(e);s.default.on(e,re.ENTER,_e,{checkDropTarget:(e,t)=>!this._isOutsideScrollable(e,t)},(e=>{this.preventDefaultDragging||(this.removeDroppableCellClass(),(0,p.default)(e.target).addClass(ae))})),s.default.on(e,re.LEAVE,(()=>{this.preventDefaultDragging||this.removeDroppableCellClass()})),s.default.on(e,re.DROP,_e,(()=>{var e,t;this.dragBehavior&&(null!==(e=this.dragBehavior)&&void 0!==e&&e.dragBetweenComponentsPromise?null===(t=this.dragBehavior.dragBetweenComponentsPromise)||void 0===t||t.then((()=>{this.dragBehavior.removeDroppableClasses()})):this.dragBehavior.removeDroppableClasses())}))}_attachPointerEvents(e){let t=!1;s.default.off(e,ce),s.default.off(e,de),s.default.on(e,de,_e,(e=>{(0,d.isMouseEvent)(e)&&1===e.which&&(t=!0,this.$element().addClass(ee),s.default.off(c.default.getDocument(),ue),s.default.on(c.default.getDocument(),ue,(()=>{t=!1,this.$element().removeClass(ee)})))})),s.default.on(e,ce,_e,(e=>{t&&this._dateTableScrollable&&!this._dateTableScrollable.option("scrollByContent")&&(e.preventDefault(),e.stopPropagation(),this._moveToCell((0,p.default)(e.target),!0))}))}_getFormat(){return U()}getWorkArea(){return this._$dateTableContainer}getScrollable(){return this._dateTableScrollable}getScrollableScrollTop(){return this._dateTableScrollable.scrollTop()}getGroupedScrollableScrollTop(e){return this._groupedStrategy.getScrollableScrollTop(e)}getScrollableScrollLeft(){return this._dateTableScrollable.scrollLeft()}getScrollableOuterWidth(){return this._dateTableScrollable.scrollWidth()}getScrollableContainer(){return(0,p.default)(this._dateTableScrollable.container())}getHeaderPanelHeight(){return this._$headerPanel&&(0,C.getOuterHeight)(this._$headerPanel,!0)}getTimePanelWidth(){return this._$timePanel&&(0,v.getBoundingRect)(this._$timePanel.get(0)).width}getGroupTableWidth(){return this._$groupTable?(0,C.getOuterWidth)(this._$groupTable):0}getWorkSpaceLeftOffset(){return this._groupedStrategy.getLeftOffset()}_getCellCoordinatesByIndex(e){const t=Math.floor(e/this._getRowCount());return{columnIndex:t,rowIndex:e-this._getRowCount()*t}}_getDateGenerationOptions(){var e;return{startDayHour:this.option("startDayHour"),endDayHour:this.option("endDayHour"),isWorkView:this.viewDataProvider.viewDataGenerator.isWorkView,interval:null===(e=this.viewDataProvider.viewDataGenerator)||void 0===e?void 0:e.getInterval(this.option("hoursInterval")),startViewDate:this.getStartViewDate(),firstDayOfWeek:this._firstDayOfWeek()}}_getIntervalBetween(e,t){const i=this.getStartViewDate(),n=this.option("startDayHour")*ge,o=f.default.getTimezonesDifference(i,e),a=e.getTime()-i.getTime()-o,s=this._getDaysOfInterval(a,n),r=this._getWeekendsCount(s);let l=(s-r)*pe;if(!t){const{hiddenInterval:e}=this.viewDataProvider;l=a-s*e-r*this.getVisibleDayDuration()}return l}_getWeekendsCount(e){return 0}_getDaysOfInterval(e,t){return Math.floor((e+t)/pe)}_updateIndex(e){return e*this._getRowCount()}_getDroppableCell(){return this._getDateTables().find(`.${ae}`)}_getWorkSpaceWidth(){return this.cache.get("workspaceWidth",(()=>{if(this._needCreateCrossScrolling())return(0,v.getBoundingRect)(this._$dateTable.get(0)).width;return(0,v.getBoundingRect)(this.$element().get(0)).width-this.getTimePanelWidth()-this.getGroupTableWidth()}))}_getCellByCoordinates(e,t,i){const n=this._groupedStrategy.prepareCellIndexes(e,t,i);return this._dom_getDateCell(n)}_dom_getDateCell(e){return this._$dateTable.find("tr:not(.dx-scheduler-virtual-row)").eq(e.rowIndex).find(`td:not(.${A.VIRTUAL_CELL_CLASS})`).eq(e.columnIndex)}_dom_getAllDayPanelCell(e){return this._$allDayPanel.find("tr").eq(0).find("td").eq(e)}_getCells(e,t){const i=e?J:oe;if("vertical"===t){let e=[];for(let t=1;;t++){const n=this.$element().find(`tr .${i}:nth-child(${t})`);if(!n.length)break;e=e.concat(n.toArray())}return(0,p.default)(e)}return this.$element().find(`.${i}`)}_getFirstAndLastDataTableCell(){const e=this.isVirtualScrolling()?`.${oe}, .${A.VIRTUAL_CELL_CLASS}`:`.${oe}`,t=this.$element().find(e);return[t[0],t[t.length-1]]}_getAllCells(e){if(this._isVerticalGroupedWorkSpace())return this._$dateTable.find(`td:not(.${A.VIRTUAL_CELL_CLASS})`);const t=e&&this.supportAllDayRow()?J:oe;return this.$element().find(`.${t}`)}_setHorizontalGroupHeaderCellsHeight(){const{height:e}=(0,v.getBoundingRect)(this._$dateTable.get(0));(0,C.setOuterHeight)(this._$groupTable,e)}_getGroupHeaderCells(){return this.$element().find(`.${ne}`)}_getScrollCoordinates(e,t,i,n,o){const a=i||new Date(this.option("currentDate")),s=this.option("startDayHour"),r=this.option("endDayHour");e<s&&(e=s),e>=r&&(e=r-1),a.setHours(e,t,0,0);const l=this.viewDataProvider.findGlobalCellPosition(a,n,o),{position:d,cellData:u}=l;return this.virtualScrollingDispatcher.calculateCoordinatesByDataAndPosition(u,d,a,(0,I.isDateAndTimeView)(this.type),"vertical"===this.viewDirection)}_isOutsideScrollable(e,t){const i=this._dateTableScrollable.$element(),n=(0,v.getBoundingRect)(i.get(0)),o=(0,b.getWindow)(),a=!(0,p.default)(e).closest(i).length,s=t.pageX<n.left||t.pageX>n.left+n.width+(o.scrollX||0),r=t.pageY<n.top||t.pageY>n.top+n.height+(o.scrollY||0);return!(a&&!s)&&(r||s)}setCellDataCache(e,t,i){const n=JSON.stringify({rowIndex:e.rowIndex,columnIndex:e.columnIndex,groupIndex:t});this.cache.set(n,this.getCellData(i))}setCellDataCacheAlias(e,t){const i=JSON.stringify({rowIndex:e.rowIndex,columnIndex:e.columnIndex,groupIndex:e.groupIndex}),n=JSON.stringify({top:t.top,left:t.left});this.cache.set(n,this.cache.get(i))}supportAllDayRow(){return!0}keepOriginalHours(){return!1}_filterCellDataFields(e){return(0,m.extend)(!0,{},{startDate:e.startDate,endDate:e.endDate,groups:e.groups,groupIndex:e.groupIndex,allDay:e.allDay})}getCellData(e){const t=this._getFullCellData(e)||{};return this._filterCellDataFields(t)}_getFullCellData(e){if(e[0])return this._getDataByCell(e)}_getVirtualRowOffset(){return this.virtualScrollingDispatcher.virtualRowOffset}_getVirtualCellOffset(){return this.virtualScrollingDispatcher.virtualCellOffset}_getDataByCell(e){const t=e.parent().index()-this.virtualScrollingDispatcher.topVirtualRowsCount,i=e.index()-this.virtualScrollingDispatcher.leftVirtualCellsCount,{viewDataProvider:n}=this,o=this._hasAllDayClass(e);return n.getCellData(t,i,o)||void 0}isGroupedByDate(){return this.option("groupByDate")&&this._isHorizontalGroupedWorkSpace()&&this._getGroupCount()>0}getCellIndexByDate(e,t){const{viewDataGenerator:i}=this.viewDataProvider,n=t?864e5:i.getInterval(this.option("hoursInterval")),o=(0,I.getStartViewDateTimeOffset)(this.getStartViewDate(),this.option("startDayHour")),a=this._getIntervalBetween(e,t)+o;let s=Math.floor(a/n);return t&&(s=this._updateIndex(s)),s<0&&(s=0),s}getDroppableCellIndex(){const e=this._getDroppableCell(),t=e.parent();return t.index()*t.find("td").length+e.index()}getDataByDroppableCell(){const e=this.getCellData((0,p.default)(this._getDroppableCell())),{allDay:t}=e,{startDate:i}=e,{endDate:n}=e;return{startDate:i,endDate:n,allDay:t,groups:e.groups}}getDateRange(){return[this.getStartViewDate(),this.getEndViewDateByEndDayHour()]}getCellMinWidth(){return 75}getRoundedCellWidth(e,t,i){if(e<0||!(0,b.hasWindow)())return 0;let n=0;const o=this.$element().find(`.${A.DATE_TABLE_ROW_CLASS}`).eq(0).find(`.${oe}`),a=this._getCellCount()*e;i=i||this._getCellCount(),(0,y.isDefined)(t)||(t=a);for(let e=t;e<a+i;e++){const t=(0,p.default)(o).eq(e).get(0);n+=t?(0,v.getBoundingRect)(t).width:0}return n/(a+i-t)}getCellWidth(){return(0,L.getCellWidth)(this.getDOMElementsMetaData())}getCellHeight(){return(0,L.getCellHeight)(this.getDOMElementsMetaData())}getAllDayHeight(){return(0,L.getAllDayHeight)(this.option("showAllDayPanel"),this._isVerticalGroupedWorkSpace(),this.getDOMElementsMetaData())}getMaxAllowedPosition(e){return(0,L.getMaxAllowedPosition)(e,this.viewDataProvider,this.option("rtlEnabled"),this.getDOMElementsMetaData())}getAllDayOffset(){return this._groupedStrategy.getAllDayOffset()}getCellIndexByCoordinates(e,t){const{horizontalScrollingState:i,verticalScrollingState:n}=this.virtualScrollingDispatcher,o=(null==i?void 0:i.itemCount)??this._getTotalCellCount(this._getGroupCount()),a=this.getCellWidth(),s=t?this.getAllDayHeight():this.getCellHeight(),r=(null==i?void 0:i.virtualItemSizeBefore)??0,l=(null==n?void 0:n.virtualItemSizeBefore)??0,d=Math.floor(Math.floor(e.top-l)/Math.floor(s));let u=(e.left-r)/a;return u=Math.floor(u+.05),this._isRTL()&&(u=o-u-1),o*d+u}getStartViewDate(){return this.viewDataProvider.getStartViewDate()}getEndViewDate(){return this.viewDataProvider.getLastCellEndDate()}getEndViewDateByEndDayHour(){return this.viewDataProvider.getLastViewDateByEndDayHour(this.option("endDayHour"))}getCellDuration(){return(0,I.getCellDuration)(this.type,this.option("startDayHour"),this.option("endDayHour"),this.option("hoursInterval"))}getIntervalDuration(e){return e?K("day"):this.getCellDuration()}getVisibleDayDuration(){const e=this.option("startDayHour"),t=this.option("endDayHour"),i=this.option("hoursInterval");return this.viewDataProvider.getVisibleDayDuration(e,t,i)}getGroupBounds(e){const t=this._groupedStrategy instanceof z.default?this.getGroupBoundsVertical(e.groupIndex):this.getGroupBoundsHorizontal(e);return this._isRTL()?this.getGroupBoundsRtlCorrection(t):t}getGroupBoundsVertical(e){const t=this._getFirstAndLastDataTableCell();return this._groupedStrategy.getGroupBoundsOffset(e,t)}getGroupBoundsHorizontal(e){const t=this._getCellCount(),i=this._getCells(),n=this.getCellWidth(),{groupedDataMap:o}=this.viewDataProvider;return this._groupedStrategy.getGroupBoundsOffset(t,i,n,e,o)}getGroupBoundsRtlCorrection(e){const t=this.getCellWidth();return G({},e,{left:e.right-2*t,right:e.left+2*t})}needRecalculateResizableArea(){return this._isVerticalGroupedWorkSpace()&&0!==this.getScrollable().scrollTop()}getCellDataByCoordinates(e,t){const i=JSON.stringify({top:e.top,left:e.left});return this.cache.get(i,(()=>{const i=this._getCells(t),n=this.getCellIndexByCoordinates(e,t),o=i.eq(n);return this.getCellData(o)}))}getVisibleBounds(){const e={},t=this.getScrollable().$element(),i=this.getCellHeight(),n=this.getScrollableScrollTop()/i,o=n+(0,C.getHeight)(t)/i;return e.top={hours:Math.floor(n*this.option("hoursInterval"))+this.option("startDayHour"),minutes:n%2?30:0},e.bottom={hours:Math.floor(o*this.option("hoursInterval"))+this.option("startDayHour"),minutes:Math.floor(o)%2?30:0},e}updateScrollPosition(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.timeZoneCalculator.createDate(e,{path:"toGrid"}),o=i&&this.isAllDayPanelVisible;this.needUpdateScrollPosition(n,t,o)&&this.scrollTo(n,t,o,!1)}needUpdateScrollPosition(e,t,i){const n=this._getCellsInViewport(i),o=this._isGroupsSpecified(t)?this._getGroupIndexByResourceId(t):0,a=e.getTime(),s=f.default.trimTime(e).getTime();return n.reduce(((e,t)=>{const{startDate:n,endDate:r,groupIndex:l}=this.getCellData(t),d=n.getTime(),u=r.getTime();return(!(!i&&d<=a&&a<u||i&&s===d)||o!==l)&&e}),!0)}_getCellsInViewport(e){const t=this.getScrollable().$element(),i=this.getCellHeight(),n=this.getCellWidth(),o=this._getTotalCellCount(this._getGroupCount()),a=this.getScrollableScrollTop(),s=this.getScrollableScrollLeft(),r=a/i-this.virtualScrollingDispatcher.topVirtualRowsCount;let l=Math.floor(r);a%i!=0&&(l+=1);const d=s/n;let u=Math.floor(d);s%n!=0&&(u+=1);const c=Math.floor(r+(0,C.getHeight)(t)/i),h=Math.floor(d+(0,C.getWidth)(t)/n),g=this._getAllCells(e),_=[];return g.each((function(e){const t=(0,p.default)(this),i=e%o,n=e/o;u<=i&&i<h&&l<=n&&n<c&&_.push(t)})),_}scrollToTime(e,t,i){if(!this._isValidScrollDate(i))return;const n=this._getScrollCoordinates(e,t,i),o=this.getScrollable();o.scrollBy({top:n.top-o.scrollTop(),left:0})}scrollTo(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!this._isValidScrollDate(e,n))return;const o=this._getGroupCount()&&t?this._getGroupIndexByResourceId(t):0,a=i&&this.isAllDayPanelVisible,s=this._getScrollCoordinates(e.getHours(),e.getMinutes(),e,o,a),r=this.getScrollable(),l=r.$element(),d=this.getCellWidth(),u=this.option("rtlEnabled")?d:0,c=(0,C.getHeight)(l),h=((0,C.getWidth)(l)-d)/2,p=(c-this.getCellHeight())/2,g=s.left-r.scrollLeft()-h-u;let _=s.top-r.scrollTop()-p;a&&!this._isVerticalGroupedWorkSpace()&&(_=0),this.option("templatesRenderAsynchronously")?setTimeout((()=>{r.scrollBy({left:g,top:_})})):r.scrollBy({left:g,top:_})}_isValidScrollDate(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=this.getStartViewDate(),n=this.getEndViewDate();return!(e<i||e>n)||(t&&w.default.log("W1008",e),!1)}needApplyCollectorOffset(){return!1}removeDroppableCellClass(e){const t=e||this._getDroppableCell();null==t||t.removeClass(ae)}_getCoordinatesByCell(e){const t=e.index()-this.virtualScrollingDispatcher.leftVirtualCellsCount;let i=e.parent().index();const n=this._hasAllDayClass(e),o=this._isVerticalGroupedWorkSpace();return n&&!o||(i-=this.virtualScrollingDispatcher.topVirtualRowsCount),{rowIndex:i,columnIndex:t}}_isShowAllDayPanel(){return this.option("showAllDayPanel")}_getTimePanelCells(){return this.$element().find(`.${q}`)}_getRDateTableProps(){return{viewData:this.viewDataProvider.viewData,viewContext:this.getR1ComponentsViewContext(),dataCellTemplate:this.option("dataCellTemplate"),addDateTableClass:!this.option("crossScrollingEnabled")||this.isVirtualScrolling(),groupOrientation:this.option("groupOrientation"),addVerticalSizesClassToRows:!1}}getR1ComponentsViewContext(){return{view:{type:this.type},crossScrollingEnabled:!!this.option("crossScrollingEnabled")}}_updateSelectedCellDataOption(e,t){const i=e.map((e=>{let{startDate:t,endDate:i,allDay:n,groupIndex:o,groups:a}=e;return{startDate:t,endDate:i,allDay:n,groupIndex:o,groups:a}}));this.option("selectedCellData",i),this._selectionChangedAction({selectedCellData:i})}_getCellByData(e){const{startDate:t,groupIndex:i,allDay:n,index:o}=e,a=this.viewDataProvider.findCellPositionInMap({startDate:t,groupIndex:i,isAllDay:n,index:o});if(a)return n&&!this._isVerticalGroupedWorkSpace()?this._dom_getAllDayPanelCell(a.columnIndex):this._dom_getDateCell(a)}getDOMElementsMetaData(){return this.cache.get("cellElementsMeta",(()=>({dateTableCellsMeta:this._getDateTableDOMElementsInfo(),allDayPanelCellsMeta:this._getAllDayPanelDOMElementsInfo()})))}_getDateTableDOMElementsInfo(){const e=this._getAllCells(!1);if(!e.length||!(0,b.hasWindow)())return[[{}]];const t=this._getDateTable(),i=(0,v.getBoundingRect)(t.get(0)),n=this.viewDataProvider.getColumnsCount(),o=[];return e.each(((e,t)=>{const a=Math.floor(e/n);o.length===a&&o.push([]),this._addCellMetaData(o[a],t,i)})),o}_getAllDayPanelDOMElementsInfo(){const e=[];if(this.isAllDayPanelVisible&&!this._isVerticalGroupedWorkSpace()&&(0,b.hasWindow)()){const t=this._getAllCells(!0);if(!t.length)return[{}];const i=this._$allDayPanel,n=(0,v.getBoundingRect)(i.get(0));t.each(((t,i)=>{this._addCellMetaData(e,i,n)}))}return e}_addCellMetaData(e,t,i){const n=(0,v.getBoundingRect)(t);e.push({left:n.left-i.left,top:n.top-i.top,width:n.width,height:n.height})}_oldRender_getAllDayCellData(e){return(t,i,n)=>{const o=n%this._getCellCount(),a=this._getDateGenerationOptions(!0);let s=this.viewDataProvider.viewDataGenerator.getDateByCellIndices(a,i,o,this._getCellCountInDay());s=f.default.trimTime(s);let r=e||0;this.isGroupedByDate()?r=Math.floor(n%this._getGroupCount()):this._isHorizontalGroupedWorkSpace()&&(r=Math.floor(n/this._getCellCount()));const l={startDate:s,endDate:s,allDay:!0,groupIndex:r},d=(0,M.getCellGroups)(r,this.option("groups"));return d.length&&(l.groups=(0,M.getGroupsObjectFromGroupsArray)(d)),{key:he,value:l}}}renderRWorkSpace(){let{header:e,timePanel:t,dateTable:i,allDayPanel:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:me.renderComponents;e&&this.renderRHeaderPanel(),t&&this.renderRTimeTable(),i&&this.renderRDateTable(),n&&this.renderRAllDayPanel()}renderRDateTable(){k.utils.renovation.renderComponent(this,this._$dateTable,D.DateTableComponent,"renovatedDateTable",this._getRDateTableProps())}renderRGroupPanel(){var e;const t={viewContext:this.getR1ComponentsViewContext(),groups:this.option("groups"),groupOrientation:this.option("groupOrientation"),groupByDate:this.isGroupedByDate(),resourceCellTemplate:this.option("resourceCellTemplate"),className:this.verticalGroupTableClass,groupPanelData:this.viewDataProvider.getGroupPanelData(this.generateRenderOptions())};null!==(e=this.option("groups"))&&void 0!==e&&e.length?(this._attachGroupCountClass(),k.utils.renovation.renderComponent(this,this._getGroupHeaderContainer(),D.GroupPanelComponent,"renovatedGroupPanel",t)):this._detachGroupCountClass()}renderRAllDayPanel(){if(this.isAllDayPanelVisible&&!this.isGroupedAllDayPanel()){var e;this._toggleAllDayVisibility(!1);const t=G({viewData:this.viewDataProvider.viewData,viewContext:this.getR1ComponentsViewContext(),dataCellTemplate:this.option("dataCellTemplate"),startCellIndex:0},(null===(e=this.virtualScrollingDispatcher.horizontalVirtualScrolling)||void 0===e?void 0:e.getRenderState())||{});k.utils.renovation.renderComponent(this,this._$allDayTable,D.AllDayTableComponent,"renovatedAllDayPanel",t),k.utils.renovation.renderComponent(this,this._$allDayTitle,D.AllDayPanelTitleComponent,"renovatedAllDayPanelTitle",{})}this._toggleAllDayVisibility(!0)}renderRTimeTable(){k.utils.renovation.renderComponent(this,this._$timePanel,D.TimePanelComponent,"renovatedTimePanel",{viewContext:this.getR1ComponentsViewContext(),timePanelData:this.viewDataProvider.timePanelData,timeCellTemplate:this.option("timeCellTemplate"),groupOrientation:this.option("groupOrientation")})}renderRHeaderPanel(){var e;let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];null!==(e=this.option("groups"))&&void 0!==e&&e.length?this._attachGroupCountClass():this._detachGroupCountClass(),k.utils.renovation.renderComponent(this,this._$thead,this.renovatedHeaderPanelComponent,"renovatedHeaderPanel",{viewContext:this.getR1ComponentsViewContext(),dateHeaderData:this.viewDataProvider.dateHeaderData,groupPanelData:this.viewDataProvider.getGroupPanelData(this.generateRenderOptions()),dateCellTemplate:this.option("dateCellTemplate"),timeCellTemplate:this.option("timeCellTemplate"),groups:this.option("groups"),groupByDate:this.isGroupedByDate(),groupOrientation:this.option("groupOrientation"),resourceCellTemplate:this.option("resourceCellTemplate"),isRenderDateHeader:t})}initDragBehavior(e){if(!this.dragBehavior&&e){this.dragBehavior=new T.default(e);const t=(0,p.default)(e.element());this._createDragBehavior(this.getWorkArea(),t),this._isVerticalGroupedWorkSpace()||this._createDragBehavior(this._$allDayPanel,t)}}_createDragBehavior(e,t){const i={getItemData:(e,t)=>t._getItemData(e),getItemSettings:e=>e.data(O.APPOINTMENT_SETTINGS_KEY)};this._createDragBehaviorBase(e,t,i)}_createDragBehaviorBase(e,t,i){const n=this.$element().find(`.${A.FIXED_CONTAINER_CLASS}`);this.dragBehavior.addTo(e,Ce(n,t,this.isDefaultDraggingMode,this.dragBehavior,(()=>{this.isDefaultDraggingMode||(this.preventDefaultDragging=!1)}),(()=>{this.isDefaultDraggingMode||(this.preventDefaultDragging=!0)}),(()=>this._getDroppableCell()),(()=>this._getDateTables()),(()=>this.removeDroppableCellClass()),(()=>this.getCellWidth()),i))}_isRenderHeaderPanelEmptyCell(){return this._isVerticalGroupedWorkSpace()}_dispose(){super._dispose(),this.virtualScrollingDispatcher.dispose()}_getDefaultOptions(){return(0,m.extend)(super._getDefaultOptions(),{currentDate:new Date,intervalCount:1,startDate:null,firstDayOfWeek:void 0,startDayHour:0,endDayHour:24,viewOffset:0,hoursInterval:.5,activeStateEnabled:!0,hoverStateEnabled:!0,groups:[],showAllDayPanel:!0,allDayExpanded:!1,onCellClick:null,crossScrollingEnabled:!1,dataCellTemplate:null,timeCellTemplate:null,resourceCellTemplate:null,dateCellTemplate:null,allowMultipleCellSelection:!0,indicatorTime:new Date,indicatorUpdateInterval:5*K("minute"),shadeUntilCurrentTime:!0,groupOrientation:"horizontal",selectedCellData:[],groupByDate:!1,scrolling:{mode:"standard"},allDayPanelMode:"all",renovateRender:!0,height:void 0,draggingMode:"outlook",onScrollEnd:()=>{},getHeaderHeight:void 0,onRenderAppointments:()=>{},onShowAllDayPanel:()=>{},onSelectedCellsClick:()=>{},timeZoneCalculator:void 0,schedulerHeight:void 0,schedulerWidth:void 0})}_optionChanged(e){switch(e.name){case"startDayHour":case"endDayHour":case"viewOffset":case"dateCellTemplate":case"resourceCellTemplate":case"dataCellTemplate":case"timeCellTemplate":case"hoursInterval":case"firstDayOfWeek":case"currentDate":case"startDate":this._cleanWorkSpace();break;case"groups":this._cleanView(),this._removeAllDayElements(),this._initGrouping(),this.repaint();break;case"groupOrientation":this._initGroupedStrategy(),this._createAllDayPanelElements(),this._removeAllDayElements(),this._cleanWorkSpace(),this._toggleGroupByDateClass();break;case"showAllDayPanel":this._isVerticalGroupedWorkSpace()?(this._cleanView(),this._removeAllDayElements(),this._initGrouping(),this.repaint()):this.isRenovatedRender()?this.renderWorkSpace():this._toggleAllDayVisibility(!0);break;case"allDayExpanded":this._changeAllDayVisibility(),this._attachTablesEvents(),this._updateScrollable();break;case"onSelectionChanged":this._createSelectionChangedAction();break;case"onCellClick":this._createCellClickAction();break;case"onCellContextMenu":this._attachContextMenuEvent();break;case"intervalCount":this._cleanWorkSpace(),this._toggleWorkSpaceCountClass();break;case"groupByDate":this._cleanWorkSpace(),this._toggleGroupByDateClass();break;case"crossScrollingEnabled":this._toggleHorizontalScrollClass(),this._dateTableScrollable.option(this._dateTableScrollableConfig());break;case"allDayPanelMode":this.updateShowAllDayPanel(),this.updateAppointments();break;case"width":super._optionChanged(e),this._dimensionChanged();break;case"timeZoneCalculator":case"allowMultipleCellSelection":case"selectedCellData":break;case"renovateRender":case"scrolling":this.repaint();break;case"schedulerHeight":case"schedulerWidth":this.virtualScrollingDispatcher.updateDimensions(!0);break;default:super._optionChanged(e)}}updateShowAllDayPanel(){const e="hidden"===this.option("allDayPanelMode");this.option("onShowAllDayPanel")(!e)}_getVirtualScrollingDispatcherOptions(){return{getCellHeight:this.getCellHeight.bind(this),getCellWidth:this.getCellWidth.bind(this),getCellMinWidth:this.getCellMinWidth.bind(this),isRTL:this._isRTL.bind(this),getSchedulerHeight:()=>this.option("schedulerHeight"),getSchedulerWidth:()=>this.option("schedulerWidth"),getViewHeight:()=>this.$element().height?this.$element().height():(0,C.getHeight)(this.$element()),getViewWidth:()=>this.$element().width?this.$element().width():(0,C.getWidth)(this.$element()),getWindowHeight:()=>(0,b.getWindow)().innerHeight,getWindowWidth:()=>(0,b.getWindow)().innerWidth,getScrolling:()=>this.option("scrolling"),getScrollableOuterWidth:this.getScrollableOuterWidth.bind(this),getScrollable:this.getScrollable.bind(this),createAction:this._createAction.bind(this),updateRender:this.updateRender.bind(this),updateGrid:this.updateGrid.bind(this),getGroupCount:this._getGroupCount.bind(this),isVerticalGrouping:this._isVerticalGroupedWorkSpace.bind(this),getTotalRowCount:this._getTotalRowCount.bind(this),getTotalCellCount:this._getTotalCellCount.bind(this)}}_cleanWorkSpace(){this._cleanView(),this._toggleGroupedClass(),this._toggleWorkSpaceWithOddCells(),this.virtualScrollingDispatcher.updateDimensions(!0),this._renderView(),this.option("crossScrollingEnabled")&&this._setTableSizes(),this.cache.clear()}_init(){this._scrollSync={},this._viewDataProvider=null,this._cellsSelectionState=null,this._activeStateUnit=fe,super._init(),this._initGrouping(),this._toggleHorizontalScrollClass(),this._toggleWorkSpaceCountClass(),this._toggleGroupByDateClass(),this._toggleWorkSpaceWithOddCells(),this.$element().addClass("dx-scheduler-work-space").addClass(this._getElementClass())}_initPositionHelper(){this.positionHelper=new L.PositionHelper({key:this.option("key"),viewDataProvider:this.viewDataProvider,viewStartDayHour:this.option("startDayHour"),viewEndDayHour:this.option("endDayHour"),cellDuration:this.getCellDuration(),groupedStrategy:this._groupedStrategy,isGroupedByDate:this.isGroupedByDate(),rtlEnabled:this.option("rtlEnabled"),startViewDate:this.getStartViewDate(),isVerticalGrouping:this._isVerticalGroupedWorkSpace(),groupCount:this._getGroupCount(),isVirtualScrolling:this.isVirtualScrolling(),getDOMMetaDataCallback:this.getDOMElementsMetaData.bind(this)})}_initGrouping(){this._initGroupedStrategy(),this._toggleGroupingDirectionClass(),this._toggleGroupByDateClass()}isVerticalOrientation(){var e;return"vertical"===(null!==(e=this.option("groups"))&&void 0!==e&&e.length?this.option("groupOrientation"):this._getDefaultGroupStrategy())}_initGroupedStrategy(){const e=this.isVerticalOrientation()?z.default:N.default;this._groupedStrategy=new e(this)}_getDefaultGroupStrategy(){return"horizontal"}_toggleHorizontalScrollClass(){this.$element().toggleClass("dx-scheduler-work-space-both-scrollbar",this.option("crossScrollingEnabled"))}_toggleGroupByDateClass(){this.$element().toggleClass("dx-scheduler-work-space-group-by-date",this.isGroupedByDate())}_toggleWorkSpaceCountClass(){this.$element().toggleClass("dx-scheduler-work-space-count",this._isWorkSpaceWithCount())}_toggleWorkSpaceWithOddCells(){this.$element().toggleClass("dx-scheduler-work-space-odd-cells",this._isWorkspaceWithOddCells())}_toggleGroupingDirectionClass(){this.$element().toggleClass("dx-scheduler-work-space-vertical-grouped",this._isVerticalGroupedWorkSpace())}_getDateTableCellClass(e,t){const i=`${oe} ${te} ${ie}`;return this._groupedStrategy.addAdditionalGroupCellClasses(i,t+1,e,t)}_getGroupHeaderClass(e){const t=ne;return this._groupedStrategy.addAdditionalGroupCellClasses(t,e+1)}_initWorkSpaceUnits(){this._$headerPanelContainer=(0,p.default)("<div>").addClass("dx-scheduler-header-panel-container"),this._$headerTablesContainer=(0,p.default)("<div>").addClass("dx-scheduler-header-tables-container"),this._$headerPanel=(0,p.default)("<table>").attr("aria-hidden",!0),this._$thead=(0,p.default)("<thead>").appendTo(this._$headerPanel),this._$headerPanelEmptyCell=(0,p.default)("<div>").addClass("dx-scheduler-header-panel-empty-cell"),this._$allDayTable=(0,p.default)("<table>").attr("aria-hidden",!0),this._$fixedContainer=(0,p.default)("<div>").addClass(A.FIXED_CONTAINER_CLASS),this._$allDayContainer=(0,p.default)("<div>").addClass("dx-scheduler-all-day-appointments"),this._$dateTableScrollableContent=(0,p.default)("<div>").addClass("dx-scheduler-date-table-scrollable-content"),this._$sidebarScrollableContent=(0,p.default)("<div>").addClass("dx-scheduler-side-bar-scrollable-content"),this._initAllDayPanelElements(),this.isRenovatedRender()?this.createRAllDayPanelElements():this._createAllDayPanelElements(),this._$timePanel=(0,p.default)("<table>").addClass(A.TIME_PANEL_CLASS).attr("aria-hidden",!0),this._$dateTable=(0,p.default)("<table>").attr("aria-hidden",!0),this._$dateTableContainer=(0,p.default)("<div>").addClass("dx-scheduler-date-table-container"),this._$groupTable=(0,p.default)("<div>").addClass(Z)}_initAllDayPanelElements(){this._allDayTitles=[],this._allDayTables=[],this._allDayPanels=[]}_initDateTableScrollable(){const e=(0,p.default)("<div>").addClass("dx-scheduler-date-table-scrollable");this._dateTableScrollable=this._createComponent(e,x.default,this._dateTableScrollableConfig()),this._scrollSync.dateTable=(0,S.getMemoizeScrollTo)((()=>this._dateTableScrollable))}_createWorkSpaceElements(){this.option("crossScrollingEnabled")?this._createWorkSpaceScrollableElements():this._createWorkSpaceStaticElements()}_createWorkSpaceStaticElements(){var e;(this._$dateTableContainer.append(this._$dateTable),this._isVerticalGroupedWorkSpace())?(this._$dateTableContainer.append(this._$allDayContainer),this._$dateTableScrollableContent.append(this._$groupTable,this._$timePanel,this._$dateTableContainer),this._dateTableScrollable.$content().append(this._$dateTableScrollableContent),this._$headerTablesContainer.append(this._$headerPanel)):(this._$dateTableScrollableContent.append(this._$timePanel,this._$dateTableContainer),this._dateTableScrollable.$content().append(this._$dateTableScrollableContent),this._$headerTablesContainer.append(this._$headerPanel,this._$allDayPanel),null===(e=this._$allDayPanel)||void 0===e||e.append(this._$allDayContainer,this._$allDayTable));this._appendHeaderPanelEmptyCellIfNecessary(),this._$headerPanelContainer.append(this._$headerTablesContainer),this.$element().append(this._$fixedContainer,this._$headerPanelContainer,this._dateTableScrollable.$element())}_createWorkSpaceScrollableElements(){var e;(this.$element().append(this._$fixedContainer),this._$flexContainer=(0,p.default)("<div>").addClass("dx-scheduler-work-space-flex-container"),this._createHeaderScrollable(),this._headerScrollable.$content().append(this._$headerPanel),this._appendHeaderPanelEmptyCellIfNecessary(),this._$headerPanelContainer.append(this._$headerTablesContainer),this.$element().append(this._$headerPanelContainer),this.$element().append(this._$flexContainer),this._createSidebarScrollable(),this._$flexContainer.append(this._dateTableScrollable.$element()),this._$dateTableContainer.append(this._$dateTable),this._$dateTableScrollableContent.append(this._$dateTableContainer),this._dateTableScrollable.$content().append(this._$dateTableScrollableContent),this._isVerticalGroupedWorkSpace())?(this._$dateTableContainer.append(this._$allDayContainer),this._$sidebarScrollableContent.append(this._$groupTable,this._$timePanel)):(this._headerScrollable.$content().append(this._$allDayPanel),null===(e=this._$allDayPanel)||void 0===e||e.append(this._$allDayContainer,this._$allDayTable),this._$sidebarScrollableContent.append(this._$timePanel));this._sidebarScrollable.$content().append(this._$sidebarScrollableContent)}_appendHeaderPanelEmptyCellIfNecessary(){this._isRenderHeaderPanelEmptyCell()&&this._$headerPanelContainer.append(this._$headerPanelEmptyCell)}_createHeaderScrollable(){const e=(0,p.default)("<div>").addClass("dx-scheduler-header-scrollable").appendTo(this._$headerTablesContainer);this._headerScrollable=this._createComponent(e,x.default,this._headerScrollableConfig()),this._scrollSync.header=(0,S.getMemoizeScrollTo)((()=>this._headerScrollable))}_createSidebarScrollable(){const e=(0,p.default)("<div>").addClass("dx-scheduler-sidebar-scrollable").appendTo(this._$flexContainer);this._sidebarScrollable=this._createComponent(e,x.default,{useKeyboard:!1,showScrollbar:"never",direction:"vertical",useNative:!1,updateManually:!0,bounceEnabled:!1,onScroll:e=>{this._scrollSync.dateTable({top:e.scrollOffset.top})}}),this._scrollSync.sidebar=(0,S.getMemoizeScrollTo)((()=>this._sidebarScrollable))}_attachTableClasses(){if(this._addTableClass(this._$dateTable,A.DATE_TABLE_CLASS),this._isVerticalGroupedWorkSpace()){const e=this._getGroupCount();for(let t=0;t<e;t++)this._addTableClass(this._allDayTables[t],X)}else this.isRenovatedRender()||this._addTableClass(this._$allDayTable,X)}_attachHeaderTableClasses(){this._addTableClass(this._$headerPanel,"dx-scheduler-header-panel")}_addTableClass(e,t){e&&!e.hasClass(t)&&e.addClass(t)}_initMarkup(){this.cache.clear(),this._initWorkSpaceUnits(),this._initVirtualScrolling(),this._initDateTableScrollable(),this._createWorkSpaceElements(),super._initMarkup(),this.option("crossScrollingEnabled")||(this._attachTableClasses(),this._attachHeaderTableClasses()),this._toggleGroupedClass(),this._renderView(),this._attachEvents()}_render(){super._render(),this._renderDateTimeIndication(),this._setIndicationUpdateInterval()}_toggleGroupedClass(){this.$element().toggleClass("dx-scheduler-work-space-grouped",this._getGroupCount()>0)}_renderView(){this.isRenovatedRender()?this._isVerticalGroupedWorkSpace()&&this.renderRGroupPanel():this._applyCellTemplates(this._renderGroupHeader()),this.renderWorkSpace(),this.isRenovatedRender()&&this.virtualScrollingDispatcher.updateDimensions(),this._updateGroupTableHeight(),this.updateHeaderEmptyCellWidth(),this._shader=new R.default(this)}updateCellsSelection(){const e=this.generateRenderOptions();this.viewDataProvider.updateViewData(e),this.renderRWorkSpace({timePanel:!0,dateTable:!0,allDayPanel:!0})}_renderDateTimeIndication(){return(0,g.noop)()}renderCurrentDateTimeLineAndShader(){return(0,g.noop)()}renderCurrentDateTimeIndication(){return(0,g.noop)()}_setIndicationUpdateInterval(){return(0,g.noop)()}_detachGroupCountClass(){[...A.VERTICAL_GROUP_COUNT_CLASSES].forEach((e=>{this.$element().removeClass(e)}))}_attachGroupCountClass(){const e=this._groupedStrategy.getGroupCountClass(this.option("groups"));this.$element().addClass(e)}_getDateHeaderTemplate(){return this.option("dateCellTemplate")}_toggleAllDayVisibility(e){const t=this._isShowAllDayPanel();this.$element().toggleClass("dx-scheduler-work-space-all-day",t),this._changeAllDayVisibility(),e&&this._updateScrollable()}_changeAllDayVisibility(){this.cache.clear(),this.$element().toggleClass("dx-scheduler-work-space-all-day-collapsed",!this.option("allDayExpanded")&&this._isShowAllDayPanel())}_getDateTables(){return this._$dateTable.add(this._$allDayTable)}_getDateTable(){return this._$dateTable}_removeAllDayElements(){this._$allDayTable&&this._$allDayTable.remove(),this._$allDayTitle&&this._$allDayTitle.remove()}_cleanView(){var e,t,i;(this.cache.clear(),this._cleanTableWidths(),this.cellsSelectionState.clearSelectedAndFocusedCells(),this.isRenovatedRender())||(this._$thead.empty(),this._$dateTable.empty(),this._$timePanel.empty(),this._$groupTable.empty(),null===(t=this._$allDayTable)||void 0===t||t.empty(),null===(i=this._$sidebarTable)||void 0===i||i.empty());null===(e=this._shader)||void 0===e||e.clean(),delete this._interval}_clean(){s.default.off(c.default.getDocument(),ue),this._disposeRenovatedComponents(),super._clean()}_cleanTableWidths(){this._$headerPanel.css("width",""),this._$dateTable.css("width",""),this._$allDayTable&&this._$allDayTable.css("width","")}_disposeRenovatedComponents(){var e,t,i,n,o;null===(e=this.renovatedAllDayPanel)||void 0===e||e.dispose(),this.renovatedAllDayPanel=void 0,null===(t=this.renovatedDateTable)||void 0===t||t.dispose(),this.renovatedDateTable=void 0,null===(i=this.renovatedTimePanel)||void 0===i||i.dispose(),this.renovatedTimePanel=void 0,null===(n=this.renovatedGroupPanel)||void 0===n||n.dispose(),this.renovatedGroupPanel=void 0,null===(o=this.renovatedHeaderPanel)||void 0===o||o.dispose(),this.renovatedHeaderPanel=void 0}getGroupedStrategy(){return this._groupedStrategy}getFixedContainer(){return this._$fixedContainer}getAllDayContainer(){return this._$allDayContainer}updateRender(){this.renderer.updateRender()}updateGrid(){this.renderer._renderGrid()}updateAppointments(){var e;this.option("onRenderAppointments")(),null===(e=this.dragBehavior)||void 0===e||e.updateDragSource()}_createAllDayPanelElements(){const e=this._getGroupCount();if(this._isVerticalGroupedWorkSpace()&&0!==e)for(let t=0;t<e;t++){const e=(0,p.default)("<div>").addClass(Q).text(u.default.format("dxScheduler-allDay"));this._allDayTitles.push(e),this._$allDayTable=(0,p.default)("<table>").attr("aria-hidden",!0),this._allDayTables.push(this._$allDayTable),this._$allDayPanel=(0,p.default)("<div>").addClass(Y).append(this._$allDayTable),this._allDayPanels.push(this._$allDayPanel)}else this._$allDayTitle=(0,p.default)("<div>").addClass(Q).text(u.default.format("dxScheduler-allDay")).appendTo(this.$element()),this._$allDayTable=(0,p.default)("<table>").attr("aria-hidden",!0),this._$allDayPanel=(0,p.default)("<div>").addClass(Y).append(this._$allDayTable)}renderWorkSpace(){let{generateNewData:e,renderComponents:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:me;this.cache.clear(),this.viewDataProvider.update(this.generateRenderOptions(),e),this.isRenovatedRender()?this.renderRWorkSpace(t):(this._renderDateHeader(),this._renderTimePanel(),this._renderGroupAllDayPanel(),this._renderDateTable(),this._renderAllDayPanel()),this._initPositionHelper()}_renderGroupHeader(){const e=this._getGroupHeaderContainer();let t=[];if(this._getGroupCount()){const i=this._makeGroupRows(this.option("groups"),this.option("groupByDate"));this._attachGroupCountClass(),e.append(i.elements),t=i.cellTemplates}else this._detachGroupCountClass();return t}_applyCellTemplates(e){null==e||e.forEach((e=>{e()}))}_makeGroupRows(e,t){const i=this._isVerticalGroupedWorkSpace()?j.VERTICAL:j.HORIZONTAL;return j.makeGroupedTable(i,e,{groupHeaderRowClass:A.GROUP_ROW_CLASS,groupRowClass:A.GROUP_ROW_CLASS,groupHeaderClass:this._getGroupHeaderClass.bind(this),groupHeaderContentClass:A.GROUP_HEADER_CONTENT_CLASS},this._getCellCount()||1,this.option("resourceCellTemplate"),this._getGroupCount(),t)}_renderDateHeader(){const e=this._getDateHeaderContainer(),t=(0,p.default)("<tr>").addClass("dx-scheduler-header-row"),i=this._getCellCount(),n=this._getDateHeaderTemplate(),o=this._getCalculateHeaderCellRepeatCount(),a=[],s=this.isGroupedByDate();if(s){const r=s?this._getGroupCount():1;for(let e=0;e<i;e++){const i=e*o;this._renderDateHeaderTemplate(t,e,i,n,a).attr("colSpan",r)}e.prepend(t)}else{for(let e=0;e<o;e++)for(let o=0;o<i;o++){const s=e*i+o;this._renderDateHeaderTemplate(t,o,s,n,a)}e.append(t)}return this._applyCellTemplates(a),t}_renderDateHeaderTemplate(e,t,i,n,o){const a=this.isGroupedByDate()?Math.floor(i/this._getGroupCount()):i,{completeDateHeaderMap:s}=this.viewDataProvider,{text:r,startDate:l}=s[s.length-1][a],d=(0,p.default)("<th>").addClass(this._getHeaderPanelCellClass(t)).attr("title",r);return null!=n&&n.render?o.push(n.render.bind(n,{model:G({text:r,date:l},this._getGroupsForDateHeaderTemplate(i)),index:i,container:(0,h.getPublicElement)(d)})):d.text(r),e.append(d),d}_getGroupsForDateHeaderTemplate(e){let t,i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this._isHorizontalGroupedWorkSpace()&&!this.isGroupedByDate()){t=this._getGroupIndex(0,e*n);const o=(0,M.getCellGroups)(t,this.option("groups"));i=(0,M.getGroupsObjectFromGroupsArray)(o)}return{groups:i,groupIndex:t}}_getHeaderPanelCellClass(e){const t=`dx-scheduler-header-panel-cell ${te}`;return this._groupedStrategy.addAdditionalGroupCellClasses(t,e+1,void 0,void 0,this.isGroupedByDate())}_renderAllDayPanel(e){let t=this._getCellCount();this._isVerticalGroupedWorkSpace()||(t*=this._getGroupCount()||1);const i=this._renderTableBody({container:this._allDayPanels.length?(0,h.getPublicElement)(this._allDayTables[e]):(0,h.getPublicElement)(this._$allDayTable),rowCount:1,cellCount:t,cellClass:this._getAllDayPanelCellClass.bind(this),rowClass:"dx-scheduler-all-day-table-row",cellTemplate:this.option("dataCellTemplate"),getCellData:this._oldRender_getAllDayCellData(e),groupIndex:e},!0);this._toggleAllDayVisibility(!0),this._applyCellTemplates(i)}_renderGroupAllDayPanel(){if(this._isVerticalGroupedWorkSpace()){const e=this._getGroupCount();for(let t=0;t<e;t++)this._renderAllDayPanel(t)}}_getAllDayPanelCellClass(e,t){const i=`${J} ${te}`;return this._groupedStrategy.addAdditionalGroupCellClasses(i,t+1)}_renderTimePanel(){const e=this._groupedStrategy.calculateTimeCellRepeatCount(),t=(e,t)=>{let i=0;this.isAllDayPanelVisible&&(i=1),this.isGroupedAllDayPanel()&&(i=Math.ceil((e+1)/this._getRowCount()));const n=e+i;return this.viewDataProvider.completeTimePanelMap[n][t]};this._renderTableBody({container:(0,h.getPublicElement)(this._$timePanel),rowCount:this._getTimePanelRowCount()*e,cellCount:1,cellClass:this._getTimeCellClass.bind(this),rowClass:"dx-scheduler-time-panel-row",cellTemplate:this.option("timeCellTemplate"),getCellText:e=>t(e,"text"),getCellDate:e=>t(e,"startDate"),groupCount:this._getGroupCount(),allDayElements:this._insertAllDayRowsIntoDateTable()?this._allDayTitles:void 0,getTemplateData:(e=>{if(!this._isVerticalGroupedWorkSpace())return{};const t=this._getGroupIndex(e,0),i=(0,M.getCellGroups)(t,this.option("groups"));return{groupIndex:t,groups:(0,M.getGroupsObjectFromGroupsArray)(i)}}).bind(this)})}_getTimeCellClass(e){const t=`${q} ${ie}`;return this._isVerticalGroupedWorkSpace()?this._groupedStrategy.addAdditionalGroupCellClasses(t,e,e):t}_renderDateTable(){const e=this._getGroupCount();this._renderTableBody({container:(0,h.getPublicElement)(this._$dateTable),rowCount:this._getTotalRowCount(e),cellCount:this._getTotalCellCount(e),cellClass:this._getDateTableCellClass.bind(this),rowClass:A.DATE_TABLE_ROW_CLASS,cellTemplate:this.option("dataCellTemplate"),getCellData:(e,t,i)=>{let n=t;if(this.isGroupedAllDayPanel()){const e=this._getRowCount();n+=Math.ceil(t/e)}const{cellData:o}=this.viewDataProvider.viewDataMap.dateTableMap[n][i];return{value:this._filterCellDataFields(o),fullValue:o,key:he}},allDayElements:this._insertAllDayRowsIntoDateTable()?this._allDayPanels:void 0,groupCount:e,groupByDate:this.option("groupByDate")})}_insertAllDayRowsIntoDateTable(){return this._groupedStrategy.insertAllDayRowsIntoDateTable()}_renderTableBody(e,t){let i=[];return t?i=j.makeTable(e):this._applyCellTemplates(j.makeTable(e)),i}}const Ce=(e,t,i,o,a,s,r,l,d,u,h)=>{const g={dragElement:void 0,itemData:void 0},f=()=>{const{itemData:e}=g;if(e){return(0,_.compileGetter)("disabled")(e)}return!0};return{container:e,dragTemplate:()=>g.dragElement,onDragStart:e=>{i||s();const t=e.cancel,{event:a}=e,r=(0,p.default)(e.itemElement),l=e.component._appointments;g.itemData=h.getItemData(e.itemElement,l);const d=h.getItemSettings(r,e),{initialPosition:u}=h;f()||(a.data=a.data||{},t||(d.isCompact||o.updateDragSource(g.itemData,d),g.dragElement=((e,t,i)=>{const n=i.option("items").length;return t.isCompact=!1,t.virtual=!1,i._renderItem(n,{itemData:e,settings:[t]})[0]})(g.itemData,d,l),a.data.itemElement=g.dragElement,a.data.initialPosition=u??(0,n.locate)((0,p.default)(g.dragElement)),a.data.itemData=g.itemData,a.data.itemSettings=d,o.onDragStart(a.data),(0,n.resetPosition)((0,p.default)(g.dragElement))))},onDragMove:()=>{if(i)return;const e=(()=>{const e=(0,C.getWidth)(g.dragElement),t=e>u(),i=e<=10,n=(0,p.default)(g.dragElement).parent().get(0),o=(0,v.getBoundingRect)(n),a=o.left,s=o.top;return t?c.default.elementsFromPoint(a+10,s+10,n):i?c.default.elementsFromPoint(a,s,n):c.default.elementsFromPoint(a+e/2,s+10,n)})(),n=!!e.find((e=>e===t.get(0))),o=l(),a=e.find((e=>{const{classList:t}=e;return 1===o.find(e).length&&(t.contains(oe)||t.contains(J))}));a?(r().is(a)||d(),(0,p.default)(a).addClass(ae)):n||d()},onDragEnd:e=>{var t;i||a(),f()||o.onDragEnd(e),null===(t=g.dragElement)||void 0===t||t.remove(),d()},cursorOffset:h.isSetCursorOffset?()=>{const e=(0,p.default)(g.dragElement);return{x:(0,C.getWidth)(e)/2,y:(0,C.getHeight)(e)/2}}:void 0,filter:h.filter}};t.default=ve},83216:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(92848)),o=i(8687),a=s(i(19402));function s(e){return e&&e.__esModule?e:{default:e}}class r extends a.default{get type(){return o.VIEWS.DAY}_getElementClass(){return"dx-scheduler-work-space-day"}_renderDateHeader(){return 1===this.option("intervalCount")?null:super._renderDateHeader()}renderRHeaderPanel(){1===this.option("intervalCount")?super.renderRHeaderPanel(!1):super.renderRHeaderPanel(!0)}}(0,n.default)("dxSchedulerWorkSpaceDay",r);t.default=r},24005:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(41639),o=i(79674),a=i(80126);t.default=class{constructor(e){this._workSpace=e}prepareCellIndexes(e,t,i){return this._workSpace.isGroupedByDate()?{rowIndex:e.rowIndex,columnIndex:e.columnIndex*this._workSpace._getGroupCount()+t}:{rowIndex:e.rowIndex,columnIndex:e.columnIndex+t*this._workSpace._getCellCount()}}getGroupIndex(e,t){const i=this._workSpace.isGroupedByDate(),n=this._workSpace._getGroupCount();return i?t%n:Math.floor(t/this._workSpace._getCellCount())}calculateHeaderCellRepeatCount(){return this._workSpace._getGroupCount()||1}insertAllDayRowsIntoDateTable(){return!1}getTotalCellCount(e){return e=e||1,this._workSpace._getCellCount()*e}getTotalRowCount(){return this._workSpace._getRowCount()}calculateTimeCellRepeatCount(){return 1}getWorkSpaceMinWidth(){return(0,n.getBoundingRect)(this._workSpace.$element().get(0)).width-this._workSpace.getTimePanelWidth()-2*o.WORK_SPACE_BORDER_PX}getAllDayOffset(){return this._workSpace.getAllDayHeight()}getGroupCountClass(e){}getLeftOffset(){return this._workSpace.getTimePanelWidth()}_createGroupBoundOffset(e,t,i){const n=i/2;return{left:e?e.offset().left-n:0,right:t?t.offset().left+i+n:0,top:0,bottom:0}}_getGroupedByDateBoundOffset(e,t){const i=e.length-1,n=e.eq(0),o=e.eq(i);return this._createGroupBoundOffset(n,o,t)}getGroupBoundsOffset(e,t,i,n,o){if(this._workSpace.isGroupedByDate())return this._getGroupedByDateBoundOffset(t,i);let a,s;const r=this._workSpace.getCellIndexByCoordinates(n),l=n.groupIndex||Math.floor(r/e),d=o.dateTableGroupedMap[l];if(d){const e=d[0].length,i=d[0][0].position,n=d[0][e-1].position;a=t.eq(i.columnIndex),s=t.eq(n.columnIndex)}return this._createGroupBoundOffset(a,s,i)}shiftIndicator(e,t,i,n){const o=this._getIndicatorOffset(n),a=i?i-o:o;e.css("left",a),e.css("top",t)}_getIndicatorOffset(e){return this._workSpace.isGroupedByDate()?this._calculateGroupByDateOffset(e):this._calculateOffset(e)}_calculateOffset(e){return this._workSpace.getIndicatorOffset(e)+this._workSpace._getCellCount()*this._workSpace.getRoundedCellWidth(e-1,0)*e}_calculateGroupByDateOffset(e){return this._workSpace.getIndicatorOffset(0)*this._workSpace._getGroupCount()+this._workSpace.getRoundedCellWidth(e-1,0)*e}getShaderOffset(e,t){const i=this._workSpace._getCellCount()*this._workSpace.getRoundedCellWidth(e-1)*e;return this._workSpace.option("rtlEnabled")?(0,n.getBoundingRect)(this._workSpace._dateTableScrollable.$content().get(0)).width-i-this._workSpace.getTimePanelWidth()-t:i}getShaderTopOffset(e){return-this.getShaderMaxHeight()*(e>0?1:0)}getShaderHeight(){return this._workSpace.getIndicationHeight()}getShaderMaxHeight(){return(0,n.getBoundingRect)(this._workSpace._dateTableScrollable.$content().get(0)).height}getShaderWidth(e){return this._workSpace.getIndicationWidth(e)}getScrollableScrollTop(e){return e?0:this._workSpace.getScrollable().scrollTop()}addAdditionalGroupCellClasses(e,t,i,n){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return e=this._addLastGroupCellClass(e,t,o),this._addFirstGroupCellClass(e,t,o)}_addLastGroupCellClass(e,t,i){if(i)return`${e} ${a.LAST_GROUP_CELL_CLASS}`;if(this._workSpace.isGroupedByDate()){if(t%this._workSpace._getGroupCount()==0)return`${e} ${a.LAST_GROUP_CELL_CLASS}`}else if(t%this._workSpace._getCellCount()==0)return`${e} ${a.LAST_GROUP_CELL_CLASS}`;return e}_addFirstGroupCellClass(e,t,i){if(i)return`${e} ${a.FIRST_GROUP_CELL_CLASS}`;if(this._workSpace.isGroupedByDate()){if((t-1)%this._workSpace._getGroupCount()==0)return`${e} ${a.FIRST_GROUP_CELL_CLASS}`}else if((t-1)%this._workSpace._getCellCount()==0)return`${e} ${a.FIRST_GROUP_CELL_CLASS}`;return e}}},16259:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(41639),o=i(34396),a=i(79674),s=i(80126),r=i(26691);t.default=class{constructor(e){this._workSpace=e,this.cache=new r.Cache}prepareCellIndexes(e,t,i){let n=e.rowIndex+t*this._workSpace._getRowCount();return this._workSpace.supportAllDayRow()&&this._workSpace.option("showAllDayPanel")&&(n+=t,i||(n+=1)),{rowIndex:n,columnIndex:e.columnIndex}}getGroupIndex(e){return Math.floor(e/this._workSpace._getRowCount())}calculateHeaderCellRepeatCount(){return 1}insertAllDayRowsIntoDateTable(){return this._workSpace.option("showAllDayPanel")}getTotalCellCount(){return this._workSpace._getCellCount()}getTotalRowCount(){return this._workSpace._getRowCount()*this._workSpace._getGroupCount()}calculateTimeCellRepeatCount(){return this._workSpace._getGroupCount()||1}getWorkSpaceMinWidth(){let e=this._workSpace._getWorkSpaceWidth();const t=(0,n.getBoundingRect)(this._workSpace.$element().get(0)).width-this._workSpace.getTimePanelWidth()-this._workSpace.getGroupTableWidth()-2*a.WORK_SPACE_BORDER_PX;return e<t&&(e=t),e}getAllDayOffset(){return 0}getGroupCountClass(e){return(0,o.getVerticalGroupCountClass)(e)}getLeftOffset(){return this._workSpace.getTimePanelWidth()+this._workSpace.getGroupTableWidth()}getGroupBoundsOffset(e,t){let[i,a]=t;return this.cache.get(`groupBoundsOffset${e}`,(()=>{const t=this._workSpace.option("startDayHour"),s=this._workSpace.option("endDayHour"),r=this._workSpace.option("hoursInterval"),l=(0,o.calculateDayDuration)(t,s)/r*this._workSpace.getCellHeight(),d=this.getScrollableScrollTop(),u=(0,n.getBoundingRect)(this._workSpace._$headerPanelContainer.get(0)).height;let c=e*l+u+this._workSpace.option("getHeaderHeight")()-d;this._workSpace.option("showAllDayPanel")&&this._workSpace.supportAllDayRow()&&(c+=this._workSpace.getCellHeight()*(e+1));const h=c+l,{left:p}=i.getBoundingClientRect(),{right:g}=a.getBoundingClientRect();return this._groupBoundsOffset={left:p,right:g,top:c,bottom:h},this._groupBoundsOffset}))}shiftIndicator(e,t,i,n){const o=this._workSpace.getIndicatorOffset(0),a=this._workSpace.option("crossScrollingEnabled")?0:this._workSpace.getGroupTableWidth(),s=i?i-o:o;let r=this._workSpace._getRowCount()*this._workSpace.getCellHeight()*n;this._workSpace.supportAllDayRow()&&this._workSpace.option("showAllDayPanel")&&(r+=this._workSpace.getAllDayHeight()*(n+1)),e.css("left",s+a),e.css("top",t+r)}getShaderOffset(e,t){const i=this._workSpace.option("crossScrollingEnabled")?0:this._workSpace.getGroupTableWidth();return this._workSpace.option("rtlEnabled")?(0,n.getBoundingRect)(this._$container.get(0)).width-i-this._workSpace.getWorkSpaceLeftOffset()-t:i}getShaderTopOffset(e){return 0}getShaderHeight(){let e=this._workSpace.getIndicationHeight();return this._workSpace.supportAllDayRow()&&this._workSpace.option("showAllDayPanel")&&(e+=this._workSpace.getCellHeight()),e}getShaderMaxHeight(){let e=this._workSpace._getRowCount()*this._workSpace.getCellHeight();return this._workSpace.supportAllDayRow()&&this._workSpace.option("showAllDayPanel")&&(e+=this._workSpace.getCellHeight()),e}getShaderWidth(){return this._workSpace.getIndicationWidth(0)}getScrollableScrollTop(){return this._workSpace.getScrollable().scrollTop()}addAdditionalGroupCellClasses(e,t,i,n){return e=this._addLastGroupCellClass(e,i+1),this._addFirstGroupCellClass(e,i+1)}_addLastGroupCellClass(e,t){return t%this._workSpace._getRowCount()==0?`${e} ${s.LAST_GROUP_CELL_CLASS}`:e}_addFirstGroupCellClass(e,t){return(t-1)%this._workSpace._getRowCount()==0?`${e} ${s.FIRST_GROUP_CELL_CLASS}`:e}}},6523:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_(i(92848)),o=_(i(64553)),a=_(i(41380)),s=i(52576),r=i(41639),l=i(57653),d=i(3104),u=i(55594),c=i(34396),h=i(80126),p=_(i(18648)),g=_(i(45277));function _(e){return e&&e.__esModule?e:{default:e}}const f=a.default.dateToMilliseconds,m="dx-scheduler-date-time-indicator",v="dx-scheduler-time-panel-current-time-cell";class C extends g.default{_getToday(){const e=this.option("viewOffset"),t=(0,c.getToday)(this.option("indicatorTime"),this.timeZoneCalculator);return u.dateUtilsTs.addOffsets(t,[-e])}isIndicationOnView(){if(this.option("showCurrentTimeIndicator")){const e=this._getToday(),t=a.default.trimTime(this.getEndViewDate());return a.default.dateInRange(e,this.getStartViewDate(),new Date(t.getTime()+f("day")))}return!1}isIndicationAvailable(){if(!(0,d.hasWindow)())return!1;return this._getToday()>=a.default.trimTime(new Date(this.getStartViewDate()))}isIndicatorVisible(){const e=this._getToday(),t=new Date(this.getEndViewDate().getTime()+f("minute")-1),i=new Date(this.getStartViewDate());return i.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),a.default.dateInRange(e,i,t)}_renderIndicator(e,t,i,n){const o=this.isGroupedByDate(),a=o?1:n;for(let s=0;s<a;s++){const a=this._createIndicator(i);(0,l.setWidth)(a,o?this.getCellWidth()*n:this.getCellWidth()),this._groupedStrategy.shiftIndicator(a,e,t,s)}}_createIndicator(e){const t=(0,o.default)("<div>").addClass(m);return e.append(t),t}_getRtlOffset(e){return this.option("rtlEnabled")?(0,r.getBoundingRect)(this._dateTableScrollable.$content().get(0)).width-this.getTimePanelWidth()-e:0}_setIndicationUpdateInterval(){this.option("showCurrentTimeIndicator")&&0!==this.option("indicatorUpdateInterval")&&(this._clearIndicatorUpdateInterval(),this._indicatorInterval=setInterval((()=>{this.renderCurrentDateTimeIndication()}),this.option("indicatorUpdateInterval")))}_clearIndicatorUpdateInterval(){this._indicatorInterval&&(clearInterval(this._indicatorInterval),delete this._indicatorInterval)}_isVerticalShader(){return!0}getIndicationWidth(e){const t=this.getCellWidth()*this._getCellCount();let i=this._getIndicatorDuration();i>this._getCellCount()&&(i=this._getCellCount());const n=i*this.getRoundedCellWidth(e,e*this._getCellCount(),i);return t<n?t:n}getIndicatorOffset(e){const t=this._getIndicatorDuration()-1;return t*this.getRoundedCellWidth(e,e*this._getCellCount(),t)}_getIndicatorDuration(){const e=this._getToday(),t=new Date(this.getStartViewDate());let i=e.getTime()-t.getTime();return"workWeek"===this.option("type")&&(i-=this._getWeekendsCount(Math.round(i/f("day")))*f("day")),Math.ceil((i+1)/f("day"))}getIndicationHeight(){const e=p.default.getDateWithoutTimezoneChange(this._getToday()),t=this.getCellHeight(),i=new Date(this.getStartViewDate());this.isIndicationOnView()&&i.setFullYear(e.getFullYear(),e.getMonth(),e.getDate());return(e.getTime()-i.getTime())/this.getCellDuration()*t}_dispose(){this._clearIndicatorUpdateInterval(),super._dispose.apply(this,arguments)}renderCurrentDateTimeIndication(){this.renderCurrentDateTimeLineAndShader(),this.isRenovatedRender()&&this.renderWorkSpace({generateNewData:!0,renderComponents:{header:!0,timePanel:!0}})}renderCurrentDateTimeLineAndShader(){var e;this._cleanDateTimeIndicator(),null===(e=this._shader)||void 0===e||e.clean(),this._renderDateTimeIndication()}_isCurrentTimeHeaderCell(e){if(this.isIndicationOnView()){const{completeDateHeaderMap:t}=this.viewDataProvider,i=t[t.length-1][e].startDate;return a.default.sameDate(i,this._getToday())}return!1}_getHeaderPanelCellClass(e){const t=super._getHeaderPanelCellClass(e);return this._isCurrentTimeHeaderCell(e)?`${t} ${h.HEADER_CURRENT_TIME_CELL_CLASS}`:t}_cleanView(){super._cleanView(),this._cleanDateTimeIndicator()}_dimensionChanged(){super._dimensionChanged(),this.renderCurrentDateTimeLineAndShader()}_cleanDateTimeIndicator(){this.$element().find(`.${m}`).remove()}_cleanWorkSpace(){super._cleanWorkSpace(),this._renderDateTimeIndication(),this._setIndicationUpdateInterval()}_optionChanged(e){switch(e.name){case"showCurrentTimeIndicator":case"indicatorTime":this._cleanWorkSpace();break;case"indicatorUpdateInterval":this._setIndicationUpdateInterval();break;case"showAllDayPanel":case"allDayExpanded":case"crossScrollingEnabled":super._optionChanged(e),this.renderCurrentDateTimeIndication();break;case"shadeUntilCurrentTime":this.renderCurrentDateTimeIndication();break;default:super._optionChanged(e)}}_getDefaultOptions(){return(0,s.extend)(super._getDefaultOptions(),{showCurrentTimeIndicator:!0,indicatorTime:new Date,indicatorUpdateInterval:5*f("minute"),shadeUntilCurrentTime:!0})}_getCurrentTimePanelCellIndices(){const e=this._getTimePanelRowCount(),t=this._getToday(),i=this.getCellIndexByDate(t),{rowIndex:n}=this._getCellCoordinatesByIndex(i);if(void 0===n)return[];let o;o=0===n?[n]:n%2==0?[n-1,n]:[n,n+1];const a=this._isVerticalGroupedWorkSpace()?this._getGroupCount():1;return[...new Array(a)].reduce(((t,i,n)=>[...t,...o.map((t=>e*n+t))]),[])}_renderDateTimeIndication(){if(!this.isIndicationAvailable())return;if(this.option("shadeUntilCurrentTime")&&this._shader.render(),!this.isIndicationOnView()||!this.isIndicatorVisible())return;const e=this._getGroupCount()||1,t=this._dateTableScrollable.$content(),i=this.getIndicationHeight(),n=this._getRtlOffset(this.getCellWidth());this._renderIndicator(i,n,t,e),this.isRenovatedRender()||this._setCurrentTimeCells()}_setCurrentTimeCells(){const e=this._getTimePanelCells();this._getCurrentTimePanelCellIndices().forEach((t=>{e.eq(t).addClass(v)}))}_cleanCurrentTimeCells(){this.$element().find(`.${v}`).removeClass(v)}}(0,n.default)("dxSchedulerWorkSpace",C);t.default=C},3416:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(92848)),o=i(17781),a=p(i(41380)),s=i(41639),r=i(3104),l=i(19747),d=i(34396),u=i(8687),c=i(5327),h=p(i(6523));function p(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},g.apply(null,arguments)}const _=a.default.dateToMilliseconds;class f extends h.default{get type(){return u.VIEWS.MONTH}_getElementClass(){return"dx-scheduler-work-space-month"}_getFormat(){return d.formatWeekday}_getIntervalBetween(e){const t=this.getStartViewDate(),i=a.default.getTimezonesDifference(t,e);return e.getTime()-(t.getTime()-36e5*this.option("startDayHour"))-i}_getDateGenerationOptions(){return g({},super._getDateGenerationOptions(),{cellCountInDay:1})}getCellWidth(){return this.cache.get("cellWidth",(()=>{let e=0;const t=this._getCells().slice(0,7);return t.each(((t,i)=>{e+=(0,r.hasWindow)()?(0,s.getBoundingRect)(i).width:0})),0===t.length?void 0:e/7}))}_insertAllDayRowsIntoDateTable(){return!1}_getCellCoordinatesByIndex(e){const t=Math.floor(e/this._getCellCount());return{rowIndex:t,columnIndex:e-this._getCellCount()*t}}_needCreateCrossScrolling(){return this.option("crossScrollingEnabled")||this._isVerticalGroupedWorkSpace()}_getViewStartByOptions(){return d.monthUtils.getViewStartByOptions(this.option("startDate"),this.option("currentDate"),this.option("intervalCount"),a.default.getFirstMonthDate(this.option("startDate")))}_updateIndex(e){return e}isIndicationAvailable(){return!1}getIntervalDuration(){return _("day")}getTimePanelWidth(){return 0}supportAllDayRow(){return!1}keepOriginalHours(){return!0}getWorkSpaceLeftOffset(){return 0}needApplyCollectorOffset(){return!0}_getHeaderDate(){return this._getViewStartByOptions()}scrollToTime(){return(0,o.noop)()}renderRAllDayPanel(){}renderRTimeTable(){}renderRDateTable(){c.utils.renovation.renderComponent(this,this._$dateTable,l.DateTableMonthComponent,"renovatedDateTable",this._getRDateTableProps())}_createWorkSpaceElements(){this._isVerticalGroupedWorkSpace()?this._createWorkSpaceScrollableElements():super._createWorkSpaceElements()}_toggleAllDayVisibility(){return(0,o.noop)()}_changeAllDayVisibility(){return(0,o.noop)()}_renderTimePanel(){return(0,o.noop)()}_renderAllDayPanel(){return(0,o.noop)()}_setMonthClassesToCell(e,t){e.toggleClass("dx-scheduler-date-table-current-date",t.isCurrentDate).toggleClass("dx-scheduler-date-table-first-of-month",t.firstDayOfMonth).toggleClass("dx-scheduler-date-table-other-month",t.otherMonth)}_createAllDayPanelElements(){}_renderTableBody(e){e.getCellText=(e,t)=>{const i=this.viewDataProvider.completeViewDataMap[e][t].startDate;return d.monthUtils.getCellText(i,this.option("intervalCount"))},e.getCellTextClass="dx-scheduler-date-table-cell-text",e.setAdditionalClasses=this._setMonthClassesToCell.bind(this),super._renderTableBody(e)}}(0,n.default)("dxSchedulerWorkSpaceMonth",f);t.default=f},19402:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(34396),a=(n=i(6523))&&n.__esModule?n:{default:n};function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}class r extends a.default{_getFormat(){return o.formatWeekdayAndDay}generateRenderOptions(){return s({},super.generateRenderOptions(),{isGenerateTimePanelData:!0})}_isRenderHeaderPanelEmptyCell(){return!0}}t.default=r},23276:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(92848)),o=i(34396),a=i(8687),s=r(i(19402));function r(e){return e&&e.__esModule?e:{default:e}}class l extends s.default{get type(){return a.VIEWS.WEEK}_getElementClass(){return"dx-scheduler-work-space-week"}_calculateViewStartDate(){return o.weekUtils.calculateViewStartDate(this.option("startDate"),this._firstDayOfWeek())}}(0,n.default)("dxSchedulerWorkSpaceWeek",l);t.default=l},27420:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(92848)),o=i(34396),a=i(8687),s=r(i(23276));function r(e){return e&&e.__esModule?e:{default:e}}class l extends s.default{get type(){return a.VIEWS.WORK_WEEK}constructor(){super(...arguments),this._getWeekendsCount=o.getWeekendsCount}_getElementClass(){return"dx-scheduler-work-space-work-week"}}(0,n.default)("dxSchedulerWorkSpaceWorkWeek",l);t.default=l},82274:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DateHeaderDataGenerator=void 0;var n=l(i(41380)),o=i(8687),a=i(34396),s=l(i(18648));const r=["startDate","endDate","isFirstGroupCell","isLastGroupCell"];function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}t.DateHeaderDataGenerator=class{constructor(e){this._viewDataGenerator=e}getCompleteDateHeaderMap(e,t){const{isGenerateWeekDaysHeaderData:i}=e,n=[];if(i){const i=this._generateWeekDaysHeaderRowMap(e,t);n.push(i)}const o=this._generateHeaderDateRow(e,t);return n.push(o),n}_generateWeekDaysHeaderRowMap(e,t){const{isGroupedByDate:i,groups:n,groupOrientation:o,startDayHour:r,endDayHour:l,hoursInterval:u,isHorizontalGrouping:c,intervalCount:h,viewOffset:p}=e,g=this._viewDataGenerator.getCellCountInDay(r,l,u),_=(0,a.getHorizontalGroupCount)(n,o),f=t[0][0].allDay?1:0,m=i?_*g:g,v=(0,a.getGroupCount)(n),C=c&&!i?v:1,y=this._viewDataGenerator.daysInInterval*h*C,b=[];for(let e=0;e<y;e+=1){const i=t[f][e*m],n=s.default.addOffsetsWithoutDST(i.startDate,-p);b.push(d({},i,{colSpan:m,text:(0,a.formatWeekdayAndDay)(n),isFirstGroupCell:!1,isLastGroupCell:!1}))}return b}_generateHeaderDateRow(e,t){const{today:i,isGroupedByDate:l,groupOrientation:u,groups:c,headerCellTextFormat:h,getDateForHeaderText:p,interval:g,startViewDate:_,startDayHour:f,endDayHour:m,hoursInterval:v,intervalCount:C,currentDate:y,viewType:b,viewOffset:x}=e,w=(0,a.getHorizontalGroupCount)(c,u),S=t[0][0].allDay?1:0,D=l?w:1,I="vertical"===u,E=this._viewDataGenerator.getCellCount({intervalCount:C,currentDate:y,viewType:b,hoursInterval:v,startDayHour:f,endDayHour:m}),T=this._viewDataGenerator.getCellCountInDay(f,m,v),A=l?t[S].filter(((e,t)=>t%w==0)):t[S],O=!(0,a.isTimelineView)(b)||b===o.VIEWS.TIMELINE_MONTH;return A.map(((e,t)=>{let{startDate:o,isFirstGroupCell:u,isLastGroupCell:c}=e,m=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,r);const v=s.default.addOffsetsWithoutDST(o,-x),C=O?v:o;return d({},m,{startDate:o,text:(0,a.getHeaderCellText)(t%E,C,h,p,{interval:g,startViewDate:_,startDayHour:f,cellCountInDay:T,viewOffset:x}),today:n.default.sameDate(v,i),colSpan:D,isFirstGroupCell:l||u&&!I,isLastGroupCell:l||c&&!I})}))}generateDateHeaderData(e,t,i){const{isGenerateWeekDaysHeaderData:n,cellWidth:o,isProvideVirtualCellsWidth:a,startDayHour:s,endDayHour:r,hoursInterval:l,isMonthDateHeader:d}=i,u=[];let c={};const h=o||0;n&&(c=this._generateDateHeaderDataRow(i,e,t,this._viewDataGenerator.getCellCountInDay(s,r,l),0,h),u.push(c.dateRow));const p=this._generateDateHeaderDataRow(i,e,t,1,n?1:0,h);return u.push(p.dateRow),{dataMap:u,leftVirtualCellWidth:a?p.leftVirtualCellWidth:void 0,rightVirtualCellWidth:a?p.rightVirtualCellWidth:void 0,leftVirtualCellCount:p.leftVirtualCellCount,rightVirtualCellCount:p.rightVirtualCellCount,weekDayLeftVirtualCellWidth:c.leftVirtualCellWidth,weekDayRightVirtualCellWidth:c.rightVirtualCellWidth,weekDayLeftVirtualCellCount:c.leftVirtualCellCount,weekDayRightVirtualCellCount:c.rightVirtualCellCount,isMonthDateHeader:d}}_generateDateHeaderDataRow(e,t,i,n,o,s){const{startCellIndex:r,cellCount:l,isProvideVirtualCellsWidth:d,groups:u,groupOrientation:c,isGroupedByDate:h}=e,p=(0,a.getHorizontalGroupCount)(u,c),g=h?p*n:n,_=Math.floor(r/g),f=(0,a.getDisplayedCellCount)(l,i),m=Math.ceil((r+f)/g),v=_*g,C=(0,a.getTotalCellCountByCompleteData)(i)-m*g;return{dateRow:t[o].slice(_,m),leftVirtualCellCount:v,leftVirtualCellWidth:d?v*s:void 0,rightVirtualCellCount:C,rightVirtualCellWidth:d?C*s:void 0}}}},30795:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupedDataMapProvider=void 0;var n=r(i(41380)),o=i(55594),a=i(34396),s=r(i(18648));function r(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}const d=n.default.dateToMilliseconds;t.GroupedDataMapProvider=class{constructor(e,t,i,n){this.groupedDataMap=e.generateGroupedDataMap(t),this.completeViewDataMap=i,this._viewOptions=n}getGroupStartDate(e){var t;const i=this.getFirstGroupRow(e);return(null==i||null===(t=i[0])||void 0===t||null===(t=t.cellData)||void 0===t?void 0:t.startDate)??null}getGroupEndDate(e){const t=this.getLastGroupRow(e);if(t){const e=t.length-1,{cellData:i}=t[e],{endDate:n}=i;return n}}findGroupCellStartDate(e,t,i,o){const a=this.getGroupFromDateTableGroupMap(e),s=(e,s)=>{const{cellData:r}=a[e][s];let{startDate:l,endDate:d}=r;if(o&&(l=n.default.trimTime(l),d=n.default.setToDayEnd(l)),n.default.intervalsOverlap({firstMin:t,firstMax:i,secondMin:l,secondMax:d}))return l},r=(()=>{const e=a[0].length;for(let t=0;t<e;++t)for(let e=0;e<a.length;++e){const i=s(e,t);if(i)return i}})(),l=(()=>{for(let e=0;e<a.length;++e){const t=a[e];for(let i=0;i<t.length;++i){const t=s(e,i);if(t)return t}}})();return r>l?l:r}findAllDayGroupCellStartDate(e){var t;const i=this.getGroupFromDateTableGroupMap(e),n=null==i||null===(t=i[0])||void 0===t||null===(t=t[0])||void 0===t?void 0:t.cellData;return(null==n?void 0:n.startDate)??null}findCellPositionInMap(e,t){const{groupIndex:i,startDate:n,isAllDay:a,index:s}=e,{allDayPanelGroupedMap:r,dateTableGroupedMap:d}=this.groupedDataMap,{viewOffset:u}=this._viewOptions,c=a&&!this._viewOptions.isVerticalGrouping?r[i]?[r[i]]:[]:d[i]||[];for(let e=0;e<c.length;e+=1){const r=c[e];for(let e=0;e<r.length;e+=1){const d=r[e],c=d.cellData,h=t?l({},c,{startDate:o.dateUtilsTs.addOffsets(d.cellData.startDate,[-u]),endDate:o.dateUtilsTs.addOffsets(d.cellData.endDate,[-u])}):c;if(this._isSameGroupIndexAndIndex(h,i,s)&&this.isStartDateInCell(n,a,h,c))return d.position}}}isStartDateInCell(e,t,i,o){let{startDate:s,endDate:r,allDay:l}=i,{startDate:d,endDate:u}=o;const{viewType:c}=this._viewOptions,h=this.getCellSecondIntervalOffset(d,u),p=0!==h;switch(!0){case!(0,a.isDateAndTimeView)(c):case t&&l:return n.default.sameDate(e,s);case!t&&!p:return e>=s&&e<r;case!t&&p:return this.isStartDateInTwoIntervalsCell(e,h,s,r);default:return!1}}getCellSecondIntervalOffset(e,t){const i=o.dateUtilsTs.addOffsets(e,[d("hour")]),n=s.default.getDaylightOffset(e,t),a=s.default.getDaylightOffset(e,i);return!(0!==n)&&a<0?Math.abs(a*d("minute")):0}isStartDateInTwoIntervalsCell(e,t,i,n){const a=o.dateUtilsTs.addOffsets(i,[t]),s=o.dateUtilsTs.addOffsets(n,[t]);return e>=i&&e<n||e>=a&&e<s}_isSameGroupIndexAndIndex(e,t,i){return e.groupIndex===t&&(void 0===i||e.index===i)}getCellsGroup(e){const{dateTableGroupedMap:t}=this.groupedDataMap,i=t[e];if(i){const{cellData:e}=i[0][0];return e.groups}}getCompletedGroupsInfo(){const{dateTableGroupedMap:e}=this.groupedDataMap;return e.map((e=>{const t=e[0][0],{allDay:i,groupIndex:n}=t.cellData;return{allDay:i,groupIndex:n,startDate:this.getGroupStartDate(n),endDate:this.getGroupEndDate(n)}})).filter((e=>{let{startDate:t}=e;return!!t}))}getGroupIndices(){return this.getCompletedGroupsInfo().map((e=>{let{groupIndex:t}=e;return t}))}getGroupFromDateTableGroupMap(e){const{dateTableGroupedMap:t}=this.groupedDataMap;return t[e]}getFirstGroupRow(e){const t=this.getGroupFromDateTableGroupMap(e);if(t){const{cellData:e}=t[0][0];return e.allDay?t[1]:t[0]}}getLastGroupRow(e){const{dateTableGroupedMap:t}=this.groupedDataMap,i=t[e];if(i){return i[i.length-1]}}getLastGroupCellPosition(e){const t=this.getLastGroupRow(e);return null==t?void 0:t[(null==t?void 0:t.length)-1].position}getRowCountInGroup(e){const t=this.getLastGroupRow(e);return(t[t.length-1].cellData.index+1)/t.length}}},16794:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimePanelDataGenerator=void 0;var n,o=(n=i(41380))&&n.__esModule?n:{default:n},a=i(55594),s=i(12220),r=i(34396);const l=["allDay","startDate","endDate","groups","groupIndex","isFirstGroupCell","isLastGroupCell","index"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}const u=o.default.dateToMilliseconds;t.TimePanelDataGenerator=class{constructor(e){this._viewDataGenerator=e}getCompleteTimePanelMap(e,t){const{startViewDate:i,cellDuration:n,startDayHour:o,isVerticalGrouping:a,intervalCount:s,currentDate:u,viewType:c,hoursInterval:h,endDayHour:p,viewOffset:g,today:_,showCurrentTimeIndicator:f}=e,m=t.length-1,v=t[m][t[m].length-1].endDate,C=this._viewDataGenerator.getRowCount({intervalCount:s,currentDate:u,viewType:c,hoursInterval:h,startDayHour:o,endDayHour:p}),y=this._viewDataGenerator.getCellCount({intervalCount:s,currentDate:u,viewType:c,hoursInterval:h,startDayHour:o,endDayHour:p});let b=0,x=0;return t.map(((e,s)=>{const u=e[0],{allDay:c,startDate:h,groups:p,groupIndex:m,isFirstGroupCell:w,isLastGroupCell:S,index:D}=u,I=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(u,l),E=!c&&this.isTimeCellShouldBeHighlighted(_,g,{startViewDate:i,realEndViewDate:v,showCurrentTimeIndicator:f},{date:h,index:x,duration:Math.round(n),isFirst:0===x,isLast:this.isLastCellInGroup(t,s)});c?(b+=1,x=0):x+=1;const T=(s-b)%C;return d({},I,{startDate:h,allDay:c,highlighted:E,text:r.weekUtils.getTimePanelCellText(T,h,i,n,o,g),groups:a?p:void 0,groupIndex:a?m:void 0,isFirstGroupCell:a&&w,isLastGroupCell:a&&S,index:Math.floor(D/y)})}))}generateTimePanelData(e,t){const{startRowIndex:i,rowCount:n,topVirtualRowHeight:o,bottomVirtualRowHeight:a,isGroupedAllDayPanel:s,isVerticalGrouping:l,isAllDayPanelVisible:d}=t,u=i+(l||!d?0:1),c=(0,r.getDisplayedRowCount)(n,e),h=e.slice(u,u+c),p={topVirtualRowHeight:o,bottomVirtualRowHeight:a,isGroupedAllDayPanel:s},{previousGroupedData:g}=this._generateTimePanelDataFromMap(h,l);return p.groupedData=g,p}_generateTimePanelDataFromMap(e,t){return e.reduce(((e,i)=>{let{previousGroupIndex:n,previousGroupedData:o}=e;const a=i.groupIndex;return a!==n&&o.push({dateTable:[],isGroupedAllDayPanel:(0,r.getIsGroupedAllDayPanel)(!!i.allDay,t),groupIndex:a,key:(0,r.getKeyByGroup)(a,t)}),i.allDay?o[o.length-1].allDayPanel=i:o[o.length-1].dateTable.push(i),{previousGroupIndex:a,previousGroupedData:o}}),{previousGroupIndex:-1,previousGroupedData:[]})}isTimeCellShouldBeHighlighted(e,t,i,n){let{startViewDate:o,realEndViewDate:s,showCurrentTimeIndicator:r}=i;const l=a.dateUtilsTs.addOffsets(e,[t]),d=a.dateUtilsTs.addOffsets(o,[t]);if(!r||l<d||l>=s)return!1;const c=this.getLocalDateTimeInMs(l),[h,p]=this.getHighlightedInterval(n);return h<p?c>=h&&c<p:c>=h&&c<u("day")||c>=0&&c<p}getHighlightedInterval(e){let{date:t,index:i,duration:n,isFirst:o,isLast:a}=e;const r=this.getLocalDateTimeInMs(t),l=i%2==0;switch(!0){case o||a&&!l:return[r,(0,s.shiftIntegerByModule)(r+n,u("day"))];case l:return[(0,s.shiftIntegerByModule)(r-n,u("day")),(0,s.shiftIntegerByModule)(r+n,u("day"))];default:return[r,(0,s.shiftIntegerByModule)(r+2*n,u("day"))]}}getLocalDateTimeInMs(e){const t=e.getTime()-e.getTimezoneOffset()*u("minute");return(0,s.shiftIntegerByModule)(t,u("day"))}isLastCellInGroup(e,t){if(t===e.length-1)return!0;const{groupIndex:i}=e[t][0],{groupIndex:n,allDay:o}=e[t+1][0];return o||n!==i}}},75480:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.alignToFirstDayOfWeek=g,t.alignToLastDayOfWeek=_,t.calculateAlignedWeeksBetweenDates=function(e,t,i){const n=g(e,i),o=_(t,i),a=f(n,o)/h;return Math.max(a,6)},t.calculateDaysBetweenDates=f,t.getViewDataGeneratorByViewType=void 0;var n,o=(n=i(41380))&&n.__esModule?n:{default:n},a=i(8687),s=i(91245),r=i(61715),l=i(55752),d=i(73082),u=i(40348),c=i(33196);const h=7,p=864e5;function g(e,t){const i=new Date(e);let n=i.getDay()-t;return n<0&&(n+=h),i.setDate(i.getDate()-n),i}function _(e,t){const i=g(e,t);return i.setDate(i.getDate()+h-1),i}function f(e,t){const i=o.default.trimTime(t).getTime()-o.default.trimTime(e).getTime();return Math.round(i/p)+1}t.getViewDataGeneratorByViewType=e=>{switch(e){case a.VIEWS.MONTH:return new l.ViewDataGeneratorMonth;case a.VIEWS.TIMELINE_MONTH:return new d.ViewDataGeneratorTimelineMonth;case a.VIEWS.DAY:case a.VIEWS.TIMELINE_DAY:return new r.ViewDataGeneratorDay;case a.VIEWS.WEEK:case a.VIEWS.TIMELINE_WEEK:return new u.ViewDataGeneratorWeek;case a.VIEWS.WORK_WEEK:case a.VIEWS.TIMELINE_WORK_WEEK:return new c.ViewDataGeneratorWorkWeek;default:return new s.ViewDataGenerator}}},91245:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewDataGenerator=void 0;var n=d(i(41380)),o=i(55594),a=i(34396),s=i(8687),r=d(i(18648)),l=i(45629);function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}const c=n.default.dateToMilliseconds;t.ViewDataGenerator=class{constructor(){this.daysInInterval=1,this.isWorkView=!1,this.tableAllDay=!1}isSkippedDate(e){return!1}_calculateStartViewDate(e){}getStartViewDate(e){return this._calculateStartViewDate(e)}getCompleteViewDataMap(e){const{groups:t,isGroupedByDate:i,isHorizontalGrouping:n,isVerticalGrouping:o,intervalCount:a,currentDate:s,viewType:r,startDayHour:d,endDayHour:u,hoursInterval:c}=e;this._setVisibilityDates(e),this.setHiddenInterval(d,u,c);const h=(0,l.getAllGroups)(t),p=this.getCellCount({intervalCount:a,currentDate:s,viewType:r,startDayHour:d,endDayHour:u,hoursInterval:c}),g=this.getRowCount({intervalCount:a,currentDate:s,viewType:r,hoursInterval:c,startDayHour:d,endDayHour:u});let _=[];const f=this._generateAllDayPanelData(e,g,p),m=this._generateViewCellsData(e,g,p);return f&&_.push(f),_.push(...m),n&&!i&&(_=this._transformViewDataMapForHorizontalGrouping(_,h)),o&&(_=this._transformViewDataMapForVerticalGrouping(_,h)),i&&(_=this._transformViewDataMapForGroupingByDate(_,h)),this._addKeysToCells(_)}_transformViewDataMapForHorizontalGrouping(e,t){const i=e.map((e=>e.slice()));return t.slice(1).forEach(((t,n)=>{const o=n+1;e.forEach(((e,n)=>{const a=e.map((e=>u({},e,{groups:t,groupIndex:o})));i[n].push(...a)}))})),i}_transformViewDataMapForVerticalGrouping(e,t){const i=e.map((e=>e.slice()));return t.slice(1).forEach(((t,n)=>{const o=n+1,a=e.map((e=>e.map((e=>u({},e,{groupIndex:o,groups:t})))));i.push(...a)})),i}_transformViewDataMapForGroupingByDate(e,t){const i=t.slice(1),n=i.length;return e.map((e=>e.reduce(((e,t)=>[...e,u({},t,{isFirstGroupCell:!0,isLastGroupCell:0===n}),...i.map(((e,i)=>u({},t,{groups:e,groupIndex:i+1,isFirstGroupCell:!1,isLastGroupCell:i===n-1})))]),[])))}_addKeysToCells(e){const t=e[0].length,{currentViewDataMap:i}=e.reduce(((e,i,n)=>{let{allDayPanelsCount:o,currentViewDataMap:a}=e;const s=i[0].allDay,r=(n-o)*t,l=s?o+1:o;return a[n].forEach(((e,t)=>{e.key=r+t})),{allDayPanelsCount:l,currentViewDataMap:a}}),{allDayPanelsCount:0,currentViewDataMap:e});return i}generateViewDataMap(e,t){const{rowCount:i,startCellIndex:n,startRowIndex:o,cellCount:s,isVerticalGrouping:r,isAllDayPanelVisible:l}=t,d=(e,t,i,n)=>{const o=void 0!==n?i+n:void 0;return e.slice(i,o).map(((e,i)=>({cellData:e,position:{rowIndex:t,columnIndex:i}})))};let u=o,c=[];this._isStandaloneAllDayPanel(r,l)&&(u++,c=d(e[0],0,n,s));const h=(0,a.getDisplayedRowCount)(i,e);return{allDayPanelMap:c,dateTableMap:e.slice(u,u+h).map(((e,t)=>d(e,t,n,s)))}}_isStandaloneAllDayPanel(e,t){return!e&&t}getViewDataFromMap(e,t,i){const{topVirtualRowHeight:n,bottomVirtualRowHeight:o,leftVirtualCellWidth:s,rightVirtualCellWidth:r,cellCount:l,rowCount:d,startRowIndex:u,startCellIndex:c,isProvideVirtualCellsWidth:h,isGroupedAllDayPanel:p,isVerticalGrouping:g,isAllDayPanelVisible:_}=i,{allDayPanelMap:f,dateTableMap:m}=t,{groupedData:v}=m.reduce(((e,t)=>{let{previousGroupIndex:i,groupedData:n}=e;const o=t.map((e=>{let{cellData:t}=e;return t})),s=o[0],r=s.allDay,l=s.groupIndex;return l!==i&&n.push({dateTable:[],isGroupedAllDayPanel:(0,a.getIsGroupedAllDayPanel)(!!r,g),groupIndex:l,key:(0,a.getKeyByGroup)(l,g)}),r?n[n.length-1].allDayPanel=o:n[n.length-1].dateTable.push({cells:o,key:o[0].key-c}),{groupedData:n,previousGroupIndex:l}}),{previousGroupIndex:-1,groupedData:[]});this._isStandaloneAllDayPanel(g,_)&&(v[0].allDayPanel=f.map((e=>{let{cellData:t}=e;return t})));const C=(0,a.getTotalCellCountByCompleteData)(e),y=(0,a.getTotalRowCountByCompleteData)(e),b=(0,a.getDisplayedCellCount)(l,e),x=(0,a.getDisplayedRowCount)(d,e);return{groupedData:v,topVirtualRowHeight:n,bottomVirtualRowHeight:o,leftVirtualCellWidth:h?s:void 0,rightVirtualCellWidth:h?r:void 0,isGroupedAllDayPanel:p,leftVirtualCellCount:c,rightVirtualCellCount:void 0===l?0:C-c-b,topVirtualRowCount:u,bottomVirtualRowCount:y-u-x}}_generateViewCellsData(e,t,i){const n=[];for(let o=0;o<t;o+=1)n.push(this._generateCellsRow(e,!1,o,t,i));return n}_generateAllDayPanelData(e,t,i){return e.isAllDayPanelVisible?this._generateCellsRow(e,!0,0,t,i):null}_generateCellsRow(e,t,i,n,o){const a=[];for(let s=0;s<o;++s){const r=this.getCellData(i,s,e,t);r.index=i*o+s,r.isFirstGroupCell=this._isFirstGroupCell(i,s,e,n,o),r.isLastGroupCell=this._isLastGroupCell(i,s,e,n,o),a.push(r)}return a}getCellData(e,t,i,n){return n?this.prepareAllDayCellData(i,e,t):this.prepareCellData(i,e,t)}prepareCellData(e,t,i){const{groups:n,startDayHour:o,endDayHour:a,hoursInterval:s}=e,r=(0,l.getAllGroups)(n),d=this.getDateByCellIndices(e,t,i,this.getCellCountInDay(o,a,s)),u={startDate:d,endDate:this.getCellEndDate(d,e),allDay:this.tableAllDay,groupIndex:0};return r.length>0&&(u.groups=r[0]),u}prepareAllDayCellData(e,t,i){const a=this.prepareCellData(u({},e,{viewOffset:0}),t,i),{viewOffset:s}=e,r=n.default.trimTime(a.startDate),l=o.dateUtilsTs.addOffsets(r,[s]);return u({},a,{startDate:l,endDate:l,allDay:!0})}getDateByCellIndices(e,t,i,o){let{startViewDate:s}=e;const{startDayHour:r,interval:l,firstDayOfWeek:d,intervalCount:u,viewOffset:h}=e,p=s.getHours()!==Math.floor(r);if(p){const e=(0,a.getStartViewDateWithoutDST)(s,r);s=new Date(e.getTime()-c("day"))}const g=this.getCellCount(e),_=this.getRowCount(e),f=this._calculateCellIndex(t,i,_,g),m=this.getMillisecondsOffset(f,l,o),v=this.isWorkView?this.getTimeOffsetByColumnIndex(i,this.getFirstDayOfWeek(d),g,u):0,C=s.getTime(),y=new Date(C+m+v+h),b=p?0:n.default.getTimezonesDifference(s,y);return y.setTime(y.getTime()+b),y}getMillisecondsOffset(e,t,i){return t*e+Math.floor(e/i)*this.hiddenInterval}getTimeOffsetByColumnIndex(e,t,i,n){const o=Math.max(0,t-1),a=i/n;return 2*Math.floor((e+o)/a)*c("day")}calculateEndDate(e,t,i){return this.getCellEndDate(e,{interval:t})}_calculateCellIndex(e,t,i,n){return(0,a.calculateCellIndex)(e,t,i)}generateGroupedDataMap(e){const{allDayPanelMap:t,dateTableMap:i}=e,{previousGroupedDataMap:n}=i.reduce(((e,t)=>{const{previousGroupedDataMap:i,previousRowIndex:n,previousGroupIndex:o}=e,{groupIndex:a}=t[0].cellData,s=a===o?n+1:0;return t.forEach((e=>{const{groupIndex:t}=e.cellData;i[t]||(i[t]=[]),i[t][s]||(i[t][s]=[]),i[t][s].push(e)})),{previousGroupedDataMap:i,previousRowIndex:s,previousGroupIndex:a}}),{previousGroupedDataMap:[],previousRowIndex:-1,previousGroupIndex:-1}),o=[];return null==t||t.forEach((e=>{const{groupIndex:t}=e.cellData;o[t]||(o[t]=[]),o[t].push(e)})),{allDayPanelGroupedMap:o,dateTableGroupedMap:n}}_isFirstGroupCell(e,t,i,n,o){const{groupOrientation:r,groups:l,isGroupedByDate:d}=i,u=(0,a.getGroupCount)(l);return d?t%u==0:r===s.HORIZONTAL_GROUP_ORIENTATION?t%o==0:e%n==0}_isLastGroupCell(e,t,i,n,o){const{groupOrientation:r,groups:l,isGroupedByDate:d}=i,u=(0,a.getGroupCount)(l);return d?(t+1)%u==0:r===s.HORIZONTAL_GROUP_ORIENTATION?(t+1)%o==0:(e+1)%n==0}markSelectedAndFocusedCells(e,t){const{selectedCells:i,focusedCell:n}=t;if(!i&&!n)return e;const{allDayPanelMap:o,dateTableMap:a}=e,s=a.map((e=>this._markSelectedAndFocusedCellsInRow(e,i,n)));return{allDayPanelMap:this._markSelectedAndFocusedCellsInRow(o,i,n),dateTableMap:s}}_markSelectedAndFocusedCellsInRow(e,t,i){return e.map((e=>{const{index:n,groupIndex:o,allDay:a,startDate:s}=e.cellData,r=t.findIndex((e=>{let{index:t,groupIndex:i,allDay:r,startDate:l}=e;return o===i&&(n===t||void 0===t&&s.getTime()===l.getTime())&&!!a==!!r})),l=!!i&&n===i.cellData.index&&o===i.cellData.groupIndex&&a===i.cellData.allDay;return l||-1!==r?u({},e,{cellData:u({},e.cellData,{isSelected:r>-1,isFocused:l})}):e}))}getInterval(e){return e*c("hour")}_getIntervalDuration(e){return c("day")*e}_setVisibilityDates(e){}getCellCountInDay(e,t,i){const n=(0,a.calculateDayDuration)(e,t)/i;return Math.ceil(n)}getCellCount(e){const{intervalCount:t,viewType:i,startDayHour:n,endDayHour:o,hoursInterval:s}=e,r=this.getCellCountInDay(n,o,s),l=(0,a.isHorizontalView)(i)?r:1;return this.daysInInterval*t*l}getRowCount(e){const{viewType:t,startDayHour:i,endDayHour:n,hoursInterval:o}=e,s=this.getCellCountInDay(i,n,o);return(0,a.isHorizontalView)(t)?1:s}setHiddenInterval(e,t,i){this.hiddenInterval=c("day")-this.getVisibleDayDuration(e,t,i)}getVisibleDayDuration(e,t,i){return i*this.getCellCountInDay(e,t,i)*c("hour")}getFirstDayOfWeek(e){return e}getCellEndDate(e,t){const i=Math.round(t.interval);return r.default.addOffsetsWithoutDST(e,i)}}},61715:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewDataGeneratorDay=void 0;var n=i(34396),o=i(91245);class a extends o.ViewDataGenerator{_calculateStartViewDate(e){return n.dayUtils.calculateStartViewDate(e.currentDate,e.startDayHour,e.startDate,this._getIntervalDuration(e.intervalCount))}}t.ViewDataGeneratorDay=a},55752:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewDataGeneratorMonth=void 0;var n=d(i(38662)),o=d(i(41380)),a=i(34396),s=d(i(18648)),r=i(75480),l=i(91245);function d(e){return e&&e.__esModule?e:{default:e}}const u=o.default.dateToMilliseconds;class c extends l.ViewDataGenerator{constructor(){super(...arguments),this.tableAllDay=void 0}getCellData(e,t,i,n){const{indicatorTime:o,timeZoneCalculator:r,intervalCount:l,viewOffset:d}=i,u=super.getCellData(e,t,i,!1),c=s.default.addOffsetsWithoutDST(u.startDate,-d);return u.today=this.isCurrentDate(c,o,r),u.otherMonth=this.isOtherMonth(c,this._minVisibleDate,this._maxVisibleDate),u.firstDayOfMonth=(0,a.isFirstCellInMonthWithIntervalCount)(c,l),u.text=a.monthUtils.getCellText(c,l),u}isCurrentDate(e,t,i){return o.default.sameDate(e,(0,a.getToday)(t,i))}isOtherMonth(e,t,i){return!o.default.dateInRange(e,t,i,"date")}_calculateCellIndex(e,t,i,n){return a.monthUtils.calculateCellIndex(e,t,i,n)}calculateEndDate(e,t,i){return(0,a.setOptionHour)(e,i)}getInterval(){return u("day")}_calculateStartViewDate(e){return a.monthUtils.calculateStartViewDate(e.currentDate,e.startDayHour,e.startDate,e.intervalCount,this.getFirstDayOfWeek(e.firstDayOfWeek))}_setVisibilityDates(e){const{intervalCount:t,startDate:i,currentDate:n}=e,s=o.default.getFirstMonthDate(i),r=a.monthUtils.getViewStartByOptions(i,n,t,s);this._minVisibleDate=new Date(r.setDate(1));const l=new Date(r.setMonth(r.getMonth()+t));this._maxVisibleDate=new Date(l.setDate(0))}getCellCount(){return 7}getRowCount(e){const t=new Date(e.currentDate);t.setDate(1);const i=new Date(t);return i.setMonth(i.getMonth()+e.intervalCount),i.setDate(0),(0,r.calculateAlignedWeeksBetweenDates)(t,i,e.firstDayOfWeek??n.default.firstDayOfWeekIndex())}getCellCountInDay(){return 1}setHiddenInterval(){this.hiddenInterval=0}getCellEndDate(e,t){const{startDayHour:i,endDayHour:n}=t,o=(n-i)*u("hour");return s.default.addOffsetsWithoutDST(e,o)}}t.ViewDataGeneratorMonth=c},73082:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewDataGeneratorTimelineMonth=void 0;var n=r(i(41380)),o=i(34396),a=r(i(18648)),s=i(91245);function r(e){return e&&e.__esModule?e:{default:e}}const l=n.default.dateToMilliseconds;class d extends s.ViewDataGenerator{_calculateCellIndex(e,t,i,n){return o.monthUtils.calculateCellIndex(e,t,i,n)}calculateEndDate(e,t,i){return(0,o.setOptionHour)(e,i)}getInterval(){return l("day")}_calculateStartViewDate(e){return o.timelineMonthUtils.calculateStartViewDate(e.currentDate,e.startDayHour,e.startDate,e.intervalCount)}getCellCount(e){const{intervalCount:t}=e,i=new Date(e.currentDate);let n=0;for(let e=1;e<=t;e++)n+=new Date(i.getFullYear(),i.getMonth()+e,0).getDate();return n}setHiddenInterval(){this.hiddenInterval=0}getCellEndDate(e,t){const{startDayHour:i,endDayHour:n}=t,o=(n-i)*l("hour");return a.default.addOffsetsWithoutDST(e,o)}}t.ViewDataGeneratorTimelineMonth=d},40348:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewDataGeneratorWeek=void 0;var n=i(34396),o=i(91245);class a extends o.ViewDataGenerator{constructor(){super(...arguments),this.daysInInterval=7}_getIntervalDuration(e){return n.weekUtils.getIntervalDuration(e)}_calculateStartViewDate(e){return n.weekUtils.calculateStartViewDate(e.currentDate,e.startDayHour,e.startDate,this._getIntervalDuration(e.intervalCount),this.getFirstDayOfWeek(e.firstDayOfWeek))}}t.ViewDataGeneratorWeek=a},33196:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewDataGeneratorWorkWeek=void 0;var n=i(34396),o=i(40348);class a extends o.ViewDataGeneratorWeek{constructor(){super(...arguments),this.daysInInterval=5,this.isWorkView=!0}isSkippedDate(e){return(0,n.isDataOnWeekend)(e)}_calculateStartViewDate(e){return n.workWeekUtils.calculateStartViewDate(e.currentDate,e.startDayHour,e.startDate,this._getIntervalDuration(e.intervalCount),this.getFirstDayOfWeek(e.firstDayOfWeek))}getFirstDayOfWeek(e){return e||0}}t.ViewDataGeneratorWorkWeek=a},6051:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(41380)),o=i(55594),a=i(34396),s=h(i(18648)),r=i(82274),l=i(30795),d=i(16794),u=i(75480);const c=["groups","groupOrientation","groupByDate","isAllDayPanelVisible","viewOffset"];function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},p.apply(null,arguments)}t.default=class{constructor(e){this.viewType=e,this.viewDataGenerator=(0,u.getViewDataGeneratorByViewType)(e),this.viewData={},this.completeViewDataMap=[],this.completeDateHeaderMap=[],this.viewDataMap={},this._groupedDataMapProvider=null}get groupedDataMap(){return this._groupedDataMapProvider.groupedDataMap}get hiddenInterval(){return this.viewDataGenerator.hiddenInterval}isSkippedDate(e){return this.viewDataGenerator.isSkippedDate(e)}update(e,t){this.viewDataGenerator=(0,u.getViewDataGeneratorByViewType)(e.viewType);const{viewDataGenerator:i}=this,n=new r.DateHeaderDataGenerator(i),o=new d.TimePanelDataGenerator(i),a=this._transformRenderOptions(e);a.interval=this.viewDataGenerator.getInterval(a.hoursInterval),this._options=a,t&&(this.completeViewDataMap=i.getCompleteViewDataMap(a),this.completeDateHeaderMap=n.getCompleteDateHeaderMap(a,this.completeViewDataMap),a.isGenerateTimePanelData&&(this.completeTimePanelMap=o.getCompleteTimePanelMap(a,this.completeViewDataMap))),this.viewDataMap=i.generateViewDataMap(this.completeViewDataMap,a),this.updateViewData(a),this._groupedDataMapProvider=new l.GroupedDataMapProvider(this.viewDataGenerator,this.viewDataMap,this.completeViewDataMap,{isVerticalGrouping:a.isVerticalGrouping,viewType:a.viewType,viewOffset:e.viewOffset}),this.dateHeaderData=n.generateDateHeaderData(this.completeDateHeaderMap,this.completeViewDataMap,a),a.isGenerateTimePanelData&&(this.timePanelData=o.generateTimePanelData(this.completeTimePanelMap,a))}createGroupedDataMapProvider(){this._groupedDataMapProvider=new l.GroupedDataMapProvider(this.viewDataGenerator,this.viewDataMap,this.completeViewDataMap,{isVerticalGrouping:this._options.isVerticalGrouping,viewType:this._options.viewType})}updateViewData(e){const t=this._transformRenderOptions(e);this.viewDataMapWithSelection=this.viewDataGenerator.markSelectedAndFocusedCells(this.viewDataMap,t),this.viewData=this.viewDataGenerator.getViewDataFromMap(this.completeViewDataMap,this.viewDataMapWithSelection,t)}_transformRenderOptions(e){const{groups:t,groupOrientation:i,groupByDate:n,isAllDayPanelVisible:o,viewOffset:s}=e;return p({},function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,c),{startViewDate:this.viewDataGenerator._calculateStartViewDate(e),isVerticalGrouping:(0,a.isVerticalGroupingApplied)(t,i),isHorizontalGrouping:(0,a.isHorizontalGroupingApplied)(t,i),isGroupedByDate:(0,a.isGroupingByDate)(t,i,n),isGroupedAllDayPanel:(0,a.calculateIsGroupedAllDayPanel)(t,i,o),groups:t,groupOrientation:i,isAllDayPanelVisible:o,viewOffset:s})}getGroupPanelData(e){const t=this._transformRenderOptions(e);if(t.groups.length>0){const e=this.getCellCount(t);return(0,a.getGroupPanelData)(t.groups,e,t.isGroupedByDate,t.isGroupedByDate?1:e)}}getGroupStartDate(e){return this._groupedDataMapProvider.getGroupStartDate(e)}getGroupEndDate(e){return this._groupedDataMapProvider.getGroupEndDate(e)}findGroupCellStartDate(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this._groupedDataMapProvider.findGroupCellStartDate(e,t,i,n)}findAllDayGroupCellStartDate(e){return this._groupedDataMapProvider.findAllDayGroupCellStartDate(e)}findCellPositionInMap(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._groupedDataMapProvider.findCellPositionInMap(e,t)}hasAllDayPanel(){const{viewData:e}=this.viewDataMap,{allDayPanel:t}=e.groupedData[0];return!e.isGroupedAllDayPanel&&(null==t?void 0:t.length)>0}getCellsGroup(e){return this._groupedDataMapProvider.getCellsGroup(e)}getCompletedGroupsInfo(){return this._groupedDataMapProvider.getCompletedGroupsInfo()}getGroupIndices(){return this._groupedDataMapProvider.getGroupIndices()}getLastGroupCellPosition(e){return this._groupedDataMapProvider.getLastGroupCellPosition(e)}getRowCountInGroup(e){return this._groupedDataMapProvider.getRowCountInGroup(e)}getCellData(e,t,i,n){const o=i&&!this._options.isVerticalGrouping?this.viewDataMap.allDayPanelMap:this.viewDataMap.dateTableMap[e],a=n?o.length-1-t:t,{cellData:s}=o[a];return s}getCellsByGroupIndexAndAllDay(e,t){const i=this._getRowCountWithAllDayRows(),n=this._options.isAllDayPanelVisible,o=this._options.isVerticalGrouping?e*i:0,a=this._options.isVerticalGrouping?(e+1)*i-1:i,s=n&&!t?o+1:o,r=t?s:a;return this.completeViewDataMap.slice(s,r+1).map((t=>t.filter((t=>{let{groupIndex:i}=t;return e===i}))))}getCellCountWithGroup(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const{dateTableGroupedMap:i}=this.groupedDataMap;return i.filter(((t,i)=>i<=e)).reduce(((e,i)=>e+i[t].length),0)}hasGroupAllDayPanel(e){var t,i;return this._options.isVerticalGrouping?!(null===(i=this.groupedDataMap.dateTableGroupedMap[e])||void 0===i||!i[0][0].cellData.allDay):(null===(t=this.groupedDataMap.allDayPanelGroupedMap[e])||void 0===t?void 0:t.length)>0}isGroupIntersectDateInterval(e,t,i){const n=this.getGroupStartDate(e);return t<this.getGroupEndDate(e)&&i>n}findGlobalCellPosition(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{completeViewDataMap:n}=this,o=this._options.isAllDayPanelVisible;for(let a=0;a<n.length;a+=1){const s=n[a];for(let n=0;n<s.length;n+=1){const r=s[n],{startDate:l,endDate:d,groupIndex:u,allDay:c}=r;if(t===u&&i===!!c&&this._compareDatesAndAllDay(e,l,d,i))return{position:{columnIndex:n,rowIndex:o&&!this._options.isVerticalGrouping?a-1:a},cellData:r}}}}_compareDatesAndAllDay(e,t,i,o){return o?n.default.sameDate(e,t):e>=t&&e<i}getSkippedDaysCount(e,t,i,o){const{dateTableGroupedMap:a}=this._groupedDataMapProvider.groupedDataMap,s=a[e];let r=0;for(let e=0;e<s.length;e+=1)for(let n=0;n<s[e].length;n+=1){const o=s[e][n].cellData;t.getTime()<o.endDate.getTime()&&i.getTime()>o.startDate.getTime()&&(r+=1)}const l=s[s.length-1][s[0].length-1].cellData,d=n.default.trimTime(l.startDate),u=Math.floor((i.getTime()-d.getTime())/n.default.dateToMilliseconds("day"));return o-r-(u>0?u:0)}getColumnsCount(){const{dateTableMap:e}=this.viewDataMap;return e?e[0].length:0}getViewEdgeIndices(e){return e?{firstColumnIndex:0,lastColumnIndex:this.viewDataMap.allDayPanelMap.length-1,firstRowIndex:0,lastRowIndex:0}:{firstColumnIndex:0,lastColumnIndex:this.viewDataMap.dateTableMap[0].length-1,firstRowIndex:0,lastRowIndex:this.viewDataMap.dateTableMap.length-1}}getGroupEdgeIndices(e,t){const i=this.groupedDataMap.dateTableGroupedMap[e],n=i[0].length,o=i.length,a=i[0][0].position.columnIndex,s=i[0][n-1].position.columnIndex;return t?{firstColumnIndex:a,lastColumnIndex:s,firstRowIndex:0,lastRowIndex:0}:{firstColumnIndex:a,lastColumnIndex:s,firstRowIndex:i[0][0].position.rowIndex,lastRowIndex:i[o-1][0].position.rowIndex}}isSameCell(e,t){const{startDate:i,groupIndex:n,allDay:o,index:a}=e,{startDate:s,groupIndex:r,allDay:l,index:d}=t;return i.getTime()===s.getTime()&&n===r&&o===l&&a===d}getLastViewDate(){const{completeViewDataMap:e}=this,t=e.length-1;return e[t][e[t].length-1].endDate}getStartViewDate(){return this._options.startViewDate}getIntervalDuration(e){return this.viewDataGenerator._getIntervalDuration(e)}getLastCellEndDate(){const e=new Date(this.getLastViewDate().getTime()-n.default.dateToMilliseconds("minute"));return o.dateUtilsTs.addOffsets(e,[-this._options.viewOffset])}getLastViewDateByEndDayHour(e){const t=this.getLastCellEndDate(),i=n.default.dateTimeFromDecimal(e),o=new Date(t.setHours(i.hours,i.minutes));return this._adjustEndDateByDaylightDiff(t,o)}_adjustEndDateByDaylightDiff(e,t){const i=s.default.getDaylightOffsetInMs(e,t),o=new Date(t.getTime()-i);return new Date(o.getTime()-n.default.dateToMilliseconds("minute"))}getCellCountInDay(e,t,i){return this.viewDataGenerator.getCellCountInDay(e,t,i)}getCellCount(e){return this.viewDataGenerator.getCellCount(e)}getRowCount(e){return this.viewDataGenerator.getRowCount(e)}getVisibleDayDuration(e,t,i){return this.viewDataGenerator.getVisibleDayDuration(e,t,i)}_getRowCountWithAllDayRows(){const e=this._options.isAllDayPanelVisible?1:0;return this.getRowCount(this._options)+e}getFirstDayOfWeek(e){return this.viewDataGenerator.getFirstDayOfWeek(e)}setViewOptions(e){this._options=this._transformRenderOptions(e)}getViewOptions(){return this._options}getViewPortGroupCount(){const{dateTableGroupedMap:e}=this.groupedDataMap;return(null==e?void 0:e.length)||0}getCellsBetween(e,t){const[i,n]=this.normalizeCellsOrder(e,t),{index:o}=i,{index:s}=n,r=this.getCellsByGroupIndexAndAllDay(i.groupIndex??0,n.allDay??!1);return(0,a.isHorizontalView)(this.viewType)?this.getCellsBetweenHorizontalView(r,o,s):this.getCellsBetweenVerticalView(r,o,s)}getCellsBetweenHorizontalView(e,t,i){return e.reduce(((e,n)=>e.concat(n.filter((e=>{let{index:n}=e;return t<=n&&n<=i})))),[])}getCellsBetweenVerticalView(e,t,i){var n;const o=[],a=e.length,s=(null===(n=e[0])||void 0===n?void 0:n.length)??0;let r=!1;for(let n=0;n<s;n+=1)for(let s=0;s<a;s+=1){const a=e[s][n],{index:l}=a;if(l===t&&(r=!0),r&&o.push(a),l===i)return o}return o}normalizeCellsOrder(e,t){return e.startDate>t.startDate?[t,e]:[e,t]}}},59310:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptionRules=t.Button=void 0,t.defaultOptions=function(e){w.push(e),x.defaultProps=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(x.defaultProps),Object.getOwnPropertyDescriptors((0,l.convertRulesToOptions)(b)),Object.getOwnPropertyDescriptors((0,l.convertRulesToOptions)(w))))};var n=i(81167),o=i(49714),a=i(42222),s=v(i(4671)),r=v(i(65951)),l=i(53904),d=i(69629),u=i(53124),c=i(52071),h=i(10632),p=i(93796),g=i(46190),_=i(38643),f=i(8529),m=i(20654);function v(e){return e&&e.__esModule?e:{default:e}}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},C.apply(null,arguments)}const y=["outlined","text","contained"],b=t.defaultOptionRules=(0,l.createDefaultOptionRules)([{device:()=>"desktop"===r.default.real().deviceType&&!r.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,c.isMaterial)((0,c.current)()),options:{useInkRipple:!0}}]);class x extends o.InfernoWrapperComponent{constructor(e){super(e),this.contentRef=(0,n.createRef)(),this.inkRippleRef=(0,n.createRef)(),this.submitInputRef=(0,n.createRef)(),this.widgetRef=(0,n.createRef)(),this.__getterCache={},this.state={},this.focus=this.focus.bind(this),this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.submitEffect=this.submitEffect.bind(this),this.onActive=this.onActive.bind(this),this.onInactive=this.onInactive.bind(this),this.onWidgetClick=this.onWidgetClick.bind(this),this.keyDown=this.keyDown.bind(this),this.emitClickEvent=this.emitClickEvent.bind(this)}createEffects(){return[new o.InfernoEffect(this.submitEffect,[this.props.onSubmit,this.props.useSubmitBehavior]),(0,o.createReRenderEffect)()]}updateEffects(){var e;null===(e=this._effects[0])||void 0===e||e.update([this.props.onSubmit,this.props.useSubmitBehavior])}submitEffect(){const e="UIFeedback",{onSubmit:t,useSubmitBehavior:i}=this.props;if(i&&t)return a.click.on(this.submitInputRef.current,(e=>t({event:e,submitInput:this.submitInputRef.current})),{namespace:e}),()=>a.click.off(this.submitInputRef.current,{namespace:e})}onActive(e){const{useInkRipple:t}=this.props;t&&this.inkRippleRef.current.showWave({element:this.contentRef.current,event:e})}onInactive(e){const{useInkRipple:t}=this.props;t&&this.inkRippleRef.current.hideWave({element:this.contentRef.current,event:e})}onWidgetClick(e){const{onClick:t,useSubmitBehavior:i}=this.props;null==t||t({event:e}),i&&this.submitInputRef.current.click()}keyDown(e){const{onKeyDown:t}=this.props,{keyName:i,originalEvent:n,which:o}=e,a=null==t?void 0:t(e);if(null!=a&&a.cancel)return a;"space"!==i&&"space"!==o&&"enter"!==i&&"enter"!==o||(n.preventDefault(),this.emitClickEvent())}emitClickEvent(){this.contentRef.current.click()}get aria(){const{icon:e,text:t}=this.props;let i=t??"";if(!t&&e){switch((0,d.getImageSourceType)(e)){case"image":{const t=/^(?!(?:https?:\/\/)|(?:ftp:\/\/)|(?:www\.))[^\s]+$/;i=!e.includes("base64")&&t.test(e)?e.replace(/.+\/([^.]+)\..+$/,"$1"):"";break}case"dxIcon":i=s.default.format((0,u.camelize)(e,!0))||e;break;case"fontIcon":i=e;break;case"svg":var n;i=(null===(n=/<title>(.*?)<\/title>/.exec(e))||void 0===n?void 0:n[1])??"";break}}return C({role:"button"},i?{label:i}:{})}get cssClasses(){return(e=>{const{icon:t,iconPosition:i,stylingMode:n,text:o,type:a}=e,s=n&&y.includes(n),r={"dx-button":!0,[`dx-button-mode-${s?n:"contained"}`]:!0,[`dx-button-${a??"normal"}`]:!0,"dx-button-has-text":!!o,"dx-button-has-icon":!!t,"dx-button-icon-right":"left"!==i};return(0,g.combineClasses)(r)})(this.props)}get iconSource(){const{icon:e}=this.props;return e??""}get inkRippleConfig(){return void 0!==this.__getterCache.inkRippleConfig?this.__getterCache.inkRippleConfig:this.__getterCache.inkRippleConfig=(()=>{const{icon:e,text:t}=this.props;return!t&&e?{isCentered:!0,useHoldAnimation:!1,waveSizeCoefficient:1}:{}})()}get buttonTemplateData(){const{icon:e,text:t,templateData:i}=this.props;return C({icon:e,text:t},i)}get restAttributes(){const e=C({},this.props);return["accessKey","activeStateEnabled","children","className","disabled","focusStateEnabled","height","hint","hoverStateEnabled","icon","iconPosition","iconTemplate","onClick","onKeyDown","onSubmit","pressed","rtlEnabled","stylingMode","tabIndex","template","templateData","text","type","useInkRipple","useSubmitBehavior","visible","width"].forEach((t=>{delete e[t]})),e}focus(){this.widgetRef.current.focus()}activate(){this.widgetRef.current.activate()}deactivate(){this.widgetRef.current.deactivate()}componentWillUpdate(e){super.componentWillUpdate(),this.props.icon===e.icon&&this.props.text===e.text||(this.__getterCache.inkRippleConfig=void 0)}render(){const{children:e,iconPosition:t,text:i}=this.props,o=(0,h.getTemplate)(this.props.template),a=(0,h.getTemplate)(this.props.iconTemplate),s=!this.props.template&&!e&&""!==i,r="left"===t,l=!o&&!e&&(this.iconSource||a)&&(0,n.createComponentVNode)(2,_.Icon,{source:this.iconSource,position:t,iconTemplate:a});return(0,n.normalizeProps)((0,n.createComponentVNode)(2,p.Widget,C({accessKey:this.props.accessKey,activeStateEnabled:this.props.activeStateEnabled,aria:this.aria,className:this.props.className,classes:this.cssClasses,disabled:this.props.disabled,focusStateEnabled:this.props.focusStateEnabled,height:this.props.height,hint:this.props.hint,hoverStateEnabled:this.props.hoverStateEnabled,onActive:this.onActive,onClick:this.onWidgetClick,onInactive:this.onInactive,onKeyDown:this.keyDown,rtlEnabled:this.props.rtlEnabled,tabIndex:this.props.tabIndex,visible:this.props.visible,width:this.props.width},this.restAttributes,{children:(0,n.createVNode)(1,"div","dx-button-content",[o&&o({data:this.buttonTemplateData}),!o&&e,r&&l,s&&(0,n.createVNode)(1,"span","dx-button-text",i,0),!r&&l,this.props.useSubmitBehavior&&(0,n.createVNode)(64,"input","dx-button-submit-input",null,1,{type:"submit",tabIndex:-1},null,this.submitInputRef),this.props.useInkRipple&&(0,n.createComponentVNode)(2,f.InkRipple,{config:this.inkRippleConfig},null,this.inkRippleRef)],0,null,null,this.contentRef)}),null,this.widgetRef))}}t.Button=x,x.defaultProps=C({},m.defaultButtonProps,(0,l.convertRulesToOptions)(b));const w=[]},77629:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(92848)),o=i(59310),a=s(i(19583));function s(e){return e&&e.__esModule?e:{default:e}}class r extends a.default{getProps(){const e=super.getProps();return e.onKeyDown=this._wrapKeyDownHandler(e.onKeyDown),e}focus(){let e;return null===(e=this.viewRef)||void 0===e?void 0:e.focus(...arguments)}activate(){let e;return null===(e=this.viewRef)||void 0===e?void 0:e.activate(...arguments)}deactivate(){let e;return null===(e=this.viewRef)||void 0===e?void 0:e.deactivate(...arguments)}_getActionConfigs(){return{onClick:{excludeValidators:["readOnly"]},onSubmit:{}}}get _propsInfo(){return{twoWay:[],allowNull:[],elements:["onSubmit"],templates:["template","iconTemplate"],props:["activeStateEnabled","hoverStateEnabled","icon","iconPosition","onClick","onSubmit","pressed","stylingMode","template","iconTemplate","text","type","useInkRipple","useSubmitBehavior","templateData","className","accessKey","disabled","focusStateEnabled","height","hint","onKeyDown","rtlEnabled","tabIndex","visible","width"]}}get _viewComponent(){return o.Button}}t.default=r,(0,n.default)("dxButton",r),r.defaultOptions=o.defaultOptions},38643:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIconProps=t.Icon=void 0;var n=i(81167),o=i(49714),a=i(69629),s=i(10632),r=i(46190);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}const d=t.defaultIconProps={position:"left",source:""};class u extends o.BaseInfernoComponent{constructor(e){super(e),this.state={}}get sourceType(){return(0,a.getImageSourceType)(this.props.source)}get cssClass(){return"left"!==this.props.position?"dx-icon-right":""}get iconClassName(){const e={"dx-icon":!0,[this.cssClass]:!!this.cssClass},{source:t}=this.props;return"dxIcon"===this.sourceType?(0,r.combineClasses)(l({},e,{[`dx-icon-${t}`]:!0})):"fontIcon"===this.sourceType?(0,r.combineClasses)(l({},e,{[String(t)]:!!t})):"image"===this.sourceType?(0,r.combineClasses)(e):"svg"===this.sourceType?(0,r.combineClasses)(l({},e,{"dx-svg-icon":!0})):""}get restAttributes(){const e=l({},this.props);return["iconTemplate","position","source"].forEach((t=>{delete e[t]})),e}render(){const{iconClassName:e,props:{source:t},sourceType:i}=this,o=(0,s.getTemplate)(this.props.iconTemplate);return(0,n.createFragment)(["dxIcon"===i&&(0,n.createVNode)(1,"i",e),"fontIcon"===i&&(0,n.createVNode)(1,"i",e),"image"===i&&(0,n.createVNode)(1,"img",e,null,1,{alt:"",src:t}),o&&(0,n.createVNode)(1,"i",e,o({}),0)],0)}}t.Icon=u,u.defaultProps=d},74660:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(77629))&&n.__esModule?n:{default:n};t.default=o.default},8529:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.InkRipple=void 0;var n=i(81167),o=i(49714),a=i(63322);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}class r extends o.BaseInfernoComponent{constructor(e){super(e),this.__getterCache={},this.state={},this.hideWave=this.hideWave.bind(this),this.showWave=this.showWave.bind(this)}get getConfig(){return void 0!==this.__getterCache.getConfig?this.__getterCache.getConfig:this.__getterCache.getConfig=(()=>{const{config:e}=this.props;return(0,a.initConfig)(e)})()}get restAttributes(){const e=s({},this.props);return delete e.config,e}hideWave(e){(0,a.hideWave)(this.getConfig,e)}showWave(e){(0,a.showWave)(this.getConfig,e)}componentWillUpdate(e){this.props.config!==e.config&&(this.__getterCache.getConfig=void 0)}render(){return(0,n.normalizeProps)((0,n.createVNode)(1,"div","dx-inkripple",null,1,s({},this.restAttributes)))}}t.InkRipple=r,r.defaultProps={config:{}}},20654:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultButtonProps=void 0;var n=i(28112);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}t.defaultButtonProps=o({},n.BaseWidgetDefaultProps,{activeStateEnabled:!0,hoverStateEnabled:!0,icon:"",iconPosition:"left",stylingMode:"contained",text:"",type:"normal",useInkRipple:!1,useSubmitBehavior:!1,templateData:{}})},19583:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(69629),a=(n=i(19391))&&n.__esModule?n:{default:n},s=i(34993);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}class l extends s.ComponentWrapper{get _validationGroupConfig(){return a.default.getGroupConfig(this._findGroup())}getDefaultTemplateNames(){return["content"]}getSupportedKeyNames(){return["space","enter"]}getProps(){const e=super.getProps();e.onClick=e=>{let{event:t}=e;this._clickAction({event:t,validationGroup:this._validationGroupConfig})};return"svg"===(0,o.getImageSourceType)(e.icon)&&(e.iconTemplate=this._createTemplateComponent((()=>e.icon))),e}get _templatesInfo(){return{template:"content"}}_toggleActiveState(e,t){const i=this.viewRef;t?i.activate():i.deactivate()}_getSubmitAction(){let e=!0,t="valid";return this._createAction((i=>{let{event:n,submitInput:o}=i;if(e){const i=this._validationGroupConfig;if(void 0!==i&&""!==i){const n=i.validate();t=n.status,"pending"===n.status&&(e=!1,this.option("disabled",!0),n.complete.then((i=>{let{status:n}=i;this.option("disabled",!1),t=n,"valid"===t&&o.click(),e=!0})))}}"valid"!==t&&n.preventDefault(),n.stopPropagation()}))}_initializeComponent(){super._initializeComponent(),this._addAction("onSubmit",this._getSubmitAction()),this._clickAction=this._createClickAction()}_initMarkup(){super._initMarkup();const e=this.$element().find(".dx-button-content").first(),t=e.children().filter(".dx-template-wrapper"),i=e.children().filter(".dx-button-submit-input");t.length&&(t.addClass("dx-button-content"),t.append(i),e.replaceWith(t))}_patchOptionValues(e){return super._patchOptionValues(r({},e,{templateData:e._templateData}))}_findGroup(){const e=this.$element(),t=this.option("validationGroup");return void 0!==t&&""!==t?t:a.default.findGroup(e,this._modelByElement(e))}_createClickAction(){return this._createActionByOption("onClick",{excludeValidators:["readOnly"]})}_optionChanged(e){if("onClick"===e.name)this._clickAction=this._createClickAction();super._optionChanged(e)}}t.default=l},15139:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(64044),o=v(i(92774)),a=i(638),s=i(98834),r=v(i(38662)),l=v(i(4671)),d=v(i(64960)),u=i(61404),c=i(74663),h=v(i(64553)),p=i(17781),g=v(i(41380)),_=v(i(71051)),f=i(52576),m=v(i(11118));function v(e){return e&&e.__esModule?e:{default:e}}const{abstract:C}=m.default,y="dx-calendar-cell",b="dx-calendar-week-number-cell",x="dx-calendar-empty-cell",w="dx-calendar-selected-date",S="dx-calendar-cell-in-range",D="dx-calendar-cell-range-hover",I="dx-calendar-cell-range-hover-start",E="dx-calendar-cell-range-hover-end",T="dx-calendar-range-start-date",A="dx-calendar-range-end-date",O="dx-calendar-contoured-date",P=`td:not(.${b})`,k=(0,s.addNamespace)(n.name,"dxCalendar"),M=(0,s.addNamespace)(a.start,"dxCalendar"),R="dxDateValueKey",L={month:l.default.format("dxCalendar-currentDay"),year:l.default.format("dxCalendar-currentMonth"),decade:l.default.format("dxCalendar-currentYear"),century:l.default.format("dxCalendar-currentYearRange")},B="date",V="single",F="multiple",H="range",N=m.default.inherit({_getViewName:()=>"base",_getDefaultOptions(){return(0,f.extend)(this.callBase(),{date:new Date,focusStateEnabled:!1,cellTemplate:null,disabledDates:null,onCellClick:null,onCellHover:null,onWeekNumberClick:null,rowCount:3,colCount:4,allowValueSelection:!0,_todayDate:()=>new Date})},_initMarkup(){this.callBase(),this._renderImpl()},_renderImpl(){this.$element().append(this._createTable()),this._createDisabledDatesHandler(),this._renderBody(),this._renderContouredDate(),this._renderValue(),this._renderRange(),this._renderEvents(),this._updateTableAriaLabel()},_getLocalizedWidgetName:()=>l.default.format("dxCalendar-ariaWidgetName"),_getSingleModeAriaLabel(){const{value:e}=this.option(),t=this._getLocalizedWidgetName(),i=r.default.format(e,B);return`${t}. ${l.default.format("dxCalendar-selectedDate",i)}`},_getRangeModeAriaLabel(){const{value:e}=this.option(),t=this._getLocalizedWidgetName(),[i,n]=e,o=r.default.format(i,B),a=r.default.format(n,B);return`${t}. ${i&&n?l.default.format("dxCalendar-selectedDateRange",o,a):l.default.format("dxCalendar-selectedDate",o??a)}`},_getMultipleModeAriaLabel(){return`${this._getLocalizedWidgetName()}. ${this._getMultipleRangesText()}`},_getMultipleRangesText(){const{value:e}=this.option(),t=g.default.getRangesByDates(e.map((e=>new Date(e))));if(t.length>2){return l.default.format("dxCalendar-selectedDateRangeCount",t.length)}return`${l.default.format("dxCalendar-selectedDates")}: ${t.map((e=>this._getRangeText(e))).join(", ")}`},_getRangeText(e){const[t,i]=e,n=r.default.format(t,B),o=r.default.format(i,B);return t&&i?l.default.format("dxCalendar-selectedMultipleDateRange",n,o):n},_getTableAriaLabel(){const{value:e,selectionMode:t}=this.option();if(!e||Array.isArray(e)&&!e.filter(Boolean).length)return this._getLocalizedWidgetName();switch(t){case V:return this._getSingleModeAriaLabel();case H:return this._getRangeModeAriaLabel();case F:return this._getMultipleModeAriaLabel()}},_updateTableAriaLabel(){const e=this._getTableAriaLabel();this.setAria({label:e},this._$table)},_createTable(){return this._$table=(0,h.default)("<table>"),this.setAria({role:"grid"},this._$table),this._$table},_renderBody(){this.$body=(0,h.default)("<tbody>").appendTo(this._$table);const e={cellDate:this._getFirstCellData(),prevCellDate:null};for(let t=0,i=this.option("rowCount");t<i;t++){e.row=this._createRow();for(let t=0,i=this.option("colCount");t<i;t++)this._renderCell(e,t);this._renderWeekNumberCell(e)}},_createRow(){const e=d.default.createElement("tr");return this.setAria("role","row",(0,h.default)(e)),this.$body.get(0).appendChild(e),e},_createCell(e,t){const i=d.default.createElement("td"),n=(0,h.default)(i);return i.className=this._getClassNameByDate(e,t),i.setAttribute("data-value",_.default.serializeDate(e,g.default.getShortDateFormat())),(0,c.data)(i,R,e),this.setAria({role:"gridcell",selected:!1,label:this.getCellAriaLabel(e)},n),{cell:i,$cell:n}},_renderCell(e,t){const{cellDate:i,prevCellDate:n,row:o}=e;n&&g.default.fixTimezoneGap(n,i),e.prevCellDate=i;const{cell:a,$cell:s}=this._createCell(i,t),r=this.option("cellTemplate");(0,h.default)(o).append(a),r?r.render(this._prepareCellTemplateData(i,t,s)):a.innerHTML=this._getCellText(i),e.cellDate=this._getNextCellData(i)},_getClassNameByDate(e,t){let i=y;return this._isTodayCell(e)&&(i+=" dx-calendar-today"),(this._isDateOutOfRange(e)||this.isDateDisabled(e))&&(i+=` ${x}`),this._isOtherView(e)&&(i+=" dx-calendar-other-view"),this.option("selectionMode")===H&&(0===t&&(i+=" dx-calendar-cell-start-in-row"),t===this.option("colCount")-1&&(i+=" dx-calendar-cell-end-in-row"),this._isStartDayOfMonth(e)&&(i+=" dx-calendar-cell-start"),this._isEndDayOfMonth(e)&&(i+=" dx-calendar-cell-end")),i},_prepareCellTemplateData(e,t,i){const n=e instanceof Date;return{model:{text:n?this._getCellText(e):e,date:n?e:void 0,view:this._getViewName()},container:(0,u.getPublicElement)(i),index:t}},_renderEvents(){this._createCellClickAction(),o.default.off(this._$table,k),o.default.on(this._$table,k,P,(e=>{(0,h.default)(e.currentTarget).hasClass(x)||this._cellClickAction({event:e,value:(0,h.default)(e.currentTarget).data(R)})}));const{selectionMode:e}=this.option();o.default.off(this._$table,M),e===H&&(this._createCellHoverAction(),o.default.on(this._$table,M,P,(e=>{(0,h.default)(e.currentTarget).hasClass(x)||this._cellHoverAction({event:e,value:(0,h.default)(e.currentTarget).data(R)})}))),e!==V&&(this._createWeekNumberCellClickAction(),o.default.on(this._$table,k,`.${b}`,(e=>{const t=(0,h.default)(e.currentTarget).closest("tr"),i=t.find(`.${y}`).first().data(R),n=t.find(`.${y}`).last().data(R),o=[...g.default.getDatesOfInterval(i,n,864e5),n];this._weekNumberCellClickAction({event:e,rowDates:o})})))},_createCellClickAction(){this._cellClickAction=this._createActionByOption("onCellClick")},_createCellHoverAction(){this._cellHoverAction=this._createActionByOption("onCellHover")},_createWeekNumberCellClickAction(){this._weekNumberCellClickAction=this._createActionByOption("onWeekNumberClick")},_createDisabledDatesHandler(){const e=this.option("disabledDates");this._disabledDatesHandler=Array.isArray(e)?this._getDefaultDisabledDatesHandler(e):e||p.noop},_getDefaultDisabledDatesHandler:()=>p.noop,_isTodayCell:C,_isDateOutOfRange:C,isDateDisabled(e){const t={date:e,view:this._getViewName()};return this._disabledDatesHandler(t)},_isOtherView:C,_isStartDayOfMonth:C,_isEndDayOfMonth:C,_getCellText:C,_getFirstCellData:C,_getNextCellData:C,_renderContouredDate(e){if(!this.option("focusStateEnabled"))return;e=e||this.option("contouredDate");const t=this._getContouredCell(),i=this._getCellByDate(e);t.removeClass(O),e&&i.addClass(O)},_getContouredCell(){return this._$table.find(`.${O}`)},_renderValue(){if(!this.option("allowValueSelection"))return;let e=this.option("value");Array.isArray(e)||(e=[e]),this._updateSelectedClass(e)},_updateSelectedClass(e){var t;this._isRangeMode()&&!this._isMonthView()||(null===(t=this._$selectedCells)||void 0===t||t.forEach((e=>{e.removeClass(w)})),this._$selectedCells=e.map((e=>this._getCellByDate(e))),this._$selectedCells.forEach((e=>{e.addClass(w)})))},_renderRange(){var e,t,i,n,o,a,s,r;const{allowValueSelection:l,value:d,range:u}=this.option();l&&this._isRangeMode()&&this._isMonthView()&&(null===(e=this._$rangeCells)||void 0===e||e.forEach((e=>{e.removeClass(S)})),null===(t=this._$hoveredRangeCells)||void 0===t||t.forEach((e=>{e.removeClass(D)})),null===(i=this._$rangeStartHoverCell)||void 0===i||i.removeClass(I),null===(n=this._$rangeEndHoverCell)||void 0===n||n.removeClass(E),null===(o=this._$rangeStartDateCell)||void 0===o||o.removeClass(T),null===(a=this._$rangeEndDateCell)||void 0===a||a.removeClass(A),this._$rangeCells=u.map((e=>this._getCellByDate(e))),this._$rangeStartDateCell=this._getCellByDate(d[0]),this._$rangeEndDateCell=this._getCellByDate(d[1]),this._$rangeCells.forEach((e=>{e.addClass(S)})),null===(s=this._$rangeStartDateCell)||void 0===s||s.addClass(T),null===(r=this._$rangeEndDateCell)||void 0===r||r.addClass(A))},_renderHoveredRange(){var e,t,i,n,o;const{allowValueSelection:a,hoveredRange:s}=this.option();a&&this._isRangeMode()&&this._isMonthView()&&(null===(e=this._$hoveredRangeCells)||void 0===e||e.forEach((e=>{e.removeClass(D)})),null===(t=this._$rangeStartHoverCell)||void 0===t||t.removeClass(I),null===(i=this._$rangeEndHoverCell)||void 0===i||i.removeClass(E),this._$hoveredRangeCells=s.map((e=>this._getCellByDate(e))),this._$rangeStartHoverCell=this._getCellByDate(s[0]),this._$rangeEndHoverCell=this._getCellByDate(s[s.length-1]),this._$hoveredRangeCells.forEach((e=>{e.addClass(D)})),null===(n=this._$rangeStartHoverCell)||void 0===n||n.addClass(I),null===(o=this._$rangeEndHoverCell)||void 0===o||o.addClass(E))},_isMonthView(){return"month"===this.option("zoomLevel")},_isRangeMode(){return this.option("selectionMode")===H},_getCurrentDateFormat:()=>null,getCellAriaLabel(e){const t=this._getViewName(),i=this._isTodayCell(e),n=this._getCurrentDateFormat(),o=n?r.default.format(e,n):this._getCellText(e);return i?`${o}. ${L[t]}`:o},_getFirstAvailableDate(){let e=this.option("date");const t=this.option("min");return e=g.default.getViewFirstCellDate(this._getViewName(),e),new Date(t&&e<t?t:e)},_getCellByDate:C,isBoundary:C,_optionChanged(e){const{name:t,value:i}=e;switch(t){case"value":this._renderValue(),this._updateTableAriaLabel();break;case"range":this._renderRange();break;case"hoveredRange":this._renderHoveredRange();break;case"contouredDate":this._renderContouredDate(i);break;case"onCellClick":this._createCellClickAction();break;case"onCellHover":this._createCellHoverAction();break;case"min":case"max":case"disabledDates":case"cellTemplate":case"selectionMode":this._invalidate();break;case"_todayDate":this._renderBody();break;default:this.callBase(e)}}});t.default=N},82110:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=i(88603),a=k(i(92774)),s=k(i(18278)),r=i(638),l=i(98834),d=k(i(38662)),u=k(i(4671)),c=k(i(92848)),h=k(i(65951)),p=k(i(19427)),g=k(i(64553)),_=i(38699),f=i(17781),m=k(i(41380)),v=k(i(71051)),C=i(52576),y=i(50254),b=i(57653),x=i(11528),w=i(3104),S=k(i(64973)),D=k(i(78694)),I=i(52071),E=k(i(56579)),T=k(i(64357)),A=k(i(43670)),O=k(i(11147)),P=k(i(17350));function k(e){return e&&e.__esModule?e:{default:e}}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},M.apply(null,arguments)}const R="dx-calendar",L="dx-calendar-view",B=250,V=(0,l.addNamespace)(r.end,"dxCalendar"),F={month:3,year:2,decade:1,century:0},H="month",N="year",z="decade",W="century",$={SingleSelection:O.default,MultipleSelection:E.default,RangeSelection:A.default},G=D.default.inherit({_activeStateUnit:".dx-calendar-cell",_getDefaultOptions(){return(0,C.extend)(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,currentDate:new Date,value:null,dateSerializationFormat:void 0,min:new Date(1e3,0),max:new Date(3e3,0),firstDayOfWeek:void 0,viewsCount:1,zoomLevel:H,maxZoomLevel:H,minZoomLevel:W,selectionMode:"single",selectWeekOnClick:!0,showTodayButton:!1,showWeekNumbers:!1,weekNumberRule:"auto",cellTemplate:"cell",disabledDates:null,onCellClick:null,onContouredChanged:null,skipFocusCheck:!1,_todayDate:()=>new Date})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===h.default.real().deviceType&&!h.default.isSimulator(),options:{focusStateEnabled:!0}}])},_supportedKeys(){return(0,C.extend)(this.callBase(),{rightArrow(e){e.preventDefault(),(0,l.isCommandKeyPressed)(e)?this._waitRenderView(1):this._moveCurrentDateByOffset(1*this._getRtlCorrection())},leftArrow(e){e.preventDefault(),(0,l.isCommandKeyPressed)(e)?this._waitRenderView(-1):this._moveCurrentDateByOffset(-1*this._getRtlCorrection())},upArrow(e){if(e.preventDefault(),(0,l.isCommandKeyPressed)(e))this._navigateUp();else{if(n.fx.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(-1*this._view.option("colCount"))}},downArrow(e){if(e.preventDefault(),(0,l.isCommandKeyPressed)(e))this._navigateDown();else{if(n.fx.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(1*this._view.option("colCount"))}},home(e){e.preventDefault();const t=this.option("zoomLevel"),i=this.option("currentDate"),n=this._dateOption("min");if(this._view.isDateDisabled(i))return;const o=m.default.sameView(t,i,n)?n:m.default.getViewFirstCellDate(t,i);this._moveToClosestAvailableDate(o)},end(e){e.preventDefault();const t=this.option("zoomLevel"),i=this.option("currentDate"),n=this._dateOption("max");if(this._view.isDateDisabled(i))return;const o=m.default.sameView(t,i,n)?n:m.default.getViewLastCellDate(t,i);this._moveToClosestAvailableDate(o)},pageUp(e){e.preventDefault(),this._waitRenderView(-1*this._getRtlCorrection())},pageDown(e){e.preventDefault(),this._waitRenderView(1*this._getRtlCorrection())},tab:f.noop,enter:this._enterKeyHandler})},_enterKeyHandler(e){if(this._isMaxZoomLevel()){if(!this._view.isDateDisabled(this.option("currentDate"))){const t=this._updateTimeComponent(this.option("currentDate"));this._selectionStrategy.selectValue(t,e)}}else this._navigateDown()},_getSerializationFormat(e){const t=this.option(e||"value");return this.option("dateSerializationFormat")?this.option("dateSerializationFormat"):(0,x.isNumeric)(t)?"number":(0,x.isString)(t)?v.default.getDateSerializationFormat(t):void 0},_convertToDate:e=>v.default.deserializeDate(e),_dateValue(e,t){if(t){if("keydown"===t.type){const e=this._view._getContouredCell().get(0);t.target=e}this._saveValueChangeEvent(t)}this._dateOption("value",e)},_dateOption(e,t){const i="value"===e&&!this._isSingleMode(),n=this.option("value");if(1===arguments.length)return i?(n??[]).map((e=>this._convertToDate(e))):this._convertToDate(this.option(e));const o=this._getSerializationFormat(e),a=i?(null==t?void 0:t.map((e=>v.default.serializeDate(e,o))))||[]:v.default.serializeDate(t,o);this.option(e,a)},_isSingleMode(){return"single"===this.option("selectionMode")},_shiftDate(e,t,i,n){switch(e){case H:t.setDate(t.getDate()+i*n);break;case N:t.setMonth(t.getMonth()+i*n);break;case z:t.setFullYear(t.getFullYear()+i*n);break;case W:t.setFullYear(t.getFullYear()+10*i*n)}},_moveCurrentDateByOffset(e){const t=this.option("currentDate");let i=new Date(t);const n=this.option("zoomLevel");this._shiftDate(n,i,e,1);const o=this._getMaxDate(),a=this._getMinDate();let s=this._areDatesInNeighborView(n,i,t),r=(0,y.inRange)(i,a,o)&&s;const l=new Date(i);for(;r;){if(!this._view.isDateDisabled(l)){i=l;break}this._shiftDate(n,l,e,1),s=this._areDatesInNeighborView(n,l,t),r=(0,y.inRange)(l,a,o)&&s}if(this._view.isDateDisabled(t)||this._view.isDateDisabled(i)){const t=e>0?1:-1;(1===t?this._isNextViewDisabled():this._isPrevViewDisabled())?this._moveToClosestAvailableDate(i):this._waitRenderView(t)}else this._skipNavigate=!0,this.option("currentDate",i)},_isNextViewDisabled(){return this._navigator._nextButton.option("disabled")},_isPrevViewDisabled(){return this._navigator._prevButton.option("disabled")},_areDatesInSameView(e,t,i){switch(e){case H:return t.getMonth()===i.getMonth();case N:return t.getYear()===i.getYear();case z:return parseInt(t.getYear()/10)===parseInt(i.getYear()/10);case W:return parseInt(t.getYear()/100)===parseInt(i.getYear()/100)}},_areDatesInNeighborView(e,t,i){switch(e){case H:return((e,t)=>{const i=Math.abs(e-t);return Math.min(i,12-i)})(t.getMonth(),i.getMonth())<=1;case N:return Math.abs(t.getYear()-i.getYear())<=1;case z:return Math.abs(t.getYear()-i.getYear())<=10;case W:return Math.abs(t.getYear()-i.getYear())<=100}},_moveToClosestAvailableDate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.option("currentDate"),t=new Date(e);const i=this.option("zoomLevel"),n=!this._isDateNotAvailable(t);let o,a,s=n,r=n;const l=new Date(t),d=new Date(t);do{if(s){t=l;break}if(r){t=d;break}this._shiftDate(i,l,1,1),this._shiftDate(i,d,1,-1),o=this._areDatesInSameView(i,l,e),a=this._areDatesInSameView(i,d,e),s=o&&!this._isDateNotAvailable(l),r=a&&!this._isDateNotAvailable(d)}while(o||a);this.option("currentDate",t)},_isDateNotAvailable(e){const t=this._getMaxDate(),i=this._getMinDate();return!(0,y.inRange)(e,i,t)||this._view.isDateDisabled(e)},_init(){this.callBase(),this._initSelectionStrategy(),this._correctZoomLevel(),this._initCurrentDate(),this._initActions()},_initSelectionStrategy(){const e=this._getSelectionStrategyName(),t=$[e];this._selectionStrategy&&this._selectionStrategy.NAME===e||(this._selectionStrategy=new t(this))},_refreshSelectionStrategy(){this._initSelectionStrategy(),this._selectionStrategy.restoreValue(),this._refresh()},_getSelectionStrategyName(){switch(this.option("selectionMode")){case"multiple":return"MultipleSelection";case"range":return"RangeSelection";default:return"SingleSelection"}},_correctZoomLevel(){const e=this.option("minZoomLevel"),t=this.option("maxZoomLevel"),i=this.option("zoomLevel");F[t]<F[e]||(F[i]>F[t]?this.option("zoomLevel",t):F[i]<F[e]&&this.option("zoomLevel",e))},_initCurrentDate(){const e=this._getNormalizedDate(this._selectionStrategy.getDefaultCurrentDate())??this._getNormalizedDate(this.option("currentDate"));this.option("currentDate",e)},_getNormalizedDate(e){return e=m.default.normalizeDate(e,this._getMinDate(),this._getMaxDate()),(0,x.isDefined)(e)?this._getDate(e):e},_initActions(){this._cellClickAction=this._createActionByOption("onCellClick"),this._onContouredChanged=this._createActionByOption("onContouredChanged")},_initTemplates(){this._templateManager.addDefaultTemplates({cell:new _.FunctionTemplate((e=>{const t=e.model;(0,g.default)(e.container).append((0,g.default)("<span>").text(t&&t.text||String(t)))}))}),this.callBase()},_updateCurrentDate(e){n.fx.isAnimating(this._$viewsWrapper)&&n.fx.stop(this._$viewsWrapper,!0);if(this._getMinDate()>this._getMaxDate())return void this.option("currentDate",new Date);const t=this._getNormalizedDate(e);if(e.getTime()!==t.getTime())return void this.option("currentDate",new Date(t));let i=this._getViewsOffset(this._view.option("date"),t);0!==i&&!this._isMaxZoomLevel()&&this._isOtherViewCellClicked&&(i=0),this._view&&0!==i&&!this._suppressNavigation?this._additionalView?i>2||i<-1?(this._refreshViews(),this._setViewContoured(t),this._updateAriaId(t),this._renderNavigator()):1===i&&this._skipNavigate?(this._setViewContoured(t),this._updateAriaId(t)):this._navigate(i,t):this._navigate(i,t):(this._renderNavigator(),this._setViewContoured(t),this._updateAriaId(t)),this._skipNavigate=!1},_isAdditionalViewDate(e){return!!this._additionalView&&e>=this._additionalView._getFirstAvailableDate()},_getActiveView(e){return this._isAdditionalViewDate(e)?this._additionalView:this._view},_setViewContoured(e){if(this.option("skipFocusCheck")||(0,g.default)(this._$viewsWrapper).is(":focus")){var t;this._view.option("contouredDate",null),null===(t=this._additionalView)||void 0===t||t.option("contouredDate",null);(this._isAdditionalViewDate(e)?this._additionalView:this._view).option("contouredDate",e)}},_getMinDate(){const e=this.option("_rangeMin");return e||(this.min||(this.min=this._dateOption("min")||new Date(1e3,0)),this.min)},_getMaxDate(){const e=this.option("_rangeMax");return e||(this.max||(this.max=this._dateOption("max")||new Date(3e3,0)),this.max)},_getViewsOffset(e,t){const i=this.option("zoomLevel");if(i===H)return this._getMonthsOffset(e,t);let n;switch(i){case W:n=100;break;case z:n=10;break;default:n=1}return parseInt(t.getFullYear()/n)-parseInt(e.getFullYear()/n)},_getMonthsOffset:(e,t)=>12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth()),_waitRenderView(e){if(this._alreadyViewRender)return;this._alreadyViewRender=!0;const t=this._getDateByOffset(e*this._getRtlCorrection());this._moveToClosestAvailableDate(t),this._waitRenderViewTimeout=setTimeout((()=>{this._alreadyViewRender=!1}))},_getRtlCorrection(){return this.option("rtlEnabled")?-1:1},_getDateByOffset(e,t){const i=(t=this._getDate(t??this.option("currentDate"))).getDate(),n=m.default.getDifferenceInMonth(this.option("zoomLevel"))*e;t.setDate(1),t.setMonth(t.getMonth()+n);const o=m.default.getLastMonthDate(t).getDate();return t.setDate(i>o?o:i),t},_focusTarget(){return this._$viewsWrapper},_focusEventTarget(){return this.$element()},_initMarkup(){this._renderSubmitElement();const e=this.$element();e.addClass(R),e.toggleClass("dx-calendar-range","range"===this.option("selectionMode")),this._renderBody(),e.append(this.$body),this._renderViews(),this._renderNavigator(),this.callBase(),this._renderEvents(),e.prepend(this._navigator.$element()),this._renderSwipeable(),this._renderFooter(),this._selectionStrategy.updateAriaSelected(),this._updateAriaId(),this._updateNavigatorLabels(),this.setAria("role","application"),this._updateAriaLabelAndRole(),this._moveToClosestAvailableDate()},_render(){this.callBase(),this._setViewContoured(this.option("currentDate"))},_renderBody(){this._$viewsWrapper||(this.$body=(0,g.default)("<div>").addClass("dx-calendar-body"),this._$viewsWrapper=(0,g.default)("<div>").addClass("dx-calendar-views-wrapper"),this.$body.append(this._$viewsWrapper))},_updateAriaLabelAndRole(){const e=this.option("readOnly"),t=this.$element(),i={role:e?"group":void 0,label:e?u.default.format("dxCalendar-readOnlyLabel"):void 0};this.setAria(i,t)},_setAriaReadonly:f.noop,_getKeyboardListeners(){return this.callBase().concat([this._view])},_renderViews(){this.$element().addClass(`${L}-${this.option("zoomLevel")}`);const{currentDate:e,viewsCount:t}=this.option();if(this.$element().toggleClass("dx-calendar-multiview",t>1),this._view=this._renderSpecificView(e),(0,w.hasWindow)()){const i=this._getDateByOffset(-1,e);this._beforeView=this._isViewAvailable(i)?this._renderSpecificView(i):null;const n=this._getDateByOffset(t,e);n.setDate(1),this._afterView=this._isViewAvailable(n)?this._renderSpecificView(n):null}t>1&&(this._additionalView=this._renderSpecificView(this._getDateByOffset(1,e))),this._translateViews()},_renderSpecificView(e){const{zoomLevel:t}=this.option(),i=P.default[t],n=(0,g.default)("<div>").appendTo(this._$viewsWrapper),o=this._viewConfig(e);return this._createComponent(n,i,o)},_viewConfig(e){let t=this.option("disabledDates");return t=(0,x.isFunction)(t)?this._injectComponent(t.bind(this)):t,M({},this._selectionStrategy.getViewOptions(),{date:e,min:this._getMinDate(),max:this._getMaxDate(),firstDayOfWeek:this.option("firstDayOfWeek")??d.default.firstDayOfWeekIndex(),showWeekNumbers:this.option("showWeekNumbers"),selectWeekOnClick:this.option("selectWeekOnClick"),weekNumberRule:this.option("weekNumberRule"),zoomLevel:this.option("zoomLevel"),tabIndex:void 0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),disabledDates:t,onCellClick:this._cellClickHandler.bind(this),cellTemplate:this._getTemplateByOption("cellTemplate"),allowValueSelection:this._isMaxZoomLevel(),_todayDate:this.option("_todayDate")})},_renderEvents(){a.default.off(this._$viewsWrapper,V),"range"===this.option("selectionMode")&&a.default.on(this._$viewsWrapper,V,null,(()=>{this._updateViewsOption("hoveredRange",[])}))},_injectComponent(e){const t=this;return function(i){return(0,C.extend)(i,{component:t}),e(i)}},_isViewAvailable(e){const t=this.option("zoomLevel"),i=m.default.getViewMinBoundaryDate(t,this._getMinDate()),n=m.default.getViewMaxBoundaryDate(t,this._getMaxDate());return m.default.dateInRange(e,i,n)},_translateViews(){const{viewsCount:e}=this.option();(0,o.move)(this._view.$element(),{left:0,top:0}),this._moveViewElement(this._beforeView,-1),this._moveViewElement(this._afterView,e),this._moveViewElement(this._additionalView,1)},_moveViewElement(e,t){e&&(0,o.move)(e.$element(),{left:this._getViewPosition(t),top:0})},_getViewPosition(e){return 100*e*(this.option("rtlEnabled")?-1:1)+"%"},_cellClickHandler(e){const t=this.option("zoomLevel"),i=m.default.getViewDown(t),n=this._isMaxZoomLevel();if(i&&!n)this._navigateDown(e.event.currentTarget);else{const t=this._updateTimeComponent(e.value);this._selectionStrategy.selectValue(t,e.event),this._cellClickAction(e)}},_updateTimeComponent(e){const t=new Date(e),i=this._dateOption("value");return i&&this._isSingleMode()&&(t.setHours(i.getHours()),t.setMinutes(i.getMinutes()),t.setSeconds(i.getSeconds()),t.setMilliseconds(i.getMilliseconds())),t},_isMaxZoomLevel(){return this.option("zoomLevel")===this.option("maxZoomLevel")},_navigateDown(e){const t=this.option("zoomLevel");if(this._isMaxZoomLevel())return;const i=m.default.getViewDown(t);if(!i)return;let n=this._view.option("contouredDate")||this._view.option("date");e&&(n=(0,g.default)(e).data("dxDateValueKey")),this._isOtherViewCellClicked=!0,this.option("currentDate",n),this.option("zoomLevel",i),this._isOtherViewCellClicked=!1,this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate")))},_renderNavigator(){this._navigator||(this._navigator=new T.default((0,g.default)("<div>"),this._navigatorConfig())),this._navigator.option("text",this._getViewsCaption(this._view,this._additionalView)),this._updateButtonsVisibility()},_navigatorConfig(){const{focusStateEnabled:e,rtlEnabled:t}=this.option();return{text:this._getViewsCaption(this._view,this._additionalView),onClick:this._navigatorClickHandler.bind(this),onCaptionClick:this._navigateUp.bind(this),focusStateEnabled:e,rtlEnabled:t,tabIndex:void 0}},_navigatorClickHandler(e){const{currentDate:t,viewsCount:i}=this.option();let n=e.direction;if(i>1){const e=this._isAdditionalViewDate(t);(e&&n<0||!e&&n>0)&&(n*=2)}const o=this._getDateByOffset(n,t);this._moveToClosestAvailableDate(o)},_navigateUp(){const e=this.option("zoomLevel"),t=m.default.getViewUp(e);t&&!this._isMinZoomLevel(e)&&(this.option("zoomLevel",t),this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate"))))},_isMinZoomLevel(e){const t=this._getMinDate(),i=this._getMaxDate();return m.default.sameView(e,t,i)||this.option("minZoomLevel")===e},_updateButtonsVisibility(){this._navigator.toggleButton("next",!(0,x.isDefined)(this._afterView)),this._navigator.toggleButton("prev",!(0,x.isDefined)(this._beforeView))},_renderSwipeable(){this._swipeable||(this._swipeable=this._createComponent(this.$element(),s.default,{onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._viewWidth.bind(this)}))},_swipeStartHandler(e){n.fx.stop(this._$viewsWrapper,!0);const{viewsCount:t}=this.option();this._toggleGestureCoverCursor("grabbing"),e.event.maxLeftOffset=this._getRequiredView("next")?1/t:0,e.event.maxRightOffset=this._getRequiredView("prev")?1/t:0},_toggleGestureCoverCursor(e){(0,g.default)(".dx-gesture-cover").css("cursor",e)},_getRequiredView(e){let t;const i=this.option("rtlEnabled");return"next"===e?t=i?this._beforeView:this._afterView:"prev"===e&&(t=i?this._afterView:this._beforeView),t},_swipeUpdateHandler(e){const{offset:t}=e.event;(0,o.move)(this._$viewsWrapper,{left:t*this._viewWidth(),top:0}),this._updateNavigatorCaption(t)},_swipeEndHandler(e){this._toggleGestureCoverCursor("auto");const{currentDate:t,rtlEnabled:i}=this.option(),{targetOffset:n}=e.event,o=n?n/Math.abs(n):0,a=this._isAdditionalViewDate(t)&&(i?-1===o:1===o);if(0===o)return void this._animateWrapper(0,B);const s=-o*this._getRtlCorrection()*(a?2:1);let r=this._getDateByOffset(s);this._isDateInInvalidRange(r)&&(r=o>=0?new Date(this._getMinDate()):new Date(this._getMaxDate())),this.option("currentDate",r)},_viewWidth(){return this._viewWidthValue||(this._viewWidthValue=(0,b.getWidth)(this.$element())/this.option("viewsCount")),this._viewWidthValue},_updateNavigatorCaption(e){e*=this._getRtlCorrection();const t=this.option("viewsCount")>1;let i,n;e>.5&&this._beforeView?(i=this._beforeView,n=t&&this._view):e<-.5&&this._afterView?(i=t?this._additionalView:this._afterView,n=t?this._afterView:null):(i=this._view,n=t?this._additionalView:null),this._navigator.option("text",this._getViewsCaption(i,n))},_getViewsCaption(e,t){let i=e.getNavigatorCaption();const{viewsCount:n}=this.option();if(n>1&&t){i=`${i} - ${t.getNavigatorCaption()}`}return i},_isDateInInvalidRange(e){if(this._view.isBoundary(e))return;const t=this._getMinDate(),i=this._getMaxDate(),n=m.default.normalizeDate(e,t,i);return n===t||n===i},_renderFooter(){const e=this.option("showTodayButton");if(e){const e=this._createComponent((0,g.default)("<div>"),S.default,{focusStateEnabled:this.option("focusStateEnabled"),text:u.default.format("dxCalendar-todayButtonText"),onClick:e=>{this._toTodayView(e)},type:(0,I.isFluent)()?"normal":"default",stylingMode:(0,I.isFluent)()?"outlined":"text",integrationOptions:{}}).$element().addClass("dx-calendar-today-button");this._$footer=(0,g.default)("<div>").addClass("dx-calendar-footer").append(e),this.$element().append(this._$footer)}this.$element().toggleClass("dx-calendar-with-footer",e)},_renderSubmitElement(){this._$submitElement=(0,g.default)("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue(e){const t=this._convertToDate(e);this._getSubmitElement().val(v.default.serializeDate(t,"yyyy-MM-dd"))},_getSubmitElement(){return this._$submitElement},_animateShowView(){n.fx.stop(this._view.$element(),!0),this._popAnimationView(this._view,.6,1,B),this.option("viewsCount")>1&&(n.fx.stop(this._additionalView.$element(),!0),this._popAnimationView(this._additionalView,.6,1,B))},_popAnimationView:(e,t,i,o)=>n.fx.animate(e.$element(),{type:"pop",from:{scale:t,opacity:t},to:{scale:i,opacity:i},duration:o}),_navigate(e,t){if(0!==e&&1!==Math.abs(e)&&this._isViewAvailable(t)){const i=this._renderSpecificView(t);e>0?(this._afterView&&this._afterView.$element().remove(),this._afterView=i):(this._beforeView&&this._beforeView.$element().remove(),this._beforeView=i),this._translateViews()}const i=-this._getRtlCorrection()*(e>0?1:e<0?-1:0)*this._viewWidth();this._$viewsWrapper.position().left!==i&&(this._preventViewChangeAnimation?this._wrapperAnimationEndHandler(e,t):this._animateWrapper(i,B).done(this._wrapperAnimationEndHandler.bind(this,e,t)))},_animateWrapper(e,t){return n.fx.animate(this._$viewsWrapper,{type:"slide",from:{left:this._$viewsWrapper.position().left},to:{left:e},duration:t})},_getDate:e=>new Date(e),_toTodayView(e){const t=new Date;this._isMaxZoomLevel()?this._selectionStrategy.selectValue(t,e.event):(this._preventViewChangeAnimation=!0,this.option("zoomLevel",this.option("maxZoomLevel")),this._selectionStrategy.selectValue(t,e.event),this._animateShowView(),this._preventViewChangeAnimation=!1)},_wrapperAnimationEndHandler(e,t){this._rearrangeViews(e),this._translateViews(),this._resetLocation(),this._renderNavigator(),this._setViewContoured(t),this._updateAriaId(t),this._selectionStrategy.updateAriaSelected()},_rearrangeViews(e){var t;if(0===e)return;const{viewsCount:i}=this.option();let n,o,a,s,r;if(e<0?(n=1,o="_beforeView",a="_afterView",s="_view",r=1===i?"_view":"_additionalView"):(n=-1,o="_afterView",a="_beforeView",s=1===i?"_view":"_additionalView",r="_view"),!this[o])return;const l=this[o].option("date");null===(t=this[a])||void 0===t||t.$element().remove(),this[a]=this._renderSpecificView(this._getDateByOffset(n*i,l)),this[r].$element().remove(),1===i?this[r]=this[o]:(this[r]=this[s],this[s]=this[o]);const d=this._getDateByOffset(-n,l);this[o]=this._isViewAvailable(d)?this._renderSpecificView(d):null},_resetLocation(){(0,o.move)(this._$viewsWrapper,{left:0,top:0})},_clean(){this.callBase(),this._clearViewWidthCache(),delete this._$viewsWrapper,delete this._navigator,delete this._$footer},_clearViewWidthCache(){delete this._viewWidthValue},_disposeViews(){this._view.$element().remove(),this._beforeView&&this._beforeView.$element().remove(),this._additionalView&&this._additionalView.$element().remove(),this._afterView&&this._afterView.$element().remove(),delete this._view,delete this._additionalView,delete this._beforeView,delete this._afterView,delete this._skipNavigate},_dispose(){clearTimeout(this._waitRenderViewTimeout),this.callBase()},_refreshViews(){this._resetActiveState(),this._disposeViews(),this._renderViews()},_visibilityChanged(){this._translateViews()},_shouldSkipFocusEvent(e){const{target:t,relatedTarget:i}=e;return(0,g.default)(t).parents(`.${R}`).length&&(0,g.default)(i).parents(`.${R}`).length},_focusInHandler(e){(0,g.default)(e.target).is(this._$viewsWrapper)&&this._setViewContoured(this.option("currentDate")),this._shouldSkipFocusEvent(e)||(this.callBase.apply(this,arguments),this._toggleFocusClass(!0,this.$element()))},_focusOutHandler(e){var t;(0,g.default)(e.target).is(this._$viewsWrapper)&&(this._view.option("contouredDate",null),null===(t=this._additionalView)||void 0===t||t.option("contouredDate",null));this._shouldSkipFocusEvent(e)||(this.callBase.apply(this,arguments),this._toggleFocusClass(!1,this.$element()))},_updateViewsOption(e,t){var i,n,o;this._view.option(e,t),null===(i=this._additionalView)||void 0===i||i.option(e,t),null===(n=this._beforeView)||void 0===n||n.option(e,t),null===(o=this._afterView)||void 0===o||o.option(e,t)},_setViewsMinOption(e){this._restoreViewsMinMaxOptions(),this.option("_rangeMin",this._convertToDate(e)),this._updateViewsOption("min",this._getMinDate())},_setViewsMaxOption(e){this._restoreViewsMinMaxOptions(),this.option("_rangeMax",this._convertToDate(e)),this._updateViewsOption("max",this._getMaxDate())},_restoreViewsMinMaxOptions(){this._resetActiveState(),this.option({_rangeMin:null,_rangeMax:null}),this._updateViewsOption("min",this._getMinDate()),this._updateViewsOption("max",this._getMaxDate())},_updateNavigatorLabels(){let e=this.option("zoomLevel");e=e.charAt(0).toUpperCase()+e.slice(1);const t=this._navigator._caption.option("text"),i=u.default.format(`dxCalendar-previous${e}ButtonLabel`),n=u.default.format(`dxCalendar-caption${e}Label`),o=u.default.format(`dxCalendar-next${e}ButtonLabel`);this.setAria("label",i,this._navigator._prevButton.$element()),this.setAria("label",`${t}. ${n}`,this._navigator._caption.$element()),this.setAria("label",o,this._navigator._nextButton.$element())},_updateAriaSelected(e,t){t.forEach((e=>{this.setAria("selected",!1,this._view._getCellByDate(e))})),e.forEach((e=>{this.setAria("selected",!0,this._view._getCellByDate(e))})),this.option("viewsCount")>1&&(t.forEach((e=>{this.setAria("selected",!1,this._additionalView._getCellByDate(e))})),e.forEach((e=>{this.setAria("selected",!0,this._additionalView._getCellByDate(e))})))},_updateAriaId(e){e=e??this.option("currentDate");const t=`dx-${new p.default}`,i=this._getActiveView(e)._getCellByDate(e);this.setAria("id",t,i),this.setAria("activedescendant",t),this._onContouredChanged(t)},_suppressingNavigation(e,t){this._suppressNavigation=!0,e.apply(this,t),delete this._suppressNavigation},_optionChanged(e){const{value:t,previousValue:i}=e;switch(e.name){case"width":this.callBase(e),this._clearViewWidthCache();break;case"min":case"max":this.min=void 0,this.max=void 0,this._suppressingNavigation(this._updateCurrentDate,[this.option("currentDate")]),this._refreshViews(),this._renderNavigator();break;case"selectionMode":this._refreshSelectionStrategy(),this._initCurrentDate();break;case"selectWeekOnClick":case"_todayDate":case"showWeekNumbers":case"weekNumberRule":this._refreshViews();break;case"firstDayOfWeek":this._refreshViews(),this._updateButtonsVisibility();break;case"focusStateEnabled":case"disabledDates":case"dateSerializationFormat":case"cellTemplate":case"showTodayButton":this._invalidate();break;case"currentDate":this.setAria("id",void 0,this._view._getCellByDate(i)),this._updateCurrentDate(t);break;case"zoomLevel":this.$element().removeClass(`${L}-${i}`),this._correctZoomLevel(),this._refreshViews(),this._renderNavigator(),this._updateAriaId(),this._updateNavigatorLabels();break;case"minZoomLevel":case"maxZoomLevel":this._correctZoomLevel(),this._updateButtonsVisibility();break;case"value":this._selectionStrategy.processValueChanged(t,i),this._setSubmitValue(t),this.callBase(e);break;case"viewsCount":this._refreshViews(),this._renderNavigator();break;case"onCellClick":this._view.option("onCellClick",t);break;case"onContouredChanged":this._onContouredChanged=this._createActionByOption("onContouredChanged");break;case"readOnly":this.callBase(e),this._updateAriaLabelAndRole();break;case"skipFocusCheck":break;default:this.callBase(e)}},getContouredDate(){return this._view.option("contouredDate")}});(0,c.default)("dxCalendar",G);t.default=G},56579:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(68139))&&n.__esModule?n:{default:n};class a extends o.default{constructor(e){super(e),this.NAME="MultiSelection"}getViewOptions(){return{value:this.dateOption("value"),range:[],selectionMode:"multiple",onWeekNumberClick:this._shouldHandleWeekNumberClick()?this._weekNumberClickHandler.bind(this):null}}selectValue(e,t){const i=[...this.dateOption("value")],n=i.findIndex((t=>(null==t?void 0:t.toDateString())===e.toDateString()));n>-1?i.splice(n,1):i.push(e),this.skipNavigate(),this._updateCurrentDate(e),this._currentDateChanged=!0,this.dateValue(i,t)}updateAriaSelected(e,t){e??(e=this.dateOption("value")),t??(t=[]),super.updateAriaSelected(e,t)}getDefaultCurrentDate(){const e=this.dateOption("value").filter((e=>e));return this._getLowestDateInArray(e)}restoreValue(){this.calendar.option("value",[])}_weekNumberClickHandler(e){let{rowDates:t,event:i}=e;const n=t.filter((e=>!this._isDateDisabled(e)));this.dateValue(n,i)}}t.default=a},64357:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(64553)),o=r(i(64973)),a=i(52071),s=r(i(29299));function r(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}class d extends s.default{_getDefaultOptions(){return l({},super._getDefaultOptions(),{onClick:void 0,onCaptionClick:void 0,type:"normal",stylingMode:"outlined",text:""})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,a.isMaterial)(),options:{type:"default",stylingMode:"text"}},{device:()=>(0,a.isFluent)(),options:{type:"normal",stylingMode:"text"}}])}_init(){super._init(),this._initActions()}_initActions(){this._clickAction=this._createActionByOption("onClick"),this._captionClickAction=this._createActionByOption("onCaptionClick")}_initMarkup(){super._initMarkup(),(0,n.default)(this.element()).addClass("dx-calendar-navigator"),this._renderButtons(),this._renderCaption()}_renderButtons(){const{rtlEnabled:e,type:t,stylingMode:i,focusStateEnabled:a}=this.option();this._prevButton=this._createComponent((0,n.default)("<div>"),o.default,{focusStateEnabled:a,icon:e?"chevronright":"chevronleft",onClick:e=>{this._clickAction({direction:-1,event:e})},type:t,stylingMode:i,integrationOptions:{}});const s=(0,n.default)(this._prevButton.element()).addClass("dx-calendar-navigator-previous-view").addClass("dx-calendar-navigator-previous-month");this._nextButton=this._createComponent((0,n.default)("<div>"),o.default,{focusStateEnabled:a,icon:e?"chevronleft":"chevronright",onClick:e=>{this._clickAction({direction:1,event:e})},type:t,stylingMode:i,integrationOptions:{}});const r=(0,n.default)(this._nextButton.element()).addClass("dx-calendar-navigator-next-view").addClass("dx-calendar-navigator-next-month");this._caption=this._createComponent((0,n.default)("<div>").addClass("dx-calendar-caption-button"),o.default,{focusStateEnabled:a,onClick:e=>{this._captionClickAction({event:e})},type:t,stylingMode:i,template:(e,t)=>{const{text:i}=this.option();i.split(" - ").forEach((e=>{(0,n.default)(t).append((0,n.default)("<span>").addClass("dx-button-text").text(e))}))},integrationOptions:{}});const l=this._caption.$element();this.$element().append(s,l,r)}_renderCaption(){var e;null===(e=this._caption)||void 0===e||e.option("text",this.option("text"))}toggleButton(e,t){const i=this[`_${e}Button`];i&&(i.option("disabled",t),i.$element().toggleClass("dx-calendar-disabled-navigator-link",t))}_optionChanged(e){if("text"===e.name)this._renderCaption();else super._optionChanged(e)}}t.default=d},43670:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(i(41380)),o=a(i(68139));function a(e){return e&&e.__esModule?e:{default:e}}class s extends o.default{constructor(e){super(e),this.NAME="RangeSelection"}getViewOptions(){const e=this._getValue();return{value:e,range:this._getDaysInRange(e[0],e[1]),selectionMode:"range",onCellHover:this._cellHoverHandler.bind(this),onWeekNumberClick:this._shouldHandleWeekNumberClick()?this._weekNumberClickHandler.bind(this):null}}selectValue(e,t){const[i,n]=this._getValue();this.skipNavigate(),this._updateCurrentDate(e),this._currentDateChanged=!0,!0===this.calendar.option("_allowChangeSelectionOrder")?(this.calendar._valueSelected=!0,"startDate"===this.calendar.option("_currentSelection")?this.calendar._convertToDate(e)>this.calendar._convertToDate(n)?this.dateValue([e,null],t):this.dateValue([e,n],t):this.calendar._convertToDate(e)>=this.calendar._convertToDate(i)?this.dateValue([i,e],t):this.dateValue([e,null],t)):!i||n?this.dateValue([e,null],t):this.dateValue(i<e?[i,e]:[e,i],t)}updateAriaSelected(e,t){e??(e=this._getValue()),t??(t=[]),super.updateAriaSelected(e,t)}processValueChanged(e,t){super.processValueChanged(e,t);const i=this._getRange();this._updateViewsOption("range",i)}getDefaultCurrentDate(){const{_allowChangeSelectionOrder:e,_currentSelection:t}=this.calendar.option(),i=this.dateOption("value");if(e){if("startDate"===t&&i[0])return i[0];if("endDate"===t&&i[1])return i[1]}const n=i.filter((e=>e));return this._getLowestDateInArray(n)}restoreValue(){this.calendar.option("value",[null,null])}_getValue(){const e=this.dateOption("value");if(!e.length)return e;let[t,i]=e;return t&&i&&t>i&&([t,i]=[i,t]),[t,i]}_getRange(){const[e,t]=this._getValue();return this._getDaysInRange(e,t)}_getDaysInRange(e,t){if(!e||!t)return[];const{currentDate:i,viewsCount:o}=this.calendar.option(),a=this.calendar._isAdditionalViewDate(i),s=n.default.getFirstMonthDate(i,a?-2:-1),r=n.default.getLastMonthDate(i,a?1:o),l=new Date(Math.max(s,e)),d=new Date(Math.min(r,t));return[...n.default.getDatesOfInterval(l,d,864e5),d]}_cellHoverHandler(e){const t=this._isMaxZoomLevel(),[i,n]=this._getValue(),{_allowChangeSelectionOrder:o,_currentSelection:a}=this.calendar.option();if(t){if(!i||n||o&&"startDate"===a){if(i||!n||o&&"endDate"===a){if(i&&n){if("startDate"===a&&e.value<i)return void this._updateViewsOption("hoveredRange",this._getDaysInRange(e.value,i));if("endDate"===a&&e.value>n)return void this._updateViewsOption("hoveredRange",this._getDaysInRange(n,e.value))}}else if(e.value<n)return void this._updateViewsOption("hoveredRange",this._getDaysInRange(e.value,n))}else if(e.value>i)return void this._updateViewsOption("hoveredRange",this._getDaysInRange(i,e.value));this._updateViewsOption("hoveredRange",[])}}_weekNumberClickHandler(e){let{rowDates:t,event:i}=e;const n=t.filter((e=>!this._isDateDisabled(e))),o=n.length?[n[0],n[n.length-1]]:[null,null];this.dateValue(o,i)}}t.default=s},68139:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(41380))&&n.__esModule?n:{default:n},a=i(11528);t.default=class{constructor(e){this.calendar=e}dateOption(e){return this.calendar._dateOption(e)}dateValue(e,t){this.calendar._dateValue(e,t)}skipNavigate(){this.calendar._skipNavigate=!0}updateAriaSelected(e,t){this.calendar._updateAriaSelected(e,t),e[0]&&this.calendar.option("currentDate").getTime()===e[0].getTime()&&this.calendar._updateAriaId(e[0])}processValueChanged(e,t){var i,n;(0,a.isDefined)(e)&&!Array.isArray(e)&&(e=[e]),(0,a.isDefined)(t)&&!Array.isArray(t)&&(t=[t]),e=(null===(i=e)||void 0===i?void 0:i.map((e=>this._convertToDate(e))))||[],t=(null===(n=t)||void 0===n?void 0:n.map((e=>this._convertToDate(e))))||[],this._updateViewsValue(e),this.updateAriaSelected(e,t),this._currentDateChanged||this.calendar._initCurrentDate(),this._currentDateChanged=!1}_isDateDisabled(e){const t=this.calendar._dateOption("min"),i=this.calendar._dateOption("max"),n=(0,a.isDefined)(t)&&e<t&&!o.default.sameDate(t,e),s=(0,a.isDefined)(i)&&e>i&&!o.default.sameDate(i,e);return this.calendar._view.isDateDisabled(e)||n||s}_getLowestDateInArray(e){if(e.length)return new Date(Math.min(...e))}_convertToDate(e){return this.calendar._convertToDate(e)}_isMaxZoomLevel(){return this.calendar._isMaxZoomLevel()}_updateViewsOption(e,t){this.calendar._updateViewsOption(e,t)}_updateViewsValue(e){this._updateViewsOption("value",e)}_updateCurrentDate(e){this.calendar.option("currentDate",e??new Date)}_shouldHandleWeekNumberClick(){const{selectionMode:e,selectWeekOnClick:t}=this.calendar.option();return t&&"single"!==e}}},11147:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(68139))&&n.__esModule?n:{default:n};class a extends o.default{constructor(e){super(e),this.NAME="SingleSelection"}getViewOptions(){return{value:this.dateOption("value"),range:[],selectionMode:"single"}}selectValue(e,t){this.skipNavigate(),this.dateValue(e,t)}updateAriaSelected(e,t){e??(e=[this.dateOption("value")]),t??(t=[]),super.updateAriaSelected(e,t)}getDefaultCurrentDate(){const e=this.dateOption("value");return""===e?new Date:e}restoreValue(){this.calendar.option("value",null)}_updateViewsValue(e){this._updateViewsOption("value",e[0])}}t.default=a},17350:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(i(38662)),o=c(i(64960)),a=c(i(64553)),s=i(17781),r=c(i(41380)),l=c(i(71051)),d=i(52576),u=c(i(15139));function c(e){return e&&e.__esModule?e:{default:e}}const h={month:u.default.inherit({_getViewName:()=>"month",_getCurrentDateFormat:()=>"longdate",_getDefaultOptions(){return(0,d.extend)(this.callBase(),{firstDayOfWeek:0,rowCount:6,colCount:7})},_renderImpl(){this.callBase(),this._renderHeader()},_renderBody(){this.callBase(),this._$table.find(".dx-calendar-other-view").addClass("dx-calendar-other-month")},_renderFocusTarget:s.noop,_renderHeader(){const e=(0,a.default)("<tr>"),t=(0,a.default)("<thead>").append(e);this._$table.prepend(t);for(let t=0,i=this.option("colCount");t<i;t++)this._renderHeaderCell(t,e);this.option("showWeekNumbers")&&this._renderWeekHeaderCell(e)},_renderHeaderCell(e,t){const{firstDayOfWeek:i}=this.option(),{full:n,abbreviated:o}=this._getDayCaption(i+e),s=(0,a.default)("<th>").attr({scope:"col",abbr:n}).text(o);t.append(s)},_renderWeekHeaderCell(e){const t=(0,a.default)("<th>").attr({scope:"col",abbr:"WeekNumber",class:"dx-week-number-header"});e.prepend(t)},_renderWeekNumberCell(e){const{showWeekNumbers:t,cellTemplate:i,selectionMode:n,selectWeekOnClick:s}=this.option();if(!t)return;const r=this._getWeekNumber(e.prevCellDate),l=o.default.createElement("td"),d=(0,a.default)(l);l.className="dx-calendar-week-number-cell","single"!==n&&s&&d.addClass("dx-calendar-week-selection"),i?i.render(this._prepareCellTemplateData(r,-1,d)):l.innerHTML=r,e.row.prepend(l),this.setAria({role:"gridcell",label:`Week ${r}`},d)},_getWeekNumber(e){const{weekNumberRule:t,firstDayOfWeek:i}=this.option();return"auto"===t?r.default.getWeekNumber(e,i,1===i?"firstFourDays":"firstDay"):r.default.getWeekNumber(e,i,t)},getNavigatorCaption(){return n.default.format(this.option("date"),"monthandyear")},_isTodayCell(e){const t=this.option("_todayDate")();return r.default.sameDate(e,t)},_isDateOutOfRange(e){const t=this.option("min"),i=this.option("max");return!r.default.dateInRange(e,t,i,"date")},_isOtherView(e){return e.getMonth()!==this.option("date").getMonth()},_isStartDayOfMonth(e){return r.default.sameDate(e,r.default.getFirstMonthDate(this.option("date")))},_isEndDayOfMonth(e){return r.default.sameDate(e,r.default.getLastMonthDate(this.option("date")))},_getCellText:e=>n.default.format(e,"d"),_getDayCaption(e){const t=e%this.option("colCount");return{full:n.default.getDayNames()[t],abbreviated:n.default.getDayNames("abbreviated")[t]}},_getFirstCellData(){const{firstDayOfWeek:e}=this.option(),t=r.default.getFirstMonthDate(this.option("date"));let i=e-t.getDay();const n=this.option("colCount");return i>=0&&(i-=n),t.setDate(t.getDate()+i),t},_getNextCellData:e=>((e=new Date(e)).setDate(e.getDate()+1),e),_getCellByDate(e){return this._$table.find(`td[data-value='${l.default.serializeDate(e,r.default.getShortDateFormat())}']`)},isBoundary(e){return r.default.sameMonthAndYear(e,this.option("min"))||r.default.sameMonthAndYear(e,this.option("max"))},_getDefaultDisabledDatesHandler:e=>function(t){if(e.some((e=>r.default.sameDate(e,t.date))))return!0}}),year:u.default.inherit({_getViewName:()=>"year",_getCurrentDateFormat:()=>"monthandyear",_isTodayCell(e){const t=this.option("_todayDate")();return r.default.sameMonthAndYear(e,t)},_isDateOutOfRange(e){return!r.default.dateInRange(e,r.default.getFirstMonthDate(this.option("min")),r.default.getLastMonthDate(this.option("max")))},_isOtherView:()=>!1,_isStartDayOfMonth:()=>!1,_isEndDayOfMonth:()=>!1,_getCellText:e=>n.default.getMonthNames("abbreviated")[e.getMonth()],_getFirstCellData(){const e=this.option("date"),t=new Date(e);return t.setDate(1),t.setMonth(0),t},_getNextCellData:e=>((e=new Date(e)).setMonth(e.getMonth()+1),e),_getCellByDate(e){const t=new Date(e);return t.setDate(1),this._$table.find(`td[data-value='${l.default.serializeDate(t,r.default.getShortDateFormat())}']`)},getNavigatorCaption(){return n.default.format(this.option("date"),"yyyy")},isBoundary(e){return r.default.sameYear(e,this.option("min"))||r.default.sameYear(e,this.option("max"))},_renderWeekNumberCell:s.noop}),decade:u.default.inherit({_getViewName:()=>"decade",_isTodayCell(e){const t=this.option("_todayDate")();return r.default.sameYear(e,t)},_isDateOutOfRange(e){const t=this.option("min"),i=this.option("max");return!r.default.dateInRange(e.getFullYear(),t&&t.getFullYear(),i&&i.getFullYear())},_isOtherView(e){const t=new Date(e);return t.setMonth(1),!r.default.sameDecade(t,this.option("date"))},_isStartDayOfMonth:()=>!1,_isEndDayOfMonth:()=>!1,_getCellText:e=>n.default.format(e,"yyyy"),_getFirstCellData(){const e=r.default.getFirstYearInDecade(this.option("date"))-1;return r.default.createDateWithFullYear(e,0,1)},_getNextCellData:e=>((e=new Date(e)).setFullYear(e.getFullYear()+1),e),getNavigatorCaption(){const e=this.option("date"),t=r.default.getFirstYearInDecade(e),i=new Date(e),o=new Date(e);return i.setFullYear(t),o.setFullYear(t+9),`${n.default.format(i,"yyyy")}-${n.default.format(o,"yyyy")}`},_isValueOnCurrentView:(e,t)=>r.default.sameDecade(e,t),_getCellByDate(e){const t=new Date(e);return t.setDate(1),t.setMonth(0),this._$table.find(`td[data-value='${l.default.serializeDate(t,r.default.getShortDateFormat())}']`)},isBoundary(e){return r.default.sameDecade(e,this.option("min"))||r.default.sameDecade(e,this.option("max"))},_renderWeekNumberCell:s.noop}),century:u.default.inherit({_getViewName:()=>"century",_isTodayCell(e){const t=this.option("_todayDate")();return r.default.sameDecade(e,t)},_isDateOutOfRange(e){const t=r.default.getFirstYearInDecade(e),i=r.default.getFirstYearInDecade(this.option("min")),n=r.default.getFirstYearInDecade(this.option("max"));return!r.default.dateInRange(t,i,n)},_isOtherView(e){const t=new Date(e);return t.setMonth(1),!r.default.sameCentury(t,this.option("date"))},_isStartDayOfMonth:()=>!1,_isEndDayOfMonth:()=>!1,_getCellText(e){const t=n.default.format(e,"yyyy"),i=new Date(e);return i.setFullYear(i.getFullYear()+9),`${t} - ${n.default.format(i,"yyyy")}`},_getFirstCellData(){const e=r.default.getFirstDecadeInCentury(this.option("date"))-10;return r.default.createDateWithFullYear(e,0,1)},_getNextCellData:e=>((e=new Date(e)).setFullYear(e.getFullYear()+10),e),_getCellByDate(e){const t=new Date(e);return t.setDate(1),t.setMonth(0),t.setFullYear(r.default.getFirstYearInDecade(t)),this._$table.find(`td[data-value='${l.default.serializeDate(t,r.default.getShortDateFormat())}']`)},getNavigatorCaption(){const e=this.option("date"),t=r.default.getFirstDecadeInCentury(e),i=new Date(e),o=new Date(e);return i.setFullYear(t),o.setFullYear(t+99),`${n.default.format(i,"yyyy")}-${n.default.format(o,"yyyy")}`},isBoundary(e){return r.default.sameCentury(e,this.option("min"))||r.default.sameCentury(e,this.option("max"))},_renderWeekNumberCell:s.noop})};t.default=h},9716:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(4671)),o=s(i(64553)),a=s(i(89275));function s(e){return e&&e.__esModule?e:{default:e}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}class l extends a.default{_getDefaultOptions(){return r({},super._getDefaultOptions(),{items:[]})}_initMarkup(){(0,o.default)(this.element()).addClass("dx-chat-alertlist"),super._initMarkup();const{items:e}=this.option();this._renderItems(e),this._updateAria()}_renderItems(e){null!=e&&e.length&&e.forEach((e=>{this._renderItem(e)}))}_renderItem(e){const t=(0,o.default)("<div>");t.addClass("dx-chat-alertlist-error"),(0,o.default)("<div>").addClass("dx-chat-alertlist-error-icon").appendTo(t),(0,o.default)("<div>").addClass("dx-chat-alertlist-error-text").appendTo(t).text(String((null==e?void 0:e.message)??"")),t.appendTo(this.$element())}_updateAria(){const e={role:"log",atomic:"false",label:n.default.format("dxChat-alertListAriaLabel"),live:"polite",relevant:"additions"};this.setAria(e)}_optionChanged(e){const{name:t}=e;if("items"===t)this._invalidate();else super._optionChanged(e)}}t.default=l},95093:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(4671)),o=r(i(64553)),a=i(11528),s=r(i(89275));function r(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}class d extends s.default{_getDefaultOptions(){return l({},super._getDefaultOptions(),{name:"Unknown User",url:"",alt:""})}_initMarkup(){(0,o.default)(this.element()).addClass("dx-avatar"),super._initMarkup(),this._renderAvatarContent()}_renderAvatarContent(){var e;null===(e=this._$content)||void 0===e||e.remove(),this._isValuableUrl()?this._renderImage():this._renderInitials()}_renderImage(){this._renderImageElement(),this._updateUrl(),this._updateAlt()}_renderInitials(){this._renderInitialsElement(),this._updateInitials()}_renderImageElement(){this._$content=(0,o.default)("<img>").addClass("dx-avatar-image").appendTo(this.element())}_renderInitialsElement(){this._$content=(0,o.default)("<div>").addClass("dx-avatar-initials").appendTo(this.element())}_updateInitials(){var e;const{name:t}=this.option();null===(e=this._$content)||void 0===e||e.text(this._getInitials(t))}_updateUrl(){var e;const{url:t}=this.option();null===(e=this._$content)||void 0===e||e.attr("src",t??"")}_updateAlt(){var e;const{alt:t,name:i}=this.option(),o=t||i||n.default.format("dxAvatar-defaultImageAlt");null===(e=this._$content)||void 0===e||e.attr("alt",o)}_isValuableUrl(){var e;const{url:t}=this.option();return!(null==t||null===(e=t.trim)||void 0===e||!e.call(t))}_getInitials(e){if((0,a.isDefined)(e)){const t=String(e).trim().split(/\s+/);return`${this._getFirstChar(t[0])}${this._getFirstChar(t[1])}`}return""}_getFirstChar(e){return(null==e?void 0:e.charAt(0).toUpperCase())??""}_optionChanged(e){const{name:t}=e;switch(t){case"alt":case"name":case"url":this._renderAvatarContent();break;default:super._optionChanged(e)}}}t.default=d},61454:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(83077),o=p(i(4671)),a=p(i(75990)),s=p(i(92848)),r=p(i(64553)),l=i(11528),d=p(i(89275)),u=p(i(9716)),c=p(i(17252)),h=p(i(51409));function p(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},g.apply(null,arguments)}class _ extends d.default{_getDefaultOptions(){return g({},super._getDefaultOptions(),{showDayHeaders:!0,activeStateEnabled:!0,focusStateEnabled:!0,hoverStateEnabled:!0,items:[],dataSource:null,user:{id:(new n.Guid).toString()},dayHeaderFormat:"shortdate",messageTemplate:null,messageTimestampFormat:"shorttime",alerts:[],showAvatar:!0,showUserName:!0,showMessageTimestamp:!0,typingUsers:[],onMessageEntered:void 0,reloadOnChange:!0,onTypingStart:void 0,onTypingEnd:void 0})}_init(){super._init(),this._initDataController(),this._refreshDataSource(),this._createMessageEnteredAction(),this._createTypingStartAction(),this._createTypingEndAction()}_dataSourceLoadErrorHandler(){this.option("items",[])}_dataSourceChangedHandler(e,t){null!=t&&t.changes?(this._messageList._modifyByChanges(t.changes),this._setOptionWithoutOptionChange("items",e.slice()),this._messageList._setOptionWithoutOptionChange("items",e.slice()),this._messageList._toggleEmptyView()):this.option("items",e.slice())}_dataSourceLoadingChangedHandler(e){var t;null===(t=this._messageList)||void 0===t||t.option("isLoading",e)}_dataSourceOptions(){return{paginate:!1}}_initMarkup(){(0,r.default)(this.element()).addClass("dx-chat"),super._initMarkup(),this._renderMessageList(),this._renderAlertList(),this._renderMessageBox(),this._updateRootAria(),this._updateMessageBoxAria()}_renderMessageList(){const e=(0,r.default)("<div>");this.$element().append(e),this._messageList=this._createComponent(e,h.default,this._getMessageListOptions())}_getMessageListOptions(){const{items:e=[],user:t,showDayHeaders:i=!1,showAvatar:n=!1,showUserName:o=!1,showMessageTimestamp:a=!1,dayHeaderFormat:s,messageTimestampFormat:r,typingUsers:l=[]}=this.option(),d=this._dataController.isLoading();return{items:e,currentUserId:null==t?void 0:t.id,messageTemplate:this._getMessageTemplate(),showDayHeaders:i,showAvatar:n,showUserName:o,showMessageTimestamp:a,dayHeaderFormat:s,messageTimestampFormat:r,typingUsers:l,isLoading:d}}_getMessageTemplate(){const{messageTemplate:e}=this.option();return e?(e,t)=>{this._getTemplateByOption("messageTemplate").render({container:t,model:{component:this,message:e}})}:null}_renderAlertList(){const e=(0,r.default)("<div>");this.$element().append(e);const{alerts:t=[]}=this.option();this._alertList=this._createComponent(e,u.default,{items:t})}_renderMessageBox(){const{activeStateEnabled:e,focusStateEnabled:t,hoverStateEnabled:i}=this.option(),n=(0,r.default)("<div>");this.$element().append(n);const o={activeStateEnabled:e,focusStateEnabled:t,hoverStateEnabled:i,onMessageEntered:e=>{this._messageEnteredHandler(e)},onTypingStart:e=>{this._typingStartHandler(e)},onTypingEnd:()=>{this._typingEndHandler()}};this._messageBox=this._createComponent(n,c.default,o)}_updateRootAria(){const e={role:"group",label:o.default.format("dxChat-elementAriaLabel")};this.setAria(e,this.$element())}_updateMessageBoxAria(){const e=this._messageList.getEmptyViewId();this._messageBox.updateInputAria(e)}_createMessageEnteredAction(){this._messageEnteredAction=this._createActionByOption("onMessageEntered",{excludeValidators:["disabled"]})}_createTypingStartAction(){this._typingStartAction=this._createActionByOption("onTypingStart",{excludeValidators:["disabled"]})}_createTypingEndAction(){this._typingEndAction=this._createActionByOption("onTypingEnd",{excludeValidators:["disabled"]})}_messageEnteredHandler(e){var t;const{text:i,event:n}=e,{user:o}=this.option(),a={timestamp:new Date,author:o,text:i},s=this.getDataSource();(0,l.isDefined)(s)&&s.store().insert(a).done((()=>{const{reloadOnChange:e}=this.option();e&&s.reload()})),null===(t=this._messageEnteredAction)||void 0===t||t.call(this,{message:a,event:n})}_typingStartHandler(e){var t;const{event:i}=e,{user:n}=this.option();null===(t=this._typingStartAction)||void 0===t||t.call(this,{user:n,event:i})}_typingEndHandler(){var e;const{user:t}=this.option();null===(e=this._typingEndAction)||void 0===e||e.call(this,{user:t})}_focusTarget(){return(0,r.default)(this.element()).find(".dx-texteditor-input")}_optionChanged(e){const{name:t,value:i}=e;switch(t){case"activeStateEnabled":case"focusStateEnabled":case"hoverStateEnabled":this._messageBox.option(t,i);break;case"user":{const e=i;this._messageList.option("currentUserId",null==e?void 0:e.id);break}case"items":this._messageList.option(t,i),this._updateMessageBoxAria();break;case"dataSource":this._refreshDataSource();break;case"alerts":this._alertList.option("items",i??[]);break;case"onMessageEntered":this._createMessageEnteredAction();break;case"onTypingStart":this._createTypingStartAction();break;case"onTypingEnd":this._createTypingEndAction();break;case"showDayHeaders":case"showAvatar":case"showUserName":case"showMessageTimestamp":this._messageList.option(t,!!i);break;case"dayHeaderFormat":case"messageTimestampFormat":case"typingUsers":this._messageList.option(t,i);break;case"messageTemplate":this._messageList.option(t,this._getMessageTemplate());break;case"reloadOnChange":break;default:super._optionChanged(e)}}_insertNewItem(e){const{items:t}=this.option(),i=[...t??[],e];this.option("items",i)}renderMessage(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._insertNewItem(e)}}_.include(a.default),(0,s.default)("dxChat",_);t.default=_},17252:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TYPING_END_DELAY=void 0;var n=l(i(4671)),o=l(i(64553)),a=l(i(64973)),s=l(i(22331)),r=l(i(36234));function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}const u=t.TYPING_END_DELAY=2e3;class c extends s.default{_getDefaultOptions(){return d({},super._getDefaultOptions(),{activeStateEnabled:!0,focusStateEnabled:!0,hoverStateEnabled:!0,onMessageEntered:void 0,onTypingStart:void 0,onTypingEnd:void 0})}_init(){super._init(),this._createMessageEnteredAction(),this._createTypingStartAction(),this._createTypingEndAction()}_initMarkup(){(0,o.default)(this.element()).addClass("dx-chat-messagebox"),super._initMarkup(),this._renderTextArea(),this._renderButton()}_renderTextArea(){const{activeStateEnabled:e,focusStateEnabled:t,hoverStateEnabled:i}=this.option(),a=(0,o.default)("<div>").addClass("dx-chat-messagebox-textarea").appendTo(this.element());this._textArea=this._createComponent(a,r.default,{activeStateEnabled:e,focusStateEnabled:t,hoverStateEnabled:i,stylingMode:"outlined",placeholder:n.default.format("dxChat-textareaPlaceholder"),autoResizeEnabled:!0,valueChangeEvent:"input",maxHeight:"8em",onInput:e=>{const t=!this._isValuableTextEntered();this._toggleButtonDisableState(t),this._triggerTypingStartAction(e),this._updateTypingEndTimeout()},onEnterKey:e=>{var t;null!==(t=e.event)&&void 0!==t&&t.shiftKey||this._sendHandler(e)}}),this._textArea.registerKeyHandler("enter",(e=>{!e.shiftKey&&this._isValuableTextEntered()&&e.preventDefault()}))}_renderButton(){const{activeStateEnabled:e,focusStateEnabled:t,hoverStateEnabled:i}=this.option(),s=(0,o.default)("<div>").addClass("dx-chat-messagebox-button").appendTo(this.element());this._button=this._createComponent(s,a.default,{activeStateEnabled:e,focusStateEnabled:t,hoverStateEnabled:i,icon:"sendfilled",type:"default",stylingMode:"text",disabled:!0,elementAttr:{"aria-label":n.default.format("dxChat-sendButtonAriaLabel")},onClick:e=>{this._sendHandler(e)}})}_createMessageEnteredAction(){this._messageEnteredAction=this._createActionByOption("onMessageEntered",{excludeValidators:["disabled"]})}_createTypingStartAction(){this._typingStartAction=this._createActionByOption("onTypingStart",{excludeValidators:["disabled"]})}_createTypingEndAction(){this._typingEndAction=this._createActionByOption("onTypingEnd",{excludeValidators:["disabled"]})}_triggerTypingStartAction(e){var t;this._typingEndTimeoutId||(null===(t=this._typingStartAction)||void 0===t||t.call(this,{event:e.event}))}_updateTypingEndTimeout(){clearTimeout(this._typingEndTimeoutId),this._typingEndTimeoutId=setTimeout((()=>{var e;null===(e=this._typingEndAction)||void 0===e||e.call(this),this._clearTypingEndTimeout()}),u)}_clearTypingEndTimeout(){clearTimeout(this._typingEndTimeoutId),this._typingEndTimeoutId=void 0}_sendHandler(e){var t,i;if(!this._isValuableTextEntered())return;this._clearTypingEndTimeout(),null===(t=this._typingEndAction)||void 0===t||t.call(this);const{text:n}=this._textArea.option();this._textArea.reset(),this._toggleButtonDisableState(!0),null===(i=this._messageEnteredAction)||void 0===i||i.call(this,{text:n,event:e.event})}_toggleButtonDisableState(e){this._button.option("disabled",e)}_isValuableTextEntered(){const{text:e}=this._textArea.option();return!(null==e||!e.trim())}_optionChanged(e){const{name:t,value:i}=e;switch(t){case"activeStateEnabled":case"focusStateEnabled":case"hoverStateEnabled":this._button.option(t,i),this._textArea.option(t,i);break;case"onMessageEntered":this._createMessageEnteredAction();break;case"onTypingStart":this._createTypingStartAction();break;case"onTypingEnd":this._createTypingEndAction();break;default:super._optionChanged(e)}}_clean(){this._clearTypingEndTimeout(),super._clean()}updateInputAria(e){this._textArea.option({inputAttr:{"aria-labelledby":e}})}}t.default=c},1243:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CHAT_MESSAGEBUBBLE_CLASS=void 0;var n=i(61404),o=s(i(64553)),a=s(i(89275));function s(e){return e&&e.__esModule?e:{default:e}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}const l=t.CHAT_MESSAGEBUBBLE_CLASS="dx-chat-messagebubble",d="dx-chat-messagebubble-content";class u extends a.default{_getDefaultOptions(){return r({},super._getDefaultOptions(),{text:"",template:null})}_initMarkup(){const e=(0,o.default)(this.element());e.addClass(l),(0,o.default)("<div>").addClass(d).appendTo(e),super._initMarkup(),this._updateContent()}_updateContent(){const{text:e="",template:t}=this.option(),i=(0,o.default)(this.element()).find(`.${d}`);i.empty(),t?t(e,(0,n.getPublicElement)(i)):i.text(e)}_optionChanged(e){const{name:t}=e;switch(t){case"text":case"template":this._updateContent();break;default:super._optionChanged(e)}}}t.default=u},97806:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MESSAGE_DATA_KEY=t.CHAT_MESSAGEGROUP_CLASS=t.CHAT_MESSAGEGROUP_ALIGNMENT_START_CLASS=t.CHAT_MESSAGEGROUP_ALIGNMENT_END_CLASS=void 0;var n=c(i(38662)),o=c(i(4671)),a=c(i(64553)),s=c(i(71051)),r=i(11528),l=c(i(89275)),d=c(i(95093)),u=c(i(1243));function c(e){return e&&e.__esModule?e:{default:e}}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},h.apply(null,arguments)}const p=t.MESSAGE_DATA_KEY="dxMessageData",g=t.CHAT_MESSAGEGROUP_CLASS="dx-chat-messagegroup",_=t.CHAT_MESSAGEGROUP_ALIGNMENT_START_CLASS="dx-chat-messagegroup-alignment-start",f=t.CHAT_MESSAGEGROUP_ALIGNMENT_END_CLASS="dx-chat-messagegroup-alignment-end";class m extends l.default{_getDefaultOptions(){return h({},super._getDefaultOptions(),{items:[],alignment:"start",showAvatar:!0,showUserName:!0,showMessageTimestamp:!0,messageTemplate:null,messageTimestampFormat:"shorttime"})}_updateAlignmentClass(){const{alignment:e}=this.option();(0,a.default)(this.element()).removeClass(_).removeClass(f);const t="start"===e?_:f;(0,a.default)(this.element()).addClass(t)}_initMarkup(){const{alignment:e,items:t,showAvatar:i}=this.option();(0,a.default)(this.element()).addClass(g),this._updateAlignmentClass(),super._initMarkup(),0!==t.length&&(i&&"start"===e&&this._renderAvatar(),this._renderMessageGroupInformation(null==t?void 0:t[0]),this._renderMessageBubbles(t))}_renderAvatar(){const e=(0,a.default)("<div>").appendTo(this.element()),{items:t}=this.option(),{author:i}=t[0],n=null==i?void 0:i.name,o=null==i?void 0:i.avatarUrl,s=null==i?void 0:i.avatarAlt;this._avatar=this._createComponent(e,d.default,{name:n,url:o,alt:s})}_renderMessageBubble(e){const t=(0,a.default)("<div>").data(p,e);this._createComponent(t,u.default,this._getMessageBubbleOptions(e)),this._$messageBubbleContainer.append(t)}_getMessageBubbleOptions(e){const t={text:e.text},{messageTemplate:i}=this.option();return i&&(t.template=(t,n)=>{i(h({},e,{text:t}),n)}),t}_renderMessageBubbles(e){this._$messageBubbleContainer=(0,a.default)("<div>").addClass("dx-chat-messagegroup-content"),e.forEach((e=>{this._renderMessageBubble(e)})),this._$messageBubbleContainer.appendTo(this.element())}_renderMessageGroupInformation(e){const{alignment:t,showUserName:i,showMessageTimestamp:n}=this.option(),{timestamp:s,author:r}=e,l=(0,a.default)("<div>").addClass("dx-chat-messagegroup-information");if(i){const e=(null==r?void 0:r.name)??o.default.format("dxChat-defaultUserName"),i="start"===t?e:"";(0,a.default)("<div>").addClass("dx-chat-messagegroup-author-name").text(i).appendTo(l)}if(n){const e=(0,a.default)("<div>").addClass("dx-chat-messagegroup-time").appendTo(l);if(this._shouldAddTimeValue(s)){const t=this._getTimeValue(s);e.text(t)}}l.appendTo(this.element())}_shouldAddTimeValue(e){const t=s.default.deserializeDate(e);return(0,r.isDate)(t)&&!isNaN(t.getTime())}_getTimeValue(e){const t=s.default.deserializeDate(e),{messageTimestampFormat:i}=this.option();return n.default.format(t,i)}_clean(){this._lastBubble=null,super._clean()}_optionChanged(e){const{name:t}=e;switch(t){case"items":case"alignment":case"showAvatar":case"showUserName":case"showMessageTimestamp":case"messageTemplate":case"messageTimestampFormat":this._invalidate();break;default:super._optionChanged(e)}}renderMessage(e){const{items:t}=this.option(),i=[...t,e];this._setOptionWithoutOptionChange("items",i),this._renderMessageBubble(e)}}t.default=m},51409:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MESSAGEGROUP_TIMEOUT=void 0;var n=i(83077),o=w(i(38662)),a=w(i(4671)),s=w(i(64553)),r=w(i(11787)),l=i(17781),d=w(i(41380)),u=w(i(71051)),c=i(86858),h=i(57653),p=i(11528),g=w(i(91374)),_=w(i(89275)),f=i(27104),m=i(49291),v=x(i(1243)),C=x(i(97806)),y=w(i(85134));function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(b=function(e){return e?i:t})(e)}function x(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=b(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}function w(e){return e&&e.__esModule?e:{default:e}}function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},S.apply(null,arguments)}const D="dx-chat-messagelist-empty-loading",I="dx-chat-messagelist-empty-view",E="dx-chat-messagelist-day-header",T="dx-chat-last-messagegroup-alignment-start",A="dx-chat-last-messagegroup-alignment-end",O=t.MESSAGEGROUP_TIMEOUT=3e5;class P extends _.default{_getDefaultOptions(){return S({},super._getDefaultOptions(),{items:[],currentUserId:"",showDayHeaders:!0,dayHeaderFormat:"shortdate",messageTimestampFormat:"shorttime",typingUsers:[],isLoading:!1,showAvatar:!0,showUserName:!0,showMessageTimestamp:!0,messageTemplate:null})}_init(){super._init(),this._lastMessageDate=null}_initMarkup(){(0,s.default)(this.element()).addClass("dx-chat-messagelist"),super._initMarkup(),this._renderScrollView(),this._renderMessageListContent(),this._toggleEmptyView(),this._renderMessageGroups(),this._renderTypingIndicator(),this._updateAria(),this._scrollDownContent()}_renderContentImpl(){super._renderContentImpl(),this._attachResizeObserverSubscription()}_attachResizeObserverSubscription(){const e=this.$element().get(0);r.default.unobserve(e),r.default.observe(e,(e=>this._resizeHandler(e)))}_resizeHandler(e){let{contentRect:t,target:i}=e;if(!(0,c.isElementInDom)((0,s.default)(i))||!(0,m.isElementVisible)(i))return;const n=!(0,p.isDefined)(this._containerClientHeight),o=t.height;if(n)this._scrollDownContent();else{const e=this._containerClientHeight-o,t=e>0;let i=this._scrollView.scrollTop();t&&(i+=e,this._scrollView.scrollTo({top:i}))}this._containerClientHeight=o}_renderEmptyViewContent(){const e=(0,s.default)("<div>").addClass(I).attr("id",`dx-${new n.Guid}`);(0,s.default)("<div>").appendTo(e).addClass("dx-chat-messagelist-empty-image");const t=a.default.format("dxChat-emptyListMessage");(0,s.default)("<div>").appendTo(e).addClass("dx-chat-messagelist-empty-message").text(t);const i=a.default.format("dxChat-emptyListPrompt");(0,s.default)("<div>").appendTo(e).addClass("dx-chat-messagelist-empty-prompt").text(i),e.appendTo(this._$content)}_renderTypingIndicator(){const{typingUsers:e}=this.option(),t=(0,s.default)("<div>").appendTo(this._$scrollViewContent());this._typingIndicator=this._createComponent(t,y.default,{typingUsers:e})}_isEmpty(){const{items:e}=this.option();return 0===e.length}_isCurrentUser(e){const{currentUserId:t}=this.option();return t===e}_messageGroupAlignment(e){return this._isCurrentUser(e)?"end":"start"}_createMessageGroupComponent(e,t){const{showAvatar:i,showUserName:n,showMessageTimestamp:o,messageTemplate:a,messageTimestampFormat:r}=this.option(),l=(0,s.default)("<div>").appendTo(this._$content);this._createComponent(l,C.default,{items:e,alignment:this._messageGroupAlignment(t),showAvatar:i,showUserName:n,showMessageTimestamp:o,messageTemplate:a,messageTimestampFormat:r})}_renderScrollView(){const e=(0,s.default)("<div>").appendTo(this.$element());this._scrollView=this._createComponent(e,g.default,{useKeyboard:!1,bounceEnabled:!1,reachBottomText:"",indicateLoading:!1,onReachBottom:l.noop})}_shouldAddDayHeader(e){const{showDayHeaders:t}=this.option();if(!t)return!1;const i=u.default.deserializeDate(e);return!(!(0,p.isDate)(i)||isNaN(i.getTime()))&&!d.default.sameDate(this._lastMessageDate,i)}_createDayHeader(e){const t=u.default.deserializeDate(e),i=new Date,n=new Date((new Date).setDate(i.getDate()-1)),{dayHeaderFormat:r}=this.option();this._lastMessageDate=t;let l=o.default.format(t,r);d.default.sameDate(t,i)&&(l=`${a.default.format("Today")} ${l}`),d.default.sameDate(t,n)&&(l=`${a.default.format("Yesterday")} ${l}`),(0,s.default)("<div>").addClass(E).text(l).appendTo(this._$content)}_updateLoadingState(e){this._scrollView&&(this.$element().toggleClass(D,this._isEmpty()&&e),this._scrollView.release(!e))}_renderMessageListContent(){this._$content=(0,s.default)("<div>").addClass("dx-chat-messagelist-content").appendTo(this._$scrollViewContent())}_toggleEmptyView(){this._getEmptyView().remove();const{isLoading:e}=this.option();this.$element().toggleClass("dx-chat-messagelist-empty",this._isEmpty()&&!e).toggleClass(D,this._isEmpty()&&e),this._isEmpty()&&!e&&(this._renderEmptyViewContent(),this._updateLoadingState(!1))}_renderMessageGroups(){var e;const{isLoading:t,items:i}=this.option();if(this._isEmpty()&&!t)return;let n=null===(e=i[0])||void 0===e||null===(e=e.author)||void 0===e?void 0:e.id,o=[];i.forEach(((e,t)=>{var a;const s=e??{},r=null===(a=s.author)||void 0===a?void 0:a.id,l=this._shouldAddDayHeader(s.timestamp),d=this._isTimeoutExceeded(o[o.length-1]??{},e);l&&o.length||d||r!==n?(this._createMessageGroupComponent(o,n),n=r,o=[],o.push(s)):o.push(s),l&&this._createDayHeader(null==e?void 0:e.timestamp),i.length-1===t&&this._createMessageGroupComponent(o,n)})),this._setLastMessageGroupClasses(),this._updateLoadingState(t)}_setLastMessageGroupClasses(){this._$content.find(`.${T}`).removeClass(T),this._$content.find(`.${A}`).removeClass(A);const e=this._$content.find(`.${C.CHAT_MESSAGEGROUP_ALIGNMENT_START_CLASS}`).last(),t=this._$content.find(`.${C.CHAT_MESSAGEGROUP_ALIGNMENT_END_CLASS}`).last();e.addClass(T),t.addClass(A)}_getLastMessageGroup(){const e=this._$content.find(`.${C.CHAT_MESSAGEGROUP_CLASS}`).last();if(e.length)return C.default.getInstance(e)}_renderMessage(e){const{timestamp:t}=e;if(this._shouldAddDayHeader(t))return this._createDayHeader(t),void this._renderMessageIntoGroup(e);const i=this._getLastMessageGroup();if(!i)return void this._renderMessageIntoGroup(e);const n=this._getLastMessageGroupItem(i),o=this._isTimeoutExceeded(n,e);!this._isSameAuthor(e,n)||o?this._renderMessageIntoGroup(e):this._renderMessageIntoGroup(e,i)}_getLastMessageGroupItem(e){const{items:t}=e.option();return t[t.length-1]}_isSameAuthor(e,t){var i,n;return(null===(i=e.author)||void 0===i?void 0:i.id)===(null===(n=t.author)||void 0===n?void 0:n.id)}_renderMessageIntoGroup(e,t){const{author:i}=e;this._setIsReachedBottom(),t?t.renderMessage(e):(this._createMessageGroupComponent([e],null==i?void 0:i.id),this._setLastMessageGroupClasses()),this._processScrollDownContent(this._isCurrentUser(null==i?void 0:i.id))}_getMessageData(e){return(0,s.default)(e).data(C.MESSAGE_DATA_KEY)}_findMessageElementByKey(e){const t=this.$element().find(`.${v.CHAT_MESSAGEBUBBLE_CLASS}`);let i=(0,s.default)();return t.each(((t,n)=>this._getMessageData(n).id!==e||(i=(0,s.default)(n),!1))),i}_updateMessageByKey(e,t){if(e){const i=this._findMessageElementByKey(e);v.default.getInstance(i).option("text",t.text)}}_removeMessageByKey(e){if(!e)return;const t=this._findMessageElementByKey(e);if(!t.length)return;const i=t.closest(`.${C.CHAT_MESSAGEGROUP_CLASS}`),n=C.default.getInstance(i),{items:o}=n.option(),a=o.filter((t=>t.id!==e));if(0===a.length){const{showDayHeaders:e}=this.option();if(e){const e=n.$element().prev(),t=n.$element().next();e.length&&e.hasClass(E)&&(t.length&&t.hasClass(E)||!t.length)&&e.remove()}n.$element().remove()}else n.option("items",a);this._setLastMessageGroupClasses()}_scrollDownContent(){this._scrollView.scrollTo({top:(0,f.getScrollTopMax)(this._scrollableContainer())})}_scrollableContainer(){return(0,s.default)(this._scrollView.element()).find(".dx-scrollable-container").get(0)}_isMessageAddedToEnd(e,t){const i=e.length,n=t.length;if(0===i)return!1;if(0===n)return 1===i;return e[i-1]!==t[n-1]&&i-n==1}_processItemsUpdating(e,t){if(!this._isMessageAddedToEnd(e,t))this._invalidate();else{this._toggleEmptyView();const t=e[e.length-1];this._renderMessage(t??{})}}_isTimeoutExceeded(e,t){const i=null==e?void 0:e.timestamp,n=null==t?void 0:t.timestamp;if(!i||!n)return!1;const o=u.default.deserializeDate(i);return u.default.deserializeDate(n)-o>O}_updateAria(){const e={role:"log",atomic:"false",label:a.default.format("dxChat-messageListAriaLabel"),live:"polite",relevant:"additions text"};this.setAria(e)}_setIsReachedBottom(){this._isBottomReached=!this._isContentOverflowing()||this._scrollView.isBottomReached()}_isContentOverflowing(){return(0,h.getHeight)(this._scrollView.content())>(0,h.getHeight)(this._scrollView.container())}_processScrollDownContent(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(this._isBottomReached||e)&&this._scrollDownContent(),this._isBottomReached=!1}_$scrollViewContent(){return(0,s.default)(this._scrollView.content())}_getEmptyView(){return this._$content.find(`.${I}`)}_clean(){this._lastMessageDate=null,super._clean()}_modifyByChanges(e){e.forEach((e=>{switch(e.type){case"update":this._updateMessageByKey(e.key,e.data??{});break;case"insert":{const{items:t}=this.option();this.option("items",[...t,e.data??{}]);break}case"remove":this._removeMessageByKey(e.key)}}))}_optionChanged(e){const{name:t,value:i,previousValue:n}=e;switch(t){case"currentUserId":case"showDayHeaders":case"showAvatar":case"showUserName":case"showMessageTimestamp":case"messageTemplate":case"dayHeaderFormat":case"messageTimestampFormat":this._invalidate();break;case"items":this._processItemsUpdating(i??[],n??[]);break;case"typingUsers":this._setIsReachedBottom(),this._typingIndicator.option(t,i),this._processScrollDownContent();break;case"isLoading":this._updateLoadingState(!!i);break;default:super._optionChanged(e)}}getEmptyViewId(){if(this._isEmpty()){return this._getEmptyView().attr("id")??null}return null}}t.default=P},85134:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(4671)),o=s(i(64553)),a=s(i(22331));function s(e){return e&&e.__esModule?e:{default:e}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}class l extends a.default{_getDefaultOptions(){return r({},super._getDefaultOptions(),{typingUsers:[]})}_init(){super._init(),(0,o.default)(this.element()).addClass("dx-chat-typingindicator")}_initMarkup(){super._initMarkup();const{typingUsers:e}=this.option();null!=e&&e.length&&this._renderContent()}_renderContent(){this._renderContentElement(),this._renderTextElement(),this._updateText(),this._renderBubble()}_renderContentElement(){this._$content=(0,o.default)("<div>").addClass("dx-chat-typingindicator-content").appendTo(this.element())}_renderTextElement(){this._$content&&(this._$text=(0,o.default)("<div>").addClass("dx-chat-typingindicator-text").appendTo(this._$content))}_renderBubble(){if(this._$content){const e=(0,o.default)("<div>").addClass("dx-chat-typingindicator-bubble");new Array(3).fill(0).forEach((()=>{(0,o.default)("<div>").addClass("dx-chat-typingindicator-circle").appendTo(e)})),e.appendTo(this._$content)}}_getText(){const{typingUsers:e}=this.option(),t=null==e?void 0:e.map((e=>{var t;return(null===(t=e.name)||void 0===t?void 0:t.trim())||n.default.format("dxChat-defaultUserName")}));if(1===(null==t?void 0:t.length)){const e=t[0];return n.default.format("dxChat-typingMessageSingleUser",e)}if(2===(null==t?void 0:t.length)){const[e,i]=t;return n.default.format("dxChat-typingMessageTwoUsers",e,i)}if(3===(null==t?void 0:t.length)){const[e,i,o]=t;return n.default.format("dxChat-typingMessageThreeUsers",e,i,o)}const i=t.slice(0,3).join(", ");return n.default.format("dxChat-typingMessageMultipleUsers",i)}_updateText(){var e;const t=this._getText();null===(e=this._$text)||void 0===e||e.text(t)}_processTypingUsersUpdating(e){const{typingUsers:t}=this.option();null!=e&&e.length&&null!=t&&t.length?this._updateText():null!=t&&t.length?this._renderContent():this._cleanContent()}_cleanContent(){this.$element().empty()}_optionChanged(e){const{name:t,previousValue:i}=e;if("typingUsers"===t)this._processTypingUsersUpdating(i??[]);else super._optionChanged(e)}}t.default=l},54516:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultCheckBoxProps=t.CheckBox=void 0,t.defaultOptions=function(e){_.push(e),g.defaultProps=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(g.defaultProps),Object.getOwnPropertyDescriptors(function(e){const t=["value"];return Object.keys(e).reduce(((i,n)=>{const o=e[n];return i[t.some((e=>e===n))?`default${n.charAt(0).toUpperCase()}${n.slice(1)}`:n]=o,i}),{})}((0,r.convertRulesToOptions)(_)))))};var n,o=i(81167),a=i(49714),s=(n=i(65951))&&n.__esModule?n:{default:n},r=i(53904),l=i(46190),d=i(11186),u=i(33453);const c=["accessKey","activeStateEnabled","aria","className","classes","defaultValue","disabled","enableThreeStateBehavior","focusStateEnabled","height","hint","hoverStateEnabled","iconSize","inputAttr","isDirty","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","saveValueChangeEvent","tabIndex","text","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","visible","width"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},h.apply(null,arguments)}const p=t.defaultCheckBoxProps=h({},u.defaultEditorProps,{text:"",enableThreeStateBehavior:!1,activeStateEnabled:!0,hoverStateEnabled:!0,get focusStateEnabled(){return"desktop"===s.default.real().deviceType&&!s.default.isSimulator()},defaultValue:!1,valueChange:()=>{}});class g extends a.InfernoWrapperComponent{constructor(e){super(e),this.editorRef=(0,o.createRef)(),this.state={value:void 0!==this.props.value?this.props.value:this.props.defaultValue},this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.onWidgetClick=this.onWidgetClick.bind(this),this.keyDown=this.keyDown.bind(this)}createEffects(){return[(0,a.createReRenderEffect)()]}onWidgetClick(e){const{enableThreeStateBehavior:t,readOnly:i,saveValueChangeEvent:n}=this.props;if(!i)if(null==n||n(e),t){var o,a;let e;this.setState((t=>(e=null===(void 0!==this.props.value?this.props.value:t.value)||!(void 0!==this.props.value?this.props.value:t.value)&&null,{value:e}))),null===(o=(a=this.props).valueChange)||void 0===o||o.call(a,e)}else{var s,r;let e;this.setState((t=>(e=!(void 0!==this.props.value?this.props.value:t.value),{value:e}))),null===(s=(r=this.props).valueChange)||void 0===s||s.call(r,e)}}keyDown(e){const{onKeyDown:t}=this.props,{keyName:i,originalEvent:n,which:o}=e,a=null==t?void 0:t(e);if(null!=a&&a.cancel)return a;"space"!==i&&"space"!==o||(n.preventDefault(),this.onWidgetClick(n))}get cssClasses(){return(e=>{const{text:t,value:i}=e,n={"dx-checkbox":!0,"dx-checkbox-checked":!0===i,"dx-checkbox-has-text":!!t,"dx-checkbox-indeterminate":null===i};return(0,l.combineClasses)(n)})(h({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value}))}get aria(){const e=!0===(void 0!==this.props.value?this.props.value:this.state.value);return h({},{role:"checkbox",checked:null===(void 0!==this.props.value?this.props.value:this.state.value)?"mixed":`${e}`},this.props.aria)}get restAttributes(){const e=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(this.props,c);return e}focus(){this.editorRef.current.focus()}blur(){this.editorRef.current.blur()}render(){const e=void 0!==this.props.value?this.props.value:this.state.value;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,u.Editor,h({aria:this.aria,classes:this.cssClasses,onClick:this.onWidgetClick,onKeyDown:this.keyDown,accessKey:this.props.accessKey,activeStateEnabled:this.props.activeStateEnabled,focusStateEnabled:this.props.focusStateEnabled,hoverStateEnabled:this.props.hoverStateEnabled,className:this.props.className,disabled:this.props.disabled,readOnly:this.props.readOnly,hint:this.props.hint,height:this.props.height,width:this.props.width,rtlEnabled:this.props.rtlEnabled,tabIndex:this.props.tabIndex,visible:this.props.visible,validationError:this.props.validationError,validationErrors:this.props.validationErrors,validationMessageMode:this.props.validationMessageMode,validationMessagePosition:this.props.validationMessagePosition,validationStatus:this.props.validationStatus,isValid:this.props.isValid,onFocusIn:this.props.onFocusIn},this.restAttributes,{children:(0,o.createFragment)([(0,o.normalizeProps)((0,o.createVNode)(64,"input",null,null,1,h({type:"hidden",value:`${e}`},this.props.name&&{name:this.props.name}))),(0,o.createVNode)(1,"div","dx-checkbox-container",[(0,o.createComponentVNode)(2,d.CheckBoxIcon,{size:this.props.iconSize,isChecked:!0===e}),this.props.text&&(0,o.createVNode)(1,"span","dx-checkbox-text",this.props.text,0)],0)],4)}),null,this.editorRef))}}t.CheckBox=g,g.defaultProps=p;const _=[]},11186:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultCheckBoxIconProps=t.CheckBoxIcon=void 0;var n=i(81167);i(52071);var o=i(49714),a=i(58515);const s=["size"];const r=t.defaultCheckBoxIconProps={};class l extends o.BaseInfernoComponent{constructor(e){super(e),this.state={},this.elementRef=(0,n.createRef)(),this.__getterCache={}}get cssStyles(){return void 0!==this.__getterCache.cssStyles?this.__getterCache.cssStyles:this.__getterCache.cssStyles=(()=>{const{size:e}=this.props;return{fontSize:(0,a.normalizeStyleProp)("fontSize",e)}})()}get restAttributes(){return function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(this.props,s)}componentWillUpdate(e){this.props.size!==e.size&&(this.__getterCache.cssStyles=void 0)}render(){const{elementRef:e,cssStyles:t}=this;return(0,n.createVNode)(1,"span","dx-checkbox-icon",null,1,{style:(0,o.normalizeStyles)(t)},null,e)}}t.CheckBoxIcon=l,l.defaultProps=r},33453:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultEditorProps=t.Editor=void 0,t.defaultOptions=function(e){_.push(e),g.defaultProps=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(g.defaultProps),Object.getOwnPropertyDescriptors(function(e){const t=["value"];return Object.keys(e).reduce(((i,n)=>{const o=e[n];return i[t.some((e=>e===n))?`default${n.charAt(0).toUpperCase()}${n.slice(1)}`:n]=o,i}),{})}((0,r.convertRulesToOptions)(_)))))};var n,o=i(81167),a=i(49714),s=(n=i(19427))&&n.__esModule?n:{default:n},r=i(53904),l=i(93796),d=i(46190),u=i(91568);const c=["accessKey","activeStateEnabled","aria","children","className","classes","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","inputAttr","isDirty","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","tabIndex","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","visible","width"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},h.apply(null,arguments)}const p=t.defaultEditorProps=h({},l.WidgetDefaultProps,{readOnly:!1,name:"",validationError:null,validationErrors:null,validationMessageMode:"auto",validationMessagePosition:"bottom",validationStatus:"valid",isValid:!0,isDirty:!1,inputAttr:{},defaultValue:null,valueChange:()=>{}});class g extends a.InfernoWrapperComponent{constructor(e){super(e),this.state={},this.widgetRef=(0,o.createRef)(),this.rootElementRef=(0,o.createRef)(),this.__getterCache={},this.state={validationMessageGuid:`dx-${new s.default}`,isValidationMessageVisible:!1,value:void 0!==this.props.value?this.props.value:this.props.defaultValue},this.updateValidationMessageVisibility=this.updateValidationMessageVisibility.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.onFocusIn=this.onFocusIn.bind(this)}createEffects(){return[new a.InfernoEffect(this.updateValidationMessageVisibility,[this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors]),(0,a.createReRenderEffect)()]}updateEffects(){var e;null===(e=this._effects)||void 0===e||null===(e=e[0])||void 0===e||e.update([this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors])}updateValidationMessageVisibility(){this.setState((()=>({isValidationMessageVisible:this.shouldShowValidationMessage})))}onFocusIn(e){const{onFocusIn:t}=this.props;null==t||t(e)}get cssClasses(){return`${(e=>{const{classes:t,isValid:i,readOnly:n}=e,o={"dx-state-readonly":!!n,"dx-invalid":!i,[String(t)]:!!t};return(0,d.combineClasses)(o)})(h({},this.props,{value:void 0!==this.props.value?this.props.value:this.state.value}))}`}get shouldShowValidationMessage(){const{isValid:e,validationStatus:t}=this.props,i=this.validationErrors??[];return!(e&&"invalid"!==t)&&i.length>0}get aria(){const{isValid:e,readOnly:t}=this.props,i={readonly:t?"true":"false",invalid:e?"false":"true"};return this.shouldShowValidationMessage&&(i.describedBy=this.state.validationMessageGuid),h({},i,this.props.aria)}get validationErrors(){return void 0!==this.__getterCache.validationErrors?this.__getterCache.validationErrors:this.__getterCache.validationErrors=(()=>{const{validationError:e,validationErrors:t}=this.props;let i=t&&[...t];return!i&&e&&(i=[h({},e)]),i})()}get validationMessageTarget(){var e;return null===(e=this.rootElementRef)||void 0===e?void 0:e.current}get restAttributes(){const e=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(this.props,c);return e}focus(){this.widgetRef.current.focus()}blur(){this.widgetRef.current.blur()}componentWillUpdate(e){super.componentWillUpdate(),this.props.validationError===e.validationError&&this.props.validationErrors===e.validationErrors||(this.__getterCache.validationErrors=void 0)}render(){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.Widget,h({rootElementRef:this.rootElementRef,aria:this.aria,classes:this.cssClasses,activeStateEnabled:this.props.activeStateEnabled,focusStateEnabled:this.props.focusStateEnabled,hoverStateEnabled:this.props.hoverStateEnabled,accessKey:this.props.accessKey,className:this.props.className,rtlEnabled:this.props.rtlEnabled,hint:this.props.hint,disabled:this.props.disabled,height:this.props.height,width:this.props.width,onFocusIn:this.props.onFocusIn,onClick:this.props.onClick,onKeyDown:this.props.onKeyDown,tabIndex:this.props.tabIndex,visible:this.props.visible},this.restAttributes,{children:(0,o.createFragment)([this.props.children,this.state.isValidationMessageVisible&&(0,o.createComponentVNode)(2,u.ValidationMessage,{validationErrors:this.validationErrors,mode:this.props.validationMessageMode,positionSide:this.props.validationMessagePosition,rtlEnabled:this.props.rtlEnabled,target:this.validationMessageTarget,boundary:this.validationMessageTarget,visualContainer:this.validationMessageTarget,contentId:this.state.validationMessageGuid})],0)}),null,this.widgetRef))}}t.Editor=g,g.defaultProps=p;const _=[]},16753:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(74663),o=h(i(64553)),a=h(i(84718)),s=i(52576),r=i(11528),l=h(i(78694)),d=h(i(19391)),u=i(34993),c=i(8808);function h(e){return e&&e.__esModule?e:{default:e}}const p="dx-invalid-message-auto",g="dx-validation-target";class _ extends u.ComponentWrapper{getProps(){const e=super.getProps();return e.onFocusIn=()=>{if("auto"===this.option("validationMessageMode")){const e=(0,o.default)((0,c.querySelectorInSameDocument)(this.element(),".dx-invalid-message.dx-overlay-wrapper"));null==e||e.removeClass(p);const t=150;this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout((()=>{null==e||e.addClass(p)}),t)}},e.saveValueChangeEvent=e=>{this._valueChangeEventInstance=e},e}_createElement(e){super._createElement(e),this.showValidationMessageTimeout=void 0,this.validationRequest=(0,a.default)(),(0,n.data)(this.$element()[0],g,this)}_render(){var e;null===(e=this.option("_onMarkupRendered"))||void 0===e||e()}_init(){super._init(),this._initialValue=this.option("value")}_initializeComponent(){super._initializeComponent(),this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})}_initOptions(e){super._initOptions(e),this.option(d.default.initValidationOptions(e))}_getDefaultOptions(){return(0,s.extend)(super._getDefaultOptions(),{validationMessageOffset:{h:0,v:0},validationTooltipOptions:{}})}_bindInnerWidgetOptions(e,t){const i=(0,s.extend)({},e.option()),n=()=>this._silent(t,i);n(),e.on("optionChanged",n)}_raiseValidation(e,t){const i=!(0,r.isDefined)(e)&&!(0,r.isDefined)(t);e===t||i||this.validationRequest.fire({value:e,editor:this})}_raiseValueChangeAction(e,t){var i;null===(i=this._valueChangeAction)||void 0===i||i.call(this,{element:this.$element(),previousValue:t,value:e,event:this._valueChangeEventInstance}),this._valueChangeEventInstance=void 0}_optionChanged(e){const{name:t,previousValue:i,value:n}=e;switch(t&&void 0!==this._getActionConfigs()[t]&&this._addAction(t),t){case"value":this._raiseValidation(n,i),this.option("isDirty",this._initialValue!==n),this._raiseValueChangeAction(n,i);break;case"onValueChanged":this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]});break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(d.default.synchronizeValidationOptions(e,this.option()))}super._optionChanged(e)}clear(){const{value:e}=this._getDefaultOptions();this.option({value:e})}reset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;arguments.length&&(this._initialValue=e),this.option("value",this._initialValue),this.option("isDirty",!1),this.option("isValid",!0)}_dispose(){super._dispose(),(0,n.data)(this.element(),g,null),this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout)}}t.default=_;const f=l.default.isEditor,m=e=>f(e)||e instanceof _;_.isEditor=m,l.default.isEditor=m},3535:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(92848)),o=i(54516),a=s(i(81529));function s(e){return e&&e.__esModule?e:{default:e}}class r extends a.default{getProps(){const e=super.getProps();return e.onKeyDown=this._wrapKeyDownHandler(e.onKeyDown),e}focus(){var e;return null===(e=this.viewRef)||void 0===e?void 0:e.focus(...arguments)}blur(){var e;return null===(e=this.viewRef)||void 0===e?void 0:e.blur(...arguments)}_getActionConfigs(){return{onFocusIn:{},onClick:{}}}get _propsInfo(){return{twoWay:[["value","defaultValue","valueChange"]],allowNull:["defaultValue","validationError","validationErrors","value"],elements:[],templates:[],props:["text","iconSize","enableThreeStateBehavior","activeStateEnabled","hoverStateEnabled","focusStateEnabled","saveValueChangeEvent","defaultValue","valueChange","readOnly","name","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","isValid","isDirty","inputAttr","onFocusIn","className","accessKey","disabled","height","hint","onClick","onKeyDown","rtlEnabled","tabIndex","visible","width","aria","value"]}}get _viewComponent(){return o.CheckBox}}t.default=r,(0,n.default)("dxCheckBox",r),r.defaultOptions=o.defaultOptions},50758:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(3535))&&n.__esModule?n:{default:n};t.default=o.default},81529:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(16753))&&n.__esModule?n:{default:n};class a extends o.default{_useTemplates(){return!1}_isFocused(){return this.$element()[0].classList.contains("dx-state-focused")}getSupportedKeyNames(){return["space"]}getProps(){const e=super.getProps();return null!==e.value&&(e.value=Boolean(e.value)),e}}t.default=a},91568:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultValidationMessageProps=t.ValidationMessage=void 0;var n,o=i(81167),a=i(49714),s=(n=i(59098))&&n.__esModule?n:{default:n},r=i(28112),l=i(10922);const d=["accessKey","activeStateEnabled","boundary","className","contentId","disabled","focusStateEnabled","height","hint","hoverStateEnabled","mode","offset","onClick","onKeyDown","positionSide","rtlEnabled","tabIndex","target","validationErrors","visible","visualContainer","width"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}const c=t.defaultValidationMessageProps=u({},r.BaseWidgetDefaultProps,{mode:"auto",positionSide:"top",offset:Object.freeze({h:0,v:0}),isReactComponentWrapper:!0});class h extends a.BaseInfernoComponent{constructor(e){super(e),this.state={}}get restAttributes(){const e=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(this.props,d);return e}render(){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DomComponentWrapper,u({componentType:s.default,componentProps:this.props,templateNames:[]},this.restAttributes)))}}t.ValidationMessage=h,h.defaultProps=c},78104:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(33975));o(i(37334));function o(e){return e&&e.__esModule?e:{default:e}}const a=n.default;t.default=a},94739:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(62226));o(i(29299));function o(e){return e&&e.__esModule?e:{default:e}}const a=n.default;t.default=a},37334:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(7607));o(i(94739));function o(e){return e&&e.__esModule?e:{default:e}}const a=n.default;t.default=a},97271:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(52891));o(i(37334));function o(e){return e&&e.__esModule?e:{default:e}}const a=n.default;t.default=a},84150:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(55213));o(i(78104));function o(e){return e&&e.__esModule?e:{default:e}}const a=n.default;t.default=a},88575:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(17781),a=i(87739);const s=((n=i(3391))&&n.__esModule?n:{default:n}).default.inherit({_initMarkup(){this._asyncTemplateItems=[],this.callBase()},_render(){this.callBase(arguments),this._planPostRenderActions()},_renderItemContent(e){const t=(0,a.Deferred)(),i=(0,a.Deferred)();this._asyncTemplateItems[e.index]=i;const n=this.callBase(e);return i.done((()=>{t.resolve(n)})),t.promise()},_onItemTemplateRendered(e,t){return()=>{var e;null===(e=this._asyncTemplateItems[t.index])||void 0===e||e.resolve()}},_postProcessRenderItems:o.noop,_planPostRenderActions(){const e=(0,a.Deferred)();return a.when.apply(this,this._asyncTemplateItems).done((()=>{this._postProcessRenderItems(),e.resolve()})),e.promise()},_clean(){this.callBase(),this._asyncTemplateItems.forEach((e=>{e.reject()})),this._asyncTemplateItems=[]}});t.default=s},18602:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(64044),o=i(80248),a=T(i(92774)),s=T(i(68095)),r=T(i(89797)),l=i(98834),d=T(i(4671)),u=T(i(75990)),c=T(i(88412)),h=T(i(64960)),p=i(61404),g=T(i(19427)),_=T(i(64553)),f=i(27286),m=i(17781),v=i(31e3),C=i(87739),y=i(52576),b=i(21274),x=i(57653),w=i(49194),S=i(11528),D=i(35944),I=T(i(11118)),E=T(i(85149));function T(e){return e&&e.__esModule?e:{default:e}}function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},A.apply(null,arguments)}const O="dx-item",P="-content",k="dx-item-content-placeholder",M="dx-template-wrapper",R=/^([^.]+\[\d+\]\.)+([\w.]+)$/,L="up",B="down",V="left",F="right",H="last",N="first",z=I.default.inherit({_activeStateUnit:`.${O}`,_supportedKeys(){const e=function(e,t){(0,l.isCommandKeyPressed)(t)||(t.preventDefault(),t.stopPropagation(),this._moveFocus(e,t))};return(0,y.extend)(this.callBase(),{space:function(e){e.preventDefault(),this._enterKeyHandler(e)},enter:this._enterKeyHandler,leftArrow:e.bind(this,V),rightArrow:e.bind(this,F),upArrow:e.bind(this,L),downArrow:e.bind(this,B),pageUp:e.bind(this,L),pageDown:e.bind(this,B),home:e.bind(this,N),end:e.bind(this,H)})},_getHandlerExtendedParams:(e,t)=>(0,y.extend)({},e,{target:t.get(0),currentTarget:t.get(0)}),_enterKeyHandler(e){const t=(0,_.default)(this.option("focusedElement"));if(!t.length)return;const i=this._getItemData(t);null!=i&&i.onClick&&this._itemEventHandlerByHandler(t,i.onClick,{event:e}),this._itemClickHandler(this._getHandlerExtendedParams(e,t))},_getDefaultOptions(){return(0,y.extend)(this.callBase(),{selectOnFocus:!1,loopItemFocus:!0,items:[],itemTemplate:"item",onItemRendered:null,onItemClick:null,onItemHold:null,itemHoldTimeout:750,onItemContextMenu:null,onFocusedItemChanged:null,noDataText:d.default.format("dxCollectionWidget-noDataText"),encodeNoDataText:!1,dataSource:null,_dataController:null,_itemAttributes:{},itemTemplateProperty:"template",focusOnSelectedItem:!0,focusedElement:null,displayExpr:void 0,disabledExpr:e=>e?e.disabled:void 0,visibleExpr:e=>e?e.visible:void 0})},_init(){this._compileDisplayGetter(),this._initDataController(),this.callBase(),this._cleanRenderedItems(),this._refreshDataSource()},_compileDisplayGetter(){const e=this.option("displayExpr");this._displayGetter=e?(0,v.compileGetter)(this.option("displayExpr")):void 0},_initTemplates(){this._initItemsFromMarkup(),this._initDefaultItemTemplate(),this.callBase()},_getAnonymousTemplateName:()=>"item",_initDefaultItemTemplate(){const e=this._getFieldsMap();this._templateManager.addDefaultTemplates({item:new f.BindableTemplate(((t,i)=>{(0,S.isPlainObject)(i)?this._prepareDefaultItemTemplate(i,t):(e&&(0,S.isFunction)(e.text)&&(i=e.text(i)),t.text(String((0,m.ensureDefined)(i,""))))}),this._getBindableFields(),this.option("integrationOptions.watchMethod"),e)})},_getBindableFields:()=>["text","html"],_getFieldsMap(){if(this._displayGetter)return{text:this._displayGetter}},_prepareDefaultItemTemplate(e,t){(0,S.isDefined)(e.text)&&t.text(e.text),(0,S.isDefined)(e.html)&&t.html(e.html)},_initItemsFromMarkup(){const e=(0,w.findTemplates)(this.$element(),"dxItem");if(!e.length||this.option("items").length)return;const t=e.map((e=>{let{element:t,options:i}=e;return/\S/.test(t.innerHTML)&&!i.template?i.template=this._prepareItemTemplate(t):(0,_.default)(t).remove(),i}));this.option("items",t)},_prepareItemTemplate(e){const t="tmpl-"+new g.default,i=(0,_.default)(e).detach().clone().removeAttr("data-options").addClass(M);return this._saveTemplate(t,i),t},_dataSourceOptions:()=>({paginate:!1}),_cleanRenderedItems(){this._renderedItemsCount=0},_focusTarget(){return this.$element()},_focusInHandler(e){if(this.callBase.apply(this,arguments),!this._isFocusTarget(e.target))return;const t=(0,_.default)(this.option("focusedElement"));if(t.length)this._shouldSkipSelectOnFocus=!0,this._setFocusedItem(t),this._shouldSkipSelectOnFocus=!1;else{const e=this._getActiveItem();e.length&&this.option("focusedElement",(0,p.getPublicElement)(e))}},_focusOutHandler(){this.callBase.apply(this,arguments);const e=(0,_.default)(this.option("focusedElement"));this._updateFocusedItemState(e,!1)},_findActiveTarget(e){return e.find(this._activeStateUnit)},_getActiveItem(e){const t=(0,_.default)(this.option("focusedElement"));if(t.length)return t;let i=this.option("focusOnSelectedItem")?this.option("selectedIndex"):0;const n=this._getActiveElement(),o=n.length-1;return i<0&&(i=e?o:0),n.eq(i)},_moveFocus(e){const t=this._getAvailableItems();let i;switch(e){case"pageup":case L:i=this._prevItem(t);break;case"pagedown":case B:i=this._nextItem(t);break;case F:i=this.option("rtlEnabled")?this._prevItem(t):this._nextItem(t);break;case V:i=this.option("rtlEnabled")?this._nextItem(t):this._prevItem(t);break;case N:i=t.first();break;case H:i=t.last();break;default:return!1}0!==i.length&&this.option("focusedElement",(0,p.getPublicElement)(i))},_getVisibleItems(e){return(e=e||this._itemElements()).filter(":visible")},_getAvailableItems(e){return this._getVisibleItems(e)},_prevItem(e){const t=this._getActiveItem(),i=e.index(t),n=e.last();let o=(0,_.default)(e[i-1]);const a=this.option("loopItemFocus");return 0===o.length&&a&&(o=n),o},_nextItem(e){const t=this._getActiveItem(!0),i=e.index(t),n=e.first();let o=(0,_.default)(e[i+1]);const a=this.option("loopItemFocus");return 0===o.length&&a&&(o=n),o},_selectFocusedItem(e){this.selectItem(e)},_updateFocusedItemState(e,t,i){const n=(0,_.default)(e);n.length&&(this._refreshActiveDescendant(),this._refreshItemId(n,i),this._toggleFocusClass(t,n)),this._updateParentActiveDescendant()},_getElementClassToSkipRefreshId:m.noop,_shouldSkipRefreshId(e){const t=this._getElementClassToSkipRefreshId()??"";return(0,_.default)(e).hasClass(t)},_refreshActiveDescendant(e){const{focusedElement:t}=this.option();if((0,S.isDefined)(t)){const i=this._shouldSkipRefreshId(t)?(0,_.default)(t).attr("id"):this.getFocusedItemId();this.setAria("activedescendant",i,e)}else this.setAria("activedescendant",null,e)},_refreshItemId(e,t){const{focusedElement:i}=this.option();this._shouldSkipRefreshId(e)||(!t&&i?this.setAria("id",this.getFocusedItemId(),e):this.setAria("id",null,e))},_isDisabled:e=>e&&"true"===(0,_.default)(e).attr("aria-disabled"),_setFocusedItem(e){if(!e||!e.length)return;this._updateFocusedItemState(e,!0),this.onFocusedItemChanged(this.getFocusedItemId());const{selectOnFocus:t}=this.option(),i=this._isDisabled(e);!t||i||this._shouldSkipSelectOnFocus||this._selectFocusedItem(e)},_findItemElementByItem(e){let t=(0,_.default)();const i=this;return this.itemElements().each((function(){const n=(0,_.default)(this);if(n.data(i._itemDataKey())===e)return t=n,!1})),t},_getIndexByItem(e){return this.option("items").indexOf(e)},_itemOptionChanged(e,t,i,n){const o=this._findItemElementByItem(e);if(!o.length)return;this.constructor.ItemClass.getInstance(o).setDataField(t,i)||this._refreshItem(o,e);"disabled"===t&&i&&this._resetItemFocus(o)},_resetItemFocus(e){e.is(this.option("focusedElement"))&&this.option("focusedElement",null)},_refreshItem(e){const t=this._getItemData(e),i=e.data(this._itemIndexKey());this._renderItem(this._renderedItemsCount+i,t,null,e)},_updateParentActiveDescendant:m.noop,_optionChanged(e){if("items"===e.name){const t=e.fullName.match(R);if(t&&t.length){const i=t[t.length-1],n=e.fullName.replace(`.${i}`,""),o=this.option(n);return void this._itemOptionChanged(o,i,e.value,e.previousValue)}}switch(e.name){case"items":case"_itemAttributes":case"itemTemplateProperty":case"useItemTextAsTitle":this._cleanRenderedItems(),this._invalidate();break;case"dataSource":this._refreshDataSource(),this._renderEmptyMessage();break;case"noDataText":case"encodeNoDataText":this._renderEmptyMessage();break;case"itemTemplate":case"visibleExpr":case"disabledExpr":this._invalidate();break;case"onItemRendered":this._createItemRenderAction();break;case"onItemClick":case"selectOnFocus":case"loopItemFocus":case"focusOnSelectedItem":break;case"onItemHold":case"itemHoldTimeout":this._attachHoldEvent();break;case"onItemContextMenu":this._attachContextMenuEvent();break;case"onFocusedItemChanged":this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged");break;case"focusedElement":this._updateFocusedItemState(e.previousValue,!1,!0),this._setFocusedItem((0,_.default)(e.value));break;case"displayExpr":this._compileDisplayGetter(),this._initDefaultItemTemplate(),this._invalidate();break;default:this.callBase(e)}},_invalidate(){return this.option("focusedElement",null),this.callBase.apply(this,arguments)},_loadNextPage(){return this._expectNextPageLoading(),this._dataController.loadNextPage()},_expectNextPageLoading(){this._startIndexForAppendedItems=0},_expectLastItemLoading(){this._startIndexForAppendedItems=-1},_forgetNextPageLoading(){this._startIndexForAppendedItems=null},_dataSourceChangedHandler(e){const t=this.option("items");this._initialized&&t&&this._shouldAppendItems()?(this._renderedItemsCount=t.length,this._isLastPage()&&-1===this._startIndexForAppendedItems||(this.option().items=t.concat(e.slice(this._startIndexForAppendedItems))),this._forgetNextPageLoading(),this._refreshContent()):this.option("items",e.slice())},_refreshContent(){this._prepareContent(),this._renderContent()},_dataSourceLoadErrorHandler(){this._forgetNextPageLoading(),this.option("items",this.option("items"))},_shouldAppendItems(){return null!=this._startIndexForAppendedItems&&this._allowDynamicItemsAppend()},_allowDynamicItemsAppend:()=>!1,_clean(){this._cleanFocusState(),this._cleanItemContainer(),this._inkRipple&&delete this._inkRipple,this._resetActiveState()},_cleanItemContainer(){(0,_.default)(this._itemContainer()).empty()},_dispose(){this.callBase(),clearTimeout(this._itemFocusTimeout)},_refresh(){this._cleanRenderedItems(),this.callBase.apply(this,arguments)},_itemContainer(){return this.$element()},_itemClass:()=>O,_itemContentClass(){return this._itemClass()+P},_selectedItemClass:()=>"dx-item-selected",_itemResponseWaitClass:()=>"dx-item-response-wait",_itemSelector(){return`.${this._itemClass()}`},_itemDataKey:()=>"dxItemData",_itemIndexKey:()=>"dxItemIndex",_itemElements(){return this._itemContainer().find(this._itemSelector())},_initMarkup(){this.callBase(),this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged"),this.$element().addClass("dx-collection"),this._prepareContent()},_prepareContent:(0,m.deferRenderer)((function(){this._renderContentImpl()})),_renderContent(){this._fireContentReadyAction()},_render(){this.callBase(),this._attachClickEvent(),this._attachHoldEvent(),this._attachContextMenuEvent()},_getPointerEvent:()=>r.default.down,_attachClickEvent(){const e=this._itemSelector(),t=this._getPointerEvent(),i=(0,l.addNamespace)(n.name,this.NAME),o=(0,l.addNamespace)(t,this.NAME),s=new c.default((e=>{const{event:t}=e;this._itemPointerDownHandler(t)}));a.default.off(this._itemContainer(),i,e),a.default.off(this._itemContainer(),o,e),a.default.on(this._itemContainer(),i,e,(e=>this._itemClickHandler(e))),a.default.on(this._itemContainer(),o,e,(e=>{s.execute({element:(0,_.default)(e.target),event:e})}))},_itemClickHandler(e,t,i){this._itemDXEventHandler(e,"onItemClick",t,i)},_itemPointerDownHandler(e){this.option("focusStateEnabled")&&(this._itemFocusHandler=function(){if(clearTimeout(this._itemFocusTimeout),this._itemFocusHandler=null,e.isDefaultPrevented())return;const t=(0,_.default)(e.target),i=t.closest(this._itemElements()),n=this._closestFocusable(t);i.length&&this._isFocusTarget(null==n?void 0:n.get(0))&&(this._shouldSkipSelectOnFocus=!0,this.option("focusedElement",(0,p.getPublicElement)(i)),this._shouldSkipSelectOnFocus=!1)}.bind(this),this._itemFocusTimeout=setTimeout(this._forcePointerDownFocus.bind(this)))},_closestFocusable(e){if(e.is(D.focusable))return e;for(e=e.parent();e.length&&!h.default.isDocument(e.get(0))&&!h.default.isDocumentFragment(e.get(0));){if(e.is(D.focusable))return e;e=e.parent()}},_forcePointerDownFocus(){this._itemFocusHandler&&this._itemFocusHandler()},_updateFocusState(){this.callBase.apply(this,arguments),this._forcePointerDownFocus()},_attachHoldEvent(){const e=this._itemContainer(),t=this._itemSelector(),i=(0,l.addNamespace)(s.default.name,this.NAME);a.default.off(e,i,t),a.default.on(e,i,t,{timeout:this._getHoldTimeout()},this._itemHoldHandler.bind(this))},_getHoldTimeout(){return this.option("itemHoldTimeout")},_shouldFireHoldEvent(){return this.hasActionSubscription("onItemHold")},_itemHoldHandler(e){this._shouldFireHoldEvent()?this._itemDXEventHandler(e,"onItemHold"):e.cancel=!0},_attachContextMenuEvent(){const e=this._itemContainer(),t=this._itemSelector(),i=(0,l.addNamespace)(o.name,this.NAME);a.default.off(e,i,t),a.default.on(e,i,t,this._itemContextMenuHandler.bind(this))},_shouldFireContextMenuEvent(){return this.hasActionSubscription("onItemContextMenu")},_itemContextMenuHandler(e){this._shouldFireContextMenuEvent()?this._itemDXEventHandler(e,"onItemContextMenu"):e.cancel=!0},_renderContentImpl(){const e=this.option("items")||[];this._renderedItemsCount?this._renderItems(e.slice(this._renderedItemsCount)):this._renderItems(e)},_renderItems(e){e.length&&(0,b.each)(e,((e,t)=>{this._renderItem(this._renderedItemsCount+e,t)})),this._renderEmptyMessage()},_getItemsContainer(){return this._itemContainer()},_setAttributes(e){const t=A({},this.option("_itemAttributes")),{class:i}=t;if(i){const n=e.get(0).className;t.class=[n,i].join(" ")}e.attr(t)},_renderItem(e,t,i,n){const o=(null==e?void 0:e.item)??e;i=i||this._getItemsContainer();const a=this._renderItemFrame(o,t,i,n);this._setElementData(a,t,o),this._setAttributes(a),this._attachItemClickEvent(t,a);const s=this._getItemContent(a),r=this._renderItemContent({index:o,itemData:t,container:(0,p.getPublicElement)(s),contentClass:this._itemContentClass(),defaultTemplateName:this.option("itemTemplate")}),l=this;return(0,C.when)(r).done((i=>{l._postprocessRenderItem({itemElement:a,itemContent:i,itemData:t,itemIndex:o}),l._executeItemRenderAction(e,t,(0,p.getPublicElement)(a))})),a},_getItemContent(e){const t=e.find(`.${k}`);return t.removeClass(k),t},_attachItemClickEvent(e,t){e&&e.onClick&&a.default.on(t,n.name,(i=>{this._itemEventHandlerByHandler(t,e.onClick,{event:i})}))},_renderItemContent(e){const t=this._getItemTemplateName(e),i=this._getTemplate(t);this._addItemContentClasses(e);const n=(0,_.default)(this._createItemByTemplate(i,e));return n.hasClass(M)?this._renderItemContentByNode(e,n):e.container},_renderItemContentByNode(e,t){return(0,_.default)(e.container).replaceWith(t),e.container=(0,p.getPublicElement)(t),this._addItemContentClasses(e),t},_addItemContentClasses(e){const t=[O+P,e.contentClass];(0,_.default)(e.container).addClass(t.join(" "))},_appendItemToContainer(e,t,i){t.appendTo(e)},_renderItemFrame(e,t,i,n){const o=(0,_.default)("<div>");if(new this.constructor.ItemClass(o,this._itemOptions(),t||{}),n&&n.length?n.replaceWith(o):this._appendItemToContainer.call(this,i,o,e),this.option("useItemTextAsTitle")){const e=this._displayGetter?this._displayGetter(t):t;o.attr("title",e)}return o},_itemOptions(){const e=this;return{watchMethod:()=>e.option("integrationOptions.watchMethod"),owner:e,fieldGetter(t){const i=e.option(`${t}Expr`);return(0,v.compileGetter)(i)}}},_postprocessRenderItem:m.noop,_executeItemRenderAction(e,t,i){this._getItemRenderAction()({itemElement:i,itemIndex:e,itemData:t})},_setElementData(e,t,i){e.addClass([O,this._itemClass()].join(" ")).data(this._itemDataKey(),t).data(this._itemIndexKey(),i)},_createItemRenderAction(){return this._itemRenderAction=this._createActionByOption("onItemRendered",{element:this.element(),excludeValidators:["disabled","readOnly"],category:"rendering"})},_getItemRenderAction(){return this._itemRenderAction||this._createItemRenderAction()},_getItemTemplateName(e){const t=e.itemData,i=e.templateProperty||this.option("itemTemplateProperty");return t&&t[i]||e.defaultTemplateName},_createItemByTemplate(e,t){return e.render({model:t.itemData,container:t.container,index:t.index,onRendered:this._onItemTemplateRendered(e,t)})},_onItemTemplateRendered:()=>m.noop,_emptyMessageContainer(){return this._itemContainer()},_renderEmptyMessage(e){e=e||this.option("items");const t=this.option("noDataText"),i=!t||e&&e.length||this._dataController.isLoading();i&&this._$noData&&(this._$noData.remove(),this._$noData=null,this.setAria("label",void 0)),i||(this._$noData=this._$noData||(0,_.default)("<div>").addClass("dx-empty-message"),this._$noData.appendTo(this._emptyMessageContainer()),this.option("encodeNoDataText")?this._$noData.text(t):this._$noData.html(t)),this.$element().toggleClass("dx-empty-collection",!i)},_itemDXEventHandler(e,t,i,n){this._itemEventHandler(e.target,t,(0,y.extend)(i,{event:e}),n)},_itemEventHandler(e,t,i,n){const o=this._createActionByOption(t,(0,y.extend)({validatingTargetName:"itemElement"},n));return this._itemEventHandlerImpl(e,o,i)},_itemEventHandlerByHandler(e,t,i,n){const o=this._createAction(t,(0,y.extend)({validatingTargetName:"itemElement"},n));return this._itemEventHandlerImpl(e,o,i)},_itemEventHandlerImpl(e,t,i){const n=this._closestItemElement((0,_.default)(e)),o=(0,y.extend)({},i);return t((0,y.extend)(i,this._extendActionArgs(n),o))},_extendActionArgs(e){return{itemElement:(0,p.getPublicElement)(e),itemIndex:this._itemElements().index(e),itemData:this._getItemData(e)}},_closestItemElement(e){return(0,_.default)(e).closest(this._itemSelector())},_getItemData(e){return(0,_.default)(e).data(this._itemDataKey())},_getSummaryItemsSize(e,t,i){let n=0;return t&&(0,b.each)(t,((t,o)=>{"width"===e?n+=(0,x.getOuterWidth)(o,i||!1):"height"===e&&(n+=(0,x.getOuterHeight)(o,i||!1))})),n},getFocusedItemId(){return this._focusedItemId||(this._focusedItemId=`dx-${new g.default}`),this._focusedItemId},itemElements(){return this._itemElements()},itemsContainer(){return this._itemContainer()}}).include(u.default);z.ItemClass=E.default;t.default=z},3391:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=m(i(92774)),o=i(68216),a=i(97169),s=m(i(64553)),r=i(17781),l=i(31e3),d=i(87739),u=i(52576),c=i(21274),h=i(11528),p=m(i(35185)),g=m(i(53544)),_=m(i(18602)),f=m(i(60498));function m(e){return e&&e.__esModule?e:{default:e}}const v="dxItemDeleting",C=function(e){return-1!==e},y=_.default.inherit({_setOptionsByReference(){this.callBase(),(0,u.extend)(this._optionsByReference,{selectedItem:!0})},_getDefaultOptions(){return(0,u.extend)(this.callBase(),{selectionMode:"none",selectionRequired:!1,selectByClick:!0,selectedItems:[],selectedItemKeys:[],maxFilterLengthInRequest:1500,keyExpr:null,selectedIndex:-1,selectedItem:null,onSelectionChanging:null,onSelectionChanged:null,onItemReordered:null,onItemDeleting:null,onItemDeleted:null})},ctor(e,t){this._userOptions=t||{},this.callBase(e,t)},_init(){this._initEditStrategy(),this.callBase(),this._initKeyGetter(),this._initActions(),this._initSelectionModule()},_initKeyGetter(){this._keyGetter=(0,l.compileGetter)(this.option("keyExpr"))},_getActionsList:()=>["onSelectionChanging","onSelectionChanged"],_initActions(){this._actions={};this._getActionsList().forEach((e=>{this._actions[e]=this._createActionByOption(e,{excludeValidators:["disabled","readOnly"]})??r.noop}))},_getKeysByItems(e){return this._editStrategy.getKeysByItems(e)},_getItemsByKeys(e,t){return this._editStrategy.getItemsByKeys(e,t)},_getKeyByIndex(e){return this._editStrategy.getKeyByIndex(e)},_getIndexByKey(e){return this._editStrategy.getIndexByKey(e)},_getIndexByItemData(e){return this._editStrategy.getIndexByItemData(e)},_isKeySpecified(){return!!this._dataController.key()},_getCombinedFilter(){return this._dataController.filter()},key(){return this.option("keyExpr")?this.option("keyExpr"):this._dataController.key()},keyOf(e){let t=e;return this.option("keyExpr")?t=this._keyGetter(e):this._dataController.store()&&(t=this._dataController.keyOf(e)),t},_nullValueSelectionSupported:()=>!1,_initSelectionModule(){const e=this,{itemsGetter:t}=e._editStrategy;this._selection=new g.default({allowNullValue:this._nullValueSelectionSupported(),mode:this.option("selectionMode"),maxFilterLengthInRequest:this.option("maxFilterLengthInRequest"),equalByReference:!this._isKeySpecified(),onSelectionChanging:e=>{var t,i;const n=e.addedItemKeys.length||e.removedItemKeys.length;if(!this._rendered||!n)return;const o={removedItems:e.removedItems,addedItems:e.addedItems,cancel:!1};null===(t=(i=this._actions).onSelectionChanging)||void 0===t||t.call(i,o),e.cancel=o.cancel},onSelectionChanged:e=>{(e.addedItemKeys.length||e.removedItemKeys.length)&&(this.option("selectedItems",this._getItemsByKeys(e.selectedItemKeys,e.selectedItems)),this._updateSelectedItems(e))},filter:e._getCombinedFilter.bind(e),totalCount(){const t=e.option("items"),i=e._dataController.totalCount();return i>=0?i:e._getItemsCount(t)},key:e.key.bind(e),keyOf:e.keyOf.bind(e),load(t){var i;const n=e._dataController;return t.customQueryParams=null===(i=n.loadOptions())||void 0===i?void 0:i.customQueryParams,t.userData=n.userData(),n.store()?n.loadFromStore(t).done((t=>{if(e._disposed)return;const i=(0,a.normalizeLoadResult)(t).data;n.applyMapFunction(i)})):(0,d.Deferred)().resolve(this.plainItems())},dataFields:()=>e._dataController.select(),plainItems:t.bind(e._editStrategy)})},_getItemsCount(e){return e.reduce(((e,t)=>e+(t.items?this._getItemsCount(t.items):1)),0)},_initEditStrategy(){const e=f.default;this._editStrategy=new e(this)},_getSelectedItemIndices(e){const t=this,i=[];return e=e||this._selection.getSelectedItemKeys(),t._editStrategy.beginCache(),(0,c.each)(e,((e,n)=>{const o=t._getIndexByKey(n);C(o)&&i.push(o)})),t._editStrategy.endCache(),i},_initMarkup(){this._rendering=!0,this._dataController.isLoading()||this._syncSelectionOptions().done((()=>this._normalizeSelectedItems())),this.callBase()},_render(){this.callBase(),this._rendering=!1},_fireContentReadyAction(){this._rendering=!1,this._rendered=!0,this.callBase.apply(this,arguments)},_syncSelectionOptions(e){let t,i,n,o;switch(e=e||this._chooseSelectOption()){case"selectedIndex":t=this._editStrategy.getItemDataByIndex(this.option("selectedIndex")),(0,h.isDefined)(t)?(this._setOptionWithoutOptionChange("selectedItems",[t]),this._setOptionWithoutOptionChange("selectedItem",t),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([t]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedItem",null));break;case"selectedItems":if(o=this.option("selectedItems")||[],i=o.length?this._editStrategy.getIndexByItemData(o[0]):-1,this.option("selectionRequired")&&!C(i))return this._syncSelectionOptions("selectedIndex");this._setOptionWithoutOptionChange("selectedItem",o[0]),this._setOptionWithoutOptionChange("selectedIndex",i),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems(o));break;case"selectedItem":if(t=this.option("selectedItem"),i=this._editStrategy.getIndexByItemData(t),this.option("selectionRequired")&&!C(i))return this._syncSelectionOptions("selectedIndex");(0,h.isDefined)(t)?(this._setOptionWithoutOptionChange("selectedItems",[t]),this._setOptionWithoutOptionChange("selectedIndex",i),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([t]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedIndex",-1));break;case"selectedItemKeys":if(n=this.option("selectedItemKeys"),this.option("selectionRequired")){const e=this._getIndexByKey(n[0]);if(!C(e))return this._syncSelectionOptions("selectedIndex")}return this._selection.setSelection(n)}return(0,d.Deferred)().resolve().promise()},_chooseSelectOption(){let e="selectedIndex";const t=function(e){const t=this.option(e);return(0,h.isDefined)(t)&&t.length||e in this._userOptions}.bind(this);return t("selectedItems")?e="selectedItems":t("selectedItem")?e="selectedItem":t("selectedItemKeys")&&(e="selectedItemKeys"),e},_compareKeys(e,t){if(e.length!==t.length)return!1;for(let i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0},_normalizeSelectedItems(){if("none"===this.option("selectionMode"))this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems");else if("single"===this.option("selectionMode")){const e=this.option("selectedItems");if(e.length>1||!e.length&&this.option("selectionRequired")&&this.option("items")&&this.option("items").length){const t=this._selection.getSelectedItems();let i=void 0===e[0]?t[0]:e[0];return void 0===i&&(i=this._editStrategy.itemsGetter()[0]),this.option("grouped")&&i&&i.items&&(i.items=[i.items[0]]),this._selection.setSelection(this._getKeysByItems([i])),this._setOptionWithoutOptionChange("selectedItems",[i]),this._syncSelectionOptions("selectedItems")}this._selection.setSelection(this._getKeysByItems(e))}else{const e=this._getKeysByItems(this.option("selectedItems")),t=this._selection.getSelectedItemKeys();this._compareKeys(t,e)||this._selection.setSelection(e)}return(0,d.Deferred)().resolve().promise()},_itemClickHandler(e){let t=(0,d.Deferred)().resolve();const{callBase:i}=this;this._createAction((e=>{t=this._itemSelectHandler(e.event)??t}),{validatingTargetName:"itemElement"})({itemElement:(0,s.default)(e.currentTarget),event:e}),t.always((()=>{i.apply(this,arguments)}))},_itemSelectHandler(e,t){var i;let n;if(!t&&!this.option("selectByClick"))return;const o=e.currentTarget;return this.isItemSelected(o)?this.unselectItem(e.currentTarget):n=this.selectItem(e.currentTarget),null===(i=n)||void 0===i?void 0:i.promise()},_selectedItemElement(e){return this._itemElements().eq(e)},_postprocessRenderItem(e){if("none"!==this.option("selectionMode")){const t=(0,s.default)(e.itemElement),i=this._editStrategy.getNormalizedIndex(t),n=this._isItemSelected(i);this._processSelectableItem(t,n)}},_processSelectableItem(e,t){e.toggleClass(this._selectedItemClass(),t),this._setAriaSelectionAttribute(e,String(t))},_updateSelectedItems(e){const t=this,{addedItemKeys:i}=e,{removedItemKeys:n}=e;if(t._rendered&&(i.length||n.length)){const o=t._selectionChangePromise;if(!t._rendering){const e=[];let o;const a=[];t._editStrategy.beginCache();for(let n=0;n<i.length;n++)o=t._getIndexByKey(i[n]),e.push(o),t._addSelection(o);for(let e=0;e<n.length;e++)o=t._getIndexByKey(n[e]),a.push(o),t._removeSelection(o);t._editStrategy.endCache(),t._updateSelection(e,a)}(0,d.when)(o).done((()=>{this._actions.onSelectionChanged({addedItems:e.addedItems,removedItems:e.removedItems})}))}},_updateSelection:r.noop,_setAriaSelectionAttribute(e,t){this.setAria("selected",t,e)},_removeSelection(e){const t=this._editStrategy.getItemElement(e);C(e)&&(this._processSelectableItem(t,!1),n.default.triggerHandler(t,"stateChanged",!1))},_addSelection(e){const t=this._editStrategy.getItemElement(e);C(e)&&(this._processSelectableItem(t,!0),n.default.triggerHandler(t,"stateChanged",!0))},_isItemSelected(e){const t=this._getKeyByIndex(e);return this._selection.isItemSelected(t,{checkPending:!0})},_optionChanged(e){switch(e.name){case"selectionMode":this._invalidate();break;case"dataSource":(!e.value||Array.isArray(e.value)&&!e.value.length)&&this.option("selectedItemKeys",[]),this.callBase(e);break;case"selectedIndex":case"selectedItem":case"selectedItems":case"selectedItemKeys":this._syncSelectionOptions(e.name).done((()=>this._normalizeSelectedItems()));break;case"keyExpr":this._initKeyGetter();break;case"selectionRequired":this._normalizeSelectedItems();break;case"onSelectionChanging":case"onSelectionChanged":this._initActions();break;case"selectByClick":case"onItemDeleting":case"onItemDeleted":case"onItemReordered":case"maxFilterLengthInRequest":break;default:this.callBase(e)}},_clearSelectedItems(){this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems")},_waitDeletingPrepare(e){if(e.data(v))return(0,d.Deferred)().resolve().promise();e.data(v,!0);const t=(0,d.Deferred)(),i={cancel:!1},n=this._itemEventHandler(e,"onItemDeleting",i,{excludeValidators:["disabled","readOnly"]});return(0,d.when)(n).always((function(o){const a=!n,s=!a&&"resolved"===n.state(),r=a||s&&!!!arguments.length||s&&o;(0,d.when)((0,d.fromPromise)(i.cancel)).always((()=>{e.data(v,!1)})).done((e=>{r&&!e?t.resolve():t.reject()})).fail(t.reject)})),t.promise()},_deleteItemFromDS(e){const t=this._dataController,i=(0,d.Deferred)(),n=this.option("disabled"),o=t.store();if(!o)return(0,d.Deferred)().resolve().promise();if(!o.remove)throw p.default.Error("E1011");return this.option("disabled",!0),o.remove(t.keyOf(this._getItemData(e))).done((e=>{void 0!==e?i.resolve():i.reject()})).fail((()=>{i.reject()})),i.always((()=>{this.option("disabled",n)})),i},_tryRefreshLastPage(){const e=(0,d.Deferred)();return this._isLastPage()||this.option("grouped")?e.resolve():this._refreshLastPage().done((()=>{e.resolve()})),e.promise()},_refreshLastPage(){return this._expectLastItemLoading(),this._dataController.load()},_updateSelectionAfterDelete(e){const t=this._getKeyByIndex(e);this._selection.deselect([t])},_updateIndicesAfterIndex(e){const t=this._itemElements();for(let i=e+1;i<t.length;i++)(0,s.default)(t[i]).data(this._itemIndexKey(),i-1)},_simulateOptionChange(e){const t=this.option(e);t instanceof o.DataSource||this._optionChangedAction({name:e,fullName:e,value:t})},isItemSelected(e){return this._isItemSelected(this._editStrategy.getNormalizedIndex(e))},selectItem(e){if("none"===this.option("selectionMode"))return(0,d.Deferred)().resolve();const t=this._editStrategy.getNormalizedIndex(e);if(!C(t))return(0,d.Deferred)().resolve();const i=this._getKeyByIndex(t);if(this._selection.isItemSelected(i))return(0,d.Deferred)().resolve();if("single"===this.option("selectionMode"))return this._selection.setSelection([i]);const n=this.option("selectedItemKeys")||[];return this._selection.setSelection([...n,i],[i])},unselectItem(e){const t=this._editStrategy.getNormalizedIndex(e);if(!C(t))return;const i=this._selection.getSelectedItemKeys();if(this.option("selectionRequired")&&i.length<=1)return;const n=this._getKeyByIndex(t);this._selection.isItemSelected(n,{checkPending:!0})&&this._selection.deselect([n])},_deleteItemElementByIndex(e){this._updateSelectionAfterDelete(e),this._updateIndicesAfterIndex(e),this._editStrategy.deleteItemAtIndex(e)},_afterItemElementDeleted(e,t){const i=this._dataController.getDataSource()?"dataSource":"items";this._simulateOptionChange(i),this._itemEventHandler(e,"onItemDeleted",t,{beforeExecute(){e.remove()},excludeValidators:["disabled","readOnly"]}),this._renderEmptyMessage()},deleteItem(e){const t=this,i=(0,d.Deferred)(),n=this._editStrategy.getItemElement(e),o=this._editStrategy.getNormalizedIndex(e),a=this._itemResponseWaitClass();return C(o)?this._waitDeletingPrepare(n).done((()=>{n.addClass(a);const e=t._extendActionArgs(n);t._deleteItemFromDS(n).done((()=>{t._deleteItemElementByIndex(o),t._afterItemElementDeleted(n,e),t._tryRefreshLastPage().done((()=>{i.resolveWith(t)}))})).fail((()=>{n.removeClass(a),i.rejectWith(t)}))})).fail((()=>{i.rejectWith(t)})):i.rejectWith(t),i.promise()},reorderItem(e,t){const i=(0,d.Deferred)(),n=this,o=this._editStrategy,a=o.getItemElement(e),s=o.getItemElement(t),r=o.getNormalizedIndex(e),l=o.getNormalizedIndex(t),u=this._dataController.getDataSource()?"dataSource":"items";return C(r)&&C(l)&&r!==l?i.resolveWith(this):i.rejectWith(this),i.promise().done((function(){s[o.itemPlacementFunc(r,l)](a),o.moveItemAtIndexToIndex(r,l),this._updateIndicesAfterIndex(r),n.option("selectedItems",n._getItemsByKeys(n._selection.getSelectedItemKeys(),n._selection.getSelectedItems())),"items"===u&&n._simulateOptionChange(u),n._itemEventHandler(a,"onItemReordered",{fromIndex:o.getIndex(r),toIndex:o.getIndex(l)},{excludeValidators:["disabled","readOnly"]})}))}});t.default=y},86984:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(55620)),o=l(i(64960)),a=l(i(64553)),s=i(17781),r=i(11528);function l(e){return e&&e.__esModule?e:{default:e}}const{abstract:d}=n.default,u=n.default.inherit({ctor(e){this._collectionWidget=e},getIndexByItemData:d,getItemDataByIndex:d,getKeysByItems:d,getItemsByKeys:d,itemsGetter:d,getKeyByIndex(e){const t=this._denormalizeItemIndex(e);return this.getKeysByItems([this.getItemDataByIndex(t)])[0]},_equalKeys(e,t){return this._collectionWidget._isKeySpecified()?(0,s.equalByValue)(e,t):e===t},beginCache(){this._cache={}},endCache(){this._cache=null},getIndexByKey:d,getNormalizedIndex(e){return this._isNormalizedItemIndex(e)?e:this._isItemIndex(e)?this._normalizeItemIndex(e):this._isNode(e)?this._getNormalizedItemIndex(e):this._normalizeItemIndex(this.getIndexByItemData(e))},getIndex(e){return this._isNormalizedItemIndex(e)?this._denormalizeItemIndex(e):this._isItemIndex(e)?e:this._isNode(e)?this._denormalizeItemIndex(this._getNormalizedItemIndex(e)):this.getIndexByItemData(e)},getItemElement(e){if(this._isNormalizedItemIndex(e))return this._getItemByNormalizedIndex(e);if(this._isItemIndex(e))return this._getItemByNormalizedIndex(this._normalizeItemIndex(e));if(this._isNode(e))return(0,a.default)(e);const t=this._normalizeItemIndex(this.getIndexByItemData(e));return this._getItemByNormalizedIndex(t)},_isNode:e=>o.default.isNode(e&&(0,r.isRenderer)(e)?e.get(0):e),deleteItemAtIndex:d,itemPlacementFunc(e,t){return this._itemsFromSameParent(e,t)&&e<t?"after":"before"},moveItemAtIndexToIndex:d,_isNormalizedItemIndex:e=>"number"==typeof e&&Math.round(e)===e,_isItemIndex:d,_getNormalizedItemIndex:d,_normalizeItemIndex:d,_denormalizeItemIndex:d,_getItemByNormalizedIndex:d,_itemsFromSameParent:d});t.default=u},60498:function(e,t,i){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const o=((n=i(86984))&&n.__esModule?n:{default:n}).default.inherit({_getPlainItems(){return this._collectionWidget.option("items")||[]},getIndexByItemData(e){const t=this._collectionWidget.keyOf.bind(this._collectionWidget);return t?this.getIndexByKey(t(e)):this._getPlainItems().indexOf(e)},getItemDataByIndex(e){return this._getPlainItems()[e]},deleteItemAtIndex(e){this._getPlainItems().splice(e,1)},itemsGetter(){return this._getPlainItems()},getKeysByItems(e){const t=this._collectionWidget.keyOf.bind(this._collectionWidget);let i=e;if(t){i=[];for(let n=0;n<e.length;n++)i.push(t(e[n]))}return i},getIndexByKey(e){const t=this._cache,i=t&&t.keys||this.getKeysByItems(this._getPlainItems());if(t&&!t.keys&&(t.keys=i),"object"!=typeof e)return i.indexOf(e);for(let t=0,{length:n}=i;t<n;t++)if(this._equalKeys(e,i[t]))return t;return-1},getItemsByKeys:(e,t)=>(t||e).slice(),moveItemAtIndexToIndex(e,t){const i=this._getPlainItems(),n=i[e];i.splice(e,1),i.splice(t,0,n)},_isItemIndex:e=>"number"==typeof e&&Math.round(e)===e,_getNormalizedItemIndex(e){return this._collectionWidget._itemElements().index(e)},_normalizeItemIndex:e=>e,_denormalizeItemIndex:e=>e,_getItemByNormalizedIndex(e){return e>-1?this._collectionWidget._itemElements().eq(e):null},_itemsFromSameParent:()=>!0});t.default=o},68005:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(43792),o=i(89358),a=p(i(64960)),s=p(i(64553)),r=i(13387),l=i(17781),d=i(87739),u=i(52576),c=i(21274),h=p(i(88575));function p(e){return e&&e.__esModule?e:{default:e}}const g="__dx_key__";t.default=h.default.inherit({_getDefaultOptions(){return(0,u.extend)(this.callBase(),{repaintChangesOnly:!1})},ctor(){var e;this.callBase.apply(this,arguments),this._customizeStoreLoadOptions=e=>{this._dataController.getDataSource()&&!this._dataController.isLoaded()&&(this._correctionIndex=0),this._correctionIndex&&e.storeLoadOptions&&(e.storeLoadOptions.skip+=this._correctionIndex)},null===(e=this._dataController)||void 0===e||e.on("customizeStoreLoadOptions",this._customizeStoreLoadOptions)},reload(){this._correctionIndex=0},_init(){this.callBase(),this._refreshItemsCache(),this._correctionIndex=0},_findItemElementByKey(e){let t=(0,s.default)();const i=this.key();return this.itemElements().each(((n,a)=>{const r=(0,s.default)(a),l=this._getItemData(r);if(i?(0,o.keysEqual)(i,this.keyOf(l),e):this._isItemEquals(l,e))return t=r,!1})),t},_dataSourceChangedHandler(e,t){null!=t&&t.changes?this._modifyByChanges(t.changes):(this.callBase(e,t),this._refreshItemsCache())},_isItemEquals(e,t){e&&e[g]&&(e=e.data);try{return JSON.stringify(e)===JSON.stringify(t)}catch(i){return e===t}},_isItemStrictEquals(e,t){return this._isItemEquals(e,t)},_shouldAddNewGroup(e,t){let i=!1;return this.option("grouped")&&(e.length||(i=!0),(0,c.each)(e,((e,n)=>{"insert"===n.type&&(i=!0,(0,c.each)(t,((e,t)=>{if(void 0!==n.data.key&&n.data.key===t.key)return i=!1,!1})))}))),i},_partialRefresh(){if(this.option("repaintChangesOnly")){const e=e=>e&&void 0!==e[g]?e[g]:this.keyOf(e),t=(0,r.findChanges)(this._itemsCache,this._editStrategy.itemsGetter(),e,this._isItemStrictEquals.bind(this));if(t&&this._itemsCache.length&&!this._shouldAddNewGroup(t,this._itemsCache))return this._modifyByChanges(t,!0),this._renderEmptyMessage(),!0;this._refreshItemsCache()}return!1},_refreshItemsCache(){if(this.option("repaintChangesOnly")){const e=this._editStrategy.itemsGetter();try{this._itemsCache=(0,u.extend)(!0,[],e),this.key()||(this._itemsCache=this._itemsCache.map(((t,i)=>({[g]:e[i],data:t}))))}catch(t){this._itemsCache=(0,u.extend)([],e)}}},_dispose(){this._dataController.off("customizeStoreLoadOptions",this._customizeStoreLoadOptions),this.callBase()},_updateByChange(e,t,i,o){if(o)this._renderItem(i.index,i.data,null,this._findItemElementByKey(i.key));else{const o=t[(0,n.indexByKey)(e,t,i.key)];o&&(0,n.update)(e,t,i.key,i.data).done((()=>{this._renderItem(t.indexOf(o),o,null,this._findItemElementByKey(i.key))}))}},_insertByChange(e,t,i,o){(0,d.when)(o||(0,n.insert)(e,t,i.data,i.index)).done((()=>{this._beforeItemElementInserted(i),this._renderItem(i.index??t.length,i.data),this._afterItemElementInserted(),this._correctionIndex++}))},_updateSelectionAfterRemoveByChange(e){const t=this.option("selectedIndex");t>e?this.option("selectedIndex",t-1):t===e&&1===this.option("selectedItems").length?this.option("selectedItems",[]):this._normalizeSelectedItems()},_beforeItemElementInserted(e){const t=this.option("selectedIndex");e.index<=t&&this.option("selectedIndex",t+1)},_afterItemElementInserted:l.noop,_removeByChange(e,t,i,o){const a=o?i.index:(0,n.indexByKey)(e,t,i.key);if(o?i.oldItem:t[a]){const e=this._findItemElementByKey(i.key),t=this._extendActionArgs(e);this._waitDeletingPrepare(e).done((()=>{o?(this._updateIndicesAfterIndex(a-1),this._afterItemElementDeleted(e,t),this._updateSelectionAfterRemoveByChange(a)):(this._deleteItemElementByIndex(a),this._afterItemElementDeleted(e,t))})),this._correctionIndex--}},_modifyByChanges(e,t){const i=this._editStrategy.itemsGetter(),n={key:this.key.bind(this),keyOf:this.keyOf.bind(this)},o=this._dataController,a=o.paginate(),s=o.group();(a||s)&&(e=e.filter((e=>"insert"!==e.type||void 0!==e.index))),e.forEach((e=>this[`_${e.type}ByChange`](n,i,e,t))),this._renderedItemsCount=i.length,this._refreshItemsCache(),this._fireContentReadyAction()},_appendItemToContainer(e,t,i){const n=e.children(this._itemSelector()).get(i);a.default.insertElement(e.get(0),t.get(0),n)},_optionChanged(e){switch(e.name){case"items":this._partialRefresh(e.value)||this.callBase(e);break;case"dataSource":this.option("repaintChangesOnly")&&e.value||this.option("items",[]),this.callBase(e);break;case"repaintChangesOnly":break;default:this.callBase(e)}}})},5285:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(17781),o=i(87739);const a={load:()=>(0,o.Deferred)().reject(),loadSingle:()=>(0,o.Deferred)().reject(),loadFromStore:()=>(0,o.Deferred)().reject(),loadNextPage:()=>(0,o.Deferred)().reject(),loadOptions:n.noop,userData:n.noop,cancel:n.noop,cancelAll:n.noop,filter:n.noop,addSearchFilter:n.noop,group:n.noop,paginate:n.noop,pageSize:n.noop,pageIndex:n.noop,resetDataSourcePageIndex:n.noop,totalCount:n.noop,isLastPage:n.noop,isLoading:n.noop,isLoaded:n.noop,searchValue:n.noop,searchOperation:n.noop,searchExpr:n.noop,select:n.noop,key:n.noop,keyOf:n.noop,store:n.noop,items:n.noop,applyMapFunction:n.noop,getDataSource:n.noop,reload:n.noop,on:n.noop,off:n.noop};t.default=class{constructor(e){if(!e)return a;this._dataSource=e}load(){return this._dataSource.load()}loadSingle(e,t){return arguments.length<2&&(t=e,e=this.key()),this._dataSource.loadSingle(e,t)}loadFromStore(e){return this.store().load(e)}loadNextPage(){return this.pageIndex(1+this.pageIndex()),this.load()}loadOptions(){return this._dataSource.loadOptions()}userData(){return this._dataSource._userData}cancel(e){this._dataSource.cancel(e)}cancelAll(){this._dataSource.cancelAll()}filter(e){return this._dataSource.filter(e)}addSearchFilter(e){this._dataSource._addSearchFilter(e)}group(e){return this._dataSource.group(e)}paginate(){return this._dataSource.paginate()}pageSize(){return this._dataSource._pageSize}pageIndex(e){return this._dataSource.pageIndex(e)}resetDataSourcePageIndex(){this.pageIndex()&&(this.pageIndex(0),this.load())}totalCount(){return this._dataSource.totalCount()}isLastPage(){return this._dataSource.isLastPage()||!this._dataSource._pageSize}isLoading(){return this._dataSource.isLoading()}isLoaded(){return this._dataSource.isLoaded()}searchValue(e){return arguments.length?this._dataSource.searchValue(e):this._dataSource.searchValue()}searchOperation(e){return this._dataSource.searchOperation(e)}searchExpr(e){return arguments.length?this._dataSource.searchExpr(e):this._dataSource.searchExpr()}select(){return this._dataSource.select(...arguments)}key(){return this._dataSource.key()}keyOf(e){return this.store().keyOf(e)}store(){return this._dataSource.store()}items(){return this._dataSource.items()}applyMapFunction(e){return this._dataSource._applyMapFunction(e)}getDataSource(){return this._dataSource||null}reload(){return this._dataSource.reload()}on(e,t){this._dataSource.on(e,t)}off(e,t){this._dataSource.off(e,t)}}},85149:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(55620)),o=r(i(64553)),a=i(21274),s=i(85521);function r(e){return e&&e.__esModule?e:{default:e}}const l=n.default.inherit({ctor(e,t,i){this._$element=e,this._options=t,this._rawData=i,(0,s.attachInstanceToElement)(e,this,this._dispose),this._render()},_render(){const e=(0,o.default)("<div>").addClass("dx-item-content-placeholder");this._$element.append(e),this._watchers=[],this._renderWatchers()},_renderWatchers(){this._startWatcher("disabled",this._renderDisabled.bind(this)),this._startWatcher("visible",this._renderVisible.bind(this))},_startWatcher(e,t){const i=this._rawData,n=this._options.fieldGetter(e),o=function(e,t,i){const n=function(){let e;return function(t){e!==t&&(i(t,e),e=t)}}();return{dispose:e(t,n),force(){n(t())}}}(this._options.watchMethod(),(()=>n(i)),((e,i)=>{this._dirty=!0,t(e,i)}));this._watchers.push(o)},setDataField(){if(this._dirty=!1,(0,a.each)(this._watchers,((e,t)=>{t.force()})),this._dirty)return!0},_renderDisabled(e,t){this._$element.toggleClass("dx-state-disabled",!!e),this._$element.attr("aria-disabled",!!e),this._updateOwnerFocus(e)},_updateOwnerFocus(e){const t=this._options.owner;t&&e&&t._resetItemFocus(this._$element)},_renderVisible(e,t){this._$element.toggleClass("dx-state-invisible",void 0!==e&&!e)},_dispose(){(0,a.each)(this._watchers,((e,t)=>{t.dispose()}))}});l.getInstance=function(e){return(0,s.getInstanceByElement)(e,this)};t.default=l},26988:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(43101)),o=d(i(92848)),a=d(i(64553)),s=i(52576),r=d(i(28906)),l=d(i(98264));function d(e){return e&&e.__esModule?e:{default:e}}const u="dx-colorbox",c=`${u}-input`,h=`${c}-container`,p=`${u}-color-result-preview`,g=`${u}-color-is-not-defined`,_=`${u}-overlay`,f=l.default.prototype,m={makeTransparentBackground:f._makeTransparentBackground.bind(f),makeRgba:f._makeRgba.bind(f)},v=r.default.inherit({_supportedKeys(){const e=function(e){if(e.stopPropagation(),this.option("opened"))return e.preventDefault(),!0};return(0,s.extend)(this.callBase(),{enter:this._enterKeyHandler,leftArrow:e,rightArrow:e,upArrow:function(e){return this.option("opened")?!e.altKey||(this.close(),!1):(e.preventDefault(),!1)},downArrow:function(e){return this.option("opened")||e.altKey?!(!this.option("opened")&&e.altKey)||(this._validatedOpening(),!1):(e.preventDefault(),!1)}})},_getDefaultOptions(){return(0,s.extend)(this.callBase(),{editAlphaChannel:!1,applyValueMode:"useButtons",keyStep:1,fieldTemplate:null,buttonsLocation:"bottom after"})},_popupHidingHandler(){this.callBase(),"useButtons"===this.option("applyValueMode")&&this._updateColorViewValue(this.option("value"))},_popupConfig(){return(0,s.extend)(this.callBase(),{width:""})},_contentReadyHandler(){this._createColorView(),this._addPopupBottomClasses()},_addPopupBottomClasses(){const e=this._popup.bottomToolbar();e&&(e.addClass("dx-colorview-container-cell").addClass("dx-colorview-button-cell").find(".dx-toolbar-items-container").addClass("dx-colorview-buttons-container"),e.find(".dx-popup-done").addClass("dx-colorview-apply-button"),e.find(".dx-popup-cancel").addClass("dx-colorview-cancel-button"))},_createColorView(){this._popup.$overlayContent().addClass(_);const e=(0,a.default)("<div>").appendTo(this._popup.$content());this._colorView=this._createComponent(e,l.default,this._colorViewConfig())},_applyNewColor(e){this.option("value",e),e&&m.makeTransparentBackground(this._$colorResultPreview,e),this._colorViewEnterKeyPressed&&(this.close(),this._colorViewEnterKeyPressed=!1)},_colorViewConfig(){const e=this;return{value:e.option("value"),matchValue:e.option("value"),editAlphaChannel:e.option("editAlphaChannel"),applyValueMode:e.option("applyValueMode"),focusStateEnabled:e.option("focusStateEnabled"),stylingMode:this.option("stylingMode"),target:this._input(),onEnterKeyPressed(t){let{event:i}=t;e._colorViewEnterKeyPressed=!0,e._colorView.option("value")!==e.option("value")&&(e._saveValueChangeEvent(i),e._applyNewColor(e._colorView.option("value")),e.close())},onValueChanged(t){let{event:i,value:n,previousValue:o}=t;const a="instantly"===e.option("applyValueMode"),s=m.makeRgba(n)===o,r=a||e._colorViewEnterKeyPressed,l=e._shouldSaveEmptyValue;s||!r||l||(i&&e._saveValueChangeEvent(i),e._applyNewColor(n))}}},_enterKeyHandler(e){const t=this._input().val(),{value:i,editAlphaChannel:o}=this.option(),a=i&&o?m.makeRgba(i):i;if(!t)return!1;if(!new n.default(t).colorIsInvalid){if(t!==a&&(this._applyColorFromInput(t),this._saveValueChangeEvent(e),this.option("value",this.option("editAlphaChannel")?m.makeRgba(t):t)),this._colorView){const t=this._colorView.option("value");i!==t&&(this._saveValueChangeEvent(e),this.option("value",t))}return this.close(),!1}this._input().val(a)},_applyButtonHandler(e){this._saveValueChangeEvent(e.event),this._applyNewColor(this._colorView.option("value")),this.callBase()},_cancelButtonHandler(){this._resetInputValue(),this.callBase()},_getKeyboardListeners(){return this.callBase().concat([this._colorView])},_init(){this.callBase()},_initMarkup(){this.$element().addClass(u),this.callBase()},_renderInput(){this.callBase(),this._input().addClass(c),this._renderColorPreview()},_renderColorPreview(){this.$element().wrapInner((0,a.default)("<div>").addClass(h)),this._$colorBoxInputContainer=this.$element().children().eq(0),this._$colorResultPreview=(0,a.default)("<div>").addClass(p).appendTo(this._$textEditorInputContainer),this.option("value")?m.makeTransparentBackground(this._$colorResultPreview,this.option("value")):this._$colorBoxInputContainer.addClass(g)},_renderValue(){const{value:e,editAlphaChannel:t}=this.option(),i=e&&t?m.makeRgba(e):e;return this.option("text",i),this.callBase()},_resetInputValue(){const e=this._input(),t=this.option("value");e.val(t),this._updateColorViewValue(t)},_updateColorViewValue(e){this._colorView&&this._colorView.option({value:e,matchValue:e})},_valueChangeEventHandler(e){let t=this._input().val();t&&(t=this._applyColorFromInput(t),this._updateColorViewValue(t)),this.callBase(e,t)},_applyColorFromInput(e){const{editAlphaChannel:t}=this.option();return new n.default(e).colorIsInvalid?(this._resetInputValue(),this.option("value")):t?m.makeRgba(e):e},_clean(){this.callBase(),delete this._shouldSaveEmptyValue},_optionChanged(e){const{value:t}=e,{name:i}=e;switch(i){case"value":this._$colorBoxInputContainer.toggleClass(g,!t),t?m.makeTransparentBackground(this._$colorResultPreview,t):this._$colorResultPreview.removeAttr("style"),null===t&&(this._shouldSaveEmptyValue=!0),this._updateColorViewValue(t),this._shouldSaveEmptyValue=!1,this.callBase(e);break;case"applyButtonText":case"cancelButtonText":this.callBase(e),this._popup&&this._addPopupBottomClasses();break;case"editAlphaChannel":case"keyStep":this._colorView&&this._colorView.option(i,t);break;default:this.callBase(e)}}});(0,o.default)("dxColorBox",v);t.default=v},98264:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=C(i(43101)),o=i(88603),a=i(64044),s=C(i(92774)),r=i(98834),l=C(i(4671)),d=C(i(92848)),u=C(i(65951)),c=C(i(19427)),h=C(i(64553)),p=i(52576),g=i(57653),_=C(i(5298)),f=C(i(78694)),m=C(i(48042)),v=C(i(20780));function C(e){return e&&e.__esModule?e:{default:e}}const y="dx-colorview-container-row",b="dx-colorview-palette-gradient",x="dx-colorview-palette-gradient-white",w="dx-colorview-palette-gradient-black",S="dx-colorview-label-hex",D="dx-colorview-color-preview",I="dx-colorview-color-preview-color-current",E="dx-colorview-color-preview-color-new",T="#000000",A=f.default.inherit({_supportedKeys(){const e=this.option("rtlEnabled"),t=this,i=function(e){let i=100/t._paletteWidth;return e.shiftKey&&(i*=t.option("keyStep")),i=i>1?i:1,Math.round(i)},n=function(e){let i=t._currentColor.hsv.s+e;i>100?i=100:i<0&&(i=0),t._currentColor.hsv.s=i,l()},a=function(e){let i=100/t._paletteHeight;return e.shiftKey&&(i*=t.option("keyStep")),i=i>1?i:1,Math.round(i)},s=function(e){let i=t._currentColor.hsv.v+e;i>100?i=100:i<0&&(i=0),t._currentColor.hsv.v=i,l()};function l(){t._placePaletteHandle(),t._updateColorFromHsv(t._currentColor.hsv.h,t._currentColor.hsv.s,t._currentColor.hsv.v)}const d=function(e){let i=360/(t._hueScaleWrapperHeight-t._hueScaleHandleHeight);return e.shiftKey&&(i*=t.option("keyStep")),i=i>1?i:1,i},u=function(e){t._currentColor.hsv.h+=e,t._placeHueScaleHandle();const i=(0,o.locate)(t._$hueScaleHandle);t._updateColorHue(i.top+t._hueScaleHandleHeight/2)},c=function(i){let n=1/t._alphaChannelScaleWorkWidth;return i.shiftKey&&(n*=t.option("keyStep")),n=n>.01?n:.01,n=e?-n:n,n},h=function(e){t._currentColor.a+=e,t._placeAlphaChannelHandle();const i=(0,o.locate)(t._$alphaChannelHandle);t._calculateColorTransparencyByScaleWidth(i.left+t._alphaChannelHandleWidth/2)};return(0,p.extend)(this.callBase(),{upArrow(e){e.preventDefault(),e.stopPropagation(),(0,r.isCommandKeyPressed)(e)?this._currentColor.hsv.h<=360&&!this._isTopColorHue&&(this._saveValueChangeEvent(e),u(d(e))):this._currentColor.hsv.v<100&&(this._saveValueChangeEvent(e),s(a(e)))},downArrow(e){e.preventDefault(),e.stopPropagation(),(0,r.isCommandKeyPressed)(e)?this._currentColor.hsv.h>=0&&(this._isTopColorHue&&(this._currentColor.hsv.h=360),this._saveValueChangeEvent(e),u(-d(e))):this._currentColor.hsv.v>0&&(this._saveValueChangeEvent(e),s(-a(e)))},rightArrow(t){t.preventDefault(),t.stopPropagation(),(0,r.isCommandKeyPressed)(t)?(e?this._currentColor.a<1:this._currentColor.a>0&&this.option("editAlphaChannel"))&&(this._saveValueChangeEvent(t),h(-c(t))):this._currentColor.hsv.s<100&&(this._saveValueChangeEvent(t),n(i(t)))},leftArrow(t){t.preventDefault(),t.stopPropagation(),(0,r.isCommandKeyPressed)(t)?(e?this._currentColor.a>0:this._currentColor.a<1&&this.option("editAlphaChannel"))&&(this._saveValueChangeEvent(t),h(c(t))):this._currentColor.hsv.s>0&&(this._saveValueChangeEvent(t),n(-i(t)))},enter(e){this._fireEnterKeyPressed(e)}})},_getDefaultOptions(){return(0,p.extend)(this.callBase(),{value:null,matchValue:null,onEnterKeyPressed:void 0,editAlphaChannel:!1,keyStep:1,stylingMode:void 0})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===u.default.real().deviceType&&!u.default.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this._initColorAndOpacity(),this._initEnterKeyPressedAction()},_initEnterKeyPressedAction(){this._onEnterKeyPressedAction=this._createActionByOption("onEnterKeyPressed")},_fireEnterKeyPressed(e){this._onEnterKeyPressedAction&&this._onEnterKeyPressedAction({event:e})},_initColorAndOpacity(){this._setCurrentColor(this.option("value"))},_setCurrentColor(e){e=e||T;const t=new n.default(e);t.colorIsInvalid?(this._currentColor||(this._currentColor=new n.default(T)),this.option("value",this._currentColor.baseColor)):this._currentColor&&this._makeRgba(this._currentColor)===this._makeRgba(t)||(this._currentColor=t,this._$currentColor&&this._makeTransparentBackground(this._$currentColor,t))},_setBaseColor(e){const t=e||T,i=new n.default(t);if(!i.colorIsInvalid){this._makeRgba(this.option("matchValue")!==this._makeRgba(i))&&this._$baseColor&&this._makeTransparentBackground(this._$baseColor,i)}},_initMarkup(){this.callBase(),this.$element().addClass("dx-colorview"),this._renderColorPickerContainer()},_render(){this.callBase(),this._renderPalette(),this._renderHueScale(),this._renderControlsContainer(),this._renderControls(),this._renderAlphaChannelElements()},_makeTransparentBackground(e,t){t instanceof n.default||(t=new n.default(t)),e.css("backgroundColor",this._makeRgba(t))},_makeRgba:e=>(e instanceof n.default||(e=new n.default(e)),`rgba(${[e.r,e.g,e.b,e.a].join(", ")})`),_renderValue(){this.callBase(this.option("editAlphaChannel")?this._makeRgba(this._currentColor):this.option("value"))},_renderColorPickerContainer(){const e=this.$element();this._$colorPickerContainer=(0,h.default)("<div>").addClass("dx-colorview-container").appendTo(e),this._renderHtmlRows()},_renderHtmlRows(e){const t=this._$colorPickerContainer.find(`.${y}`),i=t.length;let n=i-(this.option("editAlphaChannel")?2:1);if(n>0&&t.eq(-1).remove(),n<0){n=Math.abs(n);const e=[];let o;for(o=0;o<n;o++)e.push((0,h.default)("<div>").addClass(y));if(i)for(o=0;o<e.length;o++)t.eq(0).after(e[o]);else this._$colorPickerContainer.append(e)}},_renderHtmlCellInsideRow:(e,t,i)=>(0,h.default)("<div>").addClass("dx-colorview-container-cell").addClass(i).appendTo(t.find(`.${y}`).eq(e)),_renderPalette(){const e=this._renderHtmlCellInsideRow(0,this._$colorPickerContainer,"dx-colorview-palette-cell"),t=(0,h.default)("<div>").addClass([b,x].join(" ")),i=(0,h.default)("<div>").addClass([b,w].join(" "));this._$palette=(0,h.default)("<div>").addClass("dx-colorview-palette").css("backgroundColor",this._currentColor.getPureColor().toHex()).appendTo(e),this._paletteHeight=(0,g.getHeight)(this._$palette),this._paletteWidth=(0,g.getWidth)(this._$palette),this._renderPaletteHandle(),this._$palette.append([t,i])},_renderPaletteHandle(){this._$paletteHandle=(0,h.default)("<div>").addClass("dx-colorview-palette-handle").appendTo(this._$palette);const e=`dx-${new c.default}`,t={id:e,role:"application"};this.setAria(t,this._$paletteHandle),this.setAria("activedescendant",e,this.option("target")),this._createComponent(this._$paletteHandle,_.default,{contentTemplate:null,boundary:this._$palette,allowMoveByClick:!0,boundOffset:function(){return-this._paletteHandleHeight/2}.bind(this),onDragMove:e=>{let{event:t}=e;const i=(0,o.locate)(this._$paletteHandle);this._updateByDrag=!0,this._saveValueChangeEvent(t),this._updateColorFromHsv(this._currentColor.hsv.h,this._calculateColorSaturation(i),this._calculateColorValue(i))}}),this._paletteHandleWidth=(0,g.getWidth)(this._$paletteHandle),this._paletteHandleHeight=(0,g.getHeight)(this._$paletteHandle),this._placePaletteHandle()},_placePaletteHandle(){(0,o.move)(this._$paletteHandle,{left:Math.round(this._paletteWidth*this._currentColor.hsv.s/100-this._paletteHandleWidth/2),top:Math.round(this._paletteHeight-this._paletteHeight*this._currentColor.hsv.v/100-this._paletteHandleHeight/2)})},_calculateColorValue(e){const t=Math.floor(e.top+this._paletteHandleHeight/2);return 100-Math.round(100*t/this._paletteHeight)},_calculateColorSaturation(e){const t=Math.floor(e.left+this._paletteHandleWidth/2);return Math.round(100*t/this._paletteWidth)},_updateColorFromHsv(e,t,i){const{a:o}=this._currentColor;this._currentColor=new n.default(`hsv(${[e,t,i].join(",")})`),this._currentColor.a=o,this._updateColorParamsAndColorPreview(),this.applyColor()},_renderHueScale(){const e=this._renderHtmlCellInsideRow(0,this._$colorPickerContainer,"dx-colorview-hue-scale-cell");this._$hueScaleWrapper=(0,h.default)("<div>").addClass("dx-colorview-hue-scale-wrapper").appendTo(e),this._$hueScale=(0,h.default)("<div>").addClass("dx-colorview-hue-scale").appendTo(this._$hueScaleWrapper),this._hueScaleHeight=(0,g.getHeight)(this._$hueScale),this._hueScaleWrapperHeight=(0,g.getOuterHeight)(this._$hueScaleWrapper),this._renderHueScaleHandle()},_renderHueScaleHandle(){this._$hueScaleHandle=(0,h.default)("<div>").addClass("dx-colorview-hue-scale-handle").appendTo(this._$hueScaleWrapper),this._createComponent(this._$hueScaleHandle,_.default,{contentTemplate:null,boundary:this._$hueScaleWrapper,allowMoveByClick:!0,dragDirection:"vertical",onDragMove:e=>{let{event:t}=e;this._updateByDrag=!0,this._saveValueChangeEvent(t),this._updateColorHue((0,o.locate)(this._$hueScaleHandle).top+this._hueScaleHandleHeight/2)}}),this._hueScaleHandleHeight=(0,g.getHeight)(this._$hueScaleHandle),this._placeHueScaleHandle()},_placeHueScaleHandle(){const e=this._hueScaleWrapperHeight,t=this._hueScaleHandleHeight;let i=(e-t)*(360-this._currentColor.hsv.h)/360;e<i+t&&(i=e-t),i<0&&(i=0),(0,o.move)(this._$hueScaleHandle,{top:Math.round(i)})},_updateColorHue(e){let t=360-Math.round(360*(e-this._hueScaleHandleHeight/2)/(this._hueScaleWrapperHeight-this._hueScaleHandleHeight));const i=this._currentColor.hsv.s,n=this._currentColor.hsv.v;this._isTopColorHue=!1,t=t<0?0:t,t>=360&&(this._isTopColorHue=!0,t=0),this._updateColorFromHsv(t,i,n),this._$palette.css("backgroundColor",this._currentColor.getPureColor().toHex())},_renderControlsContainer(){const e=this._renderHtmlCellInsideRow(0,this._$colorPickerContainer);this._$controlsContainer=(0,h.default)("<div>").addClass("dx-colorview-controls-container").appendTo(e)},_renderControls(){this._renderColorsPreview(),this._renderRgbInputs(),this._renderHexInput()},_renderColorsPreview(){const e=(0,h.default)("<div>").addClass("dx-colorview-color-preview-container").appendTo(this._$controlsContainer),t=(0,h.default)("<div>").addClass("dx-colorview-color-preview-container-inner").appendTo(e);this._$currentColor=(0,h.default)("<div>").addClass([D,E].join(" ")),this._$baseColor=(0,h.default)("<div>").addClass([D,I].join(" ")),this._makeTransparentBackground(this._$baseColor,this.option("matchValue")),this._makeTransparentBackground(this._$currentColor,this._currentColor),t.append([this._$baseColor,this._$currentColor])},_renderAlphaChannelElements(){this.option("editAlphaChannel")&&(this._$colorPickerContainer.find(`.${y}`).eq(1).addClass("dx-colorview-alpha-channel-row"),this._renderAlphaChannelScale(),this._renderAlphaChannelInput())},_renderRgbInputs(){this._rgbInputsWithLabels=[this._renderEditorWithLabel({editorType:m.default,value:this._currentColor.r,onValueChanged:this._updateColor.bind(this,!1),labelText:"R",labelAriaText:l.default.format("dxColorView-ariaRed"),labelClass:"dx-colorview-label-red"}),this._renderEditorWithLabel({editorType:m.default,value:this._currentColor.g,onValueChanged:this._updateColor.bind(this,!1),labelText:"G",labelAriaText:l.default.format("dxColorView-ariaGreen"),labelClass:"dx-colorview-label-green"}),this._renderEditorWithLabel({editorType:m.default,value:this._currentColor.b,onValueChanged:this._updateColor.bind(this,!1),labelText:"B",labelAriaText:l.default.format("dxColorView-ariaBlue"),labelClass:"dx-colorview-label-blue"})],this._$controlsContainer.append(this._rgbInputsWithLabels),this._rgbInputs=[this._rgbInputsWithLabels[0].find(".dx-numberbox").dxNumberBox("instance"),this._rgbInputsWithLabels[1].find(".dx-numberbox").dxNumberBox("instance"),this._rgbInputsWithLabels[2].find(".dx-numberbox").dxNumberBox("instance")]},_renderEditorWithLabel(e){const t=(0,h.default)("<div>"),i=(0,h.default)("<label>").addClass(e.labelClass).text(`${e.labelText}:`).append(t);s.default.off(i,a.name),s.default.on(i,a.name,(e=>{e.preventDefault()}));const{editorType:n}=e,o=(0,p.extend)({value:e.value,onValueChanged:e.onValueChanged,onKeyboardHandled:e=>this._keyboardHandler(e)},{stylingMode:this.option("stylingMode")});n===m.default&&(o.min=e.min||0,o.max=e.max||255,o.step=e.step||1);return new n(t,o).registerKeyHandler("enter",(e=>{this._fireEnterKeyPressed(e)})),this.setAria("label",e.labelAriaText,t),i},hexInputOptions(){return{editorType:v.default,value:this._currentColor.toHex().replace("#",""),onValueChanged:this._updateColor.bind(this,!0),labelClass:S,labelText:"#",labelAriaText:l.default.format("dxColorView-ariaHex")}},_renderHexInput(){this._hexInput=v.default.getInstance(this._renderEditorWithLabel(this.hexInputOptions()).appendTo(this._$controlsContainer).find(".dx-textbox"));const e=`dx-${new c.default}`,t=this._$controlsContainer.find(`.${S}`).find(".dx-texteditor-input");this.setAria("id",e,t),this.setAria("labelledby",e,this._$paletteHandle)},_renderAlphaChannelScale(){const e=this._renderHtmlCellInsideRow(1,this._$colorPickerContainer,"dx-colorview-alpha-channel-cell"),t=(0,h.default)("<div>").addClass("dx-colorview-alpha-channel-border").appendTo(e),i=(0,h.default)("<div>").addClass("dx-colorview-alpha-channel-wrapper").appendTo(t);this._$alphaChannelScale=(0,h.default)("<div>").addClass("dx-colorview-alpha-channel-scale").appendTo(i),this._makeCSSLinearGradient(this._$alphaChannelScale),this._renderAlphaChannelHandle(e)},_makeCSSLinearGradient(e){const t=this._currentColor,i=`${t.r},${t.g},${t.b}`,n=this.option("rtlEnabled"),o=`linear-gradient(-90deg, ${`rgba(${i}, ${n?"1":"0"})`}, ${`rgba(${i}, ${n?"0":"1"})`})`;e.css("backgroundImage",o)},_renderAlphaChannelInput(){const e=this,t=this._renderHtmlCellInsideRow(1,this._$colorPickerContainer);e._alphaChannelInput=this._renderEditorWithLabel({editorType:m.default,value:this._currentColor.a,max:1,step:.1,onValueChanged(t){let{value:i}=t;i=e._currentColor.isValidAlpha(i)?i:e._currentColor.a,t.event&&e._saveValueChangeEvent(t.event),e._updateColorTransparency(i),e._placeAlphaChannelHandle()},labelClass:"dx-colorview-alpha-channel-label",labelText:"Alpha",labelAriaText:l.default.format("dxColorView-ariaAlpha")}).appendTo(t).find(".dx-numberbox").dxNumberBox("instance")},_updateColorTransparency(e){this._currentColor.a=e,this.applyColor()},_renderAlphaChannelHandle(e){this._$alphaChannelHandle=(0,h.default)("<div>").addClass("dx-colorview-alpha-channel-handle").appendTo(e),this._createComponent(this._$alphaChannelHandle,_.default,{contentTemplate:null,boundary:e,allowMoveByClick:!0,dragDirection:"horizontal",onDragMove:e=>{let{event:t}=e;this._updateByDrag=!0;const i=this._$alphaChannelHandle,n=(0,o.locate)(i).left+this._alphaChannelHandleWidth/2;this._saveValueChangeEvent(t),this._calculateColorTransparencyByScaleWidth(n)}}),this._alphaChannelHandleWidth=(0,g.getWidth)(this._$alphaChannelHandle),this._alphaChannelScaleWorkWidth=(0,g.getWidth)(e)-this._alphaChannelHandleWidth,this._placeAlphaChannelHandle()},_calculateColorTransparencyByScaleWidth(e){let t=(e-this._alphaChannelHandleWidth/2)/this._alphaChannelScaleWorkWidth;const i=this.option("rtlEnabled");t=i?t:1-t,e>=this._alphaChannelScaleWorkWidth+this._alphaChannelHandleWidth/2?t=i?1:0:t<1&&(t=t.toFixed(2));const n=this._alphaChannelInput.option("value");t=Math.max(t,0),t=Math.min(t,1),t===n?this._updateByDrag=!1:this._alphaChannelInput.option("value",t)},_placeAlphaChannelHandle(){let e=this._alphaChannelScaleWorkWidth*(1-this._currentColor.a);e<0&&(e=0),this._alphaChannelScaleWorkWidth<e&&(e=this._alphaChannelScaleWorkWidth),(0,o.move)(this._$alphaChannelHandle,{left:this.option("rtlEnabled")?this._alphaChannelScaleWorkWidth-e:e})},applyColor(){const e=this.option("value"),t=this.option("editAlphaChannel")?this._makeRgba(this._currentColor):this._currentColor.toHex();this._makeTransparentBackground(this._$currentColor,this._currentColor),t===e?this._updateByDrag=!1:this.option("value",t)},cancelColor(){this._initColorAndOpacity(),this._refreshMarkup()},_updateColor(e,t){let i,o;e?o=this._validateHex(`#${this._hexInput.option("value")}`):(i=this._validateRgb(),this._alphaChannelInput?(i.push(this._alphaChannelInput.option("value")),o=`rgba(${i.join(", ")})`):o=`rgb(${i.join(", ")})`),this._suppressEditorsValueUpdating||(this._currentColor=new n.default(o),this._saveValueChangeEvent(t.event),this.applyColor(),this._refreshMarkup())},_validateHex(e){return this._currentColor.isValidHex(e)?e:this._currentColor.toHex()},_validateRgb(){let e=this._rgbInputs[0].option("value"),t=this._rgbInputs[1].option("value"),i=this._rgbInputs[2].option("value");return this._currentColor.isValidRGB(e,t,i)||(e=this._currentColor.r,t=this._currentColor.g,i=this._currentColor.b),[e,t,i]},_refreshMarkup(){this._placeHueScaleHandle(),this._placePaletteHandle(),this._updateColorParamsAndColorPreview(),this._$palette.css("backgroundColor",this._currentColor.getPureColor().toHex()),this._$alphaChannelHandle&&(this._updateColorTransparency(this._currentColor.a),this._placeAlphaChannelHandle())},_updateColorParamsAndColorPreview(){this._suppressEditorsValueUpdating=!0,this._hexInput.option("value",this._currentColor.toHex().replace("#","")),this._rgbInputs[0].option("value",this._currentColor.r),this._rgbInputs[1].option("value",this._currentColor.g),this._rgbInputs[2].option("value",this._currentColor.b),this._suppressEditorsValueUpdating=!1,this.option("editAlphaChannel")&&(this._makeCSSLinearGradient.call(this,this._$alphaChannelScale),this._alphaChannelInput.option("value",this._currentColor.a))},_optionChanged(e){const{value:t}=e;switch(e.name){case"value":this._setCurrentColor(t),this._updateByDrag||this._refreshMarkup(),this._updateByDrag=!1,this.callBase(e);break;case"matchValue":this._setBaseColor(t);break;case"onEnterKeyPressed":this._initEnterKeyPressedAction();break;case"editAlphaChannel":this._$colorPickerContainer&&(this._renderHtmlRows("editAlphaChannel"),this._renderAlphaChannelElements());break;case"keyStep":break;case"stylingMode":this._renderControls();break;default:this.callBase(e)}}});(0,d.default)("dxColorView",A);t.default=A},66900:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=E(i(3030)),a=i(80248),s=E(i(92774)),r=E(i(68095)),l=i(98834),d=E(i(92848)),u=E(i(65951)),c=E(i(64960)),h=i(61404),p=E(i(19427)),g=E(i(64553)),_=i(17781),f=i(87739),m=i(86858),v=i(52576),C=i(21274),y=i(57653),b=i(11528),x=i(3104),w=E(i(89132)),S=E(i(20876)),D=i(52071),I=E(i(76882));function E(e){return e&&e.__esModule?e:{default:e}}const T="dx-menu",A=`${T}-item`,O=`${A}-expanded`,P=`${T}-items-container`,k=`${A}-wrapper`,M="dx-submenu",R="dx-context-menu",L="dx-state-hover",B="down",V="first",F="last",H=["onShowing","onShown","onSubmenuCreated","onHiding","onHidden","onPositioning","onLeftFirstItem","onLeftLastItem","onCloseRootSubmenu","onExpandLastSubmenu"],N=["up",B,V,F],z="dxcontextmenu",W=(0,x.getWindow)();class $ extends I.default{getShowEvent(e){return(0,b.isObject)(e)?null!==e.name?e.name??z:null:e}getShowDelay(e){return(0,b.isObject)(e)&&e.delay}_getDefaultOptions(){return(0,v.extend)(super._getDefaultOptions(),{showEvent:z,hideOnOutsideClick:!0,position:{at:"top left",my:"top left"},onShowing:null,onShown:null,onSubmenuCreated:null,onHiding:null,onHidden:null,onPositioning:null,submenuDirection:"auto",visible:!1,target:void 0,onLeftFirstItem:null,onLeftLastItem:null,onCloseRootSubmenu:null,onExpandLastSubmenu:null})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>!(0,x.hasWindow)(),options:{animation:null}}])}_setDeprecatedOptions(){super._setDeprecatedOptions(),(0,v.extend)(this._deprecatedOptions,{closeOnOutsideClick:{since:"22.2",alias:"hideOnOutsideClick"}})}_initActions(){this._actions={},(0,C.each)(H,((e,t)=>{this._actions[t]=this._createActionByOption(t)||_.noop}))}_setOptionsByReference(){super._setOptionsByReference(),(0,v.extend)(this._optionsByReference,{animation:!0,selectedItem:!0})}_focusInHandler(){}_itemContainer(){return this._overlay?this._overlay.$content():(0,g.default)()}_eventBindingTarget(){return this._itemContainer()}itemsContainer(){return this._overlay?this._overlay.$content():void 0}_supportedKeys(){return(0,v.extend)(super._supportedKeys(),{space:()=>{const e=(0,g.default)(this.option("focusedElement"));this.hide(),e.length&&this._isSelectionEnabled()&&this.selectItem(e[0])},escape:this.hide})}_getActiveItem(e){const t=this._getAvailableItems(),i=t.filter(".dx-state-focused"),n=t.filter(`.${L}`);return n.closest(`.${P}`).find(`.${A}`).index(i)>=0?i:n.length?n:super._getActiveItem()}_moveFocus(e){const t=this._getItemsByLocation(e),i=this._getActiveItem(!0),n=this.itemsContainer().find(`.${L}`),o=!(!(0,g.default)(this.option("focusedElement")).length&&!n.length);let a;switch(e){case"up":a=o?this._prevItem(t):i,this._setFocusedElement(a),i.is(t.first())&&this._actions.onLeftFirstItem(i);break;case B:a=o?this._nextItem(t):i,this._setFocusedElement(a),i.is(t.last())&&this._actions.onLeftLastItem(i);break;case"right":a=this.option("rtlEnabled")?this._hideSubmenuHandler():this._expandSubmenuHandler(t,e),this._setFocusedElement(a);break;case"left":a=this.option("rtlEnabled")?this._expandSubmenuHandler(t,e):this._hideSubmenuHandler(),this._setFocusedElement(a);break;case V:a=t.first(),this._setFocusedElement(a);break;case F:a=t.last(),this._setFocusedElement(a);break;default:return super._moveFocus(e)}}_setFocusedElement(e){e&&0!==e.length&&(this.option("focusedElement",(0,h.getPublicElement)(e)),this._scrollToElement(e))}_scrollToElement(e){const t=e.closest(".dx-scrollable").dxScrollable("instance");null==t||t.scrollToElement(e)}_getItemsByLocation(e){const t=this._getActiveItem(!0);let i;return N.includes(e)&&(i=t.closest(`.${P}`).children().children()),i=this._getAvailableItems(i),i}_getAriaTarget(){return this.$element()}_refreshActiveDescendant(){if((0,b.isDefined)(this._overlay)){const e=this._overlay.$content();super._refreshActiveDescendant(e)}}_hideSubmenuHandler(){const e=this._getActiveItem(!0),t=e.parents(`.${O}`).first();if(t.length)return this._hideSubmenusOnSameLevel(t),this._hideSubmenu(e.closest(`.${M}`)),t;this._actions.onCloseRootSubmenu(e)}_expandSubmenuHandler(e,t){const i=this._getActiveItem(!0),n=this._getItemData(i),o=this._dataAdapter.getNodeByItem(n),a=this._hasSubmenu(o),s=i.children(`.${M}`);if(a&&!i.hasClass("dx-state-disabled"))return s.length&&"hidden"!==s.css("visibility")||this._showSubmenu(i),this._nextItem(this._getItemsByLocation(t));this._actions.onExpandLastSubmenu(i)}_clean(){this._overlay&&(this._overlay.$element().remove(),this._overlay=null),this._detachShowContextMenuEvents(this._getTarget()),super._clean()}_initMarkup(){this.$element().addClass("dx-has-context-menu"),super._initMarkup()}_render(){super._render(),this._renderVisibility(this.option("visible")),this._addWidgetClass()}_isTargetOutOfComponent(e){return!(0!==(0,g.default)(e).closest(`.${R}`).length)}_focusOutHandler(e){const{relatedTarget:t}=e;if(t){this._isTargetOutOfComponent(t)&&this.hide()}super._focusOutHandler(e)}_renderContentImpl(){this._detachShowContextMenuEvents(this._getTarget()),this._attachShowContextMenuEvents()}_attachKeyboardEvents(){!this._keyboardListenerId&&this._focusTarget().length&&super._attachKeyboardEvents()}_renderContextMenuOverlay(){if(this._overlay)return;const e=this._getOverlayOptions();this._overlay=this._createComponent((0,g.default)("<div>").appendTo(this._$element),w.default,e);const t=this._overlay.$content();t.addClass(R),this._addCustomCssClass(t),this._addPlatformDependentClass(t),this._attachContextMenuEvent()}preventShowingDefaultContextMenuAboveOverlay(){const e=this._itemContainer(),t=(0,l.addNamespace)(a.name,this.NAME);s.default.off(e,t,`.${M}`),s.default.on(e,t,`.${M}`,(i=>{i.stopPropagation(),i.preventDefault(),s.default.off(e,t,`.${M}`)}))}_itemContextMenuHandler(e){super._itemContextMenuHandler(e),e.stopPropagation()}_addPlatformDependentClass(e){u.default.current().phone&&e.addClass("dx-menu-phone-overlay")}_detachShowContextMenuEvents(e){const t=this.getShowEvent(this.option("showEvent"));if(!t)return;const i=(0,l.addNamespace)(t,this.NAME);this._showContextMenuEventHandler?s.default.off(c.default.getDocument(),i,e,this._showContextMenuEventHandler):s.default.off((0,g.default)(e),i)}_attachShowContextMenuEvents(){const e=this._getTarget(),t=this.getShowEvent(this.option("showEvent"));if(!t)return;const i=(0,l.addNamespace)(t,this.NAME);let n=this._createAction((e=>{const t=this.getShowDelay(this.option("showEvent"));t?setTimeout((()=>this._show(e.event)),t):this._show(e.event)}),{validatingTargetName:"target"});const o=e=>n({event:e,target:(0,g.default)(e.currentTarget)});n=this._createAction(n),(0,b.isRenderer)(e)||e.nodeType||(0,b.isWindow)(e)?(this._showContextMenuEventHandler=void 0,s.default.on(e,i,o)):(this._showContextMenuEventHandler=o,s.default.on(c.default.getDocument(),i,e,this._showContextMenuEventHandler))}_hoverEndHandler(e){super._hoverEndHandler(e),e.stopPropagation()}_renderDimensions(){}_renderContainer(e,t){const i=t||this._itemContainer();(e=(0,g.default)("<div>")).appendTo(i).addClass(M).css("visibility",t?"hidden":"visible"),e.parent().hasClass("dx-overlay-content")||this._addCustomCssClass(e);const n=super._renderContainer(e);return t?n:this.option("width")?n.css("minWidth",this.option("width")):this.option("height")?n.css("minHeight",this.option("height")):n}_renderSubmenuItems(e,t){this._renderItems(this._getChildNodes(e),t);const i=t.children(`.${M}`);this._actions.onSubmenuCreated({itemElement:(0,h.getPublicElement)(t),itemData:e.internalFields.item,submenuElement:(0,h.getPublicElement)(i)}),this._initScrollable(i),this.setAria({role:"menu"},i)}_getOverlayOptions(){const e=this.option("position");return{focusStateEnabled:this.option("focusStateEnabled"),animation:this.option("animation"),innerOverlay:!0,hideOnOutsideClick:e=>this._hideOnOutsideClickHandler(e),propagateOutsideClick:!0,hideOnParentScroll:!0,deferRendering:!1,position:{at:e.at,my:e.my,of:this._getTarget(),collision:"flipfit"},shading:!1,showTitle:!1,height:"auto",width:"auto",onShown:this._overlayShownActionHandler.bind(this),onHiding:this._overlayHidingActionHandler.bind(this),onHidden:this._overlayHiddenActionHandler.bind(this),visualContainer:W}}_overlayShownActionHandler(e){this._actions.onShown(e)}_overlayHidingActionHandler(e){this._actions.onHiding(e),e.cancel||(this._hideAllShownSubmenus(),this._setOptionWithoutOptionChange("visible",!1))}_overlayHiddenActionHandler(e){this._actions.onHidden(e)}_shouldHideOnOutsideClick(e){const{closeOnOutsideClick:t,hideOnOutsideClick:i}=this.option();return(0,b.isFunction)(i)?i(e):(0,b.isFunction)(t)?t(e):i||t}_hideOnOutsideClickHandler(e){if(!this._shouldHideOnOutsideClick(e))return!1;if(c.default.isDocument(e.target))return!0;const t=this._getActiveItemsContainer(e.target),i=this._getItemsContainers(),n=this._searchActiveItem(e.target),o=this.$element().parents(`.${A}`),a=n[0]===o[0]&&n.length&&o.length;return!(this._isIncludeOverlay(t,i)&&n.length)&&!a||("onClick"===this._getShowSubmenuMode()&&this._hideAllShownChildSubmenus(n),!1)}_getActiveItemsContainer(e){return(0,g.default)(e).closest(`.${P}`)}_getItemsContainers(){return this._overlay.$content().find(`.${P}`)}_searchActiveItem(e){return(0,g.default)(e).closest(`.${A}`).eq(0)}_isIncludeOverlay(e,t){let i=!1;return(0,C.each)(t,((t,n)=>{e.is(n)&&!i&&(i=!0)})),i}_hideAllShownChildSubmenus(e){const t=e.find(`.${M}`),i=(0,v.extend)([],this._shownSubmenus);t.length>0&&(0,C.each)(i,((t,i)=>{const n=this._searchActiveItem(i.context).parent();n.parent().is(e.parent().parent())&&!n.is(e.parent())&&this._hideSubmenu(i)}))}_initScrollable(e){this._createComponent(e,S.default,{useKeyboard:!1,_onVisibilityChanged:e=>{e.scrollTo(0)}})}_setSubMenuHeight(e,t,i){const n=e.find(`.${P}`),o=(0,y.getOuterHeight)(n),a=this._getMaxHeight(t,!i),s=Math.min(o,a);e.css("height",i?s:"100%")}_getMaxHeight(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=(0,y.getOuterHeight)(W),n=(0,b.isRenderer)(e),o=c.default.getDocument(),a=e.length&&e[0]===o;if(!n||a)return i;const s=e[0].getBoundingClientRect().top,r=(0,y.getOuterHeight)(e);return(t?Math.max(s,i-s-r):Math.max(s+r,i-s))-10}_dimensionChanged(){this._shownSubmenus&&this._shownSubmenus.forEach((e=>{const t=e.closest(`.${A}`);this._setSubMenuHeight(e,t,!0),this._scrollToElement(t);const i=this._getSubmenuPosition(t);o.default.setup(e,i)}))}_getSubmenuBorderWidth(){return(0,D.isMaterialBased)((0,D.current)())?0:1}_showSubmenu(e){const t=this._dataAdapter.getNodeByItem(this._getItemData(e));if(this._hideSubmenusOnSameLevel(e),!this._hasSubmenu(t))return;let i=e.children(`.${M}`);const n=i.length;super._showSubmenu(e),n||(this._renderSubmenuItems(t,e),i=e.children(`.${M}`)),this._setSubMenuHeight(i,e,!0),this._isSubmenuVisible(i)||this._drawSubmenu(e)}_hideSubmenusOnSameLevel(e){const t=e.parent(`.${k}`).siblings().find(`.${O}`);t.length&&(t.removeClass(O),this._hideSubmenu(t.find(`.${M}`)))}_hideSubmenuGroup(e){this._isSubmenuVisible(e)&&this._hideSubmenuCore(e)}_isSubmenuVisible(e){return"visible"===e.css("visibility")}_drawSubmenu(e){const t=this.option("animation")?this.option("animation").show:{},i=e.children(`.${M}`),a=this._getSubmenuPosition(e);this._overlay&&this._overlay.option("visible")&&((0,b.isDefined)(this._shownSubmenus)||(this._shownSubmenus=[]),this._shownSubmenus.includes(i)||this._shownSubmenus.push(i),t&&n.fx.stop(i),o.default.setup(i,a),t&&((0,b.isPlainObject)(t.to)&&(t.to.position=a),this._animate(i,t)),i.css("visibility","visible"))}_animate(e,t){n.fx.animate(e,t)}_getSubmenuPosition(e){const t=this.option("submenuDirection").toLowerCase(),i={collision:"flip",of:e.parent(`.${k}`),offset:{h:0,v:-1}};switch(t){case"left":i.at="left top",i.my="right top";break;case"right":i.at="right top",i.my="left top";break;default:this.option("rtlEnabled")?(i.at="left top",i.my="right top"):(i.at="right top",i.my="left top")}return i}_updateSubmenuVisibilityOnClick(e){if(!e.args.length)return;const{itemData:t}=e.args[0],i=this._dataAdapter.getNodeByItem(t);if(!i)return;const n=(0,g.default)(e.args[0].itemElement);let o=n.find(`.${M}`);if(this._hasSubmenu(i)&&!o.length&&(this._renderSubmenuItems(i,n),o=n.find(`.${M}`)),n.context===o.context&&"visible"===o.css("visibility"))return;this._updateSelectedItemOnClick(e);const a=t&&!1===t.closeMenuOnClick;if(t&&!t.disabled&&!a)if(0===o.length){const t=(0,g.default)(n.parents(`.${M}`)[0]);this._hideSubmenu(t),!e.canceled&&this._overlay&&this._overlay.option("visible")&&this.option("visible",!1)}else this._shownSubmenus&&this._shownSubmenus.length>0&&this._shownSubmenus[0].is(o)&&this._hideSubmenu(o),this._showSubmenu(n)}_hideSubmenu(e){const t=(0,v.extend)([],this._shownSubmenus);(0,C.each)(t,((t,i)=>{(e.is(i)||(0,m.contains)(e[0],i[0]))&&(i.parent().removeClass(O),this._hideSubmenuCore(i))}))}_hideSubmenuCore(e){const t=this._shownSubmenus.indexOf(e),i=this.option("animation")?this.option("animation").hide:null;t>=0&&this._shownSubmenus.splice(t,1),this._stopAnimate(e),i&&this._animate(e,i),e.css("visibility","hidden");e.dxScrollable("instance").scrollTo(0),this.option("focusedElement",null)}_stopAnimate(e){n.fx.stop(e,!0)}_hideAllShownSubmenus(){const e=(0,v.extend)([],this._shownSubmenus);this._overlay.$content().find(`.${O}`).removeClass(O),(0,C.each)(e,((e,t)=>{this._hideSubmenu(t)}))}_visibilityChanged(e){e&&this._renderContentImpl()}_optionChanged(e){if(H.includes(e.name))this._initActions();else switch(e.name){case"visible":this._renderVisibility(e.value);break;case"showEvent":case"position":case"submenuDirection":this._invalidate();break;case"target":e.previousValue&&this._detachShowContextMenuEvents(e.previousValue),this._invalidate();break;case"closeOnOutsideClick":case"hideOnOutsideClick":break;default:super._optionChanged(e)}}_renderVisibility(e){return e?this._show():this._hide()}_toggleVisibility(){}_show(e){const t={jQEvent:e};let i=(0,f.Deferred)().reject().promise();if(this._actions.onShowing(t),t.cancel)return i;const n=this._positionContextMenu(e);if(n){var o;this._overlay||(this._renderContextMenuOverlay(),this._overlay.$content().addClass(this._widgetClass()),this._renderFocusState(),this._attachHoverEvents(),this._attachClickEvent(),this._renderItems(this._dataAdapter.getRootNodes()));const t=(0,g.default)(this._overlay.content()).children(`.${M}`);this._setOptionWithoutOptionChange("visible",!0),this._overlay.option({height:()=>this._getMaxHeight(n.of),maxHeight:()=>{const e=t.find(`.${P}`),i=this._getSubmenuBorderWidth();return(0,y.getOuterHeight)(e)+2*i},position:n}),t.length&&this._setSubMenuHeight(t,n.of,!1),i=this._overlay.show(),e&&e.stopPropagation(),this._setAriaAttributes(),(null==e||null===(o=e.originalEvent)||void 0===o?void 0:o.type)===r.default.name&&this.preventShowingDefaultContextMenuAboveOverlay()}return i}_renderItems(e,t){super._renderItems(e,t);const i=(0,g.default)(this._overlay.content()).children(`.${M}`);i.length&&this._initScrollable(i)}_setAriaAttributes(){this._overlayContentId=`dx-${new p.default}`,this.setAria("owns",this._overlayContentId),this.setAria({id:this._overlayContentId,role:"menu"},this._overlay.$content())}_cleanAriaAttributes(){this._overlay&&this.setAria("id",null,this._overlay.$content()),this.setAria("owns",void 0)}_getTarget(){return this.option("target")||this.option("position").of||(0,g.default)(c.default.getDocument())}_getContextMenuPosition(){return(0,v.extend)({},this.option("position"),{of:this._getTarget()})}_positionContextMenu(e){let t=this._getContextMenuPosition();const i=this._isInitialOptionValue("position"),n=this._createActionByOption("onPositioning");e&&e.preventDefault&&i&&(t.of=e);const o={position:t,event:e};return n(o),o.cancel?t=null:o.event&&(o.event.cancel=!0,e.preventDefault()),t}_refresh(){if((0,x.hasWindow)())if(this._overlay){const e=this._overlay.option("position");super._refresh(),this._overlay&&this._overlay.option("position",e)}else super._refresh();else super._refresh()}_hide(){let e;return this._overlay&&(e=this._overlay.hide(),this._setOptionWithoutOptionChange("visible",!1)),this._cleanAriaAttributes(),this.option("focusedElement",null),e||(0,f.Deferred)().reject().promise()}toggle(e){const t=this.option("visible");return e=void 0===e?!t:e,this._renderVisibility(e)}show(){return this.toggle(!0)}hide(){return this.toggle(!1)}}(0,d.default)("dxContextMenu",$);t.default=$},45067:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(64553)),o=i(21274),a=s(i(60498));function s(e){return e&&e.__esModule?e:{default:e}}class r extends a.default{_getPlainItems(){return(0,o.map)(this._collectionWidget.option("items"),(function e(t){return t.items?[t].concat((0,o.map)(t.items,e)):t}))}_stringifyItem(e){return JSON.stringify(e,((e,t)=>"template"===e?this._getTemplateString(t):t))}_getTemplateString(e){let t;return t="object"==typeof e?(0,n.default)(e).text():e.toString(),t}}t.default=r},76882:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(65951)),o=p(i(64553)),a=i(17781),s=i(52576),r=i(21274),l=i(11528),d=i(63322),u=p(i(97271)),c=p(i(85149)),h=p(i(45067));function p(e){return e&&e.__esModule?e:{default:e}}const g="dx-menu",_=`${g}-no-icons`,f=`${g}-item`,m=`${f}-content`,v=`${f}-selected`,C=`${f}-wrapper`,y=`${g}-items-container`,b=`${f}-expanded`,x=`${g}-separator`,w=`${g}-last-group-item`,S=`${f}-has-text`,D=`${f}-has-icon`,I=`${f}-has-submenu`,E=`${f}-popout`,T=`${E}-container`,A=`${f}-text`,O={show:50,hide:300},P=`${A}-with-url`;class k extends u.default{_getDefaultOptions(){return(0,s.extend)(super._getDefaultOptions(),{items:[],cssClass:"",activeStateEnabled:!0,showSubmenuMode:{name:"onHover",delay:{show:50,hide:300}},animation:{show:{type:"fade",from:0,to:1,duration:100},hide:{type:"fade",from:1,to:0,duration:100}},selectByClick:!1,focusOnSelectedItem:!1,keyExpr:null,_itemAttributes:{role:"menuitem"},useInkRipple:!1})}_itemDataKey(){return"dxMenuItemDataKey"}_itemClass(){return f}_setAriaSelectionAttribute(e,t){}_selectedItemClass(){return v}_widgetClass(){return"dx-menu-base"}_focusTarget(){return this._itemContainer()}_clean(){this.option("focusedElement",null),super._clean()}_supportedKeys(){return(0,s.extend)(super._supportedKeys(),{space:()=>{const e=(0,o.default)(this.option("focusedElement"));e.length&&this._isSelectionEnabled()&&this.selectItem(e[0])},pageUp:a.noop,pageDown:a.noop})}_isSelectionEnabled(){return"single"===this.option("selectionMode")}_init(){this._activeStateUnit=`.${f}`,super._init(),this._renderSelectedItem(),this._initActions()}_getLinkContainer(e,t,i){const{linkAttr:n,url:o}=i;return null==e||e.addClass("dx-icon-with-url"),null==t||t.addClass(P),super._getLinkContainer(e,t,{linkAttr:n,url:o})}_addContent(e,t){const{html:i,url:n}=t;if(n){e.html(i);const n=this._getLinkContainer(this._getIconContainer(t),this._getTextContainer(t),t);e.append(n)}else super._addContent(e,t);e.append(this._getPopoutContainer(t)),this._addContentClasses(t,e.parent())}_getTextContainer(e){const{text:t}=e;if(!t)return;const i=(0,o.default)("<span>").addClass(A),n=(0,l.isPlainObject)(e)?t:String(e);return i.text(n)}_getItemExtraPropNames(){return["url","linkAttr"]}_getPopoutContainer(e){const{items:t}=e;let i;if(t&&t.length){const e=(0,o.default)("<div>").addClass(E);i=(0,o.default)("<span>").addClass(T).append(e)}return i}_getDataAdapterOptions(){return{rootValue:0,multipleSelection:!1,recursiveSelection:!1,recursiveExpansion:!1,searchValue:""}}_selectByItem(e){if(!e)return;const t=this._dataAdapter.getNodeByItem(e);this._dataAdapter.toggleSelection(t.internalFields.key,!0)}_renderSelectedItem(){const e=this._dataAdapter.getSelectedNodesKeys(),t=e.length&&e[0],i=this.option("selectedItem");if(!t)return void this._selectByItem(i);const n=this._dataAdapter.getNodeByKey(t);!1!==n.selectable&&(i?i!==n.internalFields.item&&(this._dataAdapter.toggleSelection(t,!1),this._selectByItem(i)):this.option("selectedItem",n.internalFields.item))}_initActions(){}_initMarkup(){super._initMarkup(),this.option("useInkRipple")&&this._renderInkRipple()}_renderInkRipple(){this._inkRipple=(0,d.render)()}_toggleActiveState(e,t,i){if(super._toggleActiveState.apply(this,arguments),!this._inkRipple)return;const n={element:e,event:i};t?this._inkRipple.showWave(n):this._inkRipple.hideWave(n)}_getShowSubmenuMode(){let e=this.option("showSubmenuMode");return e=(0,l.isObject)(e)?e.name:e,this._isDesktopDevice()?e:"onClick"}_initSelectedItems(){}_isDesktopDevice(){return"desktop"===n.default.real().deviceType}_initEditStrategy(){const e=h.default;this._editStrategy=new e(this)}_addCustomCssClass(e){e.addClass(this.option("cssClass"))}_itemWrapperSelector(){return`.${C}`}_hoverStartHandler(e){const t=this._getItemElementByEventArgs(e);t&&!this._isItemDisabled(t)&&(e.stopPropagation(),"onHover"===this._getShowSubmenuMode()&&(clearTimeout(this._showSubmenusTimeout),this._showSubmenusTimeout=setTimeout(this._showSubmenu.bind(this,t),this._getSubmenuDelay("show"))))}_getAvailableItems(e){return super._getAvailableItems(e).filter((function(){return"hidden"!==(0,o.default)(this).css("visibility")}))}_isItemDisabled(e){return this._disabledGetter(e.data(this._itemDataKey()))}_showSubmenu(e){this._addExpandedClass(e)}_addExpandedClass(e){(0,o.default)(e).addClass(b)}_getSubmenuDelay(e){const{delay:t}=this.option("showSubmenuMode");return(0,l.isDefined)(t)?(0,l.isObject)(t)?t[e]:t:O[e]}_getItemElementByEventArgs(e){let t=(0,o.default)(e.target);if(t.hasClass(this._itemClass())||t.get(0)===e.currentTarget)return t;for(;!t.hasClass(this._itemClass());)if(t=t.parent(),t.hasClass("dx-submenu"))return null;return t}_hoverEndHandler(e){clearTimeout(this._showSubmenusTimeout)}_hasSubmenu(e){return e&&e.internalFields.childrenKeys.length}_renderContentImpl(){this._renderItems(this._dataAdapter.getRootNodes())}_renderItems(e,t){if(!e.length)return;this.hasIcons=!1;const i=this._renderContainer(this.$element(),t);let n=-1,o=-1;(0,r.each)(e,((e,t)=>{const a=!1!==t.visible;a&&n<0&&(n=e);n<e&&(t.beginGroup||e===o)&&(o=a?e:e+1),e===o&&n<e&&this._renderSeparator(i),this._renderItem(e,t,i)})),this.hasIcons||i.addClass(_)}_renderContainer(e,t){const i=(0,o.default)("<ul>");return this.setAria("role","none",i),i.appendTo(e).addClass(y)}_createDOMElement(e){const t=(0,o.default)("<li>");return this.setAria("role","none",t),t.appendTo(e).addClass(C)}_renderItem(e,t,i,n){const{items:o=[]}=this.option(),a=n??this._createDOMElement(i);o[e+1]&&o[e+1].beginGroup&&a.addClass(w);const s=super._renderItem(e,t.internalFields.item,a);t.internalFields.item===this.option("selectedItem")&&s.addClass(v),s.attr("tabIndex",-1),this._hasSubmenu(t)&&this.setAria("haspopup","true",s)}_renderItemFrame(e,t,i){const n=i.children(`.${f}`);return n.length?n:super._renderItemFrame.apply(this,arguments)}_refreshItem(e,t){const i=this._dataAdapter.getNodeByItem(t),n=e.data(this._itemIndexKey()),o=e.closest("ul"),a=e.closest("li");this._renderItem(n,i,o,a)}_addContentClasses(e,t){const i=!!e.text&&!!e.text.length,n=!!e.icon,o=!!e.items&&!!e.items.length;t.toggleClass(S,i),t.toggleClass(D,n),this.hasIcons||(this.hasIcons=n),t.toggleClass(I,o)}_getItemContent(e){let t=super._getItemContent(e);return t.length||(t=e.children(`.${m}`)),t}_postprocessRenderItem(e){const t=(0,o.default)(e.itemElement),i=this._dataAdapter.getSelectedNodesKeys();if(!i.length||!this._selectedGetter(e.itemData)||!this._isItemSelectable(e.itemData))return void this._setAriaSelectionAttribute(t,"false");this._dataAdapter.getNodeByItem(e.itemData).internalFields.key===i[0]?(t.addClass(this._selectedItemClass()),this._setAriaSelectionAttribute(t,"true")):this._setAriaSelectionAttribute(t,"false")}_isItemSelectable(e){return!1!==e.selectable}_renderSeparator(e){(0,o.default)("<li>").appendTo(e).addClass(x)}_itemClickHandler(e){if(e._skipHandling)return;const t=this._createAction(this._updateSubmenuVisibilityOnClick.bind(this));this._itemDXEventHandler(e,"onItemClick",{},{beforeExecute:this._itemClick,afterExecute:t.bind(this)}),e._skipHandling=!0}_itemClick(e){const{event:t,itemData:i}=e.args[0],n=this._getItemElementByEventArgs(t),o=n&&n.find(".dx-item-url").get(0);i.url&&o&&o.click()}_updateSubmenuVisibilityOnClick(e){this._updateSelectedItemOnClick(e),"onClick"===this._getShowSubmenuMode()&&this._addExpandedClass(e.args[0].itemElement)}_updateSelectedItemOnClick(e){const t=e.args?e.args[0]:e;if(!this._isItemSelectAllowed(t.itemData))return;const i=this._dataAdapter.getSelectedNodesKeys(),n=i.length&&this._dataAdapter.getNodeByKey(i[0]);n&&this._toggleItemSelection(n,!1),n&&n.internalFields.item===t.itemData?(this._fireSelectionChangeEvent(null,this.option("selectedItem")),this._setOptionWithoutOptionChange("selectedItem",null)):this.selectItem(t.itemData)}_isItemSelectAllowed(e){const t=this._isSelectionEnabled()&&this.option("selectByClick");return!this._isContainerEmpty()&&t&&this._isItemSelectable(e)&&!this._itemsGetter(e)}_isContainerEmpty(){return this._itemContainer().is(":empty")}_syncSelectionOptions(){return(0,a.asyncNoop)()}_optionChanged(e){switch(e.name){case"showSubmenuMode":break;case"selectedItem":{const t=this._dataAdapter.getNodeByItem(e.value),i=this._dataAdapter.getSelectedNodesKeys()[0];if(t&&t.internalFields.key!==i){if(!1===t.selectable)break;i&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(i),!1),this._toggleItemSelection(t,!0),this._updateSelectedItems()}break}case"cssClass":case"position":case"selectByClick":case"animation":case"useInkRipple":this._invalidate();break;default:super._optionChanged(e)}}_toggleItemSelection(e,t){const i=this._getElementByItem(e.internalFields.item);i&&(0,o.default)(i).toggleClass(v),this._dataAdapter.toggleSelection(e.internalFields.key,t)}_getElementByItem(e){let t;return(0,r.each)(this._itemElements(),((i,n)=>(0,o.default)(n).data(this._itemDataKey())!==e||(t=n,!1))),t}_updateSelectedItems(e,t){(e||t)&&this._fireSelectionChangeEvent(t,e)}_fireSelectionChangeEvent(e,t){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:[e],removedItems:[t]})}selectItem(e){const t=e.nodeType?this._getItemData(e):e,i=this._dataAdapter.getSelectedNodesKeys()[0],n=this.option("selectedItem"),o=this._dataAdapter.getNodeByItem(t);o.internalFields.key!==i&&(i&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(i),!1),this._toggleItemSelection(o,!0),this._updateSelectedItems(n,t),this._setOptionWithoutOptionChange("selectedItem",t))}unselectItem(e){const t=e.nodeType?this._getItemData(e):e,i=this._dataAdapter.getNodeByItem(t),n=this.option("selectedItem");i.internalFields.selected&&(this._toggleItemSelection(i,!1),this._updateSelectedItems(n,null),this._setOptionWithoutOptionChange("selectedItem",null))}}k.ItemClass=c.default;t.default=k},10291:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=w(i(38662)),o=w(i(4671)),a=w(i(66636)),s=w(i(65951)),r=w(i(48314)),l=w(i(41380)),d=w(i(71051)),u=i(86858),c=i(52576),h=i(21274),p=i(4785),g=i(11528),_=i(3104),f=w(i(28906)),m=w(i(49403)),v=w(i(34092)),C=w(i(25417)),y=w(i(62905)),b=w(i(19838)),x=w(i(14922));function w(e){return e&&e.__esModule?e:{default:e}}const S=(0,_.getWindow)(),D="dx-datebox",I="dx-datebox-wrapper",E={calendar:"calendar",rollers:"rollers",list:"list",native:"native"},T={date:"date",datetime:"datetime",time:"time"},A="Calendar",O="DateView",P="Native",k="CalendarWithTime",M="List",R={Calendar:m.default,DateView:C.default,Native:b.default,CalendarWithTime:v.default,List:y.default},L=f.default.inherit({_supportedKeys(){return(0,c.extend)(this.callBase(),this._strategy.supportedKeys())},_renderButtonContainers(){this.callBase.apply(this,arguments),this._strategy.customizeButtons()},_getDefaultOptions(){return(0,c.extend)(this.callBase(),{type:"date",showAnalogClock:!0,value:null,dateSerializationFormat:void 0,min:void 0,max:void 0,displayFormat:null,interval:30,disabledDates:null,pickerType:E.calendar,invalidDateMessage:o.default.format("dxDateBox-validation-datetime"),dateOutOfRangeMessage:o.default.format("validation-range"),applyButtonText:o.default.format("OK"),adaptivityEnabled:!1,calendarOptions:{},useHiddenSubmitElement:!0,_showValidationIcon:!0})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"ios"},options:{"dropDownOptions.showTitle":!0}},{device:{platform:"android"},options:{buttonsLocation:"bottom after"}},{device(){const e=s.default.real(),{platform:t}=e;return"ios"===t||"android"===t},options:{pickerType:E.native}},{device:{platform:"generic",deviceType:"desktop"},options:{buttonsLocation:"bottom after"}}])},_initOptions(e){this._userOptions=(0,c.extend)({},e),this.callBase(e),this._updatePickerOptions()},_updatePickerOptions(){let e=this.option("pickerType");const t=this.option("type");e!==E.list||t!==T.datetime&&t!==T.date||(e=E.calendar),t===T.time&&e===E.calendar&&(e=E.list),this._pickerType=e,this._setShowDropDownButtonOption()},_setShowDropDownButtonOption(){const{platform:e}=s.default.real(),t="android"===e&&r.default.mozilla,i=this._isNativeType();let n="generic"!==e||!i;i&&t&&(n=!1),this.option({showDropDownButton:n})},_init(){this._initStrategy(),this.option((0,c.extend)({},this._strategy.getDefaultOptions(),this._userOptions)),delete this._userOptions,this.callBase()},_toLowerCaseFirstLetter:e=>e.charAt(0).toLowerCase()+e.substr(1),_initStrategy(){const e=this._getStrategyName(this._getFormatType()),t=R[e];this._strategy&&this._strategy.NAME===e||(this._strategy=new t(this))},_getFormatType(){const e=this.option("type"),t=/h|m|s/g.test(e);let i="";return/d|M|Y/g.test(e)&&(i+=T.date),t&&(i+=T.time),i},_getStrategyName(e){const t=this._pickerType;return t===E.rollers?O:t===E.native?P:e===T.date?A:e===T.datetime?k:M},_initMarkup(){this.$element().addClass(D),this.callBase(),this._refreshFormatClass(),this._refreshPickerTypeClass(),this._strategy.renderInputMinMax(this._input())},_render(){this.callBase(),this._formatValidationIcon()},_renderDimensions(){this.callBase(),this.$element().toggleClass("dx-auto-width",!this.option("width")),this._updatePopupWidth(),this._updatePopupHeight()},_dimensionChanged(){this.callBase(),this._updatePopupHeight()},_updatePopupHeight(){var e,t;this._popup&&(null===(e=(t=this._strategy)._updatePopupHeight)||void 0===e||e.call(t))},_refreshFormatClass(){const e=this.$element();(0,h.each)(T,((t,i)=>{e.removeClass(`${D}-${i}`)})),e.addClass(`${D}-${this.option("type")}`)},_refreshPickerTypeClass(){const e=this.$element();(0,h.each)(E,((t,i)=>{e.removeClass(`${D}-${i}`)})),e.addClass(`${D}-${this._pickerType}`)},_formatValidationIcon(){if(!(0,_.hasWindow)())return;const e=this._input().get(0),t=this.option("rtlEnabled"),i=this._getClearButtonWidth(),n=this._getLongestElementDimensions(),o=parseFloat(S.getComputedStyle(e).width)-i,a=n.width>o,{style:s}=e;this.$element().toggleClass("dx-show-invalid-badge",!a&&this.option("_showValidationIcon")),a?(void 0===this._storedPadding&&(this._storedPadding=t?n.leftPadding:n.rightPadding),t?s.paddingLeft=0:s.paddingRight=0):t?s.paddingLeft=`${this._storedPadding}px`:s.paddingRight=`${this._storedPadding}px`},_getClearButtonWidth(){let e=0;if(this._isClearButtonVisible()&&""===this._input().val()){const t=this.$element().find(".dx-clear-button-area").get(0);e=parseFloat(S.getComputedStyle(t).width)}return e},_getLongestElementDimensions(){const e=this._strategy.getDisplayFormat(this.option("displayFormat")),t=n.default.format(x.default.getLongestDate(e,n.default.getMonthNames(),n.default.getDayNames()),e),i=this._input(),o=i.get(0),a=(0,u.createTextElementHiddenCopy)(i,t),s=void 0!==this._storedPadding?this._storedPadding:0;a.appendTo(this.$element());const r=parseFloat(S.getComputedStyle(a.get(0)).width),l=parseFloat(S.getComputedStyle(o).paddingRight),d=parseFloat(S.getComputedStyle(o).paddingLeft),c=r+d+l+s;return a.remove(),{width:c,leftPadding:d,rightPadding:l}},_getKeyboardListeners(){return this.callBase().concat([this._strategy&&this._strategy.getKeyboardListener()])},_renderPopup(){this.callBase(),this._popup.$wrapper().addClass(I),this._renderPopupWrapper()},_getPopupToolbarItems(){var e,t;const i=this.callBase();return(null===(e=(t=this._strategy)._getPopupToolbarItems)||void 0===e?void 0:e.call(t,i))??i},_popupConfig(){const e=this.callBase();return(0,c.extend)(this._strategy.popupConfig(e),{title:this._getPopupTitle(),dragEnabled:!1})},_renderPopupWrapper(){if(!this._popup)return;const e=this.$element(),t=(0,c.extend)({},T,E);(0,h.each)(t,((t,i)=>{e.removeClass(`${I}-${i}`)})),this._popup.$wrapper().addClass(`${I}-${this.option("type")}`).addClass(`${I}-${this._pickerType}`).addClass("dx-dropdowneditor-overlay")},_renderPopupContent(){this.callBase(),this._strategy.renderPopupContent()},_popupShowingHandler(){this.callBase(),this._strategy.popupShowingHandler()},_popupShownHandler(){this.callBase(),this._strategy.renderOpenedState()},_popupHiddenHandler(){this.callBase(),this._strategy.renderOpenedState(),this._strategy.popupHiddenHandler()},_visibilityChanged(e){e&&this._formatValidationIcon()},_clearValueHandler(e){this.option("text",""),this.callBase(e)},_readOnlyPropValue(){if(this._pickerType===E.rollers)return!0;const{platform:e}=s.default.real();return this._isNativeType()&&("ios"===e||"android"===e)?this.option("readOnly"):this.callBase()},_isClearButtonVisible(){return this.callBase()&&!this._isNativeType()},_renderValue(){const e=this.dateOption("value");return this.option("text",this._getDisplayedText(e)),this._strategy.renderValue(),this.callBase()},_setSubmitValue(){const e=this.dateOption("value"),t=this.option("dateSerializationFormat"),i=x.default.SUBMIT_FORMATS_MAP[this.option("type")],n=t?d.default.serializeDate(e,t):x.default.toStandardDateFormat(e,i);this._getSubmitElement().val(n)},_getDisplayedText(e){const t=this.option("mode");let i;if("text"===t){const t=this._strategy.getDisplayFormat(this.option("displayFormat"));i=n.default.format(e,t)}else{const o=this._getFormatByMode(t);i=o?n.default.format(e,o):x.default.toStandardDateFormat(e,t)}return i},_getFormatByMode:e=>(0,p.inputType)(e)?null:x.default.FORMATS_MAP[e],_valueChangeEventHandler(e){const{text:t,type:i,validationError:n}=this.option(),o=this.dateOption("value");if(t===this._getDisplayedText(o))return void this._recallInternalValidation(o,n);const a=this._getParsedDate(t),s=o??this._getDateByDefault(),r=x.default.mergeDates(s,a,i),l=a&&"time"===i?r:a;if(this._applyInternalValidation(l).isValid){const i=this._getDisplayedText(r);s&&r&&s.getTime()===r.getTime()&&i!==t?this._renderValue():this.dateValue(r,e)}},_recallInternalValidation(e,t){t&&!t.editorSpecific||(this._applyInternalValidation(e),this._applyCustomValidation(e))},_getDateByDefault(){return this._strategy.useCurrentDateByDefault()&&this._strategy.getDefaultDate()},_getParsedDate(e){const t=this._strategy.getDisplayFormat(this.option("displayFormat"));return this._strategy.getParsedText(e,t)??void 0},_applyInternalValidation(e){const t=!!this.option("text")&&null!==e,i=!!e&&(0,g.isDate)(e)&&!isNaN(e.getTime()),n=i&&l.default.dateInRange(e,this.dateOption("min"),this.dateOption("max"),this.option("type")),o=!t&&!e||n;let a="";return i?n||(a=this.option("dateOutOfRangeMessage")):a=this.option("invalidDateMessage"),this._updateInternalValidationState(o,a),{isValid:o,isDate:i}},_updateInternalValidationState(e,t){this.option({isValid:e,validationError:e?null:{editorSpecific:!0,message:t}})},_applyCustomValidation(e){this.validationRequest.fire({editor:this,value:this._serializeDate(e)})},_isValueChanged(e){const t=this.dateOption("value");return(t&&t.getTime())!==(e&&e.getTime())},_isTextChanged(e){return this.option("text")!==(e&&this._getDisplayedText(e)||"")},_renderProps(){this.callBase(),this._input().attr("autocomplete","off")},_renderOpenedState(){this._isNativeType()||this.callBase(),this._strategy.isAdaptivityChanged()&&this._refreshStrategy()},_getPopupTitle(){const e=this.option("placeholder");if(e)return e;const t=this.option("type");return t===T.time?o.default.format("dxDateBox-simulatedDataPickerTitleTime"):t===T.date||t===T.datetime?o.default.format("dxDateBox-simulatedDataPickerTitleDate"):""},_refreshStrategy(){this._strategy.dispose(),this._initStrategy(),this.option(this._strategy.getDefaultOptions()),this._refresh()},_applyButtonHandler(e){const t=this._strategy.getValue();this.dateValue(t,e.event),this.callBase()},_dispose(){var e;this.callBase(),null===(e=this._strategy)||void 0===e||e.dispose()},_isNativeType(){return this._pickerType===E.native},_updatePopupTitle(){var e;null===(e=this._popup)||void 0===e||e.option("title",this._getPopupTitle())},_optionChanged(e){switch(e.name){case"showClearButton":case"buttons":case"isValid":case"readOnly":this.callBase.apply(this,arguments),this._formatValidationIcon();break;case"pickerType":this._updatePickerOptions({pickerType:e.value}),this._refreshStrategy(),this._refreshPickerTypeClass(),this._invalidate();break;case"type":this._updatePickerOptions({format:e.value}),this._refreshStrategy(),this._refreshFormatClass(),this._renderPopupWrapper(),this._formatValidationIcon(),this._updateValue();break;case"placeholder":this.callBase.apply(this,arguments),this._updatePopupTitle();break;case"min":case"max":{const e=this.option("isValid");this._applyInternalValidation(this.dateOption("value")),e||this._applyCustomValidation(this.dateOption("value")),this._invalidate();break}case"dateSerializationFormat":case"interval":case"disabledDates":case"calendarOptions":this._invalidate();break;case"displayFormat":this.option("text",this._getDisplayedText(this.dateOption("value"))),this._renderInputValue();break;case"text":this._strategy.textChangedHandler(e.value),this.callBase.apply(this,arguments);break;case"showDropDownButton":this._formatValidationIcon(),this.callBase.apply(this,arguments);break;case"todayButtonText":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"invalidDateMessage":case"dateOutOfRangeMessage":case"adaptivityEnabled":case"showAnalogClock":case"_showValidationIcon":break;default:this.callBase.apply(this,arguments)}},_getSerializationFormat(){const e=this.option("value");return this.option("dateSerializationFormat")&&(0,a.default)().forceIsoDateParsing?this.option("dateSerializationFormat"):(0,g.isNumeric)(e)?"number":(0,g.isString)(e)?d.default.getDateSerializationFormat(e):void 0},_updateValue(e){this.callBase(),this._applyInternalValidation(e??this.dateOption("value"))},dateValue(e,t){const i=this._isValueChanged(e);return i&&t&&this._saveValueChangeEvent(t),i||(this._isTextChanged(e)?this._updateValue(e):""===this.option("text")&&this._applyCustomValidation(e)),this.dateOption("value",e)},dateOption(e,t){if(1===arguments.length)return d.default.deserializeDate(this.option(e));this.option(e,this._serializeDate(t))},_serializeDate(e){const t=this._getSerializationFormat();return d.default.serializeDate(e,t)},_clearValue(){const e=this.option("value");this.callBase(),null===e&&this._applyCustomValidation(null)},clear(){const e=this.option("value");this.callBase(),null===e&&this._applyInternalValidation(null)}});t.default=L},92782:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(i(92848)),o=a(i(174));function a(e){return e&&e.__esModule?e:{default:e}}(0,n.default)("dxDateBox",o.default);t.default=o.default},174:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=v(i(92774)),o=i(98834),a=v(i(38662)),s=v(i(81179)),r=i(83445),l=i(46981),d=v(i(52771)),u=v(i(65951)),c=v(i(48314)),h=i(86858),p=i(52576),g=i(50254),_=i(11528),f=v(i(10291)),m=i(18674);function v(e){return e&&e.__esModule?e:{default:e}}const C="dateBoxMask",y=-1,b=f.default.inherit({_supportedKeys(e){const t=this.callBase(e),i=e=>{const i=t[(0,o.normalizeKeyName)(e)];return i&&i.apply(this,[e])},n=(e,t)=>this._shouldUseOriginalHandler(e)?i.apply(this,[e]):t.apply(this,[e]);return(0,p.extend)({},t,{del:e=>n(e,(e=>{this._revertPart(1),this._isAllSelected()||e.preventDefault()})),backspace:e=>n(e,(e=>{this._revertPart(y),this._isAllSelected()||e.preventDefault()})),home:e=>n(e,(e=>{this._selectFirstPart(),e.preventDefault()})),end:e=>n(e,(e=>{this._selectLastPart(),e.preventDefault()})),escape:e=>n(e,(e=>{this._revertChanges(e)})),enter:e=>n(e,(()=>{this._enterHandler()})),leftArrow:e=>n(e,(e=>{this._selectNextPart(y),e.preventDefault()})),rightArrow:e=>n(e,(e=>{this._selectNextPart(1),e.preventDefault()})),upArrow:e=>n(e,(e=>{this._upDownArrowHandler(1),e.preventDefault()})),downArrow:e=>n(e,(e=>{this._upDownArrowHandler(y),e.preventDefault()}))})},_shouldUseOriginalHandler(e){const t=this.option("opened")&&e&&!["backspace","del"].includes((0,o.normalizeKeyName)(e));return!this._useMaskBehavior()||t||e&&e.altKey},_upDownArrowHandler(e){this._setNewDateIfEmpty();const t=this._getActivePartValue(this._initialMaskValue),i=this._getActivePartValue()-t;this._loadMaskValue(this._initialMaskValue),this._changePartValue(i+e,!0)},_changePartValue(e,t){const i=this._getActivePartProp("pattern");/^a{1,5}$/.test(i)?this._toggleAmPm():this._partIncrease(e,t)},_toggleAmPm(){const e=this._getActivePartProp("text"),t=1^s.default.getPeriodNames().indexOf(e);this._setActivePartValue(t)},_getDefaultOptions(){return(0,p.extend)(this.callBase(),{useMaskBehavior:!1,emptyDateValue:new Date(2e3,0,1,0,0,0)})},_isSingleCharKey(e){let{originalEvent:t,alt:i}=e;const n=t.data||t.key;return"string"==typeof n&&1===n.length&&!i&&!(0,o.isCommandKeyPressed)(t)},_isSingleDigitKey(e){var t;const i=null===(t=e.originalEvent)||void 0===t?void 0:t.data;return 1===(null==i?void 0:i.length)&&parseInt(i,10)},_useBeforeInputEvent:()=>u.default.real().android,_keyInputHandler(e,t){const i=this._input().val();this._processInputKey(t),e.preventDefault();i!==this._input().val()&&n.default.trigger(this._input(),"input")},_keyboardHandler(e){let{key:t}=e.originalEvent;const i=this.callBase(e);return!this._useMaskBehavior()||this._useBeforeInputEvent()||(c.default.chrome&&"Process"===e.key&&0===e.code.indexOf("Digit")?(t=e.code.replace("Digit",""),this._processInputKey(t),this._maskInputHandler=()=>{this._renderSelectedPart()}):this._isSingleCharKey(e)&&this._keyInputHandler(e.originalEvent,t)),i},_maskBeforeInputHandler(e){this._maskInputHandler=null;const{inputType:t}=e.originalEvent;"insertCompositionText"===t&&(this._maskInputHandler=()=>{this._renderSelectedPart()});const i="deleteContentBackward"===t;if(i||"deleteContentForward"===t){const e=i?y:1;this._maskInputHandler=()=>{this._revertPart(),this._selectNextPart(e)}}if(!this._useMaskBehavior()||!this._isSingleCharKey(e))return;const n=e.originalEvent.data;return this._keyInputHandler(e,n),!0},_keyPressHandler(e){const{originalEvent:t}=e;"insertCompositionText"===(null==t?void 0:t.inputType)&&this._isSingleDigitKey(e)&&(this._processInputKey(t.data),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()),this.callBase(e),this._maskInputHandler&&(this._maskInputHandler(),this._maskInputHandler=null)},_processInputKey(e){this._isAllSelected()&&(this._activePartIndex=0),this._setNewDateIfEmpty(),isNaN(parseInt(e))?this._searchString(e):this._searchNumber(e)},_isAllSelected(){const e=this._caret();return e.end-e.start===this.option("text").length},_getFormatPattern(){if(this._formatPattern)return this._formatPattern;const e=this._strategy.getDisplayFormat(this.option("displayFormat")),t=(0,_.isString)(e)&&!a.default._getPatternByFormat(e);return this._formatPattern=t?e:(0,r.getFormat)((t=>a.default.format(t,e))),this._formatPattern},_setNewDateIfEmpty(){if(!this._maskValue){const e="time"===this.option("type")?new Date(null):new Date;this._maskValue=e,this._initialMaskValue=e,this._renderDateParts()}},_partLimitsReached(e){const t=String(e).length,i=this._getActivePartProp("pattern").length,n=1===i?t:Math.min(i,t),o=this._searchValue.length===n,a=parseInt(`${this._searchValue}0`)>e;return o||a},_searchNumber(e){const{max:t}=this._getActivePartLimits(),i=String(t).length;this._searchValue=(this._searchValue+e).substr(-i),isNaN(this._searchValue)&&(this._searchValue=e),this._setActivePartValue(this._searchValue),this._partLimitsReached(t)&&this._selectNextPart(1)},_searchString(e){if(!isNaN(parseInt(this._getActivePartProp("text"))))return;const t=this._getActivePartProp("limits")(this._maskValue),i=this._searchValue+e.toLowerCase(),n=t.max-t.min;for(let e=0;e<=n;e++)if(this._loadMaskValue(this._initialMaskValue),this._changePartValue(e+1),0===this._getActivePartProp("text").toLowerCase().indexOf(i))return void(this._searchValue=i);this._setNewDateIfEmpty(),this._searchValue&&(this._clearSearchValue(),this._searchString(e))},_clearSearchValue(){this._searchValue=""},_revertPart(e){if(!this._isAllSelected()){const t=this._getActivePartValue(this.option("emptyDateValue"));this._setActivePartValue(t),this._selectNextPart(e)}this._clearSearchValue()},_useMaskBehavior(){return this.option("useMaskBehavior")&&"text"===this.option("mode")},_prepareRegExpInfo(){this._regExpInfo=(0,l.getRegExpInfo)(this._getFormatPattern(),a.default);const{regexp:e}=this._regExpInfo,{source:t}=e,{flags:i}=e,n=new RegExp(/(\{[0-9]+,?[0-9]*\})/),o=t.split(n).map((e=>n.test(e)?e:d.default.convertDigits(e,!1))).join("");this._regExpInfo.regexp=new RegExp(o,i)},_initMaskState(){this._activePartIndex=0,this._formatPattern=null,this._prepareRegExpInfo(),this._loadMaskValue()},_renderMask(){this.callBase(),this._detachMaskEvents(),this._clearMaskState(),this._useMaskBehavior()&&(this._attachMaskEvents(),this._initMaskState(),this._renderDateParts())},_renderDateParts(){if(!this._useMaskBehavior())return;const e=this.option("text")||this._getDisplayedText(this._maskValue);e&&(this._dateParts=(0,m.renderDateParts)(e,this._regExpInfo),this._input().is(":hidden")||this._selectNextPart())},_detachMaskEvents(){n.default.off(this._input(),`.${C}`)},_attachMaskEvents(){n.default.on(this._input(),(0,o.addNamespace)("dxclick",C),this._maskClickHandler.bind(this)),n.default.on(this._input(),(0,o.addNamespace)("paste",C),this._maskPasteHandler.bind(this)),n.default.on(this._input(),(0,o.addNamespace)("drop",C),(()=>{this._renderSelectedPart()})),n.default.on(this._input(),(0,o.addNamespace)("compositionend",C),this._maskCompositionEndHandler.bind(this)),this._useBeforeInputEvent()&&n.default.on(this._input(),(0,o.addNamespace)("beforeinput",C),this._maskBeforeInputHandler.bind(this))},_renderSelectedPart(){this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()},_selectLastPart(){this.option("text")&&(this._activePartIndex=this._dateParts.length,this._selectNextPart(y))},_selectFirstPart(){this.option("text")&&(this._activePartIndex=-1,this._selectNextPart(1))},_onMouseWheel(e){this._useMaskBehavior()&&this._partIncrease(e.delta>0?1:y,e)},_selectNextPart(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!this.option("text")||this._disposed)return;e&&(this._initialMaskValue=new Date(this._maskValue));let t=(0,g.fitIntoRange)(this._activePartIndex+e,0,this._dateParts.length-1);if(this._dateParts[t].isStub){if(!(0===t&&e<0||t===this._dateParts.length-1&&e>0))return void this._selectNextPart(e>=0?e+1:e-1);t=this._activePartIndex}this._activePartIndex!==t&&this._clearSearchValue(),this._activePartIndex=t,this._caret(this._getActivePartProp("caret"))},_getRealLimitsPattern(){if("d"===this._getActivePartProp("pattern")[0])return"dM"},_getActivePartLimits(e){return this._getActivePartProp("limits")(this._maskValue,e&&this._getRealLimitsPattern())},_getActivePartValue(e){e=e||this._maskValue;const t=this._getActivePartProp("getter");return(0,_.isFunction)(t)?t(e):e[t]()},_addLeadingZeroes(e){const t=this._searchValue.match(/^0+/),i=this._getActivePartLimits(),n=String(i.max).length;return((t&&t[0]||"")+String(e)).substr(-n)},_setActivePartValue(e,t){t=t||this._maskValue;const i=this._getActivePartProp("setter"),n=this._getActivePartLimits();e=(0,g.inRange)(e,n.min,n.max)?e:e%10,e=this._addLeadingZeroes((0,g.fitIntoRange)(e,n.min,n.max)),(0,_.isFunction)(i)?i(t,e):t[i](e),this._renderDisplayText(this._getDisplayedText(t)),this._renderDateParts()},_getActivePartProp(e){if(this._dateParts&&this._dateParts[this._activePartIndex])return this._dateParts[this._activePartIndex][e]},_loadMaskValue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dateOption("value");this._maskValue=e&&new Date(e),this._initialMaskValue=e&&new Date(e)},_saveMaskValue(){const e=this._maskValue&&new Date(this._maskValue);e&&"date"===this.option("type")&&e.setHours(0,0,0,0),this._initialMaskValue=new Date(e),this.dateOption("value",e)},_revertChanges(){this._loadMaskValue(),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts()},_renderDisplayText(e){this.callBase(e),this._useMaskBehavior()&&this.option("text",e)},_partIncrease(e,t){this._setNewDateIfEmpty();const{max:i,min:n}=this._getActivePartLimits(t);let o=e+this._getActivePartValue();o>i?o=this._applyLimits(o,{limitBase:n,limitClosest:i,max:i}):o<n&&(o=this._applyLimits(o,{limitBase:i,limitClosest:n,max:i})),this._setActivePartValue(o)},_applyLimits(e,t){let{limitBase:i,limitClosest:n,max:o}=t;const a=(e-n)%o;return a?i+a-1*(0,g.sign)(a):n},_maskClickHandler(){this._loadMaskValue(this._maskValue),this.option("text")&&(this._activePartIndex=(0,m.getDatePartIndexByPosition)(this._dateParts,this._caret().start),this._isAllSelected()||((0,_.isDefined)(this._activePartIndex)?this._caret(this._getActivePartProp("caret")):this._selectLastPart()))},_maskCompositionEndHandler(e){this._input().val(this._getDisplayedText(this._maskValue)),this._selectNextPart(),this._maskInputHandler=()=>{this._renderSelectedPart()}},_maskPasteHandler(e){const t=this._replaceSelectedText(this.option("text"),this._caret(),(0,h.clipboardText)(e)),i=a.default.parse(t,this._getFormatPattern());i&&this._isDateValid(i)&&(this._maskValue=i,this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts(),this._selectNextPart()),e.preventDefault()},_isDateValid:e=>(0,_.isDate)(e)&&!isNaN(e),_isValueDirty(){const e=this.dateOption("value");return(this._maskValue&&this._maskValue.getTime())!==(e&&e.getTime())},_fireChangeEvent(){this._clearSearchValue(),this._isValueDirty()&&n.default.trigger(this._input(),"change")},_enterHandler(){this._fireChangeEvent(),this._selectNextPart(1)},_focusOutHandler(e){this._useMaskBehavior()&&!e.isDefaultPrevented()?(this._fireChangeEvent(),this.callBase(e),this._selectFirstPart(e)):this.callBase(e)},_valueChangeEventHandler(e){const t=this.option("text");this._useMaskBehavior()?(this._saveValueChangeEvent(e),t?null===this._maskValue&&this._loadMaskValue(t):this._maskValue=null,this._saveMaskValue()):this.callBase(e)},_optionChanged(e){switch(e.name){case"useMaskBehavior":this._renderMask();break;case"displayFormat":case"mode":this.callBase(e),this._renderMask();break;case"value":this._loadMaskValue(),this.callBase(e),this._renderDateParts();break;case"emptyDateValue":break;default:this.callBase(e)}},_clearMaskState(){this._clearSearchValue(),delete this._dateParts,delete this._activePartIndex,delete this._maskValue},clear(){this._clearMaskState(),this._activePartIndex=0,this.callBase()},_clean(){this.callBase(),this._detachMaskEvents(),this._clearMaskState()}});t.default=b},18674:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.renderDateParts=t.getDatePartIndexByPosition=void 0;var n=i(46981),o=i(17781),a=i(52576),s=i(50254);const r=e=>e.getMonth()+1,l=(e,t)=>{const i=e.getDate(),n=h("M",e),o=(0,s.fitIntoRange)(parseInt(t),n.min,n.max);e.setMonth(o-1,1);const{min:a,max:r}=h("dM",e),l=(0,s.fitIntoRange)(i,a,r);e.setDate(l)},d={a:e=>e.getHours()<12?0:1,E:"getDay",y:"getFullYear",M:r,L:r,d:"getDate",H:"getHours",h:"getHours",m:"getMinutes",s:"getSeconds",S:"getMilliseconds",x:"getTimezoneOffset"},u=(0,a.extend)({},(0,n.getPatternSetters)(),{a:(e,t)=>{const i=e.getHours();i>=12!==!!parseInt(t)&&e.setHours((i+12)%24)},d:(e,t)=>{t>h("dM",e).max&&e.setMonth(e.getMonth()+1),e.setDate(t)},h:(e,t)=>{const i=e.getHours()>=12;e.setHours(+t%12+(i?12:0))},M:l,L:l,E:(e,t)=>{t<0||e.setDate(e.getDate()-e.getDay()+parseInt(t))},y:(e,t)=>{const i=e.getFullYear(),n=String(t).length,o=String(h("y",e).max).length,a=parseInt(String(i).substr(0,o-n)+t);e.setFullYear(a)},x:e=>e}),c=e=>d[e]||(()=>e);t.renderDateParts=(e,t)=>{const i=t.regexp.exec(e);let n=0,a=0;const s=[];for(let e=1;e<i.length;e++){n=a,a=n+i[e].length;const r=t.patterns[e-1].replace(/^'|'$/g,""),l=c(r[0]);s.push({index:e-1,isStub:r===i[e],caret:{start:n,end:a},pattern:r,text:i[e],limits:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return h(r[0],...t)},setter:u[r[0]]||o.noop,getter:l})}return s};const h=(e,t,i)=>{const n={y:{min:0,max:9999},M:{min:1,max:12},L:{min:1,max:12},d:{min:1,max:31},dM:{min:1,max:new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},E:{min:0,max:6},H:{min:0,max:23},h:{min:1,max:12},m:{min:0,max:59},s:{min:0,max:59},S:{min:0,max:999},a:{min:0,max:1},x:{min:0,max:0}};return n[i||e]||n.getAmPm};t.getDatePartIndexByPosition=(e,t)=>{for(let i=0;i<e.length;i++){const n=e[i].caret.end>=t;if(!e[i].isStub&&n)return i}return null}},49403:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(i(4671)),o=i(17781),a=c(i(41380)),s=i(52576),r=i(11528),l=c(i(22195)),d=i(52071),u=c(i(19127));function c(e){return e&&e.__esModule?e:{default:e}}const h=u.default.inherit({NAME:"Calendar",getDefaultOptions(){return(0,s.extend)(this.callBase(),{todayButtonText:n.default.format("dxCalendar-todayButtonText")})},supportedKeys(){const e=function(e){return!!this.option("opened")&&(e.preventDefault(),!0)};return{rightArrow(){if(this.option("opened"))return!0},leftArrow(){if(this.option("opened"))return!0},enter:function(e){if(this.dateBox.option("opened")){if(e.preventDefault(),this._widget.option("zoomLevel")===this._widget.option("maxZoomLevel")){const t=this._getContouredValue(),i=this._lastActionElement,n=this._closeDropDownByEnter();return n&&t&&"calendar"===i&&this.dateBoxValue(t,e),n&&this.dateBox.close(),this.dateBox._valueChangeEventHandler(e),!n}return!0}this.dateBox._valueChangeEventHandler(e)}.bind(this),home:e,end:e}},getDisplayFormat:e=>e||"shortdate",_closeDropDownByEnter:()=>!0,_getWidgetName:()=>l.default,_getContouredValue(){return this._widget._view.option("contouredDate")},getKeyboardListener(){return this._widget},_getWidgetOptions(){const e=this.dateBox.option("disabledDates");return(0,s.extend)(this.dateBox.option("calendarOptions"),{value:this.dateBoxValue()||null,selectionMode:"single",dateSerializationFormat:null,min:this.dateBox.dateOption("min"),max:this.dateBox.dateOption("max"),onValueChanged:this._valueChangedHandler.bind(this),onCellClick:this._cellClickHandler.bind(this),disabledDates:(0,r.isFunction)(e)?this._injectComponent(e.bind(this.dateBox)):e,onContouredChanged:this._refreshActiveDescendant.bind(this),skipFocusCheck:!0})},_injectComponent(e){const t=this;return function(i){return(0,s.extend)(i,{component:t.dateBox}),e(i)}},_refreshActiveDescendant(e){this._lastActionElement="calendar",this.dateBox.setAria("activedescendant",e.actionValue)},_getTodayButtonConfig(){const e=this.dateBox.option("buttonsLocation"),t="default"===e?["bottom","center"]:(0,o.splitPair)(e),i=(0,d.isMaterial)()?"text":"outlined";return{widget:"dxButton",toolbar:t[0],location:"after"===t[1]?"before":t[1],options:{onClick:e=>{this._widget._toTodayView(e)},text:this.dateBox.option("todayButtonText"),elementAttr:{class:"dx-button-today"},stylingMode:i}}},_isCalendarVisible(){const{calendarOptions:e}=this.dateBox.option();return(0,r.isEmptyObject)(e)||!1!==e.visible},_getPopupToolbarItems(e){if("useButtons"===this.dateBox.option("applyValueMode")&&this._isCalendarVisible()){return[this._getTodayButtonConfig(),...e]}return e},popupConfig:e=>(0,s.extend)(!0,e,{position:{collision:"flipfit flip"},width:"auto"}),_valueChangedHandler(e){const{value:t}=e,i=e.previousValue;a.default.sameDate(t,i)&&a.default.sameHoursAndMinutes(t,i)||"instantly"===this.dateBox.option("applyValueMode")&&this.dateBoxValue(this.getValue(),e.event)},_updateValue(){this._widget&&this._widget.option("value",this.dateBoxValue())},textChangedHandler(){this._lastActionElement="input",this.dateBox.option("opened")&&this._widget&&this._updateValue(!0)},_cellClickHandler(e){const{dateBox:t}=this;"instantly"===t.option("applyValueMode")&&(t.option("opened",!1),this.dateBoxValue(this.getValue(),e.event))}});t.default=h},34092:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(38662)),o=p(i(64553)),a=p(i(41380)),s=i(52576),r=i(57653),l=i(3104),d=p(i(91204)),u=p(i(49403)),c=p(i(14922)),h=p(i(14705));function p(e){return e&&e.__esModule?e:{default:e}}const g=(0,l.getWindow)(),_="dx-datebox-datetime-time-side",f=u.default.inherit({NAME:"CalendarWithTime",getDefaultOptions(){return(0,s.extend)(this.callBase(),{applyValueMode:"useButtons",buttonsLocation:"bottom after","dropDownOptions.showTitle":!1})},_closeDropDownByEnter(){return a.default.sameDate(this._getContouredValue(),this.widgetOption("value"))},getDisplayFormat:e=>e||"shortdateshorttime",_is24HourFormat(){return n.default.is24HourFormat(this.getDisplayFormat(this.dateBox.option("displayFormat")))},_getContouredValue(){const e=this.callBase();return this._updateDateTime(e)},_renderWidget(){this.callBase(),this._timeView=this.dateBox._createComponent((0,o.default)("<div>"),h.default,{value:this.dateBoxValue(),_showClock:!this._isShrinkView(),use24HourFormat:this._is24HourFormat(),onValueChanged:this._valueChangedHandler.bind(this),stylingMode:this.dateBox.option("stylingMode")})},renderOpenedState(){this.callBase();const e=this._getPopup();e&&e.$wrapper().toggleClass("dx-datebox-adaptivity-mode",this._isSmallScreen()),clearTimeout(this._repaintTimer),this._repaintTimer=setTimeout((()=>{this._getPopup()&&this._getPopup().repaint()}),0)},isAdaptivityChanged(){const e=this._isShrinkView(),t=this._currentAdaptiveMode;return e!==t?(this._currentAdaptiveMode=e,void 0!==t):this.callBase()},_updateValue(e){let t=this.dateBoxValue();t||e||(t=new Date,c.default.normalizeTime(t)),this.callBase(),this._timeView&&(t&&this._timeView.option("value",t),this._timeView.option("use24HourFormat",this._is24HourFormat()))},_isSmallScreen:()=>(0,r.getWidth)(g)<=573,_isShrinkView(){return!this.dateBox.option("showAnalogClock")||this.dateBox.option("adaptivityEnabled")&&this._isSmallScreen()},_getBoxItems(){const e=[{ratio:0,shrink:0,baseSize:"auto",name:"calendar"}];return this._isShrinkView()||e.push({ratio:0,shrink:0,baseSize:"auto",name:"time"}),e},renderPopupContent(){this.callBase(),this._currentAdaptiveMode=this._isShrinkView();const e=this._getPopup().$content();this._box=this.dateBox._createComponent((0,o.default)("<div>").appendTo(e),d.default,{direction:"row",crossAlign:"stretch",items:this._getBoxItems(),itemTemplate:function(e,t,i){const n=(0,o.default)("<div>");switch(e.name){case"calendar":n.append(this._widget.$element()),this._isShrinkView()&&(this._timeView.$element().addClass(_),n.append(this._timeView.$element()));break;case"time":n.append(this._timeView.$element()),(0,o.default)(i).addClass(_)}return n}.bind(this)})},popupConfig(e){const t=this.callBase(e);return(0,s.extend)(t,{width:"auto"})},_preventFocusOnPopup(e){(0,o.default)(e.target).hasClass("dx-texteditor-input")||(this.callBase.apply(this,arguments),this.dateBox._hasFocusClass()||this.dateBox.focus())},_updateDateTime(e){const t=this._timeView.option("value");return e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e},getValue(){let e=this._widget.option("value")??this._widget.getContouredDate();return e=e?new Date(e):new Date,this._updateDateTime(e)},dispose(){clearTimeout(this._removeMinWidthTimer),clearTimeout(this._repaintTimer),this.callBase()}});t.default=f},25417:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(i(4671)),o=c(i(64553)),a=i(52576),s=i(4785),r=i(3104),l=c(i(19127)),d=c(i(14922)),u=c(i(76982));function c(e){return e&&e.__esModule?e:{default:e}}const h=(0,r.getWindow)(),p=l.default.inherit({NAME:"DateView",getDefaultOptions(){return(0,a.extend)(this.callBase(),{openOnFieldClick:!0,applyButtonText:n.default.format("OK"),"dropDownOptions.showTitle":!0})},getDisplayFormat(e){return e||d.default.FORMATS_MAP[this.dateBox.option("type")]},popupConfig(e){return{toolbarItems:this.dateBox._popupToolbarItemsConfig(),onInitialized:e.onInitialized,defaultOptionsRules:[{device:{platform:"android"},options:{width:333,height:331}},{device(e){const{platform:t}=e;return"generic"===t||"ios"===t},options:{width:"auto",height:"auto"}},{device(e){const{platform:t}=e,{phone:i}=e;return"generic"===t&&i},options:{width:333,maxWidth:"100%",maxHeight:"100%",height:"auto",position:{collision:"flipfit flip"}}},{device:{platform:"ios",phone:!0},options:{width:"100%",position:{my:"bottom",at:"bottom",of:h}}}]}},_renderWidget(){if((0,s.inputType)(this.dateBox.option("mode"))&&this.dateBox._isNativeType()||this.dateBox.option("readOnly"))return void(this._widget&&(this._widget.$element().remove(),this._widget=null));const e=this._getPopup();if(this._widget)this._widget.option(this._getWidgetOptions());else{const t=(0,o.default)("<div>").appendTo(e.$content());this._widget=this._createWidget(t)}this._widget.$element().appendTo(this._getWidgetContainer())},_getWidgetName:()=>u.default,renderOpenedState(){this.callBase(),this._widget&&this._widget.option("value",this._widget._getCurrentDate())},_getWidgetOptions(){return{value:this.dateBoxValue()||new Date,type:this.dateBox.option("type"),minDate:this.dateBox.dateOption("min")||new Date(1900,0,1),maxDate:this.dateBox.dateOption("max")||new Date(Date.now()+50*d.default.ONE_YEAR),onDisposing:function(){this._widget=null}.bind(this)}}});t.default=p},19127:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(92774)),o=l(i(38662)),a=l(i(55620)),s=l(i(64553)),r=i(17781);function l(e){return e&&e.__esModule?e:{default:e}}const{abstract:d}=a.default,u=a.default.inherit({ctor(e){this.dateBox=e},widgetOption(){return this._widget&&this._widget.option.apply(this._widget,arguments)},_renderWidget(e){e=e||(0,s.default)("<div>"),this._widget=this._createWidget(e),this._widget.$element().appendTo(this._getWidgetContainer())},_createWidget(e){const t=this._getWidgetName(),i=this._getWidgetOptions();return this.dateBox._createComponent(e,t,i)},_getWidgetOptions:d,_getWidgetName:d,getDefaultOptions:()=>({mode:"text"}),getDisplayFormat:d,supportedKeys:r.noop,getKeyboardListener:r.noop,customizeButtons:r.noop,getParsedText:(e,t)=>o.default.parse(e,t)||o.default.parse(e),renderInputMinMax:r.noop,renderOpenedState(){this._updateValue()},popupConfig:d,_dimensionChanged(){var e;null===(e=this._getPopup())||void 0===e||e.repaint()},renderPopupContent(){const e=this._getPopup();this._renderWidget();const t=e.$content().parent();n.default.off(t,"mousedown"),n.default.on(t,"mousedown",this._preventFocusOnPopup.bind(this))},_preventFocusOnPopup(e){e.preventDefault()},_getWidgetContainer(){return this._getPopup().$content()},_getPopup(){return this.dateBox._popup},popupShowingHandler:r.noop,popupHiddenHandler:r.noop,_updateValue(){this._widget&&this._widget.option("value",this.dateBoxValue())},useCurrentDateByDefault:r.noop,getDefaultDate:()=>new Date,textChangedHandler:r.noop,renderValue(){this.dateBox.option("opened")&&this._updateValue()},getValue(){return this._widget.option("value")},isAdaptivityChanged:()=>!1,dispose(){const e=this._getPopup();e&&e.$content().empty()},dateBoxValue(){return arguments.length?this.dateBox.dateValue.apply(this.dateBox,arguments):this.dateBox.dateOption.apply(this.dateBox,["value"])}});t.default=u},62905:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(44804);var n=g(i(38662)),o=i(17781),a=g(i(71051)),s=i(52576),r=i(57653),l=i(11528),d=i(3104),u=g(i(80070)),c=i(6807),h=g(i(19127)),p=g(i(14922));function g(e){return e&&e.__esModule?e:{default:e}}const _=(0,d.getWindow)(),f={min:new Date(0,0,0,0,0),max:new Date(0,0,0,23,59)},m=h.default.inherit({NAME:"List",supportedKeys:()=>({space:o.noop,home:o.noop,end:o.noop}),getDefaultOptions(){return(0,s.extend)(this.callBase(),{applyValueMode:"instantly"})},getDisplayFormat:e=>e||"shorttime",popupConfig:e=>e,getValue(){const e=this._widget.option("selectedIndex");if(-1===e)return this.dateBox.option("value");const t=this._widgetItems[e];return this._getDateByItemData(t)},useCurrentDateByDefault:()=>!0,getDefaultDate:()=>new Date(null),popupShowingHandler(){this.dateBox._dimensionChanged()},_renderWidget(){this.callBase(),this._refreshItems()},_getWidgetName:()=>u.default,_getWidgetOptions(){return{itemTemplate:this._timeListItemTemplate.bind(this),onItemClick:this._listItemClickHandler.bind(this),tabIndex:-1,onFocusedItemChanged:this._refreshActiveDescendant.bind(this),selectionMode:"single"}},_refreshActiveDescendant(e){this.dateBox.setAria("activedescendant",""),this.dateBox.setAria("activedescendant",e.actionValue)},_refreshItems(){this._widgetItems=this._getTimeListItems(),this._widget.option("items",this._widgetItems)},renderOpenedState(){this._widget&&(this._widget.option("focusedElement",null),this._setSelectedItemsByValue(),this._widget.option("templatesRenderAsynchronously")?this._asyncScrollTimeout=setTimeout(this._scrollToSelectedItem.bind(this)):this._scrollToSelectedItem())},dispose(){this.callBase(),clearTimeout(this._asyncScrollTimeout)},_updateValue(){this._widget&&(this._refreshItems(),this._setSelectedItemsByValue(),this._scrollToSelectedItem())},_setSelectedItemsByValue(){const e=this.dateBoxValue(),t=this._getDateIndex(e);-1===t?this._widget.option("selectedItems",[]):this._widget.option("selectedIndex",t)},_scrollToSelectedItem(){this._widget.scrollToItem(this._widget.option("selectedIndex"))},_getDateIndex(e){let t=-1;for(let i=0,n=this._widgetItems.length;i<n;i++)if(this._areDatesEqual(e,this._widgetItems[i])){t=i;break}return t},_areDatesEqual:(e,t)=>(0,l.isDate)(e)&&(0,l.isDate)(t)&&e.getHours()===t.getHours()&&e.getMinutes()===t.getMinutes(),_getTimeListItems(){let e=this.dateBox.dateOption("min")||this._getBoundaryDate("min");const t=this.dateBox.dateOption("max")||this._getBoundaryDate("max"),i=this.dateBox.dateOption("value")||null;let n=t-e;const o=e.getMinutes()%this.dateBox.option("interval");return n<0?[]:(n>p.default.ONE_DAY&&(n=p.default.ONE_DAY),i-e<p.default.ONE_DAY||(e=this._getBoundaryDate("min"),e.setMinutes(o),i&&Math.abs(i-t)<p.default.ONE_DAY&&(n=(60*t.getHours()+Math.abs(t.getMinutes()-o))*p.default.ONE_MINUTE)),this._getRangeItems(e,new Date(e),n))},_getRangeItems(e,t,i){const n=[],o=this.dateBox.option("interval");for(;t-e<=i;)n.push(new Date(t)),t.setMinutes(t.getMinutes()+o);return n},_getBoundaryDate(e){const t=f[e],i=new Date((0,o.ensureDefined)(this.dateBox.dateOption("value"),0));return new Date(i.getFullYear(),i.getMonth(),i.getDate(),t.getHours(),t.getMinutes())},_timeListItemTemplate(e){const t=this.dateBox.option("displayFormat");return n.default.format(e,this.getDisplayFormat(t))},_listItemClickHandler(e){if("useButtons"===this.dateBox.option("applyValueMode"))return;const t=this._getDateByItemData(e.itemData);this.dateBox.option("opened",!1),this.dateBoxValue(t,e.event)},_getDateByItemData(e){let t=this.dateBox.option("value");const i=e.getHours(),n=e.getMinutes(),o=e.getSeconds(),s=e.getFullYear(),r=e.getMonth(),l=e.getDate();return t?(t=this.dateBox.option("dateSerializationFormat")?a.default.deserializeDate(t):new Date(t),t.setHours(i),t.setMinutes(n),t.setSeconds(o),t.setFullYear(s),t.setMonth(r),t.setDate(l)):t=new Date(s,r,l,i,n,0,0),t},getKeyboardListener(){return this._widget},_updatePopupHeight(){const e=(0,c.getSizeValue)(this.dateBox.option("dropDownOptions.height"));if(void 0===e||"auto"===e){this.dateBox._setPopupOption("height","auto");const e=(0,r.getOuterHeight)(this._widget.$element()),t=.45*(0,r.getHeight)(_);this.dateBox._setPopupOption("height",Math.min(e,t))}this.dateBox._timeList&&this.dateBox._timeList.updateDimensions()},getParsedText(e,t){let i=this.callBase(e,t);return i&&(i=p.default.mergeDates(i,new Date(null),"date")),i}});t.default=m},19838:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(65951)),o=i(17781),a=u(i(71051)),s=i(52576),r=i(4785),l=u(i(19127)),d=u(i(14922));function u(e){return e&&e.__esModule?e:{default:e}}const c=l.default.inherit({NAME:"Native",popupConfig:e=>(0,s.extend)({},e,{width:"auto"}),getParsedText(e){return e?"datetime"===this.dateBox.option("type")?new Date(e.replace(/-/g,"/").replace("T"," ").split(".")[0]):d.default.fromStandardDateFormat(e):null},renderPopupContent:o.noop,_getWidgetName:o.noop,_getWidgetOptions:o.noop,_getDateBoxType(){let e=this.dateBox.option("type");return d.default.SUPPORTED_FORMATS.includes(e)?"datetime"!==e||(0,r.inputType)(e)||(e="datetime-local"):e="date",e},customizeButtons(){const e=this.dateBox.getButton("dropDown");n.default.real().android&&e&&e.on("click",(()=>{this.dateBox._input().get(0).click()}))},getDefaultOptions(){return{mode:this._getDateBoxType()}},getDisplayFormat(e){const t=this._getDateBoxType();return e||d.default.FORMATS_MAP[t]},renderInputMinMax(e){e.attr({min:a.default.serializeDate(this.dateBox.dateOption("min"),"yyyy-MM-dd"),max:a.default.serializeDate(this.dateBox.dateOption("max"),"yyyy-MM-dd")})}});t.default=c},14922:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(38662)),o=l(i(64553)),a=l(i(71051)),s=i(21274),r=i(11528);function l(e){return e&&e.__esModule?e:{default:e}}const d=["year","day","month","day"],u=["hours","minutes","seconds","milliseconds"],c=864e5,h={SUPPORTED_FORMATS:["date","time","datetime"],ONE_MINUTE:6e4,ONE_DAY:c,ONE_YEAR:31536e6,MIN_DATEVIEW_DEFAULT_DATE:new Date(1900,0,1),MAX_DATEVIEW_DEFAULT_DATE:function(){const e=new Date;return new Date(e.getFullYear()+50,e.getMonth(),e.getDate(),23,59,59)}(),FORMATS_INFO:{date:{getStandardPattern:()=>"yyyy-MM-dd",components:d},time:{getStandardPattern:()=>"HH:mm",components:u},datetime:{getStandardPattern(){let e;return function(){const t=(0,o.default)("<input>").attr("type","datetime");t.val("2000-01-01T01:01Z"),t.val()&&(e="yyyy-MM-ddTHH:mmZ")}(),e||(e="yyyy-MM-ddTHH:mm:ssZ"),h.FORMATS_INFO.datetime.getStandardPattern=function(){return e},e},components:[...d,...u]},"datetime-local":{getStandardPattern:()=>"yyyy-MM-ddTHH:mm:ss",components:[...d,"hours","minutes","seconds"]}},FORMATS_MAP:{date:"shortdate",time:"shorttime",datetime:"shortdateshorttime"},SUBMIT_FORMATS_MAP:{date:"date",time:"time",datetime:"datetime-local"},toStandardDateFormat(e,t){const i=h.FORMATS_INFO[t].getStandardPattern();return a.default.serializeDate(e,i)},fromStandardDateFormat(e){const t=a.default.dateParser(e);return(0,r.isDate)(t)?t:void 0},getMaxMonthDay:(e,t)=>new Date(e,t+1,0).getDate(),mergeDates(e,t,i){if(!t)return t||null;if(!e||isNaN(e.getTime())){const t=new Date(null);e=new Date(t.getFullYear(),t.getMonth(),t.getDate())}const n=new Date(e.valueOf()),o=h.FORMATS_INFO[i];return(0,s.each)(o.components,(function(){const e=h.DATE_COMPONENTS_INFO[this];n[e.setter](t[e.getter]())})),n},getLongestCaptionIndex(e){let t,i=0,n=0;for(t=0;t<e.length;++t)e[t].length>n&&(i=t,n=e[t].length);return i},formatUsesMonthName:e=>n.default.formatUsesMonthName(e),formatUsesDayName:e=>n.default.formatUsesDayName(e),getLongestDate(e,t,i){const n=function(e){const t=typeof e;return"string"===t?"format":"object"===t&&void 0!==e.type?e.type:null}(e);let o=9;n&&!h.formatUsesMonthName(n)||(o=h.getLongestCaptionIndex(t));const a=new Date(1888,o,21,23,59,59,999);if(!n||h.formatUsesDayName(n)){const e=a.getDate()-a.getDay()+h.getLongestCaptionIndex(i);a.setDate(e)}return a},normalizeTime(e){e.setSeconds(0),e.setMilliseconds(0)}};h.DATE_COMPONENTS_INFO={year:{getter:"getFullYear",setter:"setFullYear",formatter(e,t){const i=new Date(t.getTime());return i.setFullYear(e),n.default.format(i,"yyyy")},startValue:void 0,endValue:void 0},day:{getter:"getDate",setter:"setDate",formatter(e,t){const i=new Date(t.getTime());return i.setDate(e),n.default.format(i,"d")},startValue:1,endValue:void 0},month:{getter:"getMonth",setter:"setMonth",formatter:e=>n.default.getMonthNames()[e],startValue:0,endValue:11},hours:{getter:"getHours",setter:"setHours",formatter:e=>n.default.format(new Date(0,0,0,e),"hour"),startValue:0,endValue:23},minutes:{getter:"getMinutes",setter:"setMinutes",formatter:e=>n.default.format(new Date(0,0,0,0,e),"minute"),startValue:0,endValue:59},seconds:{getter:"getSeconds",setter:"setSeconds",formatter:e=>n.default.format(new Date(0,0,0,0,0,e),"second"),startValue:0,endValue:59},milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",formatter:e=>n.default.format(new Date(0,0,0,0,0,0,e),"millisecond"),startValue:0,endValue:999}};t.default=h},76982:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(38662)),o=h(i(92848)),a=h(i(64553)),s=h(i(41380)),r=i(52576),l=i(21274),d=h(i(78694)),u=h(i(14922)),c=h(i(24845));function h(e){return e&&e.__esModule?e:{default:e}}const p="dx-dateview",g="date",_="year",f="month",m="day",v="hours",C=d.default.inherit({_valueOption(){const e=this.option("value"),t=new Date(e);return!e||isNaN(t)?this._getDefaultDate():t},_getDefaultDate(){const e=new Date;return this.option("type")===g?new Date(e.getFullYear(),e.getMonth(),e.getDate()):e},_getDefaultOptions(){return(0,r.extend)(this.callBase(),{minDate:u.default.MIN_DATEVIEW_DEFAULT_DATE,maxDate:u.default.MAX_DATEVIEW_DEFAULT_DATE,type:g,value:new Date,applyCompactClass:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:e=>"desktop"!==e.deviceType,options:{applyCompactClass:!0}}])},_render(){this.callBase(),this.$element().addClass(p),this._toggleFormatClasses(this.option("type")),this._toggleCompactClass()},_toggleFormatClasses(e,t){this.$element().addClass(`${p}-${e}`),t&&this.$element().removeClass(`${p}-${t}`)},_toggleCompactClass(){this.$element().toggleClass("dx-dateview-compact",this.option("applyCompactClass"))},_wrapper(){return this._$wrapper},_renderContentImpl(){this._$wrapper=(0,a.default)("<div>").addClass("dx-dateview-wrapper"),this._renderRollers(),this._$wrapper.appendTo(this.$element())},_renderRollers(){this._$rollersContainer||(this._$rollersContainer=(0,a.default)("<div>").addClass("dx-dateview-rollers")),this._$rollersContainer.empty(),this._createRollerConfigs(),this._rollers={};const e=this;(0,l.each)(e._rollerConfigs,(t=>{const i=(0,a.default)("<div>").appendTo(e._$rollersContainer).addClass(`dx-dateviewroller-${e._rollerConfigs[t].type}`);e._rollers[e._rollerConfigs[t].type]=e._createComponent(i,c.default,{items:e._rollerConfigs[t].displayItems,selectedIndex:e._rollerConfigs[t].selectedIndex,showScrollbar:"never",scrollByContent:!0,onStart(i){const n=i.component;n._toggleActive(!0),e._setActiveRoller(e._rollerConfigs[t],n.option("selectedIndex"))},onEnd(e){e.component._toggleActive(!1)},onClick(i){const n=i.component;n._toggleActive(!0),e._setActiveRoller(e._rollerConfigs[t],n.option("selectedIndex")),e._setRollerState(e._rollerConfigs[t],n.option("selectedIndex")),n._toggleActive(!1)},onSelectedIndexChanged(i){const n=i.component;e._setRollerState(e._rollerConfigs[t],n.option("selectedIndex"))}})})),e._$rollersContainer.appendTo(e._wrapper())},_createRollerConfigs(e){const t=this;e=e||t.option("type"),t._rollerConfigs={},n.default.getFormatParts(u.default.FORMATS_MAP[e]).forEach((e=>{t._createRollerConfig(e)}))},_createRollerConfig(e){const t=u.default.DATE_COMPONENTS_INFO[e],i=this._calculateRollerConfigValueRange(e),{startValue:n}=i,{endValue:o}=i,{formatter:a}=t,s=this._getCurrentDate(),r={type:e,setValue:t.setter,valueItems:[],displayItems:[],getIndex:e=>e[t.getter]()-n};for(let e=n;e<=o;e++)r.valueItems.push(e),r.displayItems.push(a(e,s));r.selectedIndex=r.getIndex(s),this._rollerConfigs[e]=r},_setActiveRoller(e){const t=e&&this._rollers[e.type];(0,l.each)(this._rollers,(function(){this.toggleActiveState(this===t)}))},_updateRollersPosition(){const e=this;(0,l.each)(this._rollers,(function(t){const i=e._rollerConfigs[t].getIndex(e._getCurrentDate());this.option("selectedIndex",i)}))},_setRollerState(e,t){if(t!==e.selectedIndex){const i=e.valueItems[t],{setValue:n}=e;let o=new Date(this._getCurrentDate()),a=o.getDate();const r=this.option("minDate"),l=this.option("maxDate");e.type===f?a=Math.min(a,u.default.getMaxMonthDay(o.getFullYear(),i)):e.type===_&&(a=Math.min(a,u.default.getMaxMonthDay(i,o.getMonth()))),o.setDate(a),o[n](i);const d=s.default.normalizeDate(o,r,l);o=u.default.mergeDates(d,o,"time"),o=s.default.normalizeDate(o,r,l),this.option("value",o),e.selectedIndex=t}e.type===_&&this._refreshRollers(),e.type===f&&(this._refreshRoller(m),this._refreshRoller(v))},_refreshRoller(e){const t=this._rollers[e];if(t){this._createRollerConfig(e);const i=this._rollerConfigs[e];e!==m&&i.displayItems.toString()===t.option("items").toString()||t.option({items:i.displayItems,selectedIndex:i.selectedIndex})}},_getCurrentDate(){const e=this._valueOption(),t=this.option("minDate"),i=this.option("maxDate");return s.default.normalizeDate(e,t,i)},_calculateRollerConfigValueRange(e){const t=this._getCurrentDate(),i=this.option("minDate"),n=this.option("maxDate"),o=s.default.sameYear(t,i),a=o&&t.getMonth()===i.getMonth(),r=s.default.sameYear(t,n),l=r&&t.getMonth()===n.getMonth(),d=a&&t.getDate()===i.getDate(),c=l&&t.getDate()===n.getDate(),h=u.default.DATE_COMPONENTS_INFO[e];let{startValue:p}=h,{endValue:g}=h;return e===_&&(p=i.getFullYear(),g=n.getFullYear()),e===f&&(o&&(p=i.getMonth()),r&&(g=n.getMonth())),e===m&&(g=u.default.getMaxMonthDay(t.getFullYear(),t.getMonth()),o&&a&&(p=i.getDate()),r&&l&&(g=n.getDate())),e===v&&(p=d?i.getHours():p,g=c?n.getHours():g),{startValue:p,endValue:g}},_refreshRollers(){this._refreshRoller(f),this._refreshRoller(m),this._refreshRoller(v)},_optionChanged(e){switch(e.name){case"minDate":case"maxDate":case"type":this._renderRollers(),this._toggleFormatClasses(e.value,e.previousValue);break;case"visible":this.callBase(e),e.value&&this._renderRollers();break;case"value":this.option("value",this._valueOption()),this._refreshRollers(),this._updateRollersPosition();break;default:this.callBase(e)}},_clean(){this.callBase(),delete this._$rollersContainer}});(0,o.default)("dxDateView",C);t.default=C},24845:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=i(88603),a=i(64044),s=f(i(92774)),r=i(98834),l=f(i(92848)),d=f(i(65951)),u=f(i(64553)),c=i(52576),h=i(21274),p=i(57653),g=i(32330),_=f(i(94790));function f(e){return e&&e.__esModule?e:{default:e}}const m="dx-dateview-item";class v extends _.default{_getDefaultOptions(){return(0,c.extend)(super._getDefaultOptions(),{showScrollbar:"never",useNative:!1,selectedIndex:0,bounceEnabled:!1,items:[],showOnClick:!1,onClick:null,onSelectedIndexChanged:null,scrollByContent:!0})}_init(){super._init(),this.option("onVisibilityChange",this._visibilityChangedHandler.bind(this)),this.option("onEnd",this._endActionHandler.bind(this))}_render(){super._render(),this._renderSelectedItemFrame(),this.$element().addClass("dx-dateviewroller"),this._renderContainerClick(),this._renderItems(),this._renderSelectedValue(),this._renderItemsClick(),this._renderWheelEvent(),this._renderSelectedIndexChanged()}_renderSelectedIndexChanged(){this._selectedIndexChanged=this._createActionByOption("onSelectedIndexChanged")}_renderWheelEvent(){s.default.on((0,u.default)(this.container()),"dxmousewheel",(e=>{this._isWheelScrolled=!0}))}_renderContainerClick(){if(!this.option("showOnClick"))return;const e=(0,r.addNamespace)(a.name,this.NAME),t=this._createActionByOption("onClick");s.default.off((0,u.default)(this.container()),e),s.default.on((0,u.default)(this.container()),e,(e=>{t({event:e})}))}_renderItems(){const e=this.option("items")||[];let t=(0,u.default)();(0,u.default)(this.content()).empty(),e.forEach((e=>{t=t.add((0,u.default)("<div>").addClass(m).append(e))})),(0,u.default)(this.content()).append(t),this._$items=t,this.update()}_renderSelectedItemFrame(){(0,u.default)("<div>").addClass("dx-dateview-item-selected-frame").append((0,u.default)("<div>").addClass("dx-dateview-item-selected-border")).appendTo((0,u.default)(this.container()))}_renderSelectedValue(e){const t=this._fitIndex(e??this.option("selectedIndex"));this._moveTo({top:this._getItemPosition(t)}),this._renderActiveStateItem()}_fitIndex(e){const t=(this.option("items")||[]).length;return e>=t?t-1:e<0?0:e}_getItemPosition(e){return Math.round(this._itemHeight()*e)}_renderItemsClick(){const e=this._getItemSelector(),t=(0,r.addNamespace)(a.name,this.NAME);s.default.off(this.$element(),t,e),s.default.on(this.$element(),t,e,this._itemClickHandler.bind(this))}_getItemSelector(){return`.${m}`}_itemClickHandler(e){this.option("selectedIndex",this._itemElementIndex(e.currentTarget))}_itemElementIndex(e){return this._itemElements().index(e)}_itemElements(){return this.$element().find(this._getItemSelector())}_renderActiveStateItem(){const e=this.option("selectedIndex");(0,h.each)(this._$items,(function(t){(0,u.default)(this).toggleClass("dx-dateview-item-selected",e===t)}))}_shouldScrollToNeighborItem(){return"desktop"===d.default.real().deviceType&&this._isWheelScrolled}_moveTo(e){const{top:t,left:i}=(0,g.convertToLocation)(e),a=this.scrollOffset(),s={x:a.left-i,y:a.top-t};if(this._isVisible()&&(s.x||s.y))if(this._prepareDirections(!0),this._animation&&!this._shouldScrollToNeighborItem()){const e=this;n.fx.stop((0,u.default)(this.content())),n.fx.animate((0,u.default)(this.content()),{duration:200,type:"slide",to:{top:Math.floor(s.y)},complete(){(0,o.resetPosition)((0,u.default)(e.content())),e.handleMove({delta:s})}}),delete this._animation}else this.handleMove({delta:s})}_validate(e){return this._moveIsAllowed(e)}_fitSelectedIndexInRange(e){const t=this.option("items").length;return Math.max(Math.min(e,t-1),0)}_isInNullNeighborhood(e){return-.1<=e&&e<=.1}_getSelectedIndexAfterScroll(e){const t=this.scrollOffset().top-e*this._itemHeight();if(this._isInNullNeighborhood(t))return e;const i=t>0?1:-1;return this._fitSelectedIndexInRange(e+i)}_getNewSelectedIndex(e){if(this._shouldScrollToNeighborItem())return this._getSelectedIndexAfterScroll(e);this._animation=!0;const t=this.scrollOffset().top/this._itemHeight();return Math.round(t)}_endActionHandler(){const e=this.option("selectedIndex"),t=this._getNewSelectedIndex(e);t===e?this._renderSelectedValue(t):this.option("selectedIndex",t),this._isWheelScrolled=!1}_itemHeight(){const e=this._$items.first();return(0,p.getHeight)(e)}_toggleActive(e){this.$element().toggleClass("dx-state-active",e)}_isVisible(){return(0,u.default)(this.container()).is(":visible")}_fireSelectedIndexChanged(e,t){this._selectedIndexChanged({value:e,previousValue:t,event:void 0})}_visibilityChanged(e){super._visibilityChanged(e),this._visibilityChangedHandler(e)}_visibilityChangedHandler(e){e&&(this._visibilityTimer=setTimeout((()=>{this._renderSelectedValue(this.option("selectedIndex"))}))),this.toggleActiveState(!1)}toggleActiveState(e){this.$element().toggleClass("dx-dateviewroller-current",e)}_refreshSelectedIndex(){const e=this.option("selectedIndex"),t=this._fitIndex(e);t===e?this._renderActiveStateItem():this.option("selectedIndex",t)}_optionChanged(e){switch(e.name){case"selectedIndex":this._fireSelectedIndexChanged(e.value,e.previousValue),this._renderSelectedValue(e.value);break;case"items":this._renderItems(),this._refreshSelectedIndex();break;case"onClick":case"showOnClick":this._renderContainerClick();break;case"onSelectedIndexChanged":this._renderSelectedIndexChanged();break;default:super._optionChanged(e)}}_dispose(){clearTimeout(this._visibilityTimer),super._dispose()}}(0,l.default)("dxDateViewRoller",v);t.default=v},14705:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(38662)),o=h(i(92848)),a=h(i(64553)),s=i(52576),r=h(i(91204)),l=h(i(78694)),d=h(i(48042)),u=h(i(60695)),c=h(i(14922));function h(e){return e&&e.__esModule?e:{default:e}}const p=function(e,t,i){g(e,t,i)},g=function(e,t,i){e.css("transform",`rotate(${t}deg) translate(0,${i}px)`)},_=l.default.inherit({_getDefaultOptions(){return(0,s.extend)(this.callBase(),{value:new Date(Date.now()),use24HourFormat:!0,_showClock:!0,_arrowOffset:5,stylingMode:void 0})},_getValue(){return this.option("value")||new Date},_init(){this.callBase(),this.$element().addClass("dx-timeview")},_render(){this.callBase(),this._renderBox(),this._updateTime()},_renderBox(){const e=(0,a.default)("<div>").appendTo(this.$element()),t=[];this.option("_showClock")&&t.push({ratio:1,shrink:0,baseSize:"auto",template:this._renderClock.bind(this)}),t.push({ratio:0,shrink:0,baseSize:"auto",template:this._renderField.bind(this)}),this._createComponent(e,r.default,{height:"100%",width:"100%",direction:"col",items:t})},_renderClock(e,t,i){this._$hourArrow=(0,a.default)("<div>").addClass("dx-timeview-hourarrow"),this._$minuteArrow=(0,a.default)("<div>").addClass("dx-timeview-minutearrow");const n=(0,a.default)(i);n.addClass("dx-timeview-clock").append(this._$hourArrow).append(this._$minuteArrow),this.setAria("role","presentation",n)},_updateClock(){const e=this._getValue(),t=e.getHours()/12*360+e.getMinutes()/60*30,i=e.getMinutes()/60*360;p(this._$hourArrow,t,this.option("_arrowOffset")),p(this._$minuteArrow,i,this.option("_arrowOffset"))},_getBoxItems(e){const t=[{ratio:0,shrink:0,baseSize:"auto",template:()=>this._hourBox.$element()},{ratio:0,shrink:0,baseSize:"auto",template:(0,a.default)("<div>").addClass("dx-timeview-time-separator").text(n.default.getTimeSeparator())},{ratio:0,shrink:0,baseSize:"auto",template:()=>this._minuteBox.$element()}];return e&&t.push({ratio:0,shrink:0,baseSize:"auto",template:()=>this._format12.$element()}),t},_renderField(){const e=!this.option("use24HourFormat");return this._createHourBox(e),this._createMinuteBox(),e&&this._createFormat12Box(),this._createComponent((0,a.default)("<div>").addClass("dx-timeview-field"),r.default,{direction:"row",align:"center",crossAlign:"center",items:this._getBoxItems(e)}).$element()},_createHourBox(e){(this._hourBox=this._createComponent((0,a.default)("<div>"),d.default,(0,s.extend)({min:-1,max:e?13:24,value:this._getValue().getHours(),onValueChanged:this._onHourBoxValueChanged.bind(this),onKeyboardHandled:e=>this._keyboardHandler(e)},this._getNumberBoxConfig()))).setAria("label","hours")},_isPM(){return!this.option("use24HourFormat")&&1===this._format12.option("value")},_onHourBoxValueChanged(e){let{value:t,component:i}=e;const n=this._getValue(),o=new Date(n);let a=this._convertMaxHourToMin(t);i.option("value",a),this._isPM()&&(a+=12),o.setHours(a),c.default.normalizeTime(o),this.option("value",o)},_convertMaxHourToMin(e){const t=this.option("use24HourFormat")?24:12;return(t+e)%t},_createMinuteBox(){(this._minuteBox=this._createComponent((0,a.default)("<div>"),d.default,(0,s.extend)({min:-1,max:60,value:this._getValue().getMinutes(),onKeyboardHandled:e=>this._keyboardHandler(e),onValueChanged:e=>{let{value:t,component:i}=e;const n=(60+t)%60;i.option("value",n);const o=new Date(this._getValue());o.setMinutes(n),c.default.normalizeTime(o),this.option("value",o)}},this._getNumberBoxConfig()))).setAria("label","minutes")},_createFormat12Box(){const e=n.default.getPeriodNames();(this._format12=this._createComponent((0,a.default)("<div>").addClass("dx-timeview-format12"),u.default,{items:[{value:-1,text:e[0]},{value:1,text:e[1]}],valueExpr:"value",displayExpr:"text",onKeyboardHandled:e=>this._keyboardHandler(e),onValueChanged:e=>{let{value:t}=e;const i=this._getValue().getHours(),n=new Date(this._getValue()),o=(i+12*t)%24;n.setHours(o),this.option("value",n)},value:this._getValue().getHours()>=12?1:-1,stylingMode:this.option("stylingMode")})).setAria("label","type")},_refreshFormat12(){if(this.option("use24HourFormat"))return;const e=this._getValue().getHours()>=12?1:-1;this._silentEditorValueUpdate(this._format12,e)},_silentEditorValueUpdate(e,t){e&&(e._suppressValueChangeAction(),e.option("value",t),e._resumeValueChangeAction())},_getNumberBoxConfig(){return{showSpinButtons:!0,displayValueFormatter:e=>(e<10?"0":"")+e,stylingMode:this.option("stylingMode")}},_normalizeHours(e){return this.option("use24HourFormat")?e:e%12||12},_updateField(){const e=this._normalizeHours(this._getValue().getHours());this._silentEditorValueUpdate(this._hourBox,e),this._silentEditorValueUpdate(this._minuteBox,this._getValue().getMinutes()),this._refreshFormat12()},_updateTime(){this.option("_showClock")&&this._updateClock(),this._updateField()},_visibilityChanged(e){e&&this._updateTime()},_optionChanged(e){switch(e.name){case"value":this._updateTime(),this.callBase(e);break;case"_arrowOffset":break;case"use24HourFormat":case"_showClock":case"stylingMode":this._invalidate();break;default:this.callBase(e)}}});(0,o.default)("dxTimeView",_);t.default=_},96375:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.sortDatesArray=t.monthDifference=t.isSameDates=t.isSameDateArrays=t.getDeserializedDate=void 0;var n=a(i(41380)),o=a(i(71051));function a(e){return e&&e.__esModule?e:{default:e}}const s=e=>o.default.deserializeDate(e);t.getDeserializedDate=s;const r=(e,t)=>!e&&!t||n.default.sameDate(s(e),s(t));t.isSameDates=r;t.isSameDateArrays=(e,t)=>{const[i,n]=e,[o,a]=t;return r(i,o)&&r(n,a)};t.sortDatesArray=e=>{const[t,i]=e;return t&&i&&s(t)>s(i)?[i,t]:e};t.monthDifference=(e,t)=>12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()},61238:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=w(i(92774)),o=i(98834),a=w(i(4671)),s=w(i(92848)),r=w(i(66636)),l=w(i(65951)),d=w(i(64960)),u=w(i(64553)),c=i(38699),h=i(52576),p=i(69629),g=i(53124),_=i(21274),f=w(i(78694)),m=i(52071),v=w(i(96379)),C=w(i(90987)),y=w(i(79686)),b=i(96375),x=w(i(49402));function w(e){return e&&e.__esModule?e:{default:e}}function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},S.apply(null,arguments)}const D="dx-texteditor-with-label",I="dx-texteditor-label-outside",E="dx-texteditor-with-floating-label",T="dx-texteditor-empty",A=["KeyDown","KeyUp","Change","Cut","Copy","Paste","Input","EnterKey"];class O extends f.default{_getDefaultOptions(){return(0,h.extend)(super._getDefaultOptions(),{acceptCustomValue:!0,activeStateEnabled:!0,applyButtonText:a.default.format("OK"),applyValueMode:"instantly",buttons:void 0,calendarOptions:{},cancelButtonText:a.default.format("Cancel"),endDateOutOfRangeMessage:a.default.format("dxDateRangeBox-endDateOutOfRangeMessage"),dateSerializationFormat:void 0,deferRendering:!0,disableOutOfRangeSelection:!1,disabledDates:null,displayFormat:null,dropDownButtonTemplate:"dropDownButton",dropDownOptions:{},endDate:null,endDateInputAttr:{},endDateLabel:a.default.format("dxDateRangeBox-endDateLabel"),endDateName:"",endDatePlaceholder:"",endDateText:void 0,focusStateEnabled:!0,hoverStateEnabled:!0,invalidStartDateMessage:a.default.format("dxDateRangeBox-invalidStartDateMessage"),invalidEndDateMessage:a.default.format("dxDateRangeBox-invalidEndDateMessage"),isValid:!0,labelMode:"static",max:void 0,min:void 0,multiView:!0,onChange:null,onClosed:null,onCopy:null,onCut:null,onEnterKey:null,onInput:null,onKeyDown:null,onKeyUp:null,onOpened:null,onPaste:null,onValueChanged:null,openOnFieldClick:!0,opened:!1,pickerType:"calendar",readOnly:!1,showClearButton:!1,showDropDownButton:!0,spellcheck:!1,startDate:null,startDateInputAttr:{},startDateLabel:a.default.format("dxDateRangeBox-startDateLabel"),startDateName:"",startDateOutOfRangeMessage:a.default.format("dxDateRangeBox-startDateOutOfRangeMessage"),startDatePlaceholder:"",startDateText:void 0,stylingMode:(0,r.default)().editorStylingMode??"outlined",todayButtonText:a.default.format("dxCalendar-todayButtonText"),useHiddenSubmitElement:!1,useMaskBehavior:!1,validationError:null,validationErrors:null,validationMessageMode:"auto",validationMessagePosition:"auto",validationStatus:"valid",value:[null,null],valueChangeEvent:"change",_internalValidationErrors:[],_currentSelection:"startDate"})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device(){const e=(0,m.current)();return(0,m.isMaterial)(e)},options:{labelMode:"floating",stylingMode:(0,r.default)().editorStylingMode??"filled"}},{device(){const e=(0,m.current)();return(0,m.isFluent)(e)},options:{labelMode:"outside"}},{device(){const e=l.default.real(),{platform:t}=e;return"ios"===t||"android"===t},options:{multiView:!1}}])}_initOptions(e){super._initOptions(e);const{value:t}=this.initialOption();let{value:i,startDate:n,endDate:o}=this.option();i[0]&&i[1]&&(0,b.getDeserializedDate)(i[0])>(0,b.getDeserializedDate)(i[1])&&(i=[i[1],i[0]]),n&&o&&(0,b.getDeserializedDate)(n)>(0,b.getDeserializedDate)(o)&&([n,o]=[o,n]),(0,b.isSameDateArrays)(t,i)?i=[n,o]:[n,o]=i,this.option({startDate:n,endDate:o,value:i})}_createOpenAction(){this._openAction=this._createActionByOption("onOpened",{excludeValidators:["disabled","readOnly"]})}_raiseOpenAction(){this._openAction||this._createOpenAction(),this._openAction()}_createCloseAction(){this._closeAction=this._createActionByOption("onClosed",{excludeValidators:["disabled","readOnly"]})}_raiseCloseAction(){this._closeAction||this._createCloseAction(),this._closeAction()}_createEventAction(e){this[`_${(0,g.camelize)(e)}Action`]=this._createActionByOption(`on${e}`,{excludeValidators:["readOnly"]})}_raiseAction(e,t){this[`_${(0,g.camelize)(e)}Action`]||this._createEventAction(e),this[`_${(0,g.camelize)(e)}Action`]({event:t})}_initTemplates(){this._templateManager.addDefaultTemplates({dropDownButton:new c.FunctionTemplate((e=>{const t=(0,u.default)("<div>").addClass("dx-dropdowneditor-icon");(0,u.default)(e.container).append(t)}))}),super._initTemplates()}_getDefaultButtons(){return[{name:"clear",Ctor:C.default},{name:"dropDown",Ctor:v.default}]}_initMarkup(){(0,u.default)(this.element()).addClass("dx-daterangebox").addClass("dx-texteditor").addClass("dx-dropdowneditor"),this._toggleDropDownEditorActiveClass(),this._toggleEditorLabelClass(),this._toggleReadOnlyState(),this._renderStylingMode(),this._renderEndDateBox(),this._renderSeparator(),this._renderStartDateBox(),this._toggleEmptinessState(),this._renderEmptinessEvent(),this._renderButtonsContainer(),super._initMarkup(),(0,u.default)(this.element()).removeClass("dx-show-invalid-badge")}_renderEmptinessEvent(){const e=(0,o.addNamespace)("input blur",this.NAME);n.default.off(this._focusTarget(),e),n.default.on(this._focusTarget(),e,this._toggleEmptinessState.bind(this))}_toggleEmptinessState(){const e=(0,u.default)(this.getStartDateBox().element()).hasClass(T)&&(0,u.default)(this.getEndDateBox().element()).hasClass(T);(0,u.default)(this.element()).toggleClass(T,e)}_attachKeyboardEvents(){this.option("readOnly")||super._attachKeyboardEvents()}_toggleReadOnlyState(){const{readOnly:e}=this.option();(0,u.default)(this.element()).toggleClass("dx-state-readonly",!!e)}_toggleDropDownEditorActiveClass(){const{opened:e}=this.option();(0,u.default)(this.element()).toggleClass("dx-dropdowneditor-active",e)}_toggleEditorLabelClass(){const{startDateLabel:e,endDateLabel:t,labelMode:i}=this.option(),n=!(!e&&!t||"hidden"===i);(0,u.default)(this.element()).removeClass(E).removeClass(I).removeClass(D),n&&((0,u.default)(this.element()).addClass("floating"===i?E:D),"outside"===i&&(0,u.default)(this.element()).addClass(I))}_renderStartDateBox(){this._$startDateBox=(0,u.default)("<div>").addClass("dx-start-datebox").prependTo(this.$element()),this._startDateBox=this._createComponent(this._$startDateBox,x.default,this._getStartDateBoxConfig()),this._startDateBox.NAME="_StartDateBox"}_renderEndDateBox(){this._$endDateBox=(0,u.default)("<div>").addClass("dx-end-datebox").appendTo(this.$element()),this._endDateBox=this._createComponent(this._$endDateBox,x.default,this._getEndDateBoxConfig()),this._endDateBox.NAME="_EndDateBox"}_renderSeparator(){const e=(0,p.getImageContainer)("to");this._$separator=(0,u.default)("<div>").addClass("dx-daterangebox-separator").prependTo(this.$element()),this._renderPreventBlurOnSeparatorClick(),null==e||e.appendTo(this._$separator)}_renderPreventBlurOnSeparatorClick(){const e=(0,o.addNamespace)("mousedown",this.NAME);n.default.off(this._$separator,e),n.default.on(this._$separator,e,(e=>{this._hasActiveElement()||this.focus(),e.preventDefault()}))}_renderButtonsContainer(){this._buttonCollection=new y.default(this,this._getDefaultButtons()),this._$beforeButtonsContainer=void 0,this._$afterButtonsContainer=void 0;const{buttons:e}=this.option();this._$beforeButtonsContainer=this._buttonCollection.renderBeforeButtons(e,this.$element()),this._$afterButtonsContainer=this._buttonCollection.renderAfterButtons(e,this.$element())}_updateButtons(e){this._buttonCollection.updateButtons(e)}_openHandler(){this._toggleOpenState()}_shouldCallOpenHandler(){return!0}_toggleOpenState(){const{opened:e}=this.option();e||this.getStartDateBox()._focusInput(),this.option("readOnly")||this.option("opened",!this.option("opened"))}_clearValueHandler(e){e.stopPropagation(),this._saveValueChangeEvent(e),this.clear(),!this._isStartDateActiveElement()&&this.focus(),n.default.trigger((0,u.default)(this.startDateField()),"input")}_isClearButtonVisible(){return this.option("showClearButton")&&!this.option("readOnly")}_focusInHandler(e){this._shouldSkipFocusEvent(e)||super._focusInHandler(e)}_focusOutHandler(e){this._shouldSkipFocusEvent(e)||super._focusOutHandler(e)}_shouldSkipFocusEvent(e){const{target:t,relatedTarget:i}=e;return(0,u.default)(t).is((0,u.default)(this.startDateField()))&&(0,u.default)(i).is((0,u.default)(this.endDateField()))||(0,u.default)(t).is((0,u.default)(this.endDateField()))&&(0,u.default)(i).is((0,u.default)(this.startDateField()))}_getPickerType(){const{pickerType:e}=this.option();return["calendar","native"].includes(e)?e:"calendar"}_getRestErrors(e,t){return e.filter((e=>!t.some((t=>e.message===t.message))))}_syncValidationErrors(e,t,i){t||(t=[]),i||(i=[]);const n=this.option(e)||[],o=this._getRestErrors(n,i);this.option(e,[...o,...t])}_getDateBoxConfig(){const e=this.option(),t={acceptCustomValue:e.acceptCustomValue,activeStateEnabled:e.activeStateEnabled,applyValueMode:e.applyValueMode,dateSerializationFormat:e.dateSerializationFormat,deferRendering:e.deferRendering,disabled:e.disabled,displayFormat:e.displayFormat,focusStateEnabled:e.focusStateEnabled,isValid:e.isValid,tabIndex:e.tabIndex,height:e.height,hoverStateEnabled:e.hoverStateEnabled,labelMode:e.labelMode,max:e.max,min:e.min,openOnFieldClick:e.openOnFieldClick,pickerType:this._getPickerType(),readOnly:e.readOnly,rtlEnabled:e.rtlEnabled,spellcheck:e.spellcheck,stylingMode:e.stylingMode,type:"date",useMaskBehavior:e.useMaskBehavior,validationMessageMode:e.validationMessageMode,validationMessagePosition:e.validationMessagePosition,valueChangeEvent:e.valueChangeEvent,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onChange:e.onChange,onInput:e.onInput,onCut:e.onCut,onCopy:e.onCopy,onPaste:e.onPaste,onEnterKey:e.onEnterKey,_dateRangeBoxInstance:this,_showValidationMessage:!1};return(0,_.each)(A,((e,i)=>{const n=`on${i}`;this.hasActionSubscription(n)&&(t[n]=e=>{this._raiseAction(i,e.event)})})),t}_hideOnOutsideClickHandler(e){let{target:t}=e;const i=(0,u.default)(t),n=this.getButton("dropDown"),o=null==n?void 0:n.$element(),a=!!i.closest((0,u.default)(this.element())).length,s=!!i.closest(o).length;return!a&&!s}_getStartDateBoxConfig(){var e;const t=this.option();return S({},this._getDateBoxConfig(),{applyButtonText:t.applyButtonText,calendarOptions:t.calendarOptions,cancelButtonText:t.cancelButtonText,dateOutOfRangeMessage:t.startDateOutOfRangeMessage,deferRendering:t.deferRendering,disabledDates:null===(e=t.dropDownOptions)||void 0===e?void 0:e.disabledDates,dropDownOptions:S({showTitle:!1,title:"",hideOnOutsideClick:e=>this._hideOnOutsideClickHandler(e),hideOnParentScroll:!1,preventScrollEvents:!1},t.dropDownOptions),invalidDateMessage:t.invalidStartDateMessage,onValueChanged:e=>{let{value:t,event:i}=e;const n=[t,this.option("value")[1]];this.updateValue(n,i)},opened:t.opened,onOpened:()=>{this._raiseOpenAction()},onClosed:()=>{this._raiseCloseAction()},onOptionChanged:e=>{const{name:t,value:i,previousValue:n}=e;"text"===t&&this.option("startDateText",i),"validationErrors"===t&&this._syncValidationErrors("_internalValidationErrors",i,n)},todayButtonText:t.todayButtonText,showClearButton:!1,showDropDownButton:!1,value:this.option("value")[0],label:t.startDateLabel,placeholder:t.startDatePlaceholder,inputAttr:t.startDateInputAttr,name:t.startDateName,_showValidationIcon:!1})}_getEndDateBoxConfig(){const e=this.option();return S({},this._getDateBoxConfig(),{invalidDateMessage:e.invalidEndDateMessage,dateOutOfRangeMessage:e.endDateOutOfRangeMessage,onValueChanged:e=>{let{value:t,event:i}=e;const n=[this.option("value")[0],t];this.updateValue(n,i)},onOptionChanged:e=>{const{name:t,value:i,previousValue:n}=e;"text"===t&&this.option("endDateText",i),"validationErrors"===t&&this._syncValidationErrors("_internalValidationErrors",i,n)},opened:e.opened,showClearButton:!1,showDropDownButton:!1,value:this.option("value")[1],label:e.endDateLabel,placeholder:e.endDatePlaceholder,deferRendering:!0,inputAttr:e.endDateInputAttr,name:e.endDateName})}_getValidationMessagePosition(){const{validationMessagePosition:e}=this.option();return"auto"===e?this.option("opened")?"top":"bottom":e}_getSerializedDates(e){let[t,i]=e;return[this.getStartDateBox()._serializeDate((0,b.getDeserializedDate)(t)),this.getStartDateBox()._serializeDate((0,b.getDeserializedDate)(i))]}updateValue(e,t){(0,b.isSameDateArrays)(e,this.option("value"))||(t&&this._saveValueChangeEvent(t),this.option("value",this._getSerializedDates(e)))}_updateDateBoxesValue(e){const t=this.getStartDateBox(),i=this.getEndDateBox(),[n,o]=e,a=t.option("value"),s=i.option("value");(0,b.isSameDates)(n,a)||t.option("value",n),(0,b.isSameDates)(o,s)||i.option("value",o)}_renderAccessKey(){const e=(0,u.default)(this.field()[0]),{accessKey:t}=this.option();e.attr("accesskey",t)}_focusTarget(){return(0,u.default)(this.element()).find(".dx-texteditor-input")}_focusEventTarget(){return this.element()}_focusClassTarget(){return this.$element()}_toggleFocusClass(e,t){super._toggleFocusClass(e,this._focusClassTarget(t))}_hasActiveElement(){return this._isStartDateActiveElement()||this._isEndDateActiveElement()}_isStartDateActiveElement(){return this._isActiveElement(this.startDateField())}_isEndDateActiveElement(){return this._isActiveElement(this.endDateField())}_isActiveElement(e){return(0,u.default)(e).is((0,u.default)(d.default.getActiveElement(e)))}_popupContentIdentifier(e){return e&&(this._popupContentId=e),this._popupContentId}_setAriaAttributes(){const{opened:e}=this.option(),t={expanded:e,controls:this._popupContentIdentifier()},i=e?this._popupContentIdentifier():void 0;this.setAria(t),this.setAria("owns",i,this.$element())}_cleanButtonContainers(){var e,t;null===(e=this._$beforeButtonsContainer)||void 0===e||e.remove(),null===(t=this._$afterButtonsContainer)||void 0===t||t.remove(),this._buttonCollection.clean(),this._$beforeButtonsContainer=void 0,this._$afterButtonsContainer=void 0}_applyCustomValidation(e){this.validationRequest.fire({editor:this,value:e})}_clean(){var e,t,i;this._cleanButtonContainers(),null===(e=this._$startDateBox)||void 0===e||e.remove(),null===(t=this._$endDateBox)||void 0===t||t.remove(),null===(i=this._$separator)||void 0===i||i.remove(),super._clean()}_optionChanged(e){const{name:t,fullName:i,value:n,previousValue:o}=e;switch(t){case"acceptCustomValue":case"dateSerializationFormat":case"displayFormat":case"max":case"min":case"openOnFieldClick":case"spellcheck":case"useMaskBehavior":case"valueChangeEvent":this.getStartDateBox().option(t,n),this.getEndDateBox().option(t,n);break;case"rtlEnabled":default:super._optionChanged(e);break;case"labelMode":this._toggleEditorLabelClass(),this.getStartDateBox().option(t,n),this.getEndDateBox().option(t,n);break;case"applyButtonText":case"applyValueMode":case"cancelButtonText":case"deferRendering":case"disabledDates":case"todayButtonText":this.getStartDateBox().option(t,n);break;case"opened":this._toggleDropDownEditorActiveClass(),this.getStartDateBox().option(t,n),this.getEndDateBox()._setOptionWithoutOptionChange(t,n);break;case"buttons":this._cleanButtonContainers(),this._renderButtonsContainer();break;case"calendarOptions":case"dropDownOptions":this.getStartDateBox().option(i,n);break;case"pickerType":{const e=this._getPickerType();this.getStartDateBox().option(t,e),this.getEndDateBox().option(t,e);break}case"height":this.getStartDateBox().option(t,n),this.getEndDateBox().option(t,n),super._optionChanged(e);break;case"dropDownButtonTemplate":case"showDropDownButton":this._updateButtons(["dropDown"]);break;case"showClearButton":this._updateButtons(["clear"]);break;case"endDate":this.updateValue([this.option("value")[0],n]);break;case"startDateLabel":this._toggleEditorLabelClass(),this.getStartDateBox().option("label",n);break;case"endDateLabel":this._toggleEditorLabelClass(),this.getEndDateBox().option("label",n);break;case"startDatePlaceholder":this.getStartDateBox().option("placeholder",n);break;case"endDatePlaceholder":this.getEndDateBox().option("placeholder",n);break;case"startDateInputAttr":this.getStartDateBox().option("inputAttr",n);break;case"startDateName":this.getStartDateBox().option("name",n);break;case"endDateInputAttr":this.getEndDateBox().option("inputAttr",n);break;case"endDateName":this.getEndDateBox().option("name",n);break;case"multiView":this.getStartDateBox().option("calendarOptions.viewsCount",n?2:1);break;case"tabIndex":case"activeStateEnabled":case"focusStateEnabled":case"hoverStateEnabled":super._optionChanged(e),this.getStartDateBox().option(t,n),this.getEndDateBox().option(t,n);break;case"onValueChanged":this._createValueChangeAction();break;case"onOpened":this._createOpenAction();break;case"onClosed":this._createCloseAction();break;case"onKeyDown":case"onKeyUp":case"onChange":case"onInput":case"onCut":case"onCopy":case"onPaste":case"onEnterKey":this._createEventAction(t.replace("on",""));break;case"readOnly":case"disabled":this._updateButtons(),super._optionChanged(e),this.getStartDateBox().option(t,n),this.getEndDateBox().option(t,n);break;case"disableOutOfRangeSelection":case"startDateText":case"endDateText":case"useHiddenSubmitElement":case"_currentSelection":break;case"startDate":this.updateValue([n,this.option("value")[1]]);break;case"stylingMode":this._renderStylingMode(),this.getStartDateBox().option(t,n),this.getEndDateBox().option(t,n);break;case"invalidStartDateMessage":this.getStartDateBox().option("invalidDateMessage",n);break;case"invalidEndDateMessage":this.getEndDateBox().option("invalidDateMessage",n);break;case"startDateOutOfRangeMessage":this.getStartDateBox().option("dateOutOfRangeMessage",n);break;case"endDateOutOfRangeMessage":this.getEndDateBox().option("dateOutOfRangeMessage",n);break;case"validationMessagePosition":this.getStartDateBox().option(t,n),super._optionChanged(e);break;case"_internalValidationErrors":{this._syncValidationErrors("validationErrors",n,o);const e=this.option("validationErrors");this.option("isValid",!(null!=e&&e.length));break}case"isValid":{this.getStartDateBox().option(t,n),this.getEndDateBox().option(t,n);const i=n&&!this.option("_internalValidationErrors").length;if(this._shouldSkipIsValidChange||i===n)return void super._optionChanged(e);this._shouldSkipIsValidChange=!0,this.option("isValid",i),this._shouldSkipIsValidChange=!1;break}case"validationErrors":{const t=this.option("_internalValidationErrors")||[],i=n||[],o=[...this._getRestErrors(i,t),...t],a=o.length?o:null;this._options.silent("validationErrors",a),super._optionChanged(S({},e,{value:a}));break}case"value":{const e=(0,b.sortDatesArray)(n);if(!(0,b.isSameDateArrays)(e,o)){const t=!(0,b.isSameDateArrays)(e,this._initialValue);this.option("isDirty",t),this._setOptionWithoutOptionChange("value",e),this._setOptionWithoutOptionChange("startDate",e[0]),this._setOptionWithoutOptionChange("endDate",e[1]),this._applyCustomValidation(e),this._updateDateBoxesValue(e),this.getStartDateBox().getStrategy().renderValue(),this._toggleEmptinessState(),this._raiseValueChangeAction(e,o),this._saveValueChangeEvent(void 0)}break}}}getStartDateBox(){return this._startDateBox}getEndDateBox(){return this._endDateBox}getButton(e){return this._buttonCollection.getButton(e)}open(){this.option("opened",!0)}close(){this.option("opened",!1)}content(){return this.getStartDateBox().content()}field(){return[this.startDateField(),this.endDateField()]}startDateField(){return this.getStartDateBox().field()}endDateField(){return this.getEndDateBox().field()}focus(){this.getStartDateBox().focus()}reset(){super.reset();const e=this.getStartDateBox(),t=this.getEndDateBox();e.reset(),t.reset(),e._updateInternalValidationState(!0),t._updateInternalValidationState(!0)}clear(){super.clear(),this.getEndDateBox().clear(),this.getStartDateBox().clear()}}(0,s.default)("dxDateRangeBox",O);t.default=O},49402:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(92774)),o=i(98834),a=u(i(64553)),s=i(57653),r=u(i(2739)),l=i(96375),d=u(i(37091));function u(e){return e&&e.__esModule?e:{default:e}}const c=r.default;t.default=class extends c{_initStrategy(){this._strategy=new d.default(this)}_initMarkup(){super._initMarkup(),this._renderInputClickEvent()}_renderInputClickEvent(){const e=(0,o.addNamespace)("dxclick",this.NAME);n.default.off(this._input(),e),n.default.on(this._input(),e,(e=>{this._processValueChange(e)}))}_applyButtonHandler(e){let{event:t}=e;const i=this.getStrategy(),n=i.getValue();i.getDateRangeBox().updateValue(n,t),this.close(),this.option("focusStateEnabled")&&this.focus()}_openHandler(e){this.getStrategy().getDateRangeBox().option("opened")||super._openHandler(e)}_renderOpenedState(){const{opened:e}=this.option();this._getDateRangeBox().option("opened",e),this._isStartDateBox()&&(e&&this._createPopup(),this._getDateRangeBox()._popupContentIdentifier(this._getControlsAria()),this._setPopupOption("visible",e),this._getDateRangeBox()._setAriaAttributes())}_getDateRangeBox(){return this.getStrategy().getDateRangeBox()}_isStartDateBox(){return(0,a.default)(this.element()).hasClass("dx-start-datebox")}_renderPopup(){super._renderPopup(),this._isStartDateBox()&&this._getDateRangeBox()._bindInnerWidgetOptions(this._popup,"dropDownOptions")}_popupShownHandler(){var e;super._popupShownHandler(),null===(e=this._getDateRangeBox()._validationMessage)||void 0===e||e.option("positionSide",this._getValidationMessagePositionSide())}_popupHiddenHandler(){var e;super._popupHiddenHandler(),null===(e=this._getDateRangeBox()._validationMessage)||void 0===e||e.option("positionSide",this._getValidationMessagePositionSide())}_focusInHandler(e){super._focusInHandler(e),this._processValueChange(e)}_popupTabHandler(e){const t=(0,a.default)(e.target);e.shiftKey&&t.is(this._getFirstPopupElement())&&(this._getDateRangeBox().getEndDateBox().focus(),e.preventDefault()),!e.shiftKey&&t.is(this._getLastPopupElement())&&(this._getDateRangeBox().getStartDateBox().focus(),e.preventDefault())}_processValueChange(e){const{target:t}=e,i=this._getDateRangeBox(),[n,o]=i.field();if((0,a.default)(t).is((0,a.default)(n))&&i.option("_currentSelection","startDate"),(0,a.default)(t).is((0,a.default)(o))&&i.option("_currentSelection","endDate"),!i.getStartDateBox().getStrategy().getWidget())return;const s=i.getStartDateBox().getStrategy().getWidget(),{value:r}=s.option(),d=(0,l.getDeserializedDate)(null==r?void 0:r[0]),u=(0,l.getDeserializedDate)(null==r?void 0:r[1]);(0,a.default)(t).is((0,a.default)(n))&&(d&&(s._skipNavigate=!0,s.option("currentDate",d)),this.getStrategy().setActiveStartDateBox(),s.option("_currentSelection","startDate"),i.option("disableOutOfRangeSelection")&&s._setViewsMaxOption(u)),(0,a.default)(t).is((0,a.default)(o))&&(u&&(d&&(0,l.monthDifference)(d,u)>1&&(s.option("currentDate",s._getDateByOffset(null,u)),s.option("currentDate",s._getDateByOffset(-1,u))),s._skipNavigate=!0,s.option("currentDate",u)),i.getStartDateBox().getStrategy().setActiveEndDateBox(),s.option("_currentSelection","endDate"),i.option("disableOutOfRangeSelection")&&s._setViewsMinOption(d))}_invalidate(){super._invalidate(),this._refreshStrategy()}_updateInternalValidationState(e,t){this.option({isValid:e,validationError:e?null:{message:t}})}_recallInternalValidation(e){this._applyInternalValidation(e)}_isTargetOutOfComponent(e){const t=(0,a.default)(this._getDateRangeBox().element()),i=0===(0,a.default)(e).closest(t).length;return super._isTargetOutOfComponent(e)&&i}_updateLabelWidth(){const e=this._getDateRangeBox()._$beforeButtonsContainer,{labelMode:t}=this.option();"outside"===t&&e&&this._isStartDateBox()?this._label._updateLabelTransform((0,s.getWidth)(e)):super._updateLabelWidth()}_optionChanged(e){switch(e.name){case"isValid":{const t=this._getDateRangeBox().option("isValid");if(this._skipIsValidOptionChange||t===e.value)return void super._optionChanged(e);this._skipIsValidOptionChange=!0,this.option({isValid:t}),this._skipIsValidOptionChange=!1;break}default:super._optionChanged(e)}}close(){this.getStrategy().getDateRangeBox().getStartDateBox().option("opened",!1)}getStrategy(){return this._strategy}}},37091:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(92774)),o=i(52576),a=i(11528),s=l(i(49403)),r=i(96375);function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}class u extends s.default{constructor(e){super(),this._dateSelectedCounter=0,this.dateBox=e,this.dateRangeBox=e.option("_dateRangeBoxInstance")}popupConfig(e){return(0,o.extend)(!0,super.popupConfig(e),{position:{of:this.getDateRangeBox().$element()}})}popupShowingHandler(){this.getWidget()._restoreViewsMinMaxOptions(),this._dateSelectedCounter=0}_getPopup(){return super._getPopup()||this.getDateRangeBox().getStartDateBox()._popup}supportedKeys(){const e=this.getDateRangeBox();return d({},super.supportedKeys(),{rightArrow:()=>{if(e.option("opened"))return!0},leftArrow:()=>{if(e.option("opened"))return!0},enter:t=>{if(e.option("opened")){const i=this.dateBox.dateOption("value");this.dateBox._valueChangeEventHandler(t);const n=this.dateBox.dateOption("value");return!(0,r.isSameDates)(i,n)?e.getStartDateBox().getStrategy().getWidget().option("value",e.option("value")):e.getStartDateBox().getStrategy().getWidget()._enterKeyHandler(t),!1}},tab:t=>{if(!e.option("opened"))return;if(!this._getPopup().getFocusableElements().length)return void((!t.shiftKey&&e._isEndDateActiveElement()||t.shiftKey&&e._isStartDateActiveElement())&&e.close());if(!t.shiftKey&&e._isStartDateActiveElement()||t.shiftKey&&e._isEndDateActiveElement())return;const i=t.shiftKey?e.getStartDateBox()._getLastPopupElement():e.getStartDateBox()._getFirstPopupElement();i&&(n.default.trigger(i,"focus"),i.select()),t.preventDefault()}})}_getWidgetOptions(){const{disabledDates:e,value:t,multiView:i}=this.dateRangeBox.option(),n=(0,a.isFunction)(e)?this._injectComponent(e):e??void 0;return(0,o.extend)(super._getWidgetOptions(),{disabledDates:n,value:t,selectionMode:"range",viewsCount:i?2:1,_allowChangeSelectionOrder:!0,_currentSelection:this.getCurrentSelection()})}_refreshActiveDescendant(e){this.getDateRangeBox().setAria("activedescendant",e.actionValue)}_injectComponent(e){return t=>e((0,o.extend)(t,{component:this.getDateRangeBox()}))}getKeyboardListener(){const e=this.getDateRangeBox();return e.getStartDateBox()?e.getStartDateBox().getStrategy().getWidget():this.getWidget()}getValue(){return this.getWidget().option("value")}_updateValue(){const{value:e}=this.getDateRangeBox().option();this.getWidget()&&(this._shouldPreventFocusChange=!0,this.getWidget().option("value",e))}_isInstantlyMode(){return"instantly"===this.getDateRangeBox().option("applyValueMode")}_valueChangedHandler(e){let{value:t,previousValue:i,event:n}=e;if((0,r.isSameDateArrays)(t,i)&&!this.getWidget()._valueSelected)return void(this._shouldPreventFocusChange=!1);this.getWidget()._valueSelected=!1;const o=this.getDateRangeBox();if(this._isInstantlyMode()){if(!o.option("disableOutOfRangeSelection"))if("startDate"===this._getCalendarCurrentSelection())this._dateSelectedCounter=0;else if(this._dateSelectedCounter=1,t[0]){if((0,r.getDeserializedDate)(t[0])>(0,r.getDeserializedDate)(t[1]))return void o.updateValue([t[0],null],n)}else this._dateSelectedCounter=-1;if(o.updateValue(t,n),this._dateSelectedCounter+=1,2===this._dateSelectedCounter)return void o.close()}else if("endDate"===this._getCalendarCurrentSelection()&&t[0]&&(0,r.getDeserializedDate)(t[0])>(0,r.getDeserializedDate)(t[1]))return;this._shouldPreventFocusChange||this._moveFocusToNextInput(),this._shouldPreventFocusChange=!1}_moveFocusToNextInput(){const e="startDate"===this._getCalendarCurrentSelection()?this.getDateRangeBox().getEndDateBox():this.getDateRangeBox().getStartDateBox();e.focus(),n.default.trigger(e.field(),"dxclick")}getCurrentSelection(){return this.getDateRangeBox().option("_currentSelection")}_getCalendarCurrentSelection(){return this.getWidget().option("_currentSelection")}_closeDropDownByEnter(){return"startDate"!==this._getCalendarCurrentSelection()}dateBoxValue(){const{dateBox:e}=this;return arguments.length?e.dateValue.apply(e,arguments):e.dateOption.apply(e,["value"])}_cellClickHandler(){}setActiveStartDateBox(){this.dateBox=this.getDateRangeBox().getStartDateBox()}setActiveEndDateBox(){this.dateBox=this.getDateRangeBox().getEndDateBox()}getDateRangeBox(){return this.dateRangeBox}getWidget(){return this._widget}}t.default=u},89500:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.animation=void 0;var n=i(16826),o=i(53124);t.animation={moveTo(e){const{$element:t}=e,{position:i}=e,o={};let a;switch(e.direction||"left"){case"right":o.transform=`translate(${i}px, 0px)`,a="custom";break;case"left":o.left=i,a="slide";break;case"top":case"bottom":o.top=i,a="slide"}n.fx.animate(t,{type:a,to:o,duration:e.duration,complete:e.complete})},margin(e){const{$element:t}=e,{margin:i}=e,a=e.direction||"left",s={};s[`margin${(0,o.camelize)(a,!0)}`]=i,n.fx.animate(t,{to:s,duration:e.duration,complete:e.complete})},fade(e,t,i,o){n.fx.animate(e,{type:"fade",to:t.to,from:t.from,duration:i,complete:o})},size(e){const{$element:t}=e,{size:i}=e,o=e.direction||"left",a=e.marginTop||0,{duration:s}=e,r={};"right"===o||"left"===o?r.width=i:r.height=i,"bottom"===o&&(r.marginTop=a),n.fx.animate(t,{to:r,duration:s,complete:e.complete})},complete(e){n.fx.stop(e,!0)}}},13768:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=i(64044),a=b(i(92774)),s=i(18029),r=b(i(92848)),l=i(61404),d=b(i(64553)),u=i(48650),c=i(87739),h=i(52576),p=i(41639),g=i(11528),_=i(3104),f=b(i(11118)),m=i(89500),v=b(i(80222)),C=b(i(35733)),y=b(i(22168));function b(e){return e&&e.__esModule?e:{default:e}}const x="dx-drawer",w="dx-drawer-panel-content",S="dx-drawer-shader",D="dx-state-invisible",I="content",E="panel",T=f.default.inherit({_getDefaultOptions(){return(0,h.extend)(this.callBase(),{position:"left",opened:!1,minSize:null,maxSize:null,shading:!1,template:E,openedStateMode:"shrink",revealMode:"slide",animationEnabled:!0,animationDuration:400,closeOnOutsideClick:!1,contentTemplate:I})},_init(){this.callBase(),this._initStrategy(),this.$element().addClass(x),this._whenAnimationCompleted=void 0,this._whenPanelContentRendered=void 0,this._whenPanelContentRefreshed=void 0,this._$wrapper=(0,d.default)("<div>").addClass("dx-drawer-wrapper"),this._$viewContentWrapper=(0,d.default)("<div>").addClass("dx-drawer-content"),this._$wrapper.append(this._$viewContentWrapper),this.$element().append(this._$wrapper)},_initStrategy(){switch(this.option("openedStateMode")){case"push":default:this._strategy=new C.default(this);break;case"shrink":this._strategy=new y.default(this);break;case"overlap":this._strategy=new v.default(this)}},_getAnonymousTemplateName:()=>I,_initTemplates(){const e={};e[E]=new u.EmptyTemplate,e[I]=new u.EmptyTemplate,this._templateManager.addDefaultTemplates(e),this.callBase()},_viewContentWrapperClickHandler(e){let t=this.option("closeOnOutsideClick");(0,g.isFunction)(t)&&(t=t(e)),t&&this.option("opened")&&(this.stopAnimations(),this.option("shading")&&e.preventDefault(),this.hide())},_initMarkup(){this.callBase(),this._toggleOpenedStateClass(this.option("opened")),this._renderPanelContentWrapper(),this._refreshOpenedStateModeClass(),this._refreshRevealModeClass(),this._renderShader(),this._refreshPositionClass(),this._whenPanelContentRendered=(0,c.Deferred)(),this._strategy.renderPanelContent(this._whenPanelContentRendered),this._strategy.onPanelContentRendered(),this._renderViewContent(),a.default.off(this._$viewContentWrapper,o.name),a.default.on(this._$viewContentWrapper,o.name,this._viewContentWrapperClickHandler.bind(this)),this._refreshWrapperChildrenOrder()},_render(){this._initMinMaxSize(),this.callBase(),this._whenPanelContentRendered.always((()=>{this._initMinMaxSize(),this._strategy.refreshPanelElementSize("slide"===this.option("revealMode")),this._renderPosition(this.option("opened"),!0),this._removePanelManualPosition()}))},_removePanelManualPosition(){this._$panelContentWrapper.attr("manualposition")&&(this._$panelContentWrapper.removeAttr("manualPosition"),this._$panelContentWrapper.css({position:"",top:"",left:"",right:"",bottom:""}))},_togglePanelContentHiddenClass(){const e=()=>{const{minSize:e,opened:t}=this.option(),i=!e&&!t;this._$panelContentWrapper.toggleClass("dx-drawer-panel-content-hidden",i)};this._whenAnimationCompleted&&!this.option("opened")?(0,c.when)(this._whenAnimationCompleted).done(e):e()},_renderPanelContentWrapper(){const{openedStateMode:e,opened:t,minSize:i}=this.option();this._$panelContentWrapper=(0,d.default)("<div>").addClass(w),this._togglePanelContentHiddenClass();const n=this.calcTargetPosition();"push"===e&&["top","bottom"].includes(n)&&this._$panelContentWrapper.addClass(`${w}-push-top-or-bottom`),"overlap"===e||t||i||(this._$panelContentWrapper.attr("manualposition",!0),this._$panelContentWrapper.css({position:"absolute",top:"-10000px",left:"-10000px",right:"auto",bottom:"auto"})),this._$wrapper.append(this._$panelContentWrapper)},_refreshOpenedStateModeClass(e){e&&this.$element().removeClass(`${x}-${e}`),this.$element().addClass(`${x}-${this.option("openedStateMode")}`)},_refreshPositionClass(e){e&&this.$element().removeClass(`${x}-${e}`),this.$element().addClass(`${x}-${this.calcTargetPosition()}`)},_refreshWrapperChildrenOrder(){const e=this.calcTargetPosition();this._strategy.isViewContentFirst(e,this.option("rtlEnabled"))?this._$wrapper.prepend(this._$viewContentWrapper):this._$wrapper.prepend(this._$panelContentWrapper)},_refreshRevealModeClass(e){e&&this.$element().removeClass(`${x}-${e}`),this.$element().addClass(`${x}-${this.option("revealMode")}`)},_renderViewContent(){const e=this.option("contentTemplate"),t=this._getTemplate(e);if(t){const i=t.render({container:this.viewContent(),noModel:!0,transclude:this._templateManager.anonymousTemplateName===e});i.hasClass("ng-scope")&&(0,d.default)(this._$viewContentWrapper).children().not(`.${S}`).replaceWith(i)}},_renderShader(){this._$shader=this._$shader||(0,d.default)("<div>").addClass(S),this._$shader.appendTo(this.viewContent()),this._toggleShaderVisibility(this.option("opened"))},_initSize(){this._initMinMaxSize()},_initMinMaxSize(){const e=this.isHorizontalDirection()?this.getRealPanelWidth():this.getRealPanelHeight();this._maxSize=this.option("maxSize")||e,this._minSize=this.option("minSize")||0},calcTargetPosition(){const e=this.option("position"),t=this.option("rtlEnabled");let i=e;return"before"===e?i=t?"right":"left":"after"===e&&(i=t?"left":"right"),i},getOverlayTarget(){return this._$wrapper},getOverlay(){return this._overlay},getMaxSize(){return this._maxSize},getMinSize(){return this._minSize},getRealPanelWidth(){return(0,_.hasWindow)()?(0,g.isDefined)(this.option("templateSize"))?this.option("templateSize"):(0,p.getBoundingRect)(this._getPanelTemplateElement()).width:0},getRealPanelHeight(){return(0,_.hasWindow)()?(0,g.isDefined)(this.option("templateSize"))?this.option("templateSize"):(0,p.getBoundingRect)(this._getPanelTemplateElement()).height:0},_getPanelTemplateElement(){const e=this._strategy.getPanelContent();let t=e;return e.children().length&&(t=e.children().eq(0),e.hasClass("dx-overlay-content")&&t.hasClass("dx-template-wrapper")&&t.children().length&&(t=t.children().eq(0))),t.get(0)},getElementHeight(e){const t=e.children();return t.length?(0,p.getBoundingRect)(t.eq(0).get(0)).height:(0,p.getBoundingRect)(e.get(0)).height},isHorizontalDirection(){const e=this.calcTargetPosition();return"left"===e||"right"===e},stopAnimations(e){n.fx.stop(this._$shader,e),n.fx.stop((0,d.default)(this.content()),e),n.fx.stop((0,d.default)(this.viewContent()),e);const t=this.getOverlay();t&&n.fx.stop((0,d.default)(t.$content()),e)},setZIndex(e){this._$shader.css("zIndex",e-1),this._$panelContentWrapper.css("zIndex",e)},resizeContent(){this.resizeViewContent},resizeViewContent(){(0,s.triggerResizeEvent)(this.viewContent())},_isInvertedPosition(){const e=this.calcTargetPosition();return"right"===e||"bottom"===e},_renderPosition(e,t,i){if(this.stopAnimations(i),!(0,_.hasWindow)())return;(0,d.default)(this.viewContent()).css("paddingLeft",0),(0,d.default)(this.viewContent()).css("paddingRight",0),(0,d.default)(this.viewContent()).css("paddingTop",0),(0,d.default)(this.viewContent()).css("paddingBottom",0);let n=this.option("animationEnabled");!0===t&&(n=!1),e&&this._toggleShaderVisibility(e),this._strategy.renderPosition(n,this.option("animationDuration"))},_animationCompleteHandler(){this.resizeViewContent(),this._whenAnimationCompleted&&this._whenAnimationCompleted.resolve()},_getPositionCorrection(){return this._isInvertedPosition()?-1:1},_dispose(){m.animation.complete((0,d.default)(this.viewContent())),this.callBase()},_visibilityChanged(e){e&&this._dimensionChanged()},_dimensionChanged(){this._initMinMaxSize(),this._strategy.refreshPanelElementSize("slide"===this.option("revealMode")),this._renderPosition(this.option("opened"),!0)},_toggleShaderVisibility(e){this.option("shading")?(this._$shader.toggleClass(D,!e),this._$shader.css("visibility",e?"visible":"hidden")):this._$shader.toggleClass(D,!0)},_toggleOpenedStateClass(e){this.$element().toggleClass("dx-drawer-opened",e)},_refreshPanel(){(0,d.default)(this.viewContent()).css("left",0),(0,d.default)(this.viewContent()).css("transform","translate(0px, 0px)"),(0,d.default)(this.viewContent()).removeClass("dx-theme-background-color"),this._removePanelContentWrapper(),this._removeOverlay(),this._renderPanelContentWrapper(),this._refreshWrapperChildrenOrder(),this._whenPanelContentRefreshed=(0,c.Deferred)(),this._strategy.renderPanelContent(this._whenPanelContentRefreshed),this._strategy.onPanelContentRendered(),(0,_.hasWindow)()&&this._whenPanelContentRefreshed.always((()=>{this._strategy.refreshPanelElementSize("slide"===this.option("revealMode")),this._renderPosition(this.option("opened"),!0,!0),this._removePanelManualPosition()}))},_clean(){this._cleanFocusState(),this._removePanelContentWrapper(),this._removeOverlay()},_removePanelContentWrapper(){this._$panelContentWrapper&&this._$panelContentWrapper.remove()},_removeOverlay(){this._overlay&&(this._overlay.dispose(),delete this._overlay,delete this._$panelContentWrapper)},_optionChanged(e){switch(e.name){case"width":this.callBase(e),this._dimensionChanged();break;case"opened":this._renderPosition(this.option("opened")),this._toggleOpenedStateClass(e.value),this._togglePanelContentHiddenClass();break;case"position":this._refreshPositionClass(e.previousValue),this._refreshWrapperChildrenOrder(),this._invalidate();break;case"contentTemplate":case"template":this._invalidate();break;case"openedStateMode":this._initStrategy(),this._refreshOpenedStateModeClass(e.previousValue),this._refreshPanel();break;case"minSize":this._initMinMaxSize(),this._renderPosition(this.option("opened"),!0),this._togglePanelContentHiddenClass();break;case"maxSize":this._initMinMaxSize(),this._renderPosition(this.option("opened"),!0);break;case"revealMode":this._refreshRevealModeClass(e.previousValue),this._refreshPanel();break;case"shading":this._toggleShaderVisibility(this.option("opened"));break;case"animationEnabled":case"animationDuration":case"closeOnOutsideClick":break;default:this.callBase(e)}},content(){return(0,l.getPublicElement)(this._$panelContentWrapper)},viewContent(){return(0,l.getPublicElement)(this._$viewContentWrapper)},show(){return this.toggle(!0)},hide(){return this.toggle(!1)},toggle(e){const t=void 0===e?!this.option("opened"):e;return this._whenAnimationCompleted=(0,c.Deferred)(),this.option("opened",t),this._whenAnimationCompleted.promise()}});(0,r.default)("dxDrawer",T);t.default=T},43247:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(87739),s=i(57653),r=i(89500);t.default=class{constructor(e){this._drawer=e}getDrawerInstance(){return this._drawer}renderPanelContent(e){const t=this.getDrawerInstance(),i=t._getTemplate(t.option("template"));i&&i.render({container:t.content(),onRendered:()=>{e.resolve()}})}renderPosition(e,t){const i=(0,a.Deferred)(),n=(0,a.Deferred)(),s=this.getDrawerInstance();e&&a.when.apply(o.default,[i,n]).done((()=>{s._animationCompleteHandler()})),this._internalRenderPosition(e,i),e||s.resizeViewContent(),this.renderShaderVisibility(e,t,n)}_getPanelOffset(e){const t=this.getDrawerInstance(),i=t.isHorizontalDirection()?t.getRealPanelWidth():t.getRealPanelHeight();return e?-(i-t.getMaxSize()):-(i-t.getMinSize())}_getPanelSize(e){return e?this.getDrawerInstance().getMaxSize():this.getDrawerInstance().getMinSize()}renderShaderVisibility(e,t,i){const n=this.getDrawerInstance(),a=n.option("opened"),s=a?{from:0,to:1}:{from:1,to:0};e?r.animation.fade((0,o.default)(n._$shader),s,t,(()=>{this._drawer._toggleShaderVisibility(a),i.resolve()})):(n._toggleShaderVisibility(a),n._$shader.css("opacity",s.to))}getPanelContent(){return(0,o.default)(this.getDrawerInstance().content())}setPanelSize(e){this.refreshPanelElementSize(e)}refreshPanelElementSize(e){const t=this.getDrawerInstance(),i=this._getPanelSize(t.option("opened"));t.isHorizontalDirection()?(0,s.setWidth)((0,o.default)(t.content()),e?t.getRealPanelWidth():i):(0,s.setHeight)((0,o.default)(t.content()),e?t.getRealPanelHeight():i)}isViewContentFirst(){return!1}onPanelContentRendered(){}}},80222:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=c(i(64553)),a=i(17781),s=i(53124),r=i(57653),l=c(i(89132)),d=i(89500),u=c(i(43247));function c(e){return e&&e.__esModule?e:{default:e}}class h extends u.default{renderPanelContent(e){delete this._initialPosition;const t=this.getDrawerInstance(),{opened:i,minSize:n}=t.option();t._overlay=t._createComponent(t.content(),l.default,{shading:!1,container:t.content(),visualContainer:t.getOverlayTarget(),position:this._getOverlayPosition(),width:i?"auto":n||0,height:"100%",templatesRenderAsynchronously:t.option("templatesRenderAsynchronously"),animation:{show:{duration:0}},onPositioned:function(e){this._fixOverlayPosition(e.component.$content())}.bind(this),contentTemplate:t.option("template"),onContentReady:t=>{e.resolve(),this._processOverlayZIndex(t.component.content())},visible:!0,propagateOutsideClick:!0})}_fixOverlayPosition(e){const t=(0,a.ensureDefined)(this._initialPosition,{left:0,top:0});(0,n.move)(e,t),"right"===this.getDrawerInstance().calcTargetPosition()&&e.css("left","auto"),"bottom"===this.getDrawerInstance().calcTargetPosition()&&(e.css("top","auto"),e.css("bottom","0px"))}_getOverlayPosition(){const e=this.getDrawerInstance(),t=e.calcTargetPosition();let i={};switch(t){case"left":i={my:"top left",at:"top left"};break;case"right":i={my:e.option("rtlEnabled")?"top left":"top right",at:"top right"};break;case"top":case"bottom":i={my:t,at:t}}return i.of=e.getOverlayTarget(),i}refreshPanelElementSize(e){const t=this.getDrawerInstance(),i=t.getOverlay();t.isHorizontalDirection()?(i.option("height","100%"),i.option("width",e?t.getRealPanelWidth():this._getPanelSize(t.option("opened")))):(i.option("width",(0,r.getWidth)(t.getOverlayTarget())),i.option("height",e?t.getRealPanelHeight():this._getPanelSize(t.option("opened"))))}onPanelContentRendered(){this._updateViewContentStyles()}_updateViewContentStyles(){const e=this.getDrawerInstance();(0,o.default)(e.viewContent()).css(`padding${(0,s.camelize)(e.calcTargetPosition(),!0)}`,e.option("minSize")),(0,o.default)(e.viewContent()).css("transform","inherit")}_internalRenderPosition(e,t){const i=this.getDrawerInstance(),a=(0,o.default)(i.content()),s=i.getOverlay().$content(),r=i.option("revealMode"),l=i.calcTargetPosition(),u=this._getPanelSize(i.option("opened")),c=this._getPanelOffset(i.option("opened"))*i._getPositionCorrection(),h=i.getRealPanelHeight()-u;this._updateViewContentStyles(),e?"slide"===r?(this._initialPosition=i.isHorizontalDirection()?{left:c}:{top:c},d.animation.moveTo({complete:()=>{t.resolve()},duration:i.option("animationDuration"),direction:l,$element:a,position:c})):"expand"===r&&(this._initialPosition=i.isHorizontalDirection()?{left:0}:{top:0},(0,n.move)(s,this._initialPosition),d.animation.size({complete:()=>{t.resolve()},duration:i.option("animationDuration"),direction:l,$element:s,size:u,marginTop:h})):"slide"===r?(this._initialPosition=i.isHorizontalDirection()?{left:c}:{top:c},(0,n.move)(a,this._initialPosition)):"expand"===r&&(this._initialPosition=i.isHorizontalDirection()?{left:0}:{top:0},(0,n.move)(s,this._initialPosition),i.isHorizontalDirection()?(0,o.default)(s).css("width",u):((0,o.default)(s).css("height",u),"bottom"===l&&(0,o.default)(s).css("marginTop",h)))}getPanelContent(){return(0,o.default)(this.getDrawerInstance().getOverlay().content())}_processOverlayZIndex(e){const t=(0,o.default)(e).get(0).style.zIndex||1;this.getDrawerInstance().setZIndex(t)}isViewContentFirst(e){return"right"===e||"bottom"===e}}t.default=h},35733:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=r(i(64553)),a=i(89500),s=r(i(43247));function r(e){return e&&e.__esModule?e:{default:e}}class l extends s.default{_internalRenderPosition(e,t){const i=this.getDrawerInstance(),s=this._getPanelSize(!0),r=this._getPanelSize(i.option("opened"))*i._getPositionCorrection();if((0,o.default)(i.content()).css(i.isHorizontalDirection()?"width":"height",s),i.getMinSize()){let e="padding";switch(i.calcTargetPosition()){case"left":e+="Right";break;case"right":e+="Left";break;case"top":e+="Bottom";break;case"bottom":e+="Top"}(0,o.default)(i.viewContent()).css(e,i.getMinSize())}e?a.animation.moveTo({$element:(0,o.default)(i.viewContent()),position:r,direction:i.calcTargetPosition(),duration:i.option("animationDuration"),complete:()=>{t.resolve()}}):i.isHorizontalDirection()?(0,n.move)((0,o.default)(i.viewContent()),{left:r}):(0,n.move)((0,o.default)(i.viewContent()),{top:r})}onPanelContentRendered(){(0,o.default)(this.getDrawerInstance().viewContent()).addClass("dx-theme-background-color")}}t.default=l},22168:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(64553)),o=i(53124),a=i(89500),s=r(i(43247));function r(e){return e&&e.__esModule?e:{default:e}}class l extends s.default{_internalRenderPosition(e,t){const i=this.getDrawerInstance(),s=i.calcTargetPosition(),r=(0,n.default)(i.content()),l=this._getPanelSize(i.option("opened")),d=this._getPanelOffset(i.option("opened")),u=i.option("revealMode");e?"slide"===u?a.animation.margin({complete:()=>{t.resolve()},$element:r,duration:i.option("animationDuration"),direction:s,margin:d}):"expand"===u&&a.animation.size({complete:()=>{t.resolve()},$element:r,duration:i.option("animationDuration"),direction:s,size:l}):"slide"===u?r.css(`margin${(0,o.camelize)(s,!0)}`,d):"expand"===u&&r.css(i.isHorizontalDirection()?"width":"height",l)}isViewContentFirst(e,t){return(t?"left"===e:"right"===e)||"bottom"===e}}t.default=l},96379:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(92774)),o=d(i(4671)),a=d(i(64553)),s=i(52576),r=d(i(64973)),l=d(i(88244));function d(e){return e&&e.__esModule?e:{default:e}}class u extends l.default{constructor(e,t,i){super(e,t,i),this.currentTemplate=null}_attachEvents(e){const{editor:t}=this;e.option("onClick",(e=>{var i;(null!==(i=t._shouldCallOpenHandler)&&void 0!==i&&i.call(t)||!t.option("openOnFieldClick"))&&t._openHandler(e)})),n.default.on(e.$element(),"mousedown",(e=>{t.$element().is(".dx-state-focused")&&e.preventDefault()}))}_create(){const{editor:e}=this,t=(0,a.default)("<div>"),i=this._getOptions();this._addToContainer(t);const n=e._createComponent(t,r.default,(0,s.extend)({},i,{elementAttr:{"aria-label":o.default.format("dxDropDownEditor-selectLabel")}}));return this._legacyRender(e.$element(),t,i.visible),{$element:t,instance:n}}_getOptions(){const{editor:e}=this,t=this._isVisible(),i={focusStateEnabled:!1,hoverStateEnabled:!1,activeStateEnabled:!1,useInkRipple:!1,disabled:e.option("readOnly"),visible:t};return this._addTemplate(i),i}_isVisible(){const{editor:e}=this;return super._isVisible()&&e.option("showDropDownButton")}_legacyRender(e,t,i){e.toggleClass("dx-dropdowneditor-button-visible",i),t&&t.removeClass("dx-button").removeClass("dx-button-mode-contained").addClass("dx-dropdowneditor-button")}_isSameTemplate(){return this.editor.option("dropDownButtonTemplate")===this.currentTemplate}_addTemplate(e){this._isSameTemplate()||(e.template=this.editor._getTemplateByOption("dropDownButtonTemplate"),this.currentTemplate=this.editor.option("dropDownButtonTemplate"))}update(){if(super.update()){const{editor:e,instance:t}=this,i=e.$element(),n=this._getOptions();null==t||t.option(n),this._legacyRender(i,null==t?void 0:t.$element(),n.visible)}}}t.default=u},28906:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=T(i(3030)),o=i(88603),a=i(64044),s=T(i(92774)),r=i(98834),l=T(i(4671)),d=T(i(92848)),u=T(i(65951)),c=i(61404),h=T(i(19427)),p=T(i(64553)),g=i(38699),_=i(17781),f=i(52576),m=i(21274),v=i(41639),C=i(11528),y=i(3104),b=T(i(10720)),x=T(i(20780)),w=i(35944),S=T(i(35185)),D=T(i(11118)),I=T(i(96379)),E=i(6807);function T(e){return e&&e.__esModule?e:{default:e}}const A="dx-dropdowneditor-input-wrapper",O="dx-dropdowneditor-overlay",P="ios"===u.default.current().platform,k=x.default.inherit({_supportedKeys(){return(0,f.extend)({},this.callBase(),{tab(e){if(!this.option("opened"))return;if(!this._popup.getFocusableElements().length)return void this.close();const t=e.shiftKey?this._getLastPopupElement():this._getFirstPopupElement();t&&(s.default.trigger(t,"focus"),t.select()),e.preventDefault()},escape(e){return this.option("opened")&&e.preventDefault(),this.close(),!0},upArrow(e){return!(!(0,r.isCommandKeyPressed)(e)&&(e.preventDefault(),e.stopPropagation(),e.altKey))||(this.close(),!1)},downArrow(e){return!(!(0,r.isCommandKeyPressed)(e)&&(e.preventDefault(),e.stopPropagation(),e.altKey))||(this._validatedOpening(),!1)},enter(e){return this.option("opened")&&(e.preventDefault(),this._valueChangeEventHandler(e)),!0}})},_getDefaultButtons(){return this.callBase().concat([{name:"dropDown",Ctor:I.default}])},_getDefaultOptions(){return(0,f.extend)(this.callBase(),{value:null,onOpened:null,onClosed:null,opened:!1,acceptCustomValue:!0,applyValueMode:"instantly",deferRendering:!0,activeStateEnabled:!0,dropDownButtonTemplate:"dropDownButton",fieldTemplate:null,openOnFieldClick:!1,showDropDownButton:!0,buttons:void 0,dropDownOptions:{showTitle:!1},popupPosition:this._getDefaultPopupPosition(),onPopupInitialized:null,applyButtonText:l.default.format("OK"),cancelButtonText:l.default.format("Cancel"),buttonsLocation:"default",useHiddenSubmitElement:!1,validationMessagePosition:"auto"})},_useTemplates:()=>!0,_getDefaultPopupPosition(e){const t=(0,v.getDefaultAlignment)(e);return{offset:{h:0,v:-1},my:`${t} top`,at:`${t} bottom`,collision:"flip flip"}},_defaultOptionsRules(){return this.callBase().concat([{device:e=>"generic"===e.platform,options:{popupPosition:{offset:{v:0}}}}])},_inputWrapper(){return this.$element().find(`.${A}`).first()},_init(){this.callBase(),this._initVisibilityActions(),this._initPopupInitializedAction(),this._updatePopupPosition(this.option("rtlEnabled")),this._options.cache("dropDownOptions",this.option("dropDownOptions"))},_updatePopupPosition(e){const{my:t,at:i}=this._getDefaultPopupPosition(e),n=this.option("popupPosition");this.option("popupPosition",(0,f.extend)({},n,{my:t,at:i}))},_initVisibilityActions(){this._openAction=this._createActionByOption("onOpened",{excludeValidators:["disabled","readOnly"]}),this._closeAction=this._createActionByOption("onClosed",{excludeValidators:["disabled","readOnly"]})},_initPopupInitializedAction(){this._popupInitializedAction=this._createActionByOption("onPopupInitialized",{excludeValidators:["disabled","readOnly"]})},_initMarkup(){this._renderSubmitElement(),this.callBase(),this.$element().addClass("dx-dropdowneditor"),this.setAria("role",this._getAriaRole())},_render(){this.callBase(),this._renderOpenHandler(),this._attachFocusOutHandler(),this._renderOpenedState()},_renderContentImpl(){this.option("deferRendering")||this._createPopup()},_renderInput(){this.callBase(),this._renderTemplateWrapper(),this._wrapInput(),this._setDefaultAria()},_wrapInput(){this._$container=this.$element().wrapInner((0,p.default)("<div>").addClass(A)).children().eq(0)},_getAriaHasPopup:()=>"true",_getAriaAutocomplete:()=>"none",_getAriaRole:()=>"combobox",_setDefaultAria(){this.setAria({haspopup:this._getAriaHasPopup(),autocomplete:this._getAriaAutocomplete(),role:this._getAriaRole()})},_readOnlyPropValue(){return!this._isEditable()||this.callBase()},_cleanFocusState(){this.callBase(),this.option("fieldTemplate")&&this._detachFocusEvents()},_getFieldTemplate(){return this.option("fieldTemplate")&&this._getTemplateByOption("fieldTemplate")},_renderMask(){this.option("fieldTemplate")||this.callBase()},_renderField(){const e=this._getFieldTemplate();e&&this._renderTemplatedField(e,this._fieldRenderData())},_renderPlaceholder(){!!this._getFieldTemplate()||this.callBase()},_renderValue(){this.option("useHiddenSubmitElement")&&this._setSubmitValue();this.callBase().always(this._renderField.bind(this))},_getButtonsContainer(){return this._getFieldTemplate()?this._$container:this._$textEditorContainer},_renderTemplateWrapper(){this._getFieldTemplate()&&(this._$templateWrapper||(this._$templateWrapper=(0,p.default)("<div>").addClass("dx-dropdowneditor-field-template-wrapper").prependTo(this.$element())))},_renderTemplatedField(e,t){const i=(0,w.focused)(this._input());this._detachKeyboardEvents(),this._detachFocusEvents(),this._$textEditorContainer.remove(),this._$templateWrapper.empty();const n=this._$templateWrapper,o=Symbol("renderContext");this._activeRenderContext=o,e.render({model:t,container:(0,c.getPublicElement)(n),onRendered:()=>{if(this._activeRenderContext!==o)return;if(!!!this.$element().find(n).length)return;const e=this._input();if(!e.length)throw S.default.Error("E1010");this._integrateInput(),i&&s.default.trigger(e,"focus")}})},_integrateInput(){var e;const{isValid:t}=this.option();this._renderFocusState(),this._refreshValueChangeEvent(),this._refreshEvents(),this._refreshEmptinessEvent(),this._setDefaultAria(),this._setFieldAria(),this._toggleValidationClasses(!t),null===(e=this.option("_onMarkupRendered"))||void 0===e||e()},_refreshEmptinessEvent(){s.default.off(this._input(),"input blur",this._toggleEmptinessEventHandler),this._renderEmptinessEvent()},_fieldRenderData(){return this.option("value")},_initTemplates(){this._templateManager.addDefaultTemplates({dropDownButton:new g.FunctionTemplate((e=>{const t=(0,p.default)("<div>").addClass("dx-dropdowneditor-icon");(0,p.default)(e.container).append(t)}))}),this.callBase()},_renderOpenHandler(){const e=this._inputWrapper(),t=(0,r.addNamespace)(a.name,this.NAME),i=this.option("openOnFieldClick");s.default.off(e,t),s.default.on(e,t,this._getInputClickHandler(i)),this.$element().toggleClass("dx-dropdowneditor-field-clickable",i),i&&(this._openOnFieldClickAction=this._createAction(this._openHandler.bind(this)))},_attachFocusOutHandler(){P&&(this._detachFocusOutEvents(),s.default.on(this._inputWrapper(),(0,r.addNamespace)("focusout",this.NAME),(e=>{const t=e.relatedTarget;if(t&&this.option("opened")){this._isTargetOutOfComponent(t)&&this.close()}})))},_isTargetOutOfComponent(e){const t=this.content?(0,p.default)(this.content()).closest(`.${O}`):this._$popup;return 0===(0,p.default)(e).closest(`.${O}`,t).length},_detachFocusOutEvents(){P&&s.default.off(this._inputWrapper(),(0,r.addNamespace)("focusout",this.NAME))},_getInputClickHandler(e){return e?e=>{this._executeOpenAction(e)}:()=>{this._focusInput()}},_openHandler(){this._toggleOpenState()},_executeOpenAction(e){this._openOnFieldClickAction({event:e})},_keyboardEventBindingTarget(){return this._input()},_focusInput(){return!this.option("disabled")&&(this.option("focusStateEnabled")&&!(0,w.focused)(this._input())&&(this._resetCaretPosition(),s.default.trigger(this._input(),"focus")),!0)},_resetCaretPosition(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this._input().get(0);if(t){const{value:i}=t,n=(0,C.isDefined)(i)&&(e||this._isEditable())?i.length:0;this._caret({start:n,end:n},!0)}},_isEditable(){return this.option("acceptCustomValue")},_toggleOpenState(e){this._focusInput()&&(this.option("readOnly")||(e=arguments.length?e:!this.option("opened"),this.option("opened",e)))},_getControlsAria(){return this._popup&&this._popupContentId},_renderOpenedState(){const e=this.option("opened");e&&this._createPopup(),this.$element().toggleClass("dx-dropdowneditor-active",e),this._setPopupOption("visible",e);const t={expanded:e,controls:this._getControlsAria()};this.setAria(t),this.setAria("owns",e?this._popupContentId:void 0,this.$element())},_createPopup(){this._$popup||(this._$popup=(0,p.default)("<div>").addClass(O).appendTo(this.$element()),this._renderPopup(),this._renderPopupContent(),this._setPopupAriaLabel())},_setPopupAriaLabel(){const e=this._popup.$overlayContent();this.setAria("label","Dropdown",e)},_renderPopupContent:_.noop,_renderPopup(){const e=(0,f.extend)(this._popupConfig(),this._options.cache("dropDownOptions"));delete e.closeOnOutsideClick,this._popup=this._createComponent(this._$popup,b.default,e),this._popup.on({showing:this._popupShowingHandler.bind(this),shown:this._popupShownHandler.bind(this),hiding:this._popupHidingHandler.bind(this),hidden:this._popupHiddenHandler.bind(this),contentReady:this._contentReadyHandler.bind(this)}),this._attachPopupKeyHandler(),this._contentReadyHandler(),this._setPopupContentId(this._popup.$content()),this._bindInnerWidgetOptions(this._popup,"dropDownOptions")},_attachPopupKeyHandler(){s.default.on(this._popup.$overlayContent(),(0,r.addNamespace)("keydown",this.NAME),(e=>this._popupKeyHandler(e)))},_popupKeyHandler(e){switch((0,r.normalizeKeyName)(e)){case"tab":this._popupTabHandler(e);break;case"escape":this._popupEscHandler(e)}},_popupTabHandler(e){const t=(0,p.default)(e.target),i=e.shiftKey&&t.is(this._getFirstPopupElement());(!e.shiftKey&&t.is(this._getLastPopupElement())||i)&&(s.default.trigger(this.field(),"focus"),e.preventDefault())},_popupEscHandler(){s.default.trigger(this._input(),"focus"),this.close()},_setPopupContentId(e){this._popupContentId=`dx-${new h.default}`,this.setAria("id",this._popupContentId,e)},_contentReadyHandler:_.noop,_popupConfig(){return{onInitialized:this._getPopupInitializedHandler(),position:(0,f.extend)(this.option("popupPosition"),{of:this.$element()}),showTitle:this.option("dropDownOptions.showTitle"),_ignoreFunctionValueDeprecation:!0,width:()=>(0,E.getElementWidth)(this.$element()),height:"auto",shading:!1,hideOnParentScroll:!0,hideOnOutsideClick:e=>this._closeOutsideDropDownHandler(e),animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},deferRendering:!1,focusStateEnabled:!1,showCloseButton:!1,dragEnabled:!1,toolbarItems:this._getPopupToolbarItems(),onPositioned:this._popupPositionedHandler.bind(this),fullScreen:!1,contentTemplate:null,_hideOnParentScrollTarget:this.$element(),_wrapperClassExternal:O,_ignorePreventScrollEventsDeprecation:!0}},_popupInitializedHandler:_.noop,_getPopupInitializedHandler(){const e=this.option("onPopupInitialized");return t=>{this._popupInitializedHandler(t),e&&this._popupInitializedAction({popup:t.component})}},_dimensionChanged(){!(0,y.hasWindow)()||this.$element().is(":visible")?this._updatePopupWidth():this.close()},_updatePopupWidth(){void 0===(0,E.getSizeValue)(this.option("dropDownOptions.width"))&&this._setPopupOption("width",(()=>(0,E.getElementWidth)(this.$element())))},_popupPositionedHandler(e){var t;const{labelMode:i,stylingMode:n}=this.option();if(!this._popup)return;const a=this._popup.$overlayContent(),s=null===(t=e.position)||void 0===t||null===(t=t.v)||void 0===t?void 0:t.flip,r="hidden"!==i&&"outside"!==i&&"outlined"===n;if(e.position&&a.toggleClass("dx-dropdowneditor-overlay-flipped",s),s&&r&&this._label.isVisible()){const e=this._label.$element();(0,o.move)(a,{top:(0,o.locate)(a).top-parseInt(e.css("fontSize"))})}},_popupShowingHandler:_.noop,_popupHidingHandler(){this.option("opened",!1)},_popupShownHandler(){var e;this._openAction(),null===(e=this._validationMessage)||void 0===e||e.option("positionSide",this._getValidationMessagePositionSide())},_popupHiddenHandler(){var e;this._closeAction(),null===(e=this._validationMessage)||void 0===e||e.option("positionSide",this._getValidationMessagePositionSide())},_getValidationMessagePositionSide(){const e=this.option("validationMessagePosition");if("auto"!==e)return e;let t="bottom";if(this._popup&&this._popup.option("visible")){const{top:e}=n.default.setup(this.$element()),{top:i}=n.default.setup(this._popup.$content());t=e+this.option("popupPosition").offset.v>i?"bottom":"top"}return t},_closeOutsideDropDownHandler(e){let{target:t}=e;const i=(0,p.default)(t),n=this.getButton("dropDown"),o=n&&n.$element(),a=!!i.closest(this.$element()).length,s=!!i.closest(o).length;return!a&&!s},_clean(){delete this._openOnFieldClickAction,delete this._$templateWrapper,this._$popup&&(this._$popup.remove(),delete this._$popup,delete this._popup),this.callBase()},_setPopupOption(e,t){this._setWidgetOption("_popup",arguments)},_validatedOpening(){this.option("readOnly")||this._toggleOpenState(!0)},_getPopupToolbarItems(){return"useButtons"===this.option("applyValueMode")?this._popupToolbarItemsConfig():[]},_getFirstPopupElement(){return(0,p.default)(this._popup.getFocusableElements()).first()},_getLastPopupElement(){return(0,p.default)(this._popup.getFocusableElements()).last()},_popupToolbarItemsConfig(){const e=[{shortcut:"done",options:{onClick:this._applyButtonHandler.bind(this),text:this.option("applyButtonText")}},{shortcut:"cancel",options:{onClick:this._cancelButtonHandler.bind(this),text:this.option("cancelButtonText")}}];return this._applyButtonsLocation(e)},_applyButtonsLocation(e){const t=this.option("buttonsLocation"),i=e;if("default"!==t){const e=(0,_.splitPair)(t);(0,m.each)(i,((t,i)=>{(0,f.extend)(i,{toolbar:e[0],location:e[1]})}))}return i},_applyButtonHandler(){this.close(),this.option("focusStateEnabled")&&this.focus()},_cancelButtonHandler(){this.close(),this.option("focusStateEnabled")&&this.focus()},_popupOptionChanged(e){const t=D.default.getOptionsFromContainer(e);this._setPopupOption(t);const i=Object.keys(t);(i.includes("width")||i.includes("height"))&&this._dimensionChanged()},_renderSubmitElement(){this.option("useHiddenSubmitElement")&&(this._$submitElement=(0,p.default)("<input>").attr("type","hidden").appendTo(this.$element()))},_setSubmitValue(){this._getSubmitElement().val(this.option("value"))},_getSubmitElement(){return this.option("useHiddenSubmitElement")?this._$submitElement:this.callBase()},_dispose(){this._detachFocusOutEvents(),this.callBase()},_optionChanged(e){var t;switch(e.name){case"width":case"height":this.callBase(e),null===(t=this._popup)||void 0===t||t.repaint();break;case"opened":this._renderOpenedState();break;case"onOpened":case"onClosed":this._initVisibilityActions();break;case"onPopupInitialized":this._initPopupInitializedAction();break;case"fieldTemplate":case"acceptCustomValue":case"openOnFieldClick":this._invalidate();break;case"dropDownButtonTemplate":case"showDropDownButton":this._updateButtons(["dropDown"]);break;case"dropDownOptions":this._popupOptionChanged(e),this._options.cache("dropDownOptions",this.option("dropDownOptions"));break;case"popupPosition":break;case"deferRendering":(0,y.hasWindow)()&&this._createPopup();break;case"applyValueMode":case"applyButtonText":case"cancelButtonText":case"buttonsLocation":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"useHiddenSubmitElement":this._$submitElement&&(this._$submitElement.remove(),this._$submitElement=void 0),this._renderSubmitElement();break;case"rtlEnabled":this._updatePopupPosition(e.value),this.callBase(e);break;default:this.callBase(e)}},open(){this.option("opened",!0)},close(){this.option("opened",!1)},field(){return(0,c.getPublicElement)(this._input())},content(){return this._popup?this._popup.content():null}});(0,d.default)("dxDropDownEditor",k);t.default=k},20287:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=S(i(92774)),o=i(98834),a=S(i(4671)),s=S(i(30771)),r=S(i(92848)),l=S(i(65951)),d=S(i(19427)),u=S(i(64553)),c=i(91585),h=i(17781),p=i(87739),g=i(52576),_=i(21274),f=i(57653),m=i(11528),v=i(3104),C=S(i(7632)),y=S(i(80070)),b=S(i(35185)),x=S(i(59803)),w=S(i(28906));function S(e){return e&&e.__esModule?e:{default:e}}const D=(0,v.getWindow)(),I=["startswith","contains","endwith","notcontains"],E="android"!==l.default.real().platform,T=w.default.inherit({_supportedKeys(){const e=this.callBase();return(0,g.extend)({},e,{tab(t){if(this._allowSelectItemByTab()){this._saveValueChangeEvent(t);const e=(0,u.default)(this._list.option("focusedElement"));e.length&&this._setSelectedElement(e)}e.tab.apply(this,arguments)},space:h.noop,home:h.noop,end:h.noop})},_allowSelectItemByTab(){return this.option("opened")&&"instantly"===this.option("applyValueMode")},_setSelectedElement(e){const t=this._valueGetter(this._list._getItemData(e));this._setValue(t)},_setValue(e){this.option("value",e)},_getDefaultOptions(){return(0,g.extend)(this.callBase(),(0,g.extend)(C.default._dataExpressionDefaultOptions(),{displayValue:void 0,searchEnabled:!1,searchMode:"contains",searchTimeout:500,minSearchLength:0,searchExpr:null,valueChangeEvent:"input change keyup",selectedItem:null,noDataText:a.default.format("dxCollectionWidget-noDataText"),encodeNoDataText:!1,onSelectionChanged:null,onItemClick:h.noop,showDataBeforeSearch:!1,grouped:!1,groupTemplate:"group",popupPosition:{my:"left top",at:"left bottom",offset:{h:0,v:0},collision:"flip"},wrapItemText:!1,useItemTextAsTitle:!1}))},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"ios"},options:{popupPosition:{offset:{v:-1}}}},{device:{platform:"generic"},options:{buttonsLocation:"bottom center"}}])},_setOptionsByReference(){this.callBase(),(0,g.extend)(this._optionsByReference,{value:!0,selectedItem:!0,displayValue:!0})},_init(){this.callBase(),this._initDataExpressions(),this._initActions(),this._setListDataSource(),this._validateSearchMode(),this._clearSelectedItem(),this._initItems()},_setListFocusedElementOptionChange(){this._list._updateParentActiveDescendant=this._updateActiveDescendant.bind(this)},_initItems(){const{items:e}=this.option();e&&!e.length&&this._dataSource&&(this.option().items=this._dataSource.items())},_initActions(){this._initContentReadyAction(),this._initSelectionChangedAction(),this._initItemClickAction()},_initContentReadyAction(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})},_initItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new c.ChildDefaultTemplate("item")})},_isEditable(){return this.callBase()||this.option("searchEnabled")},_saveFocusOnWidget(){this._list&&this._list.initialOption("focusStateEnabled")&&this._focusInput()},_fitIntoRange:(e,t,i)=>e>i?t:e<t?i:e,_items(){const e=this._getPlainItems(!this._list&&this._dataSource.items());return new s.default(e).filter("disabled","<>",!0).toArray()},_calcNextItem(e){const t=this._items();return t[this._fitIntoRange(this._getSelectedIndex()+e,0,t.length-1)]},_getSelectedIndex(){const e=this._items(),t=this.option("selectedItem");let i=-1;return(0,_.each)(e,((e,n)=>{if(this._isValueEquals(n,t))return i=e,!1})),i},_createPopup(){this.callBase(),this._updateCustomBoundaryContainer(),this._popup.$wrapper().addClass(this._popupWrapperClass());const e=this._popup.$content();n.default.off(e,"mouseup"),n.default.on(e,"mouseup",this._saveFocusOnWidget.bind(this))},_updateCustomBoundaryContainer(){const e=this.option("dropDownOptions.container"),t=e&&(0,u.default)(e);if(t&&t.length&&!(0,m.isWindow)(t.get(0))){const e=[].slice.call(t.parents());e.unshift(t.get(0)),(0,_.each)(e,((e,t)=>t!==(0,u.default)("body").get(0)&&("hidden"===D.getComputedStyle(t).overflowY?(this._$customBoundaryContainer=(0,u.default)(t),!1):void 0)))}},_popupWrapperClass:()=>"dx-dropdownlist-popup-wrapper",_renderInputValue(){const e=this._getCurrentValue();return this._rejectValueLoading(),this._loadInputValue(e,this._setSelectedItem.bind(this)).always(this.callBase.bind(this,e))},_loadInputValue(e,t){return this._loadItem(e).always(t)},_getItemFromPlain(e,t){let i,n;return t&&"object"!=typeof e&&(t.itemByValue||(t.itemByValue={},i=this._getPlainItems(),i.forEach((function(e){t.itemByValue[this._valueGetter(e)]=e}),this)),n=t.itemByValue[e]),n||(i=this._getPlainItems(),n=(0,h.grep)(i,(t=>this._isValueEquals(this._valueGetter(t),e)))[0]),n},_loadItem(e,t){const i=this._getItemFromPlain(e,t);return void 0!==i?(0,p.Deferred)().resolve(i).promise():this._loadValue(e)},_getPlainItems(e){let t=[];e=e||this.option("items")||this._dataSource.items()||[];for(let i=0;i<e.length;i++)e[i]&&e[i].items?t=t.concat(e[i].items):t.push(e[i]);return t},_updateActiveDescendant(e){var t;const i=this.option("opened"),n=null===(t=this._list)||void 0===t?void 0:t.getFocusedItemId(),o=(0,u.default)(`#${n}`).length>0,a=i&&o&&n;this.setAria({activedescendant:a||null},e)},_setSelectedItem(e){const t=this._displayValue(e);this.option("selectedItem",(0,h.ensureDefined)(e,null)),this.option("displayValue",t)},_displayValue(e){return this._displayGetter(e)},_refreshSelected(){const e={};this._listItemElements().each(((t,i)=>{const n=(0,u.default)(i),o=this._valueGetter(n.data("dxListItemData"));this._isSelectedValue(o,e)?this._list.selectItem(n):this._list.unselectItem(n)}))},_popupShownHandler(){this.callBase(),this._setFocusPolicy()},_setFocusPolicy(){this.option("focusStateEnabled")&&this._list&&this._list.option("focusedElement",null)},_isSelectedValue(e){return this._isValueEquals(e,this.option("value"))},_validateSearchMode(){const e=this.option("searchMode"),t=e.toLowerCase();if(!I.includes(t))throw b.default.Error("E1019",e)},_clearSelectedItem(){this.option("selectedItem",null)},_processDataSourceChanging(){this._initDataController(),this._setListOption("_dataController",this._dataController),this._setListDataSource(),this._renderInputValue().fail((()=>{this._isCustomValueAllowed()||this._clearSelectedItem()}))},_isCustomValueAllowed(){return this.option("displayCustomValue")},clear(){this.callBase(),this._clearFilter(),this._clearSelectedItem()},_listItemElements(){return this._$list?this._$list.find(".dx-list-item"):(0,u.default)()},_popupConfig(){return(0,g.extend)(this.callBase(),{templatesRenderAsynchronously:!1,autoResizeEnabled:!1,maxHeight:this._getMaxHeight.bind(this)})},_renderPopupContent(){this.callBase(),this._renderList()},_getKeyboardListeners(){const e=this._canListHaveFocus();return this.callBase().concat([!e&&this._list])},_renderList(){this._listId=`dx-${(new d.default)._value}`;const e=(0,u.default)("<div>").attr("id",this._listId).appendTo(this._popup.$content());this._$list=e,this._list=this._createComponent(e,y.default,this._listConfig()),this._refreshList(),this._renderPreventBlurOnListClick(),this._setListFocusedElementOptionChange()},_renderPreventBlurOnListClick(){const e=(0,o.addNamespace)("mousedown","dxDropDownList");n.default.off(this._$list,e),n.default.on(this._$list,e,(e=>e.preventDefault()))},_getControlsAria(){return this._list&&this._listId},_renderOpenedState(){this.callBase(),this._list&&this._updateActiveDescendant(),this.setAria("owns",this._popup&&this._popupContentId)},_getAriaHasPopup:()=>"listbox",_refreshList(){this._list&&this._shouldRefreshDataSource()&&this._setListDataSource()},_shouldRefreshDataSource(){return!!this._list.option("dataSource")!==this._needPassDataSourceToList()},_isDesktopDevice:()=>"desktop"===l.default.real().deviceType,_listConfig(){const e={selectionMode:"single",_templates:this.option("_templates"),templateProvider:this.option("templateProvider"),noDataText:this.option("noDataText"),encodeNoDataText:this.option("encodeNoDataText"),grouped:this.option("grouped"),wrapItemText:this.option("wrapItemText"),useItemTextAsTitle:this.option("useItemTextAsTitle"),onContentReady:this._listContentReadyHandler.bind(this),itemTemplate:this.option("itemTemplate"),indicateLoading:!1,keyExpr:this._getCollectionKeyExpr(),displayExpr:this._displayGetterExpr(),groupTemplate:this.option("groupTemplate"),onItemClick:this._listItemClickAction.bind(this),dataSource:this._getDataSource(),_dataController:this._dataController,hoverStateEnabled:!!this._isDesktopDevice()&&this.option("hoverStateEnabled"),focusStateEnabled:!!this._isDesktopDevice()&&this.option("focusStateEnabled"),_onItemsRendered:()=>{this._popup.repaint()}};return this._canListHaveFocus()||(e.tabIndex=null),e},_canListHaveFocus:()=>!1,_getDataSource(){return this._needPassDataSourceToList()?this._dataSource:null},_dataSourceOptions:()=>({paginate:!1}),_getGroupedOption(){return this.option("grouped")},_dataSourceFromUrlLoadMode:()=>"raw",_listContentReadyHandler(){this._list=this._list||this._$list.dxList("instance"),this.option("deferRendering")||this._refreshSelected(),this._updatePopupWidth(),this._updateListDimensions(),this._contentReadyAction()},_setListOption(e,t){this._setWidgetOption("_list",arguments)},_listItemClickAction(e){this._listItemClickHandler(e),this._itemClickAction(e)},_listItemClickHandler:h.noop,_setListDataSource(){this._list&&(this._setListOption("dataSource",this._getDataSource()),this._needPassDataSourceToList()||this._setListOption("items",[]))},_needPassDataSourceToList(){return this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded()},_isMinSearchLengthExceeded(){return this._searchValue().toString().length>=this.option("minSearchLength")},_needClearFilter(){return!this._canKeepDataSource()&&this._needPassDataSourceToList()},_canKeepDataSource(){const e=this._isMinSearchLengthExceeded();return this._dataController.isLoaded()&&this.option("showDataBeforeSearch")&&this.option("minSearchLength")&&!e&&!this._isLastMinSearchLengthExceeded},_searchValue(){return this._input().val()||""},_getSearchEvent(){return(0,o.addNamespace)("input",`${this.NAME}Search`)},_getCompositionStartEvent(){return(0,o.addNamespace)("compositionstart",`${this.NAME}CompositionStart`)},_getCompositionEndEvent(){return(0,o.addNamespace)("compositionend",`${this.NAME}CompositionEnd`)},_getSetFocusPolicyEvent(){return(0,o.addNamespace)("input",`${this.NAME}FocusPolicy`)},_renderEvents(){this.callBase(),n.default.on(this._input(),this._getSetFocusPolicyEvent(),(()=>{this._setFocusPolicy()})),this._shouldRenderSearchEvent()&&(n.default.on(this._input(),this._getSearchEvent(),(e=>{this._searchHandler(e)})),E&&(n.default.on(this._input(),this._getCompositionStartEvent(),(()=>{this._isTextCompositionInProgress(!0)})),n.default.on(this._input(),this._getCompositionEndEvent(),(e=>{this._isTextCompositionInProgress(void 0),this._searchHandler(e,this._searchValue())}))))},_shouldRenderSearchEvent(){return this.option("searchEnabled")},_refreshEvents(){n.default.off(this._input(),this._getSearchEvent()),n.default.off(this._input(),this._getSetFocusPolicyEvent()),E&&(n.default.off(this._input(),this._getCompositionStartEvent()),n.default.off(this._input(),this._getCompositionEndEvent())),this.callBase()},_isTextCompositionInProgress(e){if(!arguments.length)return this._isTextComposition;this._isTextComposition=e},_searchHandler(e,t){if(this._isTextCompositionInProgress())return;if(!this._isMinSearchLengthExceeded())return void this._searchCanceled();const i=this.option("searchTimeout");i?(this._clearSearchTimer(),this._searchTimer=setTimeout((()=>{this._searchDataSource(t)}),i)):this._searchDataSource(t)},_searchCanceled(){this._clearSearchTimer(),this._needClearFilter()&&this._filterDataSource(null),this._refreshList()},_searchDataSource(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._searchValue();this._filterDataSource(e)},_filterDataSource(e){this._clearSearchTimer();const t=this._dataController;t.searchExpr(this.option("searchExpr")||this._displayGetterExpr()),t.searchOperation(this.option("searchMode")),t.searchValue(e),t.load().done(this._dataSourceFiltered.bind(this,e))},_clearFilter(){const e=this._dataController;e.searchValue()&&e.searchValue(null)},_dataSourceFiltered(){this._isLastMinSearchLengthExceeded=this._isMinSearchLengthExceeded(),this._refreshList(),this._refreshPopupVisibility()},_shouldOpenPopup(){return this._hasItemsToShow()},_refreshPopupVisibility(){if(this.option("readOnly")||!this._searchValue())return;const e=this._shouldOpenPopup();e&&!this._isFocused()||(this.option("opened",e),e&&(this._updatePopupWidth(),this._updateListDimensions()))},_dataSourceChangedHandler(e){0===this._dataController.pageIndex()?this.option().items=e:this.option().items=this.option().items.concat(e)},_hasItemsToShow(){const e=(this._dataController.items()||[]).length;return!(!this._needPassDataSourceToList()||!e)},_clearSearchTimer(){clearTimeout(this._searchTimer),delete this._searchTimer},_popupShowingHandler(){this._updatePopupWidth(),this._updateListDimensions()},_dimensionChanged(){this.callBase(),this._updateListDimensions()},_needPopupRepaint(){const e=this._dataController,t=e.pageIndex(),i=(0,m.isDefined)(this._pageIndex)&&t<=this._pageIndex||e.isLastPage()&&!this._list._scrollViewIsFull();return this._pageIndex=t,i},_updateListDimensions(){this._popup&&(this._needPopupRepaint()&&this._popup.repaint(),this._list&&this._list.updateDimensions())},_getMaxHeight(){const e=this.$element(),t=this._$customBoundaryContainer,i=e.offset().top-(t?t.offset().top:0),n=(0,f.getOuterHeight)(D),o=t?Math.min((0,f.getOuterHeight)(t),n):n,a=Math.max(i,o-i-(0,f.getOuterHeight)(e));return Math.min(.5*o,a)},_clean(){this._list&&delete this._list,delete this._isLastMinSearchLengthExceeded,this.callBase()},_dispose(){this._clearSearchTimer(),this.callBase()},_setCollectionWidgetOption(){this._setListOption.apply(this,arguments)},_setSubmitValue(){const e=this.option("value"),t=this._shouldUseDisplayValue(e)?this._displayGetter(e):e;this._getSubmitElement().val(t)},_shouldUseDisplayValue(e){return"this"===this.option("valueExpr")&&(0,m.isObject)(e)},_optionChanged(e){switch(this._dataExpressionOptionChanged(e),e.name){case"hoverStateEnabled":case"focusStateEnabled":this._isDesktopDevice()&&this._setListOption(e.name,e.value),this.callBase(e);break;case"items":this.option("dataSource")||this._processDataSourceChanging();break;case"dataSource":this._processDataSourceChanging();break;case"valueExpr":this._renderValue(),this._setListOption("keyExpr",this._getCollectionKeyExpr());break;case"displayExpr":this._renderValue(),this._setListOption("displayExpr",this._displayGetterExpr());break;case"searchMode":this._validateSearchMode();break;case"minSearchLength":this._refreshList();break;case"searchEnabled":case"showDataBeforeSearch":case"searchExpr":this._invalidate();break;case"onContentReady":this._initContentReadyAction();break;case"onSelectionChanged":this._initSelectionChangedAction();break;case"onItemClick":this._initItemClickAction();break;case"grouped":case"groupTemplate":case"wrapItemText":case"noDataText":case"encodeNoDataText":case"useItemTextAsTitle":this._setListOption(e.name);break;case"displayValue":this.option("text",e.value);break;case"itemTemplate":case"searchTimeout":break;case"selectedItem":e.previousValue!==e.value&&this._selectionChangedAction({selectedItem:e.value});break;default:this.callBase(e)}}}).include(C.default,x.default);(0,r.default)("dxDropDownList",T);t.default=T},6807:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getSizeValue=t.getElementWidth=void 0;var n=i(57653),o=i(3104);t.getElementWidth=function(e){if((0,o.hasWindow)())return(0,n.getOuterWidth)(e)};t.getSizeValue=function(e){return null===e&&(e=void 0),"function"==typeof e&&(e=e()),e}},32266:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(78694));o(i(29299));function o(e){return e&&e.__esModule?e:{default:e}}const a=n.default;t.default=a},42006:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(80556)),o=h(i(75990)),a=h(i(14479)),s=i(17781),r=i(31e3),l=i(87739),d=i(52576),u=i(11528),c=h(i(40216));function h(e){return e&&e.__esModule?e:{default:e}}const p=(0,d.extend)({},o.default,{_dataExpressionDefaultOptions:()=>({items:[],dataSource:null,itemTemplate:"item",value:null,valueExpr:"this",displayExpr:void 0}),_initDataExpressions(){this._compileValueGetter(),this._compileDisplayGetter(),this._initDynamicTemplates(),this._initDataSource(),this._itemsToDataSource()},_itemsToDataSource(){this.option("dataSource")||(this._dataSource=new a.default({store:new n.default(this.option("items")),pageSize:0}),this._initDataController())},_compileDisplayGetter(){this._displayGetter=(0,r.compileGetter)(this._displayGetterExpr())},_displayGetterExpr(){return this.option("displayExpr")},_compileValueGetter(){this._valueGetter=(0,r.compileGetter)(this._valueGetterExpr())},_valueGetterExpr(){return this.option("valueExpr")||"this"},_loadValue(e){const t=(0,l.Deferred)();return e=this._unwrappedValue(e),(0,u.isDefined)(e)?(this._loadSingle(this._valueGetterExpr(),e).done((i=>{this._isValueEquals(this._valueGetter(i),e)?t.resolve(i):t.reject()})).fail((()=>{t.reject()})),this._loadValueDeferred=t,t.promise()):t.reject().promise()},_rejectValueLoading(){var e;null===(e=this._loadValueDeferred)||void 0===e||e.reject({shouldSkipCallback:!0})},_getCurrentValue(){return this.option("value")},_unwrappedValue(e){return(e=e??this._getCurrentValue())&&this._dataSource&&"this"===this._valueGetterExpr()&&(e=this._getItemKey(e)),c.default.unwrap(e)},_getItemKey(e){const t=this._dataSource.key();if(Array.isArray(t)){const i={};for(let n=0,o=t.length;n<o;n++)i[t[n]]=e[t[n]];return i}return t&&"object"==typeof e&&(e=e[t]),e},_isValueEquals(e,t){const i=this._dataSource&&this._dataSource.key();let n=this._compareValues(e,t);return!n&&i&&(0,u.isDefined)(e)&&(0,u.isDefined)(t)&&(n=Array.isArray(i)?this._compareByCompositeKey(e,t,i):this._compareByKey(e,t,i)),n},_compareByCompositeKey(e,t,i){const n=u.isObject;if(!n(e)||!n(t))return!1;for(let n=0,o=i.length;n<o;n++)if(e[i[n]]!==t[i[n]])return!1;return!0},_compareByKey(e,t,i){const n=c.default.unwrap,o=(0,s.ensureDefined)(n(e[i]),e),a=(0,s.ensureDefined)(n(t[i]),t);return this._compareValues(o,a)},_compareValues:(e,t)=>(0,r.toComparable)(e,!0)===(0,r.toComparable)(t,!0),_initDynamicTemplates:s.noop,_setCollectionWidgetItemTemplate(){this._initDynamicTemplates(),this._setCollectionWidgetOption("itemTemplate",this.option("itemTemplate"))},_getCollectionKeyExpr(){const e=this.option("valueExpr");return(0,u.isString)(e)&&"this"!==e||(0,u.isFunction)(e)?e:null},_dataExpressionOptionChanged(e){switch(e.name){case"items":this._itemsToDataSource(),this._setCollectionWidgetOption("items");break;case"dataSource":this._initDataSource();break;case"itemTemplate":this._setCollectionWidgetItemTemplate();break;case"valueExpr":this._compileValueGetter();break;case"displayExpr":this._compileDisplayGetter(),this._initDynamicTemplates(),this._setCollectionWidgetOption("displayExpr")}}});t.default=p},41996:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(i(92774)),o=i(98834),a=i(74663),s=f(i(19427)),r=f(i(64553)),l=f(i(84718)),d=i(17781),u=i(52576),c=i(3104),h=f(i(19391)),p=f(i(59098)),g=f(i(11118)),_=f(i(76400));function f(e){return e&&e.__esModule?e:{default:e}}const m="dx-invalid-message-auto",v="dx-validation-target",C="invalid",y=["outlined","filled","underlined"],b={validationMessageMode:"mode",validationMessagePosition:"positionSide",validationMessageOffset:"offset",validationBoundary:"boundary"},x=g.default.inherit({ctor(){this.showValidationMessageTimeout=null,this.validationRequest=(0,l.default)(),this.callBase.apply(this,arguments)},_createElement(e){this.callBase(e);const t=this.$element();t&&(0,a.data)(t[0],v,this)},_initOptions(e){this.callBase.apply(this,arguments),this.option(h.default.initValidationOptions(e))},_init(){this._initialValue=this.option("value"),this.callBase(),this._options.cache("validationTooltipOptions",this.option("validationTooltipOptions"));this.$element().addClass("dx-show-invalid-badge")},_getDefaultOptions(){return(0,u.extend)(this.callBase(),{value:null,name:"",onValueChanged:null,readOnly:!1,isValid:!0,validationError:null,validationErrors:null,validationStatus:"valid",validationMessageMode:"auto",validationMessagePosition:"bottom",validationBoundary:void 0,validationMessageOffset:{h:0,v:0},validationTooltipOptions:{},_showValidationMessage:!0,isDirty:!1})},_attachKeyboardEvents(){this.option("readOnly")||this.callBase()},_setOptionsByReference(){this.callBase(),(0,u.extend)(this._optionsByReference,{validationError:!0})},_createValueChangeAction(){this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})},_suppressValueChangeAction(){this._valueChangeActionSuppressed=!0},_resumeValueChangeAction(){this._valueChangeActionSuppressed=!1},_initMarkup(){var e;this._toggleReadOnlyState(),this._setSubmitElementName(this.option("name")),this.callBase(),this._renderValidationState(),null===(e=this.option("_onMarkupRendered"))||void 0===e||e()},_raiseValueChangeAction(e,t){this._valueChangeAction||this._createValueChangeAction(),this._valueChangeAction(this._valueChangeArgs(e,t))},_valueChangeArgs(e,t){return{value:e,previousValue:t,event:this._valueChangeEventInstance}},_saveValueChangeEvent(e){this._valueChangeEventInstance=e},_focusInHandler(e){const t="auto"===this.option("validationMessageMode");if(this._canValueBeChangedByClick()&&t){var i;const e=null===(i=this._validationMessage)||void 0===i?void 0:i.$wrapper();null==e||e.removeClass(m),clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout((()=>null==e?void 0:e.addClass(m)),150)}return this.callBase(e)},_canValueBeChangedByClick:()=>!1,_getStylingModePrefix:()=>"dx-editor-",_renderStylingMode(){const e="stylingMode",t=this.option(e),i=this._getStylingModePrefix(),n=y.map((e=>i+e));n.forEach((e=>this.$element().removeClass(e)));let o=i+t;if(!n.includes(o)){const t=this._getDefaultOptions()[e],n=this._convertRulesToOptions(this._defaultOptionsRules())[e];o=i+(n||t)}this.$element().addClass(o)},_getValidationErrors(){let e=this.option("validationErrors");return!e&&this.option("validationError")&&(e=[this.option("validationError")]),e},_disposeValidationMessage(){this._$validationMessage&&(this._$validationMessage.remove(),this.setAria("describedby",null),this._$validationMessage=void 0,this._validationMessage=void 0)},_toggleValidationClasses(e){this.$element().toggleClass("dx-invalid",e),this.setAria(C,e||void 0)},_renderValidationState(){const e=this.option("isValid")&&this.option("validationStatus")!==C,t=this._getValidationErrors(),i=this.$element();if(this._toggleValidationClasses(!e),(0,c.hasWindow)()&&!1!==this.option("_showValidationMessage")&&(this._disposeValidationMessage(),!e&&t)){const{validationMessageMode:e,validationMessageOffset:n,validationBoundary:o,rtlEnabled:a}=this.option();this._$validationMessage=(0,r.default)("<div>").appendTo(i);const l=`dx-${new s.default}`;this.setAria("describedby",l),this._validationMessage=new p.default(this._$validationMessage,(0,u.extend)({validationErrors:t,rtlEnabled:a,target:this._getValidationMessageTarget(),visualContainer:i,mode:e,positionSide:this._getValidationMessagePosition(),offset:n,boundary:o,contentId:l},this._options.cache("validationTooltipOptions"))),this._bindInnerWidgetOptions(this._validationMessage,"validationTooltipOptions")}},_getValidationMessagePosition(){return this.option("validationMessagePosition")},_getValidationMessageTarget(){return this.$element()},_toggleReadOnlyState(){const e=this.option("readOnly");this._toggleBackspaceHandler(e),this.$element().toggleClass("dx-state-readonly",!!e),this._setAriaReadonly(e)},_setAriaReadonly(e){this.setAria("readonly",e||void 0)},_toggleBackspaceHandler(e){const t=this._keyboardEventBindingTarget(),i=(0,o.addNamespace)("keydown","editorReadOnly");n.default.off(t,i),e&&n.default.on(t,i,(e=>{"backspace"===(0,o.normalizeKeyName)(e)&&e.preventDefault()}))},_dispose(){const e=this.$element()[0];(0,a.data)(e,v,null),clearTimeout(this.showValidationMessageTimeout),this._disposeValidationMessage(),this.callBase()},_setSubmitElementName(e){const t=this._getSubmitElement();t&&(e.length>0?t.attr("name",e):t.removeAttr("name"))},_getSubmitElement:()=>null,_setValidationMessageOption(e){var t;let{name:i,value:n}=e;const o=b[i]?b[i]:i;null===(t=this._validationMessage)||void 0===t||t.option(o,n)},_hasActiveElement:d.noop,_optionChanged(e){var t;switch(e.name){case"onValueChanged":this._createValueChangeAction();break;case"readOnly":this._toggleReadOnlyState(),this._refreshFocusState();break;case"value":e.value!=e.previousValue&&(this.option("isDirty",this._initialValue!==e.value),this.validationRequest.fire({value:e.value,editor:this})),this._valueChangeActionSuppressed||(this._raiseValueChangeAction(e.value,e.previousValue),this._saveValueChangeEvent(void 0));break;case"width":this.callBase(e),null===(t=this._validationMessage)||void 0===t||t.updateMaxWidth();break;case"name":this._setSubmitElementName(e.value);break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(h.default.synchronizeValidationOptions(e,this.option())),this._renderValidationState();break;case"validationBoundary":case"validationMessageMode":case"validationMessagePosition":case"validationMessageOffset":this._setValidationMessageOption(e);break;case"rtlEnabled":this._setValidationMessageOption(e),this.callBase(e);break;case"validationTooltipOptions":this._innerWidgetOptionChanged(this._validationMessage,e);break;case"_showValidationMessage":case"isDirty":break;default:this.callBase(e)}},_resetToInitialValue(){this.option("value",this._initialValue)},blur(){this._hasActiveElement()&&_.default.resetActiveElement()},clear(){const e=this._getDefaultOptions();this.option("value",e.value)},reset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;arguments.length&&(this._initialValue=e),this._resetToInitialValue(),this.option("isDirty",!1),this.option("isValid",!0)}});x.isEditor=e=>e instanceof x;t.default=x},28365:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.renderButtonItem=function(e){let{item:t,$parent:i,rootElementCssClassList:n,validationGroup:l,createComponentCallback:d}=e;const u=(0,o.default)("<div>").appendTo(i).addClass(n.join(" ")).addClass(r).css("textAlign",(c=t.horizontalAlignment,(0,s.isDefined)(c)?c:"right"));var c;i.css("justifyContent",function(e){switch(e){case"center":return"center";case"bottom":return"flex-end";default:return"flex-start"}}(t.verticalAlignment));const h=(0,o.default)("<div>").appendTo(u);return{$rootElement:u,buttonInstance:d(h,"dxButton",(0,a.extend)({validationGroup:l},t.buttonOptions))}};var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(52576),s=i(11528);const r="dx-field-button-item"},15602:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.FIELD_EMPTY_ITEM_CLASS=void 0,t.renderEmptyItem=function(e){let{$parent:t,rootElementCssClassList:i}=e;return(0,o.default)("<div>").addClass(a).html("&nbsp;").addClass(i.join(" ")).appendTo(t)};var n,o=(n=i(64553))&&n.__esModule?n:{default:n};const a=t.FIELD_EMPTY_ITEM_CLASS="dx-field-empty-item"},64949:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TOGGLE_CONTROLS_PADDING_CLASS=t.LABEL_VERTICAL_ALIGNMENT_CLASS=t.LABEL_HORIZONTAL_ALIGNMENT_CLASS=t.FLEX_LAYOUT_CLASS=t.FIELD_ITEM_REQUIRED_CLASS=t.FIELD_ITEM_OPTIONAL_CLASS=t.FIELD_ITEM_LABEL_ALIGN_CLASS=t.FIELD_ITEM_HELP_TEXT_CLASS=t.FIELD_ITEM_CONTENT_WRAPPER_CLASS=t.FIELD_ITEM_CONTENT_LOCATION_CLASS=void 0,t.renderFieldItem=function(e){let{$parent:t,rootElementCssClassList:i,formOrLayoutManager:d,createComponentCallback:g,labelOptions:D,labelNeedBaselineAlign:E,labelLocation:P,needRenderLabel:k,formLabelLocation:M,item:R,editorOptions:L,isSimpleItem:B,isRequired:V,template:F,helpID:H,labelID:N,name:z,helpText:W,requiredMessageTemplate:$,validationGroup:G}=e;const j=(0,s.default)("<div>").addClass(i.join(" ")).appendTo(t);j.addClass(V?m:f),B&&j.addClass(_);B&&E&&j.addClass(y);const U=(0,s.default)("<div>");U.data("dx-form-item",R);U.addClass(h.FIELD_ITEM_CONTENT_CLASS).addClass(C+{right:"left",left:"right",top:"bottom"}[M]);let K,Z=null;k&&(D.labelTemplate&&(D.labelTemplateData=O(R,L,d)),Z=(0,p.renderLabel)(D));if(Z){const{editorType:e}=R;j.append(Z),"top"!==P&&"left"!==P||j.append(U),"right"===P&&j.prepend(U),"top"===P?j.addClass(x):j.addClass(w),"dxCheckBox"!==e&&"dxSwitch"!==e||o.default.on(Z,n.name,(()=>{o.default.trigger(U.children(),n.name)}));const t=["dxCheckBox","dxSwitch","dxRadioGroup"].includes(e),i=D.alignment;!F&&t&&"top"===P&&("left"===i||!i)&&U.addClass(S)}else j.append(U);if(F)F.render({container:(0,a.getPublicElement)(U),model:O(R,L,d),onRendered(){const e=function(e){var t;return(null==e?void 0:e.data(I))||(null==e||null===(t=e.parent)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t.data(I))}(T(U));A(e)}});else{const e=(0,s.default)("<div>").appendTo(U);try{K=g(e,R.editorType,L),K.setAria("describedby",H),N&&K.setAria("labelledby",N),K.setAria("required",V)}catch(e){c.default.log("E1035",e.message)}}const q=T(U),Y=q&&q.data(I);if(Y){const e=R.label&&R.label.text,t=e?null:z,i=e?R.label.text:t&&(0,r.captionize)(t);let n;if(B)if(R.validationRules)n=R.validationRules;else{const e=(0,l.format)($,i||"");n=R.isRequired?[{type:"required",message:e}]:null}Array.isArray(n)&&n.length&&g(q,u.default,{validationRules:n,validationGroup:G,dataGetter:()=>({formItem:R})}),A(Y)}if(W&&B){U.parent().append((0,s.default)("<div>").addClass(v).append(U).append((0,s.default)("<div>").addClass(b).attr("id",H).text(W)))}return{$fieldEditorContainer:U,$rootElement:j,widgetInstance:K}};var n=i(64044),o=g(i(92774)),a=i(61404),s=g(i(64553)),r=i(53124),l=i(54497),d=i(52071),u=g(i(71775)),c=g(i(35185)),h=i(96891),p=i(43305);function g(e){return e&&e.__esModule?e:{default:e}}const _=t.FLEX_LAYOUT_CLASS="dx-flex-layout",f=t.FIELD_ITEM_OPTIONAL_CLASS="dx-field-item-optional",m=t.FIELD_ITEM_REQUIRED_CLASS="dx-field-item-required",v=t.FIELD_ITEM_CONTENT_WRAPPER_CLASS="dx-field-item-content-wrapper",C=t.FIELD_ITEM_CONTENT_LOCATION_CLASS="dx-field-item-content-location-",y=t.FIELD_ITEM_LABEL_ALIGN_CLASS="dx-field-item-label-align",b=t.FIELD_ITEM_HELP_TEXT_CLASS="dx-field-item-help-text",x=t.LABEL_VERTICAL_ALIGNMENT_CLASS="dx-label-v-align",w=t.LABEL_HORIZONTAL_ALIGNMENT_CLASS="dx-label-h-align",S=t.TOGGLE_CONTROLS_PADDING_CLASS="dx-toggle-controls-paddings",D="dx-template-wrapper",I="dx-validation-target",E="dx-invalid";function T(e){const t=e.children().first();return t.hasClass(D)?t.children().first():t}function A(e){if(e&&(0,d.isMaterialBased)()){const t=`.${v}`,i=e=>{let{element:i,component:n}=e;const{isValid:o,validationMessageMode:a}=n.option();(0,s.default)(i).parents(t).toggleClass(E,!1===o&&(n._isFocused()||"always"===a))};e.on("optionChanged",(e=>{"isValid"===e.name&&i(e)})),e.on("focusIn",i).on("focusOut",i).on("enterKey",i)}}function O(e,t,i){return{dataField:e.dataField,editorType:e.editorType,editorOptions:t,component:i,name:e.name}}},43305:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GET_LABEL_WIDTH_BY_TEXT_CLASS=t.FIELD_ITEM_REQUIRED_MARK_CLASS=t.FIELD_ITEM_OPTIONAL_MARK_CLASS=t.FIELD_ITEM_LABEL_TEXT_CLASS=t.FIELD_ITEM_LABEL_LOCATION_CLASS=void 0,t.renderLabel=function(e){let{text:t,id:i,location:n,alignment:p,labelID:g=null,markOptions:_={},labelTemplate:f,labelTemplateData:m,onLabelTemplateRendered:v}=e;if((!(0,s.isDefined)(t)||t.length<=0)&&!(0,s.isDefined)(f))return null;const C=(0,a.default)("<label>").addClass(`${r.FIELD_ITEM_LABEL_CLASS} ${u}${n}`).attr("for",i).attr("id",g).css("textAlign",p),y=(0,a.default)("<span>").addClass(r.FIELD_ITEM_LABEL_CONTENT_CLASS);let b=(0,a.default)("<span>").addClass(h).text(t);f&&(b=(0,a.default)("<div>").addClass("dx-field-item-custom-label-content"),m.text=t,f.render({container:(0,o.getPublicElement)(b),model:m,onRendered(){null==v||v()}}));return C.append(y.append(b,function(e){const t=(0,l.getLabelMarkText)(e);if(""===t)return null;return(0,a.default)("<span>").addClass(e.showRequiredMark?d:c).text(t)}(_)))},t.setLabelWidthByMaxLabelWidth=function(e,t,i){const n=`${t} > .${r.FIELD_ITEM_LABEL_CLASS}:not(.${u}top) > .${r.FIELD_ITEM_LABEL_CONTENT_CLASS}`,o=e.find(n),a=o.length;let s,l,d=0;for(l=0;l<a;l++)s=p(o[l]),s>d&&(d=s);for(l=0;l<a;l++)o[l].style.width=`${d}px`};var n,o=i(61404),a=(n=i(64553))&&n.__esModule?n:{default:n},s=i(11528),r=i(96891),l=i(44551);t.GET_LABEL_WIDTH_BY_TEXT_CLASS="dx-layout-manager-hidden-label";const d=t.FIELD_ITEM_REQUIRED_MARK_CLASS="dx-field-item-required-mark",u=t.FIELD_ITEM_LABEL_LOCATION_CLASS="dx-field-item-label-location-",c=t.FIELD_ITEM_OPTIONAL_MARK_CLASS="dx-field-item-optional-mark",h=t.FIELD_ITEM_LABEL_TEXT_CLASS="dx-field-item-label-text";function p(e){let t=0;const i=e.children.length;for(let n=0;n<i;n++){t+=e.children[n].offsetWidth}return t}},96891:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WIDGET_CLASS=t.SINGLE_COLUMN_ITEM_CONTENT=t.SIMPLE_ITEM_TYPE=t.ROOT_SIMPLE_ITEM_CLASS=t.LAYOUT_MANAGER_ONE_COLUMN=t.GROUP_COL_COUNT_CLASS=t.GROUP_COL_COUNT_ATTR=t.FORM_VALIDATION_SUMMARY=t.FORM_UNDERLINED_CLASS=t.FORM_LAYOUT_MANAGER_CLASS=t.FORM_GROUP_WITH_CAPTION_CLASS=t.FORM_GROUP_CUSTOM_CAPTION_CLASS=t.FORM_GROUP_CONTENT_CLASS=t.FORM_GROUP_CLASS=t.FORM_GROUP_CAPTION_CLASS=t.FORM_FIELD_ITEM_COL_CLASS=t.FORM_CLASS=t.FIELD_ITEM_TAB_CLASS=t.FIELD_ITEM_LABEL_CONTENT_CLASS=t.FIELD_ITEM_LABEL_CLASS=t.FIELD_ITEM_CONTENT_HAS_TABS_CLASS=t.FIELD_ITEM_CONTENT_HAS_GROUP_CLASS=t.FIELD_ITEM_CONTENT_CLASS=t.FIELD_ITEM_CLASS=void 0;t.WIDGET_CLASS="dx-widget",t.FORM_CLASS="dx-form",t.FORM_GROUP_CLASS="dx-form-group",t.FORM_GROUP_CAPTION_CLASS="dx-form-group-caption",t.FORM_GROUP_CUSTOM_CAPTION_CLASS="dx-form-group-custom-caption",t.FORM_FIELD_ITEM_COL_CLASS="dx-col-",t.FIELD_ITEM_CLASS="dx-field-item",t.LAYOUT_MANAGER_ONE_COLUMN="dx-layout-manager-one-col",t.FIELD_ITEM_LABEL_CONTENT_CLASS="dx-field-item-label-content",t.FORM_LAYOUT_MANAGER_CLASS="dx-layout-manager",t.FIELD_ITEM_LABEL_CLASS="dx-field-item-label",t.FIELD_ITEM_CONTENT_CLASS="dx-field-item-content",t.SINGLE_COLUMN_ITEM_CONTENT="dx-single-column-item-content",t.ROOT_SIMPLE_ITEM_CLASS="dx-root-simple-item",t.FORM_GROUP_CONTENT_CLASS="dx-form-group-content",t.FIELD_ITEM_CONTENT_HAS_GROUP_CLASS="dx-field-item-has-group",t.FIELD_ITEM_CONTENT_HAS_TABS_CLASS="dx-field-item-has-tabs",t.FORM_GROUP_WITH_CAPTION_CLASS="dx-form-group-with-caption",t.FIELD_ITEM_TAB_CLASS="dx-field-item-tab",t.GROUP_COL_COUNT_CLASS="dx-group-colcount-",t.GROUP_COL_COUNT_ATTR="group-col-count",t.FORM_VALIDATION_SUMMARY="dx-form-validation-summary",t.FORM_UNDERLINED_CLASS="dx-form-styling-mode-underlined",t.SIMPLE_ITEM_TYPE="simple"},77414:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(55620))&&n.__esModule?n:{default:n};t.default=class{constructor(e){this._options=e,this._itemsRunTimeInfo=this._options.itemsRunTimeInfo}findInstance(){return this._itemsRunTimeInfo.findWidgetInstanceByItem(this._options.item)}findItemContainer(){return this._itemsRunTimeInfo.findItemContainerByItem(this._options.item)}findPreparedItem(){return this._itemsRunTimeInfo.findPreparedItemByItem(this._options.item)}tryExecute(){o.default.abstract()}}},78820:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(74663),a=i(52576),s=(n=i(77414))&&n.__esModule?n:{default:n},r=i(7165);class l extends s.default{tryExecute(){const{value:e}=this._options,t=this.findInstance();return!!t&&(t.option(e),!0)}}class d extends s.default{tryExecute(){const e=this.findInstance();if(e){const{optionName:t,item:i,value:n}=this._options,o=this._itemsRunTimeInfo.findItemIndexByItem(i);if(o>=0)return e.option((0,r.getFullOptionName)(`items[${o}]`,t),n),!0}return!1}}class u extends s.default{tryExecute(){return!1}}class c extends s.default{tryExecute(){const e=this.findPreparedItem();return!(null==e||!e._prepareGroupItemTemplate||!e._renderGroupContentTemplate)&&(e._prepareGroupItemTemplate(this._options.item.template),e._renderGroupContentTemplate(),!0)}}class h extends s.default{tryExecute(){const e=this.findInstance();if(e){const{value:t}=this._options;return e.option("dataSource",t),!0}return!1}}class p extends s.default{tryExecute(){const{item:e}=this._options,t=this.findInstance(),i=t&&(0,o.data)(t.$element()[0],"dxValidator");if(i&&e){const t=e=>"required"===e.type,n=(i.option("validationRules")||[]).some(t),o=(e.validationRules||[]).some(t);if(!n&&!o||n&&o)return i.option("validationRules",e.validationRules),!0}return!1}}class g extends s.default{tryExecute(){const e=this.findItemContainer(),{previousValue:t,value:i}=this._options;return!!e&&(e.removeClass(t).addClass(i),!0)}}t.default=(e,t)=>{switch(e){case"editorOptions":case"buttonOptions":return new l(t);case"validationRules":return new p(t);case"cssClass":return new g(t);case"badge":case"disabled":case"icon":case"tabTemplate":case"title":return new d((0,a.extend)(t,{optionName:e}));case"tabs":return new h(t);case"template":{var i,n;const o=(null==t||null===(i=t.item)||void 0===i?void 0:i.itemType)??(null===(n=t.itemsRunTimeInfo.findPreparedItemByItem(null==t?void 0:t.item))||void 0===n?void 0:n.itemType);return"simple"===o?new u(t):"group"===o?new c(t):new d((0,a.extend)(t,{optionName:e}))}default:return null}}},15910:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(19427))&&n.__esModule?n:{default:n},a=i(52576),s=i(21274),r=i(11528);t.default=class{constructor(){this._map={}}_findWidgetInstance(e){let t;return(0,s.each)(this._map,((i,n)=>{let{widgetInstance:o,item:a}=n;if(e(a))return t=o,!1})),t}_findFieldByCondition(e,t){let i;return(0,s.each)(this._map,((n,o)=>{if(e(o))return i="guid"===t?n:o[t],!1})),i}clear(){this._map={}}removeItemsByItems(e){(0,s.each)(e.getItems(),(e=>this.removeItemByKey(e)))}removeItemByKey(e){delete this._map[e]}add(e){const t=e.guid||new o.default;return this._map[t]=e,t}addItemsOrExtendFrom(e){e.each(((e,t)=>{this._map[e]?(t.widgetInstance&&(this._map[e].widgetInstance=t.widgetInstance),this._map[e].$itemContainer=t.$itemContainer):this.add({item:t.item,widgetInstance:t.widgetInstance,guid:e,$itemContainer:t.$itemContainer})}))}extendRunTimeItemInfoByKey(e,t){this._map[e]&&(this._map[e]=(0,a.extend)(this._map[e],t))}findWidgetInstanceByItem(e){return this._findWidgetInstance((t=>t===e))}findGroupOrTabLayoutManagerByPath(e){return this._findFieldByCondition((t=>{let{path:i}=t;return i===e}),"layoutManager")}findKeyByPath(e){return this._findFieldByCondition((t=>{let{path:i}=t;return i===e}),"guid")}findWidgetInstanceByName(e){return this._findWidgetInstance((t=>e===t.name))}findWidgetInstanceByDataField(e){return this._findWidgetInstance((t=>e===((0,r.isString)(t)?t:t.dataField)))}findItemContainerByItem(e){for(const t in this._map)if(this._map[t].item===e)return this._map[t].$itemContainer;return null}findItemIndexByItem(e){return this._findFieldByCondition((t=>{let{item:i}=t;return i===e}),"itemIndex")}findPreparedItemByItem(e){return this._findFieldByCondition((t=>{let{item:i}=t;return i===e}),"preparedItem")}getItems(){return this._map}each(e){(0,s.each)(this._map,((t,i)=>{e(t,i)}))}removeItemsByPathStartWith(e){Object.keys(this._map).filter((t=>!!this._map[t].path&&this._map[t].path.indexOf(e,0)>-1)).forEach((e=>this.removeItemByKey(e)))}}},67350:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(39376),i(10585),i(16390);var n=P(i(92774)),o=i(18029),a=P(i(4671)),s=P(i(92848)),r=P(i(66636)),l=i(61404),d=P(i(19427)),u=P(i(64553)),c=P(i(11787)),h=i(17781),p=i(87739),g=i(52576),_=i(21274),f=i(11528),m=i(3104),v=P(i(78694)),C=P(i(20876)),y=P(i(78175)),b=i(52071),x=P(i(19391)),w=P(i(11118)),S=i(96002),D=i(43305),I=i(96891),E=P(i(78820)),T=P(i(15910)),A=i(44551),O=i(7165);function P(e){return e&&e.__esModule?e:{default:e}}function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},k.apply(null,arguments)}const M="dx-state-focused",R=["items","isRequired","validationRules","visible"],L=w.default.inherit({_init(){this.callBase(),this._dirtyFields=new Set,this._cachedColCountOptions=[],this._itemsRunTimeInfo=new T.default,this._groupsColCount=[],this._attachSyncSubscriptions()},_getDefaultOptions(){return(0,g.extend)(this.callBase(),{formID:`dx-${new d.default}`,formData:{},colCount:1,screenByWidth:m.defaultScreenFactorFunc,colCountByScreen:void 0,labelLocation:"left",readOnly:!1,onFieldDataChanged:null,customizeItem:null,onEditorEnterKey:null,minColWidth:200,alignItemLabels:!0,alignItemLabelsInAllGroups:!0,alignRootItemLabels:!0,showColonAfterLabel:!0,showRequiredMark:!0,showOptionalMark:!1,requiredMark:"*",optionalMark:a.default.format("dxForm-optionalMark"),requiredMessage:a.default.getFormatter("dxForm-requiredMessage"),showValidationSummary:!1,items:void 0,scrollingEnabled:!1,validationGroup:void 0,stylingMode:(0,r.default)().editorStylingMode,labelMode:"outside",isDirty:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>(0,b.isMaterialBased)(),options:{labelLocation:"top"}},{device:()=>(0,b.isMaterial)(),options:{showColonAfterLabel:!1}}])},_setOptionsByReference(){this.callBase(),(0,g.extend)(this._optionsByReference,{formData:!0,validationGroup:!0})},_getGroupColCount:e=>parseInt(e.attr(I.GROUP_COL_COUNT_ATTR)),_applyLabelsWidthByCol(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;const o=i.inOneColumn?I.FIELD_ITEM_CLASS:I.FORM_FIELD_ITEM_COL_CLASS+t,a=i.excludeTabbed?`:not(.${I.FIELD_ITEM_TAB_CLASS})`:"";(0,D.setLabelWidthByMaxLabelWidth)(e,`.${o}${a}`,n)},_applyLabelsWidth(e,t,i,n,o){n=i?1:n||this._getGroupColCount(e);const a={excludeTabbed:t,inOneColumn:i};let s;for(s=0;s<n;s++)this._applyLabelsWidthByCol(e,s,a,o)},_getGroupElementsInColumn(e,t,i){const n=(0,f.isDefined)(i)?`.${I.GROUP_COL_COUNT_CLASS}${i}`:"",o=`.${I.FORM_FIELD_ITEM_COL_CLASS}${t} > .${I.FIELD_ITEM_CONTENT_CLASS} > .${I.FORM_GROUP_CLASS}${n}`;return e.find(o)},_applyLabelsWidthWithGroups(e,t,i,n){if(!0===this.option("alignRootItemLabels")){const o=e.find(`.${I.ROOT_SIMPLE_ITEM_CLASS}`);for(let e=0;e<t;e++)this._applyLabelsWidthByCol(o,e,i,n)}if(this.option("alignItemLabelsInAllGroups"))this._applyLabelsWidthWithNestedGroups(e,t,i,n);else{const e=this.$element().find(`.${I.FORM_GROUP_CLASS}`);let t;for(t=0;t<e.length;t++)this._applyLabelsWidth(e.eq(t),i,void 0,void 0,n)}},_applyLabelsWidthWithNestedGroups(e,t,i,n){const o={excludeTabbed:i};let a,s,r,l;for(a=0;a<t;a++)for(l=this._getGroupElementsInColumn(e,a),this._applyLabelsWidthByCol(l,0,o,n),s=0;s<this._groupsColCount.length;s++){l=this._getGroupElementsInColumn(e,a,this._groupsColCount[s]);const t=this._getGroupColCount(l);for(r=1;r<t;r++)this._applyLabelsWidthByCol(l,r,o,n)}},_labelLocation(){return this.option("labelLocation")},_alignLabelsInColumn(e){let{layoutManager:t,inOneColumn:i,$container:n,excludeTabbed:o,items:a}=e;if(!(0,m.hasWindow)()||"top"===this._labelLocation())return;const s=(0,A.convertToLabelMarkOptions)(t._getMarkOptions());i?this._applyLabelsWidth(n,o,!0,void 0,s):this._checkGrouping(a)?this._applyLabelsWidthWithGroups(n,t._getColCount(),o,s):this._applyLabelsWidth(n,o,!1,t._getColCount(),s)},_prepareFormData(){(0,f.isDefined)(this.option("formData"))||this.option("formData",{})},_setStylingModeClass(){"underlined"===this.option("stylingMode")&&this.$element().addClass(I.FORM_UNDERLINED_CLASS)},_initMarkup(){x.default.addGroup(this._getValidationGroup(),!1),this._clearCachedInstances(),this._prepareFormData(),this.$element().addClass(I.FORM_CLASS),this._setStylingModeClass(),this.callBase(),this.setAria("role","form",this.$element()),this.option("scrollingEnabled")&&this._renderScrollable(),this._renderLayout(),this._renderValidationSummary(),this._lastMarkupScreenFactor=this._targetScreenFactor||this._getCurrentScreenFactor(),this._attachResizeObserverSubscription()},_attachResizeObserverSubscription(){if((0,m.hasWindow)()){const e=this.$element().get(0);c.default.unobserve(e),c.default.observe(e,(()=>{this._resizeHandler()}))}},_resizeHandler(){this._cachedLayoutManagers.length&&(0,_.each)(this._cachedLayoutManagers,((e,t)=>{var i;null===(i=t.option("onLayoutChanged"))||void 0===i||i(t.isSingleColumnMode())}))},_getCurrentScreenFactor(){return(0,m.hasWindow)()?(0,m.getCurrentScreenFactor)(this.option("screenByWidth")):"lg"},_clearCachedInstances(){this._itemsRunTimeInfo.clear(),this._cachedLayoutManagers=[]},_alignLabels(e,t){this._alignLabelsInColumn({$container:this.$element(),layoutManager:e,excludeTabbed:!0,items:this.option("items"),inOneColumn:t}),(0,o.triggerResizeEvent)(this.$element().find(`.${S.TOOLBAR_CLASS}`))},_clean(){this._clearValidationSummary(),this.callBase(),this._groupsColCount=[],this._cachedColCountOptions=[],this._lastMarkupScreenFactor=void 0,c.default.unobserve(this.$element().get(0))},_renderScrollable(){const e=this.option("useNativeScrolling");this._scrollable=new C.default(this.$element(),{useNative:!!e,useSimulatedScrollbar:!e,useKeyboard:!1,direction:"both",bounceEnabled:!1})},_getContent(){return this.option("scrollingEnabled")?(0,u.default)(this._scrollable.content()):this.$element()},_clearValidationSummary(){var e;null===(e=this._$validationSummary)||void 0===e||e.remove(),this._$validationSummary=void 0,this._validationSummary=void 0},_renderValidationSummary(){this._clearValidationSummary(),this.option("showValidationSummary")&&(this._$validationSummary=(0,u.default)("<div>").addClass(I.FORM_VALIDATION_SUMMARY).appendTo(this._getContent()),this._validationSummary=this._$validationSummary.dxValidationSummary({validationGroup:this._getValidationGroup()}).dxValidationSummary("instance"))},_prepareItems(e,t,i,n){if(e){const o=[];for(let a=0;a<e.length;a++){let s=e[a];const r=(0,O.concatPaths)(i,(0,O.createItemPathByIndex)(a,n)),l={item:s,itemIndex:a,path:r},d=this._itemsRunTimeInfo.add(l);if((0,f.isString)(s)&&(s={dataField:s}),(0,f.isObject)(s)){const e=k({},s);l.preparedItem=e,e.guid=d,this._tryPrepareGroupItemCaption(e),this._tryPrepareGroupItem(e),this._tryPrepareTabbedItem(e,r),this._tryPrepareItemTemplate(e),t&&(e.cssItemClass=I.FIELD_ITEM_TAB_CLASS),e.items&&(e.items=this._prepareItems(e.items,t,r)),o.push(e)}else o.push(s)}return o}},_tryPrepareGroupItemCaption(e){"group"===e.itemType&&(e._prepareGroupCaptionTemplate=t=>{e.captionTemplate&&(e.groupCaptionTemplate=this._getTemplate(t)),e.captionTemplate=this._itemGroupTemplate.bind(this,e)},e._prepareGroupCaptionTemplate(e.captionTemplate))},_tryPrepareGroupItem(e){"group"===e.itemType&&(e.alignItemLabels=(0,h.ensureDefined)(e.alignItemLabels,!0),e._prepareGroupItemTemplate=t=>{e.template&&(e.groupContentTemplate=this._getTemplate(t)),e.template=this._itemGroupTemplate.bind(this,e)},e._prepareGroupItemTemplate(e.template))},_tryPrepareTabbedItem(e,t){"tabbed"===e.itemType&&(e.template=this._itemTabbedTemplate.bind(this,e),e.tabs=this._prepareItems(e.tabs,!0,t,!0))},_tryPrepareItemTemplate(e){e.template&&(e.template=this._getTemplate(e.template))},_checkGrouping(e){if(e)for(let t=0;t<e.length;t++){if("group"===e[t].itemType)return!0}},_renderLayout(){const e=this;let t=e.option("items");const i=e._getContent();t=e._prepareItems(t),e._rootLayoutManager=e._renderLayoutManager(i,this._createLayoutManagerOptions(t,{isRoot:!0,colCount:e.option("colCount"),alignItemLabels:e.option("alignItemLabels"),screenByWidth:this.option("screenByWidth"),colCountByScreen:this.option("colCountByScreen"),onLayoutChanged(t){e._alignLabels.bind(e)(e._rootLayoutManager,t)},onContentReady(t){e._alignLabels(t.component,t.component.isSingleColumnMode())}}))},_tryGetItemsForTemplate:e=>e.items||[],_itemTabbedTemplate(e,t,i){const n=(0,u.default)("<div>").appendTo(i),a=(0,g.extend)({},e.tabPanelOptions,{dataSource:e.tabs,onItemRendered:t=>{var i,n;null===(i=e.tabPanelOptions)||void 0===i||null===(n=i.onItemRendered)||void 0===n||n.call(i,t),(0,o.triggerShownEvent)(t.itemElement)},itemTemplate:(e,t,i)=>{const n=(0,u.default)(i),o=(0,h.ensureDefined)(e.alignItemLabels,!0),a=this._renderLayoutManager(n,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(e),{colCount:e.colCount,alignItemLabels:o,screenByWidth:this.option("screenByWidth"),colCountByScreen:e.colCountByScreen,cssItemClass:e.cssItemClass,onLayoutChanged:t=>{this._alignLabelsInColumn({$container:n,layoutManager:a,items:e.items,inOneColumn:t})}}));this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(e.guid,{layoutManager:a}),o&&this._alignLabelsInColumn({$container:n,layoutManager:a,items:e.items,inOneColumn:a.isSingleColumnMode()})}}),s=(e,t)=>{Array.isArray(e)&&e.forEach((e=>this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(e.guid,{widgetInstance:t})))},r=this._createComponent(n,y.default,a);(0,u.default)(i).parent().addClass(I.FIELD_ITEM_CONTENT_HAS_TABS_CLASS),r.on("optionChanged",(e=>{"dataSource"===e.fullName&&s(e.value,e.component)})),s([{guid:e.guid},...e.tabs??[]],r)},_itemGroupCaptionTemplate(e,t,i){if(e.groupCaptionTemplate){const n=(0,u.default)("<div>").addClass(I.FORM_GROUP_CUSTOM_CAPTION_CLASS).attr("id",i).appendTo(t);return e._renderGroupCaptionTemplate=()=>{const t={component:this,caption:e.caption,name:e.name};e.groupCaptionTemplate.render({model:t,container:(0,l.getPublicElement)(n)})},void e._renderGroupCaptionTemplate()}e.caption&&(0,u.default)("<span>").addClass(I.FORM_GROUP_CAPTION_CLASS).text(e.caption).attr("id",i).appendTo(t)},_itemGroupContentTemplate(e,t){const i=(0,u.default)("<div>").addClass(I.FORM_GROUP_CONTENT_CLASS).appendTo(t);if(e.groupContentTemplate)e._renderGroupContentTemplate=()=>{i.empty();const t={formData:this.option("formData"),component:this};e.groupContentTemplate.render({model:t,container:(0,l.getPublicElement)(i)})},e._renderGroupContentTemplate();else{const n=this._renderLayoutManager(i,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(e),{colCount:e.colCount,colCountByScreen:e.colCountByScreen,alignItemLabels:e.alignItemLabels,cssItemClass:e.cssItemClass}));this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(e.guid,{layoutManager:n});const o=n._getColCount();this._groupsColCount.includes(o)||this._groupsColCount.push(o),t.addClass(I.GROUP_COL_COUNT_CLASS+o),t.attr(I.GROUP_COL_COUNT_ATTR,o)}},_itemGroupTemplate(e,t,i){const{id:n}=t.editorOptions.inputAttr,o=(0,u.default)("<div>").toggleClass(I.FORM_GROUP_WITH_CAPTION_CLASS,(0,f.isDefined)(e.caption)&&e.caption.length).addClass(I.FORM_GROUP_CLASS).appendTo(i),a={role:"group",labelledby:n};this.setAria(a,o),(0,u.default)(i).parent().addClass(I.FIELD_ITEM_CONTENT_HAS_GROUP_CLASS),this._itemGroupCaptionTemplate(e,o,n),this._itemGroupContentTemplate(e,o)},_createLayoutManagerOptions(e,t){return(0,O.convertToLayoutManagerOptions)({form:this,formOptions:this.option(),$formElement:this.$element(),items:e,validationGroup:this._getValidationGroup(),extendedLayoutManagerOptions:t,onFieldDataChanged:e=>{this._isDataUpdating||this._triggerOnFieldDataChanged(e)},onContentReady:e=>{this._itemsRunTimeInfo.addItemsOrExtendFrom(e.component._itemsRunTimeInfo),t.onContentReady&&t.onContentReady(e)},onDisposing:e=>{let{component:t}=e;const i=t.getItemsRunTimeInfo();this._itemsRunTimeInfo.removeItemsByItems(i)},onFieldItemRendered:()=>{var e;null===(e=this._validationSummary)||void 0===e||e.refreshValidationGroup()}})},_renderLayoutManager(e,t){const i={lg:t.colCount,md:t.colCount,sm:t.colCount,xs:1};this._cachedColCountOptions.push({colCountByScreen:(0,g.extend)(i,t.colCountByScreen)});const n=(0,u.default)("<div>");n.appendTo(e);const o=this._createComponent(n,"dxLayoutManager",t);return o.on("autoColCountChanged",(()=>{this._clearAutoColCountChangedTimeout(),this.autoColCountChangedTimeoutId=setTimeout((()=>!this._disposed&&this._refresh()),0)})),this._cachedLayoutManagers.push(o),o},_getValidationGroup(){return this.option("validationGroup")||this},_createComponent(e,t,i){const n=this;return i=i||{},n._extendConfig(i,{readOnly:n.option("readOnly")}),n.callBase(e,t,i)},_attachSyncSubscriptions(){const e=this;e.on("optionChanged",(t=>{const i=t.fullName;"formData"===i&&((0,f.isDefined)(t.value)||e._options.silent("formData",t.value={}),e._triggerOnFieldDataChangedByDataSet(t.value)),e._cachedLayoutManagers.length&&(0,_.each)(e._cachedLayoutManagers,((n,o)=>{"formData"===i&&(e._isDataUpdating=!0,o.option("layoutData",t.value),e._isDataUpdating=!1),"readOnly"!==t.name&&"disabled"!==t.name||o.option(i,t.value)}))}))},_optionChanged(e){const t=e.fullName.split(".");t.length>1&&-1!==t[0].search("items")&&this._itemsOptionChangedHandler(e)||t.length>1&&-1!==t[0].search("formData")&&this._formDataOptionChangedHandler(e)||this._defaultOptionChangedHandler(e)},_defaultOptionChangedHandler(e){switch(e.name){case"formData":this.option("items")?(0,f.isEmptyObject)(e.value)&&this._clear():this._invalidate();break;case"onFieldDataChanged":case"alignRootItemLabels":case"readOnly":case"isDirty":break;case"items":case"colCount":case"onEditorEnterKey":case"labelLocation":case"labelMode":case"alignItemLabels":case"showColonAfterLabel":case"customizeItem":case"alignItemLabelsInAllGroups":case"showRequiredMark":case"showOptionalMark":case"requiredMark":case"optionalMark":case"requiredMessage":case"scrollingEnabled":case"formID":case"colCountByScreen":case"screenByWidth":case"stylingMode":this._invalidate();break;case"showValidationSummary":this._renderValidationSummary();break;case"minColWidth":"auto"===this.option("colCount")&&this._invalidate();break;case"width":this.callBase(e),this._rootLayoutManager.option(e.name,e.value),this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode());break;case"validationGroup":x.default.removeGroup(e.previousValue||this),this._invalidate();break;default:this.callBase(e)}},_itemsOptionChangedHandler(e){const t=e.fullName.split("."),{value:i}=e,n=this._getItemPath(t),o=this.option(n),a=e.fullName.replace(`${n}.`,""),s=a.split(".")[0].replace(/\[\d+]/,""),r=this._tryCreateItemOptionAction(s,o,o[s],e.previousValue,n);let l=this._tryExecuteItemOptionAction(r)||this._tryChangeLayoutManagerItemOption(e.fullName,i);if(!l&&o){this._changeItemOption(o,a,i);const e=this._generateItemsFromData(this.option("items"));this.option("items",e),l=!0}return l},_formDataOptionChangedHandler(e){const t=e.fullName.split("."),{value:i}=e,n=t.slice(1).join("."),o=this.getEditor(n);return o?o.option("value",i):this._triggerOnFieldDataChanged({dataField:n,value:i}),!0},_tryCreateItemOptionAction(e,t,i,n,o){return"tabs"===e&&(this._itemsRunTimeInfo.removeItemsByPathStartWith(`${o}.tabs`),i=this._prepareItems(i,!0,o,!0)),(0,E.default)(e,{item:t,value:i,previousValue:n,itemsRunTimeInfo:this._itemsRunTimeInfo})},_tryExecuteItemOptionAction:e=>e&&e.tryExecute(),_updateValidationGroupAndSummaryIfNeeded(e){const t=(0,O.getOptionNameFromFullName)(e);var i;R.includes(t)&&(x.default.addGroup(this._getValidationGroup(),!1),this.option("showValidationSummary")&&(null===(i=this._validationSummary)||void 0===i||i.refreshValidationGroup()))},_setLayoutManagerItemOption(e,t,i,n){if(this._updateLockCount>0){!e._updateLockCount&&e.beginUpdate();const t=this._itemsRunTimeInfo.findKeyByPath(n);this.postponedOperations.add(t,(()=>(!e._disposed&&e.endUpdate(),(0,p.Deferred)().resolve())))}const o=e=>{if(e.component.off("contentReady",o),(0,O.isFullPathContainsTabs)(n)){const e=(0,O.tryGetTabPath)(n),t=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(e);t&&this._alignLabelsInColumn({items:t.option("items"),layoutManager:t,$container:t.$element(),inOneColumn:t.isSingleColumnMode()})}else this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode())};e.on("contentReady",o),e.option(t,i),this._updateValidationGroupAndSummaryIfNeeded(t)},_tryChangeLayoutManagerItemOption(e,t){const i=e.split("."),n=(0,O.getOptionNameFromFullName)(e);if("items"===n&&i.length>1){const e=this._getItemPath(i),o=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(e);if(o){this._itemsRunTimeInfo.removeItemsByItems(o.getItemsRunTimeInfo());const i=this._prepareItems(t,!1,e);return this._setLayoutManagerItemOption(o,n,i,e),!0}}else if(i.length>2){const e=i.length-2,o=this._getItemPath(i.slice(0,e)),a=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(o);if(a){const s=(0,O.getFullOptionName)(i[e],n);if("editorType"===n&&a.option(s)!==t)return!1;if("visible"===n){const e=this.option((0,O.getFullOptionName)(o,"items"));if(e&&e.length){const t=a.option("items");e.forEach(((e,i)=>{t[i].visibleIndex=e.visibleIndex}))}}return this._setLayoutManagerItemOption(a,s,t,o),!0}}return!1},_tryChangeLayoutManagerItemOptions(e,t){let i;return this.beginUpdate(),(0,_.each)(t,((t,n)=>{if(i=this._tryChangeLayoutManagerItemOption((0,O.getFullOptionName)(e,t),n),!i)return!1})),this.endUpdate(),i},_getItemPath(e){let t,i=e[0];for(t=1;t<e.length&&-1!==e[t].search(/items\[\d+]|tabs\[\d+]/);t++)i+=`.${e[t]}`;return i},_triggerOnFieldDataChanged(e){this._updateIsDirty(e.dataField),this._createActionByOption("onFieldDataChanged")(e)},_triggerOnFieldDataChangedByDataSet(e){e&&(0,f.isObject)(e)&&Object.keys(e).forEach((t=>{this._triggerOnFieldDataChanged({dataField:t,value:e[t]})}))},_updateFieldValue(e,t){if((0,f.isDefined)(this.option("formData"))){const i=this.getEditor(e);if(this.option(`formData.${e}`,t),i){i.option("value")!==t&&i.option("value",t)}}},_generateItemsFromData(e){const t=this.option("formData"),i=[];return!e&&(0,f.isDefined)(t)&&(0,_.each)(t,(e=>{i.push({dataField:e})})),e&&(0,_.each)(e,((e,t)=>{(0,f.isObject)(t)?i.push(t):i.push({dataField:t})})),i},_getItemByField(e,t){const i=this,n=(0,f.isObject)(e)?e:i._getFieldParts(e),{fieldName:o}=n,{fieldPath:a}=n;let s;return t.length&&(0,_.each)(t,((e,t)=>{const{itemType:n}=t;if(a.length){const e=a.slice();t=i._getItemByFieldPath(e,o,t)}else if("group"===n&&!t.caption&&!t.name||"tabbed"===n&&!t.name){const e=i._getSubItemField(n);t.items=i._generateItemsFromData(t.items),t=i._getItemByField({fieldName:o,fieldPath:a},t[e])}if((0,O.isEqualToDataFieldOrNameOrTitleOrCaption)(t,o))return s=t,!1})),s},_getFieldParts(e){let t=e,i=t.indexOf(".");const n=[];for(;-1!==i;)n.push(t.substr(0,i)),t=t.substr(i+1),i=t.indexOf(".");return{fieldName:t,fieldPath:n.reverse()}},_getItemByFieldPath(e,t,i){const n=this,{itemType:o}=i,a=n._getSubItemField(o),s="group"===o||"tabbed"===o||i.title;let r;do{if(!s)break;{const o=i.name||i.caption||i.title,s=(0,f.isDefined)(o),l=(0,O.getTextWithoutSpaces)(o);let d;if(i[a]=n._generateItemsFromData(i[a]),s&&(d=e.pop()),!e.length&&(r=n._getItemByField(t,i[a]),r))break;(!s||s&&l===d)&&e.length&&(r=n._searchItemInEverySubItem(e,t,i[a]))}}while(e.length&&!(0,f.isDefined)(r));return r},_getSubItemField:e=>"tabbed"===e?"tabs":"items",_searchItemInEverySubItem(e,t,i){const n=this;let o;return(0,_.each)(i,((i,a)=>{if(o=n._getItemByFieldPath(e.slice(),t,a),o)return!1})),o||(o=!1),o},_changeItemOption(e,t,i){(0,f.isObject)(e)&&(e[t]=i)},_dimensionChanged(){const e=this._getCurrentScreenFactor();this._lastMarkupScreenFactor!==e&&(this._isColCountChanged(this._lastMarkupScreenFactor,e)&&(this._targetScreenFactor=e,this._refresh(),this._targetScreenFactor=void 0),this._lastMarkupScreenFactor=e)},_isColCountChanged(e,t){let i=!1;return(0,_.each)(this._cachedColCountOptions,((n,o)=>{if(o.colCountByScreen[e]!==o.colCountByScreen[t])return i=!0,!1})),i},_refresh(){const e=`.${M} > :not(.dx-dropdowneditor-input-wrapper) input, .${M} textarea`;n.default.trigger(this.$element().find(e),"change"),this.callBase()},_updateIsDirty(e){const t=this.getEditor(e);t&&(t.option("isDirty")?this._dirtyFields.add(e):this._dirtyFields.delete(e),this.option("isDirty",!!this._dirtyFields.size))},updateRunTimeInfoForEachEditor(e){this._itemsRunTimeInfo.each(((t,i)=>{const{widgetInstance:n}=i;(0,f.isDefined)(n)&&v.default.isEditor(n)&&e(n)}))},_clear(){this.updateRunTimeInfoForEachEditor((e=>{e.clear(),e.option("isValid",!0)})),x.default.resetGroup(this._getValidationGroup())},_updateData(e,t,i){const n=this,o=i?t:e;(0,f.isObject)(o)?(0,_.each)(o,((t,o)=>{n._updateData(i?`${e}.${t}`:t,o,(0,f.isObject)(o))})):(0,f.isString)(e)&&n._updateFieldValue(e,t)},registerKeyHandler(e,t){this.callBase(e,t),this._itemsRunTimeInfo.each(((i,n)=>{(0,f.isDefined)(n.widgetInstance)&&n.widgetInstance.registerKeyHandler(e,t)}))},_focusTarget(){return this.$element().find(`.${I.FIELD_ITEM_CONTENT_CLASS} [tabindex]`).first()},_visibilityChanged(){this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode())},_clearAutoColCountChangedTimeout(){this.autoColCountChangedTimeoutId&&(clearTimeout(this.autoColCountChangedTimeoutId),this.autoColCountChangedTimeoutId=void 0)},_dispose(){this._clearAutoColCountChangedTimeout(),x.default.removeGroup(this._getValidationGroup()),this.callBase()},clear(){this._clear()},resetValues(){this._clear()},reset(e){this.updateRunTimeInfoForEachEditor((t=>{const i=t.option("name");e&&i in e?t.reset(e[i]):t.reset()})),this._renderValidationSummary()},updateData(e,t){this._updateData(e,t)},getEditor(e){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(e)||this._itemsRunTimeInfo.findWidgetInstanceByName(e)},getButton(e){return this._itemsRunTimeInfo.findWidgetInstanceByName(e)},updateDimensions(){const e=this,t=(0,p.Deferred)();return e._scrollable?e._scrollable.update().done((()=>{t.resolveWith(e)})):t.resolveWith(e),t.promise()},itemOption(e,t,i){const n=this._generateItemsFromData(this.option("items")),o=this._getItemByField(e,n),a=(0,O.getItemPath)(n,o);if(o)switch(arguments.length){case 1:return o;case 3:{const e=this._tryCreateItemOptionAction(t,o,i,o[t],a);this._changeItemOption(o,t,i);const s=(0,O.getFullOptionName)(a,t);this._tryExecuteItemOptionAction(e)||this._tryChangeLayoutManagerItemOption(s,i)||this.option("items",n);break}default:if((0,f.isObject)(t)&&!this._tryChangeLayoutManagerItemOptions(a,t)){let e;(0,_.each)(t,((t,i)=>{const n=this._tryCreateItemOptionAction(t,o,i,o[t],a);this._changeItemOption(o,t,i),e||this._tryExecuteItemOptionAction(n)||(e=!0)})),e&&this.option("items",n)}}},validate(){return x.default.validateGroup(this._getValidationGroup())},getItemID(e){return`dx_${this.option("formID")}_${e||new d.default}`},getTargetScreenFactor(){return this._targetScreenFactor}});(0,s.default)("dxForm",L);t.default=L},39376:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(20780),i(48042),i(94319),i(2739),i(64973);var n=S(i(92774)),o=i(28630),a=S(i(4671)),s=S(i(92848)),r=S(i(64553)),l=i(94487),d=i(31e3),u=i(52576),c=i(21274),h=i(57653),p=i(11528),g=S(i(40216)),_=i(3104),f=S(i(43597)),m=S(i(11118)),v=i(28365),C=i(15602),y=i(64949),b=i(96891),x=S(i(15910)),w=i(44551);function S(e){return e&&e.__esModule?e:{default:e}}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},D.apply(null,arguments)}const I=m.default.inherit({_getDefaultOptions(){return(0,u.extend)(this.callBase(),{layoutData:{},readOnly:!1,colCount:1,colCountByScreen:void 0,labelLocation:"left",onFieldDataChanged:null,onEditorEnterKey:null,customizeItem:null,alignItemLabels:!0,minColWidth:200,showRequiredMark:!0,screenByWidth:null,showOptionalMark:!1,requiredMark:"*",labelMode:"outside",optionalMark:a.default.format("dxForm-optionalMark"),requiredMessage:a.default.getFormatter("dxForm-requiredMessage")})},_setOptionsByReference(){this.callBase(),(0,u.extend)(this._optionsByReference,{layoutData:!0,validationGroup:!0})},_init(){const e=this.option("layoutData");this.callBase(),this._itemWatchers=[],this._itemsRunTimeInfo=new x.default,this._updateReferencedOptions(e),this._initDataAndItems(e)},_dispose(){this.callBase(),this._cleanItemWatchers()},_initDataAndItems(e){this._syncDataWithItems(),this._updateItems(e)},_syncDataWithItems(){const e=this.option("layoutData"),t=this.option("items");(0,p.isDefined)(t)&&t.forEach((t=>{if(t.dataField&&void 0===this._getDataByField(t.dataField)){let i;t.editorOptions&&(i=t.editorOptions.value),((0,p.isDefined)(i)||t.dataField in e)&&this._updateFieldValue(t.dataField,i)}}))},_getDataByField(e){return e?this.option(`layoutData.${e}`):null},_isCheckboxUndefinedStateEnabled(e){let{allowIndeterminateState:t,editorType:i,dataField:n}=e;if(!0===t&&"dxCheckBox"===i){const e=["layoutData",...n.split(".")],t=e.pop(),i=this.option(e.join("."));return i&&t in i}return!1},_updateFieldValue(e,t){const i=this.option("layoutData");let n=t;!g.default.isWrapped(i[e])&&(0,p.isDefined)(e)?this.option(`layoutData.${e}`,n):g.default.isWritableWrapped(i[e])&&(n=(0,p.isFunction)(n)?n():n,i[e](n)),this._triggerOnFieldDataChanged({dataField:e,value:n})},_triggerOnFieldDataChanged(e){this._createActionByOption("onFieldDataChanged")(e)},_updateItems(e){const t=this,i=this.option("items"),n=(0,p.isDefined)(i),o=t.option("customizeItem"),a=n?i:this._generateItemsByData(e);if((0,p.isDefined)(a)){const e=[];(0,c.each)(a,((i,n)=>{t._isAcceptableItem(n)&&(n=t._processItem(n),o&&o(n),(0,p.isObject)(n)&&!1!==g.default.unwrap(n.visible)&&e.push(n))})),t._itemWatchers.length&&n||t._updateItemWatchers(a),this._setItems(e),this._sortItems()}},_cleanItemWatchers(){this._itemWatchers.forEach((e=>{e()})),this._itemWatchers=[]},_updateItemWatchers(e){const t=this,i=t._getWatch();e.forEach((e=>{(0,p.isObject)(e)&&(0,p.isDefined)(e.visible)&&(0,p.isFunction)(i)&&t._itemWatchers.push(i((()=>g.default.unwrap(e.visible)),(()=>{t._updateItems(t.option("layoutData")),t.repaint()}),{skipImmediate:!0}))}))},_generateItemsByData(e){const t=[];return(0,p.isDefined)(e)&&(0,c.each)(e,(e=>{t.push({dataField:e})})),t},_isAcceptableItem(e){const t=e.dataField||e,i=this._getDataByField(t);return!((0,p.isFunction)(i)&&!g.default.isWrapped(i))},_processItem(e){if("string"==typeof e&&(e={dataField:e}),"object"!=typeof e||e.itemType||(e.itemType=b.SIMPLE_ITEM_TYPE),!(0,p.isDefined)(e.editorType)&&(0,p.isDefined)(e.dataField)){const t=this._getDataByField(e.dataField);e.editorType=(0,p.isDefined)(t)?this._getEditorTypeByDataType((0,p.type)(t)):"dxTextBox"}return"dxCheckBox"===e.editorType&&(e.allowIndeterminateState=e.allowIndeterminateState??!0),e},_getEditorTypeByDataType(e){switch(e){case"number":return"dxNumberBox";case"date":return"dxDateBox";case"boolean":return"dxCheckBox";default:return"dxTextBox"}},_sortItems(){(0,l.normalizeIndexes)(this._items,"visibleIndex"),this._sortIndexes()},_sortIndexes(){this._items.sort(((e,t)=>{const i=e.visibleIndex,n=t.visibleIndex;let o;return o=i>n?1:i<n?-1:0,o}))},_initMarkup(){this._itemsRunTimeInfo.clear(),this.$element().addClass(b.FORM_LAYOUT_MANAGER_CLASS),this.callBase(),this._renderResponsiveBox()},_renderResponsiveBox(){const e=this,t=[];if(e._items&&e._items.length){const i=e._getColCount(),n=(0,r.default)("<div>").appendTo(e.$element());e._prepareItemsWithMerging(i);const o=e._generateLayoutItems();e._responsiveBox=e._createComponent(n,f.default,e._getResponsiveBoxConfig(o,i,t)),(0,_.hasWindow)()||e._renderTemplates(t)}},_itemStateChangedHandler(e){this._refresh()},_renderTemplates(e){const t=this;let i=0;e.forEach((e=>{var t;let{item:n}=e;null!=n&&null!==(t=n.label)&&void 0!==t&&t.template&&i++})),(0,c.each)(e,((e,n)=>{switch(n.itemType){case"empty":(0,C.renderEmptyItem)(n);break;case"button":t._renderButtonItem(n);break;default:t._renderFieldItem(n,i)}}))},_getResponsiveBoxConfig(e,t,i){const n=this,o=n.option("colCountByScreen"),a=o&&o.xs;return{onItemStateChanged:this._itemStateChangedHandler.bind(this),onLayoutChanged(){const e=n.option("onLayoutChanged"),t=n.isSingleColumnMode();e&&(n.$element().toggleClass(b.LAYOUT_MANAGER_ONE_COLUMN,t),e(t))},onContentReady(e){(0,_.hasWindow)()&&n._renderTemplates(i),n.option("onLayoutChanged")&&n.$element().toggleClass(b.LAYOUT_MANAGER_ONE_COLUMN,n.isSingleColumnMode(e.component))},itemTemplate(e,o,a){if(!e.location)return;const s=(0,r.default)(a),l=e.location.row*t,d=n._items[e.location.col+l];if(!d)return;const u=[d.cssClass];s.toggleClass(b.SINGLE_COLUMN_ITEM_CONTENT,n.isSingleColumnMode(this)),0===e.location.row&&u.push("dx-first-row"),0===e.location.col&&u.push("dx-first-col"),d.itemType===b.SIMPLE_ITEM_TYPE&&n.option("isRoot")&&s.addClass(b.ROOT_SIMPLE_ITEM_CLASS);const c=e.location.col===t-1||e.location.col+e.location.colspan===t,h=n._getRowsCount(),g=e.location.row===h-1;c&&u.push("dx-last-col"),g&&u.push("dx-last-row"),"empty"!==d.itemType&&(u.push(b.FIELD_ITEM_CLASS),u.push(n.option("cssItemClass")),(0,p.isDefined)(d.col)&&u.push(`dx-col-${d.col}`)),i.push({itemType:d.itemType,item:d,$parent:s,rootElementCssClassList:u})},cols:n._generateRatio(t),rows:n._generateRatio(n._getRowsCount(),!0),dataSource:e,screenByWidth:n.option("screenByWidth"),singleColumnScreen:!a&&"xs"}},_getColCount(){let e=this.option("colCount");const t=this.option("colCountByScreen");if(t){let i=this.option("form").getTargetScreenFactor();i||(i=(0,_.hasWindow)()?(0,_.getCurrentScreenFactor)(this.option("screenByWidth")):"lg"),e=t[i]||e}if("auto"===e){if(this._cashedColCount)return this._cashedColCount;this._cashedColCount=e=this._getMaxColCount()}return e<1?1:e},_getMaxColCount(){if(!(0,_.hasWindow)())return 1;const e=this.option("minColWidth"),t=(0,h.getWidth)(this.$element()),i=this._items.length,n=Math.floor(t/e)||1;return i<n?i:n},isCachedColCountObsolete(){return this._cashedColCount&&this._getMaxColCount()!==this._cashedColCount},_prepareItemsWithMerging(e){const t=this._items.slice(0);let i,n,o,a,s=[];for(a=0;a<t.length;a++)if(i=t[a],s.push(i),(this.option("alignItemLabels")||i.alignItemLabels||i.colSpan)&&(i.col=this._getColByIndex(s.length-1,e)),i.colSpan>1&&i.col+i.colSpan<=e){for(n=[],o=0;o<i.colSpan-1;o++)n.push({merged:!0});s=s.concat(n)}else delete i.colSpan;this._setItems(s)},_getColByIndex:(e,t)=>e%t,_setItems(e){this._items=e,this._cashedColCount=null},_generateLayoutItems(){const e=this._items,t=this._getColCount(),i=[];let n,o;for(o=0;o<e.length;o++)if(n=e[o],!n.merged){const e={location:{row:parseInt(o/t),col:this._getColByIndex(o,t)}};(0,p.isDefined)(n.disabled)&&(e.disabled=n.disabled),(0,p.isDefined)(n.visible)&&(e.visible=n.visible),(0,p.isDefined)(n.colSpan)&&(e.location.colspan=n.colSpan),(0,p.isDefined)(n.rowSpan)&&(e.location.rowspan=n.rowSpan),i.push(e)}return i},_renderEmptyItem(e){(0,C.renderEmptyItem)({$container:e})},_renderButtonItem(e){let{item:t,$parent:i,rootElementCssClassList:n}=e;const{$rootElement:o,buttonInstance:a}=(0,v.renderButtonItem)({item:t,$parent:i,rootElementCssClassList:n,validationGroup:this.option("validationGroup"),createComponentCallback:this._createComponent.bind(this)});this._itemsRunTimeInfo.add({item:t,widgetInstance:a,guid:t.guid,$itemContainer:o})},_renderFieldItem(e,t){var i,n;let{item:o,$parent:a,rootElementCssClassList:s}=e;const r=this._getDataByField(o.dataField);let l=!1;if(void 0===r){const{allowIndeterminateState:e,editorType:t,dataField:i}=o;l=this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:e,editorType:t,dataField:i})}const d=o.dataField||o.name,u=this._getFormOrThis(),{$fieldEditorContainer:c,widgetInstance:h,$rootElement:p}=(0,y.renderFieldItem)((0,w.convertToRenderFieldItemOptions)({$parent:a,rootElementCssClassList:s,item:o,name:d,editorValue:r,canAssignUndefinedValueToEditor:l,formOrLayoutManager:this._getFormOrThis(),createComponentCallback:this._createComponent.bind(this),formLabelLocation:this.option("labelLocation"),requiredMessageTemplate:this.option("requiredMessage"),validationGroup:this.option("validationGroup"),editorValidationBoundary:this.option("validationBoundary"),editorStylingMode:this.option("form")&&this.option("form").option("stylingMode"),showColonAfterLabel:this.option("showColonAfterLabel"),managerLabelLocation:this.option("labelLocation"),template:o.template?this._getTemplate(o.template):null,labelTemplate:null!==(i=o.label)&&void 0!==i&&i.template?this._getTemplate(o.label.template):null,itemId:this.option("form")&&this.option("form").getItemID(d),managerMarkOptions:this._getMarkOptions(),labelMode:this.option("labelMode"),onLabelTemplateRendered:()=>{this._incTemplateRenderedCallCount(),this._shouldAlignLabelsOnTemplateRendered(u,t)&&u._alignLabels(this,this.isSingleColumnMode(u))}}));null===(n=this.option("onFieldItemRendered"))||void 0===n||n(),h&&o.dataField&&this._bindDataField(h,o.dataField,o.editorType,c),this._itemsRunTimeInfo.add({item:o,widgetInstance:h,guid:o.guid,$itemContainer:p})},_incTemplateRenderedCallCount(){this._labelTemplateRenderedCallCount=(this._labelTemplateRenderedCallCount??0)+1},_shouldAlignLabelsOnTemplateRendered(e,t){return e.option("templatesRenderAsynchronously")&&this._labelTemplateRenderedCallCount===t},_getMarkOptions(){return{showRequiredMark:this.option("showRequiredMark"),requiredMark:this.option("requiredMark"),showOptionalMark:this.option("showOptionalMark"),optionalMark:this.option("optionalMark")}},_getFormOrThis(){return this.option("form")||this},_bindDataField(e,t,i,n){const o=this._getFormOrThis();e.on("enterKey",(e=>{o._createActionByOption("onEditorEnterKey")((0,u.extend)(e,{dataField:t}))})),this._createWatcher(e,n,t),this.linkEditorToDataField(e,t,i)},_createWatcher(e,t,i){const a=this,s=a._getWatch();if(!(0,p.isFunction)(s))return;const r=s((()=>a._getDataByField(i)),(()=>{const t=a._getDataByField(i);if("dxTagBox"===e.NAME){const i=e.option("value");if(t!==i&&function(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}(t,i))return}e.option("value",t)}),{deep:!0,skipImmediate:!0},{createWatcherDataField:i});n.default.on(t,o.removeEvent,r)},_getWatch(){if(!(0,p.isDefined)(this._watch)){const e=this.option("form");this._watch=e&&e.option("integrationOptions.watchMethod")}return this._watch},_createComponent(e,t,i){const n=this.option("readOnly");let o=Object.hasOwn(i,"readOnly");const a=this.callBase(e,t,D({},i,{readOnly:o?i.readOnly:n}));let s=!1;return a.on("optionChanged",(e=>{"readOnly"!==e.name||s||(o=!0)})),this.on("optionChanged",(e=>{"readOnly"!==e.name||o||(s=!0,a.option(e.name,e.value),s=!1)})),a},_generateRatio(e,t){const i=[];let n,o;for(o=0;o<e;o++)n={ratio:1},t&&(n.baseSize="auto"),i.push(n);return i},_getRowsCount(){return Math.ceil(this._items.length/this._getColCount())},_updateReferencedOptions(e){const t=this.option("layoutData");(0,p.isObject)(t)&&Object.getOwnPropertyNames(t).forEach((e=>delete this._optionsByReference[`layoutData.${e}`])),(0,p.isObject)(e)&&Object.getOwnPropertyNames(e).forEach((e=>this._optionsByReference[`layoutData.${e}`]=!0))},_clearWidget(e){this._disableEditorValueChangedHandler=!0,e.clear(),this._disableEditorValueChangedHandler=!1,e.option("isValid",!0)},_optionChanged(e){if(0!==e.fullName.search("layoutData."))switch(e.name){case"showRequiredMark":case"showOptionalMark":case"requiredMark":case"optionalMark":this._cashedRequiredConfig=null,this._invalidate();break;case"layoutData":this._updateReferencedOptions(e.value),this.option("items")?(0,p.isEmptyObject)(e.value)||this._itemsRunTimeInfo.each(((t,i)=>{if((0,p.isDefined)(i.item)){const{dataField:t}=i.item;if(t&&(0,p.isDefined)(i.widgetInstance)){const n=(0,d.compileGetter)(t)(e.value),{allowIndeterminateState:o,editorType:a}=i.item;void 0!==n||this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:o,editorType:a,dataField:t})?i.widgetInstance.option("value",n):this._clearWidget(i.widgetInstance)}}})):(this._initDataAndItems(e.value),this._invalidate());break;case"items":this._cleanItemWatchers(),this._initDataAndItems(e.value),this._invalidate();break;case"alignItemLabels":case"labelLocation":case"labelMode":case"requiredMessage":this._invalidate();break;case"customizeItem":this._updateItems(this.option("layoutData")),this._invalidate();break;case"colCount":case"colCountByScreen":this._resetColCount();break;case"minColWidth":"auto"===this.option("colCount")&&this._resetColCount();break;case"readOnly":case"onFieldDataChanged":break;case"width":this.callBase(e),"auto"===this.option("colCount")&&this._resetColCount();break;default:this.callBase(e)}},_resetColCount(){this._cashedColCount=null,this._invalidate()},linkEditorToDataField(e,t){this.on("optionChanged",(i=>{i.fullName===`layoutData.${t}`&&e._setOptionWithoutOptionChange("value",i.value)})),e.on("valueChanged",(e=>{const i=(0,p.isObject)(e.value)||Array.isArray(e.value);this._disableEditorValueChangedHandler||i&&e.value===e.previousValue||this._updateFieldValue(t,e.value)}))},_dimensionChanged(){"auto"===this.option("colCount")&&this.isCachedColCountObsolete()&&this._eventsStrategy.fireEvent("autoColCountChanged")},updateData(e,t){const i=this;(0,p.isObject)(e)?(0,c.each)(e,((e,t)=>{i._updateFieldValue(e,t)})):"string"==typeof e&&i._updateFieldValue(e,t)},getEditor(e){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(e)||this._itemsRunTimeInfo.findWidgetInstanceByName(e)},isSingleColumnMode(e){const t=this._responsiveBox||e;if(t)return t.option("currentScreenFactor")===t.option("singleColumnScreen")},getItemsRunTimeInfo(){return this._itemsRunTimeInfo}});(0,s.default)("dxLayoutManager",I);t.default=I},44551:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.EDITORS_WITHOUT_LABELS=void 0,t.convertToLabelMarkOptions=p,t.convertToRenderFieldItemOptions=function(e){let{$parent:t,rootElementCssClassList:i,formOrLayoutManager:n,createComponentCallback:g,item:_,template:f,labelTemplate:m,name:v,formLabelLocation:C,requiredMessageTemplate:y,validationGroup:b,editorValue:x,canAssignUndefinedValueToEditor:w,editorValidationBoundary:S,editorStylingMode:D,showColonAfterLabel:I,managerLabelLocation:E,itemId:T,managerMarkOptions:A,labelMode:O,onLabelTemplateRendered:P}=e;const k=(0,l.isDefined)(_.isRequired)?_.isRequired:!!function(e){let t;e&&e.length&&(0,r.each)(e,((e,i)=>{if("required"===i.type)return t=!0,!1}));return t}(_.validationRules),M=_.itemType===d.SIMPLE_ITEM_TYPE,R=_.helpText?`dx-${new o.default}`:null,L=function(e){let{item:t,id:i,isRequired:n,managerMarkOptions:r,showColonAfterLabel:l,labelLocation:d,labelTemplate:u,formLabelMode:c,onLabelTemplateRendered:g}=e;const _=h.includes(t.editorType),f=(0,a.extend)({showColon:l,location:d,id:i,visible:"outside"===c||_&&"hidden"!==c,isRequired:n},t?t.label:{},{markOptions:p(r,n),labelTemplate:u,onLabelTemplateRendered:g});["dxRadioGroup","dxCheckBox","dxLookup","dxSlider","dxRangeSlider","dxSwitch","dxHtmlEditor","dxDateRangeBox"].includes(t.editorType)&&(f.labelID=`dx-label-${new o.default}`);!f.text&&t.dataField&&(f.text=(0,s.captionize)(t.dataField));f.text&&(f.textWithoutColon=f.text,f.text+=f.showColon?":":"");return f}({item:_,id:T,isRequired:k,managerMarkOptions:A,showColonAfterLabel:I,labelLocation:E,formLabelMode:O,labelTemplate:m,onLabelTemplateRendered:P}),B=L.visible&&(L.text||L.labelTemplate&&M),{location:V,labelID:F}=L,H="top"!==V&&["dxTextArea","dxRadioGroup","dxCalendar","dxHtmlEditor"].includes(_.editorType),N=function(e){let{editorType:t,defaultEditorName:i,editorValue:n,canAssignUndefinedValueToEditor:o,externalEditorOptions:s,editorInputId:r,editorValidationBoundary:d,editorStylingMode:h,formLabelMode:p,labelText:g,labelMark:_}=e;const f={};(void 0!==n||o)&&(f.value=n);u.includes(t)&&(f.value=f.value||[]);let m=null==s?void 0:s.labelMode;(0,l.isDefined)(m)||(m="outside"===p?"hidden":p);const v=(null==s?void 0:s.stylingMode)||h,C=c.includes(t),y=(0,a.extend)(!0,f,s,{inputAttr:{id:r},validationBoundary:d,stylingMode:v,label:C?null==s?void 0:s.label:g,labelMode:m,labelMark:_});s&&(y.dataSource&&(y.dataSource=s.dataSource),y.items&&(y.items=s.items));i&&!y.name&&(y.name=i);return y}({editorType:_.editorType,editorValue:x,defaultEditorName:_.dataField,canAssignUndefinedValueToEditor:w,externalEditorOptions:_.editorOptions,editorInputId:T,editorValidationBoundary:S,editorStylingMode:D,formLabelMode:O,labelText:L.textWithoutColon,labelMark:L.markOptions.showRequiredMark?String.fromCharCode(160)+L.markOptions.requiredMark:""}),z=!L.markOptions.showOptionalMark||L.visible||"hidden"===N.labelMode||(0,l.isDefined)(_.helpText)?_.helpText:L.markOptions.optionalMark;return{$parent:t,rootElementCssClassList:i,formOrLayoutManager:n,createComponentCallback:g,labelOptions:L,labelNeedBaselineAlign:H,labelLocation:V,needRenderLabel:B,item:_,isSimpleItem:M,isRequired:k,template:f,helpID:R,labelID:F,name:v,helpText:z,formLabelLocation:C,requiredMessageTemplate:y,validationGroup:b,editorOptions:N}},t.getLabelMarkText=function(e){let{showRequiredMark:t,requiredMark:i,showOptionalMark:n,optionalMark:o}=e;if(!t&&!n)return"";return String.fromCharCode(160)+(t?i:o)};var n,o=(n=i(19427))&&n.__esModule?n:{default:n},a=i(52576),s=i(53124),r=i(21274),l=i(11528),d=i(96891);const u=["dxTagBox","dxRangeSlider","dxDateRangeBox"],c=["dxRangeSlider","dxSlider"],h=t.EDITORS_WITHOUT_LABELS=["dxCalendar","dxCheckBox","dxHtmlEditor","dxRadioGroup","dxRangeSlider","dxSlider","dxSwitch"];function p(e,t){let{showRequiredMark:i,requiredMark:n,showOptionalMark:o,optionalMark:a}=e;return{showRequiredMark:i&&t,requiredMark:n,showOptionalMark:o&&!t,optionalMark:a}}},7165:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.concatPaths=void 0,t.convertToLayoutManagerOptions=function(e){let{form:t,$formElement:i,formOptions:o,items:a,validationGroup:s,extendedLayoutManagerOptions:r,onFieldDataChanged:l,onContentReady:d,onDisposing:u,onFieldItemRendered:c}=e;const h={form:t,items:a,$formElement:i,validationGroup:s,onFieldDataChanged:l,onContentReady:d,onDisposing:u,onFieldItemRendered:c,validationBoundary:o.scrollingEnabled?i:void 0,scrollingEnabled:o.scrollingEnabled,showRequiredMark:o.showRequiredMark,showOptionalMark:o.showOptionalMark,requiredMark:o.requiredMark,optionalMark:o.optionalMark,requiredMessage:o.requiredMessage,screenByWidth:o.screenByWidth,layoutData:o.formData,labelLocation:o.labelLocation,customizeItem:o.customizeItem,minColWidth:o.minColWidth,showColonAfterLabel:o.showColonAfterLabel,onEditorEnterKey:o.onEditorEnterKey,labelMode:o.labelMode};return(0,n.extend)(h,{isRoot:r.isRoot,colCount:r.colCount,alignItemLabels:r.alignItemLabels,cssItemClass:r.cssItemClass,colCountByScreen:r.colCountByScreen,onLayoutChanged:r.onLayoutChanged,width:r.width})},t.tryGetTabPath=t.isFullPathContainsTabs=t.isEqualToDataFieldOrNameOrTitleOrCaption=t.getTextWithoutSpaces=t.getOptionNameFromFullName=t.getItemPath=t.getFullOptionName=t.createItemPathByIndex=void 0;var n=i(52576),o=i(11528);const a=(e,t)=>`${t?"tabs":"items"}[${e}]`;t.createItemPathByIndex=a;const s=(e,t)=>(0,o.isDefined)(e)&&(0,o.isDefined)(t)?`${e}.${t}`:e||t;t.concatPaths=s;const r=e=>e?e.replace(/\s/g,""):void 0;t.getTextWithoutSpaces=r;t.isEqualToDataFieldOrNameOrTitleOrCaption=(e,t)=>!!e&&(e.dataField===t||e.name===t||r(e.title)===t||"group"===e.itemType&&r(e.caption)===t);t.getFullOptionName=(e,t)=>`${e}.${t}`;t.getOptionNameFromFullName=e=>{const t=e.split(".");return t[t.length-1].replace(/\[\d+]/,"")};t.tryGetTabPath=e=>{const t=e.split("."),i=[...t];for(let e=t.length-1;e>=0;e--){if(l(t[e]))return i.join(".");i.splice(e,1)}return""};const l=e=>e.indexOf("tabs")>-1;t.isFullPathContainsTabs=l;const d=(e,t,i)=>{const n=e.indexOf(t);if(n>-1)return a(n,i);for(let n=0;n<e.length;n++){const o=e[n],r=o.tabs||o.items;if(r){const e=d(r,t,o.tabs);if(e)return s(a(n,i),e)}}};t.getItemPath=d},69340:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=g(i(30771)),o=g(i(66177)),a=g(i(55620)),s=i(17781),r=i(52576),l=i(21274),d=i(11528),u=g(i(20780)),c=g(i(35185)),h=g(i(44690)),p=g(i(6267));function g(e){return e&&e.__esModule?e:{default:e}}const _="expanded",f="selected";h.default.setEditorClass(u.default);const m=a.default.inherit({ctor(e){this.options={},(0,r.extend)(this.options,this._defaultOptions(),e),this.options.dataConverter.setDataAccessors(this.options.dataAccessors),this._selectedNodesKeys=[],this._expandedNodesKeys=[],this._dataStructure=[],this._createInternalDataStructure(),this.getTreeNodes()},setOption(e,t){this.options[e]=t,"recursiveSelection"===e&&this._updateSelection()},_defaultOptions:()=>({dataAccessors:void 0,items:[],multipleSelection:!0,recursiveSelection:!1,recursiveExpansion:!1,rootValue:0,searchValue:"",dataType:"tree",searchMode:"contains",dataConverter:new p.default,onNodeChanged:s.noop,sort:null}),_createInternalDataStructure(){this._initialDataStructure=this.options.dataConverter.createPlainStructure(this.options.items,this.options.rootValue,this.options.dataType),this._dataStructure=this.options.searchValue.length?this.search(this.options.searchValue):this._initialDataStructure,this.options.dataConverter._dataStructure=this._dataStructure,this._updateSelection(),this._updateExpansion()},_updateSelection(){this.options.recursiveSelection&&(this._setChildrenSelection(),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(f)},_updateExpansion(e){this.options.recursiveExpansion&&(e?this._updateOneBranch(e):this._setParentExpansion()),this._expandedNodesKeys=this._updateNodesKeysArray(_)},_updateNodesKeysArray(e){const t=this;let i=[];return(0,l.each)(t._getDataBySelectionMode(),((n,o)=>{t._isNodeVisible(o)&&o.internalFields[e]&&(e===_||t.options.multipleSelection?i.push(o.internalFields.key):(i.length&&t.toggleSelection(i[0],!1,!0),i=[o.internalFields.key]))})),i},_getDataBySelectionMode(){return this.options.multipleSelection?this.getData():this.getFullData()},_isNodeVisible:e=>!1!==e.internalFields.item.visible,_getByKey(e,t){return e===this._dataStructure?this.options.dataConverter._getByKey(t):this.options.dataConverter.getByKey(e,t)},_setChildrenSelection(){const e=this;(0,l.each)(this._dataStructure,((t,i)=>{if(!i.internalFields.childrenKeys.length)return;const n=i.internalFields.selected;!0===n&&e._toggleChildrenSelection(i,n)}))},_setParentSelection(){const e=this;(0,l.each)(this._dataStructure,((t,i)=>{e.options.dataConverter.getParentNode(i)&&i.internalFields.parentKey!==e.options.rootValue&&e._iterateParents(i,(t=>{const i=e._calculateSelectedState(t);e._setFieldState(t,f,i)}))}))},_setParentExpansion(){const e=this;(0,l.each)(this._dataStructure,((t,i)=>{i.internalFields.expanded&&e._updateOneBranch(i.internalFields.key)}))},_updateOneBranch(e){const t=this,i=this.getNodeByKey(e);t._iterateParents(i,(e=>{t._setFieldState(e,_,!0)}))},_iterateChildren(e,t,i,n){if(!(0,d.isFunction)(i))return;const o=this,a=e.internalFields.key;-1===(n=n||[]).indexOf(a)&&(n.push(a),(0,l.each)(e.internalFields.childrenKeys,((e,a)=>{const s=o.getNodeByKey(a);i(s),s.internalFields.childrenKeys.length&&t&&o._iterateChildren(s,t,i,n)})))},_iterateParents(e,t,i){if(e.internalFields.parentKey===this.options.rootValue||!(0,d.isFunction)(t))return;i=i||[];const{key:n}=e.internalFields;if(-1===i.indexOf(n)){i.push(n);const o=this.options.dataConverter.getParentNode(e);o&&(t(o),o.internalFields.parentKey!==this.options.rootValue&&this._iterateParents(o,t,i))}},_calculateSelectedState(e){const t=e.internalFields.childrenKeys.length;let i=0,n=0,o=!1;for(let o=0;o<=t-1;o++){const t=this.getNodeByKey(e.internalFields.childrenKeys[o]),a=!1===t.internalFields.item.visible,s=t.internalFields.selected;a?n++:s?i++:void 0===s&&(i+=.5)}return i&&(o=i===t-n||void 0),o},_toggleChildrenSelection(e,t){const i=this;this._iterateChildren(e,!0,(e=>{i._isNodeVisible(e)&&i._setFieldState(e,f,t)}))},_setFieldState(e,t,i){e.internalFields[t]!==i&&(e.internalFields[t]=i,e.internalFields.publicNode&&(e.internalFields.publicNode[t]=i),this.options.dataAccessors.setters[t](e.internalFields.item,i),this.options.onNodeChanged(e))},_markChildren(e){const t=this;(0,l.each)(e,((e,i)=>{const n=t.getIndexByKey(i),o=t.getNodeByKey(i);t._dataStructure[n]=0,o.internalFields.childrenKeys.length&&t._markChildren(o.internalFields.childrenKeys)}))},_removeNode(e){const t=this.getNodeByKey(e);this._dataStructure[this.getIndexByKey(e)]=0,this._markChildren(t.internalFields.childrenKeys);const i=this;let n=0;const o=(0,r.extend)([],this._dataStructure);(0,l.each)(o,((e,t)=>{t||(i._dataStructure.splice(e-n,1),n++)}))},_addNode(e){const{dataConverter:t}=this.options,i=t._convertItemToNode(e,this.options.dataAccessors.getters.parentKey(e));this._dataStructure=this._dataStructure.concat(i),this._initialDataStructure=this._initialDataStructure.concat(i),t._dataStructure=t._dataStructure.concat(i)},_updateFields(){this.options.dataConverter.updateChildrenKeys(),this._updateSelection(),this._updateExpansion()},getSelectedNodesKeys(){return this._selectedNodesKeys},getExpandedNodesKeys(){return this._expandedNodesKeys},getData(){return this._dataStructure},getFullData(){return this._initialDataStructure},getNodeByItem(e){let t=null;return(0,l.each)(this._dataStructure,((i,n)=>{if(n.internalFields.item===e)return t=n,!1})),t},getNodesByItems(e){const t=this,i=[];return(0,l.each)(e,((e,n)=>{const o=t.getNodeByItem(n);o&&i.push(o)})),i},getNodeByKey(e,t){return this._getByKey(t||this._getDataBySelectionMode(),e)},getTreeNodes(){return this.options.dataConverter.convertToPublicNodes(this.getRootNodes())},getItemsCount(){return this.options.dataConverter.getItemsCount()},getVisibleItemsCount(){return this.options.dataConverter.getVisibleItemsCount()},getPublicNode:e=>e.internalFields.publicNode,getRootNodes(){return this.getChildrenNodes(this.options.rootValue)},getChildrenNodes(e){return(0,n.default)(this._dataStructure,{langParams:this.options.langParams}).filter(["internalFields.parentKey",e]).toArray()},getIndexByKey(e){return this.options.dataConverter.getIndexByKey(e)},addItem(e){this._addNode(e),this._updateFields()},removeItem(e){this._removeNode(e),this._updateFields()},toggleSelection(e,t,i){const n=this._isSingleModeUnselect(t),o=this._getByKey(i||n?this._initialDataStructure:this._dataStructure,e);this._setFieldState(o,f,t),this.options.recursiveSelection&&!i&&(t?this._setChildrenSelection():this._toggleChildrenSelection(o,t),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(f)},_isSingleModeUnselect(e){return!this.options.multipleSelection&&!e},toggleNodeDisabledState(e,t){const i=this.getNodeByKey(e);this._setFieldState(i,"disabled",t)},toggleSelectAll(e){if(!(0,d.isDefined)(e))return;const t=this,i=t._selectedNodesKeys[t._selectedNodesKeys.length-1],n=t._isSingleModeUnselect(e)?this._initialDataStructure:this._dataStructure;(0,l.each)(n,((i,n)=>{t._isNodeVisible(n)&&t._setFieldState(n,f,e)})),t._selectedNodesKeys=t._updateNodesKeysArray(f),!e&&t.options.selectionRequired&&t.toggleSelection(i,!0)},isAllSelected(){return!!this.getSelectedNodesKeys().length&&(this.getSelectedNodesKeys().length===this.getVisibleItemsCount()||void 0)},toggleExpansion(e,t){const i=this.getNodeByKey(e);this._setFieldState(i,_,t),t&&this._updateExpansion(e),this._expandedNodesKeys=this._updateNodesKeysArray(_)},isFiltered(e){return!this.options.searchValue.length||!!this._filterDataStructure(this.options.searchValue,[e]).length},_createCriteria(e,t,i){const n=[];return Array.isArray(e)?((0,l.each)(e,((e,o)=>{n.push([o,i,t],"or")})),n.pop(),n):[e,i,t]},_filterDataStructure(e,t){const i=this.options.searchExpr||this.options.dataAccessors.getters.display,o=h.default.getOperationBySearchMode(this.options.searchMode),a=this._createCriteria(i,e,o);return t=t||this._initialDataStructure,(0,n.default)(t,{langParams:this.options.langParams}).filter(a).toArray()},search(e){const t=this;let i=this._filterDataStructure(e);const{dataConverter:a}=this.options;return function e(i,n){const{length:o}=i;for(;n<o;){const o=i[n];if(o.internalFields.parentKey===t.options.rootValue){n++;continue}const s=a.getParentNode(o);s?(s.internalFields.expanded||t._setFieldState(s,_,!0),i.includes(s)?n++:(i.splice(n,0,s),e(i,n))):(c.default.log("W1007",o.internalFields.parentKey,o.internalFields.key),n++)}}(i,0),this.options.sort&&(i=o.default.queryByOptions((0,n.default)(i),{sort:this.options.sort,langParams:this.options.langParams}).toArray()),a._indexByKey={},(0,l.each)(i,((e,t)=>{t.internalFields.childrenKeys=[],a._indexByKey[t.internalFields.key]=e})),a._dataStructure=i,a.setChildrenKeys(),a._dataStructure}});t.default=m},6267:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(55620)),o=i(52576),a=i(21274),s=i(11528),r=l(i(35185));function l(e){return e&&e.__esModule?e:{default:e}}const d=n.default.inherit({ctor(){this._dataStructure=[],this._itemsCount=0,this._visibleItemsCount=0},_indexByKey:{},_convertItemsToNodes(e,t){const i=this;(0,a.each)(e,((e,n)=>{const o=(0,s.isDefined)(t)?t:i._getParentId(n),a=i._convertItemToNode(n,o);i._dataStructure.push(a),i._checkForDuplicateId(a.internalFields.key),i._indexByKey[a.internalFields.key]=i._dataStructure.length-1,i._itemHasChildren(n)&&i._convertItemsToNodes(i._dataAccessors.getters.items(n),a.internalFields.key)}))},_checkForDuplicateId(e){if((0,s.isDefined)(this._indexByKey[e]))throw r.default.Error("E1040",e)},_getParentId(e){return"plain"===this._dataType?this._dataAccessors.getters.parentKey(e):void 0},_itemHasChildren(e){if("plain"===this._dataType)return;const t=this._dataAccessors.getters.items(e);return t&&t.length},_getUniqueKey(e){const t=this._dataAccessors.getters.key,i=t(e);return t&&(i||0===i)&&(0,s.isPrimitive)(i)?i:this.getItemsCount()},_convertItemToNode(e,t){this._itemsCount++,!1!==e.visible&&this._visibleItemsCount++;const i=this,n={internalFields:{disabled:i._dataAccessors.getters.disabled(e,{defaultValue:!1}),expanded:i._dataAccessors.getters.expanded(e,{defaultValue:!1}),selected:i._dataAccessors.getters.selected(e,{defaultValue:!1}),key:i._getUniqueKey(e),parentKey:(0,s.isDefined)(t)?t:i._rootValue,item:i._makeObjectFromPrimitive(e),childrenKeys:[]}};return(0,o.extend)(n,e),delete n.items,n},setChildrenKeys(){const e=this;(0,a.each)(this._dataStructure,((t,i)=>{if(i.internalFields.parentKey===e._rootValue)return;const n=e.getParentNode(i);n&&n.internalFields.childrenKeys.push(i.internalFields.key)}))},_makeObjectFromPrimitive(e){if((0,s.isPrimitive)(e)){const t=e;e={},this._dataAccessors.setters.key(e,t)}return e},_convertToPublicNode(e,t){if(!e)return null;const i={text:this._dataAccessors.getters.display(e),key:e.internalFields.key,selected:e.internalFields.selected,expanded:e.internalFields.expanded,disabled:e.internalFields.disabled,parent:t||null,itemData:e.internalFields.item,children:[],items:[]};return i.parent&&(i.parent.children.push(i),i.parent.items.push(i)),i},convertToPublicNodes(e,t){if(!e.length)return[];const i=this,n=[];return(0,a.each)(e,((e,o)=>{o=(0,s.isPrimitive)(o)?i._getByKey(o):o;const a=i._convertToPublicNode(o,t);a.children=i.convertToPublicNodes(o.internalFields.childrenKeys,a),n.push(a),o.internalFields.publicNode=a})),n},setDataAccessors(e){this._dataAccessors=e},_getByKey(e){return this._dataStructure[this.getIndexByKey(e)]||null},getParentNode(e){return this._getByKey(e.internalFields.parentKey)},getByKey(e,t){if(null==t)return null;let i=null;const n=this;return function(e,t){return(0,a.each)(e,((e,o)=>{if((o.internalFields&&o.internalFields.key||n._dataAccessors.getters.key(o)).toString()===t.toString())return i=o,!1})),i}(e,t)},getItemsCount(){return this._itemsCount},getVisibleItemsCount(){return this._visibleItemsCount},updateIndexByKey(){const e=this;this._indexByKey={},(0,a.each)(this._dataStructure,((t,i)=>{e._checkForDuplicateId(i.internalFields.key),e._indexByKey[i.internalFields.key]=t}))},updateChildrenKeys(){this._indexByKey={},this.removeChildrenKeys(),this.updateIndexByKey(),this.setChildrenKeys()},removeChildrenKeys(){this._indexByKey={},(0,a.each)(this._dataStructure,((e,t)=>{t.internalFields.childrenKeys=[]}))},getIndexByKey(e){return this._indexByKey[e]},createPlainStructure(e,t,i){return this._itemsCount=0,this._visibleItemsCount=0,this._rootValue=t,this._dataType=i,this._indexByKey={},this._convertItemsToNodes(e),this.setChildrenKeys(),this._dataStructure}});t.default=d},16383:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=g(i(65951)),o=g(i(64553)),a=i(27286),s=i(17781),r=i(31e3),l=i(52576),d=i(69629),u=i(21274),c=i(11528),h=g(i(7607)),p=g(i(69340));function g(e){return e&&e.__esModule?e:{default:e}}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_.apply(null,arguments)}const f=h.default.inherit({_getDefaultOptions(){return(0,l.extend)(this.callBase(),{keyExpr:"id",displayExpr:"text",selectedExpr:"selected",disabledExpr:"disabled",itemsExpr:"items",hoverStateEnabled:!0,parentIdExpr:"parentId",expandedExpr:"expanded"})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===n.default.real().deviceType&&!n.default.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this._initAccessors(),this._initDataAdapter(),this._initDynamicTemplates()},_initDataSource(){this.callBase(),this._dataSource&&this._dataSource.paginate(!1)},_initDataAdapter(){const e=this._createDataAdapterAccessors();this._dataAdapter=new p.default((0,l.extend)({dataAccessors:{getters:e.getters,setters:e.setters},items:this.option("items")},this._getDataAdapterOptions()))},_getDataAdapterOptions:s.noop,_getItemExtraPropNames:s.noop,_initDynamicTemplates(){const e=["text","html","items","icon"].concat(this._getItemExtraPropNames());this._templateManager.addDefaultTemplates({item:new a.BindableTemplate(this._addContent.bind(this),e,this.option("integrationOptions.watchMethod"),{text:this._displayGetter,items:this._itemsGetter})})},_addContent(e,t){e.html(t.html).append(this._getIconContainer(t)).append(this._getTextContainer(t))},_getLinkContainer(e,t,i){let{linkAttr:n,url:a}=i;const s=(0,c.isObject)(n)?n:{};return(0,o.default)("<a>").addClass("dx-item-url").attr(_({},s,{href:a})).append(e).append(t)},_getIconContainer(e){if(!e.icon)return;const t=(0,d.getImageContainer)(e.icon);if(t.is("img")){const e=this.NAME.startsWith("dxPrivateComponent")?"":`${this.NAME} `;t.attr("alt",`${e}item icon`)}return t},_getTextContainer:e=>(0,o.default)("<span>").text(e.text),_initAccessors(){const e=this;(0,u.each)(this._getAccessors(),((t,i)=>{e._compileAccessor(i)})),this._compileDisplayGetter()},_getAccessors:()=>["key","selected","items","disabled","parentId","expanded"],_getChildNodes(e){const t=this,i=[];return(0,u.each)(e.internalFields.childrenKeys,((e,n)=>{const o=t._dataAdapter.getNodeByKey(n);i.push(o)})),i},_hasChildren:e=>e&&e.internalFields.childrenKeys.length,_compileAccessor(e){const t=`_${e}Getter`,i=`_${e}Setter`,n=this.option(`${e}Expr`);return n?(0,c.isFunction)(n)?(this[i]=function(e,t){e[n()]=t},void(this[t]=function(e){return e[n()]})):(this[t]=(0,r.compileGetter)(n),void(this[i]=(0,r.compileSetter)(n))):(this[t]=s.noop,void(this[i]=s.noop))},_createDataAdapterAccessors(){const e=this,t={getters:{},setters:{}};return(0,u.each)(this._getAccessors(),((i,n)=>{const o=`_${n}Getter`,a=`_${n}Setter`,s="parentId"===n?"parentKey":n;t.getters[s]=e[o],t.setters[s]=e[a]})),t.getters.display=this._displayGetter?this._displayGetter:e=>e.text,t},_initMarkup(){this.callBase(),this._addWidgetClass()},_addWidgetClass(){this._focusTarget().addClass(this._widgetClass())},_widgetClass:s.noop,_renderItemFrame(e,t){const i=this.callBase.apply(this,arguments);return i.toggleClass("dx-state-disabled",!!this._disabledGetter(t)),i},_optionChanged(e){switch(e.name){case"displayExpr":case"keyExpr":this._initAccessors(),this._initDynamicTemplates(),this.repaint();break;case"itemsExpr":case"selectedExpr":case"disabledExpr":case"expandedExpr":case"parentIdExpr":this._initAccessors(),this._initDataAdapter(),this.repaint();break;case"items":this._initDataAdapter(),this.callBase(e);break;default:this.callBase(e)}}});t.default=f},76035:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(16723))&&n.__esModule?n:{default:n};class a{setQuillInstance(e){this.quillInstance=e}toHtml(){if(this.quillInstance)return this._isQuillEmpty()?"":this.quillInstance.getSemanticHTML(0,this.quillInstance.getLength()+1)}_isQuillEmpty(){const e=this.quillInstance.getContents();return 1===e.length()&&this._isDeltaEmpty(e)}_isDeltaEmpty(e){return e.reduce(((e,t)=>{let{insert:i}=t;return-1!==i.indexOf("\n")}))}}o.default.addConverter("delta",a);t.default=a},58281:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(40765))&&n.__esModule?n:{default:n};let a={};o.default&&(a=o.default.import("attributors/style/align"),a.whitelist.push("left"));t.default=a},45535:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(40765))&&n.__esModule?n:{default:n};let a={};o.default&&(a=o.default.import("attributors/style/font"),a.whitelist=null);t.default=a},93805:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(11528),a=(n=i(40765))&&n.__esModule?n:{default:n};let s={};if(a.default){const e=a.default.import("formats/image");s=class extends e{static create(e){const t=e&&e.src||e,i=super.create(t);if((0,o.isObject)(e)){const t=(t,n)=>{e[t]&&i.setAttribute(t,n)};t("alt",e.alt),t("width",e.width),t("height",e.height)}return i}static formats(e){const t=super.formats(e);return t.imageSrc=e.getAttribute("src"),t}formats(){const e=super.formats(),t=this.domNode.style.float;return t&&(e.float=t),e}format(e,t){"float"===e?this.domNode.style[e]=t:super.format(e,t)}static value(e){return{src:e.getAttribute("src"),width:e.getAttribute("width"),height:e.getAttribute("height"),alt:e.getAttribute("alt")}}},s.blotName="extendedImage"}t.default=s},93794:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(11528),a=(n=i(40765))&&n.__esModule?n:{default:n};let s={};if(a.default){const e=a.default.import("formats/link");s=class t extends e{static create(e){const t=(null==e?void 0:e.href)??e,i=super.create(t);return(0,o.isObject)(e)&&(e.text&&(i.innerText=e.text),e.target||i.removeAttribute("target")),i}static formats(e){return{href:e.getAttribute("href"),target:e.getAttribute("target")}}formats(){const e=super.formats(),{href:i,target:n}=t.formats(this.domNode);return e.link=i,e.target=n,e}format(e,t){"link"===e&&(0,o.isObject)(t)?(t.text&&(this.domNode.innerText=t.text),t.target?this.domNode.setAttribute("target","_blank"):this.domNode.removeAttribute("target"),this.domNode.setAttribute("href",t.href)):super.format(e,t)}static value(e){return{href:e.getAttribute("href"),text:e.innerText,target:!!e.getAttribute("target")}}}}t.default=s},11278:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(64553)),o=s(i(40765)),a=s(i(28552));function s(e){return e&&e.__esModule?e:{default:e}}let r={};if(o.default){const e=o.default.import("blots/embed"),t="dx-mention";r=class t extends e{constructor(e,i){super(e,i),this.renderContent(this.contentNode,t.value(i))}static create(e){const t=super.create();return t.setAttribute("spellcheck",!1),t.dataset.marker=e.marker,t.dataset.mentionValue=e.value,t.dataset.id=e.id,t}static value(e){return{marker:e.dataset.marker,id:e.dataset.id,value:e.dataset.mentionValue}}renderContent(e,i){const n=t._templatesStorage.get({editorKey:i.keyInTemplateStorage,marker:i.marker});n?n.render({model:i,container:e}):this.baseContentRender(e,i)}baseContentRender(e,t){const i=(0,n.default)("<span>").text(t.marker);(0,n.default)(e).append(i).append(t.value)}static addTemplate(e,t){this._templatesStorage.set(e,t)}static removeTemplate(e){this._templatesStorage.delete(e)}},r.blotName="mention",r.tagName="span",r.className=t,r._templatesStorage=new a.default}t.default=r},51371:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(40765))&&n.__esModule?n:{default:n};let a={};o.default&&(a=o.default.import("attributors/style/size"),a.whitelist=null);t.default=a},90894:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(17781),a=i(52576),s=(n=i(40765))&&n.__esModule?n:{default:n};let r={};if(s.default){const e=s.default.import("blots/embed"),t="dx-variable";r=class extends e{static create(e){const t=super.create();let i,n;const a=e.value;return Array.isArray(e.escapeChar)?(i=(0,o.ensureDefined)(e.escapeChar[0],""),n=(0,o.ensureDefined)(e.escapeChar[1],"")):i=n=e.escapeChar,t.innerText=i+a+n,t.dataset.varStartEscChar=i,t.dataset.varEndEscChar=n,t.dataset.varValue=e.value,t}static value(e){return(0,a.extend)({},{value:e.dataset.varValue,escapeChar:[e.dataset.varStartEscChar||"",e.dataset.varEndEscChar||""]})}},r.blotName="variable",r.tagName="span",r.className=t}t.default=r},16723:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=new class{constructor(){this._converters={},this._converters={}}addConverter(e,t){this._converters[e]=t}getConverter(e){return this._converters[e]}};t.default=i},44300:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(76035);var n=i(52391),o=I(i(92774)),a=I(i(86548)),s=I(i(89797)),r=i(98834),l=I(i(92848)),d=I(i(66636)),u=I(i(65951)),c=i(61404),h=I(i(64553)),p=i(48650),g=I(i(84718)),_=i(17781),f=i(87739),m=i(52576),v=i(11528),C=I(i(78694)),y=i(81569),b=I(i(16723)),x=i(58283),w=I(i(80609)),S=I(i(23102)),D=I(i(41510));function I(e){return e&&e.__esModule?e:{default:e}}function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},E.apply(null,arguments)}const T="htmlContent",A="ios"===u.default.current().platform;let O=0;const P=C.default.inherit({_getDefaultOptions(){return(0,m.extend)(this.callBase(),{focusStateEnabled:!0,placeholder:"",toolbar:null,variables:null,mediaResizing:null,tableResizing:null,mentions:null,customizeModules:null,tableContextMenu:null,allowSoftLineBreak:!1,formDialogOptions:null,imageUpload:null,stylingMode:(0,d.default)().editorStylingMode||"outlined",converter:null})},_init(){this._mentionKeyInTemplateStorage=O++,this.callBase(),this._cleanCallback=(0,g.default)(),this._contentInitializedCallback=(0,g.default)(),this._prepareHtmlConverter()},_prepareHtmlConverter(){const{converter:e}=this.option();e&&(this._htmlConverter=e)},_getAnonymousTemplateName:()=>T,_initTemplates(){this._templateManager.addDefaultTemplates({[T]:new p.EmptyTemplate}),this.callBase()},_focusTarget(){return this._getContent()},_getContent(){return this.$element().find(".dx-htmleditor-content")},_focusInHandler(e){let{relatedTarget:t}=e;this._shouldSkipFocusEvent(t)||(this._toggleFocusClass(!0,this.$element()),this.callBase.apply(this,arguments))},_focusOutHandler(e){let{relatedTarget:t}=e;this._shouldSkipFocusEvent(t)||(this._toggleFocusClass(!1,this.$element()),this.callBase.apply(this,arguments))},_shouldSkipFocusEvent:e=>(0,h.default)(e).hasClass("ql-clipboard"),_initMarkup(){this._$htmlContainer=(0,h.default)("<div>").addClass("dx-quill-container"),this.$element().attr("role","application").addClass("dx-htmleditor").wrapInner(this._$htmlContainer),this._renderStylingMode();const e=this._getTemplate(T);this._$templateResult=e&&e.render({container:(0,c.getPublicElement)(this._$htmlContainer),noModel:!0,transclude:!0}),this._renderSubmitElement(),this.callBase(),this._updateContainerMarkup()},_renderValidationState(){1===this._getContent().length&&this.callBase()},_renderSubmitElement(){this._$submitElement=(0,h.default)("<textarea>").addClass("dx-htmleditor-submit-element").attr("hidden",!0).appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue(e){this._getSubmitElement().val(e)},_getSubmitElement(){return this._$submitElement},_createNoScriptFrame:()=>(0,h.default)("<iframe>").css("display","none").attr({srcdoc:"",id:"xss-frame",sandbox:"allow-same-origin"}),_removeXSSVulnerableHtml(e){const t=this._createNoScriptFrame().appendTo("body"),i=t.get(0).contentWindow.document.body,n=(0,x.getQuill)().replaceStyleAttribute(e);i.innerHTML=n;const o=e=>{if(e.attributes)for(let t=0;t<e.attributes.length;t++){const{name:i}=e.attributes[t];i.startsWith("on")&&e.removeAttribute(i)}if(e.childNodes)for(let t=0;t<e.childNodes.length;t++)o(e.childNodes[t])};o(i),i.querySelectorAll("script").forEach((e=>{e.remove()}));const a=i.innerHTML;return t.remove(),a},_convertToHtml(e){var t;return(0,v.isFunction)(null===(t=this._htmlConverter)||void 0===t?void 0:t.toHtml)?String(this._htmlConverter.toHtml(e??"")??""):e},_convertFromHtml(e){var t;return(0,v.isFunction)(null===(t=this._htmlConverter)||void 0===t?void 0:t.fromHtml)?String(this._htmlConverter.fromHtml(e)??""):e},_updateContainerMarkup(){const{value:e}=this.option(),t=this._convertToHtml(e);if(!t)return;const i=this._removeXSSVulnerableHtml(t);this._$htmlContainer.html(i)},_render(){this._prepareConverters(),this.callBase(),this._toggleReadOnlyState()},_prepareQuillRegistrator(){this._quillRegistrator||(this._quillRegistrator=new w.default)},_getRegistrator(){return this._prepareQuillRegistrator(),this._quillRegistrator},_prepareConverters(){if(!this._deltaConverter){const e=b.default.getConverter("delta");e&&(this._deltaConverter=new e)}},_renderContentImpl(){this._contentRenderedDeferred=(0,f.Deferred)();const e=this._contentRenderedDeferred.promise();return this.callBase(),this._renderHtmlEditor(),this._renderFormDialog(),this._addKeyPressHandler(),e},_pointerMoveHandler(e){A&&e.stopPropagation()},_attachFocusEvents(){(0,_.deferRender)(this.callBase.bind(this))},_addKeyPressHandler(){const e=(0,r.addNamespace)("keydown",`${this.NAME}TextChange`);o.default.on(this._$htmlContainer,e,this._keyDownHandler.bind(this))},_keyDownHandler(e){this._saveValueChangeEvent(e)},_renderHtmlEditor(){const e=this.option("customizeModules"),t=this._getModulesConfig();(0,v.isFunction)(e)&&e(t),this._quillInstance=this._getRegistrator().createEditor(this._$htmlContainer[0],{placeholder:this.option("placeholder"),readOnly:this.option("readOnly")||this.option("disabled"),modules:t,theme:"basic"}),this._renderValidationState(),this._deltaConverter.setQuillInstance(this._quillInstance),this._textChangeHandlerWithContext=this._textChangeHandler.bind(this),this._quillInstance.on("text-change",this._textChangeHandlerWithContext),this._renderScrollHandler(),this._hasTranscludedContent()?this._updateContentTask=(0,_.executeAsync)((()=>{this._applyTranscludedContent()})):this._finalizeContentRendering()},_renderScrollHandler(){const e=this._getContent(),t=(0,y.prepareScrollData)(e);o.default.on(e,(0,r.addNamespace)(a.default.init,this.NAME),t,_.noop),o.default.on(e,(0,r.addNamespace)(s.default.move,this.NAME),this._pointerMoveHandler.bind(this))},_applyTranscludedContent(){const e=this.option("value");if(!(0,v.isDefined)(e)){const e=this._deltaConverter.toHtml(),t=this._quillInstance.clipboard.convert({html:e});if(t.ops.length)return void this._quillInstance.setContents(t)}this._finalizeContentRendering()},_hasTranscludedContent(){return this._$templateResult&&this._$templateResult.length},_getModulesConfig(){const e=this._getRegistrator().getQuill(),t=(0,S.default)(e);return(0,m.extend)({},{table:!0,toolbar:this._getModuleConfigByOption("toolbar"),variables:this._getModuleConfigByOption("variables"),resizing:this._getModuleConfigByOption("mediaResizing"),tableResizing:this._getModuleConfigByOption("tableResizing"),tableContextMenu:this._getModuleConfigByOption("tableContextMenu"),imageUpload:this._getModuleConfigByOption("imageUpload"),imageCursor:this._getBaseModuleConfig(),mentions:this._getModuleConfigByOption("mentions"),uploader:{onDrop:e=>this._saveValueChangeEvent((0,n.Event)(e)),imageBlot:"extendedImage"},keyboard:{onKeydown:e=>this._saveValueChangeEvent((0,n.Event)(e))},clipboard:{onPaste:e=>this._saveValueChangeEvent((0,n.Event)(e)),onCut:e=>this._saveValueChangeEvent((0,n.Event)(e)),matchers:[["p.MsoListParagraphCxSpFirst",t],["p.MsoListParagraphCxSpMiddle",t],["p.MsoListParagraphCxSpLast",t]]},multiline:Boolean(this.option("allowSoftLineBreak"))},this._getCustomModules())},_getModuleConfigByOption(e){const t=this.option(e);let i={};if((0,v.isDefined)(t))return Array.isArray(t)?i[e]=t:i=t,(0,m.extend)(this._getBaseModuleConfig(),i)},_getBaseModuleConfig(){return{editorInstance:this}},_getCustomModules(){const e={};return this._getRegistrator().getRegisteredModuleNames().forEach((t=>{e[t]=this._getBaseModuleConfig()})),e},_textChangeHandler(){const{value:e}=this.option(),t=this._deltaConverter.toHtml(),i=this._convertFromHtml(t);e===i||this._isNullValueConverted(e,i)||(this._isEditorUpdating=!0,this.option("value",i)),this._finalizeContentRendering()},_isNullValueConverted:(e,t)=>null===e&&""===t,_finalizeContentRendering(){this._contentRenderedDeferred&&(this.clearHistory(),this._contentInitializedCallback.fire(),this._contentRenderedDeferred.resolve(),this._contentRenderedDeferred=void 0)},_resetEnabledState(){if(this._quillInstance){const e=!(this.option("readOnly")||this.option("disabled"));this._quillInstance.enable(e)}},_renderFormDialog(){const e=(0,m.extend)(!0,{width:"auto",height:"auto",hideOnOutsideClick:!0},this.option("formDialogOptions"));this._formDialog=new D.default(this,e)},_getStylingModePrefix:()=>"dx-htmleditor-",_getQuillContainer(){return this._$htmlContainer},_prepareModuleOptions(e){var t;const i=null===(t=e.fullName)||void 0===t?void 0:t.split(".");let{value:n}=e;const o=i.length>=2?i[1]:e.name;return 3===i.length&&(n={[i[2]]:n}),[o,n]},_moduleOptionChanged(e,t){const i=this.getModule(e);Boolean(i)?i.option(...this._prepareModuleOptions(t)):this._invalidate()},_processHtmlContentUpdating(e){if(this._quillInstance)if(this._isEditorUpdating)this._isEditorUpdating=!1;else{const t=this._convertToHtml(e);this._suppressValueChangeAction(),this._updateHtmlContent(t),this._resumeValueChangeAction()}else this._$htmlContainer.html(e)},_optionChanged(e){switch(e.name){case"converter":{this._htmlConverter=e.value;const{value:t}=this.option();this._processHtmlContentUpdating(t);break}case"value":{this._processHtmlContentUpdating(e.value);const t=this.option("value");t!==e.previousValue&&(this._setSubmitValue(t),this.callBase(E({},e,{value:t})));break}case"placeholder":case"variables":case"toolbar":case"mentions":case"customizeModules":case"allowSoftLineBreak":this._invalidate();break;case"tableResizing":this._moduleOptionChanged("tableResizing",e);break;case"stylingMode":this._renderStylingMode();break;case"readOnly":case"disabled":this.callBase(e),this._resetEnabledState();break;case"formDialogOptions":this._renderFormDialog();break;case"tableContextMenu":this._moduleOptionChanged("tableContextMenu",e);break;case"mediaResizing":this._moduleOptionChanged("resizing",e);break;case"width":this.callBase(e),this._repaintToolbar();break;case"imageUpload":this._moduleOptionChanged("imageUpload",e);break;default:this.callBase(e)}},_repaintToolbar(){this._applyToolbarMethod("repaint")},_updateHtmlContent(e){const t=this._quillInstance.clipboard.convert({html:e});this._quillInstance.setContents(t)},_clean(){this._quillInstance&&(o.default.off(this._getContent(),`.${this.NAME}`),this._quillInstance.off("text-change",this._textChangeHandlerWithContext),this._cleanCallback.fire()),this._abortUpdateContentTask(),this._cleanCallback.empty(),this._contentInitializedCallback.empty(),this.callBase()},_abortUpdateContentTask(){this._updateContentTask&&(this._updateContentTask.abort(),this._updateContentTask=void 0)},_applyQuillMethod(e,t){if(this._quillInstance)return this._quillInstance[e].apply(this._quillInstance,t)},_applyQuillHistoryMethod(e){this._quillInstance&&this._quillInstance.history&&this._quillInstance.history[e]()},_applyToolbarMethod(e){var t;null===(t=this.getModule("toolbar"))||void 0===t||t[e]()},addCleanCallback(e){this._cleanCallback.add(e)},addContentInitializedCallback(e){this._contentInitializedCallback.add(e)},register(e){this._getRegistrator().registerModules(e),this._quillInstance&&this.repaint()},get(e){return this._getRegistrator().getQuill().import(e)},getModule(e){return this._applyQuillMethod("getModule",arguments)},getQuillInstance(){return this._quillInstance},getSelection(e){return this._applyQuillMethod("getSelection",arguments)},setSelection(e,t){this._applyQuillMethod("setSelection",arguments)},getText(e,t){return this._applyQuillMethod("getText",arguments)},format(e,t){this._applyQuillMethod("format",arguments)},formatText(e,t,i,n){this._applyQuillMethod("formatText",arguments)},formatLine(e,t,i,n){this._applyQuillMethod("formatLine",arguments)},getFormat(e,t){return this._applyQuillMethod("getFormat",arguments)},removeFormat(e,t){return this._applyQuillMethod("removeFormat",arguments)},clearHistory(){this._applyQuillHistoryMethod("clear"),this._applyToolbarMethod("updateHistoryWidgets")},undo(){this._applyQuillHistoryMethod("undo")},redo(){this._applyQuillHistoryMethod("redo")},getLength(){return this._applyQuillMethod("getLength")},getBounds(e,t){return this._applyQuillMethod("getBounds",arguments)},delete(e,t){this._applyQuillMethod("deleteText",arguments)},insertText(e,t,i){this._applyQuillMethod("insertText",arguments)},insertEmbed(e,t,i){this._applyQuillMethod("insertEmbed",arguments)},showFormDialog(e){return this._formDialog.show(e)},formDialogOption(e,t){return this._formDialog.popupOption.apply(this._formDialog,arguments)},focus(){this.callBase(),this._applyQuillMethod("focus")},blur(){this._applyQuillMethod("blur")},getMentionKeyInTemplateStorage(){return this._mentionKeyInTemplateStorage}});(0,l.default)("dxHtmlEditor",P);t.default=P},58283:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getQuill=function(){if(!o.default)throw n.default.Error("E1041","Quill");return o.default};var n=a(i(35185)),o=a(i(40765));function a(e){return e&&e.__esModule?e:{default:e}}},80609:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=C(i(58281)),o=C(i(45535)),a=C(i(93805)),s=C(i(93794)),r=C(i(51371)),l=i(58283),d=C(i(38655)),u=C(i(38850)),c=C(i(6681)),h=C(i(52826)),p=C(i(62102)),g=C(i(74829)),_=C(i(54970)),f=C(i(8478)),m=C(i(8344)),v=C(i(80865));function C(e){return e&&e.__esModule?e:{default:e}}class y{constructor(){if(this._customModules=[],y.initialized)return;const e=this.getQuill(),t=e.import("attributors/style/direction");e.register({"formats/align":n.default,"formats/direction":t,"formats/font":o.default,"formats/size":r.default,"formats/extendedImage":a.default,"formats/link":s.default,"modules/toolbar":f.default,"modules/dropImage":d.default,"modules/variables":m.default,"modules/resizing":p.default,"modules/tableResizing":_.default,"modules/tableContextMenu":g.default,"modules/imageUpload":c.default,"modules/imageCursor":u.default,"modules/mentions":h.default,"themes/basic":v.default},!0),this._customModules=[],y._initialized=!0}createEditor(e,t){return new(this.getQuill())(e,t)}registerModules(e){const t=RegExp("modules/*"),i=this.getQuill(),n=e=>!!i.imports[e];for(const i in e)t.test(i)&&!n(i)&&this._customModules.push(i.slice(8));i.register(e,!0)}getRegisteredModuleNames(){return this._customModules}getQuill(){return(0,l.getQuill)()}}t.default=y},23102:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=e=>{const t=e.import("delta"),i=e.MS_LIST_DATA_KEY;return(e,n)=>{const o=n.ops.slice(),a=o[0];a.insert=a.insert.replace(/^\s+/,"");const s=a.insert.match(/^(\S+)\s+/),r=s&&function(e,t){const i=e.getAttribute(t);if(i){const e=i.replace(/\n+/g,"").match(/level(\d+)/);return e?e[1]-1:0}return!1}(e,i);return s&&!1!==r?(a.insert=a.insert.substring(s[0].length,a.insert.length),function(e){const t=e[e.length-1];t.insert=t.insert.trim()}(o),o.push({insert:"\n",attributes:{list:(l=s,l[1].match(/\S+\./)?"ordered":"bullet"),indent:r}}),new t(o)):n;var l}}},74356:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{}},49864:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(11528),o=a(i(40765));function a(e){return e&&e.__esModule?e:{default:e}}let s=a(i(74356)).default;if(o.default){const e=o.default.import("core/module");s=class extends e{constructor(e,t){super(e,t),this.editorInstance=t.editorInstance}saveValueChangeEvent(e){this.editorInstance._saveValueChangeEvent(e)}addCleanCallback(e){this.editorInstance.addCleanCallback(e)}handleOptionChangeValue(e){(0,n.isObject)(e)?Object.entries(e).forEach((e=>{let[t,i]=e;return this.option(t,i)})):(0,n.isDefined)(e)||null==this||this.clean()}}}t.default=s},38655:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(92774)),o=i(98834),a=u(i(48314)),s=i(21274),r=i(3104),l=u(i(40765)),d=u(i(49864));function u(e){return e&&e.__esModule?e:{default:e}}let c=d.default;l.default&&(c=class extends d.default{constructor(e,t){super(e,t);const i=this.editorInstance.NAME;n.default.on(this.quill.root,(0,o.addNamespace)("drop",i),this._dropHandler.bind(this)),n.default.on(this.quill.root,(0,o.addNamespace)("paste",i),this._pasteHandler.bind(this))}_dropHandler(e){var t;const{dataTransfer:i}=e.originalEvent,n=null==i||null===(t=i.files)||void 0===t?void 0:t.length;this.saveValueChangeEvent(e),e.preventDefault(),n&&this._getImage(i.files,this._addImage.bind(this))}_pasteHandler(e){var t;const{clipboardData:i}=e.originalEvent;if(this.saveValueChangeEvent(e),!i)return;const n=null===(t=i.items)||void 0===t?void 0:t.length;!i.getData("text/html")&&n&&this._getImage(i.items,(e=>{a.default.mozilla||this._addImage(e)}))}_isImage(e){return!!e.type.match(/^image\/(a?png|bmp|gif|p?jpe?g|svg|vnd\.microsoft\.icon|webp)/i)}_getImage(e,t){const i=(0,r.getWindow)();(0,s.each)(e,((e,n)=>{if(!this._isImage(n))return;const o=new i.FileReader;o.onload=e=>{let{target:i}=e;t(i.result)};const a=n.getAsFile?n.getAsFile():n;a instanceof i.Blob&&o.readAsDataURL(a)}))}_addImage(e){const t=this.quill.getSelection(),i=t?t.index:this.quill.getLength();this.quill.insertEmbed(i,"extendedImage",e,"user")}});t.default=c},38850:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(92774)),o=i(98834),a=r(i(40765)),s=r(i(49864));function r(e){return e&&e.__esModule?e:{default:e}}const l=(0,o.addNamespace)("dxclick","dxHtmlEditorImageCursor");let d=s.default;a.default&&(d=class extends s.default{constructor(e,t){super(e,t),this.addCleanCallback(this.clean.bind(this)),this._attachEvents()}_attachEvents(){n.default.on(this.quill.root,l,this._clickHandler.bind(this))}_detachEvents(){n.default.off(this.quill.root,l)}_clickHandler(e){this._isAllowedTarget(e.target)&&this._adjustSelection(e)}_isAllowedTarget(e){return this._isImage(e)}_isImage(e){return"IMG"===e.tagName.toUpperCase()}_adjustSelection(e){const t=this.quill.scroll.find(e.target);if(t){const e=t.offset(this.quill.scroll);this.quill.setSelection(e+1,0)}else this.quill.setSelection(0,0)}clean(){this._detachEvents()}});t.default=d},6681:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(92774)),o=i(98834),a=h(i(64553)),s=i(52576),r=i(11528),l=h(i(26980)),d=h(i(40765)),u=i(85936),c=h(i(49864));function h(e){return e&&e.__esModule?e:{default:e}}const p="dxHtmlEditorImageUpload";let g=c.default;d.default&&(g=class extends c.default{constructor(e,t){super(e,t),this.options=t,this._quillContainer=this.editorInstance._getQuillContainer(),this.addCleanCallback(this.prepareCleanCallback()),this._handleServerUpload()}_handleServerUpload(){(0,r.isDefined)(this.options.fileUploadMode)&&"base64"!==this.options.fileUploadMode?this._enableDragAndDropUploading():this._disableDragAndDropUploading()}_getUploaderModule(){return this._uploaderModule||(this._uploaderModule=this.quill.getModule("uploader")),this._uploaderModule}_disableDragAndDropUploading(){var e;this._getUploaderModule().preventImageUploading(!1),this._detachEvents(),null===(e=this._fileUploader)||void 0===e||e.dispose()}_enableDragAndDropUploading(){this._initFileUploader(),this._getUploaderModule().preventImageUploading(!0),this._attachEvents()}_initFileUploader(){const e=(0,a.default)("<div>").addClass("dx-htmleditor-hidden-content").appendTo(this._quillContainer),t=(0,s.extend)({},(0,u.getFileUploaderBaseOptions)(),{uploadUrl:this.options.uploadUrl,onUploaded:this._onUploaded.bind(this)},this.options.fileUploaderOptions);return this._fileUploader=this.editorInstance._createComponent(e,l.default,t),e}_onUploaded(e){const{index:t}=this.quill.getSelection()??{index:this.quill.getLength()};(0,u.serverUpload)(this.options.uploadDirectory,e.file.name,this.quill,t)}_attachEvents(){n.default.on(this.quill.root,(0,o.addNamespace)("drop",p),this._dropHandler.bind(this)),n.default.on(this.quill.root,(0,o.addNamespace)("paste",p),this._pasteHandler.bind(this))}_detachEvents(){n.default.off(this.quill.root,p)}_dropHandler(e){this._handleInsertImages(e,"dataTransfer")}_pasteHandler(e){this._handleInsertImages(e,"clipboardData")}_handleInsertImages(e,t){this.saveValueChangeEvent(e);const i=Array.from(e.originalEvent[t].files||[]);i.length&&(e.preventDefault(),e.stopPropagation(),this._fileUploader.option("value",i),this._fileUploader.upload())}clean(){this._disableDragAndDropUploading()}prepareCleanCallback(){return()=>{this.clean()}}option(e,t){switch(e){case"imageUpload":this.handleOptionChangeValue(t);break;case"fileUploadMode":this.options.fileUploadMode=t,this._handleServerUpload();break;case"fileUploaderOptions":this._fileUploader.option(t)}}});t.default=g},52826:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(92774)),o=i(61404),a=p(i(64553)),s=i(31e3),r=i(52576),l=i(11528),d=p(i(40765)),u=p(i(11278)),c=p(i(49864)),h=p(i(55911));function p(e){return e&&e.__esModule?e:{default:e}}let g=c.default;if(d.default){const e="user",t="@",i={ARROW_UP:"upArrow",ARROW_DOWN:"downArrow",ARROW_LEFT:"leftArrow",ARROW_RIGHT:"rightArrow",ENTER:"enter",ESCAPE:"escape",SPACE:"space",PAGE_UP:"pageUp",PAGE_DOWN:"pageDown",END:"end",HOME:"home"},c=[i.ARROW_LEFT,i.ARROW_RIGHT,i.PAGE_UP,i.PAGE_DOWN,i.END,i.HOME],p=[" ","\n"],_="dx-state-disabled";d.default.register({"formats/mention":u.default},!0),g=class extends h.default{constructor(e,i){super(e,i),this._mentions={},i.mentions.forEach((e=>{let{marker:i}=e;i||(e.marker=i=t);const{template:n}=e;if(n){const e=this.editorInstance._getTemplate(n);e&&u.default.addTemplate({marker:i,editorKey:this.editorInstance.getMentionKeyInTemplateStorage()},e)}this._mentions[i]=(0,r.extend)({},this._getDefaultOptions(),e)})),this._attachKeyboardHandlers(),this.addCleanCallback(this.clean.bind(this)),this.quill.on("text-change",this.onTextChange.bind(this))}_getDefaultOptions(){const e=super._getDefaultOptions();return(0,r.extend)(e,{itemTemplate:"item",valueExpr:"this",displayExpr:"this",template:null,searchExpr:null,searchTimeout:500,minSearchLength:0})}_attachKeyboardHandlers(){this.quill.keyboard.addBinding({key:i.ARROW_UP},this._moveToItem.bind(this,"prev")),this.quill.keyboard.addBinding({key:i.ARROW_DOWN},this._moveToItem.bind(this,"next")),this.quill.keyboard.addBinding({key:[i.ENTER,i.SPACE]},this._selectItemHandler.bind(this));const e=this.quill.keyboard.bindings[i.ENTER];e.unshift(e.pop()),this.quill.keyboard.addBinding({key:i.ESCAPE},this._escapeKeyHandler.bind(this)),this.quill.keyboard.addBinding({key:[i.ARROW_LEFT,i.ARROW_RIGHT],shiftKey:!0},this._ignoreKeyHandler.bind(this)),this.quill.keyboard.addBinding({key:c},this._ignoreKeyHandler.bind(this))}_moveToItem(e){const t=this._list.getDataSource();if(this._isMentionActive&&!t.isLoading()){const t="next"===e?"first":"last";let i=(0,a.default)(this._list.option("focusedElement"))[e]();i=i.length?i:this._activeListItems[t](),this._list.option("focusedElement",(0,o.getPublicElement)(i)),this._list.scrollToItem(i)}return!this._isMentionActive}_ignoreKeyHandler(){return!this._isMentionActive}_fitIntoRange(e,t,i){return e>i?t:e<t?i:e}_selectItemHandler(){return this._isMentionActive&&(this._list.option("items").length?this._list.selectItem(this._list.option("focusedElement")):this._popup.hide()),!this._isMentionActive}_escapeKeyHandler(){return this._isMentionActive&&this._popup.hide(),!this._isMentionActive}renderList(e,t){this.compileGetters(this.options),super.renderList(e,t)}compileGetters(e){let{displayExpr:t,valueExpr:i}=e;this._valueGetter=(0,s.compileGetter)(t),this._idGetter=(0,s.compileGetter)(i)}_getListConfig(e){const t=super._getListConfig(e);return(0,r.extend)(t,{itemTemplate:this.options.itemTemplate,onContentReady:()=>{this._hasSearch&&(this._popup.repaint(),this._focusFirstElement(),this._hasSearch=!1)}})}insertEmbedContent(){const e=this._activeMentionConfig.marker.length,t=e+this._searchValue.length,i=this.getPosition(),n=this._list.option("selectedItem"),o={value:this._valueGetter(n),id:this._idGetter(n),marker:this._activeMentionConfig.marker,keyInTemplateStorage:this.editorInstance.getMentionKeyInTemplateStorage()},a=d.default.import("delta"),s=Math.max(0,i-e),r=this.quill.getFormat(s),l=(new a).retain(s).delete(t).insert({mention:o}).insert(" ",r);this.quill.updateContents(l),this.quill.setSelection(s+2)}_getLastInsertOperation(e){const t=e[e.length-1];if("insert"in t)return t;const i="delete"in t;if(i&&e.length>=2){const t=e[e.length-2];if(i&&"insert"in t)return t}return null}onTextChange(t,i,n){if(n===e){const e=t.ops[t.ops.length-1];if(this._isMentionActive&&this._isPopupVisible)this._processSearchValue(e)&&this._filterList(this._searchValue);else{const{ops:e}=t,i=this._getLastInsertOperation(e);i&&this.checkMentionRequest(i,e)}}}get _isPopupVisible(){var e;return null===(e=this._popup)||void 0===e?void 0:e.option("visible")}_processSearchValue(e){if("insert"in e)this._searchValue+=e.insert;else{if(!this._searchValue.length||e.delete>1)return this._popup.hide(),!1;this._searchValue=this._searchValue.slice(0,-1)}return!0}checkMentionRequest(e,t){let{insert:i}=e;const n=this.quill.getSelection();if(i&&(0,l.isString)(i)&&n&&!this._isMarkerPartOfText(t[0].retain)&&(this._activeMentionConfig=this._mentions[i],this._activeMentionConfig)){this._updateList(this._activeMentionConfig);const e=n.index&&"\n"===this._getCharByIndex(n.index-1);this.savePosition(n.index+e),this._popup.option("position",this._popupPosition),this._searchValue="",this._popup.show()}}_isMarkerPartOfText(e){return!(!e||p.includes(this._getCharByIndex(e-1)))}_getCharByIndex(e){return this.quill.getContents(e,1).ops[0].insert}_updateList(e){let{dataSource:t,displayExpr:i,valueExpr:n,itemTemplate:o,searchExpr:a}=e;this.compileGetters({displayExpr:i,valueExpr:n}),this._list.unselectAll(),this._list.option({dataSource:t,displayExpr:i,itemTemplate:o,searchExpr:a})}_filterList(e){if(!this._isMinSearchLengthExceeded(e))return void this._resetFilter();const{searchTimeout:t}=this._activeMentionConfig;t?(clearTimeout(this._searchTimer),this._searchTimer=setTimeout((()=>{this._search(e)}),t)):this._search(e)}_isMinSearchLengthExceeded(e){return e.length>=this._activeMentionConfig.minSearchLength}_resetFilter(){clearTimeout(this._searchTimer),this._search(null)}_search(e){this._hasSearch=!0,this._list.option("searchValue",e)}_focusFirstElement(){if(!this._list)return;const e=this._activeListItems.first();this._list.option("focusedElement",(0,o.getPublicElement)(e)),this._list.scrollToItem(e)}_toggleActiveDescendant(e){if(e){const e=this._list.getFocusedItemId();this.quill.root.setAttribute("aria-activedescendant",e)}else this.quill.root.removeAttribute("aria-activedescendant")}get _popupPosition(){const e=this.getPosition(),{left:t,top:i,height:o}=this.quill.getBounds(e?e-1:e),{left:s,top:r}=(0,a.default)(this.quill.root).offset();return{of:n.default.Event("positionEvent",{pageX:s+t,pageY:r+i}),offset:{v:o},my:"top left",at:"top left",collision:{y:"flip",x:"flipfit"}}}_getPopupConfig(){return(0,r.extend)(super._getPopupConfig(),{hideOnParentScroll:!1,onShown:()=>{this._toggleActiveDescendant(!0),this._isMentionActive=!0,this._hasSearch=!1,this._focusFirstElement()},onHidden:()=>{this._toggleActiveDescendant(!1),this._list.unselectAll(),this._list.option("focusedElement",null),this._isMentionActive=!1,this._search(null)},focusStateEnabled:!1})}get _activeListItems(){return this._list.itemElements().filter(`:not(.${_})`)}clean(){Object.keys(this._mentions).forEach((e=>{this._mentions[e].template&&u.default.removeTemplate({marker:e,editorKey:this.editorInstance.getMentionKeyInTemplateStorage()})}))}}}t.default=g},55911:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(92774)),o=i(98834),a=p(i(64553)),s=i(52576),r=i(57653),l=p(i(80070)),d=p(i(97643)),u=p(i(14470)),c=p(i(40765)),h=p(i(49864));function p(e){return e&&e.__esModule?e:{default:e}}let g=h.default;if(c.default){const e="dx-suggestion-list",t="dx-suggestion-list-wrapper",i="dx-dropdowneditor-overlay",c=100;g=class extends h.default{constructor(e,n){super(e,n),this.options=(0,s.extend)({},this._getDefaultOptions(),n),this._popup=this.renderPopup(),this._popup.$wrapper().addClass(`${t} ${i}`),this._renderPreventFocusOut()}_getDefaultOptions(){return{dataSource:null}}renderList(t,i){const n=(0,a.default)("<div>").addClass(e).appendTo(t);this._list=this.options.editorInstance._createComponent(n,l.default,i)}renderPopup(){const{editorInstance:e}=this.options,t=(0,a.default)("<div>").appendTo(e.$element()),i=this._getPopupConfig();return e._createComponent(t,d.default,i)}_getPopupConfig(){return{contentTemplate:e=>{const t=this._getListConfig(this.options);this.renderList((0,a.default)(e),t)},deferRendering:!1,onShown:()=>{this._list.focus()},onHidden:()=>{this._list.unselectAll(),this._list.option("focusedElement",null)},showTitle:!1,width:"auto",height:"auto",shading:!1,hideOnParentScroll:!0,hideOnOutsideClick:!0,animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},fullScreen:!1,maxHeight:this.maxHeight}}_getListConfig(e){return{dataSource:e.dataSource,onSelectionChanged:this.selectionChangedHandler.bind(this),selectionMode:"single",pageLoadMode:"scrollBottom"}}get maxHeight(){const e=u.default.getWindow(),t=e&&(0,r.getHeight)(e)||0;return Math.max(c,.5*t)}selectionChangedHandler(e){this._popup.option("visible")&&(this._popup.hide(),this.insertEmbedContent(e))}_renderPreventFocusOut(){const e=(0,o.addNamespace)("mousedown","dxHtmlEditorPopupModule");n.default.on(this._popup.$wrapper(),e,(e=>{e.preventDefault()}))}insertEmbedContent(e){}showPopup(){this._popup&&this._popup.show()}savePosition(e){this.caretPosition=e}getPosition(){return this.caretPosition}}}t.default=g},62102:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=i(64044),a=g(i(92774)),s=i(98834),r=g(i(65951)),l=g(i(64553)),d=i(41639),u=i(57653),c=g(i(28416)),h=g(i(40765)),p=g(i(49864));function g(e){return e&&e.__esModule?e:{default:e}}const _="dxHtmlResizingModule",f=(0,s.addNamespace)("keydown",_),m=(0,s.addNamespace)("scroll",_),v=(0,s.addNamespace)("mousedown",_);class C extends p.default{constructor(e,t){super(e,t),this.allowedTargets=t.allowedTargets||["image"],this.enabled=!!t.enabled,this._hideFrameWithContext=this.hideFrame.bind(this),this._framePositionChangedHandler=this._prepareFramePositionChangedHandler(),this.enabled&&(this._attachEvents(),this._createResizeFrame())}_attachEvents(){a.default.on(this.quill.root,(0,s.addNamespace)(o.name,_),this._clickHandler.bind(this)),a.default.on(this.quill.root,m,this._framePositionChangedHandler),this.editorInstance.on("focusOut",this._hideFrameWithContext),this.quill.on("text-change",this._framePositionChangedHandler)}_detachEvents(){a.default.off(this.quill.root,`.${_}`),this.editorInstance.off("focusOut",this._hideFrameWithContext),this.quill.off("text-change",this._framePositionChangedHandler)}_clickHandler(e){if(this._isAllowedTarget(e.target)){if(this._$target===e.target)return;this._$target=e.target;const t=(0,l.default)(this._$target),i=Math.max((0,u.getOuterWidth)(t)-(0,u.getWidth)(t),this.resizable.option("minWidth")),n=Math.max((0,u.getOuterHeight)(t)-(0,u.getHeight)(t),this.resizable.option("minHeight"));this.resizable.option({minWidth:i,minHeight:n}),this.updateFramePosition(),this.showFrame(),this._adjustSelection()}else this._$target&&this.hideFrame()}_prepareFramePositionChangedHandler(){return()=>{this._$target&&this.updateFramePosition()}}_adjustSelection(){this.quill.getSelection()||this.quill.setSelection(0,0)}_isAllowedTarget(e){return this._isImage(e)}_isImage(e){return-1!==this.allowedTargets.indexOf("image")&&"IMG"===e.tagName.toUpperCase()}showFrame(){this._$resizeFrame.show(),a.default.on(this.quill.root,f,this._handleFrameKeyDown.bind(this))}_handleFrameKeyDown(e){const t=(0,s.normalizeKeyName)(e);"del"!==t&&"backspace"!==t||this._deleteImage(),this.hideFrame()}hideFrame(){this._$target=null,this._$resizeFrame.hide(),a.default.off(this.quill.root,f)}updateFramePosition(){const{height:e,width:t,top:i,left:o}=(0,d.getBoundingRect)(this._$target),{top:a,left:s}=(0,d.getBoundingRect)(this.quill.root),r=this._getBorderWidth();this._$resizeFrame.css({height:e,width:t,padding:1,top:i-a-r-1,left:o-s-r-1}),(0,n.move)(this._$resizeFrame,{left:0,top:0})}_getBorderWidth(){return parseInt(this._$resizeFrame.css("borderTopWidth"))}_createResizeFrame(){if(this._$resizeFrame)return;const{deviceType:e}=r.default.current();this._$resizeFrame=(0,l.default)("<div>").addClass("dx-resize-frame").toggleClass("dx-touch-device","desktop"!==e).appendTo(this.editorInstance._getQuillContainer()).hide(),a.default.on(this._$resizeFrame,v,(e=>{e.preventDefault()})),this.resizable=this.editorInstance._createComponent(this._$resizeFrame,c.default,{onResize:e=>{this._$target&&((0,l.default)(this._$target).attr({height:e.height,width:e.width}),this.updateFramePosition())}})}_deleteImage(){var e;this._isAllowedTarget(this._$target)&&(null===(e=h.default.find(this._$target))||void 0===e||e.deleteAt(0))}option(e,t){if("mediaResizing"!==e)if("enabled"===e){if(this.enabled===t)return;this.enabled=t,t?(this._attachEvents(),this._createResizeFrame()):this.clean()}else"allowedTargets"===e&&Array.isArray(t)&&(this.allowedTargets=t);else this.handleOptionChangeValue(t)}clean(){this._detachEvents(),this._$resizeFrame.remove(),this._$resizeFrame=void 0}}t.default=C},74829:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(i(92774)),o=i(98834),a=f(i(4671)),s=f(i(64553)),r=i(52576),l=i(53124),d=i(21274),u=i(11528),c=f(i(34378)),h=f(i(40765)),p=i(53548),g=i(12873),_=f(i(49864));function f(e){return e&&e.__esModule?e:{default:e}}const m=(0,o.addNamespace)("dxcontextmenu","dxHtmlEditorTableContextMenu");let v=_.default;const C=e=>a.default.format(`dxHtmlEditor-${(0,l.camelize)(e)}`);h.default&&(v=class extends _.default{constructor(e,t){super(e,t),this.enabled=!!t.enabled,this._quillContainer=this.editorInstance._getQuillContainer(),this.addCleanCallback(this.prepareCleanCallback()),this._formatHandlers=(0,g.getFormatHandlers)(this),this._tableFormats=(0,p.getTableFormats)(e),this.enabled&&this._enableContextMenu(t.items)}_enableContextMenu(e){var t;null===(t=this._contextMenu)||void 0===t||t.dispose(),this._contextMenu=this._createContextMenu(e),this._attachEvents()}_attachEvents(){n.default.on(this.editorInstance._getContent(),m,this._prepareContextMenuHandler())}_detachEvents(){n.default.off(this.editorInstance._getContent(),m)}_createContextMenu(e){const t=(0,s.default)("<div>").appendTo(this.editorInstance.$element()),i=this._getMenuConfig(e);return this.editorInstance._createComponent(t,c.default,i)}showPropertiesForm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cell";const t=(0,s.default)(this._targetElement).closest("cell"===e?"th, td":"table");this._contextMenu.hide(),this._formatHandlers[`${e}Properties`](t),this._targetElement=null}_isAcceptableItem(e,t){return!e||e===t}_handleObjectItem(e){if(e.name&&this._isAcceptableItem(e.widget,"dxButton")){const t=this._prepareMenuItemConfig(e.name);return(0,r.extend)(!0,t,e)}return e.items?(e.items=this._prepareMenuItems(e.items),e):e}_prepareMenuItemConfig(e){const t=g.ICON_MAP[e]??e,i=(0,l.titleize)(e);return{text:C(i),icon:t.toLowerCase(),onClick:this._formatHandlers[e]??(0,g.getDefaultClickHandler)(this,e)}}_prepareMenuItems(e){const t=[];return(0,d.each)(e,((e,i)=>{let n;(0,u.isObject)(i)?n=this._handleObjectItem(i):(0,u.isString)(i)&&(n=this._prepareMenuItemConfig(i)),n&&t.push(n)})),t}_getMenuConfig(e){const t=[{text:C("insert"),items:["insertHeaderRow","insertRowAbove","insertRowBelow",(0,r.extend)(this._prepareMenuItemConfig("insertColumnLeft"),{beginGroup:!0}),"insertColumnRight"]},{text:C("delete"),items:["deleteColumn","deleteRow","deleteTable"]},(0,r.extend)(this._prepareMenuItemConfig("cellProperties"),{onClick:()=>{this.showPropertiesForm("cell")}}),(0,r.extend)(this._prepareMenuItemConfig("tableProperties"),{onClick:()=>{this.showPropertiesForm("table")}})],i=this._prepareMenuItems(null!=e&&e.length?e:t);return{target:this._quillContainer,showEvent:null,hideOnParentScroll:!1,items:i}}_prepareContextMenuHandler(){return e=>{this._isTableTarget(e.target)&&(this._targetElement=e.target,this._setContextMenuPosition(e),this._contextMenu.show(),e.preventDefault())}}_setContextMenuPosition(e){const t=this._quillContainer.get(0).getBoundingClientRect();this._contextMenu.option({position:{my:"left top",at:"left top",collision:"fit fit",offset:{x:e.clientX-t.left,y:e.clientY-t.top}}})}_isTableTarget(e){return!!(0,s.default)(e).closest(".dx-htmleditor-content td, .dx-htmleditor-content th").length}clean(){this._detachEvents()}option(e,t){if("tableContextMenu"!==e){if("enabled"===e)this.enabled=t,t?this._enableContextMenu():this.clean();else if("items"===e){var i;null===(i=this._contextMenu)||void 0===i||i.dispose(),this._contextMenu=this._createContextMenu(t)}}else this.handleOptionChangeValue(t)}prepareCleanCallback(){return()=>{this.clean()}}});t.default=v},54970:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=m(i(92774)),a=i(98834),s=m(i(64553)),r=i(52576),l=i(21274),d=i(41639),u=m(i(63283)),c=i(57653),h=i(11528),p=i(3104),g=m(i(5298)),_=i(53548),f=m(i(49864));function m(e){return e&&e.__esModule?e:{default:e}}const v="dx-htmleditor-column-resizer",C="dx-htmleditor-row-resizer",y={minColumnWidth:40,minRowHeight:24},b="dxHtmlTableResizingModule",x=(0,a.addNamespace)("dxpointerdown",b),w=(0,a.addNamespace)("scroll",b);class S extends f.default{constructor(e,t){super(e,t),this.enabled=!!t.enabled,this._tableResizeFrames=[],this._minColumnWidth=this._minSizeLimit("minColumnWidth",t.minColumnWidth),this._minRowHeight=this._minSizeLimit("minRowHeight",t.minRowHeight),this._quillContainer=this.editorInstance._getQuillContainer(),this._tableData=[],this.enabled&&this._applyResizing()}_applyResizing(e){e?this._applyResizingImpl():this.editorInstance.addContentInitializedCallback(this._applyResizingImpl.bind(this)),this.addCleanCallback(this.clean.bind(this)),this._resizeHandlerWithContext=u.default.add(this._resizeHandler.bind(this))}_minSizeLimit(e,t){return(0,h.isDefined)(t)?Math.max(t,0):y[e]}_applyResizingImpl(){const e=this._findTables();e.length&&(this._fixTablesWidths(e),this._createResizeFrames(e),this._updateFramesPositions(),this._updateFramesSeparators()),this._attachEvents()}_attachEvents(){o.default.on(this.editorInstance._getContent(),w,this._updateFramesPositions.bind(this)),this.quill.on("text-change",this._getQuillTextChangeHandler())}_detachEvents(){o.default.off(this.editorInstance._getContent(),b),this.quill.off("text-change",this._quillTextChangeHandler)}_getQuillTextChangeHandler(e,t,i){return(e,t,i)=>{if(this._isTableChanging()){const e=this._findTables();this._removeResizeFrames(),"api"===i&&this._fixTablesWidths(e),this._updateTablesColumnsWidth(e),this._createResizeFrames(e),this._updateFramesPositions(),this._updateFramesSeparators()}else this._updateFramesPositions(),this._isDragging||this._updateFramesSeparators()}}_getFrameForTable(e){var t;return null===(t=this._framesForTables)||void 0===t?void 0:t.get(e.get(0))}_resizeHandler(){this._windowResizeTimeout=setTimeout((()=>{const e=this._findTables();(0,l.each)(e,((e,t)=>{const i=(0,s.default)(t),n=this._tableResizeFrames[e],o=(0,c.getOuterWidth)(i),a=this._tableLastWidth(n);Math.abs(o-a)>1&&(this._tableLastWidth(n,o),this._updateColumnsWidth(i,e))})),this._updateFramesPositions(),this._updateFramesSeparators()}))}_findTables(){return(0,s.default)(this._quillContainer).find("table")}_getWidthStyleValue(e){const t=e[0].style.width;return""!==t?parseInt(t):void 0}_tableLastWidth(e,t){if(!(0,h.isDefined)(t))return null==e?void 0:e.lastWidth;e.lastWidth=t}_fixTablesWidths(e){(0,l.each)(e,((e,t)=>{const i=(0,s.default)(t),n=this._getTableDeterminantElements(i,"horizontal");this._tableResizeFrames[e]||(this._tableResizeFrames[e]={lastWidth:void 0});const o=this._getFrameForTable(i);if(o||this._tableResizeFrames.push({$table:i}),0===(0,_.getAutoSizedElements)(i).length){const{columnsSum:e}=this._getColumnElementsSum(n);(0,_.unfixTableWidth)(i,{quill:this.quill});const t=this._tableLastWidth(o)??(0,c.getOuterWidth)(i);o&&this._tableLastWidth(o,Math.max(e,t))}}))}_createResizeFrames(e){this._framesForTables=new Map,e.each(((e,t)=>{var i;const n=(0,s.default)(t),o=null===(i=this._tableResizeFrames[e])||void 0===i?void 0:i.$table,a=this._tableResizeFrames[e].lastWidth;this._tableResizeFrames[e]={$frame:this._createTableResizeFrame(t),$table:n,index:e,lastWidth:o&&t===o.get(0)?a:void 0,columnsCount:this._getTableDeterminantElements(n,"horizontal").length,rowsCount:this._getTableDeterminantElements(n,"vertical").length},this._framesForTables.set(t,this._tableResizeFrames[e])})),this._tableResizeFrames.length=e.length}_isTableChanging(){const e=this._findTables();let t=!1;return e.length!==this._tableResizeFrames.length?t=!0:(0,l.each)(e,((e,i)=>{const n=(0,s.default)(i),o=this._tableResizeFrames[e],a=(null==o?void 0:o.columnsCount)!==this._getTableDeterminantElements(n,"horizontal").length,r=(null==o?void 0:o.rowsCount)!==this._getTableDeterminantElements(n,"vertical").length;if(a||r)return t=!0,!1})),t}_removeResizeFrames(e){var t;(0,l.each)(this._tableResizeFrames,((e,t)=>{if(t.$frame){var i;const e=`.${v}, .${C}`;this._detachSeparatorEvents(null===(i=t.$frame)||void 0===i?void 0:i.find(e)),t.$frame.remove()}})),null===(t=this._framesForTables)||void 0===t||t.clear(),e&&(this._tableResizeFrames=[])}_detachSeparatorEvents(e){e.each(((e,t)=>{o.default.off(t,x)}))}_createTableResizeFrame(e){return(0,s.default)("<div>").addClass("dx-table-resize-frame").appendTo(this._quillContainer)}_updateFramesPositions(){(0,l.each)(this._tableResizeFrames,((e,t)=>{this._updateFramePosition(t.$table,t.$frame)}))}_updateFramePosition(e,t){const{height:i,width:o,top:a,left:s}=(0,d.getBoundingRect)(e.get(0)),{top:r,left:l}=(0,d.getBoundingRect)(this.quill.root);t.css({height:i,width:o,top:a-r,left:s-l}),(0,n.move)(t,{left:0,top:0})}_updateFramesSeparators(e){(0,l.each)(this._tableResizeFrames,((t,i)=>{e?this._updateFrameSeparators(i,e):(this._updateFrameSeparators(i,"vertical"),this._updateFrameSeparators(i,"horizontal"))}))}_isDraggable(e){return e.hasClass("dx-draggable")&&e.is(":visible")}_removeDraggable(e,t){if(this._isDraggable(e)){(0,s.default)(e).dxDraggable("instance").dispose(),(0,s.default)(e).addClass(t)}}_getDirectionInfo(e){return"vertical"===e?{lineResizerClass:C,sizeFunction:e=>(0,c.getOuterHeight)(e),positionCoordinate:"top",positionStyleProperty:"height",positionCoordinateName:"y"}:{lineResizerClass:v,sizeFunction:e=>(0,c.getOuterWidth)(e),positionCoordinate:this.editorInstance.option("rtlEnabled")?"right":"left",positionStyleProperty:"width",positionCoordinateName:"x"}}_getSize(e,t){return t.sizeFunction(e)}_updateFrameSeparators(e,t){const i=this._getTableDeterminantElements(e.$table,t),n=i.length-1,o=this._getDirectionInfo(t),a=e.$frame.find(`.${o.lineResizerClass}`),r={transform:"none"};let l=0;for(let d=0;d<=n;d++){l+=this._getSize(i.eq(d),o),(0,h.isDefined)(a[d])||(a[d]=(0,s.default)("<div>").addClass(o.lineResizerClass).appendTo(e.$frame).get(0));const n=(0,s.default)(a[d]);this._removeDraggable(n,o.lineResizerClass),r[o.positionCoordinate]=l-2,(0,s.default)(n).css(r);const u={lineSeparator:a[d],index:d,$determinantElements:i,frame:e,direction:t};this._attachColumnSeparatorEvents(u)}}_getTableDeterminantElements(e,t){return"vertical"===t?e.find("th:first-child, td:first-child"):(0,_.getColumnElements)(e)}_attachColumnSeparatorEvents(e){o.default.on(e.lineSeparator,x,(()=>{this._createDraggableElement(e)}))}_dragStartHandler(e){let{$determinantElements:t,index:i,frame:n,direction:o,lineSeparator:a}=e;const r=this._getDirectionInfo(o);this._isDragging=!0,this._fixColumnsWidth(n.$table),this._startLineSize=parseInt(this._getSize((0,s.default)(t[i]),r)),this._startTableWidth=(0,c.getOuterWidth)(n.$table),this._startLineSeparatorPosition=parseInt((0,s.default)(a).css(r.positionCoordinate)),this._nextLineSize=0,t[i+1]?this._nextLineSize=parseInt(this._getSize((0,s.default)(t[i+1]),r)):"horizontal"===o&&(0,_.unfixTableWidth)(n.$table,{quill:this.quill})}_shouldRevertOffset(e){return"horizontal"===e&&this.editorInstance.option("rtlEnabled")}_isNextColumnWidthEnough(e,t,i){if(!this._nextLineSize)return!0;if(e>=this._minColumnWidth){const e=this._nextColumnOffsetLimit?i<this._nextColumnOffsetLimit:i<0,n=Math.abs(this._getWidthStyleValue(t)-(0,c.getOuterWidth)(t))>3;return e||!n}return!1}_shouldSetNextColumnWidth(e){return this._nextLineSize&&e>0}_horizontalDragHandler(e){let{currentLineNewSize:t,directionInfo:i,eventOffset:n,$determinantElements:o,index:a,frame:s}=e,r=this._nextLineSize&&this._nextLineSize-n;const l=t>=this._minColumnWidth,d=(0,_.getLineElements)(s.$table,a),u=(0,_.getLineElements)(s.$table,a+1),h=(0,c.getOuterWidth)(d.eq(0))-t;if(l)if(this._isNextColumnWidthEnough(r,o.eq(a+1),n)){(0,_.setLineElementsFormat)(this,{elements:d,property:i.positionStyleProperty,value:t}),this._shouldSetNextColumnWidth(r)&&(0,_.setLineElementsFormat)(this,{elements:u,property:i.positionStyleProperty,value:r});const e=Math.abs(this._startTableWidth-(0,c.getOuterWidth)(s.$table))<3;(Math.abs(h)>3||!this._nextLineSize&&e)&&((0,_.setLineElementsFormat)(this,{elements:d,property:i.positionStyleProperty,value:(0,c.getOuterWidth)(d.eq(0))}),r+=t-(0,c.getOuterWidth)(d.eq(0)),this._shouldSetNextColumnWidth(r)&&(0,_.setLineElementsFormat)(this,{elements:u,property:i.positionStyleProperty,value:r}))}else this._nextColumnOffsetLimit=this._nextColumnOffsetLimit||n;this._$highlightedElement.css(i.positionCoordinate,`${this._startLineSeparatorPosition+n+h}px`)}_verticalDragHandler(e){let{currentLineNewSize:t,directionInfo:i,eventOffset:n,$determinantElements:o,index:a,frame:s}=e;const r=Math.max(t,this._minRowHeight),l=(0,_.getLineElements)(s.$table,a,"vertical");(0,_.setLineElementsFormat)(this,{elements:l,property:i.positionStyleProperty,value:r});const d=(0,c.getOuterHeight)(o.eq(a))-t;this._$highlightedElement.css(i.positionCoordinate,`${this._startLineSeparatorPosition+n+d}px`)}_dragMoveHandler(e,t){let{$determinantElements:i,index:n,frame:o,direction:a}=t;const s=this._getDirectionInfo(a);let r=e.offset[s.positionCoordinateName];this.editorInstance._saveValueChangeEvent(e),this._shouldRevertOffset(a)&&(r=-r);const l=this._startLineSize+r;"horizontal"===a?this._horizontalDragHandler({currentLineNewSize:l,directionInfo:s,eventOffset:r,$determinantElements:i,index:n,frame:o}):this._verticalDragHandler({currentLineNewSize:l,directionInfo:s,eventOffset:r,$determinantElements:i,index:n,frame:o}),this._updateFramePosition(o.$table,o.$frame)}_dragEndHandler(e){var t;null===(t=this._$highlightedElement)||void 0===t||t.remove(),this._isDragging=void 0,this._nextColumnOffsetLimit=void 0,this._tableLastWidth(e.frame,(0,c.getOuterWidth)(e.frame.$table)),this._updateFramesPositions(),this._updateFramesSeparators()}_isLastColumnResizing(e){let{$determinantElements:t,index:i}=e;return!(0,h.isDefined)(t[i+1])}_getBoundaryConfig(e){const t={};if("vertical"===e.direction)t.boundary=e.frame.$table,t.boundOffset={bottom:(0,p.hasWindow)()?-(0,c.getHeight)((0,p.getWindow)()):-(0,c.getOuterHeight)(this._quillContainer),top:0,left:0,right:0};else if(this._isLastColumnResizing(e)){const e=this.editorInstance._getContent();t.boundary=e,t.boundOffset={bottom:0,top:0,left:e.css("paddingLeft"),right:e.css("paddingRight")}}else t.boundary=e.frame.$table;return t}_createDraggableElement(e){var t;const i=this._getBoundaryConfig(e),n="vertical"===e.direction?"dx-htmleditor-highlighted-row":"dx-htmleditor-highlighted-column";null===(t=this._$highlightedElement)||void 0===t||t.remove(),this._$highlightedElement=(0,s.default)("<div>").addClass(`${n}`).insertAfter((0,s.default)(e.lineSeparator));const o={contentTemplate:null,allowMoveByClick:!1,dragDirection:e.direction,onDragMove:t=>{let{component:i,event:n}=t;this._dragMoveHandler(n,e)},onDragStart:()=>{this._dragStartHandler(e)},onDragEnd:()=>{this._dragEndHandler(e)}};(0,r.extend)(o,i),this._currentDraggableElement=this.editorInstance._createComponent(e.lineSeparator,g.default,o)}_fixColumnsWidth(e){const t=this._getTableDeterminantElements(e);(0,l.each)(t,((t,i)=>{const n=(0,c.getOuterWidth)(i),o=(0,_.getLineElements)(e,t);(0,_.setLineElementsFormat)(this,{elements:o,property:"width",value:Math.max(n,this._minColumnWidth)})}))}_getColumnElementsSum(e){const t=[];let i=0;return(0,l.each)(e,((e,n)=>{const o=(0,s.default)(n),a=this._getWidthStyleValue(o)||(0,c.getOuterWidth)(o);t[e]=Math.max(a,this._minColumnWidth),i+=t[e]})),{columnsWidths:t,columnsSum:i}}_setColumnsRatioWidth(e,t,i,n){(0,l.each)(e,(e=>{const o=(0,_.getLineElements)(n,e);let a;a=t>0?this._minColumnWidth+Math.round((i[e]-this._minColumnWidth)*t):this._minColumnWidth,(0,_.setLineElementsFormat)(this,{elements:o,property:"width",value:a})}))}_updateColumnsWidth(e,t){const i=this._getTableDeterminantElements(e);let n=this._tableResizeFrames[t];n||(this._tableResizeFrames[t]={}),n=this._tableResizeFrames[t];const o=this._tableLastWidth(n)||(0,c.getOuterWidth)(e);let a;const{columnsWidths:s,columnsSum:r}=this._getColumnElementsSum(i),l=i.length*this._minColumnWidth;a=r>l?(o-l)/(r-l):-1,this._tableLastWidth(n,a>0?o:l),this._setColumnsRatioWidth(i,a,s,e)}_updateTablesColumnsWidth(e){(0,l.each)(e,((e,t)=>{this._updateColumnsWidth((0,s.default)(t),e)}))}option(e,t){"tableResizing"!==e?"enabled"===e?(this.enabled=t,t?this._applyResizing(!0):this.clean()):["minColumnWidth","minRowHeight"].includes(e)&&(this[`_${e}`]=this._minSizeLimit(e,t)):this.handleOptionChangeValue(t)}clean(){this._removeResizeFrames(!0),this._detachEvents(),u.default.remove(this._resizeHandlerWithContext),clearTimeout(this._windowResizeTimeout),this._resizeHandlerWithContext=void 0,this._isDragging=void 0,this._startTableWidth=void 0,clearTimeout(this._attachResizerTimeout)}}t.default=S},8478:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(60695),i(98264),i(48042);var n=v(i(92774)),o=i(98834),a=v(i(4671)),s=v(i(64553)),r=i(52576),l=i(53124),d=i(21274),u=i(11528),c=v(i(2850)),h=v(i(35185)),p=v(i(40765)),g=i(53548),_=i(12873),f=v(i(49864)),m=v(i(78397));function v(e){return e&&e.__esModule?e:{default:e}}let C=f.default;if(p.default){const e="dx-htmleditor-toolbar-wrapper",t="dx-htmleditor-toolbar",i="dx-htmleditor-toolbar-format",p="dx-htmleditor-toolbar-separator",v="dx-htmleditor-toolbar-menu-separator",y="dx-format-active",b="dx-state-selected",x="dx-icon",w="selection-change",S="user",D="silent",I={66:"bold",73:"italic",85:"underline"},E={b:66,i:73,u:85},T=e=>a.default.format(`dxHtmlEditor-${(0,l.camelize)(e)}`),A=(e,t)=>{if("header"===t){return(0,u.isDefined)(e)&&!1!==e?`${T("heading")} ${e}`:T("normalText")}return T(e)||e};C=class extends f.default{constructor(e,t){var i;if(super(e,t),i=this,this._toolbarWidgets=new m.default,this._formatHandlers=(0,_.getFormatHandlers)(this),this._tableFormats=(0,g.getTableFormats)(e),(0,u.isDefined)(t.items)){this._addCallbacks(),this._renderToolbar();const e=this.toolbarInstance._layoutStrategy._menu;if(e){const{_renderPopup:t}=e;e._renderPopup=function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];t.apply(e,...o),e._popup.on("showing",(()=>{i._updateToolbar(!0)}))}}this.quill.on("editor-change",((e,t,i,n)=>{if(!(n===D&&(0,u.isEmptyObject)(this.quill.getFormat()))){const t=e===w;this._updateToolbar(t)}}))}}_addCallbacks(){this.addCleanCallback(this.clean.bind(this)),this.editorInstance.addContentInitializedCallback(this.updateHistoryWidgets.bind(this))}_updateToolbar(e){this.updateFormatWidgets(e),this.updateHistoryWidgets(),this.updateTableWidgets()}_updateFormatWidget(e,t,i){const n=this._toolbarWidgets.getByName(e);n&&(t?this._markActiveFormatWidget(e,n,i):(this._resetFormatWidget(e,n),Object.prototype.hasOwnProperty.call(e)&&delete i[e]),this._toggleClearFormatting(t||!(0,u.isEmptyObject)(i)))}_renderToolbar(){const i=this.options.container||this._getContainer();this._$toolbar=(0,s.default)("<div>").addClass(t).appendTo(i),this._$toolbarContainer=(0,s.default)(i).addClass(e),n.default.on(this._$toolbarContainer,(0,o.addNamespace)("mousedown",this.editorInstance.NAME),(e=>{e.target.focus(),e.preventDefault()})),this._subscribeFormatHotKeys(),this.toolbarInstance=this.editorInstance._createComponent(this._$toolbar,c.default,this.toolbarConfig),this.editorInstance.on("optionChanged",(e=>{let{name:t}=e;"readOnly"!==t&&"disabled"!==t||this.toolbarInstance.option("disabled",this.isInteractionDisabled)}))}get toolbarConfig(){return{dataSource:this._prepareToolbarItems(),disabled:this.isInteractionDisabled,menuContainer:this._$toolbarContainer,multiline:this.isMultilineMode()}}get isInteractionDisabled(){return this.editorInstance.option("readOnly")||this.editorInstance.option("disabled")}isMultilineMode(){return this.options.multiline??!0}clean(){this._toolbarWidgets.clear(),this._$toolbarContainer&&this._$toolbarContainer.empty().removeClass(e)}repaint(){this.toolbarInstance&&this.toolbarInstance.repaint()}_getContainer(){const e=(0,s.default)("<div>");return this.editorInstance.$element().prepend(e),e}_detectRenamedOptions(e){const t=[{newName:"name",oldName:"formatName"},{newName:"acceptedValues",oldName:"formatValues"}];(0,u.isObject)(e)&&(0,d.each)(t,((t,i)=>{Object.prototype.hasOwnProperty.call(e,i.oldName)&&h.default.log("W1016",i.oldName,i.newName)}))}_subscribeFormatHotKeys(){this.quill.keyboard.addBinding({which:E.b,shortKey:!0},this._handleFormatHotKey.bind(this)),this.quill.keyboard.addBinding({which:E.i,shortKey:!0},this._handleFormatHotKey.bind(this)),this.quill.keyboard.addBinding({which:E.u,shortKey:!0},this._handleFormatHotKey.bind(this))}_handleFormatHotKey(e,t,i){let{which:n}=i;const o=I[n];this._updateButtonState(o)}_updateButtonState(e){const t=this._toolbarWidgets.getByName(e),i=this.quill.getFormat();i[e]?this._markActiveFormatWidget(e,t,i):this._resetFormatWidget(e,t)}_prepareToolbarItems(){const e=[];return(0,d.each)(this.options.items,((t,i)=>{let n;if(this._detectRenamedOptions(i),(0,u.isObject)(i))n=this._handleObjectItem(i);else if((0,u.isString)(i)){const e=this._prepareButtonItemConfig(i);n=this._getToolbarItem(e)}n&&e.push(n)})),e}_handleObjectItem(e){if(e.name&&e.acceptedValues&&this._isAcceptableItem(e.widget,"dxSelectBox")){const t=this._prepareSelectItemConfig(e);return this._getToolbarItem(t)}if(e.name&&this._isAcceptableItem(e.widget,"dxButton")){const t=this._prepareButtonItemConfig(e.name),i=(0,r.extend)(!0,t,e);return this._getToolbarItem(i)}return this._getToolbarItem(e)}_isAcceptableItem(e,t){return!e||e===t}_prepareButtonItemConfig(e){const t=_.ICON_MAP[e]??e,i=(0,l.titleize)(e);return{widget:"dxButton",name:e,options:{hint:T(i),text:T(i),icon:t.toLowerCase(),onClick:this._formatHandlers[e]||(0,_.getDefaultClickHandler)(this,e),stylingMode:"text"},showText:"inMenu"}}_prepareSelectItemConfig(e){const{name:t,acceptedValues:i}=e;return(0,r.extend)(!0,{widget:"dxSelectBox",name:t,options:{stylingMode:"filled",dataSource:i,displayExpr:e=>A(e,t),placeholder:T(t),onValueChanged:e=>{this._isReset||(this._hideAdaptiveMenu(),(0,_.applyFormat)(this,[t,e.value,S],e.event),this._setValueSilent(e.component,e.value))}}},e)}_hideAdaptiveMenu(){this.toolbarInstance.option("overflowMenuVisible")&&this.toolbarInstance.option("overflowMenuVisible",!1)}_getToolbarItem(e){const t={options:{onInitialized:t=>{e.name&&(t.component.$element().addClass(i),t.component.$element().toggleClass(`dx-${e.name.toLowerCase()}-format`,!!e.name),this._toolbarWidgets.add(e.name,t.component))},onDisposing:()=>{this._toolbarWidgets.remove(e.name)}}};return(0,r.extend)(!0,{location:"before",locateInMenu:"auto"},this._getDefaultConfig(e.name),e,t)}_getDefaultItemsConfig(){return{clear:{options:{disabled:!0}},undo:{options:{disabled:!0}},redo:{options:{disabled:!0}},insertRowAbove:{options:{disabled:!0}},insertRowBelow:{options:{disabled:!0}},insertHeaderRow:{options:{disabled:!0}},insertColumnLeft:{options:{disabled:!0}},insertColumnRight:{options:{disabled:!0}},deleteRow:{options:{disabled:!0}},deleteColumn:{options:{disabled:!0}},deleteTable:{options:{disabled:!0}},cellProperties:{options:{disabled:!0}},tableProperties:{options:{disabled:!0}},separator:{template:(e,t,i)=>{(0,s.default)(i).addClass(p)},menuItemTemplate:(e,t,i)=>{(0,s.default)(i).addClass(v)}}}}_getDefaultConfig(e){return this._getDefaultItemsConfig()[e]}updateHistoryWidgets(){const e=this.quill.history;if(!e)return;const{undo:t,redo:i}=e.stack;this._updateManipulationWidget(this._toolbarWidgets.getByName("undo"),Boolean(t.length)),this._updateManipulationWidget(this._toolbarWidgets.getByName("redo"),Boolean(i.length))}updateTableWidgets(){if(!this.quill.getModule("table"))return;const e=this.quill.getSelection(),t=e&&this.quill.getFormat(e)||{},i=this._tableFormats.some((e=>Boolean(t[e])));g.TABLE_OPERATIONS.forEach((e=>{const t="insertTable"===e,n=this._toolbarWidgets.getByName(e);this._updateManipulationWidget(n,t?!i:i)}))}_updateManipulationWidget(e,t){e&&e.option("disabled",!t)}updateFormatWidgets(e){const t=this.quill.getSelection();if(!t)return;const i=this.quill.getFormat(t),n=!(0,u.isEmptyObject)(i);n&&!e||this._resetFormatWidgets();for(const e in i){const t=this._getFormatWidgetName(e,i),n=this._toolbarWidgets.getByName(t)??this._toolbarWidgets.getByName(e);n&&this._markActiveFormatWidget(e,n,i)}this._toggleClearFormatting(n||t.length>1)}_markActiveFormatWidget(e,t,i){this._isColorFormat(e)&&this._updateColorWidget(e,i[e]),"value"in t.option()?this._setValueSilent(t,i[e]):(t.$element().addClass(y),t.$element().addClass(b),t.$element().attr("aria-pressed",!0))}_toggleClearFormatting(e){const t=this._toolbarWidgets.getByName("clear");t&&t.option("disabled",!e)}_isColorFormat(e){return"color"===e||"background"===e}_updateColorWidget(e,t){const i=this._toolbarWidgets.getByName(e);i&&i.$element().find(`.${x}`).css("borderBottomColor",t||"transparent")}_getFormatWidgetName(e,t){let i;switch(e){case"align":i=e+(0,l.titleize)(t[e]);break;case"list":i=t[e]+(0,l.titleize)(e);break;case"code-block":i="codeBlock";break;case"script":i=t[e]+e;break;case"imageSrc":i="image";break;default:i=e}return i}_setValueSilent(e,t){this._isReset=!0,e.option("value",t),this._isReset=!1}_resetFormatWidgets(){this._toolbarWidgets.each(((e,t)=>{this._resetFormatWidget(e,t)}))}_resetFormatWidget(e,t){t.$element().removeClass(y),t.$element().removeClass(b),t.$element().removeAttr("aria-pressed"),this._isColorFormat(e)&&this._updateColorWidget(e),"clear"===e&&t.option("disabled",!0),"dxSelectBox"===t.NAME&&this._setValueSilent(t,null)}addClickHandler(e,t){this._formatHandlers[e]=t;const i=this._toolbarWidgets.getByName(e);i&&"dxButton"===i.NAME&&i.option("onClick",t)}}}t.default=C},8344:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(64553)),o=i(52576),a=i(41639),s=u(i(40765)),r=u(i(90894)),l=u(i(49864)),d=u(i(55911));function u(e){return e&&e.__esModule?e:{default:e}}let c=l.default;if(s.default){const e="dx-variable-format",t="dx-format-active",i="dx-state-selected";s.default.register({"formats/variable":r.default},!0),c=class extends d.default{constructor(o,a){super(o,a);const s=o.getModule("toolbar");s&&s.addClickHandler("variable",this.showPopup.bind(this)),o.keyboard.addBinding({key:"P",altKey:!0},this.showPopup.bind(this)),this._popup.on("shown",(o=>{const a=(0,n.default)(o.component.option("position").of);a.hasClass(e)&&(a.addClass(t),a.addClass(i))}))}_getDefaultOptions(){const e=super._getDefaultOptions();return(0,o.extend)(e,{escapeChar:""})}showPopup(e){const t=this.quill.getSelection(!0),i=t?t.index:this.quill.getLength();this.savePosition(i),this._resetPopupPosition(e,i),super.showPopup()}_resetPopupPosition(e,t){if(e&&e.element)this._popup.option("position",{of:e.element,offset:{h:0,v:0},my:"top center",at:"bottom center",collision:"fit"});else{const e=this.quill.getBounds(t),i=(0,a.getBoundingRect)(this.quill.root);this._popup.option("position",{of:this.quill.root,offset:{h:e.left,v:e.bottom-i.height},my:"top center",at:"bottom left",collision:"fit flip"})}}insertEmbedContent(e){const t=this.getPosition(),i=e.component.option("selectedItem"),n=(0,o.extend)({},{value:i,escapeChar:this.options.escapeChar});setTimeout((()=>{this.quill.insertEmbed(t,"variable",n),this.quill.setSelection(t+1)}))}}}t.default=c},78397:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(21274);t.default=class{constructor(){this._collection=[]}clear(){this._collection=[]}add(e,t){this._collection.push({name:e,instance:t})}remove(e){this._collection=this._collection.filter((t=>t.name!==e))}getByName(e){let t=null;return(0,n.each)(this._collection,((i,n)=>{let{name:o,instance:a}=n;if(o===e)return t=a,!1})),t}each(e){this._collection.forEach((t=>{let{name:i,instance:n}=t;return n&&e(i,n)}))}}},80865:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(40765))&&n.__esModule?n:{default:n};let a;if(o.default){const e=o.default.import("core/theme");a=class extends e{constructor(e,t){super(e,t),this.quill.root.classList.add("dx-htmleditor-content"),this.quill.root.setAttribute("role","textbox"),this.quill.root.setAttribute("aria-label","Editor content")}}}else a={};t.default=a},41510:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(4671)),o=h(i(65951)),a=h(i(64553)),s=i(87739),r=i(52576),l=i(3104),d=h(i(74075)),u=h(i(97643)),c=i(52071);function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},p.apply(null,arguments)}const g="dx-formdialog";t.default=class{constructor(e,t){this._editorInstance=e,this._popupUserConfig=t,this._renderPopup(),this._attachOptionChangedHandler()}_renderPopup(){const e=this._editorInstance,t=(0,a.default)("<div>").addClass(g).appendTo(e.$element()),i=this._getPopupConfig();return e._createComponent(t,u.default,i)}_attachOptionChangedHandler(){var e;null===(e=this._popup)||void 0===e||e.on("optionChanged",(e=>{let{name:t,value:i}=e;"title"===t&&this._updateFormLabel(i)}))}_escKeyHandler(){this._popup.hide()}_addEscapeHandler(e){e.component.registerKeyHandler("escape",this._escKeyHandler.bind(this))}_isSmallScreen(){const e=(0,l.hasWindow)()?(0,l.getCurrentScreenFactor)():null;return"phone"===o.default.real().deviceType||"xs"===e}_getPopupConfig(){return(0,r.extend)({onInitialized:e=>{this._popup=e.component,this._popup.on("hiding",(()=>this.onHiding())),this._popup.on("shown",(()=>{this._form.focus()}))},deferRendering:!1,focusStateEnabled:!1,showCloseButton:!1,fullScreen:this._isSmallScreen(),contentTemplate:e=>{const t=(0,a.default)("<div>").appendTo(e);this._renderForm(t,{onEditorEnterKey:e=>this.callAddButtonAction(e.event),customizeItem:e=>{"simple"===e.itemType&&(e.editorOptions=(0,r.extend)(!0,{},e.editorOptions,{onInitialized:this._addEscapeHandler.bind(this)}))}})},toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:p({onInitialized:this._addEscapeHandler.bind(this),text:n.default.format("OK"),onClick:e=>this.callAddButtonAction(e.event)},(0,c.isFluent)()?{stylingMode:"contained",type:"default"}:{})},{toolbar:"bottom",location:"after",widget:"dxButton",options:p({onInitialized:this._addEscapeHandler.bind(this),text:n.default.format("Cancel"),onClick:()=>{this._popup.hide()}},(0,c.isFluent)()?{stylingMode:"outlined",type:"normal"}:{})}],_wrapperClassExternal:`${g} dx-dropdowneditor-overlay`},this._popupUserConfig)}onHiding(){this.beforeAddButtonAction=void 0,this.deferred.reject()}callAddButtonAction(e){this.beforeAddButtonAction&&!this.beforeAddButtonAction()||this.hide(this._form.option("formData"),e)}_renderForm(e,t){e.addClass("dx-formdialog-form"),this._form=this._editorInstance._createComponent(e,d.default,t),this._updateFormLabel()}_updateFormLabel(e){var t;const i=e??this.popupOption("title");null===(t=this._form)||void 0===t||t.$element().attr("aria-label",i)}_getDefaultFormOptions(){return{colCount:1,width:"auto",labelLocation:(0,c.isMaterialBased)()?"top":"left"}}formOption(e,t){return this._form.option.apply(this._form,arguments)}show(e){if(this._popup.option("visible"))return;this.deferred=(0,s.Deferred)();const t=(0,r.extend)(this._getDefaultFormOptions(),e);return this._form.option(t),this._popup.show(),this.deferred.promise()}hide(e,t){this.deferred.resolve(e,t),this._popup.hide()}popupOption(e,t){return this._popup.option.apply(this._popup,arguments)}}},85936:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ImageUploader=void 0,t.correctSlashesInUrl=A,t.getFileUploaderBaseOptions=O,t.serverUpload=k,t.urlUpload=P;var n=_(i(4671)),o=_(i(65951)),a=_(i(64553)),s=i(52576),r=i(21274),l=i(57653),d=i(11528),u=_(i(17809)),c=_(i(26980)),h=_(i(20780)),p=i(52071);const g=["imageSrc","src"];function _(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},f.apply(null,arguments)}const m="phone"===o.default.current().deviceType,v="dx-formdialog",C="user",y="silent",b="dx-htmleditor-image";t.ImageUploader=class{constructor(e,t){this.module=e,this.config=t??{},this.quill=this.module.quill,this.editorInstance=this.module.editorInstance}render(){this.editorInstance._formDialog&&(this.editorInstance._formDialog.beforeAddButtonAction=()=>this.getCurrentTab().upload()),this.tabPanelIndex=0,this.formData=this.getFormData(),this.isUpdating=this.isImageUpdating(),this.tabsModel=this.createTabsModel(this.config.tabs),this.tabs=this.createTabs(this.formData);const e=this.getFormConfig();this.updatePopupConfig(),this.updateAddButtonState(),this.editorInstance.showFormDialog(e).done(((e,t)=>{this.tabs[this.getActiveTabIndex()].strategy.pasteImage(e,t)})).always((()=>{this.resetDialogPopupOptions(),this.quill.focus()}))}getCurrentTab(){return this.tabs[this.tabPanelIndex]}updateAddButtonState(){const e=this.getCurrentTab().isDisableButton();this.setAddButtonDisabled(e)}setAddButtonDisabled(e){this.editorInstance.formDialogOption({"toolbarItems[0].options.disabled":e})}getActiveTabIndex(){return this.isUpdating?0:this.tabPanelIndex}getFormData(){return this.getUpdateDialogFormData(this.quill.getFormat())}getUpdateDialogFormData(e){const{imageSrc:t,src:i}=e;return f({src:t??i},function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,g))}createUrlTab(e){return new w(this.module,{config:this.config,formData:e,isUpdating:this.isUpdating},(()=>this.updateAddButtonState()))}createFileTab(){return new S(this.module,{config:this.config},(()=>this.updateAddButtonState()))}createTabsModel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return 0===e.length||this.isUpdating?["url"]:e.map((e=>"object"==typeof e?e.name:e))}createTabs(e){return this.tabsModel.map((t=>"url"===t?this.createUrlTab(e):this.createFileTab()))}isImageUpdating(){return Object.prototype.hasOwnProperty.call(this.module.quill.getFormat()??{},"imageSrc")}updatePopupConfig(){let e=`dx-htmleditor-add-image-popup ${v}`;this.useTabbedItems()&&(e+=" dx-htmleditor-add-image-popup-with-tabs");const t=this.isUpdating?"dxHtmlEditor-dialogUpdateImageCaption":"dxHtmlEditor-dialogImageCaption",i=this.isUpdating?"dxHtmlEditor-dialogImageUpdateButton":"dxHtmlEditor-dialogImageAddButton";this.editorInstance.formDialogOption({title:n.default.format(t),"toolbarItems[0].options.text":n.default.format(i),wrapperAttr:{class:e}})}resetDialogPopupOptions(){this.editorInstance.formDialogOption({"toolbarItems[0].options.text":n.default.format("OK"),"toolbarItems[0].options.visible":!0,"toolbarItems[0].options.disabled":!1,wrapperAttr:{class:v}})}useTabbedItems(){return this.tabsModel.length>1}getFormWidth(){return m?"100%":493}getFormConfig(){return{formData:this.formData,width:this.getFormWidth(),labelLocation:"top",colCount:this.useTabbedItems()?1:11,items:this.getItemsConfig()}}getItemsConfig(){if(this.useTabbedItems()){return[{itemType:"tabbed",tabPanelOptions:{onSelectionChanged:e=>{this.tabPanelIndex=e.component.option("selectedIndex"),this.updateAddButtonState()}},tabs:(0,r.map)(this.tabs,(e=>({title:e.getTabName(),colCount:11,items:e.getItemsConfig()})))}]}return this.tabs[0].getItemsConfig()}};class x{constructor(e,t,i){let{config:n,formData:o,isUpdating:a}=t;this.module=e,this.config=n,this.formData=o,this.isUpdating=a,this.onFileSelected=i,this.strategy=this.createStrategy()}getItemsConfig(){return this.strategy.getItemsConfig()}createStrategy(){return this.isUpdating?new E(this.module,this.config,this.formData):new I(this.module,this.config,this.onFileSelected)}isDisableButton(){return!1}upload(){return this.strategy.upload()}}class w extends x{getTabName(){return n.default.format("dxHtmlEditor-dialogImageSpecifyUrl")}}class S extends x{getTabName(){return n.default.format("dxHtmlEditor-dialogImageSelectFile")}createStrategy(){return new T(this.module,this.config,this.onFileSelected)}isDisableButton(){return!this.strategy.isValid()}}class D{constructor(e,t){this.module=e,this.config=t,this.editorInstance=e.editorInstance,this.quill=e.quill,this.selection=this.getQuillSelection()}getQuillSelection(){return this.quill.getSelection()??{index:this.quill.getLength(),length:0}}pasteImage(e,t){}isValid(){return!0}upload(){}}class I extends D{constructor(e,t,i){super(e,t,i),this.shouldKeepAspectRatio=!0}pasteImage(e,t){this.module.saveValueChangeEvent(t),P(this.quill,this.selection.index,e)}keepAspectRatio(e,t){let{dependentEditor:i,e:n}=t;const o=parseInt(n.value),a=parseInt(n.previousValue),s=parseInt(i.option("value"));e.component.updateData(e.dataField,o),this.shouldKeepAspectRatio&&s&&a&&!this.preventRecalculating&&(this.preventRecalculating=!0,i.option("value",Math.round(o*s/parseInt(a)).toString())),this.preventRecalculating=!1}createKeepAspectRatioEditor(e,t,i){return this.editorInstance._createComponent(e,h.default,(0,s.extend)(!0,t.editorOptions,{value:t.component.option("formData")[t.dataField],onEnterKey:t.component.option("onEditorEnterKey").bind(this.editorInstance._formDialog,t),onValueChanged:e=>{this.keepAspectRatio(t,{dependentEditor:this[`${i}Editor`],e:e})}}))}upload(){return this.editorInstance._formDialog._form.validate().isValid}getItemsConfig(){const e=(0,p.isFluent)()?"text":"outlined";return[{dataField:"src",colSpan:11,label:{text:n.default.format("dxHtmlEditor-dialogImageUrlField")},validationRules:[{type:"required"},{type:"stringLength",min:1}]},{dataField:"width",colSpan:6,label:{text:n.default.format("dxHtmlEditor-dialogImageWidthField")},template:t=>{const i=(0,a.default)("<div>").addClass("dx-fix-ratio-container"),o=(0,a.default)("<div>").appendTo(i);this.widthEditor=this.createKeepAspectRatioEditor(o,t,"height");const s=(0,a.default)("<div>").appendTo(i);return this.editorInstance._createComponent(s,u.default,{items:[{icon:"imgarlock",value:"keepRatio"}],hint:n.default.format("dxHtmlEditor-dialogImageKeepAspectRatio"),focusStateEnabled:!1,keyExpr:"value",stylingMode:e,selectionMode:"multiple",selectedItemKeys:["keepRatio"],onSelectionChanged:e=>{this.shouldKeepAspectRatio=!!e.component.option("selectedItems").length}}),i}},{dataField:"height",colSpan:5,label:{text:n.default.format("dxHtmlEditor-dialogImageHeightField")},template:e=>{const t=(0,a.default)("<div>");return this.heightEditor=this.createKeepAspectRatioEditor(t,e,"width"),t}},{dataField:"alt",colSpan:11,label:{text:n.default.format("dxHtmlEditor-dialogImageAltField")}}]}}class E extends I{constructor(e,t,i,n){super(e,t,n),this.formData=i,this.modifyFormData()}modifyFormData(){const{imageSrc:e}=this.quill.getFormat(this.selection.index-1,1);e&&0!==this.selection.index||(this.selection={index:this.selection.index+1,length:0},this.quill.setSelection(this.selection.index,this.selection.length,y));const t=this.quill.getLeaf(this.selection.index)[0].domNode;t&&(this.formData.width=this.formData.width??(0,l.getWidth)((0,a.default)(t)),this.formData.height=this.formData.height??(0,l.getHeight)((0,a.default)(t)))}pasteImage(e,t){this.quill.deleteText(this.embedFormatIndex(),1,y),this.selection.index-=1,super.pasteImage(e,t)}embedFormatIndex(){const e=this.selection??this.quill.getSelection();return e?e.length?e.index:e.index-1:this.quill.getLength()}}class T extends D{constructor(e,t,i){super(e,t,i),this.useBase64=!(0,d.isDefined)(this.config.fileUploadMode)||"base64"===this.config.fileUploadMode,this.isValidInternal=!1,this.onFileSelected=i,this.data=null}upload(){return this.useBase64?this.base64Upload(this.data):this.data.value.length&&this.data.component.upload(),!0}isValid(){return this.isValidInternal}onUploaded(e){k(this.config.uploadDirectory,e.file.name,this.quill,this.selection.index)}base64Upload(e){this.quill.getModule("uploader").upload(this.selection,e.value,!0)}pasteImage(e,t){this.useBase64&&super.pasteImage(e,t)}isBase64Editable(){return"both"===this.config.fileUploadMode}validate(e){const t=e.component;this.isValidInternal=!t._files.some((e=>!e.isValid())),0===t._files.length&&(this.isValidInternal=!1)}getFileUploaderOptions(){const e={uploadUrl:this.config.uploadUrl,onValueChanged:e=>{this.validate(e),this.data=e,this.onFileSelected()},onUploaded:e=>this.onUploaded(e)};return(0,s.extend)({},O(),e,this.config.fileUploaderOptions)}getItemsConfig(){return[{itemType:"simple",dataField:"files",colSpan:11,label:{visible:!1},template:()=>{const e=(0,a.default)("<div>");return this.module.editorInstance._createComponent(e,c.default,this.getFileUploaderOptions()),e}},{itemType:"simple",colSpan:11,label:{visible:!1},editorType:"dxCheckBox",editorOptions:{value:this.useBase64,visible:this.isBase64Editable(),text:n.default.format("dxHtmlEditor-dialogImageEncodeToBase64"),onValueChanged:e=>{this.isBase64Editable()&&(this.useBase64=e.value)}}}]}}function A(e){return"/"!==e[e.length-1]?`${e}/`:e}function O(){return{value:[],name:b,accept:"image/*",uploadMode:"useButtons"}}function P(e,t,i){e.insertEmbed(t,"extendedImage",i,C),e.setSelection(t+1,0,C)}function k(e,t,i,n){if(e){P(i,n,{src:A(e)+t})}}},53548:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TABLE_OPERATIONS=void 0,t.getAutoSizedElements=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"horizontal";const i=[],n="horizontal"===t;return(n?l(e):d(e)).each(((e,t)=>{const a=(0,o.default)(t);""===a.get(0).style[n?"width":"height"]&&i.push(a)})),i},t.getColumnElements=l,t.getLineElements=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"horizontal";return"horizontal"===i?d(e,t):l(e,t)},t.getRowElements=d,t.getTableFormats=function(e){const t=e.getModule("table");return null!=t&&t.tableFormats?t.tableFormats():r},t.getTableOperationHandler=function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),o=2;o<i;o++)n[o-2]=arguments[o];return()=>{const i=e.getModule("table");if(i)return e.focus(),i[t](...n)}},t.hasEmbedContent=function(e,t){return!!t&&e.quill.getText(t).length<t.length},t.setLineElementsFormat=function(e,t){let{elements:i,property:n,value:o}=t;const r=e.quill.getModule("table").tableBlots,l=`cell${(0,a.camelize)(n,!0)}`;(0,s.each)(i,((t,i)=>{var n;let a=e.quill.scroll.find(i);if(!r.includes(a.statics.blotName)){const e=a.descendant((e=>r.includes(e.statics.blotName)));a=e?e[0]:null}null===(n=a)||void 0===n||n.format(l,`${o}px`)}))},t.unfixTableWidth=function(e,t){let{tableBlot:i,quill:n}=t;(i??n.scroll.find(e.get(0))).format("tableWidth","initial")};var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(53124),s=i(21274);const r=["table","tableHeaderCell"];t.TABLE_OPERATIONS=["insertTable","insertHeaderRow","insertRowAbove","insertRowBelow","insertColumnLeft","insertColumnRight","deleteColumn","deleteRow","deleteTable","cellProperties","tableProperties"];function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.find("tr").eq(t).find("th, td")}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.find(`th:nth-child(${1+t}), td:nth-child(${1+t})`)}},28552:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(11528);t.default=class{constructor(){this._storage={}}set(e,t){let{editorKey:i,marker:n}=e;var o;(o=this._storage)[i]??(o[i]={}),this._storage[i][n]=t}get(e){var t,i;let{editorKey:o,marker:a}=e;return!(0,n.isDefined)(o)?null===(t=Object.values(this._storage).at(-1))||void 0===t?void 0:t[a]:null===(i=this._storage[o])||void 0===i?void 0:i[a]}delete(e){let{editorKey:t,marker:i}=e;this._storage[t]&&(delete this._storage[t][i],(0,n.isEmptyObject)(this._storage[t])&&delete this._storage[t])}}},12873:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ICON_MAP=void 0,t.applyFormat=R,t.getDefaultClickHandler=W,t.getFormatHandlers=function(e){return{clear:t=>{let{event:i}=t;const n=e.quill.getSelection();var o;n&&(e.saveValueChangeEvent(i),e.quill.removeFormat(n),null===(o=z(e))||void 0===o||o.updateFormatWidgets())},link:B(e),image:V(e,e.editorInstance.option("imageUpload")),color:H(e,"color"),background:H(e,"background"),orderedList:N(e,"list","ordered"),bulletList:N(e,"list","bullet"),alignLeft:N(e,"align","left"),alignCenter:N(e,"align","center"),alignRight:N(e,"align","right"),alignJustify:N(e,"align","justify"),codeBlock:W(e,"code-block"),undo:t=>{let{event:i}=t;e.saveValueChangeEvent(i),e.quill.history.undo()},redo:t=>{let{event:i}=t;e.saveValueChangeEvent(i),e.quill.history.redo()},increaseIndent:t=>{let{event:i}=t;R(e,["indent","+1",y],i)},decreaseIndent:t=>{let{event:i}=t;R(e,["indent","-1",y],i)},superscript:N(e,"script","super"),subscript:N(e,"script","sub"),insertTable:$(e),insertHeaderRow:(0,f.getTableOperationHandler)(e.quill,"insertHeaderRow"),insertRowAbove:(0,f.getTableOperationHandler)(e.quill,"insertRowAbove"),insertRowBelow:(0,f.getTableOperationHandler)(e.quill,"insertRowBelow"),insertColumnLeft:(0,f.getTableOperationHandler)(e.quill,"insertColumnLeft"),insertColumnRight:(0,f.getTableOperationHandler)(e.quill,"insertColumnRight"),deleteColumn:(0,f.getTableOperationHandler)(e.quill,"deleteColumn"),deleteRow:(0,f.getTableOperationHandler)(e.quill,"deleteRow"),deleteTable:(0,f.getTableOperationHandler)(e.quill,"deleteTable"),cellProperties:M(e,"cell"),tableProperties:M(e,"table")}};var n=m(i(4671)),o=m(i(64553)),a=i(53124),s=i(21274),r=i(57653),l=i(11528),d=i(3104),u=m(i(17809)),c=m(i(87928)),h=m(i(74075)),p=m(i(91374)),g=i(58283),_=i(85936),f=i(53548);function m(e){return e&&e.__esModule?e:{default:e}}const v=400,C=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"].map((e=>({id:e,value:n.default.format(`dxHtmlEditor-borderStyle${(0,a.camelize)(e,!0)}`)}))),y="user",b="silent",x="dxHtmlEditor-dialogColorCaption",w="dxHtmlEditor-dialogBackgroundCaption",S="dxHtmlEditor-dialogLinkCaption",D="dxHtmlEditor-dialogInsertTableCaption",I="dxHtmlEditor-dialogLinkUrlField",E="dxHtmlEditor-dialogLinkTextField",T="dxHtmlEditor-dialogLinkTargetField",A="dx-formdialog-field-target",O="dxHtmlEditor-dialogInsertTableRowsField",P="dxHtmlEditor-dialogInsertTableColumnsField";t.ICON_MAP={insertHeaderRow:"header",clear:"clearformat"};function k(e,t){let{contentTemplate:i,title:n,minHeight:o,minWidth:a,maxWidth:s}=t;e.formDialogOption({contentTemplate:i,title:n,minHeight:o??0,minWidth:a??0,maxWidth:s??"none"})}function M(e,t){return i=>{var a;null!==(a=i)&&void 0!==a&&a.length||(i=(0,o.default)(function(e,t){const i=e.quill.getModule("table").getTable();return"table"===t?i[0].domNode:i[2].domNode}(e,t)));const[s,l]=e.quill.getModule("table").getTable()??[],u=e.quill.getFormat(e.editorInstance.getSelection(!0)),c=function(e){return"cell"===e?j:G}(t)(e,{$element:i,formats:u,tableBlot:s,rowBlot:l}),{contentTemplate:g,title:_,minHeight:f,minWidth:m,maxWidth:C}=e.editorInstance._formDialog._popup.option(),y={contentTemplate:g,title:_,minHeight:f,minWidth:m,maxWidth:C};let b;e.editorInstance.formDialogOption({contentTemplate:t=>{const i=(0,o.default)("<div>").appendTo(t),n=(0,o.default)("<div>").appendTo(i);return e.editorInstance._createComponent(n,h.default,c.formOptions),e.editorInstance._createComponent(i,p.default,{}),b=n.dxForm("instance"),i},title:n.default.format(`dxHtmlEditor-${t}Properties`),minHeight:v,minWidth:Math.min(800,.9*(0,r.getWidth)((0,d.getWindow)())-1),maxWidth:.9*(0,r.getWidth)((0,d.getWindow)())});const x=e.editorInstance.showFormDialog();x.done(((t,i)=>{e.saveValueChangeEvent(i),c.applyHandler(b),k(e.editorInstance,y)})),x.fail((()=>{e.quill.focus(),k(e.editorInstance,y)}))}}function R(e,t,i){e.saveValueChangeEvent(i),e.quill.format(...t)}function L(e){return Array.isArray(e)?e[0]:e}function B(e){return()=>{var t;e.quill.focus();let i=e.quill.getSelection();const o=i?e.quill.getFormat():{},a=void 0!==o.link&&0===(null===(t=i)||void 0===t?void 0:t.length);let s=o.link||"";if(a){const t=function(e,t){const i=(0,g.getQuill)().import("formats/link");let n,o;return[n,o]=e.quill.scroll.descendant(i,t.index),n||0!==t.length||([n,o]=e.quill.scroll.descendant(i,t.index-1),n&&(o+=1)),n?{index:t.index-o,length:n.length()}:null}(e,i);t?i=t:s=""}const r=(0,f.hasEmbedContent)(e,i),l={href:s,text:i&&!r?e.quill.getText(i):"",target:!Object.prototype.hasOwnProperty.call(o,"target")||!!o.target};e.editorInstance.formDialogOption("title",n.default.format(S));const d=e.editorInstance.showFormDialog({formData:l,items:F(r)});d.done(((t,n)=>{if(i&&!r){const o=t.text||t.href,{index:a,length:s}=i;t.text=void 0,e.saveValueChangeEvent(n),s&&e.quill.deleteText(a,s,b),e.quill.insertText(a,o,"link",t,y),e.quill.setSelection(a+o.length,0,y)}else t.text=i||t.text?t.text:t.href,R(e,["link",t,y],n)})),d.fail((()=>{e.quill.focus()}))}}function V(e,t){const i=new _.ImageUploader(e,t);return()=>{i.render()}}function F(e){return[{dataField:"href",label:{text:n.default.format(I)}},{dataField:"text",label:{text:n.default.format(E)},visible:!e},{dataField:"target",editorType:"dxCheckBox",editorOptions:{text:n.default.format(T)},cssClass:A,label:{visible:!1}}]}function H(e,t){return()=>{const i=e.quill.getFormat(),o="color"===t?x:w;e.editorInstance.formDialogOption("title",n.default.format(o));const a=e.editorInstance.showFormDialog({formData:i,items:[{dataField:t,editorType:"dxColorView",editorOptions:{focusStateEnabled:!1},label:{visible:!1}}]});a.done(((i,n)=>{R(e,[t,i[t],y],n)})),a.fail((()=>{e.quill.focus()}))}}function N(e,t,i){return n=>{var o;let{event:a}=n;const s=e.quill.getFormat()[t]!==i&&i;R(e,[t,s,y],a),null===(o=z(e))||void 0===o||o.updateFormatWidgets(!0)}}function z(e){return e._updateFormatWidget?e:e.quill.getModule("toolbar")}function W(e,t){return i=>{var n;let{event:o}=i;const a=e.quill.getFormat(),s=a[t],r=!((0,l.isBoolean)(s)?s:(0,l.isDefined)(s));R(e,[t,r,y],o),null===(n=z(e))||void 0===n||n._updateFormatWidget(t,r,a)}}function $(e){return()=>{const t=e.quill.getFormat();if(e._tableFormats.some((e=>Object.prototype.hasOwnProperty.call(t,e))))return void e.quill.focus();e.editorInstance.formDialogOption("title",n.default.format(D));e.editorInstance.showFormDialog({formData:{rows:1,columns:1},items:[{dataField:"columns",editorType:"dxNumberBox",editorOptions:{min:1},label:{text:n.default.format(O)}},{dataField:"rows",editorType:"dxNumberBox",editorOptions:{min:1},label:{text:n.default.format(P)}}]}).done(((t,i)=>{e.quill.focus();const n=e.quill.getModule("table");if(n){e.saveValueChangeEvent(i);const{columns:o,rows:a}=t;n.insertTable(o,a)}})).always((()=>{e.quill.focus()}))}}function G(e,t){let{$element:i,formats:a,tableBlot:h}=t;const p=(0,d.getWindow)();let g,_,m;const v=i,{editorInstance:y}=e,b=parseInt(a.tableWidth)||(0,r.getOuterWidth)(v),x=p.getComputedStyle(v.get(0)),w="start"===x.textAlign?"left":x.textAlign;return{formOptions:{colCount:2,formData:{width:b,height:(0,l.isDefined)(a.tableHeight)?parseInt(a.tableHeight):(0,r.getOuterHeight)(v),backgroundColor:a.tableBackgroundColor||x.backgroundColor,borderStyle:a.tableBorderStyle||x.borderTopStyle,borderColor:a.tableBorderColor||x.borderTopColor,borderWidth:parseInt((0,l.isDefined)(a.tableBorderWidth)?a.tableBorderWidth:x.borderTopWidth),alignment:a.tableAlign||w},items:[{itemType:"group",caption:n.default.format("dxHtmlEditor-border"),colCountByScreen:{xs:2},colCount:2,items:[{dataField:"borderStyle",label:{text:n.default.format("dxHtmlEditor-style")},editorType:"dxSelectBox",editorOptions:{items:C,valueExpr:"id",displayExpr:"value",placeholder:"Select style"}},{dataField:"borderWidth",label:{text:n.default.format("dxHtmlEditor-borderWidth")},editorOptions:{placeholder:n.default.format("dxHtmlEditor-pixels")}},{itemType:"simple",dataField:"borderColor",label:{text:n.default.format("dxHtmlEditor-borderColor")},colSpan:2,template:e=>{const t=(0,o.default)("<div>");return y._createComponent(t,c.default,{editAlphaChannel:!0,value:e.component.option("formData").borderColor,onInitialized:e=>{_=e.component}}),t}}]},{itemType:"group",caption:n.default.format("dxHtmlEditor-dimensions"),colCountByScreen:{xs:2},colCount:2,items:[{dataField:"width",label:{text:n.default.format("dxHtmlEditor-width")},editorOptions:{min:0,placeholder:n.default.format("dxHtmlEditor-pixels")}},{dataField:"height",label:{text:n.default.format("dxHtmlEditor-height")},editorOptions:{min:0,placeholder:n.default.format("dxHtmlEditor-pixels")}}]},{itemType:"group",caption:n.default.format("dxHtmlEditor-tableBackground"),items:[{itemType:"simple",dataField:"backgroundColor",label:{text:n.default.format("dxHtmlEditor-borderColor")},template:e=>{const t=(0,o.default)("<div>");return y._createComponent(t,c.default,{editAlphaChannel:!0,value:e.component.option("formData").backgroundColor,onInitialized:e=>{m=e.component}}),t}}]},{itemType:"group",caption:n.default.format("dxHtmlEditor-alignment"),items:[{itemType:"simple",label:{text:n.default.format("dxHtmlEditor-horizontal")},template:()=>{const e=(0,o.default)("<div>");return y._createComponent(e,u.default,{items:[{value:"left",icon:"alignleft"},{value:"center",icon:"aligncenter"},{value:"right",icon:"alignright"},{value:"justify",icon:"alignjustify"}],keyExpr:"value",selectedItemKeys:[w],onInitialized:e=>{g=e.component}}),e}}]}],showColonAfterLabel:!0,labelLocation:"top",minColWidth:400},applyHandler:t=>{const i=t.option("formData"),n=i.width===b?void 0:i.width,a=i.height;!function(e,t){let{$table:i,newHeight:n,newWidth:a,tableBlot:d}=t;if((0,l.isDefined)(a)){if((0,f.getAutoSizedElements)(i).length>0)e.editorInstance.format("tableWidth",`${a}px`);else{const t=(0,f.getColumnElements)(i),n=(0,r.getOuterWidth)(i);(0,f.unfixTableWidth)(i,{tableBlot:d}),(0,s.each)(t,((t,s)=>{const l=(0,o.default)(s),d=a/n*(0,r.getOuterWidth)(l),u=(0,f.getLineElements)(i,l.index(),"horizontal");(0,f.setLineElementsFormat)(e,{elements:u,property:"width",value:d})}))}}const u=(0,f.getAutoSizedElements)(i,"vertical");if((null==u?void 0:u.length)>0)d.format("tableHeight",`${n}px`);else{const t=(0,f.getRowElements)(i),a=(0,r.getOuterHeight)(i);(0,s.each)(t,((t,s)=>{const l=(0,o.default)(s),d=n/a*(0,r.getOuterHeight)(l),u=(0,f.getLineElements)(i,t,"vertical");(0,f.setLineElementsFormat)(e,{elements:u,property:"height",value:d})}))}}(e,{$table:v,newHeight:a,newWidth:n,tableBlot:h}),e.editorInstance.format("tableBorderStyle",i.borderStyle),e.editorInstance.format("tableBorderWidth",`${i.borderWidth}px`),e.editorInstance.format("tableBorderColor",_.option("value")),e.editorInstance.format("tableBackgroundColor",m.option("value")),e.editorInstance.format("tableTextAlign",g.option("selectedItemKeys")[0])}}}function j(e,t){let{$element:i,formats:a,tableBlot:s,rowBlot:h}=t;const p=(0,d.getWindow)();let g,_,m,v;const y=i,b=(0,l.isDefined)(a.cellWidth)?parseInt(a.cellWidth):(0,r.getOuterWidth)(y),{editorInstance:x}=e,w=p.getComputedStyle(y.get(0)),S="start"===w.textAlign?"left":w.textAlign;return{formOptions:{colCount:2,formData:{width:b,height:(0,l.isDefined)(a.cellHeight)?parseInt(a.cellHeight):(0,r.getOuterHeight)(y),backgroundColor:L(a.cellBackgroundColor)||w.backgroundColor,borderStyle:a.cellBorderStyle||w.borderTopStyle,borderColor:L(a.cellBorderColor)||w.borderTopColor,borderWidth:parseInt((0,l.isDefined)(a.cellBorderWidth)?a.cellBorderWidth:w.borderTopWidth),alignment:a.cellTextAlign||S,verticalAlignment:a.cellVerticalAlign||w.verticalAlign,verticalPadding:parseInt((0,l.isDefined)(a.cellPaddingTop)?a.cellPaddingTop:w.paddingTop),horizontalPadding:parseInt((0,l.isDefined)(a.cellPaddingLeft)?a.cellPaddingLeft:w.paddingLeft)},items:[{itemType:"group",caption:n.default.format("dxHtmlEditor-border"),colCountByScreen:{xs:2},colCount:2,items:[{dataField:"borderStyle",label:{text:n.default.format("dxHtmlEditor-style")},editorType:"dxSelectBox",editorOptions:{items:C,valueExpr:"id",displayExpr:"value"}},{dataField:"borderWidth",label:{text:n.default.format("dxHtmlEditor-borderWidth")},editorOptions:{placeholder:n.default.format("dxHtmlEditor-pixels")}},{itemType:"simple",dataField:"borderColor",colSpan:2,label:{text:n.default.format("dxHtmlEditor-borderColor")},template:e=>{const t=(0,o.default)("<div>");return x._createComponent(t,c.default,{editAlphaChannel:!0,value:e.component.option("formData").borderColor,onInitialized:e=>{m=e.component}}),t}}]},{itemType:"group",caption:n.default.format("dxHtmlEditor-dimensions"),colCount:2,colCountByScreen:{xs:2},items:[{dataField:"width",label:{text:n.default.format("dxHtmlEditor-width")},editorOptions:{min:0,placeholder:n.default.format("dxHtmlEditor-pixels")}},{dataField:"height",label:{text:n.default.format("dxHtmlEditor-height")},editorOptions:{min:0,placeholder:n.default.format("dxHtmlEditor-pixels")}},{dataField:"verticalPadding",label:{text:n.default.format("dxHtmlEditor-paddingVertical")},editorOptions:{placeholder:n.default.format("dxHtmlEditor-pixels")}},{label:{text:n.default.format("dxHtmlEditor-paddingHorizontal")},dataField:"horizontalPadding",editorOptions:{placeholder:n.default.format("dxHtmlEditor-pixels")}}]},{itemType:"group",caption:n.default.format("dxHtmlEditor-tableBackground"),items:[{itemType:"simple",dataField:"backgroundColor",label:{text:n.default.format("dxHtmlEditor-borderColor")},template:e=>{const t=(0,o.default)("<div>");return x._createComponent(t,c.default,{editAlphaChannel:!0,value:e.component.option("formData").backgroundColor,onInitialized:e=>{v=e.component}}),t}}]},{itemType:"group",caption:n.default.format("dxHtmlEditor-alignment"),colCount:2,items:[{itemType:"simple",label:{text:n.default.format("dxHtmlEditor-horizontal")},template:()=>{const e=(0,o.default)("<div>");return x._createComponent(e,u.default,{items:[{value:"left",icon:"alignleft"},{value:"center",icon:"aligncenter"},{value:"right",icon:"alignright"},{value:"justify",icon:"alignjustify"}],keyExpr:"value",selectedItemKeys:[S],onInitialized:e=>{g=e.component}}),e}},{itemType:"simple",label:{text:n.default.format("dxHtmlEditor-vertical")},template:()=>{const e=(0,o.default)("<div>");return x._createComponent(e,u.default,{items:[{value:"top",icon:"verticalaligntop"},{value:"middle",icon:"verticalaligncenter"},{value:"bottom",icon:"verticalalignbottom"}],keyExpr:"value",selectedItemKeys:[w.verticalAlign],onInitialized:e=>{_=e.component}}),e}}]}],showColonAfterLabel:!0,labelLocation:"top",minColWidth:400},applyHandler:t=>{const i=t.option("formData"),n=i.width===parseInt(b)?void 0:i.width,a=i.height;!function(e,t){let{$cell:i,newHeight:n,newWidth:a,tableBlot:s,rowBlot:d}=t;const u=(0,o.default)(i.closest("table"));if((0,l.isDefined)(a)){const t=(0,o.default)(i).index();let n=(0,f.getLineElements)(u,t);const l=a-(0,r.getOuterWidth)(i);a>(0,r.getOuterWidth)(u)&&(0,f.unfixTableWidth)(u,{tableBlot:s}),(0,f.setLineElementsFormat)(e,{elements:n,property:"width",value:a});const d=i.next();if(0===(0,f.getAutoSizedElements)(u).length)if((0,f.unfixTableWidth)(u,{tableBlot:s}),1===d.length){n=(0,f.getLineElements)(u,t+1);const i=(0,r.getOuterWidth)(n.eq(0))-l;(0,f.setLineElementsFormat)(e,{elements:n,property:"width",value:Math.max(i,0)})}else{if(1===i.prev().length){n=(0,f.getLineElements)(u,t-1);const i=(0,r.getOuterWidth)(n.eq(0))-l;(0,f.setLineElementsFormat)(e,{elements:n,property:"width",value:Math.max(i,0)})}}}d.children.forEach((e=>{e.format("cellHeight",`${n}px`)}));0===(0,f.getAutoSizedElements)(u,"vertical").length&&u.css("height","auto")}(e,{$cell:y,newHeight:a,newWidth:n,tableBlot:s,rowBlot:h}),e.editorInstance.format("cellBorderWidth",`${i.borderWidth}px`),e.editorInstance.format("cellBorderColor",m.option("value")),e.editorInstance.format("cellBorderStyle",i.borderStyle),e.editorInstance.format("cellBackgroundColor",v.option("value")),e.editorInstance.format("cellTextAlign",g.option("selectedItemKeys")[0]),e.editorInstance.format("cellVerticalAlign",_.option("selectedItemKeys")[0]),e.editorInstance.format("cellPaddingLeft",`${i.horizontalPadding}px`),e.editorInstance.format("cellPaddingRight",`${i.horizontalPadding}px`),e.editorInstance.format("cellPaddingTop",`${i.verticalPadding}px`),e.editorInstance.format("cellPaddingBottom",`${i.verticalPadding}px`)}}}},69294:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(i(64553)),o=a(i(85149));function a(e){return e&&e.__esModule?e:{default:e}}const s="dx-list-item-badge-container",r="dx-list-item-chevron-container",l=o.default.inherit({_renderWatchers(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this)),this._startWatcher("showChevron",this._renderShowChevron.bind(this))},_renderBadge(e){if(this._$element.children(`.${s}`).remove(),!e)return;const t=(0,n.default)("<div>").addClass(s).append((0,n.default)("<div>").addClass("dx-list-item-badge").addClass("dx-badge").text(e)),i=this._$element.children(`.${r}`).first();i.length>0?t.insertBefore(i):t.appendTo(this._$element)},_renderShowChevron(e){if(this._$element.children(`.${r}`).remove(),!e)return;const t=(0,n.default)("<div>").addClass(r),i=(0,n.default)("<div>").addClass("dx-list-item-chevron");t.append(i).appendTo(this._$element)}});t.default=l},26031:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ListBase=void 0,t.setScrollView=function(e){W=e};var n=i(16826),o=i(64044),a=M(i(92774)),s=i(80250),r=i(98834),l=M(i(4671)),d=M(i(65951)),u=i(61404),c=M(i(19427)),h=M(i(64553)),p=i(27286),g=i(17781),_=i(31e3),f=i(87739),m=i(52576),v=i(69629),C=i(21274),y=i(57653),b=i(11528),x=i(3104),w=M(i(64973)),S=M(i(55213)),D=M(i(91374)),I=i(52071),E=i(63322),T=M(i(85991)),A=i(65180),O=i(72840),P=M(i(59803)),k=M(i(69294));function M(e){return e&&e.__esModule?e:{default:e}}const R="dx-list-item",L=`.${R}`,B="dx-list-group",V="dx-list-group-header",F="dx-list-group-body",H="dx-list-group-collapsed",N=".dx-list-select-all",z=(0,_.compileGetter)("items");let W;const $=t.ListBase=S.default.inherit({_activeStateUnit:[L,N].join(","),_supportedKeys(){const e=this,t=function(t){let n=i(t);n.is(e.option("focusedElement"))&&(!function(t,i){let n=t.position().top;"prev"===i&&(n=t.position().top-(0,y.getHeight)(e.$element())+(0,y.getOuterHeight)(t));e.scrollTo(n)}(n,t),n=i(t)),e.option("focusedElement",(0,u.getPublicElement)(n)),e.scrollToItem(n)};function i(t){const i=e.scrollTop(),n=(0,y.getHeight)(e.$element());let o=(0,h.default)(e.option("focusedElement")),a=!0;if(!o.length)return(0,h.default)();for(;a;){const e=o[t]();if(!e.length)break;const s=e.position().top+(0,y.getOuterHeight)(e)/2;a=s<n+i&&s>i,a&&(o=e)}return o}return(0,m.extend)(this.callBase(),{leftArrow:g.noop,rightArrow:g.noop,pageUp:()=>(t("prev"),!1),pageDown:()=>(t("next"),!1)})},_getDefaultOptions(){return(0,m.extend)(this.callBase(),{hoverStateEnabled:!0,pullRefreshEnabled:!1,scrollingEnabled:!0,selectByClick:!0,showScrollbar:"onScroll",useNativeScrolling:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,pullingDownText:l.default.format("dxList-pullingDownText"),pulledDownText:l.default.format("dxList-pulledDownText"),refreshingText:l.default.format("dxList-refreshingText"),pageLoadingText:l.default.format("dxList-pageLoadingText"),onScroll:null,onPullRefresh:null,onPageLoading:null,pageLoadMode:"scrollBottom",nextButtonText:l.default.format("dxList-nextButtonText"),onItemSwipe:null,grouped:!1,onGroupRendered:null,collapsibleGroups:!1,groupTemplate:"group",indicateLoading:!0,activeStateEnabled:!0,_itemAttributes:{role:"option"},useInkRipple:!1,wrapItemText:!1,_swipeEnabled:!0,showChevronExpr:e=>e?e.showChevron:void 0,badgeExpr:e=>e?e.badge:void 0,_onItemsRendered:()=>{}})},_defaultOptionsRules(){const e=(0,I.current)();return this.callBase().concat((0,A.deviceDependentOptions)(),[{device:()=>!T.default.nativeScrolling,options:{useNativeScrolling:!1}},{device:e=>!T.default.nativeScrolling&&!d.default.isSimulator()&&"desktop"===d.default.real().deviceType&&"generic"===e.platform,options:{showScrollbar:"onHover",pageLoadMode:"nextButton"}},{device:()=>"desktop"===d.default.real().deviceType&&!d.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,I.isMaterial)(e),options:{useInkRipple:!0}},{device:()=>(0,I.isMaterialBased)(e),options:{pullingDownText:"",pulledDownText:"",refreshingText:"",pageLoadingText:""}}])},_visibilityChanged(e){e&&this._updateLoadingState(!0)},_itemClass:()=>R,_itemDataKey:()=>"dxListItemData",_itemContainer(){return this._$container},_getItemsContainer(){return this._$listContainer},_cleanItemContainer(){this.callBase();const e=this._getItemsContainer();(0,h.default)(e).empty(),e.appendTo(this._$container)},_saveSelectionChangeEvent(e){this._selectionChangeEventInstance=e},_getSelectionChangeEvent(){return this._selectionChangeEventInstance},_refreshItemElements(){const{grouped:e}=this.option(),t=this._getItemsContainer();this._itemElementsCache=e?t.children(`.${B}`).children(`.${F}`).children(this._itemSelector()):t.children(this._itemSelector())},_getItemAndHeaderElements(){const e=`${`> .${F} > ${this._itemSelector()}`}, > .${V}`;return this._getItemsContainer().children(`.${B}`).find(e)},_getAvailableItems(e){const{collapsibleGroups:t}=this.option();if(t){return this._getItemAndHeaderElements().filter(((e,t)=>!!(0,h.default)(t).hasClass(V)||!(0,h.default)(t).closest(`.${B}`).hasClass(H)))}return this.callBase(e)},_modifyByChanges(){this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},reorderItem(e,t){return this.callBase(e,t).done((function(){this._refreshItemElements()}))},deleteItem(e){return this.callBase(e).done((function(){this._refreshItemElements()}))},_itemElements(){return this._itemElementsCache},_itemSelectHandler(e){if("single"===this.option("selectionMode")&&this.isItemSelected(e.currentTarget))return;const t=(0,h.default)(e.target).closest(".dx-list-select-checkbox").length||(0,h.default)(e.target).closest(".dx-list-select-radiobutton").length;return t&&this.option("focusedElement",e.currentTarget),this.callBase(e,t)},_allowDynamicItemsAppend:()=>!0,_updateActiveStateUnit(){const{collapsibleGroups:e}=this.option(),t=[L,N];e&&t.push(`.${V}`),this._activeStateUnit=t.join(",")},_init(){this._updateActiveStateUnit(),this.callBase(),this._dataController.resetDataSourcePageIndex(),this._$container=this.$element(),this._$listContainer=(0,h.default)("<div>").addClass("dx-list-items"),this._initScrollView(),this._feedbackShowTimeout=70,this._createGroupRenderAction()},_scrollBottomMode(){return"scrollBottom"===this.option("pageLoadMode")},_nextButtonMode(){return"nextButton"===this.option("pageLoadMode")},_dataSourceOptions(){const e=this._scrollBottomMode(),t=this._nextButtonMode();return(0,m.extend)(this.callBase(),{paginate:(0,g.ensureDefined)(e||t,!0)})},_getGroupedOption(){return this.option("grouped")},_getGroupContainerByIndex(e){return this._getItemsContainer().find(`.${B}`).eq(e).find(`.${F}`)},_dataSourceFromUrlLoadMode:()=>"raw",_initScrollView(){const e=this.option("scrollingEnabled"),t=e&&this.option("pullRefreshEnabled"),i=e&&this._scrollBottomMode()&&!!this._dataController.getDataSource();this._scrollView=this._createComponent(this.$element(),W||D.default,{height:this.option("height"),width:this.option("width"),disabled:this.option("disabled")||!e,onScroll:this._scrollHandler.bind(this),onPullDown:t?this._pullDownHandler.bind(this):null,onReachBottom:i?this._scrollBottomHandler.bind(this):null,showScrollbar:this.option("showScrollbar"),useNative:this.option("useNativeScrolling"),bounceEnabled:this.option("bounceEnabled"),scrollByContent:this.option("scrollByContent"),scrollByThumb:this.option("scrollByThumb"),pullingDownText:this.option("pullingDownText"),pulledDownText:this.option("pulledDownText"),refreshingText:this.option("refreshingText"),reachBottomText:this.option("pageLoadingText"),useKeyboard:!1}),this._$container=(0,h.default)(this._scrollView.content()),this._$listContainer.appendTo(this._$container),this._toggleWrapItemText(this.option("wrapItemText")),this._createScrollViewActions()},_toggleWrapItemText(e){this._$listContainer.toggleClass("dx-wrap-item-text",e)},_createScrollViewActions(){this._scrollAction=this._createActionByOption("onScroll"),this._pullRefreshAction=this._createActionByOption("onPullRefresh"),this._pageLoadingAction=this._createActionByOption("onPageLoading")},_scrollHandler(e){this._scrollAction&&this._scrollAction(e)},_initTemplates(){this._templateManager.addDefaultTemplates({group:new p.BindableTemplate(((e,t)=>{(0,b.isPlainObject)(t)?t.key&&e.text(t.key):e.text(String(t))}),["key"],this.option("integrationOptions.watchMethod"))}),this.callBase()},_prepareDefaultItemTemplate(e,t){if(this.callBase(e,t),e.icon){const i=(0,v.getImageContainer)(e.icon).addClass("dx-list-item-icon"),n=(0,h.default)("<div>").addClass("dx-list-item-icon-container");n.append(i),t.prepend(n)}},_getBindableFields:()=>["text","html","icon"],_updateLoadingState(e){const t=this._dataController,i=this._scrollBottomMode()&&e&&!t.isLoading()&&!this._isLastPage();this._shouldContinueLoading(i)?this._infiniteDataLoading():(this._scrollView.release(!i&&!t.isLoading()),this._toggleNextButton(this._shouldRenderNextButton()&&!this._isLastPage()),this._loadIndicationSuppressed(!1))},_shouldRenderNextButton(){return this._nextButtonMode()&&this._dataController.isLoaded()},_isDataSourceFirstLoadCompleted(e){return(0,b.isDefined)(e)&&(this._isFirstLoadCompleted=e),this._isFirstLoadCompleted},_dataSourceLoadingChangedHandler(e){this._loadIndicationSuppressed()||(e&&this.option("indicateLoading")?this._showLoadingIndicatorTimer=setTimeout((()=>{var e;!this._itemElements().length&&!this._isDataSourceFirstLoadCompleted()||(null===(e=this._scrollView)||void 0===e||e.startLoading())})):(clearTimeout(this._showLoadingIndicatorTimer),this._scrollView&&this._scrollView.finishLoading()),e||this._isDataSourceFirstLoadCompleted(!1))},_dataSourceChangedHandler(){!this._shouldAppendItems()&&(0,x.hasWindow)()&&this._scrollView&&this._scrollView.scrollTo(0),this.callBase.apply(this,arguments),this._isDataSourceFirstLoadCompleted(!0)},_refreshContent(){this._prepareContent(),this._fireContentReadyAction()},_hideLoadingIfLoadIndicationOff(){this.option("indicateLoading")||this._dataSourceLoadingChangedHandler(!1)},_loadIndicationSuppressed(e){if(!arguments.length)return this._isLoadIndicationSuppressed;this._isLoadIndicationSuppressed=e},_scrollViewIsFull(){const e=this._scrollView;return!e||(0,y.getHeight)(e.content())>(0,y.getHeight)(e.container())},_pullDownHandler(e){this._pullRefreshAction(e);const t=this._dataController;t.getDataSource()&&!t.isLoading()?(this._clearSelectedItems(),t.pageIndex(0),t.reload()):this._updateLoadingState()},_shouldContinueLoading(e){var t;const i=(0,y.getHeight)(this._scrollView.content())-(0,y.getHeight)(this._scrollView.container())<((null===(t=this._scrollView.scrollOffset())||void 0===t?void 0:t.top)??0);return e&&(!this._scrollViewIsFull()||i)},_infiniteDataLoading(){this.$element().is(":visible")&&(clearTimeout(this._loadNextPageTimer),this._loadNextPageTimer=setTimeout((()=>{this._loadNextPage()})))},_scrollBottomHandler(e){this._pageLoadingAction(e);this._dataController.isLoading()||this._isLastPage()?this._updateLoadingState():this._loadNextPage()},_renderItems(e){this.option("grouped")?((0,C.each)(e,this._renderGroup.bind(this)),this._attachGroupCollapseEvent(),this._renderEmptyMessage(),(0,I.isMaterial)()&&this.attachGroupHeaderInkRippleEvents()):this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},_postProcessRenderItems(){this.option("_onItemsRendered")()},_attachGroupCollapseEvent(){const{collapsibleGroups:e}=this.option(),t=(0,r.addNamespace)(o.name,this.NAME),i=`.${V}`,n=this.$element();n.toggleClass("dx-list-collapsible-groups",e),a.default.off(n,t,i),e&&a.default.on(n,t,i,(e=>{this._processGroupCollapse(e)}))},_processGroupCollapse(e){const t=this._createAction((e=>{const{focusStateEnabled:t}=this.option(),i=(0,h.default)(e.event.currentTarget).parent();if(this._collapseGroupHandler(i),t){const e=(0,u.getPublicElement)(i.find(`.${V}`));this.option({focusedElement:e})}}),{validatingTargetName:"element"});t({event:e})},_enterKeyHandler(e){const{collapsibleGroups:t,focusedElement:i}=this.option(),n=(0,h.default)(i).hasClass(V);if(t&&n){const t=this._getHandlerExtendedParams(e,(0,h.default)(i));this._processGroupCollapse(t)}else this.callBase(e)},_collapseGroupHandler(e,t){const i=(0,f.Deferred)(),o=e.children(`.${V}`),a=e.hasClass(H);if(this._updateGroupHeaderAriaExpanded(o,a),a===t)return i.resolve();const s=e.children(`.${F}`),r=(0,y.getOuterHeight)(s);let l=0;return 0===r&&((0,y.setHeight)(s,"auto"),l=(0,y.getOuterHeight)(s)),e.toggleClass(H,t),n.fx.animate(s,{type:"custom",from:{height:r},to:{height:l},duration:200,complete:function(){this.updateDimensions(),this._updateLoadingState(!0),i.resolve()}.bind(this)}),i.promise()},_dataSourceLoadErrorHandler(){this._forgetNextPageLoading(),this._initialized&&(this._renderEmptyMessage(),this._updateLoadingState())},_initMarkup(){this._itemElementsCache=(0,h.default)(),this.$element().addClass("dx-list"),this.callBase(),this.option("useInkRipple")&&this._renderInkRipple();this.setAria({role:"group",roledescription:"list"},this.$element()),this.setAria({role:"application"},this._focusTarget()),this._setListAria()},_setListAria(){const{items:e,allowItemDeleting:t,collapsibleGroups:i}=this.option(),n=t?l.default.format("dxList-listAriaLabel-deletable"):l.default.format("dxList-listAriaLabel"),o=(null==e?void 0:e.length)&&!i,a={role:o?"listbox":void 0,label:o?n:void 0};this.setAria(a,this._$listContainer)},_focusTarget(){return this._itemContainer()},_renderInkRipple(){this._inkRipple=(0,E.render)()},_toggleActiveState(e,t,i){this.callBase.apply(this,arguments);const n=this;if(!this._inkRipple)return;const o={element:e,event:i};t?(0,I.isMaterial)()?this._inkRippleTimer=setTimeout((()=>{n._inkRipple.showWave(o)}),35):n._inkRipple.showWave(o):(clearTimeout(this._inkRippleTimer),this._inkRipple.hideWave(o))},_postprocessRenderItem(e){this._refreshItemElements(),this.callBase.apply(this,arguments),this.option("_swipeEnabled")&&this._attachSwipeEvent((0,h.default)(e.itemElement))},_getElementClassToSkipRefreshId:()=>V,_attachSwipeEvent(e){const t=(0,r.addNamespace)(s.end,this.NAME);a.default.on(e,t,this._itemSwipeEndHandler.bind(this))},_itemSwipeEndHandler(e){this._itemDXEventHandler(e,"onItemSwipe",{direction:e.offset<0?"left":"right"})},_nextButtonHandler(e){this._pageLoadingAction(e);const t=this._dataController;t.getDataSource()&&!t.isLoading()&&(this._scrollView.toggleLoading(!0),this._$nextButton.detach(),this._loadIndicationSuppressed(!0),this._loadNextPage())},_setGroupAria(e,t){const{collapsibleGroups:i}=this.option(),n={role:i?void 0:"group",labelledby:i?void 0:t};this.setAria(n,e)},_updateGroupHeaderAriaExpanded(e,t){this.setAria({expanded:t},e)},_setGroupHeaderAria(e,t){const{collapsibleGroups:i}=this.option(),n={role:i?"button":void 0,expanded:!!i||void 0,controls:i?t:void 0};this.setAria(n,e)},_setGroupBodyAria(e,t){const{collapsibleGroups:i}=this.option(),n={role:i?"listbox":void 0,labelledby:i?t:void 0};this.setAria(n,e)},_renderGroup(e,t){const i=(0,h.default)("<div>").addClass(B).appendTo(this._getItemsContainer()),n=`dx-${(new c.default).toString()}`,o=(0,h.default)("<div>").addClass(V).attr("id",n).appendTo(i),{groupTemplate:a}=this.option(),s=this._getTemplate(t.template||a,t,e,o),r={index:e,itemData:t,container:(0,u.getPublicElement)(o)};this._createItemByTemplate(s,r),(0,h.default)("<div>").addClass("dx-list-group-header-indicator").prependTo(o),this._renderingGroupIndex=e;const l=`dx-${(new c.default).toString()}`,d=(0,h.default)("<div>").addClass(F).attr("id",l).appendTo(i);(0,C.each)(z(t)||[],((t,i)=>{this._renderItem({group:e,item:t},i,d)})),this._groupRenderAction({groupElement:(0,u.getPublicElement)(i),groupIndex:e,groupData:t}),this._setGroupAria(i,n),this._setGroupHeaderAria(o,l),this._setGroupBodyAria(d,n)},downInkRippleHandler(e){this._toggleActiveState((0,h.default)(e.currentTarget),!0,e)},upInkRippleHandler(e){this._toggleActiveState((0,h.default)(e.currentTarget),!1)},attachGroupHeaderInkRippleEvents(){const e=`.${V}`,t=this.$element();this._downInkRippleHandler=this._downInkRippleHandler||this.downInkRippleHandler.bind(this),this._upInkRippleHandler=this._upInkRippleHandler||this.upInkRippleHandler.bind(this);const i=[t,"dxpointerdown",e,this._downInkRippleHandler],n=[t,"dxpointerup dxpointerout",e,this._upInkRippleHandler];a.default.off(...i),a.default.on(...i),a.default.off(...n),a.default.on(...n)},_createGroupRenderAction(){this._groupRenderAction=this._createActionByOption("onGroupRendered")},_clean(){clearTimeout(this._inkRippleTimer),this._$nextButton&&(this._$nextButton.remove(),this._$nextButton=null),this.callBase.apply(this,arguments)},_dispose(){this._isDataSourceFirstLoadCompleted(!1),clearTimeout(this._holdTimer),clearTimeout(this._loadNextPageTimer),clearTimeout(this._showLoadingIndicatorTimer),this.callBase()},_toggleDisabledState(e){this.callBase(e),this._scrollView.option("disabled",e||!this.option("scrollingEnabled"))},_toggleNextButton(e){const t=this._dataController,i=this._getNextButton();this.$element().toggleClass("dx-has-next",e),e&&t.isLoaded()&&i.appendTo(this._itemContainer()),e||i.detach()},_getNextButton(){return this._$nextButton||(this._$nextButton=this._createNextButton()),this._$nextButton},_createNextButton(){const e=(0,h.default)("<div>").addClass("dx-list-next-button"),t=(0,h.default)("<div>").appendTo(e);return this._createComponent(t,w.default,{text:this.option("nextButtonText"),onClick:this._nextButtonHandler.bind(this),type:(0,I.isMaterialBased)()?"default":void 0,integrationOptions:{}}),e},_moveFocus(){this.callBase.apply(this,arguments),this.scrollToItem(this.option("focusedElement"))},_refresh(){if((0,x.hasWindow)()){const e=this._scrollView.scrollTop();this.callBase(),e&&this._scrollView.scrollTo(e)}else this.callBase()},_optionChanged(e){switch(e.name){case"pageLoadMode":this._toggleNextButton(e.value),this._initScrollView();break;case"dataSource":this.callBase(e),this._initScrollView(),this._isDataSourceFirstLoadCompleted(!1);break;case"items":this.callBase(e),this._isDataSourceFirstLoadCompleted(!1);break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"pageLoadingText":case"showScrollbar":case"bounceEnabled":case"scrollByContent":case"scrollByThumb":case"useNativeScrolling":case"scrollingEnabled":case"pullRefreshEnabled":this._initScrollView(),this._updateLoadingState(!0);break;case"nextButtonText":case"onItemSwipe":case"useInkRipple":case"grouped":case"groupTemplate":case"showChevronExpr":case"badgeExpr":this._invalidate();break;case"onScroll":case"onPullRefresh":case"onPageLoading":this._createScrollViewActions();break;case"collapsibleGroups":this._updateActiveStateUnit(),this._invalidate();break;case"wrapItemText":this._toggleWrapItemText(e.value);break;case"onGroupRendered":this._createGroupRenderAction();break;case"width":case"height":this.callBase(e),this._scrollView.option(e.name,e.value),this._scrollView.update();break;case"indicateLoading":this._hideLoadingIfLoadIndicationOff();break;case"visible":this.callBase(e),this._scrollView.update();break;case"rtlEnabled":this._initScrollView(),this.callBase(e);break;case"_swipeEnabled":case"_onItemsRendered":case"selectByClick":break;default:this.callBase(e)}},_extendActionArgs(e){if(!this.option("grouped"))return this.callBase(e);const t=e.closest(`.${B}`),i=t.find(`.${R}`);return(0,m.extend)(this.callBase(e),{itemIndex:{group:t.index(),item:i.index(e)}})},expandGroup(e){const t=(0,f.Deferred)(),i=this._getItemsContainer().find(`.${B}`).eq(e);return this._collapseGroupHandler(i,!1).done((()=>{t.resolveWith(this)})),t.promise()},collapseGroup(e){const t=(0,f.Deferred)(),i=this._getItemsContainer().find(`.${B}`).eq(e);return this._collapseGroupHandler(i,!0).done((()=>{t.resolveWith(this)})),t},updateDimensions(){const e=this,t=(0,f.Deferred)();return e._scrollView?e._scrollView.update().done((()=>{!e._scrollViewIsFull()&&e._updateLoadingState(!0),t.resolveWith(e)})):t.resolveWith(e),t.promise()},reload(){this.callBase(),this.scrollTo(0),this._pullDownHandler()},repaint(){this.scrollTo(0),this.callBase()},scrollTop(){return this._scrollView.scrollOffset().top},clientHeight(){return this._scrollView.clientHeight()},scrollHeight(){return this._scrollView.scrollHeight()},scrollBy(e){this._scrollView.scrollBy(e)},scrollTo(e){this._scrollView.scrollTo(e)},scrollToItem(e){const t=this._editStrategy.getItemElement(e),i=null==t?void 0:t.get(0);this._scrollView.scrollToElement(i,{bottom:(0,O.getElementMargin)(i,"bottom")})},_dimensionChanged(){this.updateDimensions()}}).include(P.default);$.ItemClass=k.default},73368:function(e,t,i){var n=c(i(4671)),o=c(i(64553)),a=i(57653),s=c(i(89132)),r=i(26031),l=c(i(72985)),d=c(i(71202)),u=i(58499);function c(e){return e&&e.__esModule?e:{default:e}}const h="dx-list-context-menu";(0,u.register)("menu","context",l.default.inherit({_init(){const e=(0,o.default)("<div>").addClass(h);this._list.$element().append(e),this._menu=this._renderOverlay(e)},_renderOverlay(e){return this._list._createComponent(e,s.default,{shading:!1,deferRendering:!0,hideOnParentScroll:!0,hideOnOutsideClick:e=>!(0,o.default)(e.target).closest(`.${h}`).length,animation:{show:{type:"slide",duration:300,from:{height:0,opacity:1},to:{height:function(){return(0,a.getOuterHeight)(this._$menuList)}.bind(this),opacity:1}},hide:{type:"slide",duration:0,from:{opacity:1},to:{opacity:0}}},_ignoreFunctionValueDeprecation:!0,height:function(){return this._$menuList?(0,a.getOuterHeight)(this._$menuList):0}.bind(this),width:function(){return(0,a.getOuterWidth)(this._list.$element())}.bind(this),onContentReady:this._renderMenuContent.bind(this)})},_renderMenuContent(e){const t=e.component.$content(),i=this._menuItems().slice();this._deleteEnabled()&&i.push({text:n.default.format("dxListEditDecorator-delete"),action:this._deleteItem.bind(this)}),this._$menuList=(0,o.default)("<div>"),this._list._createComponent(this._$menuList,r.ListBase,{items:i,onItemClick:this._menuItemClickHandler.bind(this),height:"auto",integrationOptions:{}}),t.addClass("dx-list-context-menucontent"),t.append(this._$menuList)},_menuItemClickHandler(e){this._menu.hide(),this._fireMenuAction(this._$itemWithMenu,e.itemData.action)},_deleteItem(){this._list.deleteItem(this._$itemWithMenu)},handleContextMenu(e){return this._$itemWithMenu=e,this._menu.option({position:{my:"top",at:"bottom",of:e,collision:"flip"}}),this._menu.show(),!0},dispose(){this._menu&&this._menu.$element().remove(),this.callBase.apply(this,arguments)}}).include(d.default))},72985:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(92774)),o=i(80250),a=i(98834),s=u(i(55620)),r=u(i(64553)),l=i(17781),d=i(57653);function u(e){return e&&e.__esModule?e:{default:e}}const c="dxListEditDecorator",h=(0,a.addNamespace)(o.start,c),p=(0,a.addNamespace)(o.swipe,c),g=(0,a.addNamespace)(o.end,c),_=s.default.inherit({ctor(e){this._list=e,this._init()},_init:l.noop,_shouldHandleSwipe:!1,_attachSwipeEvent(e){const t={itemSizeFunc:function(){return this._clearSwipeCache&&(this._itemWidthCache=(0,d.getWidth)(this._list.$element()),this._clearSwipeCache=!1),this._itemWidthCache}.bind(this)};n.default.on(e.$itemElement,h,t,this._itemSwipeStartHandler.bind(this)),n.default.on(e.$itemElement,p,this._itemSwipeUpdateHandler.bind(this)),n.default.on(e.$itemElement,g,this._itemSwipeEndHandler.bind(this))},_itemSwipeStartHandler(e){const t=(0,r.default)(e.currentTarget);t.is(".dx-state-disabled, .dx-state-disabled *")?e.cancel=!0:(clearTimeout(this._list._inkRippleTimer),this._swipeStartHandler(t,e))},_itemSwipeUpdateHandler(e){const t=(0,r.default)(e.currentTarget);this._swipeUpdateHandler(t,e)},_itemSwipeEndHandler(e){const t=(0,r.default)(e.currentTarget);this._swipeEndHandler(t,e),this._clearSwipeCache=!0},beforeBag:l.noop,afterBag:l.noop,_commonOptions(){return{activeStateEnabled:this._list.option("activeStateEnabled"),hoverStateEnabled:this._list.option("hoverStateEnabled"),focusStateEnabled:this._list.option("focusStateEnabled")}},modifyElement(e){this._shouldHandleSwipe&&(this._attachSwipeEvent(e),this._clearSwipeCache=!0)},afterRender:l.noop,handleClick:l.noop,handleKeyboardEvents:l.noop,handleEnterPressing:l.noop,handleContextMenu:l.noop,_swipeStartHandler:l.noop,_swipeUpdateHandler:l.noop,_swipeEndHandler:l.noop,visibilityChange:l.noop,getExcludedSelectors:l.noop,dispose:l.noop});t.default=_},86856:function(e,t,i){var n=c(i(92774)),o=i(98834),a=c(i(64553)),s=i(52576),r=i(57653),l=c(i(95305)),d=c(i(72985)),u=i(58499);function c(e){return e&&e.__esModule?e:{default:e}}const h="dx-list-reorder-handle";(0,u.register)("reorder","default",d.default.inherit({_init(){const e=this._list;this._groupedEnabled=this._list.option("grouped"),this._lockedDrag=!1;const t=this._groupedEnabled?"> .dx-list-items > .dx-list-group > .dx-list-group-body > .dx-list-item":"> .dx-list-items > .dx-list-item";this._sortable=e._createComponent(e._scrollView.content(),l.default,(0,s.extend)({component:e,contentTemplate:null,allowReordering:!1,filter:t,container:e.$element(),dragDirection:e.option("itemDragging.group")?"both":"vertical",handle:`.${h}`,dragTemplate:this._dragTemplate,onDragStart:this._dragStartHandler.bind(this),onDragChange:this._dragChangeHandler.bind(this),onReorder:this._reorderHandler.bind(this)},e.option("itemDragging")))},afterRender(){this._sortable.update()},_dragTemplate(e){const t=(0,a.default)(e.itemElement).clone().addClass("dx-list-item-ghost-reordering").addClass("dx-state-hover");return(0,r.setWidth)(t,(0,r.getWidth)(e.itemElement)),t},_dragStartHandler(e){this._lockedDrag&&(e.cancel=!0)},_dragChangeHandler(e){this._groupedEnabled&&!this._sameParent(e.fromIndex,e.toIndex)&&(e.cancel=!0)},_sameParent(e,t){const i=this._list.getItemElementByFlatIndex(e);return this._list.getItemElementByFlatIndex(t).parent().get(0)===i.parent().get(0)},_reorderHandler(e){const t=this._list.getItemElementByFlatIndex(e.toIndex);this._list.reorderItem((0,a.default)(e.itemElement),t)},afterBag(e){const t=(0,a.default)("<div>").addClass(h);n.default.on(t,"dxpointerdown",(e=>{this._lockedDrag=!(0,o.isMouseEvent)(e)})),n.default.on(t,"dxhold",{timeout:30},(e=>{e.cancel=!0,this._lockedDrag=!1})),e.$container.addClass("dx-list-reorder-handle-container").append(t)}}))},65009:function(e,t,i){var n=i(64044),o=_(i(92774)),a=i(98834),s=_(i(4671)),r=_(i(64553)),l=i(87739),d=i(52576),u=_(i(94319)),c=_(i(86657)),h=_(i(35185)),p=_(i(72985)),g=i(58499);function _(e){return e&&e.__esModule?e:{default:e}}const f="dx-list-select-decorator-enabled",m=(0,a.addNamespace)(n.name,"dxListEditDecorator");(0,g.register)("selection","default",p.default.inherit({_init(){this.callBase.apply(this,arguments);const e=this._list.option("selectionMode");this._singleStrategy="single"===e,this._containerClass=this._singleStrategy?"dx-list-select-radiobutton-container":"dx-list-select-checkbox-container",this._controlClass=this._singleStrategy?"dx-list-select-radiobutton":"dx-list-select-checkbox",this._controlWidget=this._singleStrategy?c.default:u.default,this._list.$element().addClass(f)},beforeBag(e){const{$itemElement:t}=e,i=e.$container.addClass(this._containerClass),n=(0,r.default)("<div>").addClass(this._controlClass).appendTo(i);new this._controlWidget(n,(0,d.extend)(this._commonOptions(),{value:this._isSelected(t),elementAttr:{"aria-label":s.default.format("CheckState")},focusStateEnabled:!1,hoverStateEnabled:!1,onValueChanged:e=>{let{value:t,component:i,event:n}=e;!!n&&(i._valueChangeEventInstance=void 0,i.option("value",!t))}}))},modifyElement(e){this.callBase.apply(this,arguments);const{$itemElement:t}=e,i=this._controlWidget.getInstance(t.find(`.${this._controlClass}`));o.default.on(t,"stateChanged",((e,t)=>{i.option("value",t)}))},_updateSelectAllState(){this._$selectAll&&this._selectAllCheckBox.option("value",this._list.isSelectAll())},afterRender(){"all"===this._list.option("selectionMode")&&(this._$selectAll?this._updateSelectAllState():this._renderSelectAll())},handleKeyboardEvents(e,t){const i=!t,n=this._list,o=this._$selectAll,a=n._getLastItemIndex();return!(!o||!(t&&0===e||i&&e===a))&&(n.option("focusedElement",o),n.scrollToItem(n.option("focusedElement")),!0)},handleEnterPressing(e){if(this._$selectAll&&this._$selectAll.hasClass("dx-state-focused"))return e.target=this._$selectAll.get(0),this._selectAllHandler(e),!0},_renderSelectAll(){this._$selectAll=(0,r.default)("<div>").addClass("dx-list-select-all");const e=this._list._supportedKeys().downArrow.bind(this._list),t=(0,r.default)("<div>").addClass("dx-list-select-all-checkbox").appendTo(this._$selectAll);this._selectAllCheckBox=this._list._createComponent(t,u.default,{elementAttr:{"aria-label":s.default.format("dxList-selectAll")},focusStateEnabled:!1,hoverStateEnabled:!1}),this._selectAllCheckBox.registerKeyHandler("downArrow",e),(0,r.default)("<div>").addClass("dx-list-select-all-label").text(this._list.option("selectAllText")).appendTo(this._$selectAll),this._list.itemsContainer().prepend(this._$selectAll),this._updateSelectAllState(),this._updateSelectAllAriaLabel(),this._attachSelectAllHandler()},_attachSelectAllHandler(){this._selectAllCheckBox.option("onValueChanged",(e=>{let{value:t,event:i,component:n}=e;!i?(this._updateSelectAllAriaLabel(),this._list._createActionByOption("onSelectAllValueChanged")({value:t})):n._setOptionWithoutOptionChange("value",!t)})),o.default.off(this._$selectAll,m),o.default.on(this._$selectAll,m,this._selectAllHandler.bind(this))},_updateSelectAllAriaLabel(){if(!this._$selectAll)return;const{value:e}=this._selectAllCheckBox.option(),t=void 0===e?"indeterminate":e?"checked":"notChecked",i=`${s.default.format("dxList-selectAll")}, ${s.default.format(`dxList-selectAll-${t}`)}`;this._$selectAll.attr({"aria-label":i})},_selectAllHandler(e){e.stopPropagation(),this._list._saveSelectionChangeEvent(e);const{value:t}=this._selectAllCheckBox.option();let i;return i=!0!==t?this._selectAllItems():this._unselectAllItems(),this._list.option("focusedElement",this._$selectAll.get(0)),i},_checkSelectAllCapability(){const e=this._list,t=e._dataController;return!("allPages"===e.option("selectAllMode")&&e.option("grouped")&&!t.group())||(h.default.log("W1010"),!1)},_selectAllItems(){return this._checkSelectAllCapability()?this._list._selection.selectAll("page"===this._list.option("selectAllMode")):(0,l.Deferred)().resolve()},_unselectAllItems(){return this._checkSelectAllCapability()?this._list._selection.deselectAll("page"===this._list.option("selectAllMode")):(0,l.Deferred)().resolve()},_isSelected(e){return this._list.isItemSelected(e)},dispose(){this._disposeSelectAll(),this._list.$element().removeClass(f),this.callBase.apply(this,arguments)},_disposeSelectAll(){this._$selectAll&&(this._$selectAll.remove(),this._$selectAll=null)}}))},3041:function(e,t,i){var n=r(i(64553)),o=r(i(64973)),a=r(i(72985)),s=i(58499);function r(e){return e&&e.__esModule?e:{default:e}}(0,s.register)("delete","static",a.default.inherit({afterBag(e){const{$itemElement:t}=e,{$container:i}=e,a=(0,n.default)("<div>").addClass("dx-list-static-delete-button");this._list._createComponent(a,o.default,{icon:"remove",onClick:function(e){e.event.stopPropagation(),this._deleteItem(t)}.bind(this),integrationOptions:{},elementAttr:{role:null,"aria-label":null},tabIndex:-1}),i.addClass("dx-list-static-delete-button-container").append(a)},_deleteItem(e){e.is(".dx-state-disabled, .dx-state-disabled *")||this._list.deleteItem(e)}}))},98645:function(e,t,i){var n,o=i(16826),a=i(88603),s=i(87739),r=i(57653),l=(n=i(72985))&&n.__esModule?n:{default:n};(0,i(58499).register)("delete","swipe",l.default.inherit({_shouldHandleSwipe:!0,_renderItemPosition(e,t,i){const n=(0,s.Deferred)(),r=t*this._itemElementWidth;return i?o.fx.animate(e,{to:{left:r},type:"slide",complete(){n.resolve(e,t)}}):((0,a.move)(e,{left:r}),n.resolve()),n.promise()},_swipeStartHandler(e){return this._itemElementWidth=(0,r.getWidth)(e),!0},_swipeUpdateHandler(e,t){return this._renderItemPosition(e,t.offset),!0},_swipeEndHandler(e,t){const i=t.targetOffset;return this._renderItemPosition(e,i,!0).done(((e,t)=>{Math.abs(t)&&this._list.deleteItem(e).fail((()=>{this._renderItemPosition(e,0,!0)}))})),!0}}))},41265:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=c(i(4671)),a=c(i(64553)),s=i(57653),r=c(i(64973)),l=i(52071),d=c(i(51819)),u=i(58499);function c(e){return e&&e.__esModule?e:{default:e}}const h=d.default.inherit({_init(){this.callBase.apply(this,arguments);const e=(0,a.default)("<div>").addClass("dx-list-switchable-delete-button-container"),t=(0,a.default)("<div>").addClass("dx-list-switchable-delete-button-wrapper"),i=(0,a.default)("<div>").addClass("dx-list-switchable-delete-button-inner-wrapper"),n=(0,a.default)("<div>").addClass("dx-list-switchable-delete-button");this._list._createComponent(n,r.default,{text:o.default.format("dxListEditDecorator-delete"),type:"danger",stylingMode:(0,l.isMaterialBased)()?"text":"contained",onClick:function(e){this._deleteItem(),e.event.stopPropagation()}.bind(this),integrationOptions:{},elementAttr:{role:null,"aria-label":null},tabIndex:-1}),e.append(t),t.append(i),i.append(n),this._$buttonContainer=e},_enablePositioning(e){this.callBase.apply(this,arguments),n.fx.stop(this._$buttonContainer,!0),this._$buttonContainer.appendTo(e)},_disablePositioning(){this.callBase.apply(this,arguments),this._$buttonContainer.detach()},_animatePrepareDeleteReady(){const e=this._isRtlEnabled(),t=(0,s.getWidth)(this._list.$element()),i=this._buttonWidth(),o=e?t:-i,a=e?t-i:0;return n.fx.animate(this._$buttonContainer,{type:"custom",duration:200,from:{right:o},to:{right:a}})},_animateForgetDeleteReady(){const e=this._isRtlEnabled(),t=(0,s.getWidth)(this._list.$element()),i=this._buttonWidth(),o=e?t-i:0,a=e?t:-i;return n.fx.animate(this._$buttonContainer,{type:"custom",duration:200,from:{right:o},to:{right:a}})},_buttonWidth(){return this._buttonContainerWidth||(this._buttonContainerWidth=(0,s.getOuterWidth)(this._$buttonContainer)),this._buttonContainerWidth},dispose(){this._$buttonContainer&&this._$buttonContainer.remove(),this.callBase.apply(this,arguments)}});(0,u.register)("delete","toggle",h.inherit({beforeBag(e){const{$itemElement:t}=e,{$container:i}=e,o=(0,a.default)("<div>").addClass("dx-list-toggle-delete-switch");this._list._createComponent(o,r.default,{icon:"toggle-delete",onClick:function(e){n.fx.stop(this._$buttonContainer,!1),this._toggleDeleteReady(t),e.event.stopPropagation()}.bind(this),integrationOptions:{},elementAttr:{role:null,"aria-label":null},tabIndex:-1}),i.addClass("dx-list-toggle-delete-switch-container"),i.append(o)}})),(0,u.register)("delete","slideButton",h.inherit({_shouldHandleSwipe:!0,_swipeEndHandler(e,t){return 0!==t.targetOffset&&(n.fx.stop(this._$buttonContainer,!1),this._toggleDeleteReady(e)),!0}}));t.default=h},51819:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(69331),o=c(i(92774)),a=c(i(89797)),s=i(98834),r=c(i(64553)),l=i(17781),d=i(57653),u=c(i(72985));function c(e){return e&&e.__esModule?e:{default:e}}const{abstract:h}=u.default,p="dxListEditDecorator",g=(0,s.addNamespace)(a.default.down,p),_=(0,s.addNamespace)(n.active,p),f="dx-list-switchable-delete-ready",m="dx-list-switchable-menu-item-shield-positioning",v=u.default.inherit({_init(){this._$topShield=(0,r.default)("<div>").addClass("dx-list-switchable-delete-top-shield"),this._$bottomShield=(0,r.default)("<div>").addClass("dx-list-switchable-delete-bottom-shield"),this._$itemContentShield=(0,r.default)("<div>").addClass("dx-list-switchable-delete-item-content-shield"),o.default.on(this._$topShield,g,this._cancelDeleteReadyItem.bind(this)),o.default.on(this._$bottomShield,g,this._cancelDeleteReadyItem.bind(this)),this._list.$element().append(this._$topShield.toggle(!1)).append(this._$bottomShield.toggle(!1))},handleClick(){return this._cancelDeleteReadyItem()},_cancelDeleteReadyItem(){return!!this._$readyToDeleteItem&&(this._cancelDelete(this._$readyToDeleteItem),!0)},_cancelDelete(e){this._toggleDeleteReady(e,!1)},_toggleDeleteReady(e,t){void 0===t&&(t=!this._isReadyToDelete(e)),this._toggleShields(e,t),this._toggleScrolling(t),this._cacheReadyToDeleteItem(e,t),this._animateToggleDelete(e,t)},_isReadyToDelete:e=>e.hasClass(f),_toggleShields(e,t){this._list.$element().toggleClass("dx-list-switchable-menu-shield-positioning",t),this._$topShield.toggle(t),this._$bottomShield.toggle(t),t&&this._updateShieldsHeight(e),this._toggleContentShield(e,t)},_updateShieldsHeight(e){const t=this._list.$element(),i=t.offset().top,n=(0,d.getOuterHeight)(t),o=e.offset().top-i,a=n-(0,d.getOuterHeight)(e)-o;(0,d.setHeight)(this._$topShield,Math.max(o,0)),(0,d.setHeight)(this._$bottomShield,Math.max(a,0))},_toggleContentShield(e,t){t?e.find(".dx-list-item-content").first().append(this._$itemContentShield):this._$itemContentShield.detach()},_toggleScrolling(e){const t=this._list.$element().dxScrollView("instance");e?t.on("start",this._cancelScrolling):t.off("start",this._cancelScrolling)},_cancelScrolling(e){e.event.cancel=!0},_cacheReadyToDeleteItem(e,t){t?this._$readyToDeleteItem=e:delete this._$readyToDeleteItem},_animateToggleDelete(e,t){t?(this._enablePositioning(e),this._prepareDeleteReady(e),this._animatePrepareDeleteReady(e),o.default.off(e,a.default.up)):(this._forgetDeleteReady(e),this._animateForgetDeleteReady(e).done(this._disablePositioning.bind(this,e)))},_enablePositioning(e){e.addClass(m),o.default.on(e,_,l.noop),o.default.one(e,a.default.up,this._disablePositioning.bind(this,e))},_disablePositioning(e){e.removeClass(m),o.default.off(e,_)},_prepareDeleteReady(e){e.addClass(f)},_forgetDeleteReady(e){e.removeClass(f)},_animatePrepareDeleteReady:h,_animateForgetDeleteReady:h,_getDeleteButtonContainer(e){return(e=e||this._$readyToDeleteItem).children(".dx-list-switchable-delete-button-container")},_deleteItem(e){e=e||this._$readyToDeleteItem,this._getDeleteButtonContainer(e).detach(),e.is(".dx-state-disabled, .dx-state-disabled *")||this._list.deleteItem(e).always(this._cancelDelete.bind(this,e))},_isRtlEnabled(){return this._list.option("rtlEnabled")},dispose(){this._$topShield&&this._$topShield.remove(),this._$bottomShield&&this._$bottomShield.remove(),this.callBase.apply(this,arguments)}});t.default=v},94824:function(e,t,i){var n=i(16826),o=i(88603),a=i(64044),s=i(69331),r=v(i(92774)),l=i(98834),d=v(i(4671)),u=v(i(64553)),c=i(17781),h=i(57653),p=v(i(45263)),g=i(52071),_=v(i(51819)),f=v(i(71202)),m=i(58499);function v(e){return e&&e.__esModule?e:{default:e}}const C="dxListEditDecorator",y=(0,l.addNamespace)(a.name,C),b=(0,l.addNamespace)(s.active,C),x="dx-list-slide-menu-content",w="dx-list-slide-menu-button";(0,m.register)("menu","slide",_.default.inherit({_shouldHandleSwipe:!0,_init(){this.callBase.apply(this,arguments),this._$buttonsContainer=(0,u.default)("<div>").addClass("dx-list-slide-menu-buttons-container"),r.default.on(this._$buttonsContainer,b,c.noop),this._$buttons=(0,u.default)("<div>").addClass("dx-list-slide-menu-buttons").appendTo(this._$buttonsContainer),this._renderMenu(),this._renderDeleteButton()},_renderMenu(){if(!this._menuEnabled())return;const e=this._menuItems();if(1===e.length){const t=e[0];this._renderMenuButton(t.text,(e=>{e.stopPropagation(),this._fireAction(t)}))}else{const t=(0,u.default)("<div>").addClass("dx-list-slide-menu");this._menu=this._list._createComponent(t,p.default,{showTitle:!1,items:e,onItemClick:function(e){this._fireAction(e.itemData)}.bind(this),integrationOptions:{}}),t.appendTo(this._list.$element());const i=this._renderMenuButton(d.default.format("dxListEditDecorator-more"),(e=>{e.stopPropagation(),this._menu.show()}));this._menu.option("target",i)}},_renderMenuButton(e,t){const i=(0,u.default)("<div>").addClass(w).addClass("dx-list-slide-menu-button-menu").text(e);return this._$buttons.append(i),r.default.on(i,y,t),i},_renderDeleteButton(){if(!this._deleteEnabled())return;const e=(0,u.default)("<div>").addClass(w).addClass("dx-list-slide-menu-button-delete").text((0,g.isMaterialBased)()?"":d.default.format("dxListEditDecorator-delete"));r.default.on(e,y,(e=>{e.stopPropagation(),this._deleteItem()})),this._$buttons.append(e)},_fireAction(e){this._fireMenuAction((0,u.default)(this._cachedNode),e.action),this._cancelDeleteReadyItem()},modifyElement(e){this.callBase.apply(this,arguments);const{$itemElement:t}=e;t.addClass("dx-list-slide-menu-wrapper");const i=(0,u.default)("<div>").addClass(x);t.wrapInner(i)},_getDeleteButtonContainer(){return this._$buttonsContainer},handleClick(e,t){return!!(0,u.default)(t.target).closest(`.${x}`).length&&this.callBase.apply(this,arguments)},_swipeStartHandler(e){this._enablePositioning(e),this._cacheItemData(e),this._setPositions(this._getPositions(0))},_swipeUpdateHandler(e,t){const i=this._isRtlEnabled()?-1:1,n=this._isReadyToDelete(e);if(this._getCurrentPositions().content===this._getStartPositions().content&&!n&&t.offset*i>0)return void(t.cancel=!0);const o=this._cachedItemWidth*t.offset,a=n?-this._cachedButtonWidth*i:0,s=(o+a)*i<0?Math.abs((o+a)/this._cachedButtonWidth):0;return this._setPositions(this._getPositions(s)),!0},_getStartPositions(){const e=this._isRtlEnabled(),t=e?-1:1;return{content:0,buttonsContainer:e?-this._cachedButtonWidth:this._cachedItemWidth,buttons:-this._cachedButtonWidth*t}},_getPositions(e){const t=this._isRtlEnabled()?-1:1,i=this._getStartPositions();return{content:i.content-e*this._cachedButtonWidth*t,buttonsContainer:i.buttonsContainer-Math.min(e,1)*this._cachedButtonWidth*t,buttons:i.buttons+Math.min(e,1)*this._cachedButtonWidth*t}},_getCurrentPositions(){return{content:(0,o.locate)(this._$cachedContent).left,buttonsContainer:(0,o.locate)(this._$buttonsContainer).left,buttons:(0,o.locate)(this._$buttons).left}},_setPositions(e){(0,o.move)(this._$cachedContent,{left:e.content}),(0,o.move)(this._$buttonsContainer,{left:e.buttonsContainer}),(0,o.move)(this._$buttons,{left:e.buttons})},_cacheItemData(e){e[0]!==this._cachedNode&&(this._$cachedContent=e.find(`.${x}`),this._cachedItemWidth=(0,h.getOuterWidth)(e),this._cachedButtonWidth=this._cachedButtonWidth||(0,h.getOuterWidth)(this._$buttons),(0,h.setWidth)(this._$buttonsContainer,this._cachedButtonWidth),this._$cachedContent.length&&(this._cachedNode=e[0]))},_minButtonContainerLeftOffset(){return this._cachedItemWidth-this._cachedButtonWidth},_swipeEndHandler(e,t){this._cacheItemData(e);const i=this._isRtlEnabled()?1:-1,n=this._cachedItemWidth*t.offset,o=!this._isReadyToDelete(e)&&n*i>.2*this._cachedButtonWidth,a=t.targetOffset===i&&o;return this._toggleDeleteReady(e,a),!0},_enablePositioning(e){n.fx.stop(this._$cachedContent,!0),this.callBase.apply(this,arguments),this._$buttonsContainer.appendTo(e)},_disablePositioning(){this.callBase.apply(this,arguments),this._$buttonsContainer.detach()},_animatePrepareDeleteReady(){return this._animateToPositions(this._getPositions(1))},_animateForgetDeleteReady(e){return this._cacheItemData(e),this._animateToPositions(this._getPositions(0))},_animateToPositions(e){const t=this,i=this._getCurrentPositions(),o=Math.min(Math.abs(i.content-e.content)/this._cachedButtonWidth,1);return n.fx.animate(this._$cachedContent,{from:i,to:e,easing:"cubic-bezier(0.075, 0.82, 0.165, 1)",duration:400*o,strategy:"frame",draw(e){t._setPositions(e)}})},dispose(){this._menu&&this._menu.$element().remove(),this._$buttonsContainer&&this._$buttonsContainer.remove(),this.callBase.apply(this,arguments)}}).include(f.default))},71202:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i={_menuEnabled(){return!!this._menuItems().length},_menuItems(){return this._list.option("menuItems")},_deleteEnabled(){return this._list.option("allowItemDeleting")},_fireMenuAction(e,t){this._list._itemEventHandlerByHandler(e,t,{},{excludeValidators:["disabled","readOnly"]})}};t.default=i},58499:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.register=function(e,t,i){const a=o,s={};s[e]=a[e]?a[e]:{},s[e][t]=i,(0,n.extend)(a,s)},t.registry=void 0;var n=i(52576);const o=t.registry={}},71058:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(98834),o=u(i(4671)),a=u(i(64553)),s=i(52576),r=i(26031),l=u(i(26099)),d=u(i(99495));function u(e){return e&&e.__esModule?e:{default:e}}const c=r.ListBase.inherit({_supportedKeys(){const e=this,t=this.callBase(),i=(i,n)=>{const o=this._editStrategy,a=this.option("focusedElement"),s=o.getNormalizedIndex(a);if(!(s===this._getLastItemIndex())||!this._dataController.isLoading())if(i.shiftKey&&e.option("itemDragging.allowReordering")){const e=s+(n?-1:1),t=o.getItemElement(e);this.reorderItem(a,t),this.scrollToItem(a),i.preventDefault()}else{this._editProvider.handleKeyboardEvents(s,n)||(n?t.upArrow(i):t.downArrow(i))}};return(0,s.extend)({},t,{del:t=>{e.option("allowItemDeleting")&&(t.preventDefault(),e.deleteItem(e.option("focusedElement")))},upArrow:e=>i(e,!0),downArrow:e=>i(e),enter:function(e){this._editProvider.handleEnterPressing(e)||t.enter.apply(this,arguments)},space:function(e){this._editProvider.handleEnterPressing(e)||t.space.apply(this,arguments)}})},_updateSelection(){this._editProvider.afterItemsRendered(),this.callBase()},_getLastItemIndex(){return this._itemElements().length-1},_refreshItemElements(){this.callBase();const e=this._editProvider.getExcludedItemSelectors();e.length&&(this._itemElementsCache=this._itemElementsCache.not(e))},_isItemStrictEquals(e,t){const i=e&&e.__dx_key__;return!(i&&!this.key()&&this._selection.isItemSelected(i))&&this.callBase(e,t)},_getDefaultOptions(){return(0,s.extend)(this.callBase(),{showSelectionControls:!1,selectionMode:"none",selectAllMode:"page",onSelectAllValueChanged:null,selectAllText:o.default.format("dxList-selectAll"),menuItems:[],menuMode:"context",allowItemDeleting:!1,itemDeleteMode:"static",itemDragging:{}})},_defaultOptionsRules(){return this.callBase().concat([{device:e=>"ios"===e.platform,options:{menuMode:"slide",itemDeleteMode:"slideItem"}},{device:{platform:"android"},options:{itemDeleteMode:"swipe"}}])},_init(){this.callBase(),this._initEditProvider()},_initDataSource(){this.callBase(),this._isPageSelectAll()||this._dataSource&&this._dataSource.requireTotalCount(!0)},_isPageSelectAll(){return"page"===this.option("selectAllMode")},_initEditProvider(){this._editProvider=new l.default(this)},_disposeEditProvider(){this._editProvider&&this._editProvider.dispose()},_refreshEditProvider(){this._disposeEditProvider(),this._initEditProvider()},_initEditStrategy(){this.option("grouped")?this._editStrategy=new d.default(this):this.callBase()},_initMarkup(){this._refreshEditProvider(),this.callBase()},_renderItems(){this.callBase(...arguments),this._editProvider.afterItemsRendered()},_selectedItemClass:()=>"dx-list-item-selected",_itemResponseWaitClass:()=>"dx-list-item-response-wait",_itemClickHandler(e){const t=(0,a.default)(e.currentTarget);if(t.is(".dx-state-disabled, .dx-state-disabled *"))return;this._editProvider.handleClick(t,e)||(this._saveSelectionChangeEvent(e),this.callBase(...arguments))},_shouldFireContextMenuEvent(){return this.callBase(...arguments)||this._editProvider.contextMenuHandlerExists()},_itemHoldHandler(e){const t=(0,a.default)(e.currentTarget);if(t.is(".dx-state-disabled, .dx-state-disabled *"))return;(0,n.isTouchEvent)(e)&&this._editProvider.handleContextMenu(t,e)?e.handledByEditProvider=!0:this.callBase(...arguments)},_getItemContainer(e){if(this.option("grouped")){var t;const i=null===(t=this._editStrategy.getIndexByItemData(e))||void 0===t?void 0:t.group;return this._getGroupContainerByIndex(i)}return this.callBase(e)},_itemContextMenuHandler(e){const t=(0,a.default)(e.currentTarget);if(t.is(".dx-state-disabled, .dx-state-disabled *"))return;!e.handledByEditProvider&&this._editProvider.handleContextMenu(t,e)?e.preventDefault():this.callBase(...arguments)},_postprocessRenderItem(e){this.callBase(...arguments),this._editProvider.modifyItemElement(e)},_clean(){this._disposeEditProvider(),this.callBase()},focusListItem(e){const t=this._editStrategy.getItemElement(e);this.option("focusedElement",t),this.focus(),this.scrollToItem(this.option("focusedElement"))},_optionChanged(e){switch(e.name){case"selectAllMode":this._initDataSource(),this._dataController.pageIndex(0),this._dataController.load();break;case"grouped":this._clearSelectedItems(),delete this._renderingGroupIndex,this._initEditStrategy(),this.callBase(e);break;case"showSelectionControls":case"menuItems":case"menuMode":case"allowItemDeleting":case"itemDeleteMode":case"itemDragging":case"selectAllText":this._invalidate();break;case"onSelectAllValueChanged":break;default:this.callBase(e)}},selectAll(){return this._selection.selectAll(this._isPageSelectAll())},unselectAll(){return this._selection.deselectAll(this._isPageSelectAll())},isSelectAll(){return this._selection.getSelectAllState(this._isPageSelectAll())},getFlatIndexByItemElement(e){return this._itemElements().index(e)},getItemElementByFlatIndex(e){const t=this._itemElements();return e<0||e>=t.length?(0,a.default)():t.eq(e)},getItemByIndex(e){return this._editStrategy.getItemDataByIndex(e)},deleteItem(e){const t=this._editStrategy,i=t.getNormalizedIndex(e),n=this.option("focusedElement"),o=this.option("focusStateEnabled"),a=n?t.getNormalizedIndex(n):i,s=a===this._getLastItemIndex()||i<a?a-1:a;return this.callBase(e).done((function(){o&&this.focusListItem(s)}))}});t.default=c},26099:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(55620)),o=u(i(64553)),a=i(17781),s=i(52576),r=i(21274),l=u(i(35185)),d=i(58499);function u(e){return e&&e.__esModule?e:{default:e}}const c=[],h=function(e,t,i){c.push({enabled:e,decoratorType:t,decoratorSubType:i})};h((function(){return this.option("menuItems").length}),(()=>"menu"),(function(){return this.option("menuMode")})),h((function(){return!this.option("menuItems").length&&this.option("allowItemDeleting")}),(function(){const e=this.option("itemDeleteMode");return"toggle"===e||"slideButton"===e||"swipe"===e||"static"===e?"delete":"menu"}),(function(){let e=this.option("itemDeleteMode");return"slideItem"===e&&(e="slide"),e})),h((function(){return"none"!==this.option("selectionMode")&&this.option("showSelectionControls")}),(()=>"selection"),(()=>"default")),h((function(){return this.option("itemDragging.allowReordering")||this.option("itemDragging.allowDropInsideItem")||this.option("itemDragging.group")}),(()=>"reorder"),(()=>"default"));const p=n.default.inherit({ctor(e){this._list=e,this._fetchRequiredDecorators()},dispose(){this._decorators&&this._decorators.length&&(0,r.each)(this._decorators,((e,t)=>{t.dispose()}))},_fetchRequiredDecorators(){this._decorators=[],(0,r.each)(c,((e,t)=>{if(t.enabled.call(this._list)){const e=t.decoratorType.call(this._list),i=t.decoratorSubType.call(this._list),n=this._createDecorator(e,i);this._decorators.push(n)}}))},_createDecorator(e,t){return new(this._findDecorator(e,t))(this._list)},_findDecorator(e,t){var i;const n=null===(i=d.registry[e])||void 0===i?void 0:i[t];if(!n)throw l.default.Error("E1012",e,t);return n},modifyItemElement(e){const t=(0,o.default)(e.itemElement),i={$itemElement:t};this._prependBeforeBags(t,i),this._appendAfterBags(t,i),this._applyDecorators("modifyElement",i)},afterItemsRendered(){this._applyDecorators("afterRender")},_prependBeforeBags(e,t){const i=this._collectDecoratorsMarkup("beforeBag",t,"dx-list-item-before-bag");e.prepend(i)},_appendAfterBags(e,t){const i=this._collectDecoratorsMarkup("afterBag",t,"dx-list-item-after-bag");e.append(i)},_collectDecoratorsMarkup(e,t,i){const n=(0,o.default)("<div>");return(0,r.each)(this._decorators,(function(){const a=(0,o.default)("<div>").addClass(i);this[e]((0,s.extend)({$container:a},t)),a.children().length&&n.append(a)})),n.children()},_applyDecorators(e,t){(0,r.each)(this._decorators,(function(){this[e](t)}))},_handlerExists(e){if(!this._decorators)return!1;const t=this._decorators,{length:i}=t;for(let n=0;n<i;n++)if(t[n][e]!==a.noop)return!0;return!1},_eventHandler(e,t,i){if(!this._decorators)return!1;let n=!1;const o=this._decorators,{length:a}=o;for(let s=0;s<a&&(n=o[s][e](t,i),!n);s++);return n},handleClick(e,t){return this._eventHandler("handleClick",e,t)},handleKeyboardEvents(e,t){return this._eventHandler("handleKeyboardEvents",e,t)},handleEnterPressing(e){return this._eventHandler("handleEnterPressing",e)},contextMenuHandlerExists(){return this._handlerExists("handleContextMenu")},handleContextMenu(e,t){return this._eventHandler("handleContextMenu",e,t)},getExcludedItemSelectors(){const e=[];return this._applyDecorators("getExcludedSelectors",e),e.join(",")}});t.default=p},21978:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(i(44690));function o(e){return e&&e.__esModule?e:{default:e}}const a=o(i(71058)).default.inherit(n.default).inherit({_addWidgetPrefix:e=>`dx-list-${e}`,_getCombinedFilter(){const e=this._dataController,t={filter:e.filter()};e.addSearchFilter(t);const{filter:i}=t;return i},_initDataSource(){const e=this.option("searchValue"),t=this.option("searchExpr"),i=this.option("searchMode");this.callBase();const o=this._dataController;e&&e.length&&o.searchValue(e),i.length&&o.searchOperation(n.default.getOperationBySearchMode(i)),t&&o.searchExpr(t)}});t.default=a},99495:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(30771)),o=d(i(66177)),a=d(i(64553)),s=i(21274),r=i(11528),l=d(i(60498));function d(e){return e&&e.__esModule?e:{default:e}}const u="dx-list-group",c=function(e){return(e.group<<20)+e.item},h=function(e){return{group:e>>20,item:1048575&e}},p=l.default.inherit({_groupElements(){return this._collectionWidget._itemContainer().find(`.${u}`)},_groupItemElements:e=>e.find(".dx-list-item"),getIndexByItemData(e){const t=this._collectionWidget.option("items");let i=!1;return!!e&&(e.items&&e.items.length&&(e=e.items[0]),(0,s.each)(t,((t,n)=>!!n.items&&((0,s.each)(n.items,((n,o)=>o!==e||(i={group:t,item:n},!1))),!i&&void 0))),i)},getItemDataByIndex(e){const t=this._collectionWidget.option("items");return(0,r.isNumeric)(e)?this.itemsGetter()[e]:e&&t[e.group]&&t[e.group].items[e.item]||null},itemsGetter(){let e=[];const t=this._collectionWidget.option("items");for(let i=0;i<t.length;i++)t[i]&&t[i].items?e=e.concat(t[i].items):e.push(t[i]);return e},deleteItemAtIndex(e){const t=h(e);this._collectionWidget.option("items")[t.group].items.splice(t.item,1)},getKeysByItems(e){let t,i=[];for(t=0;t<e.length;t++)e[t]&&e[t].items?i=i.concat(e[t].items):i.push(e[t]);const n=[];for(t=0;t<i.length;t++)n.push(this._collectionWidget.keyOf(i[t]));return n},getIndexByKey(e,t){const i=t||this._collectionWidget.option("items");let n=-1;const o=this;return(0,s.each)(i,((t,i)=>{if(i.items)return(0,s.each)(i.items,((i,a)=>{const s=o._collectionWidget.keyOf(a);if(o._equalKeys(s,e))return n={group:t,item:i},!1})),-1===n&&void 0})),n},_getGroups(e){const t=this._collectionWidget._dataController.group();return t?o.default.queryByOptions((0,n.default)(e),{group:t}).toArray():this._collectionWidget.option("items")},getItemsByKeys(e,t){const i=[],n=this._getGroups(t),o={},a=e=>{const t=this.getIndexByKey(e,n),i=t&&n[t.group];if(i)return{groupKey:i.key,item:i.items[t.item]}};return(0,s.each)(e,((e,t)=>{const n=a(t);if(!n)return;const{groupKey:s}=n,{item:r}=n;let l=o[s];l||(l={key:s,items:[]},o[s]=l,i.push(l)),l.items.push(r)})),i},moveItemAtIndexToIndex(e,t){const i=this._collectionWidget.option("items"),n=h(e),o=h(t),a=i[n.group].items,s=i[o.group].items,r=a[n.item];a.splice(n.item,1),s.splice(o.item,0,r)},_isItemIndex:e=>e&&(0,r.isNumeric)(e.group)&&(0,r.isNumeric)(e.item),_getNormalizedItemIndex(e){const t=(0,a.default)(e),i=t.closest(`.${u}`);return i.length?c({group:this._groupElements().index(i),item:this._groupItemElements(i).index(t)}):-1},_normalizeItemIndex:e=>c(e),_denormalizeItemIndex:e=>h(e),_getItemByNormalizedIndex(e){const t=h(e),i=this._groupElements().eq(t.group);return this._groupItemElements(i).eq(t.item)},_itemsFromSameParent:(e,t)=>h(e).group===h(t).group});t.default=p},79269:function(e,t,i){i(73368)},94433:function(e,t,i){i(79269)},14128:function(e,t,i){i(94433),i(62627),i(87364),i(32806),i(49188),i(6872)},62627:function(e,t,i){i(41265)},87364:function(e,t,i){i(94824)},32806:function(e,t,i){i(3041)},49188:function(e,t,i){i(98645)},6872:function(e,t,i){i(41265)},27721:function(e,t,i){i(86856)},18928:function(e,t,i){var n=o(i(20780));function o(e){return e&&e.__esModule?e:{default:e}}o(i(44690)).default.setEditorClass(n.default)},44804:function(e,t,i){i(65009)},55797:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=i(64044),a=w(i(92774)),s=i(98834),r=w(i(92848)),l=w(i(65951)),d=w(i(64960)),u=i(61404),c=w(i(64553)),h=i(27286),p=i(17781),g=i(87739),_=i(52576),f=i(69629),m=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=x(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(21274)),v=i(57653),C=i(11528),y=w(i(55213)),b=i(52071);function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(x=function(e){return e?i:t})(e)}function w(e){return e&&e.__esModule?e:{default:e}}const S="dx-accordion-item",D="dx-accordion-item-opened",I="dx-accordion-item-closed",E="dx-accordion-item-title",T="dx-accordion-item-body",A=y.default.inherit({_activeStateUnit:`.${S}`,_getDefaultOptions(){return(0,_.extend)(this.callBase(),{hoverStateEnabled:!0,height:void 0,itemTitleTemplate:"title",onItemTitleClick:null,selectedIndex:0,collapsible:!1,multiple:!1,animationDuration:300,deferRendering:!0,selectByClick:!0,activeStateEnabled:!0,_itemAttributes:{role:"tab"},_animationEasing:"ease"})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===l.default.real().deviceType&&!l.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,b.isMaterialBased)(),options:{animationDuration:200,_animationEasing:"cubic-bezier(0.4, 0, 0.2, 1)"}}])},_itemElements(){return this._itemContainer().children(this._itemSelector())},_init(){this.callBase(),this.option("selectionRequired",!this.option("collapsible")),this.option("selectionMode",this.option("multiple")?"multiple":"single");const e=this.$element();e.addClass("dx-accordion"),this._$container=(0,c.default)("<div>").addClass("dx-accordion-wrapper"),e.append(this._$container)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({title:new h.BindableTemplate(((e,t)=>{if((0,C.isPlainObject)(t)){const i=(0,f.getImageContainer)(t.icon);i&&e.append(i),(0,C.isDefined)(t.title)&&!(0,C.isPlainObject)(t.title)&&e.append(d.default.createTextNode(t.title))}else(0,C.isDefined)(t)&&e.text(String(t));e.wrapInner((0,c.default)("<div>").addClass("dx-accordion-item-title-caption"))}),["title","icon"],this.option("integrationOptions.watchMethod"))})},_initMarkup(){this._deferredItems=[],this.callBase(),this.setAria({role:"tablist",multiselectable:this.option("multiple")}),(0,p.deferRender)((()=>{const e=this._getSelectedItemIndices();this._renderSelection(e,[])}))},_postProcessRenderItems(){this._updateItemHeights(!0)},_itemDataKey:()=>"dxAccordionItemData",_itemClass:()=>S,_itemContainer(){return this._$container},_itemTitles(){return this._itemElements().find(`.${E}`)},_itemContents(){return this._itemElements().find(`.${T}`)},_getItemData(e){return(0,c.default)(e).parent().data(this._itemDataKey())||this.callBase.apply(this,arguments)},_executeItemRenderAction(e){e.type||this.callBase.apply(this,arguments)},_itemSelectHandler(e){(0,c.default)(e.target).closest(this._itemContents()).length||this.callBase.apply(this,arguments)},_afterItemElementDeleted(e,t){this._deferredItems.splice(t.itemIndex,1),this.callBase.apply(this,arguments)},_renderItemContent(e){const t=this.callBase((0,_.extend)({},e,{contentClass:E,templateProperty:"titleTemplate",defaultTemplateName:this.option("itemTitleTemplate")})),i=this.callBase.bind(this);t.done((t=>{this._attachItemTitleClickAction(t);const n=(0,g.Deferred)();(0,C.isDefined)(this._deferredItems[e.index])?this._deferredItems[e.index]=n:this._deferredItems.push(n),(!this.option("deferRendering")||this._getSelectedItemIndices().indexOf(e.index)>=0)&&n.resolve(),n.done((()=>{i((0,_.extend)({},e,{contentClass:T,container:(0,u.getPublicElement)((0,c.default)("<div>").appendTo((0,c.default)(t).parent()))}))}))}))},_attachItemTitleClickAction(e){const t=(0,s.addNamespace)(o.name,this.NAME);a.default.off(e,t),a.default.on(e,t,this._itemTitleClickHandler.bind(this))},_itemTitleClickHandler(e){this._itemDXEventHandler(e,"onItemTitleClick")},_renderSelection(e,t){this._itemElements().addClass(I),this.setAria("hidden",!0,this._itemContents()),this._updateItems(e,t)},_updateSelection(e,t){this._updateItems(e,t),this._updateItemHeightsWrapper(!1)},_updateItems(e,t){const i=this._itemElements();m.each(e,((e,t)=>{var n;null===(n=this._deferredItems[t])||void 0===n||n.resolve();const o=i.eq(t).addClass(D).removeClass(I);this.setAria("hidden",!1,o.find(`.${T}`))})),m.each(t,((e,t)=>{const n=i.eq(t).removeClass(D);this.setAria("hidden",!0,n.find(`.${T}`))}))},_updateItemHeightsWrapper(e){this.option("templatesRenderAsynchronously")?this._animationTimer=setTimeout((()=>{this._updateItemHeights(e)})):this._updateItemHeights(e)},_updateItemHeights(e){const t=this,i=t._deferredAnimate,n=this._splitFreeSpace(this._calculateFreeSpace());return clearTimeout(this._animationTimer),g.when.apply(c.default,[].slice.call(this._itemElements()).map((i=>t._updateItemHeight((0,c.default)(i),n,e)))).done((()=>{i&&i.resolveWith(t)}))},_updateItemHeight(e,t,i){const o=e.children(`.${E}`);n.fx.isAnimating(e)&&n.fx.stop(e);const a=(0,v.getOuterHeight)(e);let s;return e.hasClass(D)?(s=t+(0,v.getOuterHeight)(o),s||((0,v.setHeight)(e,"auto"),s=(0,v.getOuterHeight)(e))):s=(0,v.getOuterHeight)(o),this._animateItem(e,a,s,i,!!t)},_animateItem(e,t,i,o,a){let s;return o||t===i?(e.css("height",i),s=(0,g.Deferred)().resolve()):s=n.fx.animate(e,{type:"custom",from:{height:t},to:{height:i},duration:this.option("animationDuration"),easing:this.option("_animationEasing")}),s.done((()=>{e.hasClass(D)&&!a&&e.css("height",""),e.not(`.${D}`).addClass(I)}))},_splitFreeSpace(e){return e?e/this.option("selectedItems").length:e},_calculateFreeSpace(){const e=this.option("height");if(void 0===e||"auto"===e)return;const t=this._itemTitles();let i=0;return m.each(t,((e,t)=>{i+=(0,v.getOuterHeight)(t)})),(0,v.getHeight)(this.$element())-i},_visibilityChanged(e){e&&this._dimensionChanged()},_dimensionChanged(){this._updateItemHeights(!0)},_clean(){clearTimeout(this._animationTimer),this.callBase()},_tryParseItemPropertyName(e){const t=e.match(/.*\.(.*)/);if((0,C.isDefined)(t)&&t.length>=1)return t[1]},_optionChanged(e){switch(e.name){case"items":this.callBase(e),"title"===this._tryParseItemPropertyName(e.fullName)&&this._renderSelection(this._getSelectedItemIndices(),[]),"visible"===this._tryParseItemPropertyName(e.fullName)&&this._updateItemHeightsWrapper(!0),!0===this.option("repaintChangesOnly")&&"items"===e.fullName&&(this._updateItemHeightsWrapper(!0),this._renderSelection(this._getSelectedItemIndices(),[]));break;case"animationDuration":case"onItemTitleClick":case"_animationEasing":break;case"collapsible":this.option("selectionRequired",!this.option("collapsible"));break;case"itemTitleTemplate":case"height":case"deferRendering":this._invalidate();break;case"multiple":this.option("selectionMode",e.value?"multiple":"single");break;default:this.callBase(e)}},expandItem(e){return this._deferredAnimate=(0,g.Deferred)(),this.selectItem(e),this._deferredAnimate.promise()},collapseItem(e){return this._deferredAnimate=(0,g.Deferred)(),this.unselectItem(e),this._deferredAnimate.promise()},updateDimensions(){return this._updateItemHeights(!1)}});(0,r.default)("dxAccordion",A);t.default=A},70557:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_(i(4671)),o=_(i(92848)),a=_(i(64553)),s=i(27286),r=i(17781),l=i(87739),d=i(52576),u=i(3104),c=_(i(64973)),h=_(i(7607)),p=_(i(98894)),g=_(i(10720));function _(e){return e&&e.__esModule?e:{default:e}}const f=(0,u.getWindow)(),m="outlined",v=h.default.inherit({_getDefaultOptions(){return(0,d.extend)(this.callBase(),{usePopover:!1,target:null,title:"",showTitle:!0,showCancelButton:!0,cancelText:n.default.format("Cancel"),onCancelClick:null,visible:!1,noDataText:"",focusStateEnabled:!1,selectByClick:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"ios",tablet:!0},options:{usePopover:!0}}])},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new s.BindableTemplate(((e,t)=>{const i=new c.default((0,a.default)("<div>"),(0,d.extend)({onClick:t&&t.click,stylingMode:t&&t.stylingMode||m},t));e.append(i.$element())}),["disabled","icon","text","type","onClick","click","stylingMode"],this.option("integrationOptions.watchMethod"))})},_itemContainer(){return this._$itemContainer},_itemClass:()=>"dx-actionsheet-item",_itemDataKey:()=>"dxActionSheetItemData",_toggleVisibility:r.noop,_renderDimensions:r.noop,_initMarkup(){this.callBase(),this.$element().addClass("dx-actionsheet"),this._createItemContainer()},_render(){this._renderPopup()},_createItemContainer(){this._$itemContainer=(0,a.default)("<div>").addClass("dx-actionsheet-container"),this._renderDisabled()},_renderDisabled(){this._$itemContainer.toggleClass("dx-state-disabled",this.option("disabled"))},_renderPopup(){this._$popup=(0,a.default)("<div>").appendTo(this.$element()),this._isPopoverMode()?this._createPopover():this._createPopup(),this._renderPopupTitle(),this._mapPopupOption("visible")},_mapPopupOption(e){this._popup&&this._popup.option(e,this.option(e))},_isPopoverMode(){return this.option("usePopover")&&this.option("target")},_renderPopupTitle(){this._mapPopupOption("showTitle"),this._popup&&this._popup.$wrapper().toggleClass("dx-actionsheet-without-title",!this.option("showTitle"))},_clean(){this._$popup&&this._$popup.remove(),this.callBase()},_overlayConfig(){return{onInitialized:function(e){this._popup=e.component}.bind(this),disabled:!1,showTitle:!0,title:this.option("title"),deferRendering:!0,onContentReady:this._popupContentReadyAction.bind(this),onHidden:this.hide.bind(this)}},_createPopover(){this._createComponent(this._$popup,p.default,(0,d.extend)(this._overlayConfig(),{width:this.option("width")||200,height:this.option("height")||"auto",target:this.option("target")})),this._popup.$overlayContent().attr("role","dialog"),this._popup.$wrapper().addClass("dx-actionsheet-popover-wrapper")},_createPopup(){this._createComponent(this._$popup,g.default,(0,d.extend)(this._overlayConfig(),{dragEnabled:!1,width:this.option("width")||"100%",height:this.option("height")||"auto",showCloseButton:!1,position:{my:"bottom",at:"bottom",of:f},animation:{show:{type:"slide",duration:400,from:{position:{my:"top",at:"bottom",of:f}},to:{position:{my:"bottom",at:"bottom",of:f}}},hide:{type:"slide",duration:400,from:{position:{my:"bottom",at:"bottom",of:f}},to:{position:{my:"top",at:"bottom",of:f}}}}})),this._popup.$wrapper().addClass("dx-actionsheet-popup-wrapper")},_popupContentReadyAction(){this._popup.$content().append(this._$itemContainer),this._attachClickEvent(),this._attachHoldEvent(),this._prepareContent(),this._renderContent(),this._renderCancelButton()},_renderCancelButton(){if(!this._isPopoverMode()&&(this._$cancelButton&&this._$cancelButton.remove(),this.option("showCancelButton"))){const e=this._createActionByOption("onCancelClick")||r.noop,t=this;this._$cancelButton=(0,a.default)("<div>").addClass("dx-actionsheet-cancel").appendTo(this._popup&&this._popup.$content()),this._createComponent(this._$cancelButton,c.default,{disabled:!1,stylingMode:m,text:this.option("cancelText"),onClick(i){const n={event:i,cancel:!1};e(n),n.cancel||t.hide()},integrationOptions:{}})}},_attachItemClickEvent:r.noop,_itemClickHandler(e){this.callBase(e),(0,a.default)(e.target).is(".dx-state-disabled, .dx-state-disabled *")||this.hide()},_itemHoldHandler(e){this.callBase(e),(0,a.default)(e.target).is(".dx-state-disabled, .dx-state-disabled *")||this.hide()},_optionChanged(e){switch(e.name){case"width":case"height":case"visible":case"title":this._mapPopupOption(e.name);break;case"disabled":this._renderDisabled();break;case"showTitle":this._renderPopupTitle();break;case"showCancelButton":case"onCancelClick":case"cancelText":this._renderCancelButton();break;case"target":case"usePopover":case"items":this._invalidate();break;default:this.callBase(e)}},toggle(e){const t=this,i=(0,l.Deferred)();return t._popup.toggle(e).done((()=>{t.option("visible",e),i.resolveWith(t)})),i.promise()},show(){return this.toggle(!0)},hide(){return this.toggle(!1)}});(0,o.default)("dxActionSheet",v);t.default=v},71795:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(98834),o=u(i(92848)),a=u(i(64553)),s=i(17781),r=i(87739),l=i(52576),d=u(i(38571));function u(e){return e&&e.__esModule?e:{default:e}}const c=d.default.inherit({_supportedKeys(){let e=this._list?this._list.option("focusedElement"):null;const t=this.callBase();return e=e&&(0,a.default)(e),(0,l.extend)({},t,{upArrow(i){return!(t.upArrow.apply(this,arguments)&&!(0,n.isCommandKeyPressed)(i)&&(i.preventDefault(),i.stopPropagation(),e&&!this._calcNextItem(-1)))||(this._clearFocusedItem(),!1)},downArrow(i){return!(t.downArrow.apply(this,arguments)&&!(0,n.isCommandKeyPressed)(i)&&(i.preventDefault(),i.stopPropagation(),e&&!this._calcNextItem(1)))||(this._clearFocusedItem(),!1)},enter(t){e||this.close();const i=this.option("opened");return i&&t.preventDefault(),i}})},_getDefaultOptions(){return(0,l.extend)(this.callBase(),{minSearchLength:1,maxItemCount:10,noDataText:"",showDropDownButton:!1,searchEnabled:!0})},_initMarkup(){this.callBase(),this.$element().addClass("dx-autocomplete")},_getAriaAutocomplete(){const{disabled:e,readOnly:t}=this.option();return!(t||e)?"list":"none"},_displayGetterExpr(){return this.option("valueExpr")},_closeOutsideDropDownHandler(e){let{target:t}=e;return!(0,a.default)(t).closest(this.$element()).length},_renderDimensions(){this.callBase(),this._updatePopupWidth(),this._updateListDimensions()},_popupWrapperClass(){return`${this.callBase()} dx-autocomplete-popup-wrapper`},_listConfig(){return(0,l.extend)(this.callBase(),{pageLoadMode:"none",onSelectionChanged:e=>{this._setSelectedItem(e.addedItems[0])}})},_listItemClickHandler(e){this._saveValueChangeEvent(e.event);const t=this._displayGetter(e.itemData);this.option("value",t),this.close()},_setListDataSource(){this._list&&(this._list.option("selectedItems",[]),this.callBase())},_refreshSelected:s.noop,_searchCanceled(){this.callBase(),this.close()},_loadItem(e,t){const i=this._getItemFromPlain(e,t);return(0,r.Deferred)().resolve(i).promise()},_dataSourceOptions(){return{paginate:!0,pageSize:this.option("maxItemCount")}},_searchDataSource(e){this._dataSource.pageSize(this.option("maxItemCount")),this.callBase(e),this._clearFocusedItem()},_clearFocusedItem(){this._list&&(this._list.option("focusedElement",null),this._list.option("selectedIndex",-1))},_renderValueEventName:()=>"input keyup",_valueChangeEventHandler(e){const t=this._input().val()||null;return this.callBase(e,t)},_optionChanged(e){switch(e.name){case"readOnly":case"disabled":this.callBase(e),this._setDefaultAria();break;case"maxItemCount":this._searchDataSource();break;case"valueExpr":this._compileDisplayGetter(),this._setListOption("displayExpr",this._displayGetterExpr()),this.callBase(e);break;default:this.callBase(e)}},clear(){this.callBase(),this.close()},reset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;arguments.length?this.callBase(e):this.callBase(),this.close()}});(0,o.default)("dxAutocomplete",c);t.default=c},30434:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(92848)),o=p(i(64553)),a=i(52576),s=i(53124),r=i(21274),l=i(58515),d=i(11528),u=i(3104),c=p(i(7607)),h=p(i(85149));function p(e){return e&&e.__esModule?e:{default:e}}const g="dxBoxItemData",_={row:"minWidth",col:"minHeight"},f={row:"maxWidth",col:"maxHeight"},m={start:"flex-start",end:"flex-end",center:"center","space-between":"space-between","space-around":"space-around"},v={start:"flex-start",end:"flex-end",center:"center",stretch:"stretch"},C={row:"row",col:"column"},y=(e,t,i)=>{if(i=(0,l.normalizeStyleProp)(t,i),e.style[(0,l.styleProp)(t)]=i,!(0,u.hasWindow)()){if(""===i||!(0,d.isDefined)(i))return;const n=`${(0,s.dasherize)(t)}: ${i};`;(0,l.setStyle)(e,n,!1)}};class b extends h.default{_renderVisible(e,t){super._renderVisible(e),(0,d.isDefined)(t)&&this._options.fireItemStateChangedAction({name:"visible",state:e,oldState:t})}}class x{constructor(e,t){this._$element=e,this._option=t}renderBox(){this._$element.css({display:`${(0,l.stylePropPrefix)("flexDirection")}flex`}),y(this._$element.get(0),"flexDirection",C[this._option("direction")])}renderAlign(){this._$element.css({justifyContent:this._normalizedAlign()})}_normalizedAlign(){const e=this._option("align");return e in m?m[e]:e}renderCrossAlign(){this._$element.css({alignItems:this._normalizedCrossAlign()})}_normalizedCrossAlign(){const e=this._option("crossAlign");return e in v?v[e]:e}renderItems(e){const t=(0,l.stylePropPrefix)("flexDirection"),i=this._option("direction");(0,r.each)(e,(function(){const e=(0,o.default)(this),n=e.data(g);e.css({display:`${t}flex`}).css(f[i],n.maxSize||"none").css(_[i],n.minSize||"0"),y(e.get(0),"flexBasis",n.baseSize||0),y(e.get(0),"flexGrow",n.ratio),y(e.get(0),"flexShrink",(0,d.isDefined)(n.shrink)?n.shrink:1),e.children().each(((e,t)=>{(0,o.default)(t).css({width:"auto",height:"auto",display:`${(0,l.stylePropPrefix)("flexDirection")}flex`,flexBasis:0}),y(t,"flexGrow",1),y(t,"flexDirection",(0,o.default)(t)[0].style.flexDirection||"column")}))}))}}class w extends c.default{_getDefaultOptions(){return(0,a.extend)(super._getDefaultOptions(),{direction:"row",align:"start",crossAlign:"stretch",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,_queue:void 0})}_itemClass(){return"dx-box-item"}_itemDataKey(){return g}_itemElements(){return this._itemContainer().children(this._itemSelector())}_init(){super._init(),this.$element().addClass("dx-box-flex"),this._initLayout(),this._initBoxQueue()}_initLayout(){this._layout=new x(this.$element(),this.option.bind(this))}_initBoxQueue(){this._queue=this.option("_queue")||[]}_queueIsNotEmpty(){return!this.option("_queue")&&!!this._queue.length}_pushItemToQueue(e,t){this._queue.push({$item:e,config:t})}_shiftItemFromQueue(){return this._queue.shift()}_initMarkup(){this.$element().addClass("dx-box"),this._layout.renderBox(),super._initMarkup(),this._renderAlign(),this._renderActions()}_renderActions(){this._onItemStateChanged=this._createActionByOption("onItemStateChanged")}_renderAlign(){this._layout.renderAlign(),this._layout.renderCrossAlign()}_renderItems(e){for(super._renderItems(e);this._queueIsNotEmpty();){const e=this._shiftItemFromQueue();this._createComponent(e.$item,w,(0,a.extend)({itemTemplate:this.option("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this.option("onItemHold"),onItemClick:this.option("onItemClick"),onItemContextMenu:this.option("onItemContextMenu"),onItemRendered:this.option("onItemRendered"),_queue:this._queue},e.config))}this._layout.renderItems(this._itemElements())}_renderItemContent(e){const t=e.itemData&&e.itemData.node;return t?this._renderItemContentByNode(e,t):super._renderItemContent(e)}_postprocessRenderItem(e){const t=e.itemData.box;t&&this._pushItemToQueue(e.itemContent,t)}_createItemByTemplate(e,t){return t.itemData.box?e.source?e.source():(0,o.default)():super._createItemByTemplate(e,t)}_itemOptionChanged(e,t,i,n){"visible"===t&&this._onItemStateChanged({name:t,state:i,oldState:!1!==n}),super._itemOptionChanged(e,t,i)}_optionChanged(e){switch(e.name){case"_queue":case"direction":this._invalidate();break;case"align":this._layout.renderAlign();break;case"crossAlign":this._layout.renderCrossAlign();break;default:super._optionChanged(e)}}_itemOptions(){const e=super._itemOptions();return e.fireItemStateChangedAction=e=>{this._onItemStateChanged(e)},e}}w.ItemClass=b,(0,n.default)("dxBox",w);t.default=w},14111:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(i(92848)),o=c(i(64553)),a=i(27286),s=i(52576),r=i(11528),l=c(i(64973)),d=c(i(7607)),u=c(i(11118));function c(e){return e&&e.__esModule?e:{default:e}}const h="dx-buttongroup",p=`${h}-wrapper`,g=`${h}-item`,_=`${h}-first-item`,f=`${h}-last-item`,m=`${g}-has-width`,v={contained:"dx-buttongroup-mode-contained",outlined:"dx-buttongroup-mode-outlined",text:"dx-buttongroup-mode-text"},C=d.default.inherit({_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new a.BindableTemplate(((e,t,i)=>{this._prepareItemStyles(e);const n=this.option("buttonTemplate");this._createComponent(e,l.default,(0,s.extend)({},i,t,this._getBasicButtonOptions(),{_templateData:this._hasCustomTemplate(n)?i:{},template:i.template||n}))}),["text","type","icon","disabled","visible","hint"],this.option("integrationOptions.watchMethod"))})},_getBasicButtonOptions(){return{focusStateEnabled:!1,onClick:null,hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),stylingMode:this.option("stylingMode")}},_getDefaultOptions(){return(0,s.extend)(this.callBase(),{itemTemplateProperty:null})},_hasCustomTemplate(e){return(0,r.isFunction)(e)||this.option("integrationOptions.templates")[e]},_selectedItemClass:()=>"dx-item-selected dx-state-selected",_prepareItemStyles(e){const t=e.data("dxItemIndex");0===t&&e.addClass(_);const i=this.option("items");i&&t===i.length-1&&e.addClass(f),e.addClass("dx-shape-standard")},_renderItemContent(e){return e.container=(0,o.default)(e.container).parent(),this.callBase(e)},_setAriaSelectionAttribute(e,t){this.setAria("pressed",t,e)},_renderItemContentByNode(e,t){return e.container=(0,o.default)(e.container.children().first()),this.callBase(e,t)},_focusTarget(){return this.$element().parent()},_keyboardEventBindingTarget(){return this._focusTarget()},_refreshContent(){this._prepareContent(),this._renderContent()},_itemClass:()=>g,_itemSelectHandler(e){"single"===this.option("selectionMode")&&this.isItemSelected(e.currentTarget)||this.callBase(e)}}),y=u.default.inherit({_getDefaultOptions(){return(0,s.extend)(this.callBase(),{hoverStateEnabled:!0,focusStateEnabled:!0,selectionMode:"single",selectedItems:[],selectedItemKeys:[],stylingMode:"contained",keyExpr:"text",items:[],buttonTemplate:"content",onSelectionChanged:null,onItemClick:null})},_init(){this.callBase(),this._createItemClickAction()},_createItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")},_initMarkup(){this.setAria("role","group"),this.$element().addClass(h),this._renderStylingMode(),this._renderButtons(),this._syncSelectionOptions(),this.callBase()},_renderStylingMode(){const{stylingMode:e}=this.option();for(const e in v)this.$element().removeClass(v[e]);this.$element().addClass(v[e]??v.contained)},_fireSelectionChangeEvent(e,t){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:e,removedItems:t})},_renderButtons(){const e=(0,o.default)("<div>").addClass(p).appendTo(this.$element()),t=this.option("selectedItems"),i={selectionMode:this.option("selectionMode"),items:this.option("items"),keyExpr:this.option("keyExpr"),buttonTemplate:this.option("buttonTemplate"),scrollingEnabled:!1,selectedItemKeys:this.option("selectedItemKeys"),focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),stylingMode:this.option("stylingMode"),accessKey:this.option("accessKey"),tabIndex:this.option("tabIndex"),noDataText:"",selectionRequired:!1,onItemRendered:e=>{const t=this.option("width");(0,r.isDefined)(t)&&(0,o.default)(e.itemElement).addClass(m)},onSelectionChanged:e=>{this._syncSelectionOptions(),this._fireSelectionChangeEvent(e.addedItems,e.removedItems)},onItemClick:e=>{this._itemClickAction(e)}};(0,r.isDefined)(t)&&t.length&&(i.selectedItems=t),this._buttonsCollection=this._createComponent(e,C,i)},_syncSelectionOptions(){this._setOptionWithoutOptionChange("selectedItems",this._buttonsCollection.option("selectedItems")),this._setOptionWithoutOptionChange("selectedItemKeys",this._buttonsCollection.option("selectedItemKeys"))},_optionChanged(e){switch(e.name){case"stylingMode":case"selectionMode":case"keyExpr":case"buttonTemplate":case"items":case"activeStateEnabled":case"focusStateEnabled":case"hoverStateEnabled":case"tabIndex":this._invalidate();break;case"selectedItemKeys":case"selectedItems":this._buttonsCollection.option(e.name,e.value);break;case"onItemClick":this._createItemClickAction();break;case"onSelectionChanged":break;case"width":this.callBase(e),this._buttonsCollection.itemElements().toggleClass(m,!!e.value);break;default:this.callBase(e)}}});(0,n.default)("dxButtonGroup",y);t.default=y},27932:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(33054),o=v(i(92774)),a=i(18029),s=v(i(92848)),r=v(i(64960)),l=v(i(64553)),d=i(17781),u=i(87739),c=i(52576),h=i(21274),p=i(41639),g=i(11528),_=i(3104),f=v(i(11979)),m=v(i(11118));function v(e){return e&&e.__esModule?e:{default:e}}const C=(0,_.getWindow)(),y="dx-pending-rendering",b="dx-pending-rendering-manual",x="dx-pending-rendering-active",w=["onRendered","onShown"],S=m.default.inherit({_getDefaultOptions(){return(0,c.extend)(this.callBase(),{showLoadIndicator:!1,renderWhen:void 0,animation:void 0,staggerItemSelector:void 0,onRendered:null,onShown:null})},_getAnonymousTemplateName:()=>"content",_init(){this.transitionExecutor=new n.TransitionExecutor,this._initElement(),this._initRender(),this._$initialContent=this.$element().clone().contents(),this._initActions(),this.callBase()},_initElement(){this.$element().addClass("dx-deferrendering")},_initRender(){const e=this,t=this.$element(),i=this.option("renderWhen"),n=()=>e._renderDeferredContent();(0,g.isPromise)(i)?(0,u.fromPromise)(i).done(n):(t.data("dx-render-delegate",n),void 0===i&&t.addClass(b))},_initActions(){this._actions={},(0,h.each)(w,((e,t)=>{this._actions[t]=this._createActionByOption(t)||d.noop}))},_initMarkup(){this.callBase(),this._initContent||(this._initContent=this._renderContent,this._renderContent=()=>{}),this._initContent()},_renderContentImpl(){this.$element().removeClass("dx-widget"),this.$element().append(this._$initialContent),this._setLoadingState()},_renderDeferredContent(){const e=this,t=this.$element(),i=(0,u.Deferred)();return t.removeClass(b),t.addClass(x),this._abortRenderTask(),this._renderTask=(0,d.executeAsync)((()=>{e._renderImpl().done((()=>{const n={element:t};e._actions.onShown([n]),i.resolve(n)})).fail((function(){i.rejectWith(i,arguments)}))})),i.promise()},_isElementInViewport(e){const t=(0,p.getBoundingRect)(e);return t.bottom>=0&&t.right>=0&&t.top<=(C.innerHeight||r.default.getDocumentElement().clientHeight)&&t.left<=(C.innerWidth||r.default.getDocumentElement().clientWidth)},_animate(){const e=this,t=this.$element(),i=(0,_.hasWindow)()&&this.option("animation"),n=this.option("staggerItemSelector");let o;return e.transitionExecutor.stop(),i?(n?t.find(n).each((function(){e._isElementInViewport(this)&&e.transitionExecutor.enter((0,l.default)(this),i)})):e.transitionExecutor.enter(t,i),o=e.transitionExecutor.start()):o=(0,u.Deferred)().resolve().promise(),o},_renderImpl(){const e=this.$element(),t={element:e},i=this._getTemplate(this._templateManager.anonymousTemplateName);return i&&i.render({container:e.empty(),noModel:!0}),this._setRenderedState(e),o.default.trigger(e,"dxcontentrendered"),this._actions.onRendered([t]),this._isRendered=!0,this._animate()},_setLoadingState(){const e=this.$element(),t=!!e.find(".dx-visible-while-pending-rendering").length;e.addClass(y),t||e.children().addClass("dx-invisible-while-pending-rendering"),this.option("showLoadIndicator")&&this._showLoadIndicator(e)},_showLoadIndicator(e){this._$loadIndicator=new f.default((0,l.default)("<div>"),{visible:!0}).$element().addClass("dx-deferrendering-load-indicator"),(0,l.default)("<div>").addClass("dx-loadindicator-container").addClass("dx-deferrendering-loadindicator-container").append(this._$loadIndicator).appendTo(e)},_setRenderedState(){const e=this.$element();this._$loadIndicator&&this._$loadIndicator.remove(),e.removeClass(y),e.removeClass(x),(0,a.triggerShownEvent)(e.children())},_optionChanged(e){const{value:t}=e,{previousValue:i}=e;switch(e.name){case"renderWhen":!1===i&&!0===t?this._renderOrAnimate():!0===i&&!1===t&&(this.transitionExecutor.stop(),this._setLoadingState());break;case"showLoadIndicator":case"onRendered":case"onShown":break;default:this.callBase(e)}},_renderOrAnimate(){let e;return this._isRendered?(this._setRenderedState(),e=this._animate()):e=this._renderDeferredContent(),e},renderContent(){return this._renderOrAnimate()},_abortRenderTask(){this._renderTask&&(this._renderTask.abort(),this._renderTask=void 0)},_dispose(){this.transitionExecutor.stop(!0),this._abortRenderTask(),this._actions=void 0,this._$initialContent=void 0,this.callBase()}});(0,s.default)("dxDeferRendering",S);t.default=S},84719:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.custom=t.confirm=t.alert=void 0;var n=b(i(92774)),o=b(i(4671)),a=b(i(88412)),s=b(i(66636)),r=b(i(65951)),l=b(i(19427)),d=b(i(64553)),u=i(17781),c=i(87739),h=i(52576),p=i(57653),g=i(11528),_=i(55355),f=i(3104),m=b(i(10720)),v=i(52071),C=b(i(35185)),y=b(i(76400));function b(e){return e&&e.__esModule?e:{default:e}}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},x.apply(null,arguments)}const w=(0,f.getWindow)(),S={text:"OK",onClick:()=>!0},D="dx-dialog",I=`${D}-wrapper`,E=`${D}-root`,T=`${D}-content`,A=`${D}-message`,O=`${D}-buttons`,P=`${D}-button`,k="dx-button",M=()=>(0,v.isFluent)()?{stylingMode:"contained",type:"default"}:{},R=function(e){const t=(0,c.Deferred)();e=e||{};const i=(0,d.default)("<div>").addClass(D).appendTo((0,_.value)()),o="messageHtml"in e;"message"in e&&C.default.log("W1013");const g=String(o?e.messageHtml:e.message),f=e.title?null:new l.default,v=(0,d.default)("<div>").addClass(A).html(g).attr("id",f),b=[],M=new m.default(i,(0,h.extend)({title:e.title??"",showTitle:(0,u.ensureDefined)(e.showTitle,!0),dragEnabled:(0,u.ensureDefined)(e.dragEnabled,!0),height:"auto",width:e.width,showCloseButton:e.showCloseButton||!1,ignoreChildEvents:!1,container:i,visualContainer:w,dragAndResizeArea:w,onContentReady(e){e.component.$content().addClass(T).append(v),f&&e.component.$overlayContent().attr("aria-labelledby",f)},onShowing(e){e.component.bottomToolbar().addClass(O).find(`.${k}`).addClass(P),y.default.resetActiveElement()},onShown(e){const t=e.component.bottomToolbar().find(`.${k}`).first();n.default.trigger(t,"focus")},onHiding(){t.reject()},onHidden(e){let{element:t}=e;(0,d.default)(t).remove()},animation:{show:{type:"pop",duration:400},hide:{type:"pop",duration:400,to:{opacity:0,scale:0},from:{opacity:1,scale:1}}},rtlEnabled:(0,s.default)().rtlEnabled,position:{boundaryOffset:{h:10,v:0}}},e.popupOptions));function R(e){t.resolve(e),M.hide()}return(e.buttons||[S]).forEach((e=>{const t=new a.default(e.onClick,{context:M});b.push({toolbar:"bottom",location:r.default.current().android?"after":"center",widget:"dxButton",options:x({},e,{onClick(){R(t.execute(...arguments))}})})})),M.option("toolbarItems",b),M.$wrapper().addClass(I),e.position&&M.option("position",e.position),M.$wrapper().addClass(E),{show:function(){if("phone"===r.default.real().deviceType){const e=(0,p.getHeight)(w)>(0,p.getWidth)(w)?"90%":"60%";M.option({width:e})}return M.show(),t.promise()},hide:R}};t.custom=R;t.alert=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0;const n=(0,g.isPlainObject)(e)?e:{title:t,messageHtml:e,showTitle:i,buttons:[x({},S,M())],dragEnabled:i};return R(n).show()};t.confirm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0;const n=(0,g.isPlainObject)(e)?e:{title:t,messageHtml:e,showTitle:i,buttons:[x({text:o.default.format("Yes"),onClick:()=>!0},M()),x({text:o.default.format("No"),onClick:()=>!1},(0,v.isFluent)()?{stylingMode:"outlined",type:"default"}:{})],dragEnabled:i};return R(n).show()}},41163:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=C(i(92774)),o=i(98834),a=C(i(92848)),s=C(i(65951)),r=C(i(64960)),l=i(61404),d=C(i(64553)),u=i(17781),c=i(87739),h=i(52576),p=i(21274),g=i(11528),_=C(i(7632)),f=i(35944),m=C(i(28906)),v=i(67169);function C(e){return e&&e.__esModule?e:{default:e}}const{getActiveElement:y}=r.default,b="content",x=s.default.real(),w=m.default.inherit({_supportedKeys(){return(0,h.extend)({},this.callBase(),{tab(e){if(!this.option("opened"))return;const t=this._getTabbableElements(),i=e.shiftKey?t.last():t.first();i&&n.default.trigger(i,"focus"),e.preventDefault()}})},_getTabbableElements(){return this._getElements().filter(f.tabbable)},_getElements(){return(0,d.default)(this.content()).find("*")},_getDefaultOptions(){return(0,h.extend)(this.callBase(),{acceptCustomValue:!1,contentTemplate:b,openOnFieldClick:!0,displayValueFormatter:e=>Array.isArray(e)?e.join(", "):e,useHiddenSubmitElement:!0})},_getAnonymousTemplateName:()=>b,_initTemplates(){this.callBase()},_initMarkup(){this._initDataExpressions(),this.$element().addClass("dx-dropdownbox"),this.callBase()},_setSubmitValue(){const e=this.option("value"),t=this._shouldUseDisplayValue(e)?this._displayGetter(e):e;this._getSubmitElement().val(t)},_shouldUseDisplayValue(e){return"this"===this.option("valueExpr")&&(0,g.isObject)(e)},_sortValuesByKeysOrder:(e,t)=>t.sort(((t,i)=>e.indexOf(t.itemKey)-e.indexOf(i.itemKey))).map((e=>e.itemDisplayValue)),_renderInputValue(){this._rejectValueLoading();const e=[];if(!this._dataSource)return this.callBase(e),(0,c.Deferred)().resolve();let t=this._getCurrentValue()??[];t=Array.isArray(t)?t:[t];const i=(0,p.map)(t,(t=>{const i=(0,c.Deferred)();return this._loadItem(t).always((n=>{const o=this._displayGetter(n);(0,g.isDefined)(o)?e.push({itemKey:t,itemDisplayValue:o}):this.option("acceptCustomValue")&&e.push({itemKey:t,itemDisplayValue:t}),i.resolve()})),i})),n=this.callBase.bind(this);return c.when.apply(this,i).always((()=>{const i=this._sortValuesByKeysOrder(t,e);this.option("displayValue",i),n(e.length&&i)}))},_loadItem(e){const t=(0,c.Deferred)(),i=this,n=(0,u.grep)(this.option("items")||[],(t=>this._isValueEquals(this._valueGetter(t),e)))[0];return void 0!==n?t.resolve(n):this._loadValue(e).done((e=>{t.resolve(e)})).fail((n=>{null!=n&&n.shouldSkipCallback||(i.option("acceptCustomValue")?t.resolve(e):t.reject())})),t.promise()},_popupTabHandler(e){if("tab"!==(0,o.normalizeKeyName)(e))return;const t=this._getTabbableElements().first().get(0),i=this._getTabbableElements().last().get(0),a=e.target,s=!(a!==t||!e.shiftKey),r=!(a!==i||e.shiftKey);(s||r)&&(this.close(),n.default.trigger(this._input(),"focus"),s&&e.preventDefault())},_renderPopupContent(){if(this.option("contentTemplate")===b)return;const e=this._getTemplateByOption("contentTemplate");if(!e||!this.option("contentTemplate"))return;const t=this._popup.$content(),i={value:this._fieldRenderData(),component:this};t.empty(),e.render({container:(0,l.getPublicElement)(t),model:i})},_canShowVirtualKeyboard:()=>x.mac,_isNestedElementActive(){const e=y();return e&&this._popup.$content().get(0).contains(e)},_shouldHideOnParentScroll(){return"desktop"===x.deviceType&&this._canShowVirtualKeyboard()&&this._isNestedElementActive()},_popupHiddenHandler(){this.callBase(),this._popupPosition=void 0},_popupPositionedHandler(e){this.callBase(e),this._popupPosition=e.position},_getDefaultPopupPosition(e){const{my:t,at:i}=this.callBase(e);return{my:t,at:i,offset:{v:-1},collision:"flipfit"}},_popupConfig(){const{focusStateEnabled:e}=this.option();return(0,h.extend)(this.callBase(),{tabIndex:-1,dragEnabled:!1,focusStateEnabled:e,contentTemplate:b,hideOnParentScroll:this._shouldHideOnParentScroll.bind(this),position:(0,h.extend)(this.option("popupPosition"),{of:this.$element()}),_ignoreFunctionValueDeprecation:!0,maxHeight:function(){var e;const t=null===(e=this._popupPosition)||void 0===e?void 0:e.v.location;return(0,v.getElementMaxHeightByWindow)(this.$element(),t)}.bind(this)})},_popupShownHandler(){this.callBase();const e=this._getTabbableElements().first();n.default.trigger(e,"focus")},_setCollectionWidgetOption:u.noop,_optionChanged(e){switch(this._dataExpressionOptionChanged(e),e.name){case"dataSource":this._renderInputValue();break;case"displayValue":this.option("text",e.value);break;case"displayExpr":this._renderValue();break;case"contentTemplate":this._invalidate();break;default:this.callBase(e)}}}).include(_.default);(0,a.default)("dxDropDownBox",w);t.default=w},73096:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=b(i(4671)),o=b(i(92848)),a=i(61404),s=b(i(19427)),r=b(i(64553)),l=i(38699),d=i(17781),u=i(31e3),c=i(87739),h=i(52576),p=i(69629),g=i(11528),_=b(i(14531)),f=b(i(17809)),m=b(i(80070)),v=b(i(10720)),C=b(i(11118)),y=i(6807);function b(e){return e&&e.__esModule?e:{default:e}}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},x.apply(null,arguments)}const w="dx-dropdownbutton",S="dx-dropdownbutton-action",D="dx-dropdownbutton-toggle",I=C.default.inherit({_getDefaultOptions(){return(0,h.extend)(this.callBase(),{itemTemplate:"item",keyExpr:"this",displayExpr:void 0,selectedItem:null,selectedItemKey:null,stylingMode:"outlined",deferRendering:!0,noDataText:n.default.format("dxCollectionWidget-noDataText"),useSelectMode:!1,splitButton:!1,showArrowIcon:!0,template:null,text:"",type:"normal",icon:void 0,onButtonClick:null,onSelectionChanged:null,onItemClick:null,opened:!1,items:null,dataSource:null,focusStateEnabled:!0,hoverStateEnabled:!0,dropDownOptions:{},dropDownContentTemplate:"content",wrapItemText:!1,useItemTextAsTitle:!0,grouped:!1,groupTemplate:"group",buttonGroupOptions:{}})},_setOptionsByReference(){this.callBase(),(0,h.extend)(this._optionsByReference,{selectedItem:!0})},_init(){this.callBase(),this._createItemClickAction(),this._createActionClickAction(),this._createSelectionChangedAction(),this._initDataController(),this._compileKeyGetter(),this._compileDisplayGetter(),this._options.cache("buttonGroupOptions",this.option("buttonGroupOptions")),this._options.cache("dropDownOptions",this.option("dropDownOptions"))},_initDataController(){const e=this.option("dataSource");this._dataController=new _.default(e??this.option("items"),{key:this.option("keyExpr")})},_initTemplates(){this._templateManager.addDefaultTemplates({content:new l.FunctionTemplate((e=>{const t=(0,r.default)(e.container),i=(0,r.default)("<div>").appendTo(t);this._list=this._createComponent(i,m.default,this._listOptions()),this._list.registerKeyHandler("escape",this._escHandler.bind(this)),this._list.registerKeyHandler("tab",this._escHandler.bind(this)),this._list.registerKeyHandler("leftArrow",this._escHandler.bind(this)),this._list.registerKeyHandler("rightArrow",this._escHandler.bind(this))}))}),this.callBase()},_compileKeyGetter(){this._keyGetter=(0,u.compileGetter)(this._dataController.key())},_compileDisplayGetter(){this._displayGetter=(0,u.compileGetter)(this.option("displayExpr"))},_initMarkup(){this.callBase(),this.$element().addClass(w),this._renderButtonGroup(),this._updateArrowClass(),(0,g.isDefined)(this.option("selectedItemKey"))&&this._loadSelectedItem().done(this._updateActionButton.bind(this))},_renderFocusTarget:d.noop,_render(){this.option("deferRendering")&&!this.option("opened")||this._renderPopup(),this.callBase()},_renderContentImpl(){return this._popup&&this._renderPopupContent(),this.callBase()},_loadSelectedItem(){var e;null===(e=this._loadSingleDeferred)||void 0===e||e.reject();const t=(0,c.Deferred)();if(this._list&&void 0!==this._lastSelectedItemData){const e=this.option("useSelectMode")?this._list.option("selectedItem"):this._lastSelectedItemData;return t.resolve(e)}this._lastSelectedItemData=void 0;const i=this.option("selectedItemKey");return this._dataController.loadSingle(i).done(t.resolve).fail((()=>{t.reject(null)})),this._loadSingleDeferred=t,t.promise()},_createActionClickAction(){this._actionClickAction=this._createActionByOption("onButtonClick")},_createSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged")},_createItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")},_fireSelectionChangedAction(e){let{previousValue:t,value:i}=e;this._selectionChangedAction({item:i,previousItem:t})},_fireItemClickAction(e){let{event:t,itemElement:i,itemData:n}=e;return this._itemClickAction({event:t,itemElement:i,itemData:this._actionItem||n})},_getButtonTemplate(){const{template:e,splitButton:t,showArrowIcon:i}=this.option();return e||(t||!i?"content":(e,t)=>{let{text:i,icon:n}=e;const o=(0,p.getImageContainer)(n),a=i?(0,r.default)("<span>").text(i).addClass("dx-button-text"):void 0,s=(0,p.getImageContainer)("spindown").addClass("dx-icon-right");(0,r.default)(t).append(o,a,s)})},_getActionButtonConfig(){const{icon:e,text:t,type:i,splitButton:n}=this.option(),o={text:t,icon:e,type:i,template:this._getButtonTemplate(),elementAttr:{class:S}};return n&&(o.elementAttr.role="menuitem"),o},_getSpinButtonConfig(){const{type:e}=this.option();return{type:e,icon:"spindown",elementAttr:{class:D,role:"menuitem"}}},_getButtonGroupItems(){const{splitButton:e}=this.option(),t=[this._getActionButtonConfig()];return e&&t.push(this._getSpinButtonConfig()),t},_buttonGroupItemClick(e){let{event:t,itemData:i}=e;const n=i.elementAttr.class===S;i.elementAttr.class===D?this.toggle():n&&(this._actionClickAction({event:t,selectedItem:this.option("selectedItem")}),this.option("splitButton")||this.toggle())},_getButtonGroupOptions(){const{accessKey:e,focusStateEnabled:t,hoverStateEnabled:i,splitButton:n,stylingMode:o,tabIndex:a}=this.option();return(0,h.extend)({items:this._getButtonGroupItems(),width:"100%",height:"100%",selectionMode:"none",focusStateEnabled:t,hoverStateEnabled:i,stylingMode:o,accessKey:e,tabIndex:a,elementAttr:{role:n?"menu":"group"},onItemClick:this._buttonGroupItemClick.bind(this),onKeyboardHandled:e=>this._keyboardHandler(e)},this._options.cache("buttonGroupOptions"))},_renderPopupContent(){const e=this._popup.$content(),t=this._getTemplateByOption("dropDownContentTemplate");return e.empty(),this._popupContentId=`dx-${new s.default}`,this.setAria("id",this._popupContentId,e),t.render({container:(0,a.getPublicElement)(e),model:this.option("items")||this._dataController.getDataSource()})},_popupOptions(){const e=this.option("rtlEnabled")?"right":"left";return(0,h.extend)({dragEnabled:!1,focusStateEnabled:!1,deferRendering:this.option("deferRendering"),hideOnOutsideClick:e=>{const t=this.$element();return!(0,r.default)(e.target).closest(`.${w}`).is(t)},showTitle:!1,animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},_ignoreFunctionValueDeprecation:!0,width:()=>(0,y.getElementWidth)(this.$element()),height:"auto",shading:!1,position:{of:this.$element(),collision:"flipfit",my:`${e} top`,at:`${e} bottom`},_wrapperClassExternal:"dx-dropdowneditor-overlay"},this._options.cache("dropDownOptions"),{visible:this.option("opened")})},_listOptions(){const e=this.option("selectedItemKey"),t=this.option("useSelectMode");return{selectionMode:t?"single":"none",wrapItemText:this.option("wrapItemText"),focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),useItemTextAsTitle:this.option("useItemTextAsTitle"),onContentReady:()=>this._fireContentReadyAction(),selectedItemKeys:(0,g.isDefined)(e)&&t?[e]:[],grouped:this.option("grouped"),groupTemplate:this.option("groupTemplate"),keyExpr:this._dataController.key(),noDataText:this.option("noDataText"),displayExpr:this.option("displayExpr"),itemTemplate:this.option("itemTemplate"),items:this.option("items"),dataSource:this._dataController.getDataSource(),onItemClick:e=>{this.option("useSelectMode")||(this._lastSelectedItemData=e.itemData),this.option("selectedItemKey",this._keyGetter(e.itemData));!1!==this._fireItemClickAction(e)&&(this.toggle(!1),this._buttonGroup.focus())}}},_upDownKeyHandler(){return this._popup&&this._popup.option("visible")&&this._list?this._list.focus():this.open(),!0},_escHandler(){return this.close(),this._buttonGroup.focus(),!0},_tabHandler(){return this.close(),!0},_renderPopup(){const e=(0,r.default)("<div>");this.$element().append(e),this._popup=this._createComponent(e,v.default,this._popupOptions()),this._popup.$content().addClass("dx-dropdownbutton-content"),this._popup.$wrapper().addClass("dx-dropdownbutton-popup-wrapper"),this._popup.$overlayContent().attr("aria-label","Dropdown"),this._popup.on("hiding",this._popupHidingHandler.bind(this)),this._popup.on("showing",this._popupShowingHandler.bind(this)),this._bindInnerWidgetOptions(this._popup,"dropDownOptions")},_popupHidingHandler(){this.option("opened",!1),this._updateAriaAttributes(!1)},_popupOptionChanged(e){const t=C.default.getOptionsFromContainer(e);this._setPopupOption(t);const i=Object.keys(t);(i.includes("width")||i.includes("height"))&&this._dimensionChanged()},_dimensionChanged(){void 0===(0,y.getSizeValue)(this.option("dropDownOptions.width"))&&this._setPopupOption("width",(()=>(0,y.getElementWidth)(this.$element())))},_setPopupOption(e,t){this._setWidgetOption("_popup",arguments)},_popupShowingHandler(){this.option("opened",!0),this._updateAriaAttributes(!0)},_setElementAria(e){const t={owns:e?this._popupContentId:void 0};this.setAria(t,this.$element())},_setButtonsAria(e){const t={expanded:e,haspopup:"listbox"},i={};this.option("text")||(i.label="dropdownbutton"),this._getButtons().each(((e,n)=>{0===e?this.setAria(x({},i,t),(0,r.default)(n)):this.setAria(t,(0,r.default)(n))}))},_updateAriaAttributes(e){this._setElementAria(e),this._setButtonsAria(e)},_getButtons(){return this._buttonGroup.$element().find(".dx-button")},_renderButtonGroup(){const e=this._buttonGroup&&this._buttonGroup.$element()||(0,r.default)("<div>");this._buttonGroup||this.$element().append(e),this._buttonGroup=this._createComponent(e,f.default,this._getButtonGroupOptions()),this._buttonGroup.registerKeyHandler("downArrow",this._upDownKeyHandler.bind(this)),this._buttonGroup.registerKeyHandler("tab",this._tabHandler.bind(this)),this._buttonGroup.registerKeyHandler("upArrow",this._upDownKeyHandler.bind(this)),this._buttonGroup.registerKeyHandler("escape",this._escHandler.bind(this)),this._bindInnerWidgetOptions(this._buttonGroup,"buttonGroupOptions"),this._updateAriaAttributes(this.option("opened"))},_updateArrowClass(){const e=this.option("splitButton")||this.option("showArrowIcon");this.$element().toggleClass("dx-dropdownbutton-has-arrow",e)},toggle(e){return this._popup||(this._renderPopup(),this._renderContent()),this._popup.toggle(e)},open(){return this.toggle(!0)},close(){return this.toggle(!1)},_setListOption(e,t){this._list&&this._list.option(e,t)},_getDisplayValue(e){const t=!(0,g.isObject)(e)?e:this._displayGetter(e);return(0,g.isObject)(t)?"":String((0,d.ensureDefined)(t,""))},_updateActionButton(e){this.option("useSelectMode")&&this.option({text:this._getDisplayValue(e),icon:(0,g.isPlainObject)(e)?e.icon:void 0}),this._setOptionWithoutOptionChange("selectedItem",e),this._setOptionWithoutOptionChange("selectedItemKey",this._keyGetter(e))},_clean(){this._list&&this._list.$element().remove(),this._popup&&this._popup.$element().remove()},_selectedItemKeyChanged(e){this._setListOption("selectedItemKeys",this.option("useSelectMode")&&(0,g.isDefined)(e)?[e]:[]);const t=this.option("selectedItem");this._loadSelectedItem().always((e=>{this._updateActionButton(e),this._displayGetter(t)!==this._displayGetter(e)&&this._fireSelectionChangedAction({previousValue:t,value:e})}))},_updateButtonGroup(e,t){this._buttonGroup.option(e,t),this._updateAriaAttributes(this.option("opened"))},_actionButtonOptionChanged(e){let{name:t,value:i}=e;const n={};n[t]=i,this._updateButtonGroup("items[0]",(0,h.extend)({},this._getActionButtonConfig(),n)),this._popup&&this._popup.repaint()},_selectModeChanged(e){if(e){this._setListOption("selectionMode","single");const e=this.option("selectedItemKey");this._setListOption("selectedItemKeys",(0,g.isDefined)(e)?[e]:[]),this._selectedItemKeyChanged(this.option("selectedItemKey"))}else this._setListOption("selectionMode","none"),this.option({selectedItemKey:void 0,selectedItem:void 0}),this._actionButtonOptionChanged({text:this.option("text")})},_updateItemCollection(e){const t=this.option("selectedItemKey");this._setListOption("selectedItem",null),this._setWidgetOption("_list",[e]),(0,g.isDefined)(t)&&this._loadSelectedItem().done((e=>{this._setListOption("selectedItemKeys",[t]),this._setListOption("selectedItem",e)})).fail((e=>{this._setListOption("selectedItemKeys",[])})).always(this._updateActionButton.bind(this))},_updateDataController(e){this._dataController.updateDataSource(e,this.option("keyExpr")),this._updateKeyExpr()},_updateKeyExpr(){this._compileKeyGetter(),this._setListOption("keyExpr",this._dataController.key())},focus(){this._buttonGroup.focus()},_optionChanged(e){var t;const{name:i,value:n}=e;switch(i){case"useSelectMode":this._selectModeChanged(n);break;case"splitButton":this._updateArrowClass(),this._renderButtonGroup();break;case"displayExpr":this._compileDisplayGetter(),this._setListOption(i,n),this._updateActionButton(this.option("selectedItem"));break;case"keyExpr":this._updateDataController();break;case"buttonGroupOptions":this._innerWidgetOptionChanged(this._buttonGroup,e);break;case"dropDownOptions":if("dropDownOptions.visible"===e.fullName)break;void 0!==e.value.visible&&delete e.value.visible,this._popupOptionChanged(e),this._innerWidgetOptionChanged(this._popup,e);break;case"opened":this.toggle(n);break;case"focusStateEnabled":case"hoverStateEnabled":this._setListOption(i,n),this._updateButtonGroup(i,n),this.callBase(e);break;case"items":this._updateDataController(this.option("items")),this._updateItemCollection(i);break;case"dataSource":this._dataController.updateDataSource(n),this._updateKeyExpr(),this._updateItemCollection(i);break;case"icon":case"text":this._actionButtonOptionChanged(e);break;case"showArrowIcon":this._updateArrowClass(),this._renderButtonGroup(),this._popup&&this._popup.repaint();break;case"width":case"height":this.callBase(e),null===(t=this._popup)||void 0===t||t.repaint();break;case"stylingMode":case"tabIndex":this._updateButtonGroup(i,n);break;case"type":this._updateButtonGroup("items",this._getButtonGroupItems());break;case"itemTemplate":case"grouped":case"noDataText":case"groupTemplate":case"wrapItemText":case"useItemTextAsTitle":this._setListOption(i,n);break;case"dropDownContentTemplate":this._renderContent();break;case"selectedItemKey":this._selectedItemKeyChanged(n);break;case"selectedItem":break;case"onItemClick":this._createItemClickAction();break;case"onButtonClick":this._createActionClickAction();break;case"onSelectionChanged":this._createSelectionChangedAction();break;case"deferRendering":this.toggle(this.option("opened"));break;case"template":this._renderButtonGroup();break;default:this.callBase(e)}},getDataSource(){return this._dataController.getDataSource()}});(0,o.default)("dxDropDownButton",I);t.default=I},22354:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(64044),o=S(i(92774)),a=i(98834),s=S(i(4671)),r=S(i(92848)),l=S(i(65951)),d=S(i(64960)),u=S(i(19427)),c=S(i(64553)),h=S(i(78670)),p=S(i(84718)),g=i(87739),_=i(52576),f=i(21274),m=i(57653),v=i(11528),C=i(3104),y=S(i(64973)),b=S(i(58436)),x=i(52071),w=S(i(32266));function S(e){return e&&e.__esModule?e:{default:e}}const D=(0,C.getWindow)(),I="dx-fileuploader-dragover",E="dx-fileuploader-file-container",T="dx-fileuploader-file-name",A="dx-fileuploader-file-size",O="dx-fileuploader-button",P="dx-fileuploader-button-container",k="dx-fileuploader-upload-button";const M=()=>!!D.FormData;class R extends w.default{_supportedKeys(){const e=e=>{e.preventDefault();const t=this._selectButton.$element();o.default.trigger(t,n.name)};return(0,_.extend)(super._supportedKeys(),{space:e,enter:e})}_setOptionsByReference(){super._setOptionsByReference(),(0,_.extend)(this._optionsByReference,{value:!0})}_getDefaultOptions(){return(0,_.extend)(super._getDefaultOptions(),{chunkSize:0,value:[],selectButtonText:s.default.format("dxFileUploader-selectFile"),uploadButtonText:s.default.format("dxFileUploader-upload"),labelText:s.default.format("dxFileUploader-dropFile"),name:"files[]",multiple:!1,accept:"",uploadUrl:"/",allowCanceling:!0,showFileList:!0,progress:0,dialogTrigger:void 0,dropZone:void 0,readyToUploadMessage:s.default.format("dxFileUploader-readyToUpload"),uploadedMessage:s.default.format("dxFileUploader-uploaded"),uploadFailedMessage:s.default.format("dxFileUploader-uploadFailedMessage"),uploadAbortedMessage:s.default.format("dxFileUploader-uploadAbortedMessage"),uploadMode:"instantly",uploadMethod:"POST",uploadHeaders:{},uploadCustomData:{},onBeforeSend:null,onUploadStarted:null,onUploaded:null,onFilesUploaded:null,onProgress:null,onUploadError:null,onUploadAborted:null,onDropZoneEnter:null,onDropZoneLeave:null,allowedFileExtensions:[],maxFileSize:0,minFileSize:0,inputAttr:{},invalidFileExtensionMessage:s.default.format("dxFileUploader-invalidFileExtension"),invalidMaxFileSizeMessage:s.default.format("dxFileUploader-invalidMaxFileSize"),invalidMinFileSizeMessage:s.default.format("dxFileUploader-invalidMinFileSize"),extendSelection:!0,validationMessageMode:"always",uploadFile:null,uploadChunk:null,abortUpload:null,validationMessageOffset:{h:0,v:0},hoverStateEnabled:!0,useNativeInputClick:!1,useDragOver:!0,nativeDropSupported:!0,_uploadButtonType:"normal",_buttonStylingMode:"contained"})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>"desktop"===l.default.real().deviceType&&!l.default.isSimulator(),options:{focusStateEnabled:!0}},{device:[{platform:"android"}],options:{validationMessageOffset:{v:0}}},{device:()=>"desktop"!==l.default.real().deviceType,options:{useDragOver:!1}},{device:()=>!M(),options:{uploadMode:"useForm"}},{device:()=>"desktop"!==l.default.real().deviceType,options:{nativeDropSupported:!1}},{device:()=>(0,x.isMaterial)(),options:{_uploadButtonType:"default"}},{device:()=>(0,x.isFluent)(),options:{_buttonStylingMode:"text"}}])}_initOptions(e){const t="labelText"in e;super._initOptions(e),t||this._shouldDragOverBeRendered()||this.option("labelText","")}_init(){super._init(),this._initFileInput(),this._initLabel(),this._setUploadStrategy(),this._createFiles(),this._createBeforeSendAction(),this._createUploadStartedAction(),this._createUploadedAction(),this._createFilesUploadedAction(),this._createProgressAction(),this._createUploadErrorAction(),this._createUploadAbortedAction(),this._createDropZoneEnterAction(),this._createDropZoneLeaveAction()}_setUploadStrategy(){if(this.option("chunkSize")>0){const e=this.option("uploadChunk");this._uploadStrategy=e&&(0,v.isFunction)(e)?new H(this):new F(this)}else{const e=this.option("uploadFile");this._uploadStrategy=e&&(0,v.isFunction)(e)?new W(this):new z(this)}}_initFileInput(){this._isCustomClickEvent=!1;const{multiple:e,accept:t,hint:i}=this.option();this._$fileInput||(this._$fileInput=(0,c.default)("<input>").attr("type","file"),o.default.on(this._$fileInput,"change",this._inputChangeHandler.bind(this)),o.default.on(this._$fileInput,"click",(e=>(e.stopPropagation(),this._resetInputValue(),this.option("useNativeInputClick")||this._isCustomClickEvent))));const n={multiple:e,accept:t,tabIndex:-1};(0,v.isDefined)(i)&&(n.title=i),this._$fileInput.prop(n)}_inputChangeHandler(){if(this._doPreventInputChange)return;const e=this._$fileInput.val().replace(/^.*\\/,""),t=this._$fileInput.prop("files");if(t&&!t.length&&"useForm"!==this.option("uploadMode"))return;const i=t?this._getFiles(t):[{name:e}];this._changeValue(i),"instantly"===this.option("uploadMode")&&this._uploadFiles()}_shouldFileListBeExtended(){return"useForm"!==this.option("uploadMode")&&this.option("extendSelection")&&this.option("multiple")}_changeValue(e){const t=this._shouldFileListBeExtended()?this.option("value").slice():[];this.option("value",t.concat(e))}_getFiles(e){const t=[];return(0,f.each)(e,((e,i)=>t.push(i))),t}_getFile(e){const t=(0,v.isNumeric)(e)?this.option("value")[e]:e;return this._files.filter((e=>e.value===t))[0]}_initLabel(){this._$inputLabel||(this._$inputLabel=(0,c.default)("<div>")),this._updateInputLabelText()}_updateInputLabelText(){const e=this._isInteractionDisabled()?"":this.option("labelText");this._$inputLabel.text(e)}_focusTarget(){return this.$element().find(`.${O}`)}_getSubmitElement(){return this._$fileInput}_initMarkup(){super._initMarkup(),this.$element().addClass("dx-fileuploader"),this._renderWrapper(),this._renderInputWrapper(),this._renderSelectButton(),this._renderInputContainer(),this._renderUploadButton(),this._preventRecreatingFiles=!0,this._activeDropZone=null}_render(){this._preventRecreatingFiles=!1,this._attachDragEventHandlers(this._$inputWrapper),this._attachDragEventHandlers(this.option("dropZone")),this._renderFiles(),super._render()}_createFileProgressBar(e){e.progressBar=this._createProgressBar(e.value.size),e.progressBar.$element().appendTo(e.$file),this._initStatusMessage(e),this._ensureCancelButtonInitialized(e)}_setStatusMessage(e,t){setTimeout((()=>{this.option("showFileList")&&e.$statusMessage&&(e.$statusMessage.text(t),e.$statusMessage.css("display",""),e.progressBar.$element().remove())}),400)}_getUploadAbortedStatusMessage(){return"instantly"===this.option("uploadMode")?this.option("uploadAbortedMessage"):this.option("readyToUploadMessage")}_createFiles(){const e=this.option("value");!this._files||0!==(null==e?void 0:e.length)&&this._shouldFileListBeExtended()||(this._preventFilesUploading(this._files),this._files=null),this._files||(this._files=[]),(0,f.each)(null==e?void 0:e.slice(this._files.length),((e,t)=>{const i=this._createFile(t);this._validateFile(i),this._files.push(i)}))}_preventFilesUploading(e){e.forEach((e=>this._uploadStrategy.abortUpload(e)))}_validateFile(e){e.isValidFileExtension=this._validateFileExtension(e),e.isValidMinSize=this._validateMinFileSize(e),e.isValidMaxSize=this._validateMaxFileSize(e)}_validateFileExtension(e){const t=this.option("allowedFileExtensions"),i=this.option("accept"),n=this._getAllowedFileTypes(i),o=e.value.name.substring(e.value.name.lastIndexOf(".")).toLowerCase();if(0!==(null==i?void 0:i.length)&&!this._isFileTypeAllowed(e.value,n))return!1;if(0===(null==t?void 0:t.length))return!0;for(let e=0;e<t.length;e++)if(o===t[e].toLowerCase())return!0;return!1}_validateMaxFileSize(e){const t=e.value.size,i=this.option("maxFileSize");return!(i>0)||t<=i}_validateMinFileSize(e){const t=e.value.size,i=this.option("minFileSize");return!(i>0)||t>=i}_createBeforeSendAction(){this._beforeSendAction=this._createActionByOption("onBeforeSend",{excludeValidators:["readOnly"]})}_createUploadStartedAction(){this._uploadStartedAction=this._createActionByOption("onUploadStarted",{excludeValidators:["readOnly"]})}_createUploadedAction(){this._uploadedAction=this._createActionByOption("onUploaded",{excludeValidators:["readOnly"]})}_createFilesUploadedAction(){this._filesUploadedAction=this._createActionByOption("onFilesUploaded",{excludeValidators:["readOnly"]})}_createProgressAction(){this._progressAction=this._createActionByOption("onProgress",{excludeValidators:["readOnly"]})}_createUploadAbortedAction(){this._uploadAbortedAction=this._createActionByOption("onUploadAborted",{excludeValidators:["readOnly"]})}_createUploadErrorAction(){this._uploadErrorAction=this._createActionByOption("onUploadError",{excludeValidators:["readOnly"]})}_createDropZoneEnterAction(){this._dropZoneEnterAction=this._createActionByOption("onDropZoneEnter")}_createDropZoneLeaveAction(){this._dropZoneLeaveAction=this._createActionByOption("onDropZoneLeave")}_createFile(e){return{value:e,loadedSize:0,onProgress:(0,p.default)(),onAbort:(0,p.default)(),onLoad:(0,p.default)(),onError:(0,p.default)(),onLoadStart:(0,p.default)(),isValidFileExtension:!0,isValidMaxSize:!0,isValidMinSize:!0,isValid(){return this.isValidFileExtension&&this.isValidMaxSize&&this.isValidMinSize},isInitialized:!1}}_resetFileState(e){e.isAborted=!1,e.uploadStarted=!1,e.isStartLoad=!1,e.loadedSize=0,e.chunksData=void 0,e.request=void 0}_renderFiles(){var e;const t=this.option("value");this._$filesContainer?this._shouldFileListBeExtended()&&0!==(null==t?void 0:t.length)||this._$filesContainer.empty():this._$filesContainer=(0,c.default)("<div>").addClass("dx-fileuploader-files-container").appendTo(this._$content);const i=this.option("showFileList");i&&(0,f.each)(this._files,((e,t)=>{t.$file||this._renderFile(t)})),this.$element().toggleClass("dx-fileuploader-show-file-list",i),this._toggleFileUploaderEmptyClassName(),this._updateFileNameMaxWidth(),null===(e=this._validationMessage)||void 0===e||e.repaint()}_renderFile(e){const{value:t}=e,i=(0,c.default)("<div>").addClass(E).appendTo(this._$filesContainer);this._renderFileButtons(e,i),e.$file=(0,c.default)("<div>").addClass("dx-fileuploader-file").appendTo(i);const n=(0,c.default)("<div>").addClass("dx-fileuploader-file-info").appendTo(e.$file);e.$statusMessage=(0,c.default)("<div>").addClass("dx-fileuploader-file-status-message").appendTo(e.$file),(0,c.default)("<div>").addClass(T).text(t.name).appendTo(n),(0,v.isDefined)(t.size)&&(0,c.default)("<div>").addClass(A).text(this._getFileSize(t.size)).appendTo(n),e.isValid()?e.$statusMessage.text(this.option("readyToUploadMessage")):(e.isValidFileExtension||e.$statusMessage.append(this._createValidationElement("invalidFileExtensionMessage")),e.isValidMaxSize||e.$statusMessage.append(this._createValidationElement("invalidMaxFileSizeMessage")),e.isValidMinSize||e.$statusMessage.append(this._createValidationElement("invalidMinFileSizeMessage")),i.addClass("dx-fileuploader-invalid"))}_createValidationElement(e){return(0,c.default)("<span>").text(this.option(e))}_updateFileNameMaxWidth(){const e=this.option("allowCanceling")&&"useForm"!==this.option("uploadMode")?1:0,t="useButtons"===this.option("uploadMode")?1:0,i=(0,m.getWidth)(this._$filesContainer.find(`.${E}`).first())||(0,m.getWidth)(this._$filesContainer),n=this._$filesContainer.find(`.${P}`).eq(0),o=(0,m.getWidth)(n)*(e+t),a=this._$filesContainer.find(`.${A}`).eq(0),s=a.text();a.text("1000 Mb");const r=(0,m.getWidth)(a);a.text(s),this._$filesContainer.find(`.${T}`).css("maxWidth",i-o-r)}_renderFileButtons(e,t){const i=this._getCancelButton(e);i&&t.append(i);const n=this._getUploadButton(e);n&&t.append(n)}_getCancelButton(e){if("useForm"===this.option("uploadMode"))return null;const{allowCanceling:t,readOnly:i,hoverStateEnabled:n,_buttonStylingMode:o}=this.option();return e.cancelButton=this._createComponent((0,c.default)("<div>").addClass(`${O} dx-fileuploader-cancel-button`),y.default,{onClick:()=>this._removeFile(e),icon:"close",visible:t,disabled:i,integrationOptions:{},hoverStateEnabled:n,stylingMode:o}),(0,c.default)("<div>").addClass(P).append(e.cancelButton.$element())}_getUploadButton(e){if(!e.isValid()||"useButtons"!==this.option("uploadMode"))return null;const{hoverStateEnabled:t,_buttonStylingMode:i}=this.option();return e.uploadButton=this._createComponent((0,c.default)("<div>").addClass(`${O} ${k}`),y.default,{onClick:()=>this._uploadFile(e),icon:"upload",hoverStateEnabled:t,stylingMode:i}),e.onLoadStart.add((()=>e.uploadButton.option({visible:!1,disabled:!0}))),e.onAbort.add((()=>e.uploadButton.option({visible:!0,disabled:!1}))),(0,c.default)("<div>").addClass(P).append(e.uploadButton.$element())}_removeFile(e){var t;null===(t=e.$file)||void 0===t||t.parent().remove(),this._files.splice(this._files.indexOf(e),1);const i=this.option("value").slice();i.splice(i.indexOf(e.value),1),this._preventRecreatingFiles=!0,this.option("value",i),this._preventRecreatingFiles=!1,this._toggleFileUploaderEmptyClassName(),this._resetInputValue(!0)}removeFile(e){if("useForm"===this.option("uploadMode")||!(0,v.isDefined)(e))return;const t=this._getFile(e);t&&(t.uploadStarted&&this._preventFilesUploading([t]),this._removeFile(t))}_toggleFileUploaderEmptyClassName(){this.$element().toggleClass("dx-fileuploader-empty",!this._files.length||this._hasInvalidFile(this._files))}_hasInvalidFile(e){for(let t=0;t<e.length;t++)if(!e[t].isValid())return!0;return!1}_getFileSize(e){let t=0;const i=[s.default.format("dxFileUploader-bytes"),s.default.format("dxFileUploader-kb"),s.default.format("dxFileUploader-Mb"),s.default.format("dxFileUploader-Gb")],n=i.length-1;for(;t<n&&e>=1024;)e/=1024,t++;return`${Math.round(e)} ${i[t]}`}_renderSelectButton(){const e=(0,c.default)("<div>").addClass(O).appendTo(this._$inputWrapper);this._selectButton=this._createComponent(e,y.default,{text:this.option("selectButtonText"),focusStateEnabled:!1,integrationOptions:{},disabled:this.option("readOnly"),hoverStateEnabled:this.option("hoverStateEnabled")}),this._selectFileDialogHandler=this._selectButtonClickHandler.bind(this),"desktop"===l.default.real().deviceType?this._selectButton.option("onClick",this._selectFileDialogHandler):this._attachSelectFileDialogHandler(this._selectButton.$element()),this._attachSelectFileDialogHandler(this.option("dialogTrigger"))}_selectButtonClickHandler(){if(!this.option("useNativeInputClick")){if(this._isInteractionDisabled())return!1;this._isCustomClickEvent=!0,o.default.trigger(this._$fileInput,"click"),this._isCustomClickEvent=!1}}_attachSelectFileDialogHandler(e){(0,v.isDefined)(e)&&(this._detachSelectFileDialogHandler(e),o.default.on((0,c.default)(e),"click",this._selectFileDialogHandler))}_detachSelectFileDialogHandler(e){(0,v.isDefined)(e)&&o.default.off((0,c.default)(e),"click",this._selectFileDialogHandler)}_renderUploadButton(){if("useButtons"!==this.option("uploadMode"))return;const e=(0,c.default)("<div>").addClass(O).addClass(k).appendTo(this._$content);this._uploadButton=this._createComponent(e,y.default,{text:this.option("uploadButtonText"),onClick:this._uploadButtonClickHandler.bind(this),type:this.option("_uploadButtonType"),integrationOptions:{},hoverStateEnabled:this.option("hoverStateEnabled")})}_uploadButtonClickHandler(){this._uploadFiles()}_shouldDragOverBeRendered(){return!this.option("readOnly")&&("useForm"!==this.option("uploadMode")||this.option("nativeDropSupported"))}_isInteractionDisabled(){return this.option("readOnly")||this.option("disabled")}_renderInputContainer(){this._$inputContainer=(0,c.default)("<div>").addClass("dx-fileuploader-input-container").appendTo(this._$inputWrapper),this._$fileInput.addClass("dx-fileuploader-input"),this._renderInput();const e=`dx-fileuploader-input-label-${new u.default}`;this._$inputLabel.attr("id",e).addClass("dx-fileuploader-input-label").appendTo(this._$inputContainer),this.setAria("labelledby",e,this._$fileInput)}_renderInput(){this.option("useNativeInputClick")?this._selectButton.option("template",this._selectButtonInputTemplate.bind(this)):(this._$fileInput.appendTo(this._$inputContainer),this._selectButton.option("template","content")),this._applyInputAttributes(this.option("inputAttr"))}_selectButtonInputTemplate(e,t){const i=(0,c.default)(t),n=(0,c.default)("<span>").addClass("dx-button-text").text(e.text);return i.append(n).append(this._$fileInput),i}_renderInputWrapper(){this._$inputWrapper=(0,c.default)("<div>").addClass("dx-fileuploader-input-wrapper").appendTo(this._$content)}_detachDragEventHandlers(e){(0,v.isDefined)(e)&&o.default.off((0,c.default)(e),(0,a.addNamespace)("",this.NAME))}_attachDragEventHandlers(e){const t=e!==this._$inputWrapper;(0,v.isDefined)(e)&&this._shouldDragOverBeRendered()&&(this._detachDragEventHandlers(e),e=(0,c.default)(e),o.default.on(e,(0,a.addNamespace)("dragenter",this.NAME),this._dragEnterHandler.bind(this,t)),o.default.on(e,(0,a.addNamespace)("dragover",this.NAME),this._dragOverHandler.bind(this,t)),o.default.on(e,(0,a.addNamespace)("dragleave",this.NAME),this._dragLeaveHandler.bind(this,t)),o.default.on(e,(0,a.addNamespace)("drop",this.NAME),this._dropHandler.bind(this,t)))}_applyInputAttributes(e){this._$fileInput.attr(e)}_useInputForDrop(){return this.option("nativeDropSupported")&&"useForm"===this.option("uploadMode")}_getDropZoneElement(e,t){let i=e?Array.from((0,c.default)(this.option("dropZone"))):[this._$inputWrapper];return i=i.map((e=>(0,c.default)(e).get(0))),i[i.indexOf(t.currentTarget)]}_dragEnterHandler(e,t){if(this.option("disabled"))return!1;this._useInputForDrop()||t.preventDefault();const i=this._getDropZoneElement(e,t);(0,v.isDefined)(i)&&this._shouldRaiseDragOver(t,i)&&(this._activeDropZone=i,this._tryToggleDropZoneActive(!0,e,t))}_shouldRaiseDragOver(e,t){return null===this._activeDropZone&&this.isMouseOverElement(e,t,!1)&&e.originalEvent.dataTransfer.types.find((e=>"Files"===e))}_dragOverHandler(e,t){if(this._useInputForDrop()||t.preventDefault(),t.originalEvent.dataTransfer.dropEffect="copy",!e){const e=this._getDropZoneElement(!1,t);this._shouldRaiseDragOver(t,e)&&this._dragEnterHandler(!1,t),this._shouldRaiseDragLeave(t,!1)&&this._dragLeaveHandler(!1,t)}}_dragLeaveHandler(e,t){this._useInputForDrop()||t.preventDefault(),this._shouldRaiseDragLeave(t,e)&&(this._tryToggleDropZoneActive(!1,e,t),this._activeDropZone=null)}_shouldRaiseDragLeave(e,t){return null!==this._activeDropZone&&!this.isMouseOverElement(e,this._activeDropZone,!t,-1)}_tryToggleDropZoneActive(e,t,i){const n=e?"addClass":"removeClass";this[e?"_dropZoneEnterAction":"_dropZoneLeaveAction"]({event:i,dropZoneElement:this._activeDropZone}),t||this.$element()[n](I)}_dropHandler(e,t){if(this._activeDropZone=null,e||this.$element().removeClass(I),this._useInputForDrop()||e&&this._isInteractionDisabled())return;t.preventDefault();const i=t.originalEvent.dataTransfer.files,n=this._getFiles(i);!this.option("multiple")&&n.length>1||0===n.length||(this._changeValue(n),"instantly"===this.option("uploadMode")&&this._uploadFiles())}_areAllFilesLoaded(){return this._files.every((e=>!e.isValid()||e._isError||e._isLoaded||e.isAborted))}_handleAllFilesUploaded(){this._recalculateProgress(),this._areAllFilesLoaded()&&this._filesUploadedAction()}_getAllowedFileTypes(e){return e.length?e.split(",").map((e=>e.trim())):[]}_isFileTypeAllowed(e,t){for(let i=0,n=t.length;i<n;i++){let n=t[i];if("."===n[0]){if(n=n.replace(".","\\."),e.name.match(new RegExp(`${n}$`,"i")))return!0}else if(n=n.replace(new RegExp("\\*","g"),""),e.type.match(new RegExp(n,"i")))return!0}return!1}_renderWrapper(){const e=(0,c.default)("<div>").addClass("dx-fileuploader-wrapper").appendTo(this.$element()),t=(0,c.default)("<div>").addClass("dx-fileuploader-container").appendTo(e);this._$content=(0,c.default)("<div>").addClass("dx-fileuploader-content").appendTo(t)}_clean(){this._$fileInput.detach(),delete this._$filesContainer,this._detachSelectFileDialogHandler(this.option("dialogTrigger")),this._detachDragEventHandlers(this.option("dropZone")),this._files&&this._files.forEach((e=>{e.$file=null,e.$statusMessage=null})),super._clean()}abortUpload(e){if("useForm"!==this.option("uploadMode"))if((0,v.isDefined)(e)){const t=this._getFile(e);t&&this._preventFilesUploading([t])}else this._preventFilesUploading(this._files)}upload(e){if("useForm"!==this.option("uploadMode"))if((0,v.isDefined)(e)){const t=this._getFile(e);t&&M()&&this._uploadFile(t)}else this._uploadFiles()}_uploadFiles(){M()&&(0,f.each)(this._files,((e,t)=>this._uploadFile(t)))}_uploadFile(e){this._uploadStrategy.upload(e)}_updateProgressBar(e,t){e.progressBar&&e.progressBar.option({value:t.loaded,showStatus:!0}),this._progressAction({file:e.value,segmentSize:t.currentSegmentSize,bytesLoaded:t.loaded,bytesTotal:t.total,event:t.event,request:e.request})}_updateTotalProgress(e,t){let i=0;(0,v.isDefined)(e)&&(this._files.length>0&&this._areAllFilesLoaded()&&0===e&&0===t?i=this._getProgressValue(1):e&&(i=this._getProgressValue(t/e))),this.option("progress",i),this._setLoadedSize(t)}_getProgressValue(e){return Math.floor(100*e)}_initStatusMessage(e){e.$statusMessage.css("display","none")}_ensureCancelButtonInitialized(e){if(e.isInitialized)return;e.cancelButton.option("onClick",(()=>{this._preventFilesUploading([e]),this._removeFile(e)}));const t=()=>{setTimeout((()=>{e.cancelButton.option({visible:!1})}),400)};e.onLoad.add(t),e.onError.add(t)}_createProgressBar(e){return this._createComponent((0,c.default)("<div>"),b.default,{value:void 0,min:0,max:e,statusFormat:e=>`${this._getProgressValue(e)}%`,showStatus:!1,statusPosition:"right"})}_getTotalFilesSize(){return this._totalFilesSize||(this._totalFilesSize=0,(0,f.each)(this._files,((e,t)=>{this._totalFilesSize+=t.value.size}))),this._totalFilesSize}_getTotalLoadedFilesSize(){return this._totalLoadedFilesSize||(this._totalLoadedFilesSize=0,(0,f.each)(this._files,((e,t)=>{this._totalLoadedFilesSize+=t.loadedSize}))),this._totalLoadedFilesSize}_setLoadedSize(e){this._totalLoadedFilesSize=e}_recalculateProgress(){this._totalFilesSize=0,this._totalLoadedFilesSize=0,this._updateTotalProgress(this._getTotalFilesSize(),this._getTotalLoadedFilesSize())}isMouseOverElement(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!t)return!1;const o=i?parseFloat(D.getComputedStyle(t,":before").height):0,a=i?parseFloat(D.getComputedStyle(t,":after").height):0,s=(0,m.getOffset)(t).left,r=(0,m.getOffset)(t).top+o,l=t.offsetWidth,d=t.offsetHeight-o-a,u=this._getEventX(e),c=this._getEventY(e);return u+n>=s&&u-n<s+l&&c+n>=r&&c-n<r+d}_getEventX(e){return(0,a.isTouchEvent)(e)?this._getTouchEventX(e):e.clientX+this._getDocumentScrollLeft()}_getEventY(e){return(0,a.isTouchEvent)(e)?this._getTouchEventY(e):e.clientY+this._getDocumentScrollTop()}_getTouchEventX(e){let t=null;return e.changedTouches.length>0?t=e.changedTouches:e.targetTouches.length>0&&(t=e.targetTouches),t?t[0].pageX:0}_getTouchEventY(e){let t=null;return e.changedTouches.length>0?t=e.changedTouches:e.targetTouches.length>0&&(t=e.targetTouches),t?t[0].pageY:0}_getDocumentScrollTop(){const e=d.default.getDocument();return e.documentElement.scrollTop||e.body.scrollTop}_getDocumentScrollLeft(){const e=d.default.getDocument();return e.documentElement.scrollLeft||e.body.scrollLeft}_updateReadOnlyState(){const e=this.option("readOnly");this._selectButton.option("disabled",e),this._files.forEach((t=>{var i;return null===(i=t.cancelButton)||void 0===i?void 0:i.option("disabled",e)})),this._updateInputLabelText(),this._attachDragEventHandlers(this._$inputWrapper)}_updateHoverState(){var e,t;const i=this.option("hoverStateEnabled");null===(e=this._selectButton)||void 0===e||e.option("hoverStateEnabled",i),null===(t=this._uploadButton)||void 0===t||t.option("hoverStateEnabled",i),this._files.forEach((e=>{var t,n;null===(t=e.uploadButton)||void 0===t||t.option("hoverStateEnabled",i),null===(n=e.cancelButton)||void 0===n||n.option("hoverStateEnabled",i)}))}_optionChanged(e){const{name:t,value:i,previousValue:n}=e;switch(t){case"height":case"width":this._updateFileNameMaxWidth(),super._optionChanged(e);break;case"value":!i.length&&this._$fileInput.val(""),this._preventRecreatingFiles||(this._createFiles(),this._renderFiles()),this._recalculateProgress(),super._optionChanged(e);break;case"name":case"hint":this._initFileInput(),super._optionChanged(e);break;case"accept":this._initFileInput();break;case"multiple":this._initFileInput(),e.value||this.clear();break;case"readOnly":this._updateReadOnlyState(),super._optionChanged(e);break;case"disabled":this._updateInputLabelText(),super._optionChanged(e);break;case"selectButtonText":this._selectButton.option("text",i);break;case"uploadButtonText":this._uploadButton&&this._uploadButton.option("text",i);break;case"_uploadButtonType":this._uploadButton&&this._uploadButton.option("type",i);break;case"_buttonStylingMode":this._files.forEach((e=>{var t,n;null===(t=e.uploadButton)||void 0===t||t.option("stylingMode",i),null===(n=e.cancelButton)||void 0===n||n.option("stylingMode",i)}));break;case"dialogTrigger":this._detachSelectFileDialogHandler(n),this._attachSelectFileDialogHandler(i);break;case"dropZone":this._detachDragEventHandlers(n),this._attachDragEventHandlers(i);break;case"maxFileSize":case"minFileSize":case"allowedFileExtensions":case"invalidFileExtensionMessage":case"invalidMaxFileSizeMessage":case"invalidMinFileSizeMessage":case"readyToUploadMessage":case"uploadedMessage":case"uploadFailedMessage":case"uploadAbortedMessage":case"nativeDropSupported":this._invalidate();break;case"labelText":this._updateInputLabelText();break;case"showFileList":this._preventRecreatingFiles||this._renderFiles();break;case"uploadFile":case"uploadChunk":case"chunkSize":this._setUploadStrategy();break;case"abortUpload":case"uploadUrl":case"progress":case"uploadMethod":case"uploadHeaders":case"uploadCustomData":case"extendSelection":break;case"hoverStateEnabled":this._updateHoverState(),super._optionChanged(e);break;case"allowCanceling":case"uploadMode":this.clear(),this._invalidate();break;case"onBeforeSend":this._createBeforeSendAction();break;case"onUploadStarted":this._createUploadStartedAction();break;case"onUploaded":this._createUploadedAction();break;case"onFilesUploaded":this._createFilesUploadedAction();break;case"onProgress":this._createProgressAction();break;case"onUploadError":this._createUploadErrorAction();break;case"onUploadAborted":this._createUploadAbortedAction();break;case"onDropZoneEnter":this._createDropZoneEnterAction();break;case"onDropZoneLeave":this._createDropZoneLeaveAction();break;case"useNativeInputClick":this._renderInput();break;case"useDragOver":this._attachDragEventHandlers(this._$inputWrapper);break;case"inputAttr":this._applyInputAttributes(this.option(t));break;default:super._optionChanged(e)}}_resetInputValue(e){("useForm"!==this.option("uploadMode")||e)&&(this._doPreventInputChange=!0,this._$fileInput.val(""),this._doPreventInputChange=!1)}clear(){this.option("value",[])}}class L{constructor(e,t){this.file=e,this.chunkSize=t,this.index=0}read(){if(!this.file)return null;const e=this.createBlobResult(this.file,this.index,this.chunkSize);return e.isCompleted&&(this.file=null),this.index++,e}createBlobResult(e,t,i){const n=t*i;return{blob:this.sliceFile(e,n,i),index:t,isCompleted:n+i>=e.size}}sliceFile(e,t,i){return e.slice?e.slice(t,t+i):e.webkitSlice?e.webkitSlice(t,t+i):null}}class B{constructor(e){this.fileUploader=e}upload(e){e.isInitialized&&e.isAborted&&this.fileUploader._resetFileState(e),e.isValid()&&!e.uploadStarted&&(this._prepareFileBeforeUpload(e),this._uploadCore(e))}abortUpload(e){if(!(e._isError||e._isLoaded||e.isAborted)&&e.uploadStarted&&(e.isAborted=!0,e.request&&e.request.abort(),this._isCustomCallback("abortUpload"))){const t=this.fileUploader.option("abortUpload"),i=this._createUploadArgument(e);let n=null;try{const o=t(e.value,i);n=(0,g.fromPromise)(o)}catch(e){n=(0,g.Deferred)().reject(e).promise()}n.done((()=>e.onAbort.fire())).fail((t=>this._handleFileError(e,t)))}}_beforeSend(e,t){const i=this._createUploadArgument(t);this.fileUploader._beforeSendAction({request:e,file:t.value,uploadInfo:i}),t.request=e}_createUploadArgument(e){}_uploadCore(e){}_isCustomCallback(e){const t=this.fileUploader.option(e);return t&&(0,v.isFunction)(t)}_handleProgress(e,t){e._isError||(e._isProgressStarted=!0,this._handleProgressCore(e,t))}_handleProgressCore(e,t){}_handleFileError(e,t){e._isError=!0,e.onError.fire(t)}_prepareFileBeforeUpload(e){var t;e.$file&&(null===(t=e.progressBar)||void 0===t||t.dispose(),this.fileUploader._createFileProgressBar(e));e.isInitialized||(e.onLoadStart.add(this._onUploadStarted.bind(this,e)),e.onLoad.add(this._onLoadedHandler.bind(this,e)),e.onError.add(this._onErrorHandler.bind(this,e)),e.onAbort.add(this._onAbortHandler.bind(this,e)),e.onProgress.add(this._onProgressHandler.bind(this,e)),e.isInitialized=!0)}_shouldHandleError(e,t){return(this._isStatusError(t.status)||!e._isProgressStarted)&&!e.isAborted}_isStatusError(e){return e>=400&&e<500||e>=500&&e<600}_onUploadStarted(e,t){e.uploadStarted=!0,this.fileUploader._uploadStartedAction({file:e.value,event:t,request:e.request})}_onAbortHandler(e,t){const i={file:e.value,event:t,request:e.request,message:this.fileUploader._getUploadAbortedStatusMessage()};this.fileUploader._uploadAbortedAction(i),this.fileUploader._setStatusMessage(e,i.message),this.fileUploader._handleAllFilesUploaded()}_onErrorHandler(e,t){const i={file:e.value,event:void 0,request:e.request,error:t,message:this.fileUploader.option("uploadFailedMessage")};this.fileUploader._uploadErrorAction(i),this.fileUploader._setStatusMessage(e,i.message),this.fileUploader._handleAllFilesUploaded()}_onLoadedHandler(e,t){const i={file:e.value,event:t,request:e.request,message:this.fileUploader.option("uploadedMessage")};e._isLoaded=!0,this.fileUploader._uploadedAction(i),this.fileUploader._setStatusMessage(e,i.message),this.fileUploader._handleAllFilesUploaded()}_onProgressHandler(e,t){if(e){const i=this.fileUploader._getTotalFilesSize(),n=this.fileUploader._getTotalLoadedFilesSize(),o=Math.min(t.loaded,e.value.size),a=o-e.loadedSize;e.loadedSize=o,this.fileUploader._updateTotalProgress(i,n+a),this.fileUploader._updateProgressBar(e,this._getLoadedData(o,t.total,a,t))}}_getLoadedData(e,t,i,n){return{loaded:e,total:t,currentSegmentSize:i}}_extendFormData(e){const t=this.fileUploader.option("uploadCustomData");for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(0,v.isDefined)(t[i])&&e.append(i,t[i])}}class V extends B{constructor(e){super(e),this.chunkSize=this.fileUploader.option("chunkSize")}_uploadCore(e){const t=e.value,i={name:t.name,loadedBytes:0,type:t.type,blobReader:new L(t,this.chunkSize),guid:new u.default,fileSize:t.size,count:this._getFileChunksCount(t),customData:{}};e.chunksData=i,this._sendChunk(e,i)}_getFileChunksCount(e){return 0===e.size?1:Math.ceil(e.size/this.chunkSize)}_sendChunk(e,t){const i=t.blobReader.read();t.currentChunk=i,i&&this._sendChunkCore(e,t,i).done((()=>{e.isAborted||(t.loadedBytes+=i.blob.size,e.onProgress.fire({loaded:t.loadedBytes,total:e.value.size}),i.isCompleted&&e.onLoad.fire(),setTimeout((()=>this._sendChunk(e,t))))})).fail((t=>{this._shouldHandleError(e,t)&&this._handleFileError(e,t)}))}_sendChunkCore(e,t,i){}_tryRaiseStartLoad(e){e.isStartLoad||(e.isStartLoad=!0,e.onLoadStart.fire())}_getEvent(e){return null}_createUploadArgument(e){return this._createChunksInfo(e.chunksData)}_createChunksInfo(e){return{bytesUploaded:e.loadedBytes,chunkCount:e.count,customData:e.customData,chunkBlob:e.currentChunk.blob,chunkIndex:e.currentChunk.index}}}class F extends V{_sendChunkCore(e,t,i){return h.default.sendRequest({url:this.fileUploader.option("uploadUrl"),method:this.fileUploader.option("uploadMethod"),headers:this.fileUploader.option("uploadHeaders"),beforeSend:t=>this._beforeSend(t,e),upload:{onprogress:t=>this._handleProgress(e,t),onloadstart:()=>this._tryRaiseStartLoad(e),onabort:()=>e.onAbort.fire()},data:this._createFormData({fileName:t.name,blobName:this.fileUploader.option("name"),blob:i.blob,index:i.index,count:t.count,type:t.type,guid:t.guid,size:t.fileSize})})}_createFormData(e){const t=new D.FormData;return t.append(e.blobName,e.blob),t.append("chunkMetadata",JSON.stringify({FileName:e.fileName,Index:e.index,TotalCount:e.count,FileSize:e.size,FileType:e.type,FileGuid:e.guid})),this._extendFormData(t),t}}class H extends V{_sendChunkCore(e,t){this._tryRaiseStartLoad(e);const i=this._createChunksInfo(t),n=this.fileUploader.option("uploadChunk");try{const t=n(e.value,i);return(0,g.fromPromise)(t)}catch(e){return(0,g.Deferred)().reject(e).promise()}}_shouldHandleError(e,t){return!0}}class N extends B{_uploadCore(e){e.loadedSize=0,this._uploadFile(e).done((()=>{e.isAborted||e.onLoad.fire()})).fail((t=>{this._shouldHandleError(e,t)&&this._handleFileError(e,t)}))}_uploadFile(e){}_handleProgressCore(e,t){e.onProgress.fire(t)}_getLoadedData(e,t,i,n){const o=super._getLoadedData(e,t,i,n);return o.event=n,o}}class z extends N{_uploadFile(e){return h.default.sendRequest({url:this.fileUploader.option("uploadUrl"),method:this.fileUploader.option("uploadMethod"),headers:this.fileUploader.option("uploadHeaders"),beforeSend:t=>this._beforeSend(t,e),upload:{onprogress:t=>this._handleProgress(e,t),onloadstart:()=>e.onLoadStart.fire(),onabort:()=>e.onAbort.fire()},data:this._createFormData(this.fileUploader.option("name"),e.value)})}_createFormData(e,t){const i=new D.FormData;return i.append(e,t,t.name),this._extendFormData(i),i}}class W extends N{_uploadFile(e){e.onLoadStart.fire();const t=t=>{const i={loaded:t,total:e.value.size};this._handleProgress(e,i)},i=this.fileUploader.option("uploadFile");try{const n=i(e.value,t);return(0,g.fromPromise)(n)}catch(e){return(0,g.Deferred)().reject(e).promise()}}_shouldHandleError(e,t){return!0}}(0,r.default)("dxFileUploader",R);t.default=R},88017:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=i(88603),a=i(64044),s=S(i(92774)),r=S(i(18278)),l=i(98834),d=i(18029),u=S(i(4671)),c=S(i(92848)),h=S(i(65951)),p=i(61404),g=S(i(64553)),_=i(27286),f=i(17781),m=i(87739),v=i(52576),C=i(57653),y=i(11528),b=i(3104),x=S(i(7607)),w=S(i(11118));function S(e){return e&&e.__esModule?e:{default:e}}const D="dx-gallery",I=`${D}-wrapper`,E="dx-gallery-loop",T=`${D}-container`,A=`${D}-active`,O=`${D}-item`,P=`${D}-item-invisible`,k=`${O}-loop`,M=`.${O}`,R=`${O}-selected`,L=`${D}-indicator`,B=`${L}-item`,V=`.${B}`,F=`${B}-selected`,H=".dx-item-content",N=w.default.inherit({_supportedKeys(){return(0,v.extend)(this.callBase(),{pageUp:f.noop,pageDown:f.noop})},_getDefaultOptions(){return(0,v.extend)(this.callBase(),{direction:"next",onClick:null,hoverStateEnabled:!0,activeStateEnabled:!0})},_render(){this.callBase();const e=this,t=this.$element(),i=(0,l.addNamespace)(a.name,this.NAME);t.addClass(`${D}-nav-button-${this.option("direction")}`),s.default.off(t,i),s.default.on(t,i,(t=>{e._createActionByOption("onClick")({event:t})}))},_optionChanged(e){switch(e.name){case"onClick":case"direction":this._invalidate();break;default:this.callBase(e)}}}),z=x.default.inherit({_activeStateUnit:M,_wasAnyItemTemplateRendered:!1,_getDefaultOptions(){return(0,v.extend)(this.callBase(),{activeStateEnabled:!1,animationDuration:400,animationEnabled:!0,loop:!1,swipeEnabled:!0,indicatorEnabled:!0,showIndicator:!0,selectedIndex:0,slideshowDelay:0,showNavButtons:!1,wrapAround:!1,initialItemWidth:void 0,stretchImages:!1,_itemAttributes:{role:"option","aria-label":u.default.format("dxGallery-itemName")},loopItemFocus:!1,selectOnFocus:!0,selectionMode:"single",selectionRequired:!0,selectByClick:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===h.default.real().deviceType&&!h.default.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this.option("loopItemFocus",this.option("loop"))},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new _.BindableTemplate(((e,t)=>{const i=(0,g.default)("<img>").addClass("dx-gallery-item-image");(0,y.isPlainObject)(t)?(this._prepareDefaultItemTemplate(t,e),i.attr({src:t.imageSrc,alt:t.imageAlt}).appendTo(e)):i.attr("src",String(t)).appendTo(e)}),["imageSrc","imageAlt","text","html"],this.option("integrationOptions.watchMethod"))})},_dataSourceOptions:()=>({paginate:!1}),_itemContainer(){return this._$container},_itemClass:()=>O,_itemDataKey:()=>"dxGalleryItemData",_actualItemWidth(){const e=this.option("wrapAround");if(this.option("stretchImages")){return 1/(e?this._itemsPerPage()+1:this._itemsPerPage())}return e?this._itemPercentWidth()*this._itemsPerPage()/(this._itemsPerPage()+1):this._itemPercentWidth()},_itemPercentWidth(){let e;const t=(0,C.getOuterWidth)(this.$element()),i=this.option("initialItemWidth");return e=i&&i<=t?i/t:1,e},_itemsPerPage(){const e=(0,b.hasWindow)()?Math.floor(1/this._itemPercentWidth()):1;return Math.min(e,this._itemsCount())},_pagesCount(){return Math.ceil(this._itemsCount()/this._itemsPerPage())},_itemsCount(){return(this.option("items")||[]).length},_offsetDirection(){return this.option("rtlEnabled")?-1:1},_initMarkup(){this._renderWrapper(),this._renderItemsContainer(),this.$element().addClass(D),this.$element().toggleClass(E,this.option("loop")),this.callBase();const e={role:this._itemsCount()>0?"listbox":void 0,label:"gallery"};this.setAria(e)},_render(){this._renderDragHandler(),this._renderContainerPosition(),this._renderItemSizes(),this._renderItemPositions(),this._renderNavButtons(),this._renderIndicator(),this._renderSelectedItem(),this._renderItemVisibility(),this._renderUserInteraction(),this._setupSlideShow(),this._reviseDimensions(),this.callBase()},_dimensionChanged(){const e=this.option("selectedIndex")||0;this._stopItemAnimations(),this._clearCacheWidth(),this._cloneDuplicateItems(),this._renderItemSizes(),this._renderItemPositions(),this._renderIndicator(),this._renderContainerPosition(this._calculateIndexOffset(e),!0),this._renderItemVisibility()},_renderDragHandler(){const e=(0,l.addNamespace)("dragstart",this.NAME);s.default.off(this.$element(),e),s.default.on(this.$element(),e,"img",(()=>!1))},_renderWrapper(){this._$wrapper||(this._$wrapper=(0,g.default)("<div>").addClass(I).appendTo(this.$element()))},_renderItems(e){if(!(0,b.hasWindow)()){const t=this.option("selectedIndex");e=e.length>t?e.slice(t,t+1):e.slice(0,1)}this.callBase(e),this._loadNextPageIfNeeded()},_onItemTemplateRendered(){return()=>{this._wasAnyItemTemplateRendered||(this._wasAnyItemTemplateRendered=!0,(0,d.triggerResizeEvent)(this.$element()))}},_renderItemsContainer(){this._$container||(this._$container=(0,g.default)("<div>").addClass(T).appendTo(this._$wrapper))},_cloneDuplicateItems(){if(!this.option("loop"))return;const e=(this.option("items")||[]).length,t=e-1;let i;if(!e)return;this._getLoopedItems().remove();const n=Math.min(this._itemsPerPage(),e),o=this._getRealItems(),a=this._itemContainer();for(i=0;i<n;i++)this._cloneItemForDuplicate(o[i],a);for(i=0;i<n;i++)this._cloneItemForDuplicate(o[t-i],a)},_cloneItemForDuplicate(e,t){if(e){const i=(0,g.default)(e).clone(!1).addClass(k).removeAttr("id").css("margin",0).appendTo(t);this.setAria({hidden:!0},i)}},_getRealItems(){const e=`.${O}:not(.${k})`;return this.$element().find(e)},_getLoopedItems(){return this.$element().find(`.${k}`)},_emptyMessageContainer(){return this._$wrapper},_renderItemSizes(e){let t=this._itemElements();const i=this._actualItemWidth();void 0!==e&&(t=t.slice(e)),t.each((e=>{(0,C.setOuterWidth)((0,g.default)(t[e]),100*i+"%")}))},_renderItemPositions(){const e=this._actualItemWidth(),t=this._itemsCount(),i=this._itemsPerPage(),n=this.$element().find(`.${k}`).length,o=t+n-1,a=this.option("wrapAround")?.5:0,s=this._itemFreeSpace(),r=!!s,l=this.option("rtlEnabled"),d=this.option("selectedIndex"),u=l?"Right":"Left";this._itemElements().each((function(n){let l=n;const d=(0,g.default)(this).hasClass(k);if(n>t+i-1&&(l=o-l-i),!d&&0!==l)return void(r&&(0,g.default)(this).css(`margin${u}`,100*s+"%"));const c=e*(l+a)+s*(l+1-a),h=d?u.toLowerCase():`margin${u}`;(0,g.default)(this).css(h,100*c+"%")})),this._relocateItems(d,d,!0)},_itemFreeSpace(){let e=this._itemsPerPage();return this.option("wrapAround")&&(e+=1),(1-this._actualItemWidth()*e)/(e+1)},_renderContainerPosition(e,t,i){this._releaseInvisibleItems(),e=e||0;const n=this,a=this._actualItemWidth(),s=e,r=this._offsetDirection()*s*(a+this._itemFreeSpace());let l;return(0,y.isDefined)(this._animationOverride)&&(i=this._animationOverride,delete this._animationOverride),i?(n._startSwipe(),l=n._animate(r).done(n._endSwipe.bind(n))):((0,o.move)(this._$container,{left:r*this._elementWidth(),top:0}),l=(0,m.Deferred)().resolveWith(n)),l.done((function(){this._deferredAnimate&&n._deferredAnimate.resolveWith(n),t&&this._renderItemVisibility()})),l.promise()},_startSwipe(){this.$element().addClass(A)},_endSwipe(){this.$element().removeClass(A)},_animate(e,t){const i=this,a=this._$container,s=(0,m.Deferred)();return n.fx.animate(this._$container,(0,v.extend)({type:"slide",to:{left:e*this._elementWidth()},duration:i.option("animationDuration"),complete(){i._needMoveContainerForward()&&(0,o.move)(a,{left:0,top:0}),i._needMoveContainerBack()&&(0,o.move)(a,{left:i._maxContainerOffset()*i._elementWidth(),top:0}),s.resolveWith(i)}},t||{})),s},_needMoveContainerForward(){return this._$container.position().left*this._offsetDirection()<=-this._maxItemWidth()*this._elementWidth()*this._itemsCount()+1},_needMoveContainerBack(){return this._$container.position().left*this._offsetDirection()>=this._actualItemWidth()*this._elementWidth()-1},_maxContainerOffset(){return-this._maxItemWidth()*(this._itemsCount()-this._itemsPerPage())*this._offsetDirection()},_maxItemWidth(){return this._actualItemWidth()+this._itemFreeSpace()},_reviseDimensions(){const e=this,t=e._itemElements().first().find(H);t&&!t.is(":hidden")&&(e.option("height")||e.option("height",(0,C.getOuterHeight)(t)),e.option("width")||e.option("width",(0,C.getOuterWidth)(t)),this._dimensionChanged())},_renderIndicator(){const{showIndicator:e}=this.option();if(this._cleanIndicators(),this.$element().toggleClass("dx-gallery-indicator-visible",e),!e)return;const t=this._$indicator=(0,g.default)("<div>").addClass(L).appendTo(this._$wrapper),i=this.option("indicatorEnabled");for(let e=0;e<this._pagesCount();e++){const n=(0,g.default)("<div>").addClass(B).appendTo(t);i&&this._attachIndicatorClickHandler(n,e)}this._renderSelectedPageIndicator()},_attachIndicatorClickHandler(e,t){s.default.on(e,(0,l.addNamespace)(a.name,this.NAME),(e=>{this._indicatorSelectHandler(e,t)}))},_detachIndicatorClickHandler(e){s.default.off(e,(0,l.addNamespace)(a.name,this.NAME))},_toggleIndicatorInteraction(e){var t;const i=(null===(t=this._$indicator)||void 0===t?void 0:t.find(V))||[];i.length&&i.each(((t,i)=>{e?this._attachIndicatorClickHandler((0,g.default)(i),t):this._detachIndicatorClickHandler((0,g.default)(i))}))},_cleanIndicators(){this._$indicator&&this._$indicator.remove()},_renderSelectedItem(){const e=this.option("selectedIndex");this._itemElements().removeClass(R).eq(e).addClass(R)},_renderItemVisibility(){if(this.option("initialItemWidth")||this.option("wrapAround"))return void this._releaseInvisibleItems();const e=this.option("selectedIndex");this._itemElements().each(((t,i)=>{e!==t&&(0,g.default)(i).find(H).addClass(P)}))},_releaseInvisibleItems(){this._itemElements().find(H).removeClass(P)},_renderSelectedPageIndicator(){if(!this._$indicator)return;const e=this.option("selectedIndex"),t=this._pagesCount()-1;let i=Math.ceil(e/this._itemsPerPage());i=Math.min(t,i),this._$indicator.find(V).removeClass(F).eq(i).addClass(F)},_renderUserInteraction(){const e=this.$element(),t=this.option("swipeEnabled")&&this._itemsCount()>1;this._createComponent(e,r.default,{disabled:this.option("disabled")||!t,onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._elementWidth.bind(this)})},_indicatorSelectHandler(e,t){if(!this.option("indicatorEnabled"))return;const i=this._fitPaginatedIndex(t*this._itemsPerPage());this._needLongMove=!0,this.option("selectedIndex",i),this._loadNextPageIfNeeded(i)},_renderNavButtons(){const e=this;e.option("showNavButtons")?(e._prevNavButton=(0,g.default)("<div>").appendTo(this._$wrapper),e._createComponent(e._prevNavButton,N,{direction:"prev",onClick(){e._prevPage()}}),e._nextNavButton=(0,g.default)("<div>").appendTo(this._$wrapper),e._createComponent(e._nextNavButton,N,{direction:"next",onClick(){e._nextPage()}}),this._renderNavButtonsVisibility()):e._cleanNavButtons()},_prevPage(){const e=this._itemsPerPage(),t=this.option("selectedIndex")-e;return t===-e&&e===this._itemsCount()?this._relocateItems(t,0):this.goToItem(this._fitPaginatedIndex(t))},_nextPage(){const e=this._itemsPerPage(),t=this.option("selectedIndex")+e;return t===e&&e===this._itemsCount()?this._relocateItems(t,0):this.goToItem(this._fitPaginatedIndex(t)).done(this._loadNextPageIfNeeded)},_loadNextPageIfNeeded(e){e=void 0===e?this.option("selectedIndex"):e,this._dataSource&&this._dataSource.paginate()&&this._shouldLoadNextPage(e)&&!this._isDataSourceLoading()&&!this._isLastPage()&&this._loadNextPage().done((()=>{this._renderIndicator(),this._cloneDuplicateItems(),this._renderItemPositions(),this._renderNavButtonsVisibility(),this._renderItemSizes(e)}))},_shouldLoadNextPage(e){return e+2*this._itemsPerPage()>this.option("items").length},_allowDynamicItemsAppend:()=>!0,_fitPaginatedIndex(e){const t=this._itemsPerPage(),i=e<0?t+e:this._itemsCount()-e;return e>this._itemsCount()-1?(e=0,this._goToGhostItem=!0):i<t&&i>0&&(e>0?e-=t-i:e+=t-i),e},_cleanNavButtons(){this._prevNavButton&&(this._prevNavButton.remove(),delete this._prevNavButton),this._nextNavButton&&(this._nextNavButton.remove(),delete this._nextNavButton)},_renderNavButtonsVisibility(){if(!this.option("showNavButtons")||!this._prevNavButton||!this._nextNavButton)return;const e=this.option("selectedIndex"),t=this.option("loop"),i=this._itemsCount();if(this._prevNavButton.show(),this._nextNavButton.show(),0===i&&(this._prevNavButton.hide(),this._nextNavButton.hide()),t)return;let n=e===i-this._itemsPerPage();const o=i<2||0===e;n=this._dataSource&&this._dataSource.paginate()?n&&this._isLastPage():n||i<2,o&&this._prevNavButton.hide(),n&&this._nextNavButton.hide()},_setupSlideShow(){const e=this,t=e.option("slideshowDelay");clearTimeout(e._slideshowTimer),t&&(e._slideshowTimer=setTimeout((()=>{e._userInteraction?e._setupSlideShow():e.nextItem(!0).done(e._setupSlideShow)}),t))},_elementWidth(){return this._cacheElementWidth||(this._cacheElementWidth=(0,C.getWidth)(this.$element())),this._cacheElementWidth},_clearCacheWidth(){delete this._cacheElementWidth},_swipeStartHandler(e){this._releaseInvisibleItems(),this._clearCacheWidth(),this._elementWidth();const t=this._itemsCount();if(t){if(this._stopItemAnimations(),this._startSwipe(),this._userInteraction=!0,!this.option("loop")){const i=this.option("selectedIndex"),n=t-i-this._itemsPerPage(),o=i,a=this.option("rtlEnabled");e.event.maxLeftOffset=a?o:n,e.event.maxRightOffset=a?n:o}}else e.event.cancel=!0},_stopItemAnimations(){n.fx.stop(this._$container,!0)},_swipeUpdateHandler(e){const t=this.option("wrapAround")?1:0,i=this._offsetDirection()*e.event.offset*(this._itemsPerPage()+t)-this.option("selectedIndex");i<0&&this._loadNextPageIfNeeded(Math.ceil(Math.abs(i))),this._renderContainerPosition(i)},_swipeEndHandler(e){const t=e.event.targetOffset*this._offsetDirection()*this._itemsPerPage(),i=this.option("selectedIndex"),n=this._fitIndex(i-t),o=this._fitPaginatedIndex(n);Math.abs(t)<this._itemsPerPage()?this._relocateItems(i):this._itemsPerPage()!==this._itemsCount()?this.option("selectedIndex",o):t>0?this._relocateItems(-t):this._relocateItems(0)},_setFocusOnSelect(){this._userInteraction=!0;const e=this._getRealItems().filter(`.${R}`);this.option("focusedElement",(0,p.getPublicElement)(e)),this._userInteraction=!1},_flipIndex(e){const t=this._itemsCount();return(e%=t)>(t+1)/2&&(e-=t),e<-(t-1)/2&&(e+=t),e},_fitIndex(e){if(!this.option("loop"))return e;const t=this._itemsCount();return(e>=t||e<0)&&(this._goToGhostItem=!0),e>=t&&(e=t-e),(e%=t)<0&&(e+=t),e},_clean(){this.callBase(),this._cleanIndicators(),this._cleanNavButtons()},_dispose(){this._wasAnyItemTemplateRendered=null,clearTimeout(this._slideshowTimer),this.callBase()},_updateSelection(e,t){this._stopItemAnimations(),this._renderNavButtonsVisibility(),this._renderSelectedItem(),this._relocateItems(e[0],t[0]),this._renderSelectedPageIndicator()},_relocateItems(e,t,i){void 0===t&&(t=e);const n=this._calculateIndexOffset(e,t);this._renderContainerPosition(n,!0,this.option("animationEnabled")&&!i).done((function(){this._setFocusOnSelect(),this._userInteraction=!1,this._setupSlideShow()}))},_focusInHandler(){n.fx.isAnimating(this._$container)||this._userInteraction||this.callBase.apply(this,arguments)},_focusOutHandler(){n.fx.isAnimating(this._$container)||this._userInteraction||this.callBase.apply(this,arguments)},_selectFocusedItem:f.noop,_moveFocus(){this._stopItemAnimations(),this.callBase.apply(this,arguments);const e=this.itemElements().index((0,g.default)(this.option("focusedElement")));this.goToItem(e,this.option("animationEnabled"))},_visibilityChanged(e){e&&this._reviseDimensions()},_calculateIndexOffset(e,t){void 0===t&&(t=e);let i=t-e;return this.option("loop")&&!this._needLongMove&&this._goToGhostItem&&(this._isItemOnFirstPage(e)&&this._isItemOnLastPage(t)?i=-this._itemsPerPage():this._isItemOnLastPage(e)&&this._isItemOnFirstPage(t)&&(i=this._itemsPerPage()),this._goToGhostItem=!1),this._needLongMove=!1,i-=t,i},_isItemOnLastPage(e){return e>=this._itemsCount()-this._itemsPerPage()},_isItemOnFirstPage(e){return e<=this._itemsPerPage()},_optionChanged(e){switch(e.name){case"width":case"initialItemWidth":this.callBase.apply(this,arguments),this._dimensionChanged();break;case"animationDuration":this._renderNavButtonsVisibility();break;case"animationEnabled":break;case"loop":this.$element().toggleClass(E,e.value),this.option("loopItemFocus",e.value),(0,b.hasWindow)()&&(this._cloneDuplicateItems(),this._renderItemPositions(),this._renderNavButtonsVisibility());break;case"showIndicator":this._renderIndicator();break;case"showNavButtons":this._renderNavButtons();break;case"slideshowDelay":this._setupSlideShow();break;case"wrapAround":case"stretchImages":(0,b.hasWindow)()&&(this._renderItemSizes(),this._renderItemPositions(),this._renderItemVisibility());break;case"swipeEnabled":this._renderUserInteraction();break;case"indicatorEnabled":this._toggleIndicatorInteraction(e.value);break;default:this.callBase(e)}},goToItem(e,t){const i=this.option("selectedIndex"),n=this._itemsCount();return void 0!==t&&(this._animationOverride=t),e=this._fitIndex(e),this._deferredAnimate=(0,m.Deferred)(),e>n-1||e<0||i===e?this._deferredAnimate.resolveWith(this).promise():(this.option("selectedIndex",e),this._deferredAnimate.promise())},prevItem(e){return this.goToItem(this.option("selectedIndex")-1,e)},nextItem(e){return this.goToItem(this.option("selectedIndex")+1,e)}});(0,c.default)("dxGallery",z);t.default=z},52621:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(4671)),o=p(i(92848)),a=p(i(65951)),s=p(i(64553)),r=i(52576),l=i(57653),d=i(3104),u=i(52071),c=p(i(11118)),h=p(i(85991));function p(e){return e&&e.__esModule?e:{default:e}}const g=(0,d.getNavigator)(),_="dx-loadindicator-segment",f=c.default.inherit({_getDefaultOptions(){return(0,r.extend)(this.callBase(),{indicatorSrc:"",activeStateEnabled:!1,hoverStateEnabled:!1,_animatingSegmentCount:1,_animatingSegmentInner:!1})},_defaultOptionsRules(){const e=(0,u.current)();return this.callBase().concat([{device:()=>"android"===a.default.real().platform&&!/chrome/i.test(g.userAgent),options:{viaImage:!0}},{device:()=>(0,u.isMaterialBased)(e),options:{_animatingSegmentCount:2,_animatingSegmentInner:!0}},{device:()=>(0,u.isGeneric)(e),options:{_animatingSegmentCount:7}}])},_useTemplates:()=>!1,_init(){this.callBase(),this.$element().addClass("dx-loadindicator");const e={role:"alert",label:n.default.format("Loading")};this.setAria(e)},_initMarkup(){this.callBase(),this._renderWrapper(),this._renderIndicatorContent(),this._renderMarkup()},_renderWrapper(){this._$wrapper=(0,s.default)("<div>").addClass("dx-loadindicator-wrapper"),this.$element().append(this._$wrapper)},_renderIndicatorContent(){this._$content=(0,s.default)("<div>").addClass("dx-loadindicator-content"),this._$wrapper.append(this._$content)},_renderMarkup(){const{viaImage:e,indicatorSrc:t}=this.option();!h.default.animation()||e||t?this._renderMarkupForImage():this._renderMarkupForAnimation()},_renderMarkupForAnimation(){const e=this.option("_animatingSegmentInner");this._$indicator=(0,s.default)("<div>").addClass("dx-loadindicator-icon"),this._$content.append(this._$indicator);for(let t=this.option("_animatingSegmentCount");t>=0;--t){const i=(0,s.default)("<div>").addClass(_).addClass(_+t);e&&i.append((0,s.default)("<div>").addClass("dx-loadindicator-segment-inner")),this._$indicator.append(i)}},_renderMarkupForImage(){const{indicatorSrc:e}=this.option();e?(this._$wrapper.addClass("dx-loadindicator-image"),this._$wrapper.css("backgroundImage",`url(${e})`)):h.default.animation()&&this._renderMarkupForAnimation()},_renderDimensions(){this.callBase(),this._updateContentSizeForAnimation()},_updateContentSizeForAnimation(){if(!this._$indicator)return;let e=this.option("width"),t=this.option("height");if(e||t){e=(0,l.getWidth)(this.$element()),t=(0,l.getHeight)(this.$element());const i=Math.min(t,e);this._$wrapper.css({height:i,width:i,fontSize:i})}},_clean(){this.callBase(),this._removeMarkupForAnimation(),this._removeMarkupForImage()},_removeMarkupForAnimation(){this._$indicator&&(this._$indicator.remove(),delete this._$indicator)},_removeMarkupForImage(){this._$wrapper.css("backgroundImage","none")},_optionChanged(e){switch(e.name){case"_animatingSegmentCount":case"_animatingSegmentInner":case"indicatorSrc":this._invalidate();break;default:this.callBase(e)}}});(0,o.default)("dxLoadIndicator",f);t.default=f},14474:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(4671)),o=h(i(92848)),a=h(i(64553)),s=i(17781),r=i(87739),l=i(52576),d=h(i(11979)),u=h(i(89132)),c=i(52071);function h(e){return e&&e.__esModule?e:{default:e}}const p="dx-loadpanel-indicator",g="dx-loadpanel-message",_=u.default.inherit({_supportedKeys(){return(0,l.extend)(this.callBase(),{escape:s.noop})},_getDefaultOptions(){return(0,l.extend)(this.callBase(),{message:n.default.format("Loading"),width:222,height:90,animation:null,showIndicator:!0,indicatorSrc:"",showPane:!0,delay:0,templatesRenderAsynchronously:!1,hideTopOverlayHandler:null,focusStateEnabled:!1,propagateOutsideClick:!0,preventScrollEvents:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"generic"},options:{shadingColor:"transparent"}},{device:()=>(0,c.isMaterial)(),options:{message:"",width:60,height:60,maxHeight:60,maxWidth:60}},{device:()=>(0,c.isFluent)(),options:{width:"auto",height:"auto"}}])},_init(){this.callBase.apply(this,arguments)},_render(){this.callBase(),this.$element().addClass("dx-loadpanel"),this.$wrapper().addClass("dx-loadpanel-wrapper"),this._updateWrapperAria()},_updateWrapperAria(){this.$wrapper().removeAttr("aria-label").removeAttr("role");if(!this.option("showIndicator")){const e=this._getAriaAttributes();this.$wrapper().attr(e)}},_getAriaAttributes(){const{message:e}=this.option();return{role:"alert","aria-label":e||n.default.format("Loading")}},_renderContentImpl(){this.callBase(),this.$content().addClass("dx-loadpanel-content"),this._$loadPanelContentWrapper=(0,a.default)("<div>").addClass("dx-loadpanel-content-wrapper"),this._$loadPanelContentWrapper.appendTo(this.$content()),this._togglePaneVisible(),this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage()},_show(){const e=this.option("delay");if(!e)return this.callBase();const t=(0,r.Deferred)(),i=this.callBase.bind(this);return this._clearShowTimeout(),this._showTimeout=setTimeout((()=>{i().done((()=>{t.resolve()}))}),e),t.promise()},_hide(){return this._clearShowTimeout(),this.callBase()},_clearShowTimeout(){clearTimeout(this._showTimeout)},_renderMessage(){if(!this._$loadPanelContentWrapper)return;const e=this.option("message");if(!e)return;const t=(0,a.default)("<div>").addClass(g).text(e);this._$loadPanelContentWrapper.append(t)},_renderLoadIndicator(){this._$loadPanelContentWrapper&&this.option("showIndicator")&&(this._$indicator||(this._$indicator=(0,a.default)("<div>").addClass(p).appendTo(this._$loadPanelContentWrapper)),this._createComponent(this._$indicator,d.default,{elementAttr:this._getAriaAttributes(),indicatorSrc:this.option("indicatorSrc")}))},_cleanPreviousContent(){this.$content().find(`.${g}`).remove(),this.$content().find(`.${p}`).remove(),delete this._$indicator},_togglePaneVisible(){this.$content().toggleClass("dx-loadpanel-pane-hidden",!this.option("showPane"))},_optionChanged(e){switch(e.name){case"delay":break;case"message":case"showIndicator":this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage(),this._updateWrapperAria();break;case"showPane":this._togglePaneVisible();break;case"indicatorSrc":this._renderLoadIndicator();break;default:this.callBase(e)}},_dispose(){this._clearShowTimeout(),this.callBase()}});(0,o.default)("dxLoadPanel",_);t.default=_},67825:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=S(i(92774)),a=S(i(4671)),s=S(i(92848)),r=S(i(65951)),l=i(61404),d=i(53904),u=S(i(64553)),c=i(91585),h=i(17781),p=i(52576),g=i(21274),_=i(57653),f=i(11528),m=i(3104),v=S(i(38571)),C=S(i(98894)),y=S(i(20780)),b=i(52071),x=S(i(85991)),w=i(6807);function S(e){return e&&e.__esModule?e:{default:e}}const D=(0,m.getWindow)(),I="dx-lookup-field-wrapper",E="dx-list-item-selected",T=v.default.inherit({_supportedKeys(){return(0,p.extend)(this.callBase(),{space(e){e.preventDefault(),this._validatedOpening()},enter(){this._validatedOpening()}})},_getDefaultOptions(){const e=e=>{let t;return t="phone"===r.default.real().deviceType&&D.visualViewport?D.visualViewport[e]:"width"===e?(0,_.getWidth)(D):(0,_.getHeight)(D),.8*t};return(0,p.extend)(this.callBase(),{placeholder:a.default.format("Select"),searchPlaceholder:a.default.format("Search"),searchEnabled:!0,searchStartEvent:"input change keyup",cleanSearchOnOpening:!0,showCancelButton:!0,showClearButton:!1,clearButtonText:a.default.format("Clear"),applyButtonText:a.default.format("OK"),pullRefreshEnabled:!1,useNativeScrolling:!0,pullingDownText:a.default.format("dxList-pullingDownText"),pulledDownText:a.default.format("dxList-pulledDownText"),refreshingText:a.default.format("dxList-refreshingText"),pageLoadingText:a.default.format("dxList-pageLoadingText"),onScroll:null,onPullRefresh:null,onPageLoading:null,pageLoadMode:"scrollBottom",nextButtonText:a.default.format("dxList-nextButtonText"),grouped:!1,groupTemplate:"group",usePopover:!1,openOnFieldClick:!0,showDropDownButton:!1,focusStateEnabled:!1,dropDownOptions:{showTitle:!0,width:()=>e("width"),height:()=>e("height"),shading:!0,hideOnOutsideClick:!0,position:void 0,animation:{},title:"",titleTemplate:"title",onTitleRendered:null,fullScreen:!1},dropDownCentered:!1,_scrollToSelectedItemEnabled:!1,useHiddenSubmitElement:!0})},_setDeprecatedOptions(){this.callBase(),(0,p.extend)(this._deprecatedOptions,{valueChangeEvent:{since:"22.1",alias:"searchStartEvent"}})},_defaultOptionsRules(){const e=(0,b.current)();return this.callBase().concat([{device:()=>!x.default.nativeScrolling,options:{useNativeScrolling:!1}},{device:e=>!r.default.isSimulator()&&"desktop"===r.default.real().deviceType&&"generic"===e.platform,options:{usePopover:!0,dropDownOptions:{height:"auto"}}},{device:{platform:"ios",phone:!0},options:{dropDownOptions:{fullScreen:!0}}},{device:{platform:"ios",tablet:!0},options:{dropDownOptions:{width:()=>.4*Math.min((0,_.getWidth)(D),(0,_.getHeight)(D)),height:"auto"},usePopover:!0}},{device:()=>"desktop"===r.default.real().deviceType&&!r.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,b.isMaterial)(e),options:{usePopover:!1,searchEnabled:!1,showCancelButton:!1,dropDownCentered:!0,_scrollToSelectedItemEnabled:!0,dropDownOptions:{_ignoreFunctionValueDeprecation:!0,width:()=>(0,w.getElementWidth)(this.$element()),height:function(){return this._getPopupHeight()}.bind(this),showTitle:!1,shading:!1}}}])},_init(){this.callBase(),this._initActions()},_initActions(){this.callBase(),this._initScrollAction(),this._initPageLoadingAction(),this._initPullRefreshAction()},_initPageLoadingAction(){this._pageLoadingAction=this._createActionByOption("onPageLoading")},_initPullRefreshAction(){this._pullRefreshAction=this._createActionByOption("onPullRefresh")},_initScrollAction(){this._scrollAction=this._createActionByOption("onScroll")},_scrollHandler(e){this._scrollAction(e)},_pullRefreshHandler(e){this._pullRefreshAction(e)},_pageLoadingHandler(e){this._pageLoadingAction(e)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({group:new c.ChildDefaultTemplate("group"),title:new c.ChildDefaultTemplate("title")})},_initMarkup(){this.$element().addClass("dx-lookup").toggleClass("dx-lookup-popover-mode",this.option("usePopover")),this.callBase()},_inputWrapper(){return this.$element().find(`.${I}`)},_dataSourceOptions(){return(0,p.extend)(this.callBase(),{paginate:!0})},_fireContentReadyAction:h.noop,_popupWrapperClass:()=>"",_renderInput(){this._$field=(0,u.default)("<div>").addClass("dx-lookup-field"),this._applyInputAttributes(this.option("inputAttr"));const e=(0,u.default)("<div>").addClass("dx-lookup-arrow");this._$fieldWrapper=(0,u.default)("<div>").addClass(I).append(this._$field).append(e).appendTo(this.$element())},_applyInputAttributes(e){this._$field.attr(e)},_getInputContainer(){return this._$fieldWrapper},_renderField(){const e=this._getTemplateByOption("fieldTemplate");if(e&&this.option("fieldTemplate"))return void this._renderFieldTemplate(e);const t=this.option("displayValue");this._updateField(t);const i=!this.option("selectedItem");this.$element().toggleClass("dx-lookup-empty",i).toggleClass("dx-texteditor-empty",i)},_getLabelContainer(){return this._$field},_renderDisplayText(e){this._input().length?this.callBase(e):this._updateField(e)},_updateField(e){if(e=(0,f.isDefined)(e)&&String(e),this._$field.empty(),e)this._$field.text(e);else{const e=(0,u.default)("<div>").attr({"data-dx_placeholder":this.option("placeholder")});this._$field.append(e),e.addClass("dx-placeholder")}},_renderButtonContainers:h.noop,_renderFieldTemplate(e){this._$field.empty();const t=this._fieldRenderData();e.render({model:t,container:(0,l.getPublicElement)(this._$field)})},_fieldRenderData(){return this.option("selectedItem")},_popupShowingHandler(){this.callBase.apply(this,arguments),this.option("cleanSearchOnOpening")&&(this.option("searchEnabled")&&this._searchBox.option("value")&&(this._searchBox.option("value",""),this._searchCanceled()),this._list&&this._list.option("focusedElement",null)),this.option("dropDownOptions.fullScreen")&&this.option("_scrollToSelectedItemEnabled")&&(this._popup.option("position").of=(0,u.default)(D))},_popupShownHandler(){const e=this.option("_scrollToSelectedItemEnabled");!this.option("dropDownOptions.fullScreen")&&e&&this._setPopupPosition(),this.callBase()},_scrollToSelectedItem(){const e=this._list.option("selectedIndex"),t=this._list.option("items"),i=t.length;0!==i&&(this._list.option("grouped")?this._list.scrollToItem({group:i-1,item:t[i-1].items.length-1}):this._list.scrollToItem(i-1),this._list.scrollToItem(e))},_getDifferenceOffsets(e){return e.offset().top-(0,u.default)(this.element()).offset().top},_isCenteringEnabled:(e,t)=>e>1&&e<t-2,_getPopupOffset(){const e=this._listItemElements().length;if(0===e)return;const t=(0,u.default)(this._list.element()).find(`.${E}`),i=this._listItemElements().index(t),n=((0,_.getHeight)(t)-(0,_.getHeight)(this.element()))/2,o=(0,u.default)(this._list.element()).offset().top,a=this.option("dropDownOptions.height"),s="function"==typeof a?a():a,r=(0,_.getHeight)(D);let l=0;if(-1!==i){if(this._isCenteringEnabled(i,e)){this._scrollToSelectedItem();const a=(s-(0,_.getHeight)(t))/2-this._getDifferenceOffsets(t);this._list.scrollTo(this._list.scrollTop()+4-a),l=n+this._getDifferenceOffsets(t),o<l&&i!==e-3&&(this._list.scrollTo(this._list.scrollTop()+this._getDifferenceOffsets(t)/2),l=n+this._getDifferenceOffsets(t))}else i<=1?(this._list.scrollTo(0),l=n+this._getDifferenceOffsets(t)):i>=e-2&&(this._scrollToSelectedItem(),l=n+this._getDifferenceOffsets(t));o<l&&(this._scrollToSelectedItem(),l=n+8)}const d=s-l-(0,_.getHeight)(this.element());return r-o<d&&(this._list.scrollTo(this._list.scrollTop()+n-d),l=s-(0,_.getHeight)(this.element())-8),l},_setPopupPosition(){if(!this.option("dropDownCentered"))return;if(this._popup.$wrapper().hasClass("dx-popover-flipped-vertical"))return;const e=(0,u.default)(this._popup.$content()).parent(),t=this._getPopupOffset(),i=(0,n.locate)(e);(0,n.move)(e,{top:i.top-t})},_listItemGroupedElements(){const e=this._list._getItemsContainer().children(),t=[];return e.each(((e,i)=>{t.push((0,u.default)(i).find(".dx-list-group-header")[0]);(0,u.default)(i).find(".dx-list-item").each(((e,i)=>{t.push(i)}))})),(0,u.default)(t)},_calculateListHeight(e){const t=e?this._listItemGroupedElements():this._listItemElements(),i=(0,u.default)(`.${E}`),n=t.index(i);let o=0,a=[];return 0===t.length?o+=8:t.length<5?t.each(((e,t)=>{o+=(0,_.getOuterHeight)(t)})):(a=n<=1?t.slice(0,5):this._isCenteringEnabled(n,t.length)?t.slice(n-2,n+3):t.slice(t.length-5,t.length),a.each(((e,t)=>{o+=(0,_.getOuterHeight)(t)}))),o+(e?8:16)},_getPopupHeight(){var e;return null!==(e=this._list)&&void 0!==e&&e.itemElements().length?this._calculateListHeight(this.option("grouped"))+(this._$searchWrapper?(0,_.getOuterHeight)(this._$searchWrapper):0)+(this._popup._$bottom?(0,_.getOuterHeight)(this._popup._$bottom):0)+(this._popup._$title?(0,_.getOuterHeight)(this._popup._$title):0):"auto"},_allowSelectItemByTab:()=>!1,_popupTabHandler(e){this._shouldLoopFocusInsidePopup()||this.callBase(e)},_renderPopup(){this.option("usePopover")&&!this.option("dropDownOptions.fullScreen")?this.option("_scrollToSelectedItemEnabled")?this.callBase():(this._renderPopover(),this._attachPopupKeyHandler()):this.callBase(),this._$popup.addClass("dx-lookup-popup"),this._popup.$wrapper().addClass("dx-lookup-popup-wrapper")},_renderPopover(){const e=this._popupConfig(),t=(0,p.extend)(e,this._options.cache("dropDownOptions"),{showEvent:null,hideEvent:null,target:this.$element(),fullScreen:!1,shading:!1,hideOnParentScroll:!0,_fixWrapperPosition:!1,width:this._isInitialOptionValue("dropDownOptions.width")?()=>(0,_.getOuterWidth)(this.$element()):e.width});this._popup=this._createComponent(this._$popup,C.default,t),this._popup.$overlayContent().attr("role","dialog"),this._popup.on({showing:this._popupShowingHandler.bind(this),shown:this._popupShownHandler.bind(this),hiding:this._popupHidingHandler.bind(this),hidden:this._popupHiddenHandler.bind(this),contentReady:this._contentReadyHandler.bind(this)}),this.option("_scrollToSelectedItemEnabled")&&this._popup._$arrow.remove(),this._setPopupContentId(this._popup.$content()),this._contentReadyHandler()},_popupHidingHandler(){this.callBase(),this.option("focusStateEnabled")&&this.focus()},_popupHiddenHandler(){this.callBase(),this.option("_scrollToSelectedItemEnabled")&&(0,n.resetPosition)((0,u.default)(this._popup.content()).parent())},_preventFocusOnPopup:h.noop,_shouldLoopFocusInsidePopup(){const{usePopover:e,dropDownCentered:t,_scrollToSelectedItemEnabled:i}=this.option();return i?t:!e},_popupConfig(){const{dropDownOptions:e}=this.option(),t=this._shouldLoopFocusInsidePopup(),i=(0,p.extend)(this.callBase(),{toolbarItems:this._getPopupToolbarItems(),hideOnParentScroll:!1,onPositioned:null,maxHeight:"100vh",showTitle:e.showTitle,title:e.title,titleTemplate:this._getTemplateByOption("dropDownOptions.titleTemplate"),onTitleRendered:e.onTitleRendered,fullScreen:e.fullScreen,shading:e.shading,hideOnOutsideClick:e.hideOnOutsideClick||e.closeOnOutsideClick,_loopFocus:t});return delete i.animation,delete i.position,this.option("_scrollToSelectedItemEnabled")&&(i.position=this.option("dropDownCentered")?{my:"left top",at:"left top",of:this.element()}:{my:"left top",at:"left bottom",of:this.element()},i.hideOnParentScroll=!0),(0,g.each)(["position","animation","width","height"],((t,n)=>{const o=e[n];void 0!==o&&(i[n]=o)})),i},_getPopupToolbarItems(){const e="useButtons"===this.option("applyValueMode")?this._popupToolbarItemsConfig():[],t=this._getCancelButtonConfig();t&&e.push(t);const i=this._getClearButtonConfig();return i&&e.push(i),this._applyButtonsLocation(e)},_popupToolbarItemsConfig(){return[{shortcut:"done",options:{onClick:this._applyButtonHandler.bind(this),text:this.option("applyButtonText")}}]},_getCancelButtonConfig(){return this.option("showCancelButton")?{shortcut:"cancel",onClick:this._cancelButtonHandler.bind(this),options:{text:this.option("cancelButtonText")}}:null},_getClearButtonConfig(){return this.option("showClearButton")?{shortcut:"clear",onClick:this._resetValue.bind(this),options:{text:this.option("clearButtonText")}}:null},_applyButtonHandler(e){e&&this._saveValueChangeEvent(e.event),this.option("value",this._valueGetter(this._currentSelectedItem())),this.callBase()},_cancelButtonHandler(){this._refreshSelected(),this.callBase()},_refreshPopupVisibility(){this.option("opened")&&this._updateListDimensions()},_dimensionChanged(){this.option("usePopover")&&!this.option("dropDownOptions.width")&&this.option("dropDownOptions.width",(0,_.getWidth)(this.$element())),this._updateListDimensions()},_input(){return this._$searchBox||this.callBase()},_renderPopupContent(){this.callBase(),this._renderSearch()},_renderValueChangeEvent:h.noop,_renderSearch(){const e=this.option("searchEnabled");if(this._toggleSearchClass(e),e){const e=this._$searchWrapper=(0,u.default)("<div>").addClass("dx-lookup-search-wrapper"),t=this._$searchBox=(0,u.default)("<div>").addClass("dx-lookup-search").appendTo(e),i=r.default.current().android?"text":"search";let n=!1;const o={mode:i,showClearButton:!0,valueChangeEvent:this.option("searchStartEvent"),inputAttr:{"aria-label":"Search"},onDisposing:()=>n=!1,onFocusIn:()=>n=!0,onFocusOut:()=>n=!1,onKeyboardHandled:e=>n&&this._list._keyboardHandler(e),onValueChanged:e=>this._searchHandler(e)};this._searchBox=this._createComponent(t,y.default,o),this._registerSearchKeyHandlers(),e.insertBefore(this._$list),this._setSearchPlaceholder()}},_updateActiveDescendant(){if(this.callBase(),!this._$searchBox)return;const e=this._$searchBox.find("input");this.callBase(e)},_removeSearch(){this._$searchWrapper&&this._$searchWrapper.remove(),delete this._$searchWrapper,this._$searchBox&&this._$searchBox.remove(),delete this._$searchBox,delete this._searchBox},_selectListItemHandler(e){const t=(0,u.default)(this._list.option("focusedElement"));t.length&&(e.preventDefault(),e.target=t.get(0),this._saveValueChangeEvent(e),this._selectListItem(e.itemData,t))},_registerSearchKeyHandlers(){this._searchBox.registerKeyHandler("enter",this._selectListItemHandler.bind(this)),this._searchBox.registerKeyHandler("space",this._selectListItemHandler.bind(this)),this._searchBox.registerKeyHandler("end",h.noop),this._searchBox.registerKeyHandler("home",h.noop)},_toggleSearchClass(e){this._popup&&this._popup.$wrapper().toggleClass("dx-lookup-popup-search",e)},_setSearchPlaceholder(){if(!this._$searchBox)return;const e=this.option("minSearchLength");let t=this.option("searchPlaceholder");e&&t===a.default.format("Search")&&(t=a.default.getFormatter("dxLookup-searchPlaceholder")(e)),this._searchBox.option("placeholder",t)},_setAriaTargetForList:h.noop,_listConfig(){return(0,p.extend)(this.callBase(),{tabIndex:0,grouped:this.option("grouped"),groupTemplate:this._getTemplateByOption("groupTemplate"),pullRefreshEnabled:this.option("pullRefreshEnabled"),useNativeScrolling:this.option("useNativeScrolling"),pullingDownText:this.option("pullingDownText"),pulledDownText:this.option("pulledDownText"),refreshingText:this.option("refreshingText"),pageLoadingText:this.option("pageLoadingText"),onScroll:this._scrollHandler.bind(this),onPullRefresh:this._pullRefreshHandler.bind(this),onPageLoading:this._pageLoadingHandler.bind(this),pageLoadMode:this.option("pageLoadMode"),nextButtonText:this.option("nextButtonText"),indicateLoading:this.option("searchEnabled"),onSelectionChanged:this._getSelectionChangedHandler()})},_getSelectionChangedHandler(){return this.option("showSelectionControls")?this._selectionChangeHandler.bind(this):h.noop},_listContentReadyHandler(){this.callBase(...arguments),this._refreshSelected()},_runWithoutCloseOnScroll(e){const{_scrollToSelectedItemEnabled:t}=this.option(),i=this._popup.option("hideOnParentScroll");t?(this._popup.option("hideOnParentScroll",!1),e(),this._hideOnParentScrollTimer=setTimeout((()=>{this._popup.option("hideOnParentScroll",i)}))):e()},_setFocusPolicy(){this.option("focusStateEnabled")&&this._runWithoutCloseOnScroll((()=>{this.option("searchEnabled")?this._searchBox.focus():this._list.focus()}))},_focusTarget(){return this._$field},_keyboardEventBindingTarget(){return this._$field},_listItemClickHandler(e){this._saveValueChangeEvent(e.event),this._selectListItem(e.itemData,e.event.currentTarget)},_selectListItem(e,t){this._list.selectItem(t),"instantly"===this.option("applyValueMode")&&this._applyButtonHandler()},_currentSelectedItem(){return this.option("grouped")?this._list.option("selectedItems[0]").items[0]:this._list.option("selectedItems[0]")},_resetValue(e){this._saveValueChangeEvent(e.event),this.option("value",null),this.option("opened",!1)},_searchValue(){return this.option("searchEnabled")&&this._searchBox?this._searchBox.option("value"):""},_renderInputValue(){return this.callBase().always((()=>{this._refreshSelected()}))},_renderPlaceholder(){0!==this.$element().find(".dx-texteditor-input").length&&this.callBase()},_clean(){this._$fieldWrapper.remove(),clearTimeout(this._hideOnParentScrollTimer),this._hideOnParentScrollTimer=null,this._$searchBox=null,this.callBase()},_optionChanged(e){var t;const{name:i,fullName:n,value:o}=e;switch(i){case"dataSource":this.callBase(...arguments),this._renderField();break;case"searchEnabled":this._popup&&(this._removeSearch(),this._renderSearch());break;case"searchPlaceholder":this._setSearchPlaceholder();break;case"minSearchLength":this._setSearchPlaceholder(),this.callBase(...arguments);break;case"inputAttr":this._applyInputAttributes(o);break;case"usePopover":case"placeholder":this._invalidate();break;case"clearButtonText":case"showClearButton":case"showCancelButton":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"applyValueMode":default:this.callBase(...arguments);break;case"onPageLoading":this._initPageLoadingAction();break;case"onPullRefresh":this._initPullRefreshAction();break;case"pullRefreshEnabled":case"useNativeScrolling":case"pullingDownText":case"pulledDownText":case"refreshingText":case"pageLoadingText":case"nextButtonText":case"grouped":case"groupTemplate":this._setListOption(i);break;case"searchStartEvent":null===(t=this._searchBox)||void 0===t||t.option("valueChangeEvent",o);break;case"onScroll":this._initScrollAction();break;case"pageLoadMode":this._setListOption("pageLoadMode",this.option("pageLoadMode"));break;case"cleanSearchOnOpening":case"_scrollToSelectedItemEnabled":break;case"dropDownOptions":switch(n){case"dropDownOptions.width":case"dropDownOptions.height":this._popupOptionChanged({name:i,fullName:n,value:"auto"===o?this.initialOption("dropDownOptions")[(0,d.getFieldName)(n)]:o}),this._options.cache("dropDownOptions",this.option("dropDownOptions"));break;default:this.callBase(...arguments)}break;case"dropDownCentered":this.option("_scrollToSelectedItemEnabled")&&(this.option("dropDownOptions.position",void 0),this._renderPopup())}},focus(){this.option("opened")?this._setFocusPolicy():o.default.trigger(this._focusTarget(),"focus")},field(){return this._$field}});(0,s.default)("dxLookup",T);t.default=T},95916:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=C(i(18278)),a=i(18029),s=C(i(4671)),r=C(i(92848)),l=C(i(65951)),d=i(61404),u=C(i(64553)),c=i(17781),h=i(87739),p=i(52576),g=i(50254),_=i(57653),f=i(11528),m=C(i(55213)),v=i(68128);function C(e){return e&&e.__esModule?e:{default:e}}const y="dx-multiview-item",b=e=>+e,x=m.default.inherit({_activeStateUnit:`.${y}`,_supportedKeys(){return(0,p.extend)(this.callBase(),{pageUp:c.noop,pageDown:c.noop})},_getDefaultOptions(){return(0,p.extend)(this.callBase(),{selectedIndex:0,swipeEnabled:!0,animationEnabled:!0,loop:!1,deferRendering:!0,loopItemFocus:!1,selectOnFocus:!0,selectionMode:"single",selectionRequired:!0,selectByClick:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===l.default.real().deviceType&&!l.default.isSimulator(),options:{focusStateEnabled:!0}}])},_itemClass:()=>y,_itemDataKey:()=>"dxMultiViewItemData",_itemContainer(){return this._$itemContainer},_itemElements(){return this._itemContainer().children(this._itemSelector())},_itemWidth(){return this._itemWidthValue||(this._itemWidthValue=(0,_.getWidth)(this._$wrapper)),this._itemWidthValue},_clearItemWidthCache(){delete this._itemWidthValue},_itemsCount(){return this.option("items").length},_isAllItemsHidden(){const{items:e}=this.option();return e.every(((e,t)=>!this._isItemVisible(t)))},_normalizeIndex(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=this._itemsCount();if(this._isAllItemsHidden())return;e<0&&(e+=n),e>=n&&(e-=n);const o=t>0?-1:1,a=-1===o?0:n-1;for(;!this._isItemVisible(e)&&(i||e!==a);)e=(e+o+n)%n;return e},_getRTLSignCorrection(){return this.option("rtlEnabled")?-1:1},_init(){this.callBase.apply(this,arguments);const e=this.$element();e.addClass("dx-multiview"),this._$wrapper=(0,u.default)("<div>").addClass("dx-multiview-wrapper"),this._$wrapper.appendTo(e),this._$itemContainer=(0,u.default)("<div>").addClass("dx-multiview-item-container"),this._$itemContainer.appendTo(this._$wrapper),this.option("loopItemFocus",this.option("loop")),this._findBoundaryIndices(),this._initSwipeable()},_ensureSelectedItemIsVisible(){const{loop:e,selectedIndex:t}=this.option();if(this._isItemVisible(t))return;if(this._isAllItemsHidden())return void this.option("selectedIndex",0);const i=-1*this._getRTLSignCorrection();let n=this._normalizeIndex(t,i,e);n===t&&(n=this._normalizeIndex(t,-i,e)),this.option("selectedIndex",n)},_initMarkup(){this._deferredItems=[],this.callBase(),this._ensureSelectedItemIsVisible();const e=this._getSelectedItemIndices();this._updateItemsVisibility(e[0]),this._setElementAria(),this._setItemsAria()},_afterItemElementDeleted(e,t){this.callBase(e,t),this._deferredItems&&this._deferredItems.splice(t.itemIndex,1)},_beforeItemElementInserted(e){this.callBase.apply(this,arguments),this._deferredItems&&this._deferredItems.splice(e.index,0,null)},_executeItemRenderAction(e,t,i){e=(this.option("items")||[]).indexOf(t),this.callBase(e,t,i)},_renderItemContent(e){const t=(0,h.Deferred)(),i=this,{callBase:n}=this,o=(0,h.Deferred)();return o.done((()=>{const o=n.call(i,e);t.resolve(o)})),this._deferredItems[e.index]=o,this.option("deferRendering")||o.resolve(),t.promise()},_render(){this.callBase(),(0,c.deferRender)((()=>{const e=this._getSelectedItemIndices();this._updateItems(e[0])}))},_getElementAria:()=>({role:"group",roledescription:s.default.format("dxMultiView-elementAriaRoleDescription"),label:s.default.format("dxMultiView-elementAriaLabel")}),_setElementAria(){const e=this._getElementAria();this.setAria(e,this.$element())},_setItemsAria(){const e=this._itemElements(),t=this._itemsCount();e.each(((e,i)=>{const n=this._getItemAria({itemIndex:e,itemsCount:t});this.setAria(n,(0,u.default)(i))}))},_getItemAria(e){let{itemIndex:t,itemsCount:i}=e;return{role:"group",roledescription:s.default.format("dxMultiView-itemAriaRoleDescription"),label:s.default.format("dxMultiView-itemAriaLabel",t+1,i)}},_updateItems(e,t){this._updateItemsPosition(e,t),this._updateItemsVisibility(e,t)},_modifyByChanges(){this.callBase.apply(this,arguments);const e=this._getSelectedItemIndices();this._updateItemsVisibility(e[0])},_updateItemsPosition(e,t){const i=this._itemElements(),n=(0,f.isDefined)(t)?-this._animationDirection(t,e):void 0,o=i.eq(e);v._translator.move(o,0),(0,f.isDefined)(t)&&v._translator.move(i.eq(t),100*n+"%")},_isItemVisible(e){var t;return(null===(t=this.option("items")[e])||void 0===t?void 0:t.visible)??!0},_updateItemsVisibility(e,t){this._itemElements().each(((i,n)=>{const o=(0,u.default)(n),a=i!==e&&i!==t;a||this._renderSpecificItem(i),o.toggleClass("dx-multiview-item-hidden",a),this.setAria("hidden",a||void 0,o)}))},_renderSpecificItem(e){const t=this._itemElements().eq(e),i=t.find(this._itemContentClass()).length>0;(0,f.isDefined)(e)&&!i&&(this._deferredItems[e].resolve(),(0,a.triggerResizeEvent)(t))},_refreshItem(e,t){this.callBase(e,t),this._updateItemsVisibility(this.option("selectedIndex"))},_setAriaSelectionAttribute:c.noop,_updateSelection(e,t){const i=e[0],n=t[0];v.animation.complete(this._$itemContainer),this._updateItems(n,i);const o=this._animationDirection(i,n);this._animateItemContainer(o*this._itemWidth(),(()=>{v._translator.move(this._$itemContainer,0),this._updateItems(i),(0,_.getWidth)(this._$itemContainer)}))},_animateItemContainer(e,t){const i=this.option("animationEnabled")?200:0;v.animation.moveTo(this._$itemContainer,e,i,t)},_animationDirection(e,t){const i=(o=this._$itemContainer,(0,n.locate)(o).left);var o;const a=(t-e)*this._getRTLSignCorrection()*this._getItemFocusLoopSignCorrection(),s=0!==i?i:a;return(0,g.sign)(s)},_getSwipeDisabledState(){return!this.option("swipeEnabled")||this._itemsCount()<=1},_initSwipeable(){this._createComponent(this.$element(),o.default,{disabled:this._getSwipeDisabledState(),elastic:!1,itemSizeFunc:this._itemWidth.bind(this),onStart:e=>this._swipeStartHandler(e.event),onUpdated:e=>this._swipeUpdateHandler(e.event),onEnd:e=>this._swipeEndHandler(e.event)})},_findBoundaryIndices(){const e=this.option("items");let t,i;e.forEach(((e,n)=>{const o=Boolean(null==e?void 0:e.disabled),a=this._isItemVisible(n);!o&&a&&(t??(t=n),i=n)})),this._boundaryIndices={firstAvailableIndex:t??0,lastAvailableIndex:i??e.length-1,firstTrueIndex:0,lastTrueIndex:e.length-1}},_swipeStartHandler(e){v.animation.complete(this._$itemContainer);const t=this.option("selectedIndex"),i=this.option("loop"),{firstAvailableIndex:n,lastAvailableIndex:o}=this._boundaryIndices,a=this.option("rtlEnabled");e.maxLeftOffset=b(i||(a?t>n:t<o)),e.maxRightOffset=b(i||(a?t<o:t>n))},_swipeUpdateHandler(e){const{offset:t}=e,i=(0,g.sign)(t)*this._getRTLSignCorrection(),n=this.option("selectedIndex"),o=this._normalizeIndex(n-i,i);n!==o&&(v._translator.move(this._$itemContainer,t*this._itemWidth()),this._updateItems(n,o))},_findNextAvailableIndex(e,t){const{items:i,loop:n}=this.option(),{firstAvailableIndex:o,lastAvailableIndex:a,firstTrueIndex:s,lastTrueIndex:r}=this._boundaryIndices,l=[s,o].includes(e),d=[r,a].includes(e);if(n){if(l&&t<0)return a;if(d&&t>0)return o}for(let n=e+t;n>=o&&n<=a;n+=t){const e=Boolean(i[n].disabled),t=this._isItemVisible(n);if(!e&&t)return n}return e},_postprocessSwipe(){},_swipeEndHandler(e){const t=e.targetOffset*this._getRTLSignCorrection();if(t){const e=this._findNextAvailableIndex(this.option("selectedIndex"),-t);this.selectItem(e).fail((()=>{this._animateItemContainer(0,c.noop)})).done((()=>{this._postprocessSwipe({swipedTabsIndex:e})}));const i=this.itemElements().filter(".dx-item-selected");this.option("focusStateEnabled")&&this.option("focusedElement",(0,d.getPublicElement)(i))}else this._animateItemContainer(0,c.noop)},_getItemFocusLoopSignCorrection(){return this._itemFocusLooped?-1:1},_moveFocus(){this.callBase.apply(this,arguments),this._itemFocusLooped=!1},_prevItem(e){const t=this.callBase.apply(this,arguments);return this._itemFocusLooped=t.is(e.last()),t},_nextItem(e){const t=this.callBase.apply(this,arguments);return this._itemFocusLooped=t.is(e.first()),t},_dimensionChanged(){this._clearItemWidthCache()},_visibilityChanged(e){e&&this._dimensionChanged()},_updateSwipeDisabledState(){const e=this._getSwipeDisabledState();o.default.getInstance(this.$element()).option("disabled",e)},_dispose(){delete this._boundaryIndices,this.callBase()},_itemOptionChanged(e,t){this.callBase(...arguments);const{selectedItem:i}=this.option();"visible"===t&&e===i&&this._ensureSelectedItemIsVisible()},_optionChanged(e){const{value:t}=e;switch(e.name){case"loop":this.option("loopItemFocus",t);break;case"animationEnabled":break;case"swipeEnabled":this._updateSwipeDisabledState();break;case"deferRendering":this._invalidate();break;case"items":this._updateSwipeDisabledState(),this._findBoundaryIndices(),this.callBase(e);break;case"selectedIndex":this._isItemVisible(t)?this.callBase(e):this._ensureSelectedItemIsVisible();break;default:this.callBase(e)}}});(0,r.default)("dxMultiView",x);t.default=x},93666:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(64553)),o=i(52576),a=i(11528),s=i(55355),r=i(3104),l=d(i(36574));function d(e){return e&&e.__esModule?e:{default:e}}const u=(0,r.getWindow)();let c=null;const h={};const p=e=>(0,a.isString)(e)&&e.includes("top")?"down-push":"up-push",g=e=>h[e]||(e=>{const t=(0,n.default)("<div>").appendTo((0,s.value)());return h[e]=t,t})(e),_=(e,t)=>{const i=`dx-toast-stack dx-toast-stack-${t}-direction`;e.removeAttr("class").addClass(i)},f=(e,t,i)=>{const{offsetWidth:n,offsetHeight:o}=e.children().first().get(0),s={toastWidth:n,toastHeight:o,windowHeight:u.innerHeight,windowWidth:u.innerWidth},r=(0,a.isString)(i)?m(i,s):i,l=v(t,r,s);e.css(l)},m=(e,t)=>{let{toastWidth:i,toastHeight:n,windowHeight:o,windowWidth:a}=t;switch(e){case"top left":return{top:10,left:10};case"top right":return{top:10,right:10};case"bottom left":return{bottom:10,left:10};case"bottom right":return{bottom:10,right:10};case"top center":return{top:10,left:Math.round(a/2-i/2)};case"left center":return{top:Math.round(o/2-n/2),left:10};case"right center":return{top:Math.round(o/2-n/2),right:10};case"center":return{top:Math.round(o/2-n/2),left:Math.round(a/2-i/2)};default:return{bottom:10,left:Math.round(a/2-i/2)}}},v=(e,t,i)=>{const{toastWidth:n,toastHeight:o,windowHeight:a,windowWidth:s}=i;switch(e.replace(/-push|-stack/g,"")){case"up":return{bottom:t.bottom??a-o-t.top,top:"",left:t.left??"",right:t.right??""};case"down":return{top:t.top??a-o-t.bottom,bottom:"",left:t.left??"",right:t.right??""};case"left":return{right:t.right??s-n-t.left,left:"",top:t.top??"",bottom:t.bottom??""};case"right":return{left:t.left??s-n-t.right,right:"",top:t.top??"",bottom:t.bottom??""}}};t.default=function(e,t,i){const r=(0,a.isPlainObject)(e)?e:{message:e},d=(0,a.isPlainObject)(t)?t:void 0,u=(0,a.isPlainObject)(t)?void 0:t,{onHidden:h}=r;if(null!=d&&d.position){const{position:e}=d,t=d.direction||p(e),i=(0,a.isString)(e)?e:`${e.top}-${e.left}-${e.bottom}-${e.right}`,{onShowing:n}=r,s=g(i);_(s,t),(0,o.extend)(r,{container:s,_skipContentPositioning:!0,onShowing(i){f(s,t,e),null==n||n(i)}})}(0,o.extend)(r,{type:u,displayTime:i,onHidden(e){(0,n.default)(e.element).remove(),null==h||h(e)}}),c=(0,n.default)("<div>").appendTo((0,s.value)()),new l.default(c,r).show()}},74538:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(92848)),o=l(i(64553)),a=i(52576),s=i(11528),r=l(i(76256));function l(e){return e&&e.__esModule?e:{default:e}}const d="dx-progressbar-animating-segment",u=r.default.inherit({_getDefaultOptions(){return(0,a.extend)(this.callBase(),{value:0,statusFormat:e=>`Progress: ${Math.round(100*e)}%`,showStatus:!0,onComplete:null,activeStateEnabled:!1,statusPosition:"bottom left",_animatingSegmentCount:0})},_defaultOptionsRules(){return this.callBase().concat([{device:e=>"android"===e.platform,options:{_animatingSegmentCount:2}}])},_toggleReadOnlyState(){this.setAria("readonly",void 0)},_initMarkup(){this._renderStatus(),this._createCompleteAction(),this.callBase(),this.$element().addClass("dx-progressbar"),this._$wrapper.addClass("dx-progressbar-wrapper"),this._$bar.addClass("dx-progressbar-container"),this.setAria("role","progressbar"),(0,o.default)("<div>").addClass("dx-progressbar-range-container").appendTo(this._$wrapper).append(this._$bar),this._$range.addClass("dx-progressbar-range"),this._toggleStatus(this.option("showStatus"))},_useTemplates:()=>!1,_createCompleteAction(){this._completeAction=this._createActionByOption("onComplete")},_renderStatus(){this._$status=(0,o.default)("<div>").addClass("dx-progressbar-status")},_renderIndeterminateState(){this._$segmentContainer=(0,o.default)("<div>").addClass("dx-progressbar-animating-container");const e=this.option("_animatingSegmentCount");for(let t=0;t<e;t++)(0,o.default)("<div>").addClass(d).addClass(`${d}-${t+1}`).appendTo(this._$segmentContainer);this._$segmentContainer.appendTo(this._$wrapper)},_toggleStatus(e){const t=this.option("statusPosition").split(" ");e?"top"===t[0]||"left"===t[0]?this._$status.prependTo(this._$wrapper):this._$status.appendTo(this._$wrapper):this._$status.detach(),this._togglePositionClass()},_togglePositionClass(){const e=this.option("statusPosition").split(" ");this._$wrapper.removeClass("dx-position-top-left dx-position-top-right dx-position-bottom-left dx-position-bottom-right dx-position-left dx-position-right");let t=`dx-position-${e[0]}`;e[1]&&(t+=`-${e[1]}`),this._$wrapper.addClass(t)},_toggleIndeterminateState(e){e?(this._renderIndeterminateState(),this._$bar.toggle(!1)):(this._$bar.toggle(!0),this._$segmentContainer.remove(),delete this._$segmentContainer)},_renderValue(){const e=this.option("value"),t=this.option("max");e||0===e?(this._$segmentContainer&&this._toggleIndeterminateState(!1),e===t&&this._completeAction(),this.callBase(),this._setStatus()):this._toggleIndeterminateState(!0)},_setStatus(){let e=this.option("statusFormat");e=(0,s.isFunction)(e)?e.bind(this):function(e){return e};const t=e(this._currentRatio,this.option("value"));this._$status.text(t)},_dispose(){this._$status.remove(),this.callBase()},_optionChanged(e){switch(e.name){case"statusFormat":this._setStatus();break;case"showStatus":this._toggleStatus(e.value);break;case"statusPosition":this._toggleStatus(this.option("showStatus"));break;case"onComplete":this._createCompleteAction();break;case"_animatingSegmentCount":break;default:this.callBase(e)}}});(0,n.default)("dxProgressBar",u);t.default=u},49824:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(92774)),o=i(98834),a=p(i(4671)),s=p(i(92848)),r=p(i(64553)),l=i(17781),d=i(52576),u=i(57653),c=p(i(56220)),h=p(i(29049));function p(e){return e&&e.__esModule?e:{default:e}}const g="dx-rangeslider",_=`${g}-start-handle`,f=`${g}-end-handle`,m=c.default.inherit({_supportedKeys(){const e=this.option("rtlEnabled"),t=this,i=function(e,i){t.option("start")===t.option("end")&&(t._capturedHandle=i,e.target=t._capturedHandle,n.default.trigger(t._capturedHandle,"focus"))},o=function(i,n,o){const a=(0,r.default)(i.target).hasClass(_)?"start":"end";let s=t.option(a);n=t._valueStep(n),s+=o*(e?-n:n),t.option(a,s)},a=function(n,a){i(n,e?t._$handleStart:t._$handleEnd),o(n,a,1)},s=function(n,a){i(n,e?t._$handleEnd:t._$handleStart),o(n,a,-1)};return(0,d.extend)(this.callBase(),{leftArrow(e){this._processKeyboardEvent(e),s(e,this.option("step"))},rightArrow(e){this._processKeyboardEvent(e),a(e,this.option("step"))},pageUp(e){this._processKeyboardEvent(e),a(e,this.option("step")*this.option("keyStep"))},pageDown(e){this._processKeyboardEvent(e),s(e,this.option("step")*this.option("keyStep"))},home(e){this._processKeyboardEvent(e);const t=(0,r.default)(e.target).hasClass(_),i=t?"start":"end",n=t?"min":"start",o=this.option(n);this.option(i,o)},end(e){this._processKeyboardEvent(e);const t=(0,r.default)(e.target).hasClass(_),i=t?"start":"end",n=t?"end":"max",o=this.option(n);this.option(i,o)}})},_getDefaultOptions(){return(0,d.extend)(this.callBase(),{start:40,end:60,value:[40,60],startName:"",endName:""})},_renderSubmitElement(){const e=this.$element();this._$submitStartElement=(0,r.default)("<input>").attr("type","hidden").attr("name",this.option("startName")).appendTo(e),this._$submitEndElement=(0,r.default)("<input>").attr("type","hidden").attr("name",this.option("endName")).appendTo(e)},_initOptions(e){this.callBase(e);const t=this.initialOption("value"),i=this.option("value");i[0]===t[0]&&i[1]===t[1]?this.option("value",[this.option("start"),this.option("end")]):this.option({start:i[0],end:i[1]})},_initMarkup(){this.$element().addClass(g),this.callBase()},_renderContentImpl(){this._callHandlerMethod("repaint"),this.callBase()},_renderHandle(){this._$handleStart=this._renderHandleImpl(this.option("start"),this._$handleStart).addClass(_),this._$handleEnd=this._renderHandleImpl(this.option("end"),this._$handleEnd).addClass(f),this._updateHandleAriaLabels()},_startHandler(e){const t=e.event,i=this._$range,n=(0,u.getWidth)(i),a=(0,o.eventData)(t).x-this._$bar.offset().left,s=i.position().left,r=i.position().left+n,l=(this.option("rtlEnabled")?-1:1)*((s+r)/2-a)>0;this._capturedHandle=l?this._$handleStart:this._$handleEnd,this.callBase(e)},_updateHandleAriaLabels(){this.setAria("label",a.default.getFormatter("dxRangeSlider-ariaFrom")(this.option("dxRangeSlider-ariaFrom")),this._$handleStart),this.setAria("label",a.default.getFormatter("dxRangeSlider-ariaTill")(this.option("dxRangeSlider-ariaTill")),this._$handleEnd)},_activeHandle(){return this._capturedHandle},_updateHandlePosition(e){const t=this.option("rtlEnabled")?-1:1,i=this.option("max"),o=this.option("min");let a=this._startOffset+t*e.event.offset/this._swipePixelRatio();a=a.toPrecision(12);const s=a*(i-o)+o;this._updateSelectedRangePosition(a,a),h.default.getInstance(this._activeHandle()).fitTooltipPosition,this._changeValueOnSwipe(a);const[r,l]=this._getActualValue();let d;r===l&&(d=s<r?this._$handleStart:this._$handleEnd,n.default.trigger(d,"focus"),d&&d!==this._capturedHandle&&(this._updateSelectedRangePosition((r-o)/(i-o),(l-o)/(i-o)),this._toggleActiveState(this._activeHandle(),!1),this._toggleActiveState(d,!0),this._capturedHandle=d),this._updateSelectedRangePosition(a,a),this._changeValueOnSwipe(a))},_updateSelectedRangePosition(e,t){const i=this.option("rtlEnabled"),n=this._capturedHandle===this._$handleStart&&i||this._capturedHandle===this._$handleEnd&&!i,o=n?"right":"left";i^n?this._$range.css(o,100-100*t+"%"):this._$range.css(o,100*e+"%")},_setValueOnSwipe(e){const t=this._capturedHandle===this._$handleStart?"start":"end";let[i,n]=this._getActualValue();const o=this.option("max"),a=this.option("min");i=Math.min(Math.max(i,a),o),n=Math.min(Math.max(n,a),o),"start"===t?i=e>n?n:e:n=e<i?i:e,"onHandleMove"===this.option("valueChangeMode")?this.option("value",[i,n]):(this._actualValue=[i,n],this._renderValue())},_renderValue(){let[e,t]=this._getActualValue();const i=this.option("min"),n=this.option("max"),o=this.option("rtlEnabled");e=Math.max(i,Math.min(e,n)),t=Math.max(e,Math.min(t,n)),"onHandleMove"===this.option("valueChangeMode")&&(this._setOptionWithoutOptionChange("start",e),this._setOptionWithoutOptionChange("end",t),this._setOptionWithoutOptionChange("value",[e,t])),this._$submitStartElement.val((0,l.applyServerDecimalSeparator)(e)),this._$submitEndElement.val((0,l.applyServerDecimalSeparator)(t));const a=n===i?0:(t-i)/(n-i),s=`${parseFloat((100*(n===i?0:(e-i)/(n-i))).toPrecision(12))}%`,r=`${parseFloat((100*(1-a)).toPrecision(12))}%`;!this._needPreventAnimation&&this._setRangeStyles({right:o?s:r,left:o?r:s}),h.default.getInstance(this._$handleStart).option("value",e),h.default.getInstance(this._$handleEnd).option("value",t)},_callHandlerMethod(e,t){h.default.getInstance(this._$handleStart)[e](t),h.default.getInstance(this._$handleEnd)[e](t)},_setValueOption(){const e=this.option("start"),t=this.option("end");this.option("value",[e,t])},_rangesAreEqual:(e,t)=>e[0]===t[0]&&e[1]===t[1],_optionChanged(e){switch(e.name){case"value":{if(this._rangesAreEqual(e.value,e.previousValue))break;this._setOptionWithoutOptionChange("start",e.value[0]),this._setOptionWithoutOptionChange("end",e.value[1]),this._renderValue();const t=this.option("start"),i=this.option("end"),n=!this._rangesAreEqual(this._initialValue,e.value);this.option("isDirty",n),this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})({start:t,end:i,value:[t,i],event:this._valueChangeEventInstance,previousValue:e.previousValue}),this.validationRequest.fire({value:[t,i],editor:this}),this._saveValueChangeEvent(void 0);break}case"start":case"end":this._setValueOption();break;case"startName":this._$submitStartElement.attr("name",e.value);break;case"endName":this._$submitEndElement.attr("name",e.value);break;case"name":break;default:this.callBase(e)}}});(0,s.default)("dxRangeSlider",m);t.default=m},33979:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=g(i(92848)),o=g(i(64553)),a=i(17781),s=i(52576),r=i(21274),l=i(57653),d=i(11528),u=i(3104),c=g(i(91204)),h=g(i(7607)),p=g(i(35185));function g(e){return e&&e.__esModule?e:{default:e}}const _="dx-responsivebox",f=`${_}-screen-`,m="dxBoxItemData",v=h.default.inherit({_getDefaultOptions(){return(0,s.extend)(this.callBase(),{rows:[],cols:[],screenByWidth:null,singleColumnScreen:"",height:"100%",width:"100%",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,onLayoutChanged:null,currentScreenFactor:void 0})},_init(){this.option("screenByWidth")||this._options.silent("screenByWidth",u.defaultScreenFactorFunc),this.callBase(),this._initLayoutChangedAction()},_initLayoutChangedAction(){this._layoutChangedAction=this._createActionByOption("onLayoutChanged",{excludeValidators:["disabled","readonly"]})},_itemClass:()=>"dx-box-item",_itemDataKey:()=>m,_initMarkup(){this.callBase(),this.$element().addClass(_)},_renderItems(){this._setScreenSize(),this._screenItems=this._itemsByScreen(),this._prepareGrid(),this._spreadItems(),this._layoutItems(),this._linkNodeToItem()},_itemOptionChanged(e){const t=this._findItemElementByItem(e);t.length&&(this._refreshItem(t,e),this._clearItemNodeTemplates(),this._update(!0))},_setScreenSize(){const e=this._getCurrentScreen();this._removeScreenSizeClass(),this.$element().addClass(f+e),this.option("currentScreenFactor",e)},_removeScreenSizeClass(){const e=this.option("currentScreenFactor");e&&this.$element().removeClass(f+e)},_prepareGrid(){const e=this._grid=[];this._prepareRowsAndCols(),(0,r.each)(this._rows,(()=>{const t=[];e.push(t),(0,r.each)(this._cols,(()=>{t.push(this._createEmptyCell())}))}))},getSingleColumnRows(){const e=this.option("rows"),t=this._screenItems.length;if(e.length){const i=this._filterByScreen(e),n=[];for(let e=0;e<t;e++){const t=this._defaultSizeConfig();e<i.length&&(0,d.isDefined)(i[e].shrink)&&(t.shrink=i[e].shrink),n.push(t)}return n}return this._defaultSizeConfig(t)},_prepareRowsAndCols(){this._isSingleColumnScreen()?(this._prepareSingleColumnScreenItems(),this._rows=this.getSingleColumnRows(),this._cols=this._defaultSizeConfig(1)):(this._rows=this._sizesByScreen(this.option("rows")),this._cols=this._sizesByScreen(this.option("cols")))},_isSingleColumnScreen(){return this._screenRegExp().test(this.option("singleColumnScreen"))||!this.option("rows").length||!this.option("cols").length},_prepareSingleColumnScreenItems(){this._screenItems.sort(((e,t)=>e.location.row-t.location.row||e.location.col-t.location.col)),(0,r.each)(this._screenItems,((e,t)=>{(0,s.extend)(t.location,{row:e,col:0,rowspan:1,colspan:1})}))},_sizesByScreen(e){return(0,r.map)(this._filterByScreen(e),(e=>(0,s.extend)(this._defaultSizeConfig(),e)))},_createDefaultSizeConfig:()=>({ratio:1,baseSize:0,minSize:0,maxSize:0}),_defaultSizeConfig(e){const t=this._createDefaultSizeConfig();if(!arguments.length)return t;const i=[];for(let n=0;n<e;n++)i.push(t);return i},_filterByScreen(e){const t=this._screenRegExp();return(0,a.grep)(e,(e=>!e.screen||t.test(e.screen)))},_screenRegExp(){const e=this._getCurrentScreen();return new RegExp(`(^|\\s)${e}($|\\s)`,"i")},_getCurrentScreen(){const e=this._screenWidth();return this.option("screenByWidth")(e)},_screenWidth:()=>(0,u.hasWindow)()?(0,l.getWidth)((0,u.getWindow)()):1920,_createEmptyCell:()=>({item:{},location:{colspan:1,rowspan:1}}),_spreadItems(){(0,r.each)(this._screenItems,((e,t)=>{const i=t.location||{},n=i.col,o=i.row,a=this._grid[o],s=a&&a[n];this._occupyCells(s,t)}))},_itemsByScreen(){return this.option("items").reduce(((e,t)=>{let i=t.location||{};return i=(0,d.isPlainObject)(i)?[i]:i,this._filterByScreen(i).forEach((i=>{e.push({item:t,location:(0,s.extend)({rowspan:1,colspan:1},i)})})),e}),[])},_occupyCells(e,t){e&&!this._isItemCellOccupied(e,t)&&((0,s.extend)(e,t),this._markSpanningCell(e))},_isItemCellOccupied(e,t){if(!(0,d.isEmptyObject)(e.item))return!0;let i=!1;return this._loopOverSpanning(t.location,(e=>{i=i||!(0,d.isEmptyObject)(e.item)})),i},_loopOverSpanning(e,t){const i=e.row+e.rowspan-1,n=e.col+e.colspan-1,o=Math.min(i,this._rows.length-1),a=Math.min(n,this._cols.length-1);e.rowspan-=i-o,e.colspan-=n-a;for(let i=e.row;i<=o;i++)for(let n=e.col;n<=a;n++)i===e.row&&n===e.col||t(this._grid[i][n])},_markSpanningCell(e){this._loopOverSpanning(e.location,(t=>{(0,s.extend)(t,{item:e.item,spanningCell:e})}))},_linkNodeToItem(){(0,r.each)(this._itemElements(),((e,t)=>{const i=(0,o.default)(t),n=i.data(m);n.box||(n.node=i.children())}))},_layoutItems(){const e=this._grid.length,t=e&&this._grid[0].length;if(!e&&!t)return;const i=this._layoutBlock({direction:"col",row:{start:0,end:e-1},col:{start:0,end:t-1}}),n=this._prepareBoxConfig(i.box||{direction:"row",items:[(0,s.extend)(i,{ratio:1})]});(0,s.extend)(n,this._rootBoxConfig(n.items)),this._$root=(0,o.default)("<div>").appendTo(this._itemContainer()),this._createComponent(this._$root,c.default,n)},_rootBoxConfig(e){return{width:"100%",height:"100%",items:(0,r.each)(e,((e,t)=>{this._needApplyAutoBaseSize(t)&&(0,s.extend)(t,{baseSize:"auto"})})),itemTemplate:this._getTemplateByOption("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this._createActionByOption("onItemHold"),onItemClick:this._createActionByOption("onItemClick"),onItemContextMenu:this._createActionByOption("onItemContextMenu"),onItemRendered:this._createActionByOption("onItemRendered")}},_needApplyAutoBaseSize:e=>!(e.baseSize||e.minSize&&"auto"!==e.minSize||e.maxSize&&"auto"!==e.maxSize),_prepareBoxConfig(e){return(0,s.extend)(e||{},{crossAlign:"stretch",onItemStateChanged:this.option("onItemStateChanged")})},_layoutBlock(e){return this._isSingleItem(e)?this._itemByCell(e.row.start,e.col.start):this._layoutDirection(e)},_isSingleItem(e){const t=this._grid[e.row.start][e.col.start].location,i=e.row.end-e.row.start==t.rowspan-1,n=e.col.end-e.col.start==t.colspan-1;return i&&n},_itemByCell(e,t){const i=this._grid[e][t];return i.spanningCell?null:i.item},_layoutDirection(e){const t=[],{direction:i}=e,n=this._crossDirection(i);let o;for(;o=this._nextBlock(e);){if(this._isBlockIndivisible(e.prevBlockOptions,o))throw p.default.Error("E1025");const i=this._layoutBlock({direction:n,row:o.row,col:o.col,prevBlockOptions:e});i&&((0,s.extend)(i,this._blockSize(o,n)),t.push(i)),e[n].start=o[n].end+1}return{box:this._prepareBoxConfig({direction:i,items:t})}},_isBlockIndivisible:(e,t)=>e&&e.col.start===t.col.start&&e.col.end===t.col.end&&e.row.start===t.row.start&&e.row.end===t.row.end,_crossDirection:e=>"col"===e?"row":"col",_nextBlock(e){const{direction:t}=e,i=this._crossDirection(t),n=e[t].start,o=e[t].end,a=e[i].start;if(a>e[i].end)return null;let s=1;for(let e=a;e<a+s;e++){let r=1;for(let a=n;a<=o;a++){const n=this._cellByDirection(t,a,e);r=Math.max(r,n.location[`${i}span`])}const l=e+r,d=a+s;l>d&&(s+=l-d)}const r={};return r[t]={start:n,end:o},r[i]={start:a,end:a+s-1},r},_cellByDirection(e,t,i){return"col"===e?this._grid[i][t]:this._grid[t][i]},_blockSize(e,t){const i="row"===t?"auto":0,n="row"===t?this._rows:this._cols,o=(0,s.extend)(this._createDefaultSizeConfig(),{ratio:0});for(let i=e[t].start;i<=e[t].end;i++){const e=n[i];o.ratio+=e.ratio,o.baseSize+=e.baseSize,o.minSize+=e.minSize,o.maxSize+=e.maxSize,(0,d.isDefined)(e.shrink)&&(o.shrink=e.shrink)}return o.minSize=o.minSize?o.minSize:i,o.maxSize=o.maxSize?o.maxSize:"auto",this._isSingleColumnScreen()&&(o.baseSize="auto"),o},_update(e){const t=this._$root;this._renderItems(),t&&(e?t.remove():(t.detach(),this._saveAssistantRoot(t))),this._layoutChangedAction()},_saveAssistantRoot(e){this._assistantRoots=this._assistantRoots||[],this._assistantRoots.push(e)},_dispose(){this._clearItemNodeTemplates(),this._cleanUnusedRoots(),this.callBase.apply(this,arguments)},_cleanUnusedRoots(){this._assistantRoots&&(0,r.each)(this._assistantRoots,((e,t)=>{(0,o.default)(t).remove()}))},_clearItemNodeTemplates(){(0,r.each)(this.option("items"),(function(){delete this.node}))},_attachClickEvent:a.noop,_optionChanged(e){switch(e.name){case"rows":case"cols":case"screenByWidth":case"singleColumnScreen":this._clearItemNodeTemplates(),this._invalidate();break;case"width":case"height":this.callBase(e),this._update();break;case"onLayoutChanged":this._initLayoutChangedAction();break;case"itemTemplate":this._clearItemNodeTemplates(),this.callBase(e);break;case"currentScreenFactor":break;default:this.callBase(e)}},_dimensionChanged(){this._getCurrentScreen()!==this.option("currentScreenFactor")&&this._update()},repaint(){this._update()}});(0,n.default)("dxResponsiveBox",v);t.default=v},30149:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(44804);var n=i(98834),o=f(i(4671)),a=f(i(92848)),s=f(i(64960)),r=i(61404),l=f(i(87129)),d=f(i(64553)),u=i(17781),c=i(87739),h=i(52576),p=i(21274),g=i(11528),_=f(i(38571));function f(e){return e&&e.__esModule?e:{default:e}}const m="dx-selectbox-popup-wrapper",v=_.default.inherit({_supportedKeys(){const e=this,t=this.callBase(),i=function(e){this._isEditable()?this._valueSubstituted()&&(this._preventFiltering=!0):this.option("showClearButton")&&(e.preventDefault(),this.clear()),this._savedTextRemoveEvent=e,this._preventSubstitution=!0},n=function(){e.option("searchEnabled")&&e._valueSubstituted()&&e._searchHandler()};return(0,h.extend)({},t,{tab(){this.option("opened")&&!this._popup.getFocusableElements().length&&this._resetCaretPosition(!0),t.tab&&t.tab.apply(this,arguments),this._cancelSearchIfNeed()},upArrow(e){if(t.upArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(e),!0},downArrow(e){if(t.downArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(e),!0},leftArrow(){var e;n(),null===(e=t.leftArrow)||void 0===e||e.apply(this,arguments)},rightArrow(){n(),t.rightArrow&&t.rightArrow.apply(this,arguments)},home(){n(),t.home&&t.home.apply(this,arguments)},end(){n(),t.end&&t.end.apply(this,arguments)},escape(){const e=t.escape&&t.escape.apply(this,arguments);return this._cancelEditing(),e??!0},enter(e){const i=this.option("opened"),n=this._input().val().trim(),o=n&&this._list&&!this._list.option("focusedElement");if(!n&&(0,g.isDefined)(this.option("value"))&&this.option("allowClearing"))this._saveValueChangeEvent(e),this.option({selectedItem:null,value:null}),this.close();else{if(this.option("acceptCustomValue"))return e.preventDefault(),o&&(i&&this._toggleOpenState(),this._valueChangeEventHandler(e)),i;if(t.enter&&t.enter.apply(this,arguments))return i}},space(e){const t=this.option("opened"),i=this.option("searchEnabled"),n=this.option("acceptCustomValue");if(t&&!i&&!n)return e.preventDefault(),this._valueChangeEventHandler(e),!0},backspace:i,del:i})},_getDefaultOptions(){return(0,h.extend)(this.callBase(),{placeholder:o.default.format("Select"),fieldTemplate:null,customItemCreateEvent:"change",valueChangeEvent:"change",acceptCustomValue:!1,onCustomItemCreating(e){(0,g.isDefined)(e.customItem)||(e.customItem=e.text)},showSelectionControls:!1,allowClearing:!0,tooltipEnabled:!1,openOnFieldClick:!0,showDropDownButton:!0,displayCustomValue:!1,useHiddenSubmitElement:!0})},_init(){this.callBase(),this._initCustomItemCreatingAction()},_initMarkup(){this.$element().addClass("dx-selectbox"),this._renderTooltip(),this.callBase(),this._$container.addClass("dx-selectbox-container")},_createPopup(){this.callBase(),this._popup.$element().addClass("dx-selectbox-popup"),this._popup.$overlayContent().attr("tabindex",-1)},_popupWrapperClass(){return`${this.callBase()} ${m}`},_setDeprecatedOptions(){this.callBase(),(0,h.extend)(this._deprecatedOptions,{valueChangeEvent:{since:"22.2",alias:"customItemCreateEvent"}})},_cancelEditing(){!this.option("searchEnabled")&&this._list&&(this._focusListElement(null),this._updateField(this.option("selectedItem")))},_renderOpenedState(){this.callBase(),this.option("opened")&&(this._scrollToSelectedItem(),this._focusSelectedElement())},_focusSelectedElement(){if(!this._searchValue())return void this._focusListElement(null);const{items:e,selectedItem:t}=this.option(),i=this._list._itemElements(),n=(null==e?void 0:e.indexOf(t))??-1,o=-1===n||this._isCustomItemSelected()?null:i.eq(n);this._focusListElement(o)},_renderFocusedElement(){if(!this._list)return;if(!this._searchValue()||this.option("acceptCustomValue"))return void this._focusListElement(null);const e=this._list._itemElements().not(".dx-state-disabled").eq(0);this._focusListElement(e)},_focusListElement(e){this._preventInputValueRender=!0,this._list.option("focusedElement",(0,r.getPublicElement)(e)),delete this._preventInputValueRender},_scrollToSelectedItem(){this._list&&this._list.scrollToItem(this._list.option("selectedItem"))},_listContentReadyHandler(){this.callBase();this._dataController.paginate()&&this._needPopupRepaint()||this._scrollToSelectedItem()},_renderValue(){return this._renderInputValue(),this._setSubmitValue(),(0,c.Deferred)().resolve()},_renderInputValue(){return this.callBase().always((()=>{this._renderInputValueAsync()}))},_renderInputValueAsync(){this._renderTooltip(),this._renderInputValueImpl().always((()=>{this._refreshSelected()}))},_renderInputValueImpl(){return this._renderField(),(0,c.Deferred)().resolve()},_setNextItem(e){const t=this._calcNextItem(e),i=this._valueGetter(t);this._setValue(i)},_setNextValue(e){(this._dataController.isLoaded()?(0,c.Deferred)().resolve():this._dataController.load()).done((()=>{const t=this._getSelectedIndex(),i=this._dataController.pageSize(),o=this._dataController.isLastPage(),a=t===this._items().length-1;this._saveValueChangeEvent(e);const s="downArrow"===(0,n.normalizeKeyName)(e)?1:-1;i&&!o&&a&&s>0?(this._popup||this._createPopup(),this._dataController.isLoading()||this._list._loadNextPage().done(this._setNextItem.bind(this,s))):this._setNextItem(s)}))},_setSelectedItem(e){const t=!this._isCustomValueAllowed()&&void 0===e;this.callBase(t?null:e),t||this._isEditable()&&!this._isCustomItemSelected()||this._setListOption("selectedItem",this.option("selectedItem"))},_isCustomValueAllowed(){return this.option("acceptCustomValue")||this.callBase()},_displayValue(e){return e=!(0,g.isDefined)(e)&&this._isCustomValueAllowed()?this.option("value"):e,this.callBase(e)},_listConfig(){const e=(0,h.extend)(this.callBase(),{pageLoadMode:"scrollBottom",onSelectionChanged:this._getSelectionChangeHandler(),selectedItem:this.option("selectedItem"),onFocusedItemChanged:this._listFocusedItemChangeHandler.bind(this),_onItemsRendered:()=>{this._popup.repaint(),this.option("opened")&&this._scrollToSelectedItem()}});return this.option("showSelectionControls")&&(0,h.extend)(e,{showSelectionControls:!0,selectByClick:!0}),e},_listFocusedItemChangeHandler(e){if(this._preventInputValueRender)return;const t=e.component,i=(0,d.default)(t.option("focusedElement")),n=t._getItemData(i);this._updateField(n)},_updateField(e){if(!this._getTemplateByOption("fieldTemplate")||!this.option("fieldTemplate")){const t=this._displayGetter(e);return this.option("text",t),void this._renderDisplayText(t)}this._renderField()},_getSelectionChangeHandler(){return this.option("showSelectionControls")?this._selectionChangeHandler.bind(this):u.noop},_selectionChangeHandler(e){(0,p.each)(e.addedItems||[],((e,t)=>{this._setValue(this._valueGetter(t))}))},_getActualSearchValue(){return this._dataController.searchValue()},_isInlineAutocompleteEnabled(){return this.option("searchEnabled")&&!this.option("acceptCustomValue")&&"startswith"===this.option("searchMode")},_getAriaAutocomplete(){const{disabled:e,readOnly:t,searchEnabled:i}=this.option();if(!(i&&!(t||e)))return"none";return this._isInlineAutocompleteEnabled()?"both":"list"},_toggleOpenState(e){if(!this.option("disabled")){if((e=arguments.length?e:!this.option("opened"))||this._shouldClearFilter()||this._restoreInputText(!0),this._wasSearch()&&e){this._wasSearch(!1);if((this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded())&&this._dataController.getDataSource()){if(this._searchTimer)return;const e=this._getActualSearchValue();e&&this._wasSearch(!0),this._filterDataSource(e||null)}else this._setListOption("items",[])}e&&this._scrollToSelectedItem(),this.callBase(e)}},_renderTooltip(){this.option("tooltipEnabled")&&this.$element().attr("title",this.option("displayValue"))},_renderDimensions(){this.callBase(),this._updatePopupWidth(),this._updateListDimensions()},_isValueEqualInputText(){const e=this.option("selectedItem");if(null===e)return!1;const t=this._displayGetter(e);return(t?String(t):"")===this._searchValue()},_popupHidingHandler(){this._isValueEqualInputText()&&this._cancelEditing(),this.callBase()},_popupHiddenHandler(){this.callBase(),this._shouldCancelSearch()&&(this._wasSearch(!1),this._searchCanceled(),this._shouldCancelSearch(!1))},_restoreInputText(e){this.option("readOnly")||this._loadItemDeferred&&this._loadItemDeferred.always((()=>{const{acceptCustomValue:t,text:i,selectedItem:n}=this.option();t?e||this._isValueChanging||(this._updateField(n??this._createCustomItem(i)),this._clearFilter()):this.option("searchEnabled")&&!this._searchValue()&&this.option("allowClearing")?this._clearTextValue():this._isValueEqualInputText()||this._renderInputValue().always((e=>{const t=(0,u.ensureDefined)(e,n);this._setSelectedItem(t),this._updateField(t),this._clearFilter()}))}))},_valueChangeEventIncludesBlur(){return this.option(this._getValueChangeEventOptionName()).includes("blur")},_isPreventedFocusOutEvent(e){return this._preventNestedFocusEvent(e)||this._valueChangeEventIncludesBlur()},_focusOutHandler(e){if(!this._isPreventedFocusOutEvent(e)){this._isOverlayNestedTarget(e.relatedTarget)||(this._restoreInputText(),this._clearSearchTimer()),this._cancelSearchIfNeed(e)}e.target=this._input().get(0),this.callBase(e)},_cancelSearchIfNeed(e){const{searchEnabled:t}=this.option(),i=this._isOverlayNestedTarget(null==e?void 0:e.relatedTarget);if(this._wasSearch()&&t&&!i){var n;const e=null===(n=this._popup)||void 0===n?void 0:n._hideAnimationProcessing;this._clearSearchTimer(),e?this._shouldCancelSearch(!0):(this._wasSearch(!1),this._searchCanceled())}},_shouldCancelSearch(e){if(!arguments.length)return this._shouldCancelSearchValue;this._shouldCancelSearchValue=e},_isOverlayNestedTarget:e=>!!(0,d.default)(e).closest(`.${m}`).length,_clearTextValue(){const e=this.option("selectedItem"),t=this._displayGetter(e);e&&""!==t&&(this._savedTextRemoveEvent&&this._saveValueChangeEvent(this._savedTextRemoveEvent),this.option("value",null)),delete this._savedTextRemoveEvent},_shouldOpenPopup(){return this._needPassDataSourceToList()&&this._wasSearch()},_isFocused(){const e=s.default.getActiveElement(this.element());return this.callBase()&&(0,d.default)(e).closest(this._input()).length>0},_getValueChangeEventOptionName:()=>"customItemCreateEvent",_renderValueChangeEvent(){this._isEditable()&&this.callBase()},_fieldRenderData(){const e=this._list&&this.option("opened")&&(0,d.default)(this._list.option("focusedElement"));return e&&e.length?this._list._getItemData(e):this.option("selectedItem")},_isSelectedValue(e){return this._isValueEquals(e,this.option("value"))},_shouldCloseOnItemClick(){return!(this.option("showSelectionControls")&&"single"!==this.option("selectionMode"))},_listItemClickHandler(e){const t=this._getCurrentValue();this._focusListElement((0,d.default)(e.itemElement)),this._saveValueChangeEvent(e.event),this._completeSelection(this._valueGetter(e.itemData)),this._shouldCloseOnItemClick()&&this.option("opened",!1),this.option("searchEnabled")&&t===this._valueGetter(e.itemData)&&this._updateField(e.itemData),this._shouldClearFilter()&&this._cancelSearchIfNeed()},_shouldClearFilter(){return this._wasSearch()},_completeSelection(e){this._setValue(e)},_loadItem(e,t){const i=this,n=(0,c.Deferred)();return this.callBase(e,t).done((e=>{n.resolve(e)})).fail((t=>{if(null!=t&&t.shouldSkipCallback)return;const o=i.option("selectedItem");i.option("acceptCustomValue")&&e===i._valueGetter(o)?n.resolve(o):n.reject()})),n.promise()},_loadInputValue(e,t){return this._loadItemDeferred=this._loadItem(e).always(t),this._loadItemDeferred},_isCustomItemSelected(){const e=this.option("selectedItem"),t=this._searchValue(),i=this._displayGetter(e);return!i||t!==i.toString()},_valueChangeEventHandler(e){this.option("acceptCustomValue")&&this._isCustomItemSelected()&&!this._isValueChanging&&(this._isValueChanging=!0,this._customItemAddedHandler(e))},_initCustomItemCreatingAction(){this._customItemCreatingAction=this._createActionByOption("onCustomItemCreating")},_createCustomItem(e){const t={text:e},i=this._customItemCreatingAction(t),n=(0,u.ensureDefined)(i,t.customItem);return(0,g.isDefined)(i)&&l.default.log("W0015","onCustomItemCreating","customItem"),n},_customItemAddedHandler(e){const t=this._searchValue(),i=this._createCustomItem(t);if(this._saveValueChangeEvent(e),void 0===i)throw this._renderValue(),l.default.Error("E0121");(0,g.isPromise)(i)?(0,c.fromPromise)(i).done(this._setCustomItem.bind(this)).fail(this._setCustomItem.bind(this,null)):this._setCustomItem(i)},_setCustomItem(e){this._disposed||(e=e||null,this.option("selectedItem",e),this._cancelSearchIfNeed(),this._setValue(this._valueGetter(e)),this._renderDisplayText(this._displayGetter(e)),this._isValueChanging=!1)},_clearValueHandler(e){return this._preventFiltering=!0,this.callBase(e),this._searchCanceled(),!1},_wasSearch(e){if(!arguments.length)return!!this._wasSearchValue;this._wasSearchValue=e},_searchHandler(){this._preventFiltering?delete this._preventFiltering:(this._needPassDataSourceToList()&&this._wasSearch(!0),this.callBase(arguments))},_dataSourceFiltered(e){this.callBase(),null!==e&&(this._renderInputSubstitution(),this._renderFocusedElement())},_valueSubstituted(){const e=this._input().get(0),t=this._searchValue().length,i=0===e.selectionStart&&e.selectionEnd===t,n=e.selectionStart!==e.selectionEnd,o=t===e.selectionEnd;return this._wasSearch()&&n&&!i&&o&&this._shouldSubstitutionBeRendered()},_shouldSubstitutionBeRendered(){return!this._preventSubstitution&&this._isInlineAutocompleteEnabled()},_renderInputSubstitution(){if(!this._shouldSubstitutionBeRendered())return void delete this._preventSubstitution;const e=this._list&&this._getPlainItems(this._list.option("items"))[0];if(!e)return;const t=this._input(),i=t.val().length;if(0===i)return;const n=t.get(0),o=this._displayGetter(e).toString();n.value=o,this._caret({start:i,end:o.length})},_dispose(){this._renderInputValueAsync=u.noop,delete this._loadItemDeferred,this.callBase()},_optionChanged(e){switch(e.name){case"customItemCreateEvent":this._refreshValueChangeEvent(),this._refreshFocusEvent(),this._refreshEvents();break;case"onCustomItemCreating":this._initCustomItemCreatingAction();break;case"tooltipEnabled":this._renderTooltip();break;case"readOnly":case"disabled":case"searchMode":this.callBase(e),this._setDefaultAria();break;case"displayCustomValue":case"acceptCustomValue":case"showSelectionControls":this._invalidate();break;case"allowClearing":break;default:this.callBase(e)}}});(0,a.default)("dxSelectBox",v);t.default=v},94723:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=i(64044),a=i(69331),s=v(i(92774)),r=v(i(18278)),l=i(98834),d=v(i(4671)),u=v(i(92848)),c=v(i(65951)),h=v(i(64553)),p=i(87739),g=i(52576),_=i(41639),f=i(57653),m=v(i(78694));function v(e){return e&&e.__esModule?e:{default:e}}const C="dx-switch",y=`${C}-wrapper`,b=`${C}-container`,x=`${C}-inner`,w=`${C}-handle`,S=`${C}-on-value`,D=`${C}-on`,I=`${C}-off`,E=100,T=m.default.inherit({_supportedKeys(){const e=this.option("rtlEnabled"),t=function(e){e.preventDefault(),this._clickAction({event:e})},i=function(e,t){t.preventDefault(),t.stopPropagation(),this._saveValueChangeEvent(t),this._animateValue(e)};return(0,g.extend)(this.callBase(),{space:t,enter:t,leftArrow:i.bind(this,!!e),rightArrow:i.bind(this,!e)})},_useTemplates:()=>!1,_getDefaultOptions(){return(0,g.extend)(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,switchedOnText:d.default.format("dxSwitch-switchedOnText"),switchedOffText:d.default.format("dxSwitch-switchedOffText"),value:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===c.default.real().deviceType&&!c.default.isSimulator(),options:{focusStateEnabled:!0}}])},_feedbackHideTimeout:0,_animating:!1,_initMarkup(){this._renderContainers(),this.$element().addClass(C).append(this._$switchWrapper),this._renderSubmitElement(),this._renderClick(),this.setAria("role","switch"),this._renderSwipeable(),this.callBase(),this._renderSwitchInner(),this._renderLabels(),this._renderValue()},_getInnerOffset(e,t){return 100*((t-this._offsetDirection()*Number(!e))/2)+"%"},_getHandleOffset(e,t){if(this.option("rtlEnabled")&&(e=!e),e){return`${100*-t-100}%`}return 100*-t+"%"},_renderSwitchInner(){this._$switchInner=(0,h.default)("<div>").addClass(x).appendTo(this._$switchContainer),this._$handle=(0,h.default)("<div>").addClass(w).appendTo(this._$switchInner)},_renderLabels(){this._$labelOn=(0,h.default)("<div>").addClass(D).prependTo(this._$switchInner),this._$labelOff=(0,h.default)("<div>").addClass(I).appendTo(this._$switchInner),this._setLabelsText()},_renderContainers(){this._$switchContainer=(0,h.default)("<div>").addClass(b),this._$switchWrapper=(0,h.default)("<div>").addClass(y).append(this._$switchContainer)},_renderSwipeable(){this._createComponent(this.$element(),r.default,{elastic:!1,immediate:!0,onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._getItemSizeFunc.bind(this)})},_getItemSizeFunc(){return(0,f.getOuterWidth)(this._$switchContainer,!0)-(0,_.getBoundingRect)(this._$handle.get(0)).width},_renderSubmitElement(){this._$submitElement=(0,h.default)("<input>").attr("type","hidden").appendTo(this.$element())},_getSubmitElement(){return this._$submitElement},_offsetDirection(){return this.option("rtlEnabled")?-1:1},_renderPosition(e,t){const i=this._getInnerOffset(e,t),n=this._getHandleOffset(e,t);this._$switchInner.css("transform",` translateX(${i})`),this._$handle.css("transform",` translateX(${n})`)},_validateValue(){const e=this.option("value");"boolean"!=typeof e&&this._options.silent("value",!!e)},_renderClick(){const e=(0,l.addNamespace)(o.name,this.NAME),t=this.$element();this._clickAction=this._createAction(this._clickHandler.bind(this)),s.default.off(t,e),s.default.on(t,e,(e=>{this._clickAction({event:e})}))},_clickHandler(e){const t=e.event;this._saveValueChangeEvent(t),this._animating||this._swiping||this._animateValue(!this.option("value"))},_animateValue(e){const t=this.option("value"),i=e;if(t===i)return;this._animating=!0;const o=this._getInnerOffset(t,0),a=this._getInnerOffset(i,0),s=this._getHandleOffset(t,0),r=this._getHandleOffset(i,0),l=this,d={},u={},c={},h={};d.transform=` translateX(${o})`,u.transform=` translateX(${a})`,c.transform=` translateX(${s})`,h.transform=` translateX(${r})`,this.$element().toggleClass(S,i),n.fx.animate(this._$handle,{from:c,to:h,duration:E}),n.fx.animate(this._$switchInner,{from:d,to:u,duration:E,complete(){l._animating=!1,l.option("value",i)}})},_swipeStartHandler(e){const t=this.option("value"),i=this.option("rtlEnabled"),n=i?0:1,o=i?1:0;e.event.maxLeftOffset=t?n:o,e.event.maxRightOffset=t?o:n,this._swiping=!0,this._feedbackDeferred=(0,p.Deferred)(),(0,a.lock)(this._feedbackDeferred),this._toggleActiveState(this.$element(),this.option("activeStateEnabled"))},_swipeUpdateHandler(e){this._renderPosition(this.option("value"),e.event.offset)},_swipeEndHandler(e){const t=this,i=this._offsetDirection(),o={},a={},s=this._getInnerOffset(t.option("value"),e.event.targetOffset),r=this._getHandleOffset(t.option("value"),e.event.targetOffset);o.transform=` translateX(${s})`,a.transform=` translateX(${r})`,n.fx.animate(this._$handle,{to:a,duration:E}),n.fx.animate(this._$switchInner,{to:o,duration:E,complete(){t._swiping=!1;const n=t.option("value")+i*e.event.targetOffset;t._saveValueChangeEvent(e.event),t.option("value",Boolean(n)),t._feedbackDeferred.resolve(),t._toggleActiveState(t.$element(),!1)}})},_renderValue(){this._validateValue();const e=this.option("value");this._renderPosition(e,0),this.$element().toggleClass(S,e),this._getSubmitElement().val(e),this.setAria({checked:e,label:e?this.option("switchedOnText"):this.option("switchedOffText")})},_setLabelsText(){this._$labelOn&&this._$labelOn.text(this.option("switchedOnText")),this._$labelOff&&this._$labelOff.text(this.option("switchedOffText"))},_visibilityChanged(e){e&&this.repaint()},_optionChanged(e){switch(e.name){case"width":delete this._marginBound,this._refresh();break;case"switchedOnText":case"switchedOffText":this._setLabelsText();break;case"value":this._renderValue(),this.callBase(e);break;default:this.callBase(e)}}});(0,u.default)("dxSwitch",T);t.default=T},24341:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(64044),o=A(i(92774)),a=i(98834),s=A(i(4671)),r=i(97169),l=A(i(92848)),d=A(i(65951)),u=i(61404),c=i(74663),h=A(i(19427)),p=A(i(64553)),g=i(27286),_=i(94487),f=i(17781),m=i(87739),v=i(86858),C=i(52576),y=i(21274),b=i(52877),x=i(57653),w=i(11528),S=i(3104),D=A(i(60695)),I=A(i(35185)),E=A(i(45929)),T=i(81569);function A(e){return e&&e.__esModule?e:{default:e}}function O(e,t){return(e||t)&&!(e&&t)}const P="dxTagData",k="dx-tag",M="dx-tagbox-multi-tag",R="dx-tag-custom",L="dx-tag-remove-button",B="dx-tagbox-single-line",V=D.default.inherit({_supportedKeys(){const e=this.callBase(),t=e=>this._list._keyboardHandler(e),i=this.option("rtlEnabled");return(0,C.extend)({},e,{backspace(e){if(!this._isCaretAtTheStart())return;this._processKeyboardEvent(e),this._isTagRemoved=!0;const t=this._$focusedTag||this._tagElements().last();this._$focusedTag&&this._moveTagFocus("prev",!0),0!==t.length&&(this._preserveFocusedTag=!0,this._removeTagElement(t),delete this._preserveFocusedTag)},upArrow:(i,n)=>i.altKey||!this._list?e.upArrow.call(this,i):t(n),downArrow:(i,n)=>i.altKey||!this._list?e.downArrow.call(this,i):t(n),del(e){if(!this._$focusedTag||!this._isCaretAtTheStart())return;this._processKeyboardEvent(e),this._isTagRemoved=!0;const t=this._$focusedTag;this._moveTagFocus("next",!0),this._preserveFocusedTag=!0,this._removeTagElement(t),delete this._preserveFocusedTag},enter(e,i){const n=this._list&&null!==this._list.option("focusedElement");if(this.option("acceptCustomValue")&&!n)return e.preventDefault(),void(""!==this._searchValue()&&this._customItemAddedHandler(e));this.option("opened")&&(this._saveValueChangeEvent(e),t(i),e.preventDefault())},space(e,i){const n=this.option("opened"),o=this._shouldRenderSearchEvent();n&&!o&&(this._saveValueChangeEvent(e),t(i),e.preventDefault())},leftArrow(e){if(!this._isCaretAtTheStart()||this._isEmpty()||this._isEditable()&&i&&!this._$focusedTag)return;e.preventDefault();const t=i?"next":"prev";this._moveTagFocus(t),!this.option("multiline")&&this._scrollContainer(t)},rightArrow(e){if(!this._isCaretAtTheStart()||this._isEmpty()||this._isEditable()&&!i&&!this._$focusedTag)return;e.preventDefault();const t=i?"prev":"next";this._moveTagFocus(t),!this.option("multiline")&&this._scrollContainer(t)}})},_processKeyboardEvent(e){e.preventDefault(),e.stopPropagation(),this._saveValueChangeEvent(e)},_isEmpty(){return 0===this._getValue().length},_updateTagsContainer(e){this._$tagsContainer=e.addClass("dx-tag-container")},_allowSelectItemByTab:()=>!1,_isCaretAtTheStart(){const e=(0,E.default)(this._input());return 0===(null==e?void 0:e.start)&&0===e.end},_updateInputAriaActiveDescendant(e){this.setAria("activedescendant",e,this._input())},_moveTagFocus(e,t){if(!this._$focusedTag){const t=this._tagElements();return this._$focusedTag="next"===e?t.first():t.last(),this._toggleFocusClass(!0,this._$focusedTag),void this._updateInputAriaActiveDescendant(this._$focusedTag.attr("id"))}const i=this._$focusedTag[e](`.${k}`);i.length>0?(this._replaceFocusedTag(i),this._updateInputAriaActiveDescendant(i.attr("id"))):(t||"next"===e&&this._isEditable())&&(this._clearTagFocus(),this._updateInputAriaActiveDescendant())},_replaceFocusedTag(e){this._toggleFocusClass(!1,this._$focusedTag),this._$focusedTag=e,this._toggleFocusClass(!0,this._$focusedTag)},_clearTagFocus(){this._$focusedTag&&(this._toggleFocusClass(!1,this._$focusedTag),this._updateInputAriaActiveDescendant(),delete this._$focusedTag)},_focusClassTarget(e){return e&&e.length&&e[0]!==this._focusTarget()[0]?e:this.callBase()},_getLabelContainer(){return this._$tagsContainer},_getFieldElement(){return this._input()},_scrollContainer(e){if(this.option("multiline")||!(0,S.hasWindow)())return;if(!this._$tagsContainer)return;const t=this._getScrollPosition(e);this._$tagsContainer.scrollLeft(t)},_getScrollPosition(e){return"start"===e||"end"===e?this._getBorderPosition(e):this._$focusedTag?this._getFocusedTagPosition(e):this._getBorderPosition("end")},_getBorderPosition(e){const t=this.option("rtlEnabled"),i=O("end"===e,t),n=t?-1:1;return O(i,!t)?0:n*(this._$tagsContainer.get(0).scrollWidth-(0,x.getOuterWidth)(this._$tagsContainer))},_getFocusedTagPosition(e){const t=O("next"===e,this.option("rtlEnabled"));let{left:i}=this._$focusedTag.position(),n=this._$tagsContainer.scrollLeft();return t&&(i+=(0,x.getOuterWidth)(this._$focusedTag,!0)-(0,x.getOuterWidth)(this._$tagsContainer)),O(t,i<0)&&(n+=i),n},_setNextValue:f.noop,_getDefaultOptions(){return(0,C.extend)(this.callBase(),{value:[],showDropDownButton:!1,maxFilterQueryLength:1500,tagTemplate:"tag",selectAllText:s.default.format("dxList-selectAll"),hideSelectedItems:!1,selectedItems:[],selectAllMode:"page",onSelectAllValueChanged:null,maxDisplayedTags:void 0,showMultiTagOnly:!0,onMultiTagPreparing:null,multiline:!0,useSubmitBehavior:!0})},_init(){this.callBase(),this._selectedItems=[],this._initSelectAllValueChangedAction()},_initActions(){this.callBase(),this._initMultiTagPreparingAction()},_initMultiTagPreparingAction(){this._multiTagPreparingAction=this._createActionByOption("onMultiTagPreparing",{beforeExecute:e=>{this._multiTagPreparingHandler(e.args[0])},excludeValidators:["disabled","readOnly"]})},_multiTagPreparingHandler(e){const{length:t}=this._getValue();this.option("showMultiTagOnly")?e.text=s.default.getFormatter("dxTagBox-selected")(t):e.text=s.default.getFormatter("dxTagBox-moreSelected")(t-this.option("maxDisplayedTags")+1)},_initDynamicTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({tag:new g.BindableTemplate(((e,t)=>{const i=(0,p.default)("<div>").addClass("dx-tag-content");(0,p.default)("<span>").text(t.text??t).appendTo(i),(0,p.default)("<div>").addClass(L).appendTo(i),e.append(i)}),["text"],this.option("integrationOptions.watchMethod"),{text:this._displayGetter})})},_toggleSubmitElement(e){e?(this._renderSubmitElement(),this._setSubmitValue()):(this._$submitElement&&this._$submitElement.remove(),delete this._$submitElement)},_renderSubmitElement(){if(!this.option("useSubmitBehavior"))return;this._$submitElement=(0,p.default)("<select>").attr({multiple:"multiple","aria-label":"Selected items"}).css("display","none").appendTo(this.$element())},_setSubmitValue(){if(!this.option("useSubmitBehavior"))return;const e=this._getValue(),t=[];for(let i=0,n=e.length;i<n;i++){const n=this._shouldUseDisplayValue(e[i]);t.push((0,p.default)("<option>").val(n?this._displayGetter(e[i]):e[i]).attr("selected","selected"))}this._getSubmitElement().empty().append(t)},_initMarkup(){this._tagElementsCache=(0,p.default)();const e=!this.option("multiline");this.$element().addClass("dx-tagbox").toggleClass("dx-tagbox-only-select",!(this.option("searchEnabled")||this.option("acceptCustomValue"))).toggleClass(B,e);this.setAria({role:"application",roledescription:"tagbox"},this.$element()),this._initTagTemplate(),this.callBase()},_getNewLabelId(e,t,i){if(!e)return t;if(i){if(e===t)return;return e.split(" ").filter((e=>e!==t)).join(" ")}return`${e} ${t}`},_updateElementAria(e,t){if(!e)return void this.setAria("labelledby",void 0,this.$element());const i=this.$element().attr("aria-labelledby"),n=this._getNewLabelId(i,e,t);this.setAria("labelledby",n,this.$element())},_render(){this.callBase(),this._renderTagRemoveAction(),this._renderSingleLineScroll(),this._scrollContainer("start")},_initTagTemplate(){this._tagTemplate=this._getTemplateByOption("tagTemplate")},_renderField(){const e=!(0,w.isDefined)(this.option("fieldTemplate"));this.$element().toggleClass("dx-tagbox-default-template",e).toggleClass("dx-tagbox-custom-template",!e),this.callBase()},_renderTagRemoveAction(){const e=this._createAction(this._removeTagHandler.bind(this)),t=(0,a.addNamespace)(n.name,"dxTagBoxTagRemove");o.default.off(this._$tagsContainer,t),o.default.on(this._$tagsContainer,t,`.${L}`,(t=>{e({event:t})}))},_renderSingleLineScroll(){const e=(0,a.addNamespace)("dxmousewheel",this.NAME),t=this.$element(),i=this.option("multiline");o.default.off(t,e),"desktop"===d.default.real().deviceType?i||o.default.on(t,e,this._tagContainerMouseWheelHandler.bind(this)):this._$tagsContainer&&this._$tagsContainer.css("overflowX",i?"":"auto")},_tagContainerMouseWheelHandler(e){const t=this._$tagsContainer.scrollLeft(),i=-.3*e.delta;if(!(0,a.isCommandKeyPressed)(e)&&(0,T.allowScroll)(this._$tagsContainer,i,!0))return this._$tagsContainer.scrollLeft(t+i),!1},_renderEvents(){this.callBase();const e=this._input(),t=(0,a.addNamespace)("keydown",this.NAME);o.default.on(e,t,(e=>{const t=(0,a.normalizeKeyName)(e);!this._isControlKey(t)&&this._isEditable()&&this._clearTagFocus()}))},_popupWrapperClass(){return`${this.callBase()} dx-tagbox-popup-wrapper`},_renderInput(){this.callBase(),this._renderPreventBlurOnInputClick()},_renderPreventBlurOnInputClick(){const e=(0,a.addNamespace)("mousedown","dxTagBox");o.default.off(this._inputWrapper(),e),o.default.on(this._inputWrapper(),e,(e=>{e.target!==this._input()[0]&&this._isFocused()&&e.preventDefault()}))},_renderInputValueImpl(){return this._renderMultiSelect()},_loadInputValue:()=>(0,m.when)(),_clearTextValue(){this._input().val(""),this._toggleEmptinessEventHandler(),this.option("text","")},_focusInHandler(e){this._preventNestedFocusEvent(e)||this._scrollContainer("end"),this.callBase(e)},_renderInputValue(){return this.option("displayValue",this._searchValue()),this.callBase()},_restoreInputText(e){e||this._clearTextValue()},_focusOutHandler(e){this._preventNestedFocusEvent(e)||(this._clearTagFocus(),this._scrollContainer("start")),this.callBase(e)},_initSelectAllValueChangedAction(){this._selectAllValueChangeAction=this._createActionByOption("onSelectAllValueChanged")},_renderList(){this.callBase(),this._setListDataSourceFilter()},_canListHaveFocus(){return"useButtons"===this.option("applyValueMode")},_listConfig(){const e=this.option("showSelectionControls")?"all":"multiple";return(0,C.extend)(this.callBase(),{maxFilterLengthInRequest:this.option("maxFilterQueryLength"),selectionMode:e,selectAllText:this.option("selectAllText"),onSelectAllValueChanged:e=>{let{value:t}=e;this._selectAllValueChangeAction({value:t})},selectAllMode:this.option("selectAllMode"),selectedItems:this._selectedItems,onFocusedItemChanged:null})},_renderMultiSelect(){const e=(0,m.Deferred)();return this._updateTagsContainer(this._$textEditorInputContainer),this._renderInputSize(),this._renderTags().done((()=>{this._popup&&this._popup.refreshPosition(),e.resolve()})).fail(e.reject),e.promise()},_listItemClickHandler(e){!this.option("showSelectionControls")&&this._clearTextValue(),"useButtons"!==this.option("applyValueMode")&&(this.callBase(e),this._saveValueChangeEvent(void 0))},_shouldClearFilter(){const e=this.callBase();return!this.option("showSelectionControls")&&e},_renderInputSize(){const e=this._input(),t=e.val(),i=(0,w.isString)(t)&&t;let n,o="";const a=this.option("searchEnabled")||this.option("acceptCustomValue");if(i&&a){const i=(0,v.createTextElementHiddenCopy)(e,t,{includePaddings:!0});i.insertAfter(e),o=(0,x.getOuterWidth)(i)+5,i.remove()}else t||(n=1);e.css("width",o),e.attr("size",n??"")},_renderInputSubstitution(){this.callBase(),this._updateWidgetHeight()},_getValue(){return this.option("value")||[]},_multiTagRequired(){const e=this._getValue(),t=this.option("maxDisplayedTags");return(0,w.isDefined)(t)&&e.length>t},_renderMultiTag(e){const t=`dx-${new h.default}`,i=(0,p.default)("<div>").attr("id",t).addClass(k).addClass(M),n={multiTagElement:(0,u.getPublicElement)(i),selectedItems:this.option("selectedItems")};if(this._multiTagPreparingAction(n),n.cancel)return!1;i.data(P,n.text),i.insertBefore(e),this._tagTemplate.render({model:n.text,container:(0,u.getPublicElement)(i)});const o=n.text;return this._setTagAria(i,o),this._updateElementAria(t),i},_getFilter(e){const t=this._dataController.filter(),i=e.getCombinedFilter(this.option("valueExpr"),t),n=encodeURI(JSON.stringify(i)).length,o=this.option("maxFilterQueryLength");if(n<=o)return i;I.default.log("W1019",o)},_getFilteredItems(e){var t,i;null===(t=this._loadFilteredItemsPromise)||void 0===t||t.reject();const n=new b.SelectionFilterCreator(e),o=null===(i=this._list)||void 0===i?void 0:i.option("selectedItems"),a=!!o&&this._list._dataController.isLoaded(),s=o||this.option("selectedItems"),l=n.getLocalFilter(this._valueGetter),d=s.filter(l),u=d.length===e.length,c=(0,m.Deferred)(),h=this._dataController;if((!this._isDataSourceChanged||a)&&u)return c.resolve(d).promise();const{customQueryParams:p,expand:g,select:_}=h.loadOptions(),f=this._getFilter(n);return h.loadFromStore({filter:f,customQueryParams:p,expand:g,select:_}).done(((e,t)=>{if(this._isDataSourceChanged=!1,this._disposed)return void c.reject();const{data:i}=(0,r.normalizeLoadResult)(e,t),n=h.applyMapFunction(i);c.resolve(n.filter(l))})).fail(c.reject),this._loadFilteredItemsPromise=c,c.promise()},_createTagsData(e,t){const i=[],n={},o="this"===this._valueGetterExpr(),a={};t.forEach((e=>{const t=o?JSON.stringify(e):this._valueGetter(e);a[t]=e}));const s=[];e.forEach(((e,t)=>{const r=a[o?JSON.stringify(e):e];if(o&&!(0,w.isDefined)(r))s.push(this._loadItem(e,n).always((n=>{const o=this._createTagData(n,e);i.splice(t,0,o)})));else{const n=this._createTagData(r,e);i.splice(t,0,n)}}));const r=(0,m.Deferred)();return m.when.apply(this,s).always((()=>{r.resolve(i)})),r.promise()},_createTagData(e,t){if((0,w.isDefined)(e))return this._selectedItems.push(e),e;const i=this.option("selectedItem");return this._valueGetter(i)===t?i:t},_isGroupedData(){return this.option("grouped")&&!this._dataController.group()},_getItemsByValues(e){const t=[];return e.forEach((e=>{const i=this._getItemFromPlain(e);(0,w.isDefined)(i)&&t.push(i)})),t},_getFilteredGroupedItems(e){const t=(0,m.Deferred)();return this._filteredGroupedItemsLoadPromise&&this._dataController.cancel(this._filteredGroupedItemsLoadPromise.operationId),this._dataController.items().length?t.resolve(this._getItemsByValues(e)):this._filteredGroupedItemsLoadPromise=this._dataController.load().done((()=>{t.resolve(this._getItemsByValues(e))})).fail((()=>{t.resolve([])})).always((()=>{this._filteredGroupedItemsLoadPromise=void 0})),t.promise()},_loadTagsData(){const e=this._getValue(),t=(0,m.Deferred)();this._selectedItems=[];return(this._isGroupedData()?this._getFilteredGroupedItems(e):this._getFilteredItems(e)).done((i=>{this._createTagsData(e,i).always((e=>{t.resolve(e)}))})).fail(t.reject.bind(this)),t.promise()},_renderTags(){const e=(0,m.Deferred)();let t=!1;return this._shouldGetItemsFromPlain(this._valuesToUpdate)&&(this._selectedItems=this._getItemsFromPlain(this._valuesToUpdate),this._selectedItems.length===this._valuesToUpdate.length&&(this._renderTagsImpl(this._selectedItems),t=!0,e.resolve())),t||this._loadTagsData().done((t=>{this._disposed?e.reject():(this._renderTagsImpl(t),e.resolve())})).fail(e.reject),e.promise()},_renderTagsImpl(e){this._renderTagsCore(e),this._renderEmptyState(),this._preserveFocusedTag||this._clearTagFocus()},_shouldGetItemsFromPlain(e){return e&&this._dataController.isLoaded()&&e.length<=this._getPlainItems().length},_getItemsFromPlain(e){let t=this._getSelectedItemsFromList(e);if(0===t.length&&e.length>0||t.length<e.length){const i=this._getPlainItems();t=this._filterSelectedItems(i,e)}return t},_getSelectedItemsFromList(e){var t;const i=null===(t=this._list)||void 0===t?void 0:t.option("selectedItems");let n=[];return e.length===(null==i?void 0:i.length)&&(n=this._filterSelectedItems(i,e)),n},_filterSelectedItems(e,t){return e.filter((e=>{let i;for(let n=0;n<t.length;n++)if(i=t[n],(0,w.isObject)(i)){if(this._isValueEquals(e,i))return!0}else if(this._isValueEquals(this._valueGetter(e),i))return!0;return!1}),this)},_integrateInput(){this._isInputReady.resolve(),this.callBase();const e=this.$element().find(".dx-texteditor-input-container");this._updateTagsContainer(e),this._renderTagRemoveAction()},_renderTagsCore(e){var t;null===(t=this._isInputReady)||void 0===t||t.reject(),this._isInputReady=(0,m.Deferred)(),this._renderField(),this.option("selectedItems",this._selectedItems.slice()),this._cleanTags(),this._input().length>0&&this._isInputReady.resolve(),(0,m.when)(this._isInputReady).done((()=>{this._renderTagsElements(e)}))},_renderTagsElements(e){const t=this._multiTagRequired()&&this._renderMultiTag(this._input()),i=this.option("showMultiTagOnly"),n=this.option("maxDisplayedTags");e.forEach(((e,o)=>{if(t&&i||t&&!i&&o-n>=-1)return!1;this._renderTag(e,t||this._input())})),this._isFocused()&&this._scrollContainer("end"),this._refreshTagElements()},_cleanTags(){if(this._multiTagRequired())this._tagElements().remove();else{const e=this._tagElements(),t=this._getValue();(0,y.each)(e,((e,i)=>{const n=(0,p.default)(i),o=n.data(P);null!=t&&t.includes(o)||n.remove()}))}this._updateElementAria()},_renderEmptyState(){const e=!(this._getValue().length||this._selectedItems.length||this._searchValue());this._toggleEmptiness(e),this._renderDisplayText()},_renderDisplayText(){this._renderInputSize()},_refreshTagElements(){this._tagElementsCache=this.$element().find(`.${k}`)},_tagElements(){return this._tagElementsCache},_applyTagTemplate(e,t){this._tagTemplate.render({model:e,container:(0,u.getPublicElement)(t)})},_renderTag(e,t){const i=this._valueGetter(e);if(!(0,w.isDefined)(i))return;let n=this._getTag(i);const o=this._displayGetter(e),a=this._getItemModel(e,o);if(n)(0,w.isDefined)(o)&&(n.empty(),this._applyTagTemplate(a,n)),n.removeClass(R),this._updateElementAria(n.attr("id"));else{const s=`dx-${new h.default}`;n=this._createTag(i,t,s),this._setTagAria(n,(0,w.isDefined)(o)?o:i),(0,w.isDefined)(e)?this._applyTagTemplate(a,n):(n.addClass(R),this._applyTagTemplate(i,n)),this._updateElementAria(s)}},_setTagAria(e,t){const i={role:"button",label:t,roledescription:s.default.format("dxTagBox-tagRoleDescription")};this.setAria(i,e)},_getItemModel:(e,t)=>(0,w.isObject)(e)&&(0,w.isDefined)(t)?e:(0,f.ensureDefined)(t,""),_getTag(e){const t=this._tagElements(),i=t.length;let n=!1;for(let o=0;o<i;o++){const i=t[o],a=(0,c.data)(i,P);if(e===a||(0,f.equalByValue)(e,a)){n=(0,p.default)(i);break}}return n},_createTag:(e,t,i)=>(0,p.default)("<div>").attr("id",i).addClass(k).data(P,e).insertBefore(t),_toggleEmptinessEventHandler(){this._toggleEmptiness(!this._getValue().length&&!this._searchValue().length)},_customItemAddedHandler(e){this.callBase(e),this._clearTextValue()},_removeTagHandler(e){const t=e.event;t.stopPropagation(),this._saveValueChangeEvent(t);const i=(0,p.default)(t.target).closest(`.${k}`);this._removeTagElement(i)},_removeTagElement(e){if(e.hasClass(M))return void(this.option("showMultiTagOnly")?this.clear():this.option("value",this._getValue().slice(0,this.option("maxDisplayedTags"))));const t=e.data(P),i=e.attr("id");this._removeTagWithUpdate(t),this._updateElementAria(i,!0),this._refreshTagElements()},_updateField:f.noop,_removeTagWithUpdate(e){const t=this._getValue().slice();this._removeTag(t,e),this.option("value",t),this.option("selectedItem",null),0===t.length&&this._clearTagFocus()},_getCurrentValue(){return this._lastValue()},_selectionChangeHandler(e){if("useButtons"===this.option("applyValueMode"))return;const t=this._getValue().slice();if((0,y.each)(e.removedItems||[],((e,i)=>{this._removeTag(t,this._valueGetter(i))})),(0,y.each)(e.addedItems||[],((e,i)=>{this._addTag(t,this._valueGetter(i))})),this._updateWidgetHeight(),!(0,f.equalByValue)(this._list.option("selectedItemKeys"),this.option("value"))){const e=this._list._getSelectionChangeEvent();e&&this._saveValueChangeEvent(e),this.option("value",t)}this._list._saveSelectionChangeEvent(void 0)},_removeTag(e,t){const i=this._valueIndex(t,e);i>=0&&e.splice(i,1)},_addTag(e,t){this._valueIndex(t)<0&&e.push(t)},_fieldRenderData(){return this._selectedItems.slice()},_completeSelection(e){this.option("showSelectionControls")||this._setValue(e)},_setValue(e){var t;if(null===e)return;const i="useButtons"===this.option("applyValueMode"),n=this._valueIndex(e),o=(i?(null===(t=this._list)||void 0===t?void 0:t.option("selectedItemKeys"))||[]:this._getValue()).slice();var a;(n>=0?o.splice(n,1):o.push(e),i)?null===(a=this._list)||void 0===a||a.option("selectedItemKeys",o):this.option("value",o)},_isSelectedValue(e,t){return this._valueIndex(e,null,t)>-1},_valueIndex(e,t,i){let n=-1;return i&&"object"!=typeof e&&(i.indexByValues||(i.indexByValues={},(t=t||this._getValue()).forEach(((e,t)=>{i.indexByValues[e]=t}))),e in i.indexByValues)?i.indexByValues[e]:(t=t||this._getValue(),(0,y.each)(t,((t,i)=>{if(this._isValueEquals(e,i))return n=t,!1})),n)},_lastValue(){const e=this._getValue();return e[e.length-1]??null},_shouldRenderSearchEvent(){return this.option("searchEnabled")||this.option("acceptCustomValue")},_searchHandler(e){this.option("searchEnabled")&&e&&!this._isTagRemoved&&(this.callBase(arguments),this._setListDataSourceFilter()),this._updateWidgetHeight(),delete this._isTagRemoved},_updateWidgetHeight(){const e=this.$element(),t=(0,x.getHeight)(e);this._renderInputSize();const i=(0,x.getHeight)(e);this._popup&&this.option("opened")&&this._isEditable()&&i!==t&&this._popup.repaint()},_refreshSelected(){var e;(null===(e=this._list)||void 0===e?void 0:e.getDataSource())&&this._list.option("selectedItems",this._selectedItems)},_resetListDataSourceFilter(){const e=this._dataController;delete this._userFilter,e.filter(null),e.reload()},_setListDataSourceFilter(){if(!this.option("hideSelectedItems")||!this._list)return;const e=this._dataController,t=this._valueGetterExpr();if((0,w.isString)(t)&&"this"!==t){const t=this._dataSourceFilterExpr();void 0===this._userFilter&&(this._userFilter=e.filter()||null),this._userFilter&&t.push(this._userFilter),t.length?e.filter(t):e.filter(null)}else e.filter(this._dataSourceFilterFunction.bind(this));e.load()},_dataSourceFilterExpr(){const e=[];return this._getValue().forEach((t=>e.push(["!",[this._valueGetterExpr(),t]]))),e},_dataSourceFilterFunction(e){const t=this._valueGetter(e);let i=!0;return(0,y.each)(this._getValue(),((e,n)=>{if(this._isValueEquals(n,t))return i=!1,!1})),i},_dataSourceChangedHandler(){this._isDataSourceChanged=!0,this.callBase.apply(this,arguments)},_applyButtonHandler(e){this._saveValueChangeEvent(e.event),this.option("value",this._getSortedListValues()),this._clearTextValue(),this.callBase(),this._cancelSearchIfNeed()},_getSortedListValues(){const e=this._getListValues(),t=this.option("value")||[],i=e.length?(0,_.getIntersection)(t,e):[],n=i.length?(0,_.removeDuplicates)(e,t):e;return i.concat(n)},_getListValues(){return this._list?this._getPlainItems(this._list.option("selectedItems")).map((e=>this._valueGetter(e))):[]},_setListDataSource(){const e=this._getValue();this.callBase(),e!==this.option("value")&&this.option("value",e),this._refreshSelected()},_renderOpenedState(){this.callBase(),"useButtons"!==this.option("applyValueMode")||this.option("opened")||this._refreshSelected()},clear(){this._restoreInputText();const e=this._getDefaultOptions().value,t=this.option("value");e&&0===e.length&&t&&e.length===t.length||this.callBase()},_clean(){this.callBase(),delete this._defaultTagTemplate,delete this._valuesToUpdate,delete this._tagTemplate},_getSelectedItemsDifference(e,t){if(!e.length)return{addedItems:[],removedItems:t.slice()};if(!t.length)return{addedItems:e.slice(),removedItems:[]};const i=t.reduce(((e,t)=>(e[this._valueGetter(t)]=t,e)),{}),n=[];return e.forEach((e=>{const t=this._valueGetter(e);i[t]||n.push(e),delete i[t]})),{addedItems:n,removedItems:Object.values(i)}},_optionChanged(e){const{name:t,value:i,previousValue:n}=e;switch(t){case"onSelectAllValueChanged":this._initSelectAllValueChangedAction();break;case"onMultiTagPreparing":this._initMultiTagPreparingAction(),this._renderTags();break;case"hideSelectedItems":i?this._setListDataSourceFilter():this._resetListDataSourceFilter();break;case"useSubmitBehavior":this._toggleSubmitElement(i);break;case"displayExpr":this.callBase(e),this._initTemplates(),this._invalidate();break;case"tagTemplate":this._initTagTemplate(),this._invalidate();break;case"selectAllText":this._setListOption("selectAllText",this.option("selectAllText"));break;case"readOnly":case"disabled":this.callBase(e),!i&&this._refreshEvents();break;case"value":this._valuesToUpdate=i,this.callBase(e),this._valuesToUpdate=void 0,this._setListDataSourceFilter();break;case"maxDisplayedTags":case"showMultiTagOnly":this._renderTags();break;case"selectAllMode":this._setListOption(t,i);break;case"selectedItem":case"maxFilterQueryLength":break;case"selectedItems":this._selectionChangedAction(this._getSelectedItemsDifference(i,n));break;case"multiline":this.$element().toggleClass(B,!i),this._renderSingleLineScroll();break;default:this.callBase(e)}},_getActualSearchValue(){return this.callBase()||this._searchValue()},_popupHidingHandler(){this.callBase(),this._clearFilter()}});(0,l.default)("dxTagBox",V);t.default=V},36234:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(i(92774)),o=f(i(86548)),a=f(i(89797)),s=i(98834),r=f(i(92848)),l=f(i(64553)),d=i(17781),u=i(52576),c=i(57653),h=i(11528),p=i(3104),g=f(i(20780)),_=i(81569);function f(e){return e&&e.__esModule?e:{default:e}}const m=g.default.inherit({_getDefaultOptions(){return(0,u.extend)(this.callBase(),{spellcheck:!0,minHeight:void 0,maxHeight:void 0,autoResizeEnabled:!1})},_initMarkup(){this.$element().addClass("dx-textarea"),this.callBase(),this.setAria("multiline","true")},_renderContentImpl(){this._updateInputHeight(),this.callBase()},_renderInput(){this.callBase(),this._renderScrollHandler()},_createInput(){const e=(0,l.default)("<textarea>");return this._applyInputAttributes(e,this.option("inputAttr")),this._updateInputAutoResizeAppearance(e),e},_setInputMinHeight:d.noop,_renderScrollHandler(){this._eventY=0;const e=this._input(),t=(0,_.prepareScrollData)(e,!0);n.default.on(e,(0,s.addNamespace)(o.default.init,this.NAME),t,d.noop),n.default.on(e,(0,s.addNamespace)(a.default.down,this.NAME),this._pointerDownHandler.bind(this)),n.default.on(e,(0,s.addNamespace)(a.default.move,this.NAME),this._pointerMoveHandler.bind(this))},_pointerDownHandler(e){this._eventY=(0,s.eventData)(e).y},_pointerMoveHandler(e){const t=(0,s.eventData)(e).y,i=this._eventY-t;(0,_.allowScroll)(this._input(),i)&&(e.isScrollingEvent=!0,e.stopPropagation()),this._eventY=t},_renderDimensions(){const e=this.$element(),t=e.get(0),i=this._getOptionValue("width",t),n=this._getOptionValue("height",t),o=this.option("minHeight"),a=this.option("maxHeight");e.css({minHeight:void 0!==o?o:"",maxHeight:void 0!==a?a:"",width:i,height:n})},_resetDimensions(){this.$element().css({height:"",minHeight:"",maxHeight:""})},_renderEvents(){this.option("autoResizeEnabled")&&n.default.on(this._input(),(0,s.addNamespace)("input paste",this.NAME),this._updateInputHeight.bind(this)),this.callBase()},_refreshEvents(){n.default.off(this._input(),(0,s.addNamespace)("input paste",this.NAME)),this.callBase()},_getHeightDifference(e){return(0,c.getVerticalOffsets)(this._$element.get(0),!1)+(0,c.getVerticalOffsets)(this._$textEditorContainer.get(0),!1)+(0,c.getVerticalOffsets)(this._$textEditorInputContainer.get(0),!0)+(0,c.getElementBoxParams)("height",(0,p.getWindow)().getComputedStyle(e.get(0))).margin},_updateInputHeight(){if(!(0,p.hasWindow)())return;const e=this._input(),t=this.option("height"),i=void 0===t&&this.option("autoResizeEnabled");if(!(i||void 0===t&&this.option("minHeight")))return void e.css("height","");this._resetDimensions(),this._$element.css("height",(0,c.getOuterHeight)(this._$element)),e.css("height",0);const n=this._getHeightDifference(e);this._renderDimensions();const o=this._getBoundaryHeight("minHeight"),a=this._getBoundaryHeight("maxHeight");let s=e[0].scrollHeight;if(void 0!==o&&(s=Math.max(s,o-n)),void 0!==a){const t=a-n,i=s>t;s=Math.min(s,t),this._updateInputAutoResizeAppearance(e,!i)}e.css("height",s),i&&this._$element.css("height","auto")},_getBoundaryHeight(e){const t=this.option(e);if((0,h.isDefined)(t))return"number"==typeof t?t:(0,c.parseHeight)(t,this.$element().get(0).parentElement,this._$element.get(0))},_renderInputType:d.noop,_visibilityChanged(e){e&&this._updateInputHeight()},_updateInputAutoResizeAppearance(e,t){if(e){const i=(0,d.ensureDefined)(t,this.option("autoResizeEnabled"));e.toggleClass("dx-texteditor-input-auto-resize",i)}},_dimensionChanged(){this.option("visible")&&this._updateInputHeight()},_optionChanged(e){switch(e.name){case"autoResizeEnabled":this._updateInputAutoResizeAppearance(this._input(),e.value),this._refreshEvents(),this._updateInputHeight();break;case"value":case"height":this.callBase(e),this._updateInputHeight();break;case"minHeight":case"maxHeight":this._renderDimensions(),this._updateInputHeight();break;case"visible":this.callBase(e),e.value&&this._updateInputHeight();break;default:this.callBase(e)}}});(0,r.default)("dxTextArea",m);t.default=m},9635:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(i(92848)),o=f(i(65951)),a=i(61404),s=f(i(64553)),r=i(17781),l=i(52576),d=i(21274),u=i(57653),c=i(11528),h=i(3104),p=f(i(7607)),g=f(i(91374)),_=f(i(85991));function f(e){return e&&e.__esModule?e:{default:e}}const m="dx-tile",v=`.${m}`,C={horizontal:{itemMainRatio:"widthRatio",itemCrossRatio:"heightRatio",baseItemMainDimension:"baseItemWidth",baseItemCrossDimension:"baseItemHeight",mainDimension:"width",crossDimension:"height",mainPosition:"left",crossPosition:"top"},vertical:{itemMainRatio:"heightRatio",itemCrossRatio:"widthRatio",baseItemMainDimension:"baseItemHeight",baseItemCrossDimension:"baseItemWidth",mainDimension:"height",crossDimension:"width",mainPosition:"top",crossPosition:"left"}},y=p.default.inherit({_activeStateUnit:v,_getDefaultOptions(){return(0,l.extend)(this.callBase(),{items:null,direction:"horizontal",hoverStateEnabled:!0,showScrollbar:"never",height:500,baseItemWidth:100,baseItemHeight:100,itemMargin:20,activeStateEnabled:!0,indicateLoading:!0})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===o.default.real().deviceType&&!o.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>_.default.nativeScrolling,options:{showScrollbar:"onScroll"}}])},_itemClass:()=>m,_itemDataKey:()=>"dxTileData",_itemContainer(){return this._$container},_init(){this.callBase(),this.$element().addClass("dx-tileview"),this._initScrollView()},_dataSourceLoadingChangedHandler(e){const t=this._scrollView;t&&t.startLoading&&(e&&this.option("indicateLoading")?t.startLoading():t.finishLoading())},_hideLoadingIfLoadIndicationOff(){this.option("indicateLoading")||this._dataSourceLoadingChangedHandler(!1)},_initScrollView(){const{width:e,height:t,direction:i,showScrollbar:n}=this.option();this._scrollView=this._createComponent(this.$element(),g.default,{direction:i,width:e,height:t,scrollByContent:!0,useKeyboard:!1,showScrollbar:n}),this._$container=(0,s.default)(this._scrollView.content()),this._$container.addClass("dx-tileview-wrapper"),this._scrollView.option("onUpdated",this._renderGeometry.bind(this))},_initMarkup(){this.callBase(),(0,r.deferRender)((()=>{this._cellsPerDimension=1,this._renderGeometry(),this._updateScrollView(),this._fireContentReadyAction()}))},_updateScrollView(){this._scrollView.option("direction",this.option("direction")),this._scrollView.update(),this._indicateLoadingIfAlreadyStarted()},_indicateLoadingIfAlreadyStarted(){this._isDataSourceLoading()&&this._dataSourceLoadingChangedHandler(!0)},_renderGeometry(){this._config=C[this.option("direction")];const e=this.option("items")||[],t=this._config,i=this.option("itemMargin"),n=Math.max.apply(Math,(0,d.map)(e||[],(e=>Math.round(e[t.itemCrossRatio]||1))));let o;o=h.hasWindow?("width"===t.crossDimension?u.getWidth:u.getHeight)(this.$element()):parseInt(this.$element().get(0).style[t.crossDimension]),this._cellsPerDimension=Math.floor(o/(this.option(t.baseItemCrossDimension)+i)),this._cellsPerDimension=Math.max(this._cellsPerDimension,n),this._cells=[],this._cells.push(new Array(this._cellsPerDimension)),this._arrangeItems(e),this._renderContentSize(t,i)},_renderContentSize(e,t){let{mainDimension:i,baseItemMainDimension:n}=e;if((0,h.hasWindow)()){const e=this._cells.length*this.option(n)+(this._cells.length+1)*t,o=("width"===i?u.getWidth:u.getHeight)(this.$element());("width"===i?u.setWidth:u.setHeight)(this._$container,Math.max(e,o))}},_arrangeItems(e){const t=this._config,{itemMainRatio:i}=t,{itemCrossRatio:n}=t,{mainPosition:o}=t;this._itemsPositions=[],(0,d.each)(e,((e,a)=>{const s={};s[i]=a[i]||1,s[n]=a[n]||1,s.index=e,s[i]=s[i]<=0?0:Math.round(s[t.itemMainRatio]),s[n]=s[n]<=0?0:Math.round(s[t.itemCrossRatio]);const r=this._getItemPosition(s);-1===r[o]&&(r[o]=this._cells.push(new Array(this._cellsPerDimension))-1),this._occupyCells(s,r),this._arrangeItem(s,r),this._itemsPositions.push(r)}))},_refreshActiveDescendant:r.noop,_getItemPosition(e){const t=this._config,{mainPosition:i}=t,{crossPosition:n}=t,o={};o[i]=-1,o[n]=0;for(let t=0;t<this._cells.length;t++){for(let a=0;a<this._cellsPerDimension;a++)if(this._itemFit(t,a,e)){o[i]=t,o[n]=a;break}if(o[i]>-1)break}return o},_itemFit(e,t,i){let n=!0;const o=this._config,a=i[o.itemMainRatio],s=i[o.itemCrossRatio];if(t+s>this._cellsPerDimension)return!1;for(let i=e;i<e+a;i++)for(let e=t;e<t+s;e++)if(this._cells.length-1<i)this._cells.push(new Array(this._cellsPerDimension));else if(void 0!==this._cells[i][e]){n=!1;break}return n},_occupyCells(e,t){const i=this._config,n=t[i.mainPosition],o=t[i.crossPosition],a=e[i.itemMainRatio],s=e[i.itemCrossRatio];for(let t=n;t<n+a;t++)for(let i=o;i<o+s;i++)this._cells[t][i]=e.index},_arrangeItem(e,t){const i=this._config,n=t[i.mainPosition],o=t[i.crossPosition],a=e[i.itemMainRatio],s=e[i.itemCrossRatio],r=this.option(i.baseItemCrossDimension),l=this.option(i.baseItemMainDimension),d=this.option("itemMargin"),c={display:a<=0||s<=0?"none":""},h=a*l+(a-1)*d,p=s*r+(s-1)*d;if(c[i.mainDimension]=h<0?0:h,c[i.crossDimension]=p<0?0:p,c[i.mainPosition]=n*l+(n+1)*d,c[i.crossPosition]=o*r+(o+1)*d,this.option("rtlEnabled")){const i=(0,u.getWidth)(this._$container),n=this.option("baseItemWidth"),o=t.left,a=o*n,s=(n+d)*e.widthRatio,r=o*d;c.left=i-(a+s+r)}this._itemElements().eq(e.index).css(c)},_moveFocus(e){const t=this.option("rtlEnabled")?"right":"left",i=this.option("rtlEnabled")?"left":"right",n="horizontal"===this.option("direction"),o=this._cells,r=(0,s.default)(this.option("focusedElement")).index();let l=this._itemsPositions[r].left,d=this._itemsPositions[r].top;const u=(n?o:o[0]).length,h=(n?o[0]:o).length,p=function(e,t){return n?o[e][t]:o[t][e]};switch(e){case"pageup":case"up":for(;d>0&&r===p(l,d);)d--;d<0&&(d=0);break;case"pagedown":case"down":for(;d<h&&r===p(l,d);)d++;d===h&&(d=h-1);break;case i:for(;l<u&&r===p(l,d);)l++;l===u&&(l=u-1);break;case t:for(;l>=0&&r===p(l,d);)l--;l<0&&(l=0);break;default:return void this.callBase.apply(this,arguments)}const g=p(l,d);if(!(0,c.isDefined)(g))return;const _=this._itemElements().eq(g);this.option("focusedElement",(0,a.getPublicElement)(_)),this._scrollToItem(_)},_scrollToItem(e){if(!e.length)return;const t=this._config,i="width"===t.mainDimension?u.getOuterWidth:u.getOuterHeight,n=this.option("itemMargin"),o=e.position()[t.mainPosition],a=i(e),s=o+a,r=this.scrollPosition(),l=i(this.$element());r<=o&&s<=r+l||(r>o?this._scrollView.scrollTo(o-n):this._scrollView.scrollTo(o+a-l+n))},_optionChanged(e){switch(e.name){case"items":this.callBase(e),this._renderGeometry(),this._updateScrollView();break;case"showScrollbar":this._initScrollView();break;case"disabled":this._scrollView.option("disabled",e.value),this.callBase(e);break;case"baseItemWidth":case"baseItemHeight":case"itemMargin":this._renderGeometry();break;case"width":case"height":this.callBase(e),this._renderGeometry(),this._scrollView.option(e.name,e.value),this._updateScrollView();break;case"direction":this._renderGeometry(),this._updateScrollView();break;case"indicateLoading":this._hideLoadingIfLoadIndicationOff();break;default:this.callBase(e)}},scrollPosition(){return this._scrollView.scrollOffset()[this._config.mainPosition]}});(0,n.default)("dxTileView",y);t.default=y},3504:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(92848)),o=d(i(19427)),a=d(i(64553)),s=i(52576),r=i(11528),l=d(i(98894));function d(e){return e&&e.__esModule?e:{default:e}}const u=l.default.inherit({_getDefaultOptions(){return(0,s.extend)(this.callBase(),{toolbarItems:[],showCloseButton:!1,enableBodyScroll:!0,showTitle:!1,title:null,titleTemplate:null,onTitleRendered:null,bottomTemplate:null,preventScrollEvents:!1,propagateOutsideClick:!0})},_render(){this.$element().addClass("dx-tooltip"),this.$wrapper().addClass("dx-tooltip-wrapper"),this.callBase()},_renderContent(){this.callBase(),this._toggleAriaAttributes()},_toggleAriaDescription(e){const t=(0,a.default)(this.option("target")),i=e?this._contentId:void 0;(0,r.isWindow)(t.get(0))||this.setAria("describedby",i,t)},_toggleAriaAttributes(){this._contentId=`dx-${new o.default}`,this.$overlayContent().attr({id:this._contentId}),this._toggleAriaDescription(!0)}});(0,n.default)("dxTooltip",u);t.default=u},37062:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=d(i(92848)),a=d(i(64553)),s=i(52576),r=i(3104),l=d(i(78694));function d(e){return e&&e.__esModule?e:{default:e}}const u=l.default.inherit({_getDefaultOptions(){return(0,s.extend)(this.callBase(),{min:0,max:100,value:0})},_initMarkup(){this.$element().addClass("dx-trackbar"),this._renderWrapper(),this._renderContainer(),this._renderRange(),this._renderValue(),this._setRangeStyles(),this.callBase()},_render(){this.callBase(),this._setRangeStyles(this._rangeStylesConfig())},_renderWrapper(){this._$wrapper=(0,a.default)("<div>").addClass("dx-trackbar-wrapper").appendTo(this.$element())},_renderContainer(){this._$bar=(0,a.default)("<div>").addClass("dx-trackbar-container").appendTo(this._$wrapper)},_renderRange(){this._$range=(0,a.default)("<div>").addClass("dx-trackbar-range").appendTo(this._$bar)},_renderValue(){const e=this.option("value"),t=this.option("min"),i=this.option("max");if(t>i)return;if(e<t)return this.option("value",t),void(this._currentRatio=0);if(e>i)return this.option("value",i),void(this._currentRatio=1);const n=t===i?0:(e-t)/(i-t);!this._needPreventAnimation&&this._setRangeStyles({width:100*n+"%"}),this.setAria({valuemin:this.option("min"),valuemax:i,valuenow:e}),this._currentRatio=n},_rangeStylesConfig(){return{width:100*this._currentRatio+"%"}},_setRangeStyles(e){n.fx.stop(this._$range),e?!this._needPreventAnimation&&(0,r.hasWindow)()&&n.fx.animate(this._$range,{type:"custom",duration:100,to:e}):this._$range.css({width:0})},_optionChanged(e){switch(e.name){case"value":this._renderValue(),this.callBase(e);break;case"max":case"min":this._renderValue();break;default:this.callBase(e)}},_dispose(){n.fx.stop(this._$range),this.callBase()}});(0,o.default)("dxTrackBar",u);t.default=u},79697:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(4671)),o=p(i(52771)),a=p(i(55620)),s=p(i(87129)),r=i(2607),l=i(17781),d=i(87739),u=i(52576),c=i(21274),h=i(11528);function p(e){return e&&e.__esModule?e:{default:e}}const g=/^[\d\w.+_-]+@[\d\w._-]+\.[\w]+$/i,_="valid",f="invalid",m="pending";class v{constructor(){this.NAME="base"}defaultMessage(e){return n.default.getFormatter(`validation-${this.NAME}`)(e)}defaultFormattedMessage(e){return n.default.getFormatter(`validation-${this.NAME}-formatted`)(e)}_isValueEmpty(e){return!y.required.validate(e,{})}validate(e,t){const i=Array.isArray(e)?e:[e];let n=!0;return i.length?i.every((e=>(n=this._validate(e,t),n))):n=this._validate(null,t),n}}class C extends v{constructor(){super(),this.NAME="custom"}validate(e,t){if(t.ignoreEmptyValue&&this._isValueEmpty(e))return!0;const{validator:i}=t,n=i&&(0,h.isFunction)(i.option)&&i.option("dataGetter"),o=(0,h.isFunction)(n)&&n(),a={value:e,validator:i,rule:t};return o&&(0,u.extend)(a,o),t.validationCallback(a)}}const y={required:new class extends v{constructor(){super(),this.NAME="required"}_validate(e,t){return!!(0,h.isDefined)(e)&&(!1!==e&&(e=String(e),!t.trim&&(0,h.isDefined)(t.trim)||(e=e.trim()),""!==e))}},numeric:new class extends v{constructor(){super(),this.NAME="numeric"}_validate(e,t){return!(!1===t.ignoreEmptyValue||!this._isValueEmpty(e))||(t.useCultureSettings&&(0,h.isString)(e)?!isNaN(o.default.parse(e)):(0,h.isNumeric)(e))}},range:new class extends v{constructor(){super(),this.NAME="range"}_validate(e,t){if(!1!==t.ignoreEmptyValue&&this._isValueEmpty(e))return!0;const i=y.numeric.validate(e,t),n=(0,h.isDefined)(e)&&""!==e,o=i?parseFloat(e):n&&e.valueOf(),{min:a}=t,{max:r}=t;if(!i&&!(0,h.isDate)(e)&&!n)return!1;if((0,h.isDefined)(a))return(0,h.isDefined)(r)?o>=a&&o<=r:o>=a;if((0,h.isDefined)(r))return o<=r;throw s.default.Error("E0101")}},stringLength:new class extends v{constructor(){super(),this.NAME="stringLength"}_validate(e,t){return e=String(e??""),!t.trim&&(0,h.isDefined)(t.trim)||(e=e.trim()),!(!t.ignoreEmptyValue||!this._isValueEmpty(e))||y.range.validate(e.length,(0,u.extend)({},t))}},custom:new C,async:new class extends C{constructor(){super(),this.NAME="async"}validate(e,t){if((0,h.isDefined)(t.reevaluate)||(0,u.extend)(t,{reevaluate:!0}),t.ignoreEmptyValue&&this._isValueEmpty(e))return!0;const{validator:i}=t,n=i&&(0,h.isFunction)(i.option)&&i.option("dataGetter"),o=(0,h.isFunction)(n)&&n(),a={value:e,validator:i,rule:t};o&&(0,u.extend)(a,o);const r=t.validationCallback(a);if(!(0,h.isPromise)(r))throw s.default.Error("E0103");return this._getWrappedPromise((0,d.fromPromise)(r).promise())}_getWrappedPromise(e){const t=(0,d.Deferred)();return e.then((e=>{t.resolve(e)}),(e=>{const i={isValid:!1};(0,h.isDefined)(e)&&((0,h.isString)(e)?i.message=e:(0,h.isObject)(e)&&(0,h.isDefined)(e.message)&&(0,h.isString)(e.message)&&(i.message=e.message)),t.resolve(i)})),t.promise()}},compare:new class extends v{constructor(){super(),this.NAME="compare"}_validate(e,t){if(!t.comparisonTarget)throw s.default.Error("E0102");if(t.ignoreEmptyValue&&this._isValueEmpty(e))return!0;(0,u.extend)(t,{reevaluate:!0});const i=t.comparisonTarget();switch(t.comparisonType||"=="){case"==":return e==i;case"!=":return e!=i;case"===":return e===i;case"!==":return e!==i;case">":return e>i;case">=":return e>=i;case"<":return e<i;case"<=":return e<=i}}},pattern:new class extends v{constructor(){super(),this.NAME="pattern"}_validate(e,t){if(!1!==t.ignoreEmptyValue&&this._isValueEmpty(e))return!0;let{pattern:i}=t;return(0,h.isString)(i)&&(i=new RegExp(i)),i.test(e)}},email:new class extends v{constructor(){super(),this.NAME="email"}_validate(e,t){return!(!1===t.ignoreEmptyValue||!this._isValueEmpty(e))||y.pattern.validate(e,(0,u.extend)({},t,{pattern:g}))}}},b=a.default.inherit({ctor(e,t){this.group=e,this.validators=[],this._isRemovable=t,this._pendingValidators=[],this._onValidatorStatusChanged=this._onValidatorStatusChanged.bind(this),this._resetValidationInfo(),this._eventsStrategy=new r.EventsStrategy(this)},validate(){const e={isValid:!0,brokenRules:[],validators:[],status:_,complete:null};return this._unsubscribeFromAllChangeEvents(),this._pendingValidators=[],this._resetValidationInfo(),(0,c.each)(this.validators,((t,i)=>{const n=i.validate();e.isValid=e.isValid&&n.isValid,n.brokenRules&&(e.brokenRules=e.brokenRules.concat(n.brokenRules)),e.validators.push(i),n.status===m&&this._addPendingValidator(i),this._subscribeToChangeEvents(i)})),this._pendingValidators.length?e.status=m:(e.status=e.isValid?_:f,this._unsubscribeFromAllChangeEvents(),this._raiseValidatedEvent(e)),this._updateValidationInfo(e),(0,u.extend)({},this._validationInfo.result)},_subscribeToChangeEvents(e){e.on("validating",this._onValidatorStatusChanged),e.on("validated",this._onValidatorStatusChanged)},_unsubscribeFromChangeEvents(e){e.off("validating",this._onValidatorStatusChanged),e.off("validated",this._onValidatorStatusChanged)},_unsubscribeFromAllChangeEvents(){(0,c.each)(this.validators,((e,t)=>{this._unsubscribeFromChangeEvents(t)}))},_updateValidationInfo(e){this._validationInfo.result=e,e.status===m&&(this._validationInfo.deferred||(this._validationInfo.deferred=(0,d.Deferred)(),this._validationInfo.result.complete=this._validationInfo.deferred.promise()))},_addPendingValidator(e){(0,l.grep)(this._pendingValidators,(t=>t===e))[0]||this._pendingValidators.push(e)},_removePendingValidator(e){const t=this._pendingValidators.indexOf(e);t>=0&&this._pendingValidators.splice(t,1)},_orderBrokenRules(e){let t=[];return(0,c.each)(this.validators,((i,n)=>{const o=(0,l.grep)(e,(e=>e.validator===n));o.length&&(t=t.concat(o))})),t},_updateBrokenRules(e){if(!this._validationInfo.result)return;let{brokenRules:t}=this._validationInfo.result;const i=(0,l.grep)(t,(t=>t.validator!==e.validator));e.brokenRules&&(t=i.concat(e.brokenRules)),this._validationInfo.result.brokenRules=this._orderBrokenRules(t)},_onValidatorStatusChanged(e){e.status!==m?this._resolveIfComplete(e):this._addPendingValidator(e.validator)},_resolveIfComplete(e){if(this._removePendingValidator(e.validator),this._updateBrokenRules(e),!this._pendingValidators.length){if(this._unsubscribeFromAllChangeEvents(),!this._validationInfo.result)return;this._validationInfo.result.status=0===this._validationInfo.result.brokenRules.length?_:f,this._validationInfo.result.isValid=this._validationInfo.result.status===_;const e=(0,u.extend)({},this._validationInfo.result,{complete:null}),{deferred:t}=this._validationInfo;this._validationInfo.deferred=null,this._raiseValidatedEvent(e),t&&setTimeout((()=>{t.resolve(e)}))}},_raiseValidatedEvent(e){this._eventsStrategy.fireEvent("validated",[e])},_resetValidationInfo(){this._validationInfo={result:null,deferred:null}},_synchronizeValidationInfo(){this._validationInfo.result&&(this._validationInfo.result.validators=this.validators)},removeRegisteredValidator(e){const t=this.validators.indexOf(e);t>-1&&(this.validators.splice(t,1),this._synchronizeValidationInfo(),this._resolveIfComplete({validator:e}))},registerValidator(e){this.validators.includes(e)||(this.validators.push(e),this._synchronizeValidationInfo())},reset(){(0,c.each)(this.validators,((e,t)=>{t.reset()})),this._pendingValidators=[],this._resetValidationInfo()},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}}),x={groups:[],getGroupConfig(e){const t=(0,l.grep)(this.groups,(t=>t.group===e));if(t.length)return t[0]},findGroup(e,t){var i;const n=(null===(i=e.data())||void 0===i||null===(i=i.dxComponents)||void 0===i?void 0:i.includes("dxValidationGroup"))&&e.dxValidationGroup("instance");if(n)return n;const o=e.parents(".dx-validationgroup").first();return o.length?o.dxValidationGroup("instance"):t},initGroups(){this.groups=[],this.addGroup(void 0,!1)},addGroup(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.getGroupConfig(e);return i||(i=new b(e,t),this.groups.push(i)),i},removeGroup(e){const t=this.getGroupConfig(e),i=this.groups.indexOf(t);return i>-1&&this.groups.splice(i,1),t},_setDefaultMessage(e){const{rule:t,validator:i,name:n}=e;(0,h.isDefined)(t.message)||(i.defaultFormattedMessage&&(0,h.isDefined)(n)?t.message=i.defaultFormattedMessage(n):t.message=i.defaultMessage())},_addBrokenRule(e){const{result:t,rule:i}=e;t.brokenRule||(t.brokenRule=i),t.brokenRules||(t.brokenRules=[]),t.brokenRules.push(i)},validate(e,t,i){var n;let o={name:i,value:e,brokenRule:null,brokenRules:null,isValid:!0,validationRules:t,pendingRules:null,status:_,complete:null};const a=null==t||null===(n=t[0])||void 0===n?void 0:n.validator,r=[];return(0,c.each)(t||[],((t,n)=>{const a=y[n.type];let l;if(!a)throw s.default.Error("E0100");return(0,h.isDefined)(n.isValid)&&n.value===e&&!n.reevaluate?!!n.isValid||(o.isValid=!1,this._addBrokenRule({result:o,rule:n}),!1):(n.value=e,"async"===n.type?(r.push({rule:n,ruleValidator:a}),!0):(l=a.validate(e,n),n.isValid=l,l||(o.isValid=!1,this._setDefaultMessage({rule:n,validator:a,name:i}),this._addBrokenRule({result:o,rule:n})),!!n.isValid&&void 0))})),o.isValid&&!o.brokenRules&&r.length&&(o=this._validateAsyncRules({value:e,items:r,result:o,name:i})),this._synchronizeGroupValidationInfo(a,o),o.status=o.pendingRules?m:o.isValid?_:f,o},_synchronizeGroupValidationInfo(e,t){if(!e)return;const i=x.getGroupConfig(e._validationGroup);i._updateBrokenRules.call(i,{validator:e,brokenRules:t.brokenRules??[]})},_validateAsyncRules(e){let{result:t,value:i,items:n,name:o}=e;const a=[];return(0,c.each)(n,((e,n)=>{const s=n.ruleValidator.validate(i,n.rule);if((0,h.isPromise)(s)){t.pendingRules||(t.pendingRules=[]),t.pendingRules.push(n.rule);const e=s.then((e=>{const t=this._getPatchedRuleResult(e);return this._updateRuleConfig({rule:n.rule,ruleResult:t,validator:n.ruleValidator,name:o}),t}));a.push(e)}else this._updateRuleConfig({rule:n.rule,ruleResult:this._getPatchedRuleResult(s),validator:n.ruleValidator,name:o})})),a.length&&(t.complete=Promise.all(a).then((e=>this._getAsyncRulesResult({result:t,values:e})))),t},_updateRuleConfig(e){let{rule:t,ruleResult:i,validator:n,name:o}=e;t.isValid=i.isValid,i.isValid||((0,h.isDefined)(i.message)&&(0,h.isString)(i.message)&&i.message.length?t.message=i.message:this._setDefaultMessage({rule:t,validator:n,name:o}))},_getPatchedRuleResult(e){let t;const i=!0;return(0,h.isObject)(e)?(t=(0,u.extend)({},e),(0,h.isDefined)(t.isValid)||(t.isValid=i)):t={isValid:(0,h.isBoolean)(e)?e:i},t},_getAsyncRulesResult(e){let{values:t,result:i}=e;return(0,c.each)(t,((e,t)=>{if(!1===t.isValid){i.isValid=t.isValid;const n=i.pendingRules[e];this._addBrokenRule({result:i,rule:n})}})),i.pendingRules=null,i.complete=null,i.status=i.isValid?_:f,i},registerValidatorInGroup(e,t){const i=x.addGroup(e);i.registerValidator.call(i,t)},removeRegisteredValidator(e,t){const i=x.getGroupConfig(e);if(i){i.removeRegisteredValidator.call(i,t);const n=i.validators,o=i._isRemovable;0===n.length&&o&&this.removeGroup(e)}},initValidationOptions(e){const t={};if(e){["isValid","validationStatus","validationError","validationErrors"].forEach((i=>{i in e&&(0,u.extend)(t,this.synchronizeValidationOptions({name:i,value:e[i]},e))}))}return t},synchronizeValidationOptions(e,t){let{name:i,value:n}=e;switch(i){case"validationStatus":{const e=n===_||n===m;return t.isValid!==e?{isValid:e}:{}}case"isValid":{const{validationStatus:e}=t;let i=e;return n&&e===f?i=_:n||e===f||(i=f),i!==e?{validationStatus:i}:{}}case"validationErrors":{const e=n&&n.length?n[0]:null;return t.validationError!==e?{validationError:e}:{}}case"validationError":{const{validationErrors:e}=t;if(!n&&e)return{validationErrors:null};if(n&&!e)return{validationErrors:[n]};if(n&&e&&n!==e[0])return e[0]=n,{validationErrors:e.slice()}}}return{}},validateGroup(e){const t=x.getGroupConfig(e);if(!t)throw s.default.Error("E0110");return t.validate()},resetGroup(e){const t=x.getGroupConfig(e);if(!t)throw s.default.Error("E0110");return t.reset()}};x.initGroups();t.default=x},89172:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(92848)),o=d(i(97832)),a=d(i(64553)),s=d(i(79697)),r=d(i(31139)),l=d(i(71449));function d(e){return e&&e.__esModule?e:{default:e}}const u="dx-validationgroup";class c extends o.default{_getDefaultOptions(){return super._getDefaultOptions()}_init(){super._init(),s.default.addGroup(this,!1)}_initMarkup(){const e=this.$element();e.addClass(u),e.find(".dx-validator").each(((e,t)=>{l.default.getInstance((0,a.default)(t))._initGroupRegistration()})),e.find(".dx-validationsummary").each(((e,t)=>{r.default.getInstance((0,a.default)(t)).refreshValidationGroup()})),super._initMarkup()}validate(){return s.default.validateGroup(this)}reset(){return s.default.resetGroup(this)}_dispose(){s.default.removeGroup(this),this.$element().removeClass(u),super._dispose()}_useTemplates(){return!1}}(0,n.default)("dxValidationGroup",c);t.default=c},22864:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(92848)),o=u(i(64553)),a=i(52576),s=i(41639),r=i(57653),l=i(54497),d=u(i(89132));function u(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},c.apply(null,arguments)}const h="dx-invalid-message",p=d.default.inherit({_getDefaultOptions(){return(0,a.extend)(this.callBase(),{integrationOptions:{},templatesRenderAsynchronously:!1,shading:!1,width:"auto",height:"auto",hideOnOutsideClick:!1,animation:null,visible:!0,propagateOutsideClick:!0,_checkParentVisibility:!1,rtlEnabled:!1,contentTemplate:this._renderInnerHtml,maxWidth:"100%",container:this.$element(),target:void 0,mode:"auto",validationErrors:void 0,preventScrollEvents:!1,positionSide:"top",boundary:void 0,offset:{h:0,v:0},contentId:void 0})},_init(){this.callBase(),this.updateMaxWidth(),this._updatePosition()},_initMarkup(){this.callBase(),this._ensureMessageNotEmpty(),this._updatePositionByTarget(),this._toggleModeClass(),this._updateContentId()},_updatePositionByTarget(){const{target:e}=this.option();this.option("position.of",e)},_ensureMessageNotEmpty(){this._textMarkup=this._getTextMarkup();const e=this.option("visible")&&this._textMarkup;this._toggleVisibilityClasses(e)},_toggleVisibilityClasses(e){e?(this.$element().addClass(h),this.$wrapper().addClass(h)):(this.$element().removeClass(h),this.$wrapper().removeClass(h))},_updateContentId(){const{container:e,contentId:t}=this.option(),i=t??(0,o.default)(e).attr("aria-describedby");this.$content().addClass("dx-invalid-message-content").attr("id",i)},_renderInnerHtml(e){const t=e&&(0,o.default)(e);null==t||t.html(this._textMarkup)},_getTextMarkup(){const e=this.option("validationErrors")??[];let t="";return e.forEach((e=>{t+=(t?"<br />":"")+(0,l.encodeHtml)((null==e?void 0:e.message)??"")})),t},_toggleModeClass(){const e=this.option("mode");this.$wrapper().toggleClass("dx-invalid-message-auto","auto"===e).toggleClass("dx-invalid-message-always","always"===e)},updateMaxWidth(){const e=this.option("target"),t=(0,r.getOuterWidth)(e);let i="100%";t&&(i=Math.max(t,100)),this.option({maxWidth:i})},_getPositionsArray(e,t){switch(e){case"top":return[`${t} bottom`,`${t} top`];case"left":return["right","left"];case"right":return["left","right"];default:return[`${t} top`,`${t} bottom`]}},_updatePosition(){const{positionSide:e,rtlEnabled:t,offset:i,boundary:n}=this.option(),o=(0,s.getDefaultAlignment)(t),a=this._getPositionsArray(e,o),r=c({},i);this.$element().addClass(`dx-invalid-message-${e}`),t&&"left"!==e&&"right"!==e&&(r.h=-r.h),"top"===e&&(r.v=-r.v),"left"===e&&(r.h=-r.h),this.option("position",{offset:r,boundary:n,my:a[0],at:a[1],collision:"none flip"})},_optionChanged(e){const{name:t,value:i,previousValue:n}=e;switch(t){case"target":this._updatePositionByTarget(),this.updateMaxWidth(),this.callBase(e);break;case"boundary":this.option("position.boundary",i);break;case"mode":this._toggleModeClass(i);break;case"rtlEnabled":case"offset":case"positionSide":this.$element().removeClass(`dx-invalid-message-${n}`),this._updatePosition();break;case"container":this._updateContentId(),this.callBase(e);break;case"contentId":this._updateContentId();break;case"validationErrors":this._ensureMessageNotEmpty(),this._renderInnerHtml(this.$content());break;default:this.callBase(e)}}});(0,n.default)("dxValidationMessage",p);t.default=p},31139:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(92774)),o=u(i(92848)),a=i(17781),s=i(52576),r=i(21274),l=u(i(7607)),d=u(i(79697));function u(e){return e&&e.__esModule?e:{default:e}}const c="dx-validationsummary",h=`${c}-item`,p=`${c}-item-data`,g=l.default.inherit({_getDefaultOptions(){return(0,s.extend)(this.callBase(),{focusStateEnabled:!1,noDataText:null})},_setOptionsByReference(){this.callBase(),(0,s.extend)(this._optionsByReference,{validationGroup:!0})},_init(){this.callBase(),this._initGroupRegistration()},_initGroupRegistration(){const e=this.$element(),t=this.option("validationGroup")||d.default.findGroup(e,this._modelByElement(e)),i=d.default.addGroup(t,!0);this._unsubscribeGroup(),this._groupWasInit=!0,this._validationGroup=t,this.groupSubscription=this._groupValidationHandler.bind(this),i.on("validated",this.groupSubscription)},_unsubscribeGroup(){const e=d.default.getGroupConfig(this._validationGroup);e&&e.off("validated",this.groupSubscription)},_getOrderedItems(e,t){let i=[];return(0,r.each)(e,((e,n)=>{const o=(0,a.grep)(t,(e=>{if(e.validator===n)return!0}));o.length&&(i=i.concat(o))})),i},_groupValidationHandler(e){const t=this._getOrderedItems(e.validators,(0,r.map)(e.brokenRules,(e=>({text:e.message,validator:e.validator,index:e.index}))));this.validators=e.validators,(0,r.each)(this.validators,((e,t)=>{if(t._validationSummary!==this){let e=this._itemValidationHandler.bind(this);const i=function(){t.off("validated",e),t._validationSummary=null,e=null};t.on("validated",e),t.on("disposing",i),t._validationSummary=this}})),this.option("items",t)},_itemValidationHandler(e){let{isValid:t,validator:i,brokenRules:n}=e,o=this.option("items"),s=!1,l=0;for(;l<o.length;){const e=o[l];if(e.validator===i){const i=(0,a.grep)(n||[],(t=>t.index===e.index))[0];if(t||!i){o.splice(l,1),s=!0;continue}i.message!==e.text&&(e.text=i.message,s=!0)}l++}(0,r.each)(n,((e,t)=>{(0,a.grep)(o,(e=>e.validator===i&&e.index===t.index))[0]||(o.push({text:t.message,validator:i,index:t.index}),s=!0)})),s&&(o=this._getOrderedItems(this.validators,o),this.option("items",o))},_initMarkup(){this.$element().addClass(c),this.callBase()},_optionChanged(e){if("validationGroup"===e.name)this._initGroupRegistration();else this.callBase(e)},_itemClass:()=>h,_itemDataKey:()=>p,_postprocessRenderItem(e){n.default.on(e.itemElement,"click",(()=>{e.itemData.validator&&e.itemData.validator.focus&&e.itemData.validator.focus()}))},_dispose(){this.callBase(),this._unsubscribeGroup()},refreshValidationGroup(){this._initGroupRegistration()}});(0,o.default)("dxValidationSummary",g);t.default=g},71449:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=g(i(92848)),o=g(i(97832)),a=i(74663),s=g(i(19427)),r=g(i(84718)),l=i(87739),d=i(52576),u=i(21274),c=g(i(35185)),h=g(i(79697)),p=g(i(67618));function g(e){return e&&e.__esModule?e:{default:e}}const _="valid",f="pending",m=o.default.inherit({_initOptions(e){this.callBase.apply(this,arguments),this.option(h.default.initValidationOptions(e))},_getDefaultOptions(){return(0,d.extend)(this.callBase(),{validationRules:[]})},_init(){this.callBase(),this._initGroupRegistration(),this.focused=(0,r.default)(),this._initAdapter(),this._validationInfo={result:null,deferred:null,skipValidation:!1}},_initGroupRegistration(){const e=this._findGroup();this._groupWasInit||this.on("disposing",(e=>{h.default.removeRegisteredValidator(e.component._validationGroup,e.component)})),this._groupWasInit&&this._validationGroup===e||(h.default.removeRegisteredValidator(this._validationGroup,this),this._groupWasInit=!0,this._validationGroup=e,h.default.registerValidatorInGroup(e,this))},_setOptionsByReference(){this.callBase(),(0,d.extend)(this._optionsByReference,{validationGroup:!0})},_getEditor(){const e=this.$element()[0];return(0,a.data)(e,"dx-validation-target")},_initAdapter(){const e=this._getEditor();let t=this.option("adapter");if(!t){if(e)return t=new p.default(e,this),t.validationRequestsCallbacks.push((e=>{this._validationInfo.skipValidation||this.validate(e)})),void this.option("adapter",t);throw c.default.Error("E0120")}const i=t.validationRequestsCallbacks;i&&i.push((e=>{this.validate(e)}))},_toggleRTLDirection(e){var t;const i=(null===(t=this.option("adapter"))||void 0===t||null===(t=t.editor)||void 0===t?void 0:t.option("rtlEnabled"))??e;this.callBase(i)},_initMarkup(){this.$element().addClass("dx-validator"),this.callBase()},_render(){this.callBase(),this._toggleAccessibilityAttributes()},_toggleAccessibilityAttributes(){const e=this._getEditor();if(e){const t=(this.option("validationRules")||[]).some((e=>{let{type:t}=e;return"required"===t}))||null;e.isInitialized()&&e.setAria("required",t),e.option("_onMarkupRendered",(()=>{e.setAria("required",t)}))}},_visibilityChanged(e){e&&this._initGroupRegistration()},_optionChanged(e){switch(e.name){case"validationGroup":return void this._initGroupRegistration();case"validationRules":return this._resetValidationRules(),this._toggleAccessibilityAttributes(),void(void 0!==this.option("isValid")&&this.validate());case"adapter":this._initAdapter();break;case"isValid":case"validationStatus":this.option(h.default.synchronizeValidationOptions(e,this.option()));break;default:this.callBase(e)}},_getValidationRules(){return this._validationRules||(this._validationRules=(0,u.map)(this.option("validationRules"),((e,t)=>(0,d.extend)({},e,{validator:this,index:t})))),this._validationRules},_findGroup(){const e=this.$element();return this.option("validationGroup")||h.default.findGroup(e,this._modelByElement(e))},_resetValidationRules(){delete this._validationRules},validate(e){const t=this.option("adapter"),i=this.option("name"),n=t.bypass&&t.bypass(),o=e&&void 0!==e.value?e.value:t.getValue(),a=t.getCurrentValidationError&&t.getCurrentValidationError(),r=this._getValidationRules(),l=this._validationInfo&&this._validationInfo.result;if(l&&l.status===f&&l.value===o)return(0,d.extend)({},l);let u;return n?u={isValid:!0,status:_}:a&&a.editorSpecific?(a.validator=this,u={isValid:!1,status:"invalid",brokenRule:a,brokenRules:[a]}):u=h.default.validate(o,r,i),u.id=(new s.default).toString(),this._applyValidationResult(u,t),u.complete&&u.complete.then((e=>{e.id===this._validationInfo.result.id&&this._applyValidationResult(e,t)})),(0,d.extend)({},this._validationInfo.result)},reset(){const e=this.option("adapter"),t={id:null,isValid:!0,brokenRule:null,brokenRules:null,pendingRules:null,status:_,complete:null};this._validationInfo.skipValidation=!0,e.reset(),this._validationInfo.skipValidation=!1,this._resetValidationRules(),this._applyValidationResult(t,e)},_updateValidationResult(e){if(this._validationInfo.result&&this._validationInfo.result.id===e.id)for(const t in e)"id"!==t&&"complete"!==t&&(this._validationInfo.result[t]=e[t]);else{const t=this._validationInfo.deferred&&this._validationInfo.result.complete;this._validationInfo.result=(0,d.extend)({},e,{complete:t})}},_applyValidationResult(e,t){const i=this._createActionByOption("onValidated",{excludeValidators:["readOnly"]});if(e.validator=this,this._updateValidationResult(e),t.applyValidationResults&&t.applyValidationResults(this._validationInfo.result),this.option({validationStatus:this._validationInfo.result.status}),this._validationInfo.result.status===f)return this._validationInfo.deferred||(this._validationInfo.deferred=(0,l.Deferred)(),this._validationInfo.result.complete=this._validationInfo.deferred.promise()),void this._eventsStrategy.fireEvent("validating",[this._validationInfo.result]);this._validationInfo.result.status!==f&&(i(e),this._validationInfo.deferred&&(this._validationInfo.deferred.resolve(e),this._validationInfo.deferred=null))},focus(){const e=this.option("adapter");e&&e.focus&&e.focus()},_useTemplates:()=>!1});(0,n.default)("dxValidator",m);t.default=m},16028:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=x(i(92774)),o=x(i(89797)),a=i(98834),s=x(i(92848)),r=x(i(65951)),l=x(i(64553)),d=i(94487),u=i(17781),c=i(87739),h=i(52576),p=i(53124),g=i(21274),_=i(11528),f=x(i(35185)),m=x(i(11118)),v=x(i(42575)),C=x(i(53672)),y=x(i(76473)),b=x(i(66577));function x(e){return e&&e.__esModule?e:{default:e}}const w={azure:v.default,googleStatic:b.default,google:y.default,bing:C.default},S="dx-map-shield",D=m.default.inherit({_getDefaultOptions(){return(0,h.extend)(this.callBase(),{bounds:{northEast:null,southWest:null},center:{lat:0,lng:0},zoom:1,width:300,height:300,type:"roadmap",provider:"google",autoAdjust:!0,markers:[],markerIconSrc:null,onMarkerAdded:null,onMarkerRemoved:null,routes:[],onRouteAdded:null,onRouteRemoved:null,apiKey:{bing:"",google:"",googleStatic:""},providerConfig:{mapId:"",useAdvancedMarkers:!0},controls:!1,onReady:null,onUpdated:null,onClick:null})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===r.default.real().deviceType&&!r.default.isSimulator(),options:{focusStateEnabled:!0}}])},ctor(e,t){this.callBase(e,t),t&&"provider"in t&&"bing"===t.provider&&this._logDeprecatedBingProvider()},_logDeprecatedBingProvider(){this._logDeprecatedOptionWarning("provider: bing",{since:"24.2",message:"Use other map providers, such as Azure, Google, or GoogleStatic."})},_setDeprecatedOptions(){this.callBase(),(0,h.extend)(this._deprecatedOptions,{"providerConfig.useAdvancedMarkers":{since:"24.2",message:"Google deprecated the original map markers. Transition to advanced markers for future compatibility."}})},_renderFocusTarget:u.noop,_init(){this.callBase(),this.$element().addClass("dx-map"),this._lastAsyncAction=Promise.resolve(),this._checkOption("provider"),this._checkOption("markers"),this._checkOption("routes"),this._initContainer(),this._grabEvents(),this._rendered={}},_useTemplates:()=>!1,_checkOption(e){const t=this.option(e);if("markers"===e&&!Array.isArray(t))throw f.default.Error("E1022");if("routes"===e&&!Array.isArray(t))throw f.default.Error("E1023")},_initContainer(){this._$container=(0,l.default)("<div>").addClass("dx-map-container"),this.$element().append(this._$container)},_grabEvents(){const e=(0,a.addNamespace)(o.default.down,this.NAME);n.default.on(this.$element(),e,this._cancelEvent.bind(this))},_cancelEvent(e){this._provider&&this._provider.isEventsCanceled(e)&&!this.option("disabled")&&e.stopPropagation()},_saveRendered(e){const t=this.option(e);this._rendered[e]=t.slice()},_render(){this.callBase(),this._renderShield(),this._saveRendered("markers"),this._saveRendered("routes"),this._provider=new(w[this.option("provider")])(this,this._$container),this._queueAsyncAction("render",this._rendered.markers,this._rendered.routes)},_renderShield(){let e;this.option("disabled")?(e=(0,l.default)("<div>").addClass(S),this.$element().append(e)):(e=this.$element().find(`.${S}`),e.remove())},_clean(){this._cleanFocusState(),this._provider&&this._provider.clean(),this._provider=null,this._lastAsyncAction=Promise.resolve(),this.setOptionSilent("bounds",{northEast:null,southWest:null}),delete this._suppressAsyncAction},_optionChanged(e){const{name:t,value:i}=e,n=this._optionChangeBag;switch(this._optionChangeBag=null,t){case"disabled":this._renderShield(),this.callBase(e),this._queueAsyncAction("updateDisabled");break;case"width":case"height":this.callBase(e),this._dimensionChanged();break;case"provider":this._suppressAsyncAction=!0,this._invalidate(),"bing"===i&&this._logDeprecatedBingProvider();break;case"apiKey":f.default.log("W1001");break;case"bounds":this._queueAsyncAction("updateBounds");break;case"center":this._queueAsyncAction("updateCenter");break;case"zoom":this._queueAsyncAction("updateZoom");break;case"type":this._queueAsyncAction("updateMapType");break;case"controls":this._queueAsyncAction("updateControls",this._rendered.markers,this._rendered.routes);break;case"autoAdjust":this._queueAsyncAction("adjustViewport");break;case"markers":case"routes":{this._checkOption(t);const e=this._rendered[t];this._saveRendered(t),this._queueAsyncAction(`update${(0,p.titleize)(t)}`,n?n.removed:e,n?n.added:this._rendered[t]).then((e=>{n&&n.resolve(e)}));break}case"markerIconSrc":this._queueAsyncAction("updateMarkers",this._rendered.markers,this._rendered.markers);break;case"providerConfig":this._suppressAsyncAction=!0,this._invalidate();break;case"onReady":case"onUpdated":case"onMarkerAdded":case"onMarkerRemoved":case"onRouteAdded":case"onRouteRemoved":case"onClick":break;default:this.callBase.apply(this,arguments)}},_visibilityChanged(e){e&&this._dimensionChanged()},_dimensionChanged(){this._queueAsyncAction("updateDimensions")},_queueAsyncAction(e){const t=[].slice.call(arguments).slice(1),i=this._suppressAsyncAction;return this._lastAsyncAction=this._lastAsyncAction.then((()=>!this._provider||i?Promise.resolve():this._provider[e].apply(this._provider,t).then((e=>((e=(0,d.wrapToArray)(e))[0]&&!this._disposed&&this._triggerReadyAction(),e[1]))))),this._lastAsyncAction},_triggerReadyAction(){this._createActionByOption("onReady")({originalMap:this._provider.map()})},_triggerUpdateAction(){this._createActionByOption("onUpdated")()},setOptionSilent(e,t){this._setOptionWithoutOptionChange(e,t)},addMarker(e){return this._addFunction("markers",e)},removeMarker(e){return this._removeFunction("markers",e)},addRoute(e){return this._addFunction("routes",e)},removeRoute(e){return this._removeFunction("routes",e)},_addFunction(e,t){const i=this.option(e),n=(0,d.wrapToArray)(t);return i.push.apply(i,n),this._partialArrayOptionChange(e,i,n,[])},_removeFunction(e,t){const i=this.option(e),n=(0,d.wrapToArray)(t);return(0,g.each)(n,((t,o)=>{const a=(0,_.isNumeric)(o)?o:null==i?void 0:i.indexOf(o);if(-1===a)throw f.default.log("E1021",(0,p.titleize)(e.substring(0,e.length-1)),o);{const e=i.splice(a,1)[0];n.splice(t,1,e)}})),this._partialArrayOptionChange(e,i,[],n)},_partialArrayOptionChange(e,t,i,n){return(0,c.fromPromise)(new Promise((o=>{this._optionChangeBag={resolve:o,added:i,removed:n},this.option(e,t)})).then((e=>e&&1===e.length?e[0]:e)),this)}});(0,s.default)("dxMap",D);t.default=D},42575:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(43101)),o=h(i(64553)),a=h(i(78670)),s=i(17781),r=i(21274),l=i(11528),d=i(3104),u=h(i(35185)),c=h(i(62586));function h(e){return e&&e.__esModule?e:{default:e}}const p=(0,d.getWindow)(),g="https://atlas.microsoft.com/";let _=`${g}sdk/javascript/mapcontrol/3/atlas.min.js`,f=`${g}/sdk/javascript/mapcontrol/3/atlas.min.css`;const m=function(){return p.atlas&&p.atlas.Map};let v;const C=c.default.inherit({_mapType(e){const t={roadmap:"road",satellite:"satellite",hybrid:"satellite_road_labels"};return t[e]||t.roadmap},_movementMode(e){const t={driving:"car",walking:"pedestrian"};return t[e]||t.driving},_resolveLocation(e){return new Promise((t=>{const i=this._getLatLng(e);i?t(new atlas.data.Position(i.lng,i.lat)):this._geocodeLocation(e).then((e=>{t(e)}))}))},_geocodedLocations:{},_geocodeLocationImpl(e){return new Promise((t=>{if(!(0,l.isDefined)(e))return void t(new atlas.data.Position(0,0));const i=`${g}geocode?subscription-key=${this._keyOption("azure")}&api-version=2023-06-01&query=${e}&limit=1`;a.default.sendRequest({url:i,dataType:"json"}).then((e=>{var i;const n=null==e||null===(i=e.features[0])||void 0===i||null===(i=i.geometry)||void 0===i?void 0:i.coordinates;t(n?new atlas.data.Position(n[0],n[1]):new atlas.data.Position(0,0))}))}))},_normalizeLocation:e=>({lat:e[1],lng:e[0]}),_normalizeLocationRect:e=>({northEast:{lat:e[1],lng:e[2]},southWest:{lat:e[3],lng:e[0]}}),_loadImpl(){return new Promise((e=>{m()&&e(),v||(v=this._loadMapResources()),v.then((()=>{m()?e():this._loadMapResources().then(e)}))}))},_loadMapResources(){return Promise.all([this._loadMapScript(),this._loadMapStyles()])},_loadMapScript:()=>new Promise((e=>{a.default.sendRequest({url:_,dataType:"script"}).then((()=>{e()}))})),_loadMapStyles:()=>new Promise((e=>{a.default.sendRequest({url:f,dataType:"text"}).then((t=>{(0,o.default)("<style>").html(t).appendTo((0,o.default)("head")),e()}))})),_init(){return this._createMap(),Promise.resolve()},_createMap(){this._map=new atlas.Map(this._$container[0],{authOptions:{authType:"subscriptionKey",subscriptionKey:this._keyOption("azure")},zoom:this._option("zoom"),style:this._mapType(this._option("type")),interactive:!this._option("disabled")}),this.updateControls()},_attachHandlers(){this._map.events.add("move",this._viewChangeHandler.bind(this)),this._map.events.add("click",this._clickActionHandler.bind(this))},_viewChangeHandler(){const{bounds:e}=this._map.getCamera();this._option("bounds",this._normalizeLocationRect(e));const{center:t}=this._map.getCamera();this._option("center",this._normalizeLocation(t)),this._preventZoomChangeEvent||this._option("zoom",this._map.getCamera().zoom)},_clickActionHandler(e){"click"===e.type&&this._fireClickAction({location:this._normalizeLocation(e.position)})},updateDimensions(){return this._map.resize(),Promise.resolve()},updateDisabled(){const e=this._option("disabled");return this._map.setUserInteraction({interactive:!e}),Promise.resolve()},updateMapType(){const e=this._mapType(this._option("type"));return e!==this._map.getStyle().style&&this._map.setStyle({style:e}),Promise.resolve()},updateBounds(){return Promise.all([this._resolveLocation(this._option("bounds.northEast")),this._resolveLocation(this._option("bounds.southWest"))]).then((e=>{this._map.setCamera({bounds:[e[1][0],e[1][1],e[0][0],e[0][1]],padding:50})}))},updateCenter(){return this._resolveLocation(this._option("center")).then((e=>{this._map.setCamera({center:e})}))},updateZoom(){return this._map.setCamera({zoom:this._option("zoom")}),Promise.resolve()},updateControls(){const{controls:e}=this._option();if(e)this._map.controls.add([new atlas.control.CompassControl,new atlas.control.PitchControl,new atlas.control.StyleControl({mapStyles:["road","satellite","satellite_road_labels"]}),new atlas.control.ZoomControl],{position:"top-right"});else{const e=this._map.controls.getControls().slice(2);this._map.controls.remove(e)}return Promise.resolve()},_renderMarker(e){return this._resolveLocation(e.location).then((t=>{const i={position:t},n=e.iconSrc||this._option("markerIconSrc");n&&(i.htmlContent=this._createIconTemplate(n));const o=new atlas.HtmlMarker(i);this._map.markers.add(o);const a=this._renderTooltip(t,e.tooltip);let r;if(e.onClick||e.tooltip){const i=this._mapWidget._createAction(e.onClick||s.noop),n=this._normalizeLocation(t);r=this._map.events.add("click",o,(()=>{i({location:n}),a&&(a.isOpen()?a.close():a.open())}))}return{location:t,marker:o,popup:a,handler:r}}))},_renderTooltip(e,t){if(!t)return;t=this._parseTooltipOptions(t);const i=(0,o.default)("<div>").text(t.text).addClass("dx-map-marker-tooltip"),n=new atlas.Popup({content:i[0],position:e,pixelOffset:[0,-30]});return this._map.popups.add(n),t.visible&&n.open(),n},_destroyMarker(e){this._map.markers.remove(e.marker),e.popup&&this._map.popups.remove(e.popup),e.handler&&this._map.events.remove(e.handler)},_renderRoute(e){return Promise.all((0,r.map)(e.locations,(e=>this._resolveLocation(e)))).then((t=>new Promise((i=>{const o=new n.default(e.color||this._defaultRouteColor()).toHex(),s=e.opacity||this._defaultRouteOpacity(),r=t.map((e=>`${e[1]},${e[0]}`)).join(":"),l=this._movementMode(e.mode),d=`${g}route/directions/json?subscription-key=${this._keyOption("azure")}&api-version=1.0&query=${r}&travelMode=${l}`;a.default.sendRequest({url:d,dataType:"json"}).then((t=>{if(null!=t&&t.routes&&t.routes.length>0){const n=t.routes[0].legs.flatMap((e=>e.points.map((e=>[e.longitude,e.latitude])))),a=new atlas.source.DataSource;a.add(new atlas.data.Feature(new atlas.data.LineString(n),{}));const r=new atlas.layer.LineLayer(a,null,{strokeColor:o,strokeOpacity:s,strokeWidth:e.weight||this._defaultRouteWeight()});this._map.sources.add(a),this._map.layers.add(r);const l=atlas.data.BoundingBox.fromPositions(n);this._option("autoAdjust")&&this._map.setCamera({bounds:l,padding:50}),i({instance:{dataSource:a,lineLayer:r},northEast:[l[2],l[3]],southWest:[l[0],l[1]]})}})).catch((e=>{const t=e.responseJSON.error.message,n=new atlas.source.DataSource,o=new atlas.layer.LineLayer(n,null,{});u.default.log("W1006",t),i({instance:{dataSource:n,lineLayer:o}})}))}))))},_destroyRoute(e){this._map.layers.remove(e.instance.lineLayer),this._map.sources.remove(e.instance.dataSource)},_fitBounds(){if(this._updateBounds(),this._bounds&&this._option("autoAdjust")){const e=this._map.getCamera().zoom;this._preventZoomChangeEvent=!0,this._map.setCamera({bounds:this._bounds,padding:50});const t=this._map.getCamera().zoom;e<t?this._map.setCamera({zoom:e}):this._option("zoom",t),delete this._preventZoomChangeEvent}return Promise.resolve()},_extendBounds(e){const[t,i]=e,n=1e-4;if(this._bounds){const e=new atlas.data.BoundingBox([t,i,t,i]);this._bounds=atlas.data.BoundingBox.merge(this._bounds,e)}else this._bounds=new atlas.data.BoundingBox([t-n,i-n,t+n,i+n])},clean(){return this._map&&(this._map.events.remove("move",this._viewChangeHandler),this._map.events.remove("click",this._clickActionHandler),this._clearMarkers(),this._clearRoutes(),this._map.dispose()),Promise.resolve()}});t.default=C},53672:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(43101)),o=p(i(78670)),a=i(17781),s=i(52576),r=i(21274),l=i(57653),d=i(11528),u=i(3104),c=p(i(35185)),h=p(i(62586));function p(e){return e&&e.__esModule?e:{default:e}}const g=(0,u.getWindow)(),_="_bingScriptReady";let f=`https://www.bing.com/api/maps/mapcontrol?callback=${_}`;const m=function(){return g.Microsoft&&g.Microsoft.Maps};let v;const C=h.default.inherit({_mapType(e){const t={roadmap:Microsoft.Maps.MapTypeId.road,hybrid:Microsoft.Maps.MapTypeId.aerial,satellite:Microsoft.Maps.MapTypeId.aerial};return t[e]||t.road},_movementMode(e){const t={driving:Microsoft.Maps.Directions.RouteMode.driving,walking:Microsoft.Maps.Directions.RouteMode.walking};return t[e]||t.driving},_resolveLocation(e){return new Promise((t=>{const i=this._getLatLng(e);i?t(new Microsoft.Maps.Location(i.lat,i.lng)):this._geocodeLocation(e).then((e=>{t(e)}))}))},_geocodedLocations:{},_geocodeLocationImpl(e){return new Promise((t=>{if(!(0,d.isDefined)(e))return void t(new Microsoft.Maps.Location(0,0));const i=new Microsoft.Maps.Search.SearchManager(this._map),n={where:e,count:1,callback(e){if(e.results[0]){const i=e.results[0].location;t(new Microsoft.Maps.Location(i.latitude,i.longitude))}else t(new Microsoft.Maps.Location(0,0))}};i.geocode(n)}))},_normalizeLocation:e=>({lat:e.latitude,lng:e.longitude}),_normalizeLocationRect(e){const t=this._normalizeLocation(e.getNorthwest()),i=this._normalizeLocation(e.getSoutheast());return{northEast:{lat:t.lat,lng:i.lng},southWest:{lat:i.lat,lng:t.lng}}},_loadImpl(){return new Promise((e=>{m()?e():(v||(v=this._loadMapScript()),v.then((()=>{m()?e():this._loadMapScript().then(e)})))})).then((()=>Promise.all([new Promise((e=>{Microsoft.Maps.loadModule("Microsoft.Maps.Search",{callback:e})})),new Promise((e=>{Microsoft.Maps.loadModule("Microsoft.Maps.Directions",{callback:e})}))])))},_loadMapScript:()=>new Promise((e=>{g[_]=e,o.default.sendRequest({url:f,dataType:"script"})})).then((()=>{try{delete g[_]}catch(e){g[_]=void 0}})),_init(){return this._createMap(),Promise.resolve()},_createMap(){const e=this._option("controls");this._map=new Microsoft.Maps.Map(this._$container[0],{credentials:this._keyOption("bing"),zoom:this._option("zoom"),showDashboard:e,showMapTypeSelector:e,showScalebar:e})},_attachHandlers(){this._providerViewChangeHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",this._viewChangeHandler.bind(this)),this._providerClickHandler=Microsoft.Maps.Events.addHandler(this._map,"click",this._clickActionHandler.bind(this))},_viewChangeHandler(){const e=this._map.getBounds();this._option("bounds",this._normalizeLocationRect(e));const t=this._map.getCenter();this._option("center",this._normalizeLocation(t)),this._preventZoomChangeEvent||this._option("zoom",this._map.getZoom())},_clickActionHandler(e){"map"===e.targetType&&this._fireClickAction({location:this._normalizeLocation(e.location)})},updateDimensions(){const e=this._$container;return this._map.setOptions({width:(0,l.getWidth)(e),height:(0,l.getHeight)(e)}),Promise.resolve()},updateMapType(){const e=this._option("type"),t=Microsoft.Maps.LabelOverlay;return this._map.setView({animate:!1,mapTypeId:this._mapType(e),labelOverlay:"satellite"===e?t.hidden:t.visible}),Promise.resolve()},updateBounds(){return Promise.all([this._resolveLocation(this._option("bounds.northEast")),this._resolveLocation(this._option("bounds.southWest"))]).then((e=>{const t=new Microsoft.Maps.LocationRect.fromLocations(e[0],e[1]);this._map.setView({animate:!1,bounds:t})}))},updateCenter(){return this._resolveLocation(this._option("center")).then((e=>{this._map.setView({animate:!1,center:e})}))},updateZoom(){return this._map.setView({animate:!1,zoom:this._option("zoom")}),Promise.resolve()},updateControls(){return this.clean(),this.render.apply(this,arguments)},_renderMarker(e){return this._resolveLocation(e.location).then((t=>{const i={icon:e.iconSrc||this._option("markerIconSrc")};if(e.html){(0,s.extend)(i,{htmlContent:e.html,width:null,height:null});const{htmlOffset:t}=e;t&&(i.anchor=new Microsoft.Maps.Point(-t.left,-t.top))}const n=new Microsoft.Maps.Pushpin(t,i);this._map.entities.push(n);const o=this._renderTooltip(t,e.tooltip);let r;if(e.onClick||e.tooltip){const i=this._mapWidget._createAction(e.onClick||a.noop),s=this._normalizeLocation(t);r=Microsoft.Maps.Events.addHandler(n,"click",(()=>{i({location:s}),o&&o.setOptions({visible:!0})}))}return{location:t,marker:n,infobox:o,handler:r}}))},_renderTooltip(e,t){if(!t)return;t=this._parseTooltipOptions(t);const i=new Microsoft.Maps.Infobox(e,{description:t.text,offset:new Microsoft.Maps.Point(0,13),visible:t.visible});return i.setMap(this._map),i},_destroyMarker(e){this._map.entities.remove(e.marker),e.infobox&&e.infobox.setMap(null),e.handler&&Microsoft.Maps.Events.removeHandler(e.handler)},_renderRoute(e){return Promise.all((0,r.map)(e.locations,(e=>this._resolveLocation(e)))).then((t=>new Promise((i=>{const o=new Microsoft.Maps.Directions.DirectionsManager(this._map),a=new n.default(e.color||this._defaultRouteColor()).toHex(),s=new Microsoft.Maps.Color.fromHex(a);s.a=255*(e.opacity||this._defaultRouteOpacity()),o.setRenderOptions({autoUpdateMapView:!1,displayRouteSelector:!1,waypointPushpinOptions:{visible:!1},drivingPolylineOptions:{strokeColor:s,strokeThickness:e.weight||this._defaultRouteWeight()},walkingPolylineOptions:{strokeColor:s,strokeThickness:e.weight||this._defaultRouteWeight()}}),o.setRequestOptions({routeMode:this._movementMode(e.mode),routeDraggable:!1}),(0,r.each)(t,((e,t)=>{const i=new Microsoft.Maps.Directions.Waypoint({location:t});o.addWaypoint(i)}));const l=[];l.push(Microsoft.Maps.Events.addHandler(o,"directionsUpdated",(e=>{for(;l.length;)Microsoft.Maps.Events.removeHandler(l.pop());const t=e.routeSummary[0];i({instance:o,northEast:t.northEast,southWest:t.southWest})}))),l.push(Microsoft.Maps.Events.addHandler(o,"directionsError",(e=>{for(;l.length;)Microsoft.Maps.Events.removeHandler(l.pop());const t=`RouteResponseCode: ${e.responseCode} - ${e.message}`;c.default.log("W1006",t),i({instance:o})}))),o.calculateDirections()}))))},_destroyRoute(e){e.instance.dispose()},_fitBounds(){if(this._updateBounds(),this._bounds&&this._option("autoAdjust")){const e=this._map.getZoom();this._preventZoomChangeEvent=!0;const t=this._bounds.clone();t.height*=1.1,t.width*=1.1,this._map.setView({animate:!1,bounds:t,zoom:e});const i=this._map.getZoom();e<i?this._map.setView({animate:!1,zoom:e}):this._option("zoom",i),delete this._preventZoomChangeEvent}return Promise.resolve()},_extendBounds(e){this._bounds?this._bounds=new Microsoft.Maps.LocationRect.fromLocations(this._bounds.getNorthwest(),this._bounds.getSoutheast(),e):this._bounds=new Microsoft.Maps.LocationRect(e,1e-16,1e-16)},clean(){return this._map&&(Microsoft.Maps.Events.removeHandler(this._providerViewChangeHandler),Microsoft.Maps.Events.removeHandler(this._providerClickHandler),this._clearMarkers(),this._clearRoutes(),this._map.dispose()),Promise.resolve()}});t.default=C},76473:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=g(i(43101)),o=g(i(65951)),a=g(i(64553)),s=g(i(78670)),r=i(17781),l=i(52576),d=i(21274),u=i(11528),c=i(3104),h=g(i(35185)),p=g(i(62586));function g(e){return e&&e.__esModule?e:{default:e}}const _=(0,c.getWindow)(),f="_googleScriptReady";let m=`https://maps.googleapis.com/maps/api/js?callback=${f}&libraries=marker&loading=async`;let v;const C=function(){return _.google&&_.google.maps};let y;const b=p.default.inherit({_mapType(e){const t={hybrid:google.maps.MapTypeId.HYBRID,roadmap:google.maps.MapTypeId.ROADMAP,satellite:google.maps.MapTypeId.SATELLITE};return t[e]||t.hybrid},_movementMode(e){const t={driving:google.maps.TravelMode.DRIVING,walking:google.maps.TravelMode.WALKING};return t[e]||t.driving},_resolveLocation(e){return new Promise((t=>{const i=this._getLatLng(e);i?t(new google.maps.LatLng(i.lat,i.lng)):this._geocodeLocation(e).then((e=>{t(e)}))}))},_geocodedLocations:{},_geocodeLocationImpl:e=>new Promise((t=>{if(!(0,u.isDefined)(e))return void t(new google.maps.LatLng(0,0));(new google.maps.Geocoder).geocode({address:e},((e,i)=>{i===google.maps.GeocoderStatus.OK?t(e[0].geometry.location):(h.default.log("W1006",i),t(new google.maps.LatLng(0,0)))}))})),_normalizeLocation:e=>({lat:e.lat(),lng:e.lng()}),_normalizeLocationRect(e){return{northEast:this._normalizeLocation(e.getNorthEast()),southWest:this._normalizeLocation(e.getSouthWest())}},_loadImpl(){return new Promise((e=>{C()?e():(y||(y=this._loadMapScript()),y.then((()=>{C()?e():this._loadMapScript().then(e)})))})).then((()=>{v=function(e){this._position=e.position,this._offset=e.offset,this._$overlayContainer=(0,a.default)("<div>").css({position:"absolute",display:"none",cursor:"pointer"}).append(e.html),this.setMap(e.map)},v.prototype=new google.maps.OverlayView,v.prototype.onAdd=function(){(0,a.default)(this.getPanes().overlayMouseTarget).append(this._$overlayContainer),this._clickListener=google.maps.event.addDomListener(this._$overlayContainer.get(0),"click",(e=>{google.maps.event.trigger(this,"click"),e.preventDefault()})),this.draw()},v.prototype.onRemove=function(){google.maps.event.removeListener(this._clickListener),this._$overlayContainer.remove()},v.prototype.draw=function(){const e=this.getProjection().fromLatLngToDivPixel(this._position);this._$overlayContainer.css({left:e.x+this._offset.left,top:e.y+this._offset.top,display:"block"})}}))},_loadMapScript(){return new Promise((e=>{const t=this._keyOption("google");_[f]=e,s.default.sendRequest({url:m+(t?`&key=${t}`:""),dataType:"script"})})).then((()=>{try{delete _[f]}catch(e){_[f]=void 0}}))},_init(){return new Promise((e=>{this._resolveLocation(this._option("center")).then((t=>{const i=!this._option("controls"),n=this._option("providerConfig"),o=(null==n?void 0:n.mapId)??"";this._map=new google.maps.Map(this._$container[0],{center:t,disableDefaultUI:i,mapId:o,zoom:this._option("zoom")});const a=google.maps.event.addListener(this._map,"idle",(()=>{e(a)}))}))})).then((e=>{google.maps.event.removeListener(e)}))},_attachHandlers(){this._boundsChangeListener=google.maps.event.addListener(this._map,"bounds_changed",this._boundsChangeHandler.bind(this)),this._clickListener=google.maps.event.addListener(this._map,"click",this._clickActionHandler.bind(this))},_boundsChangeHandler(){const e=this._map.getBounds();this._option("bounds",this._normalizeLocationRect(e));const t=this._map.getCenter();this._option("center",this._normalizeLocation(t)),this._preventZoomChangeEvent||this._option("zoom",this._map.getZoom())},_clickActionHandler(e){this._fireClickAction({location:this._normalizeLocation(e.latLng)})},updateDimensions(){const e=this._option("center");return google.maps.event.trigger(this._map,"resize"),this._option("center",e),this.updateCenter()},updateMapType(){return this._map.setMapTypeId(this._mapType(this._option("type"))),Promise.resolve()},updateBounds(){return Promise.all([this._resolveLocation(this._option("bounds.northEast")),this._resolveLocation(this._option("bounds.southWest"))]).then((e=>{const t=new google.maps.LatLngBounds;t.extend(e[0]),t.extend(e[1]),this._map.fitBounds(t)}))},updateCenter(){return this._resolveLocation(this._option("center")).then((e=>{this._map.setCenter(e),this._option("center",this._normalizeLocation(e))}))},updateZoom(){return this._map.setZoom(this._option("zoom")),Promise.resolve()},updateControls(){const e=this._option("controls");return this._map.setOptions({disableDefaultUI:!e}),Promise.resolve()},isEventsCanceled(e){const t=this._map&&this._map.get("gestureHandling");return!((0,a.default)(e.target).closest(".gm-style-iw").length>0||"desktop"!==o.default.real().deviceType&&"cooperative"===t)&&this.callBase()},_renderMarker(e){return this._resolveLocation(e.location).then((t=>{let i;if(e.html)i=new v({map:this._map,position:t,html:e.html,offset:(0,l.extend)({top:0,left:0},e.htmlOffset)});else{const n=this._option("providerConfig"),o=(null==n?void 0:n.useAdvancedMarkers)??!0,a=e.iconSrc||this._option("markerIconSrc");if(o){const e=a?this._createIconTemplate(a):void 0;i=new google.maps.marker.AdvancedMarkerElement({position:t,map:this._map,content:e})}else i=new google.maps.Marker({position:t,map:this._map,icon:a})}const n=this._renderTooltip(i,e.tooltip);let o;if(e.onClick||e.tooltip){const a=this._mapWidget._createAction(e.onClick||r.noop),s=this._normalizeLocation(t);o=google.maps.event.addListener(i,"click",(()=>{a({location:s}),n&&n.open(this._map,i)}))}return{location:t,marker:i,listener:o}}))},_renderTooltip(e,t){if(!t)return;t=this._parseTooltipOptions(t);const i=new google.maps.InfoWindow({content:t.text});return t.visible&&i.open(this._map,e),i},_destroyMarker(e){e.marker.setMap(null),e.listener&&google.maps.event.removeListener(e.listener)},_renderRoute(e){return Promise.all((0,d.map)(e.locations,(e=>this._resolveLocation(e)))).then((t=>new Promise((i=>{const o={origin:t.shift(),destination:t.pop(),waypoints:(0,d.map)(t,(e=>({location:e,stopover:!0}))),optimizeWaypoints:!0,travelMode:this._movementMode(e.mode)};(new google.maps.DirectionsService).route(o,((t,o)=>{if(o===google.maps.DirectionsStatus.OK){const o=new n.default(e.color||this._defaultRouteColor()).toHex(),a={directions:t,map:this._map,suppressMarkers:!0,preserveViewport:!0,polylineOptions:{strokeWeight:e.weight||this._defaultRouteWeight(),strokeOpacity:e.opacity||this._defaultRouteOpacity(),strokeColor:o}},s=new google.maps.DirectionsRenderer(a),{bounds:r}=t.routes[0];i({instance:s,northEast:r.getNorthEast(),southWest:r.getSouthWest()})}else h.default.log("W1006",o),i({instance:new google.maps.DirectionsRenderer({})})}))}))))},_destroyRoute(e){e.instance.setMap(null)},_fitBounds(){if(this._updateBounds(),this._bounds&&this._option("autoAdjust")){const e=this._map.getZoom();this._preventZoomChangeEvent=!0,this._map.fitBounds(this._bounds),this._boundsChangeHandler();const t=this._map.getZoom();e<t?this._map.setZoom(e):this._option("zoom",t),delete this._preventZoomChangeEvent}return Promise.resolve()},_extendBounds(e){this._bounds||(this._bounds=new google.maps.LatLngBounds),this._bounds.extend(e)},clean(){return this._map&&(google.maps.event.removeListener(this._boundsChangeListener),google.maps.event.removeListener(this._clickListener),this._clearMarkers(),this._clearRoutes(),delete this._map,this._$container.empty()),Promise.resolve()}});t.default=b},62586:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(64553)),o=i(52576),a=i(21274),s=r(i(1993));function r(e){return e&&e.__esModule?e:{default:e}}const{abstract:l}=s.default,d=s.default.inherit({_geocodeLocation(e){return new Promise((t=>{const i=this._geocodedLocations,n=i[e];n?t(n):this._geocodeLocationImpl(e).then((n=>{i[e]=n,t(n)}))}))},_renderImpl(){return this._load().then((()=>this._init())).then((()=>Promise.all([this.updateMapType(),this._areBoundsSet()?this.updateBounds():this.updateCenter()]))).then((()=>(this._attachHandlers(),new Promise((e=>{const t=setTimeout((()=>{clearTimeout(t),e()}))})))))},_load(){return this._mapsLoader||(this._mapsLoader=this._loadImpl()),this._markers=[],this._routes=[],this._mapsLoader},_loadImpl:l,_init:l,_attachHandlers:l,addMarkers(e){return Promise.all((0,a.map)(e,(e=>this._addMarker(e)))).then((e=>(this._fitBounds(),[!1,(0,a.map)(e,(e=>e.marker))])))},_addMarker(e){return this._renderMarker(e).then((t=>(this._markers.push((0,o.extend)({options:e},t)),this._fireMarkerAddedAction({options:e,originalMarker:t.marker}),t)))},_renderMarker:l,_createIconTemplate(e){const t=(0,n.default)("<img>");return t.attr("src",e),t.attr("alt","Marker icon"),t.addClass("dx-map-marker"),t[0]},removeMarkers(e){const t=this;return(0,a.each)(e,((e,i)=>{t._removeMarker(i)})),Promise.resolve()},_removeMarker(e){const t=this;(0,a.each)(this._markers,((i,n)=>n.options!==e||(t._destroyMarker(n),t._markers.splice(i,1),t._fireMarkerRemovedAction({options:n.options}),!1)))},_destroyMarker:l,_clearMarkers(){for(;this._markers.length>0;)this._removeMarker(this._markers[0].options)},addRoutes(e){return Promise.all((0,a.map)(e,(e=>this._addRoute(e)))).then((e=>(this._fitBounds(),[!1,(0,a.map)(e,(e=>e.instance))])))},_addRoute(e){return this._renderRoute(e).then((t=>(this._routes.push((0,o.extend)({options:e},t)),this._fireRouteAddedAction({options:e,originalRoute:t.instance}),t)))},_renderRoute:l,removeRoutes(e){const t=this;return(0,a.each)(e,((e,i)=>{t._removeRoute(i)})),Promise.resolve()},_removeRoute(e){const t=this;(0,a.each)(this._routes,((i,n)=>n.options!==e||(t._destroyRoute(n),t._routes.splice(i,1),t._fireRouteRemovedAction({options:e}),!1)))},_destroyRoute:l,_clearRoutes(){for(;this._routes.length>0;)this._removeRoute(this._routes[0].options)},adjustViewport(){return this._fitBounds()},isEventsCanceled:()=>!0,_fitBounds:l,_updateBounds(){const e=this;this._clearBounds(),this._option("autoAdjust")&&((0,a.each)(this._markers,((t,i)=>{e._extendBounds(i.location)})),(0,a.each)(this._routes,((t,i)=>{i.northEast&&e._extendBounds(i.northEast),i.southWest&&e._extendBounds(i.southWest)})))},_clearBounds(){this._bounds=null},_extendBounds:l});t.default=d},66577:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(43101)),o=i(64044),a=d(i(92774)),s=i(21274),r=i(57653),l=d(i(1993));function d(e){return e&&e.__esModule?e:{default:e}}const u=l.default.inherit({_locationToString(e){const t=this._getLatLng(e);return t?`${t.lat},${t.lng}`:e.toString().replace(/ /g,"+")},_renderImpl(){return this._updateMap()},updateDimensions(){return this._updateMap()},updateMapType(){return this._updateMap()},updateBounds:()=>Promise.resolve(),updateCenter(){return this._updateMap()},updateZoom(){return this._updateMap()},updateControls:()=>Promise.resolve(),addMarkers(e){const t=this;return this._updateMap().then((i=>((0,s.each)(e,((e,i)=>{t._fireMarkerAddedAction({options:i})})),i)))},removeMarkers(e){const t=this;return this._updateMap().then((i=>((0,s.each)(e,((e,i)=>{t._fireMarkerRemovedAction({options:i})})),i)))},adjustViewport:()=>Promise.resolve(),addRoutes(e){const t=this;return this._updateMap().then((i=>((0,s.each)(e,((e,i)=>{t._fireRouteAddedAction({options:i})})),i)))},removeRoutes(e){const t=this;return this._updateMap().then((i=>((0,s.each)(e,((e,i)=>{t._fireRouteRemovedAction({options:i})})),i)))},clean(){return this._$container.css("backgroundImage","none"),a.default.off(this._$container,this._addEventNamespace(o.name)),Promise.resolve()},mapRendered:()=>!0,_updateMap(){const e=this._keyOption("googleStatic"),t=this._option("providerConfig"),i=null==t?void 0:t.mapId,n=this._$container,o=["sensor=false",`size=${Math.round((0,r.getWidth)(n))}x${Math.round((0,r.getHeight)(n))}`,`maptype=${this._option("type")}`,`center=${this._locationToString(this._option("center"))}`,`zoom=${this._option("zoom")}`,this._markersSubstring()];o.push.apply(o,this._routeSubstrings()),e&&o.push(`key=${e}`),i&&o.push(`map_id=${i}`);const a="https://maps.google.com/maps/api/staticmap?"+o.join("&");return this._$container.css("background",`url("${a}") no-repeat 0 0`),this._attachClickEvent(),Promise.resolve(!0)},_markersSubstring(){const e=this,t=[],i=this._option("markerIconSrc");return i&&t.push(`icon:${i}`),(0,s.each)(this._option("markers"),((i,n)=>{t.push(e._locationToString(n.location))})),`markers=${t.join("|")}`},_routeSubstrings(){const e=this,t=[];return(0,s.each)(this._option("routes"),((i,o)=>{const a=new n.default(o.color||e._defaultRouteColor()).toHex().replace("#","0x"),r=Math.round(255*(o.opacity||e._defaultRouteOpacity())).toString(16),l=o.weight||e._defaultRouteWeight(),d=[];(0,s.each)(o.locations,((t,i)=>{d.push(e._locationToString(i))})),t.push(`path=color:${a}${r}|weight:${l}|${d.join("|")}`)})),t},_attachClickEvent(){const e=this,t=this._addEventNamespace(o.name);a.default.off(this._$container,t),a.default.on(this._$container,t,(t=>{e._fireClickAction({event:t})}))}});t.default=u},1993:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(98834),a=(n=i(55620))&&n.__esModule?n:{default:n},s=i(21274),r=i(11528);const{abstract:l}=a.default,d=a.default.inherit({_defaultRouteWeight:()=>5,_defaultRouteOpacity:()=>.5,_defaultRouteColor:()=>"#0000FF",ctor(e,t){this._mapWidget=e,this._$container=t},render(e,t){return this._renderImpl().then((()=>Promise.all([this._applyFunctionIfNeeded("addMarkers",e),this._applyFunctionIfNeeded("addRoutes",t)]).then((()=>!0))))},_renderImpl:l,updateDimensions:l,updateMapType:l,updateDisabled:l,updateBounds:l,updateCenter:l,updateZoom:l,updateControls:l,updateMarkers(e,t){return new Promise((i=>this._applyFunctionIfNeeded("removeMarkers",e).then((e=>{this._applyFunctionIfNeeded("addMarkers",t).then((t=>{i(t||e)}))}))))},addMarkers:l,removeMarkers:l,adjustViewport:l,updateRoutes(e,t){return new Promise((i=>this._applyFunctionIfNeeded("removeRoutes",e).then((e=>{this._applyFunctionIfNeeded("addRoutes",t).then((t=>{i(t||e)}))}))))},addRoutes:l,removeRoutes:l,clean:l,map(){return this._map},isEventsCanceled:()=>!1,_option(e,t){if(void 0===t)return this._mapWidget.option(e);this._mapWidget.setOptionSilent(e,t)},_keyOption(e){const t=this._option("apiKey");return void 0===t[e]?t:t[e]},_parseTooltipOptions:e=>({text:e.text||e,visible:e.isShown||!1}),_getLatLng(e){if("string"==typeof e){const t=(0,s.map)(e.split(","),(e=>e.trim())),i=/^[-+]?[0-9]*\.?[0-9]*$/;if(2===t.length&&t[0].match(i)&&t[1].match(i))return{lat:parseFloat(t[0]),lng:parseFloat(t[1])}}else{if(Array.isArray(e)&&2===e.length)return{lat:e[0],lng:e[1]};if((0,r.isPlainObject)(e)&&(0,r.isNumeric)(e.lat)&&(0,r.isNumeric)(e.lng))return e}return null},_areBoundsSet(){return this._option("bounds.northEast")&&this._option("bounds.southWest")},_addEventNamespace(e){return(0,o.addNamespace)(e,this._mapWidget.NAME)},_applyFunctionIfNeeded(e,t){return t.length?this[e](t):Promise.resolve()},_fireAction(e,t){this._mapWidget._createActionByOption(e)(t)},_fireClickAction(e){this._fireAction("onClick",e)},_fireMarkerAddedAction(e){this._fireAction("onMarkerAdded",e)},_fireMarkerRemovedAction(e){this._fireAction("onMarkerRemoved",e)},_fireRouteAddedAction(e){this._fireAction("onRouteAdded",e)},_fireRouteRemovedAction(e){this._fireAction("onRouteRemoved",e)}});t.default=d},54572:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=b(i(92774)),o=i(638),a=b(i(89797)),s=i(98834),r=b(i(92848)),l=i(61404),d=b(i(64553)),u=i(17781),c=i(52576),h=i(21274),p=i(57653),g=i(11528),_=b(i(64973)),f=b(i(89132)),m=b(i(4313)),v=b(i(76882)),C=i(67169),y=b(i(72878));function b(e){return e&&e.__esModule?e:{default:e}}const x="dx-menu",w=`${x}-vertical`,S=`${x}-horizontal`,D=`${x}-item`,I=`${x}-items-container`,E=`${D}-expanded`,T="dx-context-menu",A=`${T}-container-border`,O="dx-submenu",P="dx-state-hover",k=`${x}-adaptive-mode`,M=`${x}-hamburger-button`,R=`${k}-overlay-wrapper`,L="showSubmenu",B="nextItem",V="prevItem",F={show:50,hide:300},H=["onSubmenuShowing","onSubmenuShown","onSubmenuHiding","onSubmenuHidden","onItemContextMenu","onItemClick","onSelectionChanged","onItemRendered"];class N extends v.default{_getDefaultOptions(){return(0,c.extend)(super._getDefaultOptions(),{orientation:"horizontal",submenuDirection:"auto",showFirstSubmenuMode:{name:"onClick",delay:{show:50,hide:300}},hideSubmenuOnMouseLeave:!1,onSubmenuShowing:null,onSubmenuShown:null,onSubmenuHiding:null,onSubmenuHidden:null,adaptivityEnabled:!1})}_setOptionsByReference(){super._setOptionsByReference(),(0,c.extend)(this._optionsByReference,{animation:!0,selectedItem:!0})}_itemElements(){const e=super._itemElements(),t=this._submenuItemElements();return e.add(t)}_submenuItemElements(){let e=[];const t=`.${D}`,i=this._submenus.length&&this._submenus[0];return i&&i.itemsContainer()&&(e=i.itemsContainer().find(t)),e}_focusTarget(){return this.$element()}_isMenuHorizontal(){return"horizontal"===this.option("orientation")}_moveFocus(e){const t=this._getAvailableItems(),i=this._isMenuHorizontal(),n=this._getActiveItem(!0);let o,a,s,r;switch(e){case"up":a=i?L:this._getItemsNavigationOperation(V),o=i?n:t,s=this._getKeyboardNavigationAction(a,o),r=s();break;case"down":a=i?L:this._getItemsNavigationOperation(B),o=i?n:t,s=this._getKeyboardNavigationAction(a,o),r=s();break;case"right":a=i?this._getItemsNavigationOperation(B):L,o=i?t:n,s=this._getKeyboardNavigationAction(a,o),r=s();break;case"left":a=i?this._getItemsNavigationOperation(V):L,o=i?t:n,s=this._getKeyboardNavigationAction(a,o),r=s();break;default:return super._moveFocus(e)}r&&0!==r.length&&this.option("focusedElement",(0,l.getPublicElement)(r))}_getItemsNavigationOperation(e){let t=e;return this.option("rtlEnabled")&&(t=e===V?B:V),t}_getKeyboardNavigationAction(e,t){let i=u.noop;switch(e){case L:t.hasClass("dx-state-disabled")||(i=this._showSubmenu.bind(this,t));break;case B:i=this._nextItem.bind(this,t);break;case V:i=this._prevItem.bind(this,t)}return i}_clean(){super._clean(),this.option("templatesRenderAsynchronously")&&clearTimeout(this._resizeEventTimer)}_visibilityChanged(e){e&&(this._menuItemsWidth||this._updateItemsWidthCache(),this._dimensionChanged())}_isAdaptivityEnabled(){return this.option("adaptivityEnabled")&&"horizontal"===this.option("orientation")}_updateItemsWidthCache(){const e=this.$element().find("ul").first().children("li").children(`.${D}`);this._menuItemsWidth=this._getSummaryItemsSize("width",e,!0)}_dimensionChanged(){if(!this._isAdaptivityEnabled())return;const e=(0,p.getOuterWidth)(this.$element());this._toggleAdaptiveMode(this._menuItemsWidth>e)}_init(){super._init(),this._submenus=[]}_initActions(){this._actions={},(0,h.each)(H,((e,t)=>{this._actions[t]=this._createActionByOption(t)}))}_initMarkup(){this._visibleSubmenu=null,this.$element().addClass(x),super._initMarkup(),this._addCustomCssClass(this.$element()),this.setAria("role","menubar")}_setAriaRole(e){const t=this._isAdaptivityEnabled()&&e?void 0:"menubar";this.setAria({role:t})}_render(){super._render(),this._initAdaptivity()}_isTargetOutOfComponent(e){const t=0!==(0,d.default)(e).closest(`.${x}`).length,i=0!==(0,d.default)(e).closest(`.${T}`).length;return!(t||i)}_focusOutHandler(e){const{relatedTarget:t}=e;if(t){this._isTargetOutOfComponent(t)&&this._hideVisibleSubmenu()}super._focusOutHandler(e)}_renderHamburgerButton(){return this._hamburger=new _.default((0,d.default)("<div>").addClass(M),{icon:"menu",activeStateEnabled:!1,onClick:this._toggleTreeView.bind(this)}),this._hamburger.$element()}_toggleTreeView(e){(0,g.isPlainObject)(e)&&(e=!this._overlay.option("visible")),this._overlay.option("visible",e),e&&this._treeView.focus(),this._toggleHamburgerActiveState(e)}_toggleHamburgerActiveState(e){this._hamburger&&this._hamburger.$element().toggleClass("dx-state-active",e)}_toggleAdaptiveMode(e){const t=this.$element().find(`.${S}`),i=this.$element().find(`.${k}`);e?this._hideVisibleSubmenu():(this._treeView&&this._treeView.collapseAll(),this._overlay&&this._toggleTreeView(e)),this._setAriaRole(e),t.toggle(!e),i.toggle(e)}_removeAdaptivity(){this._$adaptiveContainer&&(this._toggleAdaptiveMode(!1),this._$adaptiveContainer.remove(),this._$adaptiveContainer=null,this._treeView=null,this._hamburger=null,this._overlay=null)}_treeviewItemClickHandler(e){this._actions.onItemClick(e),e.node.children.length||this._toggleTreeView(!1)}_getAdaptiveOverlayOptions(){const e=this.option("rtlEnabled")?"right":"left";return{_ignoreFunctionValueDeprecation:!0,maxHeight:()=>(0,C.getElementMaxHeightByWindow)(this.$element()),deferRendering:!1,shading:!1,animation:!1,hideOnParentScroll:!0,onHidden:()=>{this._toggleHamburgerActiveState(!1)},height:"auto",hideOnOutsideClick:e=>!(0,d.default)(e.target).closest(`.${M}`).length,position:{collision:"flipfit",at:`bottom ${e}`,my:`top ${e}`,of:this._hamburger.$element()}}}_getTreeViewOptions(){const e={};(0,h.each)(["rtlEnabled","width","accessKey","activeStateEnabled","animation","dataSource","disabled","displayExpr","displayExpr","focusStateEnabled","hint","hoverStateEnabled","itemsExpr","items","itemTemplate","selectedExpr","selectionMode","tabIndex","visible"],((t,i)=>{e[i]=this.option(i)}));return(0,h.each)(["onItemContextMenu","onSelectionChanged","onItemRendered"],((t,i)=>{e[i]=e=>{this._actions[i](e)}})),(0,c.extend)(e,{dataSource:this.getDataSource(),animationEnabled:!!this.option("animation"),onItemClick:this._treeviewItemClickHandler.bind(this),onItemExpanded:e=>{this._overlay.repaint(),this._actions.onSubmenuShown(e)},onItemCollapsed:e=>{this._overlay.repaint(),this._actions.onSubmenuHidden(e)},selectNodesRecursive:!1,selectByClick:this.option("selectByClick"),expandEvent:"click",_supportItemUrl:!0})}_initAdaptivity(){if(!this._isAdaptivityEnabled())return;this._$adaptiveContainer=(0,d.default)("<div>").addClass(k);const e=this._renderHamburgerButton();this._treeView=this._createComponent((0,d.default)("<div>"),m.default,this._getTreeViewOptions()),this._overlay=this._createComponent((0,d.default)("<div>"),f.default,this._getAdaptiveOverlayOptions()),this._overlay.$content().append(this._treeView.$element()).addClass(k).addClass(this.option("cssClass")),this._overlay.$wrapper().addClass(R),this._$adaptiveContainer.append(e),this._$adaptiveContainer.append(this._overlay.$element()),this.$element().append(this._$adaptiveContainer),this._updateItemsWidthCache(),this._dimensionChanged()}_getDelay(e){const{delay:t}=this.option("showFirstSubmenuMode");return(0,g.isDefined)(t)?(0,g.isObject)(t)?t[e]:t:F[e]}_keyboardHandler(e){return super._keyboardHandler(e,!!this._visibleSubmenu)}_renderContainer(){const e=(0,d.default)("<div>");return e.appendTo(this.$element()).addClass(this._isMenuHorizontal()?S:w),super._renderContainer(e)}_renderSubmenuItems(e,t){const i=this._createSubmenu(e,t);return this._submenus.push(i),this._renderBorderElement(t),i}_getKeyboardListeners(){return super._getKeyboardListeners().concat(this._visibleSubmenu)}_createSubmenu(e,t){const i=(0,d.default)("<div>").addClass(T).appendTo(t),n=this._getChildNodes(e),o=this._createComponent(i,y.default,(0,c.extend)(this._getSubmenuOptions(),{_dataAdapter:this._dataAdapter,_parentKey:e.internalFields.key,items:n,onHoverStart:this._clearTimeouts.bind(this),position:this.getSubmenuPosition(t)}));return this._attachSubmenuHandlers(t,o),o}_getSubmenuOptions(){const e=(0,d.default)("<div>"),t=this._isMenuHorizontal();return{itemTemplate:this.option("itemTemplate"),target:e,orientation:this.option("orientation"),selectionMode:this.option("selectionMode"),cssClass:this.option("cssClass"),selectByClick:this.option("selectByClick"),hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),focusStateEnabled:this.option("focusStateEnabled"),animation:this.option("animation"),showSubmenuMode:this.option("showSubmenuMode"),displayExpr:this.option("displayExpr"),disabledExpr:this.option("disabledExpr"),selectedExpr:this.option("selectedExpr"),itemsExpr:this.option("itemsExpr"),onFocusedItemChanged:e=>{e.component.option("visible")&&this.option("focusedElement",e.component.option("focusedElement"))},onSelectionChanged:this._nestedItemOnSelectionChangedHandler.bind(this),onItemClick:this._nestedItemOnItemClickHandler.bind(this),onItemRendered:this._nestedItemOnItemRenderedHandler.bind(this),onLeftFirstItem:t?null:this._moveMainMenuFocus.bind(this,V),onLeftLastItem:t?null:this._moveMainMenuFocus.bind(this,B),onCloseRootSubmenu:this._moveMainMenuFocus.bind(this,t?V:null),onExpandLastSubmenu:t?this._moveMainMenuFocus.bind(this,B):null}}_getShowFirstSubmenuMode(){if(!this._isDesktopDevice())return"onClick";const e=this.option("showFirstSubmenuMode");return(0,g.isObject)(e)?e.name:e}_moveMainMenuFocus(e){const t=this._getAvailableItems(),i=t.length,n=t.filter(`.${E}`).eq(0);let o=t.index(n);this._hideSubmenu(this._visibleSubmenu),o+=e===V?-1:1,o>=i?o=0:o<0&&(o=i-1);const a=t.eq(o);this.option("focusedElement",(0,l.getPublicElement)(a))}_nestedItemOnSelectionChangedHandler(e){const t=e.addedItems.length&&e.addedItems[0],i=y.default.getInstance(e.element),{onSelectionChanged:n}=this._actions;n(e),t&&this._clearSelectionInSubmenus(t[0],i),this._clearRootSelection(),this._setOptionWithoutOptionChange("selectedItem",t)}_clearSelectionInSubmenus(e,t){const i=!arguments.length;(0,h.each)(this._submenus,((e,n)=>{const o=n._itemContainer(),a=!o.is(t&&t._itemContainer()),s=o.find(`.${this._selectedItemClass()}`);if(a&&s.length||i){s.removeClass(this._selectedItemClass());const e=this._getItemData(s);e&&(e.selected=!1),n._clearSelectedItems()}}))}_clearRootSelection(){const e=this.$element().find(`.${I}`).first().children().children().filter(`.${this._selectedItemClass()}`);if(e.length){this._getItemData(e).selected=!1,e.removeClass(this._selectedItemClass())}}_nestedItemOnItemClickHandler(e){this._actions.onItemClick(e)}_nestedItemOnItemRenderedHandler(e){this._actions.onItemRendered(e)}_attachSubmenuHandlers(e,t){const i=t.getOverlayContent().find(`.${O}`),a=(0,s.addNamespace)(o.end,`${this.NAME}_submenu`);t.option({onShowing:this._submenuOnShowingHandler.bind(this,e,t),onShown:this._submenuOnShownHandler.bind(this,e,t),onHiding:this._submenuOnHidingHandler.bind(this,e,t),onHidden:this._submenuOnHiddenHandler.bind(this,e,t)}),(0,h.each)(i,((t,i)=>{n.default.off(i,a),n.default.on(i,a,null,this._submenuMouseLeaveHandler.bind(this,e))}))}_submenuOnShowingHandler(e,t,i){let{rootItem:n}=i;const o=e.children(`.${A}`),a=this._getVisibilityChangeEventParams(n,t,e);this._actions.onSubmenuShowing(a),o.show(),e.addClass(E)}_submenuOnShownHandler(e,t,i){let{rootItem:n}=i;const o=this._getVisibilityChangeEventParams(n,t,e);this._actions.onSubmenuShown(o)}_submenuOnHidingHandler(e,t,i){const n=e.children(`.${A}`),o=this._getVisibilityChangeEventParams(i.rootItem,t,e,!0);i.itemData=o.itemData,i.rootItem=o.rootItem,i.submenuContainer=o.submenuContainer,i.submenu=o.submenu,this._actions.onSubmenuHiding(i),i.cancel||(this._visibleSubmenu===t&&(this._visibleSubmenu=null),n.hide(),e.removeClass(E))}_submenuOnHiddenHandler(e,t,i){let{rootItem:n}=i;const o=this._getVisibilityChangeEventParams(n,t,e,!0);this._actions.onSubmenuHidden(o)}_getVisibilityChangeEventParams(e,t,i,n){let o,a;if(e){const t=n?(0,d.default)(e).closest(`.${D}`)[0]:e;o=this._getItemData(t),a=(0,d.default)(t).find(`.${O}`).first()}else{const e=(0,d.default)(t._overlay.content());o=this._getItemData(i),a=e.find(`.${O}`).first()}return{itemData:o,rootItem:(0,l.getPublicElement)(i),submenuContainer:(0,l.getPublicElement)(a),submenu:t}}_submenuMouseLeaveHandler(e,t){const i=(0,d.default)(t.relatedTarget).parents(`.${T}`)[0],n=this._getSubmenuByRootElement(e).getOverlayContent()[0];this.option("hideSubmenuOnMouseLeave")&&i!==n&&(this._clearTimeouts(),setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide")))}_hideSubmenuAfterTimeout(){if(!this._visibleSubmenu)return;const e=(0,d.default)(this._visibleSubmenu.$element().context).hasClass(P),t=this._visibleSubmenu.getOverlayContent().find(`.${P}`).length;this._visibleSubmenu.getOverlayContent().get(0).querySelector(":hover")||t||e||this._visibleSubmenu.hide()}_getSubmenuByRootElement(e){if(!e)return!1;const t=e.children(`.${T}`);return t.length&&y.default.getInstance(t)}getSubmenuPosition(e){const t=this._isMenuHorizontal(),i=this.option("submenuDirection").toLowerCase(),n=this.option("rtlEnabled"),o={collision:"flip",of:e,precise:!0};switch(i){case"leftortop":o.at="left top",o.my=t?"left bottom":"right top";break;case"rightorbottom":o.at=t?"left bottom":"right top",o.my="left top";break;default:t?(o.at=n?"right bottom":"left bottom",o.my=n?"right top":"left top"):(o.at=n?"left top":"right top",o.my=n?"right top":"left top")}return o}_renderBorderElement(e){(0,d.default)("<div>").appendTo(e).addClass(A).hide()}_itemPointerDownHandler(e){(0,d.default)(e.target).closest(this._itemElements()).hasClass("dx-menu-item-has-submenu")?this.option("focusedElement",null):super._itemPointerDownHandler(e)}_hoverStartHandler(e){const t=(0,s.addNamespace)(a.default.move,this.NAME),i=this._getItemElementByEventArgs(e),o=this._dataAdapter.getNodeByItem(this._getItemData(i)),r=(0,g.isDefined)(e.buttons)&&1===e.buttons||!(0,g.isDefined)(e.buttons)&&1===e.which;if(!this._isItemDisabled(i))if(n.default.off(i,t),this._hasChildren(o)){if("onHover"===this._getShowFirstSubmenuMode()&&!r){const e=this._getSubmenuByElement(i);this._clearTimeouts(),e.isOverlayVisible()||(n.default.on(i,t,this._itemMouseMoveHandler.bind(this)),this._showSubmenuTimer=this._getDelay("hide"))}}else this._showSubmenuTimer=setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide"))}_hoverEndHandler(e){const t=this._getItemElementByEventArgs(e),i=(0,d.default)(e.relatedTarget);super._hoverEndHandler(e),this._clearTimeouts(),this._isItemDisabled(t)||i.hasClass("dx-context-menu-content-delimiter")||this.option("hideSubmenuOnMouseLeave")&&!i.hasClass(I)&&(this._hideSubmenuTimer=setTimeout((()=>{this._hideSubmenuAfterTimeout()}),this._getDelay("hide")))}_hideVisibleSubmenu(){return!!this._visibleSubmenu&&(this._hideSubmenu(this._visibleSubmenu),!0)}_showSubmenu(e){const t=this._getSubmenuByElement(e);this._visibleSubmenu!==t&&this._hideVisibleSubmenu(),t&&(this._clearTimeouts(),this.focus(),t.show(),this.option("focusedElement",t.option("focusedElement"))),this._visibleSubmenu=t,this._hoveredRootItem=e}_hideSubmenu(e){e&&e.hide(),this._visibleSubmenu===e&&(this._visibleSubmenu=null),this._hoveredRootItem=null}_itemMouseMoveHandler(e){if(e.pointers&&e.pointers.length)return;const t=(0,d.default)(e.currentTarget);(0,g.isDefined)(this._showSubmenuTimer)&&(this._clearTimeouts(),this._showSubmenuTimer=setTimeout((()=>{const e=this._getSubmenuByElement(t);e&&!e.isOverlayVisible()&&this._showSubmenu(t)}),this._getDelay("show")))}_clearTimeouts(){clearTimeout(this._hideSubmenuTimer),clearTimeout(this._showSubmenuTimer)}_getSubmenuByElement(e,t){const i=this._getSubmenuByRootElement(e);if(i)return i;t=t??this._getItemData(e);const n=this._dataAdapter.getNodeByItem(t);return this._hasChildren(n)&&this._renderSubmenuItems(n,e)}_updateSubmenuVisibilityOnClick(e){const t=e.args.length&&e.args[0];if(!t||this._disabledGetter(t.itemData))return;const i=(0,d.default)(t.itemElement),n=this._getSubmenuByElement(i,t.itemData);if(this._updateSelectedItemOnClick(e),this._visibleSubmenu){if(this._visibleSubmenu===n)return void("onClick"===this.option("showFirstSubmenuMode")&&this._hideSubmenu(this._visibleSubmenu));this._hideSubmenu(this._visibleSubmenu)}n&&(n.isOverlayVisible()||this._showSubmenu(i))}_optionChanged(e){if(H.includes(e.name))this._initActions();else switch(e.name){case"orientation":case"submenuDirection":this._invalidate();break;case"showFirstSubmenuMode":case"hideSubmenuOnMouseLeave":break;case"showSubmenuMode":this._changeSubmenusOption(e.name,e.value);break;case"adaptivityEnabled":e.value?this._initAdaptivity():this._removeAdaptivity();break;case"width":this._isAdaptivityEnabled()&&(this._treeView.option(e.name,e.value),this._overlay.option(e.name,e.value)),super._optionChanged(e),this._dimensionChanged();break;case"animation":this._isAdaptivityEnabled()&&this._treeView.option("animationEnabled",!!e.value),super._optionChanged(e);break;default:!this._isAdaptivityEnabled()||e.name!==e.fullName&&"items"!==e.name||this._treeView.option(e.fullName,e.value),super._optionChanged(e)}}_changeSubmenusOption(e,t){(0,h.each)(this._submenus,((i,n)=>{n.option(e,t)}))}selectItem(e){this._hideSubmenu(this._visibleSubmenu),super.selectItem(e)}unselectItem(e){this._hideSubmenu(this._visibleSubmenu),super.unselectItem(e)}}(0,r.default)("dxMenu",N);t.default=N},72878:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(34378);var n=u(i(3030)),o=i(61404),a=u(i(64553)),s=i(17781),r=i(52576),l=i(57653),d=u(i(66900));function u(e){return e&&e.__esModule?e:{default:e}}class c extends d.default{_getDefaultOptions(){return(0,r.extend)(super._getDefaultOptions(),{orientation:"horizontal",tabIndex:null,onHoverStart:s.noop})}_initDataAdapter(){this._dataAdapter=this.option("_dataAdapter"),this._dataAdapter||super._initDataAdapter()}_renderContentImpl(){this._renderContextMenuOverlay(),super._renderContentImpl();const e=this._dataAdapter.getNodeByKey(this.option("_parentKey"));e&&this._renderItems(this._getChildNodes(e)),this._renderDelimiter()}_renderDelimiter(){this.$contentDelimiter=(0,a.default)("<div>").appendTo(this._itemContainer()).addClass("dx-context-menu-content-delimiter")}_getOverlayOptions(){return(0,r.extend)(!0,super._getOverlayOptions(),{onPositioned:this._overlayPositionedActionHandler.bind(this),position:{precise:!0}})}_overlayPositionedActionHandler(e){this._showDelimiter(e)}_hoverEndHandler(e){super._hoverEndHandler(e),this._toggleFocusClass(!1,e.currentTarget)}_isMenuHorizontal(){return"horizontal"===this.option("orientation")}_hoverStartHandler(e){this.option("onHoverStart")(e),super._hoverStartHandler(e),this._toggleFocusClass(!0,e.currentTarget)}_drawSubmenu(e){this._actions.onShowing({rootItem:(0,o.getPublicElement)(e),submenu:this}),super._drawSubmenu(e),this._actions.onShown({rootItem:(0,o.getPublicElement)(e),submenu:this})}_hideSubmenu(e){this._actions.onHiding({cancel:!0,rootItem:(0,o.getPublicElement)(e),submenu:this}),super._hideSubmenu(e),this._actions.onHidden({rootItem:(0,o.getPublicElement)(e),submenu:this})}_showDelimiter(e){if(!this.$contentDelimiter)return;const t=this._itemContainer().children(".dx-submenu").eq(0),i=this.option("position").of.find(".dx-context-menu-container-border"),o={of:t,precise:!0},a=e.position,s=a.v.location,r=a.h.location,d=i.offset(),u=Math.round(d.left),c=Math.round(d.top),h=(0,l.getWidth)(i),p=(0,l.getHeight)(i),g=(0,l.getWidth)(t),_=(0,l.getHeight)(t);this.$contentDelimiter.css("display","block"),(0,l.setWidth)(this.$contentDelimiter,this._isMenuHorizontal()?h<g?h:g:3),(0,l.setHeight)(this.$contentDelimiter,this._isMenuHorizontal()?3:p<_?p:_),this._isMenuHorizontal()?s>c?Math.round(r)===u?(o.offset="0 -2.5",o.at=o.my="left top"):(o.offset="0 -2.5",o.at=o.my="right top"):((0,l.setHeight)(this.$contentDelimiter,5),Math.round(r)===u?(o.offset="0 5",o.at=o.my="left bottom"):(o.offset="0 5",o.at=o.my="right bottom")):r>u?Math.round(s)===c?(o.offset="-2.5 0",o.at=o.my="left top"):(o.offset="-2.5 0",o.at=o.my="left bottom"):Math.round(s)===c?(o.offset="2.5 0",o.at=o.my="right top"):(o.offset="2.5 0",o.at=o.my="right bottom"),n.default.setup(this.$contentDelimiter,o)}_getContextMenuPosition(){return this.option("position")}isOverlayVisible(){return this._overlay.option("visible")}getOverlayContent(){return this._overlay.$content()}}t.default=c},68128:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.animation=t._translator=void 0;var n=i(16826),o=i(88603);t._translator={move(e,t){(0,o.move)(e,{left:t})}},t.animation={moveTo(e,t,i,o){n.fx.animate(e,{type:"slide",to:{left:t},duration:i,complete:o})},complete(e){n.fx.stop(e,!0)}}},21265:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=m(i(92774)),o=i(98834),a=m(i(4671)),s=m(i(65951)),r=m(i(64960)),l=m(i(64553)),d=m(i(48314)),u=i(17781),c=i(87739),h=i(52576),p=i(50254),g=i(11528),_=m(i(55790)),f=m(i(1979));function m(e){return e&&e.__esModule?e:{default:e}}const v=Math,C=["tab","del","backspace","leftArrow","rightArrow","home","end","enter"],y=_.default.inherit({_supportedKeys(){return(0,h.extend)(this.callBase(),{upArrow(e){(0,o.isCommandKeyPressed)(e)||(e.preventDefault(),e.stopPropagation(),this._spinUpChangeHandler(e))},downArrow(e){(0,o.isCommandKeyPressed)(e)||(e.preventDefault(),e.stopPropagation(),this._spinDownChangeHandler(e))},enter(){}})},_getDefaultOptions(){return(0,h.extend)(this.callBase(),{value:0,min:void 0,max:void 0,step:1,showSpinButtons:!1,useLargeSpinButtons:!0,mode:"text",invalidValueMessage:a.default.format("dxNumberBox-invalidValueMessage"),buttons:void 0})},_useTemplates:()=>!1,_getDefaultButtons(){return this.callBase().concat([{name:"spins",Ctor:f.default}])},_isSupportInputMode(){const e=parseFloat(d.default.version);return d.default.chrome&&e>=66||d.default.safari&&e>=12},_defaultOptionsRules(){return this.callBase().concat([{device:()=>s.default.real().generic&&!s.default.isSimulator(),options:{useLargeSpinButtons:!1}},{device:function(){return"desktop"!==s.default.real().deviceType&&!this._isSupportInputMode()}.bind(this),options:{mode:"number"}}])},_initMarkup(){this._renderSubmitElement(),this.$element().addClass("dx-numberbox"),this.callBase()},_getDefaultAttributes(){const e=this.callBase();return e.inputmode="decimal",e},_renderContentImpl(){this.option("isValid")&&this._validateValue(this.option("value")),this.setAria("role","spinbutton")},_renderSubmitElement(){this._$submitElement=(0,l.default)("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue(e){this._getSubmitElement().val((0,u.applyServerDecimalSeparator)(e))},_getSubmitElement(){return this._$submitElement},_keyPressHandler(e){this.callBase(e);const t=(0,o.getChar)(e);if(!/[\d.,eE\-+]/.test(t)){const t=(0,o.normalizeKeyName)(e);if((0,o.isCommandKeyPressed)(e)||t&&C.includes(t))return;return e.preventDefault(),!1}this._keyPressed=!0},_onMouseWheel(e){e.delta>0?this._spinValueChange(1,e):this._spinValueChange(-1,e)},_renderValue(){const e=this._input().val(),t=this.option("value");e.length&&Number(e)===t||(this._forceValueRender(),this._toggleEmptinessEventHandler());const i=(0,g.isDefined)(t)?null:a.default.format("dxNumberBox-noDataText");return this.setAria({valuenow:(0,u.ensureDefined)(t,""),valuetext:i}),this.option("text",this._input().val()),this._updateButtons(),(0,c.Deferred)().resolve()},_forceValueRender(){const e=this.option("value"),t=Number(e),i=isNaN(t)?"":this._applyDisplayValueFormatter(e);this._renderDisplayText(i)},_applyDisplayValueFormatter(e){return this.option("displayValueFormatter")(e)},_renderProps(){this._input().prop({min:this.option("min"),max:this.option("max"),step:this.option("step")}),this.setAria({valuemin:(0,u.ensureDefined)(this.option("min"),""),valuemax:(0,u.ensureDefined)(this.option("max"),"")})},_spinButtonsPointerDownHandler(){const e=this._input();this.option("useLargeSpinButtons")||r.default.getActiveElement()===e[0]||n.default.trigger(e,"focus")},_spinUpChangeHandler(e){this.option("readOnly")||this._spinValueChange(1,e.event||e)},_spinDownChangeHandler(e){this.option("readOnly")||this._spinValueChange(-1,e.event||e)},_spinValueChange(e,t){const i=parseFloat(this.option("step"));if(0===i)return;let n=parseFloat(this._normalizeInputValue())||0;n=this._correctRounding(n,i*e);const o=this.option("min"),a=this.option("max");(0,g.isDefined)(o)&&(n=Math.max(o,n)),(0,g.isDefined)(a)&&(n=Math.min(a,n)),this._saveValueChangeEvent(t),this.option("value",n)},_correctRounding(e,t){const i=/[,.](.*)/,n=i.test(e),o=i.test(t);if(n||o){const a=n?i.exec(e)[0].length:0,s=o?i.exec(t)[0].length:0,r=v.max(a,s);return e=this._round(e+t,r)}return e+t},_round(e,t){const i=10**(t=t||0);return e*=i,e=Math.round(e)/i},_renderValueChangeEvent(){this.callBase();const e=(0,o.addNamespace)("focusout","NumberBoxForceValueChange");n.default.off(this.element(),e),n.default.on(this.element(),e,this._forceRefreshInputValue.bind(this))},_forceRefreshInputValue(){if("number"===this.option("mode"))return;const e=this._input(),t=this._applyDisplayValueFormatter(this.option("value"));e.val(null),e.val(t)},_valueChangeEventHandler(e){const t=this._input(),i=this._normalizeText(),n=this._parseValue(i),o="."!==i&&"-"!==i;!this._isValueValid()||this._validateValue(n)?(o&&this.callBase(e,isNaN(n)?null:n),this._applyValueBoundaries(i,n),this.validationRequest.fire({value:n,editor:this})):t.val(this._applyDisplayValueFormatter(n))},_applyValueBoundaries(e,t){const i=this._isValueIncomplete(e),n=this._isValueInRange(e);i||n||null===t||Number(e)!==t&&this._input().val(this._applyDisplayValueFormatter(t))},_replaceCommaWithPoint:e=>e.replace(",","."),_inputIsInvalid(){const e="number"===this.option("mode"),t=this._input().get(0).validity;return e&&t&&t.badInput},_renderDisplayText(e){this._inputIsInvalid()||this.callBase(e)},_isValueIncomplete:e=>/(^-$)|(^-?\d*\.$)|(\d+e-?$)/i.test(e),_isValueInRange(e){return(0,p.inRange)(e,this.option("min"),this.option("max"))},_isNumber(e){return null!==this._parseValue(e)},_validateValue(e){const t=this._normalizeText(),i=this._isValueValid();let n=!0;const o=this._isNumber(t);return isNaN(Number(e))&&(n=!1),!e&&i?n=!0:o||i||(n=!1),this.option({isValid:n,validationError:n?null:{editorSpecific:!0,message:this.option("invalidValueMessage")}}),n},_normalizeInputValue(){return this._parseValue(this._normalizeText())},_normalizeText(){const e=this._input().val().trim();return this._replaceCommaWithPoint(e)},_parseValue(e){const t=parseFloat(e);return isNaN(t)?null:(0,p.fitIntoRange)(t,this.option("min"),this.option("max"))},_clearValue(){this._inputIsInvalid()&&(this._input().val(""),this._validateValue()),this.callBase()},clear(){null===this.option("value")?(this.option("text",""),this._input().length&&this._renderValue()):this.option("value",null)},_optionChanged(e){switch(e.name){case"value":this._validateValue(e.value),this._setSubmitValue(e.value),this.callBase(e),this._resumeValueChangeAction();break;case"step":this._renderProps();break;case"min":case"max":this._renderProps(),this.option("value",this._parseValue(this.option("value")));break;case"showSpinButtons":case"useLargeSpinButtons":this._updateButtons(["spins"]);break;case"invalidValueMessage":break;default:this.callBase(e)}}});t.default=y},86445:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getCaretBoundaries=t.getCaretAfterFormat=void 0,t.getCaretInBoundaries=p,t.isCaretInBoundaries=t.getCaretWithOffset=t.getCaretOffset=void 0;var n,o=(n=i(52771))&&n.__esModule?n:{default:n},a=i(17781),s=i(50254),r=i(8758);const l=function(e,t){if("string"==typeof t){const i=t.split(";"),n=o.default.getSign(e,t);i[1]=i[1]||`-${i[0]}`;t=(e=>e.replace(/'([^']*)'/g,(e=>e.split("").map((()=>" ")).join("").substr(2))))(t=i[n<0?1:0]);const a=/^[^#0.,]*/.exec(t)[0].length,s=/[^#0.,]*$/.exec(t)[0].length;return{start:a,end:e.length-s}}return{start:0,end:e.length}};t.getCaretBoundaries=l;const d=function(e,t){const i=o.default.getDecimalSeparator(),n=new RegExp(`[^0-9${(0,a.escapeRegExp)(i)}]`,"g");return t.slice(0,e).replace(n,"").length},u=function(e){return e.split("").reverse().join("")},c=function(e,t){if(!e)return-1;const i=/[0-9]/g;let n=1,o=null,a=i.exec(t);for(;a;){if(o=a.index,n>=e)return o;n++,a=i.exec(t)}return null===o?t.length:o},h=function(e,t){return void 0===e.start&&(e={start:e,end:e}),{start:e.start+t,end:e.end+t}};t.getCaretWithOffset=h;t.getCaretAfterFormat=function(e,t,i,n){i=h(i,0);const a=o.default.getDecimalSeparator(),s=function(e){return 1===e.length&&!!e.match(/^[,.][0-9]*$/g)}(e),l=(0,r.getRealSeparatorIndex)(n).occurrence,g=s?0:(0,r.getNthOccurrence)(e,a,l),_=(0,r.getNthOccurrence)(t,a,l),f=(0,r.splitByIndex)(e,g),m=(0,r.splitByIndex)(t,_);if(-1!==g&&i.start>g){const e=i.start-g-1,o=d(e,f[1]);return p(m[1]?_+1+c(o,m[1])+1:t.length,t,n)}const v=function(e){return e.replace(/[^0-9e]+$/,"")}(m[0]),C=f[0].length-i.start,y=d(C,u(f[0])),b=c(y,u(v));return p(v.length-(b+1),t,n)};function p(e,t,i){e=h(e,0);const n=l(t,i);return{start:(0,s.fitIntoRange)(e.start,n.start,n.end),end:(0,s.fitIntoRange)(e.end,n.start,n.end)}}t.isCaretInBoundaries=function(e,t,i){const n=p(e=h(e,0),t,i);return e.start>=n.start&&e.end<=n.end};t.getCaretOffset=function(e,t,i){const n=l(e,i);return l(t,i).start-n.start}},42284:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(i(92848)),o=a(i(37148));function a(e){return e&&e.__esModule?e:{default:e}}(0,n.default)("dxNumberBox",o.default);t.default=o.default},37148:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(i(92774)),o=i(5636),a=i(98834),s=i(33687),r=f(i(52771)),l=f(i(65951)),d=i(17781),u=i(52576),c=i(50254),h=i(11528),p=f(i(21265)),g=i(86445),_=i(8758);function f(e){return e&&e.__esModule?e:{default:e}}const m="dxNumberFormatter",v="minus",C=p.default.inherit({_getDefaultOptions(){return(0,u.extend)(this.callBase(),{useMaskBehavior:!0,format:null})},_isDeleteKey:e=>"del"===e,_supportedKeys(){if(!this._useMaskBehavior())return this.callBase();const e=this;return(0,u.extend)(this.callBase(),{minus:e._revertSign.bind(e),del:e._removeHandler.bind(e),backspace:e._removeHandler.bind(e),leftArrow:e._arrowHandler.bind(e,-1),rightArrow:e._arrowHandler.bind(e,1),home:e._moveCaretToBoundaryEventHandler.bind(e,1),enter:e._updateFormattedValue.bind(e),end:e._moveCaretToBoundaryEventHandler.bind(e,-1)})},_getTextSeparatorIndex(e){const t=r.default.getDecimalSeparator(),i=(0,_.getRealSeparatorIndex)(this.option("format")).occurrence;return(0,_.getNthOccurrence)(e,t,i)},_focusInHandler(e){this._preventNestedFocusEvent(e)||(this.clearCaretTimeout(),this._caretTimeout=setTimeout((()=>{this._caretTimeout=void 0;const t=this._caret();if(t.start===t.end&&this._useMaskBehavior()){const t=this._getInputVal(),i=this._getTextSeparatorIndex(t);i>=0?this._caret({start:i,end:i}):this._moveCaretToBoundaryEventHandler(-1,e)}}),0)),this.callBase(e)},_focusOutHandler(e){const t=!this._preventNestedFocusEvent(e);t&&(this._focusOutOccurs=!0,this._useMaskBehavior()&&this._updateFormattedValue()),this.callBase(e),t&&(this._focusOutOccurs=!1)},_hasValueBeenChanged(e){const t=this._getFormatPattern(),i=this.option("value");return(this._format(i,t)||"")!==e},_updateFormattedValue(){const e=this._getInputVal();this._hasValueBeenChanged(e)&&(this._updateParsedValue(),this._adjustParsedValue(),this._setTextByParsedValue(),this._parsedValue!==this.option("value")&&n.default.trigger(this._input(),"change"))},_arrowHandler(e,t){if(!this._useMaskBehavior())return;const i=this._getInputVal(),n=this._getFormatPattern();let o=(0,g.getCaretWithOffset)(this._caret(),e);(0,g.isCaretInBoundaries)(o,i,n)||(o=1===e?o.end:o.start,t.preventDefault(),this._caret((0,g.getCaretInBoundaries)(o,i,n)))},_moveCaretToBoundary(e){const t=(0,g.getCaretBoundaries)(this._getInputVal(),this._getFormatPattern()),i=(0,g.getCaretWithOffset)(1===e?t.start:t.end,0);this._caret(i)},_moveCaretToBoundaryEventHandler(e,t){!this._useMaskBehavior()||t&&t.shiftKey||(this._moveCaretToBoundary(e),t&&t.preventDefault())},_shouldMoveCaret(e,t){const i=r.default.getDecimalSeparator(),n=e.charAt(t.end)===i;return(this._lastKey===i||"."===this._lastKey||","===this._lastKey)&&n},_getInputVal(){return r.default.convertDigits(this._input().val(),!0)},_keyboardHandler(e){if(this.clearCaretTimeout(),this._lastKey=r.default.convertDigits((0,a.getChar)(e),!0),this._lastKeyName=(0,a.normalizeKeyName)(e),!this._shouldHandleKey(e.originalEvent))return this.callBase(e);const t=this._getInputVal(),i=this._caret();let n;n=this._lastKeyName===v?"":110===e.which?r.default.getDecimalSeparator():this._lastKey;const o=this._tryParse(t,i,n);return this._shouldMoveCaret(t,i)&&(this._moveCaret(1),e.originalEvent.preventDefault()),void 0===o?this._lastKeyName!==v&&e.originalEvent.preventDefault():this._parsedValue=o,this.callBase(e)},_keyPressHandler(e){this._useMaskBehavior()||this.callBase(e)},_removeHandler(e){const t=this._caret(),i=this._getInputVal();let{start:o}=t,{end:s}=t;this._lastKey=(0,a.getChar)(e),this._lastKeyName=(0,a.normalizeKeyName)(e);const l=this._isDeleteKey(this._lastKeyName),d=!l;if(o===s){if(!(d&&o>0||l&&o<i.length))return void e.preventDefault();l&&s++,d&&o--}const u=i.slice(o,s);if(this._isStub(u)){if(this._moveCaret(l?1:-1),this._parsedValue<0||1/this._parsedValue==-1/0){this._revertSign(e),this._setTextByParsedValue();this.option("valueChangeEvent").split(" ").includes("input")&&n.default.trigger(this._input(),"input")}return void e.preventDefault()}const c=r.default.getDecimalSeparator();if(u===c){const t=i.indexOf(c);return void(this._isNonStubAfter(t+1)&&(this._moveCaret(l?1:-1),e.preventDefault()))}if(s-o<i.length){if(this._replaceSelectedText(i,{start:o,end:s},"").search(/[0-9]/)<0&&this._isValueInRange(0))return void(this._parsedValue=this._parsedValue<0||1/this._parsedValue==-1/0?-0:0)}const h=this._tryParse(i,{start:o,end:s},"");void 0===h?e.preventDefault():this._parsedValue=h},_isPercentFormat(){return-1!==this._getFormatPattern().replace(/'[^']+'/g,"").indexOf("%")},_parse(e,t){const i=this.option("format"),n=(0,h.isFunction)(i.parser),o=n?i.parser:r.default.parse;let a=0;if(!n){const i=(0,_.getRealSeparatorIndex)(t).index,n=this._getTextSeparatorIndex(e),o=-1!==i?i:t.length,s=-1!==n?n:e.length;s>o&&-1===t.indexOf("#")&&(a=s-o)}return o(e=e.substr(a),t)},_format(e,t){const i=this.option("format"),n=(null==i?void 0:i.formatter)||i,o=(0,h.isFunction)(n)?n:r.default.format;return null===e?"":o(e,t)},_getFormatPattern(){return this._currentFormat||this._updateFormat(),this._currentFormat},_updateFormat(){const e=this.option("format"),t=(0,h.isFunction)(null==e?void 0:e.parser),i=(0,h.isString)(e)&&(e.includes("0")||e.includes("#")),n="exponential"===e||"exponential"===(null==e?void 0:e.type),o=t||i||n;this._currentFormat=o?e:(0,s.getFormat)((t=>{const i=this._format(t,e);return r.default.convertDigits(i,!0)}))},_getFormatForSign(e){const t=this._getFormatPattern();if((0,h.isString)(t)){const i=t.split(";"),n=r.default.getSign(e,t);return i[1]=i[1]||`-${i[0]}`,n<0?i[1]:i[0]}return r.default.getSign(e)<0?"-":""},_removeStubs(e,t){const i=this._getFormatForSign(e),n=r.default.getThousandsSeparator(),o=this._getStubs(i);let a=e;if(o.length){const e=o[0],i=new RegExp(`(${(0,d.escapeRegExp)(o[1]||"")})$`,"g"),s=new RegExp(`[-${(0,d.escapeRegExp)(t?"":n)}]`,"g");a=a.replace(e,"").replace(i,"").replace(s,"")}return a},_getStubs(e){const t=/[^']([#0.,]+)/g.exec(e),i=t&&t[0].trim();return e.split(i).map((e=>e.replace(/'/g,"")))},_truncateToPrecision(e,t){if((0,h.isDefined)(e)){const i=e.toString(),n=i.indexOf(".");if(i&&n>-1){const o=parseFloat(i.substr(0,n+t+1));return isNaN(o)?e:o}}return e},_tryParse(e,t,i){const n=t.start!==t.end,o=n&&0===t.start&&t.end===e.length,a=r.default.getDecimalSeparator();if(o&&i===a)return 0;const s=this._replaceSelectedText(e,t,i),l=this._getFormatPattern();let d=this._getParsedValue(s,l);const u=!l.parser&&this._getPrecisionLimits(s).max,c=d!==this._parsedValue,h=i===a&&0===u,p=!n&&!c&&"-"!==i&&this._isStub(i);if(h||p)return;if(""===this._removeStubs(s)&&(d=Math.abs(0*this._parsedValue)),isNaN(d))return;const g=null===d?this._parsedValue:d;return d=u?this._truncateToPrecision(g,u):d,!l.parser&&this._isPercentFormat()?(0,_.adjustPercentValue)(d,u):d},_getParsedValue(e,t){const i=r.default.getSign(e,(null==t?void 0:t.formatter)||t),n=this._removeStubs(e,!0),o=this._parse(n,t),a=o<0?-1:1;return(0,h.isNumeric)(o)&&i!==a?i*o:o},_isValueIncomplete(e){if(!this._useMaskBehavior())return this.callBase(e);const t=this._caret(),i=r.default.getDecimalSeparator(),n=this._getTextSeparatorIndex(e),o=n>=0&&n<t.start,a=this._removeStubs(e,!0).split(i);if(!o||2!==a.length)return!1;const s=a[1].length,l=!!this._getFormatPattern().parser,d=!l&&this._getPrecisionLimits(this._getFormatPattern(),e),u=!!l||(0,c.inRange)(s,d.min,d.max),h="0"===a[1].charAt(s-1);return u&&(h||!s)},_isValueInRange(e){const t=(0,d.ensureDefined)(this.option("min"),-1/0),i=(0,d.ensureDefined)(this.option("max"),1/0);return(0,c.inRange)(e,t,i)},_setInputText(e){const t=r.default.convertDigits(e,!0),i=(0,g.getCaretAfterFormat)(this._getInputVal(),t,this._caret(),this._getFormatPattern());this._input().val(e),this._toggleEmptinessEventHandler(),this._formattedValue=e,this._focusOutOccurs||this._caret(i)},_useMaskBehavior(){return!!this.option("format")&&this.option("useMaskBehavior")},_renderInputType(){const e="number"===this.option("mode"),t="desktop"===l.default.real().deviceType;this._useMaskBehavior()&&e?this._setInputType(t||this._isSupportInputMode()?"text":"tel"):this.callBase()},_isChar:e=>(0,h.isString)(e)&&1===e.length,_moveCaret(e){if(!e)return;const t=(0,g.getCaretWithOffset)(this._caret(),e),i=(0,g.getCaretInBoundaries)(t,this._getInputVal(),this._getFormatPattern());this._caret(i)},_shouldHandleKey(e){const t=(0,a.normalizeKeyName)(e),i=(0,a.isCommandKeyPressed)(e)||e.altKey||e.shiftKey||!this._isChar(t),n=t===v;return this._useMaskBehavior()&&!i&&!n},_renderInput(){this.callBase(),this._renderFormatter()},_renderFormatter(){this._clearCache(),this._detachFormatterEvents(),this._useMaskBehavior()&&this._attachFormatterEvents()},_detachFormatterEvents(){n.default.off(this._input(),`.${m}`)},_isInputFromPaste(e){const t=e.originalEvent&&e.originalEvent.inputType;return(0,h.isDefined)(t)?"insertFromPaste"===t:this._isValuePasted},_attachFormatterEvents(){const e=this._input();n.default.on(e,(0,a.addNamespace)("input",m),(e=>{this._formatValue(e),this._isValuePasted=!1})),n.default.on(e,(0,a.addNamespace)("dxclick",m),(()=>{this._caretTimeout||(this._caretTimeout=setTimeout((()=>{this._caretTimeout=void 0,this._caret((0,g.getCaretInBoundaries)(this._caret(),this._getInputVal(),this._getFormatPattern()))}),0))})),n.default.on(e,o.name,(()=>{this.clearCaretTimeout()}))},clearCaretTimeout(){clearTimeout(this._caretTimeout),this._caretTimeout=void 0},_forceRefreshInputValue(){if(!this._useMaskBehavior())return this.callBase()},_isNonStubAfter(e){const t=this._getInputVal().slice(e);return t&&!this._isStub(t,!0)},_isStub(e,t){const i=(0,d.escapeRegExp)(r.default.getDecimalSeparator());return new RegExp(`^[^0-9${i}]+$`,"g").test(e)&&(t||this._isChar(e))},_parseValue(e){return this._useMaskBehavior()?this._parsedValue:this.callBase(e)},_getPrecisionLimits(e){const t=this._getFormatForSign(e),i=(0,_.getRealSeparatorIndex)(t).index,n=((0,_.splitByIndex)(t,i)[1]||"").replace(/[^#0]/g,"");return{min:n.replace(/^(0*)#*/,"$1").length,max:n.length}},_revertSign(e){if(!this._useMaskBehavior())return;const t=this._caret();if(t.start!==t.end){if((0,a.normalizeKeyName)(e)===v)return void this._applyRevertedSign(e,t,!0);this._caret((0,g.getCaretInBoundaries)(0,this._getInputVal(),this._getFormatPattern()))}this._applyRevertedSign(e,t)},_applyRevertedSign(e,t,i){const n=-1*(0,d.ensureDefined)(this._parsedValue,null);if((this._isValueInRange(n)||0===n)&&(this._parsedValue=n,i)){const i=this._getFormatPattern(),n=this._getInputVal();this._setTextByParsedValue(),e.preventDefault();const o=this._getInputVal(),a=(0,g.getCaretOffset)(n,o,i);t=(0,g.getCaretWithOffset)(t,a);const s=(0,g.getCaretInBoundaries)(t,o,i);this._caret(s)}},_removeMinusFromText(e,t){return this._lastKeyName===v&&"-"===e.charAt(t.start-1)?this._replaceSelectedText(e,{start:t.start-1,end:t.start},""):e},_setTextByParsedValue(){const e=this._getFormatPattern(),t=this._parseValue(),i=this._format(t,e)||"";this._setInputText(i)},_formatValue(e){let t=this._getInputVal();const i=this._caret(),n=this._removeMinusFromText(t,i),o=n!==t;if(t=n,!this._isInputFromPaste(e)&&this._isValueIncomplete(n))return this._formattedValue=t,void(o&&this._setTextByParsedValue());if(r.default.convertDigits(this._formattedValue,!0)!==t){const e=this._tryParse(t,i,"");(0,h.isDefined)(e)&&(this._parsedValue=e)}this._setTextByParsedValue()},_renderDisplayText(){this._useMaskBehavior()?this._toggleEmptinessEventHandler():this.callBase.apply(this,arguments)},_renderValue(){return this._useMaskBehavior()&&(this._parsedValue=this.option("value"),this._setTextByParsedValue()),this.callBase()},_updateParsedValue(){const e=this._getInputVal();this._parsedValue=this._tryParse(e,this._caret())},_adjustParsedValue(){if(!this._useMaskBehavior())return;const e=this._removeStubs(this._getInputVal())?this._parseValue():null;(0,h.isNumeric)(e)?this._parsedValue=(0,c.fitIntoRange)(e,this.option("min"),this.option("max")):this._parsedValue=e},_valueChangeEventHandler(e){if(!this._useMaskBehavior())return this.callBase(e);const t=this._caret();this._saveValueChangeEvent(e),this._lastKey=null,this._lastKeyName=null,this._updateParsedValue(),this._adjustParsedValue(),this.option("value",this._parsedValue),t&&this._caret(t)},_optionChanged(e){switch(e.name){case"format":case"useMaskBehavior":this._renderInputType(),this._updateFormat(),this._renderFormatter(),this._renderValue(),this._refreshValueChangeEvent(),this._refreshEvents();break;case"min":case"max":this._adjustParsedValue(),this.callBase(e);break;default:this.callBase(e)}},_clearCache(){delete this._formattedValue,delete this._lastKey,delete this._lastKeyName,delete this._parsedValue,delete this._focusOutOccurs,clearTimeout(this._caretTimeout),delete this._caretTimeout},_clean(){this._clearCache(),this.callBase()}});t.default=C},47156:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(69331),o=p(i(92774)),a=p(i(68095)),s=p(i(89797)),r=i(98834),l=p(i(64960)),d=p(i(64553)),u=i(87739),c=i(52576),h=p(i(11118));function p(e){return e&&e.__esModule?e:{default:e}}const g="dxNumberBox",_=(0,r.addNamespace)(s.default.up,g),f=(0,r.addNamespace)(s.default.cancel,g),m=h.default.inherit({_getDefaultOptions(){return(0,c.extend)(this.callBase(),{direction:"up",onChange:null,activeStateEnabled:!0,hoverStateEnabled:!0})},_initMarkup(){this.callBase();const e=`dx-numberbox-spin-${this.option("direction")}`;this.$element().addClass("dx-numberbox-spin-button").addClass(e),this._spinIcon=(0,d.default)("<div>").addClass(`${e}-icon`).appendTo(this.$element())},_render(){this.callBase();const e=(0,r.addNamespace)(s.default.down,this.NAME),t=this.$element();o.default.off(t,e),o.default.on(t,e,this._spinDownHandler.bind(this)),this._spinChangeHandler=this._createActionByOption("onChange")},_spinDownHandler(e){e.preventDefault(),this._clearTimer(),o.default.on(this.$element(),a.default.name,(()=>{this._feedBackDeferred=(0,u.Deferred)(),(0,n.lock)(this._feedBackDeferred),this._spinChangeHandler({event:e}),this._holdTimer=setInterval(this._spinChangeHandler,100,{event:e})}));const t=l.default.getDocument();o.default.on(t,_,this._clearTimer.bind(this)),o.default.on(t,f,this._clearTimer.bind(this)),this._spinChangeHandler({event:e})},_dispose(){this._clearTimer(),this.callBase()},_clearTimer(){o.default.off(this.$element(),a.default.name);const e=l.default.getDocument();o.default.off(e,_),o.default.off(e,f),this._feedBackDeferred&&this._feedBackDeferred.resolve(),this._holdTimer&&clearInterval(this._holdTimer)},_optionChanged(e){switch(e.name){case"onChange":case"direction":this._invalidate();break;default:this.callBase(e)}}});t.default=m},1979:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(92774)),o=u(i(89797)),a=i(98834),s=u(i(64553)),r=i(52576),l=u(i(88244)),d=u(i(47156));function u(e){return e&&e.__esModule?e:{default:e}}class c extends l.default{_attachEvents(e,t){const{editor:i}=this,s=(0,a.addNamespace)(o.default.down,i.NAME),r=t.children(),l=i._createAction((e=>i._spinButtonsPointerDownHandler(e)));n.default.off(t,s),n.default.on(t,s,(e=>l({event:e}))),d.default.getInstance(r.eq(0)).option("onChange",(e=>i._spinUpChangeHandler(e))),d.default.getInstance(r.eq(1)).option("onChange",(e=>i._spinDownChangeHandler(e)))}_create(){const{editor:e}=this,t=(0,s.default)("<div>").addClass("dx-numberbox-spin-container"),i=(0,s.default)("<div>").appendTo(t),n=(0,s.default)("<div>").appendTo(t),o=this._getOptions();return this._addToContainer(t),e._createComponent(i,d.default,(0,r.extend)({direction:"up"},o)),e._createComponent(n,d.default,(0,r.extend)({direction:"down"},o)),this._legacyRender(e.$element(),this._isTouchFriendly(),o.visible),{instance:t,$element:t}}_getOptions(){const{editor:e}=this;return{visible:this._isVisible(),disabled:e.option("disabled")}}_isVisible(){const{editor:e}=this;return super._isVisible()&&e.option("showSpinButtons")}_isTouchFriendly(){const{editor:e}=this;return e.option("showSpinButtons")&&e.option("useLargeSpinButtons")}_legacyRender(e,t,i){e.toggleClass("dx-numberbox-spin-touch-friendly",t),e.toggleClass("dx-numberbox-spin",i)}update(){if(super.update()){const{editor:e,instance:t}=this,i=e.$element(),n=this._isVisible(),o=this._isTouchFriendly(),a=t.children(),s=d.default.getInstance(a.eq(0)),r=d.default.getInstance(a.eq(1)),l=this._getOptions();s.option(l),r.option(l),this._legacyRender(i,o,n)}}}t.default=c},8758:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.splitByIndex=t.getRealSeparatorIndex=t.getNthOccurrence=t.adjustPercentValue=void 0;var n=i(50254);t.getRealSeparatorIndex=function(e){let t=0,i=0;for(let n=0;n<e.length;++n)if("'"===e[n]&&t++,"."===e[n]&&(++i,t%2==0))return{occurrence:i,index:n};return{occurrence:1,index:-1}};t.getNthOccurrence=function(e,t,i){let n=-1;for(;i--&&n++<e.length;)n=e.indexOf(t,n);return n};t.splitByIndex=function(e,t){return-1===t?[e]:[e.slice(0,t),e.slice(t+1)]};t.adjustPercentValue=function(e,t){return e&&(0,n.adjust)(e/100,t)}},68632:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=i(83916),a=L(i(92774)),s=i(59144),r=L(i(89797)),l=i(42222),d=i(98834),u=i(18029),c=L(i(92848)),h=L(i(65951)),p=L(i(64960)),g=i(61404),_=L(i(87129)),f=L(i(64553)),m=i(48650),v=L(i(48314)),C=i(17781),y=i(87739),b=i(52576),x=i(21274),w=L(i(3122)),S=i(57653),D=i(11528),I=i(55355),E=i(35944),T=L(i(35185)),A=L(i(11118)),O=L(i(76400)),P=L(i(14470)),k=i(4983),M=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=R(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(84893));function R(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(R=function(e){return e?i:t})(e)}function L(e){return e&&e.__esModule?e:{default:e}}const B=w.default.add,V=P.default.getWindow(),F=I.changeCallback,H="dx-inner-overlay",N="dx-state-invisible",z=[],W="dx-prevent-safari-scrolling";B((()=>{a.default.subscribeGlobal(p.default.getDocument(),r.default.down,(e=>{for(let t=z.length-1;t>=0;t--)if(!z[t]._proxiedDocumentDownHandler(e))return}))}));const $=A.default.inherit({_supportedKeys(){return(0,b.extend)(this.callBase(),{escape(){this.hide()}})},_getDefaultOptions(){return(0,b.extend)(this.callBase(),{activeStateEnabled:!1,visible:!1,deferRendering:!0,shading:!0,shadingColor:"",wrapperAttr:{},position:(0,b.extend)({},k.OVERLAY_POSITION_ALIASES.center),width:"80vw",minWidth:null,maxWidth:null,height:"80vh",minHeight:null,maxHeight:null,animation:{show:{type:"pop",duration:300,from:{scale:.55}},hide:{type:"pop",duration:300,from:{opacity:1,scale:1},to:{opacity:0,scale:.55}}},closeOnOutsideClick:!1,hideOnOutsideClick:!1,_ignorePreventScrollEventsDeprecation:!1,onShowing:null,onShown:null,onHiding:null,onHidden:null,contentTemplate:"content",innerOverlay:!1,restorePosition:!0,container:void 0,visualContainer:void 0,hideTopOverlayHandler:()=>{this.hide()},hideOnParentScroll:!1,preventScrollEvents:!0,onPositioned:null,propagateOutsideClick:!1,ignoreChildEvents:!0,_checkParentVisibility:!0,_hideOnParentScrollTarget:void 0,_fixWrapperPosition:!1,_loopFocus:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>!P.default.hasWindow(),options:{width:null,height:null,animation:null,_checkParentVisibility:!1}}])},_setOptionsByReference(){this.callBase(),(0,b.extend)(this._optionsByReference,{animation:!0})},$wrapper(){return this._$wrapper},_eventBindingTarget(){return this._$content},_setDeprecatedOptions(){this.callBase(),(0,b.extend)(this._deprecatedOptions,{closeOnOutsideClick:{since:"22.1",alias:"hideOnOutsideClick"}})},ctor(e,t){this.callBase(e,t),t&&"preventScrollEvents"in t&&!t._ignorePreventScrollEventsDeprecation&&this._logDeprecatedPreventScrollEventsInfo()},_logDeprecatedPreventScrollEventsInfo(){this._logDeprecatedOptionWarning("preventScrollEvents",{since:"23.1",message:"If you enable this option, end-users may experience scrolling issues."})},_init(){this.callBase(),this._initActions(),this._initHideOnOutsideClickHandler(),this._initTabTerminatorHandler(),this._customWrapperClass=null,this._$wrapper=(0,f.default)("<div>").addClass("dx-overlay-wrapper"),this._$content=(0,f.default)("<div>").addClass("dx-overlay-content"),this._initInnerOverlayClass();this.$element().addClass("dx-overlay"),this._$wrapper.attr("data-bind","dxControlsDescendantBindings: true"),this._toggleViewPortSubscription(!0),this._initHideTopOverlayHandler(this.option("hideTopOverlayHandler")),this._parentsScrollSubscriptionInfo={handler:e=>{this._hideOnParentsScrollHandler(e)}},this.warnPositionAsFunction()},warnPositionAsFunction(){(0,D.isFunction)(this.option("position"))&&_.default.log("W0018")},_initInnerOverlayClass(){this._$content.toggleClass(H,this.option("innerOverlay"))},_initHideTopOverlayHandler(e){this._hideTopOverlayHandler=e},_getActionsList:()=>["onShowing","onShown","onHiding","onHidden","onPositioned","onVisualPositionChanged"],_initActions(){this._actions={};const e=this._getActionsList();(0,x.each)(e,((e,t)=>{this._actions[t]=this._createActionByOption(t,{excludeValidators:["disabled","readOnly"]})||C.noop}))},_initHideOnOutsideClickHandler(){var e=this;this._proxiedDocumentDownHandler=function(){return e._documentDownHandler(...arguments)}},_initMarkup(){this.callBase(),this._renderWrapperAttributes(),this._initPositionController()},_documentDownHandler(e){this._showAnimationProcessing&&this._stopAnimation();const t=(0,f.default)(V.document).is(e.target)||O.default.contains(V.document,e.target),i=(0,f.default)(e.target).closest(`.${H}`).length;return t&&!i&&!(this._$content.is(e.target)||O.default.contains(this._$content.get(0),e.target))&&this._shouldHideOnOutsideClick(e)&&this._outsideClickHandler(e),this.option("propagateOutsideClick")},_shouldHideOnOutsideClick(e){const{hideOnOutsideClick:t}=this.option();return(0,D.isFunction)(t)?t(e):t},_outsideClickHandler(e){this.option("shading")&&e.preventDefault(),this.hide()},_getAnonymousTemplateName:()=>"content",_initTemplates(){this._templateManager.addDefaultTemplates({content:new m.EmptyTemplate}),this.callBase()},_isTopOverlay(){const e=this._overlayStack();for(let t=e.length-1;t>=0;t--){const i=e[t]._findTabbableBounds();if(i.first||i.last)return e[t]===this}return!1},_overlayStack:()=>z,_zIndexInitValue:()=>$.baseZIndex(),_toggleViewPortSubscription(e){var t=this;F.remove(this._viewPortChangeHandle),e&&(this._viewPortChangeHandle=function(){t._viewPortChangeHandler(...arguments)},F.add(this._viewPortChangeHandle))},_viewPortChangeHandler(){this._positionController.updateContainer(this.option("container")),this._refresh()},_renderWrapperAttributes(){const{wrapperAttr:e}=this.option(),t=(0,b.extend)({},e),i=t.class;delete t.class,this.$wrapper().attr(t).removeClass(this._customWrapperClass).addClass(i),this._customWrapperClass=i},_renderVisibilityAnimate(e){return this._stopAnimation(),e?this._show():this._hide()},_getAnimationConfig(){return this._getOptionValue("animation",this)},_toggleBodyScroll:C.noop,_animateShowing(){var e=this;const t=this._getAnimationConfig()??{},i=this._normalizeAnimation(t.show,"to"),n=(null==i?void 0:i.start)??C.noop,o=(null==i?void 0:i.complete)??C.noop;this._animate(i,(function(){if(!e._isAnimationPaused){e.option("focusStateEnabled")&&a.default.trigger(e._focusTarget(),"focus");for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];o.call(e,...i),e._showAnimationProcessing=!1,e._isHidden=!1,e._actions.onShown(),e._toggleSafariScrolling(),e._showingDeferred.resolve()}}),(function(){if(!e._isAnimationPaused){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];n.call(e,...i),e._showAnimationProcessing=!0}}))},_processShowingHidingCancel(e,t,i){(0,D.isPromise)(e)?e.then((e=>{e?i():t()})).catch((()=>t())):e?i():t()},_show(){if(this._showingDeferred=(0,y.Deferred)(),this._parentHidden=this._isParentHidden(),this._showingDeferred.done((()=>{delete this._parentHidden})),this._parentHidden)return this._isHidden=!0,this._showingDeferred.resolve();if(this._currentVisible)return(0,y.Deferred)().resolve().promise();if(this._currentVisible=!0,this._isHidingActionCanceled)delete this._isHidingActionCanceled,this._showingDeferred.reject();else{const e=()=>{this._stopAnimation(),this._toggleBodyScroll(this.option("enableBodyScroll")),this._toggleVisibility(!0),this._$content.css("visibility","hidden"),this._$content.toggleClass(N,!1),this._updateZIndexStackPosition(!0),this._positionController.openingHandled(),this._renderContent();const e={cancel:!1};this._actions.onShowing(e);this._processShowingHidingCancel(e.cancel,(()=>{this._$content.css("visibility",""),this._renderVisibility(!0),this._animateShowing()}),(()=>{this._toggleVisibility(!1),this._$content.css("visibility",""),this._$content.toggleClass(N,!0),this._isShowingActionCanceled=!0,this._moveFromContainer(),this._toggleBodyScroll(!0),this.option("visible",!1),this._showingDeferred.resolve()}))};this.option("templatesRenderAsynchronously")?(this._stopShowTimer(),this._asyncShowTimeout=setTimeout(e)):e()}return this._showingDeferred.promise()},_normalizeAnimation(e,t){return e&&(e=(0,b.extend)({type:"slide",skipElementInitialStyles:!0},e),(0,D.isObject)(e[t])&&(0,b.extend)(e[t],{position:this._positionController.position})),e},_animateHiding(){var e=this;const t=this._getAnimationConfig()??{},i=this._normalizeAnimation(t.hide,"from"),n=(null==i?void 0:i.start)??C.noop,o=(null==i?void 0:i.complete)??C.noop;this._animate(i,(function(){var t;e._$content.css("pointerEvents",""),e._renderVisibility(!1);for(var i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];o.call(e,...n),e._hideAnimationProcessing=!1,null===(t=e._actions)||void 0===t||t.onHidden(),e._hidingDeferred.resolve()}),(function(){e._$content.css("pointerEvents","none");for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];n.call(e,...i),e._hideAnimationProcessing=!0}))},_hide(){if(!this._currentVisible)return(0,y.Deferred)().resolve().promise();this._currentVisible=!1,this._hidingDeferred=(0,y.Deferred)();const e={cancel:!1};if(this._isShowingActionCanceled)delete this._isShowingActionCanceled,this._hidingDeferred.reject();else{this._actions.onHiding(e),this._toggleSafariScrolling(),this._toggleBodyScroll(!0);const t=()=>{this._isHidingActionCanceled=!0,this._toggleBodyScroll(this.option("enableBodyScroll")),this.option("visible",!0),this._hidingDeferred.resolve()},i=()=>{this._forceFocusLost(),this._toggleShading(!1),this._toggleSubscriptions(!1),this._stopShowTimer(),this._animateHiding()};this._processShowingHidingCancel(e.cancel,i,t)}return this._hidingDeferred.promise()},_forceFocusLost(){const e=p.default.getActiveElement();!!this._$content.find(e).length&&O.default.resetActiveElement()},_animate(e,t,i){e?(i=i||e.start||C.noop,n.fx.animate(this._$content,(0,b.extend)({},e,{start:i,complete:t}))):t()},_stopAnimation(){n.fx.stop(this._$content,!0)},_renderVisibility(e){e&&this._isParentHidden()||(this._currentVisible=e,this._stopAnimation(),e||(0,u.triggerHidingEvent)(this._$content),e?(this._checkContainerExists(),this._moveToContainer(),this._renderGeometry(),(0,u.triggerShownEvent)(this._$content),(0,u.triggerResizeEvent)(this._$content)):(this._toggleVisibility(e),this._$content.toggleClass(N,!e),this._updateZIndexStackPosition(e),this._moveFromContainer()),this._toggleShading(e),this._toggleSubscriptions(e))},_updateZIndexStackPosition(e){const t=this._overlayStack(),i=t.indexOf(this);e?(-1===i&&(this._zIndex=M.create(this._zIndexInitValue()),t.push(this)),this._$wrapper.css("zIndex",this._zIndex),this._$content.css("zIndex",this._zIndex)):-1!==i&&(t.splice(i,1),M.remove(this._zIndex))},_toggleShading(e){this._$wrapper.toggleClass("dx-overlay-shader",e&&this.option("shading")),this._$wrapper.css("backgroundColor",this.option("shading")?this.option("shadingColor"):""),this._toggleTabTerminator(e&&this.option("shading"))},_initTabTerminatorHandler(){var e=this;this._proxiedTabTerminatorHandler=function(){e._tabKeyHandler(...arguments)}},_toggleTabTerminator(e){const{_loopFocus:t}=this.option(),i=(0,d.addNamespace)("keydown",this.NAME);t||e?a.default.on(p.default.getDocument(),i,this._proxiedTabTerminatorHandler):a.default.off(p.default.getDocument(),i,this._proxiedTabTerminatorHandler)},_findTabbableBounds(){const e=this._$wrapper.find("*"),t=e.length-1,i={first:null,last:null};for(let n=0;n<=t&&(!i.first&&e.eq(n).is(E.tabbable)&&(i.first=e.eq(n)),!i.last&&e.eq(t-n).is(E.tabbable)&&(i.last=e.eq(t-n)),!i.first||!i.last);n++);return i},_tabKeyHandler(e){if("tab"!==(0,d.normalizeKeyName)(e)||!this._isTopOverlay())return;const t=this._findTabbableBounds(),i=t.first,n=t.last,o=!e.shiftKey&&e.target===n.get(0),s=e.shiftKey&&e.target===i.get(0),r=0===t.length,l=!O.default.contains(this._$wrapper.get(0),e.target);if(o||s||r||l){e.preventDefault();const t=e.shiftKey?n:i;a.default.trigger(t,"focusin"),a.default.trigger(t,"focus")}},_toggleSubscriptions(e){P.default.hasWindow()&&(this._toggleHideTopOverlayCallback(e),this._toggleHideOnParentsScrollSubscription(e))},_toggleHideTopOverlayCallback(e){this._hideTopOverlayHandler&&(e?o.hideCallback.add(this._hideTopOverlayHandler):o.hideCallback.remove(this._hideTopOverlayHandler))},_toggleHideOnParentsScrollSubscription(e){const t=(0,d.addNamespace)("scroll",this.NAME),{prevTargets:i,handler:n}=this._parentsScrollSubscriptionInfo??{};a.default.off(i,t,n);const o=this.option("hideOnParentScroll");if(e&&o){let e=this._getHideOnParentScrollTarget().parents();"desktop"===h.default.real().deviceType&&(e=e.add(V)),a.default.on(e,t,n),this._parentsScrollSubscriptionInfo.prevTargets=e}},_hideOnParentsScrollHandler(e){let t=!1;const i=this.option("hideOnParentScroll");(0,D.isFunction)(i)&&(t=i(e)),t||this._showAnimationProcessing||this.hide()},_getHideOnParentScrollTarget(){const e=(0,f.default)(this.option("_hideOnParentScrollTarget"));return e.length?e:this._$wrapper},_render(){this.callBase(),this._appendContentToElement(),this._renderVisibilityAnimate(this.option("visible"))},_appendContentToElement(){this._$content.parent().is(this.$element())||this._$content.appendTo(this.$element())},_renderContent(){const e=!this._currentVisible&&this.option("deferRendering");this.option("visible")&&this._isParentHidden()?this._isHidden=!0:this._contentAlreadyRendered||e||(this._contentAlreadyRendered=!0,this._appendContentToElement(),this.callBase())},_isParentHidden(){if(!this.option("_checkParentVisibility"))return!1;if(void 0!==this._parentHidden)return this._parentHidden;const e=this.$element().parent();if(e.is(":visible"))return!1;let t=!1;return e.add(e.parents()).each(((e,i)=>{if("none"===(0,f.default)(i).css("display"))return t=!0,!1})),t||!p.default.getBody().contains(e.get(0))},_renderContentImpl(){const e=(0,y.Deferred)(),t=this.option("contentTemplate"),i=this._getTemplate(t),n=this._templateManager.anonymousTemplateName===t;return i&&i.render({container:(0,g.getPublicElement)(this.$content()),noModel:!0,transclude:n,onRendered:()=>{e.resolve(),this.option("templatesRenderAsynchronously")&&this._dimensionChanged()}}),this._toggleWrapperScrollEventsSubscription(this.option("preventScrollEvents")),e.done((()=>{this.option("visible")&&this._moveToContainer()})),e.promise()},_getPositionControllerConfig(){const{container:e,visualContainer:t,_fixWrapperPosition:i,restorePosition:n,_skipContentPositioning:o}=this.option();return{container:e,visualContainer:t,$root:this.$element(),$content:this._$content,$wrapper:this._$wrapper,onPositioned:this._actions.onPositioned,onVisualPositionChanged:this._actions.onVisualPositionChanged,restorePosition:n,_fixWrapperPosition:i,_skipContentPositioning:o}},_initPositionController(){this._positionController=new k.OverlayPositionController(this._getPositionControllerConfig())},_toggleWrapperScrollEventsSubscription(e){const t=(0,d.addNamespace)(s.move,this.NAME);a.default.off(this._$wrapper,t),e&&a.default.on(this._$wrapper,t,{validate:()=>!0,getDirection:()=>"both",_toggleGestureCover(e){e||this._toggleGestureCoverImpl(e)},_clearSelection:C.noop,isNative:!0},(e=>{const{originalEvent:t}=e.originalEvent,{type:i}=t||{},n="wheel"===i,o="mousemove"===i,a=n&&!(0,d.isCommandKeyPressed)(e);e._cancelPreventDefault=!0,t&&!1!==e.cancelable&&(!o&&!n||a)&&e.preventDefault()}))},_moveFromContainer(){this._$content.appendTo(this.$element()),this._$wrapper.detach()},_checkContainerExists(){const e=this._positionController.$container;if(void 0===e)return;e.length>0||T.default.log("W1021",this.NAME)},_moveToContainer(){const e=this._positionController.$container;this._$wrapper.appendTo(e),this._$content.appendTo(this._$wrapper)},_renderGeometry(e){const{visible:t}=this.option();t&&P.default.hasWindow()&&(this._stopAnimation(),this._renderGeometryImpl())},_renderGeometryImpl(){this._positionController.updatePosition(this._getOptionValue("position")),this._renderWrapper(),this._renderDimensions(),this._renderPosition()},_renderPosition(){this._positionController.positionContent()},_isAllWindowCovered(){return(0,D.isWindow)(this._positionController.$visualContainer.get(0))&&this.option("shading")},_toggleSafariScrolling(){const e=this.option("visible"),t=(0,f.default)(p.default.getBody()),i="ios"===h.default.real().platform&&v.default.safari,n=this._isAllWindowCovered(),o=t.hasClass(W),a=!o&&e&&n,s=o&&(!e||!n||this._disposed);i&&(s?(t.removeClass(W),V.scrollTo(0,this._cachedBodyScrollTop),this._cachedBodyScrollTop=void 0):a&&(this._cachedBodyScrollTop=V.pageYOffset,t.addClass(W)))},_renderWrapper(){this._positionController.styleWrapperPosition(),this._renderWrapperDimensions(),this._positionController.positionWrapper()},_renderWrapperDimensions(){const{$visualContainer:e}=this._positionController,t=p.default.getDocumentElement(),i=(0,D.isWindow)(e.get(0)),n=i?t.clientWidth:(0,S.getOuterWidth)(e),o=i?V.innerHeight:(0,S.getOuterHeight)(e);this._$wrapper.css({width:n,height:o})},_renderDimensions(){const e=this._$content.get(0);this._$content.css({minWidth:this._getOptionValue("minWidth",e),maxWidth:this._getOptionValue("maxWidth",e),minHeight:this._getOptionValue("minHeight",e),maxHeight:this._getOptionValue("maxHeight",e),width:this._getOptionValue("width",e),height:this._getOptionValue("height",e)})},_focusTarget(){return this._$content},_attachKeyboardEvents(){this._keyboardListenerId=l.keyboard.on(this._$content,null,(e=>this._keyboardHandler(e)))},_keyboardHandler(e){const t=e.originalEvent;!(0,f.default)(t.target).is(this._$content)&&this.option("ignoreChildEvents")||this.callBase(...arguments)},_isVisible(){return this.option("visible")},_visibilityChanged(e){e?this.option("visible")&&this._renderVisibilityAnimate(e):this._renderVisibilityAnimate(e)},_dimensionChanged(){this._renderGeometry()},_clean(){const e=this.option();this._contentAlreadyRendered||e.isRenovated||this.$content().empty(),this._renderVisibility(!1),this._stopShowTimer(),this._cleanFocusState()},_stopShowTimer(){this._asyncShowTimeout&&clearTimeout(this._asyncShowTimeout),this._asyncShowTimeout=null},_dispose(){n.fx.stop(this._$content,!1),clearTimeout(this._deferShowTimer),this._toggleViewPortSubscription(!1),this._toggleSubscriptions(!1),this._updateZIndexStackPosition(!1),this._toggleTabTerminator(!1),this._actions=null,this._parentsScrollSubscriptionInfo=null,this.callBase(),this._toggleSafariScrolling(),this.option("visible")&&M.remove(this._zIndex),this._$wrapper.remove(),this._$content.remove()},_toggleRTLDirection(e){this._$content.toggleClass("dx-rtl",e)},_optionChanged(e){const{value:t,name:i}=e;if(this._getActionsList().includes(i))this._initActions();else switch(i){case"animation":case"closeOnOutsideClick":case"hideOnOutsideClick":case"propagateOutsideClick":break;case"_loopFocus":case"shading":this._toggleShading(this.option("visible")),this._toggleSafariScrolling();break;case"shadingColor":this._toggleShading(this.option("visible"));break;case"width":case"height":case"minWidth":case"maxWidth":case"minHeight":case"maxHeight":this._renderGeometry();break;case"position":this._positionController.updatePosition(this.option("position")),this._positionController.restorePositionOnNextRender(!0),this._renderGeometry(),this._toggleSafariScrolling();break;case"visible":this._renderVisibilityAnimate(t).done((()=>{var e;return null===(e=this._animateDeferred)||void 0===e?void 0:e.resolveWith(this)})).fail((()=>{var e;return null===(e=this._animateDeferred)||void 0===e?void 0:e.reject()}));break;case"container":this._positionController.updateContainer(t),this._invalidate(),this._toggleSafariScrolling();break;case"visualContainer":this._positionController.updateVisualContainer(t),this._renderWrapper(),this._toggleSafariScrolling();break;case"innerOverlay":this._initInnerOverlayClass();break;case"deferRendering":case"contentTemplate":this._contentAlreadyRendered=!1,this._clean(),this._invalidate();break;case"hideTopOverlayHandler":this._toggleHideTopOverlayCallback(!1),this._initHideTopOverlayHandler(t),this._toggleHideTopOverlayCallback(this.option("visible"));break;case"hideOnParentScroll":case"_hideOnParentScrollTarget":this._toggleHideOnParentsScrollSubscription(this.option("visible"));break;case"rtlEnabled":this._contentAlreadyRendered=!1,this.callBase(e);break;case"_fixWrapperPosition":this._positionController.fixWrapperPosition=t;break;case"wrapperAttr":this._renderWrapperAttributes();break;case"restorePosition":this._positionController.restorePosition=t;break;case"preventScrollEvents":this._logDeprecatedPreventScrollEventsInfo(),this._toggleWrapperScrollEventsSubscription(t);break;default:this.callBase(e)}},toggle(e){e=void 0===e?!this.option("visible"):e;const t=(0,y.Deferred)();if(e===this.option("visible"))return t.resolveWith(this,[e]).promise();const i=(0,y.Deferred)();return this._animateDeferred=i,this.option("visible",e),i.promise().done((()=>{delete this._animateDeferred,t.resolveWith(this,[this.option("visible")])})).fail((()=>{delete this._animateDeferred,t.reject()})),t.promise()},$content(){return this._$content},show(){return this.toggle(!0)},hide(){return this.toggle(!1)},content(){return(0,g.getPublicElement)(this._$content)},repaint(){this._contentAlreadyRendered?(this._positionController.restorePositionOnNextRender(!0),this._renderGeometry({forceStopAnimation:!0}),(0,u.triggerResizeEvent)(this._$content)):this.callBase()}});$.baseZIndex=e=>M.base(e),(0,c.default)("dxOverlay",$);t.default=$},4983:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.OverlayPositionController=t.OVERLAY_POSITION_ALIASES=void 0;var n=d(i(3030)),o=i(88603),a=d(i(64553)),s=i(52576),r=i(11528),l=d(i(5080));function d(e){return e&&e.__esModule?e:{default:e}}const u=d(i(14470)).default.getWindow(),c=t.OVERLAY_POSITION_ALIASES={top:{my:"top center",at:"top center"},bottom:{my:"bottom center",at:"bottom center"},right:{my:"right center",at:"right center"},left:{my:"left center",at:"left center"},center:{my:"center",at:"center"},"right bottom":{my:"right bottom",at:"right bottom"},"right top":{my:"right top",at:"right top"},"left bottom":{my:"left bottom",at:"left bottom"},"left top":{my:"left top",at:"left top"}},h={h:0,v:0};t.OverlayPositionController=class{constructor(e){let{position:t,container:i,visualContainer:n,$root:o,$content:a,$wrapper:s,onPositioned:r,onVisualPositionChanged:l,restorePosition:d,_fixWrapperPosition:u,_skipContentPositioning:c}=e;this._props={position:t,container:i,visualContainer:n,restorePosition:d,onPositioned:r,onVisualPositionChanged:l,_fixWrapperPosition:u,_skipContentPositioning:c},this._$root=o,this._$content=a,this._$wrapper=s,this._$markupContainer=void 0,this._$visualContainer=void 0,this._shouldRenderContentInitialPosition=!0,this._visualPosition=void 0,this._initialPosition=void 0,this._previousVisualPosition=void 0,this.updateContainer(i),this.updatePosition(t),this.updateVisualContainer(n)}get $container(){return this.updateContainer(),this._$markupContainer}get $visualContainer(){return this._$visualContainer}get position(){return this._position}set fixWrapperPosition(e){this._props._fixWrapperPosition=e,this.styleWrapperPosition()}set restorePosition(e){this._props.restorePosition=e}restorePositionOnNextRender(e){this._shouldRenderContentInitialPosition=e||!this._visualPosition}openingHandled(){const e=this._props.restorePosition;this.restorePositionOnNextRender(e)}updatePosition(e){this._props.position=e,this._position=this._normalizePosition(e),this.updateVisualContainer()}updateContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._props.container;this._props.container=e,this._$markupContainer=e?(0,a.default)(e):l.default.getSwatchContainer(this._$root),this.updateVisualContainer(this._props.visualContainer)}updateVisualContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._props.visualContainer;this._props.visualContainer=e,this._$visualContainer=this._getVisualContainer()}detectVisualPositionChange(e){this._updateVisualPositionValue(),this._raisePositionedEvents(e)}positionContent(){this._shouldRenderContentInitialPosition?this._renderContentInitialPosition():((0,o.move)(this._$content,this._visualPosition),this.detectVisualPositionChange())}positionWrapper(){this._$visualContainer&&n.default.setup(this._$wrapper,{my:"top left",at:"top left",of:this._$visualContainer})}styleWrapperPosition(){const e=(0,r.isWindow)(this.$visualContainer.get(0))||this._props._fixWrapperPosition?"fixed":"absolute";this._$wrapper.css("position",e)}_updateVisualPositionValue(){this._previousVisualPosition=this._visualPosition,this._visualPosition=(0,o.locate)(this._$content)}_renderContentInitialPosition(){this._renderBoundaryOffset(),(0,o.resetPosition)(this._$content);const e=this._$wrapper.css("overflow");if(this._$wrapper.css("overflow","hidden"),!this._props._skipContentPositioning){const e=n.default.setup(this._$content,this._position);this._initialPosition=e}this._$wrapper.css("overflow",e),this.detectVisualPositionChange()}_raisePositionedEvents(e){const t=this._previousVisualPosition,i=this._visualPosition;((null==t?void 0:t.top)!==i.top||(null==t?void 0:t.left)!==i.left)&&this._props.onVisualPositionChanged({previousPosition:t,position:i,event:e}),this._props.onPositioned({position:this._initialPosition})}_renderBoundaryOffset(){const e=this._position??{boundaryOffset:h};this._$content.css("margin",`${e.v}px ${e.h}px`)}_getVisualContainer(){var e,t;const i=this._props.container,n=this._props.visualContainer,o=(0,r.isEvent)(null===(e=this._props.position)||void 0===e?void 0:e.of)?this._props.position.of.target:null===(t=this._props.position)||void 0===t?void 0:t.of;return n?(0,a.default)(n):i?(0,a.default)(i):o?(0,a.default)(o):(0,a.default)(u)}_normalizePosition(e){const t={boundaryOffset:h};return(0,r.isDefined)(e)?(0,s.extend)(!0,{},t,this._positionToObject(e)):t}_positionToObject(e){return(0,r.isString)(e)?(0,s.extend)({},c[e]):e}}},67169:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getElementMaxHeightByWindow=void 0;var n=r(i(64553)),o=i(57653),a=i(11528),s=r(i(14470));function r(e){return e&&e.__esModule?e:{default:e}}t.getElementMaxHeightByWindow=(e,t)=>{const i=(0,n.default)(s.default.getWindow()),{top:r}=e.offset();let l;if((0,a.isNumeric)(t)){if(t<r)return r-t;l=(0,o.getInnerHeight)(i)-t+i.scrollTop()}else{const t=r-i.scrollTop(),n=(0,o.getInnerHeight)(i)-t-(0,o.getOuterHeight)(e);l=Math.max(t,n)}return.9*l}},84893:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.remove=t.isLastZIndexInStack=t.create=t.clearStack=t.base=void 0;var n=i(17781);let o=1500,a=[];t.base=e=>(o=(0,n.ensureDefined)(e,o),o);t.create=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const{length:t}=a,i=(t?a[t-1]:e)+1;return a.push(i),i};t.remove=e=>{const t=a.indexOf(e);t>=0&&a.splice(t,1)};t.isLastZIndexInStack=e=>a.length&&a[a.length-1]===e;t.clearStack=()=>{a=[]}},22085:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(2850);var n=s(i(92848)),o=i(52576),a=s(i(98894));function s(e){return e&&e.__esModule?e:{default:e}}class r extends a.default{_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{preventScrollEvents:!1})}_getToolbarName(){return"dxToolbar"}}t.default=r,r.defaultOptions=function(e){a.default.defaultOptions(e)},(0,n.default)("dxPopover",r)},7784:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=b(i(3030)),o=i(88603),a=b(i(92774)),s=i(98834),r=b(i(92848)),l=b(i(64960)),d=i(61404),u=b(i(64553)),c=i(52576),h=i(50254),p=i(41639),g=i(57653),_=i(11528),f=i(3104),m=b(i(10720)),v=i(52071),C=b(i(35185)),y=i(96423);function b(e){return e&&e.__esModule?e:{default:e}}const x={left:"right",top:"bottom",right:"left",bottom:"top",center:"center"},w=function(e){return(0,_.isObject)(e)?e.name:e},S=function(e,t){const i=e.option(t);return w(i)},D=function(e,t){const{target:i,shading:n,disabled:o,hideEvent:r}=e.option(),c=(0,_.isString)(i),h=n&&"hide"===t,p=h?null:S(e,`${t}Event`);if(h&&r&&C.default.log("W1020"),!p||o)return;const g=(0,s.addNamespace)(p,e.NAME),f=e._createAction(function(){const i=function(e,t){const i=e.option(t);return(0,_.isObject)(i)&&i.delay}(e,`${t}Event`);this._clearEventsTimeouts(),i?this._timeouts[t]=setTimeout((()=>{e[t]()}),i):e[t]()}.bind(e),{validatingTargetName:"target"}),m=function(e){f({event:e,target:(0,u.default)(e.currentTarget)})},v=`_${t}EventHandler`;if(c)e[v]=m,a.default.on(l.default.getDocument(),g,i,m);else{const t=(0,d.getPublicElement)((0,u.default)(i));e[v]=void 0,a.default.on(t,g,m)}},I=function(e,t,i,n){let o=n||S(e,`${i}Event`);if(!o)return;o=(0,s.addNamespace)(o,e.NAME);const r=`_${i}EventHandler`;e[r]?a.default.off(l.default.getDocument(),o,t,e[r]):a.default.off((0,d.getPublicElement)((0,u.default)(t)),o)},E=m.default.inherit({_getDefaultOptions(){return(0,c.extend)(this.callBase(),{target:void 0,shading:!1,position:(0,c.extend)({},y.POPOVER_POSITION_ALIASES.bottom),hideOnOutsideClick:!0,animation:{show:{type:"fade",from:0,to:1},hide:{type:"fade",from:1,to:0}},showTitle:!1,width:"auto",height:"auto",dragEnabled:!1,resizeEnabled:!1,fullScreen:!1,hideOnParentScroll:!0,arrowPosition:"",arrowOffset:0,_fixWrapperPosition:!0})},_defaultOptionsRules:()=>[{device:{platform:"ios"},options:{arrowPosition:{boundaryOffset:{h:20,v:-10},collision:"fit"}}},{device:()=>!(0,f.hasWindow)(),options:{animation:null}},{device:()=>(0,v.isMaterialBased)(),options:{useFlatToolbarButtons:!0}},{device:()=>(0,v.isMaterial)(),options:{useDefaultToolbarButtons:!0,showCloseButton:!1}}],_init(){var e;this.callBase(),this._renderArrow(),this._timeouts={},this.$element().addClass("dx-popover"),this.$wrapper().addClass("dx-popover-wrapper");const t=null===(e=this.option("toolbarItems"))||void 0===e?void 0:e.length;this.setAria("role",t?"dialog":"tooltip")},_render(){this.callBase.apply(this,arguments),this._detachEvents(this.option("target")),this._attachEvents()},_detachEvents(e){I(this,e,"show"),I(this,e,"hide")},_attachEvents(){D(this,"show"),D(this,"hide")},_renderArrow(){this._$arrow=(0,u.default)("<div>").addClass("dx-popover-arrow").prependTo(this.$overlayContent())},_documentDownHandler(e){return!this._isOutsideClick(e)||this.callBase(e)},_isOutsideClick(e){return!(0,u.default)(e.target).closest(this.option("target")).length},_animate(e){e&&e.to&&"object"==typeof e.to&&(0,c.extend)(e.to,{position:this._getContainerPosition()}),this.callBase.apply(this,arguments)},_stopAnimation(){this.callBase.apply(this,arguments)},_renderTitle(){this.$wrapper().toggleClass("dx-popover-without-title",!this.option("showTitle")),this.callBase()},_renderPosition(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.callBase(),this._renderOverlayPosition(e),this._actions.onPositioned()},_renderOverlayPosition(e){this._resetOverlayPosition(e),this._updateContentSize(e);const t=this._getContainerPosition(),i=n.default.setup(this.$overlayContent(),t),o=this._getSideByLocation(i);this._togglePositionClass(`dx-position-${o}`),this._toggleFlippedClass(i.h.flip,i.v.flip);(this._isHorizontalSide()||this._isVerticalSide())&&this._renderArrowPosition(o)},_resetOverlayPosition(e){this._setContentHeight(e),this._togglePositionClass(`dx-position-${this._positionController._positionSide}`),(0,o.move)(this.$overlayContent(),{left:0,top:0}),this._$arrow.css({top:"auto",right:"auto",bottom:"auto",left:"auto"})},_updateContentSize(e){if(!this.$content()||!e)return;const t=n.default.calculate(this.$overlayContent(),this._getContainerPosition());if(t.h.oversize>0&&this._isHorizontalSide()&&!t.h.fit){const e=(0,g.getWidth)(this.$overlayContent())-t.h.oversize;(0,g.setWidth)(this.$overlayContent(),e)}if(t.v.oversize>0&&this._isVerticalSide()&&!t.v.fit){const e=(0,g.getHeight)(this.$overlayContent())-t.v.oversize,i=(0,g.getHeight)(this.$content())-t.v.oversize;(0,g.setHeight)(this.$overlayContent(),e),(0,g.setHeight)(this.$content(),i)}},_getContainerPosition(){return this._positionController._getContainerPosition()},_getHideOnParentScrollTarget(){return(0,u.default)(this._positionController._position.of||this.callBase())},_getSideByLocation(e){const t=e.v.flip,i=e.h.flip;return this._isVerticalSide()&&t||this._isHorizontalSide()&&i||this._isPopoverInside()?x[this._positionController._positionSide]:this._positionController._positionSide},_togglePositionClass(e){this.$wrapper().removeClass("dx-position-left dx-position-right dx-position-top dx-position-bottom").addClass(e)},_toggleFlippedClass(e,t){this.$wrapper().toggleClass("dx-popover-flipped-horizontal",e).toggleClass("dx-popover-flipped-vertical",t)},_renderArrowPosition(e){const t=(0,p.getBoundingRect)(this._$arrow.get(0)),i=-(this._isVerticalSide(e)?t.height:t.width);this._$arrow.css(x[e],i);const o=this._isVerticalSide(e)?"left":"top",a=this._isVerticalSide(e)?"width":"height",s=(0,u.default)(this._positionController._position.of),r=n.default.offset(s)??{top:0,left:0},l=n.default.offset(this.$overlayContent()),d=t[a],c=null==l?void 0:l[o],g=(0,p.getBoundingRect)(this.$overlayContent().get(0))[a],_=r[o],f=s.get(0),m=f&&!f.preventDefault?(0,p.getBoundingRect)(f)[a]:0,v=Math.max(c,_),C=Math.min(c+g,_+m);let y;y="start"===this.option("arrowPosition")?v-c:"end"===this.option("arrowPosition")?C-c-d:(v+C)/2-c-d/2;const b=this._positionController._getContentBorderWidth(e),w=(0,h.fitIntoRange)(y-b+this.option("arrowOffset"),b,g-d-2*b);this._$arrow.css(o,w)},_isPopoverInside(){return this._positionController._isPopoverInside()},_setContentHeight(e){e&&this.callBase()},_getPositionControllerConfig(){const{shading:e,target:t}=this.option();return(0,c.extend)({},this.callBase(),{target:t,shading:e,$arrow:this._$arrow})},_initPositionController(){this._positionController=new y.PopoverPositionController(this._getPositionControllerConfig())},_renderWrapperDimensions(){this.option("shading")&&this.$wrapper().css({width:"100%",height:"100%"})},_isVerticalSide(e){return this._positionController._isVerticalSide(e)},_isHorizontalSide(e){return this._positionController._isHorizontalSide(e)},_clearEventTimeout(e){clearTimeout(this._timeouts[e])},_clearEventsTimeouts(){this._clearEventTimeout("show"),this._clearEventTimeout("hide")},_clean(){this._detachEvents(this.option("target")),this.callBase.apply(this,arguments)},_optionChanged(e){switch(e.name){case"arrowPosition":case"arrowOffset":this._renderGeometry();break;case"fullScreen":e.value&&this.option("fullScreen",!1);break;case"target":e.previousValue&&this._detachEvents(e.previousValue),this._positionController.updateTarget(e.value),this._invalidate();break;case"showEvent":case"hideEvent":{const t=e.name.substring(0,4),i=w(e.previousValue);this.hide(),I(this,this.option("target"),t,i),D(this,t);break}case"visible":this._clearEventTimeout(e.value?"show":"hide"),this.callBase(e);break;default:this.callBase(e)}},show(e){return e&&this.option("target",e),this.callBase()}});(0,r.default)("dxPopover",E);t.default=E},96423:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverPositionController=t.POPOVER_POSITION_ALIASES=void 0;var n,o=(n=i(3030))&&n.__esModule?n:{default:n},a=i(17781),s=i(52576),r=i(57653),l=i(11528),d=i(4983),u=i(25056);const c=["shading","target","$arrow"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},h.apply(null,arguments)}const p={left:-1,top:-1,center:0,right:1,bottom:1},g=t.POPOVER_POSITION_ALIASES={top:{my:"bottom center",at:"top center",collision:"fit flip"},bottom:{my:"top center",at:"bottom center",collision:"fit flip"},right:{my:"left center",at:"right center",collision:"flip fit"},left:{my:"right center",at:"left center",collision:"flip fit"}},_={h:10,v:10};class f extends d.OverlayPositionController{constructor(e){let{shading:t,target:i,$arrow:n}=e,o=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,c);super(o),this._props=h({},this._props,{shading:t,target:i}),this._$arrow=n,this._positionSide=void 0,this.updatePosition(this._props.position)}positionWrapper(){this._props.shading&&this._$wrapper.css({top:0,left:0})}updateTarget(e){this._props.target=e,this.updatePosition(this._props.position)}_renderBoundaryOffset(){}_getContainerPosition(){const e=(0,a.pairToObject)(this._position.offset||"");let{h:t,v:i}=e;const n=this._isVerticalSide(),o=this._isHorizontalSide();if(n||o){const e=(this._isPopoverInside()?-1:1)*p[this._positionSide]*((n?(0,r.getHeight)(this._$arrow):(0,r.getWidth)(this._$arrow))-this._getContentBorderWidth(this._positionSide));n?i+=e:t+=e}return(0,s.extend)({},this._position,{offset:`${t} ${i}`})}_getContentBorderWidth(e){const t=this._$content.css(u.borderWidthStyles[e]);return parseInt(t)||0}_isPopoverInside(){const e=o.default.setup.normalizeAlign(this._position.my),t=o.default.setup.normalizeAlign(this._position.at);return e.h===t.h&&e.v===t.v}_isVerticalSide(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._positionSide;return"top"===e||"bottom"===e}_isHorizontalSide(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._positionSide;return"left"===e||"right"===e}_getDisplaySide(e){const t=o.default.setup.normalizeAlign(e.my),i=o.default.setup.normalizeAlign(e.at),n=p[t.h]===p[i.h]&&p[t.v]===p[i.v]?-1:1;return Math.abs(p[t.h]-n*p[i.h])>Math.abs(p[t.v]-n*p[i.v])?i.h:i.v}_normalizePosition(e){const t={of:this._props.target,boundaryOffset:_};let i;return i=(0,l.isDefined)(e)?(0,s.extend)(!0,{},t,this._positionToObject(e)):t,this._positionSide=this._getDisplaySide(i),i}_positionToObject(e){return(0,l.isString)(e)?(0,s.extend)({},g[e]):e}}t.PopoverPositionController=f},53973:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(2850);var n=s(i(92848)),o=i(52576),a=s(i(10720));function s(e){return e&&e.__esModule?e:{default:e}}class r extends a.default{_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{preventScrollEvents:!1})}_getToolbarName(){return"dxToolbar"}}t.default=r,r.defaultOptions=function(e){a.default.defaultOptions(e)},(0,n.default)("dxPopup",r)},43864:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(21667);var n=i(18029),o=P(i(4671)),a=P(i(92848)),s=P(i(65951)),r=i(61404),l=P(i(19427)),d=P(i(64553)),u=P(i(11787)),c=i(48650),h=P(i(48314)),p=i(17781),g=i(52576),_=i(53124),f=i(21274),m=i(41639),v=i(57653),C=i(11528),y=i(20142),b=P(i(64973)),x=P(i(89132)),w=P(i(28416)),S=i(52071),D=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=O(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(84893)),I=P(i(14470)),E=P(i(26513)),T=i(27129),A=i(90263);function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(O=function(e){return e?i:t})(e)}function P(e){return e&&e.__esModule?e:{default:e}}const k=I.default.getWindow(),M="dx-popup",R="dx-popup-wrapper",L="dx-popup-title",B="dx-popup-bottom",V=["cancel","clear","done"],F="contained",H=h.default.safari&&(0,y.compare)(h.default.version,[11])<0,N={static:"",inherit:"dx-popup-inherit-height",flex:"dx-popup-flex-height"},z=x.default.inherit({_supportedKeys(){return(0,g.extend)(this.callBase(),{upArrow:e=>{var t;null===(t=this._drag)||void 0===t||t.moveUp(e)},downArrow:e=>{var t;null===(t=this._drag)||void 0===t||t.moveDown(e)},leftArrow:e=>{var t;null===(t=this._drag)||void 0===t||t.moveLeft(e)},rightArrow:e=>{var t;null===(t=this._drag)||void 0===t||t.moveRight(e)}})},_getDefaultOptions(){return(0,g.extend)(this.callBase(),{fullScreen:!1,title:"",showTitle:!0,titleTemplate:"title",onTitleRendered:null,dragOutsideBoundary:!1,dragEnabled:!1,dragAndResizeArea:void 0,enableBodyScroll:!0,outsideDragFactor:0,onResizeStart:null,onResize:null,onResizeEnd:null,resizeEnabled:!1,toolbarItems:[],showCloseButton:!1,bottomTemplate:"bottom",useDefaultToolbarButtons:!1,useFlatToolbarButtons:!1,autoResizeEnabled:!0})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"ios"},options:{animation:this._iosAnimation}},{device:{platform:"android"},options:{animation:this._androidAnimation}},{device:{platform:"generic"},options:{showCloseButton:!0}},{device:e=>"desktop"===s.default.real().deviceType&&"generic"===e.platform,options:{dragEnabled:!0}},{device:()=>"desktop"===s.default.real().deviceType&&!s.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,S.isMaterialBased)(),options:{useFlatToolbarButtons:!0}},{device:()=>(0,S.isMaterial)(),options:{useDefaultToolbarButtons:!0,showCloseButton:!1}}])},_iosAnimation:{show:{type:"slide",duration:400,from:{position:{my:"top",at:"bottom"}},to:{position:{my:"center",at:"center"}}},hide:{type:"slide",duration:400,from:{opacity:1,position:{my:"center",at:"center"}},to:{opacity:1,position:{my:"top",at:"bottom"}}}},_androidAnimation(){return this.option("fullScreen")?{show:{type:"slide",duration:300,from:{top:"30%",opacity:0},to:{top:0,opacity:1}},hide:{type:"slide",duration:300,from:{top:0,opacity:1},to:{top:"30%",opacity:0}}}:{show:{type:"fade",duration:400,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}}},_init(){const e=this.option("_wrapperClassExternal"),t=e?`${R} ${e}`:R;this.callBase(),this._createBodyOverflowManager(),this._updateResizeCallbackSkipCondition(),this.$element().addClass(M),this.$wrapper().addClass(t),this._$popupContent=this._$content.wrapInner((0,d.default)("<div>").addClass("dx-popup-content")).children().eq(0),this._toggleContentScrollClass(),this.$overlayContent().attr("role","dialog")},_render(){const e=this.option("fullScreen");this._toggleFullScreenClass(e),this.callBase()},_createBodyOverflowManager(){this._bodyOverflowManager=(0,T.createBodyOverflowManager)()},_toggleFullScreenClass(e){this.$overlayContent().toggleClass("dx-popup-fullscreen",e).toggleClass("dx-popup-normal",!e)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({title:new c.EmptyTemplate,bottom:new c.EmptyTemplate})},_getActionsList(){return this.callBase().concat(["onResizeStart","onResize","onResizeEnd"])},_contentResizeHandler(e){this._shouldSkipContentResize(e)||this._renderGeometry({shouldOnlyReposition:!0})},_doesShowAnimationChangeDimensions(){const e=this.option("animation");return["to","from"].some((t=>{var i;const n=null==e||null===(i=e.show)||void 0===i?void 0:i[t];return(0,C.isObject)(n)&&("width"in n||"height"in n)}))},_updateResizeCallbackSkipCondition(){const e=this._doesShowAnimationChangeDimensions();this._shouldSkipContentResize=t=>e&&this._showAnimationProcessing||this._areContentDimensionsRendered(t)},_observeContentResize(e){if(!this.option("useResizeObserver"))return;const t=this._$content.get(0);e?u.default.observe(t,(e=>{this._contentResizeHandler(e)})):u.default.unobserve(t)},_areContentDimensionsRendered(e){var t,i,n;const o=null===(t=e.contentBoxSize)||void 0===t?void 0:t[0];var a,s;if(o)return parseInt(o.inlineSize,10)===(null===(a=this._renderedDimensions)||void 0===a?void 0:a.width)&&parseInt(o.blockSize,10)===(null===(s=this._renderedDimensions)||void 0===s?void 0:s.height);const{contentRect:r}=e;return parseInt(r.width,10)===(null===(i=this._renderedDimensions)||void 0===i?void 0:i.width)&&parseInt(r.height,10)===(null===(n=this._renderedDimensions)||void 0===n?void 0:n.height)},_renderContent(){this.callBase(),this._observeContentResize(!0)},_renderContentImpl(){this._renderTitle(),this.callBase(),this._renderResize(),this._renderBottom()},_renderTitle(){const e=this._getToolbarItems("top"),{title:t,showTitle:i}=this.option();if(i&&t&&e.unshift({location:s.default.current().ios?"center":"before",text:t}),i||e.length>0){this._$title&&this._$title.remove();const t=(0,d.default)("<div>").addClass(L).insertBefore(this.$content());this._$title=this._renderTemplateByType("titleTemplate",e,t).addClass(L),this._renderDrag(),this._executeTitleRenderAction(this._$title),this._$title.toggleClass("dx-has-close-button",this._hasCloseButton())}else this._$title&&this._$title.detach();this._toggleAriaLabel()},_toggleAriaLabel(){var e;const{title:t,showTitle:i}=this.option(),n=i&&!!t?new l.default:null;null===(e=this._$title)||void 0===e||e.find(".dx-toolbar-label").eq(0).attr("id",n),this.$overlayContent().attr("aria-labelledby",n)},_renderTemplateByType(e,t,i,n){const{rtlEnabled:o,useDefaultToolbarButtons:a,useFlatToolbarButtons:s,disabled:l}=this.option(),u=this._getTemplateByOption(e);if(u instanceof c.EmptyTemplate){const e=(0,g.extend)({},this.option("integrationOptions"),{skipTemplates:["content","title"]}),r=(0,g.extend)(n,{items:t,rtlEnabled:o,useDefaultButtons:a,useFlatButtons:s,disabled:l,integrationOptions:e});this._getTemplate("dx-polymorph-widget").render({container:i,model:{widget:this._getToolbarName(),options:r}});const d=i.children("div");return i.replaceWith(d),d}const h=(0,d.default)(u.render({container:(0,r.getPublicElement)(i)}));return h.hasClass("dx-template-wrapper")&&(i.replaceWith(h),i=h),i},_getToolbarName:()=>"dxToolbarBase",_renderVisibilityAnimate(e){return this.callBase(e)},_hide(){return this._observeContentResize(!1),this.callBase()},_executeTitleRenderAction(e){this._getTitleRenderAction()({titleElement:(0,r.getPublicElement)(e)})},_getTitleRenderAction(){return this._titleRenderAction||this._createTitleRenderAction()},_createTitleRenderAction(){return this._titleRenderAction=this._createActionByOption("onTitleRendered",{element:this.element(),excludeValidators:["disabled","readOnly"]})},_getCloseButton(){return{toolbar:"top",location:"after",template:this._getCloseButtonRenderer()}},_getCloseButtonRenderer(){return(e,t,i)=>{const n=(0,d.default)("<div>").addClass("dx-closebutton");this._createComponent(n,b.default,{icon:"close",onClick:this._createToolbarItemAction(void 0),stylingMode:"text",integrationOptions:{}}),(0,d.default)(i).append(n)}},_getToolbarItems(e){const t=this.option("toolbarItems"),i=[];this._toolbarItemClasses=[];const n=s.default.current().platform;let o=0;return(0,f.each)(t,((t,a)=>{const r=(0,C.isDefined)(a.shortcut),l=r?(e=>{const t=s.default.current(),{platform:i}=t;let n="bottom",o="before";if("ios"===i)switch(e){case"cancel":n="top";break;case"clear":n="top",o="after";break;case"done":o="after"}else if("android"===i)switch(e){case"cancel":case"done":o="after"}return{toolbar:n,location:o}})(a.shortcut):a;if(r&&"ios"===n&&o<2&&(l.toolbar="top",o++),l.toolbar=a.toolbar||l.toolbar||"top",l&&l.toolbar===e){r&&(0,g.extend)(l,{location:a.location},this._getToolbarItemByAlias(a));const e="generic"===n;"done"===a.shortcut&&e||"cancel"===a.shortcut&&!e?i.unshift(l):i.push(l)}})),"top"===e&&this._hasCloseButton()&&i.push(this._getCloseButton()),i},_hasCloseButton(){return this.option("showCloseButton")&&this.option("showTitle")},_getLocalizationKey:e=>"done"===e.toLowerCase()?"OK":(0,_.camelize)(e,!0),_getToolbarButtonStylingMode(e){return(0,S.isFluent)()?"done"===e?F:"outlined":this.option("useFlatToolbarButtons")?"text":F},_getToolbarButtonType(e){return(0,S.isFluent)()&&"done"===e||this.option("useDefaultToolbarButtons")?"default":"normal"},_getToolbarItemByAlias(e){const t=this,i=e.shortcut;if(!V.includes(i))return!1;const n=(0,g.extend)({text:o.default.format(this._getLocalizationKey(i)),onClick:this._createToolbarItemAction(e.onClick),integrationOptions:{},type:this._getToolbarButtonType(i),stylingMode:this._getToolbarButtonStylingMode(i)},e.options||{}),a=`${M}-${i}`;return this._toolbarItemClasses.push(a),{template(e,i,o){const s=(0,d.default)("<div>").addClass(a).appendTo(o);t._createComponent(s,b.default,n)}}},_createToolbarItemAction(e){return this._createAction(e,{afterExecute(e){e.component.hide()}})},_renderBottom(){const e=this._getToolbarItems("bottom");if(e.length){this._$bottom&&this._$bottom.remove();const t=(0,d.default)("<div>").addClass(B).insertAfter(this.$content());this._$bottom=this._renderTemplateByType("bottomTemplate",e,t,{compactMode:!0}).addClass(B),this._toggleClasses()}else this._$bottom&&this._$bottom.detach()},_toggleDisabledState(e){this.callBase(...arguments),this.$content().toggleClass("dx-state-disabled",Boolean(e))},_toggleClasses(){const e=V;(0,f.each)(e,((e,t)=>{const i=`${M}-${t}`;this._toolbarItemClasses.includes(i)?(this.$wrapper().addClass(`${i}-visible`),this._$bottom.addClass(i)):(this.$wrapper().removeClass(`${i}-visible`),this._$bottom.removeClass(i))}))},_toggleFocusClass(e,t){if(this.callBase(e,t),e&&!D.isLastZIndexInStack(this._zIndex)){const e=D.create(this._zIndexInitValue());D.remove(this._zIndex),this._zIndex=e,this._$wrapper.css("zIndex",e),this._$content.css("zIndex",e)}},_toggleContentScrollClass(){const e=!this.option("preventScrollEvents");this.$content().toggleClass("dx-popup-content-scrollable",e)},_getPositionControllerConfig(){const{fullScreen:e,forceApplyBindings:t,dragOutsideBoundary:i,dragAndResizeArea:n,outsideDragFactor:o}=this.option();return(0,g.extend)({},this.callBase(),{fullScreen:e,forceApplyBindings:t,dragOutsideBoundary:i,dragAndResizeArea:n,outsideDragFactor:o})},_initPositionController(){this._positionController=new A.PopupPositionController(this._getPositionControllerConfig())},_getDragTarget(){return this.topToolbar()},_renderGeometry(e){const{visible:t,useResizeObserver:i}=this.option();if(t&&I.default.hasWindow()){const t=this._showAnimationProcessing&&!(null!=e&&e.forceStopAnimation)&&i;this._isAnimationPaused=t||void 0,this._stopAnimation(),null!=e&&e.shouldOnlyReposition?this._renderPosition(!1):this._renderGeometryImpl(null==e?void 0:e.isDimensionChange),t&&(this._animateShowing(),this._isAnimationPaused=void 0)}},_cacheDimensions(){this.option("useResizeObserver")&&(this._renderedDimensions={width:parseInt((0,v.getWidth)(this._$content),10),height:parseInt((0,v.getHeight)(this._$content),10)})},_renderGeometryImpl(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this._resetContentHeight(),this.callBase(),this._cacheDimensions(),this._setContentHeight()},_resetContentHeight(){"auto"===this._getOptionValue("height")&&this.$content().css({height:"auto",maxHeight:"none"})},_renderDrag(){const e=this._getDragTarget(),t=this.option("dragEnabled");if(!e)return;const i={dragEnabled:t,handle:e.get(0),draggableElement:this._$content.get(0),positionController:this._positionController};this._drag?this._drag.init(i):this._drag=new E.default(i),this.$overlayContent().toggleClass("dx-popup-draggable",t)},_renderResize(){this._resizable=this._createComponent(this._$content,w.default,{handles:this.option("resizeEnabled")?"all":"none",onResizeEnd:e=>{this._resizeEndHandler(e),this._observeContentResize(!0)},onResize:e=>{this._setContentHeight(),this._actions.onResize(e)},onResizeStart:e=>{this._observeContentResize(!1),this._actions.onResizeStart(e)},minHeight:100,minWidth:100,area:this._positionController.$dragResizeContainer,keepAspectRatio:!1})},_resizeEndHandler(e){const t=this._resizable.option("width"),i=this._resizable.option("height");t&&this._setOptionWithoutOptionChange("width",t),i&&this._setOptionWithoutOptionChange("height",i),this._cacheDimensions(),this._positionController.resizeHandled(),this._positionController.detectVisualPositionChange(e.event),this._actions.onResizeEnd(e)},_setContentHeight(){(this.option("forceApplyBindings")||p.noop)();const e=this.$overlayContent().get(0),t=this._chooseHeightStrategy(e);this.$content().css(this._getHeightCssStyles(t,e)),this._setHeightClasses(this.$overlayContent(),t)},_heightStrategyChangeOffset:(e,t)=>e===N.flex?-t:0,_chooseHeightStrategy(e){const t="auto"===e.style.width||""===e.style.width;let i=N.static;return this._isAutoHeight()&&this.option("autoResizeEnabled")&&(i=t||H?N.inherit:N.flex),i},_getHeightCssStyles(e,t){let i={};const n=this._getOptionValue("maxHeight",t),o=this._getOptionValue("minHeight",t),a=this._splitPopupHeight(),s=a.header+a.footer+a.contentVerticalOffsets+a.popupVerticalOffsets+this._heightStrategyChangeOffset(e,a.popupVerticalPaddings);if(e===N.static){if(!this._isAutoHeight()||n||o){const e=(this.option("fullScreen")?Math.min((0,m.getBoundingRect)(t).height,I.default.getWindow().innerHeight):(0,m.getBoundingRect)(t).height)-s;i={height:Math.max(0,e),minHeight:"auto",maxHeight:"auto"}}}else{const e=(0,d.default)(this._positionController.$visualContainer).get(0),t=(0,v.addOffsetToMaxHeight)(n,-s,e);i={height:"auto",minHeight:(0,v.addOffsetToMinHeight)(o,-s,e),maxHeight:t}}return i},_setHeightClasses(e,t){let i="";for(const e in N)N[e]!==t&&(i+=` ${N[e]}`);e.removeClass(i).addClass(t)},_isAutoHeight(){return"auto"===this.$overlayContent().get(0).style.height},_splitPopupHeight(){const e=this.topToolbar(),t=this.bottomToolbar();return{header:(0,v.getVisibleHeight)(e&&e.get(0)),footer:(0,v.getVisibleHeight)(t&&t.get(0)),contentVerticalOffsets:(0,v.getVerticalOffsets)(this.$overlayContent().get(0),!0),popupVerticalOffsets:(0,v.getVerticalOffsets)(this.$content().get(0),!0),popupVerticalPaddings:(0,v.getVerticalOffsets)(this.$content().get(0),!1)}},_isAllWindowCovered(){return this.callBase()||this.option("fullScreen")},_renderDimensions(){this.option("fullScreen")?this.$overlayContent().css({width:"100%",height:"100%",minWidth:"",maxWidth:"",minHeight:"",maxHeight:""}):this.callBase(),I.default.hasWindow()&&this._renderFullscreenWidthClass()},_dimensionChanged(){this._renderGeometry({isDimensionChange:!0})},_clean(){this.callBase(),this._observeContentResize(!1)},_dispose(){this.callBase(),this._toggleBodyScroll(!0)},_renderFullscreenWidthClass(){this.$overlayContent().toggleClass("dx-popup-fullscreen-width",(0,v.getOuterWidth)(this.$overlayContent())===(0,v.getWidth)(k))},_toggleSafariScrolling(){this.option("enableBodyScroll")&&this.callBase()},_toggleBodyScroll(e){if(!this._bodyOverflowManager)return;const{setOverflow:t,restoreOverflow:i}=this._bodyOverflowManager;e?i():t()},refreshPosition(){this._renderPosition()},_optionChanged(e){var t;const{value:i,name:o}=e;switch(o){case"disabled":this.callBase(e),this._renderTitle(),this._renderBottom();break;case"animation":this._updateResizeCallbackSkipCondition();break;case"enableBodyScroll":this.option("visible")&&this._toggleBodyScroll(i);break;case"showTitle":case"title":case"titleTemplate":this._renderTitle(),this._renderGeometry(),(0,n.triggerResizeEvent)(this.$overlayContent());break;case"bottomTemplate":this._renderBottom(),this._renderGeometry(),(0,n.triggerResizeEvent)(this.$overlayContent());break;case"container":var a;if(this.callBase(e),this.option("resizeEnabled"))null===(a=this._resizable)||void 0===a||a.option("area",this._positionController.$dragResizeContainer);break;case"width":case"height":this.callBase(e),null===(t=this._resizable)||void 0===t||t.option(o,i);break;case"onTitleRendered":this._createTitleRenderAction(i);break;case"toolbarItems":case"useDefaultToolbarButtons":case"useFlatToolbarButtons":{const t=!e.fullName.match(/^toolbarItems((\[\d+\])(\.(options|visible).*)?)?$/);this._renderTitle(),this._renderBottom(),t&&(this._renderGeometry(),(0,n.triggerResizeEvent)(this.$overlayContent()));break}case"dragEnabled":this._renderDrag();break;case"dragAndResizeArea":this._positionController.dragAndResizeArea=i,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer),this._positionController.positionContent();break;case"dragOutsideBoundary":this._positionController.dragOutsideBoundary=i,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer);break;case"outsideDragFactor":this._positionController.outsideDragFactor=i;break;case"resizeEnabled":this._renderResize(),this._renderGeometry();break;case"autoResizeEnabled":this._renderGeometry(),(0,n.triggerResizeEvent)(this.$overlayContent());break;case"fullScreen":this._positionController.fullScreen=i,this._toggleFullScreenClass(i),this._toggleSafariScrolling(),this._renderGeometry(),(0,n.triggerResizeEvent)(this.$overlayContent());break;case"showCloseButton":this._renderTitle();break;case"preventScrollEvents":this.callBase(e),this._toggleContentScrollClass();break;default:this.callBase(e)}},bottomToolbar(){return this._$bottom},topToolbar(){return this._$title},$content(){return this._$popupContent},content(){return(0,r.getPublicElement)(this.$content())},$overlayContent(){return this._$content},getFocusableElements(){return this.$wrapper().find("[tabindex]").filter(((e,t)=>t.getAttribute("tabindex")>=0))}});(0,a.default)("dxPopup",z);t.default=z},26513:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=c(i(92774)),a=i(59144),s=i(98834),r=c(i(64960)),l=i(50254),d=i(57653),u=i(11528);function c(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(e){this.init(e)}init(e){let{dragEnabled:t,handle:i,draggableElement:n,positionController:o}=e;this._positionController=o,this._draggableElement=n,this._handle=i,this._dragEnabled=t,this.unsubscribe(),t&&this.subscribe()}moveDown(e){this._moveTo(5,0,e)}moveUp(e){this._moveTo(-5,0,e)}moveLeft(e){this._moveTo(0,-5,e)}moveRight(e){this._moveTo(0,5,e)}subscribe(){const e=this._getEventNames();o.default.on(this._handle,e.startEventName,(e=>{this._dragStartHandler(e)})),o.default.on(this._handle,e.updateEventName,(e=>{this._dragUpdateHandler(e)})),o.default.on(this._handle,e.endEventName,(e=>{this._dragEndHandler(e)}))}unsubscribe(){const e=this._getEventNames();o.default.off(this._handle,e.startEventName),o.default.off(this._handle,e.updateEventName),o.default.off(this._handle,e.endEventName)}_getEventNames(){const e="overlayDrag";return{startEventName:(0,s.addNamespace)(a.start,e),updateEventName:(0,s.addNamespace)(a.move,e),endEventName:(0,s.addNamespace)(a.end,e)}}_dragStartHandler(e){const t=this._getAllowedOffsets();this._prevOffset={x:0,y:0},e.targetElements=[],e.maxTopOffset=t.top,e.maxBottomOffset=t.bottom,e.maxLeftOffset=t.left,e.maxRightOffset=t.right}_dragUpdateHandler(e){const t={top:e.offset.y-this._prevOffset.y,left:e.offset.x-this._prevOffset.x};this._moveByOffset(t),this._prevOffset=e.offset}_dragEndHandler(e){this._positionController.dragHandled(),this._positionController.detectVisualPositionChange(e)}_moveTo(e,t,i){if(!this._dragEnabled)return;i.preventDefault(),i.stopPropagation();const n=this._fitOffsetIntoAllowedRange(e,t);this._moveByOffset(n),this._dragEndHandler(i)}_fitOffsetIntoAllowedRange(e,t){const i=this._getAllowedOffsets();return{top:(0,l.fitIntoRange)(e,-i.top,i.bottom),left:(0,l.fitIntoRange)(t,-i.left,i.right)}}_getContainerDimensions(){const e=r.default.getDocument(),t=this._positionController.$dragResizeContainer.get(0);let i=(0,d.getOuterWidth)(t),n=(0,d.getOuterHeight)(t);return(0,u.isWindow)(t)&&(n=Math.max(e.body.clientHeight,n),i=Math.max(e.body.clientWidth,i)),{width:i,height:n}}_getContainerPosition(){const e=this._positionController.$dragResizeContainer.get(0);return(0,u.isWindow)(e)?{top:0,left:0}:(0,d.getOffset)(e)}_getElementPosition(){return(0,d.getOffset)(this._draggableElement)}_getInnerDelta(){const e=this._getContainerDimensions(),t=this._getElementDimensions();return{x:e.width-t.width,y:e.height-t.height}}_getOuterDelta(){const{width:e,height:t}=this._getElementDimensions(),{outsideDragFactor:i}=this._positionController;return{x:e*i,y:t*i}}_getFullDelta(){const e=this._getInnerDelta(),t=this._getOuterDelta();return{x:e.x+t.x,y:e.y+t.y}}_getElementDimensions(){return{width:this._draggableElement.offsetWidth,height:this._draggableElement.offsetHeight}}_getAllowedOffsets(){const e=this._getFullDelta();if(!(e.y>=0&&e.x>=0))return{top:0,bottom:0,left:0,right:0};const t=this._getElementPosition(),i=this._getContainerPosition(),n=this._getOuterDelta();return{top:t.top-i.top+n.y,bottom:-t.top+i.top+e.y,left:t.left-i.left+n.x,right:-t.left+i.left+e.x}}_moveByOffset(e){const t=(0,n.locate)(this._draggableElement),i={left:t.left+e.left,top:t.top+e.top};(0,n.move)(this._draggableElement,i)}}},27129:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createBodyOverflowManager=void 0;var n=l(i(65951)),o=l(i(64960)),a=i(17781),s=i(11528),r=l(i(14470));function l(e){return e&&e.__esModule?e:{default:e}}const d={setOverflow:a.noop,restoreOverflow:a.noop};t.createBodyOverflowManager=()=>{if(!r.default.hasWindow())return d;const e=r.default.getWindow(),{documentElement:t}=o.default.getDocument(),i=o.default.getBody(),a="ios"===n.default.real().platform,l={overflow:null,overflowX:null,overflowY:null,paddingRight:null,position:null,top:null,left:null};return{setOverflow:a?()=>{if((0,s.isDefined)(l.position)||"fixed"===i.style.position)return;const{scrollY:t,scrollX:n}=e;l.position=i.style.position,l.top=i.style.top,l.left=i.style.left,i.style.setProperty("position","fixed"),i.style.setProperty("top",-t+"px"),i.style.setProperty("left",-n+"px")}:()=>{(()=>{const n=e.innerWidth-t.clientWidth;if(l.paddingRight||n<=0)return;const o=e.getComputedStyle(i).getPropertyValue("padding-right"),a=parseInt(o,10);l.paddingRight=a,i.style.setProperty("padding-right",`${a+n}px`)})(),l.overflow||"hidden"===i.style.overflow||(l.overflow=i.style.overflow,l.overflowX=i.style.overflowX,l.overflowY=i.style.overflowY,i.style.setProperty("overflow","hidden"))},restoreOverflow:a?()=>{if(!(0,s.isDefined)(l.position))return;const t=-parseInt(i.style.top,10),n=-parseInt(i.style.left,10);["position","top","left"].forEach((e=>{l[e]?i.style.setProperty(e,l[e]):i.style.removeProperty(e)})),e.scrollTo(n,t),l.position=null}:()=>{(0,s.isDefined)(l.paddingRight)&&(l.paddingRight?i.style.setProperty("padding-right",`${l.paddingRight}px`):i.style.removeProperty("padding-right"),l.paddingRight=null),["overflow","overflowX","overflowY"].forEach((e=>{if(!(0,s.isDefined)(l[e]))return;const t=e.replace(/(X)|(Y)/,(e=>`-${e.toLowerCase()}`));l[e]?i.style.setProperty(t,l[e]):i.style.removeProperty(t),l[e]=null}))}}}},90263:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PopupPositionController=void 0;var n=i(88603),o=d(i(64553)),a=i(55355),s=i(4983),r=d(i(14470));const l=["fullScreen","forceApplyBindings","dragOutsideBoundary","dragAndResizeArea","outsideDragFactor"];function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}const c=r.default.getWindow();class h extends s.OverlayPositionController{constructor(e){let{fullScreen:t,forceApplyBindings:i,dragOutsideBoundary:n,dragAndResizeArea:o,outsideDragFactor:a}=e;super(function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,l)),this._props=u({},this._props,{fullScreen:t,forceApplyBindings:i,dragOutsideBoundary:n,dragAndResizeArea:o,outsideDragFactor:a}),this._$dragResizeContainer=void 0,this._updateDragResizeContainer()}set fullScreen(e){this._props.fullScreen=e,e?this._fullScreenEnabled():this._fullScreenDisabled()}get $dragResizeContainer(){return this._$dragResizeContainer}get outsideDragFactor(){return this._props.dragOutsideBoundary?1:this._props.outsideDragFactor}set dragAndResizeArea(e){this._props.dragAndResizeArea=e,this._updateDragResizeContainer()}set dragOutsideBoundary(e){this._props.dragOutsideBoundary=e,this._updateDragResizeContainer()}set outsideDragFactor(e){this._props.outsideDragFactor=e}updateContainer(e){super.updateContainer(e),this._updateDragResizeContainer()}dragHandled(){this.restorePositionOnNextRender(!1)}resizeHandled(){this.restorePositionOnNextRender(!1)}positionContent(){var e,t;this._props.fullScreen?((0,n.move)(this._$content,{top:0,left:0}),this.detectVisualPositionChange()):(null===(e=(t=this._props).forceApplyBindings)||void 0===e||e.call(t),super.positionContent())}_updateDragResizeContainer(){this._$dragResizeContainer=this._getDragResizeContainer()}_getDragResizeContainer(){if(this._props.dragOutsideBoundary)return(0,o.default)(c);if(this._props.dragAndResizeArea)return(0,o.default)(this._props.dragAndResizeArea);return(0,a.originalViewPort)().get(0)||this._props.container?this._$markupContainer:(0,o.default)(c)}_getVisualContainer(){return this._props.fullScreen?(0,o.default)(c):super._getVisualContainer()}_fullScreenEnabled(){this.restorePositionOnNextRender(!1)}_fullScreenDisabled(){this.restorePositionOnNextRender(!0)}}t.PopupPositionController=h},49167:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(64044),o=c(i(92774)),a=i(98834),s=c(i(92848)),r=c(i(65951)),l=c(i(64553)),d=i(52576),u=c(i(78694));function c(e){return e&&e.__esModule?e:{default:e}}const h="dx-radiobutton-icon",p=u.default.inherit({_supportedKeys(){return(0,d.extend)(this.callBase(),{space:function(e){e.preventDefault(),this._clickAction({event:e})}})},_getDefaultOptions(){return(0,d.extend)(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,value:!1})},_canValueBeChangedByClick:()=>!0,_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===r.default.real().deviceType&&!r.default.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this.$element().addClass("dx-radiobutton")},_initMarkup(){this.callBase(),this._renderIcon(),this._renderCheckedState(this.option("value")),this._renderClick(),this.setAria("role","radio")},_renderIcon(){this._$icon=(0,l.default)("<div>").addClass(h),(0,l.default)("<div>").addClass("dx-radiobutton-icon-dot").appendTo(this._$icon),this.$element().append(this._$icon)},_renderCheckedState(e){this.$element().toggleClass("dx-radiobutton-checked",e).find(`.${h}`).toggleClass("dx-radiobutton-icon-checked",e),this.setAria("checked",e)},_renderClick(){const e=(0,a.addNamespace)(n.name,this.NAME);this._clickAction=this._createAction((e=>{this._clickHandler(e.event)})),o.default.off(this.$element(),e),o.default.on(this.$element(),e,(e=>{this._clickAction({event:e})}))},_clickHandler(e){this._saveValueChangeEvent(e),this.option("value",!0)},_optionChanged(e){if("value"===e.name)this._renderCheckedState(e.value),this.callBase(e);else this.callBase(e)}});(0,s.default)("dxRadioButton",p);t.default=p},87:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(64553)),o=i(17781),a=i(52576),s=l(i(7632)),r=l(i(37334));function l(e){return e&&e.__esModule?e:{default:e}}const d="dx-radiobutton-icon";class u extends r.default{_focusTarget(){return(0,n.default)(this.element()).parent()}_nullValueSelectionSupported(){return!0}_getDefaultOptions(){const e=super._getDefaultOptions();return(0,a.extend)(e,s.default._dataExpressionDefaultOptions(),{_itemAttributes:{role:"radio"}})}_initMarkup(){super._initMarkup(),(0,o.deferRender)((()=>{this._itemElements().addClass("dx-radiobutton")}))}_keyboardEventBindingTarget(){return this._focusTarget()}_postprocessRenderItem(e){const{itemData:{html:t},itemElement:i}=e;if(!t){const e=(0,n.default)("<div>").addClass(d);(0,n.default)("<div>").addClass("dx-radiobutton-icon-dot").appendTo(e);const t=(0,n.default)("<div>").append(e).addClass("dx-radio-value-container");(0,n.default)(i).prepend(t)}super._postprocessRenderItem(e)}_processSelectableItem(e,t){super._processSelectableItem(e,t),e.toggleClass("dx-radiobutton-checked",t).find(`.${d}`).first().toggleClass("dx-radiobutton-icon-checked",t),this.setAria("checked",t,e)}_refreshContent(){this._prepareContent(),this._renderContent()}_supportedKeys(){const e=super._supportedKeys();return(0,a.extend)({},e,{enter(t){return t.preventDefault(),e.enter.apply(this,arguments)},space(t){return t.preventDefault(),e.space.apply(this,arguments)}})}_itemElements(){return this._itemContainer().children(this._itemSelector())}_setAriaSelectionAttribute(){}}t.default=u},72076:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(92848)),o=h(i(65951)),a=h(i(64553)),s=i(87739),r=i(52576),l=i(11528),d=h(i(7632)),u=h(i(32266)),c=h(i(87));function h(e){return e&&e.__esModule?e:{default:e}}class p extends u.default{_dataSourceOptions(){return{paginate:!1}}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:{tablet:!0},options:{layout:"horizontal"}},{device:()=>"desktop"===o.default.real().deviceType&&!o.default.isSimulator(),options:{focusStateEnabled:!0}}])}_fireContentReadyAction(e){e&&super._fireContentReadyAction()}_focusTarget(){return this.$element()}_getAriaTarget(){return this.$element()}_getDefaultOptions(){const e=super._getDefaultOptions();return(0,r.extend)(e,(0,r.extend)(d.default._dataExpressionDefaultOptions(),{hoverStateEnabled:!0,activeStateEnabled:!0,layout:"vertical"}))}_getItemValue(e){return this._valueGetter?this._valueGetter(e):e.text}_getSubmitElement(){return this._$submitElement}_init(){super._init(),this._activeStateUnit=".dx-radiobutton",this._feedbackHideTimeout=100,this._initDataExpressions()}_initMarkup(){(0,a.default)(this.element()).addClass("dx-radiogroup"),this._renderSubmitElement(),this.setAria("role","radiogroup"),this._renderRadios(),this._renderLayout(),super._initMarkup()}_itemClickHandler(e){let{itemElement:t,event:i,itemData:n}=e;if(this.itemElements().is(t)){const e=this._getItemValue(n);e!==this.option("value")&&(this._saveValueChangeEvent(i),this.option("value",e))}}_getSelectedItemKeys(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.option("value");return"this"!==this.option("valueExpr")&&null===e||(0,l.isDefined)(e)?[e]:[]}_setSelection(e){const t=this._unwrappedValue(e);this._setCollectionWidgetOption("selectedItemKeys",this._getSelectedItemKeys(t))}_renderValidationState(){var e;super._renderValidationState(),null===(e=this._validationMessage)||void 0===e||e.$content().attr("role","alert")}_optionChanged(e){const{name:t,value:i}=e;switch(this._dataExpressionOptionChanged(e),t){case"dataSource":this._invalidate();break;case"focusStateEnabled":case"accessKey":case"tabIndex":this._setCollectionWidgetOption(t,i);break;case"disabled":super._optionChanged(e),this._setCollectionWidgetOption(t,i);break;case"valueExpr":this._setCollectionWidgetOption("keyExpr",this._getCollectionKeyExpr());break;case"value":this._setSelection(i),this._setSubmitValue(i),super._optionChanged(e);break;case"items":this._setSelection(this.option("value"));break;case"itemTemplate":case"displayExpr":break;case"layout":this._renderLayout(),this._updateItemsSize();break;default:super._optionChanged(e)}}_render(){super._render(),this._updateItemsSize()}_renderLayout(){const e=this.option("layout"),t=(0,a.default)(this.element());t.toggleClass("dx-radiogroup-vertical","vertical"===e),t.toggleClass("dx-radiogroup-horizontal","horizontal"===e)}_renderRadios(){this._areRadiosCreated=(0,s.Deferred)();const e=(0,a.default)("<div>").appendTo(this.$element()),{displayExpr:t,accessKey:i,focusStateEnabled:n,itemTemplate:o,tabIndex:r}=this.option();this._createComponent(e,c.default,{onInitialized:e=>{let{component:t}=e;this._radios=t},onContentReady:e=>{this._fireContentReadyAction(!0)},onItemClick:this._itemClickHandler.bind(this),displayExpr:t,accessKey:i,dataSource:this._dataSource,focusStateEnabled:n,itemTemplate:o,keyExpr:this._getCollectionKeyExpr(),noDataText:"",scrollingEnabled:!1,selectByClick:!1,selectionMode:"single",selectedItemKeys:this._getSelectedItemKeys(),tabIndex:r}),this._areRadiosCreated.resolve()}_renderSubmitElement(){this._$submitElement=(0,a.default)("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue()}_setOptionsByReference(){super._setOptionsByReference(),(0,r.extend)(this._optionsByReference,{value:!0})}_setSubmitValue(e){e=e??this.option("value");const t="this"===this.option("valueExpr")?this._displayGetter(e):e;this._$submitElement.val(t)}_setCollectionWidgetOption(e,t){this._areRadiosCreated.done(this._setWidgetOption.bind(this,"_radios",arguments))}_updateItemsSize(){if("horizontal"===this.option("layout")){var e;null===(e=this.itemElements())||void 0===e||e.css("height","auto")}else{var t;const e=this.option("items").length;null===(t=this.itemElements())||void 0===t||t.css("height",100/e+"%")}}focus(){var e;null===(e=this._radios)||void 0===e||e.focus()}itemElements(){var e;return null===(e=this._radios)||void 0===e?void 0:e._itemElements()}}p.include(d.default),(0,n.default)("dxRadioGroup",p);t.default=p},27560:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=v(i(92774)),a=i(59144),s=i(98834),r=i(18029),l=v(i(92848)),d=v(i(97832)),u=v(i(64553)),c=i(17781),h=i(52576),p=i(21274),g=i(50254),_=i(57653),f=i(11528),m=i(3104);function v(e){return e&&e.__esModule?e:{default:e}}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},C.apply(null,arguments)}const y="dxResizable",b="dx-resizable-handle",x="dx-resizable-handle-corner",w=(0,s.addNamespace)(a.start,y),S=(0,s.addNamespace)(a.move,y),D=(0,s.addNamespace)(a.end,y),I={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"},E=d.default.inherit({_getDefaultOptions(){return(0,h.extend)(this.callBase(),{handles:"all",step:"1",stepPrecision:"simple",area:void 0,minWidth:30,maxWidth:1/0,minHeight:30,maxHeight:1/0,onResizeStart:null,onResize:null,onResizeEnd:null,roundStepValue:!0,keepAspectRatio:!0})},_init(){this.callBase(),this.$element().addClass("dx-resizable")},_initMarkup(){this.callBase(),this._renderHandles()},_render(){this.callBase(),this._renderActions()},_renderActions(){this._resizeStartAction=this._createActionByOption("onResizeStart"),this._resizeEndAction=this._createActionByOption("onResizeEnd"),this._resizeAction=this._createActionByOption("onResize")},_renderHandles(){this._handles=[];const e=this.option("handles");if("none"===e||!e)return;const t="all"===e?["top","bottom","left","right"]:e.split(" "),i={};(0,p.each)(t,((e,t)=>{i[t]=!0,this._renderHandle(t)})),i.bottom&&i.right&&this._renderHandle("corner-bottom-right"),i.bottom&&i.left&&this._renderHandle("corner-bottom-left"),i.top&&i.right&&this._renderHandle("corner-top-right"),i.top&&i.left&&this._renderHandle("corner-top-left"),this._attachEventHandlers()},_renderHandle(e){const t=(0,u.default)("<div>").addClass(b).addClass(`${b}-${e}`).appendTo(this.$element());this._handles.push(t)},_attachEventHandlers(){if(this.option("disabled"))return;const e={};e[w]=this._dragStartHandler.bind(this),e[S]=this._dragHandler.bind(this),e[D]=this._dragEndHandler.bind(this),this._handles.forEach((t=>{o.default.on(t,e,{direction:"both",immediate:!0})}))},_detachEventHandlers(){this._handles.forEach((e=>{o.default.off(e)}))},_toggleEventHandlers(e){e?this._attachEventHandlers():this._detachEventHandlers()},_getElementSize(){const e=this.$element();return"border-box"===e.css("boxSizing")?{width:(0,_.getOuterWidth)(e),height:(0,_.getOuterHeight)(e)}:{width:(0,_.getWidth)(e),height:(0,_.getHeight)(e)}},_dragStartHandler(e){const t=this.$element();t.is(".dx-state-disabled, .dx-state-disabled *")?e.cancel=!0:(this._toggleResizingClass(!0),this._movingSides=this._getMovingSides(e),this._elementLocation=(0,n.locate)(t),this._elementSize=this._getElementSize(),this._renderDragOffsets(e),this._resizeStartAction({event:e,width:this._elementSize.width,height:this._elementSize.height,handles:this._movingSides}),e.targetElements=null)},_toggleResizingClass(e){this.$element().toggleClass("dx-resizable-resizing",e)},_renderDragOffsets(e){const t=this._getArea();if(!t)return;const i=(0,u.default)(e.target).closest(`.${b}`),n=(0,_.getOuterWidth)(i),o=(0,_.getOuterHeight)(i),a=i.offset(),s=t.offset,r=this._getAreaScrollOffset();e.maxLeftOffset=this._leftMaxOffset=a.left-s.left-r.scrollX,e.maxRightOffset=this._rightMaxOffset=s.left+t.width-a.left-n+r.scrollX,e.maxTopOffset=this._topMaxOffset=a.top-s.top-r.scrollY,e.maxBottomOffset=this._bottomMaxOffset=s.top+t.height-a.top-o+r.scrollY},_getBorderWidth(e,t){if((0,f.isWindow)(e.get(0)))return 0;const i=e.css(I[t]);return parseInt(i)||0},_proportionate(e,t){const i=this._elementSize;return t*("x"===e?i.width/i.height:i.height/i.width)},_getProportionalDelta(e){let{x:t,y:i}=e;const n=this._proportionate("y",t);if(n>=i)return{x:t,y:n};const o=this._proportionate("x",i);return o>=t?{x:o,y:i}:{x:0,y:0}},_getDirectionName(e){const t=this._movingSides;return"x"===e?t.left?"left":"right":t.top?"top":"bottom"},_fitIntoArea(e,t){const i=this._getDirectionName(e);return Math.min(t,this[`_${i}MaxOffset`]??1/0)},_fitDeltaProportionally(e){let t=C({},e);const i=this._elementSize,{minWidth:n,minHeight:o,maxWidth:a,maxHeight:s}=this.option(),r=()=>i.width+t.x,l=()=>i.height+t.y,d=e=>t[e]===this._fitIntoArea(e,t[e]),u=()=>(0,g.inRange)(r(),n,a)&&d("x"),c=()=>(0,g.inRange)(l(),o,s)&&d("y");if(!u()){const e=this._fitIntoArea("x",(0,g.fitIntoRange)(r(),n,a)-i.width);t={x:e,y:this._proportionate("y",e)}}if(!c()){const e=this._fitIntoArea("y",(0,g.fitIntoRange)(l(),o,s)-i.height);t={x:this._proportionate("x",e),y:e}}return u()&&c()?t:{x:0,y:0}},_fitDelta(e){let{x:t,y:i}=e;const n=this._elementSize,{minWidth:o,minHeight:a,maxWidth:s,maxHeight:r}=this.option();return{x:(0,g.fitIntoRange)(n.width+t,o,s)-n.width,y:(0,g.fitIntoRange)(n.height+i,a,r)-n.height}},_getDeltaByOffset(e){const t=this._movingSides,i=this._isCornerHandler(t)&&this.option("keepAspectRatio");let n={x:e.x*(t.left?-1:1),y:e.y*(t.top?-1:1)};if(i){const e=this._getProportionalDelta(n);n=this._fitDeltaProportionally(e)}else{const e=this._fitDelta(n);n=this._roundByStep(e)}return n},_updatePosition(e,t){let{width:i,height:o}=t;const a=this._elementLocation,s=this._movingSides,r=this.$element(),l=this._getElementSize(),d=e.y*(s.top?-1:1)-((l.height||o)-o),u=e.x*(s.left?-1:1)-((l.width||i)-i);(0,n.move)(r,{top:a.top+(s.top?d:0),left:a.left+(s.left?u:0)})},_dragHandler(e){const t=this._getOffset(e),i=this._getDeltaByOffset(t),n=this._updateDimensions(i);this._updatePosition(i,n),this._triggerResizeAction(e,n)},_updateDimensions(e){const t=e=>"px"===e.substring(e.length-2),i="strict"===this.option("stepPrecision"),n=this._elementSize,o=n.width+e.x,a=n.height+e.y,s=this.$element().get(0).style,r=e.x||i||t(s.width),l=e.y||i||t(s.height);return r&&this.option({width:o}),l&&this.option({height:a}),{width:r?o:n.width,height:l?a:n.height}},_triggerResizeAction(e,t){let{width:i,height:n}=t;this._resizeAction({event:e,width:this.option("width")||i,height:this.option("height")||n,handles:this._movingSides}),(0,r.triggerResizeEvent)(this.$element())},_isCornerHandler:e=>0===Object.values(e).reduce(((e,t)=>e^t),0),_getOffset(e){const{offset:t}=e,i=this._movingSides;return i.left||i.right||(t.x=0),i.top||i.bottom||(t.y=0),t},_roundByStep(e){return"strict"===this.option("stepPrecision")?this._roundStrict(e):this._roundNotStrict(e)},_getSteps(){return(0,c.pairToObject)(this.option("step"),!this.option("roundStepValue"))},_roundNotStrict(e){const t=this._getSteps();return{x:e.x-e.x%t.h,y:e.y-e.y%t.v}},_roundStrict(e){const t=this._movingSides,i={x:e.x*(t.left?-1:1),y:e.y*(t.top?-1:1)},n=this._getSteps(),o=this._elementLocation,a=this._elementSize,s=t.left?o.left:o.left+a.width,r=t.top?o.top:o.top+a.height,l=(s+i.x)%n.h,d=(r+i.y)%n.v,u=Math.sign||(e=>0===(e=+e)||isNaN(e)?e:e>0?1:-1),c=(e,t)=>(1+.2*u(t))%1*e,h=(e,t)=>Math.abs(e)<.2*t;let p=i.x-l,g=i.y-d;l>c(n.h,i.x)&&(p+=n.h),d>c(n.v,i.y)&&(g+=n.v);const _=!t.left&&!t.right||h(i.x,n.h)?0:p,f=!t.top&&!t.bottom||h(i.y,n.v)?0:g;return{x:_*(t.left?-1:1),y:f*(t.top?-1:1)}},_getMovingSides(e){const t=(0,u.default)(e.target),i=t.hasClass(`${x}-top-left`),n=t.hasClass(`${x}-top-right`),o=t.hasClass(`${x}-bottom-left`),a=t.hasClass(`${x}-bottom-right`);return{top:t.hasClass("dx-resizable-handle-top")||i||n,left:t.hasClass("dx-resizable-handle-left")||i||o,bottom:t.hasClass("dx-resizable-handle-bottom")||o||a,right:t.hasClass("dx-resizable-handle-right")||n||a}},_getArea(){let e=this.option("area");return(0,f.isFunction)(e)&&(e=e.call(this)),(0,f.isPlainObject)(e)?this._getAreaFromObject(e):this._getAreaFromElement(e)},_getAreaScrollOffset(){const e=this.option("area"),t={scrollY:0,scrollX:0};if(!(0,f.isFunction)(e)&&!(0,f.isPlainObject)(e)){const i=(0,u.default)(e)[0];(0,f.isWindow)(i)&&(t.scrollX=i.pageXOffset,t.scrollY=i.pageYOffset)}return t},_getAreaFromObject(e){const t={width:e.right-e.left,height:e.bottom-e.top,offset:{left:e.left,top:e.top}};return this._correctAreaGeometry(t),t},_getAreaFromElement(e){const t=(0,u.default)(e);let i;return t.length&&(i={width:(0,_.getInnerWidth)(t),height:(0,_.getInnerHeight)(t),offset:(0,h.extend)({top:0,left:0},(0,f.isWindow)(t[0])?{}:t.offset())},this._correctAreaGeometry(i,t)),i},_correctAreaGeometry(e,t){const i=t?this._getBorderWidth(t,"left"):0,n=t?this._getBorderWidth(t,"top"):0;e.offset.left+=i+this._getBorderWidth(this.$element(),"left"),e.offset.top+=n+this._getBorderWidth(this.$element(),"top"),e.width-=(0,_.getOuterWidth)(this.$element())-(0,_.getInnerWidth)(this.$element()),e.height-=(0,_.getOuterHeight)(this.$element())-(0,_.getInnerHeight)(this.$element())},_dragEndHandler(e){const t=this.$element();this._resizeEndAction({event:e,width:(0,_.getOuterWidth)(t),height:(0,_.getOuterHeight)(t),handles:this._movingSides}),this._toggleResizingClass(!1)},_renderWidth(e){this.option("width",(0,g.fitIntoRange)(e,this.option("minWidth"),this.option("maxWidth")))},_renderHeight(e){this.option("height",(0,g.fitIntoRange)(e,this.option("minHeight"),this.option("maxHeight")))},_optionChanged(e){switch(e.name){case"disabled":this._toggleEventHandlers(!e.value),this.callBase(e);break;case"handles":this._invalidate();break;case"minWidth":case"maxWidth":(0,m.hasWindow)()&&this._renderWidth((0,_.getOuterWidth)(this.$element()));break;case"minHeight":case"maxHeight":(0,m.hasWindow)()&&this._renderHeight((0,_.getOuterHeight)(this.$element()));break;case"onResize":case"onResizeStart":case"onResizeEnd":this._renderActions();break;case"area":case"stepPrecision":case"step":case"roundStepValue":case"keepAspectRatio":break;default:this.callBase(e)}},_clean(){this.$element().find(`.${b}`).remove()},_useTemplates:()=>!1});(0,l.default)(y,E);t.default=E},25056:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getAreaFromObject=t.getAreaFromElement=t.filterOffsets=t.borderWidthStyles=void 0,t.getDragOffsets=function(e,t,i){const n=(0,o.getOuterWidth)(t),s=(0,o.getOuterHeight)(t),r=(0,o.getOffset)(t),l=e.offset,d=(0,a.isWindow)(i),u={scrollX:d?i.pageXOffset:0,scrollY:d?i.pageYOffset:0};return{maxLeftOffset:r.left-l.left-u.scrollX,maxRightOffset:l.left+e.width-r.left-n+u.scrollX,maxTopOffset:r.top-l.top-u.scrollY,maxBottomOffset:l.top+e.height-r.top-s+u.scrollY}},t.getMovingSides=void 0;var n=i(52576),o=i(57653),a=i(11528);const s=t.borderWidthStyles={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"};function r(e,t){if(!(0,a.isWindow)(e)){const i=e.style[s[t]];return parseInt(i,10)||0}return 0}const l=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const{width:n,height:a,offset:s}=e,{left:l,top:d}=s,u=i?r(i,"left"):0,c=i?r(i,"top"):0;return{width:n-(0,o.getOuterWidth)(t)-(0,o.getInnerWidth)(t),height:a-(0,o.getOuterHeight)(t)-(0,o.getInnerHeight)(t),offset:{left:l+u+r(t,"left"),top:d+c+r(t,"top")}}};t.getAreaFromElement=(e,t)=>l({width:(0,o.getInnerWidth)(e),height:(0,o.getInnerHeight)(e),offset:(0,n.extend)({top:0,left:0},(0,a.isWindow)(e)?{}:(0,o.getOffset)(e))},t,e);t.getAreaFromObject=(e,t)=>{let{left:i,top:n,right:o,bottom:a}=e;return l({width:o-i,height:a-n,offset:{left:i,top:n}},t)};const d=e=>{const{className:t}=e,i=t.includes("dx-resizable-handle-corner-top-left"),n=t.includes("dx-resizable-handle-corner-top-right"),o=t.includes("dx-resizable-handle-corner-bottom-left"),a=t.includes("dx-resizable-handle-corner-bottom-right");return{top:t.includes("dx-resizable-handle-top")||i||n,left:t.includes("dx-resizable-handle-left")||i||o,bottom:t.includes("dx-resizable-handle-bottom")||o||a,right:t.includes("dx-resizable-handle-right")||n||a}};t.getMovingSides=d;t.filterOffsets=(e,t)=>{const i=d(t);return{x:i.left||i.right?e.x:0,y:i.top||i.bottom?e.y:0}}},21363:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VALIDATE_WHEEL_TIMEOUT=t.TopPocketState=t.ShowScrollbarMode=t.SCROLL_LINE_HEIGHT=t.SCROLLVIEW_TOP_POCKET_CLASS=t.SCROLLVIEW_REACHBOTTOM_TEXT_CLASS=t.SCROLLVIEW_REACHBOTTOM_INDICATOR_CLASS=t.SCROLLVIEW_REACHBOTTOM_CLASS=t.SCROLLVIEW_PULLDOWN_VISIBLE_TEXT_CLASS=t.SCROLLVIEW_PULLDOWN_TEXT_CLASS=t.SCROLLVIEW_PULLDOWN_READY_CLASS=t.SCROLLVIEW_PULLDOWN_LOADING_CLASS=t.SCROLLVIEW_PULLDOWN_INDICATOR_CLASS=t.SCROLLVIEW_PULLDOWN_IMAGE_CLASS=t.SCROLLVIEW_PULLDOWN=t.SCROLLVIEW_CONTENT_CLASS=t.SCROLLVIEW_BOTTOM_POCKET_CLASS=t.SCROLLABLE_WRAPPER_CLASS=t.SCROLLABLE_SIMULATED_CLASS=t.SCROLLABLE_SCROLL_CONTENT_CLASS=t.SCROLLABLE_SCROLL_CLASS=t.SCROLLABLE_SCROLLBAR_SIMULATED=t.SCROLLABLE_SCROLLBAR_CLASS=t.SCROLLABLE_SCROLLBAR_ACTIVE_CLASS=t.SCROLLABLE_SCROLLBARS_HIDDEN=t.SCROLLABLE_SCROLLBARS_ALWAYSVISIBLE=t.SCROLLABLE_DISABLED_CLASS=t.SCROLLABLE_CONTENT_CLASS=t.SCROLLABLE_CONTAINER_CLASS=t.PULLDOWN_ICON_CLASS=t.KEY_CODES=t.HOVER_ENABLED_STATE=t.HIDE_SCROLLBAR_TIMEOUT=t.DIRECTION_VERTICAL=t.DIRECTION_HORIZONTAL=t.DIRECTION_BOTH=void 0;t.SCROLL_LINE_HEIGHT=40,t.DIRECTION_VERTICAL="vertical",t.DIRECTION_HORIZONTAL="horizontal",t.DIRECTION_BOTH="both",t.SCROLLABLE_SIMULATED_CLASS="dx-scrollable-simulated",t.SCROLLABLE_CONTENT_CLASS="dx-scrollable-content",t.SCROLLABLE_WRAPPER_CLASS="dx-scrollable-wrapper",t.SCROLLABLE_CONTAINER_CLASS="dx-scrollable-container",t.SCROLLABLE_DISABLED_CLASS="dx-scrollable-disabled",t.SCROLLABLE_SCROLLBAR_SIMULATED="dx-scrollable-scrollbar-simulated",t.SCROLLABLE_SCROLLBARS_HIDDEN="dx-scrollable-scrollbars-hidden",t.SCROLLABLE_SCROLLBARS_ALWAYSVISIBLE="dx-scrollable-scrollbars-alwaysvisible",t.SCROLLABLE_SCROLLBAR_CLASS="dx-scrollable-scrollbar",t.SCROLLABLE_SCROLLBAR_ACTIVE_CLASS="dx-scrollable-scrollbar-active",t.SCROLLABLE_SCROLL_CLASS="dx-scrollable-scroll",t.SCROLLABLE_SCROLL_CONTENT_CLASS="dx-scrollable-scroll-content",t.HOVER_ENABLED_STATE="dx-scrollbar-hoverable",t.SCROLLVIEW_CONTENT_CLASS="dx-scrollview-content",t.SCROLLVIEW_TOP_POCKET_CLASS="dx-scrollview-top-pocket",t.SCROLLVIEW_PULLDOWN="dx-scrollview-pull-down",t.SCROLLVIEW_PULLDOWN_LOADING_CLASS="dx-scrollview-pull-down-loading",t.SCROLLVIEW_PULLDOWN_READY_CLASS="dx-scrollview-pull-down-ready",t.SCROLLVIEW_PULLDOWN_IMAGE_CLASS="dx-scrollview-pull-down-image",t.SCROLLVIEW_PULLDOWN_INDICATOR_CLASS="dx-scrollview-pull-down-indicator",t.SCROLLVIEW_PULLDOWN_TEXT_CLASS="dx-scrollview-pull-down-text",t.SCROLLVIEW_PULLDOWN_VISIBLE_TEXT_CLASS="dx-scrollview-pull-down-text-visible",t.PULLDOWN_ICON_CLASS="dx-icon-pulldown",t.SCROLLVIEW_BOTTOM_POCKET_CLASS="dx-scrollview-bottom-pocket",t.SCROLLVIEW_REACHBOTTOM_CLASS="dx-scrollview-scrollbottom",t.SCROLLVIEW_REACHBOTTOM_INDICATOR_CLASS="dx-scrollview-scrollbottom-indicator",t.SCROLLVIEW_REACHBOTTOM_TEXT_CLASS="dx-scrollview-scrollbottom-text",t.TopPocketState={STATE_RELEASED:0,STATE_READY:1,STATE_REFRESHING:2,STATE_LOADING:3,STATE_TOUCHED:4,STATE_PULLED:5},t.ShowScrollbarMode={HOVER:"onHover",ALWAYS:"always",NEVER:"never",SCROLL:"onScroll"},t.KEY_CODES={PAGE_UP:"pageUp",PAGE_DOWN:"pageDown",END:"end",HOME:"home",LEFT:"leftArrow",UP:"upArrow",RIGHT:"rightArrow",DOWN:"downArrow"},t.VALIDATE_WHEEL_TIMEOUT=500,t.HIDE_SCROLLBAR_TIMEOUT=500},99762:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(84096),a=(n=i(55620))&&n.__esModule?n:{default:n},s=i(17781);const{abstract:r}=a.default,l=a.default.inherit({ctor(){this._finished=!0,this._stopped=!1,this._proxiedStepCore=this._stepCore.bind(this)},start(){this._stopped=!1,this._finished=!1,this._stepCore()},stop(){this._stopped=!0,(0,o.cancelAnimationFrame)(this._stepAnimationFrame)},_stepCore(){if(this._isStopped())this._stop();else{if(this._isFinished())return this._finished=!0,void this._complete();this._step(),this._stepAnimationFrame=(0,o.requestAnimationFrame)(this._proxiedStepCore)}},_step:r,_isFinished:s.noop,_stop:s.noop,_complete:s.noop,_isStopped(){return this._stopped},inProgress(){return!(this._stopped||this._finished)}});t.default=l},97972:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=v(i(4671)),o=v(i(92848)),a=v(i(65951)),s=i(61404),r=v(i(64553)),l=i(17781),d=i(52576),u=i(3104),c=v(i(11979)),h=v(i(31876)),p=i(52071),g=v(i(83493)),_=v(i(14286)),f=v(i(94492)),m=v(i(94790));function v(e){return e&&e.__esModule?e:{default:e}}const C="dx-scrollview",y=`${C}-content`,b=`${C}-top-pocket`,x=`${C}-bottom-pocket`,w=`${C}-pull-down`,S=`${C}-scrollbottom`,D=`${S}-indicator`,I=`${S}-text`,E=`${C}-loadpanel`,T={pullDown:g.default,swipeDown:_.default,simulated:f.default},A=!(0,u.hasWindow)(),O={finishLoading:l.noop,release:l.noop,refresh:l.noop,scrollOffset:()=>({top:0,left:0}),isBottomReached:()=>!1,_optionChanged(e){if("onUpdated"!==e.name)return this.callBase.apply(this,arguments)}},P=m.default.inherit(A?O:{_getDefaultOptions(){return(0,d.extend)(this.callBase(),{pullingDownText:n.default.format("dxScrollView-pullingDownText"),pulledDownText:n.default.format("dxScrollView-pulledDownText"),refreshingText:n.default.format("dxScrollView-refreshingText"),reachBottomText:n.default.format("dxScrollView-reachBottomText"),onPullDown:null,onReachBottom:null,refreshStrategy:"pullDown"})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"android"===a.default.real().platform,options:{refreshStrategy:"swipeDown"}},{device:()=>(0,p.isMaterialBased)(),options:{pullingDownText:"",pulledDownText:"",refreshingText:"",reachBottomText:""}}])},_init(){this.callBase(),this._loadingIndicatorEnabled=!0},_initScrollableMarkup(){this.callBase(),this.$element().addClass(C),this._initContent(),this._initTopPocket(),this._initBottomPocket(),this._initLoadPanel()},_initContent(){const e=(0,r.default)("<div>").addClass(y);this._$content.wrapInner(e)},_initTopPocket(){const e=this._$topPocket=(0,r.default)("<div>").addClass(b),t=this._$pullDown=(0,r.default)("<div>").addClass(w);e.append(t),this._$content.prepend(e)},_initBottomPocket(){const e=this._$bottomPocket=(0,r.default)("<div>").addClass(x),t=this._$reachBottom=(0,r.default)("<div>").addClass(S),i=(0,r.default)("<div>").addClass(D),n=new c.default((0,r.default)("<div>")).$element(),o=this._$reachBottomText=(0,r.default)("<div>").addClass(I);this._updateReachBottomText(),t.append(i.append(n)).append(o),e.append(t),this._$content.append(e)},_initLoadPanel(){const e=(0,r.default)("<div>").addClass(E).appendTo(this.$element()),t={shading:!1,delay:400,message:this.option("refreshingText"),position:{of:this.$element()}};this._loadPanel=this._createComponent(e,h.default,t)},_updateReachBottomText(){this._$reachBottomText.text(this.option("reachBottomText"))},_createStrategy(){const e=this.option("useNative")?this.option("refreshStrategy"):"simulated",t=T[e];this._strategy=new t(this),this._strategy.pullDownCallbacks.add(this._pullDownHandler.bind(this)),this._strategy.releaseCallbacks.add(this._releaseHandler.bind(this)),this._strategy.reachBottomCallbacks.add(this._reachBottomHandler.bind(this))},_createActions(){this.callBase(),this._pullDownAction=this._createActionByOption("onPullDown"),this._reachBottomAction=this._createActionByOption("onReachBottom"),this._tryRefreshPocketState()},_tryRefreshPocketState(){this._pullDownEnable(this.hasActionSubscription("onPullDown")),this._reachBottomEnable(this.hasActionSubscription("onReachBottom"))},on(e){const t=this.callBase.apply(this,arguments);return"pullDown"!==e&&"reachBottom"!==e||this._tryRefreshPocketState(),t},_pullDownEnable(e){if(0===arguments.length)return this._pullDownEnabled;this._$pullDown&&this._strategy&&(this._$pullDown.toggle(e),this._strategy.pullDownEnable(e),this._pullDownEnabled=e)},_reachBottomEnable(e){if(0===arguments.length)return this._reachBottomEnabled;this._$reachBottom&&this._strategy&&(this._$reachBottom.toggle(e),this._strategy.reachBottomEnable(e),this._reachBottomEnabled=e)},_pullDownHandler(){this._loadingIndicator(!1),this._pullDownLoading()},_loadingIndicator(e){if(arguments.length<1)return this._loadingIndicatorEnabled;this._loadingIndicatorEnabled=e},_pullDownLoading(){this.startLoading(),this._pullDownAction()},_reachBottomHandler(){this._loadingIndicator(!1),this._reachBottomLoading()},_reachBottomLoading(){this.startLoading(),this._reachBottomAction()},_releaseHandler(){this.finishLoading(),this._loadingIndicator(!0)},_optionChanged(e){switch(e.name){case"onPullDown":case"onReachBottom":this._createActions();break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"refreshStrategy":this._invalidate();break;case"reachBottomText":this._updateReachBottomText();break;default:this.callBase(e)}},content(){return(0,s.getPublicElement)(this._$content.children().eq(1))},release(e){return void 0!==e&&this.toggleLoading(!e),this._strategy.release()},toggleLoading(e){this._reachBottomEnable(e)},refresh(){this.hasActionSubscription("onPullDown")&&(this._strategy.pendingRelease(),this._pullDownLoading())},startLoading(){this._loadingIndicator()&&this.$element().is(":visible")&&this._loadPanel.show(),this._lock()},finishLoading(){this._loadPanel.hide(),this._unlock()},isBottomReached(){return this._strategy.isBottomReached()},_dispose(){this._strategy.dispose(),this.callBase(),this._loadPanel&&this._loadPanel.$element().remove()}});(0,o.default)("dxScrollView",P);t.default=P},83493:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=u(i(64553)),a=u(i(84718)),s=i(87739),r=i(21274),l=u(i(11979)),d=u(i(97265));function u(e){return e&&e.__esModule?e:{default:e}}const c="dx-scrollview-pull-down-loading",h="dx-scrollview-pull-down-ready",p=d.default.inherit({_init(e){this.callBase(e),this._$topPocket=e._$topPocket,this._$pullDown=e._$pullDown,this._$refreshingText=e._$refreshingText,this._$scrollViewContent=(0,o.default)(e.content()),this._$container=(0,o.default)(e.container()),this._initCallbacks()},_initCallbacks(){this.pullDownCallbacks=(0,a.default)(),this.releaseCallbacks=(0,a.default)(),this.reachBottomCallbacks=(0,a.default)()},render(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown(){const e=(0,o.default)("<div>").addClass("dx-scrollview-pull-down-image"),t=(0,o.default)("<div>").addClass("dx-scrollview-pull-down-indicator"),i=new l.default((0,o.default)("<div>")).$element(),n=this._$pullDownText=(0,o.default)("<div>").addClass("dx-scrollview-pull-down-text");this._$pullingDownText=(0,o.default)("<div>").text(this.option("pullingDownText")).appendTo(n),this._$pulledDownText=(0,o.default)("<div>").text(this.option("pulledDownText")).appendTo(n),this._$refreshingText=(0,o.default)("<div>").text(this.option("refreshingText")).appendTo(n),this._$pullDown.empty().append(e).append(t.append(i)).append(n)},_releaseState(){this._state=0,this._refreshPullDownText()},_refreshPullDownText(){const e=this,t=[{element:this._$pullingDownText,visibleState:0},{element:this._$pulledDownText,visibleState:1},{element:this._$refreshingText,visibleState:2}];(0,r.each)(t,((t,i)=>{const n=e._state===i.visibleState?"addClass":"removeClass";i.element[n]("dx-scrollview-pull-down-text-visible")}))},update(){this.callBase(),this._setTopPocketOffset()},_updateDimensions(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;const e=this._$scrollViewContent.get(0),t=this._$container.get(0);this._bottomBoundary=Math.max(e.clientHeight-t.clientHeight,0)},_allowedDirections(){const e=this.callBase();return e.vertical=e.vertical||this._pullDownEnabled,e},_setTopPocketOffset(){this._$topPocket.css({top:-this._topPocketSize})},handleEnd(){this.callBase(),this._complete()},handleStop(){this.callBase(),this._complete()},_complete(){1===this._state&&(this._setPullDownOffset(this._topPocketSize),clearTimeout(this._pullDownRefreshTimeout),this._pullDownRefreshTimeout=setTimeout((()=>{this._pullDownRefreshing()}),400))},_setPullDownOffset(e){(0,n.move)(this._$topPocket,{top:e}),(0,n.move)(this._$scrollViewContent,{top:e})},handleScroll(e){if(this.callBase(e),2===this._state)return;const t=this.location().top,i=(this._location||0)-t;this._location=t,this._isPullDown()?this._pullDownReady():i>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()},_isPullDown(){return this._pullDownEnabled&&this._location>=this._topPocketSize},_isReachBottom(){return this._reachBottomEnabled&&this.isBottomReached()},isBottomReached(){return Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom(){3!==this._state&&(this._state=3,this.reachBottomCallbacks.fire())},_pullDownReady(){1!==this._state&&(this._state=1,this._$pullDown.addClass(h),this._refreshPullDownText())},_stateReleased(){0!==this._state&&(this._$pullDown.removeClass(c).removeClass(h),this._releaseState())},_pullDownRefreshing(){2!==this._state&&(this._state=2,this._$pullDown.addClass(c).removeClass(h),this._refreshPullDownText(),this.pullDownCallbacks.fire())},pullDownEnable(e){e&&(this._updateDimensions(),this._setTopPocketOffset()),this._pullDownEnabled=e},reachBottomEnable(e){this._reachBottomEnabled=e},pendingRelease(){this._state=1},release(){const e=(0,s.Deferred)();return this._updateDimensions(),clearTimeout(this._releaseTimeout),3===this._state&&(this._state=0),this._releaseTimeout=setTimeout((()=>{this._setPullDownOffset(0),this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),e.resolve()}),400),e.promise()},dispose(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}});t.default=p},14286:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=i(98834),a=c(i(64553)),s=c(i(84718)),r=i(87739),l=i(57653),d=c(i(11979)),u=c(i(97265));function c(e){return e&&e.__esModule?e:{default:e}}const h="dx-scrollview-pull-down-loading",p=u.default.inherit({_init(e){this.callBase(e),this._$topPocket=e._$topPocket,this._$pullDown=e._$pullDown,this._$scrollViewContent=(0,a.default)(e.content()),this._$container=(0,a.default)(e.container()),this._initCallbacks(),this._location=0},_initCallbacks(){this.pullDownCallbacks=(0,s.default)(),this.releaseCallbacks=(0,s.default)(),this.reachBottomCallbacks=(0,s.default)()},render(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown(){const e=(0,a.default)("<div>").addClass("dx-scrollview-pull-down-indicator"),t=new d.default((0,a.default)("<div>")).$element();this._$icon=(0,a.default)("<div>").addClass("dx-icon-pulldown"),this._$pullDown.empty().append(this._$icon).append(e.append(t))},_releaseState(){this._state=0,this._releasePullDown(),this._updateDimensions()},_releasePullDown(){this._$pullDown.css({opacity:0})},_updateDimensions(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;const e=this._$scrollViewContent.get(0),t=this._$container.get(0);this._bottomBoundary=Math.max(e.clientHeight-t.clientHeight,0)},_allowedDirections(){const e=this.callBase();return e.vertical=e.vertical||this._pullDownEnabled,e},handleInit(e){this.callBase(e),0===this._state&&0===this._location&&(this._startClientY=(0,o.eventData)(e.originalEvent).y,this._state=4)},handleMove(e){this.callBase(e),this._deltaY=(0,o.eventData)(e.originalEvent).y-this._startClientY,4===this._state&&(this._pullDownEnabled&&this._deltaY>0?this._state=5:this._complete()),5===this._state&&(e.preventDefault(),this._movePullDown())},_movePullDown(){const e=this._getPullDownHeight(),t=Math.min(3*e,this._deltaY+this._getPullDownStartPosition()),i=180*t/e/3;this._$pullDown.css({opacity:1}).toggleClass("dx-scrollview-pull-down-refreshing",t<e),(0,n.move)(this._$pullDown,{top:t}),this._$icon.css({transform:`rotate(${i}deg)`})},_isPullDown(){return this._pullDownEnabled&&5===this._state&&this._deltaY>=this._getPullDownHeight()-this._getPullDownStartPosition()},_getPullDownHeight(){return Math.round(.05*(0,l.getOuterHeight)(this._$element))},_getPullDownStartPosition(){return-Math.round(1.5*(0,l.getOuterHeight)(this._$pullDown))},handleEnd(){this._isPullDown()&&this._pullDownRefreshing(),this._complete()},handleStop(){this._complete()},_complete(){4!==this._state&&5!==this._state||this._releaseState()},handleScroll(e){if(this.callBase(e),2===this._state)return;const t=this.location().top,i=this._location-t;this._location=t,i>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()},_isReachBottom(){return this._reachBottomEnabled&&this.isBottomReached()},isBottomReached(){return Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom(){this.reachBottomCallbacks.fire()},_stateReleased(){0!==this._state&&(this._$pullDown.removeClass(h),this._releaseState())},_pullDownRefreshing(){this._state=2,this._pullDownRefreshHandler()},_pullDownRefreshHandler(){this._refreshPullDown(),this.pullDownCallbacks.fire()},_refreshPullDown(){this._$pullDown.addClass(h),(0,n.move)(this._$pullDown,{top:this._getPullDownHeight()})},pullDownEnable(e){this._$topPocket.toggle(e),this._pullDownEnabled=e},reachBottomEnable(e){this._reachBottomEnabled=e},pendingRelease(){this._state=1},release(){const e=(0,r.Deferred)();return this._updateDimensions(),clearTimeout(this._releaseTimeout),this._releaseTimeout=setTimeout((()=>{this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),e.resolve()}),800),e.promise()},dispose(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}});t.default=p},94492:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(i(64553)),o=c(i(84718)),a=i(17781),s=i(52576),r=i(21274),l=i(57653),d=c(i(11979)),u=i(74638);function c(e){return e&&e.__esModule?e:{default:e}}const h=Math,p="dx-scrollview-pull-down-loading",g="dx-scrollview-pull-down-ready",_=u.Scroller.inherit({ctor(){this._topPocketSize=0,this._bottomPocketSize=0,this.callBase.apply(this,arguments),this._initCallbacks(),this._releaseState()},_releaseState(){this._state=0,this._refreshPullDownText()},_refreshPullDownText(){const e=this,t=[{element:this._$pullingDownText,visibleState:0},{element:this._$pulledDownText,visibleState:1},{element:this._$refreshingText,visibleState:2}];(0,r.each)(t,((t,i)=>{const n=e._state===i.visibleState?"addClass":"removeClass";i.element[n]("dx-scrollview-pull-down-text-visible")}))},_initCallbacks(){this.pullDownCallbacks=(0,o.default)(),this.releaseCallbacks=(0,o.default)(),this.reachBottomCallbacks=(0,o.default)()},_updateBounds(){if("horizontal"!==this._direction){this._topPocketSize=this._$topPocket.get(0).clientHeight,this._bottomPocketSize=this._$bottomPocket.get(0).clientHeight;const e=this._$container.get(0),t=this._$content.get(0);this._bottomBoundary=Math.max(t.clientHeight-this._bottomPocketSize-e.clientHeight,0)}this.callBase()},_updateScrollbar(){this._scrollbar.option({containerSize:this._containerSize(),contentSize:this._contentSize()-this._topPocketSize-this._bottomPocketSize,scaleRatio:this._getScaleRatio()})},_moveContent(){this.callBase(),this._isPullDown()?this._pullDownReady():this._isReachBottom()?this._reachBottomReady():0!==this._state&&this._stateReleased()},_moveScrollbar(){this._scrollbar.moveTo(this._topPocketSize+this._location)},_isPullDown(){return this._pullDownEnabled&&this._location>=0},_isReachBottom(){return this._reachBottomEnabled&&this.isBottomReached()},isBottomReached(){const e=this._$container.get(0);return Math.round(this._bottomBoundary-Math.ceil(e.scrollTop))<=1},_scrollComplete(){this._inBounds()&&1===this._state?this._pullDownRefreshing():this._inBounds()&&3===this._state?this._reachBottomLoading():this.callBase()},_reachBottomReady(){3!==this._state&&(this._state=3,this._minOffset=this._getMinOffset())},_getMaxOffset(){return-this._topPocketSize},_getMinOffset(){return h.min(this.callBase(),-this._topPocketSize)},_reachBottomLoading(){this.reachBottomCallbacks.fire()},_pullDownReady(){1!==this._state&&(this._state=1,this._maxOffset=0,this._$pullDown.addClass(g),this._refreshPullDownText())},_stateReleased(){0!==this._state&&(this._releaseState(),this._updateBounds(),this._$pullDown.removeClass(p).removeClass(g),this.releaseCallbacks.fire())},_pullDownRefreshing(){2!==this._state&&(this._state=2,this._$pullDown.addClass(p).removeClass(g),this._refreshPullDownText(),this.pullDownCallbacks.fire())},_releaseHandler(){return 0===this._state&&this._moveToBounds(),this._update(),this._releaseTask&&this._releaseTask.abort(),this._releaseTask=(0,a.executeAsync)(this._release.bind(this)),this._releaseTask.promise},_release(){this._stateReleased(),this._scrollComplete()},_reachBottomEnablingHandler(e){this._reachBottomEnabled!==e&&(this._reachBottomEnabled=e,this._updateBounds())},_pullDownEnablingHandler(e){this._pullDownEnabled!==e&&(this._pullDownEnabled=e,this._considerTopPocketChange(),this._updateHandler())},_considerTopPocketChange(){this._location-=(0,l.getHeight)(this._$topPocket)||-this._topPocketSize,this._maxOffset=0,this._move()},_pendingReleaseHandler(){this._state=1},dispose(){this._releaseTask&&this._releaseTask.abort(),this.callBase()}}),f=u.SimulatedStrategy.inherit({_init(e){this.callBase(e),this._$pullDown=e._$pullDown,this._$topPocket=e._$topPocket,this._$bottomPocket=e._$bottomPocket,this._initCallbacks()},_initCallbacks(){this.pullDownCallbacks=(0,o.default)(),this.releaseCallbacks=(0,o.default)(),this.reachBottomCallbacks=(0,o.default)()},render(){this._renderPullDown(),this.callBase()},_renderPullDown(){const e=(0,n.default)("<div>").addClass("dx-scrollview-pull-down-image"),t=(0,n.default)("<div>").addClass("dx-scrollview-pull-down-indicator"),i=new d.default((0,n.default)("<div>")).$element(),o=this._$pullDownText=(0,n.default)("<div>").addClass("dx-scrollview-pull-down-text");this._$pullingDownText=(0,n.default)("<div>").text(this.option("pullingDownText")).appendTo(o),this._$pulledDownText=(0,n.default)("<div>").text(this.option("pulledDownText")).appendTo(o),this._$refreshingText=(0,n.default)("<div>").text(this.option("refreshingText")).appendTo(o),this._$pullDown.empty().append(e).append(t.append(i)).append(o)},pullDownEnable(e){this._eventHandler("pullDownEnabling",e)},reachBottomEnable(e){this._eventHandler("reachBottomEnabling",e)},_createScroller(e){const t=this,i=t._scrollers[e]=new _(t._scrollerOptions(e));i.pullDownCallbacks.add((()=>{t.pullDownCallbacks.fire()})),i.releaseCallbacks.add((()=>{t.releaseCallbacks.fire()})),i.reachBottomCallbacks.add((()=>{t.reachBottomCallbacks.fire()}))},_scrollerOptions(e){return(0,s.extend)(this.callBase(e),{$topPocket:this._$topPocket,$bottomPocket:this._$bottomPocket,$pullDown:this._$pullDown,$pullDownText:this._$pullDownText,$pullingDownText:this._$pullingDownText,$pulledDownText:this._$pulledDownText,$refreshingText:this._$refreshingText})},pendingRelease(){this._eventHandler("pendingRelease")},release(){return this._eventHandler("release").done(this._updateAction)},location(){const e=this.callBase();return e.top+=(0,l.getHeight)(this._$topPocket),e},isBottomReached(){return this._scrollers.vertical.isBottomReached()},dispose(){(0,r.each)(this._scrollers,(function(){this.dispose()})),this.callBase()}});t.default=f},65180:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.deviceDependentOptions=void 0;var n=a(i(65951)),o=a(i(85991));function a(e){return e&&e.__esModule?e:{default:e}}t.deviceDependentOptions=function(){return[{device:()=>!o.default.nativeScrolling,options:{useNative:!1}},{device:e=>!n.default.isSimulator()&&"desktop"===n.default.real().deviceType&&"generic"===e.platform,options:{bounceEnabled:!1,scrollByThumb:!0,scrollByContent:o.default.touch,showScrollbar:"onHover"}}]}},94790:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=w(i(92774)),o=w(i(86548)),a=i(98834),s=w(i(92848)),r=w(i(65951)),l=w(i(97832)),d=i(61404),u=w(i(64553)),c=w(i(48314)),h=i(17781),p=i(87739),g=i(52576),_=i(57653),f=i(11528),m=i(3104),v=i(62504),C=w(i(85991)),y=i(65180),b=w(i(97265)),x=i(74638);function w(e){return e&&e.__esModule?e:{default:e}}const S="dxScrollable",D="dx-scrollable",I="dx-scrollable-content",E="vertical",T="horizontal",A="both",O=l.default.inherit({_getDefaultOptions(){return(0,g.extend)(this.callBase(),{disabled:!1,onScroll:null,direction:E,showScrollbar:"onScroll",useNative:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,onUpdated:null,onStart:null,onEnd:null,onBounce:null,useSimulatedScrollbar:!1,useKeyboard:!0,inertiaEnabled:!0,updateManually:!1,_onVisibilityChanged:h.noop})},_defaultOptionsRules(){return this.callBase().concat((0,y.deviceDependentOptions)(),[{device:()=>C.default.nativeScrolling&&"android"===r.default.real().platform&&!c.default.mozilla,options:{useSimulatedScrollbar:!0}}])},_initOptions(e){this.callBase(e),"useSimulatedScrollbar"in e||this._setUseSimulatedScrollbar()},_setUseSimulatedScrollbar(){this.initialOption("useSimulatedScrollbar")||this.option("useSimulatedScrollbar",!this.option("useNative"))},_init(){this.callBase(),this._initScrollableMarkup(),this._locked=!1},_visibilityChanged(e){e?(this.update(),this._updateRtlPosition(),this._savedScrollOffset&&this.scrollTo(this._savedScrollOffset),delete this._savedScrollOffset,this.option("_onVisibilityChanged")(this)):this._savedScrollOffset=this.scrollOffset()},_initScrollableMarkup(){const e=this.$element().addClass(D),t=this._$container=(0,u.default)("<div>").addClass("dx-scrollable-container"),i=this._$wrapper=(0,u.default)("<div>").addClass("dx-scrollable-wrapper");(this._$content=(0,u.default)("<div>").addClass(I)).append(e.contents()).appendTo(t),t.appendTo(i),i.appendTo(e)},_dimensionChanged(){this.update(),this._updateRtlPosition()},_initMarkup(){this.callBase(),this._renderDirection()},_render(){this._renderStrategy(),this._attachEventHandlers(),this._renderDisabledState(),this._createActions(),this.update(),this.callBase(),this._updateRtlPosition(!0)},_updateRtlPosition(e){this._strategy.updateRtlPosition(e)},_getMaxOffset(){const{scrollWidth:e,clientWidth:t,scrollHeight:i,clientHeight:n}=(0,u.default)(this.container()).get(0);return{left:e-t,top:i-n}},_attachEventHandlers(){const e=this._strategy,t={getDirection:e.getDirection.bind(e),validate:this._validate.bind(this),isNative:this.option("useNative"),scrollTarget:this._$container};n.default.off(this._$wrapper,`.${S}`),n.default.on(this._$wrapper,(0,a.addNamespace)(o.default.init,S),t,this._initHandler.bind(this)),n.default.on(this._$wrapper,(0,a.addNamespace)(o.default.start,S),e.handleStart.bind(e)),n.default.on(this._$wrapper,(0,a.addNamespace)(o.default.move,S),e.handleMove.bind(e)),n.default.on(this._$wrapper,(0,a.addNamespace)(o.default.end,S),e.handleEnd.bind(e)),n.default.on(this._$wrapper,(0,a.addNamespace)(o.default.cancel,S),e.handleCancel.bind(e)),n.default.on(this._$wrapper,(0,a.addNamespace)(o.default.stop,S),e.handleStop.bind(e)),n.default.off(this._$container,`.${S}`),n.default.on(this._$container,(0,a.addNamespace)("scroll",S),e.handleScroll.bind(e))},_validate(e){return!this._isLocked()&&(this._updateIfNeed(),this._moveIsAllowed(e))},_moveIsAllowed(e){return this._strategy.validate(e)},handleMove(e){this._strategy.handleMove(e)},_prepareDirections(e){this._strategy._prepareDirections(e)},_initHandler(){const e=this._strategy;e.handleInit.apply(e,arguments)},_renderDisabledState(){this.$element().toggleClass("dx-scrollable-disabled",this.option("disabled")),this.option("disabled")?this._lock():this._unlock()},_renderDirection(){this.$element().removeClass(`dx-scrollable-${T}`).removeClass(`dx-scrollable-${E}`).removeClass(`dx-scrollable-${A}`).addClass(`dx-scrollable-${this.option("direction")}`)},_renderStrategy(){this._createStrategy(),this._strategy.render(),this.$element().data("dxScrollableStrategy",this._strategy)},_createStrategy(){this._strategy=this.option("useNative")?new b.default(this):new x.SimulatedStrategy(this)},_createActions(){this._strategy&&this._strategy.createActions()},_clean(){this._strategy&&this._strategy.dispose()},_optionChanged(e){switch(e.name){case"onStart":case"onEnd":case"onUpdated":case"onScroll":case"onBounce":this._createActions();break;case"direction":this._resetInactiveDirection(),this._invalidate();break;case"useNative":this._setUseSimulatedScrollbar(),this._invalidate();break;case"inertiaEnabled":case"scrollByThumb":case"bounceEnabled":case"useKeyboard":case"showScrollbar":case"useSimulatedScrollbar":this._invalidate();break;case"disabled":this._renderDisabledState(),this._strategy&&this._strategy.disabledChanged();break;case"updateManually":case"scrollByContent":case"_onVisibilityChanged":break;case"width":this.callBase(e),this._updateRtlPosition();break;default:this.callBase(e)}},_resetInactiveDirection(){const e=this._getInactiveProp();if(!e||!(0,m.hasWindow)())return;const t=this.scrollOffset();t[e]=0,this.scrollTo(t)},_getInactiveProp(){const e=this.option("direction");return e===E?"left":e===T?"top":void 0},_location(){return this._strategy.location()},_normalizeLocation(e){if((0,f.isPlainObject)(e)){const t=(0,h.ensureDefined)(e.left,e.x),i=(0,h.ensureDefined)(e.top,e.y);return{left:(0,f.isDefined)(t)?-t:void 0,top:(0,f.isDefined)(i)?-i:void 0}}const t=this.option("direction");return{left:t!==E?-e:void 0,top:t!==T?-e:void 0}},_isLocked(){return this._locked},_lock(){this._locked=!0},_unlock(){this.option("disabled")||(this._locked=!1)},_isDirection(e){const t=this.option("direction");return e===E?t!==T:e===T?t!==E:t===e},_updateAllowedDirection(){const e=this._strategy._allowedDirections();this._isDirection(A)&&e.vertical&&e.horizontal?this._allowedDirectionValue=A:this._isDirection(T)&&e.horizontal?this._allowedDirectionValue=T:this._isDirection(E)&&e.vertical?this._allowedDirectionValue=E:this._allowedDirectionValue=null},_allowedDirection(){return this._allowedDirectionValue},$content(){return this._$content},content(){return(0,d.getPublicElement)(this._$content)},container(){return(0,d.getPublicElement)(this._$container)},scrollOffset(){return this._strategy._getScrollOffset()},_isRtlNativeStrategy(){const{useNative:e,rtlEnabled:t}=this.option();return e&&t},scrollTop(){return this.scrollOffset().top},scrollLeft(){return this.scrollOffset().left},clientHeight(){return(0,_.getHeight)(this._$container)},scrollHeight(){return(0,_.getOuterHeight)(this.$content())},clientWidth(){return(0,_.getWidth)(this._$container)},scrollWidth(){return(0,_.getOuterWidth)(this.$content())},update(){if(this._strategy)return(0,p.when)(this._strategy.update()).done((()=>{this._updateAllowedDirection()}))},scrollBy(e){((e=this._normalizeLocation(e)).top||e.left)&&(this._updateIfNeed(),this._strategy.scrollBy(e))},scrollTo(e){if(!(0,m.hasWindow)())return;e=this._normalizeLocation(e),this._updateIfNeed();let t=this._location();this.option("useNative")||(e=this._strategy._applyScaleRatio(e),t=this._strategy._applyScaleRatio(t)),this._isRtlNativeStrategy()&&(t.left-=this._getMaxOffset().left);const i=this._normalizeLocation({left:t.left-(0,h.ensureDefined)(e.left,t.left),top:t.top-(0,h.ensureDefined)(e.top,t.top)});(i.top||i.left)&&this._strategy.scrollBy(i)},scrollToElement(e,t){const i=(0,u.default)(e),n=this.$content().find(e).length,o=i.parents(`.${D}`).length-i.parents(`.${I}`).length==0;if(!n||!o)return;const a={top:0,left:0},s=this.option("direction");s!==E&&(a.left=this.getScrollElementPosition(i,T,t)),s!==T&&(a.top=this.getScrollElementPosition(i,E,t)),this.scrollTo(a)},getScrollElementPosition(e,t,i){const n=this.scrollOffset();return(0,v.getElementLocationInternal)(e.get(0),t,(0,u.default)(this.container()).get(0),n,i)},_updateIfNeed(){this.option("updateManually")||this.update()},_useTemplates:()=>!1,isRenovated:()=>!!O.IS_RENOVATED_WIDGET});(0,s.default)(S,O);t.default=O},97265:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(92774)),o=i(98834),a=h(i(55620)),s=h(i(65951)),r=h(i(64553)),l=i(17781),d=i(21274),u=i(57653),c=h(i(86853));function h(e){return e&&e.__esModule?e:{default:e}}const p="dxNativeScrollable",g="dx-scrollable-native",_="vertical",f="horizontal",m=a.default.inherit({ctor(e){this._init(e)},_init(e){this._component=e,this._$element=e.$element(),this._$container=(0,r.default)(e.container()),this._$content=e.$content(),this._direction=e.option("direction"),this._useSimulatedScrollbar=e.option("useSimulatedScrollbar"),this.option=e.option.bind(e),this._createActionByOption=e._createActionByOption.bind(e),this._isLocked=e._isLocked.bind(e),this._isDirection=e._isDirection.bind(e),this._allowedDirection=e._allowedDirection.bind(e),this._getMaxOffset=e._getMaxOffset.bind(e),this._isRtlNativeStrategy=e._isRtlNativeStrategy.bind(e)},render(){const e=s.default.real().platform;this._$element.addClass(g).addClass(`${g}-${e}`).toggleClass("dx-scrollable-scrollbars-hidden",!this._isScrollbarVisible()),this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._renderScrollbars()},updateRtlPosition(e){e&&this.option("rtlEnabled")&&this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._moveScrollbars()},_renderScrollbars(){this._scrollbars={},this._hideScrollbarTimeout=0,this._$element.addClass("dx-scrollable-scrollbar-simulated"),this._renderScrollbar(_),this._renderScrollbar(f)},_renderScrollbar(e){this._isDirection(e)&&(this._scrollbars[e]=new c.default((0,r.default)("<div>").appendTo(this._$element),{direction:e,expandable:this._component.option("scrollByThumb")}))},handleInit:l.noop,handleStart:l.noop,handleMove(e){this._isLocked()?e.cancel=!0:this._allowedDirection()&&(e.originalEvent.isScrollingEvent=!0)},handleEnd:l.noop,handleCancel:l.noop,handleStop:l.noop,_eachScrollbar(e){e=e.bind(this),(0,d.each)(this._scrollbars||{},((t,i)=>{e(i,t)}))},createActions(){this._scrollAction=this._createActionByOption("onScroll"),this._updateAction=this._createActionByOption("onUpdated")},_createActionArgs(){const{left:e,top:t}=this.location();return{event:this._eventForUserAction,scrollOffset:this._getScrollOffset(),reachedLeft:this._isRtlNativeStrategy()?this._isReachedRight(-e):this._isReachedLeft(e),reachedRight:this._isRtlNativeStrategy()?this._isReachedLeft(-Math.abs(e)):this._isReachedRight(e),reachedTop:this._isDirection(_)?Math.round(t)>=0:void 0,reachedBottom:this._isDirection(_)?Math.round(Math.abs(t)-this._getMaxOffset().top)>=0:void 0}},_getScrollOffset(){const{top:e,left:t}=this.location();return{top:-e,left:this._normalizeOffsetLeft(-t)}},_normalizeOffsetLeft(e){return this._isRtlNativeStrategy()?this._getMaxOffset().left+e:e},_isReachedLeft(e){return this._isDirection(f)?Math.round(e)>=0:void 0},_isReachedRight(e){return this._isDirection(f)?Math.round(Math.abs(e)-this._getMaxOffset().left)>=0:void 0},_isScrollbarVisible(){const{showScrollbar:e}=this.option();return"never"!==e&&!1!==e},handleScroll(e){this._eventForUserAction=e,this._moveScrollbars(),this._scrollAction(this._createActionArgs())},_moveScrollbars(){const{top:e,left:t}=this._getScrollOffset();this._eachScrollbar((i=>{i.moveTo({top:-e,left:-t}),i.option("visible",!0)})),this._hideScrollbars()},_hideScrollbars(){clearTimeout(this._hideScrollbarTimeout),this._hideScrollbarTimeout=setTimeout((()=>{this._eachScrollbar((e=>{e.option("visible",!1)}))}),500)},location(){return{left:-this._$container.scrollLeft(),top:-this._$container.scrollTop()}},disabledChanged:l.noop,update(){this._update(),this._updateAction(this._createActionArgs())},_update(){this._updateDimensions(),this._updateScrollbars()},_updateDimensions(){this._containerSize={height:(0,u.getHeight)(this._$container),width:(0,u.getWidth)(this._$container)},this._componentContentSize={height:(0,u.getHeight)(this._component.$content()),width:(0,u.getWidth)(this._component.$content())},this._contentSize={height:(0,u.getHeight)(this._$content),width:(0,u.getWidth)(this._$content)}},_updateScrollbars(){this._eachScrollbar((function(e,t){const i=t===_?"height":"width";e.option({containerSize:this._containerSize[i],contentSize:this._componentContentSize[i]}),e.update()}))},_allowedDirections(){return{vertical:this._isDirection(_)&&this._contentSize.height>this._containerSize.height,horizontal:this._isDirection(f)&&this._contentSize.width>this._containerSize.width}},dispose(){const{className:e}=this._$element.get(0),t=new RegExp(`${g}\\S*`,"g");t.test(e)&&this._$element.removeClass(e.match(t).join(" ")),n.default.off(this._$element,`.${p}`),n.default.off(this._$container,`.${p}`),this._removeScrollbars(),clearTimeout(this._hideScrollbarTimeout)},_removeScrollbars(){this._eachScrollbar((e=>{e.$element().remove()}))},scrollBy(e){const t=this.location();this._$container.scrollTop(Math.round(-t.top-e.top)),this._$container.scrollLeft(Math.round(-t.left-e.left))},validate(e){return!this.option("disabled")&&((!(0,o.isDxMouseWheelEvent)(e)||!this._isScrolledInMaxDirection(e))&&!!this._allowedDirection())},_isScrolledInMaxDirection(e){const t=this._$container.get(0);let i;return i=e.delta>0?e.shiftKey?!t.scrollLeft:!t.scrollTop:e.shiftKey?t.scrollLeft>=this._getMaxOffset().left:t.scrollTop>=this._getMaxOffset().top,i},getDirection(){return this._allowedDirection()}});t.default=m},74638:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SimulatedStrategy=t.Scroller=void 0;var n=i(88603),o=y(i(92774)),a=i(98834),s=y(i(55620)),r=y(i(64960)),l=y(i(64553)),d=i(17781),u=i(87739),c=i(52576),h=i(53124),p=i(21274),g=i(41639),_=i(57653),f=i(11528),m=i(3104),v=y(i(99762)),C=y(i(86853));function y(e){return e&&e.__esModule?e:{default:e}}const b="dxSimulatedScrollable",x=`${b}Cursor`,w=`${b}Keyboard`,S="dx-scrollable-simulated",D="vertical",I="horizontal",E=.92,T=Math.round(1e3/60),A=(1-E**(400/T))/(1-E),O="pageUp",P="pageDown",k="end",M="home",R="leftArrow",L="upArrow",B="rightArrow",V="downArrow",F="tab",H=v.default.inherit({ctor(e){this.callBase(),this.scroller=e},VELOCITY_LIMIT:1,_isFinished(){return Math.abs(this.scroller._velocity)<=this.VELOCITY_LIMIT},_step(){this.scroller._scrollStep(this.scroller._velocity),this.scroller._velocity*=this._acceleration()},_acceleration(){return this.scroller._inBounds()?E:.5},_complete(){this.scroller._scrollComplete()}}),N=H.inherit({VELOCITY_LIMIT:.2,_isFinished(){return this.scroller._crossBoundOnNextStep()||this.callBase()},_acceleration:()=>E,_complete(){this.scroller._move(this.scroller._bounceLocation),this.callBase()}}),z=t.Scroller=s.default.inherit({ctor(e){this._initOptions(e),this._initAnimators(),this._initScrollbar()},_initOptions(e){this._location=0,this._topReached=!1,this._bottomReached=!1,this._axis=e.direction===I?"x":"y",this._prop=e.direction===I?"left":"top",this._dimension=e.direction===I?"width":"height",this._scrollProp=e.direction===I?"scrollLeft":"scrollTop",(0,p.each)(e,((e,t)=>{this[`_${e}`]=t}))},_initAnimators(){this._inertiaAnimator=new H(this),this._bounceAnimator=new N(this)},_initScrollbar(){this._scrollbar=new C.default((0,l.default)("<div>").appendTo(this._$container),{direction:this._direction,visible:this._scrollByThumb,visibilityMode:this._visibilityModeNormalize(this._scrollbarVisible),expandable:this._scrollByThumb}),this._$scrollbar=this._scrollbar.$element()},_visibilityModeNormalize:e=>!0===e?"onScroll":!1===e?"never":e,_scrollStep(e){const t=this._location;this._location+=e,this._suppressBounce(),this._move(),Math.abs(t-this._location)<1||o.default.triggerHandler(this._$container,{type:"scroll"})},_suppressBounce(){this._bounceEnabled||this._inBounds(this._location)||(this._velocity=0,this._location=this._boundLocation())},_boundLocation(e){return e=void 0!==e?e:this._location,Math.max(Math.min(e,this._maxOffset),this._minOffset)},_move(e){this._location=void 0!==e?e*this._getScaleRatio():this._location,this._moveContent(),this._moveScrollbar()},_moveContent(){const e=this._location;this._$container[this._scrollProp](-e/this._getScaleRatio()),this._moveContentByTranslator(e)},_getScaleRatio(){if((0,m.hasWindow)()&&!this._scaleRatio){const e=this._$element.get(0),t=this._getRealDimension(e,this._dimension),i=this._getBaseDimension(e,this._dimension);this._scaleRatio=Math.round(t/i*100)/100}return this._scaleRatio||1},_getRealDimension:(e,t)=>Math.round((0,g.getBoundingRect)(e)[t]),_getBaseDimension:(e,t)=>e[`offset${(0,h.titleize)(t)}`],_moveContentByTranslator(e){let t;const i=-this._maxScrollPropValue;if(t=e>0?e:e<=i?e-i:e%1,this._translateOffset===t)return;const o={};o[this._prop]=t,this._translateOffset=t,0!==t?(0,n.move)(this._$content,o):(0,n.resetPosition)(this._$content)},_moveScrollbar(){this._scrollbar.moveTo(this._location)},_scrollComplete(){this._inBounds()&&(this._hideScrollbar(),this._completeDeferred&&this._completeDeferred.resolve()),this._scrollToBounds()},_scrollToBounds(){this._inBounds()||(this._bounceAction(),this._setupBounce(),this._bounceAnimator.start())},_setupBounce(){const e=(this._bounceLocation=this._boundLocation())-this._location;this._velocity=e/A},_inBounds(e){return e=void 0!==e?e:this._location,this._boundLocation(e)===e},_crossBoundOnNextStep(){const e=this._location,t=e+this._velocity;return e<this._minOffset&&t>=this._minOffset||e>this._maxOffset&&t<=this._maxOffset},_initHandler(e){this._stopScrolling(),this._prepareThumbScrolling(e)},_stopScrolling:(0,d.deferRenderer)((function(){this._hideScrollbar(),this._inertiaAnimator.stop(),this._bounceAnimator.stop()})),_prepareThumbScrolling(e){if((0,a.isDxMouseWheelEvent)(e.originalEvent))return;const t=(0,l.default)(e.originalEvent.target),i=this._isScrollbar(t);i&&this._moveToMouseLocation(e),this._thumbScrolling=i||this._isThumb(t),this._crossThumbScrolling=!this._thumbScrolling&&this._isAnyThumbScrolling(t),this._thumbScrolling&&this._scrollbar.feedbackOn()},_isThumbScrollingHandler(e){return this._isThumb(e)},_moveToMouseLocation(e){const t=e[`page${this._axis.toUpperCase()}`]-this._$element.offset()[this._prop],i=this._location+t/this._containerToContentRatio()-(0,_.getHeight)(this._$container)/2;this._scrollStep(-Math.round(i))},_startHandler(){this._showScrollbar()},_moveHandler(e){this._crossThumbScrolling||(this._thumbScrolling&&(e[this._axis]=-Math.round(e[this._axis]/this._containerToContentRatio())),this._scrollBy(e))},_scrollBy(e){e=e[this._axis],this._inBounds()||(e*=.5),this._scrollStep(e)},_scrollByHandler(e){this._scrollBy(e),this._scrollComplete()},_containerToContentRatio(){return this._scrollbar.containerToContentRatio()},_endHandler(e){return this._completeDeferred=(0,u.Deferred)(),this._velocity=e[this._axis],this._inertiaHandler(),this._resetThumbScrolling(),this._completeDeferred.promise()},_inertiaHandler(){this._suppressInertia(),this._inertiaAnimator.start()},_suppressInertia(){this._inertiaEnabled&&!this._thumbScrolling||(this._velocity=0)},_resetThumbScrolling(){this._thumbScrolling=!1,this._crossThumbScrolling=!1},_stopHandler(){this._thumbScrolling&&this._scrollComplete(),this._resetThumbScrolling(),this._scrollToBounds()},_disposeHandler(){this._stopScrolling(),this._$scrollbar.remove()},_updateHandler(){this._update(),this._moveToBounds()},_update(){return this._stopScrolling(),(0,d.deferUpdate)((()=>{this._resetScaleRatio(),this._updateLocation(),this._updateBounds(),this._updateScrollbar(),(0,d.deferRender)((()=>{this._moveScrollbar(),this._scrollbar.update()}))}))},_resetScaleRatio(){this._scaleRatio=null},_updateLocation(){this._location=((0,n.locate)(this._$content)[this._prop]-this._$container[this._scrollProp]())*this._getScaleRatio()},_updateBounds(){this._maxOffset=this._getMaxOffset(),this._minOffset=this._getMinOffset()},_getMaxOffset:()=>0,_getMinOffset(){return this._maxScrollPropValue=Math.max(this._contentSize()-this._containerSize(),0),-this._maxScrollPropValue},_updateScrollbar:(0,d.deferUpdater)((function(){const e=this._containerSize(),t=this._contentSize(),i=this._getBaseDimension(this._$container.get(0),this._dimension),n=this._getBaseDimension(this._$content.get(0),this._dimension);(0,d.deferRender)((()=>{this._scrollbar.option({containerSize:e,contentSize:t,baseContainerSize:i,baseContentSize:n,scaleRatio:this._getScaleRatio()})}))})),_moveToBounds:(0,d.deferRenderer)((0,d.deferUpdater)((0,d.deferRenderer)((function(){const e=this._boundLocation(),t=e!==this._location;this._location=e,this._move(),t&&this._scrollAction()})))),_createActionsHandler(e){this._scrollAction=e.scroll,this._bounceAction=e.bounce},_showScrollbar(){this._scrollbar.option("visible",!0)},_hideScrollbar(){this._scrollbar.option("visible",!1)},_containerSize(){return this._getRealDimension(this._$container.get(0),this._dimension)},_contentSize(){const e="hidden"===this._$content.css(`overflow${this._axis.toUpperCase()}`);let t=this._getRealDimension(this._$content.get(0),this._dimension);if(!e){const e=this._$content[0][`scroll${(0,h.titleize)(this._dimension)}`]*this._getScaleRatio();t=Math.max(e,t)}return t},_validateEvent(e){const t=(0,l.default)(e.originalEvent.target);return this._isThumb(t)||this._isScrollbar(t)},_isThumb(e){return this._scrollByThumb&&this._scrollbar.isThumb(e)},_isScrollbar(e){return this._scrollByThumb&&e&&e.is(this._$scrollbar)},_reachedMin(){return Math.round(this._location-this._minOffset)<=0},_reachedMax(){return Math.round(this._location-this._maxOffset)>=0},_cursorEnterHandler(){this._resetScaleRatio(),this._updateScrollbar(),this._scrollbar.cursorEnter()},_cursorLeaveHandler(){this._scrollbar.cursorLeave()},dispose:d.noop});let W,$;t.SimulatedStrategy=s.default.inherit({ctor(e){this._init(e)},_init(e){this._component=e,this._$element=e.$element(),this._$container=(0,l.default)(e.container()),this._$wrapper=e._$wrapper,this._$content=e.$content(),this.option=e.option.bind(e),this._createActionByOption=e._createActionByOption.bind(e),this._isLocked=e._isLocked.bind(e),this._isDirection=e._isDirection.bind(e),this._allowedDirection=e._allowedDirection.bind(e),this._getMaxOffset=e._getMaxOffset.bind(e)},render(){this._$element.addClass(S),this._createScrollers(),this.option("useKeyboard")&&this._$container.prop("tabIndex",0),this._attachKeyboardHandler(),this._attachCursorHandlers()},_createScrollers(){this._scrollers={},this._isDirection(I)&&this._createScroller(I),this._isDirection(D)&&this._createScroller(D),this._$element.toggleClass("dx-scrollable-scrollbars-alwaysvisible","always"===this.option("showScrollbar"))},_createScroller(e){this._scrollers[e]=new z(this._scrollerOptions(e))},_scrollerOptions(e){return{direction:e,$content:this._$content,$container:this._$container,$wrapper:this._$wrapper,$element:this._$element,scrollByThumb:this.option("scrollByThumb"),scrollbarVisible:this.option("showScrollbar"),bounceEnabled:this.option("bounceEnabled"),inertiaEnabled:this.option("inertiaEnabled"),isAnyThumbScrolling:this._isAnyThumbScrolling.bind(this)}},_applyScaleRatio(e){for(const t in this._scrollers){const i=this._getPropByDirection(t);if((0,f.isDefined)(e[i])){const n=this._scrollers[t];e[i]*=n._getScaleRatio()}}return e},_isAnyThumbScrolling(e){let t=!1;return this._eventHandler("isThumbScrolling",e).done(((e,i)=>{t=e||i})),t},handleInit(e){this._suppressDirections(e),this._eventForUserAction=e,this._eventHandler("init",e)},_suppressDirections(e){(0,a.isDxMouseWheelEvent)(e.originalEvent)?this._prepareDirections(!0):(this._prepareDirections(),this._eachScroller((function(t,i){const n=(0,l.default)(e.originalEvent.target),o=t._validateEvent(e)||this.option("scrollByContent")&&this._isContent(n);this._validDirections[i]=o})))},_isContent(e){return!!e.closest(this._$element).length},_prepareDirections(e){e=e||!1,this._validDirections={},this._validDirections[I]=e,this._validDirections[D]=e},_eachScroller(e){e=e.bind(this),(0,p.each)(this._scrollers,((t,i)=>{e(i,t)}))},handleStart(e){this._eventForUserAction=e,this._eventHandler("start").done(this._startAction)},_saveActive(){$=this},_resetActive(){$===this&&($=null)},handleMove(e){if(this._isLocked())return e.cancel=!0,void this._resetActive();this._saveActive(),e.preventDefault&&e.preventDefault(),this._adjustDistance(e,e.delta),this._eventForUserAction=e,this._eventHandler("move",e.delta)},_adjustDistance(e,t){t.x*=this._validDirections[I],t.y*=this._validDirections[D];const i=this._tryGetDevicePixelRatio();i&&(0,a.isDxMouseWheelEvent)(e.originalEvent)&&(t.x=Math.round(t.x/i*100)/100,t.y=Math.round(t.y/i*100)/100)},_tryGetDevicePixelRatio(){if((0,m.hasWindow)())return(0,m.getWindow)().devicePixelRatio},handleEnd(e){return this._resetActive(),this._refreshCursorState(e.originalEvent&&e.originalEvent.target),this._adjustDistance(e,e.velocity),this._eventForUserAction=e,this._eventHandler("end",e.velocity).done(this._endAction)},handleCancel(e){return this._resetActive(),this._eventForUserAction=e,this._eventHandler("end",{x:0,y:0})},handleStop(){this._resetActive(),this._eventHandler("stop")},handleScroll(){this._updateRtlConfig(),this._scrollAction()},_attachKeyboardHandler(){o.default.off(this._$element,`.${w}`),!this.option("disabled")&&this.option("useKeyboard")&&o.default.on(this._$element,(0,a.addNamespace)("keydown",w),this._keyDownHandler.bind(this))},_keyDownHandler(e){if(clearTimeout(this._updateHandlerTimeout),this._updateHandlerTimeout=setTimeout((()=>{(0,a.normalizeKeyName)(e)===F&&this._eachScroller((e=>{e._updateHandler()}))})),!this._$container.is(r.default.getActiveElement(this._$container.get(0))))return;let t=!0;switch((0,a.normalizeKeyName)(e)){case V:this._scrollByLine({y:1});break;case L:this._scrollByLine({y:-1});break;case B:this._scrollByLine({x:1});break;case R:this._scrollByLine({x:-1});break;case P:this._scrollByPage(1);break;case O:this._scrollByPage(-1);break;case M:this._scrollToHome();break;case k:this._scrollToEnd();break;default:t=!1}t&&(e.stopPropagation(),e.preventDefault())},_scrollByLine(e){const t=this._tryGetDevicePixelRatio();let i=40;t&&(i=Math.abs(i/t*100)/100),this.scrollBy({top:(e.y||0)*-i,left:(e.x||0)*-i})},_scrollByPage(e){const t=this._wheelProp(),i={},n="width"===this._dimensionByProp(t)?_.getWidth:_.getHeight;i[t]=e*-n(this._$container),this.scrollBy(i)},_dimensionByProp:e=>"left"===e?"width":"height",_getPropByDirection:e=>e===I?"left":"top",_scrollToHome(){const e={};e[this._wheelProp()]=0,this._component.scrollTo(e)},_scrollToEnd(){const e=this._wheelProp(),t={},i="width"===this._dimensionByProp(e)?_.getWidth:_.getHeight;t[e]=i(this._$content)-i(this._$container),this._component.scrollTo(t)},createActions(){this._startAction=this._createActionHandler("onStart"),this._endAction=this._createActionHandler("onEnd"),this._updateAction=this._createActionHandler("onUpdated"),this._createScrollerActions()},_createScrollerActions(){this._scrollAction=this._createActionHandler("onScroll"),this._bounceAction=this._createActionHandler("onBounce"),this._eventHandler("createActions",{scroll:this._scrollAction,bounce:this._bounceAction})},_createActionHandler(e){const t=this._createActionByOption(e);return()=>{t((0,c.extend)(this._createActionArgs(),arguments))}},_createActionArgs(){const{horizontal:e,vertical:t}=this._scrollers,i=this._getScrollOffset();return this._scrollOffset={top:t&&i.top,left:e&&i.left},{event:this._eventForUserAction,scrollOffset:this._scrollOffset,reachedLeft:e&&e._reachedMax(),reachedRight:e&&e._reachedMin(),reachedTop:t&&t._reachedMax(),reachedBottom:t&&t._reachedMin()}},_getScrollOffset(){return{top:-this.location().top,left:-this.location().left}},_eventHandler(e){const t=[].slice.call(arguments).slice(1),i=(0,p.map)(this._scrollers,(i=>i[`_${e}Handler`].apply(i,t)));return u.when.apply(l.default,i).promise()},location(){const e=(0,n.locate)(this._$content);return e.top-=this._$container.scrollTop(),e.left-=this._$container.scrollLeft(),e},disabledChanged(){this._attachCursorHandlers()},_attachCursorHandlers(){o.default.off(this._$element,`.${x}`),!this.option("disabled")&&this._isHoverMode()&&(o.default.on(this._$element,(0,a.addNamespace)("mouseenter",x),this._cursorEnterHandler.bind(this)),o.default.on(this._$element,(0,a.addNamespace)("mouseleave",x),this._cursorLeaveHandler.bind(this)))},_isHoverMode(){return"onHover"===this.option("showScrollbar")},_cursorEnterHandler(e){(e=e||{}).originalEvent=e.originalEvent||{},$||e.originalEvent._hoverHandled||(W&&W._cursorLeaveHandler(),W=this,this._eventHandler("cursorEnter"),e.originalEvent._hoverHandled=!0)},_cursorLeaveHandler(e){W===this&&$!==W&&(this._eventHandler("cursorLeave"),W=null,this._refreshCursorState(e&&e.relatedTarget))},_refreshCursorState(e){if(!this._isHoverMode()&&(!e||$))return;const t=(0,l.default)(e).closest(`.${S}:not(.dx-state-disabled)`),i=t.length&&t.data("dxScrollableStrategy");W&&W!==i&&W._cursorLeaveHandler(),i&&i._cursorEnterHandler()},update(){const e=this._eventHandler("update").done(this._updateAction);return(0,u.when)(e,(0,d.deferUpdate)((()=>{const e=this._allowedDirections();return(0,d.deferRender)((()=>{let t=e.vertical?"pan-x":"";t=e.horizontal?"pan-y":t,t=e.vertical&&e.horizontal?"none":t,this._$container.css("touchAction",t)})),(0,u.when)().promise()})))},_allowedDirections(){const e=this.option("bounceEnabled"),t=this._scrollers[D],i=this._scrollers[I];return{vertical:t&&(t._minOffset<0||e),horizontal:i&&(i._minOffset<0||e)}},_updateBounds(){this._scrollers[I]&&this._scrollers[I]._updateBounds()},_isHorizontalAndRtlEnabled(){return this.option("rtlEnabled")&&this.option("direction")!==D},updateRtlPosition(e){if(e&&(this._rtlConfig={scrollRight:0,clientWidth:this._$container.get(0).clientWidth,windowPixelRatio:this._getWindowDevicePixelRatio()}),this._updateBounds(),this._isHorizontalAndRtlEnabled()){let e=this._getMaxOffset().left-this._rtlConfig.scrollRight;e<=0&&(e=0,this._rtlConfig.scrollRight=this._getMaxOffset().left),this._getScrollOffset().left!==e&&(this._rtlConfig.skipUpdating=!0,this._component.scrollTo({left:e}),this._rtlConfig.skipUpdating=!1)}},_updateRtlConfig(){if(this._isHorizontalAndRtlEnabled()&&!this._rtlConfig.skipUpdating){const{clientWidth:e,scrollLeft:t}=this._$container.get(0),i=this._getWindowDevicePixelRatio();this._rtlConfig.windowPixelRatio===i&&this._rtlConfig.clientWidth===e&&(this._rtlConfig.scrollRight=this._getMaxOffset().left-t),this._rtlConfig.clientWidth=e,this._rtlConfig.windowPixelRatio=i}},_getWindowDevicePixelRatio:()=>(0,m.hasWindow)()?(0,m.getWindow)().devicePixelRatio:1,scrollBy(e){const t=this._scrollers[D],i=this._scrollers[I];t&&(e.top=t._boundLocation(e.top+t._location)-t._location),i&&(e.left=i._boundLocation(e.left+i._location)-i._location),this._prepareDirections(!0),this._startAction(),this._eventHandler("scrollBy",{x:e.left,y:e.top}),this._endAction(),this._updateRtlConfig()},validate(e){return(!(0,a.isDxMouseWheelEvent)(e)||!(0,a.isCommandKeyPressed)(e))&&(!this.option("disabled")&&(!!this.option("bounceEnabled")||((0,a.isDxMouseWheelEvent)(e)?this._validateWheel(e):this._validateMove(e))))},_validateWheel(e){const t=this._scrollers[this._wheelDirection(e)],i=t._reachedMin(),n=t._reachedMax(),o=!i||!n,a=!i&&!n,s=i&&e.delta>0,r=n&&e.delta<0;let l=o&&(a||s||r);return l=l||void 0!==this._validateWheelTimer,l&&(clearTimeout(this._validateWheelTimer),this._validateWheelTimer=setTimeout((()=>{this._validateWheelTimer=void 0}),500)),l},_validateMove(e){return!(!this.option("scrollByContent")&&!(0,l.default)(e.target).closest(".dx-scrollable-scrollbar").length)&&this._allowedDirection()},getDirection(e){return(0,a.isDxMouseWheelEvent)(e)?this._wheelDirection(e):this._allowedDirection()},_wheelProp(){return this._wheelDirection()===I?"left":"top"},_wheelDirection(e){switch(this.option("direction")){case I:return I;case D:return D;default:return e&&e.shiftKey?I:D}},dispose(){this._resetActive(),W===this&&(W=null),this._eventHandler("dispose"),this._detachEventHandlers(),this._$element.removeClass(S),this._eventForUserAction=null,clearTimeout(this._validateWheelTimer),clearTimeout(this._updateHandlerTimeout)},_detachEventHandlers(){o.default.off(this._$element,`.${x}`),o.default.off(this._$container,`.${w}`)}})},86853:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(88603),o=g(i(92774)),a=g(i(89797)),s=i(98834),r=g(i(64960)),l=g(i(64553)),d=i(17781),u=i(52576),c=g(i(3122)),h=i(11528),p=g(i(11118));function g(e){return e&&e.__esModule?e:{default:e}}const _="dxScrollbar",f="dx-scrollable-scrollbar",m=`${f}-active`,v="horizontal",C="onScroll",y="onHover",b="always",x="never";let w=null;const S=p.default.inherit({_getDefaultOptions(){return(0,u.extend)(this.callBase(),{direction:null,visible:!1,activeStateEnabled:!1,visibilityMode:C,containerSize:0,contentSize:0,expandable:!0,scaleRatio:1})},_init(){this.callBase(),this._isHovered=!1},_initMarkup(){this._renderThumb(),this.callBase()},_render(){this.callBase(),this._renderDirection(),this._update(),this._attachPointerDownHandler(),this.option("hoverStateEnabled",this._isHoverMode()),this.$element().toggleClass("dx-scrollbar-hoverable",this.option("hoverStateEnabled"))},_renderThumb(){this._$thumb=(0,l.default)("<div>").addClass("dx-scrollable-scroll"),(0,l.default)("<div>").addClass("dx-scrollable-scroll-content").appendTo(this._$thumb),this.$element().addClass(f).append(this._$thumb)},isThumb(e){return!!this.$element().find(e).length},_isHoverMode(){const e=this.option("visibilityMode");return(e===y||e===b)&&this.option("expandable")},_renderDirection(){const e=this.option("direction");this.$element().addClass(`dx-scrollbar-${e}`),this._dimension=e===v?"width":"height",this._prop=e===v?"left":"top"},_attachPointerDownHandler(){o.default.on(this._$thumb,(0,s.addNamespace)(a.default.down,_),this.feedbackOn.bind(this))},feedbackOn(e){null==e||e.preventDefault(),this.$element().addClass(m),w=this},feedbackOff(){this.$element().removeClass(m),w=null},cursorEnter(){this._isHovered=!0,this._needScrollbar()&&this.option("visible",!0)},cursorLeave(){this._isHovered=!1,this.option("visible",!1)},_renderDimensions(){this._$thumb.css({width:this.option("width"),height:this.option("height")})},_toggleVisibility(e){this.option("visibilityMode")===C&&this._$thumb.css("opacity"),e=this._adjustVisibility(e),this.option().visible=e,this._$thumb.toggleClass("dx-state-invisible",!e)},_adjustVisibility(e){if(this._baseContainerToContentRatio&&!this._needScrollbar())return!1;switch(this.option("visibilityMode")){case C:break;case y:e=e||!!this._isHovered;break;case x:e=!1;break;case b:e=!0}return e},moveTo(e){if(this._isHidden())return;(0,h.isPlainObject)(e)&&(e=e[this._prop]||0);const t={};t[this._prop]=this._calculateScrollBarPosition(e),(0,n.move)(this._$thumb,t)},_calculateScrollBarPosition(e){return-e*this._thumbRatio},_update(){const e=Math.round(this.option("containerSize")),t=Math.round(this.option("contentSize"));let i=Math.round(this.option("baseContainerSize")),n=Math.round(this.option("baseContentSize"));isNaN(i)&&(i=e,n=t),this._baseContainerToContentRatio=n?i/n:i,this._realContainerToContentRatio=t?e/t:e;const o=Math.round(Math.max(Math.round(e*this._realContainerToContentRatio),15));this._thumbRatio=(e-o)/(this.option("scaleRatio")*(t-e)),this.option(this._dimension,o/this.option("scaleRatio")),this.$element().css("display",this._needScrollbar()?"":"none")},_isHidden(){return this.option("visibilityMode")===x},_needScrollbar(){return!this._isHidden()&&this._baseContainerToContentRatio<1},containerToContentRatio(){return this._realContainerToContentRatio},_normalizeSize(e){return(0,h.isPlainObject)(e)?e[this._dimension]||0:e},_clean(){this.callBase(),this===w&&(w=null),o.default.off(this._$thumb,`.${_}`)},_optionChanged(e){if(!this._isHidden())switch(e.name){case"containerSize":case"contentSize":this.option()[e.name]=this._normalizeSize(e.value),this._update();break;case"baseContentSize":case"baseContainerSize":case"scaleRatio":this._update();break;case"visibilityMode":case"direction":this._invalidate();break;default:this.callBase.apply(this,arguments)}},update:(0,d.deferRenderer)((function(){this._adjustVisibility()&&this.option("visible",!0)}))});c.default.add((()=>{o.default.subscribeGlobal(r.default.getDocument(),(0,s.addNamespace)(a.default.up,_),(()=>{w&&w.feedbackOff()}))}));t.default=S},32330:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToLocation=function(e,t){if((0,o.isPlainObject)(e)){const t=(0,n.ensureDefined)(e.left,e.x),i=(0,n.ensureDefined)(e.top,e.y);return{left:(0,o.isDefined)(t)?t:void 0,top:(0,o.isDefined)(i)?i:void 0}}const{isVertical:i,isHorizontal:s}=new a.ScrollDirection(t);return{left:s&&(0,o.isDefined)(e)?e:void 0,top:i&&(0,o.isDefined)(e)?e:void 0}};var n=i(17781),o=i(11528),a=i(69798)},78955:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundaryProps=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const{left:o,top:u}=t,c={},{isHorizontal:h,isVertical:p}=new a.ScrollDirection(e);h&&(c.reachedLeft=s(o,0),c.reachedRight=r(i,o,0));p&&(c.reachedTop=l(u,0),c.reachedBottom=d(i,u,n,0));return c},t.isReachedBottom=d,t.isReachedLeft=s,t.isReachedRight=r,t.isReachedTop=l;var n=i(43200),o=i(27104),a=i(69798);function s(e,t){return Math.round(e)<=t}function r(e,t,i){return Math.round((0,n.getScrollLeftMax)(e)-t)<=i}function l(e,t){return Math.round(e)<=t}function d(e,t,i,n){return Math.round((0,o.getScrollTopMax)(e)-t-i)<=n}},62504:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getElementLocationInternal=function(e,t,i,r,l){let d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:o.SCROLLABLE_CONTENT_CLASS;const u=s({top:0,left:0,right:0,bottom:0},l),c=t===o.DIRECTION_VERTICAL,h=c?"top":"left",p=c?"bottom":"right",g=c?"height":"width",_=i[`offset${(0,n.titleize)(g)}`],f=i[`client${(0,n.titleize)(g)}`],m=i.getBoundingClientRect()[g],v=e.getBoundingClientRect()[g];let C=1;Math.abs(m-_)>1&&(C=m/_);const y=(0,a.getRelativeOffset)(d,e)[h]/C,b=r[h],x=b-y+u[h],w=b-y-v/C+f-u[p];if(x<=0&&w>=0)return b;return b-(Math.abs(x)>Math.abs(w)?w:x)};var n=i(53124),o=i(21363),a=i(91524);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}},72840:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getElementMargin=function(e,t){const i=s(e);return i?(0,a.toNumber)(i[`margin${(0,n.titleize)(t)}`]):0},t.getElementOverflowX=function(e){const t=s(e);return t?t.overflowX:"visible"},t.getElementOverflowY=function(e){const t=s(e);return t?t.overflowY:"visible"},t.getElementPadding=function(e,t){const i=s(e);return i?(0,a.toNumber)(i[`padding${(0,n.titleize)(t)}`]):0},t.getElementStyle=s,t.getElementTransform=function(e){const t=s(e);return t?t.transform:""};var n=i(53124),o=i(3104),a=i(39903);function s(e){var t,i;return e&&(0,o.hasWindow)()?null===(t=(i=(0,o.getWindow)()).getComputedStyle)||void 0===t?void 0:t.call(i,e):null}},91524:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeOffset=function(e,t){const i={left:0,top:0};let n=t;for(;null!==(o=n)&&void 0!==o&&o.offsetParent&&!n.classList.contains(e);){var o;const e=n.offsetParent,t=n.getBoundingClientRect(),a=e.getBoundingClientRect();i.left+=t.left-a.left,i.top+=t.top-a.top,n=n.offsetParent}return i}},43200:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getScrollLeftMax=function(e){return e.scrollWidth-e.clientWidth}},27104:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getScrollTopMax=function(e){return e.scrollHeight-e.clientHeight}},69798:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollDirection=void 0;var n=i(21363);t.ScrollDirection=class{constructor(e){this.DIRECTION_HORIZONTAL="horizontal",this.DIRECTION_VERTICAL="vertical",this.DIRECTION_BOTH="both",this.direction=e??n.DIRECTION_VERTICAL}get isHorizontal(){return this.direction===n.DIRECTION_HORIZONTAL||this.direction===n.DIRECTION_BOTH}get isVertical(){return this.direction===n.DIRECTION_VERTICAL||this.direction===n.DIRECTION_BOTH}get isBoth(){return this.direction===n.DIRECTION_BOTH}}},53544:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(17781),o=i(87739),a=i(52576),s=i(11528),r=d(i(33060)),l=d(i(98893));function d(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(e){this.options=(0,a.extend)(this._getDefaultOptions(),e,{selectedItemKeys:e.selectedKeys||[]}),this._selectionStrategy=this.options.deferred?new r.default(this.options):new l.default(this.options),this._focusedItemIndex=-1,this.options.equalByReference||this._selectionStrategy.updateSelectedItemKeyHash(this.options.selectedItemKeys)}_getDefaultOptions(){return{allowNullValue:!1,deferred:!1,equalByReference:!1,mode:"multiple",selectedItems:[],selectionFilter:[],maxFilterLengthInRequest:0,onSelectionChanged:n.noop,key:n.noop,keyOf:e=>e,load:()=>(0,o.Deferred)().resolve([]),totalCount:()=>-1,isSelectableItem:()=>!0,isItemSelected:()=>!1,getItemData:e=>e,dataFields:n.noop,filter:n.noop}}validate(){this._selectionStrategy.validate()}getSelectedItemKeys(){return this._selectionStrategy.getSelectedItemKeys()}getSelectedItems(){return this._selectionStrategy.getSelectedItems()}selectionFilter(e){if(void 0===e)return this.options.selectionFilter;const t=this.options.selectionFilter!==e&&JSON.stringify(this.options.selectionFilter)!==JSON.stringify(e);this.options.selectionFilter=e,t&&this.onSelectionChanged()}setSelection(e,t){return this.selectedItemKeys(e,!1,!1,!1,t)}select(e){return this.selectedItemKeys(e,!0)}deselect(e){return this.selectedItemKeys(e,!0,!0)}selectedItemKeys(e,t,i,n,o){return e=e??[],e=Array.isArray(e)?e:[e],this.validate(),this._selectionStrategy.selectedItemKeys(e,t,i,n,o)}clearSelection(){return this.selectedItemKeys([])}_addSelectedItem(e,t){this._selectionStrategy.addSelectedItem(t,e)}_removeSelectedItem(e){this._selectionStrategy.removeSelectedItem(e)}_setSelectedItems(e,t){this._selectionStrategy.setSelectedItems(e,t)}onSelectionChanged(){this._selectionStrategy.onSelectionChanged()}changeItemSelection(e,t,i){var n,a;let r;const l=this.options.plainItems(),d=l[e];let u;const{isVirtualPaging:c}=this.options,h=null===(n=(a=this.options).allowLoadByRange)||void 0===n?void 0:n.call(a),{alwaysSelectByShift:p}=this.options;let g,_=!1,f=!1;const m=e=>e>=0&&!l.filter((t=>t.loadIndex===e)).length;if(c&&(0,s.isDefined)(d)&&(h&&(g=d.loadIndex-e,e=d.loadIndex),_=m(this._focusedItemIndex),(0,s.isDefined)(this._shiftFocusedItemIndex)&&(f=m(this._shiftFocusedItemIndex))),!this.isSelectable()||!this.isDataItem(d))return!1;const v=this.options.getItemData(d),C=this.options.keyOf(v);let y=(t=t||{}).shift;if(!1===p&&y&&(y=!1!==h||!_&&!f),y&&"multiple"===this.options.mode&&this._focusedItemIndex>=0)h&&(_||f)?(r=e!==this._shiftFocusedItemIndex||this._focusedItemIndex!==this._shiftFocusedItemIndex,r&&(u=this.changeItemSelectionWhenShiftKeyInVirtualPaging(e))):r=this.changeItemSelectionWhenShiftKeyPressed(e,l,g);else if(t.control){if(this._resetItemSelectionWhenShiftKeyPressed(),!i){const e=this._selectionStrategy.isItemDataSelected(v);"single"===this.options.mode&&this.clearSelectedItems(),e?this._removeSelectedItem(C):this._addSelectedItem(v,C)}r=!0}else{this._resetItemSelectionWhenShiftKeyPressed();const e=this._selectionStrategy.equalKeys(this.options.selectedItemKeys[0],C);1===this.options.selectedItemKeys.length&&e||(this._setSelectedItems([C],[v]),r=!0)}return r?((0,o.when)(u).done((()=>{this._focusedItemIndex=e,!i&&this.onSelectionChanged()})),!0):void 0}isDataItem(e){return this.options.isSelectableItem(e)}isSelectable(){return"single"===this.options.mode||"multiple"===this.options.mode}isItemDataSelected(e){return this._selectionStrategy.isItemDataSelected(e,{checkPending:!0})}isItemSelected(e,t){return this._selectionStrategy.isItemKeySelected(e,t)}_resetItemSelectionWhenShiftKeyPressed(){delete this._shiftFocusedItemIndex}_resetFocusedItemIndex(){this._focusedItemIndex=-1}changeItemSelectionWhenShiftKeyInVirtualPaging(e){const t=this.options.getLoadOptions(e,this._focusedItemIndex,this._shiftFocusedItemIndex),i=(0,o.Deferred)(),n=t.skip;return this.options.load(t).done((t=>{this.changeItemSelectionWhenShiftKeyPressed(e,t,n),i.resolve()})),i.promise()}changeItemSelectionWhenShiftKeyPressed(e,t,i){let n,o=!1;const a=(0,s.isDefined)(i);let r=a?this._focusedItemIndex-i:this._focusedItemIndex;const{keyOf:l}=this.options,d=t[r],u=this.options.getItemData(d),c=l(u),h=d&&this.isItemDataSelected(u);let p,g,_,f;if((0,s.isDefined)(this._shiftFocusedItemIndex)||(this._shiftFocusedItemIndex=this._focusedItemIndex),this._shiftFocusedItemIndex!==this._focusedItemIndex)for(n=this._focusedItemIndex<this._shiftFocusedItemIndex?1:-1,_=a?this._focusedItemIndex-i:this._focusedItemIndex,f=a?this._shiftFocusedItemIndex-i:this._shiftFocusedItemIndex,r=_;r!==f;r+=n)(a||this.isDataItem(t[r]))&&(g=l(this.options.getItemData(t[r])),this._removeSelectedItem(g),o=!0);if(e!==this._shiftFocusedItemIndex)for(n=e<this._shiftFocusedItemIndex?1:-1,_=a?e-i:e,f=a?this._shiftFocusedItemIndex-i:this._shiftFocusedItemIndex,r=_;r!==f;r+=n)(a||this.isDataItem(t[r]))&&(p=this.options.getItemData(t[r]),g=l(p),this._addSelectedItem(p,g),o=!0);return!a&&!this.isDataItem(d)||h||(this._addSelectedItem(u,c),o=!0),o}clearSelectedItems(){this._setSelectedItems([],[])}selectAll(e){return this._resetFocusedItemIndex(),e?this._selectionStrategy._onePageSelectAll(!1):this.selectedItemKeys([],!0,!1,!0)}deselectAll(e){return this._resetFocusedItemIndex(),e?this._selectionStrategy._onePageSelectAll(!0):this.selectedItemKeys([],!0,!0,!0)}getSelectAllState(e){return this._selectionStrategy.getSelectAllState(e)}loadSelectedItemsWithFilter(){return this._selectionStrategy.loadSelectedItemsWithFilter()}}},33060:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(30771)),o=i(87739),a=i(11528),s=l(i(35185)),r=l(i(13085));function l(e){return e&&e.__esModule?e:{default:e}}class d extends r.default{getSelectedItems(){return this._loadFilteredData(this.options.selectionFilter)}getSelectedItemKeys(){const e=(0,o.Deferred)(),t=this,i=this.options.key(),n=(0,a.isString)(i)?[i]:i;return this._loadFilteredData(this.options.selectionFilter,null,n).done((i=>{const n=i.map((e=>t.options.keyOf(e)));e.resolve(n)})).fail(e.reject),e.promise()}selectedItemKeys(e,t,i,n){if(n){const e=this.options.filter();!e||JSON.stringify(e)===JSON.stringify(this.options.selectionFilter)&&i?this._setOption("selectionFilter",i?[]:null):this._addSelectionFilter(i,e,n)}else{t||this._setOption("selectionFilter",[]);for(let o=0;o<e.length;o++)i?this.removeSelectedItem(e[o]):this.addSelectedItem(e[o],n,!t)}return this.onSelectionChanged(),(0,o.Deferred)().resolve()}setSelectedItems(e){this._setOption("selectionFilter",null);for(let t=0;t<e.length;t++)this.addSelectedItem(e[t])}isItemDataSelected(e){return this.isItemKeySelected(e)}isItemKeySelected(e){const{selectionFilter:t,sensitivity:i}=this.options;if(!t)return!0;const o={langParams:{collatorOptions:{sensitivity:i}}};return!!(0,n.default)([e],o).filter(t).toArray().length}_getKeyExpr(){const e=this.options.key();return Array.isArray(e)&&1===e.length?e[0]:e}_normalizeKey(e){const t=this.options.key();return Array.isArray(t)&&1===t.length?e[t[0]]:e}_getFilterByKey(e){const t=this._getKeyExpr();let i=[t,"=",this._normalizeKey(e)];if(Array.isArray(t)){i=[];for(let n=0;n<t.length;n++)i.push([t[n],"=",e[t[n]]]),n!==t.length-1&&i.push("and")}return i}addSelectedItem(e,t,i){const n=this._getFilterByKey(e);this._addSelectionFilter(!1,n,t,i)}removeSelectedItem(e){const t=this._getFilterByKey(e);this._addSelectionFilter(!0,t)}validate(){const{key:e}=this.options;if(e&&void 0===e())throw s.default.Error("E1042","Deferred selection")}_findSubFilter(e,t){if(!e)return-1;const i=JSON.stringify(t);for(let t=0;t<e.length;t++){const n=e[t];if(n&&JSON.stringify(n)===i)return t}return-1}_isLastSubFilter(e,t){return!(!e||!t)&&(this._findSubFilter(e,t)===e.length-1||0===this._findSubFilter([e],t))}_addFilterOperator(e,t){return e.length>1&&(0,a.isString)(e[1])&&e[1]!==t&&(e=[e]),e.length&&e.push(t),e}_denormalizeFilter(e){return e&&(0,a.isString)(e[0])&&(e=[e]),e}_isOnlyNegativeFiltersLeft(e){return e.every(((e,t)=>t%2==0?Array.isArray(e)&&"!"===e[0]:"and"===e))}_addSelectionFilter(e,t,i,n){var o;const a=this,s=e?["!",t]:t,r=e?"and":"or";let l=!0,d=a.options.selectionFilter||[];if(d=a._denormalizeFilter(d),null!==(o=d)&&void 0!==o&&o.length&&!n){const n=a._removeSameFilter(d,t,e,i),o=a._removeSameFilter(d,t,!e);e&&(-1!==n||-1!==o)&&this._isOnlyNegativeFiltersLeft(d)&&(d=[]);const s=this._isKeyFilter(t)&&this._hasKeyFiltersOnlyStartingFromIndex(d,o);l=t.length&&!s}l&&(d=a._addFilterOperator(d,r),d.push(s)),d=a._normalizeFilter(d),a._setOption("selectionFilter",e||d.length?d:null)}_normalizeFilter(e){return e&&1===e.length&&(e=e[0]),e}_removeFilterByIndex(e,t,i){const n=e[1];t>0?e.splice(t-1,2):e.splice(t,2),i&&"and"===n&&e.splice(0,e.length)}_isSimpleKeyFilter(e,t){return 3===e.length&&e[0]===t&&"="===e[1]}_isKeyFilter(e){if(2===e.length&&"!"===e[0])return this._isKeyFilter(e[1]);const t=this._getKeyExpr();if(Array.isArray(t)){if(e.length!==2*t.length-1)return!1;for(let i=0;i<t.length;i++){if(i>0&&"and"!==e[2*i-1])return!1;if(!this._isSimpleKeyFilter(e[2*i],t[i]))return!1}return!0}return this._isSimpleKeyFilter(e,t)}_hasKeyFiltersOnlyStartingFromIndex(e,t){if(t>=0){for(let i=t;i<e.length;i++)if("string"!=typeof e[i]&&!this._isKeyFilter(e[i]))return!1;return!0}return!1}_removeSameFilter(e,t,i,n){if(t=i?["!",t]:t,JSON.stringify(t)===JSON.stringify(e))return e.splice(0,e.length),0;const o=this._findSubFilter(e,t);if(o>=0)return this._removeFilterByIndex(e,o,n),o;for(let i=0;i<e.length;i++)if(Array.isArray(e[i])&&e[i].length>2){const o=this._removeSameFilter(e[i],t,!1,n);if(o>=0)return e[i].length?1===e[i].length&&(e[i]=e[i][0]):this._removeFilterByIndex(e,i,n),o}return-1}getSelectAllState(){const e=this.options.filter();let{selectionFilter:t}=this.options;return!t||!!t.length&&(e&&e.length?(t=this._denormalizeFilter(t),!!this._isLastSubFilter(t,e)||!this._isLastSubFilter(t,["!",e])&&void 0):void 0)}loadSelectedItemsWithFilter(){const e=this.options.filter(),{selectionFilter:t}=this.options,i=e?[e,"and",t]:t;return this._loadFilteredData(i)}_onePageSelectAll(e){return this._selectAllPlainItems(e),this.onSelectionChanged(),(0,o.Deferred)().resolve()}}t.default=d},13085:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(30771))&&n.__esModule?n:{default:n},a=i(17781),s=i(87739),r=i(11528);t.default=class{constructor(e){this._lastSelectAllPageDeferred=(0,s.Deferred)().reject(),this.options=e,this._setOption("disabledItemKeys",[]),this._clearItemKeys()}_clearItemKeys(){this._setOption("addedItemKeys",[]),this._setOption("removedItemKeys",[]),this._setOption("removedItems",[]),this._setOption("addedItems",[])}validate(){}_setOption(e,t){this.options[e]=t}onSelectionChanging(){const{selectedItems:e,selectedItemKeys:t,addedItemKeys:i,removedItemKeys:n,addedItems:o,removedItems:s,onSelectionChanging:r=a.noop}=this.options,l={selectedItems:e,selectedItemKeys:t,addedItemKeys:i,removedItemKeys:n,addedItems:o,removedItems:s,cancel:!1};return r(l),l.cancel}_callCallbackIfNotCanceled(e,t){const i=this.onSelectionChanging();(0,r.isPromise)(i)?i.then((i=>{i?t():e()})).catch((()=>{e()})):i?t():e()}onSelectionChanged(){const{selectedItems:e,selectedItemKeys:t,addedItemKeys:i,removedItemKeys:n,addedItems:o,removedItems:s,onSelectionChanged:r=a.noop}=this.options;this._clearItemKeys(),r({selectedItems:e,selectedItemKeys:t,addedItemKeys:i,removedItemKeys:n,addedItems:o,removedItems:s})}equalKeys(e,t){return this.options.equalByReference&&(0,r.isObject)(e)&&(0,r.isObject)(t)?e===t:(0,a.equalByValue)(e,t)}getSelectableItems(e){return e.filter((e=>!(null!=e&&e.disabled)))}_clearSelection(e,t,i,n){return e=e||[],e=Array.isArray(e)?e:[e],this.validate(),this.selectedItemKeys(e,t,i,n)}_removeTemplateProperty(e){return Array.isArray(e)?e.map((e=>this._removeTemplateProperty(e))):((0,r.isObject)(e)&&delete e.template,e)}_loadFilteredData(e,t,i,n){const a=encodeURI(JSON.stringify(this._removeTemplateProperty(e))).length,l=this.options.maxFilterLengthInRequest&&a>this.options.maxFilterLengthInRequest,d=(0,s.Deferred)(),u={filter:l?void 0:e,select:l?this.options.dataFields():i||this.options.dataFields()};return e&&0===e.length?d.resolve([]):this.options.load(u).done((i=>{let a=(0,r.isPlainObject)(i)?i.data:i;t&&!n?a=a.filter(t):l&&(a=(0,o.default)(a).filter(e).toArray()),d.resolve(a)})).fail(d.reject.bind(d)),d}updateSelectedItemKeyHash(e){for(let t=0;t<e.length;t++){const i=(0,a.getKeyHash)(e[t]);if(!(0,r.isObject)(i)){this.options.keyHashIndices[i]=this.options.keyHashIndices[i]||[];this.options.keyHashIndices[i].push(t)}}}_isAnyItemSelected(e){for(let t=0;t<e.length;t++)if(this.options.isItemSelected(e[t]))return;return!1}_getFullSelectAllState(){const e=this.options.plainItems(),t=this.options.filter();let i=this.options.ignoreDisabledItems?this.options.selectedItems:this.options.selectedItems.filter((e=>!(null!=e&&e.disabled)));t&&(i=(0,o.default)(i).filter(t).toArray());const n=i.length,a=e.length-this.getSelectableItems(e).length;return n?n>=this.options.totalCount()-a||void 0:this._isAnyItemSelected(e)}_getVisibleSelectAllState(){const e=this.getSelectableItems(this.options.plainItems());let t=!1,i=!1;for(let n=0;n<e.length;n++){const o=e[n],a=this.options.getItemData(o),s=this.options.keyOf(a);this.options.isSelectableItem(o)&&(this.isItemKeySelected(s)?t=!0:i=!0)}return!!t&&(!i||void 0)}isItemKeySelected(e){throw new Error("isItemKeySelected method should be overriden")}addSelectedItem(e,t){throw new Error("addSelectedItem method should be overriden")}removeSelectedItem(e){throw new Error("removeSelectedItem method should be overriden")}_selectAllPlainItems(e){const t=this.getSelectableItems(this.options.plainItems());for(let i=0;i<t.length;i++){const n=t[i];if(this.options.isSelectableItem(n)){const t=this.options.getItemData(n),i=this.options.keyOf(t),o=this.isItemKeySelected(i);o||e||this.addSelectedItem(i,t),o&&e&&this.removeSelectedItem(i)}}}}},98893:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=h(i(30771)),o=i(94487),a=i(13387),s=i(17781),r=i(87739),l=i(52877),d=i(11528),u=h(i(35185)),c=h(i(13085));function h(e){return e&&e.__esModule?e:{default:e}}class p extends c.default{constructor(e){super(e),this._lastSelectAllPageDeferred=(0,r.Deferred)().reject(),this._initSelectedItemKeyHash()}_initSelectedItemKeyHash(){this._setOption("keyHashIndices",this.options.equalByReference?null:{})}getSelectedItemKeys(){return this.options.selectedItemKeys.slice(0)}getSelectedItems(){return this.options.selectedItems.slice(0)}_preserveSelectionUpdate(e,t){const{keyOf:i}=this.options;let n,o,a;if(!i)return;const s=t&&e.length>1&&!this.options.equalByReference;for(s&&(n={}),a=0;a<e.length;a++){const s=e[a],r=i(s);t?(o=this.removeSelectedItem(r,n,null==s?void 0:s.disabled),n&&o>=0&&(n[o]=!0)):this.addSelectedItem(r,s)}s&&this._batchRemoveSelectedItems(n)}_batchRemoveSelectedItems(e){const t=this.options.selectedItemKeys.slice(0),i=this.options.selectedItems.slice(0);this.options.selectedItemKeys.length=0,this.options.selectedItems.length=0;for(let n=0;n<t.length;n++)e[n]||(this.options.selectedItemKeys.push(t[n]),this.options.selectedItems.push(i[n]));this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(this.options.selectedItemKeys)}_loadSelectedItemsCore(e,t,i,o){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=(0,r.Deferred)();const d=this.options.key();if(!e.length&&!i)return s.resolve([]),s;if(i&&t&&!o)return s.resolve(this.getSelectedItems()),s;const u=new l.SelectionFilterCreator(e,i),c=u.getCombinedFilter(d,o,a);let h=[];if(t){const{selectedItems:t}=this.options;h=c&&e.length!==t.length?(0,n.default)(t).filter(c).toArray():t.slice(0)}let p=h.length?h:this.options.plainItems(!0).filter(this.options.isSelectableItem).map(this.options.getItemData);const g=u.getLocalFilter(this.options.keyOf,this.equalKeys.bind(this),this.options.equalByReference,d);return p=p.filter(g),h.length||!i&&p.length===e.length?s.resolve(p):s=this._loadFilteredData(c,g,null,i),s}_replaceSelectionUpdate(e){const t=[],{keyOf:i}=this.options;if(i){for(let n=0;n<e.length;n++){const o=i(e[n]);t.push(o)}this.setSelectedItems(t,e)}}_warnOnIncorrectKeys(e){const{allowNullValue:t}=this.options;for(let i=0;i<e.length;i++){const n=e[i];t&&null===n||this.isItemKeySelected(n)||u.default.log("W1002",n)}}_isMultiSelectEnabled(){const{mode:e}=this.options;return"all"===e||"multiple"===e}_requestInProgress(){var e;return"pending"===(null===(e=this._lastLoadDeferred)||void 0===e?void 0:e.state())}_concatRequestsItems(e,t,i,n){let a;const s=t?e:[];return a=n||(0,o.removeDuplicates)(e,this.options.selectedItemKeys),{addedItems:i.added.concat(a),removedItems:i.removed.concat(s),keys:e}}_collectLastRequestData(e,t,i,n){const o=t&&i,s={added:[],removed:[]},r=this._isMultiSelectEnabled();let l=r?this._lastRequestData:{};return r&&(this._shouldMergeWithLastRequest&&(o?(this._lastLoadDeferred.reject(),l={}):(0,a.isKeysEqual)(e,this.options.selectedItemKeys)||(s.added=l.addedItems,s.removed=l.removedItems,t||this._lastLoadDeferred.reject())),l=this._concatRequestsItems(e,t,s,this._shouldMergeWithLastRequest?void 0:n)),l}_updateKeysByLastRequestData(e,t,i){let n=e;var a,s;this._isMultiSelectEnabled()&&this._shouldMergeWithLastRequest&&!t&&!i&&(n=(0,o.removeDuplicates)(e.concat(null===(a=this._lastRequestData)||void 0===a?void 0:a.addedItems),null===(s=this._lastRequestData)||void 0===s?void 0:s.removedItems),n=(0,o.getUniqueValues)(n));return n}_loadSelectedItems(e,t,i,n){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const a=this,s=(0,r.Deferred)(),l=a.options.filter();return this._shouldMergeWithLastRequest=this._requestInProgress(),this._lastRequestData=this._collectLastRequestData(e,t,i,n),(0,r.when)(a._lastLoadDeferred).always((()=>{const n=a._updateKeysByLastRequestData(e,t,i);a._shouldMergeWithLastRequest=!1,a._loadSelectedItemsCore(n,t,i,l,o).done(s.resolve).fail(s.reject)})),a._lastLoadDeferred=s,s}selectedItemKeys(e,t,i,n,o){let a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(this._isCancelingInProgress)return(0,r.Deferred)().reject();const s=this._loadSelectedItems(e,i,n,o,a),l=(0,r.Deferred)();return s.done((e=>{this._storeSelectionState(),t?this._preserveSelectionUpdate(e,i):this._replaceSelectionUpdate(e),this._isCancelingInProgress=!0,this._callCallbackIfNotCanceled((()=>{this._isCancelingInProgress=!1,this.onSelectionChanged(),l.resolve(e)}),(()=>{this._isCancelingInProgress=!1,this._restoreSelectionState(),l.reject()}))})),l}addSelectedItem(e,t){if((0,d.isDefined)(t)&&!this.options.ignoreDisabledItems&&t.disabled)return void(-1===this.options.disabledItemKeys.indexOf(e)&&this.options.disabledItemKeys.push(e));const i=this._getKeyHash(e);-1===this._indexOfSelectedItemKey(i)&&(!(0,d.isObject)(i)&&this.options.keyHashIndices&&(this.options.keyHashIndices[i]=[this.options.selectedItemKeys.length]),this.options.selectedItemKeys.push(e),this.options.addedItemKeys.push(e),this.options.addedItems.push(t),this.options.selectedItems.push(t))}_getSelectedIndexByKey(e,t){const{selectedItemKeys:i}=this.options;for(let n=0;n<i.length;n++)if((!t||!t[n])&&this.equalKeys(i[n],e))return n;return-1}_getSelectedIndexByHash(e,t){let i=this.options.keyHashIndices[e];return i&&i.length>1&&t&&(i=i.filter((e=>!t[e]))),i&&i[0]>=0?i[0]:-1}_indexOfSelectedItemKey(e,t){let i;return i=this.options.equalByReference?this.options.selectedItemKeys.indexOf(e):(0,d.isObject)(e)?this._getSelectedIndexByKey(e,t):this._getSelectedIndexByHash(e,t),i}_shiftSelectedKeyIndices(e){for(let t=e;t<this.options.selectedItemKeys.length;t++){const i=this.options.selectedItemKeys[t],n=(0,s.getKeyHash)(i),o=this.options.keyHashIndices[n];if(o)for(let t=0;t<o.length;t++)o[t]>e&&o[t]--}}removeSelectedItem(e,t,i){if(!this.options.ignoreDisabledItems&&i)return;const n=this._getKeyHash(e),o=!!t,a=this._indexOfSelectedItemKey(n,t);if(a<0)return a;if(this.options.removedItemKeys.push(e),this.options.removedItems.push(this.options.selectedItems[a]),o)return a;if(this.options.selectedItemKeys.splice(a,1),this.options.selectedItems.splice(a,1),(0,d.isObject)(n)||!this.options.keyHashIndices)return a;const s=this.options.keyHashIndices[n];return s?(s.shift(),s.length||delete this.options.keyHashIndices[n],this._shiftSelectedKeyIndices(a),a):a}_updateAddedItemKeys(e,t){for(let i=0;i<e.length;i++)this.isItemKeySelected(e[i])||(this.options.addedItemKeys.push(e[i]),this.options.addedItems.push(t[i]))}_updateRemovedItemKeys(e,t,i){for(let e=0;e<t.length;e++)this.isItemKeySelected(t[e])||(this.options.removedItemKeys.push(t[e]),this.options.removedItems.push(i[e]))}_isItemSelectionInProgress(e,t){if(t&&this._lastRequestData&&this._requestInProgress()){return(this._lastRequestData.addedItems??[]).includes(e)}return!1}_getKeyHash(e){return this.options.equalByReference?e:(0,s.getKeyHash)(e)}setSelectedItems(e,t){this._updateAddedItemKeys(e,t);const i=this.options.selectedItemKeys,n=this.options.selectedItems;this.options.equalByReference||(this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(e)),this._setOption("selectedItemKeys",e),this._setOption("selectedItems",t),this._updateRemovedItemKeys(e,i,n)}isItemDataSelected(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.options.keyOf(e);return this.isItemKeySelected(i,t)}isItemKeySelected(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this._isItemSelectionInProgress(e,t.checkPending);if(!i){const t=this._getKeyHash(e);i=-1!==this._indexOfSelectedItemKey(t)}return i}getSelectAllState(e){return e?this._getVisibleSelectAllState():this._getFullSelectAllState()}loadSelectedItemsWithFilter(){const e=this.options.key(),t=this.getSelectedItemKeys(),i=this.options.filter();if(!t.length)return(0,r.Deferred)().resolve([]);const n=new l.SelectionFilterCreator(t).getCombinedFilter(e,i,!0);return this._loadFilteredData(n)}_storeSelectionState(){const{selectedItems:e,selectedItemKeys:t,keyHashIndices:i}=this.options;this._storedSelectionState={keyHashIndices:JSON.stringify(i),selectedItems:[...e],selectedItemKeys:[...t]}}_restoreSelectionState(){this._clearItemKeys();const{selectedItemKeys:e,selectedItems:t,keyHashIndices:i}=this._storedSelectionState;this._setOption("selectedItemKeys",e),this._setOption("selectedItems",t),this._setOption("keyHashIndices",JSON.parse(i))}_onePageSelectAll(e){return"pending"===this._lastSelectAllPageDeferred.state()?(0,r.Deferred)().reject():(this._storeSelectionState(),this._selectAllPlainItems(e),this._lastSelectAllPageDeferred=(0,r.Deferred)(),this._callCallbackIfNotCanceled((()=>{this.onSelectionChanged(),this._lastSelectAllPageDeferred.resolve()}),(()=>{this._restoreSelectionState(),this._lastSelectAllPageDeferred.reject()})),this._lastSelectAllPageDeferred)}}t.default=p},59803:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(11528);t.default={_getSpecificDataSourceOption(){let e=this.option("dataSource"),t=!1,i={};return this._getGroupedOption()&&(e=>Array.isArray(e)&&e.every((e=>2===Object.keys(e).length&&"key"in e&&"items"in e&&Array.isArray(e.items))))(e)&&(i=e.reduce(((e,i)=>{const o=i.items.map((e=>((0,n.isObject)(e)||(e={text:e},t=!0),"key"in e||(e.key=i.key),e)));return e.concat(o)}),[]),e={store:{type:"array",data:i},group:{selector:"key",keepInitialKeyOrder:!0}},t&&(e.searchExpr="text")),e}}},8532:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(64044),o=i(69331),a=x(i(92774)),s=x(i(18278)),r=x(i(89797)),l=i(98834),d=x(i(52771)),u=x(i(92848)),c=x(i(65951)),h=x(i(64553)),p=i(17781),g=i(87739),_=i(52576),f=i(50254),m=i(57653),v=i(52071),C=i(63322),y=x(i(37062)),b=x(i(29049));function x(e){return e&&e.__esModule?e:{default:e}}const w="dx-slider-label",S="dx-slider-label-position-",D="dx-slider-tooltip-position-",I="Validation",E=y.default.inherit({_activeStateUnit:".dx-slider-handle",_supportedKeys(){const e=this.option("rtlEnabled"),t=(e,t)=>{e=this._valueStep(e);const i=this.option("step"),n=this.option("value"),o=n-this.option("min"),a=(0,f.getRemainderByDivision)(o,i,this._getValueExponentLength());let s=t?n-e+(a?i-a:0):n+e-a;const r=this.option("min"),l=this.option("max");return s<r?s=r:s>l&&(s=l),this._roundToExponentLength(s)},i=i=>{this.option("value",t(i,e))},n=i=>{this.option("value",t(i,!e))};return(0,_.extend)(this.callBase(),{leftArrow(e){this._processKeyboardEvent(e),n(this.option("step"))},rightArrow(e){this._processKeyboardEvent(e),i(this.option("step"))},pageUp(e){this._processKeyboardEvent(e),i(this.option("step")*this.option("keyStep"))},pageDown(e){this._processKeyboardEvent(e),n(this.option("step")*this.option("keyStep"))},home(e){this._processKeyboardEvent(e);const t=this.option("min");this.option("value",t)},end(e){this._processKeyboardEvent(e);const t=this.option("max");this.option("value",t)}})},_processKeyboardEvent(e){e.preventDefault(),e.stopPropagation(),this._saveValueChangeEvent(e)},_getDefaultOptions(){return(0,_.extend)(this.callBase(),{value:50,hoverStateEnabled:!0,activeStateEnabled:!0,step:1,showRange:!0,tooltip:{enabled:!1,format:e=>e,position:"top",showMode:"onHover"},label:{visible:!1,position:"bottom",format:e=>e},keyStep:1,useInkRipple:!1,validationMessageOffset:(0,v.isMaterial)()?{h:18,v:0}:{h:7,v:4},focusStateEnabled:!0,valueChangeMode:"onHandleMove"})},_toggleValidationMessage(e){this.option("isValid")||this.$element().toggleClass("dx-invalid-message-visible",e)},_defaultOptionsRules(){return this.callBase().concat([{device:()=>"desktop"===c.default.real().deviceType&&!c.default.isSimulator(),options:{focusStateEnabled:!0}},{device(){const e=(0,v.current)();return(0,v.isMaterial)(e)},options:{useInkRipple:!0}}])},_initMarkup(){this.$element().addClass("dx-slider"),this._renderSubmitElement(),this.option("useInkRipple")&&this._renderInkRipple(),this.callBase(),this._renderLabels(),this._renderStartHandler(),this._renderAriaMinAndMax()},_attachFocusEvents(){this.callBase();const e=this.NAME+I,t=(0,l.addNamespace)("focusin",e),i=(0,l.addNamespace)("focusout",e),n=this._focusTarget();a.default.on(n,t,this._toggleValidationMessage.bind(this,!0)),a.default.on(n,i,this._toggleValidationMessage.bind(this,!1))},_detachFocusEvents(){this.callBase();const e=this._focusTarget();this._toggleValidationMessage(!1),a.default.off(e,this.NAME+I)},_render(){this.callBase(),this._repaintHandle()},_renderSubmitElement(){this._$submitElement=(0,h.default)("<input>").attr("type","hidden").appendTo(this.$element())},_getSubmitElement(){return this._$submitElement},_renderInkRipple(){this._inkRipple=(0,C.render)({waveSizeCoefficient:.7,isCentered:!0,wavesNumber:2,useHoldAnimation:!1})},_renderInkWave(e,t,i,n){if(!this._inkRipple)return;const o={element:e,event:t,wave:n};i?this._inkRipple.showWave(o):this._inkRipple.hideWave(o)},_visibilityChanged(){this.repaint()},_renderWrapper(){this.callBase(),this._$wrapper.addClass("dx-slider-wrapper"),this._createComponent(this._$wrapper,s.default,{rtlEnabled:!1,elastic:!1,immediate:!0,immediateTimeout:0,onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._itemWidthFunc.bind(this)})},_renderContainer(){this.callBase(),this._$bar.addClass("dx-slider-bar")},_renderRange(){this.callBase(),this._$range.addClass("dx-slider-range"),this._renderHandle(),this._renderRangeVisibility()},_renderRangeVisibility(){this._$range.toggleClass("dx-slider-range-visible",Boolean(this.option("showRange")))},_renderHandle(){this._$handle=this._renderHandleImpl(this.option("value"),this._$handle)},_renderHandleImpl(e,t){const i=t||(0,h.default)("<div>").appendTo(this._$range),n=this.option("tooltip");return this.$element().toggleClass(`${D}bottom`,n.enabled&&"bottom"===n.position).toggleClass(`${D}top`,n.enabled&&"top"===n.position),this._createComponent(i,b.default,{value:e,tooltip:n}),i},_renderAriaMinAndMax(){this.setAria({valuemin:this.option("min"),valuemax:this.option("max")},this._$handle)},_toggleActiveState(e,t){this.callBase(e,t),this._renderInkWave(e,null,!!t,1)},_toggleFocusClass(e,t){if(this.callBase(e,t),this._disposed)return;const i=(0,h.default)(t||this._focusTarget());this._renderInkWave(i,null,e,0)},_renderLabels(){if(this.$element().removeClass(`${S}bottom`).removeClass(`${S}top`),this.option("label.visible")){const e=this.option("min"),t=this.option("max"),i=this.option("label.position"),n=this.option("label.format");this._$minLabel||(this._$minLabel=(0,h.default)("<div>").addClass(w).appendTo(this._$wrapper)),this._$minLabel.text(d.default.format(e,n)),this._$maxLabel||(this._$maxLabel=(0,h.default)("<div>").addClass(w).appendTo(this._$wrapper)),this._$maxLabel.text(d.default.format(t,n)),this.$element().addClass(S+i)}else this._$minLabel&&(this._$minLabel.remove(),delete this._$minLabel),this._$maxLabel&&(this._$maxLabel.remove(),delete this._$maxLabel)},_renderStartHandler(){const e=(0,l.addNamespace)(r.default.down,this.NAME),t=(0,l.addNamespace)(n.name,this.NAME),i=this._createAction(this._startHandler.bind(this)),o=this.$element();a.default.off(o,e),a.default.on(o,e,(e=>{(0,l.isMouseEvent)(e)&&i({event:e})})),a.default.off(o,t),a.default.on(o,t,(e=>{const t=this._activeHandle();t&&(a.default.trigger(t,"focusin"),a.default.trigger(t,"focus")),i({event:e}),"onHandleRelease"===this.option("valueChangeMode")&&(this.option("value",this._getActualValue()),this._actualValue=void 0)}))},_itemWidthFunc(){return this._itemWidthRatio},_swipeStartHandler(e){const t=this.option("rtlEnabled");(0,l.isTouchEvent)(e.event)&&this._createAction(this._startHandler.bind(this))({event:e.event}),this._feedbackDeferred=(0,g.Deferred)(),(0,o.lock)(this._feedbackDeferred),this._toggleActiveState(this._activeHandle(),this.option("activeStateEnabled")),this._startOffset=this._currentRatio;const i=this._startOffset*this._swipePixelRatio(),n=(1-this._startOffset)*this._swipePixelRatio();e.event.maxLeftOffset=t?n:i,e.event.maxRightOffset=t?i:n,this._itemWidthRatio=(0,m.getWidth)(this.$element())/this._swipePixelRatio(),this._needPreventAnimation=!0},_swipeEndHandler(e){if(this._isSingleValuePossible())return;this._feedbackDeferred.resolve(),this._toggleActiveState(this._activeHandle(),!1);const t=this.option("rtlEnabled")?-1:1,i=this._startOffset+t*e.event.targetOffset/this._swipePixelRatio();delete this._needPreventAnimation,this._saveValueChangeEvent(e.event),this._changeValueOnSwipe(i),"onHandleRelease"===this.option("valueChangeMode")&&this.option("value",this._getActualValue()),this._actualValue=void 0,delete this._startOffset,this._renderValue()},_activeHandle(){return this._$handle},_swipeUpdateHandler(e){this._isSingleValuePossible()||(this._saveValueChangeEvent(e.event),this._updateHandlePosition(e))},_updateHandlePosition(e){const t=this.option("rtlEnabled")?-1:1,i=Math.min(this._startOffset+t*e.event.offset/this._swipePixelRatio(),1);(0,m.setWidth)(this._$range,100*i+"%"),b.default.getInstance(this._activeHandle()).fitTooltipPosition,this._changeValueOnSwipe(i)},_swipePixelRatio(){const e=this.option("min");return(this.option("max")-e)/this._valueStep(this.option("step"))},_valueStep:e=>(e&&!isNaN(e)||(e=1),e),_getValueExponentLength(){const{step:e,min:t}=this.option();return Math.max((0,f.getExponentLength)(e),(0,f.getExponentLength)(t))},_roundToExponentLength(e){const t=this._getValueExponentLength();return(0,f.roundFloatPart)(e,t)},_changeValueOnSwipe(e){const t=this.option("min"),i=this.option("max"),n=this._valueStep(this.option("step"));let o=t+e*(i-t);if(!(n<0))if(o===i||o===t)this._setValueOnSwipe(o);else{const e=Math.round((o-t)/n);o=this._roundToExponentLength(e*n+t),this._setValueOnSwipe(Math.max(Math.min(o,i),t))}},_setValueOnSwipe(e){this._actualValue=e,"onHandleRelease"===this.option("valueChangeMode")?b.default.getInstance(this._activeHandle()).option("value",e):(this.option("value",e),this._saveValueChangeEvent(void 0))},_getActualValue(){return this._actualValue??this.option("value")},_isSingleValuePossible(){const{min:e,max:t}=this.option();return e===t},_startHandler(e){if(this._isSingleValuePossible())return;const t=e.event;this._currentRatio=((0,l.eventData)(t).x-this._$bar.offset().left)/(0,m.getWidth)(this._$bar),this.option("rtlEnabled")&&(this._currentRatio=1-this._currentRatio),this._saveValueChangeEvent(t),this._changeValueOnSwipe(this._currentRatio)},_renderValue(){this.callBase();const e=this._getActualValue();this._getSubmitElement().val((0,p.applyServerDecimalSeparator)(e)),b.default.getInstance(this._activeHandle()).option("value",e)},_setRangeStyles(e){e&&this._$range.css(e)},_callHandlerMethod(e,t){b.default.getInstance(this._$handle)[e](t)},_repaintHandle(){this._callHandlerMethod("repaint")},_fitTooltip(){this._callHandlerMethod("updateTooltipPosition")},_optionChanged(e){switch(e.name){case"visible":this.callBase(e),this._renderHandle(),this._repaintHandle();break;case"min":case"max":this._renderValue(),this.callBase(e),this._renderLabels(),this._renderAriaMinAndMax(),this._fitTooltip();break;case"step":this._renderValue();break;case"keyStep":case"valueChangeMode":break;case"showRange":this._renderRangeVisibility();break;case"tooltip":this._renderHandle();break;case"label":this._renderLabels();break;case"useInkRipple":this._invalidate();break;default:this.callBase(e)}},_refresh(){this._toggleRTLDirection(this.option("rtlEnabled")),this._renderDimensions(),this._renderValue(),this._renderHandle(),this._repaintHandle()},_clean(){delete this._inkRipple,delete this._actualValue,this.callBase()}});(0,u.default)("dxSlider",E);t.default=E},29049:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(64553)),o=i(52576),a=r(i(11118)),s=r(i(52904));function r(e){return e&&e.__esModule?e:{default:e}}const l=a.default.inherit({_getDefaultOptions(){return(0,o.extend)(this.callBase(),{hoverStateEnabled:!1,value:0,tooltip:{enabled:!1,format:e=>e,position:"top",showMode:"onHover"}})},_initMarkup(){this.callBase(),this.$element().addClass("dx-slider-handle"),this.setAria({role:"slider",valuenow:this.option("value"),label:"Slider"})},_render(){this.callBase(),this._renderTooltip()},_renderTooltip(){const{tooltip:e,value:t}=this.option(),{position:i,format:o,enabled:a,showMode:r}=e,l=(0,n.default)("<div>");this._sliderTooltip=this._createComponent(l,s.default,{target:this.$element(),container:l,position:i,visible:a,showMode:r,format:o,value:t})},_clean(){this.callBase(),this._sliderTooltip=null},_updateTooltipOptions(e){var t;const i=a.default.getOptionsFromContainer(e);this._setWidgetOption("_sliderTooltip",[i]),null===(t=this._sliderTooltip)||void 0===t||t.option("visible",i.enabled)},_optionChanged(e){const{name:t,value:i}=e;switch(t){case"value":var n;null===(n=this._sliderTooltip)||void 0===n||n.option("value",i),this.setAria("valuenow",i);break;case"tooltip":this._updateTooltipOptions(e);break;default:this.callBase(e)}},updateTooltipPosition(){var e;null===(e=this._sliderTooltip)||void 0===e||e.updatePosition()},repaint(){var e;null===(e=this._sliderTooltip)||void 0===e||e.repaint()}});t.default=l},52904:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(52771)),o=i(52576),a=r(i(93370)),s=i(12039);function r(e){return e&&e.__esModule?e:{default:e}}const l=a.default.inherit({_getDefaultOptions(){return(0,o.extend)(this.callBase(),{visible:!1,position:"top",hideOnOutsideClick:!1,hideTopOverlayHandler:null,hideOnParentScroll:!1,animation:null,arrowPosition:null,templatesRenderAsynchronously:!1,_fixWrapperPosition:!1,useResizeObserver:!1,showMode:"onHover",format:e=>e,value:0})},_initMarkup(){this.callBase(),this._attachToMarkup(this.option("visible")),this._toggleShowModeClass()},_renderContent(){this.callBase(),this._renderContentText()},_toggleAriaAttributes(){},_renderContentText(){const{value:e,format:t}=this.option(),i=n.default.format(e??0,t);this.$content().text(i),this._renderPosition()},_toggleShowModeClass(){const e="onHover"===this.option("showMode");this.option("target").toggleClass("dx-slider-tooltip-visible-on-hover",e)},_initPositionController(){this._positionController=new s.SliderTooltipPositionController(this._getPositionControllerConfig())},_attachToMarkup(e){const t=this.option("target");e?this.$element().appendTo(t):this.$element().detach()},_optionChanged(e){const{name:t,value:i}=e;switch(t){case"visible":this._attachToMarkup(i),this.callBase(e);break;case"showMode":this._toggleShowModeClass();break;case"format":case"value":this._renderContentText();break;default:this.callBase(e)}},updatePosition(){this._renderPosition()}});t.default=l},12039:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SliderTooltipPositionController=void 0;var n,o=(n=i(3030))&&n.__esModule?n:{default:n},a=i(88603),s=i(52576),r=i(11528),l=i(96423);const d={top:{my:"bottom center",at:"top center",collision:"fit none"},bottom:{my:"top center",at:"bottom center",collision:"fit none"}},u={h:2,v:1};class c extends l.PopoverPositionController{_normalizePosition(e){const t=this._props.target,i=null==t?void 0:t.closest(".dx-slider"),n={of:t,boundaryOffset:u,boundary:null==i?void 0:i.get(0)},o=(0,s.extend)(!0,{},n,this._positionToObject(e));return this._positionSide=this._getDisplaySide(o),o}_renderContentInitialPosition(){super._renderContentInitialPosition(),this._fitIntoSlider()}_fitIntoSlider(){const{collisionSide:e,oversize:t}=o.default.calculate(this._$content,this._position).h,{left:i}=this._visualPosition,n=("left"===e?1:-1)*t;(0,a.move)(this._$content,{left:i+n}),this._updateVisualPositionValue()}_positionToObject(e){return(0,r.isString)(e)?(0,s.extend)({},d[e]):e}}t.SliderTooltipPositionController=c},24251:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(57325);t.default=n.repaint},16616:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(i(92848)),o=u(i(19427)),a=i(52576),s=u(i(3122)),r=u(i(5080)),l=u(i(29299)),d=i(57325);function u(e){return e&&e.__esModule?e:{default:e}}const{getSwatchContainer:c}=r.default,h=s.default.add;class p extends l.default{_getDefaultOptions(){return(0,a.extend)(super._getDefaultOptions(),{icon:"",onClick:null,label:"",visible:!0,index:0,onContentReady:null,activeStateEnabled:!0,hoverStateEnabled:!0,animation:{show:{type:"pop",duration:200,easing:"cubic-bezier(0.4, 0, 0.2, 1)",from:{scale:0,opacity:0},to:{scale:1,opacity:1}},hide:{type:"pop",duration:200,easing:"cubic-bezier(0.4, 0, 0.2, 1)",from:{scale:1,opacity:1},to:{scale:0,opacity:0}}},id:new o.default})}_optionChanged(e){switch(e.name){case"onClick":case"icon":case"label":case"visible":case"index":case"onInitializing":(0,d.initAction)(this);break;case"animation":case"id":break;default:super._optionChanged(e)}}_render(){this._toggleVisibility(!1),c(this.$element())?(0,d.initAction)(this):h((()=>(0,d.initAction)(this)))}_dispose(){(0,d.disposeAction)(this._options.silent("id")),super._dispose()}}(0,n.default)("dxSpeedDialAction",p);t.default=p},56893:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(64044),o=p(i(92774)),a=i(98834),s=p(i(64553)),r=i(52576),l=i(69629),d=i(11528),u=p(i(89132)),c=i(52071),h=i(63322);function p(e){return e&&e.__esModule?e:{default:e}}class g extends u.default{_getDefaultOptions(){return(0,r.extend)(super._getDefaultOptions(),{shading:!1,useInkRipple:!1,callOverlayRenderShading:!1,width:"auto",zIndex:1500,_observeContentResize:!1})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,c.isMaterial)(),options:{useInkRipple:!0}}])}_moveToContainer(){this._$wrapper.appendTo(this.$element()),this._$content.appendTo(this._$wrapper)}_render(){this.$element().addClass("dx-fa-button"),this._renderIcon(),this._renderLabel(),super._render(),this.option("useInkRipple")&&this._renderInkRipple(),this._renderClick()}_renderLabel(){this._$label&&this._$label.remove();const e=this.option("label");if(!e)return void(this._$label=null);const t=(0,s.default)("<div>").addClass("dx-fa-button-label"),i=(0,s.default)("<div>").addClass("dx-fa-button-label-wrapper");this._$label=i.prependTo(this.$content()).append(t.text(e)),this.$content().toggleClass("dx-fa-button-content-reverse",this._isPositionLeft(this.option("parentPosition")))}_isPositionLeft(e){let t="";return e&&((0,d.isPlainObject)(e)&&e.at?t=e.at.x?e.at.x:e.at:"string"==typeof e&&(t=e)),"left"===t.split(" ")[0]}_renderButtonIcon(e,t,i){e&&e.remove(),e=(0,s.default)("<div>").addClass(i);const n=(0,l.getImageContainer)(t);return e.append(n).appendTo(this.$content()),e}_renderIcon(){this._$icon=this._renderButtonIcon(this._$icon,this._options.silent("icon"),"dx-fa-button-icon")}_renderWrapper(){this._options.silent("callOverlayRenderShading")&&super._renderWrapper()}_getVisibleActions(e){return(e||this.option("actions")||[]).filter((e=>e.option("visible")))}_getActionComponent(){return 1===this._getVisibleActions().length?this._getVisibleActions()[0]:this.option("actionComponent")||this.option("actions")[0]}_initContentReadyAction(){this._contentReadyAction=this._getActionComponent()._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]},!0)}_fireContentReadyAction(){this._contentReadyAction({actionElement:this.$element()})}_updateZIndexStackPosition(){const e=this.option("zIndex");this._$wrapper.css("zIndex",e),this._$content.css("zIndex",e)}_setClickAction(){const e=(0,a.addNamespace)(n.name,this.NAME),t=this.$element().find(".dx-overlay-content");o.default.off(t,e),o.default.on(t,e,(e=>{const t={event:e,actionElement:this.element(),element:this._getActionComponent().$element()};this._clickAction(t)}))}_defaultActionArgs(){return{component:this._getActionComponent()}}_renderClick(){this._clickAction=this._getActionComponent()._createActionByOption("onClick"),this._setClickAction()}_renderInkRipple(){this._inkRipple=(0,h.render)()}_getInkRippleContainer(){return this._$icon}_toggleActiveState(e,t,i){if(super._toggleActiveState.apply(this,arguments),!this._inkRipple)return;const n={element:this._getInkRippleContainer(),event:i};t?this._inkRipple.showWave(n):this._inkRipple.hideWave(n)}_optionChanged(e){switch(e.name){case"icon":this._renderIcon();break;case"onClick":this._renderClick();break;case"label":this._renderLabel();break;case"visible":this._currentVisible=e.previousValue,e.value?this._show():this._hide();break;case"useInkRipple":this._render();break;default:super._optionChanged(e)}}}t.default=g},57325:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.disposeAction=function(e){if(!_)return;let t=_.option("actions");const i=t.length;if(t=t.filter((t=>t._options.silent("id")!==e)),i===t.length)return;t.length?1===t.length?_.option((0,s.extend)({},f(t[0]),{actions:t})):_.option({actions:t}):(_.dispose(),_.$element().remove(),_=null)},t.initAction=function(e){e._options.silent("onInitializing",null);let t=!1;if(_){const i=_.option("actions");if(i.forEach((i=>{if(i._options.silent("id")===e._options.silent("id"))return t=!0,e})),delete _._options.position,t)1===i.length?_.option((0,s.extend)({},f(i[0]),{actions:i,position:_._getPosition()})):_.option((0,s.extend)(_._getCurrentOptions(i),{actions:i}));else{if(_._getVisibleActions(i).length>=_.option("maxSpeedDialActionCount"))return e.dispose(),void u.default.log("W1014");i.push(e),_.option((0,s.extend)(_._getCurrentOptions(i),{actions:i}))}}else{const t=(0,a.default)("<div>").appendTo(p(e.$element()));_=e._createComponent(t,m,(0,s.extend)({},f(e),{actions:[e]}))}},t.repaint=function(){if(!_)return;const e=_._getVisibleActions(),t=1===e.length?e[0].option("icon"):_._getDefaultOptions().icon,i=1===e.length?e[0].option("label"):_._getDefaultOptions().label;_.option({actions:_.option("actions"),icon:t,closeIcon:_._getDefaultOptions().closeIcon,position:_._getPosition(),label:i,maxSpeedDialActionCount:_._getDefaultOptions().maxSpeedDialActionCount,direction:_._getDefaultOptions().direction})};var n=h(i(92774)),o=h(i(66636)),a=h(i(64553)),s=i(52576),r=i(57653),l=i(52071),d=h(i(5080)),u=h(i(35185)),c=h(i(56893));function h(e){return e&&e.__esModule?e:{default:e}}const{getSwatchContainer:p}=d.default,g="dx-state-invisible";let _=null;const f=e=>{const{animation:t,actionComponent:i,actionVisible:n,actions:o,activeStateEnabled:a,direction:r,elementAttr:l,hint:d,hoverStateEnabled:u,icon:c,id:h,index:p,label:g,onClick:_,onContentReady:f,parentPosition:m,position:v,visible:C,zIndex:y}=e.option();return(0,s.extend)({},{animation:t,actionComponent:i,actionVisible:n,actions:o,activeStateEnabled:a,direction:r,elementAttr:l,hint:d,hoverStateEnabled:u,icon:c,id:h,index:p,label:g,onClick:_,onContentReady:f,parentPosition:m,position:v,visible:C,zIndex:y},{onInitialized:null,onDisposing:null})};class m extends c.default{_getDefaultOptions(){const e={icon:"add",closeIcon:"close",position:{at:"right bottom",my:"right bottom",offset:{x:-16,y:-16}},maxSpeedDialActionCount:5,hint:"",label:"",direction:"auto",actions:[],activeStateEnabled:!0,hoverStateEnabled:!0,indent:(0,l.isCompact)()?49:55,childIndent:40,childOffset:(0,l.isCompact)()?2:9,callOverlayRenderShading:!0,hideOnOutsideClick:!0};return(0,s.extend)(super._getDefaultOptions(),(0,s.extend)(e,(0,o.default)().floatingActionButtonConfig,{shading:!1}))}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,l.isFluent)()&&!(0,l.isCompact)(),options:{indent:60,childIndent:60,childOffset:0}},{device:()=>(0,l.isFluent)()&&(0,l.isCompact)(),options:{indent:48,childIndent:48,childOffset:0}},{device:()=>(0,l.isMaterial)()&&!(0,l.isCompact)(),options:{indent:72,childIndent:56,childOffset:8}},{device:()=>(0,l.isMaterial)()&&(0,l.isCompact)(),options:{indent:58,childIndent:48,childOffset:1}}])}_render(){this.$element().addClass("dx-fa-button-main"),super._render(),this._moveToContainer(),this._renderCloseIcon(),this._renderClick()}_renderLabel(){super._renderLabel(),this.$element().toggleClass("dx-fa-button-with-label",!!this._$label)}_renderIcon(){super._renderIcon(),this.$element().toggleClass("dx-fa-button-without-icon",!this.option("icon"))}_renderCloseIcon(){this._$closeIcon=this._renderButtonIcon(this._$closeIcon,this._options.silent("closeIcon"),"dx-fa-button-icon-close"),this._$closeIcon.addClass(g)}_renderClick(){this._clickAction=1===this._getVisibleActions().length?this._getActionComponent()._createActionByOption("onClick"):this._createAction(this._clickHandler.bind(this)),this._setClickAction()}_getVisibleActions(e){return(e||this.option("actions")).filter((e=>e.option("visible")))}_getCurrentOptions(e){var t;const i=null===(t=_)||void 0===t?void 0:t._getVisibleActions(e),n=this._getDefaultOptions();return delete n.closeOnOutsideClick,1===i.length?(0,s.extend)(f(i[0]),{position:this._getPosition()}):(0,s.extend)(n,{visible:0!==i.length})}_clickHandler(){var e;const t=this._actionItems.filter((e=>e.option("actionVisible"))).sort(((e,t)=>e.option("index")-t.option("index")));if(1===t.length)return;const i=t.length-1;for(let e=0;e<t.length;e++)t[e].option("animation",this._getActionAnimation(t[e],e,i)),t[e].option("position",this._getActionPosition(t,e)),t[e]._$wrapper.css("position",this._$wrapper.css("position")),t[e].toggle();null!==(e=(0,o.default)().floatingActionButtonConfig)&&void 0!==e&&e.shading&&(this._isShadingShown=!this.option("shading"),this.option("shading",this._isShadingShown)),this._$icon.toggleClass(g),this._$closeIcon.toggleClass(g)}_updateZIndexStackPosition(){super._updateZIndexStackPosition();this._overlayStack().push(this)}_renderActions(){const e=this.option("actions");if(this._actionItems&&this._actionItems.length&&(this._actionItems.forEach((e=>{e.dispose(),e.$element().remove()})),this._actionItems=[]),this._actionItems=[],1!==e.length)for(let t=0;t<e.length;t++){const i=e[t],o=(0,a.default)("<div>").appendTo(p(i.$element()));n.default.off(o,"click"),n.default.on(o,"click",(()=>{this._clickHandler()})),i._options.silent("actionComponent",i),i._options.silent("parentPosition",this._getPosition()),i._options.silent("actionVisible",i._options.silent("visible")),this._actionItems.push(this._createComponent(o,c.default,(0,s.extend)({},f(i),{visible:!1})))}}_getActionAnimation(e,t,i){return e._options.silent("animation.show.delay",30*t),e._options.silent("animation.hide.delay",30*(i-t)),e._options.silent("animation")}_getDirectionIndex(e,t){if("auto"===t){const t=(0,r.getHeight)(this.$content()),i=this.initialOption("indent")+this.initialOption("childIndent")*e.length-t,n=this.$content().offset().top;if(i<n)return-1;return n>=(0,r.getHeight)(this._positionController._$wrapperCoveredElement)-t-n?-1:1}return"down"!==t?-1:1}_getActionPosition(e,t){const i=e[t],n=this.initialOption("childOffset"),o=i._options.silent("label")&&!this._$label?this._isPositionLeft(this._getPosition())?n:-n:0,a=this.initialOption("indent")+this.initialOption("childIndent")*t,s=this._getDirectionIndex(e,this.option("direction"))*a,r=i._options.silent("label")?this._isPositionLeft(this._getPosition())?"left":"right":"center";return{of:this.$content(),at:r,my:r,offset:{x:o,y:s}}}_outsideClickHandler(e){if(this._isShadingShown){(0,a.default)(e.target)[0]===this._$wrapper[0]&&(e.preventDefault(),this._clickHandler())}}_setPosition(){this.option("visible")&&(this._hide(),this._show())}_getPosition(){return this._getDefaultOptions().position}_getInkRippleContainer(){return this.$content()}_optionChanged(e){switch(e.name){case"actions":this._isVisible()&&(this._renderIcon(),this._renderLabel()),this._renderCloseIcon(),this._renderClick(),this._renderActions();break;case"maxSpeedDialActionCount":this._renderActions();break;case"closeIcon":this._renderCloseIcon();break;case"position":super._optionChanged(e),this._setPosition();break;case"label":this._isVisible()&&this._renderLabel(),this._setPosition();break;case"icon":this._isVisible()&&this._renderIcon();break;default:super._optionChanged(e)}}}},4916:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RESIZE_HANDLE_CLASS=void 0;var n=i(64044),o=p(i(92774)),a=i(5636),s=i(59144),r=i(98834),l=p(i(4671)),d=p(i(19427)),u=p(i(64553)),c=p(i(89275)),h=i(58545);function p(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},g.apply(null,arguments)}const _=t.RESIZE_HANDLE_CLASS="dx-resize-handle",f="dx-resize-handle-resizable",m="dx-icon",v="dx-state-invisible",C="horizontal",y="vertical";class b extends c.default{_supportedKeys(){return g({},super._supportedKeys(),{rightArrow(e){e.preventDefault(),e.stopPropagation();const{direction:t,showCollapseNext:i,showCollapsePrev:n,rtlEnabled:o}=this.option(),a=o?!1===n:!1===i;if((0,r.isCommandKeyPressed)(e)){if(t===y||a)return;o?this._collapsePrevHandler(e):this._collapseNextHandler(e)}else this._resizeBy(e,{x:5})},leftArrow(e){e.preventDefault(),e.stopPropagation();const{direction:t,showCollapsePrev:i,showCollapseNext:n,rtlEnabled:o}=this.option(),a=o?!1===n:!1===i;if((0,r.isCommandKeyPressed)(e)){if(t===y||a)return;o?this._collapseNextHandler(e):this._collapsePrevHandler(e)}else this._resizeBy(e,{x:-5})},upArrow(e){e.preventDefault(),e.stopPropagation();const{direction:t,showCollapsePrev:i}=this.option();if((0,r.isCommandKeyPressed)(e)){if(t===C||!1===i)return;this._collapsePrevHandler(e)}else this._resizeBy(e,{y:-5})},downArrow(e){e.preventDefault(),e.stopPropagation();const{direction:t,showCollapseNext:i}=this.option();if((0,r.isCommandKeyPressed)(e)){if(t===C||!1===i)return;this._collapseNextHandler(e)}else this._resizeBy(e,{y:5})}})}_getDefaultOptions(){return g({},super._getDefaultOptions(),{direction:C,hoverStateEnabled:!0,focusStateEnabled:!0,activeStateEnabled:!0,onResize:void 0,onResizeEnd:void 0,onResizeStart:void 0,resizable:!0,showCollapsePrev:!0,showCollapseNext:!0,onCollapsePrev:void 0,onCollapseNext:void 0,separatorSize:8})}_init(){super._init();const e=`dxResizeHandle${new d.default}`;this.RESIZE_START_EVENT_NAME=(0,r.addNamespace)(s.start,e),this.RESIZE_EVENT_NAME=(0,r.addNamespace)(s.move,e),this.RESIZE_END_EVENT_NAME=(0,r.addNamespace)(s.end,e),this.CLICK_EVENT_NAME=(0,r.addNamespace)(n.name,e),this.DOUBLE_CLICK_EVENT_NAME=(0,r.addNamespace)(a.name,e)}_initMarkup(){super._initMarkup(),this._renderResizeHandleContent(),this._setAriaAttributes()}_renderResizeHandleContent(){const{resizable:e}=this.option();(0,u.default)(this.element()).addClass(_),(0,u.default)(this.element()).toggleClass(f,e),this._toggleDirectionClass(),this._updateDimensions(),this._$collapsePrevButton=(0,u.default)("<div>").addClass(this._getIconClass("prev")).appendTo(this.$element()),this._$resizeHandle=(0,u.default)("<div>").addClass(this._getIconClass("icon")).appendTo(this.$element()),this._$collapseNextButton=(0,u.default)("<div>").addClass(this._getIconClass("next")).appendTo(this.$element()),this._setCollapseButtonsVisibility(),this._setResizeIconVisibility()}_updateIconsClasses(){var e,t,i;const n=this._isHorizontalDirection(),o=this.option("rtlEnabled");null===(e=this._$collapsePrevButton)||void 0===e||e.removeClass(this._getCollapseIconClass(!1,!n,!!o)).addClass(this._getCollapseIconClass(!1,n,!!o)),null===(t=this._$resizeHandle)||void 0===t||t.removeClass(this._getResizeIconClass(!n)).addClass(this._getResizeIconClass(n)),null===(i=this._$collapseNextButton)||void 0===i||i.removeClass(this._getCollapseIconClass(!0,!n,!!o)).addClass(this._getCollapseIconClass(!0,n,!!o))}_updateDimensions(){const e=this._isHorizontalDirection(),t=e?"width":"height",i=e?"height":"width";this.option(i,null),this.option(t,this.getSize())}_isInactive(){const{resizable:e,showCollapseNext:t,showCollapsePrev:i}=this.option();return!1===e&&!1===t&&!1===i}_getIconClass(e){const t=this._isHorizontalDirection(),i=this.option("rtlEnabled");switch(e){case"prev":return`dx-resize-handle-collapse-prev-pane ${m} ${this._getCollapseIconClass(!1,t,!!i)}`;case"next":return`dx-resize-handle-collapse-next-pane ${m} ${this._getCollapseIconClass(!0,t,!!i)}`;case"icon":return`dx-resize-handle-icon ${m} ${this._getResizeIconClass(t)}`;default:return""}}_getResizeIconClass(e){return"dx-icon-handle"+(e?"vertical":"horizontal")}_getCollapseIconClass(e,t,i){return`dx-icon-triangle${t?e===i?"left":"right":e?"down":"up"}`}_setCollapseButtonsVisibility(){var e,t;const{showCollapsePrev:i,showCollapseNext:n}=this.option();null===(e=this._$collapsePrevButton)||void 0===e||e.toggleClass(v,!i),null===(t=this._$collapseNextButton)||void 0===t||t.toggleClass(v,!n)}_setResizeIconVisibility(){var e;const{resizable:t}=this.option();null===(e=this._$resizeHandle)||void 0===e||e.toggleClass(v,!t)}_setAriaAttributes(){this.setAria({role:"application",roledescription:"separator",label:l.default.format("dxSplitter-resizeHandleAriaLabel")})}_toggleDirectionClass(){(0,u.default)(this.element()).toggleClass("dx-resize-handle-horizontal",this._isHorizontalDirection()),(0,u.default)(this.element()).toggleClass("dx-resize-handle-vertical",!this._isHorizontalDirection())}_render(){super._render(),this._attachEventHandlers()}_resizeStartHandler(e){this._getAction(h.RESIZE_EVENT.onResizeStart)({event:e})}_resizeHandler(e){this._getAction(h.RESIZE_EVENT.onResize)({event:e})}_resizeEndHandler(e){this._getAction(h.RESIZE_EVENT.onResizeEnd)({event:e})}_collapsePrevHandler(e){this._getAction(h.COLLAPSE_EVENT.onCollapsePrev)({event:e})}_collapseNextHandler(e){this._getAction(h.COLLAPSE_EVENT.onCollapseNext)({event:e})}_resizeBy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:0,y:0};const{resizable:i}=this.option();!1!==i&&(e.offset=t,this._resizeStartHandler(e),this._resizeHandler(e),this._resizeEndHandler(e))}_createEventAction(e){this[(0,h.getActionNameByEventName)(e)]=this._createActionByOption(e,{excludeValidators:["disabled","readOnly"]})}_getAction(e){const t=(0,h.getActionNameByEventName)(e);return this[t]||this._createEventAction(e),this[t]}_attachEventHandlers(){this._attachResizeEventHandlers(),this._attachPointerEventHandlers()}_attachResizeEventHandlers(){const{resizable:e,direction:t}=this.option();if(e){const e={direction:t,immediate:!0};o.default.on(this.$element(),this.RESIZE_START_EVENT_NAME,e,this._resizeStartHandler.bind(this)),o.default.on(this.$element(),this.RESIZE_EVENT_NAME,e,this._resizeHandler.bind(this)),o.default.on(this.$element(),this.RESIZE_END_EVENT_NAME,e,this._resizeEndHandler.bind(this))}}_attachPointerEventHandlers(){const{showCollapsePrev:e,showCollapseNext:t}=this.option();!0!==e&&!0!==t||o.default.on(this.$element(),this.DOUBLE_CLICK_EVENT_NAME,this._doubleClickHandler.bind(this)),!0===e&&o.default.on(this._$collapsePrevButton,this.CLICK_EVENT_NAME,this._collapsePrevHandler.bind(this)),!0===t&&o.default.on(this._$collapseNextButton,this.CLICK_EVENT_NAME,this._collapseNextHandler.bind(this))}_detachEventHandlers(){this._detachResizeEventHandlers(),this._detachPointerEventHandlers()}_detachResizeEventHandlers(){o.default.off(this.$element(),this.RESIZE_START_EVENT_NAME),o.default.off(this.$element(),this.RESIZE_EVENT_NAME),o.default.off(this.$element(),this.RESIZE_END_EVENT_NAME)}_detachPointerEventHandlers(){o.default.off(this.$element(),this.DOUBLE_CLICK_EVENT_NAME),o.default.off(this._$collapsePrevButton,this.CLICK_EVENT_NAME),o.default.off(this._$collapseNextButton,this.CLICK_EVENT_NAME)}_doubleClickHandler(e){const{showCollapsePrev:t,showCollapseNext:i}=this.option();!0===t?this._collapsePrevHandler(e):!0===i&&this._collapseNextHandler(e)}_isHorizontalDirection(){const{direction:e}=this.option();return e===C}_clean(){this._detachResizeEventHandlers(),this._detachPointerEventHandlers(),super._clean()}_optionChanged(e){const{name:t,value:i}=e;switch(t){case"direction":this._toggleDirectionClass(),this._detachResizeEventHandlers(),this._attachResizeEventHandlers(),this._updateDimensions(),this._updateIconsClasses();break;case"resizable":this._setResizeIconVisibility(),(0,u.default)(this.element()).toggleClass(f,!!i),this._detachResizeEventHandlers(),this._attachResizeEventHandlers(),this._updateDimensions();break;case"separatorSize":this._updateDimensions();break;case"showCollapsePrev":case"showCollapseNext":this._setCollapseButtonsVisibility(),this._setResizeIconVisibility(),this._updateDimensions(),this._detachPointerEventHandlers(),this._attachPointerEventHandlers();break;case"onCollapsePrev":case"onCollapseNext":case"onResize":case"onResizeStart":case"onResizeEnd":this._createEventAction(t);break;default:super._optionChanged(e)}}getSize(){const{separatorSize:e}=this.option();return this._isInactive()?2:void 0!==e&&Number.isFinite(e)&&e>=0?e:8}isInactive(){return this._isInactive()}}t.default=b},32364:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(69331),o=S(i(92848)),a=S(i(64960)),s=i(61404),r=S(i(64553)),l=S(i(11787)),d=i(87739),u=i(86858),c=i(52576),h=i(57653),p=i(11528),g=i(3104),_=S(i(84150)),f=i(4916),m=S(i(9492)),v=i(38674),C=i(58545),y=i(49291),b=i(54285),x=i(94178),w=i(49624);function S(e){return e&&e.__esModule?e:{default:e}}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},D.apply(null,arguments)}const I="dx-splitter",E="dx-state-invisible",T="flexGrow",A="flexShrink",O="flexBasis",P="horizontal";class k extends _.default{constructor(){super(...arguments),this._renderQueue=[],this._panesCacheSize=[],this._itemRestrictions=[]}_getDefaultOptions(){const e=super._getDefaultOptions();return D({},e,{orientation:P,onItemCollapsed:void 0,onItemExpanded:void 0,onResize:void 0,onResizeEnd:void 0,onResizeStart:void 0,allowKeyboardNavigation:!0,separatorSize:8,_itemAttributes:D({},e._itemAttributes,{role:"group"}),_renderQueue:void 0})}_itemClass(){return"dx-splitter-item"}_itemDataKey(){return"dxSplitterItemData"}_init(){super._init(),this._initializeRenderQueue()}_initializeRenderQueue(){this._renderQueue=this.option("_renderQueue")??[]}_isRenderQueueEmpty(){return this._renderQueue.length<=0}_pushItemToRenderQueue(e,t){this._renderQueue.push({itemContent:e,splitterConfig:t})}_shiftItemFromQueue(){return this._renderQueue.shift()}_initMarkup(){(0,r.default)(this.element()).addClass(I),this._toggleOrientationClass(),super._initMarkup(),this._panesCacheSize=[],this._attachResizeObserverSubscription()}_getItemDimension(e){return this._isHorizontalOrientation()?(0,h.getOuterWidth)(e):(0,h.getOuterHeight)(e)}_attachResizeObserverSubscription(){if((0,g.hasWindow)()){const e=(0,r.default)(this.element()).get(0);l.default.unobserve(e),l.default.observe(e,(()=>{this._resizeHandler()}))}}_attachHoldEvent(){}_isAttached(){return!!(0,u.contains)(a.default.getBody(),(0,r.default)(this.element()).get(0))}_isVisible(){return(0,y.isElementVisible)((0,r.default)(this.element())[0])}_resizeHandler(){this._shouldRecalculateLayout&&this._isAttached()&&this._isVisible()&&(this._layout=this._getDefaultLayoutBasedOnSize(),this._applyStylesFromLayout(this._layout),this._updateItemSizes(),this._shouldRecalculateLayout=!1)}_renderItems(e){super._renderItems(e),this._updateResizeHandlesResizableState(),this._updateResizeHandlesCollapsibleState(),this._isVisible()?(this._layout=this._getDefaultLayoutBasedOnSize(),this._applyStylesFromLayout(this._layout),this._updateItemSizes()):this._shouldRecalculateLayout=!0,this._processRenderQueue()}_processRenderQueue(){if(this._isRenderQueueEmpty())return;const e=this._shiftItemFromQueue();e&&(this._createComponent((0,r.default)(e.itemContent),k,(0,c.extend)({itemTemplate:this.option("itemTemplate"),onResize:this.option("onResize"),onResizeStart:this.option("onResizeStart"),onResizeEnd:this.option("onResizeEnd"),onItemClick:this.option("onItemClick"),onItemContextMenu:this.option("onItemContextMenu"),onItemRendered:this.option("onItemRendered"),onItemExpanded:this.option("onItemExpanded"),onItemCollapsed:this.option("onItemCollapsed"),separatorSize:this.option("separatorSize"),allowKeyboardNavigation:this.option("allowKeyboardNavigation"),rtlEnabled:this.option("rtlEnabled"),_renderQueue:this._renderQueue},e.splitterConfig)),this._processRenderQueue())}_itemElements(){return(0,r.default)(this._itemContainer()).children(this._itemSelector())}_isLastVisibleItem(e){const{items:t=[]}=this.option();return e===(0,y.findLastIndexOfVisibleItem)(t)}_renderItem(e,t,i,n){const o=super._renderItem(e,t,i,n),a=o.get(0);return(0,y.setFlexProp)(a,A,0),(0,y.setFlexProp)(a,O,0),this._getItemInstance(o)._renderResizeHandle(),o}_getItemInstance(e){return k.ItemClass.getInstance(e)}_updateResizeHandlesResizableState(){this._getResizeHandles().forEach((e=>{const t=e.$element(),i=this._getResizeHandleLeftItem(t),n=this._getResizeHandleRightItem(t),o=this._getItemData(i),a=this._getItemData(n),s=!1!==o.resizable&&!1!==a.resizable&&!0!==o.collapsed&&!0!==a.collapsed;e.option("resizable",s),e.option("disabled",e.isInactive())}))}_updateResizeHandlesCollapsibleState(){this._getResizeHandles().forEach((e=>{const t=(0,r.default)(e.element()),i=this._getResizeHandleLeftItem(t),n=this._getResizeHandleRightItem(t),o=this._getItemData(i),a=this._getItemData(n),s=!0===a.collapsed?!0===a.collapsible&&!0!==o.collapsed:!0===o.collapsible&&!0!==o.collapsed,l=!0===o.collapsed?!0===o.collapsible:!0===a.collapsible&&!0!==a.collapsed;e.option({showCollapsePrev:s,showCollapseNext:l}),e.option("disabled",e.isInactive())}))}_updateNestedSplitterOption(e,t){const{items:i=[]}=this.option();i.forEach((i=>{if(null!=i&&i.splitter){const n=this._findItemElementByItem(i).find(`.${I}`).eq(0);n.length&&(0,v.getComponentInstance)(n).option(e,t)}}))}_updateResizeHandlesOption(e,t){this._getResizeHandles().forEach((i=>{i.option(e,t)}))}_getNextVisibleItemData(e){const{items:t=[]}=this.option();return this._getItemDataByIndex((0,y.findIndexOfNextVisibleItem)(t,e))}_getItemDataByIndex(e){return this._editStrategy.getItemDataByIndex(e)}_createEventAction(e){this[(0,C.getActionNameByEventName)(e)]=this._createActionByOption(e,{excludeValidators:["disabled","readOnly"]})}_getAction(e){const t=(0,C.getActionNameByEventName)(e);return this[t]||this._createEventAction(e),this[t]}_getResizeHandleConfig(e){const{orientation:t,rtlEnabled:i,allowKeyboardNavigation:o,separatorSize:a}=this.option();return{direction:t,focusStateEnabled:o,hoverStateEnabled:!0,separatorSize:a,elementAttr:{"aria-controls":e},onCollapsePrev:e=>{var t;null===(t=e.event)||void 0===t||t.stopPropagation(),this._savedCollapsingEvent=e.event,this.handleCollapseEvent(this._getResizeHandleLeftItem((0,r.default)(e.element)),w.CollapseExpandDirection.Previous)},onCollapseNext:e=>{var t;null===(t=e.event)||void 0===t||t.stopPropagation(),this._savedCollapsingEvent=e.event,this.handleCollapseEvent(this._getResizeHandleLeftItem((0,r.default)(e.element)),w.CollapseExpandDirection.Next)},onResizeStart:e=>{const{element:i,event:o}=e;if(!o)return;const a=(0,r.default)(i),l={event:o,handleElement:(0,s.getPublicElement)(a)};if(this._getAction(C.RESIZE_EVENT.onResizeStart)(l),l.cancel)return void(o.cancel=!0);this._feedbackDeferred=(0,d.Deferred)(),(0,n.lock)(this._feedbackDeferred),this._toggleActiveState(a,!0);const u=this._getResizeHandleLeftItem(a),c=this._getItemData(u),h=this._getIndexByItem(c);this._activeResizeHandleIndex=h,this._currentOnePxRatio=(0,y.convertSizeToRatio)(1,(0,y.getElementSize)((0,r.default)(this.element()),t),this._getResizeHandlesSize()),this._currentLayout=this.getLayout(),this._updateItemsRestrictions()},onResize:e=>{const{element:t,event:n}=e;if(!n)return;const o={event:n,handleElement:(0,s.getPublicElement)((0,r.default)(t))};if(this._getAction(C.RESIZE_EVENT.onResize)(o),o.cancel)return void(n.cancel=!0);const a=(0,y.getNextLayout)(this._currentLayout??[],(0,y.calculateDelta)(n.offset,this.option("orientation"),i,this._currentOnePxRatio),this._activeResizeHandleIndex,this._itemRestrictions);this._applyStylesFromLayout(a),this._layout=a},onResizeEnd:e=>{var t;const{element:i,event:n}=e;if(this._activeResizeHandleIndex=void 0,!n)return;const o=(0,r.default)(i),a={event:n,handleElement:(0,s.getPublicElement)(o)};null===(t=this._feedbackDeferred)||void 0===t||t.resolve(),this._toggleActiveState(o,!1),this._updateItemSizes(),this._getAction(C.RESIZE_EVENT.onResizeEnd)(a)}}}handleCollapseEvent(e,t,i){const n=e,o=this._getItemData(n),a=this._getIndexByItem(o),s=this._getResizeHandleRightItem(n),r=this._getItemData(s),l=this._getIndexByItem(r);this._activeResizeHandleIndex=a,this._collapseDirection=t;const d=i??(t===w.CollapseExpandDirection.Previous?r.collapsed:o.collapsed);let u=0;u=t===w.CollapseExpandDirection.Previous?d?l:a:d?a:l,this._updateItemData("collapsed",u,!d,!1)}_getResizeHandleLeftItem(e){let t=e.prev();for(;t.hasClass(E)||t.hasClass(f.RESIZE_HANDLE_CLASS);)t=t.prev();return t}_getResizeHandleRightItem(e){let t=e.next();for(;t.hasClass(E)||t.hasClass(f.RESIZE_HANDLE_CLASS);)t=t.next();return t}_getResizeHandlesSize(){return this._getResizeHandles().reduce(((e,t)=>e+t.getSize()),0)}_createItemByTemplate(e,t){const{itemData:i}=t;return i.splitter?(this._onItemTemplateRendered(e,t)(),e.source?e.source():(0,r.default)()):super._createItemByTemplate(e,t)}_postprocessRenderItem(e){const t=e.itemData.splitter;t&&this._pushItemToRenderQueue(e.itemContent,t)}_isHorizontalOrientation(){return this.option("orientation")===P}_toggleOrientationClass(){(0,r.default)(this.element()).toggleClass("dx-splitter-horizontal",this._isHorizontalOrientation()).toggleClass("dx-splitter-vertical",!this._isHorizontalOrientation())}_itemOptionChanged(e,t,i,n){switch(t){case"size":case"maxSize":case"minSize":case"collapsedSize":this._layout=this._getDefaultLayoutBasedOnSize(),this._applyStylesFromLayout(this.getLayout()),this._updateItemSizes();break;case"collapsed":this._itemCollapsedOptionChanged(e,i,n);break;case"resizable":this._updateResizeHandlesResizableState();break;case"collapsible":this._updateResizeHandlesCollapsibleState();break;case"visible":this._invalidate();break;default:super._itemOptionChanged(e,t,i,n)}}_itemCollapsedOptionChanged(e,t,i){if(Boolean(t)===Boolean(i))return;const n=this._getIndexByItem(e),o=(0,r.default)(this._itemElements()[n]),{items:a=[]}=this.option();if(!(0,p.isDefined)(this._activeResizeHandleIndex))if(t){const e=n>(0,y.findLastIndexOfNonCollapsedItem)(a);this._isLastVisibleItem(n)||e?this.handleCollapseEvent(this._getResizeHandleLeftItem(o),w.CollapseExpandDirection.Next,!!i):this.handleCollapseEvent(o,w.CollapseExpandDirection.Previous,!!i)}else{var s;const e=n>=(0,y.findLastIndexOfNonCollapsedItem)(a);this._isLastVisibleItem(n)||e||(null===(s=this._panesCacheSize[n])||void 0===s?void 0:s.direction)===w.CollapseExpandDirection.Previous?this.handleCollapseEvent(this._getResizeHandleLeftItem(o),w.CollapseExpandDirection.Previous,!!i):this.handleCollapseEvent(o,w.CollapseExpandDirection.Next,!!i)}this._updateItemsRestrictions();const l=this._getCollapseDelta(e,t);this._itemRestrictions.map((t=>(t.maxSize=void 0,t.resizable=void 0,e))),this._layout=(0,y.getNextLayout)(this.getLayout(),l,this._activeResizeHandleIndex,this._itemRestrictions),this._applyStylesFromLayout(this.getLayout()),this._updateItemSizes(),this._updateResizeHandlesResizableState(),this._updateResizeHandlesCollapsibleState(),this._fireCollapsedStateChanged(!t,o,this._savedCollapsingEvent),this._savedCollapsingEvent=void 0,this._collapseDirection=void 0,this._activeResizeHandleIndex=void 0}_calculateExpandToLeftSize(e){const{items:t=[]}=this.option();for(let i=e;i>=0;i-=1){const{collapsed:e,visible:n}=t[i];if(!0!==e&&!1!==n)return this.getLayout()[i]/2}return 0}_calculateExpandToRightSize(e){const{items:t=[]}=this.option();for(let i=e;i<=t.length-1;i+=1){const{collapsed:e,visible:n}=t[i];if(!0!==e&&!1!==n)return this.getLayout()[i]/2}return 0}_getCollapseDelta(e,t){const i=this._getIndexByItem(e),{collapsedSize:n=0,minSize:o=0,maxSize:a=100}=this._itemRestrictions[i],s=this.getLayout()[i];if(t){const e=n;s>e&&(this._panesCacheSize[i]={size:s,direction:this._collapseDirection===w.CollapseExpandDirection.Next?w.CollapseExpandDirection.Previous:w.CollapseExpandDirection.Next});return this._collapseDirection===w.CollapseExpandDirection.Previous?e-s:s-e}const r=this._panesCacheSize[i];this._panesCacheSize[i]=void 0;let l=0;l=r&&r.direction===this._collapseDirection?r.size-n:this._collapseDirection===w.CollapseExpandDirection.Previous?this._calculateExpandToLeftSize(i-1):this._calculateExpandToRightSize(i+1);let d=(0,x.compareNumbersWithPrecision)(l,o)<0?o:l;d=Math.min(a,d);return d*(this._collapseDirection===w.CollapseExpandDirection.Previous?-1:1)}_fireCollapsedStateChanged(e,t,i){const n=e?C.ITEM_EXPANDED_EVENT:C.ITEM_COLLAPSED_EVENT;this._itemEventHandler(t,n,{event:i})}_getDefaultLayoutBasedOnSize(){return this._updateItemsRestrictions(),(0,b.getDefaultLayout)(this._itemRestrictions)}_updateItemsRestrictions(){const{orientation:e,items:t=[]}=this.option(),i=this._getResizeHandlesSize(),n=(0,y.getElementSize)((0,r.default)(this.element()),e);this._itemRestrictions=[],t.forEach((e=>{this._itemRestrictions.push({resizable:!1!==e.resizable,visible:!1!==e.visible,collapsed:!0===e.collapsed,collapsedSize:(0,y.convertSizeToRatio)(e.collapsedSize,n,i),size:(0,y.convertSizeToRatio)(e.size,n,i),maxSize:(0,y.convertSizeToRatio)(e.maxSize,n,i),minSize:(0,y.convertSizeToRatio)(e.minSize,n,i)})}))}_applyStylesFromLayout(e){this._iterateItems(((t,i)=>{(0,y.setFlexProp)((0,r.default)(i)[0],T,e[t]);const n=this._getItemData(i),o=0===e[t]&&!1!==n.visible;(0,r.default)(i).toggleClass("dx-splitter-item-hidden-content",o)}))}_updateItemSizes(){this._iterateItems(((e,t)=>{this._updateItemData("size",e,this._getItemDimension(t))}))}_updateItemData(e,t,i){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const o=`items[${t}]`,a=this.option(o);(0,p.isObject)(a)?this._updateItemOption(`${o}.${e}`,i,n):this._updateItemOption(o,{text:a,[e]:i},n)}_updateItemOption(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2]?this._options.silent(e,t):this.option(e,t)}_iterateItems(e){this._itemElements().each(((t,i)=>(e(t,i),!0)))}_getResizeHandles(){const e=[];return this._iterateItems(((t,i)=>{const n=this._getItemInstance((0,r.default)(i)).getResizeHandle();n&&e.push(n)})),e}_getResizeHandleItems(){return(0,r.default)(this.element()).children(`.${f.RESIZE_HANDLE_CLASS}`)}_iterateResizeHandles(e){this._getResizeHandleItems().each(((t,i)=>(e((0,v.getComponentInstance)((0,r.default)(i))),!0)))}_dimensionChanged(){this._updateItemSizes(),this._layout=this._getDefaultLayoutBasedOnSize()}_optionChanged(e){const{name:t,value:i}=e;switch(t){case"width":case"height":super._optionChanged(e),this._dimensionChanged();break;case"allowKeyboardNavigation":this._iterateResizeHandles((e=>{e.option("focusStateEnabled",!!i)})),this._updateNestedSplitterOption(t,i);break;case"orientation":this._toggleOrientationClass(),this._updateResizeHandlesOption("direction",i);break;case"onResizeStart":case"onResizeEnd":case"onResize":case"onItemCollapsed":case"onItemExpanded":this._createEventAction(t),this._updateNestedSplitterOption(t,i);break;case"separatorSize":this._updateResizeHandlesOption(t,i),this._updateNestedSplitterOption(t,i);break;case"_renderQueue":this._invalidate();break;default:super._optionChanged(e)}}registerKeyHandler(e,t){(0,r.default)(this.element()).find(`.${f.RESIZE_HANDLE_CLASS}`).each(((i,n)=>((0,v.getComponentInstance)((0,r.default)(n)).registerKeyHandler(e,t),!0)))}getLayout(){return this._layout??[]}}k.ItemClass=m.default,(0,o.default)("dxSplitter",k);t.default=k},9492:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(19427)),o=r(i(64553)),a=r(i(85149)),s=r(i(4916));function r(e){return e&&e.__esModule?e:{default:e}}class l extends a.default{constructor(e,t,i){super(e,t,i),this._owner=t.owner}_renderResizeHandle(){var e;if(!1!==(null===(e=this._rawData)||void 0===e?void 0:e.visible)&&!this.isLast()){const e=`dx_${new n.default}`;this._setIdAttr(e);const t=this._owner._getResizeHandleConfig(e);this._resizeHandle=this._owner._createComponent((0,o.default)("<div>"),s.default,t),this._resizeHandle&&this._$element&&(0,o.default)(this._resizeHandle.element()).insertAfter(this._$element)}}_setIdAttr(e){var t;null===(t=this._$element)||void 0===t||t.attr("id",e)}getIndex(){return this._owner._getIndexByItemData(this._rawData)}getResizeHandle(){return this._resizeHandle}isLast(){return this._owner._isLastVisibleItem(this.getIndex())}}t.default=l},38674:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getComponentInstance=function(e){var t,i;const n=null===(t=e.data)||void 0===t?void 0:t.call(e,"dxComponents")[0];return n&&(null===(i=e.data)||void 0===i?void 0:i.call(e,`${n}`))}},58545:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RESIZE_EVENT=t.ITEM_EXPANDED_EVENT=t.ITEM_COLLAPSED_EVENT=t.COLLAPSE_EVENT=void 0,t.getActionNameByEventName=function(e){return`_${(0,n.camelize)(e.replace("on",""))}Action`};var n=i(53124);t.RESIZE_EVENT={onResize:"onResize",onResizeStart:"onResizeStart",onResizeEnd:"onResizeEnd"},t.COLLAPSE_EVENT={onCollapsePrev:"onCollapsePrev",onCollapseNext:"onCollapseNext"},t.ITEM_COLLAPSED_EVENT="onItemCollapsed",t.ITEM_EXPANDED_EVENT="onItemExpanded"},49291:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDelta=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return function(e,t,i){if(t===l.vertical)return e.y??0;return(i?-1:1)*(e.x??0)}(e,t,i)*n},t.convertSizeToRatio=function(e,t,i){const o=f(e,t);if(!(0,s.isDefined)(o))return;const a=function(e,t){if(0===e)return 0;const i=t/e*100;return i}(t-i,o);return parseFloat((0,n.toFixed)(a,r.PRECISION))},t.findIndexOfNextVisibleItem=function(e,t){for(let i=t+1;i<e.length;i+=1)if(!1!==e[i].visible)return i;return-1},t.findLastIndexOfNonCollapsedItem=function(e){for(let t=e.length-1;t>=0;t-=1)if(!0!==e[t].collapsed)return t;return-1},t.findLastIndexOfVisibleItem=function(e){for(let t=e.length-1;t>=0;t-=1)if(!1!==e[t].visible)return t;return-1},t.getElementSize=function(e,t){return t===l.horizontal?(0,o.getWidth)(e):(0,o.getHeight)(e)},t.getNextLayout=function(e,t,i,o){if(!(0,s.isDefined)(i))return e;const a=[...e],l=i+1;let d=t;let u=d<0?l:i;const p=h(d<0?1:-1,e,o,u,0),g=Math.min(Math.abs(d),Math.abs(p));let _=0;d=d<0?-g:g,u=d<0?i:l;for(;u>=0&&u<o.length;){const t=Math.abs(d)-Math.abs(_),i=e[u],s=i-t,l=c(o[u],s);if(0!==(0,r.compareNumbersWithPrecision)(i,l)&&(_+=i-l,a[u]=l,parseFloat((0,n.toFixed)(_,r.PRECISION))>=parseFloat((0,n.toFixed)(Math.abs(d),r.PRECISION))))break;d<0?u-=1:u+=1}if(0===(0,r.compareNumbersWithPrecision)(_,0))return e;let f=d<0?l:i,m=e[f],v=m+_,C=c(o[f],v);if(a[f]=C,!(0===(0,r.compareNumbersWithPrecision)(C,v))){let e=v-C;f=d<0?l:i;let t=f;for(;t>=0&&t<o.length&&(m=a[t],v=m+e,C=c(o[t],v),0!==(0,r.compareNumbersWithPrecision)(m,C)&&(e-=C-m,a[t]=C),0!==(0,r.compareNumbersWithPrecision)(e,0));)d>0?t-=1:t+=1}const y=a.reduce(((e,t)=>t+e),0);if(0!==(0,r.compareNumbersWithPrecision)(y,100,3))return e;return a},t.getVisibleItems=m,t.getVisibleItemsCount=function(e){return m(e).length},t.isElementVisible=function(e){var t;return!!e&&!!(e.offsetWidth||e.offsetHeight||null!==(t=e.getClientRects)&&void 0!==t&&t.call(e).length)},t.isPercentWidth=g,t.isPixelWidth=_,t.normalizePanelSize=c,t.setFlexProp=function(e,t,i){const n=(0,a.normalizeStyleProp)(t,i);e.style[(0,a.styleProp)(t)]=n},t.tryConvertToNumber=f;var n=i(57181),o=i(57653),a=i(58515),s=i(11528),r=i(94178);const l={horizontal:"horizontal",vertical:"vertical"},d="%",u="px";function c(e,t){const{minSize:i=0,maxSize:o=100,resizable:a,visible:l,collapsed:d,collapsedSize:u=0}=e;if(!1===l)return 0;if(!0===d)return u??0;if(!1===a&&(0,s.isDefined)(e.size))return e.size;let c=(0,r.compareNumbersWithPrecision)(t,i)<0?i:t;return c=Math.min(o,c),c=parseFloat((0,n.toFixed)(c,r.PRECISION)),c}function h(e,t,i,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(n<0||n>=i.length)return o;const a=t[n];return h(e,t,i,n+e,o+(c(i[n],100)-a))}function p(e,t){if(!(0,s.isString)(e))return!1;return new RegExp(`^\\d+(\\.\\d+)?${t}$`).test(e)}function g(e){return p(e,d)}function _(e){return"number"==typeof e?e>=0:p(e,u)}function f(e,t){if((0,s.isDefined)(e)){if((0,s.isNumeric)(e)&&e>=0)return Number(e);if((0,s.isString)(e)){if(g(e))return parseFloat(e)/100*t;if(_(e))return parseFloat(e.slice(0,-2))}}}function m(e){return e.filter((e=>!1!==e.visible))}},54285:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultLayout=function(e){let t=new Array(e.length).fill(null),i=0,r=100;e.forEach(((e,n)=>{const{size:a,visible:s,collapsed:l,collapsedSize:d=0}=e;if(!1===s)return i+=1,t[n]=0,void(r-=0);if(!0===l)return i+=1,t[n]=d,void(r-=d);if((0,o.isDefined)(a)){if(i+=1,r-a<0)return t[n]=r,void(r=0);t[n]=a,r-=a}}));let l=e.length-i;if(0===l)t[(0,a.findLastIndexOfVisibleItem)(e)]+=r,r=0;else if(e.forEach(((e,n)=>{null===t[n]&&((0,o.isDefined)(e.maxSize)&&1===l?(t[n]=r>e.maxSize?r:e.maxSize,r-=t[n],i+=1):(0,o.isDefined)(e.maxSize)&&e.maxSize<r/l&&(t[n]=e.maxSize,r-=e.maxSize,i+=1,l-=1))})),l=e.length-i,l>0){const e=r/l;t.forEach(((i,n)=>{null===i&&(t[n]=e)}))}if(t=t.map((e=>null===e?0:parseFloat((0,n.toFixed)(e,s.PRECISION)))),1===t.length)return t;let d=[...t];const u=d.reduce(((e,t)=>e+t),0);if(0!==(0,s.compareNumbersWithPrecision)(u,100))for(let t=0;t<e.length;t+=1){const e=100/u*d[t];d[t]=e}if(r=0,d=t.map(((t,i)=>{const n=e[i],o=(0,a.normalizePanelSize)(n,t);return r+=t-o,o})),0!==(0,s.compareNumbersWithPrecision)(r,0)){for(let t=0;t<d.length&&0!==(0,s.compareNumbersWithPrecision)(r,0);t+=1){const i=d[t],n=(0,a.normalizePanelSize)(e[t],i+r);r-=n-i,d[t]=n}if(r>0){const t=(0,a.findLastIndexOfVisibleItem)(e);!1===e[t].collapsed&&(d[t]+=r)}}return d};var n=i(57181),o=i(11528),a=i(49291),s=i(94178)},94178:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PRECISION=void 0,t.compareNumbersWithPrecision=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;const a=parseFloat((0,n.toFixed)(e,i))-parseFloat((0,n.toFixed)(t,i));if(0===a)return 0;return a>0?1:-1};var n=i(57181);const o=t.PRECISION=10},49624:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.CollapseExpandDirection=void 0,function(e){e.Previous="prev",e.Next="next"}(i||(t.CollapseExpandDirection=i={}))},94599:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=i(17781),a=(n=i(85149))&&n.__esModule?n:{default:n};class s extends a.default{_renderWatchers(){return this._startWatcher("badge",o.noop),super._renderWatchers()}}t.default=s},1664:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=m(i(92848)),o=m(i(65951)),a=m(i(64960)),s=i(61404),r=m(i(64553)),l=i(27286),d=i(52576),u=i(69629),c=i(11528),h=m(i(24150)),p=m(i(94385)),g=i(52071),_=m(i(85991)),f=m(i(94599));function m(e){return e&&e.__esModule?e:{default:e}}const v={top:"dx-tabpanel-tabs-position-top",right:"dx-tabpanel-tabs-position-right",bottom:"dx-tabpanel-tabs-position-bottom",left:"dx-tabpanel-tabs-position-left"},C={top:"top",right:"right",bottom:"bottom",left:"left"},y={top:"bottom",right:"left",bottom:"top",left:"right"},b="horizontal",x="vertical",w="top",S="start",D="primary",I="secondary",E=h.default.inherit({_getDefaultOptions(){return(0,d.extend)(this.callBase(),{itemTitleTemplate:"title",hoverStateEnabled:!0,selectOnFocus:!1,showNavButtons:!1,scrollByContent:!0,scrollingEnabled:!0,tabsPosition:C.top,iconPosition:S,stylingMode:D,onTitleClick:null,onTitleHold:null,onTitleRendered:null,badgeExpr:e=>e?e.badge:void 0,_tabsIndicatorPosition:null})},_defaultOptionsRules(){const e=(0,g.current)();return this.callBase().concat([{device:()=>"desktop"===o.default.real().deviceType&&!o.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>!_.default.touch,options:{swipeEnabled:!1}},{device:{platform:"generic"},options:{animationEnabled:!1}},{device:()=>(0,g.isFluent)(e),options:{stylingMode:I}},{device:()=>(0,g.isMaterialBased)(e),options:{iconPosition:w}}])},_init(){this.callBase(),this.$element().addClass("dx-tabpanel"),this._toggleTabPanelTabsPositionClass()},_getElementAria:()=>({role:"tabpanel"}),_getItemAria:()=>({role:"tabpanel"}),_initMarkup(){this.callBase(),this._createTitleActions(),this._renderLayout()},_prepareTabsItemTemplate(e,t){const i=(0,u.getImageContainer)(null==e?void 0:e.icon);i&&t.append(i);const n=(0,c.isPlainObject)(e)?null==e?void 0:e.title:e;if((0,c.isDefined)(n)&&!(0,c.isPlainObject)(n)){const e=(0,r.default)("<span>").addClass("dx-tab-text-span");e.append(a.default.createTextNode(n));const i=(0,r.default)("<span>").addClass("dx-tab-text-span-pseudo");i.append(a.default.createTextNode(n)),i.appendTo(e),e.appendTo(t)}},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({title:new l.BindableTemplate(((e,t)=>{this._prepareTabsItemTemplate(t,e);const i=(0,r.default)("<div>").addClass("dx-tab-text");e.wrapInner(i)}),["title","icon"],this.option("integrationOptions.watchMethod"))})},_createTitleActions(){this._createTitleClickAction(),this._createTitleHoldAction(),this._createTitleRenderedAction()},_createTitleClickAction(){this._titleClickAction=this._createActionByOption("onTitleClick")},_createTitleHoldAction(){this._titleHoldAction=this._createActionByOption("onTitleHold")},_createTitleRenderedAction(){this._titleRenderedAction=this._createActionByOption("onTitleRendered")},_renderLayout(){if(this._tabs)return;const e=this.$element();this._$tabContainer=(0,r.default)("<div>").addClass("dx-tabpanel-tabs").appendTo(e);const t=(0,r.default)("<div>").appendTo(this._$tabContainer);this._tabs=this._createComponent(t,p.default,this._tabConfig()),this._$container=(0,r.default)("<div>").addClass("dx-tabpanel-container").appendTo(e),this._$container.append(this._$wrapper)},_refreshActiveDescendant(){if(!this._tabs)return;const e=this._tabs,t=e.itemElements(),i=(0,r.default)(t[e.option("selectedIndex")]),n=this.getFocusedItemId();this.setAria("controls",void 0,(0,r.default)(t)),this.setAria("controls",n,i)},_getTabsIndicatorPosition(){const{_tabsIndicatorPosition:e,tabsPosition:t}=this.option();return e??y[t]},_tabConfig(){const e=this._getTabsIndicatorPosition();return{selectOnFocus:!0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),repaintChangesOnly:this.option("repaintChangesOnly"),tabIndex:this.option("tabIndex"),selectedIndex:this.option("selectedIndex"),badgeExpr:this.option("badgeExpr"),onItemClick:this._titleClickAction.bind(this),onItemHold:this._titleHoldAction.bind(this),itemHoldTimeout:this.option("itemHoldTimeout"),onSelectionChanging:e=>{const t=e.addedItems[0],i=this._getIndexByItemData(t),n=this.selectItem(i),o=n.state();e.cancel="pending"===o?new Promise((e=>{n.done((()=>{e(!1)})).fail((()=>{e(!0)}))})):"rejected"===o},onSelectionChanged:()=>{this._refreshActiveDescendant()},onItemRendered:this._titleRenderedAction.bind(this),itemTemplate:this._getTemplateByOption("itemTitleTemplate"),items:this.option("items"),noDataText:null,scrollingEnabled:this.option("scrollingEnabled"),scrollByContent:this.option("scrollByContent"),showNavButtons:this.option("showNavButtons"),itemTemplateProperty:"tabTemplate",loopItemFocus:this.option("loop"),selectionRequired:!0,onOptionChanged:function(e){if("focusedElement"===e.name)if(e.value){const t=(0,r.default)(e.value),i=this._itemElements().eq(t.index());this.option("focusedElement",(0,s.getPublicElement)(i))}else this.option("focusedElement",e.value)}.bind(this),onFocusIn:function(e){this._focusInHandler(e.event)}.bind(this),onFocusOut:function(e){this._isFocusOutHandlerExecuting||this._focusOutHandler(e.event)}.bind(this),orientation:this._getTabsOrientation(),iconPosition:this.option("iconPosition"),stylingMode:this.option("stylingMode"),_itemAttributes:{class:"dx-tabpanel-tab"},_indicatorPosition:e}},_renderFocusTarget(){this._focusTarget().attr("tabIndex",-1)},_getTabsOrientation(){const{tabsPosition:e}=this.option();return[C.right,C.left].includes(e)?x:b},_getTabPanelTabsPositionClass(){switch(this.option("tabsPosition")){case C.right:return v.right;case C.bottom:return v.bottom;case C.left:return v.left;case C.top:default:return v.top}},_toggleTabPanelTabsPositionClass(){for(const e in v)this.$element().removeClass(v[e]);const e=this._getTabPanelTabsPositionClass();this.$element().addClass(e)},_updateTabsOrientation(){const e=this._getTabsOrientation();this._setTabsOption("orientation",e)},_toggleWrapperFocusedClass(e){this._toggleFocusClass(e,this._$wrapper)},_toggleDisabledFocusedClass(e){this._focusTarget().toggleClass("dx-disabled-focused-tab",e)},_updateFocusState(e,t){this.callBase(e,t);const i=e.target===this._tabs._focusTarget().get(0),n=e.target===this._focusTarget().get(0);if(i&&this._toggleFocusClass(t,this._focusTarget()),i||n){const e=this._isDisabled(this.option("focusedElement"));this._toggleWrapperFocusedClass(t&&!e),this._toggleDisabledFocusedClass(t&&e)}n&&(this._toggleFocusClass(t,this._tabs.$element()),this._toggleFocusClass(t,this._tabs.option("focusedElement")))},_focusOutHandler(e){this._isFocusOutHandlerExecuting=!0,this.callBase.apply(this,arguments),this._tabs._focusOutHandler(e),this._isFocusOutHandlerExecuting=!1},_setTabsOption(e,t){this._tabs&&this._tabs.option(e,t)},_postprocessSwipe(e){let{swipedTabsIndex:t}=e;this._setTabsOption("selectedIndex",t)},_visibilityChanged(e){e&&this._tabs._dimensionChanged()},registerKeyHandler(e,t){this.callBase(e,t),this._tabs&&this._tabs.registerKeyHandler(e,t)},repaint(){this.callBase(),this._tabs.repaint()},_updateTabsIndicatorPosition(){const e=this._getTabsIndicatorPosition();this._setTabsOption("_indicatorPosition",e)},_optionChanged(e){const{name:t,value:i,fullName:n}=e;switch(t){case"dataSource":default:this.callBase(e);break;case"items":this._setTabsOption(t,this.option(t)),this.option("repaintChangesOnly")||this._tabs.repaint(),this.callBase(e);break;case"width":this.callBase(e),this._tabs.repaint();break;case"selectedIndex":case"selectedItem":if(this._setTabsOption(n,i),this.callBase(e),!0===this.option("focusStateEnabled")){const e=this.option("selectedIndex"),t=this._itemElements().eq(e);this.option("focusedElement",(0,s.getPublicElement)(t))}break;case"itemHoldTimeout":case"focusStateEnabled":case"hoverStateEnabled":this._setTabsOption(n,i),this.callBase(e);break;case"scrollingEnabled":case"scrollByContent":case"showNavButtons":this._setTabsOption(n,i);break;case"focusedElement":{const t=i?(0,r.default)(i).index():i,n=i&&this._tabs?this._tabs._itemElements().eq(t):i;if(this._setTabsOption("focusedElement",(0,s.getPublicElement)(n)),i){const e=this._isDisabled(i);this._toggleWrapperFocusedClass(!e),this._toggleDisabledFocusedClass(e)}this.callBase(e);break}case"itemTitleTemplate":this._setTabsOption("itemTemplate",this._getTemplateByOption("itemTitleTemplate"));break;case"onTitleClick":this._createTitleClickAction(),this._setTabsOption("onItemClick",this._titleClickAction.bind(this));break;case"onTitleHold":this._createTitleHoldAction(),this._setTabsOption("onItemHold",this._titleHoldAction.bind(this));break;case"onTitleRendered":this._createTitleRenderedAction(),this._setTabsOption("onItemRendered",this._titleRenderedAction.bind(this));break;case"loop":this._setTabsOption("loopItemFocus",i),this.callBase(e);break;case"badgeExpr":this._invalidate();break;case"tabsPosition":this._toggleTabPanelTabsPositionClass(),this._updateTabsIndicatorPosition(),this._updateTabsOrientation();break;case"iconPosition":this._setTabsOption("iconPosition",i);break;case"stylingMode":this._setTabsOption("stylingMode",i);break;case"_tabsIndicatorPosition":this._setTabsOption("_indicatorPosition",i)}}});E.ItemClass=f.default,(0,n.default)("dxTabPanel",E);t.default=E},20425:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TABS_EXPANDED_CLASS=void 0;t.TABS_EXPANDED_CLASS="dx-tabs-expanded"},47637:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(i(64553)),o=a(i(85149));function a(e){return e&&e.__esModule?e:{default:e}}const s="dx-badge",r=o.default.inherit({_renderWatchers(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this))},_renderBadge(e){if(this._$element.children(`.${s}`).remove(),!e)return;const t=(0,n.default)("<div>").addClass("dx-tabs-item-badge").addClass(s).text(e);this._$element.append(t)}});t.default=r},11474:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=I(i(92774)),o=I(i(68095)),a=I(i(89797)),s=i(98834),r=I(i(92848)),l=I(i(65951)),d=I(i(64553)),u=i(27286),c=i(52576),h=i(69629),p=i(21274),g=i(57653),_=i(11528),f=i(3104),m=I(i(64973)),v=I(i(55213)),C=I(i(20876)),y=i(52071),b=i(63322),x=i(78955),w=i(43200),S=i(20425),D=I(i(47637));function I(e){return e&&e.__esModule?e:{default:e}}const E="dx-tabs-stretched",T="dx-tabs-nav-buttons",A="dx-overflow-hidden",O="dx-tab",P="dx-state-disabled",k="dx-focused-disabled-next-tab",M="dx-focused-disabled-prev-tab",R="dx-tabs-vertical",L="dx-tabs-horizontal",B={top:"dx-tab-indicator-position-top",right:"dx-tab-indicator-position-right",bottom:"dx-tab-indicator-position-bottom",left:"dx-tab-indicator-position-left"},V={top:"dx-tabs-icon-position-top",end:"dx-tabs-icon-position-end",bottom:"dx-tabs-icon-position-bottom",start:"dx-tabs-icon-position-start"},F={primary:"dx-tabs-styling-mode-primary",secondary:"dx-tabs-styling-mode-secondary"},H="chevronnext",N="chevronprev",z="horizontal",W="vertical",$="right",G="bottom",j="left",U="horizontal",K="vertical",Z="top",q="end",Y="bottom",X="start",Q="primary",J="secondary",ee=v.default.inherit({_activeStateUnit:`.${O}`,_getDefaultOptions(){return(0,c.extend)(this.callBase(),{hoverStateEnabled:!0,showNavButtons:!0,scrollByContent:!0,scrollingEnabled:!0,selectionMode:"single",orientation:z,iconPosition:X,stylingMode:Q,activeStateEnabled:!0,selectionRequired:!1,selectOnFocus:!0,loopItemFocus:!1,useInkRipple:!1,badgeExpr:e=>e?e.badge:void 0,_itemAttributes:{role:"tab"},_indicatorPosition:null})},_defaultOptionsRules(){const e=(0,y.current)();return this.callBase().concat([{device:()=>"desktop"!==l.default.real().deviceType,options:{showNavButtons:!1}},{device:{deviceType:"desktop"},options:{scrollByContent:!1}},{device:()=>"desktop"===l.default.real().deviceType&&!l.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,y.isFluent)(e),options:{iconPosition:Z,stylingMode:J}},{device:()=>(0,y.isMaterial)(e),options:{useInkRipple:!0,selectOnFocus:!1,iconPosition:Z}}])},_init(){const{orientation:e,stylingMode:t,scrollingEnabled:i}=this.option(),n=this._getIndicatorPosition();this.callBase(),this.setAria("role","tablist"),this.$element().addClass("dx-tabs"),this._toggleScrollingEnabledClass(i),this._toggleOrientationClass(e),this._toggleIndicatorPositionClass(n),this._toggleIconPositionClass(),this._toggleStylingModeClass(t),this._renderWrapper(),this._renderMultiple(),this._feedbackHideTimeout=100},_prepareDefaultItemTemplate(e,t){const i=(0,_.isPlainObject)(e)?null==e?void 0:e.text:e;if((0,_.isDefined)(i)){const e=(0,d.default)("<span>").addClass("dx-tab-text-span");e.text(i);const n=(0,d.default)("<span>").addClass("dx-tab-text-span-pseudo");n.text(i),n.appendTo(e),e.appendTo(t)}(0,_.isDefined)(e.html)&&t.html(e.html)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new u.BindableTemplate(((e,t)=>{this._prepareDefaultItemTemplate(t,e);const i=(0,h.getImageContainer)(t.icon);i&&i.prependTo(e);const n=(0,d.default)("<div>").addClass("dx-tab-text");e.wrapInner(n)}),["text","html","icon"],this.option("integrationOptions.watchMethod"))})},_createItemByTemplate:function(e,t){const{itemData:i,container:n,index:o}=t;return e.render({model:i,container:n,index:o,onRendered:this._onItemTemplateRendered(e,t)})},_itemClass:()=>O,_selectedItemClass:()=>"dx-tab-selected",_itemDataKey:()=>"dxTabData",_initMarkup(){this.callBase(),this.option("useInkRipple")&&this._renderInkRipple(),this.$element().addClass(A)},_postProcessRenderItems(){this._renderScrolling()},_renderScrolling(){const e=[E,S.TABS_EXPANDED_CLASS,A];if(this.$element().removeClass(e.join(" ")),this.option("scrollingEnabled")&&this._isItemsSizeExceeded()){this._scrollable||(this._renderScrollable(),this._renderNavButtons());const e=this.getScrollable();if(e.update(),this.option("rtlEnabled")){const t=(0,w.getScrollLeftMax)((0,d.default)(this.getScrollable().container()).get(0));e.scrollTo({left:t})}this._updateNavButtonsState(),this._scrollToItem(this.option("selectedItem"))}this.option("scrollingEnabled")&&this._isItemsSizeExceeded()||(this._cleanScrolling(),this._needStretchItems()&&this.$element().addClass(E),this.$element().removeClass(T).addClass(S.TABS_EXPANDED_CLASS))},_isVertical(){return this.option("orientation")===W},_isItemsSizeExceeded(){return this._isVertical()?this._isItemsHeightExceeded():this._isItemsWidthExceeded()},_isItemsWidthExceeded(){const e=this._getVisibleItems(),t=this._getSummaryItemsSize("width",e,!0),i=(0,g.getWidth)(this.$element());if([t,i].includes(0))return!1;return t>i-1},_isItemsHeightExceeded(){const e=this._getVisibleItems();return this._getSummaryItemsSize("height",e,!0)-1>(0,g.getHeight)(this.$element())},_needStretchItems(){const e=this._getVisibleItems(),t=(0,g.getWidth)(this.$element()),i=[];(0,p.each)(e,((e,t)=>{i.push((0,g.getOuterWidth)(t,!0))}));return Math.max.apply(null,i)>t/e.length+1},_cleanNavButtons(){this._leftButton&&this._rightButton&&(this._leftButton.$element().remove(),this._rightButton.$element().remove(),this._leftButton=null,this._rightButton=null)},_cleanScrolling(){this._scrollable&&(this._$wrapper.appendTo(this.$element()),this._scrollable.$element().remove(),this._scrollable=null,this._cleanNavButtons())},_renderInkRipple(){this._inkRipple=(0,b.render)()},_getPointerEvent:()=>a.default.up,_toggleActiveState(e,t,i){if(this.callBase.apply(this,arguments),!this._inkRipple)return;const n={element:e,event:i};t?this._inkRipple.showWave(n):this._inkRipple.hideWave(n)},_renderMultiple(){"multiple"===this.option("selectionMode")&&this.option("selectOnFocus",!1)},_renderWrapper(){this._$wrapper=(0,d.default)("<div>").addClass("dx-tabs-wrapper"),this.$element().append(this._$wrapper)},_itemContainer(){return this._$wrapper},_getScrollableDirection(){return this._isVertical()?K:U},_updateScrollable(){this.getScrollable()&&this._cleanScrolling(),this._renderScrolling()},_renderScrollable(){const e=this.$element().wrapInner((0,d.default)("<div>").addClass("dx-tabs-scrollable")).children();this._scrollable=this._createComponent(e,C.default,{direction:this._getScrollableDirection(),showScrollbar:"never",useKeyboard:!1,useNative:!1,scrollByContent:this.option("scrollByContent"),onScroll:()=>{this._updateNavButtonsState()}}),this.$element().append(this._scrollable.$element())},_scrollToItem(e){if(!this._scrollable)return;const t=this._editStrategy.getItemElement(e);this._scrollable.scrollToElement(t)},_renderNavButtons(){const{showNavButtons:e,rtlEnabled:t}=this.option();if(this.$element().toggleClass(T,e),!e)return;this._leftButton=this._createNavButton(-30,t?H:N);const i=this._leftButton.$element();i.addClass("dx-tabs-nav-button-left"),this.$element().prepend(i),this._rightButton=this._createNavButton(30,t?N:H);const n=this._rightButton.$element();n.addClass("dx-tabs-nav-button-right"),this.$element().append(n)},_updateNavButtonsAriaDisabled(){[this._leftButton,this._rightButton].forEach((e=>{null==e||e.$element().attr({"aria-disabled":null})}))},_updateNavButtonsState(){const e=this._isVertical(),t=this.getScrollable();var i,n,o,a;e?(null===(i=this._leftButton)||void 0===i||i.option("disabled",(0,x.isReachedTop)(t.scrollTop(),1)),null===(n=this._rightButton)||void 0===n||n.option("disabled",(0,x.isReachedBottom)((0,d.default)(t.container()).get(0),t.scrollTop(),0,1))):(null===(o=this._leftButton)||void 0===o||o.option("disabled",(0,x.isReachedLeft)(t.scrollLeft(),1)),null===(a=this._rightButton)||void 0===a||a.option("disabled",(0,x.isReachedRight)((0,d.default)(t.container()).get(0),t.scrollLeft(),1)));this._updateNavButtonsAriaDisabled()},_updateScrollPosition(e,t){this._scrollable.update(),this._scrollable.scrollBy(e/t)},_createNavButton(e,t){const i=this._createAction((()=>{this._holdInterval=setInterval((()=>{this._updateScrollPosition(e,5)}),5)})),r=(0,s.addNamespace)(o.default.name,"dxNavButton"),l=(0,s.addNamespace)(a.default.up,"dxNavButton"),u=(0,s.addNamespace)(a.default.out,"dxNavButton"),c=this._createComponent((0,d.default)("<div>").addClass("dx-tabs-nav-button"),m.default,{focusStateEnabled:!1,icon:t,integrationOptions:{},elementAttr:{role:null,"aria-label":null,"aria-disabled":null},onClick:()=>{this._updateScrollPosition(e,1)}}),h=c.$element();return n.default.on(h,r,{timeout:300},(e=>{i({event:e})})),n.default.on(h,l,(()=>{this._clearInterval()})),n.default.on(h,u,(()=>{this._clearInterval()})),c},_clearInterval(){this._holdInterval&&clearInterval(this._holdInterval)},_updateSelection(e){this._scrollable&&this._scrollable.scrollToElement(this.itemElements().eq(e[0]))},_visibilityChanged(e){e&&this._dimensionChanged()},_dimensionChanged(){this._renderScrolling()},_itemSelectHandler(e){"single"===this.option("selectionMode")&&this.isItemSelected(e.currentTarget)||this.callBase(e)},_clean(){this._cleanScrolling(),this.callBase()},_toggleTabsVerticalClass(e){this.$element().toggleClass(R,e)},_toggleTabsHorizontalClass(e){this.$element().toggleClass(L,e)},_getIndicatorPositionClass:e=>B[e],_getIndicatorPosition(){const{_indicatorPosition:e,rtlEnabled:t}=this.option();if(e)return e;const i=this._isVertical();return t?i?j:G:i?$:G},_toggleIndicatorPositionClass(e){const t=this._getIndicatorPositionClass(e);this._toggleElementClasses(B,t)},_toggleScrollingEnabledClass(e){this.$element().toggleClass("dx-tabs-scrolling-enabled",Boolean(e))},_toggleOrientationClass(e){const t=e===W;this._toggleTabsVerticalClass(t),this._toggleTabsHorizontalClass(!t)},_getTabsIconPositionClass(){switch(this.option("iconPosition")){case Z:return V.top;case q:return V.end;case Y:return V.bottom;default:return V.start}},_toggleIconPositionClass(){const e=this._getTabsIconPositionClass();this._toggleElementClasses(V,e)},_toggleStylingModeClass(e){const t=F[e]??F.primary;this._toggleElementClasses(F,t)},_toggleElementClasses(e,t){for(const t in e)this.$element().removeClass(e[t]);this.$element().addClass(t)},_toggleFocusedDisabledNextClass(e,t){this._itemElements().eq(e).toggleClass(k,t)},_toggleFocusedDisabledPrevClass(e,t){this._itemElements().eq(e).toggleClass(M,t)},_toggleFocusedDisabledClasses(e){const{selectedIndex:t}=this.option();this._itemElements().removeClass(k).removeClass(M);const i=t-1,n=t+1,o=(0,d.default)(e).index(),a=this._itemElements().eq(n).hasClass(P)&&o===n,s=this._itemElements().eq(i).hasClass(P)&&o===i;this._toggleFocusedDisabledNextClass(t,a),this._toggleFocusedDisabledPrevClass(t,s)},_updateFocusedElement(){const{focusStateEnabled:e,selectedIndex:t}=this.option(),i=this._itemElements();if(e&&i.length){const e=i.get(t);this.option({focusedElement:e})}},_optionChanged(e){switch(e.name){case"useInkRipple":case"scrollingEnabled":this._toggleScrollingEnabledClass(e.value),this._invalidate();break;case"showNavButtons":case"badgeExpr":this._invalidate();break;case"scrollByContent":this._scrollable&&this._scrollable.option(e.name,e.value);break;case"width":case"height":this.callBase(e),this._dimensionChanged();break;case"selectionMode":this._renderMultiple(),this.callBase(e);break;case"focusedElement":this._toggleFocusedDisabledClasses(e.value),this.callBase(e),this._scrollToItem(e.value);break;case"rtlEnabled":{this.callBase(e);const t=this._getIndicatorPosition();this._toggleIndicatorPositionClass(t);break}case"orientation":{this._toggleOrientationClass(e.value);const t=this._getIndicatorPosition();this._toggleIndicatorPositionClass(t),(0,f.hasWindow)()&&this._updateScrollable();break}case"iconPosition":this._toggleIconPositionClass(),(0,f.hasWindow)()&&this._dimensionChanged();break;case"stylingMode":this._toggleStylingModeClass(e.value),(0,f.hasWindow)()&&this._dimensionChanged();break;case"_indicatorPosition":this._toggleIndicatorPositionClass(e.value);break;case"selectedIndex":case"selectedItem":case"selectedItems":this.callBase(e),this._updateFocusedElement();break;default:this.callBase(e)}},_afterItemElementInserted(){this.callBase(),this._planPostRenderActions()},_afterItemElementDeleted(e,t){this.callBase(e,t),this._renderScrolling()},getScrollable(){return this._scrollable}});ee.ItemClass=D.default,(0,r.default)("dxTabs",ee);t.default=ee},85968:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(98834),o=u(i(92848)),a=u(i(64553)),s=i(52576),r=i(57653),l=i(3104),d=u(i(37932));function u(e){return e&&e.__esModule?e:{default:e}}const c=(0,l.getWindow)(),h=["backspace","tab","enter","pageUp","pageDown","end","home","leftArrow","rightArrow","downArrow","upArrow","del"],p="dx-searchbox",g=d.default.inherit({ctor(e,t){t&&(this._showClearButton=t.showClearButton),this.callBase.apply(this,arguments)},_getDefaultOptions(){return(0,s.extend)(this.callBase(),{value:"",mode:"text",maxLength:null})},_initMarkup(){this.$element().addClass("dx-textbox"),this.callBase(),this.setAria("role","textbox")},_renderInputType(){this.callBase(),this._renderSearchMode()},_useTemplates:()=>!1,_renderProps(){this.callBase(),this._toggleMaxLengthProp()},_toggleMaxLengthProp(){const e=this._getMaxLength();e&&e>0?this._input().attr("maxLength",e):this._input().removeAttr("maxLength")},_renderSearchMode(){const e=this._$element;"search"===this.option("mode")?(e.addClass(p),this._renderSearchIcon(),void 0===this._showClearButton&&(this._showClearButton=this.option("showClearButton"),this.option("showClearButton",!0))):(e.removeClass(p),this._$searchIcon&&this._$searchIcon.remove(),this.option("showClearButton",void 0===this._showClearButton?this.option("showClearButton"):this._showClearButton),delete this._showClearButton)},_renderSearchIcon(){const e=(0,a.default)("<div>").addClass("dx-icon").addClass("dx-icon-search");e.prependTo(this._input().parent()),this._$searchIcon=e},_getLabelContainerWidth(){if(this._$searchIcon){const e=this._input().parent();return(0,r.getWidth)(e)-this._getLabelBeforeWidth()}return this.callBase()},_getLabelBeforeWidth(){let e=this.callBase();return this._$searchIcon&&(e+=(0,r.getOuterWidth)(this._$searchIcon)),e},_optionChanged(e){switch(e.name){case"maxLength":this._toggleMaxLengthProp();break;case"mode":this.callBase(e),this._updateLabelWidth();break;case"mask":this.callBase(e),this._toggleMaxLengthProp();break;default:this.callBase(e)}},_onKeyDownCutOffHandler(e){const t=this._getMaxLength();if(t&&!e.ctrlKey&&!this._hasSelection()){const i=(0,a.default)(e.target),o=(0,n.normalizeKeyName)(e);return this._cutOffExtraChar(i),i.val().length<t||h.includes(o)||""!==c.getSelection().toString()}return!0},_onChangeCutOffHandler(e){const t=(0,a.default)(e.target);this.option("maxLength")&&this._cutOffExtraChar(t)},_cutOffExtraChar(e){const t=this._getMaxLength(),i=e.val();t&&i.length>t&&e.val(i.substr(0,t))},_getMaxLength(){return!!this.option("mask")?null:this.option("maxLength")}});(0,o.default)("dxTextBox",g);t.default=g},34705:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=D(i(92774)),o=D(i(89797)),a=i(98834),s=D(i(66636)),r=D(i(65951)),l=D(i(64960)),d=D(i(19427)),u=D(i(64553)),c=D(i(11787)),h=i(87739),p=i(52576),g=i(21274),_=i(57653),f=i(11528),m=D(i(78694)),v=D(i(11979)),C=i(52071),y=i(35944),b=D(i(35185)),x=D(i(90987)),w=i(50640),S=D(i(79686));function D(e){return e&&e.__esModule?e:{default:e}}const I="dx-texteditor-input",E=`.${I}`,T="dx-placeholder",A="dx-validation-pending",O=["KeyDown","KeyPress","KeyUp","Change","Cut","Copy","Paste","Input"],P=["tab","enter","shift","control","alt","escape","pageUp","pageDown","end","home","leftArrow","upArrow","rightArrow","downArrow"];let k=w.TextEditorLabel;function M(e){if((0,f.isDefined)(e)&&!Array.isArray(e))throw b.default.Error("E1053")}const R=m.default.inherit({ctor(e,t){t&&M(t.buttons),this._buttonCollection=new S.default(this,this._getDefaultButtons()),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._labelContainerElement=null,this.callBase.apply(this,arguments)},_getDefaultOptions(){return(0,p.extend)(this.callBase(),{buttons:void 0,value:"",spellcheck:!1,showClearButton:!1,valueChangeEvent:"change",placeholder:"",inputAttr:{},onFocusIn:null,onFocusOut:null,onKeyDown:null,onKeyUp:null,onChange:null,onInput:null,onCut:null,onCopy:null,onPaste:null,onEnterKey:null,mode:"text",hoverStateEnabled:!0,focusStateEnabled:!0,text:void 0,displayValueFormatter:e=>(0,f.isDefined)(e)&&!1!==e?e:"",stylingMode:(0,s.default)().editorStylingMode||"outlined",showValidationMark:!0,label:"",labelMode:"static",labelMark:""})},_defaultOptionsRules(){return this.callBase().concat([{device(){const e=(0,C.current)();return(0,C.isMaterial)(e)},options:{labelMode:"floating",stylingMode:(0,s.default)().editorStylingMode||"filled"}},{device(){const e=(0,C.current)();return(0,C.isFluent)(e)},options:{labelMode:"outside"}}])},_getDefaultButtons:()=>[{name:"clear",Ctor:x.default}],_isClearButtonVisible(){return this.option("showClearButton")&&!this.option("readOnly")},_input(){return this.$element().find(E).first()},_isFocused(){return(0,y.focused)(this._input())||this.callBase()},_inputWrapper(){return this.$element()},_buttonsContainer(){return this._inputWrapper().find(".dx-texteditor-buttons-container").eq(0)},_isControlKey:e=>P.includes(e),_renderStylingMode(){this.callBase(),this._updateButtonsStyling(this.option("stylingMode"))},_initMarkup(){this.$element().addClass("dx-texteditor"),this._renderInput(),this._renderButtonContainers(),this._renderStylingMode(),this._renderInputType(),this._renderPlaceholder(),this._renderProps(),this.callBase(),this._renderValue(),this._renderLabel()},_render(){this.callBase(),this._refreshValueChangeEvent(),this._refreshEvents(),this._renderEnterKeyAction(),this._renderEmptinessEvent()},_renderInput(){this._$textEditorContainer=(0,u.default)("<div>").addClass("dx-texteditor-container").appendTo(this.$element()),this._$textEditorInputContainer=(0,u.default)("<div>").addClass("dx-texteditor-input-container").appendTo(this._$textEditorContainer),this._$textEditorInputContainer.append(this._createInput())},_getInputContainer(){return this._$textEditorInputContainer},_renderPendingIndicator(){this.$element().addClass(A);const e=this._getInputContainer(),t=(0,u.default)("<div>").addClass("dx-pending-indicator").appendTo(e);this._pendingIndicator=this._createComponent(t,v.default)},_disposePendingIndicator(){this._pendingIndicator&&(this._pendingIndicator.dispose(),this._pendingIndicator.$element().remove(),this._pendingIndicator=null,this.$element().removeClass(A))},_renderValidationState(){this.callBase();"pending"===this.option("validationStatus")?(!this._pendingIndicator&&this._renderPendingIndicator(),this._showValidMark=!1):("invalid"===this.option("validationStatus")&&(this._showValidMark=!1),this._showValidMark||!0!==this.option("showValidationMark")||(this._showValidMark="valid"===this.option("validationStatus")&&!!this._pendingIndicator),this._disposePendingIndicator()),this._toggleValidMark()},_getButtonsContainer(){return this._$textEditorContainer},_renderButtonContainers(){const e=this.option("buttons"),t=this._getButtonsContainer();this._$beforeButtonsContainer=this._buttonCollection.renderBeforeButtons(e,t),this._$afterButtonsContainer=this._buttonCollection.renderAfterButtons(e,t)},_cleanButtonContainers(){var e,t;null===(e=this._$beforeButtonsContainer)||void 0===e||e.remove(),null===(t=this._$afterButtonsContainer)||void 0===t||t.remove(),this._buttonCollection.clean()},_clean(){this._buttonCollection.clean(),this._disposePendingIndicator(),this._unobserveLabelContainerResize(),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._$textEditorContainer=null,this.callBase()},_createInput(){const e=(0,u.default)("<input>");return this._applyInputAttributes(e,this.option("inputAttr")),e},_setSubmitElementName(e){const t=this.option("inputAttr.name");return this.callBase(e||t||"")},_applyInputAttributes(e,t){const i=(0,p.extend)(this._getDefaultAttributes(),t);e.attr(i).addClass(I),this._setInputMinHeight(e)},_setInputMinHeight(e){e.css("minHeight",this.option("height")?"0":"")},_getPlaceholderAttr(){const{ios:e,mac:t}=r.default.real(),{placeholder:i}=this.option();return i||(e||t?" ":null)},_getDefaultAttributes(){return{autocomplete:"off",placeholder:this._getPlaceholderAttr()}},_updateButtons(e){this._buttonCollection.updateButtons(e)},_updateButtonsStyling(e){(0,g.each)(this.option("buttons"),((t,i)=>{let{options:n,name:o}=i;if(n&&!n.stylingMode&&this.option("visible")){const t=this.getButton(o);t.option&&t.option("stylingMode","underlined"===e?"text":"contained")}}))},_renderValue(){return this._renderInputValue().promise()},_renderInputValue(e){e=e??this.option("value");let t=this.option("text");const i=this.option("displayValue"),n=this.option("displayValueFormatter");return void 0!==i&&null!==e?t=n(i):(0,f.isDefined)(t)||(t=n(e)),this.option("text",t),this._input().val()!==((0,f.isDefined)(t)?t:"")?this._renderDisplayText(t):this._toggleEmptinessEventHandler(),(0,h.Deferred)().resolve()},_renderDisplayText(e){this._input().val(e),this._toggleEmptinessEventHandler()},_isValueValid(){if(this._input().length){const{validity:e}=this._input().get(0);if(e)return e.valid}return!0},_toggleEmptiness(e){this.$element().toggleClass("dx-texteditor-empty",e),this._togglePlaceholder(e)},_togglePlaceholder(e){this.$element().find(`.${T}`).eq(0).toggleClass("dx-state-invisible",!e)},_renderProps(){this._toggleReadOnlyState(),this._toggleSpellcheckState(),this._toggleTabIndex()},_toggleDisabledState(e){this.callBase.apply(this,arguments);this._input().prop("disabled",e)},_toggleTabIndex(){const e=this._input(),t=this.option("disabled"),i=this.option("focusStateEnabled");t||!i?e.attr("tabIndex",-1):e.removeAttr("tabIndex")},_toggleReadOnlyState(){this._input().prop("readOnly",this._readOnlyPropValue()),this.callBase()},_readOnlyPropValue(){return this.option("readOnly")},_toggleSpellcheckState(){this._input().prop("spellcheck",this.option("spellcheck"))},_unobserveLabelContainerResize(){this._labelContainerElement&&(c.default.unobserve(this._labelContainerElement),this._labelContainerElement=null)},_getLabelContainer(){return this._input()},_getLabelContainerWidth(){return(0,_.getWidth)(this._getLabelContainer())},_getLabelBeforeWidth(){return(this._$beforeButtonsContainer&&(0,_.getWidth)(this._$beforeButtonsContainer))??0},_updateLabelWidth(){this._label.updateBeforeWidth(this._getLabelBeforeWidth()),this._label.updateMaxWidth(this._getLabelContainerWidth())},_getFieldElement(){return this._getLabelContainer()},_setFieldAria(e){var t;const i=this.option("inputAttr"),n=null==i?void 0:i["aria-label"],o=null===(t=this._label)||void 0===t?void 0:t.getId(),a=n?void 0:o;if(a||e){const e={labelledby:a,label:n};this.setAria(e,this._getFieldElement())}},_renderLabel(){this._unobserveLabelContainerResize(),this._labelContainerElement=(0,u.default)(this._getLabelContainer()).get(0);const{label:e,labelMode:t,labelMark:i,rtlEnabled:n}=this.option(),o={onClickHandler:()=>{this.focus()},onHoverHandler:e=>{e.stopPropagation()},onActiveHandler:e=>{e.stopPropagation()},$editor:this.$element(),text:e,mark:i,mode:t,rtlEnabled:n,containsButtonsBefore:!!this._$beforeButtonsContainer,getContainerWidth:()=>this._getLabelContainerWidth(),getBeforeWidth:()=>this._getLabelBeforeWidth()};this._label=new k(o),this._setFieldAria(),this._labelContainerElement&&c.default.observe(this._labelContainerElement,this._updateLabelWidth.bind(this))},_renderPlaceholder(){this._renderPlaceholderMarkup(),this._attachPlaceholderEvents()},_renderPlaceholderMarkup(){this._$placeholder&&(this._$placeholder.remove(),this._$placeholder=null);const e=this._input(),t=this.option("placeholder"),i={id:t?`dx-${new d.default}`:void 0,"data-dx_placeholder":t},n=this._$placeholder=(0,u.default)("<div>").attr(i);n.insertAfter(e),n.addClass(T)},_attachPlaceholderEvents(){const e=(0,a.addNamespace)(o.default.up,this.NAME);n.default.on(this._$placeholder,e,(()=>{n.default.trigger(this._input(),"focus")})),this._toggleEmptinessEventHandler()},_placeholder(){return this._$placeholder||(0,u.default)()},_clearValueHandler(e){const t=this._input();e.stopPropagation(),this._saveValueChangeEvent(e),this._clearValue(),!this._isFocused()&&n.default.trigger(t,"focus"),n.default.trigger(t,"input")},_clearValue(){this.clear()},_renderEvents(){const e=this._input();(0,g.each)(O,((t,i)=>{if(this.hasActionSubscription(`on${i}`)){const t=this._createActionByOption(`on${i}`,{excludeValidators:["readOnly"]});n.default.on(e,(0,a.addNamespace)(i.toLowerCase(),this.NAME),(e=>{this._disposed||t({event:e})}))}}))},_refreshEvents(){const e=this._input();(0,g.each)(O,((t,i)=>{n.default.off(e,(0,a.addNamespace)(i.toLowerCase(),this.NAME))})),this._renderEvents()},_keyPressHandler(){this.option("text",this._input().val())},_keyDownHandler(e){const t=this._input(),i=e.ctrlKey&&"enter"===(0,a.normalizeKeyName)(e),o=t.val()!==this.option("value");i&&o&&n.default.trigger(t,"change")},_getValueChangeEventOptionName:()=>"valueChangeEvent",_renderValueChangeEvent(){const e=(0,a.addNamespace)(this._renderValueEventName(),`${this.NAME}TextChange`),t=(0,a.addNamespace)(this.option(this._getValueChangeEventOptionName()),`${this.NAME}ValueChange`),i=(0,a.addNamespace)("keydown",`${this.NAME}TextChange`),o=this._input();n.default.on(o,e,this._keyPressHandler.bind(this)),n.default.on(o,t,this._valueChangeEventHandler.bind(this)),n.default.on(o,i,this._keyDownHandler.bind(this))},_cleanValueChangeEvent(){const e=`.${this.NAME}ValueChange`,t=`.${this.NAME}TextChange`;n.default.off(this._input(),e),n.default.off(this._input(),t)},_refreshValueChangeEvent(){this._cleanValueChangeEvent(),this._renderValueChangeEvent()},_renderValueEventName:()=>"input change keypress",_focusTarget(){return this._input()},_focusEventTarget(){return this.element()},_isInput(e){return e===this._input().get(0)},_preventNestedFocusEvent(e){if(e.isDefaultPrevented())return!0;let t=this._isNestedTarget(e.relatedTarget);return"focusin"===e.type?t=t&&this._isNestedTarget(e.target)&&!this._isInput(e.target):t||this._toggleFocusClass(!1,this.$element()),t&&e.preventDefault(),t},_isNestedTarget(e){return!!this.$element().find(e).length},_focusClassTarget(){return this.$element()},_focusInHandler(e){this._preventNestedFocusEvent(e),this.callBase.apply(this,arguments)},_focusOutHandler(e){this._preventNestedFocusEvent(e),this.callBase.apply(this,arguments)},_toggleFocusClass(e,t){this.callBase(e,this._focusClassTarget(t))},_hasFocusClass(e){return this.callBase((0,u.default)(e||this.$element()))},_renderEmptinessEvent(){const e=this._input();n.default.on(e,"input blur",this._toggleEmptinessEventHandler.bind(this))},_toggleEmptinessEventHandler(){const e=this._input().val(),t=(""===e||null===e)&&this._isValueValid();this._toggleEmptiness(t)},_valueChangeEventHandler(e,t){this.option("readOnly")||(this._saveValueChangeEvent(e),this.option("value",arguments.length>1?t:this._input().val()),this._saveValueChangeEvent(void 0))},_renderEnterKeyAction(){this._enterKeyAction=this._createActionByOption("onEnterKey",{excludeValidators:["readOnly"]}),n.default.off(this._input(),"keyup.onEnterKey.dxTextEditor"),n.default.on(this._input(),"keyup.onEnterKey.dxTextEditor",this._enterKeyHandlerUp.bind(this))},_enterKeyHandlerUp(e){this._disposed||"enter"===(0,a.normalizeKeyName)(e)&&this._enterKeyAction({event:e})},_updateValue(){this._options.silent("text",null),this._renderValue()},_dispose(){this._enterKeyAction=void 0,this.callBase()},_getSubmitElement(){return this._input()},_hasActiveElement(){return this._input().is(l.default.getActiveElement(this._input()[0]))},_optionChanged(e){const{name:t,fullName:i,value:n}=e,o=t.replace("on","");if(O.includes(o))this._refreshEvents();else switch(t){case"valueChangeEvent":this._refreshValueChangeEvent(),this._refreshFocusEvent(),this._refreshEvents();break;case"onValueChanged":this._createValueChangeAction();break;case"focusStateEnabled":this.callBase(e),this._toggleTabIndex();break;case"spellcheck":this._toggleSpellcheckState();break;case"mode":this._renderInputType();break;case"onEnterKey":this._renderEnterKeyAction();break;case"placeholder":this._renderPlaceholder(),this._setFieldAria(!0),this._input().attr({placeholder:this._getPlaceholderAttr()});break;case"label":this._label.updateText(n),this._setFieldAria(!0);break;case"labelMark":this._label.updateMark(n);break;case"labelMode":this._label.updateMode(n),this._setFieldAria();break;case"width":this.callBase(e),this._label.updateMaxWidth(this._getLabelContainerWidth());break;case"readOnly":case"disabled":this._updateButtons(),this.callBase(e);break;case"showClearButton":this._updateButtons(["clear"]);break;case"text":case"showValidationMark":break;case"value":this._updateValue(),this.callBase(e);break;case"inputAttr":this._applyInputAttributes(this._input(),this.option(t));break;case"stylingMode":this._renderStylingMode(),this._updateLabelWidth();break;case"buttons":i===t&&M(n),this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")),this._updateLabelWidth(),this._label.updateContainsButtonsBefore(!!this._$beforeButtonsContainer);break;case"visible":this.callBase(e),n&&this.option("buttons")&&(this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")));break;case"displayValueFormatter":this._invalidate();break;default:this.callBase(e)}},_renderInputType(){this._setInputType(this.option("mode"))},_setInputType(e){const t=this._input();"search"===e&&(e="text");try{t.prop("type",e)}catch(e){t.prop("type","text")}},getButton(e){return this._buttonCollection.getButton(e)},focus(){n.default.trigger(this._input(),"focus")},clear(){this._showValidMark&&(this._showValidMark=!1,this._renderValidationState());const e=this._getDefaultOptions();this.option("value")===e.value?(this._options.silent("text",""),this._renderValue()):this.option("value",e.value)},_resetToInitialValue(){this.option("value")===this._initialValue?(this._options.silent("text",this._initialValue),this._renderValue()):this.callBase(),this._disposePendingIndicator(),this._showValidMark=!1,this._toggleValidMark()},_toggleValidMark(){this.$element().toggleClass("dx-valid",!!this._showValidMark)},reset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;arguments.length?this.callBase(e):this.callBase()},on(e,t){const i=this.callBase(e,t),n=e.charAt(0).toUpperCase()+e.substr(1);return O.includes(n)&&this._refreshEvents(),i}});t.default=R},90987:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(64044),o=d(i(92774)),a=d(i(89797)),s=i(98834),r=d(i(64553)),l=d(i(88244));function d(e){return e&&e.__esModule?e:{default:e}}const u=a.default.down;class c extends l.default{_create(){const e=(0,r.default)("<span>").addClass("dx-clear-button-area").append((0,r.default)("<span>").addClass("dx-icon").addClass("dx-icon-clear"));return this._addToContainer(e),this.update(!0),{instance:e,$element:e}}_isVisible(){const{editor:e}=this;return e._isClearButtonVisible()}_attachEvents(e,t){const{editor:i}=this,a=i.NAME;o.default.on(t,(0,s.addNamespace)(u,a),(e=>{e.preventDefault(),"mouse"!==e.pointerType&&i._clearValueHandler(e)})),o.default.on(t,(0,s.addNamespace)(n.name,a),(e=>i._clearValueHandler(e)))}_legacyRender(e,t){e.toggleClass("dx-show-clear-button",t)}update(){!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&super.update();const{editor:e,instance:t}=this,i=e.$element(),n=this._isVisible();t&&t.toggleClass("dx-state-invisible",!n),this._legacyRender(i,n)}}t.default=c},37932:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(i(92848)),o=a(i(19132));function a(e){return e&&e.__esModule?e:{default:e}}(0,n.default)("dxTextEditor",o.default);t.default=o.default},50640:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TextEditorLabel=void 0;var n=i(64044),o=i(69331),a=h(i(92774)),s=i(638),r=i(98834),l=h(i(19427)),d=h(i(64553)),u=i(57653),c=i(3104);function h(e){return e&&e.__esModule?e:{default:e}}const p="dx-texteditor-label",g="dx-texteditor-with-label",_="dx-texteditor-label-outside",f="dx-texteditor-with-floating-label",m="dx-texteditor-with-before-buttons";t.TextEditorLabel=class{constructor(e){this.NAME="dxLabel",this._props=e,this._id=`${p}-${new l.default}`,this._render(),this._toggleMarkupVisibility()}_isVisible(){return!!this._props.text&&"hidden"!==this._props.mode}_render(){this._$before=(0,d.default)("<div>").addClass("dx-label-before"),this._$labelSpan=(0,d.default)("<span>"),this._$label=(0,d.default)("<div>").addClass("dx-label").append(this._$labelSpan),this._$after=(0,d.default)("<div>").addClass("dx-label-after"),this._$root=(0,d.default)("<div>").addClass(p).attr("id",this._id).append(this._$before).append(this._$label).append(this._$after),this._updateMark(),this._updateText(),this._updateBeforeWidth(),this._updateMaxWidth()}_toggleMarkupVisibility(){const e=this._isVisible();this._updateEditorBeforeButtonsClass(e),this._updateEditorLabelClass(e),e?this._$root.appendTo(this._props.$editor):this._$root.detach(),this._attachEvents()}_attachEvents(){const e=(0,r.addNamespace)(n.name,this.NAME),t=(0,r.addNamespace)(s.start,this.NAME),i=(0,r.addNamespace)(o.active,this.NAME);a.default.off(this._$labelSpan,e),a.default.off(this._$labelSpan,t),a.default.off(this._$labelSpan,i),this._isVisible()&&this._isOutsideMode()&&(a.default.on(this._$labelSpan,e,(e=>{""===(0,c.getWindow)().getSelection().toString()&&(this._props.onClickHandler(),e.preventDefault())})),a.default.on(this._$labelSpan,t,(e=>{this._props.onHoverHandler(e)})),a.default.on(this._$labelSpan,i,(e=>{this._props.onActiveHandler(e)})))}_updateEditorLabelClass(e){if(this._props.$editor.removeClass(f).removeClass(_).removeClass(g),e){const e="floating"===this._props.mode?f:g;this._props.$editor.addClass(e),this._isOutsideMode()&&this._props.$editor.addClass(_)}}_isOutsideMode(){return"outside"===this._props.mode}_updateEditorBeforeButtonsClass(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible();if(this._props.$editor.removeClass(m),e){const e=this._props.containsButtonsBefore?m:"";this._props.$editor.addClass(e)}}_updateMark(){this._$labelSpan.attr("data-mark",this._props.mark)}_updateText(){this._$labelSpan.text(this._props.text)}_updateBeforeWidth(){if(this._isVisible()){const e=this._props.beforeWidth??this._props.getBeforeWidth();this._$before.css({width:e}),this._updateLabelTransform()}}_updateLabelTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this._$labelSpan.css("transform",""),this._isVisible()&&this._isOutsideMode()){const t=(this._props.rtlEnabled?1:-1)*((0,u.getWidth)(this._$before)+e);this._$labelSpan.css("transform",`translateX(${t}px)`)}}_updateMaxWidth(){if(this._isVisible()&&!this._isOutsideMode()){const e=this._props.containerWidth??this._props.getContainerWidth();this._$label.css({maxWidth:e})}}$element(){return this._$root}isVisible(){return this._isVisible()}getId(){if(this._isVisible())return this._id}updateMode(e){this._props.mode=e,this._toggleMarkupVisibility(),this._updateBeforeWidth(),this._updateMaxWidth()}updateText(e){this._props.text=e,this._updateText(),this._toggleMarkupVisibility(),this._updateBeforeWidth(),this._updateMaxWidth()}updateMark(e){this._props.mark=e,this._updateMark()}updateContainsButtonsBefore(e){this._props.containsButtonsBefore=e,this._updateEditorBeforeButtonsClass()}updateBeforeWidth(e){this._props.beforeWidth=e,this._updateBeforeWidth()}updateMaxWidth(e){this._props.containerWidth=e,this._updateMaxWidth()}}},19132:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=m(i(92774)),o=i(37373),a=i(98834),s=m(i(4671)),r=m(i(64553)),l=i(17781),d=i(52576),u=i(21274),c=i(54497),h=i(11528),p=i(35944),g=m(i(34705)),_=i(97270),f=m(i(9217));function m(e){return e&&e.__esModule?e:{default:e}}const v=m(i(45929)).default,C="dx-texteditor-masked",y="forward",b={0:/[0-9]/,9:/[0-9\s]/,"#":/[-+0-9\s]/,L:e=>w(e),l:e=>w(e)||S(e),C:/\S/,c:/./,A:e=>w(e)||x(e),a:e=>w(e)||x(e)||S(e)};function x(e){return/[0-9]/.test(e)}function w(e){const t=e.charCodeAt();return t>64&&t<91||t>96&&t<123||t>127}function S(e){return" "===e}const D=g.default.inherit({_getDefaultOptions(){return(0,d.extend)(this.callBase(),{mask:"",maskChar:"_",maskRules:{},maskInvalidMessage:s.default.format("validation-mask"),useMaskedValue:!1,showMaskMode:"always"})},_supportedKeys(){const e=this,t={del:e._maskStrategy.getHandler("del"),enter:e._changeHandler},i=e.callBase();return(0,u.each)(t,((t,n)=>{const o=i[t];i[t]=function(t){e.option("mask")&&n.call(e,t),o&&o(t)}})),i},_getSubmitElement(){return this.option("mask")?this._$hiddenElement:this.callBase()},_init(){this.callBase(),this._initMaskStrategy()},_initMaskStrategy(){this._maskStrategy=new f.default(this)},_initMarkup(){this._renderHiddenElement(),this.callBase()},_attachMouseWheelEventHandlers(){if(!(this._onMouseWheel!==l.noop))return;const e=this._input(),t=(0,a.addNamespace)(o.name,this.NAME),i=this._createAction((t=>{const{event:i}=t;(0,p.focused)(e)&&!(0,a.isCommandKeyPressed)(i)&&(this._onMouseWheel(i),i.preventDefault(),i.stopPropagation())}));n.default.off(e,t),n.default.on(e,t,(e=>{i({event:e})}))},_onMouseWheel:l.noop,_useMaskBehavior(){return Boolean(this.option("mask"))},_attachDropEventHandler(){if(!this._useMaskBehavior())return;const e=(0,a.addNamespace)("drop",this.NAME),t=this._input();n.default.off(t,e),n.default.on(t,e,(e=>e.preventDefault()))},_render(){this._attachMouseWheelEventHandlers(),this._renderMask(),this.callBase(),this._attachDropEventHandler()},_renderHiddenElement(){this.option("mask")&&(this._$hiddenElement=(0,r.default)("<input>").attr("type","hidden").appendTo(this._inputWrapper()))},_removeHiddenElement(){this._$hiddenElement&&this._$hiddenElement.remove()},_renderMask(){this.$element().removeClass(C),this._maskRulesChain=null,this._maskStrategy.detachEvents(),this.option("mask")&&(this.$element().addClass(C),this._maskStrategy.attachEvents(),this._parseMask(),this._renderMaskedValue())},_changeHandler(e){const t=this._input(),i=t.val();if(i===this._changedValue)return;this._changedValue=i;const o=(0,a.createEvent)(e,{type:"change"});n.default.trigger(t,o)},_parseMask(){this._maskRules=(0,d.extend)({},b,this.option("maskRules")),this._maskRulesChain=this._parseMaskRule(0)},_parseMaskRule(e){const t=this.option("mask");if(e>=t.length)return new _.EmptyMaskRule;const i=t[e],n="\\"===i,o=n?new _.StubMaskRule({maskChar:t[e+1]}):this._getMaskRule(i);return o.next(this._parseMaskRule(e+1+n)),o},_getMaskRule(e){let t;return(0,u.each)(this._maskRules,((i,n)=>{if(i===e)return t={pattern:i,allowedChars:n},!1})),(0,h.isDefined)(t)?new _.MaskRule((0,d.extend)({maskChar:this.option("maskChar")||" "},t)):new _.StubMaskRule({maskChar:e})},_renderMaskedValue(){if(!this._maskRulesChain)return;const e=this.option("value")||"";this._maskRulesChain.clear(this._normalizeChainArguments());const t={length:e.length};t[this._isMaskedValueMode()?"text":"value"]=e,this._handleChain(t),this._displayMask()},_replaceSelectedText(e,t,i){if(void 0===i)return e;return e.slice(0,t.start)+i+e.slice(t.end)},_isMaskedValueMode(){return this.option("useMaskedValue")},_displayMask(e){e=e||this._caret(),this._renderValue(),this._caret(e)},_isValueEmpty(){return(0,c.isEmpty)(this._value)},_shouldShowMask(){return"onFocus"!==this.option("showMaskMode")||((0,p.focused)(this._input())||!this._isValueEmpty())},_showMaskPlaceholder(){if(this._shouldShowMask()){const e=this._maskRulesChain.text();this.option("text",e),"onFocus"===this.option("showMaskMode")&&this._renderDisplayText(e)}},_renderValue(){if(this._maskRulesChain&&(this._showMaskPlaceholder(),this._$hiddenElement)){const e=this._maskRulesChain.value(),t=(0,c.isEmpty)(e)?"":this._getPreparedValue();this._$hiddenElement.val(t)}return this.callBase()},_getPreparedValue(){return this._convertToValue().replace(/\s+$/,"")},_valueChangeEventHandler(e){this._maskRulesChain?(this._saveValueChangeEvent(e),this.option("value",this._getPreparedValue())):this.callBase.apply(this,arguments)},_isControlKeyFired(e){return this._isControlKey((0,a.normalizeKeyName)(e))||(0,a.isCommandKeyPressed)(e)},_handleChain(e){const t=this._maskRulesChain.handle(this._normalizeChainArguments(e));return this._updateMaskInfo(),t},_normalizeChainArguments(e){return(e=e||{}).index=0,e.fullText=this._maskRulesChain.text(),e},_convertToValue(e){return e=this._isMaskedValueMode()?this._replaceMaskCharWithEmpty(e||this._textValue||""):e||this._value||""},_replaceMaskCharWithEmpty(e){return e.replace(new RegExp(this.option("maskChar"),"g")," ")},_maskKeyHandler(e,t){if(this.option("readOnly"))return;this.setForwardDirection(),e.preventDefault(),this._handleSelection();const i=this._input().val(),o=()=>{i!==this._input().val()&&n.default.trigger(this._input(),"input")},a=t();a?a.then(o):(this.setForwardDirection(),this._adjustCaret(),this._displayMask(),this._maskRulesChain.reset(),o())},_handleKey(e,t){this._direction(t||y),this._adjustCaret(e),this._handleKeyChain(e),this._moveCaret()},_handleSelection(){if(!this._hasSelection())return;const e=this._caret(),t=new Array(e.end-e.start+1).join(" ");this._handleKeyChain(t)},_handleKeyChain(e){const t=this._caret(),i=this.isForwardDirection()?t.start:t.start-1,n=this.isForwardDirection()?t.end:t.end-1,o=i===n?1:n-i;this._handleChain({text:e,start:i,length:o})},_tryMoveCaretBackward(){this.setBackwardDirection();const e=this._caret().start;return this._adjustCaret(),!e||e!==this._caret().start},_adjustCaret(e){const t=this._caret().start,i=this.isForwardDirection(),n=this._maskRulesChain.adjustedCaret(t,i,e);this._caret({start:n,end:n})},_moveCaret(){const e=this._caret().start,t=e+(this.isForwardDirection()?0:-1),i=this._maskRulesChain.isAccepted(t)?e+(this.isForwardDirection()?1:-1):e;this._caret({start:i,end:i})},_caret(e,t){const i=this._input();if(i.length)return arguments.length?void v(i,e,t):v(i)},_hasSelection(){const e=this._caret();return e.start!==e.end},_direction(e){if(!arguments.length)return this._typingDirection;this._typingDirection=e},setForwardDirection(){this._direction(y)},setBackwardDirection(){this._direction("backward")},isForwardDirection(){return this._direction()===y},_updateMaskInfo(){this._textValue=this._maskRulesChain.text(),this._value=this._maskRulesChain.value()},_clean(){this._maskStrategy&&this._maskStrategy.clean(),this.callBase()},_validateMask(){if(!this._maskRulesChain)return;const e=(0,c.isEmpty)(this.option("value"))||this._maskRulesChain.isValid(this._normalizeChainArguments());this.option({isValid:e,validationError:e?null:{editorSpecific:!0,message:this.option("maskInvalidMessage")}})},_updateHiddenElement(){this._removeHiddenElement(),this.option("mask")&&(this._input().removeAttr("name"),this._renderHiddenElement()),this._setSubmitElementName(this.option("name"))},_updateMaskOption(){this._updateHiddenElement(),this._renderMask(),this._validateMask(),this._refreshValueChangeEvent()},_processEmptyMask(e){if(e)return;const t=this.option("value");this.option({text:t,isValid:!0,validationError:null}),this.validationRequest.fire({value:t,editor:this}),this._renderValue()},_optionChanged(e){switch(e.name){case"mask":this._updateMaskOption(),this._processEmptyMask(e.value);break;case"maskChar":case"maskRules":case"useMaskedValue":this._updateMaskOption();break;case"value":this._renderMaskedValue(),this._validateMask(),this.callBase(e),this._changedValue=this._input().val();break;case"maskInvalidMessage":break;case"showMaskMode":this.option("text",""),this._renderValue();break;default:this.callBase(e)}},clear(){const{value:e}=this._getDefaultOptions();this.option("value")===e&&this._renderMaskedValue(),this.callBase()}});t.default=D},97270:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StubMaskRule=t.MaskRule=t.EmptyMaskRule=void 0;var n=i(52576),o=i(11528);const a=" ";class s{constructor(e){this._value=a,(0,n.extend)(this,e)}next(e){if(!arguments.length)return this._next;this._next=e}_prepareHandlingArgs(e,t){t=t||{};const i=Object.prototype.hasOwnProperty.call(e,"value")?"value":"text";return e[i]=t.str??e[i],e.start=t.start??e.start,e.length=t.length??e.length,e.index+=1,e}first(e){return e=e||0,this.next().first(e+1)}isAccepted(e){return!1}adjustedCaret(e,t,i){return t?this._adjustedForward(e,0,i):this._adjustedBackward(e,0,i)}_adjustedForward(e,t,i){}_adjustedBackward(e,t,i){}isValid(e){}reset(){}clear(e){}text(){}value(){}rawValue(){}handle(e){}}t.EmptyMaskRule=class extends s{next(){}handle(){return 0}text(){return""}value(){return""}first(){return 0}rawValue(){return""}adjustedCaret(){return 0}isValid(){return!0}};class r extends s{text(){return(this._value!==a?this._value:this.maskChar)+this.next().text()}value(){return this._value+this.next().value()}rawValue(){return this._value+this.next().rawValue()}handle(e){const t=Object.prototype.hasOwnProperty.call(e,"value")?e.value:e.text;if(!t||!t.length||!e.length)return 0;if(e.start)return this.next().handle(this._prepareHandlingArgs(e,{start:e.start-1}));const i=t[0],n=t.substring(1);return this._tryAcceptChar(i,e),this._accepted()?this.next().handle(this._prepareHandlingArgs(e,{str:n,length:e.length-1}))+1:this.handle(this._prepareHandlingArgs(e,{str:n,length:e.length-1}))}clear(e){this._tryAcceptChar(a,e),this.next().clear(this._prepareHandlingArgs(e))}reset(){this._accepted(!1),this.next().reset()}_tryAcceptChar(e,t){if(this._accepted(!1),!this._isAllowed(e,t))return;const i=e===a?this.maskChar:e;t.fullText=t.fullText.substring(0,t.index)+i+t.fullText.substring(t.index+1),this._accepted(!0),this._value=e}_accepted(e){if(!arguments.length)return!!this._isAccepted;this._isAccepted=!!e}first(e){return this._value===a?e||0:super.first(e)}_isAllowed(e,t){return e===a||this._isValid(e,t)}_isValid(e,t){const{allowedChars:i}=this;return i instanceof RegExp?i.test(e):(0,o.isFunction)(i)?i(e,t.index,t.fullText):Array.isArray(i)?i.includes(e):i===e}isAccepted(e){return 0===e?this._accepted():this.next().isAccepted(e-1)}_adjustedForward(e,t,i){return t>=e?t:this.next()._adjustedForward(e,t+1,i)||t+1}_adjustedBackward(e,t){return t>=e-1?e:this.next()._adjustedBackward(e,t+1)||t+1}isValid(e){return this._isValid(this._value,e)&&this.next().isValid(this._prepareHandlingArgs(e))}}t.MaskRule=r;t.StubMaskRule=class extends r{value(){return this.next().value()}handle(e){const t=Object.prototype.hasOwnProperty.call(e,"value"),i=t?e.value:e.text;if(!i.length||!e.length)return 0;if(e.start||t)return this.next().handle(this._prepareHandlingArgs(e,{start:e.start&&e.start-1}));const n=i[0],o=i.substring(1);this._tryAcceptChar(n);const a=this._isAllowed(n)?this._prepareHandlingArgs(e,{str:o,length:e.length-1}):e;return this.next().handle(a)+1}clear(e){this._accepted(!1),this.next().clear(this._prepareHandlingArgs(e))}_tryAcceptChar(e){this._accepted(this._isValid(e))}_isValid(e){return e===this.maskChar}first(e){return e=e||0,this.next().first(e+1)}_adjustedForward(e,t,i){return t>=e&&i===this.maskChar?t:e===t+1&&this._accepted()?e:this.next()._adjustedForward(e,t+1,i)}_adjustedBackward(e,t){return t>=e-1?0:this.next()._adjustedBackward(e,t+1)}isValid(e){return this.next().isValid(this._prepareHandlingArgs(e))}}},9217:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(92774)),o=i(98834),a=r(i(48314)),s=i(86858);function r(e){return e&&e.__esModule?e:{default:e}}const l="dxMask",d=["deleteContentBackward","deleteSoftLineBackward","deleteContent","deleteHardLineBackward"],u=["historyUndo","historyRedo"],c=["focusIn","focusOut","input","paste","cut","drop","beforeInput"];function h(e){return" ".repeat(e)}t.default=class{constructor(e){this.editor=e}_editorOption(){return this.editor.option(...arguments)}_editorInput(){return this.editor._input()}_editorCaret(e){if(!e)return this.editor._caret();this.editor._caret(e)}_attachChangeEventHandler(){if(!this._editorOption("valueChangeEvent").split(" ").includes("change"))return;const e=this._editorInput(),t=(0,o.addNamespace)("blur beforedeactivate",l);n.default.on(e,t,(e=>{this.editor._changeHandler(e)}))}_beforeInputHandler(){this._previousText=this._editorOption("text"),this._prevCaret=this._editorCaret()}_inputHandler(e){const{originalEvent:t}=e;if(!t)return;const{inputType:i}=t;if(u.includes(i))this._handleHistoryInputEvent();else if(d.includes(i))this._handleBackwardDeleteInputEvent();else{const e=this._editorCaret();if(!e.end)return;this._clearSelectedText(),this._autoFillHandler(t),this._editorCaret(e),this._handleInsertTextInputEvent(t.data)}this._editorOption("text")===this._previousText&&e.stopImmediatePropagation()}_handleHistoryInputEvent(){const e=this._editorCaret();this._updateEditorMask({start:e.start,length:e.end-e.start,text:""}),this._editorCaret(this._prevCaret)}_handleBackwardDeleteInputEvent(){this._clearSelectedText();const e=this._editorCaret();this.editor.setForwardDirection(),this.editor._adjustCaret();this._editorCaret().start!==e.start&&(this.editor.setBackwardDirection(),this.editor._adjustCaret())}_clearSelectedText(){var e,t;const i=(null===(e=this._prevCaret)||void 0===e?void 0:e.end)-(null===(t=this._prevCaret)||void 0===t?void 0:t.start)||1,n=this._editorCaret();this._isAutoFill()||(this.editor.setBackwardDirection(),this._updateEditorMask({start:n.start,length:i,text:h(i)}))}_handleInsertTextInputEvent(e){var t;const i=e??"";this.editor.setForwardDirection();this._updateEditorMask({start:(null===(t=this._prevCaret)||void 0===t?void 0:t.start)??0,length:i.length||1,text:i})||this._editorCaret(this._prevCaret)}_updateEditorMask(e){const t=e.text.length,i=this.editor._handleChain(e);if(this.editor._displayMask(),this.editor.isForwardDirection()){const{start:e,end:n}=this._editorCaret(),o=i-t;i>1&&1===t&&this._editorCaret({start:e+o,end:n+o}),this.editor._adjustCaret()}return!!i}_focusInHandler(){if(this.editor._showMaskPlaceholder(),this.editor.setForwardDirection(),!this.editor._isValueEmpty()&&this._editorOption("isValid"))this.editor._adjustCaret();else{const e=this.editor._maskRulesChain.first();this._caretTimeout=setTimeout((()=>{this._editorCaret({start:e,end:e})}),0)}}_focusOutHandler(e){this.editor._changeHandler(e),"onFocus"===this._editorOption("showMaskMode")&&this.editor._isValueEmpty()&&(this._editorOption("text",""),this.editor._renderDisplayText(""))}_delHandler(e){const{editor:t}=this;t._maskKeyHandler(e,(()=>{t._hasSelection()||t._handleKey(" ")}))}_cutHandler(e){const t=this._editorCaret(),i=this._editorInput().val().substring(t.start,t.end);this.editor._maskKeyHandler(e,(()=>(0,s.clipboardText)(e,i)))}_dropHandler(){this._clearDragTimer(),this._dragTimer=setTimeout((()=>{const e=this.editor._convertToValue(this._editorInput().val());this._editorOption("value",e)}))}_pasteHandler(e){const{editor:t}=this;if(this._editorOption("disabled"))return;const i=this._editorCaret();t._maskKeyHandler(e,(()=>{const n=(0,s.clipboardText)(e),o=t._maskRulesChain.text().substring(i.end),a=t._handleChain({text:n,start:i.start,length:n.length}),r=i.start+a;t._handleChain({text:o,start:r,length:o.length}),t._caret({start:r,end:r})}))}_autoFillHandler(e){const{editor:t}=this,i=this._editorInput().val();this._inputHandlerTimer=setTimeout((()=>{this._isAutoFill()&&(t._maskKeyHandler(e,(()=>{t._handleChain({text:i,start:0,length:i.length})})),t._validateMask())}))}_isAutoFill(){const e=this._editorInput();if(a.default.webkit){const t=e.get(0);return(null==t?void 0:t.matches(":-webkit-autofill"))??!1}return!1}_clearDragTimer(){clearTimeout(this._dragTimer)}_clearTimers(){this._clearDragTimer(),clearTimeout(this._caretTimeout),clearTimeout(this._inputHandlerTimer)}getHandler(e){return t=>{var i;null===(i=this[`_${e}Handler`])||void 0===i||i.call(this,t)}}attachEvents(){const e=this._editorInput();c.forEach((t=>{const i=(0,o.addNamespace)(t.toLowerCase(),l);n.default.on(e,i,this.getHandler(t))})),this._attachChangeEventHandler()}detachEvents(){this._clearTimers(),n.default.off(this._editorInput(),`.${l}`)}clean(){this._clearTimers()}}},45929:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(65951)),o=r(i(64960)),a=r(i(64553)),s=i(11528);function r(e){return e&&e.__esModule?e:{default:e}}const{ios:l,mac:d}=n.default.real(),u=l||d;t.default=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e=(0,a.default)(e).get(0),!(0,s.isDefined)(t))return function(e){let t;try{t={start:e.selectionStart,end:e.selectionEnd}}catch(e){t={start:0,end:0}}return t}(e);!i&&u&&o.default.getActiveElement(e)!==e||function(e,t){const i=o.default.getBody();if(i.contains(e)||i.contains(e.getRootNode().host))try{e.selectionStart=t.start,e.selectionEnd=t.end}catch(e){}}(e,t)}},81569:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.prepareScrollData=t.allowScroll=void 0;var n,o=i(98834),a=(n=i(64553))&&n.__esModule?n:{default:n};const s=function(e,t,i){const n=(0,a.default)(e),o=i?n.scrollLeft():n.scrollTop(),s=i?"Width":"Height",r=n.prop(`scroll${s}`)-n.prop(`client${s}`)-o|0;if(0===o&&0===r)return!1;return!!(0===o&&t>=0||0===r&&t<=0||o>0&&r>0)||void 0};t.allowScroll=s;t.prepareScrollData=function(e,t){const i=(0,a.default)(e);return{validate(n){if((0,o.isDxMouseWheelEvent)(n)&&(r=n.target,!t||(0,a.default)(r).is(e)))return!!s(i,-n.delta,n.shiftKey)&&(n._needSkipEvent=!0,!0);var r}}}},88244:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n};t.default=class{constructor(e,t,i){this.instance=null,this.$container=null,this.$placeMarker=null,this.editor=t,this.name=e,this.options=i||{}}_addPlaceMarker(e){this.$placeMarker=(0,o.default)("<div>").appendTo(e)}_addToContainer(e){const{$placeMarker:t,$container:i}=this;t?t.replaceWith(e):e.appendTo(i)}_attachEvents(e,t){throw"Not implemented"}_create(){throw"Not implemented"}_isRendered(){return!!this.instance}_isVisible(){const{editor:e,options:t}=this;return t.visible||!e.option("readOnly")}_isDisabled(){throw"Not implemented"}_shouldRender(){return this._isVisible()&&!this._isRendered()}dispose(){const{instance:e,$placeMarker:t}=this;e&&(e.dispose?e.dispose():e.remove(),this.instance=null),t&&t.remove()}render(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$container;if(this.$container=e,this._isVisible()){const{instance:e,$element:t}=this._create();this.instance=e,this._attachEvents(e,t)}else this._addPlaceMarker(e)}update(){return this._shouldRender()&&this.render(),!!this.instance}}},77683:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(64044),o=u(i(92774)),a=i(638),s=u(i(64553)),r=i(52576),l=u(i(64973)),d=u(i(88244));function u(e){return e&&e.__esModule?e:{default:e}}const c="dx-custom-button-hovered";class h extends d.default{_attachEvents(e,t){const{editor:i}=this;o.default.on(t,a.start,(()=>{i.$element().addClass(c)})),o.default.on(t,a.end,(()=>{i.$element().removeClass(c)})),o.default.on(t,n.name,(e=>{e.stopPropagation()}))}_create(){const{editor:e}=this,t=(0,s.default)("<div>");this._addToContainer(t);return{$element:t,instance:e._createComponent(t,l.default,(0,r.extend)({},this.options,{ignoreParentReadOnly:!0,disabled:this._isDisabled(),integrationOptions:this._prepareIntegrationOptions(e)}))}}_prepareIntegrationOptions(e){return(0,r.extend)({},e.option("integrationOptions"),{skipTemplates:["content"]})}update(){const e=super.update();return this.instance&&this.instance.option("disabled",this._isDisabled()),e}_isVisible(){const{editor:e}=this;return e.option("visible")}_isDisabled(){return void 0!==this.options.disabled?this.instance?this.instance.option("disabled"):this.options.disabled:this.editor.option("readOnly")}}t.default=h},79686:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(64553)),o=i(52576),a=r(i(35185)),s=r(i(77683));function r(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(-1!==e.indexOf(t))throw a.default.Error("E1055",t);e.push(t)}t.default=class{constructor(e,t){this.buttons=[],this.defaultButtonsInfo=t,this.editor=e}_compileButtonInfo(e){const t=[];return e.map((e=>{const i="string"==typeof e;var n;i||(n=e,(()=>{if(!n||"object"!=typeof n||Array.isArray(n))throw a.default.Error("E1053")})(),(()=>{if(!("name"in n))throw a.default.Error("E1054")})(),(()=>{const{name:e}=n;if("string"!=typeof e)throw a.default.Error("E1055")})(),(()=>{const{location:e}=n;"location"in n&&"after"!==e&&"before"!==e&&(n.location="after")})());const r=i||function(e,t){return!!t.find((t=>t.name===e))}(e.name,this.defaultButtonsInfo);if(r){const i=this.defaultButtonsInfo.find((t=>{let{name:i}=t;return i===e||i===e.name}));if(!i)throw a.default.Error("E1056",this.editor.NAME,e);return l(t,e),i}const{name:d}=e;return l(t,d),(0,o.extend)(e,{Ctor:s.default})}))}_createButton(e){const{Ctor:t,options:i,name:n}=e,o=new t(n,this.editor,i);return this.buttons.push(o),o}_renderButtons(e,t,i){let o=null;const a=e?this._compileButtonInfo(e):this.defaultButtonsInfo;return a.forEach((e=>{const{location:a="after"}=e;a===i&&this._createButton(e).render((o=o??(0,n.default)("<div>").addClass("dx-texteditor-buttons-container"),"before"===i?t.prepend(o):t.append(o),o))})),o}clean(){this.buttons.forEach((e=>e.dispose())),this.buttons=[]}getButton(e){const t=this.buttons.find((t=>{let{name:i}=t;return i===e}));return t&&t.instance}renderAfterButtons(e,t){return this._renderButtons(e,t,"after")}renderBeforeButtons(e,t){return this._renderButtons(e,t,"before")}updateButtons(e){this.buttons.forEach((t=>{e&&-1===e.indexOf(t.name)||t.update()}))}}},57250:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n};t.default=function(e){const t=(0,o.default)(".dx-toast").toArray();if(!arguments.length)return void t.forEach((e=>{(0,o.default)(e).dxToast("hide")}));const i=(0,o.default)(e).get(0);t.map((e=>(0,o.default)(e).dxToast("instance"))).filter((e=>{const t=(0,o.default)(e.option("container")).get(0);return i===t&&i})).forEach((e=>{e.hide()}))}},11100:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(i(92774)),o=p(i(89797)),a=p(i(92848)),s=p(i(64960)),r=p(i(64553)),l=i(52576),d=p(i(3122)),u=i(11528),c=p(i(89132)),h=i(52071);function p(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},g.apply(null,arguments)}const _=d.default.add,f="dx-toast",m=`${f}-`,v=`${m}wrapper`,C=`${m}content`,y=`${m}message`,b=`${m}icon`,x=["info","warning","error","success"],w=[],S={top:{my:"top",at:"top",of:null,offset:"0 0"},bottom:{my:"bottom",at:"bottom",of:null,offset:"0 -20"},center:{my:"center",at:"center",of:null,offset:"0 0"},right:{my:"center right",at:"center right",of:null,offset:"0 0"},left:{my:"center left",at:"center left",of:null,offset:"0 0"}},D={h:0,v:0};_((()=>{n.default.subscribeGlobal(s.default.getDocument(),o.default.down,(e=>{for(let t=w.length-1;t>=0;t--)if(!w[t]._proxiedDocumentDownHandler(e))return}))}));const I=c.default.inherit({_getDefaultOptions(){return(0,l.extend)(this.callBase(),{message:"",type:"info",displayTime:2e3,position:"bottom center",animation:{show:{type:"fade",duration:400,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},shading:!1,height:"auto",hideTopOverlayHandler:null,preventScrollEvents:!1,closeOnSwipe:!0,closeOnClick:!1})},_defaultOptionsRules(){const e={displayTime:(0,h.isMaterialBased)()?4e3:2e3,hideOnOutsideClick:!0,animation:{show:{type:"fade",duration:200,from:0,to:1},hide:{type:"fade",duration:200,from:1,to:0}}};return this.callBase().concat([{device:e=>"phone"===e.deviceType,options:g({width:"calc(100vw - 40px)"},e)},{device:e=>"tablet"===e.deviceType,options:g({width:"auto",maxWidth:"80vw"},e)},{device:e=>(0,h.isMaterialBased)()&&"desktop"===e.deviceType,options:{minWidth:344,maxWidth:568,displayTime:4e3}}])},_init(){this.callBase(),this._posStringToObject()},_renderContentImpl(){this._message=(0,r.default)("<div>").addClass(y).text(this.option("message")).appendTo(this.$content()),this.setAria("role","alert",this._message),x.includes(this.option("type").toLowerCase())&&this.$content().prepend((0,r.default)("<div>").addClass(b)),this.callBase()},_render(){this.callBase(),this.$element().addClass(f),this.$wrapper().addClass(v),this.$content().addClass(m+String(this.option("type")).toLowerCase()),this.$content().addClass(C),this._toggleCloseEvents("Swipe"),this._toggleCloseEvents("Click")},_toggleCloseEvents(e){const t=`dx${e.toLowerCase()}`;n.default.off(this.$content(),t),this.option(`closeOn${e}`)&&n.default.on(this.$content(),t,this.hide.bind(this))},_posStringToObject(){if(!(0,u.isString)(this.option("position")))return;const e=this.option("position").split(" ")[0],t=this.option("position").split(" ")[1];switch(this.option("position",(0,l.extend)({boundaryOffset:D},S[e])),t){case"center":case"left":case"right":this.option("position").at+=` ${t}`,this.option("position").my+=` ${t}`}},_show(){return this.callBase.apply(this,arguments).always((()=>{clearTimeout(this._hideTimeout),this._hideTimeout=setTimeout(this.hide.bind(this),this.option("displayTime"))}))},_overlayStack:()=>w,_zIndexInitValue(){return this.callBase()+8e3},_dispose(){clearTimeout(this._hideTimeout),this.callBase()},_optionChanged(e){switch(e.name){case"type":this.$content().removeClass(m+e.previousValue),this.$content().addClass(m+String(e.value).toLowerCase());break;case"message":this._message&&this._message.text(e.value);break;case"closeOnSwipe":this._toggleCloseEvents("Swipe");break;case"closeOnClick":this._toggleCloseEvents("Click");break;case"displayTime":break;default:this.callBase(e)}}});(0,a.default)("dxToast",I);t.default=I},41437:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i(10720);var n=g(i(65951)),o=g(i(64553)),a=i(91585),s=i(52576),r=i(57653),l=i(3104),d=g(i(64973)),u=i(52071),c=g(i(29299)),h=i(58227),p=g(i(30363));function g(e){return e&&e.__esModule?e:{default:e}}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_.apply(null,arguments)}class f extends c.default{_supportedKeys(){var e;let t={};return this.option("opened")&&null!==(e=this._list)&&void 0!==e&&e.option("focusedElement")||(t=this._button._supportedKeys()),(0,s.extend)(super._supportedKeys(),t,{tab(){this._popup&&this._popup.hide()}})}_getDefaultOptions(){return _({},super._getDefaultOptions(),{items:[],onItemClick:null,dataSource:null,itemTemplate:"item",onButtonClick:null,activeStateEnabled:!0,hoverStateEnabled:!0,opened:!1,onItemRendered:null,closeOnClick:!0,useInkRipple:!1,container:void 0,animation:{show:{type:"fade",from:0,to:1},hide:{type:"fade",to:0}}})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>"desktop"===n.default.real().deviceType&&!n.default.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>(0,u.isMaterialBased)(),options:{useInkRipple:!0,animation:{show:{type:"pop",duration:200,from:{scale:0},to:{scale:1}},hide:{type:"pop",duration:200,from:{scale:1},to:{scale:0}}}}}])}_init(){super._init(),this.$element().addClass("dx-dropdownmenu"),this._initItemClickAction(),this._initButtonClickAction()}_initItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")}_initButtonClickAction(){this._buttonClickAction=this._createActionByOption("onButtonClick")}_initTemplates(){this._templateManager.addDefaultTemplates({content:new a.ChildDefaultTemplate("content")}),super._initTemplates()}_initMarkup(){this._renderButton(),super._initMarkup()}_render(){super._render(),this.setAria({haspopup:!0,expanded:this.option("opened")})}_renderContentImpl(){this.option("opened")&&this._renderPopup()}_clean(){this._cleanFocusState(),this._list&&this._list.$element().remove(),this._popup&&this._popup.$element().remove(),delete this._list,delete this._popup}_renderButton(){const e=this.$element().addClass("dx-dropdownmenu-button");this._button=this._createComponent(e,d.default,{icon:"overflow",template:"content",stylingMode:(0,u.isFluent)()?"text":"contained",useInkRipple:this.option("useInkRipple"),hoverStateEnabled:!1,focusStateEnabled:!1,onClick:e=>{this.option("opened",!this.option("opened")),this._buttonClickAction(e)}})}_toggleActiveState(e,t,i){this._button._toggleActiveState(e,t,i)}_toggleMenuVisibility(e){var t,i;const n=e??!(null!==(t=this._popup)&&void 0!==t&&t.option("visible"));e&&this._renderPopup(),null===(i=this._popup)||void 0===i||i.toggle(n),this.setAria("expanded",n)}_renderPopup(){if(this._$popup)return;this._$popup=(0,o.default)("<div>").appendTo(this.$element());const{rtlEnabled:e,container:t,animation:i}=this.option();this._popup=this._createComponent(this._$popup,"dxPopup",{onInitialized(e){let{component:t}=e;t.$wrapper().addClass("dx-dropdownmenu-popup-wrapper").addClass("dx-dropdownmenu-popup")},deferRendering:!1,preventScrollEvents:!1,contentTemplate:e=>this._renderList(e),_ignoreFunctionValueDeprecation:!0,maxHeight:()=>this._getMaxHeight(),position:{my:"top "+(e?"left":"right"),at:"bottom "+(e?"left":"right"),collision:"fit flip",offset:{v:3},of:this.$element()},animation:i,onOptionChanged:e=>{let{name:t,value:i}=e;"visible"===t&&this.option("opened",i)},container:t,autoResizeEnabled:!1,height:"auto",width:"auto",hideOnOutsideClick:e=>this._closeOutsideDropDownHandler(e),hideOnParentScroll:!0,shading:!1,dragEnabled:!1,showTitle:!1,fullScreen:!1,_fixWrapperPosition:!0})}_getMaxHeight(){const e=this.$element(),t=e.offset().top,i=(0,r.getOuterHeight)((0,l.getWindow)()),n=Math.max(t,i-t-(0,r.getOuterHeight)(e));return Math.min(i,n-3-10)}_closeOutsideDropDownHandler(e){return!(0,o.default)(e.target).closest(this.$element()).length}_renderList(e){const t=(0,o.default)(e);t.addClass("dx-dropdownmenu-list"),this._list=this._createComponent(t,p.default,{dataSource:this._getListDataSource(),pageLoadMode:"scrollBottom",indicateLoading:!1,noDataText:"",itemTemplate:this.option("itemTemplate"),onItemClick:e=>{this.option("closeOnClick")&&this.option("opened",!1),this._itemClickAction(e)},tabIndex:-1,focusStateEnabled:!1,activeStateEnabled:!0,onItemRendered:this.option("onItemRendered"),_itemAttributes:{role:"menuitem"}})}_itemOptionChanged(e,t,i){var n;null===(n=this._list)||void 0===n||n._itemOptionChanged(e,t,i),(0,h.toggleItemFocusableElementTabIndex)(this._list,e)}_getListDataSource(){return this.option("dataSource")??this.option("items")}_setListDataSource(){var e;null===(e=this._list)||void 0===e||e.option("dataSource",this._getListDataSource()),delete this._deferRendering}_getKeyboardListeners(){return super._getKeyboardListeners().concat([this._list])}_toggleVisibility(e){var t;super._toggleVisibility(e),null===(t=this._button)||void 0===t||t.option("visible",e)}_optionChanged(e){var t,i,n;const{name:o,value:a}=e;switch(o){case"items":case"dataSource":this.option("opened")?this._setListDataSource():this._deferRendering=!0;break;case"itemTemplate":null===(t=this._list)||void 0===t||t.option(o,this._getTemplate(a));break;case"onItemClick":this._initItemClickAction();break;case"onButtonClick":this._buttonClickAction();break;case"useInkRipple":this._invalidate();break;case"focusStateEnabled":null===(i=this._list)||void 0===i||i.option(o,a),super._optionChanged(e);break;case"onItemRendered":null===(n=this._list)||void 0===n||n.option(o,a);break;case"opened":this._deferRendering&&this._setListDataSource(),this._toggleMenuVisibility(a),this._updateFocusableItemsTabIndex();break;case"closeOnClick":break;case"container":this._popup&&this._popup.option(o,a);break;case"disabled":this._list&&this._updateFocusableItemsTabIndex();break;default:super._optionChanged(e)}}_updateFocusableItemsTabIndex(){this.option("items").forEach((e=>(0,h.toggleItemFocusableElementTabIndex)(this._list,e)))}}t.default=f},30363:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(21274),s=i(26031);const r="dx-toolbar-menu-action",l="dx-toolbar-hidden-button-group",d="dx-toolbar-menu-section",u="dx-toolbar-menu-last-section";class c extends s.ListBase{_init(){super._init(),this._activeStateUnit=`.${r}:not(.${l})`}_initMarkup(){this._renderSections(),super._initMarkup(),this._setMenuRole()}_getSections(){return this._itemContainer().children()}_itemElements(){return this._getSections().children(this._itemSelector())}_renderSections(){const e=this._itemContainer();(0,a.each)(["before","center","after","menu"],((t,i)=>{const n=`_$${i}Section`;this[n]||(this[n]=(0,o.default)("<div>").addClass(d)),this[n].appendTo(e)}))}_renderItems(){super._renderItems.apply(this,arguments),this._updateSections()}_setMenuRole(){this.$element().find(".dx-scrollview-content").attr("role","menu")}_updateSections(){const e=this.$element().find(`.${d}`);e.removeClass(u),e.not(":empty").eq(-1).addClass(u)}_renderItem(e,t,i,n){const o=t.location??"menu",a=this[`_$${o}Section`],s=super._renderItem(e,t,a,n);return this._getItemTemplateName({itemData:t})&&s.addClass("dx-toolbar-menu-custom"),("menu"===o||"dxButton"===t.widget||"dxButtonGroup"===t.widget||t.isAction)&&s.addClass(r),"dxButton"===t.widget&&s.addClass("dx-toolbar-hidden-button"),"dxButtonGroup"===t.widget&&s.addClass(l),s.addClass(t.cssClass),s}_getItemTemplateName(e){const t=super._getItemTemplateName(e),i=e.itemData;return i&&i.menuItemTemplate||t}_dataSourceOptions(){return{paginate:!1}}_itemClickHandler(e,t,i){(0,o.default)(e.target).closest(`.${r}`).length&&super._itemClickHandler(e,t,i)}_clean(){this._getSections().empty(),super._clean()}}t.default=c},96002:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TOOLBAR_CLASS=void 0;t.TOOLBAR_CLASS="dx-toolbar"},30577:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=g(i(92848)),a=g(i(64553)),s=i(27286),r=i(21274),l=i(41639),d=i(57653),u=i(11528),c=i(52071),h=g(i(78104)),p=i(96002);function g(e){return e&&e.__esModule?e:{default:e}}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_.apply(null,arguments)}const f="dx-toolbar-before",m="dx-toolbar-after",v="dx-toolbar-label",C="dx-toolbar-compact",y="text";class b extends h.default{_getSynchronizableOptionsForCreateComponent(){return super._getSynchronizableOptionsForCreateComponent().filter((e=>"disabled"!==e))}_initTemplates(){super._initTemplates();const e=new s.BindableTemplate(((e,t,i)=>{if((0,u.isPlainObject)(t)){const{text:i,html:n,widget:o}=t;i&&e.text(i).wrapInner("<div>"),n&&e.html(n),"dxDropDownButton"===o&&(t.options=t.options??{},(0,u.isDefined)(t.options.stylingMode)||(t.options.stylingMode=this.option("useFlatButtons")?y:"contained")),"dxButton"===o&&(this.option("useFlatButtons")&&(t.options=t.options??{},t.options.stylingMode=t.options.stylingMode??y),this.option("useDefaultButtons")&&(t.options=t.options??{},t.options.type=t.options.type??"default"))}else e.text(String(t));this._getTemplate("dx-polymorph-widget").render({container:e,model:i,parent:this})}),["text","html","widget","options"],this.option("integrationOptions.watchMethod"));this._templateManager.addDefaultTemplates({item:e,menuItem:e})}_getDefaultOptions(){return _({},super._getDefaultOptions(),{renderAs:"topToolbar",grouped:!1,useFlatButtons:!1,useDefaultButtons:!1})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>(0,c.isMaterialBased)(),options:{useFlatButtons:!0}}])}_itemContainer(){return this._$toolbarItemsContainer.find([`.${f}`,".dx-toolbar-center",`.${m}`].join(","))}_itemClass(){return"dx-toolbar-item"}_itemDataKey(){return"dxToolbarItemDataKey"}_dimensionChanged(e){this._disposed||(this._arrangeItems(),this._applyCompactMode())}_initMarkup(){this._renderToolbar(),this._renderSections(),super._initMarkup()}_render(){super._render(),this._updateDimensionsInMaterial()}_postProcessRenderItems(){this._arrangeItems()}_renderToolbar(){this.$element().addClass(p.TOOLBAR_CLASS),this._$toolbarItemsContainer=(0,a.default)("<div>").addClass("dx-toolbar-items-container").appendTo(this.$element()),this.setAria("role","toolbar")}_renderSections(){const e=this._$toolbarItemsContainer;(0,r.each)(["before","center","after"],((t,i)=>{const n=`dx-toolbar-${i}`;e.find(`.${n}`).length||(this[`_$${i}Section`]=(0,a.default)("<div>").addClass(n).attr("role","presentation").appendTo(e))}))}_arrangeItems(e){var t,i;const n=e??(0,d.getWidth)(this.$element());this._$centerSection.css({margin:"0 auto",float:"none"});const o=(0,l.getBoundingRect)(null===(t=this._$beforeSection)||void 0===t?void 0:t.get(0)),a=(0,l.getBoundingRect)(null===(i=this._$afterSection)||void 0===i?void 0:i.get(0));this._alignCenterSection(o,a,n);const s=this._$toolbarItemsContainer.find(`.${v}`).eq(0),r=s.parent();if(!s.length)return;const u=o.width?o.width:s.position().left,c=r.hasClass(f)?0:u,h=r.hasClass(m)?0:a.width;let p=0;r.children().not(`.${v}`).each(((e,t)=>{p+=(0,d.getOuterWidth)(t)}));const g=n-p,_=Math.max(g-c-h,0);if(r.hasClass(f))this._alignSection(this._$beforeSection,_);else{const e=(0,d.getOuterWidth)(s)-(0,d.getWidth)(s);s.css("maxWidth",_-e)}}_alignCenterSection(e,t,i){var n;this._alignSection(this._$centerSection,i-e.width-t.width);const o=this.option("rtlEnabled"),a=o?t:e,s=o?e:t,r=(0,l.getBoundingRect)(null===(n=this._$centerSection)||void 0===n?void 0:n.get(0));(a.right>r.left||r.right>s.left)&&this._$centerSection.css({marginLeft:a.width,marginRight:s.width,float:a.width>s.width?"none":"right"})}_alignSection(e,t){let i=e.find(`.${v}`).toArray();t-=this._getCurrentLabelsPaddings(i);const n=this._getCurrentLabelsWidth(i),o=Math.abs(n-t);t<n?(i=i.reverse(),this._alignSectionLabels(i,o,!1)):this._alignSectionLabels(i,o,!0)}_alignSectionLabels(e,t,i){const n=function(e){return(0,l.getBoundingRect)(e).width};for(let o=0;o<e.length;o++){const s=(0,a.default)(e[o]),r=Math.ceil(n(e[o]));let l;i&&s.css("maxWidth","inherit");const d=Math.ceil(i?n(e[o]):r);if(!(d<t)){l=i?r+t:r-t,s.css("maxWidth",l);break}l=i?d:0,t-=d,s.css("maxWidth",l)}}_applyCompactMode(){const e=(0,a.default)(this.element());e.removeClass(C),this.option("compactMode")&&this._getSummaryItemsSize("width",this._itemElements(),!0)>(0,d.getWidth)(e)&&e.addClass(C)}_getCurrentLabelsWidth(e){let t=0;return e.forEach((e=>{t+=(0,d.getOuterWidth)(e)})),t}_getCurrentLabelsPaddings(e){let t=0;return e.forEach((e=>{t+=(0,d.getOuterWidth)(e)-(0,d.getWidth)(e)})),t}_renderItem(e,t,i,n){const o=t.location??"center",a=i??this[`_$${o}Section`],s=!!(t.text??t.html),r=super._renderItem(e,t,a,n);return r.toggleClass("dx-toolbar-button",!s).toggleClass(v,s).addClass(t.cssClass),r}_renderGroupedItems(){(0,r.each)(this.option("items"),((e,t)=>{const i=t.items,n=(0,a.default)("<div>").addClass("dx-toolbar-group"),o=t.location??"center";i&&i.length&&((0,r.each)(i,((e,t)=>{this._renderItem(e,t,n,null)})),this._$toolbarItemsContainer.find(`.dx-toolbar-${o}`).append(n))}))}_renderItems(e){this.option("grouped")&&e.length&&e[0].items?this._renderGroupedItems():super._renderItems(e)}_getToolbarItems(){return this.option("items")??[]}_renderContentImpl(){const e=this._getToolbarItems();this.$element().toggleClass("dx-toolbar-mini",0===e.length),this._renderedItemsCount?this._renderItems(e.slice(this._renderedItemsCount)):this._renderItems(e),this._applyCompactMode()}_renderEmptyMessage(){}_clean(){this._$toolbarItemsContainer.children().empty(),this.$element().empty(),delete this._$beforeSection,delete this._$centerSection,delete this._$afterSection}_visibilityChanged(e){e&&this._arrangeItems()}_isVisible(){return(0,d.getWidth)(this.$element())>0&&(0,d.getHeight)(this.$element())>0}_getIndexByItem(e){return this._getToolbarItems().indexOf(e)}_itemOptionChanged(e,t,i,n){super._itemOptionChanged(e,t,i,n),this._arrangeItems()}_optionChanged(e){const{name:t}=e;switch(t){case"width":super._optionChanged(e),this._dimensionChanged();break;case"renderAs":case"useFlatButtons":case"useDefaultButtons":this._invalidate();break;case"compactMode":this._applyCompactMode();break;case"grouped":break;default:super._optionChanged(e)}}_dispose(){super._dispose(),clearTimeout(this._waitParentAnimationTimeout)}_updateDimensionsInMaterial(){if((0,c.isMaterial)()){const e=()=>new Promise((e=>{const t=()=>{let t=!0;return this.$element().parents().each(((e,i)=>{if(n.fx.isAnimating((0,a.default)(i)))return t=!1,!1})),t&&e(),t},i=()=>{clearTimeout(this._waitParentAnimationTimeout),this._waitParentAnimationTimeout=setTimeout((()=>t()||i()),15)};i()})),t=()=>{const e=this.$element().find(`.${v}`),t=[];return e.each(((e,i)=>{const n=(0,a.default)(i).text(),o=(0,a.default)(i).css("fontWeight");t.push((0,c.waitWebFont)(n,o))})),Promise.all(t)};Promise.all([e(),t()]).then((()=>{this._dimensionChanged()}))}}}(0,o.default)("dxToolbarBase",b);t.default=b},56044:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(i(92848)),o=l(i(30577)),a=i(58227),s=i(92227),r=i(63468);function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}class u extends o.default{_getDefaultOptions(){return d({},super._getDefaultOptions(),{menuItemTemplate:"menuItem",menuContainer:void 0,overflowMenuVisible:!1,multiline:!1})}_isMultiline(){return this.option("multiline")}_dimensionChanged(e){"height"!==e&&(super._dimensionChanged(),this._layoutStrategy._dimensionChanged())}_initMarkup(){super._initMarkup(),this._updateFocusableItemsTabIndex(),this._layoutStrategy._initMarkup()}_renderToolbar(){super._renderToolbar(),this._renderLayoutStrategy()}_itemContainer(){return this._isMultiline()?this._$toolbarItemsContainer:super._itemContainer()}_renderLayoutStrategy(){this.$element().toggleClass("dx-toolbar-multiline",this._isMultiline()),this._layoutStrategy=this._isMultiline()?new s.MultiLineStrategy(this):new r.SingleLineStrategy(this)}_renderSections(){if(!this._isMultiline())return super._renderSections()}_postProcessRenderItems(){this._layoutStrategy._hideOverflowItems(),this._layoutStrategy._updateMenuVisibility(),super._postProcessRenderItems(),this._layoutStrategy._renderMenuItems()}_renderItem(e,t,i,n){const o=super._renderItem(e,t,i,n);this._layoutStrategy._renderItem(t,o);const{widget:a,showText:s}=t;return"dxButton"===a&&"inMenu"===s&&o.toggleClass("dx-toolbar-text-auto-hide"),o}_getItemsWidth(){return this._layoutStrategy._getItemsWidth()}_getMenuItems(){return this._layoutStrategy._getMenuItems()}_getToolbarItems(){return this._layoutStrategy._getToolbarItems()}_arrangeItems(){if(this.$element().is(":hidden"))return;const e=this._layoutStrategy._arrangeItems();this._isMultiline()||super._arrangeItems(e)}_itemOptionChanged(e,t,i,n){this._isMenuItem(e)||super._itemOptionChanged(e,t,i,n),this._layoutStrategy._itemOptionChanged(e,t,i),"disabled"!==t&&"options.disabled"!==t||(0,a.toggleItemFocusableElementTabIndex)(this,e),"location"===t&&this.repaint()}_updateFocusableItemsTabIndex(){this._getToolbarItems().forEach((e=>(0,a.toggleItemFocusableElementTabIndex)(this,e)))}_isMenuItem(e){return"menu"===e.location||"always"===e.locateInMenu}_isToolbarItem(e){return void 0===e.location||"never"===e.locateInMenu}_optionChanged(e){const{name:t,value:i}=e;switch(this._layoutStrategy._optionChanged(t,i),t){case"menuContainer":case"menuItemTemplate":case"overflowMenuVisible":break;case"multiline":this._invalidate();break;case"disabled":super._optionChanged(e),this._updateFocusableItemsTabIndex();break;default:super._optionChanged(e)}}updateDimensions(){this._dimensionChanged()}}(0,n.default)("dxToolbar",u);t.default=u},58227:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.toggleItemFocusableElementTabIndex=function(e,t){var i;if(!e)return;const n=e._findItemElementByItem(t);if(!n.length)return;const l=e._getItemData(n),d=!!(null!==(i=l.options)&&void 0!==i&&i.disabled||l.disabled||e.option("disabled")),{widget:u}=l;if(u&&s.includes(u)){const e=n.find(u.toLowerCase().replace("dx",".dx-"));if(e.length){var c,h;const t=r(e);if(!t)return;let i=null===(c=t._focusTarget)||void 0===c?void 0:c.call(t);i="dxDropDownButton"===u?i&&i.find(`.${a}`):i??(0,o.default)(t.element());const n=null===(h=l.options)||void 0===h?void 0:h.tabIndex;d?i.attr("tabIndex",-1):i.attr("tabIndex",n??0)}}};var n,o=(n=i(64553))&&n.__esModule?n:{default:n};const a="dx-buttongroup",s=["dxAutocomplete","dxButton","dxCheckBox","dxDateBox","dxMenu","dxSelectBox","dxTabs","dxTextBox","dxButtonGroup","dxDropDownButton"],r=function(e){const t=e.data&&e.data(),i=t&&t.dxComponents,n=i&&i[0];return n&&t[n]}},92227:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MultiLineStrategy=void 0;var n=i(57653);t.MultiLineStrategy=class{constructor(e){this._toolbar=e}_initMarkup(){}_updateMenuVisibility(){}_renderMenuItems(){}_renderItem(){}_getMenuItems(){}_getToolbarItems(){return this._toolbar.option("items")??[]}_getItemsWidth(){return this._toolbar._getSummaryItemsSize("width",this._toolbar._itemElements(),!0)}_arrangeItems(){const e=this._toolbar._$toolbarItemsContainer.find(".dx-toolbar-label").eq(0);if(!e.length)return;const t=(0,n.getWidth)(this._toolbar.$element()),i=(0,n.getOuterWidth)(e)-(0,n.getWidth)(e);e.css("maxWidth",t-i)}_hideOverflowItems(){}_dimensionChanged(){}_itemOptionChanged(){}_optionChanged(){}}},63468:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SingleLineStrategy=void 0;var n=u(i(64553)),o=i(17781),a=i(31e3),s=i(52576),r=i(21274),l=i(57653),d=u(i(41437));function u(e){return e&&e.__esModule?e:{default:e}}const c="dx-state-invisible",h="dx-toolbar-item-auto-hide",p="dx-toolbar-item-invisible";t.SingleLineStrategy=class{constructor(e){this._toolbar=e}_initMarkup(){(0,o.deferRender)((()=>{this._renderOverflowMenu(),this._renderMenuItems()}))}_renderOverflowMenu(){if(!this._hasVisibleMenuItems())return;this._renderMenuButtonContainer();const e=(0,n.default)("<div>").appendTo(this._overflowMenuContainer()),t=this._toolbar._createActionByOption("onItemClick"),i=this._toolbar._getTemplateByOption("menuItemTemplate");this._menu=this._toolbar._createComponent(e,d.default,{disabled:this._toolbar.option("disabled"),itemTemplate:()=>i,onItemClick:e=>{t(e)},container:this._toolbar.option("menuContainer"),onOptionChanged:e=>{let{name:t,value:i}=e;"opened"===t&&this._toolbar.option("overflowMenuVisible",i),"items"===t&&this._updateMenuVisibility(i)}})}renderMenuItems(){this._menu||this._renderOverflowMenu(),this._menu&&this._menu.option("items",this._getMenuItems()),this._menu&&!this._menu.option("items").length&&this._menu.option("opened",!1)}_renderMenuButtonContainer(){this._$overflowMenuContainer=(0,n.default)("<div>").appendTo(this._toolbar._$afterSection).addClass("dx-toolbar-button").addClass("dx-toolbar-menu-container")}_overflowMenuContainer(){return this._$overflowMenuContainer}_updateMenuVisibility(e){const t=e??this._getMenuItems(),i=t.length&&this._hasVisibleMenuItems(t);this._toggleMenuVisibility(i)}_toggleMenuVisibility(e){this._overflowMenuContainer()&&this._overflowMenuContainer().toggleClass(c,!e)}_renderMenuItems(){(0,o.deferRender)((()=>{this.renderMenuItems()}))}_dimensionChanged(){this.renderMenuItems()}_getToolbarItems(){return(0,o.grep)(this._toolbar.option("items")??[],(e=>!this._toolbar._isMenuItem(e)))}_getHiddenItems(){return this._toolbar._itemContainer().children(`.${h}.${p}`).not(`.${c}`)}_getMenuItems(){const e=(0,o.grep)(this._toolbar.option("items")??[],(e=>this._toolbar._isMenuItem(e))),t=this._getHiddenItems();this._restoreItems=this._restoreItems??[];return[...[].slice.call(t).map((e=>{const t=this._toolbar._getItemData(e),i=(0,n.default)(e),o=i.children();return(0,s.extend)({menuItemTemplate:()=>{this._restoreItems.push({container:i,item:o});return(0,n.default)("<div>").addClass(h).append(o)}},t)})),...e]}_hasVisibleMenuItems(e){const t=e??this._toolbar.option("items");let i=!1;const n=(0,a.compileGetter)("visible"),o=(0,a.compileGetter)("locateInMenu");return(0,r.each)(t,((e,t)=>{const a=n(t,{functionsAsIs:!0}),s=o(t,{functionsAsIs:!0});(!1===a||"auto"!==s&&"always"!==s)&&"menu"!==t.location||(i=!0)})),i}_arrangeItems(){this._toolbar._$centerSection.css({margin:"0 auto",float:"none"}),(0,r.each)(this._restoreItems??[],((e,t)=>{(0,n.default)(t.container).append(t.item)})),this._restoreItems=[];const e=(0,l.getWidth)(this._toolbar.$element());return this._hideOverflowItems(e),e}_hideOverflowItems(e){const t=this._toolbar.$element().find(`.${h}`);if(!t.length)return;const i=e??(0,l.getWidth)(this._toolbar.$element());(0,n.default)(t).removeClass(p);let o=this._getItemsWidth();for(;t.length&&i<o;){t.eq(-1).addClass(p),o=this._getItemsWidth(),t.splice(-1,1)}}_getItemsWidth(){return this._toolbar._getSummaryItemsSize("width",[this._toolbar._$beforeSection,this._toolbar._$centerSection,this._toolbar._$afterSection])}_itemOptionChanged(e,t,i){var n;if(("disabled"===t||"options.disabled"===t)&&this._toolbar._isMenuItem(e))return void(null===(n=this._menu)||void 0===n||n._itemOptionChanged(e,t,i));this.renderMenuItems()}_renderItem(e,t){"auto"===e.locateInMenu&&t.addClass(h)}_optionChanged(e,t){var i,n,o,a,s;switch(e){case"disabled":null===(i=this._menu)||void 0===i||i.option(e,t);break;case"overflowMenuVisible":null===(n=this._menu)||void 0===n||n.option("opened",t);break;case"onItemClick":null===(o=this._menu)||void 0===o||o.option(e,t);break;case"menuContainer":null===(a=this._menu)||void 0===a||a.option("container",t);break;case"menuItemTemplate":null===(s=this._menu)||void 0===s||s.option("itemTemplate",t)}}}},33476:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.hide=function(){if(!d)return(0,o.Deferred)().resolve();return d.hide().done(h).promise()},t.show=function(e){return h(),c(e),d.show()};var n=l(i(64553)),o=i(87739),a=i(52576),s=i(55355),r=l(i(93370));function l(e){return e&&e.__esModule?e:{default:e}}let d=null,u=null;const c=function(e){e=(0,a.extend)({position:"top"},e);const{content:t}=e;delete e.content;const i=(0,n.default)("<div>").html(t).appendTo((0,s.value)());u=function(){i.remove()},d=new r.default(i,e)},h=function(){d&&(u(),d=null)}},61897:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(16826),o=i(64044),a=T(i(92774)),s=i(5636),r=T(i(89797)),l=i(98834),d=T(i(4671)),u=T(i(64960)),c=i(61404),h=T(i(64553)),p=i(17781),g=i(87739),_=i(52576),f=i(69629),m=i(21274),v=i(57653),C=i(11528),y=i(3104),b=T(i(94319)),x=T(i(52891)),w=T(i(11979)),S=T(i(20876)),D=T(i(85991)),I=i(21363),E=i(91524);function T(e){return e&&e.__esModule?e:{default:e}}const A="dx-treeview",O=`${A}-node`,P=`${O}-container`,k=`${O}-loadindicator`,M=`${O}-container-opened`,R=`${O}-is-leaf`,L=`${A}-item`,B=`${L}-with-checkbox`,V=`${L}-with-custom-expander-icon`,F=`${A}-custom-expander-icon-item-container`,H=`${L}-without-checkbox`,N=`${L}-data`,z=`${A}-toggle-item-visibility`,W=`${A}-custom-collapse-icon`,$=`${A}-custom-expand-icon`,G=`${A}-loadindicator`,j=`${A}-loadindicator-wrapper`,U=`${A}-toggle-item-visibility-opened`,K=`${A}-select-all-item`,Z="dx-state-invisible",q="dx-state-disabled",Y="dxTreeView_expand",X="data-item-id",Q="dx-checkbox",J=`${A}-root-node`,ee=`${A}-expander-icon-stub`,te=x.default.inherit({_supportedKeys(e){const t=e=>{const t=(0,h.default)(this.option("focusedElement"));if(!t.length)return;e.target=t,e.currentTarget=t,this._itemClickHandler(e,t.children(`.${L}`));this._getEventNameByOption(this.option("expandEvent"))===(0,l.addNamespace)(o.name,Y)&&this._expandEventHandler(e)},i=e=>{e.preventDefault();const t=(0,h.default)(this.option("focusedElement")),i=this._getCheckBoxInstance(t);if(!i.option("disabled")){const e=i.option("value");this._updateItemSelection(!e,t.find(`.${L}`).get(0),!0)}},n=function(e,t){if(!this.option("expandAllEnabled"))return;t.preventDefault();const i=(0,h.default)(this.option("focusedElement"));if(!i.length)return;const n=this._getItemData(i.find(`.${L}`));this._toggleExpandedNestedItems([n],e)};return(0,_.extend)(this.callBase(),{enter:this._showCheckboxes()?i:t,space:this._showCheckboxes()?i:t,asterisk:n.bind(this,!0),minus:n.bind(this,!1)})},_toggleExpandedNestedItems(e,t){if(e)for(let i=0,n=e.length;i<n;i++){const n=e[i],o=this._dataAdapter.getNodeByItem(n);this._toggleExpandedState(o,t),this._toggleExpandedNestedItems(n.items,t)}},_getNodeElement(e,t){const i=this._encodeString(e.internalFields.key);if(t)return t.$nodeByKey||(t.$nodeByKey={},this.$element().find(`.${O}`).each((function(){const e=(0,h.default)(this),i=e.attr(X);t.$nodeByKey[i]=e}))),t.$nodeByKey[i]||(0,h.default)();const n=this.$element().get(0).querySelector(`[${X}="${i}"]`);return(0,h.default)(n)},_activeStateUnit:`.${L}`,_widgetClass:()=>A,_getDefaultOptions(){const e=(0,_.extend)(this.callBase(),{animationEnabled:!0,dataStructure:"tree",deferRendering:!0,expandAllEnabled:!1,hasItemsExpr:"hasItems",selectNodesRecursive:!0,expandNodesRecursive:!0,showCheckBoxesMode:"none",expandIcon:null,collapseIcon:null,selectAllText:d.default.format("dxList-selectAll"),onItemSelectionChanged:null,onItemExpanded:null,onItemCollapsed:null,scrollDirection:"vertical",useNativeScrolling:!0,virtualModeEnabled:!1,rootValue:0,focusStateEnabled:!1,selectionMode:"multiple",expandEvent:"dblclick",selectByClick:!1,createChildren:null,onSelectAllValueChanged:null,_supportItemUrl:!1});return(0,_.extend)(!0,e,{integrationOptions:{useDeferUpdateForTemplates:!1}})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>!D.default.nativeScrolling,options:{useNativeScrolling:!1}}])},_initSelectedItems:p.noop,_syncSelectionOptions:p.asyncNoop,_fireSelectionChanged(){const e=this._selectionChangePromise;(0,g.when)(e).done((()=>{this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})()}))},_createSelectAllValueChangedAction(){this._selectAllValueChangedAction=this._createActionByOption("onSelectAllValueChanged",{excludeValidators:["disabled","readOnly"]})},_fireSelectAllValueChanged(e){this._selectAllValueChangedAction({value:e})},_checkBoxModeChange(e,t){const i=this.option("searchEnabled"),n=this._selectAllEnabled(t),o=this._itemContainer(i,n);if(this._detachClickEvent(o),this._detachExpandEvent(o),"none"===t||"none"===e)return;const a=this._$selectAllItem&&this._$selectAllItem.length;switch(e){case"selectAll":a||(this._createSelectAllValueChangedAction(),this._renderSelectAllItem());break;case"normal":a&&(this._$selectAllItem.remove(),delete this._$selectAllItem)}},_removeSelection(){const e=this;(0,m.each)(this._dataAdapter.getFullData(),((t,i)=>{e._hasChildren(i)&&e._dataAdapter.toggleSelection(i.internalFields.key,!1,!0)}))},_optionChanged(e){const{name:t,value:i,previousValue:n}=e;switch(t){case"selectAllText":this._$selectAllItem&&this._$selectAllItem.dxCheckBox("instance").option("text",i);break;case"showCheckBoxesMode":this._checkBoxModeChange(i,n),this._invalidate();break;case"scrollDirection":this.getScrollable().option("direction",i);break;case"useNativeScrolling":this.getScrollable().option("useNative",i);break;case"items":delete this._$selectAllItem,this.callBase(e);break;case"dataSource":this.callBase(e),this._initDataAdapter(),this._filter={};break;case"hasItemsExpr":this._initAccessors(),this.repaint();break;case"expandEvent":this._attachExpandEvent();break;case"deferRendering":case"dataStructure":case"rootValue":case"createChildren":case"expandNodesRecursive":case"onItemSelectionChanged":case"onItemExpanded":case"onItemCollapsed":case"expandAllEnabled":case"animationEnabled":case"virtualModeEnabled":case"selectByClick":case"_supportItemUrl":break;case"selectionMode":this._initDataAdapter(),this.callBase(e);break;case"onSelectAllValueChanged":this._createSelectAllValueChangedAction();break;case"selectNodesRecursive":this._dataAdapter.setOption("recursiveSelection",e.value),this.repaint();break;case"expandIcon":case"collapseIcon":this.repaint();break;default:this.callBase(e)}},_initDataSource(){this._useCustomChildrenLoader()?this._loadChildrenByCustomLoader(null).done((e=>{e&&e.length&&this.option("items",e)})):(this.callBase(),this._isVirtualMode()&&this._initVirtualMode())},_initVirtualMode(){const e=this._filter;e.custom||(e.custom=this._dataSource.filter()),e.internal||(e.internal=[this.option("parentIdExpr"),this.option("rootValue")])},_useCustomChildrenLoader(){return(0,C.isFunction)(this.option("createChildren"))&&this._isDataStructurePlain()},_loadChildrenByCustomLoader(e){const t=this.option("createChildren").call(this,e);return Array.isArray(t)?(0,g.Deferred)().resolve(t).promise():t&&(0,C.isFunction)(t.then)?(0,g.fromPromise)(t):(0,g.Deferred)().resolve([]).promise()},_combineFilter(){return this._filter.custom&&this._filter.custom.length?[this._filter.custom,this._filter.internal]:this._filter.internal},_dataSourceLoadErrorHandler(){this._renderEmptyMessage()},_init(){this._filter={},this.callBase(),this._initStoreChangeHandlers()},_dataSourceChangedHandler(e){const t=this.option("items");this._initialized&&this._isVirtualMode()&&t.length||this.option("items",e)},_removeTreeViewLoadIndicator(){this._treeViewLoadIndicator&&(this._treeViewLoadIndicator.remove(),this._treeViewLoadIndicator=null)},_createTreeViewLoadIndicator(){return this._treeViewLoadIndicator=(0,h.default)("<div>").addClass(G),this._createComponent(this._treeViewLoadIndicator,w.default,{}),this._treeViewLoadIndicator},_dataSourceLoadingChangedHandler(e){let t;if(this._isVirtualMode()&&(t=this._combineFilter(),this._dataSource.filter(t)),e&&!this._dataSource.isLoaded()){this.option("items",[]);const e=(0,h.default)("<div>").addClass(j);this._createTreeViewLoadIndicator().appendTo(e),this.itemsContainer().append(e),this._isVirtualMode()&&this._dataSource.filter()!==t&&this._dataSource.filter([])}else this._removeTreeViewLoadIndicator()},_initStoreChangeHandlers(){"plain"===this.option("dataStructure")&&this._dataSource&&this._dataSource.store().on("inserted",(e=>{this.option().items=this.option("items").concat(e),this._dataAdapter.addItem(e),this._dataAdapter.isFiltered(e)&&this._updateLevel(this._parentIdGetter(e))})).on("removed",(e=>{const t=this._dataAdapter.getNodeByKey(e);(0,C.isDefined)(t)&&(this.option("items")[this._dataAdapter.getIndexByKey(t.internalFields.key)]=0,this._markChildrenItemsToRemove(t),this._removeItems(),this._dataAdapter.removeItem(e),this._updateLevel(this._parentIdGetter(t)))}))},_markChildrenItemsToRemove(e){const t=e.internalFields.childrenKeys;(0,m.each)(t,((e,t)=>{this.option("items")[this._dataAdapter.getIndexByKey(t)]=0,this._markChildrenItemsToRemove(this._dataAdapter.getNodeByKey(t))}))},_removeItems(){const e=(0,_.extend)(!0,[],this.option("items"));let t=0;(0,m.each)(e,((e,i)=>{i||(this.option("items").splice(e-t,1),t++)}))},_updateLevel(e){const t=this._getContainerByParentKey(e);this._renderItems(t,this._dataAdapter.getChildrenNodes(e))},_getOldContainer(e){if(e.length)return e.children(`.${P}`);const t=this.getScrollable();return t?(0,h.default)(t.content()).children():(0,h.default)()},_getContainerByParentKey(e){const t=this._dataAdapter.getNodeByKey(e),i=t?this._getNodeElement(t):[];this._getOldContainer(i).remove();const n=this._renderNodeContainer(i);if(this._isRootLevel(e)){const e=this.getScrollable();e||this._renderScrollableContainer(),(0,h.default)(e.content()).append(n)}return n},_isRootLevel(e){return e===this.option("rootValue")},_getAccessors(){const e=this.callBase();return e.push("hasItems"),e},_getDataAdapterOptions(){var e,t;return{rootValue:this.option("rootValue"),multipleSelection:!this._isSingleSelection(),recursiveSelection:this._isRecursiveSelection(),recursiveExpansion:this.option("expandNodesRecursive"),selectionRequired:this.option("selectionRequired"),dataType:this.option("dataStructure"),sort:this._dataSource&&this._dataSource.sort(),langParams:null===(e=this._dataSource)||void 0===e||null===(t=e.loadOptions)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t.langParams}},_initMarkup(){this._renderScrollableContainer(),this._renderEmptyMessage(this._dataAdapter.getRootNodes()),this.callBase(),this._setAriaRole()},_setAriaRole(){const{items:e}=this.option();null!=e&&e.length&&this.setAria({role:"tree"})},_renderContentImpl(){const e=this._renderNodeContainer();(0,h.default)(this.getScrollable().content()).append(e),this.option("items")&&this.option("items").length&&(this._renderItems(e,this._dataAdapter.getRootNodes()),this._attachExpandEvent(),this._selectAllEnabled()&&(this._createSelectAllValueChangedAction(),this._renderSelectAllItem(e)))},_isVirtualMode(){return this.option("virtualModeEnabled")&&this._isDataStructurePlain()&&!!this.option("dataSource")},_isDataStructurePlain(){return"plain"===this.option("dataStructure")},_fireContentReadyAction(){const e=this.getDataSource(),t=e&&!e.isLoaded()||this._skipContentReadyAndItemExpanded,i=this.getScrollable();i&&(0,y.hasWindow)()&&i.update(),t||this.callBase(),i&&(0,y.hasWindow)()&&i.update()},_renderScrollableContainer(){this._scrollable=this._createComponent((0,h.default)("<div>").appendTo(this.$element()),S.default,{useNative:this.option("useNativeScrolling"),direction:this.option("scrollDirection"),useKeyboard:!1})},_renderNodeContainer(e){const t=(0,h.default)("<ul>").addClass(P);if(this.setAria("role","group",t),e&&e.length){const i=this._getItemData(e.children(`.${L}`));this._expandedGetter(i)&&t.addClass(M),t.appendTo(e)}return t},_createDOMElement(e,t){var i;const n=(0,h.default)("<li>").addClass(O).attr(X,this._encodeString(t.internalFields.key)).prependTo(e),o={role:"treeitem",label:this._displayGetter(t.internalFields.item)||"",level:this._getLevel(e)};return!(null==t||null===(i=t.internalFields)||void 0===i||null===(i=i.childrenKeys)||void 0===i||!i.length)&&(o.expanded=t.internalFields.expanded||!1),this.setAria(o,n),n},_getLevel(e){const t=e.parent();return t.hasClass("dx-scrollable-content")?1:parseInt(t.attr("aria-level"))+1},_showCheckboxes(){return"none"!==this.option("showCheckBoxesMode")},_hasCustomExpanderIcons(){return this.option("expandIcon")||this.option("collapseIcon")},_selectAllEnabled(e){return"selectAll"===(e??this.option("showCheckBoxesMode"))&&!this._isSingleSelection()},_renderItems(e,t){for(let i=t.length-1;i>=0;i--)this._renderItem(i,t[i],e);this._renderedItemsCount+=t.length},_renderItem(e,t,i){const n=this._createDOMElement(i,t),o=t.internalFields,a=this._showCheckboxes();n.addClass(a?B:H),n.toggleClass(Z,!1===o.item.visible),this._hasCustomExpanderIcons()&&(n.addClass(V),i.addClass(F)),this.setAria("selected",o.selected,n),this._toggleSelectedClass(n,o.selected),o.disabled&&this.setAria("disabled",o.disabled,n),this.callBase(this._renderedItemsCount+e,o.item,n);this._getNode(t.internalFields.parentKey)||n.addClass(J),!1!==o.item.visible&&this._renderChildren(n,t)},_setAriaSelectionAttribute:p.noop,_renderChildren(e,t){if(!this._hasChildren(t))return this._addLeafClass(e),void(0,h.default)("<div>").addClass(ee).appendTo(this._getItem(e));this._hasCustomExpanderIcons()?this._renderCustomExpanderIcons(e,t):this._renderDefaultExpanderIcons(e,t),this._shouldRenderSublevel(t.internalFields.expanded)&&this._loadSublevel(t).done((i=>{this._renderSublevel(e,this._getActualNode(t),i)}))},_shouldRenderSublevel(e){return e||!this.option("deferRendering")},_getActualNode(e){return this._dataAdapter.getNodeByKey(e.internalFields.key)},_hasChildren(e){return this._isVirtualMode()||this._useCustomChildrenLoader()?!1!==this._hasItemsGetter(e.internalFields.item):this.callBase(e)},_loadSublevel(e){const t=(0,g.Deferred)(),i=this._getChildNodes(e);return i.length?t.resolve(i):this._loadNestedItems(e).done((e=>{t.resolve(this._dataAdapter.getNodesByItems(e))})),t.promise()},_getItemExtraPropNames:()=>["url","linkAttr"],_addContent(e,t){const{html:i,url:n}=t;if(this.option("_supportItemUrl")&&n){e.html(i);const n=this._getLinkContainer(this._getIconContainer(t),this._getTextContainer(t),t);e.append(n)}else this.callBase(e,t)},_postprocessRenderItem(e){const{itemData:t,itemElement:i}=e;this._showCheckboxes()&&this._renderCheckBox(i,this._getNode(t)),this.callBase(e)},_renderSublevel(e,t,i){const n=this._renderNodeContainer(e,t),o=i.filter((e=>-1!==t.internalFields.childrenKeys.indexOf(e.internalFields.key)));if(this._renderItems(n,o),o.length&&!t.internalFields.selected){const e=o[0];this._updateParentsState(e,this._getNodeElement(e))}this._normalizeIconState(e,o.length),t.internalFields.expanded&&n.addClass(M)},_executeItemRenderAction(e,t,i){const n=this._getNode(i);this._getItemRenderAction()({itemElement:i,itemIndex:e,itemData:t,node:this._dataAdapter.getPublicNode(n)})},_addLeafClass(e){e.addClass(R)},_expandEventHandler(e){(0,h.default)(e.currentTarget.parentNode).hasClass(R)||this._toggleExpandedState(e.currentTarget,void 0,e)},_attachExpandEvent(){const e=this._getEventNameByOption(this.option("expandEvent")),t=this._itemContainer();this._detachExpandEvent(t),a.default.on(t,e,this._itemSelector(),this._expandEventHandler.bind(this))},_detachExpandEvent(e){a.default.off(e,`.${Y}`,this._itemSelector())},_getEventNameByOption(e){const t="click"===e?o.name:s.name;return(0,l.addNamespace)(t,Y)},_getNode(e){if(!(0,C.isDefined)(e))return null;if(e.internalFields)return e;if((0,C.isPrimitive)(e))return this._dataAdapter.getNodeByKey(e);const t=(0,h.default)(e).get(0);return t?u.default.isElementNode(t)?this._getNodeByElement(t):this._dataAdapter.getNodeByItem(t):null},_getNodeByElement(e){const t=(0,h.default)(e).closest(`.${O}`),i=this._decodeString(t.attr(X));return this._dataAdapter.getNodeByKey(i)},_toggleExpandedState(e,t,i){const n=this._getNode(e);if(!n)return(0,g.Deferred)().reject().promise();if(n.internalFields.disabled)return(0,g.Deferred)().reject().promise();const o=n.internalFields.expanded;if(o===t)return(0,g.Deferred)().resolve().promise();if(this._hasChildren(n)){const e=this._getNodeElement(n);if(e.find(`.${k}:not(.${Z})`).length)return(0,g.Deferred)().reject().promise();o||this._nodeHasRenderedChildren(e)||this._createLoadIndicator(e)}return(0,C.isDefined)(t)||(t=!o),this._dataAdapter.toggleExpansion(n.internalFields.key,t),this._updateExpandedItemsUI(n,t,i)},_nodeHasRenderedChildren:e=>e.children(`.${P}`).not(":empty").length,_getItem:e=>e.children(`.${L}`).eq(0),_createLoadIndicator(e){const t=this._getItem(e);this._createComponent((0,h.default)("<div>").addClass(k),w.default,{}).$element().appendTo(t);t.children(`.${z},.${$}`).hide()},_renderExpanderIcon(e,t,i,n){i.appendTo(this._getItem(e)),i.addClass(n),t.internalFields.disabled&&i.addClass(q),this._renderToggleItemVisibilityIconClick(i,t)},_renderDefaultExpanderIcons(e,t){const i=this._getItem(e),n=(0,h.default)("<div>").addClass(z).appendTo(i);t.internalFields.expanded&&(n.addClass(U),e.parent().addClass(M)),t.internalFields.disabled&&n.addClass(q),this._renderToggleItemVisibilityIconClick(n,t)},_renderCustomExpanderIcons(e,t){const{expandIcon:i,collapseIcon:n}=this.option(),o=(0,f.getImageContainer)(i??n),a=(0,f.getImageContainer)(n??i);this._renderExpanderIcon(e,t,o,$),this._renderExpanderIcon(e,t,a,W);const s=t.internalFields.expanded;s&&e.parent().addClass(M),this._toggleCustomExpanderIcons(o,a,s)},_renderToggleItemVisibilityIconClick(e,t){const i=(0,l.addNamespace)(o.name,this.NAME);a.default.off(e,i),a.default.on(e,i,(e=>(this._toggleExpandedState(t.internalFields.key,void 0,e),!1)))},_toggleCustomExpanderIcons(e,t,i){t.toggle(i),e.toggle(!i)},_updateExpandedItemsUI(e,t,i){const n=this._getNodeElement(e),o=!n.length||t&&n.is(":hidden");if(this.option("expandNodesRecursive")&&o){const n=this._getNode(e.internalFields.parentKey);n&&this._updateExpandedItemsUI(n,t,i)}if(this._hasCustomExpanderIcons()){if(this._nodeHasRenderedChildren(n)){const e=this._getItem(n),i=e.children(`.${$}`),o=e.children(`.${W}`);this._toggleCustomExpanderIcons(i,o,t)}}else{this._getItem(n).children(`.${z}`).toggleClass(U,t)}const a=n.children(`.${P}`),s=a.length>0,r=(0,g.Deferred)();return!t||s&&!a.is(":empty")?(this._animateNodeContainer(e,t,i,r),r.promise()):0===e.internalFields.childrenKeys.length&&(this._isVirtualMode()||this._useCustomChildrenLoader())?(this._loadNestedItemsWithUpdate(e,t,i,r),r.promise()):(this._renderSublevel(n,e,this._getChildNodes(e)),this._fireContentReadyAction(),this._animateNodeContainer(e,t,i,r),r.promise())},_loadNestedItemsWithUpdate(e,t,i,n){const o=this._getNodeElement(e);this._loadNestedItems(e).done((a=>{const s=this._getActualNode(e);this._renderSublevel(o,s,this._dataAdapter.getNodesByItems(a)),a&&a.length?(this._fireContentReadyAction(),this._animateNodeContainer(s,t,i,n)):n.resolve()}))},_loadNestedItems(e){if(this._useCustomChildrenLoader()){const t=this._dataAdapter.getPublicNode(e);return this._loadChildrenByCustomLoader(t).done((e=>{this._areNodesExists(e)||this._appendItems(e)}))}return this._isVirtualMode()?(this._filter.internal=[this.option("parentIdExpr"),e.internalFields.key],this._dataSource.filter(this._combineFilter()),this._dataSource.load().done((e=>{this._areNodesExists(e)||this._appendItems(e)}))):(0,g.Deferred)().resolve([]).promise()},_areNodesExists(e,t){const i=this.keyOf(e[0]),n=this._dataAdapter.getFullData();return!!this._dataAdapter.getNodeByKey(i,n)},_appendItems(e){this.option().items=this.option("items").concat(e),this._initDataAdapter()},_animateNodeContainer(e,t,i,o){const a=this._getNodeElement(e),s=a.children(`.${P}`);e&&o&&0===s.length&&o.resolve(),s.addClass(M);const r=(0,v.getHeight)(s);n.fx.stop(s,!0),n.fx.animate(s,{type:"custom",duration:this.option("animationEnabled")?400:0,from:{maxHeight:t?0:r},to:{maxHeight:t?r:0},complete:function(){s.css("maxHeight","none"),s.toggleClass(M,t),this.setAria("expanded",t,a),this.getScrollable().update(),this._fireExpandedStateUpdatedEvent(t,e,i),o&&o.resolve()}.bind(this)})},_fireExpandedStateUpdatedEvent(e,t,i){if(!this._hasChildren(t)||this._skipContentReadyAndItemExpanded)return;const n=e?"onItemExpanded":"onItemCollapsed";if((0,C.isDefined)(i))this._itemDXEventHandler(i,n,{node:this._dataAdapter.getPublicNode(t)});else{const e=this._getNodeElement(t);this._itemEventHandler(e,n,{event:i,node:this._dataAdapter.getPublicNode(t)})}},_normalizeIconState(e,t){const i=e.find(`.${k}`);var n;i.length&&(null===(n=w.default.getInstance(i))||void 0===n||n.option("visible",!1));const o=this._getItem(e).children(`.${W},.${z}`);t?o.show():(o.removeClass(z),e.addClass(R))},_emptyMessageContainer(){const e=this.getScrollable();return e?(0,h.default)(e.content()):this.callBase()},_renderContent(){const e=this.option("items");e&&e.length&&(this._contentAlreadyRendered=!0),this.callBase()},_renderSelectAllItem(e){const{selectAllText:t,focusStateEnabled:i}=this.option();e=e||this.$element().find(`.${P}`).first(),this._$selectAllItem=(0,h.default)("<div>").addClass(K);const n=this._dataAdapter.isAllSelected();this._createComponent(this._$selectAllItem,b.default,{value:n,elementAttr:{"aria-label":"Select All"},text:t,focusStateEnabled:i,onValueChanged:this._onSelectAllCheckboxValueChanged.bind(this),onInitialized:e=>{let{component:t}=e;t.registerKeyHandler("enter",(()=>{t.option("value",!t.option("value"))}))}}),this._toggleSelectedClass(this._$selectAllItem,n),e.before(this._$selectAllItem)},_onSelectAllCheckboxValueChanged(e){this._toggleSelectAll(e),this._fireSelectAllValueChanged(e.value)},_toggleSelectAll(e){this._dataAdapter.toggleSelectAll(e.value),this._updateItemsUI(),this._fireSelectionChanged()},_renderCheckBox(e,t){const i=(0,h.default)("<div>").appendTo(e);this._createComponent(i,b.default,{value:t.internalFields.selected,onValueChanged:this._changeCheckboxValue.bind(this),focusStateEnabled:!1,elementAttr:{"aria-label":d.default.format("CheckState")},disabled:this._disabledGetter(t)})},_toggleSelectedClass(e,t){e.toggleClass("dx-state-selected",!!t)},_toggleNodeDisabledState(e,t){const i=this._getNodeElement(e),n=i.find(`.${L}`).eq(0);if(this._dataAdapter.toggleNodeDisabledState(e.internalFields.key,t),n.toggleClass(q,!!t),this._showCheckboxes()){this._getCheckBoxInstance(i).option("disabled",!!t)}},_itemOptionChanged(e,t,i){const n=this._dataAdapter.getNodeByItem(e);t===this.option("disabledExpr")&&this._toggleNodeDisabledState(n,i)},_changeCheckboxValue(e){const t=(0,h.default)(e.element).closest(`.${O}`),i=this._getItem(t),n=this._getItemData(i),o=this._getNodeByElement(i),{value:a}=e;o&&o.internalFields.selected===a||this._updateItemSelection(a,n,e.event)},_isSingleSelection(){return"single"===this.option("selectionMode")},_isRecursiveSelection(){return this.option("selectNodesRecursive")&&"single"!==this.option("selectionMode")},_isLastSelectedBranch(e,t,i){const n=t.indexOf(e.key);return n>=0&&t.splice(n,1),i&&(0,m.each)(e.children,((e,i)=>{this._isLastSelectedBranch(i,t,!0)})),e.parent&&this._isLastSelectedBranch(e.parent,t),0===t.length},_isLastRequired(e){const t=this.option("selectionRequired"),i=this._isSingleSelection(),n=this.getSelectedNodeKeys();if(t)return i?1===n.length:this._isLastSelectedBranch(e.internalFields.publicNode,n.slice(),!0)},_updateItemSelection(e,t,i){const n=this._getNode(t);if(!n||!1===n.visible)return!1;if(n.internalFields.selected===e)return!0;if(!e&&this._isLastRequired(n)){if(this._showCheckboxes()){const e=this._getNodeElement(n);this._getCheckBoxInstance(e).option("value",!0)}return!1}if(e&&this._isSingleSelection()){const e=this.getSelectedNodeKeys();(0,m.each)(e,((e,t)=>{this._dataAdapter.toggleSelection(t,!1),this._updateItemsUI(),this._fireItemSelectionChanged(this._getNode(t))}))}this._dataAdapter.toggleSelection(n.internalFields.key,e);const o=this._dataAdapter.isAllSelected(),a=this._selectAllEnabled()&&this._$selectAllItem.dxCheckBox("instance").option("value")!==o;return this._updateItemsUI(),this._fireItemSelectionChanged(n,i),this._fireSelectionChanged(),a&&this._fireSelectAllValueChanged(o),!0},_fireItemSelectionChanged(e,t){const i=t||this._findItemElementByItem(e.internalFields.item);(t?this._itemDXEventHandler:this._itemEventHandler).call(this,i,"onItemSelectionChanged",{node:this._dataAdapter.getPublicNode(e),itemData:e.internalFields.item})},_getCheckBoxInstance(e){return this._getItem(e).children(`.${Q}`).dxCheckBox("instance")},_updateItemsUI(){const e={};if((0,m.each)(this._dataAdapter.getData(),((t,i)=>{const n=this._getNodeElement(i,e),o=i.internalFields.selected;n.length&&(this._toggleSelectedClass(n,o),this.setAria("selected",o,n),this._showCheckboxes()&&this._getCheckBoxInstance(n).option("value",o))})),this._selectAllEnabled()){const e=this._$selectAllItem.dxCheckBox("instance");e.option("onValueChanged",void 0),e.option("value",this._dataAdapter.isAllSelected()),e.option("onValueChanged",this._onSelectAllCheckboxValueChanged.bind(this))}},_updateParentsState(e,t){if(!t)return;const i=this._dataAdapter.getNodeByKey(e.internalFields.parentKey),n=(0,h.default)(t.parents(`.${O}`)[0]);if(this._showCheckboxes()){const e=i.internalFields.selected;this._getCheckBoxInstance(n).option("value",e),this._toggleSelectedClass(n,e)}i.internalFields.parentKey!==this.option("rootValue")&&this._updateParentsState(i,n)},_itemEventHandlerImpl(e,t,i){const n=(0,h.default)(e).closest(`.${O}`).children(`.${L}`);return t((0,_.extend)(this._extendActionArgs(n),i))},_itemContextMenuHandler(e){this._createEventHandler("onItemContextMenu",e)},_itemHoldHandler(e){this._createEventHandler("onItemHold",e)},_createEventHandler(e,t){const i=this._getNodeByElement(t.currentTarget);this._itemDXEventHandler(t,e,{node:this._dataAdapter.getPublicNode(i)})},_itemClass:()=>L,_itemDataKey:()=>N,_attachClickEvent(){const e=this._itemContainer();this._detachClickEvent(e);const{clickEventNamespace:t,itemSelector:i,pointerDownEventNamespace:n,nodeSelector:o}=this._getItemClickEventData();a.default.on(e,t,i,(e=>{(0,h.default)(e.target).hasClass("dx-checkbox-icon")||(0,h.default)(e.target).hasClass(Q)||this._itemClickHandler(e,(0,h.default)(e.currentTarget))})),a.default.on(e,n,o,(e=>{this._itemPointerDownHandler(e)}))},_detachClickEvent(e){const{clickEventNamespace:t,itemSelector:i,pointerDownEventNamespace:n,nodeSelector:o}=this._getItemClickEventData();a.default.off(e,t,i),a.default.off(e,n,o)},_getItemClickEventData(){const e=`.${this._itemClass()}`,t=`.${O}, .${K}`;return{clickEventNamespace:(0,l.addNamespace)(o.name,this.NAME),itemSelector:e,pointerDownEventNamespace:(0,l.addNamespace)(r.default.down,this.NAME),nodeSelector:t}},_itemClick(e){const t=e.args[0],i=(t.event.target[0]||t.event.target).getElementsByClassName("dx-item-url")[0];t.itemData.url&&i&&i.click()},_itemClickHandler(e,t){const i=this._getItemData(t),n=this._getNodeByElement(t);this._itemDXEventHandler(e,"onItemClick",{node:this._dataAdapter.getPublicNode(n)},{beforeExecute:this._itemClick}),this.option("selectByClick")&&!e.isDefaultPrevented()&&this._updateItemSelection(!n.internalFields.selected,i,e)},_updateSelectionToFirstItem(e,t){let i=t;for(;i>=0;){const t=(0,h.default)(e[i]);this._updateItemSelection(!0,t.find(`.${L}`).get(0)),i--}},_updateSelectionToLastItem(e,t){const{length:i}=e;let n=t;for(;n<i;){const t=(0,h.default)(e[n]);this._updateItemSelection(!0,t.find(`.${L}`).get(0)),n++}},focus(){this._selectAllEnabled()?a.default.trigger(this._$selectAllItem,"focus"):this.callBase()},_focusInHandler(e){this._updateFocusState(e,!0);const t=(0,h.default)(e.target).hasClass(K);if(t||this.option("focusedElement"))return clearTimeout(this._setFocusedItemTimeout),void(this._setFocusedItemTimeout=setTimeout((()=>{const e=t?(0,c.getPublicElement)(this._$selectAllItem):(0,h.default)(this.option("focusedElement"));this._setFocusedItem(e)})));const i=this._getActiveItem();this.option("focusedElement",(0,c.getPublicElement)(i.closest(`.${O}`)))},_itemPointerDownHandler(e){if(!this.option("focusStateEnabled"))return;const t=(0,h.default)(e.target).closest(`.${O}, .${K}`);if(!t.length)return;const i=t.hasClass(q)?null:t;this.option("focusedElement",(0,c.getPublicElement)(i))},_findNonDisabledNodes:e=>e.not((function(){return(0,h.default)(this).children(`.${L}`).hasClass(q)})),_moveFocus(e,t){const i=this.option("rtlEnabled")?"right":"left",o=this.option("rtlEnabled")?"left":"right";this.$element().find(`.${P}`).each((function(){n.fx.stop(this,!0)}));const a=this._nodeElements();if(a&&a.length)switch(e){case"up":{const e=this._prevItem(a);this.option("focusedElement",(0,c.getPublicElement)(e));const i=this._getNodeItemElement(e);this.getScrollable().scrollToElement(i),t.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,i);break}case"down":{const e=this._nextItem(a);this.option("focusedElement",(0,c.getPublicElement)(e));const i=this._getNodeItemElement(e);this.getScrollable().scrollToElement(i),t.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,i);break}case"first":{const e=a.first();t.shiftKey&&this._showCheckboxes()&&this._updateSelectionToFirstItem(a,a.index(this._prevItem(a))),this.option("focusedElement",(0,c.getPublicElement)(e)),this.getScrollable().scrollToElement(this._getNodeItemElement(e));break}case"last":{const e=a.last();t.shiftKey&&this._showCheckboxes()&&this._updateSelectionToLastItem(a,a.index(this._nextItem(a))),this.option("focusedElement",(0,c.getPublicElement)(e)),this.getScrollable().scrollToElement(this._getNodeItemElement(e));break}case o:this._expandFocusedContainer();break;case i:this._collapseFocusedContainer();break;default:this.callBase.apply(this,arguments)}},_getNodeItemElement:e=>e.find(`.${L}`).get(0),_nodeElements(){return this.$element().find(`.${O}`).not(":hidden")},_expandFocusedContainer(){const e=(0,h.default)(this.option("focusedElement"));if(!e.length||e.hasClass(R))return;if(e.find(`.${P}`).eq(0).hasClass(M)){const e=this._nextItem(this._findNonDisabledNodes(this._nodeElements()));return this.option("focusedElement",(0,c.getPublicElement)(e)),void this.getScrollable().scrollToElement(this._getNodeItemElement(e))}const t=this._getNodeByElement(this._getItem(e));this._toggleExpandedState(t,!0)},_getClosestNonDisabledNode(e){do{e=e.parent().closest(`.${O}`)}while(e.children(".dx-treeview-item.dx-state-disabled").length);return e},_collapseFocusedContainer(){const e=(0,h.default)(this.option("focusedElement"));if(!e.length)return;const t=e.find(`.${P}`).eq(0);if(!e.hasClass(R)&&t.hasClass(M)){const t=this._getNodeByElement(this._getItem(e));this._toggleExpandedState(t,!1)}else{const t=this._getClosestNonDisabledNode(e);t.length&&this.option("focusedElement",(0,c.getPublicElement)(t)),this.getScrollable().scrollToElement(this._getNodeItemElement(t))}},_encodeString:e=>(0,C.isString)(e)?encodeURI(e):e,_decodeString:e=>(0,C.isString)(e)?decodeURI(e):e,getScrollable(){return this._scrollable},updateDimensions(){const e=(0,g.Deferred)(),t=this.getScrollable();return t?t.update().done((()=>{e.resolveWith(this)})):e.resolveWith(this),e.promise()},selectItem(e){return this._updateItemSelection(!0,e)},unselectItem(e){return this._updateItemSelection(!1,e)},expandItem(e){return this._toggleExpandedState(e,!0)},collapseItem(e){return this._toggleExpandedState(e,!1)},getNodes(){return this._dataAdapter.getTreeNodes()},getSelectedNodes(){return this.getSelectedNodeKeys().map((e=>{const t=this._dataAdapter.getNodeByKey(e);return this._dataAdapter.getPublicNode(t)}))},getSelectedNodeKeys(){return this._dataAdapter.getSelectedNodesKeys()},selectAll(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!0):this._toggleSelectAll({value:!0})},unselectAll(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!1):this._toggleSelectAll({value:!1})},_allItemsExpandedHandler(){this._skipContentReadyAndItemExpanded=!1,this._fireContentReadyAction()},expandAll(){const e=this._dataAdapter.getData(),t=[];this._skipContentReadyAndItemExpanded=!0,e.forEach((e=>t.push(this._toggleExpandedState(e.internalFields.key,!0)))),Promise.allSettled(t).then((()=>{var e;return null===(e=this._allItemsExpandedHandler)||void 0===e?void 0:e.call(this)}))},collapseAll(){(0,m.each)(this._dataAdapter.getExpandedNodesKeys(),((e,t)=>{this._toggleExpandedState(t,!1)}))},scrollToItem(e){const t=this._getNode(e);if(!t)return(0,g.Deferred)().reject().promise();const i=[];let n=t.internalFields.publicNode.parent;for(;null!=n;)n.expanded||i.push(n.key),n=n.parent;const o=(0,g.Deferred)();return this._expandNodes(i.reverse()).always((()=>{const e=this._getNodeElement(t);e&&e.length?(this.scrollToElementTopLeft(e.get(0)),o.resolve()):o.reject()})),o.promise()},scrollToElementTopLeft(e){const t=this.getScrollable(),{scrollDirection:i,rtlEnabled:n}=this.option(),o={top:0,left:0},a=(0,E.getRelativeOffset)(I.SCROLLABLE_CONTENT_CLASS,e);if(i!==I.DIRECTION_VERTICAL){const i=(0,h.default)(t.container()).get(0);o.left=n?a.left+e.offsetWidth-i.clientWidth:a.left}i!==I.DIRECTION_HORIZONTAL&&(o.top=a.top),t.scrollTo(o)},_expandNodes(e){if(!e||0===e.length)return(0,g.Deferred)().resolve().promise();const t=(0,g.Deferred)(),i=e.map((e=>this.expandItem(e)));return g.when.apply(h.default,i).done((()=>t.resolve())).fail((()=>t.reject())),t.promise()},_dispose(){this.callBase(),clearTimeout(this._setFocusedItemTimeout),this._allItemsExpandedHandler=null}});t.default=te},66592:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(i(92848)),o=d(i(64553)),a=i(52576),s=d(i(20780)),r=d(i(44690)),l=d(i(61897));function d(e){return e&&e.__esModule?e:{default:e}}r.default.setEditorClass(s.default);const u="dx-treeview",c=`${u}-node-container`,h=l.default.inherit(r.default).inherit({_addWidgetPrefix:e=>`${u}-${e}`,_optionChanged(e){switch(e.name){case"searchValue":this._showCheckboxes()&&this._isRecursiveSelection()&&this._removeSelection(),this._initDataAdapter(),this._updateSearch(),this._repaintContainer(),this.option("focusedElement",null);break;case"searchExpr":this._initDataAdapter(),this.repaint();break;case"searchMode":this.option("expandNodesRecursive")?this._updateDataAdapter():this._initDataAdapter(),this.repaint();break;default:this.callBase(e)}},_updateDataAdapter(){this._setOptionWithoutOptionChange("expandNodesRecursive",!1),this._initDataAdapter(),this._setOptionWithoutOptionChange("expandNodesRecursive",!0)},_getDataAdapterOptions(){return(0,a.extend)(this.callBase(),{searchValue:this.option("searchValue"),searchMode:this.option("searchMode")||"contains",searchExpr:this.option("searchExpr")})},_getNodeContainer(){return this.$element().find(`.${c}`).first()},_updateSearch(){if(this._searchEditor){const e=this._getSearchEditorOptions();this._searchEditor.option(e)}},_repaintContainer(){const e=this._getNodeContainer();let t;e.length&&(e.empty(),t=this._dataAdapter.getRootNodes(),this._renderEmptyMessage(t),this._renderItems(e,t),this._fireContentReadyAction())},_focusTarget(){return this._itemContainer(this.option("searchEnabled"))},_cleanItemContainer(){this.$element().empty()},_itemContainer(e,t){return t??(t=this._selectAllEnabled()),t?this._getNodeContainer():this._scrollable&&e?(0,o.default)(this._scrollable.content()):this.callBase()},_addWidgetClass(){this.$element().addClass(this._widgetClass())},_clean(){this.callBase(),this._removeSearchBox()}});(0,n.default)("dxTreeView",h);t.default=h},67618:function(e,t,i){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const o=((n=i(55620))&&n.__esModule?n:{default:n}).default.inherit({ctor(e,t){this.editor=e,this.validator=t,this.validationRequestsCallbacks=[];const i=e=>{this.validationRequestsCallbacks.forEach((t=>t(e)))};e.validationRequest.add(i),e.on("disposing",(()=>{e.validationRequest.remove(i)}))},getValue(){return this.editor.option("value")},getCurrentValidationError(){return this.editor.option("validationError")},bypass(){return this.editor.option("disabled")},applyValidationResults(e){this.editor.option({validationErrors:e.brokenRules,validationStatus:e.status})},reset(){this.editor.clear()},focus(){this.editor.focus()}});t.default=o},29299:function(e,t,i){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const o=((n=i(11118))&&n.__esModule?n:{default:n}).default;t.default=o},78698:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.memoize=void 0;var n=i(17781);const o=(e,t)=>e.length===t.length&&!Object.keys(e).some((i=>e[i]!==t[i])),a=(e,t)=>(0,n.equalByValue)(e,t,{maxDepth:4}),s={compareType:"reference"};t.memoize=function(e){let{compareType:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,i=null;return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];if(!i){const n=e(...s);return i=((e,t,i,n)=>{let o=e,a=t;return function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return n(t,o)||(o=t,a=i(...o)),a}})(s,n,e,"reference"===t?o:a),n}return i(...s)}}},24491:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toMilliseconds=function(e){return i[e]};const i={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,quarter:7776e6,year:31536e6}},39903:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toNumber=function(e){return e?Number(e.replace("px","")):0}},20258:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.assertDevExtremeVersion=function(e,t){r.push({packageName:e,version:t})},t.assertedVersionsCompatible=function(e){const t=r.filter((t=>{return i=u(t.version),n=e,!(i.major===n.major&&i.minor===n.minor&&i.patch===n.patch);var i,n}));if(t.length)return o.default.log("W0023",[{packageName:"devextreme",version:d(e)},...t].map((e=>`${e.packageName}: ${e.version}`)).join("\n")),!1;return!0},t.clearAssertedVersions=function(){},t.getPreviousMajorVersion=function(e){let{major:t,minor:i,patch:n}=e;return i===s?{major:t-1,minor:a,patch:n}:{major:t,minor:i-1,patch:n}},t.parseVersion=u,t.stringifyVersion=d;var n,o=(n=i(87129))&&n.__esModule?n:{default:n};const a=2,s=1,r=[],l=".";function d(e){const{major:t,minor:i,patch:n}=e;return[t,i,n].join(l)}function u(e){const[t,i,n]=e.split(".").map(Number);return{major:t,minor:i,patch:n}}},78609:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdvancedChart=void 0;var n,o=i(17781),a=i(52576),s=i(21274),r=i(11528),l=i(99091),d=i(11348),u=i(28779),c=(n=i(34685))&&n.__esModule?n:{default:n},h=i(99857),p=i(2225),g=i(9410);function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_.apply(null,arguments)}const{isArray:f}=Array,m="font",v="commonAxisSettings",C="default",y="VISUAL_RANGE";function b(e){return f(e)?0===e.length?[{}]:e:[e]}function x(e,t,i,n){let o,a;if(i){a=e.value,o={skipEventRising:!0};const t=w(e.fullName,a);t&&(o={allowPartialUpdate:!0},a=t)}else a=((0,r.isDefined)(n)?e.value[n]:e.value).visualRange;t.visualRange(a,o)}function w(e,t){const i=e.split(".").at(-1);if("endValue"===i||"startValue"===i)return{[i]:t}}t.AdvancedChart=g.BaseChart.inherit({_fontFields:[`${v}.label.${m}`,`${v}.title.${m}`],_partialOptionChangesMap:{visualRange:y,_customVisualRange:y,strips:"REFRESH_AXES",constantLines:"REFRESH_AXES"},_partialOptionChangesPath:{argumentAxis:["strips","constantLines","visualRange","_customVisualRange"],valueAxis:["strips","constantLines","visualRange","_customVisualRange"]},_initCore(){this._panesClipRects={},this.callBase()},_disposeCore(){const e=this._disposeObjectsInArray,t=this._panesClipRects;this.callBase(),e.call(t,"fixed"),e.call(t,"base"),e.call(t,"wide"),this._panesClipRects=null,this._labelsAxesGroup.linkOff(),this._labelsAxesGroup.dispose(),this._labelsAxesGroup=null},_dispose(){const e=this._disposeObjectsInArray;this.callBase(),this.panes=null,this._legend&&(this._legend.dispose(),this._legend=null),e.call(this,"panesBackground"),e.call(this,"seriesFamilies"),this._disposeAxes()},_createPanes(){this._cleanPanesClipRects("fixed"),this._cleanPanesClipRects("base"),this._cleanPanesClipRects("wide")},_cleanPanesClipRects(e){(this._panesClipRects[e]||[]).forEach((e=>{null==e||e.dispose()})),this._panesClipRects[e]=[]},_getElementsClipRectID(e){const t=this._panesClipRects.fixed[this._getPaneIndex(e)];return null==t?void 0:t.id},_getPaneIndex(e){const t=e||C;return this.panes.findIndex((e=>e.name===t))},_updateSize(e){this.callBase(),e&&(0,p.areCanvasesDifferent)(this.__currentCanvas,this._canvas)&&(this.__currentCanvas=(0,p.floorCanvasDimensions)(this._canvas)),(0,u.setCanvasValues)(this._canvas)},_reinitAxes(){this.panes=this._createPanes(),this._populateAxes(),this._axesReinitialized=!0},_populateAxes(){const{panes:e}=this,t=this._isRotated(),i=b(this.option("argumentAxis")||{})[0],n=this.option("valueAxis"),o=b(n||{});let a=[];const s=[],r=[];let l,d=0;const c=this._getCrosshairMargins();function h(){const e="defaultAxisName"+String(d);return d+=1,e}l=t?"right"===i.position?e[e.length-1].name:e[0].name:"top"===i.position?e[0].name:e[e.length-1].name,a=(0,u.map)(e,(e=>{const n=e.name!==l;return this._populateAxesOptions("argumentAxis",i,{pane:e.name,name:null,optionPath:"argumentAxis",crosshairMargin:t?c.x:c.y},t,n)})),o.forEach(((e,i)=>{var o;let a=[];const{name:l}=e;l&&r.includes(l)?this._incidentOccurred("E2102"):(l&&r.push(l),e.pane&&a.push(e.pane),null!==(o=e.panes)&&void 0!==o&&o.length&&(a=a.concat(e.panes.slice(0))),a=(0,u.unique)(a),a.length||a.push(void 0),a.forEach((o=>{const a=f(n)?`valueAxis[${String(i)}]`:"valueAxis";s.push(this._populateAxesOptions("valueAxis",e,{name:l||h(),pane:o,priority:i,optionPath:a,crosshairMargin:t?c.y:c.x},t))})))})),this._redesignAxes(a,!0,l),this._redesignAxes(s,!1)},_redesignAxes(e,t,i){const n=[];let o=t?this._argumentAxes:this._valueAxes;e.forEach((e=>{var i;const a=null===(i=o)||void 0===i?void 0:i.filter((t=>t.name===e.name&&(!(0,r.isDefined)(e.pane)&&this.panes.some((e=>e.name===t.pane))||t.pane===e.pane)));null!=a&&a.length?a.forEach((i=>{const o=function(e,t,i){if(i)return{argumentAxisType:e.argumentAxisType,argumentType:e.argumentType};const{valueAxisType:n,valueType:o}=e.groups.find((e=>e.valueAxis===t));return{valueAxisType:n,valueType:o}}(this._groupsData,i,t);i.updateOptions(e),t?i.setTypes(o.argumentAxisType,o.argumentType,"argumentType"):i.setTypes(o.valueAxisType,o.valueType,"valueType"),i.validate(),n.push({axis:i})})):n.push({options:e})})),o?(0,s.reverseEach)(o,((e,i)=>{n.some((e=>e.axis&&e.axis===i))||this._disposeAxis(e,t)})):o=t?this._argumentAxes=[]:this._valueAxes=[],n.forEach((e=>{let{axis:n}=e;e.axis&&t?e.axis.isVirtual=e.axis.pane!==i:e.options&&(n=this._createAxis(t,e.options,t?e.options.pane!==i:void 0),o.push(n)),n.applyVisualRangeSetter(this._getVisualRangeSetter())}))},_disposeAxis(e,t){const i=t?this._argumentAxes:this._valueAxes,n=i[e];n&&(n.dispose(),i.splice(e,1))},_disposeAxes(){const e=this._disposeObjectsInArray;e.call(this,"_argumentAxes"),e.call(this,"_valueAxes")},_appendAdditionalSeriesGroups(){this._crosshairCursorGroup.linkAppend(),this._scrollBar&&this._scrollBarGroup.linkAppend()},_getLegendTargets(){return(this.series||[]).map((e=>{const t=this._getLegendOptions(e);return t.legendData.series=e,e.getOptions().showInLegend||(t.legendData.visible=!1),t}))},_legendItemTextField:"name",_seriesPopulatedHandlerCore(){this._processSeriesFamilies(),this._processValueAxisFormat()},_renderTrackers(){for(let e=0;e<this.series.length;e+=1)this.series[e].drawTrackers()},_specialProcessSeries(){this._processSeriesFamilies()},_processSeriesFamilies(){var e;const t=[],i=[];let n;const o=this._themeManager,a=o.getOptions("negativesAsZeroes"),s=o.getOptions("negativesAsZeros"),l={minBubbleSize:o.getOptions("minBubbleSize"),maxBubbleSize:o.getOptions("maxBubbleSize"),barGroupPadding:o.getOptions("barGroupPadding"),barGroupWidth:o.getOptions("barGroupWidth"),negativesAsZeroes:(0,r.isDefined)(a)?a:s};null!==(e=this.seriesFamilies)&&void 0!==e&&e.length?this.seriesFamilies.forEach((e=>{e.updateOptions(l),e.adjustSeriesValues()})):(this.series.forEach((e=>{t.includes(e.type)||t.push(e.type)})),this._getLayoutTargets().forEach((e=>{n=this._getSeriesForPane(e.name),t.forEach((t=>{const o=new d.SeriesFamily({type:t,pane:e.name,minBubbleSize:l.minBubbleSize,maxBubbleSize:l.maxBubbleSize,barGroupPadding:l.barGroupPadding,barGroupWidth:l.barGroupWidth,negativesAsZeroes:l.negativesAsZeroes,rotated:this._isRotated()});o.add(n),o.adjustSeriesValues(),i.push(o)}))})),this.seriesFamilies=i)},_updateSeriesDimensions(){const e=this.seriesFamilies||[];for(let t=0;t<e.length;t+=1){const i=e[t];i.updateSeriesValues(),i.adjustSeriesDimensions()}},_getLegendCallBack(e){var t;return null===(t=this._legend)||void 0===t?void 0:t.getActionCallback(e)},_appendAxesGroups(){this._stripsGroup.linkAppend(),this._gridGroup.linkAppend(),this._axesGroup.linkAppend(),this._labelsAxesGroup.linkAppend(),this._constantLinesGroup.linkAppend(),this._stripLabelAxesGroup.linkAppend(),this._scaleBreaksGroup.linkAppend()},_populateMarginOptions(){const e=function(e,t,i,n){const o=n?e.width/t:e.width,a=n?e.height:e.height/t;return Math.min(o,a)*i}(this.getSize(),this.panes.length,this._themeManager.getOptions("maxBubbleSize"),this._isRotated());let t={};this._valueAxes.forEach((i=>{const n=this.series.filter((e=>e.getValueAxis()===i));let o={};n.forEach((i=>{if(i.isVisible()){const n=function(e,t){return e.processBubbleSize&&(e.size=t),e}(i.getMarginOptions(),e);o=(0,u.mergeMarginOptions)(o,n),t=(0,u.mergeMarginOptions)(t,n)}})),i.setMarginOptions(o)})),this._argumentAxes.forEach((e=>e.setMarginOptions(t)))},_populateBusinessRange(e,t){const i=this._isRotated(),n=this._getVisibleSeries(),o={},a=new h.Range({rotated:!!i}),s=e=>e.pane||C;if(this.panes.forEach((e=>{o[e.name]=new h.Range({rotated:!!i})})),this._valueAxes.forEach((a=>{const r=new h.Range({rotated:!!i,pane:a.pane,axis:a.name}),l=n.filter((e=>e.getValueAxis()===a));l.forEach((e=>{const t=e.getRangeData();r.addRange(t.val),o[s(a)].addRange(t.arg)})),(!e||e&&l.length&&a===e)&&(a.setGroupSeries(l),a.setBusinessRange(r,this._axesReinitialized||t,this._argumentAxes[0]._lastVisualRangeUpdateMode))})),!e||e&&n.length){Object.keys(o).forEach((e=>a.addRange(o[e])));const e=a.interval;this._argumentAxes.forEach((t=>{const i=o[s(t)].interval??e;t.setBusinessRange(new h.Range(_({},a,{interval:i})),this._axesReinitialized,void 0,this._groupsData.categories)}))}this._populateMarginOptions()},getArgumentAxis(){return(this._argumentAxes||[]).find((e=>!e.isVirtual))},getValueAxis(e){return(this._valueAxes||[]).find((0,r.isDefined)(e)?t=>t.name===e:e=>e.pane===this.defaultPane)},_getGroupsData(){const e=[];return this._valueAxes.forEach((t=>{e.push({series:this.series.filter((e=>e.getValueAxis()===t)),valueAxis:t,valueOptions:t.getOptions()})})),{groups:e,argumentAxes:this._argumentAxes,argumentOptions:this._argumentAxes[0].getOptions()}},_groupSeries(){this._correctValueAxes(!1),this._groupsData=this._getGroupsData()},_processValueAxisFormat(){const e=[];this.series.forEach((t=>{const i=t.getValueAxis();t.isFullStackedSeries()&&(i.setPercentLabelFormat(),e.push(i))})),this._valueAxes.forEach((t=>{e.includes(t)||t.resetAutoLabelFormat()}))},_populateAxesOptions(e,t,i,n,o){const s=this._prepareStripsAndConstantLines(e,t,n),r=(0,a.extend)(!0,{},s,i,this._prepareAxisOptions(e,s,n));return o&&(r.visible=!1,r.tick.visible=!1,r.minorTick.visible=!1,r.label.visible=!1,r.title={}),r},_getValFilter:e=>c.default.getViewPortFilter(e.getValueAxis().visualRange()||{}),_createAxis(e,t,i){const n=e?"argumentAxis":"valueAxis",o=(0,a.extend)({renderer:this._renderer,incidentOccurred:this._incidentOccurred,eventTrigger:this._eventTrigger,axisClass:e?"arg":"val",widgetClass:"dxc",stripsGroup:this._stripsGroup,stripLabelAxesGroup:this._stripLabelAxesGroup,constantLinesGroup:this._constantLinesGroup,scaleBreaksGroup:this._scaleBreaksGroup,axesContainerGroup:this._axesGroup,labelsAxesGroup:this._labelsAxesGroup,gridGroup:this._gridGroup,isArgumentAxis:e,getTemplate:e=>this._getTemplate(e)},this._getAxisRenderingOptions(n)),s=new l.Axis(o);return s.updateOptions(t),s.isVirtual=i,s},_applyVisualRangeByVirtualAxes:()=>!1,_applyCustomVisualRangeOption(e,t){e.getOptions().optionPath&&this._parseVisualRangeOption(`${e.getOptions().optionPath}.visualRange`,t)},_getVisualRangeSetter(){return(e,t)=>{let{skipEventRising:i,range:n}=t;this._applyCustomVisualRangeOption(e,n),e.setCustomVisualRange(n),e.skipEventRising=i,this._applyVisualRangeByVirtualAxes(e,n)||(this._applyingChanges?this._change_VISUAL_RANGE():this._requestChange([y]))}},_getTrackerSettings(){return(0,a.extend)(this.callBase(),{argumentAxis:this.getArgumentAxis()})},_prepareStripsAndConstantLines(e,t,i){return(t=this._themeManager.getOptions(e,t,i)).strips&&t.strips.forEach(((e,i)=>{t.strips[i]=(0,a.extend)(!0,{},t.stripStyle,e)})),t.constantLines&&t.constantLines.forEach(((e,i)=>{t.constantLines[i]=(0,a.extend)(!0,{},t.constantLineStyle,e)})),t},refresh(){this._disposeAxes(),this.callBase()},_layoutAxes(e){e();const t=this.checkForMoreSpaceForPanesCanvas();if(t){const i=this._rect.slice(),n=this._layout.backward(i,i,[t.width,t.height]);t.width=Math.max(0,n[0]),t.height=Math.max(0,n[1]),this._canvas=this._createCanvasFromRect(i),e(t)}},checkForMoreSpaceForPanesCanvas(){return this.layoutManager.needMoreSpaceForPanesCanvas(this._getLayoutTargets(),this._isRotated())},_parseVisualRangeOption(e,t){const i=e.split(/[.[]/)[0];let n=e.match(/\d+/g);n=(0,r.isDefined)(n)?parseInt(n[0],10):n,e.indexOf("visualRange")>0?("object"!==(0,r.type)(t)&&(t=w(e,t)??t),this._setCustomVisualRange(i,n,t)):("object"===(0,r.type)(t)||f(t))&&i.indexOf("Axis")>0&&JSON.stringify(t).indexOf("visualRange")>0&&((0,r.isDefined)(t.visualRange)?this._setCustomVisualRange(i,n,t.visualRange):f(t)&&t.forEach(((e,t)=>{(0,r.isDefined)(e.visualRange)&&this._setCustomVisualRange(i,t,e.visualRange)})))},_setCustomVisualRange(e,t,i){const n=this._options.silent(e);n&&((0,r.isDefined)(t)?n[t]._customVisualRange=i:n._customVisualRange=i,this._axesReinitialized=!0)},_raiseZoomEndHandlers(){this._valueAxes.forEach((e=>e.handleZoomEnd()))},_setOptionsByReference(){this.callBase(),(0,a.extend)(this._optionsByReference,{"valueAxis.visualRange":!0})},_notifyOptionChanged(e,t){this.callBase.apply(this,arguments),this._optionChangedLocker||this._parseVisualRangeOption(e,t)},_notifyVisualRange(){this._valueAxes.forEach((e=>{const t=e.getOptions().optionPath;if(t){const i=`${t}.visualRange`,n=(0,u.convertVisualRangeObject)(e.visualRange(),!f(this.option(i)));e.skipEventRising&&(0,u.rangesAreEqual)(n,this.option(i))?e.skipEventRising=null:this.option(t)||"valueAxis"===t?this.option(i,n):this.option(t,{name:e.name,visualRange:n})}}))},_notify(){this.callBase(),this._axesReinitialized=!1,!0!==this.option("disableTwoWayBinding")&&(this.skipOptionsRollBack=!0,this._notifyVisualRange(),this.skipOptionsRollBack=!1)},_getAxesForScaling(){return this._valueAxes},_getAxesByOptionPath(e,t,i){const n=this._getAxesForScaling();let o=[];if(t){let t;e.fullName&&(t=e.fullName.slice(0,e.fullName.indexOf("."))),o=n.filter((e=>e.getOptions().optionPath===t))}else"object"===(0,r.type)(e.value)?o=n.filter((t=>t.getOptions().optionPath===e.name)):f(e.value)&&e.value.forEach(((t,a)=>{const s=n.filter((t=>t.getOptions().optionPath===`${e.name}[${a}]`))[0];(0,r.isDefined)(t[i])&&(0,r.isDefined)(s)&&(o[a]=s)}));return o},_optionChanged(e){if(!this._optionChangedLocker){const t="visualRange";let i;const n=e.fullName.indexOf(t)>0||!(this.getPartialChangeOptionsName(e).indexOf(t)>-1)&&void 0;(0,r.isDefined)(n)&&(i=this._getAxesByOptionPath(e,n,t),i&&(i.length>1||f(e.value)?i.forEach(((t,i)=>x(e,t,n,i))):1===i.length&&x(e,i[0],n)))}this.callBase(e)},_change_VISUAL_RANGE(){if(this._recreateSizeDependentObjects(!1),!this._changes.has("FULL_RENDER")){const e=this.option("resizePanesOnZoom");this._doRender({force:!0,drawTitle:!1,drawLegend:!1,adjustAxes:e??(this.option("adjustAxesOnZoom")||!1),animate:!1}),this._raiseZoomEndHandlers()}},resetVisualRange(){this._valueAxes.forEach((e=>{e.resetVisualRange(!1),this._applyCustomVisualRangeOption(e)})),this._requestChange([y])},_getCrosshairMargins:()=>({x:0,y:0}),_legendDataField:"series",_adjustSeriesLabels:o.noop,_correctValueAxes:o.noop})},9410:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.overlapping=t.BaseChart=void 0;var n=S(i(92774)),o=i(98834),a=i(17781),s=i(52576),r=i(21274),l=i(11528),d=i(14580),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=w(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(45912)),c=i(45647),h=i(39104),p=i(67056),g=i(25058),_=i(74754),f=i(92528),m=i(16216),v=i(23277),C=i(28779),y=i(66151),b=S(i(34506)),x=i(59282);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(w=function(e){return e?i:t})(e)}function S(e){return e&&e.__esModule?e:{default:e}}const{isArray:D}=Array,I="_reinit",E="_forceRender",T="_resize",A=[I,"_updateDataSource","_dataInit",E,T],O="font";function P(e){const t=e.reduce(((e,t,i)=>{if(!t)return e;const n=t.value();return n<e.value?{value:n,rollingStock:t,index:i}:e}),{rollingStock:void 0,value:1/0,index:void 0});t.rollingStock.getLabels()[0].draw(!1);const{width:i}=t.rollingStock.getBoundingRect();return e[t.index]=null,i}function k(e,t,i){if(!e||!t)return;const n=e.getBoundingRect(),o=t.getBoundingRect(),a=!i||(n.oppositeStart<=o.oppositeStart&&n.oppositeEnd>o.oppositeStart||o.oppositeStart<=n.oppositeStart&&o.oppositeEnd>n.oppositeStart);return n.end>o.start&&a}function M(e,t){return e.getBoundingRect().end>t.end}t.overlapping={resolveLabelOverlappingInOneDirection:function(e,t,i,n,o){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:()=>0;const s=[],r={start:i?t.left:t.top,end:i?t.width-t.right:t.height-t.bottom};let l,d=!1;if(e.forEach((e=>{e&&(d=d||e.series.isStackedSeries()||e.series.isFullStackedSeries(),e.getLabels().forEach((e=>{e.isVisible()&&s.push(new x.RollingStock(e,i,o))})))})),d)Number(!i)^Number(n)&&s.reverse(),l=n?s:function(e){const t=[],i=[];return e.forEach((e=>{e.value()>0?t.push(e):i.unshift(e)})),t.concat(i)}(s);else{const e=s.slice();l=s.sort(((t,i)=>a(t,i)||t.getInitialPosition()-i.getInitialPosition()||e.indexOf(t)-e.indexOf(i)))}return!!function(e){let t,i,n,o,a=!1;for(t=0,n=e.length-1;t<n;t++){for(i=t+1,o=e.length;i<o;i++)if(t!==i&&k(e[t],e[i],!0)){a=!0;break}if(a)break}return a}(l)&&(function(e,t){const i=t.end-t.start;let n=0;for(e.forEach((e=>{n+=e.getBoundingRect().width}));i<n;)n-=P(e)}(l,r),function(e){let t;for(let i=0;i<e.length-1;i+=1){const n=t||e[i];k(n,e[i+1])?(n.toChain(e[i+1]),e[i+1]=null,t=n):t=e[i+1]||n}}(l),l.reverse(),function(e,t){for(let i=0;i<e.length;i+=1){const n=e[i];let o=!0;if(null!==n&&M(n,t)){const a=n.getBoundingRect();for(let s=i+1;s<e.length;s+=1){const i=e[s];if(i){if(i.getBoundingRect().end>a.start-(a.end-t.end)){i.toChain(n),o=!1;break}}}}o&&(null==n||n.setRollingStockInCanvas(t))}}(l,r),!0)}};const R=t.BaseChart=b.default.inherit({_eventsMap:{onSeriesClick:{name:"seriesClick"},onPointClick:{name:"pointClick"},onArgumentAxisClick:{name:"argumentAxisClick"},onLegendClick:{name:"legendClick"},onSeriesSelectionChanged:{name:"seriesSelectionChanged"},onPointSelectionChanged:{name:"pointSelectionChanged"},onSeriesHoverChanged:{name:"seriesHoverChanged"},onPointHoverChanged:{name:"pointHoverChanged"},onDone:{name:"done",actionSettings:{excludeValidators:["disabled"]}},onZoomStart:{name:"zoomStart"},onZoomEnd:{name:"zoomEnd"}},_fontFields:[`legend.${O}`,`legend.title.${O}`,`legend.title.subtitle.${O}`,`commonSeriesSettings.label.${O}`],_rootClassPrefix:"dxc",_rootClass:"dxc-chart",_initialChanges:["INIT"],_themeDependentChanges:["REFRESH_SERIES_REINIT"],_getThemeManagerOptions(){const e=this.callBase.apply(this,arguments);return e.options=this.option(),e},_createThemeManager(){const e=this.option(),t=new c.ThemeManager(this._getThemeManagerOptions());return t.setTheme(e.theme,e.rtlEnabled),t},_initCore(){this._canvasClipRect=this._renderer.clipRect(),this._createHtmlStructure(),this._createLegend(),this._createTracker(),this._needHandleRenderComplete=!0,this.layoutManager=new d.LayoutManager,this._createScrollBar(),n.default.on(this._$element,"contextmenu",(e=>{((0,o.isTouchEvent)(e)||(0,o.isPointerEvent)(e))&&e.preventDefault()})),n.default.on(this._$element,"MSHoldVisual",(e=>{e.preventDefault()}))},_getLayoutItems:a.noop,_layoutManagerOptions(){return this._themeManager.getOptions("adaptiveLayout")},_reinit(){(0,C.setCanvasValues)(this._canvas),this._reinitAxes(),this._requestChange(["DATA_SOURCE","DATA_INIT","CORRECT_AXIS","FULL_RENDER"])},_correctAxes:a.noop,_createHtmlStructure(){const e=this._renderer,{root:t}=e,i=function(){return e.g().attr({class:"dxc-constant-lines-group"}).linkOn(t,"constant-lines")};this._constantLinesGroup={dispose(){this.under.dispose(),this.above.dispose()},linkOff(){this.under.linkOff(),this.above.linkOff()},clear(){this.under.linkRemove().clear(),this.above.linkRemove().clear()},linkAppend(){this.under.linkAppend(),this.above.linkAppend()}},this._labelsAxesGroup=e.g().attr({class:"dxc-elements-axes-group"});const n=()=>{this._labelsAxesGroup.linkOn(t,"elements")};this._backgroundRect=e.rect().attr({fill:"gray",opacity:1e-4}).append(t),this._panesBackgroundGroup=e.g().attr({class:"dxc-background"}).append(t),this._stripsGroup=e.g().attr({class:"dxc-strips-group"}).linkOn(t,"strips"),this._gridGroup=e.g().attr({class:"dxc-grids-group"}).linkOn(t,"grids"),this._panesBorderGroup=e.g().attr({class:"dxc-border"}).linkOn(t,"border"),this._axesGroup=e.g().attr({class:"dxc-axes-group"}).linkOn(t,"axes"),this._executeAppendBeforeSeries(n),this._stripLabelAxesGroup=e.g().attr({class:"dxc-strips-labels-group"}).linkOn(t,"strips-labels"),this._constantLinesGroup.under=i(),this._seriesGroup=e.g().attr({class:"dxc-series-group"}).linkOn(t,"series"),this._executeAppendAfterSeries(n),this._constantLinesGroup.above=i(),this._scaleBreaksGroup=e.g().attr({class:"dxc-scale-breaks"}).linkOn(t,"scale-breaks"),this._labelsGroup=e.g().attr({class:"dxc-labels-group"}).linkOn(t,"labels"),this._crosshairCursorGroup=e.g().attr({class:"dxc-crosshair-cursor"}).linkOn(t,"crosshair"),this._legendGroup=e.g().attr({class:"dxc-legend","clip-path":this._getCanvasClipRectID()}).linkOn(t,"legend").linkAppend(t).enableLinks(),this._scrollBarGroup=e.g().attr({class:"dxc-scroll-bar"}).linkOn(t,"scroll-bar")},_executeAppendBeforeSeries(){},_executeAppendAfterSeries(){},_disposeObjectsInArray(e,t){(this[e]||[]).forEach((e=>{t&&e?t.forEach((t=>{var i;null===(i=e[t])||void 0===i||i.dispose()})):null==e||e.dispose()})),this[e]=null},_disposeCore(){const e=e=>{this[e]&&(this[e].dispose(),this[e]=null)},t=e=>{this[e].linkOff()},i=this._disposeObjectsInArray;this._renderer.stopAllAnimations(),i.call(this,"series"),e("_tracker"),e("_crosshair"),this.layoutManager=this._userOptions=this._canvas=this._groupsData=null,t("_stripsGroup"),t("_gridGroup"),t("_axesGroup"),t("_constantLinesGroup"),t("_stripLabelAxesGroup"),t("_panesBorderGroup"),t("_seriesGroup"),t("_labelsGroup"),t("_crosshairCursorGroup"),t("_legendGroup"),t("_scrollBarGroup"),t("_scaleBreaksGroup"),e("_canvasClipRect"),e("_panesBackgroundGroup"),e("_backgroundRect"),e("_stripsGroup"),e("_gridGroup"),e("_axesGroup"),e("_constantLinesGroup"),e("_stripLabelAxesGroup"),e("_panesBorderGroup"),e("_seriesGroup"),e("_labelsGroup"),e("_crosshairCursorGroup"),e("_legendGroup"),e("_scrollBarGroup"),e("_scaleBreaksGroup")},_getAnimationOptions(){return this._themeManager.getOptions("animation")},_getDefaultSize:()=>({width:400,height:400}),_getOption(e){return this._themeManager.getOptions(e)},_applySize(e){this._rect=e.slice(),this._changes.has("FULL_RENDER")||this._processRefreshData(T)},_resize(){this._doRender(this.__renderOptions||{animate:!1,isResize:!0})},_trackerType:"ChartTracker",_createTracker(){this._tracker=new u[this._trackerType]({seriesGroup:this._seriesGroup,renderer:this._renderer,tooltip:this._tooltip,legend:this._legend,eventTrigger:this._eventTrigger})},_getTrackerSettings(){return(0,s.extend)({chart:this},this._getSelectionModes())},_getSelectionModes(){const e=this._themeManager;return{seriesSelectionMode:e.getOptions("seriesSelectionMode"),pointSelectionMode:e.getOptions("pointSelectionMode")}},_updateTracker(e){this._tracker.update(this._getTrackerSettings()),this._tracker.setCanvases({left:0,right:this._canvas.width,top:0,bottom:this._canvas.height},e)},_createCanvasFromRect(e){const t=this._canvas;return(0,C.setCanvasValues)({left:e[0],top:e[1],right:t.width-e[2],bottom:t.height-e[3],width:t.width,height:t.height})},_doRender(e){if(0===this._canvas.width&&0===this._canvas.height)return;this._resetIsReady();const t=this._prepareDrawOptions(e),{recreateCanvas:i}=t;this._preserveOriginalCanvas(),i?this.__currentCanvas=this._canvas:this._canvas=this.__currentCanvas,i&&this._updateCanvasClipRect(this._canvas),this._canvas=this._createCanvasFromRect(this._rect),this._renderer.stopAllAnimations(!0),this._cleanGroups();const n=new Date;this._renderElements(t),this._lastRenderingTime=Number(new Date)-Number(n)},_preserveOriginalCanvas(){this.__originalCanvas=this._canvas,this._canvas=(0,s.extend)({},this._canvas)},_layoutAxes:a.noop,_renderElements(e){const t=this._prepareToRender(e),i=this._isRotated(),n=this._isLegendInside(),o=[];(0,s.extend)({},this._canvas);let a,r,l;this._renderer.lock(),e.drawLegend&&this._legend&&this._legendGroup.linkAppend(),this.layoutManager.setOptions(this._layoutManagerOptions());const d=this._getLayoutTargets();this._layoutAxes((i=>{const n=i?(0,s.extend)({},e,{animate:!1,recreateCanvas:!0}):e,o=this._renderAxes(n,t);this._shrinkAxes(i,o)})),this._applyClipRects(t),this._appendSeriesGroups(),this._createCrosshairCursor(),d.forEach((e=>{let{canvas:t}=e;o.push({left:t.left,right:t.width-t.right,top:t.top,bottom:t.height-t.bottom})})),this._scrollBar&&(a=this._argumentAxes[0].getTranslator().getBusinessRange(),"discrete"===a.axisType&&a.categories&&a.categories.length<=1||"discrete"!==a.axisType&&a.min===a.max?r=l=void 0:(r=a.minVisible,l=a.maxVisible),this._scrollBar.init(a,!this._argumentAxes[0].getOptions().valueMarginsEnabled).setPosition(r,l)),this._updateTracker(o),this._updateLegendPosition(e,n),this._applyPointMarkersAutoHiding(),this._renderSeries(e,i,n),this._renderGraphicObjects(),this._renderer.unlock()},_updateLegendPosition:a.noop,_createCrosshairCursor:a.noop,_appendSeriesGroups(){this._seriesGroup.linkAppend(),this._labelsGroup.linkAppend(),this._appendAdditionalSeriesGroups()},_renderSeries(e,t,i){this._calculateSeriesLayout(e,t),this._renderSeriesElements(e,i)},_calculateSeriesLayout(e,t){e.hideLayoutLabels=this.layoutManager.needMoreSpaceForPanesCanvas(this._getLayoutTargets(),t)&&!this._themeManager.getOptions("adaptiveLayout").keepLabels,this._updateSeriesDimensions(e)},_getArgFilter:()=>()=>!0,_getValFilter:()=>()=>!0,_getPointsToAnimation(e){const t=this._getArgFilter();return e.map((e=>{const i=this._getValFilter(e);return e.getPoints().filter((e=>e.getOptions().visible&&t(e.argument)&&(i(e.getMinValue(!0))||i(e.getMaxValue(!0))))).length}))},_renderSeriesElements(e,t){const{series:i}=this,n=this._themeManager.getOptions("resolveLabelOverlapping"),o=this._getPointsToAnimation(i);i.forEach(((t,i)=>{this._applyExtraSettings(t,e);const n=e.animate&&o[i]<=e.animationPointsLimit&&this._renderer.animationEnabled();t.draw(n,e.hideLayoutLabels,this._getLegendCallBack(t))})),"none"===n?this._adjustSeriesLabels(!1):this._locateLabels(n),this._renderTrackers(t),this._tracker.repairTooltip(),this._renderExtraElements(),this._clearCanvas(),this._seriesElementsDrawn=!0},_changesApplied(){this._seriesElementsDrawn&&(this._seriesElementsDrawn=!1,this._drawn(),this._renderCompleteHandler())},_locateLabels(e){this._resolveLabelOverlapping(e)},_renderExtraElements(){},_clearCanvas(){this._canvas=this.__originalCanvas},_resolveLabelOverlapping(e){let t;switch(e){case"stack":t=this._resolveLabelOverlappingStack;break;case"hide":t=this._resolveLabelOverlappingHide;break;case"shift":t=this._resolveLabelOverlappingShift}return(0,l.isFunction)(t)&&t.call(this)},_getVisibleSeries(){return(0,a.grep)(this.getAllSeries(),(e=>e.isVisible()))},_resolveLabelOverlappingHide(){const e=[];let t,i,n,o,a,s,r;const l=this._getVisibleSeries();for(a=0;a<l.length;a++)for(r=l[a].getVisiblePoints(),s=0;s<r.length;s++)e.push.apply(e,r[s].getLabels());for(a=0;a<e.length;a++)if(t=e[a],t.isVisible())for(n=t.getBoundingRect(),s=a+1;s<e.length;s++)i=e[s],o=i.getBoundingRect(),u=o,((d=n).x<=u.x&&u.x<=d.x+d.width||d.x>=u.x&&d.x<=u.x+u.width)&&(d.y<=u.y&&u.y<=d.y+d.height||d.y>=u.y&&d.y<=u.y+u.height)&&i.draw(!1);var d,u},_cleanGroups(){this._stripsGroup.linkRemove().clear(),this._gridGroup.linkRemove().clear(),this._axesGroup.linkRemove().clear(),this._constantLinesGroup.clear(),this._stripLabelAxesGroup.linkRemove().clear(),this._labelsGroup.linkRemove().clear(),this._crosshairCursorGroup.linkRemove().clear(),this._scaleBreaksGroup.linkRemove().clear()},_allowLegendInsidePosition:()=>!1,_createLegend(){const e=function(e){const t={nameField:`${i=e}Name`,colorField:`${i}Color`,indexField:`${i}Index`};var i;return{getFormatObject(e){const i={};return i[t.indexField]=e.id,i[t.colorField]=e.states.normal.fill,i[t.nameField]=e.text,i},textField:t.nameField}}(this._legendDataField);this._legend=new p.Legend({renderer:this._renderer,widget:this,group:this._legendGroup,backgroundClass:"dxc-border",itemGroupClass:"dxc-item",titleGroupClass:"dxc-title",textField:e.textField,getFormatObject:e.getFormatObject,allowInsidePosition:this._allowLegendInsidePosition()}),this._updateLegend(),this._layout.add(this._legend)},_updateLegend(){const e=this._themeManager,t=e.getOptions("legend"),i=this._getLegendData();t.containerBackgroundColor=e.getOptions("containerBackgroundColor"),t._incidentOccurred=this._incidentOccurred,this._legend.update(i,t,e.theme("legend").title),this._change(["LAYOUT"])},_prepareDrawOptions(e){const t=this._getAnimationOptions(),i=(0,s.extend)({},{force:!1,adjustAxes:!0,drawLegend:!0,drawTitle:!0,animate:t.enabled,animationPointsLimit:t.maxPointCountSupported},e,this.__renderOptions);return(0,l.isDefined)(i.recreateCanvas)||(i.recreateCanvas=i.adjustAxes&&i.drawLegend&&i.drawTitle),i},_processRefreshData(e){const t=A.indexOf(this._currentRefreshData),i=A.indexOf(e);(!this._currentRefreshData||t>=0&&i<t)&&(this._currentRefreshData=e),this._requestChange(["REFRESH"])},_getLegendData(){return(0,C.map)(this._getLegendTargets(),(e=>{const{legendData:t}=e,i=e.getLegendStyles;let{opacity:n}=i.normal;e.visible||((!(0,l.isDefined)(n)||n>.3)&&(n=.3),t.textOpacity=.3);const o={opacity:n};return t.states={hover:(0,s.extend)({},i.hover,o),selection:(0,s.extend)({},i.selection,o),normal:(0,s.extend)({},i.normal,o)},t}))},_getLegendOptions(e){return{legendData:{text:e[this._legendItemTextField],id:e.index,visible:!0},getLegendStyles:e.getLegendStyles(),visible:e.isVisible()}},_disposeSeries(e){var t;this.series&&((0,l.isDefined)(e)?(this.series[e].dispose(),this.series.splice(e,1)):(this.series.forEach((e=>e.dispose())),this.series.length=0)),null!==(t=this.series)&&void 0!==t&&t.length||(this.series=[])},_disposeSeriesFamilies(){(this.seriesFamilies||[]).forEach((e=>{e.dispose()})),this.seriesFamilies=null,this._needHandleRenderComplete=!0},_optionChanged(e){this._themeManager.resetOptions(e.name),this.callBase.apply(this,arguments)},_applyChanges(){this._themeManager.update(this._options.silent()),this.callBase(...arguments)},_optionChangesMap:{animation:"ANIMATION",dataSource:"DATA_SOURCE",palette:"PALETTE",paletteExtensionMode:"PALETTE",legend:"FORCE_DATA_INIT",seriesTemplate:"FORCE_DATA_INIT",export:"FORCE_RENDER",valueAxis:"AXES_AND_PANES",argumentAxis:"AXES_AND_PANES",commonAxisSettings:"AXES_AND_PANES",panes:"AXES_AND_PANES",commonPaneSettings:"AXES_AND_PANES",defaultPane:"AXES_AND_PANES",containerBackgroundColor:"AXES_AND_PANES",rotated:"ROTATED",autoHidePointMarkers:"REFRESH_SERIES_REINIT",customizePoint:"REFRESH_SERIES_REINIT",customizeLabel:"REFRESH_SERIES_REINIT",scrollBar:"SCROLL_BAR"},_optionChangesOrder:["ROTATED","PALETTE","REFRESH_SERIES_REINIT","USE_SPIDER_WEB","AXES_AND_PANES","INIT","REINIT","DATA_SOURCE","REFRESH_SERIES_DATA_INIT","DATA_INIT","FORCE_DATA_INIT","REFRESH_AXES","CORRECT_AXIS"],_customChangesOrder:["ANIMATION","REFRESH_SERIES_FAMILIES","FORCE_FIRST_DRAWING","FORCE_DRAWING","FORCE_RENDER","VISUAL_RANGE","SCROLL_BAR","REINIT","REFRESH","FULL_RENDER"],_change_ANIMATION(){this._renderer.updateAnimationOptions(this._getAnimationOptions())},_change_DATA_SOURCE(){this._needHandleRenderComplete=!0,this._updateDataSource()},_change_PALETTE(){this._themeManager.updatePalette(),this._refreshSeries("DATA_INIT")},_change_REFRESH_SERIES_DATA_INIT(){this._refreshSeries("DATA_INIT")},_change_DATA_INIT(){this.series&&!this.needToPopulateSeries||this._changes.has("FORCE_DATA_INIT")||this._dataInit()},_change_FORCE_DATA_INIT(){this._dataInit()},_change_REFRESH_SERIES_FAMILIES(){this._processSeriesFamilies(),this._populateBusinessRange(),this._processRefreshData(E)},_change_FORCE_RENDER(){this._processRefreshData(E)},_change_AXES_AND_PANES(){this._refreshSeries("INIT")},_change_ROTATED(){this._createScrollBar(),this._refreshSeries("INIT")},_change_REFRESH_SERIES_REINIT(){this._refreshSeries("INIT")},_change_REFRESH_AXES(){(0,C.setCanvasValues)(this._canvas),this._reinitAxes(),this._requestChange(["CORRECT_AXIS","FULL_RENDER"])},_change_SCROLL_BAR(){this._createScrollBar(),this._processRefreshData(E)},_change_REINIT(){this._processRefreshData(I)},_change_FORCE_DRAWING(){this._resetComponentsAnimation()},_change_FORCE_FIRST_DRAWING(){this._resetComponentsAnimation(!0)},_resetComponentsAnimation(e){this.series.forEach((t=>{t.resetApplyingAnimation(e)})),this._resetAxesAnimation(e)},_resetAxesAnimation:a.noop,_refreshSeries(e){this.needToPopulateSeries=!0,this._requestChange([e])},_change_CORRECT_AXIS(){this._correctAxes()},_doRefresh(){const e=this._currentRefreshData;e&&(this._currentRefreshData=null,this._renderer.stopAllAnimations(!0),this[e]())},_updateCanvasClipRect(e){const t=Math.max(e.width-e.left-e.right,0),i=Math.max(e.height-e.top-e.bottom,0);this._canvasClipRect.attr({x:e.left,y:e.top,width:t,height:i}),this._backgroundRect.attr({x:e.left,y:e.top,width:t,height:i})},_getCanvasClipRectID(){return this._canvasClipRect.id},_dataSourceChangedHandler(){this._changes.has("INIT")?this._requestChange(["DATA_INIT"]):this._requestChange(["FORCE_DATA_INIT"])},_dataInit(){this._dataSpecificInit(!0)},_processSingleSeries(e){e.createPoints(!1)},_handleSeriesDataUpdated(){this._getVisibleSeries().some((e=>e.useAggregation()))&&this._populateMarginOptions(),this.series.forEach((e=>this._processSingleSeries(e)),this)},_dataSpecificInit(e){this.series&&!this.needToPopulateSeries||(this.series=this._populateSeries()),this._repopulateSeries(),this._seriesPopulatedHandlerCore(),this._populateBusinessRange(),this._tracker.updateSeries(this.series,this._changes.has("INIT")),this._updateLegend(),e&&this._requestChange(["FULL_RENDER"])},_forceRender(){this._doRender({force:!0})},_repopulateSeries(){const e=this._themeManager,t=this._dataSourceItems(),i=e.getOptions("dataPrepareSettings");e.getOptions("seriesTemplate")&&this._populateSeries(t),this._groupSeries();const n=(0,h.validateData)(t,this._groupsData,this._incidentOccurred,i);e.resetPalette(),this.series.forEach((e=>{e.updateData(n[e.getArgumentField()])})),this._handleSeriesDataUpdated()},_renderCompleteHandler(){let e=!0;this._needHandleRenderComplete&&(this.series.forEach((t=>{e=e&&t.canRenderCompleteHandle()})),e&&(this._needHandleRenderComplete=!1,this._eventTrigger("done",{target:this})))},_dataIsReady(){return(0,l.isDefined)(this.option("dataSource"))&&this._dataIsLoaded()},_populateSeriesOptions(e){const t=this._themeManager,i=t.getOptions("seriesTemplate"),n=i?(0,C.processSeriesTemplate)(i,e||[]):this.option("series"),o=D(n)?n:n?[n]:[],a=this._getExtraOptions();let r,d;const u=[],c=e=>{this._specialProcessSeries(),this._populateBusinessRange(e&&e.getValueAxis(),!0),this._renderer.stopAllAnimations(!0),this._updateLegend(),this._requestChange(["FULL_RENDER"])};for(let e=0;e<o.length;e++)r=(0,s.extend)(!0,{},o[e],a),(0,l.isDefined)(r.name)&&""!==r.name||(r.name=`Series ${(e+1).toString()}`),r.rotated=this._isRotated(),r.customizePoint=t.getOptions("customizePoint"),r.customizeLabel=t.getOptions("customizeLabel"),r.visibilityChanged=c,r.incidentOccurred=this._incidentOccurred,d=t.getOptions("series",r,o.length),this._checkPaneName(d)&&u.push(d);return u},_populateSeries(e){var t;const i=[],n=this._incidentOccurred,o=this._populateSeriesOptions(e);let a,l=!1;this.needToPopulateSeries=!1,o.forEach((e=>{var t;const n=null===(t=this.series)||void 0===t?void 0:t.find((t=>t.name===e.name&&!i.map((e=>e.series)).includes(t)));n&&n.type===e.type?i.push({series:n,options:e}):(i.push({options:e}),l=!0)})),0!==(null===(t=this.series)||void 0===t?void 0:t.length)&&this._tracker.clearHover(),(0,r.reverseEach)(this.series,((e,t)=>{i.some((e=>t===e.series))||(this._disposeSeries(e),l=!0)})),!l&&(l=i.some((e=>e.series.name!==o[e.series.index].name))),this.series=[],l&&this._disposeSeriesFamilies(),this._themeManager.resetPalette();const d=e=>{this.series.forEach((t=>{t.notify(e)}))};return i.forEach((e=>{var t;const i=e.options,o=(null===(t=this._argumentAxes)||void 0===t?void 0:t.filter((e=>e.pane===i.pane))[0])??this.getArgumentAxis(),r={commonSeriesModes:this._getSelectionModes(),argumentAxis:o,valueAxis:this._getValueAxis(i.pane,i.axis)};e.series?(a=e.series,a.updateOptions(i,r)):a=new y.Series((0,s.extend)({renderer:this._renderer,seriesGroup:this._seriesGroup,labelsGroup:this._labelsGroup,eventTrigger:this._eventTrigger,eventPipe:d,incidentOccurred:n},r),i),a.isUpdated?(a.index=this.series.length,this.series.push(a)):n("E2101",[i.type])})),this.series},getStackedPoints(e){const t=e.series.getStackName();return this._getVisibleSeries().reduce(((i,n)=>((0,l.isDefined)(n.getStackName())&&(0,l.isDefined)(t)&&t!==n.getStackName()||(i=i.concat(n.getPointsByArg(e.argument))),i)),[])},getAllSeries:function(){return(this.series||[]).slice()},getSeriesByName:function(e){return(this.series||[]).find((t=>t.name===e))||null},getSeriesByPos:function(e){return(this.series||[])[e]},clearSelection:function(){this._tracker.clearSelection()},hideTooltip(){this._tracker._hideTooltip()},clearHover(){this._tracker.clearHover()},render(e){return this.__renderOptions=e,this.__forceRender=e&&e.force,this.callBase.apply(this,arguments),this.__renderOptions=this.__forceRender=null,this},refresh(){this._disposeSeries(),this._disposeSeriesFamilies(),this._requestChange(["CONTAINER_SIZE","REFRESH_SERIES_REINIT"])},_getMinSize(){const e=this._layoutManagerOptions();return[e.width,e.height]},_change_REFRESH(){this._changes.has("INIT")?this._currentRefreshData=null:this._doRefresh()},_change_FULL_RENDER(){this._forceRender()},_change_INIT(){this._reinit()},_stopCurrentHandling(){this._disposed||this._tracker.stopCurrentHandling()}});["series","commonSeriesSettings","dataPrepareSettings","seriesSelectionMode","pointSelectionMode","synchronizeMultiAxes","resolveLabelsOverlapping"].forEach((e=>{R.prototype._optionChangesMap[e]="REFRESH_SERIES_DATA_INIT"})),["adaptiveLayout","crosshair","resolveLabelOverlapping","adjustOnZoom","stickyHovering"].forEach((e=>{R.prototype._optionChangesMap[e]="FORCE_RENDER"})),["minBubbleSize","maxBubbleSize","barGroupPadding","barGroupWidth","negativesAsZeroes","negativesAsZeros"].forEach((e=>{R.prototype._optionChangesMap[e]="REFRESH_SERIES_FAMILIES"})),R.addPlugin(_.plugin),R.addPlugin(m.plugin),R.addPlugin(g.plugin),R.addPlugin(v.plugin),R.addPlugin(f.plugin);const{_change_TITLE:L}=R.prototype;R.prototype._change_TITLE=function(){L.apply(this,arguments),this._change(["FORCE_RENDER"])}},59282:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RollingStock=void 0;t.RollingStock=class{constructor(e,t,i){const n=e.getBoundingRect(),{x:o}=n,{y:a}=n,s=n.x+n.width,r=n.y+n.height;this.labels=[e],this.shiftFunction=i,this.bBox={start:t?o:a,width:t?n.width:n.height,end:t?s:r,oppositeStart:t?a:o,oppositeEnd:t?r:s},this.initialPosition=t?n.x:n.y}toChain(e){const t=e.getBoundingRect();e.shift(t.start-this.bBox.end),this.changeBoxWidth(t.width),this.labels=this.labels.concat(e.labels)}getBoundingRect(){return this.bBox}shift(e){this.labels.forEach((t=>{const i=t.getBoundingRect(),n=this.shiftFunction(i,e);t.hideInsideLabel(n)||t.shift(n.x,n.y)})),this.bBox.end-=e,this.bBox.start-=e}setRollingStockInCanvas(e){this.bBox.end>e.end&&this.shift(this.bBox.end-e.end)}getLabels(){return this.labels}value(){return this.labels[0].getData().value}getInitialPosition(){return this.initialPosition}changeBoxWidth(e){this.bBox.end+=e,this.bBox.width+=e}}},34506:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=S(i(92774)),o=S(i(65951)),a=S(i(64960)),s=S(i(97832)),r=S(i(64553)),l=i(17781),d=i(87739),u=i(52576),c=i(21274),h=i(57653),p=i(11528),g=i(3104),_=i(71671),f=i(95943),m=S(i(38355)),v=i(71115),C=S(i(48874)),y=i(63022),b=i(28779),x=i(2225),w=S(i(55351));function S(e){return e&&e.__esModule?e:{default:e}}const{log:D}=m.default,I="rtlEnabled",E="dx-sized-element",T=s.default.prototype.option;function A(){return!0}function O(){return!1}function P(e){e.component._eventsStrategy.hasEvent("incidentOccurred")||D.apply(null,[e.target.id].concat(e.target.args||[]))}function k(e){return e.reduce(((e,t)=>t>0&&!e?t:e),0)}function M(e){e.forEach((e=>e()))}const R=!(0,g.hasWindow)()?function(){const e={_initTemplates(){},ctor(e,t){this.callBase(e,t);const i=a.default.createElement("div"),n=t&&(0,p.isNumeric)(t.width)?`${t.width}px`:"100%",o=t&&(0,p.isNumeric)(t.height)?`${t.height}px`:`${this._getDefaultSize().height}px`;a.default.setStyle(i,"width",n),a.default.setStyle(i,"height",o),a.default.setClass(i,E,!1),a.default.insertElement(e,i)}},t=s.default.inherit(e),i=t.inherit;return t.inherit=function(e){return Object.keys(e).forEach((t=>{((0,p.isFunction)(e[t])&&"_"!==t.substr(0,1)&&"option"!==t||"_dispose"===t||"_optionChanged"===t)&&(e[t]=l.noop)})),i.call(this,e)},t}():s.default.inherit({_eventsMap:{onIncidentOccurred:{name:"incidentOccurred",actionSettings:{excludeValidators:["disabled"]}},onDrawn:{name:"drawn",actionSettings:{excludeValidators:["disabled"]}}},_getDefaultOptions(){return(0,u.extend)(this.callBase(),{onIncidentOccurred:P})},_useLinks:!0,_init(){this._$element.children(`.${E}`).remove(),this._graphicObjects={},this.callBase(...arguments),this._changesLocker=0,this._optionChangedLocker=0,this._asyncFirstDrawing=!0,this._changes=(0,v.changes)(),this._suspendChanges(),this._themeManager=this._createThemeManager(),this._themeManager.setCallback((()=>{this._requestChange(this._themeDependentChanges)})),this._renderElementAttributes(),this._initRenderer();const e=this._useLinks;e&&this._renderer.root.enableLinks().virtualLink("core").virtualLink("peripheral"),this._renderVisibilityChange(),this._attachVisibilityChangeHandlers(),this._toggleParentsScrollSubscription(this._isVisible()),this._initEventTrigger(),this._incidentOccurred=(0,f.createIncidentOccurred)(this.NAME,this._eventTrigger),this._layout=new C.default,e&&this._renderer.root.linkAfter("core"),this._initPlugins(),this._initCore(),e&&this._renderer.root.linkAfter(),this._change(this._initialChanges)},_createThemeManager(){return new _.BaseThemeManager(this._getThemeManagerOptions())},_getThemeManagerOptions(){return{themeSection:this._themeSection,fontFields:this._fontFields}},_initialChanges:["LAYOUT","RESIZE_HANDLER","THEME","DISABLED"],_initPlugins(){(0,c.each)(this._plugins,((e,t)=>{t.init.call(this)}))},_disposePlugins(){(0,c.each)(this._plugins.slice().reverse(),((e,t)=>{t.dispose.call(this)}))},_change(e){this._changes.add(e)},_suspendChanges(){this._changesLocker+=1},_resumeChanges(){0==--this._changesLocker&&this._changes.count()>0&&!this._applyingChanges&&(this._renderer.lock(),this._applyingChanges=!0,this._applyChanges(),this._changes.reset(),this._applyingChanges=!1,this._changesApplied(),this._renderer.unlock(),this._optionsQueue&&this._applyQueuedOptions(),this.resolveItemsDeferred(this._legend?[this._legend]:[]),this._optionChangedLocker+=1,this._notify(),this._optionChangedLocker-=1)},resolveItemsDeferred(e){this._resolveDeferred(this._getTemplatesItems(e))},_collectTemplatesFromItems:e=>e.reduce(((e,t)=>({items:e.items.concat(t.getTemplatesDef()),groups:e.groups.concat(t.getTemplatesGroups())})),{items:[],groups:[]}),_getTemplatesItems(e){const t=this._collectTemplatesFromItems(e),i=this._getExtraTemplatesItems();return{items:i.items.concat(t.items),groups:i.groups.concat(t.groups),launchRequest:[i.launchRequest],doneRequest:[i.doneRequest]}},_getExtraTemplatesItems:()=>({items:[],groups:[],launchRequest:()=>{},doneRequest:()=>{}}),_resolveDeferred(e){let{items:t,launchRequest:i,doneRequest:n,groups:o}=e;if(this._setGroupsVisibility(o,"hidden"),this._changesApplying)return this._changesApplying=!1,void M(n);let a=!0;d.when.apply(this,t).done((()=>{if(a)return void this._setGroupsVisibility(o,"visible");M(i),this._changesApplying=!0;const e=["LAYOUT","FULL_RENDER"];this._asyncFirstDrawing?(e.push("FORCE_FIRST_DRAWING"),this._asyncFirstDrawing=!1):e.push("FORCE_DRAWING"),this._requestChange(e),this._setGroupsVisibility(o,"visible")})),a=!1},_setGroupsVisibility(e,t){e.forEach((e=>e.attr({visibility:t})))},_applyQueuedOptions(){const e=this._optionsQueue;this._optionsQueue=null,this.beginUpdate(),(0,c.each)(e,((e,t)=>{t()})),this.endUpdate()},_requestChange(e){this._suspendChanges(),this._change(e),this._resumeChanges()},_applyChanges(){const e=this._changes,t=this._totalChangesOrder,i=t.length;for(let n=0;n<i;n+=1)e.has(t[n])&&this[`_change_${t[n]}`]()},_optionChangesOrder:["EVENTS","THEME","RENDERER","RESIZE_HANDLER"],_layoutChangesOrder:["ELEMENT_ATTR","CONTAINER_SIZE","LAYOUT"],_customChangesOrder:["DISABLED"],_change_EVENTS(){this._eventTrigger.applyChanges()},_change_THEME(){this._setThemeAndRtl()},_change_RENDERER(){this._setRendererOptions()},_change_RESIZE_HANDLER(){this._setupResizeHandler()},_change_ELEMENT_ATTR(){this._renderElementAttributes(),this._change(["CONTAINER_SIZE"])},_change_CONTAINER_SIZE(){this._updateSize()},_change_LAYOUT(){this._setContentSize()},_change_DISABLED(){const e=this._renderer,{root:t}=e;this.option("disabled")?(this._initDisabledState=t.attr("pointer-events"),t.attr({"pointer-events":"none",filter:e.getGrayScaleFilter().id})):"none"===t.attr("pointer-events")&&t.attr({"pointer-events":(0,p.isDefined)(this._initDisabledState)?this._initDisabledState:null,filter:null})},_themeDependentChanges:["RENDERER"],_initRenderer(){const e=this._calculateRawCanvas();this._canvas=(0,x.floorCanvasDimensions)(e),this._renderer=new y.Renderer({cssClass:`${this._rootClassPrefix} ${this._rootClass}`,pathModified:this.option("pathModified"),container:this._$element[0]}),this._renderer.resize(this._canvas.width,this._canvas.height)},_disposeRenderer(){this._renderer.dispose()},_disposeGraphicObjects(){Object.keys(this._graphicObjects).forEach((e=>{this._graphicObjects[e].dispose()})),this._graphicObjects=null},_getAnimationOptions:l.noop,render(){this._requestChange(["CONTAINER_SIZE"]);const e=this._isVisible();this._toggleParentsScrollSubscription(e),!e&&this._stopCurrentHandling()},_toggleParentsScrollSubscription(e){let t=(0,r.default)(this._renderer.root.element).parents();const i="scroll.viz_widgets";"generic"===o.default.real().platform&&(t=t.add((0,g.getWindow)())),this._proxiedTargetParentsScrollHandler=this._proxiedTargetParentsScrollHandler||function(){this._stopCurrentHandling()}.bind(this),n.default.off((0,r.default)("").add(this._$prevRootParents),i,this._proxiedTargetParentsScrollHandler),e&&(n.default.on(t,i,this._proxiedTargetParentsScrollHandler),this._$prevRootParents=t)},_stopCurrentHandling:l.noop,_dispose(){this._disposed||(this.callBase(...arguments),this._toggleParentsScrollSubscription(!1),this._removeResizeHandler(),this._layout.dispose(),this._eventTrigger.dispose(),this._disposeCore(),this._disposePlugins(),this._disposeGraphicObjects(),this._disposeRenderer(),this._themeManager.dispose(),this._themeManager=null,this._renderer=null,this._eventTrigger=null)},_initEventTrigger(){this._eventTrigger=(0,f.createEventTrigger)(this._eventsMap,((e,t)=>this._createActionByOption(e,t)))},_calculateRawCanvas(){const e=this.option("size")||{},t=this.option("margin")||{},i=this._getDefaultSize()||{},n=(e,t,i)=>{if(n=e[t],(0,p.isDefined)(n)&&n>0||!(0,g.hasWindow)())return 0;var n;const o=i(this._$element);return o<=1?0:o},o=n(e,"width",(e=>(0,h.getWidth)(e))),a=n(e,"height",(e=>(0,h.getHeight)(e)));let s={width:e.width<=0?0:k([e.width,o,i.width]),height:e.height<=0?0:k([e.height,a,i.height]),left:k([t.left,i.left]),top:k([t.top,i.top]),right:k([t.right,i.right]),bottom:k([t.bottom,i.bottom])};return(s.width-s.left-s.right<=0||s.height-s.top-s.bottom<=0)&&(s={width:0,height:0}),s},_updateSize(){const e=this._calculateRawCanvas();((0,x.areCanvasesDifferent)(this._canvas,e)||this.__forceRender)&&(this._canvas=(0,x.floorCanvasDimensions)(e),this._recreateSizeDependentObjects(!0),this._renderer.resize(this._canvas.width,this._canvas.height),this._change(["LAYOUT"]))},_recreateSizeDependentObjects:l.noop,_getMinSize:()=>[0,0],_getAlignmentRect:l.noop,_setContentSize(){const e=this._canvas,t=this._layout;let i=e.width>0&&e.height>0?[e.left,e.top,e.width-e.right,e.height-e.bottom]:[0,0,0,0];i=t.forward(i,this._getMinSize());const n=this._applySize(i)||i;t.backward(n,this._getAlignmentRect()||n)},_getOption(e,t){const i=this._themeManager.theme(e),n=this.option(e);return t?void 0!==n?n:i:(0,u.extend)(!0,{},i,n)},_setupResizeHandler(){const e=(0,b.parseScalar)(this._getOption("redrawOnResize",!0),!0);this._disposeResizeHandler&&this._removeResizeHandler(),this._disposeResizeHandler=(0,f.createResizeHandler)(this._$element[0],e,(()=>this._requestChange(["CONTAINER_SIZE"])))},_removeResizeHandler(){this._disposeResizeHandler&&(this._disposeResizeHandler(),this._disposeResizeHandler=null)},_onBeginUpdate:l.noop,beginUpdate(){return this._initialized&&this._isUpdateAllowed()&&(this._onBeginUpdate(),this._suspendChanges()),this.callBase(...arguments),this},endUpdate(){return this.callBase(),this._isUpdateAllowed()&&this._resumeChanges(),this},option(e){if(!(this._initialized&&this._applyingChanges&&(arguments.length>1||(0,p.isObject)(e))))return T.apply(this,arguments);this._optionsQueue=this._optionsQueue||[],this._optionsQueue.push(this._getActionForUpdating(arguments))},_getActionForUpdating(e){return()=>{T.apply(this,e)}},_clean:l.noop,_render:l.noop,_optionChanged(e){if(this._optionChangedLocker)return;const t=this.getPartialChangeOptionsName(e);let i=[];t.length>0?t.forEach((e=>i.push(this._partialOptionChangesMap[e]))):i.push(this._optionChangesMap[e.name]),i=i.filter((e=>!!e)),this._eventTrigger.change(e.name)?this._change(["EVENTS"]):i.length>0?this._change(i):this.callBase.apply(this,arguments)},_notify:l.noop,_changesApplied:l.noop,_optionChangesMap:{size:"CONTAINER_SIZE",margin:"CONTAINER_SIZE",redrawOnResize:"RESIZE_HANDLER",theme:"THEME",rtlEnabled:"THEME",encodeHtml:"THEME",elementAttr:"ELEMENT_ATTR",disabled:"DISABLED"},_partialOptionChangesMap:{},_partialOptionChangesPath:{},getPartialChangeOptionsName(e){const{fullName:t}=e,i=t.split(/[.]/),{name:n}=e,{value:o}=e,a=this._partialOptionChangesPath[n],s=[];return a&&(!0===a?s.push(n):(a.forEach((e=>{t.indexOf(e)>=0&&s.push(e)})),1===i.length&&("object"===(0,p.type)(o)?this._addOptionsNameForPartialUpdate(o,a,s):"array"===(0,p.type)(o)&&o.length>0&&o.every((e=>this._checkOptionsForPartialUpdate(e,a)))&&o.forEach((e=>{this._addOptionsNameForPartialUpdate(e,a,s)}))))),s.filter(((e,t,i)=>i.indexOf(e)===t))},_checkOptionsForPartialUpdate:(e,t)=>!Object.keys(e).some((e=>-1===t.indexOf(e))),_addOptionsNameForPartialUpdate(e,t,i){const n=Object.keys(e);this._checkOptionsForPartialUpdate(e,t)&&n.forEach((e=>t.indexOf(e)>-1&&i.push(e)))},_visibilityChanged(){this.render()},_setThemeAndRtl(){this._themeManager.setTheme(this.option("theme"),this.option(I))},_getRendererOptions(){return{rtl:this.option(I),encodeHtml:this.option("encodeHtml"),animation:this._getAnimationOptions()}},_setRendererOptions(){this._renderer.setOptions(this._getRendererOptions())},svg(){return this._renderer.svg()},getSize(){const e=this._canvas||{};return{width:e.width,height:e.height}},isReady:O,_dataIsReady:A,_resetIsReady(){this.isReady=O},_renderGraphicObjects(){const e=this._renderer,t=w.default.getGraphicObjects();Object.keys(t).forEach((i=>{if(!this._graphicObjects[i]){const{type:n,colors:o,rotationAngle:a,template:s,width:r,height:l}=t[i];switch(n){case"linear":this._graphicObjects[i]=e.linearGradient(o,i,a);break;case"radial":this._graphicObjects[i]=e.radialGradient(o,i);break;case"pattern":this._graphicObjects[i]=e.customPattern(i,this._getTemplate(s),r,l)}}}))},_drawn(){this.isReady=O,this._dataIsReady()&&this._renderer.onEndAnimation((()=>{this.isReady=A})),this._eventTrigger("drawn",{})}});t.default=R;(0,v.replaceInherit)(R)},12638:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=[{baseThemeName:"material.blue.light",theme:{name:"fluent.blue.light"}},{baseThemeName:"fluent.blue.light",theme:{name:"fluent.blue.light.compact"}},{baseThemeName:"material.blue.dark",theme:{name:"fluent.blue.dark"}},{baseThemeName:"fluent.blue.dark",theme:{name:"fluent.blue.dark.compact"}}]},58208:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i="#f05b41",n="#fff",o="#333",a="#8899a8",s="#707070",r="#dee1e3";t.default=[{baseThemeName:"generic.light",theme:{name:"generic.carmine",defaultPalette:"Carmine",backgroundColor:n,primaryTitleColor:o,secondaryTitleColor:a,gridColor:r,axisColor:s,export:{backgroundColor:n,font:{color:o},button:{default:{color:o,borderColor:"#b1b7bd",backgroundColor:n},hover:{color:o,borderColor:"#b1b7bd",backgroundColor:"#faf2f0"},focus:{color:o,borderColor:"#6d7781",backgroundColor:"#faf2f0"},active:{color:o,borderColor:"#6d7781",backgroundColor:"#f5e7e4"}}},legend:{font:{color:s}},tooltip:{color:n,border:{color:r},font:{color:o}},"chart:common":{commonSeriesSettings:{label:{border:{color:r}}}},"chart:common:annotation":{font:{color:o},border:{color:r},color:n},chart:{commonPaneSettings:{border:{color:r}},commonAxisSettings:{breakStyle:{color:"#c1c5c7"}}},rangeSelector:{scale:{breakStyle:{color:"#c1c5c7"},tick:{opacity:.12}},selectedRangeColor:i,sliderMarker:{color:i},sliderHandle:{color:i,opacity:.5}},sparkline:{pointColor:n,minColor:"#f0ad4e",maxColor:"#f74d61"},treeMap:{group:{color:r,label:{font:{color:a}}}},bullet:{color:i},gauge:{valueIndicators:{rangebar:{color:i},textcloud:{color:i}}}}},{baseThemeName:"generic.carmine",theme:{name:"generic.carmine.compact"}}]},2611:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i="#ffffff",n="#000000",o="#cf00da",a="#f8ca00";t.default=[{baseThemeName:"generic.light",theme:{name:"generic.contrast",defaultPalette:"Bright",font:{color:i},backgroundColor:n,primaryTitleColor:i,secondaryTitleColor:i,gridColor:i,axisColor:i,export:{backgroundColor:n,font:{color:i},button:{default:{color:i,borderColor:i,backgroundColor:n},hover:{color:i,borderColor:i,backgroundColor:"#cf00d7"},focus:{color:i,borderColor:"#cf00d7",backgroundColor:n},active:{color:n,borderColor:i,backgroundColor:i}},borderColor:i,menuButtonColor:n,activeBackgroundColor:i,activeColor:n,selectedBorderColor:o,selectedColor:o,shadowColor:"none"},tooltip:{border:{color:i},font:{color:i},color:n},"chart:common":{commonSeriesSettings:{valueErrorBar:{color:i},hoverStyle:{hatching:{opacity:.5}},selectionStyle:{hatching:{opacity:.35}},label:{font:{color:i},border:{color:i}}}},"chart:common:axis":{constantLineStyle:{color:i}},"chart:common:annotation":{font:{color:i},border:{color:i},color:n},chart:{commonSeriesSettings:{},crosshair:{color:"#cf00d7"},commonPaneSettings:{backgroundColor:n,border:{color:i}},scrollBar:{color:i},commonAxisSettings:{breakStyle:{color:"#cf00d7"}},zoomAndPan:{dragBoxStyle:{color:i,opacity:.7}}},pie:{commonSeriesSettings:{pie:{hoverStyle:{hatching:{opacity:.5}},selectionStyle:{hatching:{opacity:.35}}},doughnut:{hoverStyle:{hatching:{opacity:.5}},selectionStyle:{hatching:{opacity:.35}}},donut:{hoverStyle:{hatching:{opacity:.5}},selectionStyle:{hatching:{opacity:.35}}}}},gauge:{rangeContainer:{backgroundColor:i},valueIndicators:{_default:{color:i},rangebar:{color:i,backgroundColor:n},twocolorneedle:{secondColor:i},trianglemarker:{color:i},textcloud:{color:i,text:{font:{color:n}}}}},barGauge:{backgroundColor:"#3c3c3c"},rangeSelector:{scale:{tick:{color:i,opacity:.4},minorTick:{color:i,opacity:.12},breakStyle:{color:"#cf00d7"}},selectedRangeColor:o,sliderMarker:{color:o},sliderHandle:{color:o,opacity:1},shutter:{opacity:.75},background:{color:n}},map:{background:{borderColor:i},layer:{label:{stroke:n,font:{color:i}}},"layer:area":{borderColor:n,color:"#686868",hoveredBorderColor:i,selectedBorderColor:i,label:{font:{opacity:1}}},"layer:line":{color:"#267cff",hoveredColor:"#f613ff",selectedColor:i},"layer:marker:dot":{borderColor:n,color:a,backColor:n,backOpacity:.32},"layer:marker:bubble":{color:a,hoveredBorderColor:i,selectedBorderColor:i},"layer:marker:pie":{hoveredBorderColor:i,selectedBorderColor:i},controlBar:{borderColor:i,color:n,opacity:.3}},treeMap:{tile:{color:"#70c92f"},group:{color:"#797979",label:{font:{color:i}}}},sparkline:{pointColor:n},bullet:{},polar:{commonSeriesSettings:{}},funnel:{label:{connector:{opacity:1}}},sankey:{label:{font:{color:i},shadow:{opacity:0}},node:{border:{visible:!0,width:1,color:i}},link:{opacity:.5,border:{visible:!0,width:1,color:i},hoverStyle:{opacity:.9}}}}},{baseThemeName:"generic.contrast",theme:{name:"generic.contrast.compact"}}]},52541:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i="#ffffff",n="#2b2b2b",o="#b5b5b5",a="#303030",s="#c7c7c7",r="#8e8e8e",l="#b8b8b8",d="#494949";t.default=[{baseThemeName:"generic.light",theme:{name:"generic.dark",font:{color:"#808080"},backgroundColor:"#2a2a2a",primaryTitleColor:"#dedede",secondaryTitleColor:"#a3a3a3",gridColor:"#555555",axisColor:"#a3a3a3",export:{backgroundColor:"#2a2a2a",font:{color:"#dbdbdb"},button:{default:{color:"#dedede",borderColor:"#4d4d4d",backgroundColor:"#2e2e2e"},hover:{color:"#dedede",borderColor:"#6c6c6c",backgroundColor:"#444"},focus:{color:"#dedede",borderColor:"#8d8d8d",backgroundColor:"#444444"},active:{color:"#dedede",borderColor:"#8d8d8d",backgroundColor:"#555555"}},shadowColor:"#292929"},tooltip:{color:n,border:{color:d},font:{color:"#929292"}},"chart:common":{commonSeriesSettings:{label:{border:{color:d}},valueErrorBar:{color:i}}},"chart:common:axis":{constantLineStyle:{color:i}},"chart:common:annotation":{font:{color:"#929292"},border:{color:d},color:n,shadow:{opacity:.008,offsetY:4,blur:8}},chart:{commonPaneSettings:{border:{color:d}},commonAxisSettings:{breakStyle:{color:"#818181"}},zoomAndPan:{dragBoxStyle:{color:i}}},gauge:{rangeContainer:{backgroundColor:o},valueIndicators:{_default:{color:o},rangebar:{color:"#84788b"},twocolorneedle:{secondColor:"#ba544d"},trianglemarker:{color:"#b7918f"},textcloud:{color:"#ba544d"}}},barGauge:{backgroundColor:"#3c3c3c"},rangeSelector:{scale:{tick:{color:i,opacity:.32},minorTick:{color:i,opacity:.1},breakStyle:{color:"#818181"}},selectedRangeColor:o,sliderMarker:{color:o,font:{color:a}},sliderHandle:{color:i,opacity:.2},shutter:{color:n,opacity:.9}},map:{background:{borderColor:"#3f3f3f"},layer:{label:{stroke:"#000000",font:{color:i}}},"layer:area":{borderColor:a,color:"#686868",hoveredBorderColor:i,selectedBorderColor:i},"layer:line":{color:"#c77244",hoveredColor:"#ff5d04",selectedColor:"#ff784f"},"layer:marker:bubble":{hoveredBorderColor:i,selectedBorderColor:i},"layer:marker:pie":{hoveredBorderColor:i,selectedBorderColor:i},legend:{border:{color:"#3f3f3f"},font:{color:i}},controlBar:{borderColor:s,color:a}},treeMap:{group:{color:"#4c4c4c",label:{font:{color:"#a3a3a3"}}}},sparkline:{lineColor:s,firstLastColor:s,barPositiveColor:l,barNegativeColor:r,winColor:l,lossColor:r,pointColor:a},bullet:{targetColor:r},funnel:{item:{border:{color:"#2a2a2a"}}},sankey:{label:{font:{color:i},shadow:{opacity:0}},node:{border:{color:"#2a2a2a"}},link:{color:"#888888",border:{color:"#2a2a2a"},hoverStyle:{color:"#bbbbbb"}}}}},{baseThemeName:"generic.dark",theme:{name:"generic.dark.compact"}}]},9940:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i="#3debd3",n="#465672",o="#fff",a="#c7ccd4",s="#596980";t.default=[{baseThemeName:"generic.dark",theme:{name:"generic.darkmoon",defaultPalette:"Dark Moon",backgroundColor:n,primaryTitleColor:o,secondaryTitleColor:"#919bac",gridColor:s,axisColor:a,export:{backgroundColor:n,font:{color:o},button:{default:{color:o,borderColor:"#7a889e",backgroundColor:n},hover:{color:o,borderColor:"#9da8b8",backgroundColor:"#596e92"},focus:{color:o,borderColor:"#c4cad4",backgroundColor:"#596e92"},active:{color:o,borderColor:"#c4cad4",backgroundColor:"#6b80a4"}}},legend:{font:{color:a}},tooltip:{color:"#62789e",border:{color:s},font:{color:o}},"chart:common":{commonSeriesSettings:{label:{border:{color:s}}}},"chart:common:annotation":{font:{color:o},border:{color:s},color:"#62789e"},chart:{commonPaneSettings:{border:{color:s}},commonAxisSettings:{breakStyle:{color:"#73869e"}}},gauge:{valueIndicators:{rangebar:{color:i},textcloud:{color:i,text:{font:{color:n}}}}},barGauge:{backgroundColor:"#526280"},funnel:{item:{border:{color:n}}},sparkline:{pointColor:n,minColor:"#f0ad4e",maxColor:"#f9517e"},treeMap:{group:{color:s,label:{font:{color:o}}}},map:{background:{borderColor:s},"layer:area":{color:"#97a3b6",borderColor:n}},rangeSelector:{shutter:{color:n},scale:{breakStyle:{color:"#73869e"},tick:{opacity:.2}},selectedRangeColor:i,sliderMarker:{color:i,font:{color:"#000"}},sliderHandle:{color:i,opacity:.5}},bullet:{color:i},sankey:{link:{border:{color:n}},node:{border:{color:n}}}}},{baseThemeName:"generic.darkmoon",theme:{name:"generic.darkmoon.compact"}}]},26374:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i="#9c63ff",n="#17171f",o="#f5f6f7",a="#fff",s="#b2b2b6",r="#343840";t.default=[{baseThemeName:"generic.dark",theme:{name:"generic.darkviolet",defaultPalette:"Dark Violet",backgroundColor:n,primaryTitleColor:o,secondaryTitleColor:a,gridColor:r,axisColor:s,export:{backgroundColor:n,font:{color:o},button:{default:{color:o,borderColor:"#414152",backgroundColor:n},hover:{color:o,borderColor:"#5c5c74",backgroundColor:"#2d2d3c"},focus:{color:o,borderColor:"#7c7c97",backgroundColor:"#2d2d3c"},active:{color:o,borderColor:"#7c7c97",backgroundColor:"#3c3c51"}}},legend:{font:{color:s}},tooltip:{color:n,border:{color:"#414152"},font:{color:o}},"chart:common":{commonSeriesSettings:{label:{border:{color:r}}}},"chart:common:annotation":{font:{color:o},border:{color:"#414152"},color:n},chart:{commonPaneSettings:{border:{color:r}},commonAxisSettings:{breakStyle:{color:"#575e6b"}}},funnel:{item:{border:{color:n}}},sparkline:{pointColor:n,minColor:"#f0ad4e",maxColor:"#d9534f"},treeMap:{group:{color:r,label:{font:{color:a}}}},rangeSelector:{shutter:{color:n},scale:{breakStyle:{color:"#575e6b"},tick:{opacity:.2}},selectedRangeColor:i,sliderMarker:{color:i,font:{color:"#fff"}},sliderHandle:{color:i,opacity:.5}},bullet:{color:i},gauge:{valueIndicators:{rangebar:{color:i},textcloud:{color:i}}},sankey:{link:{border:{color:n}},node:{border:{color:n}}}}},{baseThemeName:"generic.darkviolet",theme:{name:"generic.darkviolet.compact"}}]},29431:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i="#3cbab2",n="#f5f5f5",o="#28484f",a="#7eb2be",s="#657c80",r="#dedede";t.default=[{baseThemeName:"generic.light",theme:{name:"generic.greenmist",defaultPalette:"Green Mist",backgroundColor:n,primaryTitleColor:o,secondaryTitleColor:a,gridColor:r,axisColor:s,export:{backgroundColor:n,font:{color:o},button:{default:{color:o,borderColor:"#a2b4b8",backgroundColor:n},hover:{color:o,borderColor:"#7f989e",backgroundColor:"rgba(222, 222, 222, 0.4)"},focus:{color:o,borderColor:"#5f777c",backgroundColor:"rgba(222, 222, 222, 0.4)"},active:{color:o,borderColor:"#5f777c",backgroundColor:"rgba(222, 222, 222, 0.8)"}}},legend:{font:{color:s}},tooltip:{color:"#fff",border:{color:r},font:{color:o}},"chart:common":{commonSeriesSettings:{label:{border:{color:r}}}},"chart:common:annotation":{color:"#fff",border:{color:r},font:{color:o}},chart:{commonPaneSettings:{border:{color:r}},commonAxisSettings:{breakStyle:{color:"#c1c1c1"}}},funnel:{item:{border:{color:n}}},sparkline:{pointColor:n,minColor:"#ffc852",maxColor:"#f74a5e"},treeMap:{group:{color:r,label:{font:{color:a}}}},rangeSelector:{shutter:{color:n},scale:{breakStyle:{color:"#c1c1c1"},tick:{opacity:.12}},selectedRangeColor:i,sliderMarker:{color:i},sliderHandle:{color:i,opacity:.5}},bullet:{color:i},gauge:{valueIndicators:{rangebar:{color:i},textcloud:{color:i}}}}},{baseThemeName:"generic.greenmist",theme:{name:"generic.greenmist.compact"}}]},39599:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={barGauge:{backgroundColor:"#e0e0e0",relativeInnerRadius:.3,barSpacing:4,resolveLabelOverlapping:"hide",label:{indent:20,connectorWidth:2,font:{size:16}},legend:{visible:!1},indicator:{hasPositiveMeaning:!0,layout:{horizontalAlignment:n.CENTER,verticalAlignment:n.BOTTOM},text:{font:{size:18}}}}}},5828:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={bullet:{color:"#e8c267",targetColor:"#666666",targetWidth:4,showTarget:!0,showZeroLevel:!0,tooltip:{enabled:!0}}}},67322:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={"chart:common":{animation:{enabled:!0,duration:1e3,easing:"easeOutCubic",maxPointCountSupported:300},commonSeriesSettings:{border:{visible:!1,width:2},showInLegend:!0,visible:!0,hoverMode:"nearestPoint",selectionMode:"includePoints",hoverStyle:{hatching:{direction:n.RIGHT,width:2,step:6,opacity:.75},highlight:!0,border:{visible:!1,width:3}},selectionStyle:{hatching:{direction:n.RIGHT,width:2,step:6,opacity:.5},highlight:!0,border:{visible:!1,width:3}},valueErrorBar:{displayMode:"auto",value:1,color:n.BLACK,lineWidth:2,edgeLength:8},label:{visible:!1,alignment:n.CENTER,rotationAngle:0,horizontalOffset:0,verticalOffset:0,radialOffset:0,showForZeroValues:!0,customizeText:void 0,maxLabelCount:void 0,position:n.OUTSIDE,font:{color:n.WHITE},border:{visible:!1,width:1,color:n.LIGHT_GREY,dashStyle:n.SOLID},connector:{visible:!1,width:1}}},seriesSelectionMode:"single",pointSelectionMode:"single",equalRowHeight:!0,dataPrepareSettings:{checkTypeForAllData:!1,convertToAxisDataType:!0,sortingMethod:!0},title:{margin:10},adaptiveLayout:{width:80,height:80,keepLabels:!0},_rtl:{legend:{itemTextPosition:n.LEFT}},resolveLabelOverlapping:n.NONE},"chart:common:axis":{visible:!0,valueMarginsEnabled:!0,placeholderSize:null,logarithmBase:10,discreteAxisDivisionMode:"betweenLabels",aggregatedPointsPosition:"betweenTicks",width:1,label:{visible:!0},grid:{visible:!1,width:1},minorGrid:{visible:!1,width:1,opacity:.3},tick:{visible:!0,width:1,length:7,shift:3},minorTick:{visible:!1,width:1,opacity:.3,length:7,shift:3},stripStyle:{paddingLeftRight:10,paddingTopBottom:5},constantLineStyle:{width:1,color:n.BLACK,dashStyle:n.SOLID,label:{visible:!0,position:n.INSIDE}},marker:{label:{}}},"chart:common:annotation":{font:{color:"#333333"},tooltipEnabled:!0,border:{width:1,color:"#dddddd",dashStyle:n.SOLID,visible:!0},color:n.WHITE,opacity:.9,arrowLength:14,arrowWidth:14,paddingLeftRight:10,paddingTopBottom:10,shadow:{opacity:.15,offsetX:0,offsetY:1,blur:4,color:n.BLACK},image:{width:30,height:30},wordWrap:"normal",textOverflow:"ellipsis",allowDragging:!1},chart:{commonSeriesSettings:{type:"line",stack:"default",aggregation:{enabled:void 0},point:{visible:!0,symbol:"circle",size:12,border:{visible:!1,width:1},hoverMode:"onlyPoint",selectionMode:"onlyPoint",hoverStyle:{border:{visible:!0,width:4}},selectionStyle:{border:{visible:!0,width:4}}},scatter:{},line:{width:2,dashStyle:n.SOLID,hoverStyle:{width:3,hatching:{direction:n.NONE},highlight:!1},selectionStyle:{width:3}},stackedline:{width:2,dashStyle:n.SOLID,hoverStyle:{width:3,hatching:{direction:n.NONE},highlight:!1},selectionStyle:{width:3}},stackedspline:{width:2,dashStyle:n.SOLID,hoverStyle:{width:3,hatching:{direction:n.NONE},highlight:!1},selectionStyle:{width:3}},fullstackedline:{width:2,dashStyle:n.SOLID,hoverStyle:{width:3,hatching:{direction:n.NONE},highlight:!1},selectionStyle:{width:3}},fullstackedspline:{width:2,dashStyle:n.SOLID,hoverStyle:{width:3,hatching:{direction:n.NONE},highlight:!1},selectionStyle:{width:3}},stepline:{width:2,dashStyle:n.SOLID,hoverStyle:{width:3,hatching:{direction:n.NONE},highlight:!1},selectionStyle:{width:3}},area:{point:{visible:!1},opacity:.5},stackedarea:{point:{visible:!1},opacity:.5},fullstackedarea:{point:{visible:!1},opacity:.5},fullstackedsplinearea:{point:{visible:!1},opacity:.5},steparea:{border:{visible:!0,width:2},point:{visible:!1},hoverStyle:{border:{visible:!0,width:3}},selectionStyle:{border:{visible:!0,width:3}},opacity:.5},spline:{width:2,hoverStyle:{width:3,hatching:{direction:n.NONE},highlight:!1},selectionStyle:{width:3}},splinearea:{point:{visible:!1},opacity:.5},stackedsplinearea:{point:{visible:!1},opacity:.5},bar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}}},stackedbar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}},label:{position:n.INSIDE}},fullstackedbar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}},label:{position:n.INSIDE}},rangebar:{cornerRadius:0,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}}},rangearea:{point:{visible:!1},opacity:.5},rangesplinearea:{point:{visible:!1},opacity:.5},bubble:{opacity:.5,point:{hoverStyle:{border:{visible:!1}},selectionStyle:{border:{visible:!1}}}},candlestick:{width:1,reduction:{color:n.RED},hoverStyle:{width:3,hatching:{direction:n.NONE},highlight:!1},selectionStyle:{width:3,highlight:!1},point:{border:{visible:!0}}},stock:{width:1,reduction:{color:n.RED},hoverStyle:{width:3,hatching:{direction:n.NONE},highlight:!1},selectionStyle:{width:3,highlight:!1},point:{border:{visible:!0}}}},crosshair:{enabled:!1,color:"#f05b41",width:1,dashStyle:n.SOLID,label:{visible:!1,font:{color:n.WHITE,size:12}},verticalLine:{visible:!0},horizontalLine:{visible:!0}},commonAxisSettings:{multipleAxesSpacing:5,forceUserTickInterval:!1,breakStyle:{width:5,color:"#ababab",line:"waved"},label:{displayMode:"standard",overlappingBehavior:"hide",indentFromAxis:10,wordWrap:"normal",textOverflow:"none"},title:{font:{size:16},margin:6,alignment:n.CENTER},constantLineStyle:{paddingLeftRight:10,paddingTopBottom:10}},horizontalAxis:{position:n.BOTTOM,axisDivisionFactor:70,label:{rotationAngle:90,staggeringSpacing:5,alignment:n.CENTER},stripStyle:{label:{horizontalAlignment:n.CENTER,verticalAlignment:n.TOP}},constantLineStyle:{label:{horizontalAlignment:n.RIGHT,verticalAlignment:n.TOP}},constantLines:[]},verticalAxis:{position:n.LEFT,axisDivisionFactor:40,label:{alignment:n.RIGHT},stripStyle:{label:{horizontalAlignment:n.LEFT,verticalAlignment:n.CENTER}},constantLineStyle:{label:{horizontalAlignment:n.LEFT,verticalAlignment:n.TOP}},constantLines:[]},argumentAxis:{endOnTick:!1,aggregateByCategory:!0,workWeek:[1,2,3,4,5]},valueAxis:{grid:{visible:!0},autoBreaksEnabled:!1,maxAutoBreakCount:4},commonPaneSettings:{backgroundColor:n.NONE,border:{color:n.LIGHT_GREY,width:1,visible:!1,top:!0,bottom:!0,left:!0,right:!0,dashStyle:n.SOLID}},scrollBar:{visible:!1,offset:5,color:"gray",width:10},adjustOnZoom:!0,autoHidePointMarkers:!0,rotated:!1,synchronizeMultiAxes:!0,stickyHovering:!0,barGroupPadding:.3,minBubbleSize:12,maxBubbleSize:.2,zoomAndPan:{dragBoxStyle:{color:"#2a2a2a",opacity:.2},panKey:"shift",allowMouseWheel:!0,allowTouchGestures:!0}}}},12462:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WHITE=t.TOP=t.SOME_GREY=t.SOLID=t.SECONDARY_TITLE_COLOR=t.RIGHT=t.RED=t.PRIMARY_TITLE_COLOR=t.OUTSIDE=t.NONE=t.LIGHT_GREY=t.LEFT=t.INSIDE=t.GREY_GREEN=t.CENTER=t.BOTTOM=t.BLACK=void 0;t.WHITE="#ffffff",t.BLACK="#000000",t.LIGHT_GREY="#d3d3d3",t.GREY_GREEN="#303030",t.SOME_GREY="#2b2b2b",t.RED="#ff0000",t.PRIMARY_TITLE_COLOR="#232323",t.SECONDARY_TITLE_COLOR="#767676",t.NONE="none",t.SOLID="solid",t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t.CENTER="center",t.INSIDE="inside",t.OUTSIDE="outside"},60980:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={funnel:{sortData:!0,valueField:"val",colorField:"color",argumentField:"arg",hoverEnabled:!0,selectionMode:"single",item:{border:{visible:!1,width:2,color:n.WHITE},hoverStyle:{hatching:{opacity:.75,step:6,width:2,direction:n.RIGHT},border:{}},selectionStyle:{hatching:{opacity:.5,step:6,width:2,direction:n.RIGHT},border:{}}},title:{margin:10},adaptiveLayout:{width:80,height:80,keepLabels:!0},legend:{visible:!1},_rtl:{legend:{itemTextPosition:n.LEFT}},tooltip:{customizeTooltip:e=>({text:`${e.item.argument} ${e.valueText}`})},inverted:!1,algorithm:"dynamicSlope",neckWidth:0,neckHeight:0,resolveLabelOverlapping:"shift",label:{textOverflow:"ellipsis",wordWrap:"normal",visible:!0,horizontalAlignment:n.RIGHT,horizontalOffset:0,verticalOffset:0,showForZeroValues:!1,customizeText:e=>`${e.item.argument} ${e.valueText}`,position:"columns",font:{color:n.WHITE},border:{visible:!1,width:1,color:n.LIGHT_GREY,dashStyle:n.SOLID},connector:{visible:!0,width:1,opacity:.5}}}}},77393:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={gauge:{scale:{tick:{visible:!0,length:5,width:2,opacity:1},minorTick:{visible:!1,length:3,width:1,opacity:1},label:{visible:!0,alignment:n.CENTER,hideFirstOrLast:"last",overlappingBehavior:"hide"},position:n.TOP,endOnTick:!1},rangeContainer:{offset:0,width:5,backgroundColor:"#808080"},valueIndicators:{_default:{color:"#c2c2c2"},rangebar:{space:2,size:10,color:"#cbc5cf",backgroundColor:n.NONE,text:{indent:0,font:{size:14,color:null}}},twocolorneedle:{secondColor:"#e18e92"},trianglemarker:{space:2,length:14,width:13,color:"#8798a5"},textcloud:{arrowLength:5,horizontalOffset:6,verticalOffset:3,color:"#679ec5",text:{font:{color:n.WHITE,size:18}}}},indicator:{hasPositiveMeaning:!0,layout:{horizontalAlignment:n.CENTER,verticalAlignment:n.BOTTOM},text:{font:{size:18}}},_circular:{scale:{scaleDivisionFactor:17,orientation:n.OUTSIDE,label:{indentFromTick:10}},rangeContainer:{orientation:n.OUTSIDE},valueIndicatorType:"rectangleneedle",subvalueIndicatorType:"trianglemarker",valueIndicators:{_type:"rectangleneedle",_default:{offset:20,indentFromCenter:0,width:2,spindleSize:14,spindleGapSize:10,beginAdaptingAtRadius:50},triangleneedle:{width:4},twocolorneedle:{space:2,secondFraction:.4},rangebar:{offset:30},trianglemarker:{offset:6},textcloud:{offset:-6}}},_linear:{scale:{scaleDivisionFactor:25,horizontalOrientation:n.RIGHT,verticalOrientation:n.BOTTOM,label:{indentFromTick:-10}},rangeContainer:{horizontalOrientation:n.RIGHT,verticalOrientation:n.BOTTOM},valueIndicatorType:"rangebar",subvalueIndicatorType:"trianglemarker",valueIndicators:{_type:"rectangle",_default:{offset:2.5,length:15,width:15},rectangle:{width:10},rangebar:{offset:10,horizontalOrientation:n.RIGHT,verticalOrientation:n.BOTTOM},trianglemarker:{offset:10,horizontalOrientation:n.LEFT,verticalOrientation:n.TOP},textcloud:{offset:-1,horizontalOrientation:n.LEFT,verticalOrientation:n.TOP}}}}}},4702:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(i(39599)),o=f(i(5828)),a=f(i(67322)),s=i(12462),r=f(i(60980)),l=f(i(77393)),d=f(i(82611)),u=f(i(53949)),c=f(i(11055)),h=f(i(4517)),p=f(i(72513)),g=f(i(47661)),_=f(i(44062));function f(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(null,arguments)}t.default=[{baseThemeName:void 0,theme:m({name:"generic.light",isDefault:!0,font:{color:s.SECONDARY_TITLE_COLOR,family:"'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif",weight:400,size:12,cursor:"default"},redrawOnResize:!0,backgroundColor:s.WHITE,primaryTitleColor:s.PRIMARY_TITLE_COLOR,secondaryTitleColor:s.SECONDARY_TITLE_COLOR,gridColor:s.LIGHT_GREY,axisColor:s.SECONDARY_TITLE_COLOR,title:{backgroundColor:s.WHITE,font:{size:28,family:"'Segoe UI Light', 'Helvetica Neue Light', 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif",weight:200},subtitle:{font:{size:16},offset:0,wordWrap:"normal",textOverflow:"ellipsis"},wordWrap:"normal",textOverflow:"ellipsis"},loadingIndicator:{text:"Loading..."},export:{backgroundColor:s.WHITE,margin:10,font:{size:14,color:s.PRIMARY_TITLE_COLOR,weight:400},button:{margin:{top:8,left:10,right:10,bottom:8},default:{color:"#333",borderColor:"#ddd",backgroundColor:s.WHITE},hover:{color:"#333",borderColor:"#bebebe",backgroundColor:"#e6e6e6"},focus:{color:s.BLACK,borderColor:"#9d9d9d",backgroundColor:"#e6e6e6"},active:{color:"#333",borderColor:"#9d9d9d",backgroundColor:"#d4d4d4"}},shadowColor:s.LIGHT_GREY},tooltip:{enabled:!1,border:{width:1,color:s.LIGHT_GREY,dashStyle:s.SOLID,visible:!0},font:{color:s.PRIMARY_TITLE_COLOR},color:s.WHITE,arrowLength:10,paddingLeftRight:18,paddingTopBottom:15,textAlignment:"center",shared:!1,location:s.CENTER,shadow:{opacity:.4,offsetX:0,offsetY:4,blur:2,color:s.BLACK},interactive:!1},legend:{hoverMode:"includePoints",verticalAlignment:s.TOP,horizontalAlignment:s.RIGHT,position:s.OUTSIDE,visible:!0,margin:10,markerSize:12,border:{visible:!1,width:1,cornerRadius:0,dashStyle:s.SOLID},paddingLeftRight:20,paddingTopBottom:15,columnCount:0,rowCount:0,columnItemSpacing:20,rowItemSpacing:8,title:{backgroundColor:s.WHITE,margin:{left:0,bottom:9,right:0,top:0},font:{size:18,weight:200},subtitle:{offset:0,font:{size:14},wordWrap:"none",textOverflow:"ellipsis"},wordWrap:"none",textOverflow:"ellipsis"}}},a.default,r.default,l.default,n.default,_.default,d.default,u.default,c.default,h.default,p.default,o.default,g.default)},{baseThemeName:"generic.light",theme:{name:"generic.light.compact"}}]},82611:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={pie:{innerRadius:.5,minDiameter:.5,type:"pie",dataPrepareSettings:{_skipArgumentSorting:!0},commonSeriesSettings:{pie:{border:{visible:!1,width:2,color:n.WHITE},hoverStyle:{hatching:{direction:n.RIGHT,width:4,step:10,opacity:.75},highlight:!0,border:{visible:!1,width:2}},selectionStyle:{hatching:{direction:n.RIGHT,width:4,step:10,opacity:.5},highlight:!0,border:{visible:!1,width:2}}},doughnut:{border:{visible:!1,width:2,color:n.WHITE},hoverStyle:{hatching:{direction:n.RIGHT,width:4,step:10,opacity:.75},highlight:!0,border:{visible:!1,width:2}},selectionStyle:{hatching:{direction:n.RIGHT,width:4,step:10,opacity:.5},highlight:!0,border:{visible:!1,width:2}}},donut:{border:{visible:!1,width:2,color:n.WHITE},hoverStyle:{hatching:{direction:n.RIGHT,width:4,step:10,opacity:.75},highlight:!0,border:{visible:!1,width:2}},selectionStyle:{hatching:{direction:n.RIGHT,width:4,step:10,opacity:.5},highlight:!0,border:{visible:!1,width:2}}},label:{textOverflow:"ellipsis",wordWrap:"normal"}},legend:{hoverMode:"allArgumentPoints",backgroundColor:n.NONE},adaptiveLayout:{keepLabels:!1}}}},53949:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={polar:{commonSeriesSettings:{type:"scatter",closed:!0,point:{visible:!0,symbol:"circle",size:12,border:{visible:!1,width:1},hoverMode:"onlyPoint",selectionMode:"onlyPoint",hoverStyle:{border:{visible:!0,width:4},size:12},selectionStyle:{border:{visible:!0,width:4},size:12}},scatter:{},line:{width:2,dashStyle:n.SOLID,hoverStyle:{width:3,hatching:{direction:n.NONE}},selectionStyle:{width:3}},area:{point:{visible:!1},opacity:.5},stackedline:{width:2},bar:{opacity:.8},stackedbar:{opacity:.8}},adaptiveLayout:{width:80,height:80,keepLabels:!0},barGroupPadding:.3,commonAxisSettings:{visible:!0,forceUserTickInterval:!1,label:{overlappingBehavior:"hide",indentFromAxis:5},grid:{visible:!0},minorGrid:{visible:!0},tick:{visible:!0},title:{font:{size:16},margin:10}},argumentAxis:{startAngle:0,firstPointOnStartAngle:!1,period:void 0},valueAxis:{endOnTick:!1,tick:{visible:!1}},horizontalAxis:{position:n.TOP,axisDivisionFactor:50,label:{alignment:n.CENTER}},verticalAxis:{position:n.TOP,axisDivisionFactor:30,label:{alignment:n.RIGHT}}}}},11055:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={rangeSelector:{scale:{valueMarginsEnabled:!0,width:1,color:n.BLACK,opacity:.1,showCustomBoundaryTicks:!0,aggregateByCategory:!0,label:{overlappingBehavior:"hide",alignment:n.CENTER,visible:!0,topIndent:7,font:{size:11}},tick:{width:1,color:n.BLACK,opacity:.17,visible:!0,length:12},minorTick:{width:1,color:n.BLACK,opacity:.05,visible:!0,length:12},marker:{width:1,color:"#000000",opacity:.1,visible:!0,separatorHeight:33,topIndent:10,textLeftIndent:7,textTopIndent:11,label:{}},logarithmBase:10,workWeek:[1,2,3,4,5],breakStyle:{width:5,color:"#ababab",line:"waved"},endOnTick:!1},selectedRangeColor:"#606060",sliderMarker:{visible:!0,paddingTopBottom:2,paddingLeftRight:4,color:"#606060",invalidRangeColor:n.RED,font:{color:n.WHITE,size:11}},sliderHandle:{width:1,color:n.BLACK,opacity:.2},shutter:{opacity:.75},background:{color:"#c0bae1",visible:!0,image:{location:"full"}},behavior:{snapToTicks:!0,animationEnabled:!0,moveSelectedRangeByClick:!0,manualRangeSelectionEnabled:!0,allowSlidersSwap:!0,valueChangeMode:"onHandleRelease"},redrawOnResize:!0,chart:{barGroupPadding:.3,minBubbleSize:12,maxBubbleSize:.2,topIndent:.1,bottomIndent:0,valueAxis:{inverted:!1,logarithmBase:10},commonSeriesSettings:{type:"area",aggregation:{enabled:void 0},point:{visible:!1},scatter:{point:{visible:!0}}}}}}},4517:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={sankey:{sourceField:"source",targetField:"target",weightField:"weight",hoverEnabled:!0,alignment:n.CENTER,adaptiveLayout:{width:80,height:80,keepLabels:!0},label:{visible:!0,horizontalOffset:8,verticalOffset:0,overlappingBehavior:"ellipsis",useNodeColors:!1,font:{color:n.BLACK,weight:500},border:{visible:!1,width:2,color:n.WHITE},customizeText:e=>e.title,shadow:{opacity:.2,offsetX:0,offsetY:1,blur:1,color:n.WHITE}},title:{margin:10,font:{size:28,weight:200},subtitle:{font:{size:16}}},tooltip:{enabled:!0},node:{padding:30,width:8,opacity:1,border:{color:n.WHITE,width:1,visible:!1},hoverStyle:{hatching:{opacity:.75,step:6,width:2,direction:n.RIGHT},border:{}}},link:{color:"#888888",colorMode:"none",opacity:.3,border:{color:n.WHITE,width:1,visible:!1},hoverStyle:{opacity:.5,hatching:{opacity:.75,step:6,width:2,direction:n.RIGHT},border:{}}}}}},72513:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={sparkline:{lineColor:"#666666",lineWidth:2,areaOpacity:.2,minColor:"#e8c267",maxColor:"#e55253",barPositiveColor:"#a9a9a9",barNegativeColor:"#d7d7d7",winColor:"#a9a9a9",lossColor:"#d7d7d7",firstLastColor:"#666666",pointSymbol:"circle",pointColor:n.WHITE,pointSize:4,type:"line",argumentField:"arg",valueField:"val",winlossThreshold:0,showFirstLast:!0,showMinMax:!1,tooltip:{enabled:!0}}}},47661:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={treeMap:{tile:{border:{width:1,opacity:.2,color:"#000000"},color:"#5f8b95",hoverStyle:{hatching:{opacity:.75,step:6,width:2,direction:"right"},border:{}},selectionStyle:{hatching:{opacity:.5,step:6,width:2,direction:"right"},border:{opacity:1}},label:{visible:!0,paddingLeftRight:5,paddingTopBottom:4,font:{color:"#ffffff",weight:600},shadow:{opacity:.6,offsetX:0,offsetY:1,blur:2,color:"#000000"},wordWrap:"normal",textOverflow:"ellipsis"}},group:{padding:4,border:{width:1},color:"#eeeeee",hoverStyle:{hatching:{opacity:0,step:6,width:2,direction:"right"},border:{}},selectionStyle:{hatching:{opacity:0,step:6,width:2,direction:"right"},border:{}},label:{visible:!0,paddingLeftRight:5,paddingTopBottom:4,font:{color:n.SECONDARY_TITLE_COLOR,weight:600},textOverflow:"ellipsis"}},title:{subtitle:{}},tooltip:{},loadingIndicator:{}}}},44062:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(12462);t.default={map:{title:{margin:10},background:{borderWidth:1,borderColor:"#cacaca"},layer:{label:{enabled:!1,stroke:n.WHITE,"stroke-width":1,"stroke-opacity":.7,font:{color:n.SOME_GREY,size:12}}},"layer:area":{borderWidth:1,borderColor:n.WHITE,color:"#d2d2d2",hoveredBorderColor:n.GREY_GREEN,selectedBorderWidth:2,selectedBorderColor:n.GREY_GREEN,label:{"stroke-width":2,font:{size:16}}},"layer:line":{borderWidth:2,color:"#ba8365",hoveredColor:"#a94813",selectedBorderWidth:3,selectedColor:"#e55100",label:{"stroke-width":2,font:{size:16}}},"layer:marker":{label:{enabled:!0,"stroke-width":1,font:{size:12}}},"layer:marker:dot":{borderWidth:2,borderColor:n.WHITE,size:8,selectedStep:2,backStep:18,backColor:n.WHITE,backOpacity:.32,shadow:!0},"layer:marker:bubble":{minSize:20,maxSize:50,hoveredBorderWidth:1,hoveredBorderColor:n.GREY_GREEN,selectedBorderWidth:2,selectedBorderColor:n.GREY_GREEN},"layer:marker:pie":{size:50,hoveredBorderWidth:1,hoveredBorderColor:n.GREY_GREEN,selectedBorderWidth:2,selectedBorderColor:n.GREY_GREEN},"layer:marker:image":{size:20},legend:{verticalAlignment:n.BOTTOM,horizontalAlignment:n.RIGHT,position:n.INSIDE,backgroundOpacity:.65,border:{visible:!0},paddingLeftRight:16,paddingTopBottom:12},controlBar:{borderColor:"#5d5d5d",borderWidth:3,color:n.WHITE,margin:20,opacity:.3},_rtl:{legend:{itemTextPosition:n.LEFT}}}}},56829:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i="#7ab8eb",n="#fff",o="#333",a="#99a1a8",s="#707070",r="#e8eaeb";t.default=[{baseThemeName:"generic.light",theme:{name:"generic.softblue",defaultPalette:"Soft Blue",backgroundColor:n,primaryTitleColor:o,secondaryTitleColor:a,gridColor:r,axisColor:s,export:{backgroundColor:n,font:{color:o},button:{default:{color:o,borderColor:"#c9d0d4",backgroundColor:n},hover:{color:o,borderColor:"#a7b2b9",backgroundColor:"#e6e6e6"},focus:{color:o,borderColor:"#82929b",backgroundColor:"#e6e6e6"},active:{color:o,borderColor:"#82929b",backgroundColor:"#d4d4d4"}}},legend:{font:{color:s}},tooltip:{color:n,border:{color:r},font:{color:o}},"chart:common":{commonSeriesSettings:{label:{border:{color:r}}}},"chart:common:annotation":{color:n,border:{color:r},font:{color:o}},chart:{commonPaneSettings:{border:{color:r}},commonAxisSettings:{breakStyle:{color:"#cfd2d3"}}},rangeSelector:{scale:{breakStyle:{color:"#cfd2d3"},tick:{opacity:.12}},selectedRangeColor:i,sliderMarker:{color:i},sliderHandle:{color:i,opacity:.5}},sparkline:{pointColor:n,minColor:"#f0ad4e",maxColor:"#d9534f"},treeMap:{group:{color:r,label:{font:{color:a}}}},bullet:{color:i},gauge:{valueIndicators:{rangebar:{color:i},textcloud:{color:i}}}}},{baseThemeName:"generic.softblue",theme:{name:"generic.softblue.compact"}}]},55073:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i="'Roboto', 'RobotoFallback', 'Helvetica', 'Arial', sans-serif",n="rgba(0,0,0,0.54)",o="rgba(255,255,255,0.87)",a="rgba(255,255,255,0.54)",s="#363640",r="#ffffff",l="#b5b5b5",d="#c7c7c7",u="#8e8e8e",c="#b8b8b8",h="#494949",p="#818181",g=[{baseThemeName:"generic.light",theme:{name:"material",defaultPalette:"Material",font:{family:i},title:{margin:{top:20,bottom:20,left:0,right:0},font:{size:20,family:i,weight:500},horizontalAlignment:"left",subtitle:{font:{size:14},horizontalAlignment:"left"}},tooltip:{shadow:{opacity:0},border:{visible:!1},paddingLeftRight:8,paddingTopBottom:6,arrowLength:0,location:"edge",color:"#616161",font:{color:r},cornerRadius:4},chart:{commonAxisSettings:{minorTick:{opacity:.5},label:{font:{size:11}}},commonAnnotationSettings:{font:{color:r},border:{color:"#616161"},color:"#616161",arrowLength:14,arrowWidth:0,shadow:{opacity:.08,offsetY:4,blur:8},cornerRadius:4}},pie:{title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},polar:{commonAxisSettings:{minorTick:{opacity:.5}},title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},funnel:{title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},gauge:{title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},barGauge:{title:{horizontalAlignment:"center",subtitle:{horizontalAlignment:"center"}}},rangeSelector:{sliderHandle:{opacity:.5}},treeMap:{group:{label:{font:{weight:500}}}}}},{baseThemeName:"material",theme:{name:"material.light",gridColor:"#e0e0e0",axisColor:n,primaryTitleColor:"rgba(0,0,0,0.87)",legend:{font:{color:n}},chart:{scrollBar:{color:"#bfbfbf",opacity:.7}},gauge:{rangeContainer:{backgroundColor:"rgba(0,0,0,0.2)"}},barGauge:{backgroundColor:"#efefef"}}},{baseThemeName:"material",theme:{name:"material.dark",gridColor:"#515159",backgroundColor:s,axisColor:a,font:{color:a},primaryTitleColor:o,secondaryTitleColor:o,tooltip:{color:"#000"},export:{backgroundColor:s,font:{color:"#dbdbdb"},button:{default:{color:"#dedede",borderColor:"#4d4d4d",backgroundColor:s},hover:{color:"#dedede",borderColor:"#6c6c6c",backgroundColor:"#3f3f4b"},focus:{color:"#dedede",borderColor:"#8d8d8d",backgroundColor:"#494956"},active:{color:"#dedede",borderColor:"#8d8d8d",backgroundColor:"#494956"}},shadowColor:"#292929"},"chart:common":{commonSeriesSettings:{label:{border:{color:h}},valueErrorBar:{color:r}}},"chart:common:axis":{constantLineStyle:{color:r}},"chart:common:annotation":{border:{color:"#000"},color:"#000"},chart:{commonPaneSettings:{border:{color:h}},commonAxisSettings:{breakStyle:{color:p}},zoomAndPan:{dragBoxStyle:{color:r}}},gauge:{rangeContainer:{backgroundColor:l},valueIndicators:{_default:{color:l},rangebar:{color:"#84788b"},twocolorneedle:{secondColor:"#ba544d"},trianglemarker:{color:"#b7918f"},textcloud:{color:"#ba544d"}}},barGauge:{backgroundColor:"#3c3c3c"},rangeSelector:{scale:{tick:{color:r,opacity:.32},minorTick:{color:r,opacity:.1},breakStyle:{color:p}},selectedRangeColor:l,sliderMarker:{color:l,font:{color:s}},sliderHandle:{color:r,opacity:.2},shutter:{color:r,opacity:.1}},map:{background:{borderColor:"#3f3f3f"},layer:{label:{stroke:"#000000",font:{color:r}}},"layer:area":{borderColor:s,color:"#686868",hoveredBorderColor:r,selectedBorderColor:r},"layer:line":{color:"#c77244",hoveredColor:"#ff5d04",selectedColor:"#ff784f"},"layer:marker:bubble":{hoveredBorderColor:r,selectedBorderColor:r},"layer:marker:pie":{hoveredBorderColor:r,selectedBorderColor:r},legend:{border:{color:"#3f3f3f"},font:{color:r}},controlBar:{borderColor:d,color:s}},treeMap:{group:{color:"#4c4c4c",label:{font:{color:"#a3a3a3"}}}},sparkline:{lineColor:d,firstLastColor:d,barPositiveColor:c,barNegativeColor:u,winColor:c,lossColor:u,pointColor:s},bullet:{targetColor:u},funnel:{item:{border:{color:s}}},sankey:{label:{font:{color:r}}}}}];function _(e,t,i){return{theme:{name:`material.${e}.${t}`,rangeSelector:{selectedRangeColor:i,sliderMarker:{color:i},sliderHandle:{color:i}},map:{"layer:marker:dot":{color:i},"layer:marker:bubble":{color:i},legend:{markerColor:i}},bullet:{color:i},gauge:{valueIndicators:{rangebar:{color:i},textcloud:{color:i}}}},baseThemeName:`material.${t}`}}const f={blue:"#03a9f4",lime:"#cddc39",orange:"#ff5722",purple:"#9c27b0",teal:"#009688"};Object.keys(f).forEach((e=>{const t=f[e];g.push(_(e,"light",t),_(e,"dark",t),{theme:{name:`material.${e}.light.compact`},baseThemeName:`material.${e}.light`},{theme:{name:`material.${e}.dark.compact`},baseThemeName:`material.${e}.dark`})}));t.default=g},3830:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=S(i(92848)),o=i(17781),a=i(52576),s=i(21274),r=i(50254),l=i(57653),d=i(11528),u=i(3104),c=i(63512),h=i(14580),p=S(i(57568)),g=i(68817),_=S(i(3023)),f=S(i(37195)),m=i(97808),v=i(28779),C=S(i(34685)),y=i(99857),b=i(2225),x=i(78609),w=i(9410);function S(e){return e&&e.__esModule?e:{default:e}}const D="default",I=[{name:D,border:{}}],E="discrete",{isArray:T}=Array;function A(e,t,i){const n=e.getOptions().grid,o=e.getOptions().minorGrid;n.visible=t,o&&(o.visible=i)}function O(e,t,i){const n=i.find((i=>i.name===t&&i.pane===e));return n||(e?O(void 0,t,i):void 0)}function P(e,t){return e.priority-t.priority}function k(e,t){let i=!1;return(0,s.each)(e,((e,n)=>{if(n.name===t)return i=!0,!1})),i}function M(e,t,i,n){const o=t[e]||0,a=i[e]||0;return o+a+(o&&a?n:0)}function R(e,t,i){return L(t[e],i[e])}function L(e,t){return Math.max(e||0,t||0)}function B(e){return e.getMargins()}function V(e,t){return e.reduce(((e,i)=>{var n;const o=t(i),a=e.panes[i.pane]=e.panes[i.pane]||{},s=i.getMultipleAxesSpacing();a.top=M("top",a,o,s),a.bottom=M("bottom",a,o,s),a.left=R("left",a,o),a.right=R("right",a,o),e.top=R("top",a,e),e.bottom=R("bottom",a,e),e.left=R("left",a,e),e.right=R("right",a,e);const r=null===(n=i.getOrthogonalAxis)||void 0===n?void 0:n.call(i);return(null==r?void 0:r.customPositionIsAvailable())&&(!i.customPositionIsBoundaryOrthogonalAxis()||!r.customPositionEqualsToPredefined())&&(e[r.getResolvedBoundaryPosition()]=0),e}),{panes:{}})}function F(e){return e.reduce(((e,t)=>{const i=t.getMargins(),n=e.panes[t.pane]=e.panes[t.pane]||{},o=t.getMultipleAxesSpacing();return n.top=R("top",n,i),n.bottom=R("bottom",n,i),n.left=M("left",n,i,o),n.right=M("right",n,i,o),e.top=R("top",n,e),e.bottom=R("bottom",n,e),e.left=R("left",n,e),e.right=R("right",n,e),e}),{panes:{}})}function H(e,t,i,n,o){e.forEach((e=>{e[t](null==i?void 0:i[e.pane],(null==n?void 0:n[e.pane])||n,o)}))}function N(e,t,i,n,o){function a(t,i,n){return((e?["left","right"]:["top","bottom"]).includes(t)?i.panes[n]||{}:i)[t]}function s(e,t,i,n){return L(a(e,t,n),a(e,i,n))}const r=e=>`original${e[0].toUpperCase()}${e.slice(1)}`;function l(e,t,a,l,d,u){(t=t.sort(((t,i)=>e[i][l]-e[t][l]))).forEach((t=>{const i=e[t];u.forEach((e=>{i[e]=i[r(e)]+s(e,n,o,t)}))}));const c=e[t[0]],h=c[a]-c[r(d)]-e[t.at(-1)][r(l)];let p=t.reduce(((e,t)=>e-s(l,n,o,t)-s(d,n,o,t)),h)-v.PANE_PADDING*(t.length-1);p-=Object.keys(i).reduce(((e,t)=>e+((0,v.isRelativeHeightPane)(i[t])?0:i[t].height)),0);const g=c[a]-c[r(d)]-(p<0?p:0);t.reduce(((t,r)=>{const u=e[r],h=i[r];return t-=s(d,n,o,r),u[d]=c[a]-t,t-=(0,v.isRelativeHeightPane)(h)?Math.floor(p*h.height):h.height,u[l]=t,t-=s(l,n,o,r)+v.PANE_PADDING}),g)}const d=Object.keys(t);return e?l(t,d,"width","left","right",["top","bottom"]):l(t,d,"height","top","bottom",["left","right"]),t}function z(e,t,i,n){t&&(H(e,"createTicks",i),p.default.synchronize(e)),H(e,"draw",!t&&i,n)}function W(e,t){const i={};return function(n){if(!n.customPositionIsAvailable()||n.customPositionEqualsToPredefined()){const o=i[n.pane]=i[n.pane]||{top:0,left:0,bottom:0,right:0},a=n.getMultipleAxesSpacing(),s=n.getMargins();n.shift(o),o[e]=M(e,o,s,a),o[t]=M(t,o,s,a)}else n.shift({top:0,left:0,bottom:0,right:0})}}function $(e,t){let i,n=0;return Object.keys(t.panes).forEach((o=>{i=t.panes[o],n+="height"===e?i.top+i.bottom:i.left+i.right})),n}function G(e,t,i,n){let o=0;e[t]>0&&(o=$(t,n(i,B)),H(i,"hideTitle"),e[t]-=o-$(t,n(i,B))),e[t]>0&&H(i,"hideOuterElements")}const j=(e,t,i)=>{const n=t.x-i<=e.x,o=t.x+i>=e.x,a=t.y-i<=e.y,s=t.y+i>=e.y;return n&&o&&(a&&s)},U=(e,t,i)=>{const n=e.getOptions().size/2;for(let o=0;o<t.length;o+=1){if(!i){const i=t[o].x===e.x,n=t[o].y===e.y;if(i&&n)continue}if(j(e,t[o],n))return!0}return!1};const K=x.AdvancedChart.inherit({_themeSection:"chart",_fontFields:["crosshair.label.font"],_initCore(){this.paneAxis={},this.callBase()},_init(){this._containerInitialHeight=(0,u.hasWindow)()?(0,l.getHeight)(this._$element):0,this.callBase()},_correctAxes(){this._correctValueAxes(!0)},_setDeprecatedOptions(){this.callBase(),(0,a.extend)(this._deprecatedOptions,{"argumentAxis.aggregateByCategory":{since:"23.1",message:"Use the aggregation.enabled property"}})},_getExtraOptions:o.noop,_createPanes(){let e,t=this.option("panes"),i=0;return(!t||T(t)&&!t.length)&&(t=I),this.callBase(),e=this.option("defaultPane"),t=(0,a.extend)(!0,[],T(t)?t:[t]),(0,s.each)(t,((e,t)=>{t.name=(0,d.isDefined)(t.name)?t.name:D+i++})),(0,d.isDefined)(e)?k(t,e)||(this._incidentOccurred("W2101",[e]),e=t[t.length-1].name):e=t[t.length-1].name,this.defaultPane=e,t=this._isRotated()?t.reverse():t,t},_getAxisRenderingOptions:()=>({axisType:"xyAxes",drawingType:"linear"}),_prepareAxisOptions(e,t,i){return{isHorizontal:"argumentAxis"===e!==i,containerColor:this._themeManager.getOptions("containerBackgroundColor")}},_checkPaneName(e){const t=(0,v.map)(this.panes,(e=>e.name));return e.pane=e.pane||this.defaultPane,t.includes(e.pane)},_initCustomPositioningAxes(){const e=this.getArgumentAxis(),t=e.getOptions().customPositionAxis,i=this._valueAxes.find((i=>i.pane===e.pane&&(!t||t===i.name)));this._valueAxes.forEach((t=>{e!==t.getOrthogonalAxis()&&(t.getOrthogonalAxis=()=>e,t.customPositionIsBoundaryOrthogonalAxis=()=>e.customPositionIsBoundary())})),(0,d.isDefined)(i)&&i!==e.getOrthogonalAxis()?(e.getOrthogonalAxis=()=>i,e.customPositionIsBoundaryOrthogonalAxis=()=>this._valueAxes.some((e=>e.customPositionIsBoundary()))):(0,d.isDefined)(e.getOrthogonalAxis())&&!(0,d.isDefined)(i)&&(e.getOrthogonalAxis=o.noop)},_getAllAxes(){return this._argumentAxes.concat(this._valueAxes)},_resetAxesAnimation(e,t){let i;i=(0,d.isDefined)(t)?t^this._isRotated()?this._argumentAxes:this._valueAxes:this._getAllAxes(),i.forEach((t=>{t.resetApplyingAnimation(e)}))},_axesBoundaryPositioning(){const e=this._getAllAxes();let t=!1;return e.forEach((e=>{if(!e.customPositionIsAvailable())return;const i=e.customPositionIsBoundary();e._customBoundaryPosition=e.getCustomBoundaryPosition(),t=t||i!==e.customPositionIsBoundary()})),t},_getCrosshairMargins(){const e=this._getCrosshairOptions()||{},t=e.enabled,i=(0,c.getMargins)(),n=(0,a.extend)(!0,{},e.label,e.horizontalLine.label),o=(0,a.extend)(!0,{},e.label,e.verticalLine.label);return{x:t&&e.horizontalLine.visible&&n.visible?i.x:0,y:t&&e.verticalLine.visible&&o.visible?i.y:0}},_getValueAxis(e,t){const i=this._valueAxes,n=this.option("valueAxis")||{},o=T(n)?n:[n],a=this._isRotated(),s=this._getCrosshairMargins();let r,l;return t=t||function(e,t,i){let n;for(let o=0;o<e.length;o+=1)if(e[o].pane===t||void 0===e[o].pane&&t===i){n=e[o].name;break}return n||(n=e[0].name),n}(i,e,this.defaultPane),l=O(e,t,i),l||(r=function(e,t,i){let n,o;for(o=0;o<t.length;o+=1)if(t[o].name===i){n=t[o],n.priority=o;break}if(!n)for(o=0;o<e.length;o+=1)if(e[o].name===i){n=e[o].getOptions(),n.priority=e[o].priority;break}return n}(i,o,t),r||(this._incidentOccurred("W2102",[t]),r={name:t,priority:i.length}),l=this._createAxis(!1,this._populateAxesOptions("valueAxis",r,{pane:e,name:t,optionPath:T(n)?`valueAxis[${r.priority}]`:"valueAxis",crosshairMargin:a?s.y:s.x},a)),l.applyVisualRangeSetter(this._getVisualRangeSetter()),i.push(l)),l.setPane(e),l},_correctValueAxes(e){const t=this._themeManager.getOptions("synchronizeMultiAxes"),i=this._valueAxes,n={};this.series.forEach((e=>{const t=e.getValueAxis();n[t.pane]=!0})),this.panes.forEach((o=>{const a=o.name;n[a]||this._getValueAxis(a),e&&t&&function(e){let t=!1;const i=[],n=e.some((e=>{const t=e.getOptions().minorGrid;return null==t?void 0:t.visible})),o=e.some((e=>{const t=e.getOptions().grid;return null==t?void 0:t.visible}));e.length>1&&(e.forEach((e=>{const a=e.getOptions().grid;t?A(e,!1,!1):null!=a&&a.visible&&(e.getTranslator().getBusinessRange().isEmpty()?(A(e,!1,!1),i.push(e)):(t=!0,A(e,o,n)))})),!t&&i.length&&A(i[0],o,n))}(i.filter((e=>e.pane===a)))})),this._valueAxes=i.filter((e=>{e.pane||e.setPane(this.defaultPane);const t=k(this.panes,e.pane);return t||(e.dispose(),e=null),t})).sort(P);const o=this.getValueAxis();this._valueAxes.forEach((e=>{const{optionPath:t}=e.getOptions();if(t){const e=this._valueAxes.filter((e=>e.getOptions().optionPath===t));e.length>1&&(e.some((e=>e===o))?e.forEach((e=>{e!==o&&(e.getOptions().optionPath=null)})):e.forEach(((e,t)=>{0!==t&&(e.getOptions().optionPath=null)})))}}))},_getSeriesForPane(e){const t=[];return(0,s.each)(this.series,((i,n)=>{n.pane===e&&t.push(n)})),t},_createPanesBorderOptions(){const e=this._themeManager.getOptions("commonPaneSettings").border,t={};return this.panes.forEach((i=>{t[i.name]=(0,a.extend)(!0,{},e,i.border)})),t},_createScrollBar(){const e=this._themeManager.getOptions("scrollBar")||{},t=this._scrollBarGroup;var i;e.visible?(e.rotated=this._isRotated(),this._scrollBar=(this._scrollBar||new g.ScrollBar(this._renderer,t)).update(e)):(t.linkRemove(),null===(i=this._scrollBar)||void 0===i||i.dispose(),this._scrollBar=null)},_executeAppendAfterSeries(e){e()},_prepareToRender(){const e=this._createPanesBorderOptions();return this._createPanesBackground(),this._appendAxesGroups(),this._adjustViewport(),e},_adjustViewport(){this._themeManager.getOptions("adjustOnZoom")&&this._valueAxes.forEach((e=>e.adjust()))},_recreateSizeDependentObjects(e){const t=this._getVisibleSeries(),i=t.some((e=>e.useAggregation())),n=this._isZooming();i&&(this._argumentAxes.forEach((e=>{e.updateCanvas(this._canvas,!0)})),t.forEach((t=>{t.useAggregation()&&(e||n||!t._useAllAggregatedPoints)&&t.createPoints()})),this._processSeriesFamilies())},_isZooming(){const e=this.getArgumentAxis();if(null==e||!e.getTranslator())return!1;const t=e.getTranslator().getBusinessRange(),i=e.getViewport();let n=i?i.min:0,o=i?i.max:0;"logarithmic"===t.axisType&&(n=(0,v.getLog)(n,t.base),o=(0,v.getLog)(o,t.base));const a=t.axisType===E?(0,v.getCategoriesInfo)(t.categories,n,o).categories.length:Math.abs(o-n);let s=(0,r.getPrecision)(a);s=s>1?10**(s-2):1;const l=Math.round((this._zoomLength-a)*s)/s!=0;return this._zoomLength=a,l},_handleSeriesDataUpdated(){const e=new y.Range;this.series.forEach((t=>{e.addRange(t.getArgumentRange())})),this._argumentAxes.forEach((t=>{t.updateCanvas(this._canvas,!0),t.setBusinessRange(e,this._axesReinitialized)})),this.callBase()},_isLegendInside(){return this._legend&&"inside"===this._legend.getPosition()},_isRotated(){return this._themeManager.getOptions("rotated")},_getLayoutTargets(){return this.panes},_applyClipRects(e){this._drawPanesBorders(e),this._createClipRectsForPanes(),this._applyClipRectsForAxes(),this._fillPanesBackground()},_updateLegendPosition(e,t){if(e.drawLegend&&this._legend&&t){const{panes:e}=this,t=(0,a.extend)({},e[0].canvas),i=new h.LayoutManager;t.right=e[e.length-1].canvas.right,t.bottom=e[e.length-1].canvas.bottom,i.layoutInsideLegend(this._legend,t)}},_allowLegendInsidePosition:()=>!0,_applyExtraSettings(e){const t=this._getPaneIndex(e.pane),i=this._panesClipRects,n=i.wide[t];e.setClippingParams(i.base[t].id,null==n?void 0:n.id,this._getPaneBorderVisibility(t))},_updatePanesCanvases(e){e.recreateCanvas&&(0,v.updatePanesCanvases)(this.panes,this._canvas,this._isRotated())},_normalizePanesHeight(){(0,v.normalizePanesHeight)(this.panes)},_renderScaleBreaks(){this._valueAxes.concat(this._argumentAxes).forEach((e=>{e.drawScaleBreaks()}))},_getArgFilter(){return C.default.getViewPortFilter(this.getArgumentAxis().visualRange()||{})},_hidePointsForSingleSeriesIfNeeded(e){const t=e.getPoints();let i=0;for(let n=0;n<t.length;n+=1){const o=t[n],a=t.slice(n+1);if(i+=Number(U(o,a)),i>t.length/2){e.autoHidePointMarkers=!0;break}}},_applyAutoHidePointMarkers(e){let t=[];const i=(e,i)=>e+U(i,t,!0);for(let n=e.length-1;n>=0;n-=1){const o=e[n];if(o.autoHidePointMarkersEnabled()&&(o.autoHidePointMarkers=!1,this._hidePointsForSingleSeriesIfNeeded(o),!o.autoHidePointMarkers)){const e=o.getPoints();e.reduce(i,0)<e.length?t=t.concat(e):o.autoHidePointMarkers=!0}}},_applyPointMarkersAutoHiding(){const e=this.series;this._themeManager.getOptions("autoHidePointMarkers")?this.panes.forEach((t=>{let{borderCoords:i,name:n}=t;const o=e.filter((e=>e.pane===n&&e.usePointsToDefineAutoHiding()));o.forEach((e=>{e.prepareCoordinatesForPoints()}));const s=this.getArgumentAxis(),r=function(e,t,i){const n=[],o={},s=i.visualRange(),r=i.getTranslator(),l=C.default.getViewPortFilter(s||{});return t.forEach((i=>{const s=i.getValueAxis(),d=s.getCanvasRange(),u=s.getTranslator(),c=e.indexOf(i),h=C.default.getViewPortFilter(d||{});o[c]={},t.forEach((t=>{o[c][e.indexOf(t)]=0}));const p=[];i.getPoints().filter((e=>e.getOptions().visible&&l(e.argument)&&(h(e.getMinValue(!0))||h(e.getMaxValue(!0))))).forEach((e=>{const t={seriesIndex:c,argument:e.argument,value:e.getMaxValue(!0),size:e.bubbleSize||e.getOptions().size,x:void 0,y:void 0};if(e.getMinValue(!0)!==e.getMaxValue(!0)){const i=(0,a.extend)({},t);i.value=e.getMinValue(!0),i.x=r.to(i.argument,1),i.y=u.to(i.value,1),p.push(i)}t.x=r.to(t.argument,1),t.y=u.to(t.value,1),p.push(t)})),o[c].pointsCount=p.length,o[c].total=0,o[c].continuousSeries=0,n.push({name:i.name,index:c,points:p})})),{series:n,overloadedSeries:o}}(e,o,s);if(function(e,t,i){const n=e.width*e.height,o=t.series;for(let e=o.length-1;e>=0;e-=1){const a=i.filter((t=>t.name===o[e].name))[0],{points:s}=o[e],r=s.length?s[0].size:0,l=r*r*s.length;if(a.autoHidePointMarkersEnabled()&&l>=n/o.length){const{index:n}=o[e];a.autoHidePointMarkers=!0,o.splice(e,1),i.splice(i.indexOf(a),1),t.overloadedSeries[n]=null}}}(i,r,o),r.series.length){const e=s.visualRange(),t=s.getOptions().type===E?(t,i)=>e.categories.indexOf(t.argument)-e.categories.indexOf(i.argument):(e,t)=>e.argument-t.argument;let i=[];r.series.forEach((e=>{i=i.concat(e.points)})),i.sort(t),function(e,t){let i=!1;for(let n=0;n<e.length-1;n+=1){const o=e[n],{size:a}=o;if((0,d.isDefined)(o.x)&&(0,d.isDefined)(o.y))for(let s=n+1;s<e.length;s+=1){const r=e[s],l=null==r?void 0:r.x,u=null==r?void 0:r.y;if(!(0,d.isDefined)(l)||Math.abs(o.x-l)>=a){i=i&&s!==n+1;break}{const e=(0,d.isDefined)(l)&&(0,d.isDefined)(u)&&Math.sqrt((o.x-l)**2+(o.y-u)**2);e&&e<a&&(t[o.seriesIndex][r.seriesIndex]+=1,t[o.seriesIndex].total+=1,i||(t[o.seriesIndex].continuousSeries+=1,i=!0))}}}}(i,r.overloadedSeries),this._applyAutoHidePointMarkers(o)}})):e.forEach((e=>{e.autoHidePointMarkers=!1}))},_renderAxes(e,t){function i(e){return e.map((e=>{if(!e.getTitle)return 0;const t=e.getTitle();return t?t.bBox.width:0}))}const n=this._isRotated(),o=this._themeManager.getOptions("synchronizeMultiAxes"),s=this._scrollBar?[this._scrollBar]:[],r=this._isArgumentAxisBeforeScrollBar()?this._argumentAxes.concat(s):s.concat(this._argumentAxes),l=n?this._argumentAxes:this._valueAxes,d=n?r:this._valueAxes,u=n?this._valueAxes:this._argumentAxes,c=n?this._valueAxes:r,h=l.concat(u),p=h.concat(s),g=l.some((e=>e.isFirstDrawing()));this._normalizePanesHeight(),this._updatePanesCanvases(e);let _=this.panes.reduce(((e,t)=>(e[t.name]=(0,a.extend)({},t.canvas),e)),{});const f=this.panes.reduce(((e,t)=>(e[t.name]={height:t.height,unit:t.unit},e)),{}),m=(0,a.extend)(!0,{},_);this._initCustomPositioningAxes();const v=this._axesBoundaryPositioning();if(!e.adjustAxes&&!v)return z(l,!n&&o,_,t),z(u,n&&o,_,t),H(h,"prepareAnimation"),this._renderScaleBreaks(),u.forEach((e=>e.resolveOverlappingForCustomPositioning(l))),l.forEach((e=>e.resolveOverlappingForCustomPositioning(u))),!1;v&&h.forEach((e=>e.customPositionIsAvailable()&&e.shift({top:0,left:0,bottom:0,right:0}))),this._scrollBar&&this._scrollBar.setPane(this.panes);let C={panes:{},left:0,right:0},y=V(c,(e=>e.estimateMargins(_[e.pane])));_=N(n,_,f,C,y);const b=e=>{z(e?u:l,(e?n:!n)&&o,_,t),e?y=V(c,B):C=F(d),_=N(n,_,f,C,y)};b(!1),b(!0),!this._changesApplying&&this._estimateTickIntervals(l,_)&&b(!1);let x=i(l);const w=this._getVisibleSeries(),S=function(e,t){const i=t.reduce(((e,t)=>e+t),0)/t.length;return e.animate&&i<=e.animationPointsLimit}(e,this._getPointsToAnimation(w));return H(p,"updateSize",_,S),c.forEach(W("top","bottom")),d.forEach(W("left","right")),this._renderScaleBreaks(),this.panes.forEach((e=>{(0,a.extend)(e.canvas,_[e.name])})),this._valueAxes.forEach((e=>{e.setInitRange()})),l.forEach(((e,t)=>{var o;if(null!==(o=e.hasWrap)&&void 0!==o&&o.call(e)){const o=e.getTitle(),a=(o?o.bBox.width:0)-x[t];"right"===e.getOptions().position?C.right+=a:(C.left+=a,this.panes.forEach((e=>{let{name:t}=e;C.panes[t].left+=a}))),_=N(n,_,f,C,y),H(p,"updateSize",_,!1,!1),x=i(l)}})),l.some((e=>e.customPositionIsAvailable()&&e.getCustomPosition()!==e._axisPosition))&&(S&&this._resetAxesAnimation(g,!1),H(l,"updateSize",_,S)),u.forEach((e=>e.resolveOverlappingForCustomPositioning(l))),l.forEach((e=>e.resolveOverlappingForCustomPositioning(u))),m},_getExtraTemplatesItems(){const e=(this._argumentAxes||[]).concat(this._valueAxes||[]),t=this._collectTemplatesFromItems(e);return{items:t.items,groups:t.groups,launchRequest(){e.forEach((e=>{e.setRenderedState(!0)}))},doneRequest(){e.forEach((e=>{e.setRenderedState(!1)}))}}},_estimateTickIntervals:(e,t)=>e.some((e=>e.estimateTickInterval(t[e.pane]))),checkForMoreSpaceForPanesCanvas(){const e=this._isRotated();let t=!1;if(this.panes.filter((e=>e.unit)).length===this.panes.length){let i=0,n=0;if(e){const e=this.getArgumentAxis().getMargins().right,t=Math.min(...this.panes.map((e=>e.canvas.right)));i=this._canvas.right+e-t}else{const e=this.getArgumentAxis().getMargins().bottom,t=Math.min(...this.panes.map((e=>e.canvas.bottom)));n=this._canvas.bottom+e-t}if(t=(i>0||n>0)&&{width:i,height:n},0!==n){const i=this.getSize(),o=this.option("size"),a=this._$element[0],s=!!parseInt(a.style.height,10)||0!==this._containerInitialHeight;e||null!=o&&o.height||s||(this._forceResize(i.width,i.height+n),t=!1)}}else t=this.layoutManager.needMoreSpaceForPanesCanvas(this._getLayoutTargets(),e,(t=>({width:e&&!!t.unit,height:!e&&!!t.unit})));return t},_forceResize(e,t){this._renderer.resize(e,t),this._updateSize(!0),this._setContentSize(),this._preserveOriginalCanvas(),this._updateCanvasClipRect(this._canvas)},_shrinkAxes(e,t){if(!e||!t)return;this._renderer.stopAllAnimations(!0);const i=this._isRotated(),n=this._scrollBar?[this._scrollBar]:[],o=this._isArgumentAxisBeforeScrollBar()?this._argumentAxes.concat(n):n.concat(this._argumentAxes),s=i?o:this._valueAxes,r=i?this._valueAxes:o,l=s.concat(r);if(e.width||e.height){G(e,"height",r,V),G(e,"width",s,F),H(l,"updateSize",t);const n=this.panes.reduce(((e,t)=>(e[t.name]={height:t.height,unit:t.unit},e)),{});H(l,"updateSize",t=N(i,t,n,F(s),V(r,B))),r.forEach(W("top","bottom")),s.forEach(W("left","right")),this.panes.forEach((e=>(0,a.extend)(e.canvas,t[e.name])))}},_isArgumentAxisBeforeScrollBar(){const e=this.getArgumentAxis();if(this._scrollBar){var t;const i=e.getResolvedBoundaryPosition(),n=null===(t=e.getOptions().label)||void 0===t?void 0:t.position,o=this._scrollBar.getOptions().position;return e.hasNonBoundaryPosition()||o===i&&n!==o}return!1},_getPanesParameters(){const{panes:e}=this,t=[];for(let i=0;i<e.length;i+=1)this._getPaneBorderVisibility(i)&&t.push({coords:e[i].borderCoords,clipRect:this._panesClipRects.fixed[i]});return t},_createCrosshairCursor(){const e=this._themeManager.getOptions("crosshair")||{},t=this.getArgumentAxis(),i=this._isRotated()?[this._valueAxes,[t]]:[[t],this._valueAxes],n={canvas:this._getCommonCanvas(),panes:this._getPanesParameters(),axes:i};null!=e&&e.enabled&&(this._crosshair?this._crosshair.update(e,n):this._crosshair=new c.Crosshair(this._renderer,e,n,this._crosshairCursorGroup),this._crosshair.render())},_getCommonCanvas(){let e;const{panes:t}=this;for(let i=0;i<t.length;i+=1){const{canvas:n}=t[i];e?(e.right=n.right,e.bottom=n.bottom):e=(0,a.extend)({},n)}return e},_createPanesBackground(){const e=this._themeManager.getOptions("commonPaneSettings").backgroundColor,t=this._renderer,i=[];this._panesBackgroundGroup.clear();for(let n=0;n<this.panes.length;n+=1){const o=this.panes[n].backgroundColor||e;if(!o||"none"===o){i.push(null);continue}const a=t.rect(0,0,0,0).attr({fill:(0,v.extractColor)(o),"stroke-width":0}).append(this._panesBackgroundGroup);i.push(a)}this.panesBackground=i},_fillPanesBackground(){(0,s.each)(this.panes,((e,t)=>{const i=t.borderCoords;null!==this.panesBackground[e]&&this.panesBackground[e].attr({x:i.left,y:i.top,width:i.width,height:i.height})}))},_calcPaneBorderCoords(e){const{canvas:t}=e,i=e.borderCoords=e.borderCoords||{};i.left=t.left,i.top=t.top,i.right=t.width-t.right,i.bottom=t.height-t.bottom,i.width=Math.max(i.right-i.left,0),i.height=Math.max(i.bottom-i.top,0)},_drawPanesBorders(e){const t=this._isRotated();this._panesBorderGroup.linkRemove().clear(),(0,s.each)(this.panes,((i,n)=>{const o=e[n.name],a={fill:"none",stroke:o.color,"stroke-opacity":o.opacity,"stroke-width":o.width,dashStyle:o.dashStyle,"stroke-linecap":"square"};if(this._calcPaneBorderCoords(n,t),!o.visible)return;const s=n.borderCoords,r=(0,b.prepareSegmentRectPoints)(s.left,s.top,s.width,s.height,o);this._renderer.path(r.points,r.pathType).attr(a).append(this._panesBorderGroup)})),this._panesBorderGroup.linkAppend()},_createClipRect(e,t,i,n,o,a){let s=e[t];s?s.attr({x:i,y:n,width:o,height:a}):(s=this._renderer.clipRect(i,n,o,a),e[t]=s)},_createClipRectsForPanes(){const e=this._canvas;(0,s.each)(this.panes,((t,i)=>{let n=!1;const o=i.borderCoords;let{left:a}=o,{top:r}=o,{width:l}=o,{height:d}=o;const u=this._panesClipRects;this._createClipRect(u.fixed,t,a,r,l,d),this._createClipRect(u.base,t,a,r,l,d),(0,s.each)(this.series,((e,t)=>{t.pane===i.name&&(t.isFinancialSeries()||t.areErrorBarsVisible())&&(n=!0)})),n?(this._isRotated()?(r=0,d=e.height):(a=0,l=e.width),this._createClipRect(u.wide,t,a,r,l,d)):u.wide[t]=null}))},_applyClipRectsForAxes(){const e=this._getAllAxes(),t=this._getCanvasClipRectID();for(let i=0;i<e.length;i+=1){const n=this._getElementsClipRectID(e[i].pane);e[i].applyClipRects(n,t)}},_getPaneBorderVisibility(e){var t;const i=this._themeManager.getOptions("commonPaneSettings").border.visible,n=this.panes[e],o=null==n||null===(t=n.border)||void 0===t?void 0:t.visible;return void 0===o?i:o},_getCanvasForPane(e){var t;return null===(t=this.panes.find((t=>t.name===e)))||void 0===t?void 0:t.canvas},_getTrackerSettings(){return(0,a.extend)(this.callBase(),{chart:this,rotated:this._isRotated(),crosshair:this._getCrosshairOptions().enabled?this._crosshair:null,stickyHovering:this._themeManager.getOptions("stickyHovering")})},_resolveLabelOverlappingStack(){const e=this._isRotated(),t=e?(e,t)=>({x:e.x-t,y:e.y}):(e,t)=>({x:e.x,y:e.y-t}),i=(t,i)=>{const n=e?1:0;if(t.labels[0].getFigureCenter()[n]-i.labels[0].getFigureCenter()[n]==0){const e=t.labels[0].getPoint().series.getValueAxis().getTranslator().isInverted()?-1:1;return(t.value()-i.value())*e}return 0};(0,s.each)(this._getStackPoints(),((n,o)=>{(0,s.each)(o,((n,o)=>{const a=o[0].series.getValueAxis().getOptions().inverted;w.overlapping.resolveLabelOverlappingInOneDirection(o,this._getCommonCanvas(),e,a,t,i)}))}))},_getStackPoints(){const e={},t=this._getVisibleSeries();return(0,s.each)(t,((t,i)=>{const n=i.getPoints(),o=i.getStackName()||null;(0,s.each)(n,((t,i)=>{const{argument:n}=i;e[n]||(e[n]={}),e[n][o]||(e[n][o]=[]),e[n][o].push(i)}))})),e},_getCrosshairOptions(){return this._getOption("crosshair")},zoomArgument(e,t){this._initialized&&((0,d.isDefined)(e)||(0,d.isDefined)(t))&&this.getArgumentAxis().visualRange([e,t])},resetVisualRange(){const e=this._argumentAxes,t=this.getArgumentAxis();e.forEach((e=>{e.resetVisualRange(t!==e),this._applyCustomVisualRangeOption(e)})),this.callBase()},getVisibleArgumentBounds(){const e=this._argumentAxes[0].getTranslator().getBusinessRange(),t=e.axisType===E,{categories:i}=e;return{minVisible:t?e.minVisible||i[0]:e.minVisible,maxVisible:t?e.maxVisible||i[i.length-1]:e.maxVisible}},_change_FULL_RENDER(){this.callBase(),this._changes.has("VISUAL_RANGE")&&this._raiseZoomEndHandlers()},_getAxesForScaling(){return[this.getArgumentAxis()].concat(this._valueAxes)},_applyVisualRangeByVirtualAxes(e,t){if(e.isArgumentAxis){if(e!==this.getArgumentAxis())return!0;this._argumentAxes.filter((t=>t!==e)).forEach((e=>e.visualRange(t,{start:!0,end:!0})))}return!1},_raiseZoomEndHandlers(){this._argumentAxes.forEach((e=>e.handleZoomEnd())),this.callBase()},_setOptionsByReference(){this.callBase(),(0,a.extend)(this._optionsByReference,{"argumentAxis.visualRange":!0})},option(){const e=this.callBase(...arguments),t=this._options.silent("valueAxis");if("array"===(0,d.type)(t))for(let e=0;e<t.length;e+=1){const t=`valueAxis[${e}].visualRange`;this._optionsByReference[t]=!0}return e},_notifyVisualRange(){const e=this._argumentAxes[0],t=(0,v.convertVisualRangeObject)(e.visualRange(),!T(this.option("argumentAxis.visualRange")));e.skipEventRising&&(0,v.rangesAreEqual)(t,this.option("argumentAxis.visualRange"))?e.skipEventRising=null:this.option("argumentAxis.visualRange",t),this.callBase()}});K.addPlugin(_.default),K.addPlugin(f.default),K.addPlugin(m.plugins.core),K.addPlugin(m.plugins.chart),(0,n.default)("dxChart",K);t.default=K},98895:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_(i(92848)),o=i(17781),a=i(52576),s=i(21274),r=i(11528),l=_(i(7377)),d=i(97808),u=i(94618),c=i(28779),h=i(99857),p=i(14393),g=i(9410);function _(e){return e&&e.__esModule?e:{default:e}}const{states:f}=l.default,m=l.default.pieSeriesSpacing,v=f.normalMark,C=f.hoverMark,y=f.selectedMark,b=[f.resetItem,f.applyHover,f.applySelected,f.applySelected];function x(e,t){return{x:e.x,y:e.y-t}}function w(e,t){return e.getVisiblePoints().reduce(((e,t)=>{const i=(0,c.normalizeAngle)(t.middleAngle);return(i<=90||i>=270?e.right:e.left).push(t),e}),t||{left:[],right:[]})}function S(e,t,i,n){let o=!1;return i&&(e.left.reverse(),e.right.reverse()),o=g.overlapping.resolveLabelOverlappingInOneDirection(e.left,n,!1,!1,t),g.overlapping.resolveLabelOverlappingInOneDirection(e.right,n,!1,!1,t)||o}function D(e){return(0,r.isNumeric)(e)?e>1?e=1:e<0&&(e=0):e=void 0,e}const I=function(){function e(e,t){return e.filter((e=>e!==t))}let t=[],i={};return{queue(n){const o=n.getSizeGroup();var a;t=e(t,a=n).concat(a),clearTimeout(i[o]),i[o]=setTimeout((()=>{!function(e,t){const i=t.filter((t=>t._isVisible()&&t.getSizeGroup()===e)),n=Math.min.apply(null,i.map((e=>e.getSizeGroupLayout().radius))),o=i.filter((e=>e.getSizeGroupLayout().radius===n));i.forEach((e=>e.render({force:!0,sizeGroupLayout:o.length?o[0].getSizeGroupLayout():{}})))}(o,t)}))},remove(n){t=e(t,n),t.length||(i={})}}}(),E=g.BaseChart.inherit({_themeSection:"pie",_layoutManagerOptions(){return(0,a.extend)(!0,{},this.callBase(),{piePercentage:D(this._themeManager.getOptions("diameter")),minPiePercentage:D(this._themeManager.getOptions("minDiameter"))})},_optionChangesMap:{diameter:"REINIT",minDiameter:"REINIT",sizeGroup:"REINIT"},_disposeCore(){I.remove(this),this.callBase()},_groupSeries(){var e;const{series:t}=this;this._groupsData={groups:[{series:t,valueOptions:{valueType:"numeric"}}],argumentOptions:null===(e=t[0])||void 0===e?void 0:e.getOptions()}},getArgumentAxis:()=>null,_getValueAxis(){const e=(new p.Translator1D).setCodomain(360,0);return{getTranslator:()=>e,setBusinessRange(t){e.setDomain(t.min,t.max)}}},_populateBusinessRange(){this.series.map((e=>{const t=new h.Range;return t.addRange(e.getRangeData().val),e.getValueAxis().setBusinessRange(t),t}))},_specialProcessSeries(){(0,s.each)(this.series,((e,t)=>{t.arrangePoints()}))},_checkPaneName:()=>!0,_processSingleSeries(e){this.callBase(e),e.arrangePoints()},_handleSeriesDataUpdated(){let e=0;this.series.forEach((t=>{e=Math.max(t.getPointsCount(),e)})),this.series.forEach((t=>{t.setMaxPointsCount(e)})),this.callBase()},_getLegendOptions(e){const t=this.callBase(e),{legendData:i}=t;return i.argument=e.argument,i.argumentIndex=e.argumentIndex,i.points=[e],t},_getLegendTargets(){const e={};(this.series||[]).forEach((t=>{t.getPoints().forEach((i=>{const n=i.argument.valueOf(),o=t.getPointsByArg(n).indexOf(i),a=n.valueOf().toString()+o;e[a]=e[a]||[];const s=e[a].push(i);i.index=e[a][s-2]?e[a][s-2].index:Object.keys(e).length-1,i.argumentIndex=o}))}));const t=[];return(0,s.each)(e,((e,i)=>{i.forEach(((e,i)=>{if(0===i)return void t.push(this._getLegendOptions(e));const n=t[t.length-1];n.legendData.points.push(e),n.visible||(n.visible=e.isVisible())}))})),t},_getLayoutTargets(){return[{canvas:this._canvas}]},_getLayoutSeries(e,t){let i;const n=this._canvas;let o=!1;return i=this.layoutManager.applyPieChartSeriesLayout(n,e,!0),e.forEach((e=>{e.correctPosition(i,n),o=e.drawLabelsWOPoints()||o})),o&&(i=this.layoutManager.applyPieChartSeriesLayout(n,e,t.hideLayoutLabels)),e.forEach((e=>{e.hideLabels()})),this._sizeGroupLayout={x:i.centerX,y:i.centerY,radius:i.radiusOuter,drawOptions:t},i},_getLayoutSeriesForEqualPies(e,t){const i=this._canvas,n=this.layoutManager.applyEqualPieChartLayout(e,t);return e.forEach((e=>{e.correctPosition(n,i),e.drawLabelsWOPoints()})),this.layoutManager.correctPieLabelRadius(e,n,i),n},_updateSeriesDimensions(e){const t=this._getVisibleSeries(),i=t.length;let n,o,a;const{sizeGroupLayout:s}=e;i&&(a=s?this._getLayoutSeriesForEqualPies(t,s):this._getLayoutSeries(t,e),o=(a.radiusOuter-a.radiusInner-m*(i-1))/i,n=a.radiusInner,this._setGeometry(a),t.forEach((e=>{e.correctRadius({radiusInner:n,radiusOuter:n+o}),n+=o+m})))},_renderSeries(e,t,i){if(this._calculateSeriesLayout(e,t),!e.sizeGroupLayout&&this.getSizeGroup())return I.queue(this),void this._clearCanvas();this._renderSeriesElements(e,i)},_getCenter(){return this._center},getInnerRadius(){return this._innerRadius},_getLegendCallBack(){const e=this._legend,t=this._getLegendTargets().map((e=>e.legendData));return i=>{t.forEach((t=>{const n=[],o=e.getActionCallback({index:t.id});this.series.forEach((e=>{const i=e.getPointsByKeys(t.argument,t.argumentIndex);n.push.apply(n,i)})),i&&i.argument===t.argument&&i.argumentIndex===t.argumentIndex&&n.push(i),o(function(e){let t=v;return e.forEach((e=>{var i;const n=null===(i=e.series)||void 0===i?void 0:i.getOptions();let o=e.fullState;"none"===(null==n?void 0:n.hoverMode)&&(o&=~C),"none"===(null==n?void 0:n.selectionMode)&&(o&=~y),t|=o})),b[t]}(n))}))}},_locateLabels(e){let t,i,n=0;do{i=this._adjustSeriesLabels("shift"===e),t=this._resolveLabelOverlapping(e)}while((t||i)&&++n<5)},_adjustSeriesLabels(e){return this.series.reduce(((t,i)=>i.adjustLabels(e)||t),!1)},_applyExtraSettings:o.noop,_resolveLabelOverlappingShift(){const e="anticlockwise"===this.option("segmentsDirection"),t=this.series.reduce(((e,t)=>((e[t.getOptions().label.position]||e.outside).push(t),e)),{inside:[],columns:[],outside:[]});let i=!1;const n=(e,t)=>(0,c.getVerticallyShiftedAngularCoords)(e,-t,this._center);if(t.inside.length>0){i=S(t.inside.reduce(((e,t)=>t.getVisiblePoints().reduce(((e,t)=>(e.left.push(t),e)),e)),{left:[],right:[]}),x,e,this._canvas)||i}return i=t.columns.reduce(((t,i)=>S(w(i),x,e,this._canvas)||t),i),t.outside.length>0&&(i=S(t.outside.reduce(((e,t)=>w(t,e)),null),n,e,this._canvas)||i),i},_setGeometry(e){let{centerX:t,centerY:i,radiusInner:n}=e;this._center={x:t,y:i},this._innerRadius=n},_disposeSeries(){this.callBase.apply(this,arguments),this._abstractSeries=null},_legendDataField:"point",_legendItemTextField:"argument",_applyPointMarkersAutoHiding:o.noop,_renderTrackers:o.noop,_trackerType:"PieTracker",_createScrollBar:o.noop,_updateAxesLayout:o.noop,_applyClipRects:o.noop,_appendAdditionalSeriesGroups:o.noop,_prepareToRender:o.noop,_isLegendInside:o.noop,_renderAxes:o.noop,_shrinkAxes:o.noop,_isRotated:o.noop,_seriesPopulatedHandlerCore:o.noop,_reinitAxes:o.noop,_correctAxes:o.noop,_getExtraOptions(){return{startAngle:this.option("startAngle"),innerRadius:this.option("innerRadius"),segmentsDirection:this.option("segmentsDirection"),type:this.option("type")}},getSizeGroup(){return this._themeManager.getOptions("sizeGroup")},getSizeGroupLayout(){return this._sizeGroupLayout||{}}});(0,s.each)(["startAngle","innerRadius","segmentsDirection","type"],((e,t)=>{E.prototype._optionChangesMap[t]="REFRESH_SERIES_DATA_INIT"})),E.addPlugin(u.plugins.pieChart),E.addPlugin(d.plugins.core),E.addPlugin(d.plugins.pieChart),(0,n.default)("dxPieChart",E);t.default=E},52769:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=i(92848))&&n.__esModule?n:{default:n},a=i(17781),s=i(52576),r=i(11528),l=i(97808),d=i(28779),u=i(78609);const c=u.AdvancedChart.inherit({_themeSection:"polar",_createPanes(){return this.callBase(),[{name:"default"}]},_checkPaneName:()=>!0,_getAxisRenderingOptions(e){let t="argumentAxis"===e?"circular":"linear";return this.option("useSpiderWeb")&&(t+="Spider"),{axisType:"polarAxes",drawingType:t}},_executeAppendBeforeSeries(e){e()},_prepareAxisOptions(e,t){const i="argumentAxis"===e,n=this._themeManager,o=this.option("argumentAxis"),a=n.getOptions("argumentAxis",o)||{},s=isFinite(a.startAngle)?(0,d.normalizeAngle)(a.startAngle):0;return{type:this.option("useSpiderWeb")&&i?"discrete":t.type,isHorizontal:!0,showCustomBoundaryTicks:i,startAngle:s,endAngle:s+360}},_optionChangesMap:{useSpiderWeb:"USE_SPIDER_WEB"},_change_USE_SPIDER_WEB(){this._disposeAxes(),this._requestChange(["AXES_AND_PANES"])},_getExtraOptions(){return{spiderWidget:this.option("useSpiderWeb")}},_prepareToRender(){return this._appendAxesGroups(),{}},_calcCanvas(){const e=(0,s.extend)({},this._canvas),t=this.getArgumentAxis().getMargins();return Object.keys(t).forEach((i=>{e[i]=e[`original${i[0].toUpperCase()}${i.slice(1)}`]+t[i]})),e},_renderAxes(){const e=this._getValueAxis(),t=this.getArgumentAxis();t.draw(this._canvas),e.setSpiderTicks(t.getSpiderTicks());const i=this._calcCanvas();return t.updateSize(i),e.draw(i),i},_getValueAxis(){return this._valueAxes[0]},_shrinkAxes(e){const t=this._getValueAxis(),i=this.getArgumentAxis();if(e&&(e.width||e.height)){i.hideOuterElements();const e=this._calcCanvas();i.updateSize(e),t.updateSize(e)}},checkForMoreSpaceForPanesCanvas(){return this.layoutManager.needMoreSpaceForPanesCanvas([{canvas:this.getArgumentAxis().getCanvas()}],this._isRotated())},_getLayoutTargets(){return[{canvas:this._canvas}]},_getSeriesForPane(){return this.series},_applyClipRects(){const e=this._getCanvasClipRectID();this._createClipPathForPane(),this.getArgumentAxis().applyClipRects(this._getElementsClipRectID(),e),this._getValueAxis().applyClipRects(this._getElementsClipRectID(),e)},_createClipPathForPane(){const e=this._getValueAxis();let t=e.getCenter();const i=e.getRadius(),n=this._panesClipRects;t={x:Math.round(t.x),y:Math.round(t.y)},this._createClipCircle(n.fixed,t.x,t.y,i),this._createClipCircle(n.base,t.x,t.y,i),this.series.some((e=>e.areErrorBarsVisible()))?this._createClipCircle(n.wide,t.x,t.y,i):n.wide[0]=null},_createClipCircle(e,t,i,n){let o=e[0];o?o.attr({cx:t,cy:i,r:n}):(o=this._renderer.clipCircle(t,i,n),e[0]=o)},_applyExtraSettings(e){const t=this._panesClipRects.wide[0];e.setClippingParams(this._panesClipRects.base[0].id,t&&t.id,!1,!1)},getActualAngle(e){return this.getArgumentAxis().getOptions().inverted?360-e:e},getXYFromPolar(e,t,i,n){const o={angle:void 0,radius:void 0,x:void 0,y:void 0};if(!((0,r.isDefined)(e)||(0,r.isDefined)(t)||(0,r.isDefined)(i)||(0,r.isDefined)(n)))return o;const a=this.getArgumentAxis(),l=a.getAngles()[0];let u,c;if((0,r.isDefined)(i)?u=a.getTranslator().translate(i):isFinite(e)?u=this.getActualAngle(e):(0,r.isDefined)(e)||(u=0),(0,r.isDefined)(n)?c=this.getValueAxis().getTranslator().translate(n):isFinite(t)?c=t:(0,r.isDefined)(t)||(c=a.getRadius()),(0,r.isDefined)(u)&&(0,r.isDefined)(c)){const e=(0,d.convertPolarToXY)(a.getCenter(),l,u,c);(0,s.extend)(o,e,{angle:a.getTranslatedAngle(u),radius:c})}return o},_applyPointMarkersAutoHiding:a.noop,_createScrollBar:a.noop,_isRotated:a.noop,_getCrosshairOptions:a.noop,_isLegendInside:a.noop});c.addPlugin(l.plugins.core),c.addPlugin(l.plugins.polarChart),(0,o.default)("dxPolarChart",c);t.default=c},81578:function(e,t,i){Object.defineProperty(t,"cancelAnimationFrame",{enumerable:!0,get:function(){return n.cancelAnimationFrame}}),Object.defineProperty(t,"requestAnimationFrame",{enumerable:!0,get:function(){return n.requestAnimationFrame}});var n=i(16826)},44229:function(e,t,i){t.default=void 0;var n=i(16826);t.default=n.fx;e.exports=t.default,e.exports.default=t.default},27287:function(e,t,i){t.default=void 0;var n=i(16826);t.default=n.animationPresets;e.exports=t.default,e.exports.default=t.default},54830:function(e,t,i){t.default=void 0;var n=i(16826);t.default=n.TransitionExecutor;e.exports=t.default,e.exports.default=t.default},10195:function(e,t,i){t.default=void 0,i(84789),i(90750);var n,o=(n=i(92307))&&n.__esModule?n:{default:n},a=i(2607),s=i(74453);o.default.integration={},o.default.integration.EventsStrategy=a.EventsStrategy,o.default.integration.Options=s.Options;t.default=o.default;e.exports=t.default,e.exports.default=t.default},27114:function(e,t,i){const n=i(92307);n.common=n.common||{},n.common.charts=i(20153),e.exports=n.common.charts},92307:function(e,t,i){const n=i(3104).getWindow(),o=n.DevExpress=n.DevExpress||{},a=o.errors=i(87129);if(o._DEVEXTREME_BUNDLE_INITIALIZED)throw a.Error("E0024");o._DEVEXTREME_BUNDLE_INITIALIZED=!0,o.clientExporter=i(73549),o.excelExporter=i(54594),o.pdfExporter=i(92731),o.VERSION=i(1956).version,o.assertDevExtremeVersion=i(48367).c,o.Class=i(55620),o.DOMComponent=i(97832),o.Component=i(17863).Component,o.registerComponent=i(92848),o.devices=i(63705).devices,o.trial=i(71669),o.Color=i(43101);const s=i(84096);o.utils={},o.utils.requestAnimationFrame=s.requestAnimationFrame,o.utils.cancelAnimationFrame=s.cancelAnimationFrame,o.utils.initMobileViewport=i(63705).initMobileViewport,o.utils.getTimeZones=i(63705).getTimeZones,o.utils.extendFromObject=i(52576).extendFromObject,o.utils.triggerShownEvent=i(18029).triggerShownEvent,o.utils.triggerHidingEvent=i(18029).triggerHidingEvent,o.utils.resetActiveElement=i(86858).resetActiveElement,o.utils.findBestMatches=i(17781).findBestMatches,o.createQueue=i(65221).create,o.utils.dom=i(86858),o.utils.common=i(17781),o.utils.date=i(41380),o.utils.browser=i(48314),o.utils.inflector=i(53124),o.utils.iterator=i(21274),o.utils.readyCallbacks=i(3122),o.utils.resizeCallbacks=i(63283),o.utils.console=i(31951),o.utils.string=i(54497),o.utils.support=i(4785),o.utils.ajax=i(78670),o.viewPort=i(55355).value,o.hideTopOverlay=i(63705).hideTopOverlay,o.formatHelper=i(2082),o.config=i(83077).config,o.animationPresets=i(61310).presets,o.fx=i(16826).fx,o.TransitionExecutor=i(33054).TransitionExecutor,o.AnimationPresetCollection=i(61310).PresetCollection,o.events=i(52391),o.events.click=i(64044),o.events.utils=i(98834),o.events.GestureEmitter=i(85915),o.localization=i(46795),o.templateRendered=i(42186).renderedCallbacks,o.setTemplateEngine=i(35155).setTemplateEngine,e.exports=o},11166:function(e,t,i){i(6285),i(72134),i(90270),i(21113),i(85096),i(46327),i(53093),i(76856),i(65266),i(80175),i(69786),i(53200),i(66636),i(65951),i(91366),i(67872),i(81578),i(44229),i(27287),i(54830),i(16615),i(30725),i(36069),i(94348),i(89207)},54844:function(e,t,i){const n=i(92307),o=i(87129);e.exports=n.data=n.data||{},Object.defineProperty(n.data,"errorHandler",{get:function(){return i(11036).errorHandler},set:function(e){o.log("W0003","DevExpress.data","errorHandler","21.1","Use the 'setErrorHandler' method instead"),i(82812).setErrorHandler(e)}}),Object.defineProperty(n.data,"_errorHandler",{get:function(){return i(82812).handleError},set:function(e){o.log("W0003","DevExpress.data","_errorHandler","21.1","Use the 'setErrorHandler' method instead"),i(82812).setErrorHandler(e)}}),n.data.setErrorHandler=i(82812).setErrorHandler,n.data.DataSource=i(14479),n.data.query=i(30771),n.data.Store=i(77735),n.data.ArrayStore=i(80556),n.data.CustomStore=i(63326).CustomStore,n.data.LocalStore=i(71790),n.data.base64_encode=i(89358).base64_encode,n.data.applyChanges=i(99745),n.data.Guid=i(19427),n.data.utils={},n.data.utils.compileGetter=i(31e3).compileGetter,n.data.utils.compileSetter=i(31e3).compileSetter,n.EndpointSelector=i(44180),n.data.queryImpl=i(84816).queryImpl,n.data.queryAdapters=i(5842);const a=i(89358);n.data.utils.normalizeBinaryCriterion=a.normalizeBinaryCriterion,n.data.utils.normalizeSortingInfo=a.normalizeSortingInfo,n.data.utils.errorMessageFromXhr=a.errorMessageFromXhr,n.data.utils.aggregators=a.aggregators,n.data.utils.keysEqual=a.keysEqual,n.data.utils.isDisjunctiveOperator=a.isDisjunctiveOperator,n.data.utils.isConjunctiveOperator=a.isConjunctiveOperator,n.data.utils.processRequestResultLock=a.processRequestResultLock,n.data.utils.toComparable=i(31e3).toComparable,n.data.utils.multiLevelGroup=i(66177).multiLevelGroup,n.data.utils.arrangeSortingInfo=i(66177).arrangeSortingInfo,n.data.utils.normalizeDataSourceOptions=i(97169).normalizeDataSourceOptions},23555:function(e,t,i){i(74760),i(47283),i(22567),i(77735),i(67664),i(37754),i(1242),i(99354),i(50797),i(19427),i(31e3),i(73192),i(99354)},71043:function(e,t,i){i(54844),DevExpress.data.ODataStore=i(29284),DevExpress.data.ODataContext=i(34170),DevExpress.data.utils=DevExpress.data.utils||{},DevExpress.data.utils.odata={},DevExpress.data.utils.odata.keyConverters=i(8056).keyConverters,DevExpress.data.EdmLiteral=i(8056).EdmLiteral;const n=i(8056);DevExpress.data.utils.odata.serializePropName=n.serializePropName,DevExpress.data.utils.odata.serializeValue=n.serializeValue,DevExpress.data.utils.odata.serializeKey=n.serializeKey,DevExpress.data.utils.odata.sendRequest=n.sendRequest,DevExpress.data.queryAdapters=DevExpress.data.queryAdapters||{},DevExpress.data.queryAdapters.odata=i(65001).odata},42190:function(e,t,i){i(54844),i(25184),i(87062),i(57076)},73338:function(e,t,i){var n=d(i(92307)),o=d(i(46327)),a=d(i(53093)),s=d(i(76856)),r=d(i(80175)),l=d(i(85096));function d(e){return e&&e.__esModule?e:{default:e}}e.exports=n.default.fileManagement=n.default.fileManagement||{},n.default.fileManagement.FileSystemError=o.default,n.default.fileManagement.FileSystemItem=a.default,n.default.fileManagement.ObjectFileSystemProvider=s.default,n.default.fileManagement.RemoteFileSystemProvider=r.default,n.default.fileManagement.CustomFileSystemProvider=l.default},67712:function(e,t,i){const n=i(92307);i(11166),i(21001),i(34563),i(23805),i(84207),i(13203),i(99862),i(869),i(64044),i(80248),i(5636),i(59144),i(68095),i(638),i(89797),i(80250),i(37008),e.exports=n},51323:function(e,t,i){const n=i(67712).data=i(54844);i(23555),n.odata=i(71043),i(42190),e.exports=n},18899:function(e,t,i){var n,o=(n=i(67712))&&n.__esModule?n:{default:n};const a=i(73338);o.default.fileManagement=a,e.exports=a},90750:function(e,t,i){const n=i(67712);i(51323),i(27114);const o=n.viz=i(2211);o.currentTheme=i(84560).currentTheme,o.registerTheme=i(84560).registerTheme,o.exportFromMarkup=i(88168).exportFromMarkup,o.getMarkup=i(88168).getMarkup,o.exportWidgets=i(88168).exportWidgets,o.currentPalette=i(9735).currentPalette,o.getPalette=i(9735).getPalette,o.generateColors=i(9735).generateColors,o.registerPalette=i(9735).registerPalette,o.refreshTheme=i(84560).refreshTheme,o.dxChart=i(26408),o.dxPieChart=i(4381),o.dxPolarChart=i(11247),o.dxLinearGauge=i(4655),o.dxCircularGauge=i(89463),o.dxBarGauge=i(84601),o.dxRangeSelector=i(30185),o.dxVectorMap=i(85148),o.map={},o.map.sources={},o.map.projection=i(99094).projection,o.dxSparkline=i(71871),o.dxBullet=i(75954),o.dxTreeMap=i(61015),o.dxFunnel=i(61434),o.dxSankey=i(37755),o.getTheme=i(84560).getTheme,o.findTheme=i(84560).getTheme,o.refreshAll=i(84560).refreshTheme,o.refreshPaths=i(2225).refreshPaths,o.gauges={__internals:{}},o._dashboard={},o._dashboard.Renderer=i(63022).Renderer,o._dashboard.SvgElement=i(63022).SvgElement,o._dashboard.patchFontOptions=i(28779).patchFontOptions,e.exports=o},79178:function(e,t,i){const n=i(67712);i(51323),i(18899);const o=n.ui=i(57190);o.themes=i(52071),o.setTemplateEngine=i(35155).setTemplateEngine,o.dialog=i(35757),o.notify=i(93380),o.repaintFloatingActionButton=i(92725),o.hideToasts=i(41792),o.dxActionSheet=i(45263),o.dxAutocomplete=i(93485),o.dxBox=i(91204),o.dxButton=i(64973),o.dxDropDownButton=i(56582),o.dxButtonGroup=i(17809),o.dxCalendar=i(22195),o.dxCheckBox=i(94319),o.dxColorBox=i(87928),o.dxChat=i(73571),o.dxDateBox=i(2739),o.dxDateRangeBox=i(45453),o.dxDrawer=i(7968),o.dxDeferRendering=i(41302),o.dxDropDownBox=i(74417),o.dxFileUploader=i(26980),o.dxForm=i(74075),o.dxGallery=i(89987),o.dxHtmlEditor=i(16802),o.dxList=i(3121),o.dxLoadIndicator=i(11979),o.dxLoadPanel=i(31876),o.dxLookup=i(99203),o.dxMap=i(55211),o.dxMultiView=i(24150),o.dxNumberBox=i(48042),o.dxOverlay=i(89132),o.dxPagination=i(38389),o.dxPopover=i(46184),o.dxPopup=i(97643),o.dxProgressBar=i(58436),o.dxRadioGroup=i(84798),o.dxRangeSlider=i(80790),o.dxResizable=i(28416),o.dxResponsiveBox=i(43597),o.dxScrollView=i(91374),o.dxSelectBox=i(60695),o.dxSlider=i(56220),o.dxSpeedDialAction=i(67924),o.dxSplitter=i(78254),o.dxSwitch=i(91029),o.dxTabPanel=i(78175),o.dxTabs=i(94385),o.dxTagBox=i(4575),o.dxTextArea=i(23116),o.dxTextBox=i(20780),o.dxTileView=i(96993),o.dxToast=i(36574),o.dxToolbar=i(2850),o.dxTooltip=i(93370),o.dxTrackBar=i(76256),o.dxDraggable=i(5298),o.dxSortable=i(95305),n.validationEngine=i(19391),o.dxValidationSummary=i(10585),o.dxValidationGroup=i(16390),o.dxValidator=i(71775),o.CollectionWidget=i(7607),o.dxDropDownEditor=i(99142),e.exports=o},84789:function(e,t,i){const n=i(51323),o=i(79178);o.dxAccordion=i(30543),o.dxContextMenu=i(34378),o.dxDataGrid=i(4920),o.dxTreeList=i(21872),o.dxMenu=i(1614),o.dxPivotGrid=i(49344),o.dxPivotGridFieldChooser=i(55633),n.PivotGridDataSource=i(55067),n.XmlaStore=i(80445),o.dxScheduler=i(17636),o.dxTreeView=i(4313),o.dxFilterBuilder=i(35299),o.dxFileManager=i(14247),o.dxDiagram=i(87632),o.dxGantt=i(16075)},57190:function(e,t,i){i(92307),e.exports=DevExpress.ui={}},2211:function(e,t,i){i(92307),e.exports=DevExpress.viz=DevExpress.viz||{}},43101:function(e,t){t.default=void 0;const i={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*\.*\d+)\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4])]}},{re:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),Number((parseInt(e[4],16)/255).toFixed(2))]}},{re:/^#([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),Number((parseInt(e[4]+e[4],16)/255).toFixed(2))]}},{re:/^#([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/^hsv\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){const t=parseInt(e[1],10),i=parseInt(e[2],10),n=parseInt(e[3],10),o=r(t,i,n);return[o[0],o[1],o[2],1,[t,i,n]]}},{re:/^hsl\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){const t=parseInt(e[1],10),i=parseInt(e[2],10),n=parseInt(e[3],10),o=u(t,i,n);return[o[0],o[1],o[2],1,null,[t,i,n]]}}],o=Math.round;function a(e){let t;this.baseColor=e,e&&(t=String(e).toLowerCase().replace(/ /g,""),t=i[t]?"#"+i[t]:t,t=function(e){if("transparent"===e)return[0,0,0,0];let t=0;const i=n.length;let o;for(;t<i;++t)if(o=n[t].re.exec(e),o)return n[t].process(o);return null}(t)),t||(this.colorIsInvalid=!0),t=t||{},this.r=s(t[0]),this.g=s(t[1]),this.b=s(t[2]),this.a=s(t[3],1,1),t[4]?this.hsv={h:t[4][0],s:t[4][1],v:t[4][2]}:this.hsv=function(e,t,i){const n=Math.max(e,t,i),o=Math.min(e,t,i),a=n-o;let s,r,l=n;if(r=0===n?0:1-o/n,n===o)s=0;else switch(n){case e:s=(t-i)/a*60,t<i&&(s+=360);break;case t:s=(i-e)/a*60+120;break;case i:s=(e-t)/a*60+240}return r*=100,l*=100/255,{h:Math.round(s),s:Math.round(r),v:Math.round(l)}}(this.r,this.g,this.b),t[5]?this.hsl={h:t[5][0],s:t[5][1],l:t[5][2]}:this.hsl=function(e,t,i){e=c(e,255),t=c(t,255),i=c(i,255);const n=Math.max(e,t,i),a=Math.min(e,t,i),s=n+a;let r,l;const d=s/2;if(n===a)r=l=0;else{const o=n-a;l=d>.5?o/(2-s):o/s,r=function(e,t,i,n){switch(Math.max(e,t,i)){case e:return(t-i)/n+(t<i?6:0);case t:return(i-e)/n+2;case i:return(e-t)/n+4}}(e,t,i,o),r/=6}return{h:o(360*r),s:o(100*l),l:o(100*d)}}(this.r,this.g,this.b)}function s(e,t,i){return t=t||0,i=i||255,e<0||isNaN(e)?t:e>i?i:e}function r(e,t,i){const n=(100-t)*i/100,o=e%60/60*(i-n),a=n+o,s=i-o;let r,l,d;switch(Math.floor(e%360/60)){case 0:r=i,l=a,d=n;break;case 1:r=s,l=i,d=n;break;case 2:r=n,l=i,d=a;break;case 3:r=n,l=s,d=i;break;case 4:r=a,l=n,d=i;break;case 5:r=i,l=n,d=s}return[Math.round(2.55*r),Math.round(2.55*l),Math.round(2.55*d)]}function l(e,t){let i=t;return"r"===e&&(i=t+1/3),"b"===e&&(i=t-1/3),i}function d(e,t,i){return(i=function(e){return e<0&&(e+=1),e>1&&(e-=1),e}(i))<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function u(e,t,i){let n,a,s;if(e=c(e,360),t=c(t,100),i=c(i,100),0===t)n=a=s=i;else{const o=i<.5?i*(1+t):i+t-i*t,r=2*i-o;n=d(r,o,l("r",e)),a=d(r,o,l("g",e)),s=d(r,o,l("b",e))}return[o(255*n),o(255*a),o(255*s)]}function c(e,t){return e=Math.min(t,Math.max(0,parseFloat(e))),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function h(e,t,i){return t=t||0,i=i||255,!(e%1!=0||e<t||e>i||"number"!=typeof e||isNaN(e))}a.prototype={constructor:a,highlight:function(e){return e=e||10,this.alter(e).toHex()},darken:function(e){return e=e||10,this.alter(-e).toHex()},alter:function(e){const t=new a;return t.r=s(this.r+e),t.g=s(this.g+e),t.b=s(this.b+e),t},blend:function(e,t){const i=e instanceof a?e:new a(e),n=new a;return n.r=s(o(this.r*(1-t)+i.r*t)),n.g=s(o(this.g*(1-t)+i.g*t)),n.b=s(o(this.b*(1-t)+i.b*t)),n},toHex:function(){return e=this.r,t=this.g,i=this.b,"#"+(16777216|e<<16|t<<8|i).toString(16).slice(1);var e,t,i},getPureColor:function(){return new a("rgb("+r(this.hsv.h,100,100).join(",")+")")},isValidHex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},isValidRGB:function(e,t,i){return!!(h(e)&&h(t)&&h(i))},isValidAlpha:function(e){return!(isNaN(e)||e<0||e>1||"number"!=typeof e)},colorIsInvalid:!1,fromHSL:function(e){const t=new a,i=u(e.h,e.s,e.l);return t.r=i[0],t.g=i[1],t.b=i[2],t}};t.default=a;e.exports=t.default,e.exports.default=t.default},83077:function(e,t,i){Object.defineProperty(t,"Guid",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"setTemplateEngine",{enumerable:!0,get:function(){return a.default}});var n=s(i(66518)),o=s(i(71037)),a=s(i(32480));function s(e){return e&&e.__esModule?e:{default:e}}},20153:function(e,t,i){Object.defineProperty(t,"registerGradient",{enumerable:!0,get:function(){return n.registerGradient}}),Object.defineProperty(t,"registerPattern",{enumerable:!0,get:function(){return n.registerPattern}});var n=i(55351)},66518:function(e,t,i){t.default=void 0;var n,o=(n=i(34338))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},16826:function(e,t,i){Object.defineProperty(t,"TransitionExecutor",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"animationPresets",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"cancelAnimationFrame",{enumerable:!0,get:function(){return n.cancelAnimationFrame}}),Object.defineProperty(t,"fx",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"requestAnimationFrame",{enumerable:!0,get:function(){return n.requestAnimationFrame}});var n=i(84096),o=r(i(27075)),a=r(i(58049)),s=r(i(94680));function r(e){return e&&e.__esModule?e:{default:e}}},88424:function(e,t,i){t.convertTransitionTimingFuncToEasing=void 0,t.getEasing=function(e){return r[e]},t.setEasing=function(e){r=e};var n=i(11528);const o=/cubic-bezier\((\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\)/,a={linear:"cubic-bezier(0, 0, 1, 1)",swing:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)"},s=function(e,t,i,n){const o=3*e,a=3*(i-e)-o,s=1-o-a,r=3*t,l=3*(n-t)-r,d=1-r-l,u=function(e){return e*(o+e*(a+e*s))},c=function(e){return o+e*(2*a+3*e*s)};return function(e){return function(e){return e*(r+e*(l+e*d))}(function(e){let t,i=e,n=0;for(;n<14&&(t=u(i)-e,!(Math.abs(t)<.001));)i-=t/c(i),n++;return i}(e))}};let r={};t.convertTransitionTimingFuncToEasing=function(e){let t,i=(e=a[e]||e).match(o);i||(t="linear",i=a[t].match(o)),i=i.slice(1,5);for(let e=0;e<i.length;e++)i[e]=parseFloat(i[e]);const l=t||"cubicbezier_"+i.join("_").replace(/\./g,"p");return(0,n.isFunction)(r[l])||(r[l]=function(e,t,n,o,a){return o*s(i[0],i[1],i[2],i[3])(t/a)+n}),l}},84096:function(e,t,i){t.cancelAnimationFrame=function(){u(),d.apply(s,arguments)},t.requestAnimationFrame=function(){return u(),l.apply(s,arguments)};var n,o=i(3104),a=(n=i(13630))&&n.__esModule?n:{default:n};const s=(0,o.hasWindow)()?(0,o.getWindow)():{},r=1e3/60;let l=function(e){return setTimeout(e,r)},d=function(e){clearTimeout(e)};const u=(0,a.default)((function(){const e=s.requestAnimationFrame||s.webkitRequestAnimationFrame||s.mozRequestAnimationFrame||s.oRequestAnimationFrame||s.msRequestAnimationFrame,t=s.cancelAnimationFrame||s.webkitCancelAnimationFrame||s.mozCancelAnimationFrame||s.oCancelAnimationFrame||s.msCancelAnimationFrame;e&&t&&(l=e,d=t)}))},27075:function(e,t,i){t.default=void 0;var n=y(i(64553)),o=i(3104),a=y(i(92774)),s=y(i(87129)),r=i(61404),l=i(52576),d=i(11528),u=i(21274),c=i(88603),h=i(88424),p=i(84096),g=y(i(85991)),_=y(i(3030)),f=i(28630),m=i(98834),v=i(87739),C=i(17781);function y(e){return e&&e.__esModule?e:{default:e}}const b=(0,o.getWindow)(),x=(0,m.addNamespace)(f.removeEvent,"dxFX"),w=/^([+-])=(.*)/i,S="dxAnimData",D="dxAnimQueue",I="transform",E={initAnimation:function(e,t){e.css({transitionProperty:"none"}),"string"==typeof t.from?e.addClass(t.from):Z(e,t.from);const i=this,n=new v.Deferred,o=t.cleanupWhen;t.transitionAnimation={deferred:n,finish:function(){i._finishTransition(e),o?(0,v.when)(n,o).always((function(){i._cleanup(e,t)})):i._cleanup(e,t),n.resolveWith(e,[t,e])}},this._completeAnimationCallback(e,t).done((function(){t.transitionAnimation.finish()})).fail((function(){n.rejectWith(e,[t,e])})),t.duration||t.transitionAnimation.finish(),e.css("transform")},animate:function(e,t){return this._startAnimation(e,t),t.transitionAnimation.deferred.promise()},_completeAnimationCallback:function(e,t){const i=this,n=Date.now()+t.delay,o=new v.Deferred,s=new v.Deferred,r=new v.Deferred;let l;const d=g.default.transitionEndEventName()+".dxFX";t.transitionAnimation.cleanup=function(){clearTimeout(l),clearTimeout(u),a.default.off(e,d),a.default.off(e,x)},a.default.one(e,d,(function(){Date.now()-n>=t.duration&&s.reject()})),a.default.off(e,x),a.default.on(e,x,(function(){i.stop(e,t),o.reject()}));const u=setTimeout((function(){l=setTimeout((function(){r.reject()}),t.duration+t.delay+q._simulatedTransitionEndDelay),(0,v.when)(s,r).fail(function(){o.resolve()}.bind(this))}));return o.promise()},_startAnimation:function(e,t){e.css({transitionProperty:"all",transitionDelay:t.delay+"ms",transitionDuration:t.duration+"ms",transitionTimingFunction:t.easing}),"string"==typeof t.to?e[0].className+=" "+t.to:t.to&&Z(e,t.to)},_finishTransition:function(e){e.css("transition","none")},_cleanup:function(e,t){t.transitionAnimation.cleanup(),"string"==typeof t.from&&(e.removeClass(t.from),e.removeClass(t.to))},stop:function(e,t,i){t&&(i?t.transitionAnimation.finish():((0,d.isPlainObject)(t.to)&&(0,u.each)(t.to,(function(t){e.css(t,e.css(t))})),this._finishTransition(e),this._cleanup(e,t)))}},T={initAnimation:function(e,t){Z(e,t.from)},animate:function(e,t){const i=new v.Deferred,n=this;return t?((0,u.each)(t.to,(function(i){void 0===t.from[i]&&(t.from[i]=n._normalizeValue(e.css(i)))})),t.to[I]&&(t.from[I]=n._parseTransform(t.from[I]),t.to[I]=n._parseTransform(t.to[I])),t.frameAnimation={to:t.to,from:t.from,currentValue:t.from,easing:(0,h.convertTransitionTimingFuncToEasing)(t.easing),duration:t.duration,startTime:(new Date).valueOf(),finish:function(){this.currentValue=this.to,this.draw(),(0,p.cancelAnimationFrame)(t.frameAnimation.animationFrameId),i.resolve()},draw:function(){if(t.draw)return void t.draw(this.currentValue);const i=(0,l.extend)({},this.currentValue);i[I]&&(i[I]=(0,u.map)(i[I],(function(e,t){return"translate"===t?(0,c.getTranslateCss)(e):"scale"===t?"scale("+e+")":"rotate"===t.substr(0,t.length-1)?t+"("+e+"deg)":void 0})).join(" ")),e.css(i)}},t.delay?(t.frameAnimation.startTime+=t.delay,t.frameAnimation.delayTimeout=setTimeout((function(){n._startAnimation(e,t)}),t.delay)):n._startAnimation(e,t),i.promise()):i.reject().promise()},_startAnimation:function(e,t){a.default.off(e,x),a.default.on(e,x,(function(){t.frameAnimation&&(0,p.cancelAnimationFrame)(t.frameAnimation.animationFrameId)})),this._animationStep(e,t)},_parseTransform:function(e){const t={};return(0,u.each)(e.match(/\w+\d*\w*\([^)]*\)\s*/g),(function(e,i){const n=(0,c.parseTranslate)(i),o=i.match(/scale\((.+?)\)/),a=i.match(/(rotate.)\((.+)deg\)/);n&&(t.translate=n),o&&o[1]&&(t.scale=parseFloat(o[1])),a&&a[1]&&(t[a[1]]=parseFloat(a[2]))})),t},stop:function(e,t,i){const n=t&&t.frameAnimation;n&&((0,p.cancelAnimationFrame)(n.animationFrameId),clearTimeout(n.delayTimeout),i&&n.finish(),delete t.frameAnimation)},_animationStep:function(e,t){const i=t&&t.frameAnimation;if(!i)return;const n=(new Date).valueOf();if(n>=i.startTime+i.duration)return void i.finish();i.currentValue=this._calcStepValue(i,n-i.startTime),i.draw();const o=this;i.animationFrameId=(0,p.requestAnimationFrame)((function(){o._animationStep(e,t)}))},_calcStepValue:function(e,t){const i=function(n,o){const a=Array.isArray(o)?[]:{};return(0,u.each)(o,(function(s,r){if("string"==typeof r&&!1===parseFloat(r))return!0;a[s]="object"==typeof r?i(n[s],r):function(i){const a=t/e.duration,s=t,r=1*n[i],l=o[i]-n[i],d=e.duration;return(0,h.getEasing)(e.easing)(a,s,r,l,d)}(s)})),a};return i(e.from,e.to)},_normalizeValue:function(e){const t=parseFloat(e);return!1===t?e:t}},A={initAnimation:function(){},animate:function(){return(new v.Deferred).resolve().promise()},stop:C.noop,isSynchronous:!0},O=function(e,t,i,n){(0,u.each)(["from","to"],(function(){if(!i(e[this]))throw s.default.Error("E0010",t,this,n)}))},P=function(e,t){return O(e,t,(function(e){return(0,d.isPlainObject)(e)}),"a plain object")},k={top:{my:"bottom center",at:"top center"},bottom:{my:"top center",at:"bottom center"},right:{my:"left center",at:"right center"},left:{my:"right center",at:"left center"}},M={validateConfig:function(e){P(e,"slide")},setup:function(e,t){const i=(0,c.locate)(e);if("slide"!==t.type){const i="slideIn"===t.type?t.from:t.to;i.position=(0,l.extend)({of:b},k[t.direction]),K(e,i)}this._setUpConfig(i,t.from),this._setUpConfig(i,t.to),(0,c.clearCache)(e)},_setUpConfig:function(e,t){t.left="left"in t?t.left:"+=0",t.top="top"in t?t.top:"+=0",this._initNewPosition(e,t)},_initNewPosition:function(e,t){const i={left:t.left,top:t.top};delete t.left,delete t.top;let n=this._getRelativeValue(i.left);void 0!==n?i.left=n+e.left:t.left=0,n=this._getRelativeValue(i.top),void 0!==n?i.top=n+e.top:t.top=0,t[I]=(0,c.getTranslateCss)({x:i.left,y:i.top})},_getRelativeValue:function(e){let t;if("string"==typeof e&&(t=w.exec(e)))return parseInt(t[1]+"1")*t[2]}},R={setup:function(e,t){const i=t.from,n=t.to,o="fadeOut"===t.type?1:0,a="fadeOut"===t.type?0:1;let s=(0,d.isPlainObject)(i)?String(i.opacity??o):String(i),r=(0,d.isPlainObject)(n)?String(n.opacity??a):String(n);switch(t.skipElementInitialStyles||(s=e.css("opacity")),t.type){case"fadeIn":r=1;break;case"fadeOut":r=0}t.from={visibility:"visible",opacity:s},t.to={opacity:r}}},L={custom:{setup:function(){}},slide:M,slideIn:M,slideOut:M,fade:R,fadeIn:R,fadeOut:R,pop:{validateConfig:function(e){P(e,"pop")},setup:function(e,t){const i=t.from,n=t.to,o="opacity"in i?i.opacity:e.css("opacity"),a="opacity"in n?n.opacity:1,s="scale"in i?i.scale:0,r="scale"in n?n.scale:1;t.from={opacity:o};const l=(0,c.getTranslate)(e);t.from[I]=this._getCssTransform(l,s),t.to={opacity:a},t.to[I]=this._getCssTransform(l,r)},_getCssTransform:function(e,t){return(0,c.getTranslateCss)(e)+"scale("+t+")"}},css:{validateConfig:function(e){!function(e,t){O(e,t,(function(e){return"string"==typeof e}),"a string")}(e,"css")},setup:function(){}}},B={type:"custom",from:{},to:{},duration:400,start:C.noop,complete:C.noop,easing:"ease",delay:0},V={duration:400,easing:"ease",delay:0};function F(){const e=this,t=e.element,i=e.config;if(K(t,i.from),K(t,i.to),e.configurator.setup(t,i),t.data(S,e),q.off&&(i.duration=0,i.delay=0),e.strategy.initAnimation(t,i),i.start){const e=(0,r.getPublicElement)(t);i.start.apply(this,[e,i])}}const H=function(){const e=this,t=e.element,i=e.config;return e.isStarted=!0,e.strategy.animate(t,i).done((function(){!function(e){const t=e.element,i=e.config;if(t.removeData(S),i.complete){const e=(0,r.getPublicElement)(t);i.complete.apply(this,[e,i])}e.deferred.resolveWith(this,[t,i])}(e)})).fail((function(){e.deferred.rejectWith(this,[t,i])}))},N=function(e){const t=this,i=t.element,n=t.config;clearTimeout(t.startTimeout),t.isStarted||t.start(),t.strategy.stop(i,n,e)},z=(0,m.addNamespace)(f.removeEvent,"dxFXStartAnimation"),W=function(e,t){const i="css"===t.type?V:B,o=(0,l.extend)(!0,{},i,t),r=function(e){const t=L[e.type];if(!t)throw s.default.Error("E0011",e.type);return t}(o),u=function(e){e=e||{};const t={transition:g.default.transition()?E:T,frame:T,noAnimation:A};let i=e.strategy||"transition";return"css"!==e.type||g.default.transition()||(i="noAnimation"),t[i]}(o),c={element:(0,n.default)(e),config:o,configurator:r,strategy:u,isSynchronous:u.isSynchronous,setup:F,start:H,stop:N,deferred:new v.Deferred};return(0,d.isFunction)(r.validateConfig)&&r.validateConfig(o),function(e){a.default.off(e.element,z),a.default.on(e.element,z,(function(){q.stop(e.element)})),e.deferred.always((function(){a.default.off(e.element,z)}))}(c),c};function $(e){return e.data(D)||[]}const G=function(e){e.removeData(D)};function j(e){return!!e.data(S)}function U(e,t){if(!(t=$(e)).length)return;const i=t.shift();0===t.length&&G(e),function(e){e.setup(),q.off||e.isSynchronous?e.start():e.startTimeout=setTimeout((function(){e.start()}));return e.deferred.promise()}(i).done((function(){j(e)||U(e)}))}function K(e,t){if(!t||!t.position)return;const i=(0,n.default)(b);let o=0,a=0;const s=_.default.calculate(e,t.position),r=e.offset(),d=e.position();d.top>r.top&&(a=i.scrollTop()),d.left>r.left&&(o=i.scrollLeft()),(0,l.extend)(t,{left:s.h.location-r.left+d.left-o,top:s.v.location-r.top+d.top-a}),delete t.position}function Z(e,t){(0,u.each)(t,(function(t,i){try{e.css(t,(0,d.isFunction)(i)?i():i)}catch(e){}}))}const q={off:!1,animationTypes:L,animate:function(e,t){const i=(0,n.default)(e);if(!i.length)return(new v.Deferred).resolve().promise();const o=W(i,t);return function(e,t){const i=$(e);(function(e,t){e.data(D,t)})(e,i),i.push(t),j(e)||U(e,i)}(i,o),o.deferred.promise()},createAnimation:W,isAnimating:j,stop:function(e,t){const i=(0,n.default)(e),o=$(i);(0,u.each)(o,(function(e,t){t.config.delay=0,t.config.duration=0,t.isSynchronous=!0})),j(i)||U(i,o);const a=i.data(S);a&&a.stop(t),i.removeData(S),G(i)},_simulatedTransitionEndDelay:100};t.default=q;e.exports=t.default,e.exports.default=t.default},3030:function(e,t,i){t.default=void 0;var n=i(57653),o=m(i(64553)),a=i(17781),s=i(21274),r=i(3104),l=m(i(64960)),d=i(11528),u=i(52576),c=i(41639),h=m(i(48314)),p=i(88603),g=i(4785),_=m(i(65951)),f=i(58515);function m(e){return e&&e.__esModule?e:{default:e}}const v=(0,r.getWindow)(),C=/left|right/,y=/top|bottom/,b=/fit|flip|none/,x=/scale\(.+?\)/,w=h.default.safari,S=function(e){const t={h:"center",v:"center"},i=(0,a.splitPair)(e);return i&&(0,s.each)(i,(function(){const e=String(this).toLowerCase();C.test(e)?t.h=e:y.test(e)&&(t.v=e)})),t},D=function(e,t){return(0,a.pairToObject)(e,t)},I=function(e){switch(e){case"center":return.5;case"right":case"bottom":return 1;default:return 0}},E=function(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return e}},T=function(e,t){let i=0;return e.myLocation<t.min&&(i+=t.min-e.myLocation),e.myLocation>t.max&&(i+=e.myLocation-t.max),i},A=function(e,t,i){return t.myLocation<i.min?"h"===e?"left":"top":t.myLocation>i.max?"h"===e?"right":"bottom":"none"},O=function(e){e.myLocation=e.atLocation+I(e.atAlign)*e.atSize-I(e.myAlign)*e.mySize+e.offset},P={fit:function(e,t){let i=!1;e.myLocation>t.max&&(e.myLocation=t.max,i=!0),e.myLocation<t.min&&(e.myLocation=t.min,i=!0),e.fit=i},flip:function(e,t){if(e.flip=!1,("center"!==e.myAlign||"center"!==e.atAlign)&&(e.myLocation<t.min||e.myLocation>t.max)){const i=(0,u.extend)({},e,{myAlign:E(e.myAlign),atAlign:E(e.atAlign),offset:-e.offset});O(i),i.oversize=T(i,t),(i.myLocation>=t.min&&i.myLocation<=t.max||e.oversize>i.oversize)&&(e.myLocation=i.myLocation,e.oversize=i.oversize,e.flip=!0)}},flipfit:function(e,t){this.flip(e,t),this.fit(e,t)},none:function(e){e.oversize=0}};let k;const M=function(){const e=(0,o.default)("<div>").css({width:100,height:100,overflow:"scroll",position:"absolute",top:-9999}).appendTo((0,o.default)("body")),t=e.get(0).offsetWidth-e.get(0).clientWidth;e.remove(),k=t},R={h:{location:0,flip:!1,fit:!1,oversize:0},v:{location:0,flip:!1,fit:!1,oversize:0}},L=function(e,t){const i=(0,o.default)(e),s=i.offset(),r=(0,u.extend)(!0,{},R,{h:{location:s.left},v:{location:s.top}});if(!t)return r;const h=S(t.my),p=S(t.at);let f=(0,o.default)(t.of).length&&t.of||v;const m=D(t.offset,t.precise),C=function(e){const t=(0,a.splitPair)(e);let i=String(t&&t[0]).toLowerCase(),n=String(t&&t[1]).toLowerCase();return b.test(i)||(i="none"),b.test(n)||(n=i),{h:i,v:n}}(t.collision),y=t.boundary,x=D(t.boundaryOffset,t.precise),I={mySize:(0,n.getOuterWidth)(i),myAlign:h.h,atAlign:p.h,offset:m.h,collision:C.h,boundaryOffset:x.h},E={mySize:(0,n.getOuterHeight)(i),myAlign:h.v,atAlign:p.v,offset:m.v,collision:C.v,boundaryOffset:x.v};if(f.preventDefault)I.atLocation=f.pageX,E.atLocation=f.pageY,I.atSize=0,E.atSize=0;else if(f=(0,o.default)(f),(0,d.isWindow)(f[0]))I.atLocation=f.scrollLeft(),E.atLocation=f.scrollTop(),"phone"===_.default.real().deviceType&&f[0].visualViewport?(I.atLocation=Math.max(I.atLocation,f[0].visualViewport.offsetLeft),E.atLocation=Math.max(E.atLocation,f[0].visualViewport.offsetTop),I.atSize=f[0].visualViewport.width,E.atSize=f[0].visualViewport.height):(I.atSize=f[0].innerWidth>f[0].outerWidth?f[0].innerWidth:(0,n.getWidth)(f),E.atSize=f[0].innerHeight>f[0].outerHeight||w?f[0].innerHeight:(0,n.getHeight)(f));else if(9===f[0].nodeType)I.atLocation=0,E.atLocation=0,I.atSize=(0,n.getWidth)(f),E.atSize=(0,n.getHeight)(f);else{const e=(0,c.getBoundingRect)(f.get(0)),t=V(f);I.atLocation=t.left,E.atLocation=t.top,I.atSize=Math.max(e.width,(0,n.getOuterWidth)(f)),E.atSize=Math.max(e.height,(0,n.getOuterHeight)(f))}O(I),O(E);const L=function(){const e=(0,o.default)(v),t=(0,n.getWidth)(e),i=(0,n.getHeight)(e);let a=e.scrollLeft(),s=e.scrollTop();const r=l.default.getDocumentElement(),u=g.touch?r.clientWidth/t:1,c=g.touch?r.clientHeight/i:1;void 0===k&&M();let h=t,p=i;if(y&&!(0,d.isWindow)(y)){const e=(0,o.default)(y),t=e.offset();a=t.left,s=t.top,h=(0,n.getWidth)(e),p=(0,n.getHeight)(e)}return{h:{min:a+I.boundaryOffset,max:a+h/u-I.mySize-I.boundaryOffset},v:{min:s+E.boundaryOffset,max:s+p/c-E.mySize-E.boundaryOffset}}}();I.oversize=T(I,L.h),E.oversize=T(E,L.v),I.collisionSide=A("h",I,L.h),E.collisionSide=A("v",E,L.v),P[I.collision]&&P[I.collision](I,L.h),P[E.collision]&&P[E.collision](E,L.v);const B=function(e){return t.precise?e:Math.round(e)};return(0,u.extend)(!0,r,{h:{location:B(I.myLocation),oversize:B(I.oversize),fit:I.fit,flip:I.flip,collisionSide:I.collisionSide},v:{location:B(E.myLocation),oversize:B(E.oversize),fit:E.fit,flip:E.flip,collisionSide:E.collisionSide},precise:t.precise}),r},B=function(e,t,i,n){const o=(0,d.isDefined)(e.style)&&!l.default.isNode(e.style),a=n?i.replace(t,""):i;if(o)(0,f.setStyle)(e,a,!1);else{const t=l.default.createAttribute("style");t.value=a,e.setAttributeNode(t)}},V=function(e){var t,i;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const o=n.get(0);if(!o)return e.offset();const a=(null===(t=o.getAttribute)||void 0===t?void 0:t.call(o,"style"))||"",s=null===(i=a.match(x))||void 0===i?void 0:i[0];let r;return s?(B(o,s,a,!0),r=V(e,n.parent()),B(o,s,a,!1)):r=V(e,n.parent()),r},F=function(e,t){const i=(0,o.default)(e);if(!t)return i.offset();(0,p.resetPosition)(i,!0);const n=V(i),a=t.h&&t.v?t:L(i,t),s=function(e){return t.precise?e:Math.round(e)};return(0,p.move)(i,{left:a.h.location-s(n.left),top:a.v.location-s(n.top)}),a};F.inverseAlign||(F.inverseAlign=E),F.normalizeAlign||(F.normalizeAlign=S);t.default={calculateScrollbarWidth:M,calculate:L,setup:F,offset:function(e){return e=(0,o.default)(e).get(0),(0,d.isWindow)(e)?null:e&&"pageY"in e&&"pageX"in e?{top:e.pageY,left:e.pageX}:(0,o.default)(e).offset()}};e.exports=t.default,e.exports.default=t.default},58049:function(e,t,i){t.default=void 0;var n=i(61310);t.default=n.presets;e.exports=t.default,e.exports.default=t.default},61310:function(e,t,i){t.presets=t.PresetCollection=void 0;var n=i(57653),o=i(17863),a=i(21274),s=i(52576),r=d(i(44257)),l=d(i(27075));function d(e){return e&&e.__esModule?e:{default:e}}const u={forward:" dx-forward",backward:" dx-backward",none:" dx-no-direction",undefined:" dx-no-direction"},c=t.PresetCollection=o.Component.inherit({ctor:function(){this.callBase.apply(this,arguments),this._registeredPresets=[],this.resetToDefaults()},_getDefaultOptions:function(){return(0,s.extend)(this.callBase(),{defaultAnimationDuration:400,defaultAnimationDelay:0,defaultStaggerAnimationDuration:300,defaultStaggerAnimationDelay:40,defaultStaggerAnimationStartDelay:500})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(e){return e.phone},options:{defaultStaggerAnimationDuration:350,defaultStaggerAnimationDelay:50,defaultStaggerAnimationStartDelay:0}},{device:function(){return r.default.current().android||r.default.real.android},options:{defaultAnimationDelay:100}}])},_getPresetOptionName:function(e){return"preset_"+e},_createAndroidSlideAnimationConfig:function(e,t){const i=this,o=function(e){return{type:"slide",delay:void 0===e.delay?i.option("defaultAnimationDelay"):e.delay,duration:void 0===e.duration?i.option("defaultAnimationDuration"):e.duration}};return{enter:function(i,a){const s=(0,n.getWidth)(i.parent())*t,r=a.direction,d=o(a);return d.to={left:0,opacity:1},d.from="forward"===r?{left:s,opacity:e}:"backward"===r?{left:-s,opacity:e}:{left:0,opacity:0},l.default.createAnimation(i,d)},leave:function(i,a){const s=(0,n.getWidth)(i.parent())*t,r=a.direction,d=o(a);return d.from={left:0,opacity:1},d.to="forward"===r?{left:-s,opacity:e}:"backward"===r?{left:s,opacity:e}:{left:0,opacity:0},l.default.createAnimation(i,d)}}},_createOpenDoorConfig:function(){const e=this,t=function(t){return{type:"css",extraCssClasses:"dx-opendoor-animation",delay:void 0===t.delay?e.option("defaultAnimationDelay"):t.delay,duration:void 0===t.duration?e.option("defaultAnimationDuration"):t.duration}};return{enter:function(e,i){const n=i.direction,o=t(i);return o.delay="none"===n?o.delay:o.duration,o.from="dx-enter dx-opendoor-animation"+u[n],o.to="dx-enter-active",l.default.createAnimation(e,o)},leave:function(e,i){const n=i.direction,o=t(i);return o.from="dx-leave dx-opendoor-animation"+u[n],o.to="dx-leave-active",l.default.createAnimation(e,o)}}},_createWinPopConfig:function(){const e=this,t={type:"css",extraCssClasses:"dx-win-pop-animation",duration:e.option("defaultAnimationDuration")};return{enter:function(i,n){const o=t,a=n.direction;return o.delay="none"===a?e.option("defaultAnimationDelay"):e.option("defaultAnimationDuration")/2,o.from="dx-enter dx-win-pop-animation"+u[a],o.to="dx-enter-active",l.default.createAnimation(i,o)},leave:function(i,n){const o=t,a=n.direction;return o.delay=e.option("defaultAnimationDelay"),o.from="dx-leave dx-win-pop-animation"+u[a],o.to="dx-leave-active",l.default.createAnimation(i,o)}}},resetToDefaults:function(){this.clear(),this.registerDefaultPresets(),this.applyChanges()},clear:function(e){const t=this,i=[];(0,a.each)(this._registeredPresets,(function(n,o){e&&e!==o.name?i.push(o):t.option(t._getPresetOptionName(o.name),void 0)})),this._registeredPresets=i,this.applyChanges()},registerPreset:function(e,t){this._registeredPresets.push({name:e,config:t})},applyChanges:function(){const e=this,t=[];(0,a.each)(this._registeredPresets,(function(i,n){const o={device:n.config.device,options:{}};o.options[e._getPresetOptionName(n.name)]=n.config.animation,t.push(o)})),this._setOptionsByDevice(t)},getPreset:function(e){let t=e;for(;"string"==typeof t;)t=this.option(this._getPresetOptionName(t));return t},registerDefaultPresets:function(){this.registerPreset("pop",{animation:{extraCssClasses:"dx-android-pop-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("openDoor",{animation:this._createOpenDoorConfig()}),this.registerPreset("win-pop",{animation:this._createWinPopConfig()}),this.registerPreset("fade",{animation:{extraCssClasses:"dx-fade-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("slide",{device:function(){return r.default.current().android||r.default.real.android},animation:this._createAndroidSlideAnimationConfig(1,1)}),this.registerPreset("slide",{device:function(){return!r.default.current().android&&!r.default.real.android},animation:{extraCssClasses:"dx-slide-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("ios7-slide",{animation:{extraCssClasses:"dx-ios7-slide-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("overflow",{animation:{extraCssClasses:"dx-overflow-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("ios7-toolbar",{device:function(){return!r.default.current().android&&!r.default.real.android},animation:{extraCssClasses:"dx-ios7-toolbar-animation",delay:this.option("defaultAnimationDelay"),duration:this.option("defaultAnimationDuration")}}),this.registerPreset("ios7-toolbar",{device:function(){return r.default.current().android||r.default.real.android},animation:this._createAndroidSlideAnimationConfig(0,.4)}),this.registerPreset("stagger-fade",{animation:{extraCssClasses:"dx-fade-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-slide",{animation:{extraCssClasses:"dx-slide-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-fade-slide",{animation:{extraCssClasses:"dx-fade-slide-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-drop",{animation:{extraCssClasses:"dx-drop-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-fade-drop",{animation:{extraCssClasses:"dx-fade-drop-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-fade-rise",{animation:{extraCssClasses:"dx-fade-rise-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-3d-drop",{animation:{extraCssClasses:"dx-3d-drop-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}}),this.registerPreset("stagger-fade-zoom",{animation:{extraCssClasses:"dx-fade-zoom-animation",staggerDelay:this.option("defaultStaggerAnimationDelay"),duration:this.option("defaultStaggerAnimationDuration"),delay:this.option("defaultStaggerAnimationStartDelay")}})}});t.presets=new c},94680:function(e,t,i){t.default=void 0;var n=i(33054);t.default=n.TransitionExecutor;e.exports=t.default,e.exports.default=t.default},33054:function(e,t,i){t.TransitionExecutor=void 0;var n=h(i(64553)),o=h(i(55620)),a=i(52576),s=h(i(39315)),r=i(11528),l=i(21274),d=h(i(27075)),u=i(61310),c=i(87739);function h(e){return e&&e.__esModule?e:{default:e}}const p={forward:" dx-forward",backward:" dx-backward",none:" dx-no-direction",undefined:" dx-no-direction"},g="dx-animating";t.TransitionExecutor=o.default.inherit({ctor:function(){this._accumulatedDelays={enter:0,leave:0},this._animations=[],this.reset()},_createAnimations:function(e,t,i,o){e=(0,n.default)(e);const a=this,s=[];i=i||{};const r=this._prepareElementAnimationConfig(t,i,o);return r&&e.each((function(){const e=a._createAnimation((0,n.default)(this),r,i);e&&(e.element.addClass(g),e.setup(),s.push(e))})),s},_prepareElementAnimationConfig:function(e,t,i){let n;if("string"==typeof e){const t=e;e=u.presets.getPreset(t)}if(e)if((0,r.isFunction)(e[i]))n=e[i];else{if(n=(0,a.extend)({skipElementInitialStyles:!0,cleanupWhen:this._completePromise},e,t),!n.type||"css"===n.type){const e="dx-"+i,t=(n.extraCssClasses?" "+n.extraCssClasses:"")+p[n.direction];n.type="css",n.from=(n.from||e)+t,n.to=n.to||e+"-active"}n.staggerDelay=n.staggerDelay||0,n.delay=n.delay||0,n.staggerDelay&&(n.delay+=this._accumulatedDelays[i],this._accumulatedDelays[i]+=n.staggerDelay)}else n=void 0;return n},_createAnimation:function(e,t,i){let n;return(0,r.isPlainObject)(t)?n=d.default.createAnimation(e,t):(0,r.isFunction)(t)&&(n=t(e,i)),n},_startAnimations:function(){const e=this._animations;for(let t=0;t<e.length;t++)e[t].start()},_stopAnimations:function(e){const t=this._animations;for(let i=0;i<t.length;i++)t[i].stop(e)},_clearAnimations:function(){const e=this._animations;for(let t=0;t<e.length;t++)e[t].element.removeClass(g);this._animations.length=0},reset:function(){this._accumulatedDelays.enter=0,this._accumulatedDelays.leave=0,this._clearAnimations(),this._completeDeferred=new c.Deferred,this._completePromise=this._completeDeferred.promise()},enter:function(e,t,i){const n=this._createAnimations(e,t,i,"enter");this._animations.push.apply(this._animations,n)},leave:function(e,t,i){const n=this._createAnimations(e,t,i,"leave");this._animations.push.apply(this._animations,n)},start:function(){const e=this;let t;if(this._animations.length){const i=(0,l.map)(this._animations,(function(e){const t=new c.Deferred;return e.deferred.always((function(){t.resolve()})),t.promise()}));t=c.when.apply(n.default,i).always((function(){e._completeDeferred.resolve(),e.reset()})),s.default.executeAsync((function(){e._startAnimations()}))}else e.reset(),t=(new c.Deferred).resolve().promise();return t},stop:function(e){this._stopAnimations(e)}})},88603:function(e,t,i){t.resetPosition=t.parseTranslate=t.move=t.locate=t.getTranslateCss=t.getTranslate=t.clearCache=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(74663),s=i(11528);const r="dxTranslator",l=/matrix(3d)?\((.+?)\)/,d=/translate(?:3d)?\((.+?)\)/;function u(e){return"string"===(0,s.type)(e)&&"%"===e[e.length-1]}function c(e,t){e.length&&(0,a.data)(e.get(0),r,t)}t.locate=function(e){e=(0,o.default)(e);const t=g(e);return{left:t.x,top:t.y}};const h=function(e){e.length&&(0,a.removeData)(e.get(0),r)};t.clearCache=h;const p=function(e){e.x=e.x||0,e.y=e.y||0;return"translate("+(u(e.x)?e.x:e.x+"px")+", "+(u(e.y)?e.y:e.y+"px")+")"};t.getTranslateCss=p;const g=function(e){let t=e.length?(0,a.data)(e.get(0),r):null;if(!t){let i=(e.css("transform")||p({x:0,y:0})).match(l);const n=i&&i[1];i?(i=i[2].split(","),"3d"===n?i=i.slice(12,15):(i.push(0),i=i.slice(4,7))):i=[0,0,0],t={x:parseFloat(i[0]),y:parseFloat(i[1]),z:parseFloat(i[2])},c(e,t)}return t};t.getTranslate=g;t.move=function(e,t){e=(0,o.default)(e);const i=t.left,n=t.top;let a;void 0===i?(a=g(e),a.y=n||0):void 0===n?(a=g(e),a.x=i||0):(a={x:i||0,y:n||0,z:0},c(e,a)),e.css({transform:p(a)}),(u(i)||u(n))&&h(e)};t.resetPosition=function(e,t){let i;e=(0,o.default)(e);const n={left:0,top:0,transform:"none"};t&&(i=e.css("transition"),n.transition="none"),e.css(n),h(e),t&&(e.get(0).offsetHeight,e.css("transition",i))};t.parseTranslate=function(e){let t=e.match(d);if(t&&t[1])return t=t[1].split(","),t={x:parseFloat(t[0]),y:parseFloat(t[1]),z:parseFloat(t[2])},t}},63705:function(e,t,i){Object.defineProperty(t,"devices",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"getTimeZones",{enumerable:!0,get:function(){return s.getTimeZones}}),Object.defineProperty(t,"hideTopOverlay",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"initMobileViewport",{enumerable:!0,get:function(){return a.default}});var n=r(i(44257)),o=r(i(45527)),a=r(i(64256)),s=i(95256);function r(e){return e&&e.__esModule?e:{default:e}}},44257:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(98905))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},83916:function(e,t){t.hideCallback=void 0;t.hideCallback=function(){let e=[];return{add:function(t){e.includes(t)||e.push(t)},remove:function(t){const i=e.indexOf(t);-1!==i&&e.splice(i,1)},fire:function(){const t=e.pop(),i=!!t;return i&&t(),i},hasCallback:function(){return e.length>0}}}()},45527:function(e,t,i){t.default=function(){return n.hideCallback.fire()};var n=i(83916);e.exports=t.default,e.exports.default=t.default},64256:function(e,t,i){t.default=void 0;var n=i(79279);t.default=n.initMobileViewport;e.exports=t.default,e.exports.default=t.default},79279:function(e,t,i){t.initMobileViewport=void 0;var n=i(57653),o=p(i(64553)),a=i(3104),s=p(i(92774)),r=i(52576),l=p(i(63283)),d=i(58515),u=p(i(98905)),c=p(i(62018)),h=p(i(85991));function p(e){return e&&e.__esModule?e:{default:e}}const g=(0,a.getWindow)();t.initMobileViewport=function(e){e=(0,r.extend)({},e);let t=u.default.real();const i=e.allowZoom,a=e.allowPan,p="allowSelection"in e?e.allowSelection:"generic"===t.platform,_="meta[name=viewport]";(0,o.default)(_).length||(0,o.default)("<meta>").attr("name","viewport").appendTo("head");const f=["width=device-width"],m=[];if(i?m.push("pinch-zoom"):f.push("initial-scale=1.0","maximum-scale=1.0, user-scalable=no"),a&&m.push("pan-x","pan-y"),a||i?(0,o.default)("html").css("msOverflowStyle","-ms-autohiding-scrollbar"):(0,o.default)("html, body").css({msContentZooming:"none",msUserSelect:"none",overflow:"hidden"}),!p&&h.default.supportProp("userSelect")&&(0,o.default)(".dx-viewport").css((0,d.styleProp)("userSelect"),"none"),(0,o.default)(_).attr("content",f.join()),(0,o.default)("html").css("msTouchAction",m.join(" ")||"none"),t=u.default.real(),h.default.touch&&(s.default.off(c.default.getDocument(),".dxInitMobileViewport"),s.default.on(c.default.getDocument(),"dxpointermove.dxInitMobileViewport",(function(e){const t=e.pointers.length,n="touch"===e.pointerType,o=!i&&t>1,s=!a&&1===t&&!e.isScrollingEvent;n&&(o||s)&&e.preventDefault()}))),t.ios){"file:"===c.default.getLocation().protocol||l.default.add((function(){const e=(0,n.getWidth)(g);(0,n.setWidth)((0,o.default)("body"),e)}))}t.android&&l.default.add((function(){setTimeout((function(){const e=c.default.getActiveElement();e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded():e.scrollIntoView(!1)}))}))}},95256:function(e,t,i){t.getTimeZones=void 0;var n,o=(n=i(18648))&&n.__esModule?n:{default:n};t.getTimeZones=o.default.getTimeZones},52391:function(e,t,i){t.trigger=t.one=t.on=t.off=t.Event=void 0;var n,o=(n=i(92774))&&n.__esModule?n:{default:n};t.on=o.default.on,t.one=o.default.one,t.off=o.default.off,t.trigger=o.default.trigger,t.Event=o.default.Event},64044:function(e,t,i){var n=i(28356);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},80248:function(e,t,i){var n=i(90096);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},69331:function(e,t,i){var n=i(14911);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},59e3:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(96292))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},81411:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(58063))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},15273:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(65381))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},85030:function(e,t,i){t.default=void 0;var n,o=(n=i(35329))&&n.__esModule?n:{default:n};t.default=new o.default;e.exports=t.default,e.exports.default=t.default},92774:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(36306))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},65462:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(40866))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},52818:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(34422))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},37373:function(e,t,i){var n=i(58065);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},5636:function(e,t,i){Object.defineProperty(t,"name",{enumerable:!0,get:function(){return o.name}});var n,o=i(36212);(0,((n=i(15273))&&n.__esModule?n:{default:n}).default)(o.name,o.dblClick)},59144:function(e,t,i){var n=i(88480);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},85915:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(77859))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},86548:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(18572))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},18278:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(54078))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},68095:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(3111))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},638:function(e,t,i){var n=i(57798);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},89797:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(24381))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},725:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(37321))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},5949:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(45841))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},71887:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(60699))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},38242:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(62814))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},71017:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(95253))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},28630:function(e,t,i){var n=i(92686);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},42222:function(e,t,i){var n=i(43926);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},80250:function(e,t,i){var n=i(6066);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},37008:function(e,t,i){t.zoomstart=t.zoomend=t.zoom=t.translatestart=t.translateend=t.translate=t.transformstart=t.transformend=t.transform=t.rotatestart=t.rotateend=t.rotate=t.pinchstart=t.pinchend=t.pinch=void 0;var n=i(68264);const{transformstart:o,transform:a,transformend:s,translatestart:r,translate:l,translateend:d,zoomstart:u,zoom:c,zoomend:h,pinchstart:p,pinch:g,pinchend:_,rotatestart:f,rotate:m,rotateend:v}=n.exportNames;t.rotateend=v,t.rotate=m,t.rotatestart=f,t.pinchend=_,t.pinch=g,t.pinchstart=p,t.zoomend=h,t.zoom=c,t.zoomstart=u,t.translateend=d,t.translate=l,t.translatestart=r,t.transformend=s,t.transform=a,t.transformstart=o},47413:function(e,t,i){var n=i(68337);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},45280:function(e,t,i){var n=i(86940);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},98834:function(e,t,i){var n=i(61210);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},18029:function(e,t,i){t.triggerShownEvent=t.triggerResizeEvent=t.triggerHidingEvent=t.default=void 0;var n,o=(n=i(52997))&&n.__esModule?n:{default:n};t.triggerShownEvent=o.default.triggerShownEvent,t.triggerHidingEvent=o.default.triggerHidingEvent,t.triggerResizeEvent=o.default.triggerResizeEvent;t.default=o.default},46795:function(e,t,i){Object.defineProperty(t,"date",{enumerable:!0,get:function(){return s.default}}),t.disableIntl=function(){"intl"===a.default.engine()&&a.default.resetInjection();"intl"===s.default.engine()&&s.default.resetInjection()},t.locale=t.loadMessages=t.formatNumber=t.formatMessage=t.formatDate=void 0,Object.defineProperty(t,"message",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"number",{enumerable:!0,get:function(){return a.default}}),t.parseNumber=t.parseDate=void 0;var n=r(i(84109)),o=r(i(4671)),a=r(i(52771)),s=r(i(38662));function r(e){return e&&e.__esModule?e:{default:e}}i(17333);t.locale=n.default.locale.bind(n.default),t.loadMessages=o.default.load.bind(o.default),t.formatMessage=o.default.format.bind(o.default),t.formatNumber=a.default.format.bind(a.default),t.parseNumber=a.default.parse.bind(a.default),t.formatDate=s.default.format.bind(s.default),t.parseDate=s.default.parse.bind(s.default)},55581:function(e,t){t.default=void 0;
// !!! AUTO-GENERATED FILE, DO NOT EDIT
t.default={af:"\xa4#,##0.00;(\xa4#,##0.00)","af-NA":"\xa4#,##0.00;(\xa4#,##0.00)",agq:"#,##0.00\xa4",ak:"\xa4#,##0.00",am:"\xa4#,##0.00;(\xa4#,##0.00)",ar:"\xa4#,##0.00;(\xa4#,##0.00)","ar-AE":"\xa4#,##0.00;(\xa4#,##0.00)","ar-BH":"\xa4#,##0.00;(\xa4#,##0.00)","ar-DJ":"\xa4#,##0.00;(\xa4#,##0.00)","ar-DZ":"\xa4#,##0.00;(\xa4#,##0.00)","ar-EG":"\xa4#,##0.00;(\xa4#,##0.00)","ar-EH":"\xa4#,##0.00;(\xa4#,##0.00)","ar-ER":"\xa4#,##0.00;(\xa4#,##0.00)","ar-IL":"\xa4#,##0.00;(\xa4#,##0.00)","ar-IQ":"\xa4#,##0.00;(\xa4#,##0.00)","ar-JO":"\xa4#,##0.00;(\xa4#,##0.00)","ar-KM":"\xa4#,##0.00;(\xa4#,##0.00)","ar-KW":"\xa4#,##0.00;(\xa4#,##0.00)","ar-LB":"\xa4#,##0.00;(\xa4#,##0.00)","ar-LY":"\xa4#,##0.00;(\xa4#,##0.00)","ar-MA":"\xa4#,##0.00;(\xa4#,##0.00)","ar-MR":"\xa4#,##0.00;(\xa4#,##0.00)","ar-OM":"\xa4#,##0.00;(\xa4#,##0.00)","ar-PS":"\xa4#,##0.00;(\xa4#,##0.00)","ar-QA":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SA":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SD":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SO":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SS":"\xa4#,##0.00;(\xa4#,##0.00)","ar-SY":"\xa4#,##0.00;(\xa4#,##0.00)","ar-TD":"\xa4#,##0.00;(\xa4#,##0.00)","ar-TN":"\xa4#,##0.00;(\xa4#,##0.00)","ar-YE":"\xa4#,##0.00;(\xa4#,##0.00)",as:"\xa4\xa0#,##,##0.00",asa:"#,##0.00\xa0\xa4",ast:"#,##0.00\xa0\xa4",az:"#,##0.00\xa0\xa4","az-Cyrl":"#,##0.00\xa0\xa4","az-Latn":"#,##0.00\xa0\xa4",bas:"#,##0.00\xa0\xa4",be:"#,##0.00\xa0\xa4","be-tarask":"#,##0.00\xa0\xa4",bem:"\xa4#,##0.00;(\xa4#,##0.00)",bez:"#,##0.00\xa4",bg:"0.00\xa0\xa4;(0.00\xa0\xa4)",bm:"\xa4#,##0.00;(\xa4#,##0.00)",bn:"#,##,##0.00\xa4;(#,##,##0.00\xa4)","bn-IN":"#,##,##0.00\xa4;(#,##,##0.00\xa4)",bo:"\xa4\xa0#,##0.00","bo-IN":"\xa4\xa0#,##0.00",br:"#,##0.00\xa0\xa4",brx:"\xa4\xa0#,##,##0.00",bs:"#,##0.00\xa0\xa4","bs-Cyrl":"#,##0.00\xa0\xa4","bs-Latn":"#,##0.00\xa0\xa4",ca:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ca-AD":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ca-ES-valencia":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ca-FR":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ca-IT":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",ccp:"#,##,##0.00\xa4;(#,##,##0.00\xa4)","ccp-IN":"#,##,##0.00\xa4;(#,##,##0.00\xa4)",ce:"#,##0.00\xa0\xa4",ceb:"\xa4#,##0.00;(\xa4#,##0.00)",cgg:"\xa4#,##0.00",chr:"\xa4#,##0.00;(\xa4#,##0.00)",ckb:"\xa4\xa0#,##0.00","ckb-IR":"\xa4\xa0#,##0.00",cs:"#,##0.00\xa0\xa4",cy:"\xa4#,##0.00;(\xa4#,##0.00)",da:"#,##0.00\xa0\xa4","da-GL":"#,##0.00\xa0\xa4",dav:"\xa4#,##0.00;(\xa4#,##0.00)",de:"#,##0.00\xa0\xa4","de-AT":"#,##0.00\xa0\xa4","de-BE":"#,##0.00\xa0\xa4","de-CH":"#,##0.00\xa0\xa4","de-IT":"#,##0.00\xa0\xa4","de-LI":"#,##0.00\xa0\xa4","de-LU":"#,##0.00\xa0\xa4",dje:"#,##0.00\xa4",doi:"\xa4#,##0.00",dsb:"#,##0.00\xa0\xa4",dua:"#,##0.00\xa0\xa4",dyo:"#,##0.00\xa0\xa4",dz:"\xa4#,##,##0.00",ebu:"\xa4#,##0.00;(\xa4#,##0.00)",ee:"\xa4#,##0.00;(\xa4#,##0.00)","ee-TG":"\xa4#,##0.00;(\xa4#,##0.00)",el:"#,##0.00\xa0\xa4","el-CY":"#,##0.00\xa0\xa4",en:"\xa4#,##0.00;(\xa4#,##0.00)","en-001":"\xa4#,##0.00;(\xa4#,##0.00)","en-150":"#,##0.00\xa0\xa4","en-AE":"\xa4#,##0.00;(\xa4#,##0.00)","en-AG":"\xa4#,##0.00;(\xa4#,##0.00)","en-AI":"\xa4#,##0.00;(\xa4#,##0.00)","en-AS":"\xa4#,##0.00;(\xa4#,##0.00)","en-AT":"\xa4\xa0#,##0.00","en-AU":"\xa4#,##0.00;(\xa4#,##0.00)","en-BB":"\xa4#,##0.00;(\xa4#,##0.00)","en-BE":"#,##0.00\xa0\xa4","en-BI":"\xa4#,##0.00;(\xa4#,##0.00)","en-BM":"\xa4#,##0.00;(\xa4#,##0.00)","en-BS":"\xa4#,##0.00;(\xa4#,##0.00)","en-BW":"\xa4#,##0.00;(\xa4#,##0.00)","en-BZ":"\xa4#,##0.00;(\xa4#,##0.00)","en-CA":"\xa4#,##0.00;(\xa4#,##0.00)","en-CC":"\xa4#,##0.00;(\xa4#,##0.00)","en-CH":"\xa4\xa0#,##0.00;\xa4-#,##0.00","en-CK":"\xa4#,##0.00;(\xa4#,##0.00)","en-CM":"\xa4#,##0.00;(\xa4#,##0.00)","en-CX":"\xa4#,##0.00;(\xa4#,##0.00)","en-CY":"\xa4#,##0.00;(\xa4#,##0.00)","en-DE":"#,##0.00\xa0\xa4","en-DG":"\xa4#,##0.00;(\xa4#,##0.00)","en-DK":"#,##0.00\xa0\xa4","en-DM":"\xa4#,##0.00;(\xa4#,##0.00)","en-ER":"\xa4#,##0.00;(\xa4#,##0.00)","en-FI":"#,##0.00\xa0\xa4","en-FJ":"\xa4#,##0.00;(\xa4#,##0.00)","en-FK":"\xa4#,##0.00;(\xa4#,##0.00)","en-FM":"\xa4#,##0.00;(\xa4#,##0.00)","en-GB":"\xa4#,##0.00;(\xa4#,##0.00)","en-GD":"\xa4#,##0.00;(\xa4#,##0.00)","en-GG":"\xa4#,##0.00;(\xa4#,##0.00)","en-GH":"\xa4#,##0.00;(\xa4#,##0.00)","en-GI":"\xa4#,##0.00;(\xa4#,##0.00)","en-GM":"\xa4#,##0.00;(\xa4#,##0.00)","en-GU":"\xa4#,##0.00;(\xa4#,##0.00)","en-GY":"\xa4#,##0.00;(\xa4#,##0.00)","en-HK":"\xa4#,##0.00;(\xa4#,##0.00)","en-IE":"\xa4#,##0.00;(\xa4#,##0.00)","en-IL":"\xa4#,##0.00;(\xa4#,##0.00)","en-IM":"\xa4#,##0.00;(\xa4#,##0.00)","en-IN":"\xa4#,##0.00;(\xa4#,##0.00)","en-IO":"\xa4#,##0.00;(\xa4#,##0.00)","en-JE":"\xa4#,##0.00;(\xa4#,##0.00)","en-JM":"\xa4#,##0.00;(\xa4#,##0.00)","en-KE":"\xa4#,##0.00;(\xa4#,##0.00)","en-KI":"\xa4#,##0.00;(\xa4#,##0.00)","en-KN":"\xa4#,##0.00;(\xa4#,##0.00)","en-KY":"\xa4#,##0.00;(\xa4#,##0.00)","en-LC":"\xa4#,##0.00;(\xa4#,##0.00)","en-LR":"\xa4#,##0.00;(\xa4#,##0.00)","en-LS":"\xa4#,##0.00;(\xa4#,##0.00)","en-MG":"\xa4#,##0.00;(\xa4#,##0.00)","en-MH":"\xa4#,##0.00;(\xa4#,##0.00)","en-MO":"\xa4#,##0.00;(\xa4#,##0.00)","en-MP":"\xa4#,##0.00;(\xa4#,##0.00)","en-MS":"\xa4#,##0.00;(\xa4#,##0.00)","en-MT":"\xa4#,##0.00;(\xa4#,##0.00)","en-MU":"\xa4#,##0.00;(\xa4#,##0.00)","en-MV":"\xa4\xa0#,##0.00","en-MW":"\xa4#,##0.00;(\xa4#,##0.00)","en-MY":"\xa4#,##0.00;(\xa4#,##0.00)","en-NA":"\xa4#,##0.00;(\xa4#,##0.00)","en-NF":"\xa4#,##0.00;(\xa4#,##0.00)","en-NG":"\xa4#,##0.00;(\xa4#,##0.00)","en-NL":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","en-NR":"\xa4#,##0.00;(\xa4#,##0.00)","en-NU":"\xa4#,##0.00;(\xa4#,##0.00)","en-NZ":"\xa4#,##0.00;(\xa4#,##0.00)","en-PG":"\xa4#,##0.00;(\xa4#,##0.00)","en-PH":"\xa4#,##0.00;(\xa4#,##0.00)","en-PK":"\xa4#,##0.00;(\xa4#,##0.00)","en-PN":"\xa4#,##0.00;(\xa4#,##0.00)","en-PR":"\xa4#,##0.00;(\xa4#,##0.00)","en-PW":"\xa4#,##0.00;(\xa4#,##0.00)","en-RW":"\xa4#,##0.00;(\xa4#,##0.00)","en-SB":"\xa4#,##0.00;(\xa4#,##0.00)","en-SC":"\xa4#,##0.00;(\xa4#,##0.00)","en-SD":"\xa4#,##0.00;(\xa4#,##0.00)","en-SE":"#,##0.00\xa0\xa4","en-SG":"\xa4#,##0.00;(\xa4#,##0.00)","en-SH":"\xa4#,##0.00;(\xa4#,##0.00)","en-SI":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","en-SL":"\xa4#,##0.00;(\xa4#,##0.00)","en-SS":"\xa4#,##0.00;(\xa4#,##0.00)","en-SX":"\xa4#,##0.00;(\xa4#,##0.00)","en-SZ":"\xa4#,##0.00;(\xa4#,##0.00)","en-TC":"\xa4#,##0.00;(\xa4#,##0.00)","en-TK":"\xa4#,##0.00;(\xa4#,##0.00)","en-TO":"\xa4#,##0.00;(\xa4#,##0.00)","en-TT":"\xa4#,##0.00;(\xa4#,##0.00)","en-TV":"\xa4#,##0.00;(\xa4#,##0.00)","en-TZ":"\xa4#,##0.00;(\xa4#,##0.00)","en-UG":"\xa4#,##0.00;(\xa4#,##0.00)","en-UM":"\xa4#,##0.00;(\xa4#,##0.00)","en-VC":"\xa4#,##0.00;(\xa4#,##0.00)","en-VG":"\xa4#,##0.00;(\xa4#,##0.00)","en-VI":"\xa4#,##0.00;(\xa4#,##0.00)","en-VU":"\xa4#,##0.00;(\xa4#,##0.00)","en-WS":"\xa4#,##0.00;(\xa4#,##0.00)","en-ZA":"\xa4#,##0.00;(\xa4#,##0.00)","en-ZM":"\xa4#,##0.00;(\xa4#,##0.00)","en-ZW":"\xa4#,##0.00;(\xa4#,##0.00)",eo:"\xa4\xa0#,##0.00",es:"#,##0.00\xa0\xa4","es-419":"\xa4#,##0.00","es-AR":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","es-BO":"\xa4#,##0.00","es-BR":"\xa4#,##0.00","es-BZ":"\xa4#,##0.00","es-CL":"\xa4#,##0.00","es-CO":"\xa4#,##0.00","es-CR":"\xa4#,##0.00","es-CU":"\xa4#,##0.00","es-DO":"\xa4#,##0.00;(\xa4#,##0.00)","es-EA":"#,##0.00\xa0\xa4","es-EC":"\xa4#,##0.00","es-GQ":"#,##0.00\xa0\xa4","es-GT":"\xa4#,##0.00","es-HN":"\xa4#,##0.00","es-IC":"#,##0.00\xa0\xa4","es-MX":"\xa4#,##0.00","es-NI":"\xa4#,##0.00","es-PA":"\xa4#,##0.00","es-PE":"\xa4#,##0.00","es-PH":"#,##0.00\xa0\xa4","es-PR":"\xa4#,##0.00","es-PY":"\xa4#,##0.00","es-SV":"\xa4#,##0.00","es-US":"\xa4#,##0.00","es-UY":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","es-VE":"\xa4#,##0.00",et:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",eu:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",ewo:"#,##0.00\xa0\xa4",fa:"\u200e\xa4\xa0#,##0.00;\u200e(\xa4\xa0#,##0.00)","fa-AF":"\xa4\xa0#,##0.00;\u200e(\xa4\xa0#,##0.00)",ff:"#,##0.00\xa0\xa4","ff-Adlm":"\xa4\xa0#,##0.00","ff-Adlm-BF":"\xa4\xa0#,##0.00","ff-Adlm-CM":"\xa4\xa0#,##0.00","ff-Adlm-GH":"\xa4\xa0#,##0.00","ff-Adlm-GM":"\xa4\xa0#,##0.00","ff-Adlm-GW":"\xa4\xa0#,##0.00","ff-Adlm-LR":"\xa4\xa0#,##0.00","ff-Adlm-MR":"\xa4\xa0#,##0.00","ff-Adlm-NE":"\xa4\xa0#,##0.00","ff-Adlm-NG":"\xa4\xa0#,##0.00","ff-Adlm-SL":"\xa4\xa0#,##0.00","ff-Adlm-SN":"\xa4\xa0#,##0.00","ff-Latn":"#,##0.00\xa0\xa4","ff-Latn-BF":"#,##0.00\xa0\xa4","ff-Latn-CM":"#,##0.00\xa0\xa4","ff-Latn-GH":"#,##0.00\xa0\xa4","ff-Latn-GM":"#,##0.00\xa0\xa4","ff-Latn-GN":"#,##0.00\xa0\xa4","ff-Latn-GW":"#,##0.00\xa0\xa4","ff-Latn-LR":"#,##0.00\xa0\xa4","ff-Latn-MR":"#,##0.00\xa0\xa4","ff-Latn-NE":"#,##0.00\xa0\xa4","ff-Latn-NG":"#,##0.00\xa0\xa4","ff-Latn-SL":"#,##0.00\xa0\xa4",fi:"#,##0.00\xa0\xa4",fil:"\xa4#,##0.00;(\xa4#,##0.00)",fo:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fo-DK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",fr:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BE":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BI":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BJ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-BL":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CD":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CG":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CH":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CI":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-CM":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-DJ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-DZ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GN":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GP":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-GQ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-HT":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-KM":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-LU":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MC":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MG":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-ML":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MQ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MR":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-MU":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-NC":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-NE":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-PF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-PM":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-RE":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-RW":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-SC":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-SN":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-SY":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-TD":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-TG":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-TN":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-VU":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-WF":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","fr-YT":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",fur:"\xa4\xa0#,##0.00",fy:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",ga:"\xa4#,##0.00;(\xa4#,##0.00)","ga-GB":"\xa4#,##0.00;(\xa4#,##0.00)",gd:"\xa4#,##0.00;(\xa4#,##0.00)",gl:"#,##0.00\xa0\xa4",gsw:"#,##0.00\xa0\xa4","gsw-FR":"#,##0.00\xa0\xa4","gsw-LI":"#,##0.00\xa0\xa4",gu:"\xa4#,##,##0.00;(\xa4#,##,##0.00)",guz:"\xa4#,##0.00;(\xa4#,##0.00)",gv:"\xa4#,##0.00",ha:"\xa4\xa0#,##0.00","ha-GH":"\xa4\xa0#,##0.00","ha-NE":"\xa4\xa0#,##0.00",haw:"\xa4#,##0.00;(\xa4#,##0.00)",he:"#,##0.00\xa0\xa4",hi:"\xa4#,##,##0.00","hi-Latn":"\xa4#,##,##0.00",hr:"#,##0.00\xa0\xa4","hr-BA":"#,##0.00\xa0\xa4",hsb:"#,##0.00\xa0\xa4",hu:"#,##0.00\xa0\xa4",hy:"#,##0.00\xa0\xa4",ia:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",id:"\xa4#,##0.00",ig:"\xa4#,##0.00;(\xa4#,##0.00)",ii:"\xa4\xa0#,##0.00",is:"#,##0.00\xa0\xa4",it:"#,##0.00\xa0\xa4","it-CH":"#,##0.00\xa0\xa4","it-SM":"#,##0.00\xa0\xa4","it-VA":"#,##0.00\xa0\xa4",ja:"\xa4#,##0.00;(\xa4#,##0.00)",jgo:"\xa4\xa0#,##0.00",jmc:"\xa4#,##0.00",jv:"\xa4\xa0#,##0.00",ka:"#,##0.00\xa0\xa4",kab:"#,##0.00\xa4",kam:"\xa4#,##0.00;(\xa4#,##0.00)",kde:"\xa4#,##0.00;(\xa4#,##0.00)",kea:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",kgp:"\xa4\xa0#,##0.00",khq:"#,##0.00\xa4",ki:"\xa4#,##0.00;(\xa4#,##0.00)",kk:"#,##0.00\xa0\xa4",kkj:"\xa4\xa0#,##0.00",kl:"\xa4#,##0.00;\xa4-#,##0.00",kln:"\xa4#,##0.00;(\xa4#,##0.00)",km:"#,##0.00\xa4;(#,##0.00\xa4)",kn:"\xa4#,##0.00;(\xa4#,##0.00)",ko:"\xa4#,##0.00;(\xa4#,##0.00)","ko-KP":"\xa4#,##0.00;(\xa4#,##0.00)",kok:"\xa4#,##0.00;(\xa4#,##0.00)",ks:"\xa4#,##0.00","ks-Arab":"\xa4#,##0.00","ks-Deva":"\xa4\xa0#,##0.00",ksb:"#,##0.00\xa4",ksf:"#,##0.00\xa0\xa4",ksh:"#,##0.00\xa0\xa4",ku:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",kw:"\xa4#,##0.00",ky:"#,##0.00\xa0\xa4",lag:"\xa4\xa0#,##0.00",lb:"#,##0.00\xa0\xa4",lg:"#,##0.00\xa4",lkt:"\xa4\xa0#,##0.00",ln:"#,##0.00\xa0\xa4","ln-AO":"#,##0.00\xa0\xa4","ln-CF":"#,##0.00\xa0\xa4","ln-CG":"#,##0.00\xa0\xa4",lo:"\xa4#,##0.00;\xa4-#,##0.00",lrc:"\xa4\xa0#,##0.00","lrc-IQ":"\xa4\xa0#,##0.00",lt:"#,##0.00\xa0\xa4",lu:"#,##0.00\xa4",luo:"#,##0.00\xa4",luy:"\xa4#,##0.00;\xa4-\xa0#,##0.00",lv:"#,##0.00\xa0\xa4",mai:"\xa4\xa0#,##0.00",mas:"\xa4#,##0.00;(\xa4#,##0.00)","mas-TZ":"\xa4#,##0.00;(\xa4#,##0.00)",mer:"\xa4#,##0.00;(\xa4#,##0.00)",mfe:"\xa4\xa0#,##0.00",mg:"\xa4#,##0.00",mgh:"\xa4\xa0#,##0.00",mgo:"\xa4\xa0#,##0.00",mi:"\xa4\xa0#,##0.00",mk:"#,##0.00\xa0\xa4",ml:"\xa4#,##0.00;(\xa4#,##0.00)",mn:"\xa4\xa0#,##0.00",mni:"\xa4\xa0#,##0.00","mni-Beng":"\xa4\xa0#,##0.00",mr:"\xa4#,##0.00;(\xa4#,##0.00)",ms:"\xa4#,##0.00;(\xa4#,##0.00)","ms-BN":"\xa4#,##0.00;(\xa4#,##0.00)","ms-ID":"\xa4#,##0.00","ms-SG":"\xa4#,##0.00;(\xa4#,##0.00)",mt:"\xa4#,##0.00",mua:"\xa4#,##0.00;(\xa4#,##0.00)",my:"\xa4\xa0#,##0.00",mzn:"\xa4\xa0#,##0.00",naq:"\xa4#,##0.00",nb:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nb-SJ":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",nd:"\xa4#,##0.00;(\xa4#,##0.00)",nds:"\xa4\xa0#,##0.00","nds-NL":"\xa4\xa0#,##0.00",ne:"\xa4\xa0#,##,##0.00","ne-IN":"\xa4\xa0#,##,##0.00",nl:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-AW":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-BE":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-BQ":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-CW":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-SR":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)","nl-SX":"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",nmg:"#,##0.00\xa0\xa4",nn:"#,##0.00\xa0\xa4",nnh:"\xa4\xa0#,##0.00",no:"\xa4\xa0#,##0.00;(\xa4\xa0#,##0.00)",nus:"\xa4#,##0.00;(\xa4#,##0.00)",nyn:"\xa4#,##0.00",om:"\xa4#,##0.00","om-KE":"\xa4#,##0.00",or:"\xa4#,##0.00;(\xa4#,##0.00)",os:"\xa4\xa0#,##0.00","os-RU":"\xa4\xa0#,##0.00",pa:"\xa4\xa0#,##0.00","pa-Arab":"\xa4\xa0#,##0.00","pa-Guru":"\xa4\xa0#,##0.00",pcm:"\xa4#,##0.00",pl:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",ps:"\xa4#,##0.00;(\xa4#,##0.00)","ps-PK":"\xa4#,##0.00;(\xa4#,##0.00)",pt:"\xa4\xa0#,##0.00","pt-AO":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-CH":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-CV":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-GQ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-GW":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-LU":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-MO":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-MZ":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-PT":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-ST":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","pt-TL":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",qu:"\xa4\xa0#,##0.00","qu-BO":"\xa4\xa0#,##0.00","qu-EC":"\xa4\xa0#,##0.00",rm:"#,##0.00\xa0\xa4",rn:"#,##0.00\xa4",ro:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","ro-MD":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",rof:"\xa4#,##0.00",ru:"#,##0.00\xa0\xa4","ru-BY":"#,##0.00\xa0\xa4","ru-KG":"#,##0.00\xa0\xa4","ru-KZ":"#,##0.00\xa0\xa4","ru-MD":"#,##0.00\xa0\xa4","ru-UA":"#,##0.00\xa0\xa4",rw:"\xa4\xa0#,##0.00",rwk:"#,##0.00\xa4",sa:"\xa4\xa0#,##0.00",sah:"#,##0.00\xa0\xa4",saq:"\xa4#,##0.00;(\xa4#,##0.00)",sat:"\xa4\xa0#,##0.00","sat-Olck":"\xa4\xa0#,##0.00",sbp:"#,##0.00\xa4",sc:"#,##0.00\xa0\xa4",sd:"\xa4\xa0#,##0.00","sd-Arab":"\xa4\xa0#,##0.00","sd-Deva":"\xa4\xa0#,##0.00",se:"#,##0.00\xa0\xa4","se-FI":"#,##0.00\xa0\xa4","se-SE":"#,##0.00\xa0\xa4",seh:"#,##0.00\xa4",ses:"#,##0.00\xa4",sg:"\xa4#,##0.00;\xa4-#,##0.00",shi:"#,##0.00\xa4","shi-Latn":"#,##0.00\xa4","shi-Tfng":"#,##0.00\xa4",si:"\xa4#,##0.00;(\xa4#,##0.00)",sk:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",sl:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",smn:"#,##0.00\xa0\xa4",sn:"\xa4#,##0.00;(\xa4#,##0.00)",so:"\xa4#,##0.00;(\xa4#,##0.00)","so-DJ":"\xa4#,##0.00;(\xa4#,##0.00)","so-ET":"\xa4#,##0.00;(\xa4#,##0.00)","so-KE":"\xa4#,##0.00;(\xa4#,##0.00)",sq:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sq-MK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sq-XK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",sr:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Cyrl":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Cyrl-BA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Cyrl-ME":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Cyrl-XK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Latn":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Latn-BA":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Latn-ME":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)","sr-Latn-XK":"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",su:"\xa4#,##0.00","su-Latn":"\xa4#,##0.00",sv:"#,##0.00\xa0\xa4","sv-AX":"#,##0.00\xa0\xa4","sv-FI":"#,##0.00\xa0\xa4",sw:"\xa4\xa0#,##0.00","sw-CD":"\xa4\xa0#,##0.00","sw-KE":"\xa4\xa0#,##0.00","sw-UG":"\xa4\xa0#,##0.00",ta:"\xa4#,##0.00;(\xa4#,##0.00)","ta-LK":"\xa4#,##0.00;(\xa4#,##0.00)","ta-MY":"\xa4#,##0.00;(\xa4#,##0.00)","ta-SG":"\xa4#,##0.00;(\xa4#,##0.00)",te:"\xa4#,##0.00;(\xa4#,##0.00)",teo:"\xa4#,##0.00;(\xa4#,##0.00)","teo-KE":"\xa4#,##0.00;(\xa4#,##0.00)",tg:"#,##0.00\xa0\xa4",th:"\xa4#,##0.00;(\xa4#,##0.00)",ti:"\xa4#,##0.00","ti-ER":"\xa4#,##0.00",tk:"#,##0.00\xa0\xa4",to:"\xa4\xa0#,##0.00",tr:"\xa4#,##0.00;(\xa4#,##0.00)","tr-CY":"\xa4#,##0.00;(\xa4#,##0.00)",tt:"#,##0.00\xa0\xa4",twq:"#,##0.00\xa4",tzm:"#,##0.00\xa0\xa4",ug:"\xa4#,##0.00;(\xa4#,##0.00)",uk:"#,##0.00\xa0\xa4",und:"\xa4\xa0#,##0.00",ur:"\xa4#,##0.00;(\xa4#,##0.00)","ur-IN":"\xa4#,##0.00;(\xa4#,##0.00)",uz:"#,##0.00\xa0\xa4","uz-Arab":"\xa4\xa0#,##0.00","uz-Cyrl":"#,##0.00\xa0\xa4","uz-Latn":"#,##0.00\xa0\xa4",vai:"\xa4#,##0.00;(\xa4#,##0.00)","vai-Latn":"\xa4#,##0.00;(\xa4#,##0.00)","vai-Vaii":"\xa4#,##0.00;(\xa4#,##0.00)",vi:"#,##0.00\xa0\xa4",vun:"\xa4#,##0.00",wae:"\xa4\xa0#,##0.00",wo:"\xa4\xa0#,##0.00",xh:"\xa4#,##0.00",xog:"#,##0.00\xa0\xa4",yav:"#,##0.00\xa0\xa4;(#,##0.00\xa0\xa4)",yi:"\xa4\xa0#,##0.00",yo:"\xa4#,##0.00;(\xa4#,##0.00)","yo-BJ":"\xa4#,##0.00;(\xa4#,##0.00)",yrl:"\xa4\xa0#,##0.00","yrl-CO":"\xa4\xa0#,##0.00","yrl-VE":"\xa4\xa0#,##0.00",yue:"\xa4#,##0.00;(\xa4#,##0.00)","yue-Hans":"\xa4#,##0.00;(\xa4#,##0.00)","yue-Hant":"\xa4#,##0.00;(\xa4#,##0.00)",zgh:"#,##0.00\xa4",zh:"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hans":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hans-HK":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hans-MO":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hans-SG":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hant":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hant-HK":"\xa4#,##0.00;(\xa4#,##0.00)","zh-Hant-MO":"\xa4#,##0.00;(\xa4#,##0.00)",zu:"\xa4#,##0.00;(\xa4#,##0.00)"};e.exports=t.default,e.exports.default=t.default},61316:function(e,t){t.enCldr=void 0;
// !!! AUTO-GENERATED FILE, DO NOT EDIT
t.enCldr={main:{en:{identity:{version:{_cldrVersion:"36"}},dates:{calendars:{gregorian:{months:{format:{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},narrow:{1:"J",2:"F",3:"M",4:"A",5:"M",6:"J",7:"J",8:"A",9:"S",10:"O",11:"N",12:"D"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}},"stand-alone":{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},narrow:{1:"J",2:"F",3:"M",4:"A",5:"M",6:"J",7:"J",8:"A",9:"S",10:"O",11:"N",12:"D"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}}},days:{format:{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}},"stand-alone":{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}}},quarters:{format:{abbreviated:{1:"Q1",2:"Q2",3:"Q3",4:"Q4"},narrow:{1:"1",2:"2",3:"3",4:"4"},wide:{1:"1st quarter",2:"2nd quarter",3:"3rd quarter",4:"4th quarter"}},"stand-alone":{abbreviated:{1:"Q1",2:"Q2",3:"Q3",4:"Q4"},narrow:{1:"1",2:"2",3:"3",4:"4"},wide:{1:"1st quarter",2:"2nd quarter",3:"3rd quarter",4:"4th quarter"}}},dayPeriods:{format:{abbreviated:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"in the morning",afternoon1:"in the afternoon",evening1:"in the evening",night1:"at night"},narrow:{midnight:"mi",am:"a","am-alt-variant":"am",noon:"n",pm:"p","pm-alt-variant":"pm",morning1:"in the morning",afternoon1:"in the afternoon",evening1:"in the evening",night1:"at night"},wide:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"in the morning",afternoon1:"in the afternoon",evening1:"in the evening",night1:"at night"}},"stand-alone":{abbreviated:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"morning",afternoon1:"afternoon",evening1:"evening",night1:"night"},narrow:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"morning",afternoon1:"afternoon",evening1:"evening",night1:"night"},wide:{midnight:"midnight",am:"AM","am-alt-variant":"am",noon:"noon",pm:"PM","pm-alt-variant":"pm",morning1:"morning",afternoon1:"afternoon",evening1:"evening",night1:"night"}}},eras:{eraNames:{0:"Before Christ",1:"Anno Domini","0-alt-variant":"Before Common Era","1-alt-variant":"Common Era"},eraAbbr:{0:"BC",1:"AD","0-alt-variant":"BCE","1-alt-variant":"CE"},eraNarrow:{0:"B",1:"A","0-alt-variant":"BCE","1-alt-variant":"CE"}},dateFormats:{full:"EEEE, MMMM d, y",long:"MMMM d, y",medium:"MMM d, y",short:"M/d/yy"},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{Bh:"h B",Bhm:"h:mm B",Bhms:"h:mm:ss B",d:"d",E:"ccc",EBhm:"E h:mm B",EBhms:"E h:mm:ss B",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",hmsv:"h:mm:ss a v",Hmsv:"HH:mm:ss v",hmv:"h:mm a v",Hmv:"HH:mm v",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d","MMMMW-count-one":"'week' W 'of' MMMM","MMMMW-count-other":"'week' W 'of' MMMM",ms:"mm:ss",y:"y",yM:"M/y",yMd:"M/d/y",yMEd:"E, M/d/y",yMMM:"MMM y",yMMMd:"MMM d, y",yMMMEd:"E, MMM d, y",yMMMM:"MMMM y",yQQQ:"QQQ y",yQQQQ:"QQQQ y","yw-count-one":"'week' w 'of' Y","yw-count-other":"'week' w 'of' Y"}}}}},numbers:{defaultNumberingSystem:"latn",otherNumberingSystems:{native:"latn"},minimumGroupingDigits:"1","symbols-numberSystem-latn":{decimal:".",group:",",list:";",percentSign:"%",plusSign:"+",minusSign:"-",exponential:"E",superscriptingExponent:"\xd7",perMille:"\u2030",infinity:"\u221e",nan:"NaN",timeSeparator:":"},"decimalFormats-numberSystem-latn":{standard:"#,##0.###"},"scientificFormats-numberSystem-latn":{standard:"#E0"},"percentFormats-numberSystem-latn":{standard:"#,##0%"},"currencyFormats-numberSystem-latn":{currencySpacing:{beforeCurrency:{currencyMatch:"[:^S:]",surroundingMatch:"[:digit:]",insertBetween:"\xa0"},afterCurrency:{currencyMatch:"[:^S:]",surroundingMatch:"[:digit:]",insertBetween:"\xa0"}},standard:"\xa4#,##0.00",accounting:"\xa4#,##0.00;(\xa4#,##0.00)"},currencies:{ADP:{symbol:"ADP"},AED:{symbol:"AED"},AFA:{symbol:"AFA"},AFN:{symbol:"AFN"},ALK:{symbol:"ALK"},ALL:{symbol:"ALL"},AMD:{symbol:"AMD"},ANG:{symbol:"ANG"},AOA:{symbol:"AOA","symbol-alt-narrow":"Kz"},AOK:{symbol:"AOK"},AON:{symbol:"AON"},AOR:{symbol:"AOR"},ARA:{symbol:"ARA"},ARL:{symbol:"ARL"},ARM:{symbol:"ARM"},ARP:{symbol:"ARP"},ARS:{symbol:"ARS","symbol-alt-narrow":"$"},ATS:{symbol:"ATS"},AUD:{symbol:"A$","symbol-alt-narrow":"$"},AWG:{symbol:"AWG"},AZM:{symbol:"AZM"},AZN:{symbol:"AZN"},BAD:{symbol:"BAD"},BAM:{symbol:"BAM","symbol-alt-narrow":"KM"},BAN:{symbol:"BAN"},BBD:{symbol:"BBD","symbol-alt-narrow":"$"},BDT:{symbol:"BDT","symbol-alt-narrow":"\u09f3"},BEC:{symbol:"BEC"},BEF:{symbol:"BEF"},BEL:{symbol:"BEL"},BGL:{symbol:"BGL"},BGM:{symbol:"BGM"},BGN:{symbol:"BGN"},BGO:{symbol:"BGO"},BHD:{symbol:"BHD"},BIF:{symbol:"BIF"},BMD:{symbol:"BMD","symbol-alt-narrow":"$"},BND:{symbol:"BND","symbol-alt-narrow":"$"},BOB:{symbol:"BOB","symbol-alt-narrow":"Bs"},BOL:{symbol:"BOL"},BOP:{symbol:"BOP"},BOV:{symbol:"BOV"},BRB:{symbol:"BRB"},BRC:{symbol:"BRC"},BRE:{symbol:"BRE"},BRL:{symbol:"R$","symbol-alt-narrow":"R$"},BRN:{symbol:"BRN"},BRR:{symbol:"BRR"},BRZ:{symbol:"BRZ"},BSD:{symbol:"BSD","symbol-alt-narrow":"$"},BTN:{symbol:"BTN"},BUK:{symbol:"BUK"},BWP:{symbol:"BWP","symbol-alt-narrow":"P"},BYB:{symbol:"BYB"},BYN:{symbol:"BYN","symbol-alt-narrow":"\u0440."},BYR:{symbol:"BYR"},BZD:{symbol:"BZD","symbol-alt-narrow":"$"},CAD:{symbol:"CA$","symbol-alt-narrow":"$"},CDF:{symbol:"CDF"},CHE:{symbol:"CHE"},CHF:{symbol:"CHF"},CHW:{symbol:"CHW"},CLE:{symbol:"CLE"},CLF:{symbol:"CLF"},CLP:{symbol:"CLP","symbol-alt-narrow":"$"},CNH:{symbol:"CNH"},CNX:{symbol:"CNX"},CNY:{symbol:"CN\xa5","symbol-alt-narrow":"\xa5"},COP:{symbol:"COP","symbol-alt-narrow":"$"},COU:{symbol:"COU"},CRC:{symbol:"CRC","symbol-alt-narrow":"\u20a1"},CSD:{symbol:"CSD"},CSK:{symbol:"CSK"},CUC:{symbol:"CUC","symbol-alt-narrow":"$"},CUP:{symbol:"CUP","symbol-alt-narrow":"$"},CVE:{symbol:"CVE"},CYP:{symbol:"CYP"},CZK:{symbol:"CZK","symbol-alt-narrow":"K\u010d"},DDM:{symbol:"DDM"},DEM:{symbol:"DEM"},DJF:{symbol:"DJF"},DKK:{symbol:"DKK","symbol-alt-narrow":"kr"},DOP:{symbol:"DOP","symbol-alt-narrow":"$"},DZD:{symbol:"DZD"},ECS:{symbol:"ECS"},ECV:{symbol:"ECV"},EEK:{symbol:"EEK"},EGP:{symbol:"EGP","symbol-alt-narrow":"E\xa3"},ERN:{symbol:"ERN"},ESA:{symbol:"ESA"},ESB:{symbol:"ESB"},ESP:{symbol:"ESP","symbol-alt-narrow":"\u20a7"},ETB:{symbol:"ETB"},EUR:{symbol:"\u20ac","symbol-alt-narrow":"\u20ac"},FIM:{symbol:"FIM"},FJD:{symbol:"FJD","symbol-alt-narrow":"$"},FKP:{symbol:"FKP","symbol-alt-narrow":"\xa3"},FRF:{symbol:"FRF"},GBP:{symbol:"\xa3","symbol-alt-narrow":"\xa3"},GEK:{symbol:"GEK"},GEL:{symbol:"GEL","symbol-alt-narrow":"\u20be"},GHC:{symbol:"GHC"},GHS:{symbol:"GHS"},GIP:{symbol:"GIP","symbol-alt-narrow":"\xa3"},GMD:{symbol:"GMD"},GNF:{symbol:"GNF","symbol-alt-narrow":"FG"},GNS:{symbol:"GNS"},GQE:{symbol:"GQE"},GRD:{symbol:"GRD"},GTQ:{symbol:"GTQ","symbol-alt-narrow":"Q"},GWE:{symbol:"GWE"},GWP:{symbol:"GWP"},GYD:{symbol:"GYD","symbol-alt-narrow":"$"},HKD:{symbol:"HK$","symbol-alt-narrow":"$"},HNL:{symbol:"HNL","symbol-alt-narrow":"L"},HRD:{symbol:"HRD"},HRK:{symbol:"HRK","symbol-alt-narrow":"kn"},HTG:{symbol:"HTG"},HUF:{symbol:"HUF","symbol-alt-narrow":"Ft"},IDR:{symbol:"IDR","symbol-alt-narrow":"Rp"},IEP:{symbol:"IEP"},ILP:{symbol:"ILP"},ILR:{symbol:"ILR"},ILS:{symbol:"\u20aa","symbol-alt-narrow":"\u20aa"},INR:{symbol:"\u20b9","symbol-alt-narrow":"\u20b9"},IQD:{symbol:"IQD"},IRR:{symbol:"IRR"},ISJ:{symbol:"ISJ"},ISK:{symbol:"ISK","symbol-alt-narrow":"kr"},ITL:{symbol:"ITL"},JMD:{symbol:"JMD","symbol-alt-narrow":"$"},JOD:{symbol:"JOD"},JPY:{symbol:"\xa5","symbol-alt-narrow":"\xa5"},KES:{symbol:"KES"},KGS:{symbol:"KGS"},KHR:{symbol:"KHR","symbol-alt-narrow":"\u17db"},KMF:{symbol:"KMF","symbol-alt-narrow":"CF"},KPW:{symbol:"KPW","symbol-alt-narrow":"\u20a9"},KRH:{symbol:"KRH"},KRO:{symbol:"KRO"},KRW:{symbol:"\u20a9","symbol-alt-narrow":"\u20a9"},KWD:{symbol:"KWD"},KYD:{symbol:"KYD","symbol-alt-narrow":"$"},KZT:{symbol:"KZT","symbol-alt-narrow":"\u20b8"},LAK:{symbol:"LAK","symbol-alt-narrow":"\u20ad"},LBP:{symbol:"LBP","symbol-alt-narrow":"L\xa3"},LKR:{symbol:"LKR","symbol-alt-narrow":"Rs"},LRD:{symbol:"LRD","symbol-alt-narrow":"$"},LSL:{symbol:"LSL"},LTL:{symbol:"LTL","symbol-alt-narrow":"Lt"},LTT:{symbol:"LTT"},LUC:{symbol:"LUC"},LUF:{symbol:"LUF"},LUL:{symbol:"LUL"},LVL:{symbol:"LVL","symbol-alt-narrow":"Ls"},LVR:{symbol:"LVR"},LYD:{symbol:"LYD"},MAD:{symbol:"MAD"},MAF:{symbol:"MAF"},MCF:{symbol:"MCF"},MDC:{symbol:"MDC"},MDL:{symbol:"MDL"},MGA:{symbol:"MGA","symbol-alt-narrow":"Ar"},MGF:{symbol:"MGF"},MKD:{symbol:"MKD"},MKN:{symbol:"MKN"},MLF:{symbol:"MLF"},MMK:{symbol:"MMK","symbol-alt-narrow":"K"},MNT:{symbol:"MNT","symbol-alt-narrow":"\u20ae"},MOP:{symbol:"MOP"},MRO:{symbol:"MRO"},MRU:{symbol:"MRU"},MTL:{symbol:"MTL"},MTP:{symbol:"MTP"},MUR:{symbol:"MUR","symbol-alt-narrow":"Rs"},MVP:{symbol:"MVP"},MVR:{symbol:"MVR"},MWK:{symbol:"MWK"},MXN:{symbol:"MX$","symbol-alt-narrow":"$"},MXP:{symbol:"MXP"},MXV:{symbol:"MXV"},MYR:{symbol:"MYR","symbol-alt-narrow":"RM"},MZE:{symbol:"MZE"},MZM:{symbol:"MZM"},MZN:{symbol:"MZN"},NAD:{symbol:"NAD","symbol-alt-narrow":"$"},NGN:{symbol:"NGN","symbol-alt-narrow":"\u20a6"},NIC:{symbol:"NIC"},NIO:{symbol:"NIO","symbol-alt-narrow":"C$"},NLG:{symbol:"NLG"},NOK:{symbol:"NOK","symbol-alt-narrow":"kr"},NPR:{symbol:"NPR","symbol-alt-narrow":"Rs"},NZD:{symbol:"NZ$","symbol-alt-narrow":"$"},OMR:{symbol:"OMR"},PAB:{symbol:"PAB"},PEI:{symbol:"PEI"},PEN:{symbol:"PEN"},PES:{symbol:"PES"},PGK:{symbol:"PGK"},PHP:{symbol:"PHP","symbol-alt-narrow":"\u20b1"},PKR:{symbol:"PKR","symbol-alt-narrow":"Rs"},PLN:{symbol:"PLN","symbol-alt-narrow":"z\u0142"},PLZ:{symbol:"PLZ"},PTE:{symbol:"PTE"},PYG:{symbol:"PYG","symbol-alt-narrow":"\u20b2"},QAR:{symbol:"QAR"},RHD:{symbol:"RHD"},ROL:{symbol:"ROL"},RON:{symbol:"RON","symbol-alt-narrow":"lei"},RSD:{symbol:"RSD"},RUB:{symbol:"RUB","symbol-alt-narrow":"\u20bd"},RUR:{symbol:"RUR","symbol-alt-narrow":"\u0440."},RWF:{symbol:"RWF","symbol-alt-narrow":"RF"},SAR:{symbol:"SAR"},SBD:{symbol:"SBD","symbol-alt-narrow":"$"},SCR:{symbol:"SCR"},SDD:{symbol:"SDD"},SDG:{symbol:"SDG"},SDP:{symbol:"SDP"},SEK:{symbol:"SEK","symbol-alt-narrow":"kr"},SGD:{symbol:"SGD","symbol-alt-narrow":"$"},SHP:{symbol:"SHP","symbol-alt-narrow":"\xa3"},SIT:{symbol:"SIT"},SKK:{symbol:"SKK"},SLL:{symbol:"SLL"},SOS:{symbol:"SOS"},SRD:{symbol:"SRD","symbol-alt-narrow":"$"},SRG:{symbol:"SRG"},SSP:{symbol:"SSP","symbol-alt-narrow":"\xa3"},STD:{symbol:"STD"},STN:{symbol:"STN","symbol-alt-narrow":"Db"},SUR:{symbol:"SUR"},SVC:{symbol:"SVC"},SYP:{symbol:"SYP","symbol-alt-narrow":"\xa3"},SZL:{symbol:"SZL"},THB:{symbol:"THB","symbol-alt-narrow":"\u0e3f"},TJR:{symbol:"TJR"},TJS:{symbol:"TJS"},TMM:{symbol:"TMM"},TMT:{symbol:"TMT"},TND:{symbol:"TND"},TOP:{symbol:"TOP","symbol-alt-narrow":"T$"},TPE:{symbol:"TPE"},TRL:{symbol:"TRL"},TRY:{symbol:"TRY","symbol-alt-narrow":"\u20ba"},TTD:{symbol:"TTD","symbol-alt-narrow":"$"},TWD:{symbol:"NT$","symbol-alt-narrow":"$"},TZS:{symbol:"TZS"},UAH:{symbol:"UAH","symbol-alt-narrow":"\u20b4"},UAK:{symbol:"UAK"},UGS:{symbol:"UGS"},UGX:{symbol:"UGX"},USD:{symbol:"$","symbol-alt-narrow":"$"},USN:{symbol:"USN"},USS:{symbol:"USS"},UYI:{symbol:"UYI"},UYP:{symbol:"UYP"},UYU:{symbol:"UYU","symbol-alt-narrow":"$"},UYW:{symbol:"UYW"},UZS:{symbol:"UZS"},VEB:{symbol:"VEB"},VEF:{symbol:"VEF","symbol-alt-narrow":"Bs"},VES:{symbol:"VES"},VND:{symbol:"\u20ab","symbol-alt-narrow":"\u20ab"},VNN:{symbol:"VNN"},VUV:{symbol:"VUV"},WST:{symbol:"WST"},XAF:{symbol:"FCFA"},XAG:{symbol:"XAG"},XAU:{symbol:"XAU"},XBA:{symbol:"XBA"},XBB:{symbol:"XBB"},XBC:{symbol:"XBC"},XBD:{symbol:"XBD"},XCD:{symbol:"EC$","symbol-alt-narrow":"$"},XDR:{symbol:"XDR"},XEU:{symbol:"XEU"},XFO:{symbol:"XFO"},XFU:{symbol:"XFU"},XOF:{symbol:"CFA"},XPD:{symbol:"XPD"},XPF:{symbol:"CFPF"},XPT:{symbol:"XPT"},XRE:{symbol:"XRE"},XSU:{symbol:"XSU"},XTS:{symbol:"XTS"},XUA:{symbol:"XUA"},XXX:{symbol:"\xa4"},YDD:{symbol:"YDD"},YER:{symbol:"YER"},YUD:{symbol:"YUD"},YUM:{symbol:"YUM"},YUN:{symbol:"YUN"},YUR:{symbol:"YUR"},ZAL:{symbol:"ZAL"},ZAR:{symbol:"ZAR","symbol-alt-narrow":"R"},ZMK:{symbol:"ZMK"},ZMW:{symbol:"ZMW","symbol-alt-narrow":"ZK"},ZRN:{symbol:"ZRN"},ZRZ:{symbol:"ZRZ"},ZWD:{symbol:"ZWD"},ZWL:{symbol:"ZWL"},ZWR:{symbol:"ZWR"}}}}}}},29908:function(e,t){t.default=void 0;
// !!! AUTO-GENERATED FILE, DO NOT EDIT
t.default={"af-NA":1,agq:1,ak:1,ar:6,"ar-EH":1,"ar-ER":1,"ar-KM":1,"ar-LB":1,"ar-MA":1,"ar-MR":1,"ar-PS":1,"ar-SO":1,"ar-SS":1,"ar-TD":1,"ar-TN":1,asa:1,ast:1,az:1,"az-Cyrl":1,bas:1,be:1,bem:1,bez:1,bg:1,bm:1,br:1,bs:1,"bs-Cyrl":1,ca:1,ce:1,cgg:1,ckb:6,cs:1,cy:1,da:1,de:1,dje:1,dsb:1,dua:1,dyo:1,ee:1,el:1,"en-001":1,"en-AE":6,"en-BI":1,"en-MP":1,"en-MV":5,"en-SD":6,eo:1,es:1,et:1,eu:1,ewo:1,fa:6,ff:1,"ff-Adlm":1,fi:1,fo:1,fr:1,"fr-DJ":6,"fr-DZ":6,"fr-SY":6,fur:1,fy:1,ga:1,gd:1,gl:1,gsw:1,gv:1,ha:1,hr:1,hsb:1,hu:1,hy:1,ia:1,ig:1,is:1,it:1,jgo:1,jmc:1,ka:1,kab:6,kde:1,kea:1,khq:1,kk:1,kkj:1,kl:1,"ko-KP":1,ksb:1,ksf:1,ksh:1,ku:1,kw:1,ky:1,lag:1,lb:1,lg:1,ln:1,lrc:6,lt:1,lu:1,lv:1,"mas-TZ":1,mfe:1,mg:1,mgo:1,mi:1,mk:1,mn:1,ms:1,mua:1,mzn:6,naq:1,nds:1,nl:1,nmg:1,nnh:1,no:1,nus:1,nyn:1,os:1,pcm:1,pl:1,ps:6,"pt-AO":1,"pt-CH":1,"pt-CV":1,"pt-GQ":1,"pt-GW":1,"pt-LU":1,"pt-ST":1,"pt-TL":1,"qu-BO":1,"qu-EC":1,rm:1,rn:1,ro:1,rof:1,ru:1,rw:1,rwk:1,sah:1,sbp:1,sc:1,se:1,ses:1,sg:1,shi:1,"shi-Latn":1,si:1,sk:1,sl:1,smn:1,so:1,"so-DJ":6,sq:1,sr:1,"sr-Latn":1,sv:1,sw:1,"ta-LK":1,"ta-MY":1,teo:1,tg:1,"ti-ER":1,tk:1,to:1,tr:1,tt:1,twq:1,tzm:1,uk:1,uz:1,"uz-Arab":6,"uz-Cyrl":1,vai:1,"vai-Latn":1,vi:1,vun:1,wae:1,wo:1,xog:1,yav:1,yi:1,yo:1,zgh:1};e.exports=t.default,e.exports.default=t.default},85703:function(e,t){t.default=void 0;
// !!! AUTO-GENERATED FILE, DO NOT EDIT
t.default={"en-150":"en-001","en-AG":"en-001","en-AI":"en-001","en-AU":"en-001","en-BB":"en-001","en-BM":"en-001","en-BS":"en-001","en-BW":"en-001","en-BZ":"en-001","en-CC":"en-001","en-CK":"en-001","en-CM":"en-001","en-CX":"en-001","en-CY":"en-001","en-DG":"en-001","en-DM":"en-001","en-ER":"en-001","en-FJ":"en-001","en-FK":"en-001","en-FM":"en-001","en-GB":"en-001","en-GD":"en-001","en-GG":"en-001","en-GH":"en-001","en-GI":"en-001","en-GM":"en-001","en-GY":"en-001","en-HK":"en-001","en-IE":"en-001","en-IL":"en-001","en-IM":"en-001","en-IN":"en-001","en-IO":"en-001","en-JE":"en-001","en-JM":"en-001","en-KE":"en-001","en-KI":"en-001","en-KN":"en-001","en-KY":"en-001","en-LC":"en-001","en-LR":"en-001","en-LS":"en-001","en-MG":"en-001","en-MO":"en-001","en-MS":"en-001","en-MT":"en-001","en-MU":"en-001","en-MV":"en-001","en-MW":"en-001","en-MY":"en-001","en-NA":"en-001","en-NF":"en-001","en-NG":"en-001","en-NR":"en-001","en-NU":"en-001","en-NZ":"en-001","en-PG":"en-001","en-PK":"en-001","en-PN":"en-001","en-PW":"en-001","en-RW":"en-001","en-SB":"en-001","en-SC":"en-001","en-SD":"en-001","en-SG":"en-001","en-SH":"en-001","en-SL":"en-001","en-SS":"en-001","en-SX":"en-001","en-SZ":"en-001","en-TC":"en-001","en-TK":"en-001","en-TO":"en-001","en-TT":"en-001","en-TV":"en-001","en-TZ":"en-001","en-UG":"en-001","en-VC":"en-001","en-VG":"en-001","en-VU":"en-001","en-WS":"en-001","en-ZA":"en-001","en-ZM":"en-001","en-ZW":"en-001","en-AT":"en-150","en-BE":"en-150","en-CH":"en-150","en-DE":"en-150","en-DK":"en-150","en-FI":"en-150","en-NL":"en-150","en-SE":"en-150","en-SI":"en-150","hi-Latn":"en-IN","es-AR":"es-419","es-BO":"es-419","es-BR":"es-419","es-BZ":"es-419","es-CL":"es-419","es-CO":"es-419","es-CR":"es-419","es-CU":"es-419","es-DO":"es-419","es-EC":"es-419","es-GT":"es-419","es-HN":"es-419","es-MX":"es-419","es-NI":"es-419","es-PA":"es-419","es-PE":"es-419","es-PR":"es-419","es-PY":"es-419","es-SV":"es-419","es-US":"es-419","es-UY":"es-419","es-VE":"es-419",nb:"no",nn:"no","pt-AO":"pt-PT","pt-CH":"pt-PT","pt-CV":"pt-PT","pt-FR":"pt-PT","pt-GQ":"pt-PT","pt-GW":"pt-PT","pt-LU":"pt-PT","pt-MO":"pt-PT","pt-MZ":"pt-PT","pt-ST":"pt-PT","pt-TL":"pt-PT","az-Arab":"und","az-Cyrl":"und","bal-Latn":"und","blt-Latn":"und","bm-Nkoo":"und","bs-Cyrl":"und","byn-Latn":"und","cu-Glag":"und","dje-Arab":"und","dyo-Arab":"und","en-Dsrt":"und","en-Shaw":"und","ff-Adlm":"und","ff-Arab":"und","ha-Arab":"und","iu-Latn":"und","kk-Arab":"und","ks-Deva":"und","ku-Arab":"und","ky-Arab":"und","ky-Latn":"und","ml-Arab":"und","mn-Mong":"und","mni-Mtei":"und","ms-Arab":"und","pa-Arab":"und","sat-Deva":"und","sd-Deva":"und","sd-Khoj":"und","sd-Sind":"und","shi-Latn":"und","so-Arab":"und","sr-Latn":"und","sw-Arab":"und","tg-Arab":"und","ug-Cyrl":"und","uz-Arab":"und","uz-Cyrl":"und","vai-Latn":"und","wo-Arab":"und","yo-Arab":"und","yue-Hans":"und","zh-Hant":"und","zh-Hant-MO":"zh-Hant-HK"};e.exports=t.default,e.exports.default=t.default},99645:function(e,t){t.supplementalCldr=void 0;
// !!! AUTO-GENERATED FILE, DO NOT EDIT
t.supplementalCldr={supplemental:{version:{_unicodeVersion:"12.1.0",_cldrVersion:"36"},likelySubtags:{aa:"aa-Latn-ET",aai:"aai-Latn-ZZ",aak:"aak-Latn-ZZ",aau:"aau-Latn-ZZ",ab:"ab-Cyrl-GE",abi:"abi-Latn-ZZ",abq:"abq-Cyrl-ZZ",abr:"abr-Latn-GH",abt:"abt-Latn-ZZ",aby:"aby-Latn-ZZ",acd:"acd-Latn-ZZ",ace:"ace-Latn-ID",ach:"ach-Latn-UG",ada:"ada-Latn-GH",ade:"ade-Latn-ZZ",adj:"adj-Latn-ZZ",adp:"adp-Tibt-BT",ady:"ady-Cyrl-RU",adz:"adz-Latn-ZZ",ae:"ae-Avst-IR",aeb:"aeb-Arab-TN",aey:"aey-Latn-ZZ",af:"af-Latn-ZA",agc:"agc-Latn-ZZ",agd:"agd-Latn-ZZ",agg:"agg-Latn-ZZ",agm:"agm-Latn-ZZ",ago:"ago-Latn-ZZ",agq:"agq-Latn-CM",aha:"aha-Latn-ZZ",ahl:"ahl-Latn-ZZ",aho:"aho-Ahom-IN",ajg:"ajg-Latn-ZZ",ak:"ak-Latn-GH",akk:"akk-Xsux-IQ",ala:"ala-Latn-ZZ",ali:"ali-Latn-ZZ",aln:"aln-Latn-XK",alt:"alt-Cyrl-RU",am:"am-Ethi-ET",amm:"amm-Latn-ZZ",amn:"amn-Latn-ZZ",amo:"amo-Latn-NG",amp:"amp-Latn-ZZ",an:"an-Latn-ES",anc:"anc-Latn-ZZ",ank:"ank-Latn-ZZ",ann:"ann-Latn-ZZ",any:"any-Latn-ZZ",aoj:"aoj-Latn-ZZ",aom:"aom-Latn-ZZ",aoz:"aoz-Latn-ID",apc:"apc-Arab-ZZ",apd:"apd-Arab-TG",ape:"ape-Latn-ZZ",apr:"apr-Latn-ZZ",aps:"aps-Latn-ZZ",apz:"apz-Latn-ZZ",ar:"ar-Arab-EG",arc:"arc-Armi-IR","arc-Nbat":"arc-Nbat-JO","arc-Palm":"arc-Palm-SY",arh:"arh-Latn-ZZ",arn:"arn-Latn-CL",aro:"aro-Latn-BO",arq:"arq-Arab-DZ",ars:"ars-Arab-SA",ary:"ary-Arab-MA",arz:"arz-Arab-EG",as:"as-Beng-IN",asa:"asa-Latn-TZ",ase:"ase-Sgnw-US",asg:"asg-Latn-ZZ",aso:"aso-Latn-ZZ",ast:"ast-Latn-ES",ata:"ata-Latn-ZZ",atg:"atg-Latn-ZZ",atj:"atj-Latn-CA",auy:"auy-Latn-ZZ",av:"av-Cyrl-RU",avl:"avl-Arab-ZZ",avn:"avn-Latn-ZZ",avt:"avt-Latn-ZZ",avu:"avu-Latn-ZZ",awa:"awa-Deva-IN",awb:"awb-Latn-ZZ",awo:"awo-Latn-ZZ",awx:"awx-Latn-ZZ",ay:"ay-Latn-BO",ayb:"ayb-Latn-ZZ",az:"az-Latn-AZ","az-Arab":"az-Arab-IR","az-IQ":"az-Arab-IQ","az-IR":"az-Arab-IR","az-RU":"az-Cyrl-RU",ba:"ba-Cyrl-RU",bal:"bal-Arab-PK",ban:"ban-Latn-ID",bap:"bap-Deva-NP",bar:"bar-Latn-AT",bas:"bas-Latn-CM",bav:"bav-Latn-ZZ",bax:"bax-Bamu-CM",bba:"bba-Latn-ZZ",bbb:"bbb-Latn-ZZ",bbc:"bbc-Latn-ID",bbd:"bbd-Latn-ZZ",bbj:"bbj-Latn-CM",bbp:"bbp-Latn-ZZ",bbr:"bbr-Latn-ZZ",bcf:"bcf-Latn-ZZ",bch:"bch-Latn-ZZ",bci:"bci-Latn-CI",bcm:"bcm-Latn-ZZ",bcn:"bcn-Latn-ZZ",bco:"bco-Latn-ZZ",bcq:"bcq-Ethi-ZZ",bcu:"bcu-Latn-ZZ",bdd:"bdd-Latn-ZZ",be:"be-Cyrl-BY",bef:"bef-Latn-ZZ",beh:"beh-Latn-ZZ",bej:"bej-Arab-SD",bem:"bem-Latn-ZM",bet:"bet-Latn-ZZ",bew:"bew-Latn-ID",bex:"bex-Latn-ZZ",bez:"bez-Latn-TZ",bfd:"bfd-Latn-CM",bfq:"bfq-Taml-IN",bft:"bft-Arab-PK",bfy:"bfy-Deva-IN",bg:"bg-Cyrl-BG",bgc:"bgc-Deva-IN",bgn:"bgn-Arab-PK",bgx:"bgx-Grek-TR",bhb:"bhb-Deva-IN",bhg:"bhg-Latn-ZZ",bhi:"bhi-Deva-IN",bhl:"bhl-Latn-ZZ",bho:"bho-Deva-IN",bhy:"bhy-Latn-ZZ",bi:"bi-Latn-VU",bib:"bib-Latn-ZZ",big:"big-Latn-ZZ",bik:"bik-Latn-PH",bim:"bim-Latn-ZZ",bin:"bin-Latn-NG",bio:"bio-Latn-ZZ",biq:"biq-Latn-ZZ",bjh:"bjh-Latn-ZZ",bji:"bji-Ethi-ZZ",bjj:"bjj-Deva-IN",bjn:"bjn-Latn-ID",bjo:"bjo-Latn-ZZ",bjr:"bjr-Latn-ZZ",bjt:"bjt-Latn-SN",bjz:"bjz-Latn-ZZ",bkc:"bkc-Latn-ZZ",bkm:"bkm-Latn-CM",bkq:"bkq-Latn-ZZ",bku:"bku-Latn-PH",bkv:"bkv-Latn-ZZ",blt:"blt-Tavt-VN",bm:"bm-Latn-ML",bmh:"bmh-Latn-ZZ",bmk:"bmk-Latn-ZZ",bmq:"bmq-Latn-ML",bmu:"bmu-Latn-ZZ",bn:"bn-Beng-BD",bng:"bng-Latn-ZZ",bnm:"bnm-Latn-ZZ",bnp:"bnp-Latn-ZZ",bo:"bo-Tibt-CN",boj:"boj-Latn-ZZ",bom:"bom-Latn-ZZ",bon:"bon-Latn-ZZ",bpy:"bpy-Beng-IN",bqc:"bqc-Latn-ZZ",bqi:"bqi-Arab-IR",bqp:"bqp-Latn-ZZ",bqv:"bqv-Latn-CI",br:"br-Latn-FR",bra:"bra-Deva-IN",brh:"brh-Arab-PK",brx:"brx-Deva-IN",brz:"brz-Latn-ZZ",bs:"bs-Latn-BA",bsj:"bsj-Latn-ZZ",bsq:"bsq-Bass-LR",bss:"bss-Latn-CM",bst:"bst-Ethi-ZZ",bto:"bto-Latn-PH",btt:"btt-Latn-ZZ",btv:"btv-Deva-PK",bua:"bua-Cyrl-RU",buc:"buc-Latn-YT",bud:"bud-Latn-ZZ",bug:"bug-Latn-ID",buk:"buk-Latn-ZZ",bum:"bum-Latn-CM",buo:"buo-Latn-ZZ",bus:"bus-Latn-ZZ",buu:"buu-Latn-ZZ",bvb:"bvb-Latn-GQ",bwd:"bwd-Latn-ZZ",bwr:"bwr-Latn-ZZ",bxh:"bxh-Latn-ZZ",bye:"bye-Latn-ZZ",byn:"byn-Ethi-ER",byr:"byr-Latn-ZZ",bys:"bys-Latn-ZZ",byv:"byv-Latn-CM",byx:"byx-Latn-ZZ",bza:"bza-Latn-ZZ",bze:"bze-Latn-ML",bzf:"bzf-Latn-ZZ",bzh:"bzh-Latn-ZZ",bzw:"bzw-Latn-ZZ",ca:"ca-Latn-ES",can:"can-Latn-ZZ",cbj:"cbj-Latn-ZZ",cch:"cch-Latn-NG",ccp:"ccp-Cakm-BD",ce:"ce-Cyrl-RU",ceb:"ceb-Latn-PH",cfa:"cfa-Latn-ZZ",cgg:"cgg-Latn-UG",ch:"ch-Latn-GU",chk:"chk-Latn-FM",chm:"chm-Cyrl-RU",cho:"cho-Latn-US",chp:"chp-Latn-CA",chr:"chr-Cher-US",cic:"cic-Latn-US",cja:"cja-Arab-KH",cjm:"cjm-Cham-VN",cjv:"cjv-Latn-ZZ",ckb:"ckb-Arab-IQ",ckl:"ckl-Latn-ZZ",cko:"cko-Latn-ZZ",cky:"cky-Latn-ZZ",cla:"cla-Latn-ZZ",cme:"cme-Latn-ZZ",cmg:"cmg-Soyo-MN",co:"co-Latn-FR",cop:"cop-Copt-EG",cps:"cps-Latn-PH",cr:"cr-Cans-CA",crh:"crh-Cyrl-UA",crj:"crj-Cans-CA",crk:"crk-Cans-CA",crl:"crl-Cans-CA",crm:"crm-Cans-CA",crs:"crs-Latn-SC",cs:"cs-Latn-CZ",csb:"csb-Latn-PL",csw:"csw-Cans-CA",ctd:"ctd-Pauc-MM",cu:"cu-Cyrl-RU","cu-Glag":"cu-Glag-BG",cv:"cv-Cyrl-RU",cy:"cy-Latn-GB",da:"da-Latn-DK",dad:"dad-Latn-ZZ",daf:"daf-Latn-ZZ",dag:"dag-Latn-ZZ",dah:"dah-Latn-ZZ",dak:"dak-Latn-US",dar:"dar-Cyrl-RU",dav:"dav-Latn-KE",dbd:"dbd-Latn-ZZ",dbq:"dbq-Latn-ZZ",dcc:"dcc-Arab-IN",ddn:"ddn-Latn-ZZ",de:"de-Latn-DE",ded:"ded-Latn-ZZ",den:"den-Latn-CA",dga:"dga-Latn-ZZ",dgh:"dgh-Latn-ZZ",dgi:"dgi-Latn-ZZ",dgl:"dgl-Arab-ZZ",dgr:"dgr-Latn-CA",dgz:"dgz-Latn-ZZ",dia:"dia-Latn-ZZ",dje:"dje-Latn-NE",dnj:"dnj-Latn-CI",dob:"dob-Latn-ZZ",doi:"doi-Arab-IN",dop:"dop-Latn-ZZ",dow:"dow-Latn-ZZ",drh:"drh-Mong-CN",dri:"dri-Latn-ZZ",drs:"drs-Ethi-ZZ",dsb:"dsb-Latn-DE",dtm:"dtm-Latn-ML",dtp:"dtp-Latn-MY",dts:"dts-Latn-ZZ",dty:"dty-Deva-NP",dua:"dua-Latn-CM",duc:"duc-Latn-ZZ",dud:"dud-Latn-ZZ",dug:"dug-Latn-ZZ",dv:"dv-Thaa-MV",dva:"dva-Latn-ZZ",dww:"dww-Latn-ZZ",dyo:"dyo-Latn-SN",dyu:"dyu-Latn-BF",dz:"dz-Tibt-BT",dzg:"dzg-Latn-ZZ",ebu:"ebu-Latn-KE",ee:"ee-Latn-GH",efi:"efi-Latn-NG",egl:"egl-Latn-IT",egy:"egy-Egyp-EG",eka:"eka-Latn-ZZ",eky:"eky-Kali-MM",el:"el-Grek-GR",ema:"ema-Latn-ZZ",emi:"emi-Latn-ZZ",en:"en-Latn-US","en-Shaw":"en-Shaw-GB",enn:"enn-Latn-ZZ",enq:"enq-Latn-ZZ",eo:"eo-Latn-001",eri:"eri-Latn-ZZ",es:"es-Latn-ES",esg:"esg-Gonm-IN",esu:"esu-Latn-US",et:"et-Latn-EE",etr:"etr-Latn-ZZ",ett:"ett-Ital-IT",etu:"etu-Latn-ZZ",etx:"etx-Latn-ZZ",eu:"eu-Latn-ES",ewo:"ewo-Latn-CM",ext:"ext-Latn-ES",fa:"fa-Arab-IR",faa:"faa-Latn-ZZ",fab:"fab-Latn-ZZ",fag:"fag-Latn-ZZ",fai:"fai-Latn-ZZ",fan:"fan-Latn-GQ",ff:"ff-Latn-SN","ff-Adlm":"ff-Adlm-GN",ffi:"ffi-Latn-ZZ",ffm:"ffm-Latn-ML",fi:"fi-Latn-FI",fia:"fia-Arab-SD",fil:"fil-Latn-PH",fit:"fit-Latn-SE",fj:"fj-Latn-FJ",flr:"flr-Latn-ZZ",fmp:"fmp-Latn-ZZ",fo:"fo-Latn-FO",fod:"fod-Latn-ZZ",fon:"fon-Latn-BJ",for:"for-Latn-ZZ",fpe:"fpe-Latn-ZZ",fqs:"fqs-Latn-ZZ",fr:"fr-Latn-FR",frc:"frc-Latn-US",frp:"frp-Latn-FR",frr:"frr-Latn-DE",frs:"frs-Latn-DE",fub:"fub-Arab-CM",fud:"fud-Latn-WF",fue:"fue-Latn-ZZ",fuf:"fuf-Latn-GN",fuh:"fuh-Latn-ZZ",fuq:"fuq-Latn-NE",fur:"fur-Latn-IT",fuv:"fuv-Latn-NG",fuy:"fuy-Latn-ZZ",fvr:"fvr-Latn-SD",fy:"fy-Latn-NL",ga:"ga-Latn-IE",gaa:"gaa-Latn-GH",gaf:"gaf-Latn-ZZ",gag:"gag-Latn-MD",gah:"gah-Latn-ZZ",gaj:"gaj-Latn-ZZ",gam:"gam-Latn-ZZ",gan:"gan-Hans-CN",gaw:"gaw-Latn-ZZ",gay:"gay-Latn-ID",gba:"gba-Latn-ZZ",gbf:"gbf-Latn-ZZ",gbm:"gbm-Deva-IN",gby:"gby-Latn-ZZ",gbz:"gbz-Arab-IR",gcr:"gcr-Latn-GF",gd:"gd-Latn-GB",gde:"gde-Latn-ZZ",gdn:"gdn-Latn-ZZ",gdr:"gdr-Latn-ZZ",geb:"geb-Latn-ZZ",gej:"gej-Latn-ZZ",gel:"gel-Latn-ZZ",gez:"gez-Ethi-ET",gfk:"gfk-Latn-ZZ",ggn:"ggn-Deva-NP",ghs:"ghs-Latn-ZZ",gil:"gil-Latn-KI",gim:"gim-Latn-ZZ",gjk:"gjk-Arab-PK",gjn:"gjn-Latn-ZZ",gju:"gju-Arab-PK",gkn:"gkn-Latn-ZZ",gkp:"gkp-Latn-ZZ",gl:"gl-Latn-ES",glk:"glk-Arab-IR",gmm:"gmm-Latn-ZZ",gmv:"gmv-Ethi-ZZ",gn:"gn-Latn-PY",gnd:"gnd-Latn-ZZ",gng:"gng-Latn-ZZ",god:"god-Latn-ZZ",gof:"gof-Ethi-ZZ",goi:"goi-Latn-ZZ",gom:"gom-Deva-IN",gon:"gon-Telu-IN",gor:"gor-Latn-ID",gos:"gos-Latn-NL",got:"got-Goth-UA",grb:"grb-Latn-ZZ",grc:"grc-Cprt-CY","grc-Linb":"grc-Linb-GR",grt:"grt-Beng-IN",grw:"grw-Latn-ZZ",gsw:"gsw-Latn-CH",gu:"gu-Gujr-IN",gub:"gub-Latn-BR",guc:"guc-Latn-CO",gud:"gud-Latn-ZZ",gur:"gur-Latn-GH",guw:"guw-Latn-ZZ",gux:"gux-Latn-ZZ",guz:"guz-Latn-KE",gv:"gv-Latn-IM",gvf:"gvf-Latn-ZZ",gvr:"gvr-Deva-NP",gvs:"gvs-Latn-ZZ",gwc:"gwc-Arab-ZZ",gwi:"gwi-Latn-CA",gwt:"gwt-Arab-ZZ",gyi:"gyi-Latn-ZZ",ha:"ha-Latn-NG","ha-CM":"ha-Arab-CM","ha-SD":"ha-Arab-SD",hag:"hag-Latn-ZZ",hak:"hak-Hans-CN",ham:"ham-Latn-ZZ",haw:"haw-Latn-US",haz:"haz-Arab-AF",hbb:"hbb-Latn-ZZ",hdy:"hdy-Ethi-ZZ",he:"he-Hebr-IL",hhy:"hhy-Latn-ZZ",hi:"hi-Deva-IN",hia:"hia-Latn-ZZ",hif:"hif-Latn-FJ",hig:"hig-Latn-ZZ",hih:"hih-Latn-ZZ",hil:"hil-Latn-PH",hla:"hla-Latn-ZZ",hlu:"hlu-Hluw-TR",hmd:"hmd-Plrd-CN",hmt:"hmt-Latn-ZZ",hnd:"hnd-Arab-PK",hne:"hne-Deva-IN",hnj:"hnj-Hmng-LA",hnn:"hnn-Latn-PH",hno:"hno-Arab-PK",ho:"ho-Latn-PG",hoc:"hoc-Deva-IN",hoj:"hoj-Deva-IN",hot:"hot-Latn-ZZ",hr:"hr-Latn-HR",hsb:"hsb-Latn-DE",hsn:"hsn-Hans-CN",ht:"ht-Latn-HT",hu:"hu-Latn-HU",hui:"hui-Latn-ZZ",hy:"hy-Armn-AM",hz:"hz-Latn-NA",ia:"ia-Latn-001",ian:"ian-Latn-ZZ",iar:"iar-Latn-ZZ",iba:"iba-Latn-MY",ibb:"ibb-Latn-NG",iby:"iby-Latn-ZZ",ica:"ica-Latn-ZZ",ich:"ich-Latn-ZZ",id:"id-Latn-ID",idd:"idd-Latn-ZZ",idi:"idi-Latn-ZZ",idu:"idu-Latn-ZZ",ife:"ife-Latn-TG",ig:"ig-Latn-NG",igb:"igb-Latn-ZZ",ige:"ige-Latn-ZZ",ii:"ii-Yiii-CN",ijj:"ijj-Latn-ZZ",ik:"ik-Latn-US",ikk:"ikk-Latn-ZZ",ikt:"ikt-Latn-CA",ikw:"ikw-Latn-ZZ",ikx:"ikx-Latn-ZZ",ilo:"ilo-Latn-PH",imo:"imo-Latn-ZZ",in:"in-Latn-ID",inh:"inh-Cyrl-RU",io:"io-Latn-001",iou:"iou-Latn-ZZ",iri:"iri-Latn-ZZ",is:"is-Latn-IS",it:"it-Latn-IT",iu:"iu-Cans-CA",iw:"iw-Hebr-IL",iwm:"iwm-Latn-ZZ",iws:"iws-Latn-ZZ",izh:"izh-Latn-RU",izi:"izi-Latn-ZZ",ja:"ja-Jpan-JP",jab:"jab-Latn-ZZ",jam:"jam-Latn-JM",jbo:"jbo-Latn-001",jbu:"jbu-Latn-ZZ",jen:"jen-Latn-ZZ",jgk:"jgk-Latn-ZZ",jgo:"jgo-Latn-CM",ji:"ji-Hebr-UA",jib:"jib-Latn-ZZ",jmc:"jmc-Latn-TZ",jml:"jml-Deva-NP",jra:"jra-Latn-ZZ",jut:"jut-Latn-DK",jv:"jv-Latn-ID",jw:"jw-Latn-ID",ka:"ka-Geor-GE",kaa:"kaa-Cyrl-UZ",kab:"kab-Latn-DZ",kac:"kac-Latn-MM",kad:"kad-Latn-ZZ",kai:"kai-Latn-ZZ",kaj:"kaj-Latn-NG",kam:"kam-Latn-KE",kao:"kao-Latn-ML",kbd:"kbd-Cyrl-RU",kbm:"kbm-Latn-ZZ",kbp:"kbp-Latn-ZZ",kbq:"kbq-Latn-ZZ",kbx:"kbx-Latn-ZZ",kby:"kby-Arab-NE",kcg:"kcg-Latn-NG",kck:"kck-Latn-ZW",kcl:"kcl-Latn-ZZ",kct:"kct-Latn-ZZ",kde:"kde-Latn-TZ",kdh:"kdh-Arab-TG",kdl:"kdl-Latn-ZZ",kdt:"kdt-Thai-TH",kea:"kea-Latn-CV",ken:"ken-Latn-CM",kez:"kez-Latn-ZZ",kfo:"kfo-Latn-CI",kfr:"kfr-Deva-IN",kfy:"kfy-Deva-IN",kg:"kg-Latn-CD",kge:"kge-Latn-ID",kgf:"kgf-Latn-ZZ",kgp:"kgp-Latn-BR",kha:"kha-Latn-IN",khb:"khb-Talu-CN",khn:"khn-Deva-IN",khq:"khq-Latn-ML",khs:"khs-Latn-ZZ",kht:"kht-Mymr-IN",khw:"khw-Arab-PK",khz:"khz-Latn-ZZ",ki:"ki-Latn-KE",kij:"kij-Latn-ZZ",kiu:"kiu-Latn-TR",kiw:"kiw-Latn-ZZ",kj:"kj-Latn-NA",kjd:"kjd-Latn-ZZ",kjg:"kjg-Laoo-LA",kjs:"kjs-Latn-ZZ",kjy:"kjy-Latn-ZZ",kk:"kk-Cyrl-KZ","kk-AF":"kk-Arab-AF","kk-Arab":"kk-Arab-CN","kk-CN":"kk-Arab-CN","kk-IR":"kk-Arab-IR","kk-MN":"kk-Arab-MN",kkc:"kkc-Latn-ZZ",kkj:"kkj-Latn-CM",kl:"kl-Latn-GL",kln:"kln-Latn-KE",klq:"klq-Latn-ZZ",klt:"klt-Latn-ZZ",klx:"klx-Latn-ZZ",km:"km-Khmr-KH",kmb:"kmb-Latn-AO",kmh:"kmh-Latn-ZZ",kmo:"kmo-Latn-ZZ",kms:"kms-Latn-ZZ",kmu:"kmu-Latn-ZZ",kmw:"kmw-Latn-ZZ",kn:"kn-Knda-IN",knf:"knf-Latn-GW",knp:"knp-Latn-ZZ",ko:"ko-Kore-KR",koi:"koi-Cyrl-RU",kok:"kok-Deva-IN",kol:"kol-Latn-ZZ",kos:"kos-Latn-FM",koz:"koz-Latn-ZZ",kpe:"kpe-Latn-LR",kpf:"kpf-Latn-ZZ",kpo:"kpo-Latn-ZZ",kpr:"kpr-Latn-ZZ",kpx:"kpx-Latn-ZZ",kqb:"kqb-Latn-ZZ",kqf:"kqf-Latn-ZZ",kqs:"kqs-Latn-ZZ",kqy:"kqy-Ethi-ZZ",kr:"kr-Latn-ZZ",krc:"krc-Cyrl-RU",kri:"kri-Latn-SL",krj:"krj-Latn-PH",krl:"krl-Latn-RU",krs:"krs-Latn-ZZ",kru:"kru-Deva-IN",ks:"ks-Arab-IN",ksb:"ksb-Latn-TZ",ksd:"ksd-Latn-ZZ",ksf:"ksf-Latn-CM",ksh:"ksh-Latn-DE",ksj:"ksj-Latn-ZZ",ksr:"ksr-Latn-ZZ",ktb:"ktb-Ethi-ZZ",ktm:"ktm-Latn-ZZ",kto:"kto-Latn-ZZ",ktr:"ktr-Latn-MY",ku:"ku-Latn-TR","ku-Arab":"ku-Arab-IQ","ku-LB":"ku-Arab-LB",kub:"kub-Latn-ZZ",kud:"kud-Latn-ZZ",kue:"kue-Latn-ZZ",kuj:"kuj-Latn-ZZ",kum:"kum-Cyrl-RU",kun:"kun-Latn-ZZ",kup:"kup-Latn-ZZ",kus:"kus-Latn-ZZ",kv:"kv-Cyrl-RU",kvg:"kvg-Latn-ZZ",kvr:"kvr-Latn-ID",kvx:"kvx-Arab-PK",kw:"kw-Latn-GB",kwj:"kwj-Latn-ZZ",kwo:"kwo-Latn-ZZ",kwq:"kwq-Latn-ZZ",kxa:"kxa-Latn-ZZ",kxc:"kxc-Ethi-ZZ",kxe:"kxe-Latn-ZZ",kxm:"kxm-Thai-TH",kxp:"kxp-Arab-PK",kxw:"kxw-Latn-ZZ",kxz:"kxz-Latn-ZZ",ky:"ky-Cyrl-KG","ky-Arab":"ky-Arab-CN","ky-CN":"ky-Arab-CN","ky-Latn":"ky-Latn-TR","ky-TR":"ky-Latn-TR",kye:"kye-Latn-ZZ",kyx:"kyx-Latn-ZZ",kzj:"kzj-Latn-MY",kzr:"kzr-Latn-ZZ",kzt:"kzt-Latn-MY",la:"la-Latn-VA",lab:"lab-Lina-GR",lad:"lad-Hebr-IL",lag:"lag-Latn-TZ",lah:"lah-Arab-PK",laj:"laj-Latn-UG",las:"las-Latn-ZZ",lb:"lb-Latn-LU",lbe:"lbe-Cyrl-RU",lbu:"lbu-Latn-ZZ",lbw:"lbw-Latn-ID",lcm:"lcm-Latn-ZZ",lcp:"lcp-Thai-CN",ldb:"ldb-Latn-ZZ",led:"led-Latn-ZZ",lee:"lee-Latn-ZZ",lem:"lem-Latn-ZZ",lep:"lep-Lepc-IN",leq:"leq-Latn-ZZ",leu:"leu-Latn-ZZ",lez:"lez-Cyrl-RU",lg:"lg-Latn-UG",lgg:"lgg-Latn-ZZ",li:"li-Latn-NL",lia:"lia-Latn-ZZ",lid:"lid-Latn-ZZ",lif:"lif-Deva-NP","lif-Limb":"lif-Limb-IN",lig:"lig-Latn-ZZ",lih:"lih-Latn-ZZ",lij:"lij-Latn-IT",lis:"lis-Lisu-CN",ljp:"ljp-Latn-ID",lki:"lki-Arab-IR",lkt:"lkt-Latn-US",lle:"lle-Latn-ZZ",lln:"lln-Latn-ZZ",lmn:"lmn-Telu-IN",lmo:"lmo-Latn-IT",lmp:"lmp-Latn-ZZ",ln:"ln-Latn-CD",lns:"lns-Latn-ZZ",lnu:"lnu-Latn-ZZ",lo:"lo-Laoo-LA",loj:"loj-Latn-ZZ",lok:"lok-Latn-ZZ",lol:"lol-Latn-CD",lor:"lor-Latn-ZZ",los:"los-Latn-ZZ",loz:"loz-Latn-ZM",lrc:"lrc-Arab-IR",lt:"lt-Latn-LT",ltg:"ltg-Latn-LV",lu:"lu-Latn-CD",lua:"lua-Latn-CD",luo:"luo-Latn-KE",luy:"luy-Latn-KE",luz:"luz-Arab-IR",lv:"lv-Latn-LV",lwl:"lwl-Thai-TH",lzh:"lzh-Hans-CN",lzz:"lzz-Latn-TR",mad:"mad-Latn-ID",maf:"maf-Latn-CM",mag:"mag-Deva-IN",mai:"mai-Deva-IN",mak:"mak-Latn-ID",man:"man-Latn-GM","man-GN":"man-Nkoo-GN","man-Nkoo":"man-Nkoo-GN",mas:"mas-Latn-KE",maw:"maw-Latn-ZZ",maz:"maz-Latn-MX",mbh:"mbh-Latn-ZZ",mbo:"mbo-Latn-ZZ",mbq:"mbq-Latn-ZZ",mbu:"mbu-Latn-ZZ",mbw:"mbw-Latn-ZZ",mci:"mci-Latn-ZZ",mcp:"mcp-Latn-ZZ",mcq:"mcq-Latn-ZZ",mcr:"mcr-Latn-ZZ",mcu:"mcu-Latn-ZZ",mda:"mda-Latn-ZZ",mde:"mde-Arab-ZZ",mdf:"mdf-Cyrl-RU",mdh:"mdh-Latn-PH",mdj:"mdj-Latn-ZZ",mdr:"mdr-Latn-ID",mdx:"mdx-Ethi-ZZ",med:"med-Latn-ZZ",mee:"mee-Latn-ZZ",mek:"mek-Latn-ZZ",men:"men-Latn-SL",mer:"mer-Latn-KE",met:"met-Latn-ZZ",meu:"meu-Latn-ZZ",mfa:"mfa-Arab-TH",mfe:"mfe-Latn-MU",mfn:"mfn-Latn-ZZ",mfo:"mfo-Latn-ZZ",mfq:"mfq-Latn-ZZ",mg:"mg-Latn-MG",mgh:"mgh-Latn-MZ",mgl:"mgl-Latn-ZZ",mgo:"mgo-Latn-CM",mgp:"mgp-Deva-NP",mgy:"mgy-Latn-TZ",mh:"mh-Latn-MH",mhi:"mhi-Latn-ZZ",mhl:"mhl-Latn-ZZ",mi:"mi-Latn-NZ",mif:"mif-Latn-ZZ",min:"min-Latn-ID",mis:"mis-Hatr-IQ","mis-Medf":"mis-Medf-NG",miw:"miw-Latn-ZZ",mk:"mk-Cyrl-MK",mki:"mki-Arab-ZZ",mkl:"mkl-Latn-ZZ",mkp:"mkp-Latn-ZZ",mkw:"mkw-Latn-ZZ",ml:"ml-Mlym-IN",mle:"mle-Latn-ZZ",mlp:"mlp-Latn-ZZ",mls:"mls-Latn-SD",mmo:"mmo-Latn-ZZ",mmu:"mmu-Latn-ZZ",mmx:"mmx-Latn-ZZ",mn:"mn-Cyrl-MN","mn-CN":"mn-Mong-CN","mn-Mong":"mn-Mong-CN",mna:"mna-Latn-ZZ",mnf:"mnf-Latn-ZZ",mni:"mni-Beng-IN",mnw:"mnw-Mymr-MM",mo:"mo-Latn-RO",moa:"moa-Latn-ZZ",moe:"moe-Latn-CA",moh:"moh-Latn-CA",mos:"mos-Latn-BF",mox:"mox-Latn-ZZ",mpp:"mpp-Latn-ZZ",mps:"mps-Latn-ZZ",mpt:"mpt-Latn-ZZ",mpx:"mpx-Latn-ZZ",mql:"mql-Latn-ZZ",mr:"mr-Deva-IN",mrd:"mrd-Deva-NP",mrj:"mrj-Cyrl-RU",mro:"mro-Mroo-BD",ms:"ms-Latn-MY","ms-CC":"ms-Arab-CC","ms-ID":"ms-Arab-ID",mt:"mt-Latn-MT",mtc:"mtc-Latn-ZZ",mtf:"mtf-Latn-ZZ",mti:"mti-Latn-ZZ",mtr:"mtr-Deva-IN",mua:"mua-Latn-CM",mur:"mur-Latn-ZZ",mus:"mus-Latn-US",mva:"mva-Latn-ZZ",mvn:"mvn-Latn-ZZ",mvy:"mvy-Arab-PK",mwk:"mwk-Latn-ML",mwr:"mwr-Deva-IN",mwv:"mwv-Latn-ID",mww:"mww-Hmnp-US",mxc:"mxc-Latn-ZW",mxm:"mxm-Latn-ZZ",my:"my-Mymr-MM",myk:"myk-Latn-ZZ",mym:"mym-Ethi-ZZ",myv:"myv-Cyrl-RU",myw:"myw-Latn-ZZ",myx:"myx-Latn-UG",myz:"myz-Mand-IR",mzk:"mzk-Latn-ZZ",mzm:"mzm-Latn-ZZ",mzn:"mzn-Arab-IR",mzp:"mzp-Latn-ZZ",mzw:"mzw-Latn-ZZ",mzz:"mzz-Latn-ZZ",na:"na-Latn-NR",nac:"nac-Latn-ZZ",naf:"naf-Latn-ZZ",nak:"nak-Latn-ZZ",nan:"nan-Hans-CN",nap:"nap-Latn-IT",naq:"naq-Latn-NA",nas:"nas-Latn-ZZ",nb:"nb-Latn-NO",nca:"nca-Latn-ZZ",nce:"nce-Latn-ZZ",ncf:"ncf-Latn-ZZ",nch:"nch-Latn-MX",nco:"nco-Latn-ZZ",ncu:"ncu-Latn-ZZ",nd:"nd-Latn-ZW",ndc:"ndc-Latn-MZ",nds:"nds-Latn-DE",ne:"ne-Deva-NP",neb:"neb-Latn-ZZ",new:"new-Deva-NP",nex:"nex-Latn-ZZ",nfr:"nfr-Latn-ZZ",ng:"ng-Latn-NA",nga:"nga-Latn-ZZ",ngb:"ngb-Latn-ZZ",ngl:"ngl-Latn-MZ",nhb:"nhb-Latn-ZZ",nhe:"nhe-Latn-MX",nhw:"nhw-Latn-MX",nif:"nif-Latn-ZZ",nii:"nii-Latn-ZZ",nij:"nij-Latn-ID",nin:"nin-Latn-ZZ",niu:"niu-Latn-NU",niy:"niy-Latn-ZZ",niz:"niz-Latn-ZZ",njo:"njo-Latn-IN",nkg:"nkg-Latn-ZZ",nko:"nko-Latn-ZZ",nl:"nl-Latn-NL",nmg:"nmg-Latn-CM",nmz:"nmz-Latn-ZZ",nn:"nn-Latn-NO",nnf:"nnf-Latn-ZZ",nnh:"nnh-Latn-CM",nnk:"nnk-Latn-ZZ",nnm:"nnm-Latn-ZZ",nnp:"nnp-Wcho-IN",no:"no-Latn-NO",nod:"nod-Lana-TH",noe:"noe-Deva-IN",non:"non-Runr-SE",nop:"nop-Latn-ZZ",nou:"nou-Latn-ZZ",nqo:"nqo-Nkoo-GN",nr:"nr-Latn-ZA",nrb:"nrb-Latn-ZZ",nsk:"nsk-Cans-CA",nsn:"nsn-Latn-ZZ",nso:"nso-Latn-ZA",nss:"nss-Latn-ZZ",ntm:"ntm-Latn-ZZ",ntr:"ntr-Latn-ZZ",nui:"nui-Latn-ZZ",nup:"nup-Latn-ZZ",nus:"nus-Latn-SS",nuv:"nuv-Latn-ZZ",nux:"nux-Latn-ZZ",nv:"nv-Latn-US",nwb:"nwb-Latn-ZZ",nxq:"nxq-Latn-CN",nxr:"nxr-Latn-ZZ",ny:"ny-Latn-MW",nym:"nym-Latn-TZ",nyn:"nyn-Latn-UG",nzi:"nzi-Latn-GH",oc:"oc-Latn-FR",ogc:"ogc-Latn-ZZ",okr:"okr-Latn-ZZ",okv:"okv-Latn-ZZ",om:"om-Latn-ET",ong:"ong-Latn-ZZ",onn:"onn-Latn-ZZ",ons:"ons-Latn-ZZ",opm:"opm-Latn-ZZ",or:"or-Orya-IN",oro:"oro-Latn-ZZ",oru:"oru-Arab-ZZ",os:"os-Cyrl-GE",osa:"osa-Osge-US",ota:"ota-Arab-ZZ",otk:"otk-Orkh-MN",ozm:"ozm-Latn-ZZ",pa:"pa-Guru-IN","pa-Arab":"pa-Arab-PK","pa-PK":"pa-Arab-PK",pag:"pag-Latn-PH",pal:"pal-Phli-IR","pal-Phlp":"pal-Phlp-CN",pam:"pam-Latn-PH",pap:"pap-Latn-AW",pau:"pau-Latn-PW",pbi:"pbi-Latn-ZZ",pcd:"pcd-Latn-FR",pcm:"pcm-Latn-NG",pdc:"pdc-Latn-US",pdt:"pdt-Latn-CA",ped:"ped-Latn-ZZ",peo:"peo-Xpeo-IR",pex:"pex-Latn-ZZ",pfl:"pfl-Latn-DE",phl:"phl-Arab-ZZ",phn:"phn-Phnx-LB",pil:"pil-Latn-ZZ",pip:"pip-Latn-ZZ",pka:"pka-Brah-IN",pko:"pko-Latn-KE",pl:"pl-Latn-PL",pla:"pla-Latn-ZZ",pms:"pms-Latn-IT",png:"png-Latn-ZZ",pnn:"pnn-Latn-ZZ",pnt:"pnt-Grek-GR",pon:"pon-Latn-FM",ppa:"ppa-Deva-IN",ppo:"ppo-Latn-ZZ",pra:"pra-Khar-PK",prd:"prd-Arab-IR",prg:"prg-Latn-001",ps:"ps-Arab-AF",pss:"pss-Latn-ZZ",pt:"pt-Latn-BR",ptp:"ptp-Latn-ZZ",puu:"puu-Latn-GA",pwa:"pwa-Latn-ZZ",qu:"qu-Latn-PE",quc:"quc-Latn-GT",qug:"qug-Latn-EC",rai:"rai-Latn-ZZ",raj:"raj-Deva-IN",rao:"rao-Latn-ZZ",rcf:"rcf-Latn-RE",rej:"rej-Latn-ID",rel:"rel-Latn-ZZ",res:"res-Latn-ZZ",rgn:"rgn-Latn-IT",rhg:"rhg-Arab-MM",ria:"ria-Latn-IN",rif:"rif-Tfng-MA","rif-NL":"rif-Latn-NL",rjs:"rjs-Deva-NP",rkt:"rkt-Beng-BD",rm:"rm-Latn-CH",rmf:"rmf-Latn-FI",rmo:"rmo-Latn-CH",rmt:"rmt-Arab-IR",rmu:"rmu-Latn-SE",rn:"rn-Latn-BI",rna:"rna-Latn-ZZ",rng:"rng-Latn-MZ",ro:"ro-Latn-RO",rob:"rob-Latn-ID",rof:"rof-Latn-TZ",roo:"roo-Latn-ZZ",rro:"rro-Latn-ZZ",rtm:"rtm-Latn-FJ",ru:"ru-Cyrl-RU",rue:"rue-Cyrl-UA",rug:"rug-Latn-SB",rw:"rw-Latn-RW",rwk:"rwk-Latn-TZ",rwo:"rwo-Latn-ZZ",ryu:"ryu-Kana-JP",sa:"sa-Deva-IN",saf:"saf-Latn-GH",sah:"sah-Cyrl-RU",saq:"saq-Latn-KE",sas:"sas-Latn-ID",sat:"sat-Latn-IN",sav:"sav-Latn-SN",saz:"saz-Saur-IN",sba:"sba-Latn-ZZ",sbe:"sbe-Latn-ZZ",sbp:"sbp-Latn-TZ",sc:"sc-Latn-IT",sck:"sck-Deva-IN",scl:"scl-Arab-ZZ",scn:"scn-Latn-IT",sco:"sco-Latn-GB",scs:"scs-Latn-CA",sd:"sd-Arab-PK","sd-Deva":"sd-Deva-IN","sd-Khoj":"sd-Khoj-IN","sd-Sind":"sd-Sind-IN",sdc:"sdc-Latn-IT",sdh:"sdh-Arab-IR",se:"se-Latn-NO",sef:"sef-Latn-CI",seh:"seh-Latn-MZ",sei:"sei-Latn-MX",ses:"ses-Latn-ML",sg:"sg-Latn-CF",sga:"sga-Ogam-IE",sgs:"sgs-Latn-LT",sgw:"sgw-Ethi-ZZ",sgz:"sgz-Latn-ZZ",shi:"shi-Tfng-MA",shk:"shk-Latn-ZZ",shn:"shn-Mymr-MM",shu:"shu-Arab-ZZ",si:"si-Sinh-LK",sid:"sid-Latn-ET",sig:"sig-Latn-ZZ",sil:"sil-Latn-ZZ",sim:"sim-Latn-ZZ",sjr:"sjr-Latn-ZZ",sk:"sk-Latn-SK",skc:"skc-Latn-ZZ",skr:"skr-Arab-PK",sks:"sks-Latn-ZZ",sl:"sl-Latn-SI",sld:"sld-Latn-ZZ",sli:"sli-Latn-PL",sll:"sll-Latn-ZZ",sly:"sly-Latn-ID",sm:"sm-Latn-WS",sma:"sma-Latn-SE",smj:"smj-Latn-SE",smn:"smn-Latn-FI",smp:"smp-Samr-IL",smq:"smq-Latn-ZZ",sms:"sms-Latn-FI",sn:"sn-Latn-ZW",snc:"snc-Latn-ZZ",snk:"snk-Latn-ML",snp:"snp-Latn-ZZ",snx:"snx-Latn-ZZ",sny:"sny-Latn-ZZ",so:"so-Latn-SO",sog:"sog-Sogd-UZ",sok:"sok-Latn-ZZ",soq:"soq-Latn-ZZ",sou:"sou-Thai-TH",soy:"soy-Latn-ZZ",spd:"spd-Latn-ZZ",spl:"spl-Latn-ZZ",sps:"sps-Latn-ZZ",sq:"sq-Latn-AL",sr:"sr-Cyrl-RS","sr-ME":"sr-Latn-ME","sr-RO":"sr-Latn-RO","sr-RU":"sr-Latn-RU","sr-TR":"sr-Latn-TR",srb:"srb-Sora-IN",srn:"srn-Latn-SR",srr:"srr-Latn-SN",srx:"srx-Deva-IN",ss:"ss-Latn-ZA",ssd:"ssd-Latn-ZZ",ssg:"ssg-Latn-ZZ",ssy:"ssy-Latn-ER",st:"st-Latn-ZA",stk:"stk-Latn-ZZ",stq:"stq-Latn-DE",su:"su-Latn-ID",sua:"sua-Latn-ZZ",sue:"sue-Latn-ZZ",suk:"suk-Latn-TZ",sur:"sur-Latn-ZZ",sus:"sus-Latn-GN",sv:"sv-Latn-SE",sw:"sw-Latn-TZ",swb:"swb-Arab-YT",swc:"swc-Latn-CD",swg:"swg-Latn-DE",swp:"swp-Latn-ZZ",swv:"swv-Deva-IN",sxn:"sxn-Latn-ID",sxw:"sxw-Latn-ZZ",syl:"syl-Beng-BD",syr:"syr-Syrc-IQ",szl:"szl-Latn-PL",ta:"ta-Taml-IN",taj:"taj-Deva-NP",tal:"tal-Latn-ZZ",tan:"tan-Latn-ZZ",taq:"taq-Latn-ZZ",tbc:"tbc-Latn-ZZ",tbd:"tbd-Latn-ZZ",tbf:"tbf-Latn-ZZ",tbg:"tbg-Latn-ZZ",tbo:"tbo-Latn-ZZ",tbw:"tbw-Latn-PH",tbz:"tbz-Latn-ZZ",tci:"tci-Latn-ZZ",tcy:"tcy-Knda-IN",tdd:"tdd-Tale-CN",tdg:"tdg-Deva-NP",tdh:"tdh-Deva-NP",tdu:"tdu-Latn-MY",te:"te-Telu-IN",ted:"ted-Latn-ZZ",tem:"tem-Latn-SL",teo:"teo-Latn-UG",tet:"tet-Latn-TL",tfi:"tfi-Latn-ZZ",tg:"tg-Cyrl-TJ","tg-Arab":"tg-Arab-PK","tg-PK":"tg-Arab-PK",tgc:"tgc-Latn-ZZ",tgo:"tgo-Latn-ZZ",tgu:"tgu-Latn-ZZ",th:"th-Thai-TH",thl:"thl-Deva-NP",thq:"thq-Deva-NP",thr:"thr-Deva-NP",ti:"ti-Ethi-ET",tif:"tif-Latn-ZZ",tig:"tig-Ethi-ER",tik:"tik-Latn-ZZ",tim:"tim-Latn-ZZ",tio:"tio-Latn-ZZ",tiv:"tiv-Latn-NG",tk:"tk-Latn-TM",tkl:"tkl-Latn-TK",tkr:"tkr-Latn-AZ",tkt:"tkt-Deva-NP",tl:"tl-Latn-PH",tlf:"tlf-Latn-ZZ",tlx:"tlx-Latn-ZZ",tly:"tly-Latn-AZ",tmh:"tmh-Latn-NE",tmy:"tmy-Latn-ZZ",tn:"tn-Latn-ZA",tnh:"tnh-Latn-ZZ",to:"to-Latn-TO",tof:"tof-Latn-ZZ",tog:"tog-Latn-MW",toq:"toq-Latn-ZZ",tpi:"tpi-Latn-PG",tpm:"tpm-Latn-ZZ",tpz:"tpz-Latn-ZZ",tqo:"tqo-Latn-ZZ",tr:"tr-Latn-TR",tru:"tru-Latn-TR",trv:"trv-Latn-TW",trw:"trw-Arab-ZZ",ts:"ts-Latn-ZA",tsd:"tsd-Grek-GR",tsf:"tsf-Deva-NP",tsg:"tsg-Latn-PH",tsj:"tsj-Tibt-BT",tsw:"tsw-Latn-ZZ",tt:"tt-Cyrl-RU",ttd:"ttd-Latn-ZZ",tte:"tte-Latn-ZZ",ttj:"ttj-Latn-UG",ttr:"ttr-Latn-ZZ",tts:"tts-Thai-TH",ttt:"ttt-Latn-AZ",tuh:"tuh-Latn-ZZ",tul:"tul-Latn-ZZ",tum:"tum-Latn-MW",tuq:"tuq-Latn-ZZ",tvd:"tvd-Latn-ZZ",tvl:"tvl-Latn-TV",tvu:"tvu-Latn-ZZ",twh:"twh-Latn-ZZ",twq:"twq-Latn-NE",txg:"txg-Tang-CN",ty:"ty-Latn-PF",tya:"tya-Latn-ZZ",tyv:"tyv-Cyrl-RU",tzm:"tzm-Latn-MA",ubu:"ubu-Latn-ZZ",udm:"udm-Cyrl-RU",ug:"ug-Arab-CN","ug-Cyrl":"ug-Cyrl-KZ","ug-KZ":"ug-Cyrl-KZ","ug-MN":"ug-Cyrl-MN",uga:"uga-Ugar-SY",uk:"uk-Cyrl-UA",uli:"uli-Latn-FM",umb:"umb-Latn-AO",und:"en-Latn-US","und-002":"en-Latn-NG","und-003":"en-Latn-US","und-005":"pt-Latn-BR","und-009":"en-Latn-AU","und-011":"en-Latn-NG","und-013":"es-Latn-MX","und-014":"sw-Latn-TZ","und-015":"ar-Arab-EG","und-017":"sw-Latn-CD","und-018":"en-Latn-ZA","und-019":"en-Latn-US","und-021":"en-Latn-US","und-029":"es-Latn-CU","und-030":"zh-Hans-CN","und-034":"hi-Deva-IN","und-035":"id-Latn-ID","und-039":"it-Latn-IT","und-053":"en-Latn-AU","und-054":"en-Latn-PG","und-057":"en-Latn-GU","und-061":"sm-Latn-WS","und-142":"zh-Hans-CN","und-143":"uz-Latn-UZ","und-145":"ar-Arab-SA","und-150":"ru-Cyrl-RU","und-151":"ru-Cyrl-RU","und-154":"en-Latn-GB","und-155":"de-Latn-DE","und-202":"en-Latn-NG","und-419":"es-Latn-419","und-AD":"ca-Latn-AD","und-Adlm":"ff-Adlm-GN","und-AE":"ar-Arab-AE","und-AF":"fa-Arab-AF","und-Aghb":"lez-Aghb-RU","und-Ahom":"aho-Ahom-IN","und-AL":"sq-Latn-AL","und-AM":"hy-Armn-AM","und-AO":"pt-Latn-AO","und-AQ":"und-Latn-AQ","und-AR":"es-Latn-AR","und-Arab":"ar-Arab-EG","und-Arab-CC":"ms-Arab-CC","und-Arab-CN":"ug-Arab-CN","und-Arab-GB":"ks-Arab-GB","und-Arab-ID":"ms-Arab-ID","und-Arab-IN":"ur-Arab-IN","und-Arab-KH":"cja-Arab-KH","und-Arab-MM":"rhg-Arab-MM","und-Arab-MN":"kk-Arab-MN","und-Arab-MU":"ur-Arab-MU","und-Arab-NG":"ha-Arab-NG","und-Arab-PK":"ur-Arab-PK","und-Arab-TG":"apd-Arab-TG","und-Arab-TH":"mfa-Arab-TH","und-Arab-TJ":"fa-Arab-TJ","und-Arab-TR":"az-Arab-TR","und-Arab-YT":"swb-Arab-YT","und-Armi":"arc-Armi-IR","und-Armn":"hy-Armn-AM","und-AS":"sm-Latn-AS","und-AT":"de-Latn-AT","und-Avst":"ae-Avst-IR","und-AW":"nl-Latn-AW","und-AX":"sv-Latn-AX","und-AZ":"az-Latn-AZ","und-BA":"bs-Latn-BA","und-Bali":"ban-Bali-ID","und-Bamu":"bax-Bamu-CM","und-Bass":"bsq-Bass-LR","und-Batk":"bbc-Batk-ID","und-BD":"bn-Beng-BD","und-BE":"nl-Latn-BE","und-Beng":"bn-Beng-BD","und-BF":"fr-Latn-BF","und-BG":"bg-Cyrl-BG","und-BH":"ar-Arab-BH","und-Bhks":"sa-Bhks-IN","und-BI":"rn-Latn-BI","und-BJ":"fr-Latn-BJ","und-BL":"fr-Latn-BL","und-BN":"ms-Latn-BN","und-BO":"es-Latn-BO","und-Bopo":"zh-Bopo-TW","und-BQ":"pap-Latn-BQ","und-BR":"pt-Latn-BR","und-Brah":"pka-Brah-IN","und-Brai":"fr-Brai-FR","und-BT":"dz-Tibt-BT","und-Bugi":"bug-Bugi-ID","und-Buhd":"bku-Buhd-PH","und-BV":"und-Latn-BV","und-BY":"be-Cyrl-BY","und-Cakm":"ccp-Cakm-BD","und-Cans":"cr-Cans-CA","und-Cari":"xcr-Cari-TR","und-CD":"sw-Latn-CD","und-CF":"fr-Latn-CF","und-CG":"fr-Latn-CG","und-CH":"de-Latn-CH","und-Cham":"cjm-Cham-VN","und-Cher":"chr-Cher-US","und-CI":"fr-Latn-CI","und-CL":"es-Latn-CL","und-CM":"fr-Latn-CM","und-CN":"zh-Hans-CN","und-CO":"es-Latn-CO","und-Copt":"cop-Copt-EG","und-CP":"und-Latn-CP","und-Cprt":"grc-Cprt-CY","und-CR":"es-Latn-CR","und-CU":"es-Latn-CU","und-CV":"pt-Latn-CV","und-CW":"pap-Latn-CW","und-CY":"el-Grek-CY","und-Cyrl":"ru-Cyrl-RU","und-Cyrl-AL":"mk-Cyrl-AL","und-Cyrl-BA":"sr-Cyrl-BA","und-Cyrl-GE":"ab-Cyrl-GE","und-Cyrl-GR":"mk-Cyrl-GR","und-Cyrl-MD":"uk-Cyrl-MD","und-Cyrl-RO":"bg-Cyrl-RO","und-Cyrl-SK":"uk-Cyrl-SK","und-Cyrl-TR":"kbd-Cyrl-TR","und-Cyrl-XK":"sr-Cyrl-XK","und-CZ":"cs-Latn-CZ","und-DE":"de-Latn-DE","und-Deva":"hi-Deva-IN","und-Deva-BT":"ne-Deva-BT","und-Deva-FJ":"hif-Deva-FJ","und-Deva-MU":"bho-Deva-MU","und-Deva-PK":"btv-Deva-PK","und-DJ":"aa-Latn-DJ","und-DK":"da-Latn-DK","und-DO":"es-Latn-DO","und-Dogr":"doi-Dogr-IN","und-Dupl":"fr-Dupl-FR","und-DZ":"ar-Arab-DZ","und-EA":"es-Latn-EA","und-EC":"es-Latn-EC","und-EE":"et-Latn-EE","und-EG":"ar-Arab-EG","und-Egyp":"egy-Egyp-EG","und-EH":"ar-Arab-EH","und-Elba":"sq-Elba-AL","und-Elym":"arc-Elym-IR","und-ER":"ti-Ethi-ER","und-ES":"es-Latn-ES","und-ET":"am-Ethi-ET","und-Ethi":"am-Ethi-ET","und-EU":"en-Latn-GB","und-EZ":"de-Latn-EZ","und-FI":"fi-Latn-FI","und-FO":"fo-Latn-FO","und-FR":"fr-Latn-FR","und-GA":"fr-Latn-GA","und-GE":"ka-Geor-GE","und-Geor":"ka-Geor-GE","und-GF":"fr-Latn-GF","und-GH":"ak-Latn-GH","und-GL":"kl-Latn-GL","und-Glag":"cu-Glag-BG","und-GN":"fr-Latn-GN","und-Gong":"wsg-Gong-IN","und-Gonm":"esg-Gonm-IN","und-Goth":"got-Goth-UA","und-GP":"fr-Latn-GP","und-GQ":"es-Latn-GQ","und-GR":"el-Grek-GR","und-Gran":"sa-Gran-IN","und-Grek":"el-Grek-GR","und-Grek-TR":"bgx-Grek-TR","und-GS":"und-Latn-GS","und-GT":"es-Latn-GT","und-Gujr":"gu-Gujr-IN","und-Guru":"pa-Guru-IN","und-GW":"pt-Latn-GW","und-Hanb":"zh-Hanb-TW","und-Hang":"ko-Hang-KR","und-Hani":"zh-Hani-CN","und-Hano":"hnn-Hano-PH","und-Hans":"zh-Hans-CN","und-Hant":"zh-Hant-TW","und-Hatr":"mis-Hatr-IQ","und-Hebr":"he-Hebr-IL","und-Hebr-CA":"yi-Hebr-CA","und-Hebr-GB":"yi-Hebr-GB","und-Hebr-SE":"yi-Hebr-SE","und-Hebr-UA":"yi-Hebr-UA","und-Hebr-US":"yi-Hebr-US","und-Hira":"ja-Hira-JP","und-HK":"zh-Hant-HK","und-Hluw":"hlu-Hluw-TR","und-HM":"und-Latn-HM","und-Hmng":"hnj-Hmng-LA","und-Hmnp":"mww-Hmnp-US","und-HN":"es-Latn-HN","und-HR":"hr-Latn-HR","und-HT":"ht-Latn-HT","und-HU":"hu-Latn-HU","und-Hung":"hu-Hung-HU","und-IC":"es-Latn-IC","und-ID":"id-Latn-ID","und-IL":"he-Hebr-IL","und-IN":"hi-Deva-IN","und-IQ":"ar-Arab-IQ","und-IR":"fa-Arab-IR","und-IS":"is-Latn-IS","und-IT":"it-Latn-IT","und-Ital":"ett-Ital-IT","und-Jamo":"ko-Jamo-KR","und-Java":"jv-Java-ID","und-JO":"ar-Arab-JO","und-JP":"ja-Jpan-JP","und-Jpan":"ja-Jpan-JP","und-Kali":"eky-Kali-MM","und-Kana":"ja-Kana-JP","und-KE":"sw-Latn-KE","und-KG":"ky-Cyrl-KG","und-KH":"km-Khmr-KH","und-Khar":"pra-Khar-PK","und-Khmr":"km-Khmr-KH","und-Khoj":"sd-Khoj-IN","und-KM":"ar-Arab-KM","und-Knda":"kn-Knda-IN","und-Kore":"ko-Kore-KR","und-KP":"ko-Kore-KP","und-KR":"ko-Kore-KR","und-Kthi":"bho-Kthi-IN","und-KW":"ar-Arab-KW","und-KZ":"ru-Cyrl-KZ","und-LA":"lo-Laoo-LA","und-Lana":"nod-Lana-TH","und-Laoo":"lo-Laoo-LA","und-Latn-AF":"tk-Latn-AF","und-Latn-AM":"ku-Latn-AM","und-Latn-CN":"za-Latn-CN","und-Latn-CY":"tr-Latn-CY","und-Latn-DZ":"fr-Latn-DZ","und-Latn-ET":"en-Latn-ET","und-Latn-GE":"ku-Latn-GE","und-Latn-IR":"tk-Latn-IR","und-Latn-KM":"fr-Latn-KM","und-Latn-MA":"fr-Latn-MA","und-Latn-MK":"sq-Latn-MK","und-Latn-MM":"kac-Latn-MM","und-Latn-MO":"pt-Latn-MO","und-Latn-MR":"fr-Latn-MR","und-Latn-RU":"krl-Latn-RU","und-Latn-SY":"fr-Latn-SY","und-Latn-TN":"fr-Latn-TN","und-Latn-TW":"trv-Latn-TW","und-Latn-UA":"pl-Latn-UA","und-LB":"ar-Arab-LB","und-Lepc":"lep-Lepc-IN","und-LI":"de-Latn-LI","und-Limb":"lif-Limb-IN","und-Lina":"lab-Lina-GR","und-Linb":"grc-Linb-GR","und-Lisu":"lis-Lisu-CN","und-LK":"si-Sinh-LK","und-LS":"st-Latn-LS","und-LT":"lt-Latn-LT","und-LU":"fr-Latn-LU","und-LV":"lv-Latn-LV","und-LY":"ar-Arab-LY","und-Lyci":"xlc-Lyci-TR","und-Lydi":"xld-Lydi-TR","und-MA":"ar-Arab-MA","und-Mahj":"hi-Mahj-IN","und-Maka":"mak-Maka-ID","und-Mand":"myz-Mand-IR","und-Mani":"xmn-Mani-CN","und-Marc":"bo-Marc-CN","und-MC":"fr-Latn-MC","und-MD":"ro-Latn-MD","und-ME":"sr-Latn-ME","und-Medf":"mis-Medf-NG","und-Mend":"men-Mend-SL","und-Merc":"xmr-Merc-SD","und-Mero":"xmr-Mero-SD","und-MF":"fr-Latn-MF","und-MG":"mg-Latn-MG","und-MK":"mk-Cyrl-MK","und-ML":"bm-Latn-ML","und-Mlym":"ml-Mlym-IN","und-MM":"my-Mymr-MM","und-MN":"mn-Cyrl-MN","und-MO":"zh-Hant-MO","und-Modi":"mr-Modi-IN","und-Mong":"mn-Mong-CN","und-MQ":"fr-Latn-MQ","und-MR":"ar-Arab-MR","und-Mroo":"mro-Mroo-BD","und-MT":"mt-Latn-MT","und-Mtei":"mni-Mtei-IN","und-MU":"mfe-Latn-MU","und-Mult":"skr-Mult-PK","und-MV":"dv-Thaa-MV","und-MX":"es-Latn-MX","und-MY":"ms-Latn-MY","und-Mymr":"my-Mymr-MM","und-Mymr-IN":"kht-Mymr-IN","und-Mymr-TH":"mnw-Mymr-TH","und-MZ":"pt-Latn-MZ","und-NA":"af-Latn-NA","und-Nand":"sa-Nand-IN","und-Narb":"xna-Narb-SA","und-Nbat":"arc-Nbat-JO","und-NC":"fr-Latn-NC","und-NE":"ha-Latn-NE","und-Newa":"new-Newa-NP","und-NI":"es-Latn-NI","und-Nkoo":"man-Nkoo-GN","und-NL":"nl-Latn-NL","und-NO":"nb-Latn-NO","und-NP":"ne-Deva-NP","und-Nshu":"zhx-Nshu-CN","und-Ogam":"sga-Ogam-IE","und-Olck":"sat-Olck-IN","und-OM":"ar-Arab-OM","und-Orkh":"otk-Orkh-MN","und-Orya":"or-Orya-IN","und-Osge":"osa-Osge-US","und-Osma":"so-Osma-SO","und-PA":"es-Latn-PA","und-Palm":"arc-Palm-SY","und-Pauc":"ctd-Pauc-MM","und-PE":"es-Latn-PE","und-Perm":"kv-Perm-RU","und-PF":"fr-Latn-PF","und-PG":"tpi-Latn-PG","und-PH":"fil-Latn-PH","und-Phag":"lzh-Phag-CN","und-Phli":"pal-Phli-IR","und-Phlp":"pal-Phlp-CN","und-Phnx":"phn-Phnx-LB","und-PK":"ur-Arab-PK","und-PL":"pl-Latn-PL","und-Plrd":"hmd-Plrd-CN","und-PM":"fr-Latn-PM","und-PR":"es-Latn-PR","und-Prti":"xpr-Prti-IR","und-PS":"ar-Arab-PS","und-PT":"pt-Latn-PT","und-PW":"pau-Latn-PW","und-PY":"gn-Latn-PY","und-QA":"ar-Arab-QA","und-QO":"en-Latn-DG","und-RE":"fr-Latn-RE","und-Rjng":"rej-Rjng-ID","und-RO":"ro-Latn-RO","und-Rohg":"rhg-Rohg-MM","und-RS":"sr-Cyrl-RS","und-RU":"ru-Cyrl-RU","und-Runr":"non-Runr-SE","und-RW":"rw-Latn-RW","und-SA":"ar-Arab-SA","und-Samr":"smp-Samr-IL","und-Sarb":"xsa-Sarb-YE","und-Saur":"saz-Saur-IN","und-SC":"fr-Latn-SC","und-SD":"ar-Arab-SD","und-SE":"sv-Latn-SE","und-Sgnw":"ase-Sgnw-US","und-Shaw":"en-Shaw-GB","und-Shrd":"sa-Shrd-IN","und-SI":"sl-Latn-SI","und-Sidd":"sa-Sidd-IN","und-Sind":"sd-Sind-IN","und-Sinh":"si-Sinh-LK","und-SJ":"nb-Latn-SJ","und-SK":"sk-Latn-SK","und-SM":"it-Latn-SM","und-SN":"fr-Latn-SN","und-SO":"so-Latn-SO","und-Sogd":"sog-Sogd-UZ","und-Sogo":"sog-Sogo-UZ","und-Sora":"srb-Sora-IN","und-Soyo":"cmg-Soyo-MN","und-SR":"nl-Latn-SR","und-ST":"pt-Latn-ST","und-Sund":"su-Sund-ID","und-SV":"es-Latn-SV","und-SY":"ar-Arab-SY","und-Sylo":"syl-Sylo-BD","und-Syrc":"syr-Syrc-IQ","und-Tagb":"tbw-Tagb-PH","und-Takr":"doi-Takr-IN","und-Tale":"tdd-Tale-CN","und-Talu":"khb-Talu-CN","und-Taml":"ta-Taml-IN","und-Tang":"txg-Tang-CN","und-Tavt":"blt-Tavt-VN","und-TD":"fr-Latn-TD","und-Telu":"te-Telu-IN","und-TF":"fr-Latn-TF","und-Tfng":"zgh-Tfng-MA","und-TG":"fr-Latn-TG","und-Tglg":"fil-Tglg-PH","und-TH":"th-Thai-TH","und-Thaa":"dv-Thaa-MV","und-Thai":"th-Thai-TH","und-Thai-CN":"lcp-Thai-CN","und-Thai-KH":"kdt-Thai-KH","und-Thai-LA":"kdt-Thai-LA","und-Tibt":"bo-Tibt-CN","und-Tirh":"mai-Tirh-IN","und-TJ":"tg-Cyrl-TJ","und-TK":"tkl-Latn-TK","und-TL":"pt-Latn-TL","und-TM":"tk-Latn-TM","und-TN":"ar-Arab-TN","und-TO":"to-Latn-TO","und-TR":"tr-Latn-TR","und-TV":"tvl-Latn-TV","und-TW":"zh-Hant-TW","und-TZ":"sw-Latn-TZ","und-UA":"uk-Cyrl-UA","und-UG":"sw-Latn-UG","und-Ugar":"uga-Ugar-SY","und-UY":"es-Latn-UY","und-UZ":"uz-Latn-UZ","und-VA":"it-Latn-VA","und-Vaii":"vai-Vaii-LR","und-VE":"es-Latn-VE","und-VN":"vi-Latn-VN","und-VU":"bi-Latn-VU","und-Wara":"hoc-Wara-IN","und-Wcho":"nnp-Wcho-IN","und-WF":"fr-Latn-WF","und-WS":"sm-Latn-WS","und-XK":"sq-Latn-XK","und-Xpeo":"peo-Xpeo-IR","und-Xsux":"akk-Xsux-IQ","und-YE":"ar-Arab-YE","und-Yiii":"ii-Yiii-CN","und-YT":"fr-Latn-YT","und-Zanb":"cmg-Zanb-MN","und-ZW":"sn-Latn-ZW",unr:"unr-Beng-IN","unr-Deva":"unr-Deva-NP","unr-NP":"unr-Deva-NP",unx:"unx-Beng-IN",uok:"uok-Latn-ZZ",ur:"ur-Arab-PK",uri:"uri-Latn-ZZ",urt:"urt-Latn-ZZ",urw:"urw-Latn-ZZ",usa:"usa-Latn-ZZ",utr:"utr-Latn-ZZ",uvh:"uvh-Latn-ZZ",uvl:"uvl-Latn-ZZ",uz:"uz-Latn-UZ","uz-AF":"uz-Arab-AF","uz-Arab":"uz-Arab-AF","uz-CN":"uz-Cyrl-CN",vag:"vag-Latn-ZZ",vai:"vai-Vaii-LR",van:"van-Latn-ZZ",ve:"ve-Latn-ZA",vec:"vec-Latn-IT",vep:"vep-Latn-RU",vi:"vi-Latn-VN",vic:"vic-Latn-SX",viv:"viv-Latn-ZZ",vls:"vls-Latn-BE",vmf:"vmf-Latn-DE",vmw:"vmw-Latn-MZ",vo:"vo-Latn-001",vot:"vot-Latn-RU",vro:"vro-Latn-EE",vun:"vun-Latn-TZ",vut:"vut-Latn-ZZ",wa:"wa-Latn-BE",wae:"wae-Latn-CH",waj:"waj-Latn-ZZ",wal:"wal-Ethi-ET",wan:"wan-Latn-ZZ",war:"war-Latn-PH",wbp:"wbp-Latn-AU",wbq:"wbq-Telu-IN",wbr:"wbr-Deva-IN",wci:"wci-Latn-ZZ",wer:"wer-Latn-ZZ",wgi:"wgi-Latn-ZZ",whg:"whg-Latn-ZZ",wib:"wib-Latn-ZZ",wiu:"wiu-Latn-ZZ",wiv:"wiv-Latn-ZZ",wja:"wja-Latn-ZZ",wji:"wji-Latn-ZZ",wls:"wls-Latn-WF",wmo:"wmo-Latn-ZZ",wnc:"wnc-Latn-ZZ",wni:"wni-Arab-KM",wnu:"wnu-Latn-ZZ",wo:"wo-Latn-SN",wob:"wob-Latn-ZZ",wos:"wos-Latn-ZZ",wrs:"wrs-Latn-ZZ",wsg:"wsg-Gong-IN",wsk:"wsk-Latn-ZZ",wtm:"wtm-Deva-IN",wuu:"wuu-Hans-CN",wuv:"wuv-Latn-ZZ",wwa:"wwa-Latn-ZZ",xav:"xav-Latn-BR",xbi:"xbi-Latn-ZZ",xcr:"xcr-Cari-TR",xes:"xes-Latn-ZZ",xh:"xh-Latn-ZA",xla:"xla-Latn-ZZ",xlc:"xlc-Lyci-TR",xld:"xld-Lydi-TR",xmf:"xmf-Geor-GE",xmn:"xmn-Mani-CN",xmr:"xmr-Merc-SD",xna:"xna-Narb-SA",xnr:"xnr-Deva-IN",xog:"xog-Latn-UG",xon:"xon-Latn-ZZ",xpr:"xpr-Prti-IR",xrb:"xrb-Latn-ZZ",xsa:"xsa-Sarb-YE",xsi:"xsi-Latn-ZZ",xsm:"xsm-Latn-ZZ",xsr:"xsr-Deva-NP",xwe:"xwe-Latn-ZZ",yam:"yam-Latn-ZZ",yao:"yao-Latn-MZ",yap:"yap-Latn-FM",yas:"yas-Latn-ZZ",yat:"yat-Latn-ZZ",yav:"yav-Latn-CM",yay:"yay-Latn-ZZ",yaz:"yaz-Latn-ZZ",yba:"yba-Latn-ZZ",ybb:"ybb-Latn-CM",yby:"yby-Latn-ZZ",yer:"yer-Latn-ZZ",ygr:"ygr-Latn-ZZ",ygw:"ygw-Latn-ZZ",yi:"yi-Hebr-001",yko:"yko-Latn-ZZ",yle:"yle-Latn-ZZ",ylg:"ylg-Latn-ZZ",yll:"yll-Latn-ZZ",yml:"yml-Latn-ZZ",yo:"yo-Latn-NG",yon:"yon-Latn-ZZ",yrb:"yrb-Latn-ZZ",yre:"yre-Latn-ZZ",yrl:"yrl-Latn-BR",yss:"yss-Latn-ZZ",yua:"yua-Latn-MX",yue:"yue-Hant-HK","yue-CN":"yue-Hans-CN","yue-Hans":"yue-Hans-CN",yuj:"yuj-Latn-ZZ",yut:"yut-Latn-ZZ",yuw:"yuw-Latn-ZZ",za:"za-Latn-CN",zag:"zag-Latn-SD",zdj:"zdj-Arab-KM",zea:"zea-Latn-NL",zgh:"zgh-Tfng-MA",zh:"zh-Hans-CN","zh-AU":"zh-Hant-AU","zh-BN":"zh-Hant-BN","zh-Bopo":"zh-Bopo-TW","zh-GB":"zh-Hant-GB","zh-GF":"zh-Hant-GF","zh-Hanb":"zh-Hanb-TW","zh-Hant":"zh-Hant-TW","zh-HK":"zh-Hant-HK","zh-ID":"zh-Hant-ID","zh-MO":"zh-Hant-MO","zh-MY":"zh-Hant-MY","zh-PA":"zh-Hant-PA","zh-PF":"zh-Hant-PF","zh-PH":"zh-Hant-PH","zh-SR":"zh-Hant-SR","zh-TH":"zh-Hant-TH","zh-TW":"zh-Hant-TW","zh-US":"zh-Hant-US","zh-VN":"zh-Hant-VN",zhx:"zhx-Nshu-CN",zia:"zia-Latn-ZZ",zlm:"zlm-Latn-TG",zmi:"zmi-Latn-MY",zne:"zne-Latn-ZZ",zu:"zu-Latn-ZA",zza:"zza-Latn-TR"},timeData:{AX:{_allowed:"H",_preferred:"H"},BQ:{_allowed:"H",_preferred:"H"},CP:{_allowed:"H",_preferred:"H"},CZ:{_allowed:"H",_preferred:"H"},DK:{_allowed:"H",_preferred:"H"},FI:{_allowed:"H",_preferred:"H"},ID:{_allowed:"H",_preferred:"H"},IS:{_allowed:"H",_preferred:"H"},ML:{_allowed:"H",_preferred:"H"},NE:{_allowed:"H",_preferred:"H"},RU:{_allowed:"H",_preferred:"H"},SE:{_allowed:"H",_preferred:"H"},SJ:{_allowed:"H",_preferred:"H"},SK:{_allowed:"H",_preferred:"H"},AS:{_allowed:"h H",_preferred:"h"},BT:{_allowed:"h H",_preferred:"h"},DJ:{_allowed:"h H",_preferred:"h"},ER:{_allowed:"h H",_preferred:"h"},GH:{_allowed:"h H",_preferred:"h"},IN:{_allowed:"h H",_preferred:"h"},LS:{_allowed:"h H",_preferred:"h"},PG:{_allowed:"h H",_preferred:"h"},PW:{_allowed:"h H",_preferred:"h"},SO:{_allowed:"h H",_preferred:"h"},TO:{_allowed:"h H",_preferred:"h"},VU:{_allowed:"h H",_preferred:"h"},WS:{_allowed:"h H",_preferred:"h"},"001":{_allowed:"H h",_preferred:"H"},AL:{_allowed:"h H hB",_preferred:"h"},TD:{_allowed:"h H hB",_preferred:"h"},ca_ES:{_allowed:"H h hB",_preferred:"H"},CF:{_allowed:"H h hB",_preferred:"H"},CM:{_allowed:"H h hB",_preferred:"H"},fr_CA:{_allowed:"H h hB",_preferred:"H"},gl_ES:{_allowed:"H h hB",_preferred:"H"},it_CH:{_allowed:"H h hB",_preferred:"H"},it_IT:{_allowed:"H h hB",_preferred:"H"},LU:{_allowed:"H h hB",_preferred:"H"},NP:{_allowed:"H h hB",_preferred:"H"},PF:{_allowed:"H h hB",_preferred:"H"},SC:{_allowed:"H h hB",_preferred:"H"},SM:{_allowed:"H h hB",_preferred:"H"},SN:{_allowed:"H h hB",_preferred:"H"},TF:{_allowed:"H h hB",_preferred:"H"},VA:{_allowed:"H h hB",_preferred:"H"},CY:{_allowed:"h H hb hB",_preferred:"h"},GR:{_allowed:"h H hb hB",_preferred:"h"},CO:{_allowed:"h H hB hb",_preferred:"h"},DO:{_allowed:"h H hB hb",_preferred:"h"},KP:{_allowed:"h H hB hb",_preferred:"h"},KR:{_allowed:"h H hB hb",_preferred:"h"},NA:{_allowed:"h H hB hb",_preferred:"h"},PA:{_allowed:"h H hB hb",_preferred:"h"},PR:{_allowed:"h H hB hb",_preferred:"h"},VE:{_allowed:"h H hB hb",_preferred:"h"},AC:{_allowed:"H h hb hB",_preferred:"H"},AI:{_allowed:"H h hb hB",_preferred:"H"},BW:{_allowed:"H h hb hB",_preferred:"H"},BZ:{_allowed:"H h hb hB",_preferred:"H"},CC:{_allowed:"H h hb hB",_preferred:"H"},CK:{_allowed:"H h hb hB",_preferred:"H"},CX:{_allowed:"H h hb hB",_preferred:"H"},DG:{_allowed:"H h hb hB",_preferred:"H"},FK:{_allowed:"H h hb hB",_preferred:"H"},GB:{_allowed:"H h hb hB",_preferred:"H"},GG:{_allowed:"H h hb hB",_preferred:"H"},GI:{_allowed:"H h hb hB",_preferred:"H"},IE:{_allowed:"H h hb hB",_preferred:"H"},IM:{_allowed:"H h hb hB",_preferred:"H"},IO:{_allowed:"H h hb hB",_preferred:"H"},JE:{_allowed:"H h hb hB",_preferred:"H"},LT:{_allowed:"H h hb hB",_preferred:"H"},MK:{_allowed:"H h hb hB",_preferred:"H"},MN:{_allowed:"H h hb hB",_preferred:"H"},MS:{_allowed:"H h hb hB",_preferred:"H"},NF:{_allowed:"H h hb hB",_preferred:"H"},NG:{_allowed:"H h hb hB",_preferred:"H"},NR:{_allowed:"H h hb hB",_preferred:"H"},NU:{_allowed:"H h hb hB",_preferred:"H"},PN:{_allowed:"H h hb hB",_preferred:"H"},SH:{_allowed:"H h hb hB",_preferred:"H"},SX:{_allowed:"H h hb hB",_preferred:"H"},TA:{_allowed:"H h hb hB",_preferred:"H"},ZA:{_allowed:"H h hb hB",_preferred:"H"},af_ZA:{_allowed:"H h hB hb",_preferred:"H"},AR:{_allowed:"H h hB hb",_preferred:"H"},CL:{_allowed:"H h hB hb",_preferred:"H"},CR:{_allowed:"H h hB hb",_preferred:"H"},CU:{_allowed:"H h hB hb",_preferred:"H"},EA:{_allowed:"H h hB hb",_preferred:"H"},es_BO:{_allowed:"H h hB hb",_preferred:"H"},es_BR:{_allowed:"H h hB hb",_preferred:"H"},es_EC:{_allowed:"H h hB hb",_preferred:"H"},es_ES:{_allowed:"H h hB hb",_preferred:"H"},es_GQ:{_allowed:"H h hB hb",_preferred:"H"},es_PE:{_allowed:"H h hB hb",_preferred:"H"},GT:{_allowed:"H h hB hb",_preferred:"H"},HN:{_allowed:"H h hB hb",_preferred:"H"},IC:{_allowed:"H h hB hb",_preferred:"H"},KG:{_allowed:"H h hB hb",_preferred:"H"},KM:{_allowed:"H h hB hb",_preferred:"H"},LK:{_allowed:"H h hB hb",_preferred:"H"},MA:{_allowed:"H h hB hb",_preferred:"H"},MX:{_allowed:"H h hB hb",_preferred:"H"},NI:{_allowed:"H h hB hb",_preferred:"H"},PY:{_allowed:"H h hB hb",_preferred:"H"},SV:{_allowed:"H h hB hb",_preferred:"H"},UY:{_allowed:"H h hB hb",_preferred:"H"},JP:{_allowed:"H h K",_preferred:"H"},AD:{_allowed:"H hB",_preferred:"H"},AM:{_allowed:"H hB",_preferred:"H"},AO:{_allowed:"H hB",_preferred:"H"},AT:{_allowed:"H hB",_preferred:"H"},AW:{_allowed:"H hB",_preferred:"H"},BE:{_allowed:"H hB",_preferred:"H"},BF:{_allowed:"H hB",_preferred:"H"},BJ:{_allowed:"H hB",_preferred:"H"},BL:{_allowed:"H hB",_preferred:"H"},BR:{_allowed:"H hB",_preferred:"H"},CG:{_allowed:"H hB",_preferred:"H"},CI:{_allowed:"H hB",_preferred:"H"},CV:{_allowed:"H hB",_preferred:"H"},DE:{_allowed:"H hB",_preferred:"H"},EE:{_allowed:"H hB",_preferred:"H"},FR:{_allowed:"H hB",_preferred:"H"},GA:{_allowed:"H hB",_preferred:"H"},GF:{_allowed:"H hB",_preferred:"H"},GN:{_allowed:"H hB",_preferred:"H"},GP:{_allowed:"H hB",_preferred:"H"},GW:{_allowed:"H hB",_preferred:"H"},HR:{_allowed:"H hB",_preferred:"H"},IL:{_allowed:"H hB",_preferred:"H"},IT:{_allowed:"H hB",_preferred:"H"},KZ:{_allowed:"H hB",_preferred:"H"},MC:{_allowed:"H hB",_preferred:"H"},MD:{_allowed:"H hB",_preferred:"H"},MF:{_allowed:"H hB",_preferred:"H"},MQ:{_allowed:"H hB",_preferred:"H"},MZ:{_allowed:"H hB",_preferred:"H"},NC:{_allowed:"H hB",_preferred:"H"},NL:{_allowed:"H hB",_preferred:"H"},PM:{_allowed:"H hB",_preferred:"H"},PT:{_allowed:"H hB",_preferred:"H"},RE:{_allowed:"H hB",_preferred:"H"},RO:{_allowed:"H hB",_preferred:"H"},SI:{_allowed:"H hB",_preferred:"H"},SR:{_allowed:"H hB",_preferred:"H"},ST:{_allowed:"H hB",_preferred:"H"},TG:{_allowed:"H hB",_preferred:"H"},TR:{_allowed:"H hB",_preferred:"H"},WF:{_allowed:"H hB",_preferred:"H"},YT:{_allowed:"H hB",_preferred:"H"},BD:{_allowed:"h hB H",_preferred:"h"},PK:{_allowed:"h hB H",_preferred:"h"},AZ:{_allowed:"H hB h",_preferred:"H"},BA:{_allowed:"H hB h",_preferred:"H"},BG:{_allowed:"H hB h",_preferred:"H"},CH:{_allowed:"H hB h",_preferred:"H"},GE:{_allowed:"H hB h",_preferred:"H"},LI:{_allowed:"H hB h",_preferred:"H"},ME:{_allowed:"H hB h",_preferred:"H"},RS:{_allowed:"H hB h",_preferred:"H"},UA:{_allowed:"H hB h",_preferred:"H"},UZ:{_allowed:"H hB h",_preferred:"H"},XK:{_allowed:"H hB h",_preferred:"H"},AG:{_allowed:"h hb H hB",_preferred:"h"},AU:{_allowed:"h hb H hB",_preferred:"h"},BB:{_allowed:"h hb H hB",_preferred:"h"},BM:{_allowed:"h hb H hB",_preferred:"h"},BS:{_allowed:"h hb H hB",_preferred:"h"},CA:{_allowed:"h hb H hB",_preferred:"h"},DM:{_allowed:"h hb H hB",_preferred:"h"},en_001:{_allowed:"h hb H hB",_preferred:"h"},FJ:{_allowed:"h hb H hB",_preferred:"h"},FM:{_allowed:"h hb H hB",_preferred:"h"},GD:{_allowed:"h hb H hB",_preferred:"h"},GM:{_allowed:"h hb H hB",_preferred:"h"},GU:{_allowed:"h hb H hB",_preferred:"h"},GY:{_allowed:"h hb H hB",_preferred:"h"},JM:{_allowed:"h hb H hB",_preferred:"h"},KI:{_allowed:"h hb H hB",_preferred:"h"},KN:{_allowed:"h hb H hB",_preferred:"h"},KY:{_allowed:"h hb H hB",_preferred:"h"},LC:{_allowed:"h hb H hB",_preferred:"h"},LR:{_allowed:"h hb H hB",_preferred:"h"},MH:{_allowed:"h hb H hB",_preferred:"h"},MP:{_allowed:"h hb H hB",_preferred:"h"},MW:{_allowed:"h hb H hB",_preferred:"h"},NZ:{_allowed:"h hb H hB",_preferred:"h"},SB:{_allowed:"h hb H hB",_preferred:"h"},SG:{_allowed:"h hb H hB",_preferred:"h"},SL:{_allowed:"h hb H hB",_preferred:"h"},SS:{_allowed:"h hb H hB",_preferred:"h"},SZ:{_allowed:"h hb H hB",_preferred:"h"},TC:{_allowed:"h hb H hB",_preferred:"h"},TT:{_allowed:"h hb H hB",_preferred:"h"},UM:{_allowed:"h hb H hB",_preferred:"h"},US:{_allowed:"h hb H hB",_preferred:"h"},VC:{_allowed:"h hb H hB",_preferred:"h"},VG:{_allowed:"h hb H hB",_preferred:"h"},VI:{_allowed:"h hb H hB",_preferred:"h"},ZM:{_allowed:"h hb H hB",_preferred:"h"},BO:{_allowed:"H hB h hb",_preferred:"H"},EC:{_allowed:"H hB h hb",_preferred:"H"},ES:{_allowed:"H hB h hb",_preferred:"H"},GQ:{_allowed:"H hB h hb",_preferred:"H"},PE:{_allowed:"H hB h hb",_preferred:"H"},AE:{_allowed:"h hB hb H",_preferred:"h"},ar_001:{_allowed:"h hB hb H",_preferred:"h"},BH:{_allowed:"h hB hb H",_preferred:"h"},DZ:{_allowed:"h hB hb H",_preferred:"h"},EG:{_allowed:"h hB hb H",_preferred:"h"},EH:{_allowed:"h hB hb H",_preferred:"h"},IQ:{_allowed:"h hB hb H",_preferred:"h"},JO:{_allowed:"h hB hb H",_preferred:"h"},KW:{_allowed:"h hB hb H",_preferred:"h"},LB:{_allowed:"h hB hb H",_preferred:"h"},LY:{_allowed:"h hB hb H",_preferred:"h"},MR:{_allowed:"h hB hb H",_preferred:"h"},OM:{_allowed:"h hB hb H",_preferred:"h"},PH:{_allowed:"h hB hb H",_preferred:"h"},PS:{_allowed:"h hB hb H",_preferred:"h"},QA:{_allowed:"h hB hb H",_preferred:"h"},SA:{_allowed:"h hB hb H",_preferred:"h"},SD:{_allowed:"h hB hb H",_preferred:"h"},SY:{_allowed:"h hB hb H",_preferred:"h"},TN:{_allowed:"h hB hb H",_preferred:"h"},YE:{_allowed:"h hB hb H",_preferred:"h"},AF:{_allowed:"H hb hB h",_preferred:"H"},LA:{_allowed:"H hb hB h",_preferred:"H"},LV:{_allowed:"H hB hb h",_preferred:"H"},TL:{_allowed:"H hB hb h",_preferred:"H"},zu_ZA:{_allowed:"H hB hb h",_preferred:"H"},CD:{_allowed:"hB H",_preferred:"H"},IR:{_allowed:"hB H",_preferred:"H"},hi_IN:{_allowed:"hB h H",_preferred:"h"},kn_IN:{_allowed:"hB h H",_preferred:"h"},ml_IN:{_allowed:"hB h H",_preferred:"h"},te_IN:{_allowed:"hB h H",_preferred:"h"},KH:{_allowed:"hB h H hb",_preferred:"h"},ta_IN:{_allowed:"hB h hb H",_preferred:"h"},BN:{_allowed:"hb hB h H",_preferred:"h"},MY:{_allowed:"hb hB h H",_preferred:"h"},CN:{_allowed:"hB hb h H",_preferred:"h"},ET:{_allowed:"hB hb h H",_preferred:"h"},gu_IN:{_allowed:"hB hb h H",_preferred:"h"},HK:{_allowed:"hB hb h H",_preferred:"h"},MO:{_allowed:"hB hb h H",_preferred:"h"},mr_IN:{_allowed:"hB hb h H",_preferred:"h"},pa_IN:{_allowed:"hB hb h H",_preferred:"h"},TW:{_allowed:"hB hb h H",_preferred:"h"},KE:{_allowed:"hB hb H h",_preferred:"H"},MM:{_allowed:"hB hb H h",_preferred:"H"},TZ:{_allowed:"hB hb H h",_preferred:"H"},UG:{_allowed:"hB hb H h",_preferred:"H"}},weekData:{minDays:{"001":"1",AD:"4",AN:"4",AT:"4",AX:"4",BE:"4",BG:"4",CH:"4",CZ:"4",DE:"4",DK:"4",EE:"4",ES:"4",FI:"4",FJ:"4",FO:"4",FR:"4",GB:"4",GF:"4",GG:"4",GI:"4",GP:"4",GR:"4",GU:"1",HU:"4",IE:"4",IM:"4",IS:"4",IT:"4",JE:"4",LI:"4",LT:"4",LU:"4",MC:"4",MQ:"4",NL:"4",NO:"4",PL:"4",PT:"4",RE:"4",RU:"4",SE:"4",SJ:"4",SK:"4",SM:"4",UM:"1",US:"1",VA:"4",VI:"1"},firstDay:{"001":"mon",AD:"mon",AE:"sat",AF:"sat",AG:"sun",AI:"mon",AL:"mon",AM:"mon",AN:"mon",AR:"mon",AS:"sun",AT:"mon",AU:"sun",AX:"mon",AZ:"mon",BA:"mon",BD:"sun",BE:"mon",BG:"mon",BH:"sat",BM:"mon",BN:"mon",BR:"sun",BS:"sun",BT:"sun",BW:"sun",BY:"mon",BZ:"sun",CA:"sun",CH:"mon",CL:"mon",CM:"mon",CN:"sun",CO:"sun",CR:"mon",CY:"mon",CZ:"mon",DE:"mon",DJ:"sat",DK:"mon",DM:"sun",DO:"sun",DZ:"sat",EC:"mon",EE:"mon",EG:"sat",ES:"mon",ET:"sun",FI:"mon",FJ:"mon",FO:"mon",FR:"mon",GB:"mon","GB-alt-variant":"sun",GE:"mon",GF:"mon",GP:"mon",GR:"mon",GT:"sun",GU:"sun",HK:"sun",HN:"sun",HR:"mon",HU:"mon",ID:"sun",IE:"mon",IL:"sun",IN:"sun",IQ:"sat",IR:"sat",IS:"mon",IT:"mon",JM:"sun",JO:"sat",JP:"sun",KE:"sun",KG:"mon",KH:"sun",KR:"sun",KW:"sat",KZ:"mon",LA:"sun",LB:"mon",LI:"mon",LK:"mon",LT:"mon",LU:"mon",LV:"mon",LY:"sat",MC:"mon",MD:"mon",ME:"mon",MH:"sun",MK:"mon",MM:"sun",MN:"mon",MO:"sun",MQ:"mon",MT:"sun",MV:"fri",MX:"sun",MY:"mon",MZ:"sun",NI:"sun",NL:"mon",NO:"mon",NP:"sun",NZ:"mon",OM:"sat",PA:"sun",PE:"sun",PH:"sun",PK:"sun",PL:"mon",PR:"sun",PT:"sun",PY:"sun",QA:"sat",RE:"mon",RO:"mon",RS:"mon",RU:"mon",SA:"sun",SD:"sat",SE:"mon",SG:"sun",SI:"mon",SK:"mon",SM:"mon",SV:"sun",SY:"sat",TH:"sun",TJ:"mon",TM:"mon",TR:"mon",TT:"sun",TW:"sun",UA:"mon",UM:"sun",US:"sun",UY:"mon",UZ:"mon",VA:"mon",VE:"sun",VI:"sun",VN:"mon",WS:"sun",XK:"mon",YE:"sun",ZA:"sun",ZW:"sun"},weekendStart:{"001":"sat",AE:"fri",AF:"thu",BH:"fri",DZ:"fri",EG:"fri",IL:"fri",IN:"sun",IQ:"fri",IR:"fri",JO:"fri",KW:"fri",LY:"fri",OM:"fri",QA:"fri",SA:"fri",SD:"fri",SY:"fri",UG:"sun",YE:"fri"},weekendEnd:{"001":"sun",AE:"sat",AF:"fri",BH:"sat",DZ:"sat",EG:"sat",IL:"sat",IQ:"sat",IR:"fri",JO:"sat",KW:"sat",LY:"sat",OM:"sat",QA:"sat",SA:"sat",SD:"sat",SY:"sat",YE:"sat"},af:{_ordering:"weekOfDate weekOfInterval weekOfMonth"},"am az bs cs cy da el et hi ky lt mk sk ta th":{_ordering:"weekOfYear weekOfMonth"},"ar fil gu hu hy id kk ko":{_ordering:"weekOfMonth"},"be ro ru":{_ordering:"weekOfInterval weekOfMonth"},"bg de iw pt ur zh":{_ordering:"weekOfDate weekOfMonth weekOfInterval"},"ca es fr gl":{_ordering:"weekOfDate"},"en bn ja ka":{_ordering:"weekOfDate weekOfMonth"},eu:{_ordering:"weekOfMonth weekOfDate"},"fa hr it lv pl si sr uk uz":{_ordering:"weekOfMonth weekOfInterval"},"fi zh-TW":{_ordering:"weekOfYear weekOfDate weekOfMonth"},"is mn no sv vi":{_ordering:"weekOfYear weekOfMonth weekOfInterval"},"km mr":{_ordering:"weekOfMonth weekOfYear"},"kn ml pa":{_ordering:"weekOfMonth weekOfDate weekOfYear"},"lo sq":{_ordering:"weekOfMonth weekOfInterval weekOfDate weekOfYear"},"ms tr":{_ordering:"weekOfMonth weekOfYear weekOfInterval weekOfDate"},nl:{_ordering:"weekOfDate weekOfYear weekOfMonth"},sl:{_ordering:"weekOfInterval"},"sw te":{_ordering:"weekOfMonth weekOfInterval weekOfYear"},und:{_ordering:"weekOfYear"},zu:{_ordering:"weekOfYear weekOfInterval"}},currencyData:{fractions:{ADP:{_rounding:"0",_digits:"0"},AFN:{_rounding:"0",_digits:"0"},ALL:{_rounding:"0",_digits:"0"},AMD:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},BHD:{_rounding:"0",_digits:"3"},BIF:{_rounding:"0",_digits:"0"},BYN:{_rounding:"0",_digits:"2"},BYR:{_rounding:"0",_digits:"0"},CAD:{_rounding:"0",_digits:"2",_cashRounding:"5"},CHF:{_rounding:"0",_digits:"2",_cashRounding:"5"},CLF:{_rounding:"0",_digits:"4"},CLP:{_rounding:"0",_digits:"0"},COP:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},CRC:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},CZK:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},DEFAULT:{_rounding:"0",_digits:"2"},DJF:{_rounding:"0",_digits:"0"},DKK:{_rounding:"0",_digits:"2",_cashRounding:"50"},ESP:{_rounding:"0",_digits:"0"},GNF:{_rounding:"0",_digits:"0"},GYD:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},HUF:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},IDR:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},IQD:{_rounding:"0",_digits:"0"},IRR:{_rounding:"0",_digits:"0"},ISK:{_rounding:"0",_digits:"0"},ITL:{_rounding:"0",_digits:"0"},JOD:{_rounding:"0",_digits:"3"},JPY:{_rounding:"0",_digits:"0"},KMF:{_rounding:"0",_digits:"0"},KPW:{_rounding:"0",_digits:"0"},KRW:{_rounding:"0",_digits:"0"},KWD:{_rounding:"0",_digits:"3"},LAK:{_rounding:"0",_digits:"0"},LBP:{_rounding:"0",_digits:"0"},LUF:{_rounding:"0",_digits:"0"},LYD:{_rounding:"0",_digits:"3"},MGA:{_rounding:"0",_digits:"0"},MGF:{_rounding:"0",_digits:"0"},MMK:{_rounding:"0",_digits:"0"},MNT:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},MRO:{_rounding:"0",_digits:"0"},MUR:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},NOK:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},OMR:{_rounding:"0",_digits:"3"},PKR:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},PYG:{_rounding:"0",_digits:"0"},RSD:{_rounding:"0",_digits:"0"},RWF:{_rounding:"0",_digits:"0"},SEK:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},SLL:{_rounding:"0",_digits:"0"},SOS:{_rounding:"0",_digits:"0"},STD:{_rounding:"0",_digits:"0"},SYP:{_rounding:"0",_digits:"0"},TMM:{_rounding:"0",_digits:"0"},TND:{_rounding:"0",_digits:"3"},TRL:{_rounding:"0",_digits:"0"},TWD:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},TZS:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},UGX:{_rounding:"0",_digits:"0"},UYI:{_rounding:"0",_digits:"0"},UYW:{_rounding:"0",_digits:"4"},UZS:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},VEF:{_rounding:"0",_digits:"2",_cashRounding:"0",_cashDigits:"0"},VND:{_rounding:"0",_digits:"0"},VUV:{_rounding:"0",_digits:"0"},XAF:{_rounding:"0",_digits:"0"},XOF:{_rounding:"0",_digits:"0"},XPF:{_rounding:"0",_digits:"0"},YER:{_rounding:"0",_digits:"0"},ZMK:{_rounding:"0",_digits:"0"},ZWD:{_rounding:"0",_digits:"0"}},region:{AC:[{SHP:{_from:"1976-01-01"}}],AD:[{ESP:{_from:"1873-01-01",_to:"2002-02-28"}},{ADP:{_from:"1936-01-01",_to:"2001-12-31"}},{FRF:{_from:"1960-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],AE:[{AED:{_from:"1973-05-19"}}],AF:[{AFA:{_from:"1927-03-14",_to:"2002-12-31"}},{AFN:{_from:"2002-10-07"}}],AG:[{XCD:{_from:"1965-10-06"}}],AI:[{XCD:{_from:"1965-10-06"}}],AL:[{ALK:{_from:"1946-11-01",_to:"1965-08-16"}},{ALL:{_from:"1965-08-16"}}],AM:[{SUR:{_from:"1961-01-01",_to:"1991-12-25"}},{RUR:{_from:"1991-12-25",_to:"1993-11-22"}},{AMD:{_from:"1993-11-22"}}],AO:[{AOK:{_from:"1977-01-08",_to:"1991-03-01"}},{AON:{_from:"1990-09-25",_to:"2000-02-01"}},{AOR:{_from:"1995-07-01",_to:"2000-02-01"}},{AOA:{_from:"1999-12-13"}}],AQ:[{XXX:{_tender:"false"}}],AR:[{ARM:{_from:"1881-11-05",_to:"1970-01-01"}},{ARL:{_from:"1970-01-01",_to:"1983-06-01"}},{ARP:{_from:"1983-06-01",_to:"1985-06-14"}},{ARA:{_from:"1985-06-14",_to:"1992-01-01"}},{ARS:{_from:"1992-01-01"}}],AS:[{USD:{_from:"1904-07-16"}}],AT:[{ATS:{_from:"1947-12-04",_to:"2002-02-28"}},{EUR:{_from:"1999-01-01"}}],AU:[{AUD:{_from:"1966-02-14"}}],AW:[{ANG:{_from:"1940-05-10",_to:"1986-01-01"}},{AWG:{_from:"1986-01-01"}}],AX:[{EUR:{_from:"1999-01-01"}}],AZ:[{SUR:{_from:"1961-01-01",_to:"1991-12-25"}},{RUR:{_from:"1991-12-25",_to:"1994-01-01"}},{AZM:{_from:"1993-11-22",_to:"2006-12-31"}},{AZN:{_from:"2006-01-01"}}],BA:[{YUD:{_from:"1966-01-01",_to:"1990-01-01"}},{YUN:{_from:"1990-01-01",_to:"1992-07-01"}},{YUR:{_from:"1992-07-01",_to:"1993-10-01"}},{BAD:{_from:"1992-07-01",_to:"1994-08-15"}},{BAN:{_from:"1994-08-15",_to:"1997-07-01"}},{BAM:{_from:"1995-01-01"}}],BB:[{XCD:{_from:"1965-10-06",_to:"1973-12-03"}},{BBD:{_from:"1973-12-03"}}],BD:[{INR:{_from:"1835-08-17",_to:"1948-04-01"}},{PKR:{_from:"1948-04-01",_to:"1972-01-01"}},{BDT:{_from:"1972-01-01"}}],BE:[{NLG:{_from:"1816-12-15",_to:"1831-02-07"}},{BEF:{_from:"1831-02-07",_to:"2002-02-28"}},{BEC:{_tender:"false",_from:"1970-01-01",_to:"1990-03-05"}},{BEL:{_tender:"false",_from:"1970-01-01",_to:"1990-03-05"}},{EUR:{_from:"1999-01-01"}}],BF:[{XOF:{_from:"1984-08-04"}}],BG:[{BGO:{_from:"1879-07-08",_to:"1952-05-12"}},{BGM:{_from:"1952-05-12",_to:"1962-01-01"}},{BGL:{_from:"1962-01-01",_to:"1999-07-05"}},{BGN:{_from:"1999-07-05"}}],BH:[{BHD:{_from:"1965-10-16"}}],BI:[{BIF:{_from:"1964-05-19"}}],BJ:[{XOF:{_from:"1975-11-30"}}],BL:[{FRF:{_from:"1960-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],BM:[{BMD:{_from:"1970-02-06"}}],BN:[{MYR:{_from:"1963-09-16",_to:"1967-06-12"}},{BND:{_from:"1967-06-12"}}],BO:[{BOV:{_tender:"false"}},{BOL:{_from:"1863-06-23",_to:"1963-01-01"}},{BOP:{_from:"1963-01-01",_to:"1986-12-31"}},{BOB:{_from:"1987-01-01"}}],BQ:[{ANG:{_from:"2010-10-10",_to:"2011-01-01"}},{USD:{_from:"2011-01-01"}}],BR:[{BRZ:{_from:"1942-11-01",_to:"1967-02-13"}},{BRB:{_from:"1967-02-13",_to:"1986-02-28"}},{BRC:{_from:"1986-02-28",_to:"1989-01-15"}},{BRN:{_from:"1989-01-15",_to:"1990-03-16"}},{BRE:{_from:"1990-03-16",_to:"1993-08-01"}},{BRR:{_from:"1993-08-01",_to:"1994-07-01"}},{BRL:{_from:"1994-07-01"}}],BS:[{BSD:{_from:"1966-05-25"}}],BT:[{INR:{_from:"1907-01-01"}},{BTN:{_from:"1974-04-16"}}],BU:[{BUK:{_from:"1952-07-01",_to:"1989-06-18"}}],BV:[{NOK:{_from:"1905-06-07"}}],BW:[{ZAR:{_from:"1961-02-14",_to:"1976-08-23"}},{BWP:{_from:"1976-08-23"}}],BY:[{SUR:{_from:"1961-01-01",_to:"1991-12-25"}},{RUR:{_from:"1991-12-25",_to:"1994-11-08"}},{BYB:{_from:"1994-08-01",_to:"2000-12-31"}},{BYR:{_from:"2000-01-01",_to:"2017-01-01"}},{BYN:{_from:"2016-07-01"}}],BZ:[{BZD:{_from:"1974-01-01"}}],CA:[{CAD:{_from:"1858-01-01"}}],CC:[{AUD:{_from:"1966-02-14"}}],CD:[{ZRZ:{_from:"1971-10-27",_to:"1993-11-01"}},{ZRN:{_from:"1993-11-01",_to:"1998-07-01"}},{CDF:{_from:"1998-07-01"}}],CF:[{XAF:{_from:"1993-01-01"}}],CG:[{XAF:{_from:"1993-01-01"}}],CH:[{CHE:{_tender:"false"}},{CHW:{_tender:"false"}},{CHF:{_from:"1799-03-17"}}],CI:[{XOF:{_from:"1958-12-04"}}],CK:[{NZD:{_from:"1967-07-10"}}],CL:[{CLF:{_tender:"false"}},{CLE:{_from:"1960-01-01",_to:"1975-09-29"}},{CLP:{_from:"1975-09-29"}}],CM:[{XAF:{_from:"1973-04-01"}}],CN:[{CNY:{_from:"1953-03-01"}},{CNX:{_tender:"false",_from:"1979-01-01",_to:"1998-12-31"}},{CNH:{_tender:"false",_from:"2010-07-19"}}],CO:[{COU:{_tender:"false"}},{COP:{_from:"1905-01-01"}}],CP:[{XXX:{_tender:"false"}}],CR:[{CRC:{_from:"1896-10-26"}}],CS:[{YUM:{_from:"1994-01-24",_to:"2002-05-15"}},{CSD:{_from:"2002-05-15",_to:"2006-06-03"}},{EUR:{_from:"2003-02-04",_to:"2006-06-03"}}],CU:[{CUP:{_from:"1859-01-01"}},{USD:{_from:"1899-01-01",_to:"1959-01-01"}},{CUC:{_from:"1994-01-01"}}],CV:[{PTE:{_from:"1911-05-22",_to:"1975-07-05"}},{CVE:{_from:"1914-01-01"}}],CW:[{ANG:{_from:"2010-10-10"}}],CX:[{AUD:{_from:"1966-02-14"}}],CY:[{CYP:{_from:"1914-09-10",_to:"2008-01-31"}},{EUR:{_from:"2008-01-01"}}],CZ:[{CSK:{_from:"1953-06-01",_to:"1993-03-01"}},{CZK:{_from:"1993-01-01"}}],DD:[{DDM:{_from:"1948-07-20",_to:"1990-10-02"}}],DE:[{DEM:{_from:"1948-06-20",_to:"2002-02-28"}},{EUR:{_from:"1999-01-01"}}],DG:[{USD:{_from:"1965-11-08"}}],DJ:[{DJF:{_from:"1977-06-27"}}],DK:[{DKK:{_from:"1873-05-27"}}],DM:[{XCD:{_from:"1965-10-06"}}],DO:[{USD:{_from:"1905-06-21",_to:"1947-10-01"}},{DOP:{_from:"1947-10-01"}}],DZ:[{DZD:{_from:"1964-04-01"}}],EA:[{EUR:{_from:"1999-01-01"}}],EC:[{ECS:{_from:"1884-04-01",_to:"2000-10-02"}},{ECV:{_tender:"false",_from:"1993-05-23",_to:"2000-01-09"}},{USD:{_from:"2000-10-02"}}],EE:[{SUR:{_from:"1961-01-01",_to:"1992-06-20"}},{EEK:{_from:"1992-06-21",_to:"2010-12-31"}},{EUR:{_from:"2011-01-01"}}],EG:[{EGP:{_from:"1885-11-14"}}],EH:[{MAD:{_from:"1976-02-26"}}],ER:[{ETB:{_from:"1993-05-24",_to:"1997-11-08"}},{ERN:{_from:"1997-11-08"}}],ES:[{ESP:{_from:"1868-10-19",_to:"2002-02-28"}},{ESB:{_tender:"false",_from:"1975-01-01",_to:"1994-12-31"}},{ESA:{_tender:"false",_from:"1978-01-01",_to:"1981-12-31"}},{EUR:{_from:"1999-01-01"}}],ET:[{ETB:{_from:"1976-09-15"}}],EU:[{XEU:{_tender:"false",_from:"1979-01-01",_to:"1998-12-31"}},{EUR:{_from:"1999-01-01"}}],FI:[{FIM:{_from:"1963-01-01",_to:"2002-02-28"}},{EUR:{_from:"1999-01-01"}}],FJ:[{FJD:{_from:"1969-01-13"}}],FK:[{FKP:{_from:"1901-01-01"}}],FM:[{JPY:{_from:"1914-10-03",_to:"1944-01-01"}},{USD:{_from:"1944-01-01"}}],FO:[{DKK:{_from:"1948-01-01"}}],FR:[{FRF:{_from:"1960-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],GA:[{XAF:{_from:"1993-01-01"}}],GB:[{GBP:{_from:"1694-07-27"}}],GD:[{XCD:{_from:"1967-02-27"}}],GE:[{SUR:{_from:"1961-01-01",_to:"1991-12-25"}},{RUR:{_from:"1991-12-25",_to:"1993-06-11"}},{GEK:{_from:"1993-04-05",_to:"1995-09-25"}},{GEL:{_from:"1995-09-23"}}],GF:[{FRF:{_from:"1960-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],GG:[{GBP:{_from:"1830-01-01"}}],GH:[{GHC:{_from:"1979-03-09",_to:"2007-12-31"}},{GHS:{_from:"2007-07-03"}}],GI:[{GIP:{_from:"1713-01-01"}}],GL:[{DKK:{_from:"1873-05-27"}}],GM:[{GMD:{_from:"1971-07-01"}}],GN:[{GNS:{_from:"1972-10-02",_to:"1986-01-06"}},{GNF:{_from:"1986-01-06"}}],GP:[{FRF:{_from:"1960-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],GQ:[{GQE:{_from:"1975-07-07",_to:"1986-06-01"}},{XAF:{_from:"1993-01-01"}}],GR:[{GRD:{_from:"1954-05-01",_to:"2002-02-28"}},{EUR:{_from:"2001-01-01"}}],GS:[{GBP:{_from:"1908-01-01"}}],GT:[{GTQ:{_from:"1925-05-27"}}],GU:[{USD:{_from:"1944-08-21"}}],GW:[{GWE:{_from:"1914-01-01",_to:"1976-02-28"}},{GWP:{_from:"1976-02-28",_to:"1997-03-31"}},{XOF:{_from:"1997-03-31"}}],GY:[{GYD:{_from:"1966-05-26"}}],HK:[{HKD:{_from:"1895-02-02"}}],HM:[{AUD:{_from:"1967-02-16"}}],HN:[{HNL:{_from:"1926-04-03"}}],HR:[{YUD:{_from:"1966-01-01",_to:"1990-01-01"}},{YUN:{_from:"1990-01-01",_to:"1991-12-23"}},{HRD:{_from:"1991-12-23",_to:"1995-01-01"}},{HRK:{_from:"1994-05-30"}}],HT:[{HTG:{_from:"1872-08-26"}},{USD:{_from:"1915-01-01"}}],HU:[{HUF:{_from:"1946-07-23"}}],IC:[{EUR:{_from:"1999-01-01"}}],ID:[{IDR:{_from:"1965-12-13"}}],IE:[{GBP:{_from:"1800-01-01",_to:"1922-01-01"}},{IEP:{_from:"1922-01-01",_to:"2002-02-09"}},{EUR:{_from:"1999-01-01"}}],IL:[{ILP:{_from:"1948-08-16",_to:"1980-02-22"}},{ILR:{_from:"1980-02-22",_to:"1985-09-04"}},{ILS:{_from:"1985-09-04"}}],IM:[{GBP:{_from:"1840-01-03"}}],IN:[{INR:{_from:"1835-08-17"}}],IO:[{USD:{_from:"1965-11-08"}}],IQ:[{EGP:{_from:"1920-11-11",_to:"1931-04-19"}},{INR:{_from:"1920-11-11",_to:"1931-04-19"}},{IQD:{_from:"1931-04-19"}}],IR:[{IRR:{_from:"1932-05-13"}}],IS:[{DKK:{_from:"1873-05-27",_to:"1918-12-01"}},{ISJ:{_from:"1918-12-01",_to:"1981-01-01"}},{ISK:{_from:"1981-01-01"}}],IT:[{ITL:{_from:"1862-08-24",_to:"2002-02-28"}},{EUR:{_from:"1999-01-01"}}],JE:[{GBP:{_from:"1837-01-01"}}],JM:[{JMD:{_from:"1969-09-08"}}],JO:[{JOD:{_from:"1950-07-01"}}],JP:[{JPY:{_from:"1871-06-01"}}],KE:[{KES:{_from:"1966-09-14"}}],KG:[{SUR:{_from:"1961-01-01",_to:"1991-12-25"}},{RUR:{_from:"1991-12-25",_to:"1993-05-10"}},{KGS:{_from:"1993-05-10"}}],KH:[{KHR:{_from:"1980-03-20"}}],KI:[{AUD:{_from:"1966-02-14"}}],KM:[{KMF:{_from:"1975-07-06"}}],KN:[{XCD:{_from:"1965-10-06"}}],KP:[{KPW:{_from:"1959-04-17"}}],KR:[{KRO:{_from:"1945-08-15",_to:"1953-02-15"}},{KRH:{_from:"1953-02-15",_to:"1962-06-10"}},{KRW:{_from:"1962-06-10"}}],KW:[{KWD:{_from:"1961-04-01"}}],KY:[{JMD:{_from:"1969-09-08",_to:"1971-01-01"}},{KYD:{_from:"1971-01-01"}}],KZ:[{KZT:{_from:"1993-11-05"}}],LA:[{LAK:{_from:"1979-12-10"}}],LB:[{LBP:{_from:"1948-02-02"}}],LC:[{XCD:{_from:"1965-10-06"}}],LI:[{CHF:{_from:"1921-02-01"}}],LK:[{LKR:{_from:"1978-05-22"}}],LR:[{LRD:{_from:"1944-01-01"}}],LS:[{ZAR:{_from:"1961-02-14"}},{LSL:{_from:"1980-01-22"}}],LT:[{SUR:{_from:"1961-01-01",_to:"1992-10-01"}},{LTT:{_from:"1992-10-01",_to:"1993-06-25"}},{LTL:{_from:"1993-06-25",_to:"2014-12-31"}},{EUR:{_from:"2015-01-01"}}],LU:[{LUF:{_from:"1944-09-04",_to:"2002-02-28"}},{LUC:{_tender:"false",_from:"1970-01-01",_to:"1990-03-05"}},{LUL:{_tender:"false",_from:"1970-01-01",_to:"1990-03-05"}},{EUR:{_from:"1999-01-01"}}],LV:[{SUR:{_from:"1961-01-01",_to:"1992-07-20"}},{LVR:{_from:"1992-05-07",_to:"1993-10-17"}},{LVL:{_from:"1993-06-28",_to:"2013-12-31"}},{EUR:{_from:"2014-01-01"}}],LY:[{LYD:{_from:"1971-09-01"}}],MA:[{MAF:{_from:"1881-01-01",_to:"1959-10-17"}},{MAD:{_from:"1959-10-17"}}],MC:[{FRF:{_from:"1960-01-01",_to:"2002-02-17"}},{MCF:{_from:"1960-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],MD:[{MDC:{_from:"1992-06-01",_to:"1993-11-29"}},{MDL:{_from:"1993-11-29"}}],ME:[{YUM:{_from:"1994-01-24",_to:"2002-05-15"}},{DEM:{_from:"1999-10-02",_to:"2002-05-15"}},{EUR:{_from:"2002-01-01"}}],MF:[{FRF:{_from:"1960-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],MG:[{MGF:{_from:"1963-07-01",_to:"2004-12-31"}},{MGA:{_from:"1983-11-01"}}],MH:[{USD:{_from:"1944-01-01"}}],MK:[{MKN:{_from:"1992-04-26",_to:"1993-05-20"}},{MKD:{_from:"1993-05-20"}}],ML:[{XOF:{_from:"1958-11-24",_to:"1962-07-02"}},{MLF:{_from:"1962-07-02",_to:"1984-08-31"}},{XOF:{_from:"1984-06-01"}}],MM:[{BUK:{_from:"1952-07-01",_to:"1989-06-18"}},{MMK:{_from:"1989-06-18"}}],MN:[{MNT:{_from:"1915-03-01"}}],MO:[{MOP:{_from:"1901-01-01"}}],MP:[{USD:{_from:"1944-01-01"}}],MQ:[{FRF:{_from:"1960-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],MR:[{XOF:{_from:"1958-11-28",_to:"1973-06-29"}},{MRO:{_from:"1973-06-29",_to:"2018-06-30"}},{MRU:{_from:"2018-01-01"}}],MS:[{XCD:{_from:"1967-02-27"}}],MT:[{MTP:{_from:"1914-08-13",_to:"1968-06-07"}},{MTL:{_from:"1968-06-07",_to:"2008-01-31"}},{EUR:{_from:"2008-01-01"}}],MU:[{MUR:{_from:"1934-04-01"}}],MV:[{MVP:{_from:"1947-01-01",_to:"1981-07-01"}},{MVR:{_from:"1981-07-01"}}],MW:[{MWK:{_from:"1971-02-15"}}],MX:[{MXV:{_tender:"false"}},{MXP:{_from:"1822-01-01",_to:"1992-12-31"}},{MXN:{_from:"1993-01-01"}}],MY:[{MYR:{_from:"1963-09-16"}}],MZ:[{MZE:{_from:"1975-06-25",_to:"1980-06-16"}},{MZM:{_from:"1980-06-16",_to:"2006-12-31"}},{MZN:{_from:"2006-07-01"}}],NA:[{ZAR:{_from:"1961-02-14"}},{NAD:{_from:"1993-01-01"}}],NC:[{XPF:{_from:"1985-01-01"}}],NE:[{XOF:{_from:"1958-12-19"}}],NF:[{AUD:{_from:"1966-02-14"}}],NG:[{NGN:{_from:"1973-01-01"}}],NI:[{NIC:{_from:"1988-02-15",_to:"1991-04-30"}},{NIO:{_from:"1991-04-30"}}],NL:[{NLG:{_from:"1813-01-01",_to:"2002-02-28"}},{EUR:{_from:"1999-01-01"}}],NO:[{SEK:{_from:"1873-05-27",_to:"1905-06-07"}},{NOK:{_from:"1905-06-07"}}],NP:[{INR:{_from:"1870-01-01",_to:"1966-10-17"}},{NPR:{_from:"1933-01-01"}}],NR:[{AUD:{_from:"1966-02-14"}}],NU:[{NZD:{_from:"1967-07-10"}}],NZ:[{NZD:{_from:"1967-07-10"}}],OM:[{OMR:{_from:"1972-11-11"}}],PA:[{PAB:{_from:"1903-11-04"}},{USD:{_from:"1903-11-18"}}],PE:[{PES:{_from:"1863-02-14",_to:"1985-02-01"}},{PEI:{_from:"1985-02-01",_to:"1991-07-01"}},{PEN:{_from:"1991-07-01"}}],PF:[{XPF:{_from:"1945-12-26"}}],PG:[{AUD:{_from:"1966-02-14",_to:"1975-09-16"}},{PGK:{_from:"1975-09-16"}}],PH:[{PHP:{_from:"1946-07-04"}}],PK:[{INR:{_from:"1835-08-17",_to:"1947-08-15"}},{PKR:{_from:"1948-04-01"}}],PL:[{PLZ:{_from:"1950-10-28",_to:"1994-12-31"}},{PLN:{_from:"1995-01-01"}}],PM:[{FRF:{_from:"1972-12-21",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],PN:[{NZD:{_from:"1969-01-13"}}],PR:[{ESP:{_from:"1800-01-01",_to:"1898-12-10"}},{USD:{_from:"1898-12-10"}}],PS:[{JOD:{_from:"1950-07-01",_to:"1967-06-01"}},{ILP:{_from:"1967-06-01",_to:"1980-02-22"}},{ILS:{_from:"1985-09-04"}},{JOD:{_from:"1996-02-12"}}],PT:[{PTE:{_from:"1911-05-22",_to:"2002-02-28"}},{EUR:{_from:"1999-01-01"}}],PW:[{USD:{_from:"1944-01-01"}}],PY:[{PYG:{_from:"1943-11-01"}}],QA:[{QAR:{_from:"1973-05-19"}}],RE:[{FRF:{_from:"1975-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],RO:[{ROL:{_from:"1952-01-28",_to:"2006-12-31"}},{RON:{_from:"2005-07-01"}}],RS:[{YUM:{_from:"1994-01-24",_to:"2002-05-15"}},{CSD:{_from:"2002-05-15",_to:"2006-10-25"}},{RSD:{_from:"2006-10-25"}}],RU:[{RUR:{_from:"1991-12-25",_to:"1998-12-31"}},{RUB:{_from:"1999-01-01"}}],RW:[{RWF:{_from:"1964-05-19"}}],SA:[{SAR:{_from:"1952-10-22"}}],SB:[{AUD:{_from:"1966-02-14",_to:"1978-06-30"}},{SBD:{_from:"1977-10-24"}}],SC:[{SCR:{_from:"1903-11-01"}}],SD:[{EGP:{_from:"1889-01-19",_to:"1958-01-01"}},{GBP:{_from:"1889-01-19",_to:"1958-01-01"}},{SDP:{_from:"1957-04-08",_to:"1998-06-01"}},{SDD:{_from:"1992-06-08",_to:"2007-06-30"}},{SDG:{_from:"2007-01-10"}}],SE:[{SEK:{_from:"1873-05-27"}}],SG:[{MYR:{_from:"1963-09-16",_to:"1967-06-12"}},{SGD:{_from:"1967-06-12"}}],SH:[{SHP:{_from:"1917-02-15"}}],SI:[{SIT:{_from:"1992-10-07",_to:"2007-01-14"}},{EUR:{_from:"2007-01-01"}}],SJ:[{NOK:{_from:"1905-06-07"}}],SK:[{CSK:{_from:"1953-06-01",_to:"1992-12-31"}},{SKK:{_from:"1992-12-31",_to:"2009-01-01"}},{EUR:{_from:"2009-01-01"}}],SL:[{GBP:{_from:"1808-11-30",_to:"1966-02-04"}},{SLL:{_from:"1964-08-04"}}],SM:[{ITL:{_from:"1865-12-23",_to:"2001-02-28"}},{EUR:{_from:"1999-01-01"}}],SN:[{XOF:{_from:"1959-04-04"}}],SO:[{SOS:{_from:"1960-07-01"}}],SR:[{NLG:{_from:"1815-11-20",_to:"1940-05-10"}},{SRG:{_from:"1940-05-10",_to:"2003-12-31"}},{SRD:{_from:"2004-01-01"}}],SS:[{SDG:{_from:"2007-01-10",_to:"2011-09-01"}},{SSP:{_from:"2011-07-18"}}],ST:[{STD:{_from:"1977-09-08",_to:"2017-12-31"}},{STN:{_from:"2018-01-01"}}],SU:[{SUR:{_from:"1961-01-01",_to:"1991-12-25"}}],SV:[{SVC:{_from:"1919-11-11",_to:"2001-01-01"}},{USD:{_from:"2001-01-01"}}],SX:[{ANG:{_from:"2010-10-10"}}],SY:[{SYP:{_from:"1948-01-01"}}],SZ:[{SZL:{_from:"1974-09-06"}}],TA:[{GBP:{_from:"1938-01-12"}}],TC:[{USD:{_from:"1969-09-08"}}],TD:[{XAF:{_from:"1993-01-01"}}],TF:[{FRF:{_from:"1959-01-01",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],TG:[{XOF:{_from:"1958-11-28"}}],TH:[{THB:{_from:"1928-04-15"}}],TJ:[{RUR:{_from:"1991-12-25",_to:"1995-05-10"}},{TJR:{_from:"1995-05-10",_to:"2000-10-25"}},{TJS:{_from:"2000-10-26"}}],TK:[{NZD:{_from:"1967-07-10"}}],TL:[{TPE:{_from:"1959-01-02",_to:"2002-05-20"}},{IDR:{_from:"1975-12-07",_to:"2002-05-20"}},{USD:{_from:"1999-10-20"}}],TM:[{SUR:{_from:"1961-01-01",_to:"1991-12-25"}},{RUR:{_from:"1991-12-25",_to:"1993-11-01"}},{TMM:{_from:"1993-11-01",_to:"2009-01-01"}},{TMT:{_from:"2009-01-01"}}],TN:[{TND:{_from:"1958-11-01"}}],TO:[{TOP:{_from:"1966-02-14"}}],TP:[{TPE:{_from:"1959-01-02",_to:"2002-05-20"}},{IDR:{_from:"1975-12-07",_to:"2002-05-20"}}],TR:[{TRL:{_from:"1922-11-01",_to:"2005-12-31"}},{TRY:{_from:"2005-01-01"}}],TT:[{TTD:{_from:"1964-01-01"}}],TV:[{AUD:{_from:"1966-02-14"}}],TW:[{TWD:{_from:"1949-06-15"}}],TZ:[{TZS:{_from:"1966-06-14"}}],UA:[{SUR:{_from:"1961-01-01",_to:"1991-12-25"}},{RUR:{_from:"1991-12-25",_to:"1992-11-13"}},{UAK:{_from:"1992-11-13",_to:"1993-10-17"}},{UAH:{_from:"1996-09-02"}}],UG:[{UGS:{_from:"1966-08-15",_to:"1987-05-15"}},{UGX:{_from:"1987-05-15"}}],UM:[{USD:{_from:"1944-01-01"}}],US:[{USN:{_tender:"false"}},{USS:{_tender:"false",_to:"2014-03-01"}},{USD:{_from:"1792-01-01"}}],UY:[{UYI:{_tender:"false"}},{UYW:{_tender:"false"}},{UYP:{_from:"1975-07-01",_to:"1993-03-01"}},{UYU:{_from:"1993-03-01"}}],UZ:[{UZS:{_from:"1994-07-01"}}],VA:[{ITL:{_from:"1870-10-19",_to:"2002-02-28"}},{EUR:{_from:"1999-01-01"}}],VC:[{XCD:{_from:"1965-10-06"}}],VE:[{VEB:{_from:"1871-05-11",_to:"2008-06-30"}},{VEF:{_from:"2008-01-01",_to:"2018-08-20"}},{VES:{_from:"2018-08-20"}}],VG:[{USD:{_from:"1833-01-01"}},{GBP:{_from:"1833-01-01",_to:"1959-01-01"}}],VI:[{USD:{_from:"1837-01-01"}}],VN:[{VNN:{_from:"1978-05-03",_to:"1985-09-14"}},{VND:{_from:"1985-09-14"}}],VU:[{VUV:{_from:"1981-01-01"}}],WF:[{XPF:{_from:"1961-07-30"}}],WS:[{WST:{_from:"1967-07-10"}}],XK:[{YUM:{_from:"1994-01-24",_to:"1999-09-30"}},{DEM:{_from:"1999-09-01",_to:"2002-03-09"}},{EUR:{_from:"2002-01-01"}}],YD:[{YDD:{_from:"1965-04-01",_to:"1996-01-01"}}],YE:[{YER:{_from:"1990-05-22"}}],YT:[{KMF:{_from:"1975-01-01",_to:"1976-02-23"}},{FRF:{_from:"1976-02-23",_to:"2002-02-17"}},{EUR:{_from:"1999-01-01"}}],YU:[{YUD:{_from:"1966-01-01",_to:"1990-01-01"}},{YUN:{_from:"1990-01-01",_to:"1992-07-24"}},{YUM:{_from:"1994-01-24",_to:"2002-05-15"}}],ZA:[{ZAR:{_from:"1961-02-14"}},{ZAL:{_tender:"false",_from:"1985-09-01",_to:"1995-03-13"}}],ZM:[{ZMK:{_from:"1968-01-16",_to:"2013-01-01"}},{ZMW:{_from:"2013-01-01"}}],ZR:[{ZRZ:{_from:"1971-10-27",_to:"1993-11-01"}},{ZRN:{_from:"1993-11-01",_to:"1998-07-31"}}],ZW:[{RHD:{_from:"1970-02-17",_to:"1980-04-18"}},{ZWD:{_from:"1980-04-18",_to:"2008-08-01"}},{ZWR:{_from:"2008-08-01",_to:"2009-02-02"}},{ZWL:{_from:"2009-02-02",_to:"2009-04-12"}},{USD:{_from:"2009-04-12"}}],ZZ:[{XAG:{_tender:"false"}},{XAU:{_tender:"false"}},{XBA:{_tender:"false"}},{XBB:{_tender:"false"}},{XBC:{_tender:"false"}},{XBD:{_tender:"false"}},{XDR:{_tender:"false"}},{XPD:{_tender:"false"}},{XPT:{_tender:"false"}},{XSU:{_tender:"false"}},{XTS:{_tender:"false"}},{XUA:{_tender:"false"}},{XXX:{_tender:"false"}},{XRE:{_tender:"false",_to:"1999-11-30"}},{XFU:{_tender:"false",_to:"2013-11-30"}},{XFO:{_tender:"false",_from:"1930-01-01",_to:"2003-04-01"}}]}},numberingSystems:{adlm:{_digits:"\ud83a\udd50\ud83a\udd51\ud83a\udd52\ud83a\udd53\ud83a\udd54\ud83a\udd55\ud83a\udd56\ud83a\udd57\ud83a\udd58\ud83a\udd59",_type:"numeric"},ahom:{_digits:"\ud805\udf30\ud805\udf31\ud805\udf32\ud805\udf33\ud805\udf34\ud805\udf35\ud805\udf36\ud805\udf37\ud805\udf38\ud805\udf39",_type:"numeric"},arab:{_digits:"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669",_type:"numeric"},arabext:{_digits:"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9",_type:"numeric"},armn:{_rules:"armenian-upper",_type:"algorithmic"},armnlow:{_rules:"armenian-lower",_type:"algorithmic"},bali:{_digits:"\u1b50\u1b51\u1b52\u1b53\u1b54\u1b55\u1b56\u1b57\u1b58\u1b59",_type:"numeric"},beng:{_digits:"\u09e6\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef",_type:"numeric"},bhks:{_digits:"\ud807\udc50\ud807\udc51\ud807\udc52\ud807\udc53\ud807\udc54\ud807\udc55\ud807\udc56\ud807\udc57\ud807\udc58\ud807\udc59",_type:"numeric"},brah:{_digits:"\ud804\udc66\ud804\udc67\ud804\udc68\ud804\udc69\ud804\udc6a\ud804\udc6b\ud804\udc6c\ud804\udc6d\ud804\udc6e\ud804\udc6f",_type:"numeric"},cakm:{_digits:"\ud804\udd36\ud804\udd37\ud804\udd38\ud804\udd39\ud804\udd3a\ud804\udd3b\ud804\udd3c\ud804\udd3d\ud804\udd3e\ud804\udd3f",_type:"numeric"},cham:{_digits:"\uaa50\uaa51\uaa52\uaa53\uaa54\uaa55\uaa56\uaa57\uaa58\uaa59",_type:"numeric"},cyrl:{_rules:"cyrillic-lower",_type:"algorithmic"},deva:{_digits:"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f",_type:"numeric"},ethi:{_rules:"ethiopic",_type:"algorithmic"},fullwide:{_digits:"\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19",_type:"numeric"},geor:{_rules:"georgian",_type:"algorithmic"},gong:{_digits:"\ud807\udda0\ud807\udda1\ud807\udda2\ud807\udda3\ud807\udda4\ud807\udda5\ud807\udda6\ud807\udda7\ud807\udda8\ud807\udda9",_type:"numeric"},gonm:{_digits:"\ud807\udd50\ud807\udd51\ud807\udd52\ud807\udd53\ud807\udd54\ud807\udd55\ud807\udd56\ud807\udd57\ud807\udd58\ud807\udd59",_type:"numeric"},grek:{_rules:"greek-upper",_type:"algorithmic"},greklow:{_rules:"greek-lower",_type:"algorithmic"},gujr:{_digits:"\u0ae6\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef",_type:"numeric"},guru:{_digits:"\u0a66\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f",_type:"numeric"},hanidays:{_rules:"zh/SpelloutRules/spellout-numbering-days",_type:"algorithmic"},hanidec:{_digits:"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",_type:"numeric"},hans:{_rules:"zh/SpelloutRules/spellout-cardinal",_type:"algorithmic"},hansfin:{_rules:"zh/SpelloutRules/spellout-cardinal-financial",_type:"algorithmic"},hant:{_rules:"zh_Hant/SpelloutRules/spellout-cardinal",_type:"algorithmic"},hantfin:{_rules:"zh_Hant/SpelloutRules/spellout-cardinal-financial",_type:"algorithmic"},hebr:{_rules:"hebrew",_type:"algorithmic"},hmng:{_digits:"\ud81a\udf50\ud81a\udf51\ud81a\udf52\ud81a\udf53\ud81a\udf54\ud81a\udf55\ud81a\udf56\ud81a\udf57\ud81a\udf58\ud81a\udf59",_type:"numeric"},hmnp:{_digits:"\ud838\udd40\ud838\udd41\ud838\udd42\ud838\udd43\ud838\udd44\ud838\udd45\ud838\udd46\ud838\udd47\ud838\udd48\ud838\udd49",_type:"numeric"},java:{_digits:"\ua9d0\ua9d1\ua9d2\ua9d3\ua9d4\ua9d5\ua9d6\ua9d7\ua9d8\ua9d9",_type:"numeric"},jpan:{_rules:"ja/SpelloutRules/spellout-cardinal",_type:"algorithmic"},jpanfin:{_rules:"ja/SpelloutRules/spellout-cardinal-financial",_type:"algorithmic"},jpanyear:{_rules:"ja/SpelloutRules/spellout-numbering-year-latn",_type:"algorithmic"},kali:{_digits:"\ua900\ua901\ua902\ua903\ua904\ua905\ua906\ua907\ua908\ua909",_type:"numeric"},khmr:{_digits:"\u17e0\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9",_type:"numeric"},knda:{_digits:"\u0ce6\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef",_type:"numeric"},lana:{_digits:"\u1a80\u1a81\u1a82\u1a83\u1a84\u1a85\u1a86\u1a87\u1a88\u1a89",_type:"numeric"},lanatham:{_digits:"\u1a90\u1a91\u1a92\u1a93\u1a94\u1a95\u1a96\u1a97\u1a98\u1a99",_type:"numeric"},laoo:{_digits:"\u0ed0\u0ed1\u0ed2\u0ed3\u0ed4\u0ed5\u0ed6\u0ed7\u0ed8\u0ed9",_type:"numeric"},latn:{_digits:"0123456789",_type:"numeric"},lepc:{_digits:"\u1c40\u1c41\u1c42\u1c43\u1c44\u1c45\u1c46\u1c47\u1c48\u1c49",_type:"numeric"},limb:{_digits:"\u1946\u1947\u1948\u1949\u194a\u194b\u194c\u194d\u194e\u194f",_type:"numeric"},mathbold:{_digits:"\ud835\udfce\ud835\udfcf\ud835\udfd0\ud835\udfd1\ud835\udfd2\ud835\udfd3\ud835\udfd4\ud835\udfd5\ud835\udfd6\ud835\udfd7",_type:"numeric"},mathdbl:{_digits:"\ud835\udfd8\ud835\udfd9\ud835\udfda\ud835\udfdb\ud835\udfdc\ud835\udfdd\ud835\udfde\ud835\udfdf\ud835\udfe0\ud835\udfe1",_type:"numeric"},mathmono:{_digits:"\ud835\udff6\ud835\udff7\ud835\udff8\ud835\udff9\ud835\udffa\ud835\udffb\ud835\udffc\ud835\udffd\ud835\udffe\ud835\udfff",_type:"numeric"},mathsanb:{_digits:"\ud835\udfec\ud835\udfed\ud835\udfee\ud835\udfef\ud835\udff0\ud835\udff1\ud835\udff2\ud835\udff3\ud835\udff4\ud835\udff5",_type:"numeric"},mathsans:{_digits:"\ud835\udfe2\ud835\udfe3\ud835\udfe4\ud835\udfe5\ud835\udfe6\ud835\udfe7\ud835\udfe8\ud835\udfe9\ud835\udfea\ud835\udfeb",_type:"numeric"},mlym:{_digits:"\u0d66\u0d67\u0d68\u0d69\u0d6a\u0d6b\u0d6c\u0d6d\u0d6e\u0d6f",_type:"numeric"},modi:{_digits:"\ud805\ude50\ud805\ude51\ud805\ude52\ud805\ude53\ud805\ude54\ud805\ude55\ud805\ude56\ud805\ude57\ud805\ude58\ud805\ude59",_type:"numeric"},mong:{_digits:"\u1810\u1811\u1812\u1813\u1814\u1815\u1816\u1817\u1818\u1819",_type:"numeric"},mroo:{_digits:"\ud81a\ude60\ud81a\ude61\ud81a\ude62\ud81a\ude63\ud81a\ude64\ud81a\ude65\ud81a\ude66\ud81a\ude67\ud81a\ude68\ud81a\ude69",_type:"numeric"},mtei:{_digits:"\uabf0\uabf1\uabf2\uabf3\uabf4\uabf5\uabf6\uabf7\uabf8\uabf9",_type:"numeric"},mymr:{_digits:"\u1040\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049",_type:"numeric"},mymrshan:{_digits:"\u1090\u1091\u1092\u1093\u1094\u1095\u1096\u1097\u1098\u1099",_type:"numeric"},mymrtlng:{_digits:"\ua9f0\ua9f1\ua9f2\ua9f3\ua9f4\ua9f5\ua9f6\ua9f7\ua9f8\ua9f9",_type:"numeric"},newa:{_digits:"\ud805\udc50\ud805\udc51\ud805\udc52\ud805\udc53\ud805\udc54\ud805\udc55\ud805\udc56\ud805\udc57\ud805\udc58\ud805\udc59",_type:"numeric"},nkoo:{_digits:"\u07c0\u07c1\u07c2\u07c3\u07c4\u07c5\u07c6\u07c7\u07c8\u07c9",_type:"numeric"},olck:{_digits:"\u1c50\u1c51\u1c52\u1c53\u1c54\u1c55\u1c56\u1c57\u1c58\u1c59",_type:"numeric"},orya:{_digits:"\u0b66\u0b67\u0b68\u0b69\u0b6a\u0b6b\u0b6c\u0b6d\u0b6e\u0b6f",_type:"numeric"},osma:{_digits:"\ud801\udca0\ud801\udca1\ud801\udca2\ud801\udca3\ud801\udca4\ud801\udca5\ud801\udca6\ud801\udca7\ud801\udca8\ud801\udca9",_type:"numeric"},rohg:{_digits:"\ud803\udd30\ud803\udd31\ud803\udd32\ud803\udd33\ud803\udd34\ud803\udd35\ud803\udd36\ud803\udd37\ud803\udd38\ud803\udd39",_type:"numeric"},roman:{_rules:"roman-upper",_type:"algorithmic"},romanlow:{_rules:"roman-lower",_type:"algorithmic"},saur:{_digits:"\ua8d0\ua8d1\ua8d2\ua8d3\ua8d4\ua8d5\ua8d6\ua8d7\ua8d8\ua8d9",_type:"numeric"},shrd:{_digits:"\ud804\uddd0\ud804\uddd1\ud804\uddd2\ud804\uddd3\ud804\uddd4\ud804\uddd5\ud804\uddd6\ud804\uddd7\ud804\uddd8\ud804\uddd9",_type:"numeric"},sind:{_digits:"\ud804\udef0\ud804\udef1\ud804\udef2\ud804\udef3\ud804\udef4\ud804\udef5\ud804\udef6\ud804\udef7\ud804\udef8\ud804\udef9",_type:"numeric"},sinh:{_digits:"\u0de6\u0de7\u0de8\u0de9\u0dea\u0deb\u0dec\u0ded\u0dee\u0def",_type:"numeric"},sora:{_digits:"\ud804\udcf0\ud804\udcf1\ud804\udcf2\ud804\udcf3\ud804\udcf4\ud804\udcf5\ud804\udcf6\ud804\udcf7\ud804\udcf8\ud804\udcf9",_type:"numeric"},sund:{_digits:"\u1bb0\u1bb1\u1bb2\u1bb3\u1bb4\u1bb5\u1bb6\u1bb7\u1bb8\u1bb9",_type:"numeric"},takr:{_digits:"\ud805\udec0\ud805\udec1\ud805\udec2\ud805\udec3\ud805\udec4\ud805\udec5\ud805\udec6\ud805\udec7\ud805\udec8\ud805\udec9",_type:"numeric"},talu:{_digits:"\u19d0\u19d1\u19d2\u19d3\u19d4\u19d5\u19d6\u19d7\u19d8\u19d9",_type:"numeric"},taml:{_rules:"tamil",_type:"algorithmic"},tamldec:{_digits:"\u0be6\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef",_type:"numeric"},telu:{_digits:"\u0c66\u0c67\u0c68\u0c69\u0c6a\u0c6b\u0c6c\u0c6d\u0c6e\u0c6f",_type:"numeric"},thai:{_digits:"\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59",_type:"numeric"},tibt:{_digits:"\u0f20\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29",_type:"numeric"},tirh:{_digits:"\ud805\udcd0\ud805\udcd1\ud805\udcd2\ud805\udcd3\ud805\udcd4\ud805\udcd5\ud805\udcd6\ud805\udcd7\ud805\udcd8\ud805\udcd9",_type:"numeric"},vaii:{_digits:"\ua620\ua621\ua622\ua623\ua624\ua625\ua626\ua627\ua628\ua629",_type:"numeric"},wara:{_digits:"\ud806\udce0\ud806\udce1\ud806\udce2\ud806\udce3\ud806\udce4\ud806\udce5\ud806\udce6\ud806\udce7\ud806\udce8\ud806\udce9",_type:"numeric"},wcho:{_digits:"\ud838\udef0\ud838\udef1\ud838\udef2\ud838\udef3\ud838\udef4\ud838\udef5\ud838\udef6\ud838\udef7\ud838\udef8\ud838\udef9",_type:"numeric"}}}}},84109:function(e,t,i){t.default=void 0;var n=s(i(89656)),o=s(i(85703)),a=s(i(55088));function s(e){return e&&e.__esModule?e:{default:e}}const r="en";t.default=(0,n.default)({locale:(()=>{let e=r;return t=>{if(!t)return e;e=t}})(),getValueByClosestLocale:function(e){let t,i=this.locale(),n=e(i);for(;!n&&!t;)i=(0,a.default)(o.default,i),i?n=e(i):t=!0;return void 0===n&&i!==r?e(r):n}});e.exports=t.default,e.exports.default=t.default},17333:function(e,t,i){t.default=void 0;var n=i(52576);t.default={_formatNumberCore:function(e,t,i){if("currency"===t){i.precision=i.precision||0;let t=this.format(e,(0,n.extend)({},i,{type:"fixedpoint"}));const o=this.getCurrencySymbol().symbol.replace(/\$/g,"$$$$");return t=t.replace(/^(\D*)(\d.*)/,"$1"+o+"$2"),t}return this.callBase.apply(this,arguments)},getCurrencySymbol:function(){return{symbol:"$"}},getOpenXmlCurrencyFormat:function(){return"$#,##0{0}_);\\($#,##0{0}\\)"}};e.exports=t.default,e.exports.default=t.default},38662:function(e,t,i){t.default=void 0;var n=_(i(89656)),o=i(11528),a=i(21274),s=_(i(87129)),r=i(86670),l=i(83445),d=i(46981),u=_(i(81179)),c=_(i(29908)),h=_(i(84109)),p=_(i(52771)),g=_(i(21840));function _(e){return e&&e.__esModule?e:{default:e}}const f="undefined"!=typeof Intl,m={shortdate:"M/d/y",shorttime:"h:mm a",longdate:"EEEE, MMMM d, y",longtime:"h:mm:ss a",monthandday:"MMMM d",monthandyear:"MMMM y",quarterandyear:"QQQ y",day:"d",year:"y",shortdateshorttime:"M/d/y, h:mm a",longdatelongtime:"EEEE, MMMM d, y, h:mm:ss a",month:"LLLL",shortyear:"yy",dayofweek:"EEEE",quarter:"QQQ",hour:"HH",minute:"mm",second:"ss",millisecond:"SSS","datetime-local":"yyyy-MM-ddTHH':'mm':'ss"},v={year:["y","yy","yyyy"],day:["d","dd"],month:["M","MM","MMM","MMMM"],hours:["H","HH","h","hh","ah"],minutes:["m","mm"],seconds:["s","ss"],milliseconds:["S","SS","SSS"]},C=(0,n.default)({engine:function(){return"base"},_getPatternByFormat:function(e){return m[e.toLowerCase()]},_expandPattern:function(e){return this._getPatternByFormat(e)||e},formatUsesMonthName:function(e){return-1!==this._expandPattern(e).indexOf("MMMM")},formatUsesDayName:function(e){return-1!==this._expandPattern(e).indexOf("EEEE")},getFormatParts:function(e){const t=this._getPatternByFormat(e)||e,i=[];return(0,a.each)(t.split(/\W+/),((e,t)=>{(0,a.each)(v,((e,n)=>{n.includes(t)&&i.push(e)}))})),i},getMonthNames:function(e){return u.default.getMonthNames(e)},getDayNames:function(e){return u.default.getDayNames(e)},getQuarterNames:function(e){return u.default.getQuarterNames(e)},getPeriodNames:function(e){return u.default.getPeriodNames(e)},getTimeSeparator:function(){return":"},is24HourFormat:function(e){const t=new Date(2017,0,20,11,0,0,0),i=new Date(2017,0,20,23,0,0,0),n=this.format(t,e),o=this.format(i,e);for(let e=0;e<n.length;e++)if(n[e]!==o[e])return!isNaN(parseInt(n[e]))},format:function(e,t){if(!e)return;if(!t)return e;let i;if("function"==typeof t)i=t;else if(t.formatter)i=t.formatter;else if(t=t.type||t,(0,o.isString)(t))return t=m[t.toLowerCase()]||t,p.default.convertDigits((0,r.getFormatter)(t,this)(e));return i?i(e):void 0},parse:function(e,t){const i=this;let n,o;if(!e)return;if(!t)return this.parse(e,"shortdate");if(t.parser)return t.parser(e);if("string"!=typeof t||m[t.toLowerCase()]){o=e=>{const n=i.format(e,t);return p.default.convertDigits(n,!0)};try{n=(0,l.getFormat)(o)}catch(e){}}else n=t;if(n)return e=p.default.convertDigits(e,!0),(0,d.getParser)(n,this)(e);s.default.log("W0012");const a=new Date(e);return a&&!isNaN(a.getTime())?a:void 0},firstDayOfWeekIndex:function(){const e=h.default.getValueByClosestLocale((e=>c.default[e]));return void 0===e?0:e}});f&&C.inject(g.default);t.default=C;e.exports=t.default,e.exports.default=t.default},81179:function(e,t,i){t.default=void 0;var n=i(21274);const o=["January","February","March","April","May","June","July","August","September","October","November","December"],a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s=["AM","PM"],r=["Q1","Q2","Q3","Q4"],l=(e,t)=>{const i={abbreviated:3,short:2,narrow:1};return(0,n.map)(e,(e=>e.substr(0,i[t])))};t.default={getMonthNames:function(e){return l(o,e)},getDayNames:function(e){return l(a,e)},getQuarterNames:function(e){return r},getPeriodNames:function(e){return s}};e.exports=t.default,e.exports.default=t.default},62788:function(e,t){t.defaultMessages=void 0;
// !!! AUTO-GENERATED FILE, DO NOT EDIT
t.defaultMessages={en:{Yes:"Yes",No:"No",Cancel:"Cancel",CheckState:"Check state",Close:"Close",Clear:"Clear",Done:"Done",Loading:"Loading...",Select:"Select...",Search:"Search",Back:"Back",OK:"OK",Today:"Today",Yesterday:"Yesterday","dxCollectionWidget-noDataText":"No data to display","dxDropDownEditor-selectLabel":"Select","validation-required":"Required","validation-required-formatted":"{0} is required","validation-numeric":"Value must be a number","validation-numeric-formatted":"{0} must be a number","validation-range":"Value is out of range","validation-range-formatted":"{0} is out of range","validation-stringLength":"The length of the value is not correct","validation-stringLength-formatted":"The length of {0} is not correct","validation-custom":"Value is invalid","validation-custom-formatted":"{0} is invalid","validation-async":"Value is invalid","validation-async-formatted":"{0} is invalid","validation-compare":"Values do not match","validation-compare-formatted":"{0} does not match","validation-pattern":"Value does not match pattern","validation-pattern-formatted":"{0} does not match pattern","validation-email":"Email is invalid","validation-email-formatted":"{0} is invalid","validation-mask":"Value is invalid","dxLookup-searchPlaceholder":"Minimum character number: {0}","dxList-pullingDownText":"Pull down to refresh...","dxList-pulledDownText":"Release to refresh...","dxList-refreshingText":"Refreshing...","dxList-pageLoadingText":"Loading...","dxList-nextButtonText":"More","dxList-selectAll":"Select All","dxList-listAriaLabel":"Items","dxList-listAriaLabel-deletable":"Deletable items","dxListEditDecorator-delete":"Delete","dxListEditDecorator-more":"More","dxList-selectAll-indeterminate":"Half-checked","dxList-selectAll-checked":"Checked","dxList-selectAll-notChecked":"Not checked","dxScrollView-pullingDownText":"Pull down to refresh...","dxScrollView-pulledDownText":"Release to refresh...","dxScrollView-refreshingText":"Refreshing...","dxScrollView-reachBottomText":"Loading...","dxDateBox-simulatedDataPickerTitleTime":"Select time","dxDateBox-simulatedDataPickerTitleDate":"Select date","dxDateBox-simulatedDataPickerTitleDateTime":"Select date and time","dxDateBox-validation-datetime":"Value must be a date or time","dxDateRangeBox-invalidStartDateMessage":"Start value must be a date","dxDateRangeBox-invalidEndDateMessage":"End value must be a date","dxDateRangeBox-startDateOutOfRangeMessage":"Start date is out of range","dxDateRangeBox-endDateOutOfRangeMessage":"End date is out of range","dxDateRangeBox-startDateLabel":"Start Date","dxDateRangeBox-endDateLabel":"End Date","dxFileUploader-selectFile":"Select a file","dxFileUploader-dropFile":"or Drop a file here","dxFileUploader-bytes":"bytes","dxFileUploader-kb":"KB","dxFileUploader-Mb":"MB","dxFileUploader-Gb":"GB","dxFileUploader-upload":"Upload","dxFileUploader-uploaded":"Uploaded","dxFileUploader-readyToUpload":"Ready to upload","dxFileUploader-uploadAbortedMessage":"Upload cancelled","dxFileUploader-uploadFailedMessage":"Upload failed","dxFileUploader-invalidFileExtension":"File type is not allowed","dxFileUploader-invalidMaxFileSize":"File is too large","dxFileUploader-invalidMinFileSize":"File is too small","dxRangeSlider-ariaFrom":"From","dxRangeSlider-ariaTill":"Till","dxSwitch-switchedOnText":"ON","dxSwitch-switchedOffText":"OFF","dxForm-optionalMark":"optional","dxForm-requiredMessage":"{0} is required","dxNumberBox-invalidValueMessage":"Value must be a number","dxNumberBox-noDataText":"No data","dxDataGrid-emptyHeaderWithColumnChooserText":"Use {0} to display columns","dxDataGrid-emptyHeaderWithGroupPanelText":"Drag a column from the group panel here","dxDataGrid-emptyHeaderWithColumnChooserAndGroupPanelText":"Use {0} or drag a column from the group panel","dxDataGrid-emptyHeaderColumnChooserText":"column chooser","dxDataGrid-columnChooserTitle":"Column Chooser","dxDataGrid-columnChooserEmptyText":"Drag a column here to hide it","dxDataGrid-groupContinuesMessage":"Continues on the next page","dxDataGrid-groupContinuedMessage":"Continued from the previous page","dxDataGrid-groupHeaderText":"Group by This Column","dxDataGrid-ungroupHeaderText":"Ungroup","dxDataGrid-ungroupAllText":"Ungroup All","dxDataGrid-editingEditRow":"Edit","dxDataGrid-editingSaveRowChanges":"Save","dxDataGrid-editingCancelRowChanges":"Cancel","dxDataGrid-editingDeleteRow":"Delete","dxDataGrid-editingUndeleteRow":"Undelete","dxDataGrid-editingConfirmDeleteMessage":"Are you sure you want to delete this record?","dxDataGrid-validationCancelChanges":"Cancel changes","dxDataGrid-groupPanelEmptyText":"Drag a column header here to group by that column","dxDataGrid-noDataText":"No data","dxDataGrid-searchPanelPlaceholder":"Search...","dxDataGrid-filterRowShowAllText":"(All)","dxDataGrid-filterRowResetOperationText":"Reset","dxDataGrid-filterRowOperationEquals":"Equals","dxDataGrid-filterRowOperationNotEquals":"Does not equal","dxDataGrid-filterRowOperationLess":"Less than","dxDataGrid-filterRowOperationLessOrEquals":"Less than or equal to","dxDataGrid-filterRowOperationGreater":"Greater than","dxDataGrid-filterRowOperationGreaterOrEquals":"Greater than or equal to","dxDataGrid-filterRowOperationStartsWith":"Starts with","dxDataGrid-filterRowOperationContains":"Contains","dxDataGrid-filterRowOperationNotContains":"Does not contain","dxDataGrid-filterRowOperationEndsWith":"Ends with","dxDataGrid-filterRowOperationBetween":"Between","dxDataGrid-filterRowOperationBetweenStartText":"Start","dxDataGrid-filterRowOperationBetweenEndText":"End","dxDataGrid-ariaSearchBox":"Search box","dxDataGrid-applyFilterText":"Apply filter","dxDataGrid-trueText":"true","dxDataGrid-falseText":"false","dxDataGrid-sortingAscendingText":"Sort Ascending","dxDataGrid-sortingDescendingText":"Sort Descending","dxDataGrid-sortingClearText":"Clear Sorting","dxDataGrid-ariaNotSortedColumn":"Not sorted column","dxDataGrid-ariaSortedAscendingColumn":"Column sorted in ascending order","dxDataGrid-ariaSortedDescendingColumn":"Column sorted in descending order","dxDataGrid-ariaSortIndex":"Sort index {0}","dxDataGrid-editingSaveAllChanges":"Save changes","dxDataGrid-editingCancelAllChanges":"Discard changes","dxDataGrid-editingAddRow":"Add a row","dxDataGrid-summaryMin":"Min: {0}","dxDataGrid-summaryMinOtherColumn":"Min of {1} is {0}","dxDataGrid-summaryMax":"Max: {0}","dxDataGrid-summaryMaxOtherColumn":"Max of {1} is {0}","dxDataGrid-summaryAvg":"Avg: {0}","dxDataGrid-summaryAvgOtherColumn":"Avg of {1} is {0}","dxDataGrid-summarySum":"Sum: {0}","dxDataGrid-summarySumOtherColumn":"Sum of {1} is {0}","dxDataGrid-summaryCount":"Count: {0}","dxDataGrid-columnFixingFix":"Set Fixed Position","dxDataGrid-columnFixingUnfix":"Unfix","dxDataGrid-columnFixingLeftPosition":"Left","dxDataGrid-columnFixingRightPosition":"Right","dxDataGrid-columnFixingStickyPosition":"Sticky","dxDataGrid-exportTo":"Export","dxDataGrid-exportToExcel":"Export to Excel file","dxDataGrid-exporting":"Exporting...","dxDataGrid-excelFormat":"Excel file","dxDataGrid-selectedRows":"Selected rows","dxDataGrid-exportSelectedRows":"Export selected rows to {0}","dxDataGrid-exportAll":"Export all data to {0}","dxDataGrid-headerFilterLabel":"Filter options","dxDataGrid-headerFilterIndicatorLabel":"Show filter options for column '{0}'","dxDataGrid-headerFilterEmptyValue":"(Blanks)","dxDataGrid-headerFilterOK":"OK","dxDataGrid-headerFilterCancel":"Cancel","dxDataGrid-ariaAdaptiveCollapse":"Hide additional data","dxDataGrid-ariaAdaptiveExpand":"Display additional data","dxDataGrid-ariaColumn":"Column","dxDataGrid-ariaColumnHeader":"Column header","dxDataGrid-ariaValue":"Value","dxDataGrid-ariaError":"Error","dxDataGrid-ariaRevertButton":"Press Escape to discard the changes","dxDataGrid-ariaFilterCell":"Filter cell","dxDataGrid-ariaCollapse":"Collapse","dxDataGrid-ariaModifiedCell":"Modified","dxDataGrid-ariaDeletedCell":"Deleted","dxDataGrid-ariaEditableCell":"Editable","dxDataGrid-ariaExpand":"Expand","dxDataGrid-ariaCollapsedRow":"Collapsed row","dxDataGrid-ariaExpandedRow":"Expanded row","dxDataGrid-ariaDataGrid":"Data grid with {0} rows and {1} columns","dxDataGrid-ariaSearchInGrid":"Search in the data grid","dxDataGrid-ariaSelectAll":"Select all","dxDataGrid-ariaSelectRow":"Select row","dxDataGrid-ariaToolbar":"Data grid toolbar","dxDataGrid-ariaEditForm":"Edit form","dxDataGrid-filterBuilderPopupTitle":"Filter Builder","dxDataGrid-filterPanelCreateFilter":"Create Filter","dxDataGrid-filterPanelClearFilter":"Clear","dxDataGrid-filterPanelFilterEnabledHint":"Enable the filter","dxDataGrid-masterDetail":"Cell with details","dxTreeList-ariaTreeList":"Tree list with {0} rows and {1} columns","dxTreeList-ariaExpandableInstruction":"Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it","dxTreeList-ariaSearchInGrid":"Search in the tree list","dxTreeList-ariaToolbar":"Tree list toolbar","dxTreeList-editingAddRowToNode":"Add","dxPager-infoText":"Page {0} of {1} ({2} items)","dxPager-pagesCountText":"of","dxPager-pageSize":"Items per page: {0}","dxPager-pageSizesAllText":"All","dxPager-page":"Page {0}","dxPager-prevPage":"Previous page","dxPager-nextPage":"Next page","dxPager-ariaLabel":"Page navigation","dxPager-ariaPageSize":"Page size","dxPager-ariaPageNumber":"Page number","dxPagination-infoText":"Page {0} of {1} ({2} items)","dxPagination-pagesCountText":"of","dxPagination-pageSize":"Items per page: {0}","dxPagination-pageSizesAllText":"All","dxPagination-page":"Page {0}","dxPagination-prevPage":"Previous page","dxPagination-nextPage":"Next page","dxPagination-ariaLabel":"Page navigation","dxPagination-ariaPageSize":"Page size","dxPagination-ariaPageNumber":"Page number","dxPivotGrid-grandTotal":"Grand Total","dxPivotGrid-total":"{0} Total","dxPivotGrid-fieldChooserTitle":"Field Chooser","dxPivotGrid-showFieldChooser":"Show Field Chooser","dxPivotGrid-expandAll":"Expand All","dxPivotGrid-collapseAll":"Collapse All","dxPivotGrid-sortColumnBySummary":'Sort "{0}" by This Column',"dxPivotGrid-sortRowBySummary":'Sort "{0}" by This Row',"dxPivotGrid-removeAllSorting":"Remove All Sorting","dxPivotGrid-dataNotAvailable":"N/A","dxPivotGrid-rowFields":"Row Fields","dxPivotGrid-columnFields":"Column Fields","dxPivotGrid-dataFields":"Data Fields","dxPivotGrid-filterFields":"Filter Fields","dxPivotGrid-allFields":"All Fields","dxPivotGrid-columnFieldArea":"Drop Column Fields Here","dxPivotGrid-dataFieldArea":"Drop Data Fields Here","dxPivotGrid-rowFieldArea":"Drop Row Fields Here","dxPivotGrid-filterFieldArea":"Drop Filter Fields Here","dxScheduler-ariaLabel":"Scheduler. {0} view","dxScheduler-appointmentAriaLabel-group":"Group: {0}","dxScheduler-appointmentAriaLabel-recurring":"Recurring appointment","dxScheduler-appointmentListAriaLabel":"Appointment list","dxScheduler-editorLabelTitle":"Subject","dxScheduler-editorLabelStartDate":"Start Date","dxScheduler-editorLabelEndDate":"End Date","dxScheduler-editorLabelDescription":"Description","dxScheduler-editorLabelRecurrence":"Repeat","dxScheduler-navigationPrevious":"Previous page","dxScheduler-navigationNext":"Next page","dxScheduler-openAppointment":"Open appointment","dxScheduler-recurrenceNever":"Never","dxScheduler-recurrenceMinutely":"Every minute","dxScheduler-recurrenceHourly":"Hourly","dxScheduler-recurrenceDaily":"Daily","dxScheduler-recurrenceWeekly":"Weekly","dxScheduler-recurrenceMonthly":"Monthly","dxScheduler-recurrenceYearly":"Yearly","dxScheduler-recurrenceRepeatEvery":"Repeat Every","dxScheduler-recurrenceRepeatOn":"Repeat On","dxScheduler-recurrenceEnd":"End repeat","dxScheduler-recurrenceAfter":"After","dxScheduler-recurrenceOn":"On","dxScheduler-recurrenceRepeatMinutely":"minute(s)","dxScheduler-recurrenceRepeatHourly":"hour(s)","dxScheduler-recurrenceRepeatDaily":"day(s)","dxScheduler-recurrenceRepeatWeekly":"week(s)","dxScheduler-recurrenceRepeatMonthly":"month(s)","dxScheduler-recurrenceRepeatYearly":"year(s)","dxScheduler-switcherDay":"Day","dxScheduler-switcherWeek":"Week","dxScheduler-switcherWorkWeek":"Work Week","dxScheduler-switcherMonth":"Month","dxScheduler-switcherAgenda":"Agenda","dxScheduler-switcherTimelineDay":"Timeline Day","dxScheduler-switcherTimelineWeek":"Timeline Week","dxScheduler-switcherTimelineWorkWeek":"Timeline Work Week","dxScheduler-switcherTimelineMonth":"Timeline Month","dxScheduler-recurrenceRepeatOnDate":"on date","dxScheduler-recurrenceRepeatCount":"occurrence(s)","dxScheduler-allDay":"All day","dxScheduler-ariaEditForm":"Edit form","dxScheduler-confirmRecurrenceEditTitle":"Edit Recurring Appointment","dxScheduler-confirmRecurrenceDeleteTitle":"Delete Recurring Appointment","dxScheduler-confirmRecurrenceEditMessage":"Do you want to edit only this appointment or the whole series?","dxScheduler-confirmRecurrenceDeleteMessage":"Do you want to delete only this appointment or the whole series?","dxScheduler-confirmRecurrenceEditSeries":"Edit series","dxScheduler-confirmRecurrenceDeleteSeries":"Delete series","dxScheduler-confirmRecurrenceEditOccurrence":"Edit appointment","dxScheduler-confirmRecurrenceDeleteOccurrence":"Delete appointment","dxScheduler-noTimezoneTitle":"No timezone","dxScheduler-moreAppointments":"{0} more","dxCalendar-currentDay":"Today","dxCalendar-currentMonth":"Current month","dxCalendar-currentYear":"Current year","dxCalendar-currentYearRange":"Current year range","dxCalendar-todayButtonText":"Today","dxCalendar-ariaWidgetName":"Calendar","dxCalendar-previousMonthButtonLabel":"Previous month","dxCalendar-previousYearButtonLabel":"Previous year","dxCalendar-previousDecadeButtonLabel":"Previous decade","dxCalendar-previousCenturyButtonLabel":"Previous century","dxCalendar-nextMonthButtonLabel":"Next month","dxCalendar-nextYearButtonLabel":"Next year","dxCalendar-nextDecadeButtonLabel":"Next decade","dxCalendar-nextCenturyButtonLabel":"Next century","dxCalendar-captionMonthLabel":"Month selection","dxCalendar-captionYearLabel":"Year selection","dxCalendar-captionDecadeLabel":"Decade selection","dxCalendar-captionCenturyLabel":"Century selection","dxCalendar-selectedDate":"The selected date is {0}","dxCalendar-selectedDates":"The selected dates","dxCalendar-selectedDateRange":"The selected date range is from {0} to {1}","dxCalendar-selectedMultipleDateRange":"from {0} to {1}","dxCalendar-selectedDateRangeCount":"There are {0} selected date ranges","dxCalendar-readOnlyLabel":"Read-only calendar","dxAvatar-defaultImageAlt":"Avatar","dxChat-elementAriaLabel":"Chat","dxChat-textareaPlaceholder":"Type a message","dxChat-sendButtonAriaLabel":"Send","dxChat-defaultUserName":"Unknown User","dxChat-messageListAriaLabel":"Message list","dxChat-alertListAriaLabel":"Error list","dxChat-emptyListMessage":"There are no messages in this chat","dxChat-emptyListPrompt":"Write your first message","dxChat-typingMessageSingleUser":"{0} is typing...","dxChat-typingMessageTwoUsers":"{0} and {1} are typing...","dxChat-typingMessageThreeUsers":"{0}, {1} and {2} are typing...","dxChat-typingMessageMultipleUsers":"{0} and others are typing...","dxColorView-ariaRed":"Red","dxColorView-ariaGreen":"Green","dxColorView-ariaBlue":"Blue","dxColorView-ariaAlpha":"Transparency","dxColorView-ariaHex":"Color code","dxTagBox-selected":"{0} selected","dxTagBox-allSelected":"All selected ({0})","dxTagBox-moreSelected":"{0} more","dxTagBox-tagRoleDescription":"Tag. Press the delete button to remove this tag","vizExport-printingButtonText":"Print","vizExport-titleMenuText":"Exporting/Printing","vizExport-exportButtonText":"{0} file","dxFilterBuilder-and":"And","dxFilterBuilder-or":"Or","dxFilterBuilder-notAnd":"Not And","dxFilterBuilder-notOr":"Not Or","dxFilterBuilder-addCondition":"Add Condition","dxFilterBuilder-addGroup":"Add Group","dxFilterBuilder-enterValueText":"<enter a value>","dxFilterBuilder-filterOperationEquals":"Equals","dxFilterBuilder-filterOperationNotEquals":"Does not equal","dxFilterBuilder-filterOperationLess":"Is less than","dxFilterBuilder-filterOperationLessOrEquals":"Is less than or equal to","dxFilterBuilder-filterOperationGreater":"Is greater than","dxFilterBuilder-filterOperationGreaterOrEquals":"Is greater than or equal to","dxFilterBuilder-filterOperationStartsWith":"Starts with","dxFilterBuilder-filterOperationContains":"Contains","dxFilterBuilder-filterOperationNotContains":"Does not contain","dxFilterBuilder-filterOperationEndsWith":"Ends with","dxFilterBuilder-filterOperationIsBlank":"Is blank","dxFilterBuilder-filterOperationIsNotBlank":"Is not blank","dxFilterBuilder-filterOperationBetween":"Is between","dxFilterBuilder-filterOperationAnyOf":"Is any of","dxFilterBuilder-filterOperationNoneOf":"Is none of","dxFilterBuilder-filterAriaRootElement":"Filter builder","dxFilterBuilder-filterAriaGroupLevel":"Level {0}","dxFilterBuilder-filterAriaGroupItem":"Group item","dxFilterBuilder-filterAriaOperationButton":"Operation","dxFilterBuilder-filterAriaAddButton":"Add","dxFilterBuilder-filterAriaRemoveButton":"Remove {0}","dxFilterBuilder-filterAriaItemField":"Item field","dxFilterBuilder-filterAriaItemOperation":"Item operation","dxFilterBuilder-filterAriaItemValue":"Item value","dxHtmlEditor-dialogColorCaption":"Change Font Color","dxHtmlEditor-dialogBackgroundCaption":"Change Background Color","dxHtmlEditor-dialogLinkCaption":"Add Link","dxHtmlEditor-dialogLinkUrlField":"URL","dxHtmlEditor-dialogLinkTextField":"Text","dxHtmlEditor-dialogLinkTargetField":"Open link in new window","dxHtmlEditor-dialogImageCaption":"Add Image","dxHtmlEditor-dialogImageUrlField":"URL","dxHtmlEditor-dialogImageAltField":"Alternate text","dxHtmlEditor-dialogImageWidthField":"Width (px)","dxHtmlEditor-dialogImageHeightField":"Height (px)","dxHtmlEditor-dialogInsertTableRowsField":"Rows","dxHtmlEditor-dialogInsertTableColumnsField":"Columns","dxHtmlEditor-dialogInsertTableCaption":"Insert Table","dxHtmlEditor-dialogUpdateImageCaption":"Update Image","dxHtmlEditor-dialogImageUpdateButton":"Update","dxHtmlEditor-dialogImageAddButton":"Add","dxHtmlEditor-dialogImageSpecifyUrl":"From the Web","dxHtmlEditor-dialogImageSelectFile":"From This Device","dxHtmlEditor-dialogImageKeepAspectRatio":"Keep Aspect Ratio","dxHtmlEditor-dialogImageEncodeToBase64":"Encode to Base64","dxHtmlEditor-heading":"Heading","dxHtmlEditor-normalText":"Normal text","dxHtmlEditor-background":"Background Color","dxHtmlEditor-bold":"Bold","dxHtmlEditor-color":"Font Color","dxHtmlEditor-font":"Font","dxHtmlEditor-italic":"Italic","dxHtmlEditor-link":"Add Link","dxHtmlEditor-image":"Add Image","dxHtmlEditor-size":"Size","dxHtmlEditor-strike":"Strikethrough","dxHtmlEditor-subscript":"Subscript","dxHtmlEditor-superscript":"Superscript","dxHtmlEditor-underline":"Underline","dxHtmlEditor-blockquote":"Blockquote","dxHtmlEditor-header":"Header","dxHtmlEditor-increaseIndent":"Increase Indent","dxHtmlEditor-decreaseIndent":"Decrease Indent","dxHtmlEditor-orderedList":"Ordered List","dxHtmlEditor-bulletList":"Bullet List","dxHtmlEditor-alignLeft":"Align Left","dxHtmlEditor-alignCenter":"Align Center","dxHtmlEditor-alignRight":"Align Right","dxHtmlEditor-alignJustify":"Align Justify","dxHtmlEditor-codeBlock":"Code Block","dxHtmlEditor-variable":"Add Variable","dxHtmlEditor-undo":"Undo","dxHtmlEditor-redo":"Redo","dxHtmlEditor-clear":"Clear Formatting","dxHtmlEditor-insertTable":"Insert Table","dxHtmlEditor-insertHeaderRow":"Insert Header Row","dxHtmlEditor-insertRowAbove":"Insert Row Above","dxHtmlEditor-insertRowBelow":"Insert Row Below","dxHtmlEditor-insertColumnLeft":"Insert Column Left","dxHtmlEditor-insertColumnRight":"Insert Column Right","dxHtmlEditor-deleteColumn":"Delete Column","dxHtmlEditor-deleteRow":"Delete Row","dxHtmlEditor-deleteTable":"Delete Table","dxHtmlEditor-cellProperties":"Cell Properties","dxHtmlEditor-tableProperties":"Table Properties","dxHtmlEditor-insert":"Insert","dxHtmlEditor-delete":"Delete","dxHtmlEditor-border":"Border","dxHtmlEditor-style":"Style","dxHtmlEditor-width":"Width","dxHtmlEditor-height":"Height","dxHtmlEditor-borderColor":"Color","dxHtmlEditor-borderWidth":"Border Width","dxHtmlEditor-tableBackground":"Background","dxHtmlEditor-dimensions":"Dimensions","dxHtmlEditor-alignment":"Alignment","dxHtmlEditor-horizontal":"Horizontal","dxHtmlEditor-vertical":"Vertical","dxHtmlEditor-paddingVertical":"Vertical Padding","dxHtmlEditor-paddingHorizontal":"Horizontal Padding","dxHtmlEditor-pixels":"Pixels","dxHtmlEditor-list":"List","dxHtmlEditor-ordered":"Ordered","dxHtmlEditor-bullet":"Bullet","dxHtmlEditor-align":"Align","dxHtmlEditor-center":"Center","dxHtmlEditor-left":"Left","dxHtmlEditor-right":"Right","dxHtmlEditor-indent":"Indent","dxHtmlEditor-justify":"Justify","dxHtmlEditor-borderStyleNone":"none","dxHtmlEditor-borderStyleHidden":"hidden","dxHtmlEditor-borderStyleDotted":"dotted","dxHtmlEditor-borderStyleDashed":"dashed","dxHtmlEditor-borderStyleSolid":"solid","dxHtmlEditor-borderStyleDouble":"double","dxHtmlEditor-borderStyleGroove":"groove","dxHtmlEditor-borderStyleRidge":"ridge","dxHtmlEditor-borderStyleInset":"inset","dxHtmlEditor-borderStyleOutset":"outset","dxFileManager-newDirectoryName":"Untitled directory","dxFileManager-rootDirectoryName":"Files","dxFileManager-errorNoAccess":"Access Denied. Operation could not be completed.","dxFileManager-errorDirectoryExistsFormat":"Directory '{0}' already exists.","dxFileManager-errorFileExistsFormat":"File '{0}' already exists.","dxFileManager-errorFileNotFoundFormat":"File '{0}' not found.","dxFileManager-errorDirectoryNotFoundFormat":"Directory '{0}' not found.","dxFileManager-errorWrongFileExtension":"File extension is not allowed.","dxFileManager-errorMaxFileSizeExceeded":"File size exceeds the maximum allowed size.","dxFileManager-errorInvalidSymbols":"This name contains invalid characters.","dxFileManager-errorDefault":"Unspecified error.","dxFileManager-errorDirectoryOpenFailed":"The directory cannot be opened","dxFileManager-commandCreate":"New directory","dxFileManager-commandRename":"Rename","dxFileManager-commandMove":"Move to","dxFileManager-commandCopy":"Copy to","dxFileManager-commandDelete":"Delete","dxFileManager-commandDownload":"Download","dxFileManager-commandUpload":"Upload files","dxFileManager-commandRefresh":"Refresh","dxFileManager-commandThumbnails":"Thumbnails View","dxFileManager-commandDetails":"Details View","dxFileManager-commandClearSelection":"Clear selection","dxFileManager-commandShowNavPane":"Toggle navigation pane","dxFileManager-dialogDirectoryChooserMoveTitle":"Move to","dxFileManager-dialogDirectoryChooserMoveButtonText":"Move","dxFileManager-dialogDirectoryChooserCopyTitle":"Copy to","dxFileManager-dialogDirectoryChooserCopyButtonText":"Copy","dxFileManager-dialogRenameItemTitle":"Rename","dxFileManager-dialogRenameItemButtonText":"Save","dxFileManager-dialogCreateDirectoryTitle":"New directory","dxFileManager-dialogCreateDirectoryButtonText":"Create","dxFileManager-dialogDeleteItemTitle":"Delete","dxFileManager-dialogDeleteItemButtonText":"Delete","dxFileManager-dialogDeleteItemSingleItemConfirmation":"Are you sure you want to delete {0}?","dxFileManager-dialogDeleteItemMultipleItemsConfirmation":"Are you sure you want to delete {0} items?","dxFileManager-dialogButtonCancel":"Cancel","dxFileManager-editingCreateSingleItemProcessingMessage":"Creating a directory inside {0}","dxFileManager-editingCreateSingleItemSuccessMessage":"Created a directory inside {0}","dxFileManager-editingCreateSingleItemErrorMessage":"Directory was not created","dxFileManager-editingCreateCommonErrorMessage":"Directory was not created","dxFileManager-editingRenameSingleItemProcessingMessage":"Renaming an item inside {0}","dxFileManager-editingRenameSingleItemSuccessMessage":"Renamed an item inside {0}","dxFileManager-editingRenameSingleItemErrorMessage":"Item was not renamed","dxFileManager-editingRenameCommonErrorMessage":"Item was not renamed","dxFileManager-editingDeleteSingleItemProcessingMessage":"Deleting an item from {0}","dxFileManager-editingDeleteMultipleItemsProcessingMessage":"Deleting {0} items from {1}","dxFileManager-editingDeleteSingleItemSuccessMessage":"Deleted an item from {0}","dxFileManager-editingDeleteMultipleItemsSuccessMessage":"Deleted {0} items from {1}","dxFileManager-editingDeleteSingleItemErrorMessage":"Item was not deleted","dxFileManager-editingDeleteMultipleItemsErrorMessage":"{0} items were not deleted","dxFileManager-editingDeleteCommonErrorMessage":"Some items were not deleted","dxFileManager-editingMoveSingleItemProcessingMessage":"Moving an item to {0}","dxFileManager-editingMoveMultipleItemsProcessingMessage":"Moving {0} items to {1}","dxFileManager-editingMoveSingleItemSuccessMessage":"Moved an item to {0}","dxFileManager-editingMoveMultipleItemsSuccessMessage":"Moved {0} items to {1}","dxFileManager-editingMoveSingleItemErrorMessage":"Item was not moved","dxFileManager-editingMoveMultipleItemsErrorMessage":"{0} items were not moved","dxFileManager-editingMoveCommonErrorMessage":"Some items were not moved","dxFileManager-editingCopySingleItemProcessingMessage":"Copying an item to {0}","dxFileManager-editingCopyMultipleItemsProcessingMessage":"Copying {0} items to {1}","dxFileManager-editingCopySingleItemSuccessMessage":"Copied an item to {0}","dxFileManager-editingCopyMultipleItemsSuccessMessage":"Copied {0} items to {1}","dxFileManager-editingCopySingleItemErrorMessage":"Item was not copied","dxFileManager-editingCopyMultipleItemsErrorMessage":"{0} items were not copied","dxFileManager-editingCopyCommonErrorMessage":"Some items were not copied","dxFileManager-editingUploadSingleItemProcessingMessage":"Uploading an item to {0}","dxFileManager-editingUploadMultipleItemsProcessingMessage":"Uploading {0} items to {1}","dxFileManager-editingUploadSingleItemSuccessMessage":"Uploaded an item to {0}","dxFileManager-editingUploadMultipleItemsSuccessMessage":"Uploaded {0} items to {1}","dxFileManager-editingUploadSingleItemErrorMessage":"Item was not uploaded","dxFileManager-editingUploadMultipleItemsErrorMessage":"{0} items were not uploaded","dxFileManager-editingUploadCanceledMessage":"Canceled","dxFileManager-editingDownloadSingleItemErrorMessage":"Item was not downloaded","dxFileManager-editingDownloadMultipleItemsErrorMessage":"{0} items were not downloaded","dxFileManager-listDetailsColumnCaptionName":"Name","dxFileManager-listDetailsColumnCaptionDateModified":"Date Modified","dxFileManager-listDetailsColumnCaptionFileSize":"File Size","dxFileManager-listThumbnailsTooltipTextSize":"Size","dxFileManager-listThumbnailsTooltipTextDateModified":"Date Modified","dxFileManager-notificationProgressPanelTitle":"Progress","dxFileManager-notificationProgressPanelEmptyListText":"No operations","dxFileManager-notificationProgressPanelOperationCanceled":"Canceled","dxDiagram-categoryGeneral":"General","dxDiagram-categoryFlowchart":"Flowchart","dxDiagram-categoryOrgChart":"Org Chart","dxDiagram-categoryContainers":"Containers","dxDiagram-categoryCustom":"Custom","dxDiagram-commandExportToSvg":"Export to SVG","dxDiagram-commandExportToPng":"Export to PNG","dxDiagram-commandExportToJpg":"Export to JPEG","dxDiagram-commandUndo":"Undo","dxDiagram-commandRedo":"Redo","dxDiagram-commandFontName":"Font Name","dxDiagram-commandFontSize":"Font Size","dxDiagram-commandBold":"Bold","dxDiagram-commandItalic":"Italic","dxDiagram-commandUnderline":"Underline","dxDiagram-commandTextColor":"Font Color","dxDiagram-commandLineColor":"Line Color","dxDiagram-commandLineWidth":"Line Width","dxDiagram-commandLineStyle":"Line Style","dxDiagram-commandLineStyleSolid":"Solid","dxDiagram-commandLineStyleDotted":"Dotted","dxDiagram-commandLineStyleDashed":"Dashed","dxDiagram-commandFillColor":"Fill Color","dxDiagram-commandAlignLeft":"Align Left","dxDiagram-commandAlignCenter":"Align Center","dxDiagram-commandAlignRight":"Align Right","dxDiagram-commandConnectorLineType":"Connector Line Type","dxDiagram-commandConnectorLineStraight":"Straight","dxDiagram-commandConnectorLineOrthogonal":"Orthogonal","dxDiagram-commandConnectorLineStart":"Connector Line Start","dxDiagram-commandConnectorLineEnd":"Connector Line End","dxDiagram-commandConnectorLineNone":"None","dxDiagram-commandConnectorLineArrow":"Arrow","dxDiagram-commandFullscreen":"Full Screen","dxDiagram-commandUnits":"Units","dxDiagram-commandPageSize":"Page Size","dxDiagram-commandPageOrientation":"Page Orientation","dxDiagram-commandPageOrientationLandscape":"Landscape","dxDiagram-commandPageOrientationPortrait":"Portrait","dxDiagram-commandPageColor":"Page Color","dxDiagram-commandShowGrid":"Show Grid","dxDiagram-commandSnapToGrid":"Snap to Grid","dxDiagram-commandGridSize":"Grid Size","dxDiagram-commandZoomLevel":"Zoom Level","dxDiagram-commandAutoZoom":"Auto Zoom","dxDiagram-commandFitToContent":"Fit to Content","dxDiagram-commandFitToWidth":"Fit to Width","dxDiagram-commandAutoZoomByContent":"Auto Zoom by Content","dxDiagram-commandAutoZoomByWidth":"Auto Zoom by Width","dxDiagram-commandSimpleView":"Simple View","dxDiagram-commandCut":"Cut","dxDiagram-commandCopy":"Copy","dxDiagram-commandPaste":"Paste","dxDiagram-commandSelectAll":"Select All","dxDiagram-commandDelete":"Delete","dxDiagram-commandBringToFront":"Bring to Front","dxDiagram-commandSendToBack":"Send to Back","dxDiagram-commandLock":"Lock","dxDiagram-commandUnlock":"Unlock","dxDiagram-commandInsertShapeImage":"Insert Image...","dxDiagram-commandEditShapeImage":"Change Image...","dxDiagram-commandDeleteShapeImage":"Delete Image","dxDiagram-commandLayoutLeftToRight":"Left-to-right","dxDiagram-commandLayoutRightToLeft":"Right-to-left","dxDiagram-commandLayoutTopToBottom":"Top-to-bottom","dxDiagram-commandLayoutBottomToTop":"Bottom-to-top","dxDiagram-unitIn":"in","dxDiagram-unitCm":"cm","dxDiagram-unitPx":"px","dxDiagram-dialogButtonOK":"OK","dxDiagram-dialogButtonCancel":"Cancel","dxDiagram-dialogInsertShapeImageTitle":"Insert Image","dxDiagram-dialogEditShapeImageTitle":"Change Image","dxDiagram-dialogEditShapeImageSelectButton":"Select image","dxDiagram-dialogEditShapeImageLabelText":"or drop a file here","dxDiagram-uiExport":"Export","dxDiagram-uiProperties":"Properties","dxDiagram-uiSettings":"Settings","dxDiagram-uiShowToolbox":"Show Toolbox","dxDiagram-uiSearch":"Search","dxDiagram-uiStyle":"Style","dxDiagram-uiLayout":"Layout","dxDiagram-uiLayoutTree":"Tree","dxDiagram-uiLayoutLayered":"Layered","dxDiagram-uiDiagram":"Diagram","dxDiagram-uiText":"Text","dxDiagram-uiObject":"Object","dxDiagram-uiConnector":"Connector","dxDiagram-uiPage":"Page","dxDiagram-shapeText":"Text","dxDiagram-shapeRectangle":"Rectangle","dxDiagram-shapeEllipse":"Ellipse","dxDiagram-shapeCross":"Cross","dxDiagram-shapeTriangle":"Triangle","dxDiagram-shapeDiamond":"Diamond","dxDiagram-shapeHeart":"Heart","dxDiagram-shapePentagon":"Pentagon","dxDiagram-shapeHexagon":"Hexagon","dxDiagram-shapeOctagon":"Octagon","dxDiagram-shapeStar":"Star","dxDiagram-shapeArrowLeft":"Left Arrow","dxDiagram-shapeArrowUp":"Up Arrow","dxDiagram-shapeArrowRight":"Right Arrow","dxDiagram-shapeArrowDown":"Down Arrow","dxDiagram-shapeArrowUpDown":"Up Down Arrow","dxDiagram-shapeArrowLeftRight":"Left Right Arrow","dxDiagram-shapeProcess":"Process","dxDiagram-shapeDecision":"Decision","dxDiagram-shapeTerminator":"Terminator","dxDiagram-shapePredefinedProcess":"Predefined Process","dxDiagram-shapeDocument":"Document","dxDiagram-shapeMultipleDocuments":"Multiple Documents","dxDiagram-shapeManualInput":"Manual Input","dxDiagram-shapePreparation":"Preparation","dxDiagram-shapeData":"Data","dxDiagram-shapeDatabase":"Database","dxDiagram-shapeHardDisk":"Hard Disk","dxDiagram-shapeInternalStorage":"Internal Storage","dxDiagram-shapePaperTape":"Paper Tape","dxDiagram-shapeManualOperation":"Manual Operation","dxDiagram-shapeDelay":"Delay","dxDiagram-shapeStoredData":"Stored Data","dxDiagram-shapeDisplay":"Display","dxDiagram-shapeMerge":"Merge","dxDiagram-shapeConnector":"Connector","dxDiagram-shapeOr":"Or","dxDiagram-shapeSummingJunction":"Summing Junction","dxDiagram-shapeContainerDefaultText":"Container","dxDiagram-shapeVerticalContainer":"Vertical Container","dxDiagram-shapeHorizontalContainer":"Horizontal Container","dxDiagram-shapeCardDefaultText":"Person's Name","dxDiagram-shapeCardWithImageOnLeft":"Card with Image on the Left","dxDiagram-shapeCardWithImageOnTop":"Card with Image on the Top","dxDiagram-shapeCardWithImageOnRight":"Card with Image on the Right","dxGantt-dialogTitle":"Title","dxGantt-dialogStartTitle":"Start","dxGantt-dialogEndTitle":"End","dxGantt-dialogProgressTitle":"Progress","dxGantt-dialogResourcesTitle":"Resources","dxGantt-dialogResourceManagerTitle":"Resource Manager","dxGantt-dialogTaskDetailsTitle":"Task Details","dxGantt-dialogEditResourceListHint":"Edit Resource List","dxGantt-dialogEditNoResources":"No resources","dxGantt-dialogButtonAdd":"Add","dxGantt-contextMenuNewTask":"New Task","dxGantt-contextMenuNewSubtask":"New Subtask","dxGantt-contextMenuDeleteTask":"Delete Task","dxGantt-contextMenuDeleteDependency":"Delete Dependency","dxGantt-dialogTaskDeleteConfirmation":"Deleting a task also deletes all its dependencies and subtasks. Are you sure you want to delete this task?","dxGantt-dialogDependencyDeleteConfirmation":"Are you sure you want to delete the dependency from the task?","dxGantt-dialogResourcesDeleteConfirmation":"Deleting a resource also deletes it from tasks to which this resource is assigned. Are you sure you want to delete these resources? Resources: {0}","dxGantt-dialogConstraintCriticalViolationMessage":"The task you are attempting to move is linked to a second task by a dependency relation. This change would conflict with dependency rules. How would you like to proceed?","dxGantt-dialogConstraintViolationMessage":"The task you are attempting to move is linked to a second task by a dependency relation. How would you like to proceed?","dxGantt-dialogCancelOperationMessage":"Cancel the operation","dxGantt-dialogDeleteDependencyMessage":"Delete the dependency","dxGantt-dialogMoveTaskAndKeepDependencyMessage":"Move the task and keep the dependency","dxGantt-dialogConstraintCriticalViolationSeveralTasksMessage":"The task you are attempting to move is linked to another tasks by dependency relations. This change would conflict with dependency rules. How would you like to proceed?","dxGantt-dialogConstraintViolationSeveralTasksMessage":"The task you are attempting to move is linked to another tasks by dependency relations. How would you like to proceed?","dxGantt-dialogDeleteDependenciesMessage":"Delete the dependency relations","dxGantt-dialogMoveTaskAndKeepDependenciesMessage":"Move the task and keep the dependencies","dxGantt-undo":"Undo","dxGantt-redo":"Redo","dxGantt-expandAll":"Expand All","dxGantt-collapseAll":"Collapse All","dxGantt-addNewTask":"Add New Task","dxGantt-deleteSelectedTask":"Delete Selected Task","dxGantt-zoomIn":"Zoom In","dxGantt-zoomOut":"Zoom Out","dxGantt-fullScreen":"Full Screen","dxGantt-quarter":"Q{0}","dxGantt-sortingAscendingText":"Sort Ascending","dxGantt-sortingDescendingText":"Sort Descending","dxGantt-sortingClearText":"Clear Sorting","dxGantt-showResources":"Show Resources","dxGantt-showDependencies":"Show Dependencies","dxGantt-dialogStartDateValidation":"Start date must be after {0}","dxGantt-dialogEndDateValidation":"End date must be after {0}","dxGallery-itemName":"Gallery item","dxMultiView-elementAriaRoleDescription":"MultiView","dxMultiView-elementAriaLabel":"Use the arrow keys or swipe to navigate between views","dxMultiView-itemAriaRoleDescription":"View","dxMultiView-itemAriaLabel":"{0} of {1}","dxSplitter-resizeHandleAriaLabel":"Split bar"}}},23805:function(e,t,i){var n=r(i(87626)),o=r(i(84109)),a=i(61316),s=i(99645);function r(e){return e&&e.__esModule?e:{default:e}}n.default&&n.default.load&&(n.default.locale()||(n.default.load(a.enCldr,s.supplementalCldr),n.default.locale("en")),o.default.inject({locale:function(e){if(!e)return n.default.locale().locale;n.default.locale(e)}}))},869:function(e,t,i){var n=r(i(70832));i(23805),i(13203),i(17333),i(87626);var o=r(i(87626)),a=i(83077),s=r(i(52771));function r(e){return e&&e.__esModule?e:{default:e}}const l=["symbol","accounting"];if(o.default&&o.default.formatCurrency){"en"===o.default.locale().locale&&o.default.locale("en");const e={},t=(t,i)=>{let n,a;return a="object"==typeof i?o.default.locale().locale+":"+t+":"+JSON.stringify(i):o.default.locale().locale+":"+t+":"+i,n=e[a],n||(n=e[a]=o.default.currencyFormatter(t,i)),n},i={_formatNumberCore:function(e,i,n){if("currency"===i){const o=n&&n.currency||(0,a.config)().defaultCurrency;return t(o,this._normalizeFormatConfig(i,n,e))(e)}return this.callBase.apply(this,arguments)},_normalizeFormatConfig:function(e,t,i){const n=this.callBase(e,t,i);if("currency"===e){const e=t.useCurrencyAccountingStyle??(0,a.config)().defaultUseCurrencyAccountingStyle;n.style=l[+e]}return n},format:function(e,i){if("number"!=typeof e)return e;if(i=this._normalizeFormat(i)){if("default"===i.currency&&(i.currency=(0,a.config)().defaultCurrency),"currency"===i.type)return this._formatNumber(e,this._parseNumberFormatString("currency"),i);if(!i.type&&i.currency)return t(i.currency,i)(e)}return this.callBase.apply(this,arguments)},getCurrencySymbol:function(e){return e||(e=(0,a.config)().defaultCurrency),o.default.cldr.main("numbers/currencies/"+e)},getOpenXmlCurrencyFormat:function(e){const t=this.getCurrencySymbol(e).symbol,i=o.default.cldr.main("numbers/currencyFormats-numberSystem-latn").accounting;return(0,n.default)(t,i)}};s.default.inject(i)}},99862:function(e,t,i){i(23805),i(13203),i(87626);var n=l(i(87626)),o=l(i(38662)),a=i(11528),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(21274));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}function l(e){return e&&e.__esModule?e:{default:e}}const d=["skeleton","date","time","datetime","raw"],u=/[\u200E\u200F]/g;if(n.default&&n.default.formatDate){"en"===n.default.locale().locale&&n.default.locale("en");const e={},t={shortdate:{path:"dateTimeFormats/availableFormats/yMd"},shorttime:{path:"timeFormats/short"},longdate:{path:"dateFormats/full"},longtime:{path:"timeFormats/medium"},monthandday:{path:"dateTimeFormats/availableFormats/MMMMd"},monthandyear:{path:"dateTimeFormats/availableFormats/yMMMM"},quarterandyear:{path:"dateTimeFormats/availableFormats/yQQQ"},day:{path:"dateTimeFormats/availableFormats/d"},year:{path:"dateTimeFormats/availableFormats/y"},shortdateshorttime:{path:"dateTimeFormats/short",parts:["shorttime","shortdate"]},longdatelongtime:{path:"dateTimeFormats/medium",parts:["longtime","longdate"]},month:{pattern:"LLLL"},shortyear:{pattern:"yy"},dayofweek:{pattern:"EEEE"},quarter:{pattern:"QQQ"},millisecond:{pattern:"SSS"},hour:{pattern:"HH"},minute:{pattern:"mm"},second:{pattern:"ss"}},i={engine:function(){return"globalize"},_getPatternByFormat:function(e){const i=this,n=e.toLowerCase(),o=t[n];if("datetime-local"===n)return"yyyy-MM-ddTHH':'mm':'ss";if(!o)return;let a=o.path&&i._getFormatStringByPath(o.path)||o.pattern;return o.parts&&s.each(o.parts,((e,t)=>{a=a.replace("{"+e+"}",i._getPatternByFormat(t))})),a},_getFormatStringByPath:function(e){return n.default.locale().main("dates/calendars/gregorian/"+e)},getPeriodNames:function(e,t){e=e||"wide",t="format"===t?t:"stand-alone";const i=n.default.locale().main(`dates/calendars/gregorian/dayPeriods/${t}/${e}`);return[i.am,i.pm]},getMonthNames:function(e,t){const i=n.default.locale().main("dates/calendars/gregorian/months/"+("format"===t?t:"stand-alone")+"/"+(e||"wide"));return s.map(i,(e=>e))},getDayNames:function(e){const t=n.default.locale().main("dates/calendars/gregorian/days/stand-alone/"+(e||"wide"));return s.map(t,(e=>e))},getTimeSeparator:function(){return n.default.locale().main("numbers/symbols-numberSystem-latn/timeSeparator")},removeRtlMarks:e=>e.replace(u,""),format:function(t,i){if(!t)return;if(!i)return t;let o,a;if("function"==typeof i)return i(t);if(i.formatter)return i.formatter(t);if("string"==typeof(i=i.type||i))a=n.default.locale().locale+":"+i,o=e[a],o||(i={raw:this._getPatternByFormat(i)||i},o=e[a]=n.default.dateFormatter(i));else{if(!this._isAcceptableFormat(i))return;o=n.default.dateFormatter(i)}return this.removeRtlMarks(o(t))},parse:function(e,t){if(!e)return;if(!t||"function"==typeof t||(0,a.isObject)(t)&&!this._isAcceptableFormat(t)){if(t){const i=this.callBase(e,t);if(i)return i}return n.default.parseDate(e)}if(t.parser)return t.parser(e);"string"==typeof t&&(t={raw:this._getPatternByFormat(t)||t});const i=n.default.parseDate(e,t);return i||this.callBase(e,t)},_isAcceptableFormat:function(e){if(e.parser)return!0;for(let t=0;t<d.length;t++)if(Object.prototype.hasOwnProperty.call(e,d[t]))return!0},firstDayOfWeekIndex:function(){const e=n.default.locale().supplemental.weekData.firstDay();return this._getDayKeys().indexOf(e)},_getDayKeys:function(){const e=n.default.locale().main("dates/calendars/gregorian/days/format/short");return s.map(e,((e,t)=>t))}};o.default.resetInjection(),o.default.inject(i)}},84207:function(e,t,i){i(23805);var n=s(i(87626)),o=s(i(4671)),a=s(i(84109));function s(e){return e&&e.__esModule?e:{default:e}}if(i(87626),n.default&&n.default.formatMessage){const e="en",t=n.default.loadMessages;n.default.loadMessages=e=>{o.default.load(e)};const i={engine:function(){return"globalize"},ctor:function(){this.load(this._dictionary)},load:function(e){this.callBase(e),t(e)},getMessagesByLocales:function(){return n.default.cldr.get("globalize-messages")},getFormatter:function(t,i){const n=i||a.default.locale();let o=this._getFormatterBase(t,i);return o||(o=this._formatterByGlobalize(t,i)),o||n===e||(o=this.getFormatter(t,e)),o},_formatterByGlobalize:function(e,t){const i=t&&t!==a.default.locale()?new n.default(t):n.default;let o;return this._messageLoaded(e,t)&&(o=i.messageFormatter(e)),o},_messageLoaded:function(e,t){return!!(t?new n.default(t).cldr:n.default.locale()).get(["globalize-messages/{bundle}",e])},_loadSingle:function(e,t,i){const n={};n[i]={},n[i][e]=t,this.load(n)}};o.default.inject(i)}},13203:function(e,t,i){i(23805);var n=s(i(87626)),o=s(i(52771)),a=s(i(87129));function s(e){return e&&e.__esModule?e:{default:e}}i(87626);if(n.default&&n.default.formatNumber){"en"===n.default.locale().locale&&n.default.locale("en");const e={},t=t=>{let i,o;return o="object"==typeof t?n.default.locale().locale+":"+JSON.stringify(t):n.default.locale().locale+":"+t,i=e[o],i||(i=e[o]=n.default.numberFormatter(t)),i},i={engine:function(){return"globalize"},_formatNumberCore:function(e,i,n){return"exponential"===i?this.callBase.apply(this,arguments):t(this._normalizeFormatConfig(i,n,e))(e)},_normalizeFormatConfig:function(e,t,i){let n;return n="decimal"===e?{minimumIntegerDigits:t.precision||1,useGrouping:!1,minimumFractionDigits:0,maximumFractionDigits:20,round:i<0?"ceil":"floor"}:this._getPrecisionConfig(t.precision),"percent"===e&&(n.style="percent"),n},_getPrecisionConfig:function(e){let t;return t=null===e?{minimumFractionDigits:0,maximumFractionDigits:20}:{minimumFractionDigits:e||0,maximumFractionDigits:e||0},t},format:function(e,i){return"number"!=typeof e?e:(i=this._normalizeFormat(i))&&("function"==typeof i||i.type||i.formatter)?this.callBase.apply(this,arguments):t(i)(e)},parse:function(e,t){if(!e)return;if(t&&(t.parser||"string"==typeof t))return this.callBase.apply(this,arguments);t&&a.default.log("W0011");let i=n.default.parseNumber(e);return isNaN(i)&&(i=this.callBase.apply(this,arguments)),i}};o.default.resetInjection(),o.default.inject(i)}},21840:function(e,t,i){t.default=void 0;var n,o=i(52576),a=(n=i(84109))&&n.__esModule?n:{default:n};const s=/[\u200E\u200F]/g,r=/[\u202F]/g,l=e=>t=>{if(!e.timeZoneName){const i=t.getFullYear(),n=String(i).length<3,a=n?i+400:i,s=new Date(Date.UTC(a,t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));n&&s.setFullYear(i);return c(s,(0,o.extend)({timeZone:"UTC"},e))}return c(t,e)},d={},u=e=>{const t=a.default.locale()+"/"+JSON.stringify(e);return d[t]||(d[t]=new Intl.DateTimeFormat(a.default.locale(),e).format),d[t]};function c(e,t){return u(t)(e).replace(s,"").replace(r," ")}const h=e=>new Intl.NumberFormat(a.default.locale()).format(e),p=(()=>{const e={};return t=>{if(!(t in e)){if("0"===h(0))return e[t]=!1,!1;e[t]={};for(let i=0;i<10;++i)e[t][h(i)]=i}return e[t]}})(),g=e=>{const t=p(a.default.locale());return t?e.split("").map((e=>e in t?String(t[e]):e)).join(""):e},_=e=>e.replace(/(\D)0+(\d)/g,"$1$2"),f=e=>e.replace("d\u2019","de "),m={day:{day:"numeric"},date:{year:"numeric",month:"long",day:"numeric"},dayofweek:{weekday:"long"},longdate:{weekday:"long",year:"numeric",month:"long",day:"numeric"},longdatelongtime:{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},longtime:{hour:"numeric",minute:"numeric",second:"numeric"},month:{month:"long"},monthandday:{month:"long",day:"numeric"},monthandyear:{year:"numeric",month:"long"},shortdate:{},shorttime:{hour:"numeric",minute:"numeric"},shortyear:{year:"2-digit"},year:{year:"numeric"}};Object.defineProperty(m,"shortdateshorttime",{get:function(){const e=Intl.DateTimeFormat(a.default.locale()).resolvedOptions();return{year:e.year,month:e.month,day:e.day,hour:"numeric",minute:"numeric"}}});const v={standalone:function(e,t){const i=new Date(1999,e,13,1);return l({month:t})(i)},format:function(e,t){const i=new Date(0,e,13,1),n=f(l({day:"numeric",month:t})(i)).split(" ").filter((e=>e.indexOf("13")<0));return 1===n.length?n[0]:2===n.length?n[0].length>n[1].length?n[0]:n[1]:v.standalone(e,t)}};t.default={engine:function(){return"intl"},getMonthNames:function(e,t){const i={wide:"long",abbreviated:"short",narrow:"narrow"}[e||"wide"];return t="format"===t?t:"standalone",Array.apply(null,new Array(12)).map(((e,n)=>v[t](n,i)))},getDayNames:function(e){const t=(e=>Array.apply(null,new Array(7)).map(((t,i)=>l({weekday:e})(new Date(0,0,i)))))({wide:"long",abbreviated:"short",short:"narrow",narrow:"narrow"}[e||"wide"]);return t},getPeriodNames:function(){const e=l({hour:"numeric",hour12:!0});return[1,13].map((t=>{const i=h(1),n=e(new Date(0,0,1,t)).split(i);if(2!==n.length)return"";return(n[0].length>n[1].length?n[0]:n[1]).trim()}))},format:function(e,t){if(!e)return;if(!t)return e;"function"==typeof t||t.formatter||(t=t.type||t);const i=(e=>"string"==typeof e&&m[e.toLowerCase()])(t);if(i)return l(i)(e);const n=typeof t;return t.formatter||"function"===n||"string"===n?this.callBase.apply(this,arguments):l(t)(e)},parse:function(e,t){let i;return t&&!t.parser&&"string"==typeof e&&(e=f(e),i=e=>f(this.format(e,t))),this.callBase(e,i||t)},_parseDateBySimpleFormat:function(e,t){e=g(e);const i=this.getFormatParts(t),n=e.split(/\D+/).filter((e=>e.length>0));if(i.length!==n.length)return;const o=this._generateDateArgs(i,n),a=i=>{const n=((e,t)=>{const i=t?12:0;return new Date(e.year,e.month,e.day,(e.hours+i)%24,e.minutes,e.seconds)})(o,i);if(a=g(this.format(n,t)),s=e,_(a)===_(s))return n;var a,s};return a(!1)||a(!0)},_generateDateArgs:function(e,t){const i=new Date,n={year:i.getFullYear(),month:i.getMonth(),day:i.getDate(),hours:0,minutes:0,seconds:0};return e.forEach(((e,i)=>{const o=t[i];let a=parseInt(o,10);"month"===e&&(a-=1),n[e]=a})),n},formatUsesMonthName:function(e){return"object"!=typeof e||e.type||e.format?this.callBase.apply(this,arguments):"long"===e.month},formatUsesDayName:function(e){return"object"!=typeof e||e.type||e.format?this.callBase.apply(this,arguments):"long"===e.weekday},getTimeSeparator:function(){return g(c(new Date(2001,1,1,11,11),{hour:"numeric",minute:"numeric",hour12:!1})).replace(/\d/g,"")},getFormatParts:function(e){if("string"==typeof e)return this.callBase(e);const t=(0,o.extend)({},m[e.toLowerCase()]),i=new Date(2001,2,4,5,6,7);let n=l(t)(i);n=g(n);return[{name:"year",value:1},{name:"month",value:3},{name:"day",value:4},{name:"hours",value:5},{name:"minutes",value:6},{name:"seconds",value:7}].map((e=>({name:e.name,index:n.indexOf(e.value)}))).filter((e=>e.index>-1)).sort(((e,t)=>e.index-t.index)).map((e=>e.name))}};e.exports=t.default,e.exports.default=t.default},63265:function(e,t,i){t.default=void 0;var n=i(83077),o=r(i(84109)),a=r(i(70832)),s=r(i(55581));function r(e){return e&&e.__esModule?e:{default:e}}const l=["standard","accounting"],d=/([^\s0]+)?(\s*)0*[.,]*0*(\s*)([^\s0]+)?/,u={},c=e=>{const t=o.default.locale()+"/"+JSON.stringify(e);return u[t]||(u[t]=new Intl.NumberFormat(o.default.locale(),e).format),u[t]};t.default={engine:function(){return"intl"},_formatNumberCore:function(e,t,i){return"exponential"===t?this.callBase.apply(this,arguments):c(this._normalizeFormatConfig(t,i,e))(e)},_normalizeFormatConfig:function(e,t,i){let o;if("decimal"===e){const e=String(i).split(".")[1];o={minimumIntegerDigits:t.precision||void 0,useGrouping:!1,maximumFractionDigits:e&&e.length,round:i<0?"ceil":"floor"}}else o=this._getPrecisionConfig(t.precision);if("percent"===e)o.style="percent";else if("currency"===e){const e=t.useCurrencyAccountingStyle??(0,n.config)().defaultUseCurrencyAccountingStyle;o.style="currency",o.currency=t.currency||(0,n.config)().defaultCurrency,o.currencySign=l[+e]}return o},_getPrecisionConfig:function(e){let t;return t=null===e?{minimumFractionDigits:0,maximumFractionDigits:20}:{minimumFractionDigits:e||0,maximumFractionDigits:e||0},t},format:function(e,t){return"number"!=typeof e?e:("default"===(t=this._normalizeFormat(t)).currency&&(t.currency=(0,n.config)().defaultCurrency),t&&("function"==typeof t||t.type||t.formatter)?this.callBase.apply(this,arguments):c(t)(e))},_getCurrencySymbolInfo:function(e){const t=(e=>new Intl.NumberFormat(o.default.locale(),{style:"currency",currency:e}))(e);return this._extractCurrencySymbolInfo(t.format(0))},_extractCurrencySymbolInfo:function(e){const t=d.exec(e)||[];return{position:t[1]?"before":"after",symbol:t[1]||t[4]||"",delimiter:t[2]||t[3]||""}},getCurrencySymbol:function(e){e||(e=(0,n.config)().defaultCurrency);return{symbol:this._getCurrencySymbolInfo(e).symbol}},getOpenXmlCurrencyFormat:function(e){const t=e||(0,n.config)().defaultCurrency,i=this._getCurrencySymbolInfo(t).symbol,r=o.default.getValueByClosestLocale((e=>s.default[e]));return(0,a.default)(i,r)}};e.exports=t.default,e.exports.default=t.default},64333:function(e,t,i){t.getLanguageId=function(){return a[o.default.locale()]};var n,o=(n=i(84109))&&n.__esModule?n:{default:n};const a={ar:1,bg:2,ca:3,"zh-Hans":4,cs:5,da:6,de:7,el:8,en:9,es:10,fi:11,fr:12,he:13,hu:14,is:15,it:16,ja:17,ko:18,nl:19,no:20,pl:21,pt:22,rm:23,ro:24,ru:25,hr:26,sk:27,sq:28,sv:29,th:30,tr:31,ur:32,id:33,uk:34,be:35,sl:36,et:37,lv:38,lt:39,tg:40,fa:41,vi:42,hy:43,az:44,eu:45,hsb:46,mk:47,tn:50,xh:52,zu:53,af:54,ka:55,fo:56,hi:57,mt:58,se:59,ga:60,ms:62,kk:63,ky:64,sw:65,tk:66,uz:67,tt:68,bn:69,pa:70,gu:71,or:72,ta:73,te:74,kn:75,ml:76,as:77,mr:78,sa:79,mn:80,bo:81,cy:82,km:83,lo:84,gl:86,kok:87,syr:90,si:91,iu:93,am:94,tzm:95,ne:97,fy:98,ps:99,fil:100,dv:101,ha:104,yo:106,quz:107,nso:108,ba:109,lb:110,kl:111,ig:112,ii:120,arn:122,moh:124,br:126,ug:128,mi:129,oc:130,co:131,gsw:132,sah:133,qut:134,rw:135,wo:136,prs:140,gd:145,"ar-SA":1025,"bg-BG":1026,"ca-ES":1027,"zh-TW":1028,"cs-CZ":1029,"da-DK":1030,"de-DE":1031,"el-GR":1032,"en-US":1033,"fi-FI":1035,"fr-FR":1036,"he-IL":1037,"hu-HU":1038,"is-IS":1039,"it-IT":1040,"ja-JP":1041,"ko-KR":1042,"nl-NL":1043,"nb-NO":1044,"pl-PL":1045,"pt-BR":1046,"rm-CH":1047,"ro-RO":1048,"ru-RU":1049,"hr-HR":1050,"sk-SK":1051,"sq-AL":1052,"sv-SE":1053,"th-TH":1054,"tr-TR":1055,"ur-PK":1056,"id-ID":1057,"uk-UA":1058,"be-BY":1059,"sl-SI":1060,"et-EE":1061,"lv-LV":1062,"lt-LT":1063,"tg-Cyrl-TJ":1064,"fa-IR":1065,"vi-VN":1066,"hy-AM":1067,"az-Latn-AZ":1068,"eu-ES":1069,"hsb-DE":1070,"mk-MK":1071,"tn-ZA":1074,"xh-ZA":1076,"zu-ZA":1077,"af-ZA":1078,"ka-GE":1079,"fo-FO":1080,"hi-IN":1081,"mt-MT":1082,"se-NO":1083,"ms-MY":1086,"kk-KZ":1087,"ky-KG":1088,"sw-KE":1089,"tk-TM":1090,"uz-Latn-UZ":1091,"tt-RU":1092,"bn-IN":1093,"pa-IN":1094,"gu-IN":1095,"or-IN":1096,"ta-IN":1097,"te-IN":1098,"kn-IN":1099,"ml-IN":1100,"as-IN":1101,"mr-IN":1102,"sa-IN":1103,"mn-MN":1104,"bo-CN":1105,"cy-GB":1106,"km-KH":1107,"lo-LA":1108,"gl-ES":1110,"kok-IN":1111,"syr-SY":1114,"si-LK":1115,"iu-Cans-CA":1117,"am-ET":1118,"ne-NP":1121,"fy-NL":1122,"ps-AF":1123,"fil-PH":1124,"dv-MV":1125,"ha-Latn-NG":1128,"yo-NG":1130,"quz-BO":1131,"nso-ZA":1132,"ba-RU":1133,"lb-LU":1134,"kl-GL":1135,"ig-NG":1136,"ii-CN":1144,"arn-CL":1146,"moh-CA":1148,"br-FR":1150,"ug-CN":1152,"mi-NZ":1153,"oc-FR":1154,"co-FR":1155,"gsw-FR":1156,"sah-RU":1157,"qut-GT":1158,"rw-RW":1159,"wo-SN":1160,"prs-AF":1164,"gd-GB":1169,"ar-IQ":2049,"zh-CN":2052,"de-CH":2055,"en-GB":2057,"es-MX":2058,"fr-BE":2060,"it-CH":2064,"nl-BE":2067,"nn-NO":2068,"pt-PT":2070,"sr-Latn-CS":2074,"sv-FI":2077,"az-Cyrl-AZ":2092,"dsb-DE":2094,"se-SE":2107,"ga-IE":2108,"ms-BN":2110,"uz-Cyrl-UZ":2115,"bn-BD":2117,"mn-Mong-CN":2128,"iu-Latn-CA":2141,"tzm-Latn-DZ":2143,"quz-EC":2155,"ar-EG":3073,"zh-HK":3076,"de-AT":3079,"en-AU":3081,"es-ES":3082,"fr-CA":3084,"sr-Cyrl-CS":3098,"se-FI":3131,"quz-PE":3179,"ar-LY":4097,"zh-SG":4100,"de-LU":4103,"en-CA":4105,"es-GT":4106,"fr-CH":4108,"hr-BA":4122,"smj-NO":4155,"ar-DZ":5121,"zh-MO":5124,"de-LI":5127,"en-NZ":5129,"es-CR":5130,"fr-LU":5132,"bs-Latn-BA":5146,"smj-SE":5179,"ar-MA":6145,"en-IE":6153,"es-PA":6154,"fr-MC":6156,"sr-Latn-BA":6170,"sma-NO":6203,"ar-TN":7169,"en-ZA":7177,"es-DO":7178,"sr-Cyrl-BA":7194,"sma-SE":7227,"ar-OM":8193,"en-JM":8201,"es-VE":8202,"bs-Cyrl-BA":8218,"sms-FI":8251,"ar-YE":9217,"en-029":9225,"es-CO":9226,"sr-Latn-RS":9242,"smn-FI":9275,"ar-SY":10241,"en-BZ":10249,"es-PE":10250,"sr-Cyrl-RS":10266,"ar-JO":11265,"en-TT":11273,"es-AR":11274,"sr-Latn-ME":11290,"ar-LB":12289,"en-ZW":12297,"es-EC":12298,"sr-Cyrl-ME":12314,"ar-KW":13313,"en-PH":13321,"es-CL":13322,"ar-AE":14337,"es-UY":14346,"ar-BH":15361,"es-PY":15370,"ar-QA":16385,"en-IN":16393,"es-BO":16394,"en-MY":17417,"es-SV":17418,"en-SG":18441,"es-HN":18442,"es-NI":19466,"es-PR":20490,"es-US":21514,"bs-Cyrl":25626,"bs-Latn":26650,"sr-Cyrl":27674,"sr-Latn":28698,smn:28731,"az-Cyrl":29740,sms:29755,zh:30724,nn:30740,bs:30746,"az-Latn":30764,sma:30779,"uz-Cyrl":30787,"mn-Cyrl":30800,"iu-Cans":30813,"zh-Hant":31748,nb:31764,sr:31770,"tg-Cyrl":31784,dsb:31790,smj:31803,"uz-Latn":31811,"mn-Mong":31824,"iu-Latn":31837,"tzm-Latn":31839,"ha-Latn":31848}},83445:function(e,t,i){t.getFormat=void 0;var n,o=(n=i(52771))&&n.__esModule?n:{default:n};const a=" .,:;/\\<>()-[]\u060c",s=function(e){const t=e&&o.default.convertDigits(e,!1).charCodeAt(0),i=o.default.convertDigits("0",!1).charCodeAt(0);return i<=t&&t<i+10},r=function(e,t,i,n){const o=e[i],r=e[i+1];if(!n){if("."===o||" "===o&&". m."===e.slice(i-1,i+3))return!0;if("-"===o&&!s(r))return!0}const l=n&&t.some((t=>e[i]!==t[i]));return a.indexOf(o)<0&&n===s(o)&&(!n||l)},l=function(e,t){if(!s(e[t]))for(;t>0&&!s(e[t-1])&&("."===e[t-1]||a.indexOf(e[t-1])<0);)t--;return t},d=function(e,t){return Array.isArray(e)?e.map((function(e){return(t(e)||"").toString()})):(t(e)||"").toString()},u=/[a-zA-Z]/g;t.getFormat=function(e){const t=[],i=d(new Date(2009,8,8,6,5,4),e),n=i.split("").map((function(e,t){return t}));let o=i;const a={},c=[{date:new Date(2009,8,8,6,5,4,111),pattern:"S"},{date:new Date(2009,8,8,6,5,2),pattern:"s"},{date:new Date(2009,8,8,6,2,4),pattern:"m"},{date:new Date(2009,8,8,18,5,4),pattern:"H",isDigit:!0},{date:new Date(2009,8,8,2,5,4),pattern:"h",isDigit:!0},{date:new Date(2009,8,8,18,5,4),pattern:"a",isDigit:!1},{date:new Date(2009,8,1,6,5,4),pattern:"d"},{date:[new Date(2009,8,2,6,5,4),new Date(2009,8,3,6,5,4),new Date(2009,8,4,6,5,4)],pattern:"E"},{date:new Date(2009,9,6,6,5,4),pattern:"M"},{date:new Date(1998,8,8,6,5,4),pattern:"y"}];if(o)return c.forEach((function(u){const c=function(e,t,i,n){let o=0;const a=[],d=function(t){return e[o]!==t[o]&&(void 0===n||s(e[o])===n)};for(Array.isArray(t)||(t=[t]),o=0;o<e.length;o++)if(i.indexOf(o)<0&&t.filter(d).length){o=l(e,o);do{if(n=s(e[o]),!a.length&&!n&&s(t[0][o]))break;a.push(o),i.unshift(o),o++}while(e[o]&&r(e,t,o,n));break}return 1!==a.length||"0"!==e[i[0]-1]&&"\u0660"!==e[i[0]-1]||i.unshift(i[0]-1),a}(i,d(u.date,e),t,u.isDigit),h="M"!==u.pattern||a.d?u.pattern:"L";o=function(e,t,i,n){let o,a,r;if(!s(e[t[0]]||"0")){const s=Math.max(t.length<=3?3:4,i.length);for(;t.length>s;){for(a=t.pop(),r=n[a],n[a]=-1,o=a+1;o<n.length;o++)n[o]--;e=e.substr(0,r)+e.substr(r+1)}for(a=t[t.length-1]+1,r=a<n.length?n[a]:a;t.length<s;){for(t.push(t[t.length-1]+1),o=a;o<n.length;o++)n[o]++;e=e.substr(0,r)+" "+e.substr(r)}}return e=function(e,t,i,n){const o=t[0],a=o<n.length?n[o]:o;return t.forEach((function(t,n){e=e.substr(0,a+n)+(i.length>1?i[n]:i)+e.substr(a+n+1)})),1===t.length&&(e=(e=e.replace("0"+i,i+i)).replace("\u0660"+i,i+i)),e}(e,t,i,n),e}(o,c,h,n),a[h]=c.length})),o=function(e,t,i,n){const o=t.split("").map((function(e,t){return i.indexOf(t)<0&&(e.match(u)||"'"===e)?n[t]:-1}));return e.split("").map((function(e,t){let i=e;const n=o.indexOf(t)>=0,a=t>0&&o.indexOf(t-1)>=0,s=o.indexOf(t+1)>=0;return n&&(a||(i="'"+i),s||(i+="'")),i})).join("")}(o,i,t,n),t.length?o:void 0}},86670:function(e,t){function i(e,t){for(;e.length<t;)e="0"+e;return e}t.getFormatter=void 0;const n={3:"abbreviated",4:"wide",5:"narrow"},o={y:function(e,t,n){let o=e[n?"getUTCFullYear":"getFullYear"]();return 2===t&&(o%=100),i(o.toString(),t)},M:function(e,t,o,a){const s=e[o?"getUTCMonth":"getMonth"](),r=n[t];return r?a.getMonthNames(r,"format")[s]:i((s+1).toString(),Math.min(t,2))},L:function(e,t,o,a){const s=e[o?"getUTCMonth":"getMonth"](),r=n[t];return r?a.getMonthNames(r,"standalone")[s]:i((s+1).toString(),Math.min(t,2))},Q:function(e,t,o,a){const s=e[o?"getUTCMonth":"getMonth"](),r=Math.floor(s/3),l=n[t];return l?a.getQuarterNames(l)[r]:i((r+1).toString(),Math.min(t,2))},E:function(e,t,i,o){const a=e[i?"getUTCDay":"getDay"](),s=n[t<3?3:t];return o.getDayNames(s)[a]},a:function(e,t,i,o){const a=e[i?"getUTCHours":"getHours"]()<12?0:1,s=n[t];return o.getPeriodNames(s)[a]},d:function(e,t,n){return i(e[n?"getUTCDate":"getDate"]().toString(),Math.min(t,2))},H:function(e,t,n){return i(e[n?"getUTCHours":"getHours"]().toString(),Math.min(t,2))},h:function(e,t,n){return i((e[n?"getUTCHours":"getHours"]()%12||12).toString(),Math.min(t,2))},m:function(e,t,n){return i(e[n?"getUTCMinutes":"getMinutes"]().toString(),Math.min(t,2))},s:function(e,t,n){return i(e[n?"getUTCSeconds":"getSeconds"]().toString(),Math.min(t,2))},S:function(e,t,n){return i(e[n?"getUTCMilliseconds":"getMilliseconds"]().toString(),3).substr(0,t)},x:function(e,t,n){const o=n?0:e.getTimezoneOffset(),a=o>0?"-":"+",s=Math.abs(o),r=s%60,l=i(Math.floor(s/60).toString(),2),d=i(r.toString(),2);return a+l+(t>=3?":":"")+(t>1||r?d:"")},X:function(e,t,i){return i||!e.getTimezoneOffset()?"Z":o.x(e,t,i)},Z:function(e,t,i){return o.X(e,t>=5?3:2,i)}};t.getFormatter=function(e,t){return function(i){let n,a,s,r=0;let l,d=!1,u="";if(!i)return null;if(!e)return i;const c="Z"===e[e.length-1]||"'Z'"===e.slice(-3);for(n=0;n<e.length;n++)s=e[n],a=o[s],l=s===e[n+1],r++,l||(a&&!d&&(u+=a(i,r,c,t)),r=0),"'"!==s||l?!d&&a||(u+=s):d=!d,"'"===s&&l&&n++;return u}}},46981:function(e,t,i){t.isPossibleForParsingFormat=t.getRegExpInfo=t.getPatternSetters=t.getParser=void 0;var n=i(17781),o=i(31951);const a={3:"abbreviated",4:"wide",5:"narrow"},s=function(e,t){return e>2?Object.keys(a).map((function(e){return["format","standalone"].map((function(i){return t.getMonthNames(a[e],i).join("|")})).join("|")})).join("|"):2===e?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},r={":":function(e,t){const i=e>1?`{${e}}`:"";let o=(0,n.escapeRegExp)(t.getTimeSeparator());return":"!==o&&(o=`${o}|:`),`${o}${i}`},y:function(e){return 2===e?`[0-9]{${e}}`:"[0-9]+?"},M:s,L:s,Q:function(e,t){return e>2?t.getQuarterNames(a[e],"format").join("|"):"0?[1-4]"},E:function(e,t){return"\\D*"},a:function(e,t){return t.getPeriodNames(a[e<3?3:e],"format").join("|")},d:function(e){return 2===e?"3[01]|[12][0-9]|0?[1-9]":"0??[1-9]|[12][0-9]|3[01]"},H:function(e){return 2===e?"2[0-3]|1[0-9]|0?[0-9]":"0??[0-9]|1[0-9]|2[0-3]"},h:function(e){return 2===e?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},m:function(e){return 2===e?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},s:function(e){return 2===e?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},S:function(e){return`[0-9]{1,${e}}`},w:function(e){return 2===e?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},x:function(e){return 3===e?"[+-](?:2[0-3]|[01][0-9]):(?:[0-5][0-9])|Z":"[+-](?:2[0-3]|[01][0-9])(?:[0-5][0-9])|Z"}},l=Number,d=function(e,t){return e.map((e=>e.toLowerCase())).indexOf(t.toLowerCase())},u=function(e,t,i){return t>2?["format","standalone"].map((function(t){return Object.keys(a).map((function(n){const o=i.getMonthNames(a[n],t);return d(o,e)}))})).reduce((function(e,t){return e.concat(t)})).filter((function(e){return e>=0}))[0]:l(e)-1},c={y:function(e,t){const i=l(e);return 2===t?i<30?2e3+i:1900+i:i},M:u,L:u,Q:function(e,t,i){return t>2?i.getQuarterNames(a[t],"format").indexOf(e):l(e)-1},E:function(e,t,i){const n=i.getDayNames(a[t<3?3:t],"format");return d(n,e)},a:function(e,t,i){const n=i.getPeriodNames(a[t<3?3:t],"format");return d(n,e)},d:l,H:l,h:l,m:l,s:l,S:function(e,t){for(t=Math.max(t,3),e=e.slice(0,3);t<3;)e+="0",t++;return l(e)}},h=["y","M","d","h","m","s","S"],p={y:"setFullYear",M:"setMonth",L:"setMonth",a:function(e,t,i){let n=e.getHours();const o=i.h;void 0!==o&&o!==n&&n--,t||12!==n?t&&12!==n&&(n+=12):n=0,e.setHours(n)},d:"setDate",H:"setHours",h:"setHours",m:"setMinutes",s:"setSeconds",S:"setMilliseconds"},g=function(e,t){const i=e[t];if(!i)return 0;let n=0;do{t++,n++}while(e[t]===i);return n},_=function(e,t){let i="";for(let n=0;n<t;n++)i+=e;return i},f=function(e,t){let i,a="",s="";const l=[],d=function(){s&&(l.push(`'${s}'`),a+=`${(0,n.escapeRegExp)(s)})`,s="")};for(let n=0;n<e.length;n++){const o=e[n],u=r[o];if(!("'"===o)||(i=!i,"'"===e[n-1]))if(u&&!i){const i=g(e,n),s=_(o,i);d(),l.push(s),a+=`(${u(i,t)})`,n+=i-1}else s||(a+="("),s+=o}return d(),v(l)||o.logger.warn(`The following format may be parsed incorrectly: ${e}.`),{patterns:l,regexp:new RegExp(`^${a}$`,"i")}};t.getRegExpInfo=f;const m=["d","H","h","m","s","w","M","L","Q"],v=function(e){const t=e=>{if(!e)return!1;const t=e[0];return["y","S"].includes(t)||m.includes(t)&&e.length<3};let i=!0,n=0;return e.every(((e,o,a)=>(t(e)&&((e=>"S"!==e[0]&&2!==e.length)(e)&&(i=++n<2),t(a[o+1])||(n=0)),i)))};t.isPossibleForParsingFormat=v;t.getPatternSetters=function(){return p};t.getParser=function(e,t){const i=f(e,t);return function(e){const n=i.regexp.exec(e);if(n){const e=new Date,o=new Date(e.getFullYear(),0,1),a=i.patterns.map((function(e){return"'"===e[0]?"":"H"===e[0]?"h":e[0]})),s=function(e){const t=e.map((function(e){return h.indexOf(e)}));return Math.max.apply(Math,t)}(a),r=function(e){const t=e.filter((function(e){return h.indexOf(e)<0}));return h.concat(t)}(a),l={};return r.forEach((function(r,d){if(!r||d<h.length&&d>s)return;const u=a.indexOf(r);if(u>=0){const e=i.patterns[u],a=n[u+1];!function(e,t,i,n,o){const a=t[0],s=p[a],r=c[a];if(s&&r){const a=r(i,t.length,n);o[t]=a,e[s]?e[s](a):s(e,a,o)}}(o,e,a,t,l)}else!function(e,t,i){const n=p[t],o=i["g"+n.substr(1)]();e[n](o)}(o,r,e)})),o}return null}}},33687:function(e,t,i){t.getFormat=function(e){let t=".";const i=e(1).indexOf("100")>=0;t=f(t,e,i,!0),t=f(t,e,i,!1);const n=m(t,e,i,!1),o=m(t,e,i,!0);return o==="-"+n?n:n+";"+o},t.getFormatter=function(e,t){return t=t||a,function(i){if("number"!=typeof i||isNaN(i))return"";const a=function(e){const t=e.split(";");1===t.length&&t.push("-"+t[0]);return t}(e),s=i>0||1/i==1/0,u=a[s?0:1],_=function(e){let t=!1;for(let i=0;i<e.length;i++)if("'"===e[i]&&(t=!t),"."===e[i]&&!t)return i;return e.length}(u),f=[u.substr(0,_),u.substr(_+1)],m=h(f[1]),v=m+c(f[1]);(function(e){return-1!==e.indexOf("%")&&!e.match(/'[^']*%[^']*'/g)})(u)&&(i=(0,n.multiplyInExponentialForm)(i,l)),s||(i=-i);const C=h(f[0]),y=c(f[0])||t.unlimitedIntegerDigits?void 0:C,b=Math.floor(i).toString().length,x=(0,n.fitIntoRange)(v,0,r-b),w=(S=f[0],S.split(",").slice(1).map((function(e){let t=0;return e.split("").filter((function(e,i){return t+="'"===e,!("#"!==e&&"0"!==e||t%2)})).length}))).reverse();var S;const D=(0,o.toFixed)(i,x<0?0:x).split(".");let I=p(d(D[0]),C,y);const E=p(D[1],m,v);I=function(e,t,i){if(!t.length)return e;const n=[];let o=0;for(;e;){const i=t[o];if(!i)break;n.push(e.slice(0,i)),e=e.slice(i),o<t.length-1&&o++}return n.join(i)}(I,w,t.thousandsSeparator);const T=d(g(d(f[0]),I)),A=v?g(f[1],E):"";return T+(A.match(/\d/)?t.decimalSeparator:"")+A}};var n=i(50254),o=i(57181);const a={thousandsSeparator:",",decimalSeparator:"."},s="'",r=15,l=2;function d(e){return e.toString().split("").reverse().join("")}function u(e){return e.replace(/'.+'/g,"")}function c(e){if(!e)return 0;const t=u(e);return t.length-t.replace(/[#]/g,"").length}function h(e){if(!e)return 0;const t=u(e);return t.length-t.replace(/[0]/g,"").length}function p(e,t,i){if(!e)return"";for(e.length>i&&(e=e.substr(0,i));e.length>t&&"0"===e.slice(-1);)e=e.substr(0,e.length-1);for(;e.length<t;)e+="0";return e}function g(e,t){return e.split(s).map((function(e,i){const n=i%2;return!e&&n?s:n?e:e.replace(/[,#0]+/,t)})).join("")}function _(e,t,i){const n=(t?.01:1)*parseFloat(e)||0;return i?-n:n}function f(e,t,i,n){let o,a,s,r=e;do{s&&(o=a.length===s.length?"0":"1",e=n?o+e:e+o),a=s||t(_(r,i)),r=n?"1"+r:r+"1",s=t(_(r,i))}while(a!==s&&(n?a.length===s.length:a.length<=s.length));if(n&&s.length>a.length){const n=-1===t(12345).indexOf("12345");do{e="1"+e}while(n&&_(e,i)<1e5)}return e}function m(e,t,i,n){let o=t(_(e,i,n));const a=e.split("."),s=t(_(a[0]+".3"+a[1].slice(1),i,n)).indexOf("3")-1;return o=o.replace(/(\d)\D(\d)/g,"$1,$2"),s>=0&&(o=o.slice(0,s)+"."+o.slice(s+1)),o=o.replace(/1+/,"1").replace(/1/g,"#"),i||(o=o.replace(/%/g,"'%'")),o}},4671:function(e,t,i){t.default=void 0;var n=d(i(89656)),o=i(52576),a=i(54497),s=i(53124),r=d(i(84109)),l=i(62788);function d(e){return e&&e.__esModule?e:{default:e}}const u=(0,o.extend)(!0,{},l.defaultMessages),c={},h=(0,n.default)({engine:function(){return"base"},_dictionary:u,load:function(e){(0,o.extend)(!0,this._dictionary,e)},_localizablePrefix:"@",setup:function(e){this._localizablePrefix=e},localizeString:function(e){const t=this,i=new RegExp("(^|[^a-zA-Z_0-9"+t._localizablePrefix+"-]+)("+t._localizablePrefix+"{1,2})([a-zA-Z_0-9-]+)","g"),n=t._localizablePrefix+t._localizablePrefix;return e.replace(i,((e,i,o,a)=>{const r=t._localizablePrefix+a;let l;return o!==n&&(l=t.format(a)),l||(c[a]=(0,s.humanize)(a)),i+(l||r)}))},getMessagesByLocales:function(){return this._dictionary},getDictionary:function(e){return e?c:(0,o.extend)({},c,this.getMessagesByLocales()[r.default.locale()])},getFormatter:function(e){return this._getFormatterBase(e)||this._getFormatterBase(e,"en")},_getFormatterBase:function(e,t){const i=r.default.getValueByClosestLocale((t=>((e,t)=>{var i;return e[t]||(null==t?void 0:t.toLowerCase)&&(null===(i=Object.entries(e).find((e=>{let[i]=e;return i.toLowerCase()===t.toLowerCase()})))||void 0===i?void 0:i[1])||{}})(this._dictionary,t)[e]));if(i)return function(){const e=1===arguments.length&&Array.isArray(arguments[0])?arguments[0].slice(0):Array.prototype.slice.call(arguments,0);return e.unshift(i),a.format.apply(this,e)}},format:function(e){const t=this.getFormatter(e),i=Array.prototype.slice.call(arguments,1);return t&&t.apply(this,i)||""}});t.default=h;e.exports=t.default,e.exports.default=t.default},52771:function(e,t,i){t.default=void 0;var n=p(i(89656)),o=i(17781),a=i(21274),s=i(11528),r=i(33687),l=p(i(66636)),d=p(i(87129)),u=i(57181),c=p(i(17333)),h=p(i(63265));function p(e){return e&&e.__esModule?e:{default:e}}const g="undefined"!=typeof Intl,_=["currency","fixedpoint","exponential","percent","decimal"],f={1:"K",2:"M",3:"B",4:"T"},m={largenumber:"auto",thousands:1,millions:2,billions:3,trillions:4},v=(0,n.default)({engine:function(){return"base"},numericFormats:_,defaultLargeNumberFormatPostfixes:f,_parseNumberFormatString:function(e){const t={};if(!e||"string"!=typeof e)return;const i=e.toLowerCase().split(" ");return(0,a.each)(i,((e,i)=>{_.includes(i)?t.formatType=i:i in m&&(t.power=m[i])})),t.power&&!t.formatType&&(t.formatType="fixedpoint"),t.formatType?t:void 0},_calculateNumberPower:function(e,t,i,n){let o=Math.abs(e),a=0;if(o>1)for(;o&&o>=t&&(void 0===n||a<n);)a++,o/=t;else if(o>0&&o<1)for(;o<1&&(void 0===i||a>i);)a--,o*=t;return a},_getNumberByPower:function(e,t,i){let n=e;for(;t>0;)n/=i,t--;for(;t<0;)n*=i,t++;return n},_formatNumber:function(e,t,i){"auto"===t.power&&(t.power=this._calculateNumberPower(e,1e3,0,4)),t.power&&(e=this._getNumberByPower(e,t.power,1e3));const n=this.defaultLargeNumberFormatPostfixes[t.power]||"";let o=this._formatNumberCore(e,t.formatType,i);return o=o.replace(/(\d|.$)(\D*)$/,"$1"+n+"$2"),o},_formatNumberExponential:function(e,t){let i=this._calculateNumberPower(e,10),n=this._getNumberByPower(e,i,10);void 0===t.precision&&(t.precision=1),n.toFixed(t.precision||0)>=10&&(i++,n/=10);const o=(i>=0?"+":"")+i.toString();return this._formatNumberCore(n,"fixedpoint",t)+"E"+o},_addZeroes:function(e,t){const i=Math.pow(10,t),n=e<0?"-":"";let o=(e=(Math.abs(e)*i>>>0)/i).toString();for(;o.length<t;)o="0"+o;return n+o},_addGroupSeparators:function(e){const t=e.toString().split(".");return t[0].replace(/\B(?=(\d{3})+(?!\d))/g,(0,l.default)().thousandsSeparator)+(t[1]?(0,l.default)().decimalSeparator+t[1]:"")},_formatNumberCore:function(e,t,i){return"exponential"===t?this._formatNumberExponential(e,i):("decimal"!==t&&null!==i.precision&&(i.precision=i.precision||0),"percent"===t&&(e*=100),void 0!==i.precision&&(e="decimal"===t?this._addZeroes(e,i.precision):null===i.precision?e.toPrecision():(0,u.toFixed)(e,i.precision)),e="decimal"!==t?this._addGroupSeparators(e):e.toString().replace(".",(0,l.default)().decimalSeparator),"percent"===t&&(e+="%"),e)},_normalizeFormat:function(e){return e?("function"==typeof e||(0,s.isPlainObject)(e)||(e={type:e}),e):{}},_getSeparators:function(){return{decimalSeparator:this.getDecimalSeparator(),thousandsSeparator:this.getThousandsSeparator()}},getThousandsSeparator:function(){return this.format(1e4,"fixedPoint")[2]},getDecimalSeparator:function(){return this.format(1.2,{type:"fixedPoint",precision:1})[1]},convertDigits:function(e,t){const i=this.format(90,"decimal");if("string"!=typeof e||"0"===i[1])return e;const n=t?i[1]:"0",o=t?"0":i[1],a=t?i[0]:"9",s=new RegExp("["+n+"-"+a+"]","g");return e.replace(s,(e=>String.fromCharCode(e.charCodeAt(0)+(o.charCodeAt(0)-n.charCodeAt(0)))))},getNegativeEtalonRegExp:function(e){const t=this._getSeparators(),i=new RegExp("[0-9"+(0,o.escapeRegExp)(t.decimalSeparator+t.thousandsSeparator)+"]+","g");let n=this.format(-1,e).replace(i,"1");return["\\","(",")","[","]","*","+","$","^","?","|","{","}"].forEach((e=>{n=n.replace(new RegExp(`\\${e}`,"g"),`\\${e}`)})),n=n.replace(/ /g,"\\s"),n=n.replace(/1/g,".*"),new RegExp(n,"g")},getSign:function(e,t){if(!t)return"-"===e.replace(/[^0-9-]/g,"").charAt(0)?-1:1;const i=this.getNegativeEtalonRegExp(t);return e.match(i)?-1:1},format:function(e,t){if("number"!=typeof e)return e;if("number"==typeof t)return e;if("function"==typeof(t=t&&t.formatter||t))return t(e);(t=this._normalizeFormat(t)).type||(t.type="decimal");const i=this._parseNumberFormatString(t.type);if(!i){const i=this._getSeparators();return i.unlimitedIntegerDigits=t.unlimitedIntegerDigits,this.convertDigits((0,r.getFormatter)(t.type,i)(e))}return this._formatNumber(e,i,t)},parse:function(e,t){if(!e)return;if(t&&t.parser)return t.parser(e);e=this.convertDigits(e,!0),t&&"string"!=typeof t&&d.default.log("W0011");const i=this.getDecimalSeparator(),n=new RegExp("[^0-9"+(0,o.escapeRegExp)(i)+"]","g"),a=e.replace(n,"").replace(i,".").replace(/\.$/g,"");if("."===a||""===a)return null;if(this._calcSignificantDigits(a)>15)return NaN;let s=+a*this.getSign(e,t);t=this._normalizeFormat(t);const r=this._parseNumberFormatString(t.type);let l=null==r?void 0:r.power;if(l){if("auto"===l){const t=e.match(/\d(K|M|B|T)/);t&&(l=Object.keys(f).find((e=>f[e]===t[1])))}s*=Math.pow(10,3*l)}return"percent"===(null==r?void 0:r.formatType)&&(s/=100),s},_calcSignificantDigits:function(e){const[t,i]=e.split("."),n=e=>{let t=-1;for(let i=0;i<e.length;i++)if("0"!==e[i]){t=i;break}return t>-1?e.length-t:0};let o=0;return t&&(o+=n(t.split(""))),i&&(o+=n(i.split("").reverse())),o}});v.inject(c.default),g&&v.inject(h.default);t.default=v;e.exports=t.default,e.exports.default=t.default},70832:function(e,t){t.default=void 0;t.default=(e,t)=>{if(!t)return;let i=e;if("string"==typeof e){i="";for(let t=0;t<e.length;t++)"$"!==e[t]&&(i+="\\"),i+=e[t]}const n={".00":"{0}","'":"\\'","\\(":"\\(","\\)":"\\)"," ":"\\ ",'"':"&quot;","\\\xa4":i},o=t.split(";");for(let e=0;e<o.length;e++)for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[e]=o[e].replace(new RegExp(t,"g"),n[t]));return 2===o.length?o[0]+"_);"+o[1]:o[0]},e.exports=t.default,e.exports.default=t.default},55088:function(e,t){t.default=void 0;t.default=(e,t)=>{const i=e[t];return i?"root"!==i&&i:t.substr(0,t.lastIndexOf("-"))},e.exports=t.default,e.exports.default=t.default},57181:function(e,t,i){t.toFixed=function(e,t){const i=t||0,a=i>0?function(e,t){const i=Math.pow(o,t),a=(0,n.multiplyInExponentialForm)(e,t);return function(e){const t=(0,n.sign)(e);return t*Math.round(Math.abs(e))}(a)/i}(...arguments):e;return a.toFixed(i)};var n=i(50254);const o=10},11036:function(e,t,i){Object.defineProperty(t,"ArrayStore",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"CustomStore",{enumerable:!0,get:function(){return a.CustomStore}}),Object.defineProperty(t,"DataHelperMixin",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"DataSource",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"EdmLiteral",{enumerable:!0,get:function(){return _.EdmLiteral}}),Object.defineProperty(t,"EndpointSelector",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"LocalStore",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ODataContext",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"ODataStore",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"applyChanges",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"base64_encode",{enumerable:!0,get:function(){return c.base64_encode}}),Object.defineProperty(t,"compileGetter",{enumerable:!0,get:function(){return c.compileGetter}}),Object.defineProperty(t,"compileSetter",{enumerable:!0,get:function(){return c.compileSetter}}),Object.defineProperty(t,"errorHandler",{enumerable:!0,get:function(){return l.errorHandler}}),Object.defineProperty(t,"isGroupItemsArray",{enumerable:!0,get:function(){return a.isGroupItemsArray}}),Object.defineProperty(t,"isItemsArray",{enumerable:!0,get:function(){return a.isItemsArray}}),Object.defineProperty(t,"isLoadResultObject",{enumerable:!0,get:function(){return a.isLoadResultObject}}),Object.defineProperty(t,"keyConverters",{enumerable:!0,get:function(){return _.keyConverters}}),Object.defineProperty(t,"query",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"setErrorHandler",{enumerable:!0,get:function(){return l.setErrorHandler}});var n=f(i(99745)),o=f(i(80556)),a=i(63326),s=f(i(14479)),r=f(i(44180)),l=i(82812),d=f(i(71790)),u=f(i(30771)),c=i(89358),h=f(i(75990)),p=f(i(34170)),g=f(i(29284)),_=i(8056);function f(e){return e&&e.__esModule?e:{default:e}}},5995:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(1773))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},99745:function(e,t,i){t.default=void 0;var n=i(43792);t.default=n.applyChanges;e.exports=t.default,e.exports.default=t.default},65517:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(79587))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},80556:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(11338))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},43792:function(e,t,i){var n=i(3198);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},63326:function(e,t,i){Object.defineProperty(t,"CustomStore",{enumerable:!0,get:function(){return o.default}}),t.isGroupItemsArray=function(e){return Array.isArray(e)&&!!e.length&&a(e[0])},t.isItemsArray=function(e){return Array.isArray(e)&&!a(e[0])},t.isLoadResultObject=function(e){return!Array.isArray(e)&&"data"in e};var n,o=(n=i(12764))&&n.__esModule?n:{default:n};function a(e){return null!=e&&"object"==typeof e&&("key"in e&&"items"in e)}},75990:function(e,t,i){t.default=void 0;var n,o=i(68216),a=i(52576),s=i(97169),r=(n=i(5285))&&n.__esModule?n:{default:n};const l="_dataSourceOptions",d="_dataSourceChangedHandler",u="_dataSourceLoadErrorHandler",c="_dataSourceLoadingChangedHandler",h="_dataSourceFromUrlLoadMode",p="_getSpecificDataSourceOption",g="_normalizeDataSource",_={postCtor:function(){this.on("disposing",function(){this._disposeDataSource()}.bind(this))},_refreshDataSource:function(){this._initDataSource(),this._loadDataSource()},_initDataSource:function(){let e,t,i=p in this?this[p]():this.option("dataSource");this._disposeDataSource(),i&&(i instanceof o.DataSource?(this._isSharedDataSource=!0,this._dataSource=i):(e=l in this?this[l]():{},t=this._dataSourceType?this._dataSourceType():o.DataSource,i=(0,s.normalizeDataSourceOptions)(i,{fromUrlLoadMode:h in this&&this[h]()}),this._dataSource=new t((0,a.extend)(!0,{},e,i))),g in this&&(this._dataSource=this[g](this._dataSource)),this._addDataSourceHandlers(),this._initDataController())},_initDataController:function(){var e;const t=null===(e=this.option)||void 0===e?void 0:e.call(this,"_dataController"),i=this._dataSource;this._dataController=t||new r.default(i)},_addDataSourceHandlers:function(){d in this&&this._addDataSourceChangeHandler(),u in this&&this._addDataSourceLoadErrorHandler(),c in this&&this._addDataSourceLoadingChangedHandler(),this._addReadyWatcher()},_addReadyWatcher:function(){this.readyWatcher=function(e){this._ready&&this._ready(!e)}.bind(this),this._dataSource.on("loadingChanged",this.readyWatcher)},_addDataSourceChangeHandler:function(){const e=this._dataSource;this._proxiedDataSourceChangedHandler=function(t){this[d](e.items(),t)}.bind(this),e.on("changed",this._proxiedDataSourceChangedHandler)},_addDataSourceLoadErrorHandler:function(){this._proxiedDataSourceLoadErrorHandler=this[u].bind(this),this._dataSource.on("loadError",this._proxiedDataSourceLoadErrorHandler)},_addDataSourceLoadingChangedHandler:function(){this._proxiedDataSourceLoadingChangedHandler=this[c].bind(this),this._dataSource.on("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)},_loadDataSource:function(){const e=this._dataSource;e&&(e.isLoaded()?this._proxiedDataSourceChangedHandler&&this._proxiedDataSourceChangedHandler():e.load())},_loadSingle:function(e,t){return e="this"===e?this._dataSource.key()||"this":e,this._dataSource.loadSingle(e,t)},_isLastPage:function(){return!this._dataSource||this._dataSource.isLastPage()||!this._dataSource._pageSize},_isDataSourceLoading:function(){return this._dataSource&&this._dataSource.isLoading()},_disposeDataSource:function(){this._dataSource&&(this._isSharedDataSource?(delete this._isSharedDataSource,this._proxiedDataSourceChangedHandler&&this._dataSource.off("changed",this._proxiedDataSourceChangedHandler),this._proxiedDataSourceLoadErrorHandler&&this._dataSource.off("loadError",this._proxiedDataSourceLoadErrorHandler),this._proxiedDataSourceLoadingChangedHandler&&this._dataSource.off("loadingChanged",this._proxiedDataSourceLoadingChangedHandler),this._dataSource._eventsStrategy&&this._dataSource._eventsStrategy.off("loadingChanged",this.readyWatcher)):this._dataSource.dispose(),delete this._dataSource,delete this._proxiedDataSourceChangedHandler,delete this._proxiedDataSourceLoadErrorHandler,delete this._proxiedDataSourceLoadingChangedHandler)},getDataSource:function(){return this._dataSource||null}};t.default=_;e.exports=t.default,e.exports.default=t.default},14479:function(e,t,i){t.default=void 0;var n=i(68216);t.default=n.DataSource;e.exports=t.default,e.exports.default=t.default},68216:function(e,t,i){var n=i(79562);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},95853:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(9427))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},97169:function(e,t,i){var n=i(23923);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},44180:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(17410))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},82812:function(e,t,i){var n=i(5930);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},71790:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(33260))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},34170:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(58824))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},65001:function(e,t,i){var n=i(61575);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},26098:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(8920))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},29284:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(17594))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},8056:function(e,t,i){var n=i(14606);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},30771:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(45149))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},5842:function(e,t){t.default=void 0;t.default={};e.exports=t.default,e.exports.default=t.default},84816:function(e,t,i){t.queryImpl=void 0;var n=a(i(65517)),o=a(i(80882));function a(e){return e&&e.__esModule?e:{default:e}}t.queryImpl={array:n.default,remote:o.default}},80882:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(51324))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},66177:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(41943))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},89358:function(e,t,i){var n={compileGetter:!0,compileSetter:!0};Object.defineProperty(t,"compileGetter",{enumerable:!0,get:function(){return o.compileGetter}}),Object.defineProperty(t,"compileSetter",{enumerable:!0,get:function(){return o.compileSetter}});var o=i(31e3),a=i(30912);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},54594:function(e,t,i){Object.defineProperty(t,"exportDataGrid",{enumerable:!0,get:function(){return n.exportDataGrid}}),Object.defineProperty(t,"exportPivotGrid",{enumerable:!0,get:function(){return o.exportPivotGrid}});var n=i(55921),o=i(44295)},92731:function(e,t,i){Object.defineProperty(t,"exportDataGrid",{enumerable:!0,get:function(){return n.exportDataGrid}}),Object.defineProperty(t,"exportDataGridWithAutoTable",{enumerable:!0,get:function(){return o.exportDataGrid}}),Object.defineProperty(t,"exportGantt",{enumerable:!0,get:function(){return a.exportGantt}});var n=i(93932),o=i(89222),a=i(81863)},71037:function(e,t,i){t.default=void 0;var n=i(7201);t.default=n.Guid;e.exports=t.default,e.exports.default=t.default},32480:function(e,t,i){t.default=void 0;var n=i(61644);t.default=n.setTemplateEngine;e.exports=t.default,e.exports.default=t.default},88412:function(e,t,i){t.default=void 0;var n=i(3226);t.default=n.Action;e.exports=t.default,e.exports.default=t.default},55620:function(e,t,i){t.default=void 0;var n,o=(n=i(40958))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},17863:function(e,t,i){var n=i(65020);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},92848:function(e,t,i){t.default=void 0;var n=i(10718);t.default=n.registerComponent;e.exports=t.default,e.exports.default=t.default},55771:function(e,t,i){t.default=void 0;var n=i(21233);t.default=n.componentRegistratorCallbacks;e.exports=t.default,e.exports.default=t.default},66636:function(e,t,i){t.default=void 0;var n=i(83077);t.default=n.config;e.exports=t.default,e.exports.default=t.default},65951:function(e,t,i){t.default=void 0;var n=i(63705);t.default=n.devices;e.exports=t.default,e.exports.default=t.default},64960:function(e,t,i){t.default=void 0;var n=i(62018);t.default=n.domAdapter;e.exports=t.default,e.exports.default=t.default},97832:function(e,t,i){t.default=void 0;var n,o=(n=i(22331))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},61404:function(e,t,i){Object.defineProperty(t,"getPublicElement",{enumerable:!0,get:function(){return n.getPublicElement}}),Object.defineProperty(t,"getPublicElementNonJquery",{enumerable:!0,get:function(){return n.getPublicElementNonJquery}}),Object.defineProperty(t,"setPublicElementWrapper",{enumerable:!0,get:function(){return n.setPublicElementWrapper}});var n=i(93630)},74663:function(e,t,i){Object.defineProperty(t,"afterCleanData",{enumerable:!0,get:function(){return n.afterCleanData}}),Object.defineProperty(t,"beforeCleanData",{enumerable:!0,get:function(){return n.beforeCleanData}}),Object.defineProperty(t,"cleanData",{enumerable:!0,get:function(){return n.cleanData}}),Object.defineProperty(t,"cleanDataRecursive",{enumerable:!0,get:function(){return n.cleanDataRecursive}}),Object.defineProperty(t,"data",{enumerable:!0,get:function(){return n.data}}),Object.defineProperty(t,"getDataStrategy",{enumerable:!0,get:function(){return n.getDataStrategy}}),Object.defineProperty(t,"removeData",{enumerable:!0,get:function(){return n.removeData}}),Object.defineProperty(t,"setDataStrategy",{enumerable:!0,get:function(){return n.setDataStrategy}}),Object.defineProperty(t,"strategyChanging",{enumerable:!0,get:function(){return n.strategyChanging}});var n=i(29489)},87129:function(e,t,i){t.default=void 0;var n,o=(n=i(5583))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},2607:function(e,t,i){Object.defineProperty(t,"EventsStrategy",{enumerable:!0,get:function(){return n.EventsStrategy}});var n=i(14201)},19427:function(e,t,i){t.default=void 0;var n=i(83077);t.default=n.Guid;e.exports=t.default,e.exports.default=t.default},35688:function(e,t,i){t.default=void 0;var n=i(58670);t.default=n.httpRequest;e.exports=t.default,e.exports.default=t.default},16965:function(e,t,i){t.default=void 0;var n=i(21327);t.default=n.infernoRenderer;e.exports=t.default,e.exports.default=t.default},35329:function(e,t,i){t.default=void 0;var n=i(87107);t.default=n.MemorizedCallbacks;e.exports=t.default,e.exports.default=t.default},74453:function(e,t,i){Object.defineProperty(t,"Options",{enumerable:!0,get:function(){return n.Options}});var n=i(43399)},1896:function(e,t,i){Object.defineProperty(t,"OptionManager",{enumerable:!0,get:function(){return n.OptionManager}});var n=i(59830)},53904:function(e,t,i){Object.defineProperty(t,"convertRulesToOptions",{enumerable:!0,get:function(){return n.convertRulesToOptions}}),Object.defineProperty(t,"createDefaultOptionRules",{enumerable:!0,get:function(){return n.createDefaultOptionRules}}),Object.defineProperty(t,"deviceMatch",{enumerable:!0,get:function(){return n.deviceMatch}}),Object.defineProperty(t,"getFieldName",{enumerable:!0,get:function(){return n.getFieldName}}),Object.defineProperty(t,"getNestedOptionValue",{enumerable:!0,get:function(){return n.getNestedOptionValue}}),Object.defineProperty(t,"getParentName",{enumerable:!0,get:function(){return n.getParentName}}),Object.defineProperty(t,"normalizeOptions",{enumerable:!0,get:function(){return n.normalizeOptions}});var n=i(33810)},21971:function(e,t,i){Object.defineProperty(t,"PostponedOperations",{enumerable:!0,get:function(){return n.PostponedOperations}});var n=i(45693)},64553:function(e,t,i){t.default=void 0;var n=i(95539);t.default=n.renderer;e.exports=t.default,e.exports.default=t.default},21681:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(1811))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},11787:function(e,t,i){t.default=void 0;var n=i(57785);t.default=n.resizeObserverSingleton;e.exports=t.default,e.exports.default=t.default},91366:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.setTemplateEngine}});var n=i(83077);e.exports=t.default,e.exports.default=t.default},27286:function(e,t,i){Object.defineProperty(t,"BindableTemplate",{enumerable:!0,get:function(){return n.BindableTemplate}});var n=i(52820)},91585:function(e,t,i){Object.defineProperty(t,"ChildDefaultTemplate",{enumerable:!0,get:function(){return n.ChildDefaultTemplate}});var n=i(93971)},48650:function(e,t,i){Object.defineProperty(t,"EmptyTemplate",{enumerable:!0,get:function(){return n.EmptyTemplate}});var n=i(11768)},38699:function(e,t,i){Object.defineProperty(t,"FunctionTemplate",{enumerable:!0,get:function(){return n.FunctionTemplate}});var n=i(88969)},67872:function(e,t,i){Object.defineProperty(t,"Template",{enumerable:!0,get:function(){return n.Template}});var n=i(52538)},42186:function(e,t,i){Object.defineProperty(t,"TemplateBase",{enumerable:!0,get:function(){return n.TemplateBase}}),Object.defineProperty(t,"renderedCallbacks",{enumerable:!0,get:function(){return n.renderedCallbacks}});var n=i(31292)},35155:function(e,t,i){Object.defineProperty(t,"getCurrentTemplateEngine",{enumerable:!0,get:function(){return n.getCurrentTemplateEngine}}),Object.defineProperty(t,"registerTemplateEngine",{enumerable:!0,get:function(){return n.registerTemplateEngine}}),Object.defineProperty(t,"setTemplateEngine",{enumerable:!0,get:function(){return n.setTemplateEngine}});var n=i(70785)},71669:function(e,t,i){t.default=void 0;var n=i(99671);t.default={registerTrialPanelComponents:n.registerTrialPanelComponents,showTrialPanel:n.showTrialPanel};e.exports=t.default,e.exports.default=t.default},78670:function(e,t,i){t.default=void 0;var n=i(14136);t.default=n.Ajax;e.exports=t.default,e.exports.default=t.default},28248:function(e,t,i){Object.defineProperty(t,"evalCrossDomainScript",{enumerable:!0,get:function(){return n.evalCrossDomainScript}}),Object.defineProperty(t,"evalScript",{enumerable:!0,get:function(){return n.evalScript}}),Object.defineProperty(t,"getAcceptHeader",{enumerable:!0,get:function(){return n.getAcceptHeader}}),Object.defineProperty(t,"getJsonpCallbackName",{enumerable:!0,get:function(){return n.getJsonpCallbackName}}),Object.defineProperty(t,"getMethod",{enumerable:!0,get:function(){return n.getMethod}}),Object.defineProperty(t,"getRequestHeaders",{enumerable:!0,get:function(){return n.getRequestHeaders}}),Object.defineProperty(t,"getRequestOptions",{enumerable:!0,get:function(){return n.getRequestOptions}}),Object.defineProperty(t,"isCrossDomain",{enumerable:!0,get:function(){return n.isCrossDomain}});var n=i(42202)},94487:function(e,t,i){Object.defineProperty(t,"getIntersection",{enumerable:!0,get:function(){return n.getIntersection}}),Object.defineProperty(t,"getUniqueValues",{enumerable:!0,get:function(){return n.getUniqueValues}}),Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return n.groupBy}}),Object.defineProperty(t,"normalizeIndexes",{enumerable:!0,get:function(){return n.normalizeIndexes}}),Object.defineProperty(t,"removeDuplicates",{enumerable:!0,get:function(){return n.removeDuplicates}}),Object.defineProperty(t,"wrapToArray",{enumerable:!0,get:function(){return n.wrapToArray}});var n=i(28601)},13387:function(e,t,i){Object.defineProperty(t,"findChanges",{enumerable:!0,get:function(){return n.findChanges}}),Object.defineProperty(t,"isKeysEqual",{enumerable:!0,get:function(){return n.isKeysEqual}});var n=i(87525)},48314:function(e,t,i){t.default=void 0;var n=i(33436);t.default=n.browser;e.exports=t.default,e.exports.default=t.default},13630:function(e,t,i){t.default=void 0;var n=i(58060);t.default=n.callOnce;e.exports=t.default,e.exports.default=t.default},84718:function(e,t,i){t.default=void 0;var n=i(63172);t.default=n.Callbacks;e.exports=t.default,e.exports.default=t.default},17781:function(e,t,i){Object.defineProperty(t,"applyServerDecimalSeparator",{enumerable:!0,get:function(){return n.applyServerDecimalSeparator}}),Object.defineProperty(t,"asyncNoop",{enumerable:!0,get:function(){return n.asyncNoop}}),Object.defineProperty(t,"deferRender",{enumerable:!0,get:function(){return n.deferRender}}),Object.defineProperty(t,"deferRenderer",{enumerable:!0,get:function(){return n.deferRenderer}}),Object.defineProperty(t,"deferUpdate",{enumerable:!0,get:function(){return n.deferUpdate}}),Object.defineProperty(t,"deferUpdater",{enumerable:!0,get:function(){return n.deferUpdater}}),Object.defineProperty(t,"denormalizeKey",{enumerable:!0,get:function(){return n.denormalizeKey}}),Object.defineProperty(t,"ensureDefined",{enumerable:!0,get:function(){return n.ensureDefined}}),Object.defineProperty(t,"equalByValue",{enumerable:!0,get:function(){return n.equalByValue}}),Object.defineProperty(t,"escapeRegExp",{enumerable:!0,get:function(){return n.escapeRegExp}}),Object.defineProperty(t,"executeAsync",{enumerable:!0,get:function(){return n.executeAsync}}),Object.defineProperty(t,"findBestMatches",{enumerable:!0,get:function(){return n.findBestMatches}}),Object.defineProperty(t,"getKeyHash",{enumerable:!0,get:function(){return n.getKeyHash}}),Object.defineProperty(t,"grep",{enumerable:!0,get:function(){return n.grep}}),Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return n.noop}}),Object.defineProperty(t,"normalizeKey",{enumerable:!0,get:function(){return n.normalizeKey}}),Object.defineProperty(t,"pairToObject",{enumerable:!0,get:function(){return n.pairToObject}}),Object.defineProperty(t,"splitPair",{enumerable:!0,get:function(){return n.splitPair}});var n=i(39315)},60648:function(e,t,i){Object.defineProperty(t,"equals",{enumerable:!0,get:function(){return n.equals}});var n=i(90834)},31951:function(e,t,i){Object.defineProperty(t,"debug",{enumerable:!0,get:function(){return n.debug}}),Object.defineProperty(t,"logger",{enumerable:!0,get:function(){return n.logger}});var n=i(35005)},31e3:function(e,t,i){Object.defineProperty(t,"compileGetter",{enumerable:!0,get:function(){return n.compileGetter}}),Object.defineProperty(t,"compileSetter",{enumerable:!0,get:function(){return n.compileSetter}}),Object.defineProperty(t,"getPathParts",{enumerable:!0,get:function(){return n.getPathParts}}),Object.defineProperty(t,"toComparable",{enumerable:!0,get:function(){return n.toComparable}});var n=i(93142)},41380:function(e,t,i){t.default=void 0;var n=i(66570);t.default=n.dateUtils;e.exports=t.default,e.exports.default=t.default},71051:function(e,t,i){t.default=void 0;var n=i(62897);t.default=n.dateSerialization;e.exports=t.default,e.exports.default=t.default},87739:function(e,t,i){Object.defineProperty(t,"Deferred",{enumerable:!0,get:function(){return n.Deferred}}),Object.defineProperty(t,"fromPromise",{enumerable:!0,get:function(){return n.fromPromise}}),Object.defineProperty(t,"setStrategy",{enumerable:!0,get:function(){return n.setStrategy}}),Object.defineProperty(t,"when",{enumerable:!0,get:function(){return n.when}});var n=i(77117)},89656:function(e,t,i){t.default=void 0;var n=i(62142);t.default=n.injector;e.exports=t.default,e.exports.default=t.default},86858:function(e,t,i){Object.defineProperty(t,"clearSelection",{enumerable:!0,get:function(){return n.clearSelection}}),Object.defineProperty(t,"clipboardText",{enumerable:!0,get:function(){return n.clipboardText}}),Object.defineProperty(t,"closestCommonParent",{enumerable:!0,get:function(){return n.closestCommonParent}}),Object.defineProperty(t,"contains",{enumerable:!0,get:function(){return n.contains}}),Object.defineProperty(t,"createTextElementHiddenCopy",{enumerable:!0,get:function(){return n.createTextElementHiddenCopy}}),Object.defineProperty(t,"extractTemplateMarkup",{enumerable:!0,get:function(){return n.extractTemplateMarkup}}),Object.defineProperty(t,"insertBefore",{enumerable:!0,get:function(){return n.insertBefore}}),Object.defineProperty(t,"isElementInDom",{enumerable:!0,get:function(){return n.isElementInDom}}),Object.defineProperty(t,"normalizeTemplateElement",{enumerable:!0,get:function(){return n.normalizeTemplateElement}}),Object.defineProperty(t,"replaceWith",{enumerable:!0,get:function(){return n.replaceWith}}),Object.defineProperty(t,"resetActiveElement",{enumerable:!0,get:function(){return n.resetActiveElement}});var n=i(76400)},67264:function(e,t,i){t.default=void 0;var n=i(40818);t.default=n.error;e.exports=t.default,e.exports.default=t.default},52576:function(e,t,i){Object.defineProperty(t,"extend",{enumerable:!0,get:function(){return n.extend}}),Object.defineProperty(t,"extendFromObject",{enumerable:!0,get:function(){return n.extendFromObject}});var n=i(96298)},23563:function(e,t,i){Object.defineProperty(t,"isTablePart",{enumerable:!0,get:function(){return n.isTablePart}}),Object.defineProperty(t,"parseHTML",{enumerable:!0,get:function(){return n.parseHTML}});var n=i(25317)},69629:function(e,t,i){Object.defineProperty(t,"getImageContainer",{enumerable:!0,get:function(){return n.getImageContainer}}),Object.defineProperty(t,"getImageSourceType",{enumerable:!0,get:function(){return n.getImageSourceType}});var n=i(42463)},53124:function(e,t,i){Object.defineProperty(t,"camelize",{enumerable:!0,get:function(){return n.camelize}}),Object.defineProperty(t,"captionize",{enumerable:!0,get:function(){return n.captionize}}),Object.defineProperty(t,"dasherize",{enumerable:!0,get:function(){return n.dasherize}}),Object.defineProperty(t,"humanize",{enumerable:!0,get:function(){return n.humanize}}),Object.defineProperty(t,"titleize",{enumerable:!0,get:function(){return n.titleize}}),Object.defineProperty(t,"underscore",{enumerable:!0,get:function(){return n.underscore}});var n=i(66122)},21274:function(e,t,i){Object.defineProperty(t,"each",{enumerable:!0,get:function(){return n.each}}),Object.defineProperty(t,"map",{enumerable:!0,get:function(){return n.map}}),Object.defineProperty(t,"reverseEach",{enumerable:!0,get:function(){return n.reverseEach}});var n=i(26044)},50512:function(e,t,i){t.default=void 0;var n=i(24574);t.default=n.Locker;e.exports=t.default,e.exports.default=t.default},50254:function(e,t,i){Object.defineProperty(t,"adjust",{enumerable:!0,get:function(){return n.adjust}}),Object.defineProperty(t,"fitIntoRange",{enumerable:!0,get:function(){return n.fitIntoRange}}),Object.defineProperty(t,"getExponent",{enumerable:!0,get:function(){return n.getExponent}}),Object.defineProperty(t,"getExponentLength",{enumerable:!0,get:function(){return n.getExponentLength}}),Object.defineProperty(t,"getPrecision",{enumerable:!0,get:function(){return n.getPrecision}}),Object.defineProperty(t,"getRemainderByDivision",{enumerable:!0,get:function(){return n.getRemainderByDivision}}),Object.defineProperty(t,"getRoot",{enumerable:!0,get:function(){return n.getRoot}}),Object.defineProperty(t,"inRange",{enumerable:!0,get:function(){return n.inRange}}),Object.defineProperty(t,"multiplyInExponentialForm",{enumerable:!0,get:function(){return n.multiplyInExponentialForm}}),Object.defineProperty(t,"roundFloatPart",{enumerable:!0,get:function(){return n.roundFloatPart}}),Object.defineProperty(t,"sign",{enumerable:!0,get:function(){return n.sign}}),Object.defineProperty(t,"solveCubicEquation",{enumerable:!0,get:function(){return n.solveCubicEquation}}),Object.defineProperty(t,"trunc",{enumerable:!0,get:function(){return n.trunc}});var n=i(80764)},22263:function(e,t,i){Object.defineProperty(t,"clone",{enumerable:!0,get:function(){return n.clone}}),Object.defineProperty(t,"deepExtendArraySafe",{enumerable:!0,get:function(){return n.deepExtendArraySafe}}),Object.defineProperty(t,"legacyAssign",{enumerable:!0,get:function(){return n.legacyAssign}}),Object.defineProperty(t,"newAssign",{enumerable:!0,get:function(){return n.newAssign}}),Object.defineProperty(t,"orderEach",{enumerable:!0,get:function(){return n.orderEach}});var n=i(86005)},41639:function(e,t,i){Object.defineProperty(t,"getBoundingRect",{enumerable:!0,get:function(){return n.getBoundingRect}}),Object.defineProperty(t,"getDefaultAlignment",{enumerable:!0,get:function(){return n.getDefaultAlignment}});var n=i(80125)},85521:function(e,t,i){Object.defineProperty(t,"attachInstanceToElement",{enumerable:!0,get:function(){return n.attachInstanceToElement}}),Object.defineProperty(t,"getInstanceByElement",{enumerable:!0,get:function(){return n.getInstanceByElement}}),Object.defineProperty(t,"name",{enumerable:!0,get:function(){return n.name}});var n=i(871)},65221:function(e,t,i){Object.defineProperty(t,"create",{enumerable:!0,get:function(){return n.create}}),Object.defineProperty(t,"enqueue",{enumerable:!0,get:function(){return n.enqueue}});var n=i(52799)},3122:function(e,t,i){t.default=void 0;var n=i(18344);t.default=n.readyCallbacksModule;e.exports=t.default,e.exports.default=t.default},63283:function(e,t,i){t.default=void 0;var n=i(33717);t.default=n.resizeCallbacks;e.exports=t.default,e.exports.default=t.default},52877:function(e,t,i){Object.defineProperty(t,"SelectionFilterCreator",{enumerable:!0,get:function(){return n.SelectionFilterCreator}});var n=i(67135)},93631:function(e,t,i){Object.defineProperty(t,"addShadowDomStyles",{enumerable:!0,get:function(){return n.addShadowDomStyles}}),Object.defineProperty(t,"getShadowElementsFromPoint",{enumerable:!0,get:function(){return n.getShadowElementsFromPoint}});var n=i(17113)},57653:function(e,t,i){Object.defineProperty(t,"addOffsetToMaxHeight",{enumerable:!0,get:function(){return n.addOffsetToMaxHeight}}),Object.defineProperty(t,"addOffsetToMinHeight",{enumerable:!0,get:function(){return n.addOffsetToMinHeight}}),Object.defineProperty(t,"getElementBoxParams",{enumerable:!0,get:function(){return n.getElementBoxParams}}),Object.defineProperty(t,"getHeight",{enumerable:!0,get:function(){return n.getHeight}}),Object.defineProperty(t,"getInnerHeight",{enumerable:!0,get:function(){return n.getInnerHeight}}),Object.defineProperty(t,"getInnerWidth",{enumerable:!0,get:function(){return n.getInnerWidth}}),Object.defineProperty(t,"getOffset",{enumerable:!0,get:function(){return n.getOffset}}),Object.defineProperty(t,"getOuterHeight",{enumerable:!0,get:function(){return n.getOuterHeight}}),Object.defineProperty(t,"getOuterWidth",{enumerable:!0,get:function(){return n.getOuterWidth}}),Object.defineProperty(t,"getSize",{enumerable:!0,get:function(){return n.getSize}}),Object.defineProperty(t,"getVerticalOffsets",{enumerable:!0,get:function(){return n.getVerticalOffsets}}),Object.defineProperty(t,"getVisibleHeight",{enumerable:!0,get:function(){return n.getVisibleHeight}}),Object.defineProperty(t,"getWidth",{enumerable:!0,get:function(){return n.getWidth}}),Object.defineProperty(t,"getWindowByElement",{enumerable:!0,get:function(){return n.getWindowByElement}}),Object.defineProperty(t,"implementationsMap",{enumerable:!0,get:function(){return n.implementationsMap}}),Object.defineProperty(t,"parseHeight",{enumerable:!0,get:function(){return n.parseHeight}}),Object.defineProperty(t,"setHeight",{enumerable:!0,get:function(){return n.setHeight}}),Object.defineProperty(t,"setInnerHeight",{enumerable:!0,get:function(){return n.setInnerHeight}}),Object.defineProperty(t,"setInnerWidth",{enumerable:!0,get:function(){return n.setInnerWidth}}),Object.defineProperty(t,"setOuterHeight",{enumerable:!0,get:function(){return n.setOuterHeight}}),Object.defineProperty(t,"setOuterWidth",{enumerable:!0,get:function(){return n.setOuterWidth}}),Object.defineProperty(t,"setWidth",{enumerable:!0,get:function(){return n.setWidth}});var n=i(64587)},98479:function(e,t,i){Object.defineProperty(t,"sessionStorage",{enumerable:!0,get:function(){return n.sessionStorage}});var n=i(47865)},54497:function(e,t,i){Object.defineProperty(t,"encodeHtml",{enumerable:!0,get:function(){return n.encodeHtml}}),Object.defineProperty(t,"format",{enumerable:!0,get:function(){return n.format}}),Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return n.isEmpty}}),Object.defineProperty(t,"quadToObject",{enumerable:!0,get:function(){return n.quadToObject}});var n=i(32527)},45479:function(e,t,i){Object.defineProperty(t,"stubComponent",{enumerable:!0,get:function(){return n.stubComponent}});var n=i(47453)},58515:function(e,t,i){Object.defineProperty(t,"normalizeStyleProp",{enumerable:!0,get:function(){return n.normalizeStyleProp}}),Object.defineProperty(t,"parsePixelValue",{enumerable:!0,get:function(){return n.parsePixelValue}}),Object.defineProperty(t,"setHeight",{enumerable:!0,get:function(){return n.setHeight}}),Object.defineProperty(t,"setStyle",{enumerable:!0,get:function(){return n.setStyle}}),Object.defineProperty(t,"setWidth",{enumerable:!0,get:function(){return n.setWidth}}),Object.defineProperty(t,"styleProp",{enumerable:!0,get:function(){return n.styleProp}}),Object.defineProperty(t,"stylePropPrefix",{enumerable:!0,get:function(){return n.stylePropPrefix}});var n=i(11953)},4785:function(e,t,i){Object.defineProperty(t,"animation",{enumerable:!0,get:function(){return n.animation}}),Object.defineProperty(t,"inputType",{enumerable:!0,get:function(){return n.inputType}}),Object.defineProperty(t,"nativeScrolling",{enumerable:!0,get:function(){return n.nativeScrolling}}),Object.defineProperty(t,"pointerEvents",{enumerable:!0,get:function(){return n.pointerEvents}}),Object.defineProperty(t,"styleProp",{enumerable:!0,get:function(){return n.styleProp}}),Object.defineProperty(t,"stylePropPrefix",{enumerable:!0,get:function(){return n.stylePropPrefix}}),Object.defineProperty(t,"supportProp",{enumerable:!0,get:function(){return n.supportProp}}),Object.defineProperty(t,"touch",{enumerable:!0,get:function(){return n.touch}}),Object.defineProperty(t,"touchEvents",{enumerable:!0,get:function(){return n.touchEvents}}),Object.defineProperty(t,"transition",{enumerable:!0,get:function(){return n.transition}}),Object.defineProperty(t,"transitionEndEventName",{enumerable:!0,get:function(){return n.transitionEndEventName}});var n=i(85991)},47420:function(e,t,i){Object.defineProperty(t,"HIDDEN_FOR_EXPORT",{enumerable:!0,get:function(){return n.HIDDEN_FOR_EXPORT}}),Object.defineProperty(t,"getSvgElement",{enumerable:!0,get:function(){return n.getSvgElement}}),Object.defineProperty(t,"getSvgMarkup",{enumerable:!0,get:function(){return n.getSvgMarkup}});var n=i(89650)},49194:function(e,t,i){Object.defineProperty(t,"acquireIntegrationTemplate",{enumerable:!0,get:function(){return n.acquireIntegrationTemplate}}),Object.defineProperty(t,"acquireTemplate",{enumerable:!0,get:function(){return n.acquireTemplate}}),Object.defineProperty(t,"addOneRenderedCall",{enumerable:!0,get:function(){return n.addOneRenderedCall}}),Object.defineProperty(t,"addPublicElementNormalization",{enumerable:!0,get:function(){return n.addPublicElementNormalization}}),Object.defineProperty(t,"defaultCreateElement",{enumerable:!0,get:function(){return n.defaultCreateElement}}),Object.defineProperty(t,"findTemplates",{enumerable:!0,get:function(){return n.findTemplates}}),Object.defineProperty(t,"getNormalizedTemplateArgs",{enumerable:!0,get:function(){return n.getNormalizedTemplateArgs}}),Object.defineProperty(t,"suitableTemplatesByName",{enumerable:!0,get:function(){return n.suitableTemplatesByName}}),Object.defineProperty(t,"templateKey",{enumerable:!0,get:function(){return n.templateKey}}),Object.defineProperty(t,"validateTemplateSource",{enumerable:!0,get:function(){return n.validateTemplateSource}});var n=i(91008)},11528:function(e,t,i){Object.defineProperty(t,"isBoolean",{enumerable:!0,get:function(){return n.isBoolean}}),Object.defineProperty(t,"isDate",{enumerable:!0,get:function(){return n.isDate}}),Object.defineProperty(t,"isDeferred",{enumerable:!0,get:function(){return n.isDeferred}}),Object.defineProperty(t,"isDefined",{enumerable:!0,get:function(){return n.isDefined}}),Object.defineProperty(t,"isEmptyObject",{enumerable:!0,get:function(){return n.isEmptyObject}}),Object.defineProperty(t,"isEvent",{enumerable:!0,get:function(){return n.isEvent}}),Object.defineProperty(t,"isExponential",{enumerable:!0,get:function(){return n.isExponential}}),Object.defineProperty(t,"isFunction",{enumerable:!0,get:function(){return n.isFunction}}),Object.defineProperty(t,"isNumeric",{enumerable:!0,get:function(){return n.isNumeric}}),Object.defineProperty(t,"isObject",{enumerable:!0,get:function(){return n.isObject}}),Object.defineProperty(t,"isPlainObject",{enumerable:!0,get:function(){return n.isPlainObject}}),Object.defineProperty(t,"isPrimitive",{enumerable:!0,get:function(){return n.isPrimitive}}),Object.defineProperty(t,"isPromise",{enumerable:!0,get:function(){return n.isPromise}}),Object.defineProperty(t,"isRenderer",{enumerable:!0,get:function(){return n.isRenderer}}),Object.defineProperty(t,"isString",{enumerable:!0,get:function(){return n.isString}}),Object.defineProperty(t,"isWindow",{enumerable:!0,get:function(){return n.isWindow}}),Object.defineProperty(t,"type",{enumerable:!0,get:function(){return n.type}});var n=i(39918)},40216:function(e,t,i){t.default=void 0;var n=i(66082);t.default=n.variableWrapper;e.exports=t.default,e.exports.default=t.default},20142:function(e,t,i){Object.defineProperty(t,"compare",{enumerable:!0,get:function(){return n.compare}});var n=i(5388)},55355:function(e,t,i){Object.defineProperty(t,"changeCallback",{enumerable:!0,get:function(){return n.changeCallback}}),Object.defineProperty(t,"originalViewPort",{enumerable:!0,get:function(){return n.originalViewPort}}),Object.defineProperty(t,"value",{enumerable:!0,get:function(){return n.value}});var n=i(65913)},3104:function(e,t,i){Object.defineProperty(t,"defaultScreenFactorFunc",{enumerable:!0,get:function(){return n.defaultScreenFactorFunc}}),Object.defineProperty(t,"getCurrentScreenFactor",{enumerable:!0,get:function(){return n.getCurrentScreenFactor}}),Object.defineProperty(t,"getNavigator",{enumerable:!0,get:function(){return n.getNavigator}}),Object.defineProperty(t,"getWindow",{enumerable:!0,get:function(){return n.getWindow}}),Object.defineProperty(t,"hasProperty",{enumerable:!0,get:function(){return n.hasProperty}}),Object.defineProperty(t,"hasWindow",{enumerable:!0,get:function(){return n.hasWindow}}),Object.defineProperty(t,"setWindow",{enumerable:!0,get:function(){return n.setWindow}});var n=i(14470)},1956:function(e,t){t.version=t.fullVersion=void 0;t.version="24.2.3",t.fullVersion="24.2.3"},48367:function(e,t,i){Object.defineProperty(t,"c",{enumerable:!0,get:function(){return n.assertDevExtremeVersion}});var n=i(20258)},77735:function(e,t,i){Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=i(5995))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},50797:function(e,t,i){t.default=void 0;var n=i(11036);t.default=n.applyChanges;e.exports=t.default,e.exports.default=t.default},67664:function(e,t,i){t.default=void 0;var n,o=(n=i(80556))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},37754:function(e,t,i){t.default=void 0;var n=i(63326);t.default=n.CustomStore;e.exports=t.default,e.exports.default=t.default},47283:function(e,t,i){t.default=void 0;var n,o=(n=i(14479))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},73192:function(e,t,i){t.default=void 0;var n,o=(n=i(44180))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},74760:function(e,t,i){Object.defineProperty(t,"errorHandler",{enumerable:!0,get:function(){return o.errorHandler}}),Object.defineProperty(t,"setErrorHandler",{enumerable:!0,get:function(){return n.setErrorHandler}});var n=i(11036),o=i(82812)},1242:function(e,t,i){t.default=void 0;var n,o=(n=i(71790))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},87062:function(e,t,i){t.default=void 0;var n,o=(n=i(34170))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},25184:function(e,t,i){t.default=void 0;var n,o=(n=i(29284))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},57076:function(e,t,i){var n=i(8056);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},22567:function(e,t,i){t.default=void 0;var n=i(11036);t.default=n.query;e.exports=t.default,e.exports.default=t.default},99354:function(e,t,i){var n=i(89358);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},14531:function(e,t,i){t.default=void 0;var n,o=(n=i(32621))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},10714:function(e,t,i){t.triggerHandler=void 0;var n,o=(n=i(92774))&&n.__esModule?n:{default:n};t.triggerHandler=o.default.triggerHandler},69786:function(e,t,i){Object.defineProperty(t,"off",{enumerable:!0,get:function(){return n.off}}),Object.defineProperty(t,"on",{enumerable:!0,get:function(){return n.on}}),Object.defineProperty(t,"one",{enumerable:!0,get:function(){return n.one}}),Object.defineProperty(t,"trigger",{enumerable:!0,get:function(){return n.trigger}}),Object.defineProperty(t,"triggerHandler",{enumerable:!0,get:function(){return o.triggerHandler}});var n=i(52391),o=i(10714)},6285:function(e,t,i){Object.defineProperty(t,"exportDataGrid",{enumerable:!0,get:function(){return n.exportDataGrid}}),Object.defineProperty(t,"exportPivotGrid",{enumerable:!0,get:function(){return n.exportPivotGrid}});var n=i(54594)},73549:function(e,t,i){t.export=function(e,t,i){if(!e)return(new r.Deferred).resolve();const o=t.exportingAction,a=t.exportedAction,l=t.fileSavingAction,d={fileName:t.fileName,format:t.format,cancel:!1};(0,s.isBoolean)(t.selectedRowsOnly)&&(d.selectedRowsOnly=t.selectedRowsOnly);if((0,s.isFunction)(o)&&o(d),!d.cancel)return i(e,t).then((e=>{if((0,s.isFunction)(a)&&a(),(0,s.isFunction)(l)&&(d.data=e,l(d)),!d.cancel){const i="xlsx"===t.format?"EXCEL":t.format;n.fileSaver.saveAs(d.fileName,i,e)}}));return(new r.Deferred).resolve()},Object.defineProperty(t,"fileSaver",{enumerable:!0,get:function(){return n.fileSaver}}),t.svg=t.pdf=t.image=void 0;var n=i(34924),o=i(28456),a=i(86195),s=i(11528),r=i(87739),l=i(49343);t.image={creator:o.imageCreator,getData:o.getData,testFormats:o.testFormats},t.pdf={getData:l.getData},t.svg={creator:a.svgCreator,getData:a.getData}},55972:function(e,t,i){t.ExportLoadPanel=void 0;var n=d(i(64553)),o=i(52576),a=d(i(4671)),s=i(11528),r=d(i(31876)),l=d(i(53226));function d(e){return e&&e.__esModule?e:{default:e}}t.ExportLoadPanel=class{constructor(e,t,i,o){this._$targetElement=t,this._$container=i,this._loadPanel=e._createComponent((0,n.default)("<div>").addClass("dx-export-loadpanel").appendTo(this._$container),r.default,this.getOptions(o))}getDefaultOptions(){return{animation:null,shading:!1,height:90,width:200,container:this._$container}}getOptions(e){return(0,s.isDefined)(e.text)?e.message=e.text:e.message=a.default.format("dxDataGrid-exporting"),(0,o.extend)(this.getDefaultOptions(),e)}show(){this._loadPanel.option("position",l.default.calculateLoadPanelPosition(this._$targetElement)),this._loadPanel.show()}dispose(){(0,n.default)(this._loadPanel.element()).remove(),delete this._loadPanel}}},60199:function(e,t,i){t.Export=void 0;var n=i(11528),o=i(18053),a=i(52576),s=i(55972),r=i(3104);t.Export={getFullOptions(e){const t=(0,a.extend)({},e);if(!(0,n.isDefined)(t.worksheet)||!(0,n.isObject)(t.worksheet))throw Error('The "worksheet" field must contain an object.');if((0,n.isDefined)(t.topLeftCell)){if((0,n.isString)(t.topLeftCell)){const{row:e,col:i}=t.worksheet.getCell(t.topLeftCell);t.topLeftCell={row:e,column:i}}}else t.topLeftCell={row:1,column:1};return(0,n.isDefined)(t.keepColumnWidths)||(t.keepColumnWidths=!0),(0,n.isDefined)(t.loadPanel)||(t.loadPanel={}),(0,n.isDefined)(t.loadPanel.enabled)||(t.loadPanel.enabled=!0),(0,n.isDefined)(t.encodeExecutableContent)||(t.encodeExecutableContent=!1),t},convertDateForExcelJS:e=>new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),setNumberFormat(e,t){e.numFmt=t},getCellStyles(e){const t=e.getStyles();return t.forEach((e=>{let t=this.tryConvertToExcelNumberFormat(e.format,e.dataType);(0,n.isDefined)(t)&&(t=t.replace(/&quot;/g,'"')),e.numberFormat=t})),t},tryConvertToExcelNumberFormat(e,t){const i=o.ExportFormat.formatObjectConverter(e,t),n=i.currency;return e=i.format,t=i.dataType,o.ExportFormat.convertFormat(e,i.precision,t,n)},setAlignment(e,t,i){e.alignment=e.alignment??{},(0,n.isDefined)(t)&&(e.alignment.wrapText=t),(0,n.isDefined)(i)&&(e.alignment.horizontal=i),e.alignment.vertical="top"},setColumnsWidth(e,t,i){if((0,n.isDefined)(t))for(let n=0;n<t.length;n++){const o=t[n];"number"==typeof o&&isFinite(o)&&(e.getColumn(i+n).width=Math.min(255,Math.floor(o/7*100)/100))}},export(e,t,i,n){var o;const{component:l,worksheet:d,topLeftCell:u,keepColumnWidths:c,selectedRowsOnly:h,loadPanel:p,encodeExecutableContent:g}=e,_=l.getDataProvider(h),f=(null===(o=l._getInternalInstance)||void 0===o?void 0:o.call(l))||l,m=f.option("loadPanel")&&f.option("loadPanel").enabled;let v;if(m&&l.option("loadPanel.enabled",!1),p.enabled&&(0,r.hasWindow)()){const e=i(l),t=n(l);v=new s.ExportLoadPanel(l,e,t,p),v.show()}const C=!!l.option("wordWrapEnabled");d.properties.outlineProperties={summaryBelow:!1,summaryRight:!1};const y={from:{row:u.row,column:u.column},to:{row:u.row,column:u.column}};return new Promise((i=>{_.ready().done((()=>{const n=_.getColumns(),o=_.getRowsCount(),s=new t(l,_,d,e);c&&this.setColumnsWidth(d,_.getColumnsWidths(),y.from.column),s._exportAllFieldHeaders(n,this.setAlignment);const r=s._getFieldHeaderRowsCount();y.to.row=y.from.row+r;const u=this.getCellStyles(_);for(let e=0;e<o;e++){const t=y.from.row+r+e,i=d.getRow(t);let o=0;s._isRowFieldHeadersRow(e)&&(o=_.getRowAreaColCount(),s._exportFieldHeaders("row",t,0,o,this.setAlignment)),s._trySetOutlineLevel(i,e),this.exportRow(_,s,i,e,o,n.length,C,u,g),y.to.row=t}s.mergedRangesManager.applyMergedRages(),y.to.column+=n.length>0?n.length-1:0;const h=d.views[0]||{};l.option("rtlEnabled")&&(h.rightToLeft=!0),s._isFrozenZone(_)&&(-1===Object.keys(h).indexOf("state")&&(0,a.extend)(h,s._getWorksheetFrozenState(y)),s._trySetAutoFilter(y)),Object.keys(h).length>0&&(d.views=[h]),i(y)})).always((()=>{m&&l.option("loadPanel.enabled",m),p.enabled&&(0,r.hasWindow)()&&v.dispose()}))}))},exportRow(e,t,i,a,s,r,l,d,u){for(let c=s;c<r;c++){const s=e.getCellData(a,c,!0),r=i.getCell(t._getFirstColumnIndex()+c);t.mergedRangesManager.updateMergedRanges(r,a,c,t);const h=t.mergedRangesManager.findMergedCellInfo(a,c,t._isHeaderCell(a,c));if((0,n.isDefined)(h)&&r!==h.masterCell)r.style=h.masterCell.style,r.value=h.masterCell.value;else if((0,n.isDate)(s.value)?r.value=this.convertDateForExcelJS(s.value):r.value=s.value,(0,n.isDefined)(r.value)){const{bold:i,alignment:o,numberFormat:s}=d[e.getStyleId(a,c)];(0,n.isDefined)(s)?this.setNumberFormat(r,s):(0,n.isString)(r.value)&&/^[@=+-]/.test(r.value)&&this.setNumberFormat(r,"@"),t._trySetFont(r,i),this.setAlignment(r,l,o)}t._customizeCell(r,s.cellSourceData),u&&(r.value=o.ExportFormat.encode(r.value))}}}},55921:function(e,t,i){t.exportDataGrid=function(e){return o.Export.export(function(e){if(!(0,n.isDefined)(e)||!(0,n.isObject)(e))throw Error('The "exportDataGrid" method requires a configuration object.');if(!(0,n.isDefined)(e.component)||!(0,n.isObject)(e.component)||"dxDataGrid"!==e.component.NAME)throw Error('The "component" field must contain a DataGrid instance.');(0,n.isDefined)(e.selectedRowsOnly)||(e.selectedRowsOnly=!1);(0,n.isDefined)(e.autoFilterEnabled)||(e.autoFilterEnabled=!1);return o.Export.getFullOptions(e)}(e),s,r,l)};var n=i(11528),o=i(60199),a=i(6103);class s{constructor(e,t,i,n){this.component=e,this.dataProvider=t,this.worksheet=i,this.mergedRangesManager=new a.MergedRangesManager(t,i),this.topLeftCell=n.topLeftCell,this.customizeCell=n.customizeCell,this.autoFilterEnabled=n.autoFilterEnabled}_getFirstColumnIndex(){return this.topLeftCell.column}_getFieldHeaderRowsCount(){return 0}_trySetAutoFilter(e){if(this.autoFilterEnabled&&!(0,n.isDefined)(this.worksheet.autoFilter)&&this.dataProvider.getRowsCount()>0){const t={from:{row:e.from.row+this.dataProvider.getHeaderRowCount()-1,column:e.from.column},to:e.to};this.worksheet.autoFilter=t}}_trySetFont(e,t){(0,n.isDefined)(t)&&(e.font=e.font||{},e.font.bold=t)}_getWorksheetFrozenState(e){return{state:"frozen",ySplit:e.from.row+this.dataProvider.getFrozenArea().y-1}}_trySetOutlineLevel(e,t){t>=this.dataProvider.getHeaderRowCount()&&(e.outlineLevel=this.dataProvider.getGroupLevel(t))}_isFrozenZone(e){return e.getHeaderRowCount()>0}_isHeaderCell(e){return e<this.dataProvider.getHeaderRowCount()}_isInfoCell(){return!1}_allowToMergeRange(){return!0}_getAllFieldHeaders(){return[]}_customizeCell(e,t){(0,n.isFunction)(this.customizeCell)&&this.customizeCell({excelCell:e,gridCell:t})}_exportFieldHeaders(){}_exportAllFieldHeaders(){}_isRowFieldHeadersRow(){}}function r(e){return e.getView("rowsView").element()}function l(e){return e.getView("rowsView").element().parent()}},18053:function(e,t,i){t.ExportFormat=void 0;var n=i(54497),o=u(i(52771)),a=u(i(38662)),s=i(11528),r=i(83445),l=i(64333),d=i(52576);function u(e){return e&&e.__esModule?e:{default:e}}i(17333);const c={thousands:"#,##0{0},&quot;K&quot;",millions:"#,##0{0},,&quot;M&quot;",billions:"#,##0{0},,,&quot;B&quot;",trillions:"#,##0{0},,,,&quot;T&quot;",percent:"0{0}%",decimal:"#{0}",fixedpoint:"#,##0{0}",exponential:"0{0}E+00",currency:" "},h=/a+/g,p=/E/g,g=/dE+/g,_=/L/g,f=/h/g,m=/./g;function v(e){const t=(a.default.format(new Date(2009,8,8,6,5,4),e)||"").toString();let i=(0,r.getFormat)((t=>a.default.format(t,e)));return i&&(i=function(e){return e.split("/").join("\\/").split("'").map((function(e,t){return t%2==0?e.replace(h,"AM/PM").replace(g,"d").replace(p,"d").replace(_,"M").replace(f,"H").split("[").join("\\[").split("]").join("\\]"):e?e.replace(m,"\\$&"):"'"})).join("")}(i),i=function(e){const t=(0,l.getLanguageId)();let i=t?t.toString(16):"",n="";if(function(e){let t;for(let i=0;i<e.length;i++)if(t=e.charCodeAt(i),t>=1632&&t<1642)return!0;return!1}(e)){for(;i.length<3;)i="0"+i;n="[$-2010"+i+"]"}else i&&(n="[$-"+i+"]");return n}(t)+i),i}function C(e){return!!e&&(!!/^[@=\t\r]/.test(e)||!!/^[+-]/.test(e)&&!(0,s.isNumeric)(e))}t.ExportFormat={formatObjectConverter(e,t){const i={format:e,precision:e&&e.precision,dataType:t};return(0,s.isObject)(e)?(0,d.extend)(i,e,{format:e.formatter||e.type,currency:e.currency}):i},convertFormat(e,t,i,a){if((0,s.isDefined)(e)){if("date"===i)return v(e);if((0,s.isString)(e)&&c[e.toLowerCase()])return function(e,t,i){let a,s;return s="currency"===e?o.default.getOpenXmlCurrencyFormat(i):c[e.toLowerCase()],s&&(a=(0,n.format)(s,function(e,t){let i,n;if(t>0){for(i="decimal"!==e?".":"",n=0;n<t;n++)i+="0";return i}return""}(e,t))),a}(e,t,a)}},encode(e){const t='"';let i=!1;if(!function(e){return!(!e||e.length<2)&&C(e)}(e)?function(e,t){return!(!e||e.length<4||e[0]!==t)&&C(e.substring(1,e.length-1))}(e,t)&&(e=e.substring(1,e.length-1),i=!0):i=!0,i){const i=t,n=`${t}${t}`;return"\"'"+e.replaceAll(i,n)+t}return e}}},6103:function(e,t){t.MergedRangesManager=void 0;t.MergedRangesManager=class{constructor(e,t){this.dataProvider=e,this.worksheet=t,this.mergedCells=[],this.mergedRanges=[]}updateMergedRanges(e,t,i,n){if(n._isHeaderCell(t,i)&&!this.isCellInMergedRanges(t,i)){const{rowspan:o,colspan:a}=this.dataProvider.getCellMerging(t,i);if(a||o){const s=n._allowToMergeRange(t,i,o,a);if(this.updateMergedCells(e,t,i,o,a),s){const s=n._isInfoCell(t,i)&&n._allowExportRowFieldHeaders();this.mergedRanges.push({masterCell:e,rowspan:o-(s&&o>0),colspan:a})}}}}isCellInMergedRanges(e,t){return this.mergedCells[e]&&this.mergedCells[e][t]}findMergedCellInfo(e,t,i){if(i&&this.isCellInMergedRanges(e,t))return this.mergedCells[e][t]}updateMergedCells(e,t,i,n,o){for(let a=t;a<=t+n;a++)for(let t=i;t<=i+o;t++)this.mergedCells[a]||(this.mergedCells[a]=[]),this.mergedCells[a][t]={masterCell:e}}addMergedRange(e,t,i){this.mergedRanges.push({masterCell:e,rowspan:t,colspan:i})}applyMergedRages(){this.mergedRanges.forEach((e=>{const t=e.masterCell.fullAddress.row,i=e.masterCell.fullAddress.col,n=t+e.rowspan,o=i+e.colspan;this.worksheet.mergeCells(t,i,n,o)}))}}},44295:function(e,t,i){t.exportPivotGrid=function(e){return o.Export.export(function(e){if(!(0,n.isDefined)(e)||!(0,n.isObject)(e))throw Error('The "exportPivotGrid" method requires a configuration object.');if(!(0,n.isDefined)(e.component)||!(0,n.isObject)(e.component)||"dxPivotGrid"!==e.component.NAME)throw Error('The "component" field must contain a PivotGrid instance.');(0,n.isDefined)(e.mergeRowFieldValues)||(e.mergeRowFieldValues=!0);(0,n.isDefined)(e.mergeColumnFieldValues)||(e.mergeColumnFieldValues=!0);(0,n.isDefined)(e.exportDataFieldHeaders)||(e.exportDataFieldHeaders=!1);(0,n.isDefined)(e.exportRowFieldHeaders)||(e.exportRowFieldHeaders=!1);(0,n.isDefined)(e.exportColumnFieldHeaders)||(e.exportColumnFieldHeaders=!1);(0,n.isDefined)(e.exportFilterFieldHeaders)||(e.exportFilterFieldHeaders=!1);return o.Export.getFullOptions(e)}(e),d,u,c)};var n=i(11528),o=i(60199),a=i(41639),s=i(53124),r=i(6103);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}class d{constructor(e,t,i,n){this.component=e,this.dataProvider=t,this.worksheet=i,this.mergedRangesManager=new r.MergedRangesManager(t,i),this.topLeftCell=n.topLeftCell,this.customizeCell=n.customizeCell,this.mergeColumnFieldValues=n.mergeColumnFieldValues,this.mergeRowFieldValues=n.mergeRowFieldValues,this.exportFilterFieldHeaders=n.exportFilterFieldHeaders,this.exportDataFieldHeaders=n.exportDataFieldHeaders,this.exportColumnFieldHeaders=n.exportColumnFieldHeaders,this.exportRowFieldHeaders=n.exportRowFieldHeaders,this.rtlEnabled=e.option("rtlEnabled"),this.rowHeaderLayout=e.option("rowHeaderLayout"),this.wrapText=!!e.option("wordWrapEnabled"),this.filterFieldHeaders=this._tryGetFieldHeaders("filter"),this.dataFieldHeaders=this._tryGetFieldHeaders("data"),this.columnFieldHeaders=this._tryGetFieldHeaders("column"),this.rowFieldHeaders=this._tryGetFieldHeaders("row")}_getFirstColumnIndex(){return this.topLeftCell.column}_getWorksheetFrozenState(e){const{x:t,y:i}=this.dataProvider.getFrozenArea();return{state:"frozen",xSplit:e.from.column+t-1,ySplit:e.from.row+i+this._getFieldHeaderRowsCount()-1}}_getFieldHeaderRowsCount(){return 0+this._allowExportFilterFieldHeaders()+(this._allowExportDataFieldHeaders()||this._allowExportColumnFieldHeaders())}_isFrozenZone(){return!0}_isHeaderCell(e,t){return e<this.dataProvider.getColumnAreaRowCount()||t<this.dataProvider.getRowAreaColCount()}_getDefaultFieldHeaderCellsData(e){return{text:e,value:e}}_isInfoCell(e,t){return e<this.dataProvider.getColumnAreaRowCount()&&t<this.dataProvider.getRowAreaColCount()}_allowToMergeRange(e,t,i,n){return!(this.dataProvider.isColumnAreaCell(e,t)&&!this.mergeColumnFieldValues&&n||this.dataProvider.isRowAreaCell(e,t)&&!this.mergeRowFieldValues&&i)}_trySetAutoFilter(){}_trySetFont(e,t){(0,n.isDefined)(t)&&(e.font=e.font||{},e.font.bold=t)}_getFieldHeaderStyles(){const e={style:"thin",color:{argb:"FF7E7E7E"}};return{alignment:(0,a.getDefaultAlignment)(this.rtlEnabled),bold:!0,border:{bottom:e,left:e,right:e,top:e}}}_trySetOutlineLevel(){}_getAllFieldHeaders(){return this.dataProvider._exportController.getDataSource()._descriptions}_tryGetFieldHeaders(e){if(!this[`export${(0,s.camelize)(e,!0)}FieldHeaders`])return[];const t=this._getAllFieldHeaders()["data"===e?"values":`${e}s`].filter((t=>t.area===e));return"right"===(0,a.getDefaultAlignment)(this.rtlEnabled)&&t.sort(((e,t)=>t.areaIndex-e.areaIndex)),t.map((e=>e.caption))}_customizeCell(e,t,i){(0,n.isFunction)(this.customizeCell)&&!i&&this.customizeCell({excelCell:e,pivotCell:t})}_isRowFieldHeadersRow(e){const t=this._isInfoCell(e,0)&&"row"===this.dataProvider.getCellData(e+1,0,!0).cellSourceData.area;return this._allowExportRowFieldHeaders()&&t}_exportAllFieldHeaders(e,t){const i=e.length,n=this.dataProvider.getRowAreaColCount();let o=this.topLeftCell.row;this._allowExportFilterFieldHeaders()&&(this._exportFieldHeaders("filter",o,0,i,t),o++),this._allowExportDataFieldHeaders()&&(this._exportFieldHeaders("data",o,0,n,t),this._allowExportColumnFieldHeaders()||this._exportFieldHeaders("column",o,n,i-n,t)),this._allowExportColumnFieldHeaders()&&(this._allowExportDataFieldHeaders()||this._exportFieldHeaders("data",o,0,n,t),this._exportFieldHeaders("column",o,n,i-n,t))}_exportFieldHeaders(e,t,i,n,o){const a=this[`${e}FieldHeaders`],s=this.worksheet.getRow(t),r="row"!==e||"row"===e&&"tree"===this.rowHeaderLayout;r&&this.mergedRangesManager.addMergedRange(s.getCell(this.topLeftCell.column+i),0,n-1);for(let t=0;t<n;t++){const d=s.getCell(this.topLeftCell.column+i+t),u=a;let c=[];const h=u.length>n||r?u.join(", "):u[t];c=l({},this._getDefaultFieldHeaderCellsData(h),{headerType:e}),d.value=h,this._applyHeaderStyles(d,o),this._customizeCell(d,c)}}_applyHeaderStyles(e,t){const{bold:i,alignment:n,border:o}=this._getFieldHeaderStyles();this._trySetFont(e,i),t(e,this.wrapText,n),e.border=o}_allowExportRowFieldHeaders(){return this.rowFieldHeaders.length>0}_allowExportFilterFieldHeaders(){return this.filterFieldHeaders.length>0}_allowExportDataFieldHeaders(){return this.dataFieldHeaders.length>0}_allowExportColumnFieldHeaders(){return this.columnFieldHeaders.length>0}}function u(e){return e._dataArea.groupElement()}function c(e){return e.$element()}},34924:function(e,t,i){t.fileSaver=t.MIME_TYPES=void 0;var n=l(i(64960)),o=i(3104),a=l(i(35185)),s=i(11528),r=i(31951);function l(e){return e&&e.__esModule?e:{default:e}}const d=(0,o.getWindow)(),u=(0,o.getNavigator)(),c={EXCEL:"xlsx",CSS:"css",PNG:"png",JPEG:"jpeg",GIF:"gif",SVG:"svg",PDF:"pdf"},h=t.MIME_TYPES={CSS:"text/css",EXCEL:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",PNG:"image/png",JPEG:"image/jpeg",GIF:"image/gif",SVG:"image/svg+xml",PDF:"application/pdf"};t.fileSaver={_revokeObjectURLTimeout:3e4,_getDataUri:function(e,t){return`data:${this._getMimeType(e)};base64,${t}`},_getMimeType:function(e){return h[e]||"application/octet-stream"},_linkDownloader:function(e,t){const i=n.default.createElement("a");return i.download=e,i.href=t,i.target="_blank",i},_winJSBlobSave:function(e,t,i){const n=new Windows.Storage.Pickers.FileSavePicker;n.suggestedStartLocation=Windows.Storage.Pickers.PickerLocationId.documentsLibrary;const o=c[i];if(o){const e=this._getMimeType(i);n.fileTypeChoices.insert(e,["."+o])}n.suggestedFileName=t,n.pickSaveFileAsync().then((function(t){t&&t.openAsync(Windows.Storage.FileAccessMode.readWrite).then((function(t){const i=e.msDetachStream();Windows.Storage.Streams.RandomAccessStream.copyAsync(i,t).then((function(){t.flushAsync().done((function(){i.close(),t.close()}))}))}))}))},_click:function(e){try{e.dispatchEvent(new MouseEvent("click",{cancelable:!0}))}catch(t){const i=n.default.getDocument().createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,d,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(i)}},_saveBlobAs:function(e,t,i){if(this._blobSaved=!1,(0,s.isDefined)(u.msSaveOrOpenBlob))u.msSaveOrOpenBlob(i,e),this._blobSaved=!0;else if((0,s.isDefined)(d.WinJS))this._winJSBlobSave(i,e,t),this._blobSaved=!0;else{const t=d.URL||d.webkitURL||d.mozURL||d.msURL||d.oURL;if((0,s.isDefined)(t)){const n=t.createObjectURL(i),o=this._linkDownloader(e,n);setTimeout((()=>{t.revokeObjectURL(n),this._objectUrlRevoked=!0}),this._revokeObjectURLTimeout),this._click(o)}else r.logger.warn("window.URL || window.webkitURL || window.mozURL || window.msURL || window.oURL is not defined")}},saveAs:function(e,t,i){const n=c[t];if(n&&(e+="."+n),(0,s.isFunction)(d.Blob))this._saveBlobAs(e,t,i);else{(0,s.isDefined)(u.userAgent.match(/iPad/i))||a.default.log("E1034");const n=this._linkDownloader(e,this._getDataUri(t,i));this._click(n)}}}},28456:function(e,t,i){t.calcScaledInfo=q,t.getData=function(e,t){return Z.getData(e,t)},t.imageCreator=void 0,t.testFormats=function(e){const t=Z._createCanvas(100,100,0);return e.reduce((function(e,i){const n=("image/"+i).toLowerCase();return-1!==t.toDataURL(n).indexOf(n)?e.supported.push(i):e.unsupported.push(i),e}),{supported:[],unsupported:[]})};var n=g(i(64553)),o=g(i(43101)),a=i(11528),s=g(i(89650)),r=i(21274),l=i(52576),d=g(i(64960)),u=i(86858),c=i(3104),h=i(53124),p=i(87739);function g(e){return e&&e.__esModule?e:{default:e}}const _=(0,c.getWindow)(),f=Math,m=f.PI,v=f.min,C=f.abs,y=f.sqrt,b=f.pow,x=f.atan2,w=f.cos,S=f.sin,D=Number,I=.05;let E;function T(e,t,i,n,o,a,s,r){const l=(e+i)/2,d=(t+n)/2;let u=x(t-n,e-i);const c=a?1:-1;u+=m/180*90*(s?1:-1);const h=y(b(i-e,2)+b(n-t,2))/2,p=y(C(b(o,2)-b(h,2))),g=l+c*(p*w(u)),_=d+c*(p*S(u)),f=x(t-_,e-g),v=x(n-_,i-g);r.arc(g,_,o,f,v,!s)}function A(e,t){const i=E(e.attributes||{}),n=(0,l.extend)({},i,{text:e.textContent.replace(/\s+/g," "),textAlign:"middle"===i["text-anchor"]?"center":i["text-anchor"]}),o=i.transform;let s;return o&&(s=o.match(/translate\(-*\d+([.]\d+)*(,*\s*-*\d+([.]\d+)*)*/),s&&(s=s[0].match(/-*\d+([.]\d+)*/g),n.translateX=D(s[0]),n.translateY=s[1]?D(s[1]):0),s=o.match(/rotate\(-*\d+([.]\d+)*(,*\s*-*\d+([.]\d+)*,*\s*-*\d+([.]\d+)*)*/),s&&(s=s[0].match(/-*\d+([.]\d+)*/g),n.rotationAngle=D(s[0]),n.rotationX=s[1]&&D(s[1]),n.rotationY=s[2]&&D(s[2])),s=o.match(/scale\(-*\d+([.]\d+)*(,*\s*-*\d+([.]\d+)*)*/),s&&(s=s[0].match(/-*\d+([.]\d+)*/g),n.scaleX=D(s[0]),s.length>1?n.scaleY=D(s[1]):n.scaleY=n.scaleX)),function(e,t,i){let n,o=e.style||{};for(n in o)""!==o[n]&&(t[(0,h.camelize)(n)]=o[n]);i&&d.default.isElementNode(e)&&(o=_.getComputedStyle(e),["fill","stroke","stroke-width","font-family","font-size","font-style","font-weight"].forEach((function(e){e in o&&""!==o[e]&&(t[(0,h.camelize)(e)]=o[e])})),["opacity","fill-opacity","stroke-opacity"].forEach((function(e){e in o&&""!==o[e]&&"1"!==o[e]&&(t[e]=D(o[e]))})));t.textDecoration=t.textDecoration||t.textDecorationLine,t.globalAlpha=(0,a.isDefined)(t.opacity)?t.opacity:t.globalAlpha}(e,n,t),n}function O(e){const t=e&&e.match(/url\(.*#(.*?)["']?\)/i);return t&&t[1]}function P(e,t){const i=[];t.fontSize=t.fontSize||"10px",t.fontFamily=t.fontFamily||"sans-serif",t.fill=t.fill||"#000",t.fontStyle&&i.push(t.fontStyle),t.fontWeight&&i.push(t.fontWeight),i.push(t.fontSize),i.push(t.fontFamily),e.font=i.join(" "),e.textAlign=t.textAlign,e.fillStyle=t.fill,e.globalAlpha=t.globalAlpha}function k(e,t,i){P(e,t),V(e,t,i),t.text&&e.fillText(t.text,t.x||0,t.y||0),G(e,t,!0),function(e,t,i){if(!t.textDecoration||"none"===t.textDecoration)return;const n=t.x,o=e.measureText(t.text).width,a=parseInt(t.fontSize,10),s=a*I<1?1:a*I;let r=t.y;switch(t.textDecoration){case"line-through":r-=a/3+s/2;break;case"overline":r-=a-s;break;case"underline":r+=s}e.rect(n,r,o,s),j(e,t,i),G(e,t)}(e,t,i)}function M(e){const t=e.childNodes;for(let e=0;e<t.length;e++)if("tspan"===t[e].tagName)return!0;return!1}function R(e,t,i,n){const o=[];let a,s=0;for(let r=0;r<e.length;r++){const d=e[r];if(void 0===d.tagName)L(d,t,i,n);else if("tspan"===d.tagName||"text"===d.tagName){const e=A(d,n.rootAppended),r=(0,l.extend)({},i,e);if("tspan"===d.tagName&&M(d)){R(d.childNodes,t,r,n);continue}r.textAlign="start",a&&void 0===e.x||(a={elements:[],options:[],widths:[],offsets:[]},o.push(a)),void 0!==e.y&&(s=0),void 0!==e.dy&&(s+=parseFloat(e.dy)),a.elements.push(d),a.options.push(r),a.offsets.push(s),P(t,r),a.widths.push(t.measureText(r.text).width)}}o.forEach((function(e){const o=e.widths.reduce((function(e,t){return e+t}),0);let a=0,s=0;"center"===i.textAlign&&(a=o/2),"end"===i.textAlign&&(a=o),e.options.forEach((function(t,i){const n=e.widths[i];t.x=t.x-a+s,t.y+=e.offsets[i],s+=n})),e.elements.forEach((function(i,o){R(i.childNodes,t,e.options[o],n)}))}))}function L(e,t,i,n){const o=e.tagName,a="text"===o||"tspan"===o||void 0===o,r="image"===o,d=8===e.nodeType,u=(0,l.extend)({},i,A(e,n.rootAppended));if("hidden"===u.visibility||u[s.default.HIDDEN_FOR_EXPORT]||d)return;let c;switch(t.save(),!r&&F(t,u),H(t,u,n),function(e){e.strokeOpacity=void 0!==e["stroke-opacity"]?e["stroke-opacity"]:1,e.fillOpacity=void 0!==e["fill-opacity"]?e["fill-opacity"]:1,void 0!==e.opacity&&(e.strokeOpacity*=e.opacity,e.fillOpacity*=e.opacity)}(u),t.beginPath(),e.tagName){case void 0:k(t,u,n);break;case"text":case"tspan":R(e.childNodes,t,u,n);break;case"image":c=function(e,t,i){const n=new p.Deferred,o=new _.Image;return o.onload=function(){e.save(),e.globalAlpha=t.globalAlpha,F(e,t),H(e,t,i),e.drawImage(o,t.x||0,t.y||0,t.width,t.height),e.restore(),n.resolve()},o.onerror=function(){n.resolve()},o.setAttribute("crossOrigin","anonymous"),o.src=t.href||t["xlink:href"],n}(t,u,n);break;case"path":!function(e,t){const i=t.replace(/,/g," ").split(/([A-Z])/i).filter((e=>""!==e.trim()));let n,o,a,s=0;do{switch(n=(i[s+1]||"").trim().split(" "),i[s]){case"M":e.moveTo(D(n[0]),D(n[1])),s+=2;break;case"L":for(let t=0;t<n.length/2;t++)e.lineTo(D(n[2*t]),D(n[2*t+1]));s+=2;break;case"C":e.bezierCurveTo(D(n[0]),D(n[1]),D(n[2]),D(n[3]),D(n[4]),D(n[5])),s+=2;break;case"a":o=i[s-1].trim().split(" "),a=o.length-1,T(D(o[a-1]),D(o[a]),D(o[a-1])+D(n[5]),D(o[a])+D(n[6]),D(n[0]),D(n[3]),D(n[4]),e),s+=2;break;case"A":o=i[s-1].trim().split(" "),a=o.length-1,T(D(o[a-1]),D(o[a]),D(n[5]),D(n[6]),D(n[0]),D(n[3]),D(n[4]),e),s+=2;break;case"Z":e.closePath(),s+=1;break;default:s++}}while(s<i.length)}(t,u.d);break;case"rect":!function(e,t){const i=t.x,n=t.y,o=t.width,a=t.height;let s=t.rx;s?(s=v(s,o/2,a/2),e.save(),e.translate(i,n),e.moveTo(o/2,0),e.arcTo(o,0,o,a,s),e.arcTo(o,a,0,a,s),e.arcTo(0,a,0,0,s),e.arcTo(0,0,s,0,s),e.lineTo(o/2,0),e.restore()):e.rect(i,n,o,a)}(t,u),t.closePath();break;case"circle":t.arc(u.cx,u.cy,u.r,0,2*m,1)}return a||(V(t,u,n),r||(c=j(t,u,n)),G(t,u)),B(t,u,n,e,"linear"),B(t,u,n,e,"radial"),t.restore(),c}function B(e,t,i,n,o){let{linearGradients:a,radialGradients:s}=i;const r="linear"===o?a:s;if(0===Object.keys(r).length)return;const l=O(t.fill);if(l&&r[l]){const i=n.getBBox(),a=i.x+i.width/2,s=i.y+i.height/2,u=Math.max(i.height/2,i.width/2),c="linear"===o?e.createLinearGradient(i.x,0,i.x+i.width,0):e.createRadialGradient(a,s,0,a,s,u);if(r[l].colors.forEach((e=>{const t=parseInt(e.offset.replace(/%/,""));c.addColorStop(t/100,e.stopColor)})),"linear"===o){var d;const t=(null===(d=r[l].transform)||void 0===d?void 0:d.replace(/\D/g,""))*Math.PI/180??0;e.translate(a,s),e.rotate(t),e.translate(-a,-s)}e.globalAlpha=t.opacity,e.fillStyle=c,e.fill()}}function V(e,t,i){let n;const o=O(t.filter);o&&(n=i.filters[o],n||(n={offsetX:0,offsetY:0,blur:0,color:"#000"}),e.shadowOffsetX=n.offsetX,e.shadowOffsetY=n.offsetY,e.shadowColor=n.color,e.shadowBlur=n.blur)}function F(e,t){e.translate(t.translateX||0,t.translateY||0),t.translateX=void 0,t.translateY=void 0,t.rotationAngle&&(e.translate(t.rotationX||0,t.rotationY||0),e.rotate(t.rotationAngle*m/180),e.translate(-(t.rotationX||0),-(t.rotationY||0)),t.rotationAngle=void 0,t.rotationX=void 0,t.rotationY=void 0),isFinite(t.scaleX)&&(e.scale(t.scaleX,t.scaleY),t.scaleX=void 0,t.scaleY=void 0)}function H(e,t,i){t["clip-path"]&&(L(i.clipPaths[O(t["clip-path"])],e,{},i),e.clip(),t["clip-path"]=void 0)}function N(e){var t;const i={colors:[],transform:null===(t=e.attributes.gradientTransform)||void 0===t?void 0:t.textContent};return(0,r.each)(e.childNodes,((e,t)=>{let{attributes:n}=t;i.colors.push({offset:n.offset.value,stopColor:n["stop-color"].value})})),i}function z(e){let t,i;const n={};return(0,r.each)(e.childNodes,(function(e,a){const s=a.attributes;if(s.result)switch(s.result.value){case"gaussianBlurResult":n.blur=D(s.stdDeviation.value);break;case"offsetResult":n.offsetX=D(s.dx.value),n.offsetY=D(s.dy.value);break;case"floodResult":t=s["flood-color"]?s["flood-color"].value:"#000",i=s["flood-opacity"]?s["flood-opacity"].value:1,n.color=function(e,t){const i=new o.default(e);return"rgba("+i.r+","+i.g+","+i.b+","+t+")"}(t,i)}})),n}function W(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new p.Deferred,n=0;for(;n<e.length;n++){const o=t(e[n]);if((0,a.isPromise)(o)){o.then((()=>{W(Array.prototype.slice.call(e,n+1),t,i)}));break}}return n===e.length&&i.resolve(),i}function $(e,t,i,n){return W(e,(function(e){switch(e.tagName&&e.tagName.toLowerCase()){case"g":case"svg":{const o=(0,l.extend)({},i,A(e,n.rootAppended));t.save(),F(t,o),H(t,o,n);const s=()=>{t.restore()},r=$(e.childNodes,t,o,n);return(0,a.isPromise)(r)?r.then(s):s(),r}case"defs":return $(e.childNodes,t,{},n);case"clippath":n.clipPaths[e.attributes.id.textContent]=e.childNodes[0];break;case"pattern":n.patterns[e.attributes.id.textContent]=e;break;case"filter":n.filters[e.id]=z(e);break;case"lineargradient":n.linearGradients[e.attributes.id.textContent]=N(e);break;case"radialgradient":n.radialGradients[e.attributes.id.textContent]=N(e);break;default:return L(e,t,i,n)}}))}function G(e,t,i){const n=t.stroke;n&&"none"!==n&&0!==t["stroke-width"]&&(!function(e,t){let i=t["stroke-dasharray"]&&t["stroke-dasharray"].match(/(\d+)/g);i&&i.length&&(i=(0,r.map)(i,(function(e){return D(e)})),e.setLineDash(i))}(e,t),e.lineJoin=t["stroke-linejoin"],e.lineWidth=t["stroke-width"],e.globalAlpha=t.strokeOpacity,e.strokeStyle=n,i?e.strokeText(t.text,t.x,t.y):e.stroke(),e.globalAlpha=1)}function j(e,t,i){const n=t.fill;let o;if(n&&"none"!==n)if(-1===n.search(/url/))e.fillStyle=n,e.globalAlpha=t.fillOpacity,e.fill(),e.globalAlpha=1;else{const s=i.patterns[O(n)];if(!s)return;o=function(e,t,i,n){const o=A(t,i.rootAppended),s=Z._createCanvas(o.width,o.height,0),r=s.getContext("2d"),l=$(t.childNodes,r,o,i),d=()=>{e.fillStyle=e.createPattern(s,"repeat"),e.globalAlpha=n.fillOpacity,e.fill(),e.globalAlpha=1};return(0,a.isPromise)(l)?l.then(d):d(),l}(e,s,i,t)}return o}function U(e,t,i){return $(e.childNodes,t.getContext("2d"),{},{clipPaths:{},patterns:{},filters:{},linearGradients:{},radialGradients:{},rootAppended:i})}function K(e,t){let{width:i,height:o,backgroundColor:r,margin:l,svgToCanvas:c=U}=t;const h=q(i,o),g=Z._createCanvas(h.width,h.height,l),_=g.getContext("2d");_.setTransform(h.pixelRatio,0,0,h.pixelRatio,0,0);const f=s.default.getSvgElement(e);let m;const v=d.default.isElementNode(e)||(0,a.isRenderer)(e);return _.translate(l,l),d.default.getBody().appendChild(g),v||(m=function(){const e=d.default.createElement("div");return e.style.left="-9999px",e.style.position="absolute",e}(),m.appendChild(f),d.default.getBody().appendChild(m)),f.attributes.direction&&(g.dir=f.attributes.direction.textContent),function(e,t,i,n,o){e.fillStyle=n||"#ffffff",e.fillRect(-o,-o,t+2*o,i+2*o)}(_,i,o,r,l),(0,p.fromPromise)(c(f,g,v&&(0,u.contains)(d.default.getBody(),(0,n.default)(e).get(0)))).then((()=>g)).always((()=>{m&&d.default.getBody().removeChild(m),d.default.getBody().removeChild(g)}))}E=function(e){const t={};let i;return(0,r.each)(e,(function(e,n){i=n.textContent,isFinite(i)&&(i=D(i)),t[n.name.toLowerCase()]=i})),t};const Z=t.imageCreator={getImageData:function(e,t){const i="image/"+t.format;return(0,a.isFunction)(t.__parseAttributesFn)&&(E=t.__parseAttributesFn),K(e,t).then((e=>function(e,t){const i=e.toDataURL(t,1);return _.atob(i.substring(("data:"+t+";base64,").length))}(e,i)))},getData:function(e,t){const i=this;return Z.getImageData(e,t).then((e=>{const n="image/"+t.format;return(0,a.isFunction)(_.Blob)&&!t.useBase64?i._getBlob(e,n):i._getBase64(e)}))},_getBlob:function(e,t){let i;const n=new Uint8Array(e.length);for(i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return new _.Blob([n.buffer],{type:t})},_getBase64:function(e){return _.btoa(e)},_createCanvas(e,t,i){const o=(0,n.default)("<canvas>")[0];return o.width=e+2*i,o.height=t+2*i,o.hidden=!0,o}};function q(e,t){const i=_.devicePixelRatio||1;return{pixelRatio:i,width:e*i,height:t*i}}},39368:function(e,t,i){t.Export=void 0;var n=i(11528),o=i(52576),a=u(i(38662)),s=u(i(52771)),r=u(i(4671)),l=i(55972),d=i(3104);function u(e){return e&&e.__esModule?e:{default:e}}t.Export={getFullOptions:function(e){const t=(0,o.extend)({},e);if(!(0,n.isDefined)(t.jsPDFDocument)||!(0,n.isObject)(t.jsPDFDocument))throw Error('The "jsPDFDocument" field must contain a jsPDF instance.');if(!(0,n.isDefined)(t.jsPDFDocument.autoTable)||!(0,n.isFunction)(t.jsPDFDocument.autoTable))throw Error('The "exportDataGrid" method requires a autoTable plugin for jsPDF object.');if((0,n.isDefined)(t.keepColumnWidths)||(t.keepColumnWidths=!0),(0,n.isDefined)(t.autoTableOptions)){if(!(0,n.isObject)(t.autoTableOptions))throw Error('The "autoTableOptions" option must be of object type.');t.autoTableOptions=(0,o.extend)(!0,{},this._getDefaultAutoTableOptions(),t.autoTableOptions)}else t.autoTableOptions=this._getDefaultAutoTableOptions();return(0,n.isDefined)(t.loadPanel)||(t.loadPanel={}),(0,n.isDefined)(t.loadPanel.enabled)||(t.loadPanel.enabled=!0),(0,n.isDefined)(t.loadPanel.text)||(t.loadPanel.text=r.default.format("dxDataGrid-exporting")),t},_getDefaultAutoTableOptions:function(){return{theme:"plain",tableLineColor:149,tableLineWidth:.1,styles:{textColor:51,lineColor:149,lineWidth:0},columnStyles:{},headStyles:{fontStyle:"normal",textColor:149,lineWidth:.1},bodyStyles:{lineWidth:.1},head:[],body:[]}},export:function(e){var t;const{jsPDFDocument:i,autoTableOptions:o,component:a,customizeCell:s,keepColumnWidths:r,selectedRowsOnly:u,loadPanel:c}=e,h=(null===(t=a._getInternalInstance)||void 0===t?void 0:t.call(a))||a,p=h.option("loadPanel")&&h.option("loadPanel").enabled;let g;if(p&&a.option("loadPanel.enabled",!1),c.enabled&&(0,d.hasWindow)()){const e=a.getView("rowsView");g=new l.ExportLoadPanel(a,e.element(),e.element().parent(),c),g.show()}const _=a.getDataProvider(u),f=!!a.option("wordWrapEnabled");return new Promise((e=>{_.ready().done((()=>{const t=_.getColumns(),a=_.getStyles(),l=_.getRowsCount(),d=_.getHeaderRowCount(),u=[];if(r){const e=this._tryGetPdfColumnWidths(o.tableWidth,_.getColumnsWidths());(0,n.isDefined)(e)&&(0,n.isDefined)(o.columnStyles)&&this._setColumnWidths(o.columnStyles,e)}for(let e=0;e<l;e++){const i=[];for(let o=0;o<t.length;o++){const{value:r,cellSourceData:l}=_.getCellData(e,o,!0),d=a[_.getStyleId(e,o)],c={content:this._getFormattedValue(r,d.format),styles:this._getPDFCellStyles(l.rowType,t[o].alignment,d,f)};if("header"===l.rowType){const t=this._tryGetMergeRange(e,o,u,_);t&&t.rowSpan>0&&(c.rowSpan=t.rowSpan+1),t&&t.colSpan>0&&(c.colSpan=t.colSpan+1);(!(u[e]&&u[e][o])||c.rowSpan>1||c.colSpan>1)&&((0,n.isFunction)(s)&&s({gridCell:l,pdfCell:c}),i.push(c))}else"group"!==l.rowType||(0,n.isDefined)(c.content)||1!==i.length?(c.content=c.content??"",(0,n.isFunction)(s)&&s({gridCell:l,pdfCell:c}),i.push(c)):(i[0].colSpan=i[0].colSpan??1,i[0].colSpan++)}e<d?o.head.push(i):o.body.push(i)}i.autoTable(o),e()})).always((()=>{p&&a.option("loadPanel.enabled",p),c.enabled&&(0,d.hasWindow)()&&g.dispose()}))}))},_getFormattedValue:function(e,t){if((0,n.isDefined)(t)){if((0,n.isDate)(e))return a.default.format(e,t);if((0,n.isNumeric)(e))return s.default.format(e,t)}return e},_getPDFCellStyles:function(e,t,i,n){const{alignment:o,bold:a}=i,s="header"===e?t:o,r={};return s&&(r.halign=s),a&&"header"!==e&&(r.fontStyle="bold"),n&&(r.cellWidth="wrap"),r},_tryGetMergeRange:function(e,t,i,n){if(!i[e]||!i[e][t]){const{colspan:o,rowspan:a}=n.getCellMerging(e,t);if(o||a){for(let n=e;n<=e+a;n++)for(let e=t;e<=t+o;e++)i[n]||(i[n]=[]),i[n][e]=!0;return{rowSpan:a,colSpan:o}}}},_tryGetPdfColumnWidths(e,t){if((0,n.isNumeric)(e)&&(0,n.isDefined)(t)){const i=t.reduce(((e,t)=>e+t),0);return t.map((t=>e*t/i))}},_setColumnWidths:function(e,t){t.forEach(((t,i)=>{e[i]=e[i]||{},e[i].cellWidth=t}))}}},89222:function(e,t,i){t.exportDataGrid=function(e){return o.Export.export(function(e){if(!(0,n.isDefined)(e)||!(0,n.isObject)(e))throw Error('The "exportDataGrid" method requires a configuration object.');if(!(0,n.isDefined)(e.component)||!(0,n.isObject)(e.component)||"dxDataGrid"!==e.component.NAME)throw Error('The "component" field must contain a DataGrid instance.');(0,n.isDefined)(e.selectedRowsOnly)||(e.selectedRowsOnly=!1);return o.Export.getFullOptions(e)}(e))};var n=i(11528),o=i(39368)},9916:function(e,t,i){t.addNewPage=function(e){e.addPage(),function(e){(0,n.isDefined)(e.getLineWidth)||(e.__borderWidth=null)}(e)},t.drawCellsContent=function(e,t,i,a){i.forEach((i=>{const{_rect:r,gridCell:d}=i,h=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(i,s),{x:p,y:_,w:f,h:m}=r,v={doc:e,rect:{x:p,y:_,w:f,h:m},pdfCell:h,gridCell:d,cancel:!1};null==t||t(v),v.cancel||(function(e,t){(0,n.isDefined)(t.backgroundColor)&&(g(e,"fill",t.backgroundColor),u(e,t._rect.x,t._rect.y,t._rect.w,t._rect.h,"F"))}(e,i),function(e,t,i){if((0,n.isDefined)(t.text)&&""!==t.text){const{textColor:a,font:s,_rect:r,padding:d}=t;!function(e,t,i){let{textColor:a,font:s}=t;g(e,"text",(0,n.isDefined)(a)?a:i.textColor);const r=(0,n.isDefined)(s)?(0,o.extend)({},i.font,s):i.font,l=e.getFont();(r.name!==l.fontName||r.style!==l.fontStyle||(0,n.isDefined)(r.weight))&&e.setFont(r.name,r.style,r.weight);r.size!==e.getFontSize()&&e.setFontSize(r.size)}(e,{textColor:a,font:s},i);const u={x:r.x+d.left,y:r.y+d.top,w:r.w-(d.left+d.right),h:r.h-(d.top+d.bottom)};((0,n.isDefined)(t._textLeftOffset)||(0,n.isDefined)(t._textTopOffset))&&(u.x=u.x+(t._textLeftOffset??0),u.y=u.y+(t._textTopOffset??0),e.saveGraphicsState(),function(e,t,i,n,o){e.moveTo(l(t),l(i)),e.lineTo(l(t+n),l(i)),e.lineTo(l(t+n),l(i+o)),e.lineTo(l(t),l(i+o)),e.clip(),e.discardPath()}(e,t._rect.x,t._rect.y,t._rect.w,t._rect.h)),c(e,t.text,u,t.verticalAlign,t.horizontalAlign,t._internalTextOptions),((0,n.isDefined)(t._textLeftOffset)||(0,n.isDefined)(t._textTopOffset))&&e.restoreGraphicsState()}}(e,i,a))}))},t.drawCellsLines=function(e,t,i){t.filter((e=>!(0,n.isDefined)(e.borderColor))).forEach((t=>{h(e,t._rect,t,i)})),t.filter((e=>(0,n.isDefined)(e.borderColor))).forEach((t=>{h(e,t._rect,t,i)}))},t.drawGridLines=function(e,t,i,n){h(e,t,i,n)},t.drawLine=d,t.drawRect=u,t.drawTextInRect=c,t.getDocumentStyles=function(e){const t=e.getFont();return{borderWidth:_(e),borderColor:e.getDrawColor(),font:{name:t.fontName,style:t.fontStyle,size:e.getFontSize()},textColor:e.getTextColor()}},t.roundToThreeDecimals=l,t.setDocumentStyles=function(e,t){const{borderWidth:i,borderColor:n,font:o,textColor:a}=t,s=e.getFont();s.fontName===o.name&&s.fontStyle===o.style||e.setFont(o.name,o.style,void 0);e.getFontSize()!==o.size&&e.setFontSize(o.size);_(e)!==i&&f(e,i);e.getDrawColor()!==n&&e.setDrawColor(n);e.getTextColor()!==a&&e.setTextColor(a)};var n=i(11528),o=i(52576),a=i(31162);const s=["_rect","gridCell"];function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function l(e){return Math.round(1e3*e)/1e3}function d(e,t,i,n,o){e.line(l(t),l(i),l(n),l(o))}function u(e,t,i,o,a,s){(0,n.isDefined)(s)?e.rect(l(t),l(i),l(o),l(a),s):e.rect(l(t),l(i),l(o),l(a))}function c(e,t,i,n,s,r){const d=t.split("\n"),u=d.length,c=(0,a.calculateTextHeight)(e,d[0],e.getFont(),{wordWrapEnabled:!1,targetRectWidth:1e9}),h=n??"middle",p=s??"left",g={top:0,middle:.5,bottom:1},_=i.y+i.h*g[h]-c*(u-1)*g[h]+function(e){return(e.getLineHeightFactor()-1.15)*e.getFontSize()}(e),f=i.x+i.w*{left:0,center:.5,right:1}[p],m=(0,o.extend)({baseline:h,align:p},r);e.text(d.join("\n"),l(f),l(_),m)}function h(e,t,i,o){let{borderWidth:a,borderColor:s,drawLeftBorder:r=!0,drawRightBorder:l=!0,drawTopBorder:c=!0,drawBottomBorder:h=!0}=i;if(!(0,n.isDefined)(t))throw"rect is required";(r||l||c||h)&&(r&&l&&c&&h?(p(e,{borderWidth:a,borderColor:s},o),u(e,t.x,t.y,t.w,t.h)):(p(e,{borderWidth:a,borderColor:s},o),c&&d(e,t.x,t.y,t.x+t.w,t.y),r&&d(e,t.x,t.y,t.x,t.y+t.h),l&&d(e,t.x+t.w,t.y,t.x+t.w,t.y+t.h),h&&d(e,t.x,t.y+t.h,t.x+t.w,t.y+t.h)))}function p(e,t,i){let{borderWidth:o,borderColor:s}=t;const r=(0,n.isDefined)(o)?o:i.borderWidth;r!==_(e)&&f(e,(0,a.toPdfUnit)(e,r)),g(e,"draw",(0,n.isDefined)(s)?s:i.borderColor)}function g(e,t,i){const n=`get${r(t)}Color`,o=`set${r(t)}Color`,{ch1:a=i,ch2:s,ch3:l,ch4:d}=i;e.__private__.decodeColorString(e.__private__.encodeColorString({ch1:a,ch2:s,ch3:l,ch4:d,precision:"text"===t?3:2}))===e[n]()&&"fill"!==t||e[o].apply(e,[a,s,l,d].filter((e=>void 0!==e)))}function _(e){return(0,n.isDefined)(e.getLineWidth)?e.getLineWidth():e.__borderWidth??.200025}function f(e,t){e.setLineWidth(t),(0,n.isDefined)(e.getLineWidth)||(e.__borderWidth=t)}},5650:function(e,t,i){t.Export=void 0;var n,o=i(11528),a=i(52576),s=i(33487),r=i(20652),l=i(99153),d=i(44151),u=i(26002),c=i(9916),h=i(31162),p=(n=i(4671))&&n.__esModule?n:{default:n},g=i(55972),_=i(3104);t.Export={getFullOptions:function(e){const{jsPDFDocument:t}=e,i=(0,a.extend)({},e);return(0,o.isDefined)(i.topLeft)||(i.topLeft={x:0,y:0}),(0,o.isDefined)(i.indent)||(i.indent=0),(0,o.isDefined)(i.repeatHeaders)||(i.repeatHeaders=!0),(0,o.isDefined)(i.margin)||(i.margin=(0,h.toPdfUnit)(t,40)),i.margin=(0,s.normalizeBoundaryValue)(i.margin),Array.isArray(i.columnWidths)||(i.columnWidths=[]),(0,o.isDefined)(i.loadPanel)||(i.loadPanel={}),(0,o.isDefined)(i.loadPanel.enabled)||(i.loadPanel.enabled=!0),(0,o.isDefined)(i.loadPanel.text)||(i.loadPanel.text=p.default.format("dxDataGrid-exporting")),i},export:function(e){var t;const{jsPDFDocument:i,component:n,selectedRowsOnly:a,loadPanel:p}=e,f=(null===(t=n._getInternalInstance)||void 0===t?void 0:t.call(n))||n,m=f.option("loadPanel")&&f.option("loadPanel").enabled;let v;if(m&&n.option("loadPanel.enabled",!1),p.enabled&&(0,_.hasWindow)()){const e=n.getView("rowsView");v=new g.ExportLoadPanel(n,e.element(),e.element().parent(),p),v.show()}const C=n.getDataProvider(a);return new Promise((t=>{C.ready().done((()=>{var a;const p=(0,d.generateRowsInfo)(i,C,n,null===(a=e.rowOptions)||void 0===a||null===(a=a.headerStyles)||void 0===a?void 0:a.backgroundColor);e.customizeCell&&p.forEach((t=>t.cells.forEach((t=>e.customizeCell(t))))),(0,s.normalizeRowsInfo)(p),(0,r.initializeCellsWidth)(i,C,p,e),(0,r.resizeFirstColumnByIndentLevel)(p,e),(0,r.applyColSpans)(p),(0,r.calculateHeights)(i,p,e),(0,r.applyRowSpans)(p),(0,l.updateRowsAndCellsHeights)(i,p),(0,r.calculateCoordinates)(i,p,e),(0,r.applyBordersConfig)(p),(0,h.applyWordWrap)(i,p);const g=(0,c.getDocumentStyles)(i),_=!!n.option("rtlEnabled"),f=(0,u.splitByPages)(i,p,e,(e=>{var t;let{sourceRect:n,leftRect:a,rightRect:s}=e,r={},l={};if((null===(t=n.sourceCellInfo.text)||void 0===t?void 0:t.length)>0)if(_){const e=i.getTextWidth(n.sourceCellInfo.text)>a.w,t=!(0,o.isDefined)(n.sourceCellInfo.horizontalAlign)||"right"===n.sourceCellInfo.horizontalAlign;if(e||!t){var d,u,c;let e,t;"right"===(null===(d=n.sourceCellInfo)||void 0===d?void 0:d.horizontalAlign)?(e=n.sourceCellInfo._textLeftOffset??0,t=e+a.w):"center"===(null===(u=n.sourceCellInfo)||void 0===u?void 0:u.horizontalAlign)?(t=n.x+n.w-(s.x+s.w)+n.sourceCellInfo._rect.w/2-a.w/2,e=t-s.w):"left"===(null===(c=n.sourceCellInfo)||void 0===c?void 0:c.horizontalAlign)&&(t=n.x+n.w-(s.x+s.w),e=t-s.w),r=Object.assign({},{_textLeftOffset:e}),l=Object.assign({},{_textLeftOffset:t})}else l=Object.assign({},{text:""})}else{const e=i.getTextWidth(n.sourceCellInfo.text)>a.w,t=!(0,o.isDefined)(n.sourceCellInfo.horizontalAlign)||"left"===n.sourceCellInfo.horizontalAlign;if(e||!t){var h,p,g;let e,t;if("left"===(null===(h=n.sourceCellInfo)||void 0===h?void 0:h.horizontalAlign))e=n.sourceCellInfo._textLeftOffset??0,t=e-a.w;else if("center"===(null===(p=n.sourceCellInfo)||void 0===p?void 0:p.horizontalAlign)){const i=n.sourceCellInfo._textLeftOffset??0;e=i+(n.x+n.w/2)-(a.x+a.w/2),t=i+(n.x+n.w/2)-(s.x+s.w/2)}else"right"===(null===(g=n.sourceCellInfo)||void 0===g?void 0:g.horizontalAlign)&&(e=n.x+n.w-(a.x+a.w),t=n.x+n.w-(s.x+s.w));r=Object.assign({},{_textLeftOffset:e}),l=Object.assign({},{_textLeftOffset:t})}else l=Object.assign({},{text:""})}a.sourceCellInfo=Object.assign({},n.sourceCellInfo,{debugSourceCellInfo:n.sourceCellInfo},r),s.sourceCellInfo=Object.assign({},n.sourceCellInfo,{debugSourceCellInfo:n.sourceCellInfo},l)}),(e=>{var t;let{sourceRect:n,topRect:o,bottomRect:a}=e,s={},r={};if((null===(t=n.sourceCellInfo.text)||void 0===t?void 0:t.length)>0){var l;const e=i.getTextDimensions(n.sourceCellInfo.text).h>o.h,t="top"===(null===(l=n.sourceCellInfo)||void 0===l?void 0:l.verticalAlign);if(e||!t){var d,u,c;let e,t;if("top"===(null===(d=n.sourceCellInfo)||void 0===d?void 0:d.verticalAlign))e=n.sourceCellInfo._textTopOffset??0,t=e-o.h;else if("middle"===(null===(u=n.sourceCellInfo)||void 0===u?void 0:u.verticalAlign)){const i=n.sourceCellInfo._textTopOffset??0;e=i+(n.y+n.h/2)-(o.y+o.h/2),t=i+(n.y+n.h/2)-(a.y+a.h/2)}else"bottom"===(null===(c=n.sourceCellInfo)||void 0===c?void 0:c.verticalAlign)&&(e=n.y+n.h-(o.y+o.h),t=n.y+n.h-(a.y+a.h));s=Object.assign({},{_textTopOffset:e}),r=Object.assign({},{_textTopOffset:t})}else r=Object.assign({},{text:""})}o.sourceCellInfo=Object.assign({},n.sourceCellInfo,{debugSourceCellInfo:n.sourceCellInfo},s),a.sourceCellInfo=Object.assign({},n.sourceCellInfo,{debugSourceCellInfo:n.sourceCellInfo},r)}));_&&(0,h.applyRtl)(i,f,e),f.forEach(((t,n)=>{n>0&&(0,c.addNewPage)(i),(0,c.drawCellsContent)(i,e.customDrawCell,t,g),(0,c.drawCellsLines)(i,t,g);if((0,o.isDefined)(t)&&0===t.length){const n=(0,r.calculateTableSize)(i,t,e),o=(0,d.getBaseTableStyle)();(0,c.drawGridLines)(i,n,o,g)}})),(0,c.setDocumentStyles)(i,g),t()})).always((()=>{m&&n.option("loadPanel.enabled",m),p.enabled&&(0,_.hasWindow)()&&v.dispose()}))}))}}},99153:function(e,t,i){t.updateRowsAndCellsHeights=function(e,t){const i=function(e,t){const i=Array.from({length:t.length},(()=>0)),a=function(e){const t=e=>{const t=e.cells.map((e=>e.rowSpan??0));return Math.max(...t)};return[...e].sort(((e,i)=>{const n=t(e),o=t(i);return n>o?1:o>n?-1:0}))}(t);return a.forEach((a=>{a.cells.filter((e=>(0,n.isDefined)(e.rowSpan))).forEach((n=>{const s=(0,o.calculateTargetRectWidth)(n.pdfCell._rect.w,n.pdfCell.padding),r=(0,o.calculateTextHeight)(e,n.pdfCell.text,n.pdfCell.font,{wordWrapEnabled:n.pdfCell.wordWrapEnabled,targetRectWidth:s})+n.pdfCell.padding.top+n.pdfCell.padding.bottom,l=n.rowSpan+1,d=t.slice(a.rowIndex,a.rowIndex+l).reduce(((e,t)=>e+t.height+i[t.rowIndex]),0);if(r>d){const e=(r-d)/l;for(let t=a.rowIndex;t<a.rowIndex+l;t++)i[t]+=e}}))})),i}(e,t);t.forEach((e=>{e.height+=i[e.rowIndex]})),t.forEach((e=>{e.cells.forEach((i=>{const n=(i.rowSpan??0)+1;i.pdfCell._rect.h=t.slice(e.rowIndex,e.rowIndex+n).reduce(((e,t)=>e+t.height),0)}))}))};var n=i(11528),o=i(31162)},33487:function(e,t,i){t.normalizeBoundaryValue=o,t.normalizeRowsInfo=function(e){e.forEach((e=>{e.cells.forEach((e=>{let{pdfCell:t}=e;t.padding=o(t.padding)}))}))};var n=i(11528);function o(e){return(0,n.isNumeric)(e)?{top:e,right:e,bottom:e,left:e}:{top:(null==e?void 0:e.top)??0,right:(null==e?void 0:e.right)??0,bottom:(null==e?void 0:e.bottom)??0,left:(null==e?void 0:e.left)??0}}},31162:function(e,t,i){t.applyRtl=function(e,t,i){t.forEach((t=>{t.forEach((t=>{const n=a(e)-(t._rect.x+t._rect.w),o=i.margin.left-i.margin.right;t._rect.x=n+o}))}))},t.applyWordWrap=function(e,t){t.forEach((t=>{t.cells.forEach((t=>{let{pdfCell:i}=t;if((0,n.isDefined)(i.text)){const t=s(e,i.text,i.font,{wordWrapEnabled:i.wordWrapEnabled,targetRectWidth:r(i._rect.w,i.padding)});i.text=t.join("\n")}}))}))},t.calculateRowHeight=function(e,t,i){if(t.length!==i.length)throw"the cells count must be equal to the count of the columns";let o=0;for(let a=0;a<t.length;a++){if((0,n.isDefined)(t[a].rowSpan))continue;const s=t[a].pdfCell.text,l=t[a].pdfCell.padding,u=t[a].pdfCell.font,c=t[a].pdfCell.wordWrapEnabled,h=r(i[a],l);if((0,n.isDefined)(s)){const t=(""!==s?d(e,s,u,{wordWrapEnabled:c,targetRectWidth:h}):0)+l.top+l.bottom;o<t&&(o=t)}}return o},t.calculateTargetRectWidth=r,t.calculateTextHeight=d,t.getPageHeight=function(e){return e.internal.pageSize.getHeight()},t.getPageWidth=a,t.getTextDimensions=l,t.getTextLines=s,t.toPdfUnit=function(e,t){const i=1/e.internal.scaleFactor;return t*i};var n=i(11528);const o="...";function a(e){return e.internal.pageSize.getWidth()}function s(e,t,i,n){let{wordWrapEnabled:a,targetRectWidth:s}=n;if(a){const n=e.getFont(null==i?void 0:i.name,null==i?void 0:i.style);return e.splitTextToSize(t,s,{fontSize:(null==i?void 0:i.size)||e.getFontSize(),fontName:n.fontName,fontStyle:n.fontStyle})}let r=t.split("\n").filter((e=>""!==e)).join(" ");if(l(e,r,i).w<=s)return[r];let d=l(e,r+o,i).w;for(;r.length>0&&d>s;){let t=0;d>=2*s&&(t=r.length/2),t<1&&(t=1),r=r.substring(0,r.length-t),d=l(e,r+o,i).w}return[r+o]}function r(e,t){const i=e-(t.left+t.right);return i>=0?i:0}function l(e,t,i){return e.getTextDimensions(t,{font:e.getFont(null==i?void 0:i.name,null==i?void 0:i.style),fontSize:(null==i?void 0:i.size)||e.getFontSize()})}function d(e,t,i,n){let{wordWrapEnabled:o,targetRectWidth:a}=n;return l(e,t,i).h*s(e,t,i,{wordWrapEnabled:o,targetRectWidth:a}).length*e.getLineHeightFactor()}},20652:function(e,t,i){t.applyBordersConfig=function(e){for(let t=0;t<e.length;t++){const i=e[t].cells;for(let o=0;o<i.length;o++){const a=i[o].pdfCell,s=o>=1?i[o-1].pdfCell:null,r=t>=1?e[t-1].cells[o].pdfCell:null;!1!==a.drawLeftBorder||(0,n.isDefined)(i[o].colSpan)?(0,n.isDefined)(a.drawLeftBorder)||(0,n.isDefined)(s)&&!1===s.drawRightBorder&&(a.drawLeftBorder=!1):(0,n.isDefined)(s)&&(s.drawRightBorder=!1),!1===a.drawTopBorder?(0,n.isDefined)(r)&&(r.drawBottomBorder=!1):(0,n.isDefined)(a.drawTopBorder)||(0,n.isDefined)(r)&&!1===r.drawBottomBorder&&(a.drawTopBorder=!1)}}},t.applyColSpans=function(e){for(let t=0;t<e.length;t++){const i=e[t];for(let o=0;o<i.cells.length;o++){const a=i.cells[o];if((0,n.isDefined)(a.colSpan)&&!(0,n.isDefined)(a.pdfCell.isMerged))for(let i=1;i<=a.colSpan;i++){const n=e[t].cells[o+i];a.pdfCell._rect.w+=n.pdfCell._rect.w,n.pdfCell._rect.w=0,n.pdfCell.isMerged=!0}}}},t.applyRowSpans=function(e){for(let t=0;t<e.length;t++){const i=e[t];for(let o=0;o<i.cells.length;o++){const a=i.cells[o];if((0,n.isDefined)(a.rowSpan)&&!(0,n.isDefined)(a.pdfCell.isMerged))for(let i=1;i<=a.rowSpan;i++){const n=e[t+i].cells[o];a.pdfCell._rect.h+=n.pdfCell._rect.h,n.pdfCell._rect.h=0,n.pdfCell.isMerged=!0}}}},t.calculateCoordinates=function(e,t,i){const n=null==i?void 0:i.topLeft,o=null==i?void 0:i.margin;let a=((null==n?void 0:n.y)??0)+o.top;t.forEach((e=>{let t=((null==n?void 0:n.x)??0)+o.left;const s=e.indentLevel*i.indent;e.cells.forEach((e=>{e.pdfCell._rect.x=t+s,e.pdfCell._rect.y=a,t+=e.pdfCell._rect.w})),a+=e.height}))},t.calculateHeights=function(e,t,i){t.forEach((t=>{const a=t.cells.map((e=>e.pdfCell));let s;if(i.onRowExporting){const e={rowCells:a};i.onRowExporting(e),(0,n.isDefined)(e.rowHeight)&&(s=e.rowHeight)}t.height=(0,n.isDefined)(s)?s:(0,o.calculateRowHeight)(e,t.cells,a.map((e=>e._rect.w))),a.forEach((e=>{e._rect.h=t.height}))}))},t.calculateTableSize=function(e,t,i){var o,a;let s,r,l,d;t.forEach((e=>{(!(0,n.isDefined)(s)||s>e._rect.x)&&(s=e._rect.x),(!(0,n.isDefined)(r)||r>e._rect.y)&&(r=e._rect.y),(!(0,n.isDefined)(l)||l<e._rect.x+e._rect.w)&&(l=e._rect.x+e._rect.w),(!(0,n.isDefined)(d)||d<e._rect.y+e._rect.h)&&(d=e._rect.y+e._rect.h)}));const u=s??(null==i||null===(o=i.topLeft)||void 0===o?void 0:o.x)??0,c=r??(null==i||null===(a=i.topLeft)||void 0===a?void 0:a.y)??0,h=(0,n.isDefined)(l)?l-u:0,p=(0,n.isDefined)(d)?d-c:0;return{x:u,y:c,w:h,h:p}},t.initializeCellsWidth=function(e,t,i,s){const r=function(e,t,i,s,r){const l=150,d=t.getColumnsWidths().map((t=>(0,o.toPdfUnit)(e,t??l))),u=d.filter(((e,t)=>!(0,n.isDefined)(r[t]))).reduce(a,0),c=r.filter((e=>(0,n.isNumeric)(e))).reduce(a,0),h=function(e,t,i){return(0,o.getPageWidth)(e)-t-i.left-i.right}(e,i,s),p=c<h?(h-c)/u:1;return d.map(((e,t)=>r[t]??e*p))}(e,t,s.topLeft.x,s.margin,s.columnWidths);i.forEach((e=>{e.cells.forEach(((e,t)=>{let{gridCell:i,pdfCell:n}=e;n._rect.w=r[t]}))}))},t.resizeFirstColumnByIndentLevel=function(e,t){e.forEach((e=>{e.cells[0].pdfCell._rect.w-=e.indentLevel*t.indent}))};var n=i(11528),o=i(31162);const a=(e,t)=>e+t},44151:function(e,t,i){t.generateRowsInfo=function(e,t,i,n){const o=[],a=t.getRowsCount(),s=!!i.option("wordWrapEnabled"),r=!!i.option("rtlEnabled"),l=t.getColumns(),u=t.getStyles();for(let i=0;i<a;i++){const a=t.getCellData(i,0,!0).cellSourceData.rowType;let c="header"!==a?t.getGroupLevel(i):0;const h=o[i-1];"groupFooter"===a&&"groupFooter"===(null==h?void 0:h.rowType)&&(c=h.indentLevel-1),o.push({rowType:a,indentLevel:c,cells:d({doc:e,dataProvider:t,rowIndex:i,wordWrapEnabled:s,columns:l,styles:u,rowType:a,backgroundColor:"header"===a?n:void 0,rtlEnabled:r}),rowIndex:i})}return o},t.getBaseTableStyle=function(){return l.base};var n=i(11528),o=r(i(38662)),a=r(i(52771)),s=i(31162);function r(e){return e&&e.__esModule?e:{default:e}}const l={base:{font:{size:10},borderWidth:.5,borderColor:"#979797"},header:{textColor:"#979797"},group:{},data:{},groupFooter:{},totalFooter:{}};function d(e){let{doc:t,dataProvider:i,rowIndex:o,wordWrapEnabled:a,columns:r,styles:l,rowType:d,backgroundColor:h,rtlEnabled:p}=e;const g=[];for(let e=0;e<r.length;e++){const _=i.getCellData(o,e,!0),f=l[i.getStyleId(o,e)],m=u(r[e],d,f),v=p?"right":"left",C=(0,s.toPdfUnit)(t,5),y={text:c(_.value,f.format),verticalAlign:"middle",horizontalAlign:m.alignment??v,wordWrapEnabled:a,backgroundColor:h,padding:{top:C,right:C,bottom:C,left:C},_rect:{},_internalTextOptions:{}};p&&(y._internalTextOptions.isInputVisual=!1,y._internalTextOptions.isOutputVisual=!0,y._internalTextOptions.isInputRtl=!0,y._internalTextOptions.isOutputRtl=!1);const b={gridCell:_.cellSourceData,pdfCell:Object.assign({},y,m)};if("header"===d){const t=i.getCellMerging(o,e);t&&t.rowspan>0&&(b.rowSpan=t.rowspan),t&&t.colspan>0&&(b.colSpan=t.colspan)}else if("group"===d){const t=p?"drawRightBorder":"drawLeftBorder",i=p?"drawLeftBorder":"drawRightBorder";if(b.pdfCell[t]=0===e,b.pdfCell[i]=e===r.length-1,e>0){const e=g.slice(1).reduce(((e,t)=>e&&!(0,n.isDefined)(t.pdfCell.text)),!0);if(!(0,n.isDefined)(b.pdfCell.text)&&e){g[0].pdfCell[i]=!0;for(let e=0;e<g.length;e++)g[e].colSpan=g.length;b.colSpan=g.length}}}g.push(b)}return g}function u(e,t,i){const n=Object.assign({},l.base,l[t]),o="header"===t?e.alignment:i.alignment;return o&&(n.alignment=o),i.bold&&"header"!==t&&(n.font=Object.assign({},n.font,{style:"bold"})),n}function c(e,t){if((0,n.isDefined)(t)){if((0,n.isDate)(e))return o.default.format(e,t);if((0,n.isNumeric)(e))return a.default.format(e,t)}return null==e?void 0:e.toString()}},13252:function(e,t,i){t.createOnSplitMultiPageRow=void 0;var n=i(31162);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}function a(e,t,i){return o({},e,{sourceCellInfo:o({},e.sourceCellInfo,{text:t}),y:i})}t.createOnSplitMultiPageRow=(e,t,i,o)=>(s,r)=>{const l=[],d=[];let u=0,c=0;return r.forEach((r=>{const{w:h,sourceCellInfo:p}=r,g=!s&&t.repeatHeaders?i:i+t.topLeft.y,_=(0,n.getTextDimensions)(e,p.text,p.font).h,f=p.padding.top+p.padding.bottom,m=o.y-g-f-t.margin.top,v=Math.floor(m/(_*e.getLineHeightFactor())),C=(0,n.getTextLines)(e,p.text,p.font,{wordWrapEnabled:p.wordWrapEnabled,targetRectWidth:h});if(v<C.length){const i=C.slice(0,v).join("\n"),o=(0,n.calculateTextHeight)(e,i,p.font,{wordWrapEnabled:p.wordWrapEnabled,targetRectWidth:h});u=Math.max(u,o+f),c=r.h-o,l.push(a(r,i,t.margin.top)),d.push(a(r,C.slice(v).join("\n"),t.margin.top))}else{const i=(0,n.calculateTextHeight)(e,p.text,p.font,{wordWrapEnabled:p.wordWrapEnabled,targetRectWidth:h});u=Math.max(u,i+f),c=Math.max(c,i+f),l.push(a(r,p.text,t.margin.top)),d.push(a(r,"",t.margin.top))}})),l.forEach((e=>e.h=u)),d.forEach((e=>e.h=c)),[l,d]}},83860:function(e,t){function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},i.apply(null,arguments)}t.getMultiPageRowPages=t.checkPageContainsOnlyHeader=void 0;const n=e=>"header"===(null==e?void 0:e.sourceCellInfo.gridCell.rowType);t.checkPageContainsOnlyHeader=(e,t)=>t&&n(e[e.length-1]);t.getMultiPageRowPages=(e,t,o,a,s)=>{if(!a)return[];const r=e[e.length-1],l=t[e.length];if(!l||n(l))return[];if(s(o,l.h)&&!o)return[];const d=t.filter((e=>{let{y:t}=e;return t===l.y})),u=r.y+r.h,[c,h]=((e,t,n,o,a)=>{let[s,r]=o(t,e);const l=[t?s.map((e=>i({},e,{y:n}))):s];for(;!a(!1,r[0].h);)[s,r]=o(!1,r),l.push(s);return[l,r]})(d,o,u,a,s);return((e,t,i)=>{t.forEach(((e,t)=>{e.sourceCellInfo.text=i[t].sourceCellInfo.text,e.h=i[t].h}));const n=e.indexOf(t[t.length-1])+1;if(n>=e.length)return;const o=e[n].y-(t[0].y+i[0].h);for(let t=n;t<e.length;t++)e[t].y=e[t].y-o})(t,d,h),c}},26002:function(e,t,i){t.splitByPages=function(e,t,i,n,s){if(0===t.length)return[[]];const l={x:(0,o.getPageWidth)(e)-i.margin.right,y:(0,o.getPageHeight)(e)-i.margin.bottom},d=t.filter((e=>"header"===e.rowType)),h=d.reduce(((e,t)=>e+t.height),0),p=c(u(t),i.margin.top,"y","h",((e,t)=>{const n=!e&&i.repeatHeaders?h:0;return(0,a.roundToThreeDecimals)(t+n)<=(0,a.roundToThreeDecimals)(l.y)}),((e,t,i,n)=>{const o={sourceRect:e,topRect:{x:e.x,y:e.y,w:e.w,h:t-e.y},bottomRect:{x:e.x,y:t,w:e.w,h:e.h-(t-e.y)}};s(o),i.push(o.topRect),n.push(o.bottomRect)}),(0,r.createOnSplitMultiPageRow)(e,i,h,l));if(i.repeatHeaders)for(let e=1;e<p.length;e++){p[e].forEach((e=>e.y+=h));const t=u(d);t.forEach((e=>{e.y-=i.topLeft.y})),p[e]=[...t,...p[e]]}let g=0;for(;g<p.length;){const e=c(p[g],i.margin.left,"x","w",((e,t)=>(0,a.roundToThreeDecimals)(t)<=(0,a.roundToThreeDecimals)(l.x)),((e,t,i,o)=>{const a={sourceRect:e,leftRect:{x:e.x,y:e.y,w:t-e.x,h:e.h},rightRect:{x:t,y:e.y,w:e.w-(t-e.x),h:e.h}};n(a),i.push(a.leftRect),o.push(a.rightRect)}));e.length>1?(p.splice(g,1,...e),g+=e.length):g+=1}return p.map((e=>e.map((e=>Object.assign({},e.sourceCellInfo,{_rect:e})))))};var n=i(11528),o=i(31162),a=i(9916),s=i(83860),r=i(13252);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},l.apply(null,arguments)}const d=.001;function u(e){return[].concat.apply([],e.map((e=>e.cells.filter((e=>!(0,n.isDefined)(e.pdfCell.isMerged))).map((e=>Object.assign({},e.pdfCell._rect,{sourceCellInfo:l({},e.pdfCell,{gridCell:e.gridCell})}))))))}function c(e,t,i,o,a,r,l){const u=[],c=[...e],h=(e,i)=>a(e,i+t);for(;c.length>0;){let e=0;const p=c.filter((t=>{const n=t[i]+t[o];return!!a(0===u.length,n)&&(e<=n&&(e=n),!0)})),g=(0,s.checkPageContainsOnlyHeader)(p,0===u.length),_=(0,s.getMultiPageRowPages)(p,c,g,l,h);c.filter((t=>{const n=t[i],a=t[i]+t[o];return e-n>d&&a-e>d})).forEach((t=>{r(t,e,p,c);const i=c.indexOf(t);-1!==i&&c.splice(i,1)})),p.forEach((e=>{const t=c.indexOf(e);-1!==t&&c.splice(t,1)})),c.forEach((o=>{o[i]=(0,n.isDefined)(e)?o[i]-e+t:o[i]}));if(g&&_.length>0){const[e,...t]=_;u.push([...p,...e]),u.push(...t)}else if(p.length>0)u.push(p),u.push(..._);else{if(!(_.length>0)){u.push(c);break}u.push(..._),u.push(c)}}return u}},93932:function(e,t,i){t.exportDataGrid=function(e){return s.Export.export(function(e){if(!(0,o.isDefined)(e)||!(0,o.isObject)(e))throw Error('The "exportDataGrid" method requires a configuration object.');if(!(0,o.isDefined)(e.component)||!(0,o.isObject)(e.component)||"dxDataGrid"!==e.component.NAME)throw Error('The "component" field must contain a DataGrid instance.');if(!(0,o.isDefined)(e.jsPDFDocument)||!(0,o.isObject)(e.jsPDFDocument))throw Error('The "jsPDFDocument" field must contain a jsPDF instance.');(0,o.isDefined)(e.autoTableOptions)&&a.default.log("W0001","Export","autoTableOptions","22.1",`You can migrate from exporting to PDF with the AutoTable plugin to a new export system. See the following topic for more information: ${r}`);return s.Export.getFullOptions(e)}(e))};var n,o=i(11528),a=(n=i(87129))&&n.__esModule?n:{default:n},s=i(5650);const r="https://supportcenter.devexpress.com/ticket/details/t1077554"},81863:function(e,t){t.exportGantt=function(e){const t=e.component;return null==t?void 0:t.exportToPdf(e)}},49343:function(e,t,i){t.getData=function(e,t){return a.imageCreator.getImageData(e,(0,r.extend)({},t,{format:"JPEG"})).then((e=>{const i=c(e,t,`(D:${[(n=h()).getUTCFullYear(),_(n.getUTCMonth()),_(n.getUTCDate()),_(n.getUTCHours()),_(n.getUTCMinutes()),_(n.getUTCSeconds())].join("")}Z00'00')`);var n;return(0,s.isFunction)(l.Blob)?p(i):g(i)}))};var n=i(1956),o=i(3104),a=i(28456),s=i(11528),r=i(52576);const l=(0,o.getWindow)(),d="xref\r\n0 8\r\n0000000000 65535 f\r\n0000000241 00000 n\r\n0000000010 00000 n\r\n_main_ 00000 n\r\n0000000089 00000 n\r\n_image_ 00000 n\r\n_info_ 00000 n\r\n0000000143 00000 n\r\n",u=function(e,t){return e.length<t?u("0"+e,t):e};let c=function(e,t,i){const o=2*(t.margin||0);let{width:s,height:r}=(0,a.calcScaledInfo)(t.width,t.height);s+=o,r+=o;const l=(.75*s).toFixed(2),c=(.75*r).toFixed(2),h=Math.floor(s),p=Math.floor(r),g="%PDF-1.3\r\n2 0 obj\r\n<</ProcSet[/PDF/ImageB/ImageC/ImageI]/XObject<</I0 5 0 R>>>>\r\nendobj\r\n4 0 obj\r\n<</Type/Pages/Kids[1 0 R]/Count 1>>\r\nendobj\r\n7 0 obj\r\n<</OpenAction[1 0 R /FitH null]/Type/Catalog/Pages 4 0 R/PageLayout/OneColumn>>\r\nendobj\r\n1 0 obj\r\n<</Type/Page/Resources 2 0 R/MediaBox[0 0 _width_ _height_]/Contents 3 0 R/Parent 4 0 R>>\r\nendobj\r\n".replace("_width_",l).replace("_height_",c),_="3 0 obj\r\n<</Length 52>>stream\r\n0.20 w\n0 G\nq _width_ 0 0 _height_ 0.00 0.00 cm /I0 Do Q\r\nendstream\r\nendobj\r\n".replace("_width_",l).replace("_height_",c),f="6 0 obj\r\n<</CreationDate _date_/Producer(DevExtreme _version_)>>\r\nendobj\r\n".replace("_date_",i).replace("_version_",n.version);var m,v,C;const y=g+_+f+("5 0 obj\r\n<</Type/XObject/Subtype/Image/Width _width_/Height _height_/ColorSpace/DeviceRGB/BitsPerComponent 8/Filter/DCTDecode/Length _length_>>stream\r\n".replace("_width_",h).replace("_height_",p).replace("_length_",e.length)+e+"\r\nendstream\r\nendobj\r\n");return y+(m=g.length,v=_.length,C=f.length,d.replace("_main_",u(m+"",10)).replace("_info_",u(m+v+"",10)).replace("_image_",u(m+v+C+"",10)))+"trailer\r\n<<\r\n/Size 8\r\n/Root 7 0 R\r\n/Info 6 0 R\r\n>>\r\nstartxref\r\n_length_\r\n%%EOF".replace("_length_",y.length)};let h=function(){return new Date},p=function(e){let t=0;const i=new Uint8Array(e.length);for(;t<e.length;t++)i[t]=e.charCodeAt(t);return new l.Blob([i.buffer],{type:"application/pdf"})},g=function(e){return l.btoa(e)};function _(e){return 1===e.toString().length?`0${e}`:e}},86195:function(e,t,i){t.getData=function(e,t){return h.getData(e,t)},t.svgCreator=void 0;var n=u(i(64553)),o=u(i(78670)),a=i(3104),s=i(11528),r=i(21274),l=u(i(89650)),d=i(87739);function u(e){return e&&e.__esModule?e:{default:e}}const c=(0,a.getWindow)(),h=t.svgCreator={_markup:"",_imageArray:{},_imageDeferreds:[],_getBinaryFile:function(e,t){o.default.sendRequest({url:e,method:"GET",responseType:"arraybuffer"}).done(t).fail((function(){t(!1)}))},_loadImages:function(){const e=this;(0,r.each)(e._imageArray,(function(t){const i=new d.Deferred;e._imageDeferreds.push(i),e._getBinaryFile(t,(function(n){if(!n)return delete e._imageArray[t],void i.resolve();let o,a="";const s=new Uint8Array(n),r=s.byteLength;for(o=0;o<r;o++)a+=String.fromCharCode(s[o]);e._imageArray[t]="data:image/png;base64,"+c.btoa(a),i.resolve()}))}))},_parseImages:function(e){let t;const i=this;"image"===e.tagName&&(t=(0,n.default)(e).attr("href")||(0,n.default)(e).attr("xlink:href"),i._imageArray[t]||(i._imageArray[t]="")),(0,r.each)(e.childNodes,(function(e,t){i._parseImages(t)}))},_prepareImages:function(e){return this._parseImages(e),this._loadImages(),d.when.apply(n.default,this._imageDeferreds)},getData:function(e,t){let i;const o=this,a=l.default.getSvgElement(e),d=(0,n.default)(a);return d.find(`[${l.default.HIDDEN_FOR_EXPORT}]`).remove(),i='<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'+l.default.getSvgMarkup(d.get(0),t.backgroundColor),o._prepareImages(a).then((()=>((0,r.each)(o._imageArray,(function(e,t){const n=`href=['|"]${e}['|"]`;i=i.replace(new RegExp(n,"gi"),`href="${t}"`)})),(0,s.isFunction)(c.Blob)?o._getBlob(i):o._getBase64(i))))},_getBlob:function(e){return new c.Blob([e],{type:"image/svg+xml"})},_getBase64:function(e){return c.btoa(e)}}},85096:function(e,t,i){t.default=void 0;var n,o=i(17781),a=i(11528),s=i(31e3),r=(n=i(65266))&&n.__esModule?n:{default:n};class l extends r.default{constructor(e){super(e=(0,o.ensureDefined)(e,{})),this._hasSubDirsGetter=(0,s.compileGetter)(e.hasSubDirectoriesExpr||"hasSubDirectories"),this._getItemsFunction=this._ensureFunction(e.getItems,(()=>[])),this._renameItemFunction=this._ensureFunction(e.renameItem),this._createDirectoryFunction=this._ensureFunction(e.createDirectory),this._deleteItemFunction=this._ensureFunction(e.deleteItem),this._moveItemFunction=this._ensureFunction(e.moveItem),this._copyItemFunction=this._ensureFunction(e.copyItem),this._uploadFileChunkFunction=this._ensureFunction(e.uploadFileChunk),this._abortFileUploadFunction=this._ensureFunction(e.abortFileUpload),this._downloadItemsFunction=this._ensureFunction(e.downloadItems),this._getItemsContentFunction=this._ensureFunction(e.getItemsContent)}getItems(e){const t=e.getFullPathInfo();return this._executeActionAsDeferred((()=>this._getItemsFunction(e)),!0).then((e=>this._convertDataObjectsToFileItems(e,t)))}renameItem(e,t){return this._executeActionAsDeferred((()=>this._renameItemFunction(e,t)))}createDirectory(e,t){return this._executeActionAsDeferred((()=>this._createDirectoryFunction(e,t)))}deleteItems(e){return e.map((e=>this._executeActionAsDeferred((()=>this._deleteItemFunction(e)))))}moveItems(e,t){return e.map((e=>this._executeActionAsDeferred((()=>this._moveItemFunction(e,t)))))}copyItems(e,t){return e.map((e=>this._executeActionAsDeferred((()=>this._copyItemFunction(e,t)))))}uploadFileChunk(e,t,i){return this._executeActionAsDeferred((()=>this._uploadFileChunkFunction(e,t,i)))}abortFileUpload(e,t,i){return this._executeActionAsDeferred((()=>this._abortFileUploadFunction(e,t,i)))}downloadItems(e){return this._executeActionAsDeferred((()=>this._downloadItemsFunction(e)))}getItemsContent(e){return this._executeActionAsDeferred((()=>this._getItemsContentFunction(e)))}_hasSubDirs(e){const t=this._hasSubDirsGetter(e);return"boolean"!=typeof t||t}_getKeyExpr(e){return e.keyExpr||"key"}_ensureFunction(e,t){return t=t||o.noop,(0,a.isFunction)(e)?e:t}}t.default=l;e.exports=t.default,e.exports.default=t.default},46327:function(e,t){t.default=void 0;t.default=class{constructor(e,t,i){this.errorCode=e,this.fileSystemItem=t,this.errorText=i}};e.exports=t.default,e.exports.default=t.default},54950:function(e,t){t.default=void 0;t.default={NoAccess:0,FileExists:1,FileNotFound:2,DirectoryExists:3,DirectoryNotFound:4,WrongFileExtension:5,MaxFileSizeExceeded:6,InvalidSymbols:7,Other:32767};e.exports=t.default,e.exports.default=t.default},53093:function(e,t,i){t.default=void 0;var n=i(11528),o=i(56536);class a{constructor(){((0,n.isString)(arguments[0])?this._publicCtor:this._internalCtor).apply(this,arguments)}_internalCtor(e,t,i,n){this.name=t||"",this.pathInfo=e&&[...e]||[],this.parentPath=this._getPathByPathInfo(this.pathInfo),this.relativeName=(0,o.pathCombine)(this.parentPath,t),this.key=n||this._getPathByPathInfo(this.getFullPathInfo(),!0),this.path=(0,o.pathCombine)(this.parentPath,t),this.pathKeys=this.pathInfo.map((e=>{let{key:t}=e;return t})),this.isRoot()||this.pathKeys.push(this.key),this._initialize(i)}_publicCtor(e,t,i){this.path=e||"",this.pathKeys=i||[];const n=[],a=(0,o.getPathParts)(e,!0);for(let e=0;e<a.length-1;e++){const t=a[e],i={key:this.pathKeys[e]||t,name:(0,o.getName)(t)};n.push(i)}this.pathInfo=n,this.relativeName=e,this.name=(0,o.getName)(e),this.key=this.pathKeys.length?this.pathKeys[this.pathKeys.length-1]:e,this.parentPath=a.length>1?a[a.length-2]:"",this._initialize(t)}_initialize(e){this.isDirectory=!!e,this.size=0,this.dateModified=new Date,this.thumbnail="",this.tooltipText=""}getFullPathInfo(){const e=[...this.pathInfo];return this.isRoot()||e.push({key:this.key,name:this.name}),e}isRoot(){return""===this.path}getFileExtension(){return this.isDirectory?"":(0,o.getFileExtension)(this.name)}equals(e){return e&&this.key===e.key}createClone(){const e=new a(this.pathInfo,this.name,this.isDirectory,this.key);return e.key=this.key,e.size=this.size,e.dateModified=this.dateModified,e.thumbnail=this.thumbnail,e.tooltipText=this.tooltipText,e.hasSubDirectories=this.hasSubDirectories,e.dataItem=this.dataItem,e}_getPathByPathInfo(e,t){return e.map((e=>t?(0,o.getEscapedFileName)(e.name):e.name)).join(o.PATH_SEPARATOR)}}t.default=a;e.exports=t.default,e.exports.default=t.default},76856:function(e,t,i){t.default=void 0;var n=i(17781),o=i(31e3),a=i(83077),s=i(11528),r=i(82812),l=i(87739),d=i(3104),u=i(34924),c=m(i(35185)),h=m(i(87531)),p=m(i(65266)),g=m(i(46327)),_=m(i(54950)),f=i(56536);function m(e){return e&&e.__esModule?e:{default:e}}const v=(0,d.getWindow)();class C extends p.default{constructor(e){super(e=(0,n.ensureDefined)(e,{}));const t=e.data;if(t&&!Array.isArray(t))throw r.errors.Error("E4006");const i=e.itemsExpr||"items";this._subFileItemsGetter=(0,o.compileGetter)(i),this._subFileItemsSetter=this._getSetter(i);const a=e.contentExpr||"content";this._contentGetter=(0,o.compileGetter)(a),this._contentSetter=this._getSetter(a);const s=this._getNameExpr(e);this._nameSetter=this._getSetter(s);const l=this._getIsDirExpr(e);this._getIsDirSetter=this._getSetter(l);const d=this._getKeyExpr(e);this._keySetter=this._getSetter(d);const u=this._getSizeExpr(e);this._sizeSetter=this._getSetter(u);const c=this._getDateModifiedExpr(e);this._dateModifiedSetter=this._getSetter(c),this._data=t||[]}getItems(e){return this._executeActionAsDeferred((()=>this._getItems(e)),!0)}renameItem(e,t){return this._executeActionAsDeferred((()=>this._renameItemCore(e,t)))}_renameItemCore(e,t){if(!e)return;const i=this._findDataObject(e);this._nameSetter(i,t),e.name=t,e.key=this._ensureDataObjectKey(i)}createDirectory(e,t){return this._executeActionAsDeferred((()=>{this._validateDirectoryExists(e),this._createDataObject(e,t,!0)}))}deleteItems(e){return e.map((e=>this._executeActionAsDeferred((()=>this._deleteItem(e)))))}moveItems(e,t){const i=this._findDataObject(t),n=this._getDirectoryDataItems(i);return e.map((e=>this._executeActionAsDeferred((()=>{this._checkAbilityToMoveOrCopyItem(e,t);const i=this._findDataObject(e);this._deleteItem(e),n.push(i)}))))}copyItems(e,t){const i=this._findDataObject(t),n=this._getDirectoryDataItems(i);return e.map((e=>this._executeActionAsDeferred((()=>{this._checkAbilityToMoveOrCopyItem(e,t);const i=this._findDataObject(e),o=this._createCopy(i);n.push(o)}))))}uploadFileChunk(e,t,i){if(t.chunkIndex>0)return t.customData.deferred;this._validateDirectoryExists(i);const n=t.customData.deferred=new l.Deferred,o=this._createFileReader();return o.readAsDataURL(e),o.onload=()=>{const t=o.result.split(",")[1],a=this._createDataObject(i,e.name,!1);this._sizeSetter(a,e.size),this._dateModifiedSetter(a,e.lastModifiedDate),this._contentSetter(a,t),n.resolve()},o.onerror=e=>n.reject(e),n}downloadItems(e){1===e.length?this._downloadSingleFile(e[0]):this._downloadMultipleFiles(e)}_downloadSingleFile(e){const t=this._getFileContent(e),i=v.atob(t),n=new ArrayBuffer(i.length),o=new Uint8Array(n);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);const a=new v.Blob([n],{type:"application/octet-stream"});u.fileSaver.saveAs(e.name,null,a)}_downloadMultipleFiles(e){const t=new(function(){if(!h.default)throw c.default.Error("E1041","JSZip");return h.default}());e.forEach((e=>t.file(e.name,this._getFileContent(e),{base64:!0})));const i={type:"blob",compression:"DEFLATE",mimeType:"application/zip"},n=new l.Deferred;t.generateAsync?t.generateAsync(i).then(n.resolve):n.resolve(t.generate(i)),n.done((e=>u.fileSaver.saveAs("files.zip",null,e)))}_getFileContent(e){const t=this._findDataObject(e);return this._contentGetter(t)||""}_validateDirectoryExists(e){if(!this._isFileItemExists(e)||this._isDirGetter(e.fileItem))throw new g.default(_.default.DirectoryNotFound,e)}_checkAbilityToMoveOrCopyItem(e,t){const i=this._findDataObject(e),n=this._getKeyFromDataObject(i,e.parentPath),o=t.getFullPathInfo();let a="";o.forEach((t=>{a=(0,f.pathCombine)(a,t.name);if(this._getDataObjectKey(t.key,a)===n)throw new g.default(_.default.Other,e)}))}_createDataObject(e,t,i){const n={};this._nameSetter(n,t),this._getIsDirSetter(n,i),this._keySetter(n,String(new a.Guid));const o=this._findDataObject(e);return this._getDirectoryDataItems(o).push(n),n}_createCopy(e){const t={};this._nameSetter(t,this._nameGetter(e)),this._getIsDirSetter(t,this._isDirGetter(e));const i=this._subFileItemsGetter(e);if(Array.isArray(i)){const e=[];i.forEach((t=>{const i=this._createCopy(t);e.push(i)})),this._subFileItemsSetter(t,e)}return t}_deleteItem(e){const t=this._findDataObject(e),i=this._findFileItemObj(e.pathInfo),n=this._getDirectoryDataItems(i),o=n.indexOf(t);n.splice(o,1)}_getDirectoryDataItems(e){if(!e)return this._data;let t=this._subFileItemsGetter(e);return Array.isArray(t)||(t=[],this._subFileItemsSetter(e,t)),t}_getItems(e){this._validateDirectoryExists(e);const t=e.getFullPathInfo(),i=t&&t.length>0?t[t.length-1].key:null;let n=this._data;if(i){const e=this._findFileItemObj(t);n=e&&this._subFileItemsGetter(e)||[]}return this._ensureKeysForDuplicateNameItems(n),this._convertDataObjectsToFileItems(n,t)}_ensureKeysForDuplicateNameItems(e){const t={};e.forEach((e=>{const i=this._nameGetter(e);t[i]?this._ensureDataObjectKey(e):t[i]=!0}))}_findDataObject(e){if(e.isRoot())return null;const t=this._findFileItemObj(e.getFullPathInfo());if(!t){const t=e.isDirectory?_.default.DirectoryNotFound:_.default.FileNotFound;throw new g.default(t,e)}return t}_findFileItemObj(e){Array.isArray(e)||(e=[]);let t="",i=null,n=this._data;for(let o=0;o<e.length&&(0===o||i);o++)i=n.find((i=>{const n=this._isDirGetter(i)||o===e.length-1;return this._getKeyFromDataObject(i,t)===e[o].key&&this._nameGetter(i)===e[o].name&&n})),i&&(t=(0,f.pathCombine)(t,this._nameGetter(i)),n=this._subFileItemsGetter(i));return i}_getKeyFromDataObject(e,t){const i=this._keyGetter(e),n=(0,f.pathCombine)(t,this._nameGetter(e));return this._getDataObjectKey(i,n)}_getDataObjectKey(e,t){return e||t}_ensureDataObjectKey(e){let t=this._keyGetter(e);return t||(t=String(new a.Guid),this._keySetter(e,t)),t}_hasSubDirs(e){const t=(0,n.ensureDefined)(this._subFileItemsGetter(e),[]);if(!Array.isArray(t))return!0;for(let e=0;e<t.length;e++)if(!0===this._isDirGetter(t[e]))return!0;return!1}_getSetter(e){return(0,s.isFunction)(e)?e:(0,o.compileSetter)(e)}_isFileItemExists(e){return e.isDirectory&&e.isRoot()||!!this._findFileItemObj(e.getFullPathInfo())}_createFileReader(){return new v.FileReader}}t.default=C;e.exports=t.default,e.exports.default=t.default},65266:function(e,t,i){t.default=void 0;var n=i(31e3),o=i(17781),a=u(i(71051)),s=i(21274),r=i(11528),l=i(87739),d=u(i(53093));function u(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(e){e=(0,o.ensureDefined)(e,{}),this._keyGetter=(0,n.compileGetter)(this._getKeyExpr(e)),this._nameGetter=(0,n.compileGetter)(this._getNameExpr(e)),this._isDirGetter=(0,n.compileGetter)(this._getIsDirExpr(e)),this._sizeGetter=(0,n.compileGetter)(this._getSizeExpr(e)),this._dateModifiedGetter=(0,n.compileGetter)(this._getDateModifiedExpr(e)),this._thumbnailGetter=(0,n.compileGetter)(e.thumbnailExpr||"thumbnail")}getItems(e){return[]}renameItem(e,t){}createDirectory(e,t){}deleteItems(e){}moveItems(e,t){}copyItems(e,t){}uploadFileChunk(e,t,i){}abortFileUpload(e,t,i){}downloadItems(e){}getItemsContent(e){}getFileUploadChunkSize(){return 2e5}_convertDataObjectsToFileItems(e,t){const i=[];return(0,s.each)(e,((e,n)=>{const o=this._createFileItem(n,t);i.push(o)})),i}_createFileItem(e,t){const i=this._keyGetter(e),n=new d.default(t,this._nameGetter(e),!!this._isDirGetter(e),i);return n.size=this._sizeGetter(e),void 0===n.size&&(n.size=0),n.dateModified=a.default.deserializeDate(this._dateModifiedGetter(e)),void 0===n.dateModified&&(n.dateModified=new Date),n.isDirectory&&(n.hasSubDirectories=this._hasSubDirs(e)),i||(n.key=n.relativeName),n.thumbnail=this._thumbnailGetter(e)||"",n.dataItem=e,n}_hasSubDirs(e){return!0}_getKeyExpr(e){return e.keyExpr||this._defaultKeyExpr}_defaultKeyExpr(e){if(2!==arguments.length)return Object.prototype.hasOwnProperty.call(e,"__KEY__")?e.__KEY__:null;e.__KEY__=arguments[1]}_getNameExpr(e){return e.nameExpr||"name"}_getIsDirExpr(e){return e.isDirectoryExpr||"isDirectory"}_getSizeExpr(e){return e.sizeExpr||"size"}_getDateModifiedExpr(e){return e.dateModifiedExpr||"dateModified"}_executeActionAsDeferred(e,t){const i=new l.Deferred;try{const n=e();(0,r.isPromise)(n)?(0,l.fromPromise)(n).done((e=>i.resolve(t&&e||void 0))).fail((e=>i.reject(e))):i.resolve(t&&n||void 0)}catch(e){return i.reject(e)}return i.promise()}};e.exports=t.default,e.exports.default=t.default},80175:function(e,t,i){t.default=void 0;var n=g(i(64553)),o=g(i(78670)),a=i(17781),s=i(83077),r=i(3104),l=i(21274),d=i(87739),u=g(i(92774)),c=g(i(65266)),h=i(31e3),p=i(11528);function g(e){return e&&e.__esModule?e:{default:e}}const _=(0,r.getWindow)(),f="chunk",m="GetDirContents",v="CreateDir",C="Rename",y="Move",b="Copy",x="Remove",w="UploadChunk",S="AbortUpload",D="Download",I="GET",E="POST";class T extends c.default{constructor(e){super(e=(0,a.ensureDefined)(e,{})),this._endpointUrl=e.endpointUrl,this._beforeAjaxSend=e.beforeAjaxSend,this._beforeSubmit=e.beforeSubmit,this._requestHeaders=e.requestHeaders,this._hasSubDirsGetter=(0,h.compileGetter)(e.hasSubDirectoriesExpr||"hasSubDirectories")}getItems(e){const t=e.getFullPathInfo();return this._executeRequest(m,{pathInfo:t}).then((e=>this._convertDataObjectsToFileItems(e.result,t)))}renameItem(e,t){return this._executeRequest(C,{pathInfo:e.getFullPathInfo(),isDirectory:e.isDirectory,name:t})}createDirectory(e,t){return this._executeRequest(v,{pathInfo:e.getFullPathInfo(),name:t})}deleteItems(e){return e.map((e=>this._executeRequest(x,{pathInfo:e.getFullPathInfo(),isDirectory:e.isDirectory})))}moveItems(e,t){return e.map((e=>this._executeRequest(y,{sourcePathInfo:e.getFullPathInfo(),sourceIsDirectory:e.isDirectory,destinationPathInfo:t.getFullPathInfo()})))}copyItems(e,t){return e.map((e=>this._executeRequest(b,{sourcePathInfo:e.getFullPathInfo(),sourceIsDirectory:e.isDirectory,destinationPathInfo:t.getFullPathInfo()})))}uploadFileChunk(e,t,i){0===t.chunkIndex&&(t.customData.uploadId=new s.Guid);const n={destinationPathInfo:i.getFullPathInfo(),chunkMetadata:JSON.stringify({UploadId:t.customData.uploadId,FileName:e.name,Index:t.chunkIndex,TotalCount:t.chunkCount,FileSize:e.size})},r={url:this._endpointUrl,headers:this._requestHeaders||{},method:E,dataType:"json",data:{[f]:t.chunkBlob,arguments:JSON.stringify(n),command:w},upload:{onprogress:a.noop,onloadstart:a.noop,onabort:a.noop},xhrFields:{},cache:!1},l=new d.Deferred;return this._beforeSendInternal(r),o.default.sendRequest(r).done((e=>{!e.success&&l.reject(e)||l.resolve()})).fail(l.reject),l.promise()}abortFileUpload(e,t,i){return this._executeRequest(S,{uploadId:t.customData.uploadId})}downloadItems(e){const t=this._getDownloadArgs(e),i=(0,n.default)("<form>").css({display:"none"}).attr({method:E,action:t.url}),o={command:t.command,arguments:t.arguments};this._beforeSubmitInternal(o),this._appendFormDataInputsToForm(o,i),i.appendTo("body"),u.default.trigger(i,"submit"),setTimeout((()=>i.remove()))}getItemsContent(e){const t=this._getDownloadArgs(e),i={url:t.url,headers:this._requestHeaders||{},method:E,responseType:"arraybuffer",data:{command:t.command,arguments:t.arguments},upload:{onprogress:a.noop,onloadstart:a.noop,onabort:a.noop},xhrFields:{},cache:!1};return this._beforeSendInternal(i),o.default.sendRequest(i)}_getDownloadArgs(e){const t={pathInfoList:e.map((e=>e.getFullPathInfo()))},i=JSON.stringify(t);return{url:this._endpointUrl,arguments:i,command:D}}_getItemsIds(e){return e.map((e=>e.relativeName))}_executeRequest(e,t){const i=e===m?I:E,n=new d.Deferred,a={url:this._getEndpointUrl(e,t),headers:this._requestHeaders||{},method:i,dataType:"json",data:{},xhrFields:{},cache:!1};return this._beforeSendInternal(a),o.default.sendRequest(a).then((e=>{!e.success&&n.reject(e)||n.resolve(e)}),(e=>n.reject(e))),n.promise()}_beforeSubmitInternal(e){(0,p.isFunction)(this._beforeSubmit)&&this._beforeSubmit({formData:e})}_beforeSendInternal(e){if((0,p.isFunction)(this._beforeAjaxSend)){const t={headers:e.headers,formData:e.data,xhrFields:e.xhrFields};this._beforeAjaxSend(t),e.headers=t.headers,e.data=t.formData,e.xhrFields=t.xhrFields}(0,p.isEmptyObject)(e.data)?delete e.data:(e.responseType||e.upload)&&(e.data=this._createFormData(e.data))}_createFormData(e){const t=new _.FormData;for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(0,p.isDefined)(e[i])&&t.append(i,e[i]);return t}_appendFormDataInputsToForm(e,t){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(0,p.isDefined)(e[i])&&(0,n.default)("<input>").attr({type:"hidden",name:i,value:e[i]}).appendTo(t)}_getEndpointUrl(e,t){const i=this._getQueryString({command:e,arguments:JSON.stringify(t)}),n=this._endpointUrl&&this._endpointUrl.indexOf("?")>0?"&":"?";return this._endpointUrl+n+i}_getQueryString(e){const t=[],i=Object.keys(e);for(let n=0;n<i.length;n++){const o=i[n];let a=e[o];if(void 0!==a)if(null===a&&(a=""),Array.isArray(a))this._processQueryStringArrayParam(o,a,t);else{const e=this._getQueryStringPair(o,a);t.push(e)}}return t.join("&")}_processQueryStringArrayParam(e,t,i){(0,l.each)(t,((t,n)=>{const o=this._getQueryStringPair(e,n);i.push(o)}))}_getQueryStringPair(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(t)}_hasSubDirs(e){const t=this._hasSubDirsGetter(e);return"boolean"!=typeof t||t}_getKeyExpr(e){return e.keyExpr||"key"}}t.default=T;e.exports=t.default,e.exports.default=t.default},56536:function(e,t,i){t.pathCombine=t.getPathParts=t.getParentPath=t.getName=t.getFileExtension=t.getEscapedFileName=t.PATH_SEPARATOR=void 0;var n=i(21274);const o=t.PATH_SEPARATOR="/";t.getFileExtension=e=>{const t=e.lastIndexOf(".");return-1!==t?e.substr(t):""};t.getName=e=>{const t=e.lastIndexOf(o);return-1!==t?e.substr(t+o.length):e};t.getParentPath=e=>{const t=e.lastIndexOf(o);return-1!==t?e.substr(0,t):""};t.getPathParts=(e,t)=>{if(!e||"/"===e)return[];const i=[];let n="";for(let t=0;t<e.length;t++){let a=e.charAt(t);if(a===o){const s=e.charAt(t+1);s!==o&&(n&&(i.push(n),n=""),a=s),t++}n+=a}if(n&&i.push(n),t)for(let e=0;e<i.length;e++)i[e]=s(0===e?"":i[e-1],a(i[e]));return i};const a=function(e){return e.replace(/\/{1,1}/g,"//")};t.getEscapedFileName=a;const s=function(){let e="";return(0,n.each)(arguments,((t,i)=>{i&&(e&&(e+=o),e+=i)})),e};t.pathCombine=s},2082:function(e,t,i){t.default=void 0;var n=i(11528),o=l(i(41380)),a=l(i(52771)),s=l(i(38662)),r=l(i(89656));function l(e){return e&&e.__esModule?e:{default:e}}i(17333);t.default=(0,r.default)({format:function(e,t){const i=(0,n.isString)(t)&&""!==t||(0,n.isPlainObject)(t)||(0,n.isFunction)(t),o=(0,n.isNumeric)(e)||(0,n.isDate)(e);return i&&o?(0,n.isFunction)(t)?t(e):((0,n.isString)(t)&&(t={type:t}),(0,n.isNumeric)(e)?a.default.format(e,t):(0,n.isDate)(e)?s.default.format(e,t):void 0):(0,n.isDefined)(e)?e.toString():""},getTimeFormat:function(e){return e?"longtime":"shorttime"},_normalizeFormat:function(e){return Array.isArray(e)?1===e.length?e[0]:function(t){return e.map((function(e){return s.default.format(t,e)})).join(" ")}:e},getDateFormatByDifferences:function(e,t){const i=[],n=t&&e.millisecond&&!(e.year||e.month||e.day);if(n){const e=function(e){return e.getSeconds()+e.getMilliseconds()/1e3+"s"};i.push(e)}else e.millisecond&&i.push("millisecond");if((e.hour||e.minute||!n&&e.second)&&i.unshift(this.getTimeFormat(e.second)),e.year&&e.month&&e.day)return t&&"month"===t?"monthandyear":(i.unshift("shortdate"),this._normalizeFormat(i));if(e.year&&e.month)return"monthandyear";if(e.year&&e.quarter)return"quarterandyear";if(e.year)return"year";if(e.quarter)return"quarter";if(e.month&&e.day){if(t){const e=function(e){return s.default.getMonthNames("abbreviated")[e.getMonth()]+" "+s.default.format(e,"day")};i.unshift(e)}else i.unshift("monthandday");return this._normalizeFormat(i)}if(e.month)return"month";if(e.day){if(t)i.unshift("day");else{const e=function(e){return s.default.format(e,"dayofweek")+", "+s.default.format(e,"day")};i.unshift(e)}return this._normalizeFormat(i)}return this._normalizeFormat(i)},getDateFormatByTicks:function(e){let t,i,n;if(e.length>1)for(t=o.default.getDatesDifferences(e[0],e[1]),n=1;n<e.length-1;n++)i=o.default.getDatesDifferences(e[n],e[n+1]),t.count<i.count&&(t=i);else t={year:!0,month:!0,day:!0,hour:e[0].getHours()>0,minute:e[0].getMinutes()>0,second:e[0].getSeconds()>0,millisecond:e[0].getMilliseconds()>0};return this.getDateFormatByDifferences(t)},getDateFormatByTickInterval:function(e,t,i){let a;const s=function(e,t,i){switch(t){case"year":case"quarter":e.month=i;case"month":e.day=i;case"week":case"day":e.hour=i;case"hour":e.minute=i;case"minute":e.second=i;case"second":e.millisecond=i}};i=(0,n.isString)(i)?i.toLowerCase():i;const r=o.default.getDatesDifferences(e,t);var l,d,u;e!==t&&(l=r,d=e>t?t:e,!(u=e>t?e:t).getMilliseconds()&&u.getSeconds()?u.getSeconds()-d.getSeconds()==1&&(l.millisecond=!0,l.second=!1):!u.getSeconds()&&u.getMinutes()?u.getMinutes()-d.getMinutes()==1&&(l.second=!0,l.minute=!1):!u.getMinutes()&&u.getHours()?u.getHours()-d.getHours()==1&&(l.minute=!0,l.hour=!1):!u.getHours()&&u.getDate()>1?u.getDate()-d.getDate()==1&&(l.hour=!0,l.day=!1):1===u.getDate()&&u.getMonth()?u.getMonth()-d.getMonth()==1&&(l.day=!0,l.month=!1):!u.getMonth()&&u.getFullYear()&&u.getFullYear()-d.getFullYear()==1&&(l.month=!0,l.year=!1)),a=o.default.getDateUnitInterval(r),s(r,a,!0),a=o.default.getDateUnitInterval(i||"second"),s(r,a,!1),r[{week:"day"}[a]||a]=!0;return this.getDateFormatByDifferences(r)}});e.exports=t.default,e.exports.default=t.default},21001:function(e,t,i){var n=r(i(10561)),o=i(20142),a=r(i(67264)),s=r(i(97718));function r(e){return e&&e.__esModule?e:{default:e}}i(44603),i(76054),i(5667),i(29953),i(27465),i(24317),i(52425),i(79382),i(52134),i(2646);if((0,s.default)()&&(0,o.compare)(n.default.fn.jquery,[1,10])<0)throw a.default.Error("E0012")},2646:function(e,t,i){var n=a(i(10561)),o=a(i(78670));function a(e){return e&&e.__esModule?e:{default:e}}(0,a(i(97718)).default)()&&o.default.inject({sendRequest:function(e){return e.responseType||e.upload?this.callBase.apply(this,[e]):n.default.ajax(e)}})},52134:function(e,t,i){var n=s(i(10561)),o=s(i(55771)),a=s(i(87129));function s(e){return e&&e.__esModule?e:{default:e}}if(n.default){const e=function(e,t){n.default.fn[e]=function(i){let n;if("string"==typeof i){const o=i,s=[].slice.call(arguments).slice(1);this.each((function(){const i=t.getInstance(this);if(!i)throw a.default.Error("E0009",e);const r=i[o].apply(i,s);void 0===n&&(n=r)}))}else this.each((function(){const e=t.getInstance(this);e?e.option(i):new t(this,i)})),n=this;return n}};o.default.add(e)}},5667:function(e,t,i){var n=s(i(10561)),o=i(87739),a=i(20142);function s(e){return e&&e.__esModule?e:{default:e}}if((0,s(i(97718)).default)()){const e=n.default.Deferred,t={Deferred:e};t.when=(0,a.compare)(n.default.fn.jquery,[3])<0?n.default.when:function(t){return 0===arguments.length?(new e).resolve():1===arguments.length?t&&t.then?t:(new e).resolve(t):n.default.when.apply(n.default,arguments)},(0,o.setStrategy)(t)}},24317:function(e,t,i){var n,o=(n=i(10561))&&n.__esModule?n:{default:n},a=i(88424);o.default&&(0,a.setEasing)(o.default.easing)},79382:function(e,t,i){t.getPublicElementJQuery=a;var n,o=i(61404);function a(e){return e}(0,((n=i(97718))&&n.__esModule?n:{default:n}).default)()&&(0,o.setPublicElementWrapper)(a)},52425:function(e,t,i){var n=a(i(10561)),o=i(74663);function a(e){return e&&e.__esModule?e:{default:e}}(0,a(i(97718)).default)()&&(0,o.setDataStrategy)(n.default)},27465:function(e,t,i){var n=l(i(10561)),o=l(i(92774)),a=l(i(97718)),s=l(i(85030)),r=l(i(64960));function l(e){return e&&e.__esModule?e:{default:e}}(0,a.default)()&&(s.default.add((function(e,t){n.default.event.special[e]=t})),o.default.passiveEventHandlersSupported()&&o.default.forcePassiveFalseEventNames.forEach((function(e){n.default.event.special[e]={setup:function(t,i,n){r.default.listen(this,e,n,{passive:!1})}}})),o.default.set({on:function(e){(0,n.default)(e).on.apply((0,n.default)(e),Array.prototype.slice.call(arguments,1))},one:function(e){(0,n.default)(e).one.apply((0,n.default)(e),Array.prototype.slice.call(arguments,1))},off:function(e){(0,n.default)(e).off.apply((0,n.default)(e),Array.prototype.slice.call(arguments,1))},trigger:function(e){(0,n.default)(e).trigger.apply((0,n.default)(e),Array.prototype.slice.call(arguments,1))},triggerHandler:function(e){(0,n.default)(e).triggerHandler.apply((0,n.default)(e),Array.prototype.slice.call(arguments,1))},Event:n.default.Event}))},29953:function(e,t,i){var n=s(i(10561)),o=i(88737),a=s(i(3122));function s(e){return e&&e.__esModule?e:{default:e}}if(n.default&&!o.themeReadyCallback.fired()){const e=n.default.holdReady||n.default.fn.holdReady;e(!0),o.themeReadyCallback.add((function(){a.default.add((function(){e(!1)}))}))}},76054:function(e,t,i){var n=c(i(10561)),o=c(i(97718)),a=i(20142),s=i(21274),r=i(11528),l=i(98834),d=c(i(15273)),u=c(i(65462));function c(e){return e&&e.__esModule?e:{default:e}}if((0,o.default)())if((0,a.compare)(n.default.fn.jquery,[3])<0){const e={2:"touch",3:"pen",4:"mouse"};(0,s.each)(["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCancel","MSPointerOver","MSPointerOut","mouseenter","mouseleave","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","pointerenter","pointerleave"],(function(){n.default.event.fixHooks[this]={filter:function(t,i){const n=i.pointerType;return(0,r.isNumeric)(n)&&(t.pointerType=e[n]),t},props:n.default.event.mouseHooks.props.concat(["pointerId","pointerType","originalTarget","width","height","pressure","result","tiltX","charCode","tiltY","detail","isPrimary","prevValue"])}})),(0,s.each)(["touchstart","touchmove","touchend","touchcancel"],(function(){n.default.event.fixHooks[this]={filter:function(e,t){return(0,u.default)((function(i,n){e[i]=n(t)})),e},props:n.default.event.mouseHooks.props.concat(["touches","changedTouches","targetTouches","detail","result","originalTarget","charCode","prevValue"])}})),n.default.event.fixHooks.wheel=n.default.event.mouseHooks;const t={props:n.default.event.mouseHooks.props.concat(["pointerType","pointerId","pointers"])};d.default.callbacks.add((function(e){n.default.event.fixHooks[e]=t}));const i=function(e,t){const i=n.default.event.fixHooks[t.type]||n.default.event.mouseHooks,o=i.props?n.default.event.props.concat(i.props):n.default.event.props;let a=o.length;for(;a--;){const i=o[a];e[i]=t[i]}return i.filter?i.filter(e,t):e};(0,l.setEventFixMethod)(i)}else(0,u.default)((function(e,t){n.default.event.addProp(e,t)}))},44603:function(e,t,i){var n=a(i(10561)),o=a(i(21681));function a(e){return e&&e.__esModule?e:{default:e}}(0,a(i(97718)).default)()&&o.default.set(n.default)},97718:function(e,t,i){t.default=function(){return n.default&&(0,o.default)().useJQuery};var n=a(i(10561)),o=a(i(66636));function a(e){return e&&e.__esModule?e:{default:e}}const s=(0,o.default)().useJQuery;n.default&&!1!==s&&(0,o.default)({useJQuery:!0}),e.exports=t.default,e.exports.default=t.default},34563:function(e,t,i){var n=s(i(78117)),o=s(i(87129)),a=i(20142);function s(e){return e&&e.__esModule?e:{default:e}}if(i(90340),i(74899),i(38382),i(86281),i(71592),i(12420),i(41262),n.default&&(0,a.compare)(n.default.version,[2,3])<0)throw o.default.Error("E0013")},12420:function(e,t,i){var n,o=i(74663),a=(n=i(78117))&&n.__esModule?n:{default:n},s=i(20142),r=i(43941);if(a.default){const e=a.default.utils.domNodeDisposal.cleanExternalData,t=function(){(0,o.afterCleanData)((function(){})),a.default.utils.domNodeDisposal.cleanExternalData=e};(function(){(0,o.afterCleanData)((function(e){let t;for(t=0;t<e.length;t++)e[t].cleanedByJquery=!0;for(t=0;t<e.length;t++)e[t].cleanedByKo||a.default.cleanNode(e[t]),delete e[t].cleanedByKo;for(t=0;t<e.length;t++)delete e[t].cleanedByJquery})),a.default.utils.domNodeDisposal.cleanExternalData=function(e){e.cleanedByKo=!0,(0,r.getClosestNodeWithKoCreation)(e)&&(e.cleanedByJquery||(0,o.cleanData)([e]))}})(),o.strategyChanging.add((function(e){!!e.fn&&(0,s.compare)(e.fn.jquery,[2,0])<0&&t()}))}},41262:function(e,t,i){var n,o=(n=i(78117))&&n.__esModule?n:{default:n},a=i(20142),s=i(74663);if(o.default){const e=function(e){const t=function(e,t){const i=function(){o.default.cleanNode(this)};t?e.each(i):e.find("*").each(i)},i=e.fn.empty;e.fn.empty=function(){return t(this,!1),i.apply(this,arguments)};const n=e.fn.remove;e.fn.remove=function(e,i){if(!i){let i=this;e&&(i=i.filter(e)),t(i,!0)}return n.call(this,e,i)};const a=e.fn.html;e.fn.html=function(e){return"string"==typeof e&&t(this,!1),a.apply(this,arguments)};const s=e.fn.replaceWith;e.fn.replaceWith=function(){const e=s.apply(this,arguments);return this.parent().length||t(this,!0),e}};s.strategyChanging.add((function(t){!!t.fn&&(0,a.compare)(t.fn.jquery,[2,0])<0&&e(t)}))}},90340:function(e,t,i){var n=v(i(64553)),o=v(i(78117)),a=v(i(84718)),s=i(11528),r=v(i(55771)),l=v(i(11118)),d=v(i(34506)),u=i(34993),c=v(i(5298)),h=v(i(91374)),p=i(36332),g=v(i(78694)),_=v(i(50512)),f=i(43941),m=v(i(66636));function v(e){return e&&e.__esModule?e:{default:e}}if(o.default){const e="dxKoLocks",t="dxKoCreation",i=[],v=function(r,v){g.default.isEditor(v.prototype)&&i.push(r),o.default.bindingHandlers[r]={init:function(i,r){const g=(0,n.default)(i),C=(0,a.default)();let y,b={};const x=(0,m.default)().knockout,w=x&&x.isBindingPropertyPredicateName;let S,D={onInitializing:function(e){b=this._getOptionsByReference(),o.default.computed((()=>{const t=o.default.unwrap(r());var i;(y&&y.beginUpdate(),S=w&&t&&t[w],O(t),y)?y.endUpdate():null==t||null===(i=t.onInitializing)||void 0===i||i.call(this,e)}),null,{disposeWhenNodeIsRemoved:i}),y=this},modelByElement:function(e){if(e.length){const t=(0,f.getClosestNodeWithContext)(e.get(0));return o.default.dataFor(t)}},nestedComponentOptions:function(e){return{modelByElement:e.option("modelByElement"),nestedComponentOptions:e.option("nestedComponentOptions")}},_optionChangedCallbacks:C,integrationOptions:{watchMethod:function(e,t,i){let n=(i=i||{}).skipImmediate;const a=o.default.computed((function(){const i=o.default.unwrap(e());n||t(i),n=!1}));return function(){a.dispose()}},templates:{"dx-polymorph-widget":{render:function(e){const t=o.default.utils.unwrapObservable(e.model.widget);if(!t)return;const i=(0,n.default)("<div>").attr("data-bind",t+": options").get(0);(0,n.default)(e.container).append(i),o.default.applyBindings(e.model,i)}}},createTemplate:function(e){return new p.KoTemplate(e)}}};const I={},E=function(t,i,n){const a=g.data(e),s=n?o.default.unwrap(i):i;if(o.default.isWriteableObservable(i)&&(I[t]=i),y){if(a.locked(t))return;a.obtain(t);try{o.default.ignoreDependencies?o.default.ignoreDependencies(y.option,y,[t,s]):y.option(t,s)}finally{a.release(t)}}else D[t]=s},T=function(t){const i=t.fullName,n=t.value;if(!(i in I))return;const o=this._$element.data(e);if(!o.locked(i)){o.obtain(i);try{I[i](n)}finally{o.release(i)}}},A=function(e,t,n){if(n!==w)if(!S||S(n,t,e)){let a;o.default.computed((function(){const i=e[t];E(n,i,!0),a=o.default.unwrap(i)}),null,{disposeWhenNodeIsRemoved:i}),(0,s.isPlainObject)(a)&&(b[n]||O(a,n))}else E(n,e[t],!1)};function O(e,t){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&A(e,i,t?[t,i].join("."):i)}return C.add(T),g.data(t,!0).data(e,new _.default),new v(g,D),D=null,{controlsDescendantBindings:v.subclassOf(l.default)||v.subclassOf(d.default)||v.subclassOf(u.ComponentWrapper)&&!(y instanceof h.default)||y instanceof c.default}}},"dxValidator"===r&&(o.default.bindingHandlers.dxValidator.after=i)};r.default.add((function(e,t){v(e,t)}))}},38382:function(e,t,i){var n,o=(n=i(78117))&&n.__esModule?n:{default:n},a=i(69629);o.default&&(o.default.bindingHandlers.dxControlsDescendantBindings={init:function(e,t){return{controlsDescendantBindings:o.default.unwrap(t())}}},o.default.bindingHandlers.dxIcon={init:function(e,t){const i=o.default.utils.unwrapObservable(t())||{},n=(0,a.getImageContainer)(i);o.default.virtualElements.emptyNode(e),n&&o.default.virtualElements.prepend(e,n.get(0))},update:function(e,t){const i=o.default.utils.unwrapObservable(t())||{},n=(0,a.getImageContainer)(i);o.default.virtualElements.emptyNode(e),n&&o.default.virtualElements.prepend(e,n.get(0))}},o.default.virtualElements.allowedBindings.dxIcon=!0)},74899:function(e,t,i){var n=d(i(64553)),o=d(i(92774)),a=d(i(78117)),s=i(11528),r=d(i(85030)),l=i(98834);function d(e){return e&&e.__esModule?e:{default:e}}a.default&&r.default.add((function(e){const t=(0,l.addNamespace)(e,e+"Binding");a.default.bindingHandlers[e]={update:function(e,i,r,l){const d=(0,n.default)(e),u=a.default.utils.unwrapObservable(i()),c=u.execute?u.execute:u;o.default.off(d,t),o.default.on(d,t,(0,s.isPlainObject)(u)?u:{},(function(e){c.call(l,l,e)}))}}}))},36332:function(e,t,i){t.KoTemplate=void 0;var n=u(i(64553)),o=u(i(64960)),a=u(i(78117)),s=i(11528),r=i(42186),l=i(86858),d=i(43941);function u(e){return e&&e.__esModule?e:{default:e}}const c=class extends r.TemplateBase{constructor(e){super(),this._element=e,this._template=(0,n.default)("<div>").append((0,l.normalizeTemplateElement)(e)),this._registerKoTemplate()}_registerKoTemplate(){const e=this._template.get(0);new a.default.templateSources.anonymousTemplate(e).nodes(e)}_prepareDataForContainer(e,t){if(t&&t.length){const i=(0,d.getClosestNodeWithContext)(t.get(0)),n=a.default.contextFor(i);if(e=void 0!==e?e:a.default.dataFor(i)||{},n)return e===n.$data?n:n.createChildContext(e)}return function(e){const t=o.default.createElement("div");a.default.applyBindingsToNode(t,null,e);const i=a.default.contextFor(t);return a.default.cleanNode(t),i}(e).createChildContext(e)}_renderCore(e){const t=this._prepareDataForContainer(e.model,(0,n.default)(e.container));(0,s.isDefined)(e.index)&&(t.$index=e.index);const i=(0,n.default)("<div>").appendTo(e.container);let o;return a.default.renderTemplate(this._template.get(0),t,{afterRender:function(e){o=(0,n.default)(e)}},i.get(0),"replaceNode"),o}source(){return(0,n.default)(this._element).clone()}dispose(){this._template.remove()}};t.KoTemplate=c},43941:function(e,t,i){t.getClosestNodeWithKoCreation=t.getClosestNodeWithContext=void 0;var n=a(i(78117)),o=a(i(64553));function a(e){return e&&e.__esModule?e:{default:e}}const s=e=>!n.default.contextFor(e)&&e.parentNode?s(e.parentNode):e;t.getClosestNodeWithContext=s;const r=e=>{const t=(0,o.default)(e).data();return t&&t.dxKoCreation?e:e.parentNode?r(e.parentNode):null};t.getClosestNodeWithKoCreation=r},86281:function(e,t,i){var n=i(21274),o=i(52576),a=c(i(55620)),s=i(2607),r=c(i(19391)),l=i(87739),d=c(i(19427)),u=c(i(78117));function c(e){return e&&e.__esModule?e:{default:e}}if(u.default){const e="valid",t="pending",i=a.default.inherit({ctor(t,i){let{name:a,validationRules:r}=i;this.target=t,this.name=a,this.isValid=u.default.observable(!0),this.validationError=u.default.observable(),this.validationErrors=u.default.observable(),this.validationStatus=u.default.observable(e),this._eventsStrategy=new s.EventsStrategy(this),this.validationRules=(0,n.map)(r,((e,t)=>(0,o.extend)({},e,{validator:this,index:t}))),this._validationInfo={result:null,deferred:null}},_updateValidationResult(e){if(this._validationInfo.result&&this._validationInfo.result.id===e.id)for(const t in e)"id"!==t&&"complete"!==t&&(this._validationInfo.result[t]=e[t]);else{const t=this._validationInfo.deferred&&this._validationInfo.result.complete;this._validationInfo.result=(0,o.extend)({},e,{complete:t})}},validate(){const e=this._validationInfo&&this._validationInfo.result,i=this.target();if(e&&e.status===t&&e.value===i)return(0,o.extend)({},e);const n=r.default.validate(i,this.validationRules,this.name);return n.id=(new d.default).toString(),this._applyValidationResult(n),n.complete&&n.complete.then((e=>{e.id===this._validationInfo.result.id&&this._applyValidationResult(e)})),(0,o.extend)({},this._validationInfo.result)},reset(){this.target(null);const t={id:null,isValid:!0,brokenRule:null,pendingRules:null,status:e,complete:null};return this._applyValidationResult(t),t},_applyValidationResult(e){if(e.validator=this,this._updateValidationResult(e),this.target.dxValidator.isValid(this._validationInfo.result.isValid),this.target.dxValidator.validationError(this._validationInfo.result.brokenRule),this.target.dxValidator.validationErrors(this._validationInfo.result.brokenRules),this.target.dxValidator.validationStatus(this._validationInfo.result.status),e.status===t)return this._validationInfo.deferred||(this._validationInfo.deferred=new l.Deferred,this._validationInfo.result.complete=this._validationInfo.deferred.promise()),void this._eventsStrategy.fireEvent("validating",[this._validationInfo.result]);e.status!==t&&(this._eventsStrategy.fireEvent("validated",[e]),this._validationInfo.deferred&&(this._validationInfo.deferred.resolve(e),this._validationInfo.deferred=null))},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}});u.default.extenders.dxValidator=function(e,t){return e.dxValidator=new i(e,t),e.subscribe(e.dxValidator.validate.bind(e.dxValidator)),e},r.default.registerModelForValidation=function(e){(0,n.each)(e,(function(t,i){u.default.isObservable(i)&&i.dxValidator&&r.default.registerValidatorInGroup(e,i.dxValidator)}))},r.default.unregisterModelForValidation=function(e){(0,n.each)(e,(function(t,i){u.default.isObservable(i)&&i.dxValidator&&r.default.removeRegisteredValidator(e,i.dxValidator)}))},r.default.validateModel=r.default.validateGroup}},71592:function(e,t,i){var n=a(i(78117)),o=a(i(40216));function a(e){return e&&e.__esModule?e:{default:e}}n.default&&o.default.inject({isWrapped:n.default.isObservable,isWritableWrapped:n.default.isWritableObservable,wrap:n.default.observable,unwrap:function(e){return n.default.isObservable(e)?n.default.utils.unwrapObservable(e):this.callBase(e)},assign:function(e,t){n.default.isObservable(e)?e(t):this.callBase(e,t)}})},49077:function(e,t,i){Object.defineProperty(t,"formatDate",{enumerable:!0,get:function(){return n.formatDate}}),Object.defineProperty(t,"formatMessage",{enumerable:!0,get:function(){return n.formatMessage}}),Object.defineProperty(t,"formatNumber",{enumerable:!0,get:function(){return n.formatNumber}}),Object.defineProperty(t,"loadMessages",{enumerable:!0,get:function(){return n.loadMessages}}),Object.defineProperty(t,"locale",{enumerable:!0,get:function(){return n.locale}}),Object.defineProperty(t,"parseDate",{enumerable:!0,get:function(){return n.parseDate}}),Object.defineProperty(t,"parseNumber",{enumerable:!0,get:function(){return n.parseNumber}});var n=i(46795)},16615:function(e,t,i){i(23805)},89207:function(e,t,i){i(869)},94348:function(e,t,i){i(99862)},30725:function(e,t,i){i(84207)},36069:function(e,t,i){i(13203)},90270:function(e,t,i){t.default=void 0;var n=i(63705);t.default=n.hideTopOverlay;e.exports=t.default,e.exports.default=t.default},21113:function(e,t,i){t.default=void 0;var n=i(63705);t.default=n.initMobileViewport;e.exports=t.default,e.exports.default=t.default},72134:function(e,t,i){Object.defineProperty(t,"exportDataGrid",{enumerable:!0,get:function(){return n.exportDataGrid}}),Object.defineProperty(t,"exportDataGridWithAutoTable",{enumerable:!0,get:function(){return o.exportDataGrid}}),Object.defineProperty(t,"exportGantt",{enumerable:!0,get:function(){return n.exportGantt}});var n=i(92731),o=i(89222)},53200:function(e,t,i){Object.defineProperty(t,"getTimeZones",{enumerable:!0,get:function(){return n.getTimeZones}});var n=i(63705)},30543:function(e,t,i){t.default=void 0;var n,o=(n=i(55797))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},45263:function(e,t,i){t.default=void 0;var n,o=(n=i(70557))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},93485:function(e,t,i){t.default=void 0;var n,o=(n=i(71795))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},91204:function(e,t,i){t.default=void 0;var n,o=(n=i(30434))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},64973:function(e,t,i){t.default=void 0;var n,o=(n=i(74660))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},17809:function(e,t,i){t.default=void 0;var n,o=(n=i(14111))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},22195:function(e,t,i){t.default=void 0;var n,o=(n=i(82110))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},73571:function(e,t,i){t.default=void 0;var n,o=(n=i(61454))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},94319:function(e,t,i){t.default=void 0;var n,o=(n=i(50758))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},33975:function(e,t,i){t.default=void 0;var n,o=(n=i(88575))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},62226:function(e,t,i){t.default=void 0;var n,o=(n=i(18602))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},7607:function(e,t,i){t.default=void 0;var n,o=(n=i(3391))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},55213:function(e,t,i){t.default=void 0;var n,o=(n=i(68005))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},87928:function(e,t,i){t.default=void 0;var n,o=(n=i(26988))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},34378:function(e,t,i){t.default=void 0;var n,o=(n=i(66900))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},4920:function(e,t,i){t.default=void 0;var n=o(i(89398));o(i(35299));function o(e){return e&&e.__esModule?e:{default:e}}t.default=n.default;e.exports=t.default,e.exports.default=t.default},2739:function(e,t,i){t.default=void 0;var n,o=(n=i(92782))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},45453:function(e,t,i){t.default=void 0;var n,o=(n=i(61238))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},41302:function(e,t,i){t.default=void 0;var n,o=(n=i(27932))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},87632:function(e,t,i){t.default=void 0;var n,o=(n=i(14006))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},35629:function(e,t,i){t.default=void 0;var n=i(11744);t.default=class{constructor(e){const{EventDispatcher:t}=(0,n.getDiagram)();this.onChanged=new t,this._owner=e}raiseBarCommandExecuted(e,t){this.onChanged.raise("notifyBarCommandExecuted",parseInt(e),t)}getCommandKeys(){throw"Not Implemented"}setItemValue(e,t){}setItemEnabled(e,t){}setItemVisible(e,t){}setEnabled(e){}setItemSubItems(e,t){}isVisible(){return!0}_getKeys(e){return e.reduce(((e,t)=>(void 0!==t.command&&e.push(t.command),t.items&&(e=e.concat(this._getKeys(t.items))),e)),[])}};e.exports=t.default,e.exports.default=t.default},43304:function(e,t,i){t.default=void 0;var n,o=i(11744),a=i(34924),s=i(11528),r=i(3104),l=i(52576),d=(n=i(4671))&&n.__esModule?n:{default:n};const u="separator",c={widget:u},h="dx-diagram-sm-edit-item",p="dx-diagram-md-edit-item",g="dx-diagram-lg-edit-item",_="dx-diagram-image-dropdown-item",f="dx-diagram-color-edit-item",m="dx-diagram-lg-icon-item",v={SHOW_TOOLBOX_COMMAND_NAME:"toolbox",SHOW_PROPERTIES_PANEL_COMMAND_NAME:"propertiesPanel",getAllCommands:function(){const{DiagramCommand:e}=(0,o.getDiagram)();return this._allCommands||(this._allCommands={separator:c,exportSvg:{command:e.ExportSvg,text:d.default.format("dxDiagram-commandExportToSvg"),getParameter:e=>t=>this._exportTo(e,t,"SVG","image/svg+xml")},exportPng:{command:e.ExportPng,text:d.default.format("dxDiagram-commandExportToPng"),getParameter:e=>t=>this._exportTo(e,t,"PNG","image/png")},exportJpg:{command:e.ExportJpg,text:d.default.format("dxDiagram-commandExportToJpg"),getParameter:e=>t=>this._exportTo(e,t,"JPEG","image/jpeg")},undo:{command:e.Undo,hint:d.default.format("dxDiagram-commandUndo"),text:d.default.format("dxDiagram-commandUndo"),icon:"undo",menuIcon:"undo"},redo:{command:e.Redo,hint:d.default.format("dxDiagram-commandRedo"),text:d.default.format("dxDiagram-commandRedo"),icon:"redo",menuIcon:"redo"},cut:{command:e.Cut,hint:d.default.format("dxDiagram-commandCut"),text:d.default.format("dxDiagram-commandCut"),icon:"cut",menuIcon:"cut"},copy:{command:e.Copy,hint:d.default.format("dxDiagram-commandCopy"),text:d.default.format("dxDiagram-commandCopy"),icon:"copy",menuIcon:"copy"},paste:{command:e.PasteInPosition,hint:d.default.format("dxDiagram-commandPaste"),text:d.default.format("dxDiagram-commandPaste"),icon:"paste",menuIcon:"paste"},selectAll:{command:e.SelectAll,hint:d.default.format("dxDiagram-commandSelectAll"),text:d.default.format("dxDiagram-commandSelectAll"),icon:"dx-diagram-i-button-select-all dx-diagram-i",menuIcon:"dx-diagram-i-menu-select-all dx-diagram-i"},delete:{command:e.Delete,hint:d.default.format("dxDiagram-commandDelete"),text:d.default.format("dxDiagram-commandDelete"),icon:"remove",menuIcon:"remove"},fontName:{command:e.FontName,hint:d.default.format("dxDiagram-commandFontName"),text:d.default.format("dxDiagram-commandFontName"),widget:"dxSelectBox",items:["Arial","Arial Black","Helvetica","Times New Roman","Courier New","Courier","Verdana","Georgia","Comic Sans MS","Trebuchet MS"].map((e=>({text:e,value:e}))),cssClass:p},fontSize:{command:e.FontSize,hint:d.default.format("dxDiagram-commandFontSize"),text:d.default.format("dxDiagram-commandFontSize"),widget:"dxSelectBox",items:[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72].map((e=>({text:e+"pt",value:e+"pt"}))),cssClass:h},bold:{command:e.Bold,hint:d.default.format("dxDiagram-commandBold"),text:d.default.format("dxDiagram-commandBold"),icon:"bold",menuIcon:"bold"},italic:{command:e.Italic,hint:d.default.format("dxDiagram-commandItalic"),text:d.default.format("dxDiagram-commandItalic"),icon:"italic",menuIcon:"italic"},underline:{command:e.Underline,hint:d.default.format("dxDiagram-commandUnderline"),text:d.default.format("dxDiagram-commandUnderline"),icon:"underline",menuIcon:"underline"},fontColor:{command:e.FontColor,text:d.default.format("dxDiagram-commandTextColor"),hint:d.default.format("dxDiagram-commandTextColor"),widget:"dxColorBox",icon:"dx-icon dx-icon-color",menuIcon:"dx-icon dx-icon-color",cssClass:f},lineColor:{command:e.StrokeColor,text:d.default.format("dxDiagram-commandLineColor"),hint:d.default.format("dxDiagram-commandLineColor"),widget:"dxColorBox",icon:"dx-icon dx-icon-background",menuIcon:"dx-icon dx-icon-background",cssClass:f},lineWidth:{command:e.StrokeWidth,text:d.default.format("dxDiagram-commandLineWidth"),hint:d.default.format("dxDiagram-commandLineWidth"),widget:"dxSelectBox",items:[1,2,3,4,5,6,7,8].map((e=>({text:e+"px",value:e.toString()}))),cssClass:h},lineStyle:{command:e.StrokeStyle,text:d.default.format("dxDiagram-commandLineStyle"),hint:d.default.format("dxDiagram-commandLineStyle"),widget:"dxSelectBox",items:[{value:"",menuIcon:"dx-diagram-i-line-solid dx-diagram-i",hint:d.default.format("dxDiagram-commandLineStyleSolid")},{value:"2,2",menuIcon:"dx-diagram-i-line-dotted dx-diagram-i",hint:d.default.format("dxDiagram-commandLineStyleDotted")},{value:"6,2",menuIcon:"dx-diagram-i-line-dashed dx-diagram-i",hint:d.default.format("dxDiagram-commandLineStyleDashed")}],cssClass:_},fillColor:{command:e.FillColor,text:d.default.format("dxDiagram-commandFillColor"),hint:d.default.format("dxDiagram-commandFillColor"),widget:"dxColorBox",icon:"dx-diagram-i dx-diagram-i-button-fill",menuIcon:"dx-diagram-i dx-diagram-i-menu-fill",cssClass:f},textAlignLeft:{command:e.TextLeftAlign,hint:d.default.format("dxDiagram-commandAlignLeft"),text:d.default.format("dxDiagram-commandAlignLeft"),icon:"alignleft",menuIcon:"alignleft"},textAlignCenter:{command:e.TextCenterAlign,hint:d.default.format("dxDiagram-commandAlignCenter"),text:d.default.format("dxDiagram-commandAlignCenter"),icon:"aligncenter",menuIcon:"aligncenter"},textAlignRight:{command:e.TextRightAlign,hint:d.default.format("dxDiagram-commandAlignRight"),text:d.default.format("dxDiagram-commandAlignRight"),icon:"alignright",menuIcon:"alignright"},lock:{command:e.Lock,hint:d.default.format("dxDiagram-commandLock"),text:d.default.format("dxDiagram-commandLock"),icon:"dx-diagram-i-button-lock dx-diagram-i",menuIcon:"dx-diagram-i-menu-lock dx-diagram-i"},unlock:{command:e.Unlock,hint:d.default.format("dxDiagram-commandUnlock"),text:d.default.format("dxDiagram-commandUnlock"),icon:"dx-diagram-i-button-unlock dx-diagram-i",menuIcon:"dx-diagram-i-menu-unlock dx-diagram-i"},bringToFront:{command:e.BringToFront,hint:d.default.format("dxDiagram-commandBringToFront"),text:d.default.format("dxDiagram-commandBringToFront"),icon:"dx-diagram-i-button-bring-to-front dx-diagram-i",menuIcon:"dx-diagram-i-menu-bring-to-front dx-diagram-i"},sendToBack:{command:e.SendToBack,hint:d.default.format("dxDiagram-commandSendToBack"),text:d.default.format("dxDiagram-commandSendToBack"),icon:"dx-diagram-i-button-send-to-back dx-diagram-i",menuIcon:"dx-diagram-i-menu-send-to-back dx-diagram-i"},insertShapeImage:{command:e.InsertShapeImage,text:d.default.format("dxDiagram-commandInsertShapeImage"),icon:"dx-diagram-i-button-image-insert dx-diagram-i",menuIcon:"dx-diagram-i-menu-image-insert dx-diagram-i"},editShapeImage:{command:e.EditShapeImage,text:d.default.format("dxDiagram-commandEditShapeImage"),icon:"dx-diagram-i-button-image-edit dx-diagram-i",menuIcon:"dx-diagram-i-menu-image-edit dx-diagram-i"},deleteShapeImage:{command:e.DeleteShapeImage,text:d.default.format("dxDiagram-commandDeleteShapeImage"),icon:"dx-diagram-i-button-image-delete dx-diagram-i",menuIcon:"dx-diagram-i-menu-image-delete dx-diagram-i"},connectorLineType:{command:e.ConnectorLineOption,widget:"dxSelectBox",hint:d.default.format("dxDiagram-commandConnectorLineType"),text:d.default.format("dxDiagram-commandConnectorLineType"),items:[{value:0,menuIcon:"dx-diagram-i-connector-straight dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineStraight"),text:d.default.format("dxDiagram-commandConnectorLineStraight")},{value:1,menuIcon:"dx-diagram-i-connector-orthogonal dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineOrthogonal"),text:d.default.format("dxDiagram-commandConnectorLineOrthogonal")}],cssClass:_},connectorLineStart:{command:e.ConnectorStartLineEnding,widget:"dxSelectBox",items:[{value:0,menuIcon:"dx-diagram-i-connector-begin-none dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineNone"),text:d.default.format("dxDiagram-commandConnectorLineNone")},{value:1,menuIcon:"dx-diagram-i-connector-begin-arrow dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineArrow"),text:d.default.format("dxDiagram-commandConnectorLineArrow")},{value:2,menuIcon:"dx-diagram-i-connector-begin-outlined-triangle dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineArrow"),text:d.default.format("dxDiagram-commandConnectorLineArrow")},{value:3,menuIcon:"dx-diagram-i-connector-begin-filled-triangle dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineArrow"),text:d.default.format("dxDiagram-commandConnectorLineArrow")}],hint:d.default.format("dxDiagram-commandConnectorLineStart"),text:d.default.format("dxDiagram-commandConnectorLineStart"),cssClass:_},connectorLineEnd:{command:e.ConnectorEndLineEnding,widget:"dxSelectBox",items:[{value:0,menuIcon:"dx-diagram-i-connector-end-none dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineNone"),text:d.default.format("dxDiagram-commandConnectorLineNone")},{value:1,menuIcon:"dx-diagram-i-connector-end-arrow dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineArrow"),text:d.default.format("dxDiagram-commandConnectorLineArrow")},{value:2,menuIcon:"dx-diagram-i-connector-end-outlined-triangle dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineArrow"),text:d.default.format("dxDiagram-commandConnectorLineArrow")},{value:3,menuIcon:"dx-diagram-i-connector-end-filled-triangle dx-diagram-i",hint:d.default.format("dxDiagram-commandConnectorLineArrow"),text:d.default.format("dxDiagram-commandConnectorLineArrow")}],hint:d.default.format("dxDiagram-commandConnectorLineEnd"),text:d.default.format("dxDiagram-commandConnectorLineEnd"),cssClass:_},layoutTreeTopToBottom:{command:e.AutoLayoutTreeVertical,text:d.default.format("dxDiagram-commandLayoutTopToBottom"),hint:d.default.format("dxDiagram-commandLayoutTopToBottom"),icon:"dx-diagram-i-button-layout-tree-tb dx-diagram-i",cssClass:m},layoutTreeBottomToTop:{command:e.AutoLayoutTreeVerticalBottomToTop,text:d.default.format("dxDiagram-commandLayoutBottomToTop"),hint:d.default.format("dxDiagram-commandLayoutBottomToTop"),icon:"dx-diagram-i-button-layout-tree-bt dx-diagram-i",cssClass:m},layoutTreeLeftToRight:{command:e.AutoLayoutTreeHorizontal,text:d.default.format("dxDiagram-commandLayoutLeftToRight"),hint:d.default.format("dxDiagram-commandLayoutLeftToRight"),icon:"dx-diagram-i-button-layout-tree-lr dx-diagram-i",cssClass:m},layoutTreeRightToLeft:{command:e.AutoLayoutTreeHorizontalRightToLeft,text:d.default.format("dxDiagram-commandLayoutRightToLeft"),hint:d.default.format("dxDiagram-commandLayoutRightToLeft"),icon:"dx-diagram-i-button-layout-tree-rl dx-diagram-i",cssClass:m},layoutLayeredTopToBottom:{command:e.AutoLayoutLayeredVertical,text:d.default.format("dxDiagram-commandLayoutTopToBottom"),hint:d.default.format("dxDiagram-commandLayoutTopToBottom"),icon:"dx-diagram-i-button-layout-layered-tb dx-diagram-i",cssClass:m},layoutLayeredBottomToTop:{command:e.AutoLayoutLayeredVerticalBottomToTop,text:d.default.format("dxDiagram-commandLayoutBottomToTop"),hint:d.default.format("dxDiagram-commandLayoutBottomToTop"),icon:"dx-diagram-i-button-layout-layered-bt dx-diagram-i",cssClass:m},layoutLayeredLeftToRight:{command:e.AutoLayoutLayeredHorizontal,text:d.default.format("dxDiagram-commandLayoutLeftToRight"),hint:d.default.format("dxDiagram-commandLayoutLeftToRight"),icon:"dx-diagram-i-button-layout-layered-lr dx-diagram-i",cssClass:m},layoutLayeredRightToLeft:{command:e.AutoLayoutLayeredHorizontalRightToLeft,text:d.default.format("dxDiagram-commandLayoutRightToLeft"),hint:d.default.format("dxDiagram-commandLayoutRightToLeft"),icon:"dx-diagram-i-button-layout-layered-rl dx-diagram-i",cssClass:m},fullScreen:{command:e.Fullscreen,hint:d.default.format("dxDiagram-commandFullscreen"),text:d.default.format("dxDiagram-commandFullscreen"),icon:"dx-diagram-i dx-diagram-i-button-fullscreen",menuIcon:"dx-diagram-i dx-diagram-i-menu-fullscreen",cssClass:f},units:{command:e.ViewUnits,hint:d.default.format("dxDiagram-commandUnits"),text:d.default.format("dxDiagram-commandUnits"),widget:"dxSelectBox"},simpleView:{command:e.ToggleSimpleView,hint:d.default.format("dxDiagram-commandSimpleView"),text:d.default.format("dxDiagram-commandSimpleView"),widget:"dxCheckBox"},showGrid:{command:e.ShowGrid,hint:d.default.format("dxDiagram-commandShowGrid"),text:d.default.format("dxDiagram-commandShowGrid"),widget:"dxCheckBox"},snapToGrid:{command:e.SnapToGrid,hint:d.default.format("dxDiagram-commandSnapToGrid"),text:d.default.format("dxDiagram-commandSnapToGrid"),widget:"dxCheckBox"},gridSize:{command:e.GridSize,hint:d.default.format("dxDiagram-commandGridSize"),text:d.default.format("dxDiagram-commandGridSize"),widget:"dxSelectBox"},pageSize:{command:e.PageSize,hint:d.default.format("dxDiagram-commandPageSize"),text:d.default.format("dxDiagram-commandPageSize"),widget:"dxSelectBox",cssClass:g,getCommandValue:e=>JSON.parse(e),getEditorValue:e=>JSON.stringify(e)},pageOrientation:{command:e.PageLandscape,hint:d.default.format("dxDiagram-commandPageOrientation"),text:d.default.format("dxDiagram-commandPageOrientation"),widget:"dxSelectBox",items:[{value:!0,text:d.default.format("dxDiagram-commandPageOrientationLandscape")},{value:!1,text:d.default.format("dxDiagram-commandPageOrientationPortrait")}],cssClass:p},pageColor:{command:e.PageColor,hint:d.default.format("dxDiagram-commandPageColor"),text:d.default.format("dxDiagram-commandPageColor"),widget:"dxColorBox",icon:"dx-diagram-i dx-diagram-i-button-fill",menuIcon:"dx-diagram-i dx-diagram-i-menu-fill",cssClass:f},zoomLevel:{command:e.ZoomLevel,hint:d.default.format("dxDiagram-commandZoomLevel"),text:d.default.format("dxDiagram-commandZoomLevel"),widget:"dxTextBox",items:[c,{command:e.FitToScreen,hint:d.default.format("dxDiagram-commandFitToContent"),text:d.default.format("dxDiagram-commandFitToContent")},{command:e.FitToWidth,hint:d.default.format("dxDiagram-commandFitToWidth"),text:d.default.format("dxDiagram-commandFitToWidth")},c,{command:e.AutoZoomToContent,hint:d.default.format("dxDiagram-commandAutoZoomByContent"),text:d.default.format("dxDiagram-commandAutoZoomByContent")},{command:e.AutoZoomToWidth,hint:d.default.format("dxDiagram-commandAutoZoomByWidth"),text:d.default.format("dxDiagram-commandAutoZoomByWidth")}],getEditorDisplayValue:e=>Math.round(100*e)+"%",cssClass:h},toolbox:{command:this.SHOW_TOOLBOX_COMMAND_NAME,iconChecked:"dx-diagram-i dx-diagram-i-button-toolbox-close",iconUnchecked:"dx-diagram-i dx-diagram-i-button-toolbox-open",hint:d.default.format("dxDiagram-uiShowToolbox"),text:d.default.format("dxDiagram-uiShowToolbox")},propertiesPanel:{command:this.SHOW_PROPERTIES_PANEL_COMMAND_NAME,iconChecked:"close",iconUnchecked:"dx-diagram-i dx-diagram-i-button-properties-panel-open",hint:d.default.format("dxDiagram-uiProperties"),text:d.default.format("dxDiagram-uiProperties")}})},getMainToolbarCommands:function(e,t){const i=this.getAllCommands(),n=e?this._getPreparedCommands(i,e):this._getDefaultMainToolbarCommands(i);return this._prepareToolbarCommands(n,t)},_getDefaultMainToolbarCommands:function(e){return this._defaultMainToolbarCommands||(this._defaultMainToolbarCommands=[e.undo,e.redo,e.separator,e.fontName,e.fontSize,e.bold,e.italic,e.underline,e.separator,e.lineWidth,e.lineStyle,e.separator,e.fontColor,e.lineColor,e.fillColor,e.separator,e.textAlignLeft,e.textAlignCenter,e.textAlignRight,e.separator,e.connectorLineType,e.connectorLineStart,e.connectorLineEnd,e.separator,{text:d.default.format("dxDiagram-uiLayout"),showText:"always",items:[{text:d.default.format("dxDiagram-uiLayoutTree"),items:[e.layoutTreeTopToBottom,e.layoutTreeBottomToTop,e.layoutTreeLeftToRight,e.layoutTreeRightToLeft]},{text:d.default.format("dxDiagram-uiLayoutLayered"),items:[e.layoutLayeredTopToBottom,e.layoutLayeredBottomToTop,e.layoutLayeredLeftToRight,e.layoutLayeredRightToLeft]}]}])},getHistoryToolbarCommands:function(e,t){const i=this.getAllCommands(),n=e?this._getPreparedCommands(i,e):this._getDefaultHistoryToolbarCommands(i);return this._prepareToolbarCommands(n,t)},_getDefaultHistoryToolbarCommands:function(e){return this._defaultHistoryToolbarCommands||(this._defaultHistoryToolbarCommands=[e.undo,e.redo,e.separator,e.toolbox])},getViewToolbarCommands:function(e,t){const i=this.getAllCommands(),n=e?this._getPreparedCommands(i,e):this._getDefaultViewToolbarCommands(i);return this._prepareToolbarCommands(n,t)},_getDefaultViewToolbarCommands:function(e){return this._defaultViewToolbarCommands||(this._defaultViewToolbarCommands=[e.zoomLevel,e.separator,e.fullScreen,e.separator,{widget:"dxButton",icon:"export",text:d.default.format("dxDiagram-uiExport"),hint:d.default.format("dxDiagram-uiExport"),items:[e.exportSvg,e.exportPng,e.exportJpg]},{icon:"preferences",hint:d.default.format("dxDiagram-uiSettings"),text:d.default.format("dxDiagram-uiSettings"),items:[e.units,e.separator,e.showGrid,e.snapToGrid,e.gridSize,e.separator,e.simpleView,e.toolbox]}])},getPropertiesToolbarCommands:function(e,t){const i=this.getAllCommands(),n=e?this._getPreparedCommands(i,e):this._getDefaultPropertiesToolbarCommands(i);return this._prepareToolbarCommands(n,t)},_getDefaultPropertiesToolbarCommands:function(e){return this._defaultPropertiesToolbarCommands||(this._defaultPropertiesToolbarCommands=[e.propertiesPanel])},_getDefaultPropertyPanelCommandGroups:function(){return this._defaultPropertyPanelCommandGroups||(this._defaultPropertyPanelCommandGroups=[{title:d.default.format("dxDiagram-uiStyle"),groups:[{title:d.default.format("dxDiagram-uiText"),commands:["fontName","fontSize","bold","italic","underline","textAlignLeft","textAlignCenter","textAlignRight","fontColor"]},{title:d.default.format("dxDiagram-uiObject"),commands:["lineStyle","lineWidth","lineColor","fillColor"]},{title:d.default.format("dxDiagram-uiConnector"),commands:["connectorLineType","connectorLineStart","connectorLineEnd"]}]},{title:d.default.format("dxDiagram-uiLayout"),groups:[{title:d.default.format("dxDiagram-uiLayoutLayered"),commands:["layoutLayeredTopToBottom","layoutLayeredBottomToTop","layoutLayeredLeftToRight","layoutLayeredRightToLeft"]},{title:d.default.format("dxDiagram-uiLayoutTree"),commands:["layoutTreeTopToBottom","layoutTreeBottomToTop","layoutTreeLeftToRight","layoutTreeRightToLeft"]}]},{title:d.default.format("dxDiagram-uiDiagram"),groups:[{title:d.default.format("dxDiagram-uiPage"),commands:["pageSize","pageOrientation","pageColor"]}]}])},_preparePropertyPanelGroups:function(e){const t=this.getAllCommands(),i=[];return e.forEach((e=>{let n,o=e.commands;o&&(o=this._getPreparedCommands(t,o),o=this._prepareToolbarCommands(o)),e.groups&&(n=[],e.groups.forEach((e=>{let i=e.commands;i&&(i=this._getPreparedCommands(t,i),i=this._prepareToolbarCommands(i)),n.push({title:e.title,commands:i})}))),i.push({title:e.title,commands:o,groups:n})})),i},getPropertyPanelCommandTabs:function(e){return e=e||this._getDefaultPropertyPanelCommandGroups(),this._preparePropertyPanelGroups(e)},getContextMenuCommands:function(e){const t=this.getAllCommands(),i=e?this._getPreparedCommands(t,e):this._getDefaultContextMenuCommands(t);return this._prepareContextMenuCommands(i)},_getDefaultContextMenuCommands:function(e){return this._defaultContextMenuCommands||(this._defaultContextMenuCommands=[e.cut,e.copy,e.paste,e.delete,e.separator,e.selectAll,e.separator,e.bringToFront,e.sendToBack,e.separator,e.lock,e.unlock,e.separator,e.insertShapeImage,e.editShapeImage,e.deleteShapeImage])},_getPreparedCommands(e,t){return t.map((t=>{if(t.widget&&t.widget===u){return{command:t,location:t.location}}if(e[t])return e[t];if(t.text||t.icon||t.name){const i=t.name&&e[t.name],n={command:i&&i.command,name:t.name,location:t.location,text:t.text||i&&i.text,hint:t.text||i&&i.hint,icon:t.icon||i&&i.icon,menuIcon:t.icon||i&&i.menuIcon,widget:i&&i.widget,cssClass:i&&i.cssClass,getParameter:i&&i.getParameter,getCommandValue:i&&i.getCommandValue,getEditorValue:i&&i.getEditorValue,getEditorDisplayValue:i&&i.getEditorDisplayValue,iconChecked:i&&i.iconChecked,iconUnchecked:i&&i.iconUnchecked};return Array.isArray(t.items)?n.items=this._getPreparedCommands(e,t.items):n.items=i&&i.items,n}})).filter((e=>e))},_prepareContextMenuCommands(e,t,i){let n=!1;return e.map((e=>{if(this._isValidCommand(e,t)){if(!e.widget||e.widget!==u){const o=this._cloneCommand(e,t);return o.icon=o.menuIcon,o.beginGroup=n,o.rootCommand=o.command?void 0:i&&i.command,n=!1,o}n=!0}})).filter((e=>e))},_prepareToolbarCommands(e,t){return e.map((e=>{if(this._isValidCommand(e,t))return this._cloneCommand(e,t)})).filter((e=>e)).filter(((e,t,i)=>(e.widget!==u||t!==i.length-1)&&e))},_cloneCommand(e,t){const i=(0,l.extend)({},e);return Array.isArray(e.items)&&(i.items=this._prepareContextMenuCommands(e.items,t,i)),i},_isValidCommand:(e,t)=>-1===(t=t||[]).indexOf(e.command),_exportTo(e,t,i,n){const o=(0,r.getWindow)();if(o&&o.atob&&(0,s.isFunction)(o.Blob)){const s=this._getBlobByDataURI(o,t,n),r=e.option("export");a.fileSaver.saveAs(r.fileName||"foo",i,s)}},_getBlobByDataURI(e,t,i){const n=e.atob(t.split(",")[1]),o=new Uint8Array(n.length);for(let e=0;e<n.length;e++)o[e]=n.charCodeAt(e);return new e.Blob([o.buffer],{type:i})}};t.default=v;e.exports=t.default,e.exports.default=t.default},73360:function(e,t,i){t.default=void 0;var n,o=(n=i(88186))&&n.__esModule?n:{default:n};class a extends o.default{_getKeyExpr(){return this._diagramWidget._createOptionGetter("edges.keyExpr")}}t.default=a;e.exports=t.default,e.exports.default=t.default},11744:function(e,t,i){t.getDiagram=function(){if(!a.default)throw o.default.Error("E1041","devexpress-diagram");return s};var n,o=(n=i(35185))&&n.__esModule?n:{default:n},a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(36761)),s=a;function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}},88186:function(e,t,i){t.default=void 0;var n,o=i(52576),a=i(17863),s=(n=i(75990))&&n.__esModule?n:{default:n};const r=a.Component.inherit({}).include(s.default);t.default=class extends r{constructor(e){super(),this._diagramWidget=e,this._resetCache()}_dataSourceChangedHandler(e,t){if(this._resetCache(),this._items=e.map((e=>(0,o.extend)(!0,{},e))),this._dataSourceItems=e.slice(),t&&t.changes){const e=t.changes.filter((e=>e.internalChange)),i=t.changes.filter((e=>!e.internalChange));e.length&&this._reloadContentByChanges(e,!1),i.length&&this._reloadContentByChanges(i,!0)}else this._diagramWidget._onDataSourceChanged()}_dataSourceLoadingChangedHandler(e){e&&!this._dataSource.isLoaded()?this._diagramWidget._showLoadingIndicator():this._diagramWidget._hideLoadingIndicator()}_prepareData(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&void 0===e[t]&&(e[t]=null);return e}insert(e,t,i){this._resetCache();const n=this._getStore();n.insert(this._prepareData(e)).done(((e,i)=>{n.push([{type:"insert",key:i,data:e,internalChange:!0}]),t&&t(e),this._resetCache()})).fail((e=>{i&&i(e),this._resetCache()}))}update(e,t,i,n){const o=this._getStore(),a=this._getStoreKey(o,e,t);o.update(a,this._prepareData(t)).done(((e,t)=>{o.push([{type:"update",key:t,data:e,internalChange:!0}]),i&&i(t,e)})).fail((e=>{n&&n(e)}))}remove(e,t,i,n){this._resetCache();const o=this._getStore(),a=this._getStoreKey(o,e,t);o.remove(a).done((e=>{o.push([{type:"remove",key:e,internalChange:!0}]),i&&i(e),this._resetCache()})).fail((e=>{n&&n(e),this._resetCache()}))}findItem(e){return this._items?this._getItemByKey(e):null}getItems(){return this._items}hasItems(){return!!this._items}_reloadContentByChanges(e,t){e=e.map((e=>(0,o.extend)(e,{internalKey:this._getInternalKey(e.key)}))),this._diagramWidget._reloadContentByChanges(e,t)}_getItemByKey(e){this._ensureCache();const t=this._cache,i=this._getIndexByKey(e);return t.items[i]}_getIndexByKey(e){this._ensureCache();const t=this._cache;if("object"!=typeof e){const i=t.keySet||t.keys.reduce(((e,t,i)=>(e[t]=i,e)),{});return t.keySet||(t.keySet=i),i[e]}for(let i=0,n=t.keys.length;i<n;i++)if(t.keys[i]===e)return i;return-1}_ensureCache(){const e=this._cache;e.keys||(e.keys=[],e.items=[],this._fillCache(e,this._items))}_fillCache(e,t){if(!t||!t.length)return;const i=this._getKeyExpr();i&&t.forEach((t=>{e.keys.push(i(t)),e.items.push(t)}));const n=this._getItemsExpr();n&&t.forEach((t=>this._fillCache(e,n(t))));const o=this._getContainerChildrenExpr();o&&t.forEach((t=>this._fillCache(e,o(t))))}_getKeyExpr(){throw"Not Implemented"}_getItemsExpr(){}_getContainerChildrenExpr(){}_initDataSource(){super._initDataSource(),this._dataSource&&this._dataSource.paginate(!1)}_dataSourceOptions(){return{paginate:!1}}_getStore(){return this._dataSource&&this._dataSource.store()}_getStoreKey(e,t,i){let n=e.keyOf(i);if(n===i){const e=this._getKeyExpr();this._dataSourceItems.forEach((i=>{e(i)===t&&(n=i)}))}return n}_getInternalKey(e){if("object"==typeof e){return this._getKeyExpr()(e)}return e}_resetCache(){this._cache={}}};e.exports=t.default,e.exports.default=t.default},96221:function(e,t,i){t.default=void 0;var n,o=(n=i(88186))&&n.__esModule?n:{default:n};class a extends o.default{_getKeyExpr(){return this._diagramWidget._createOptionGetter("nodes.keyExpr")}_getItemsExpr(){return this._diagramWidget._createOptionGetter("nodes.itemsExpr")}_getContainerChildrenExpr(){return this._diagramWidget._createOptionGetter("nodes.containerChildrenExpr")}}t.default=a;e.exports=t.default,e.exports.default=t.default},79892:function(e,t,i){t.default=void 0;var n,o=(n=i(35629))&&n.__esModule?n:{default:n},a=i(11744);class s extends o.default{constructor(e){super(e);const{DiagramCommand:t}=(0,a.getDiagram)();this.commandOptions={},this.commandOptions[t.Fullscreen]="fullScreen",this.commandOptions[t.ZoomLevel]=function(e){"object"==typeof this._getOption("zoomLevel")?this._setOption("zoomLevel.value",e):this._setOption("zoomLevel",e)},this.commandOptions[t.SwitchAutoZoom]=function(e){const{AutoZoomMode:t}=(0,a.getDiagram)();switch(e){case t.FitContent:this._setOption("autoZoomMode","fitContent");break;case t.FitToWidth:this._setOption("autoZoomMode","fitWidth");break;case t.Disabled:this._setOption("autoZoomMode","disabled")}},this.commandOptions[t.ToggleSimpleView]="simpleView",this.commandOptions[t.ShowGrid]="showGrid",this.commandOptions[t.SnapToGrid]="snapToGrid",this.commandOptions[t.GridSize]=function(e){"object"==typeof this._getOption("gridSize")?this._setOption("gridSize.value",e):this._setOption("gridSize",e)},this.commandOptions[t.ViewUnits]="viewUnits",this.commandOptions[t.PageSize]=function(e){const t=this._getOption("pageSize");void 0!==t&&t.width===e.width&&t.height===e.height||this._setOption("pageSize",e)},this.commandOptions[t.PageLandscape]=function(e){this._setOption("pageOrientation",e?"landscape":"portrait")},this.commandOptions[t.ViewUnits]=function(e){const{DiagramUnit:t}=(0,a.getDiagram)();switch(e){case t.In:this._setOption("viewUnits","in");break;case t.Cm:this._setOption("viewUnits","cm");break;case t.Px:this._setOption("viewUnits","px")}},this.commandOptions[t.PageColor]="pageColor",this._updateLock=0}getCommandKeys(){return Object.keys(this.commandOptions).map((function(e){return parseInt(e)}))}setItemValue(e,t){if(!this.isUpdateLocked()){this.beginUpdate();try{"function"==typeof this.commandOptions[e]?this.commandOptions[e].call(this,t):this._setOption(this.commandOptions[e],t)}finally{this.endUpdate()}}}beginUpdate(){this._updateLock++}endUpdate(){this._updateLock--}isUpdateLocked(){return this._updateLock>0}_getOption(e){return this._owner.option(e)}_setOption(e,t){this._owner.option(e,t)}}t.default=s;e.exports=t.default,e.exports.default=t.default},74611:function(e,t,i){t.default=void 0;var n,o=(n=i(4671))&&n.__esModule?n:{default:n};const a={getDefaultGroups(){return this._groups||(this._groups={general:{category:"general",title:o.default.format("dxDiagram-categoryGeneral")},flowchart:{category:"flowchart",title:o.default.format("dxDiagram-categoryFlowchart")},orgChart:{category:"orgChart",title:o.default.format("dxDiagram-categoryOrgChart")},containers:{category:"containers",title:o.default.format("dxDiagram-categoryContainers")},custom:{category:"custom",title:o.default.format("dxDiagram-categoryCustom")}})},getGroups:function(e){const t=this.getDefaultGroups();return e?e.map((function(e){return"string"==typeof e?{category:e,title:t[e]&&t[e].title||e}:e})).filter((function(e){return e})):[t.general,t.flowchart,t.orgChart,t.containers]}};t.default=a;e.exports=t.default,e.exports.default=t.default},48941:function(e,t,i){t.default=void 0;var n=u(i(64553)),o=u(i(11118)),a=u(i(34378)),s=u(i(43304)),r=u(i(8708)),l=u(i(35629)),d=i(11744);function u(e){return e&&e.__esModule?e:{default:e}}class c extends o.default{_init(){super._init(),this._createOnVisibilityChangingAction(),this._createOnInternalCommand(),this._createOnCustomCommand(),this._createOnItemClickAction(),this._tempState=void 0,this._commands=[],this._commandToIndexMap={},this.bar=new p(this)}_initMarkup(){super._initMarkup(),this._commands=this._getCommands(),this._commandToIndexMap={},this._fillCommandToIndexMap(this._commands,[]),this._$contextMenuTargetElement=(0,n.default)("<div>").addClass("dx-diagram-touchbar-target").appendTo(this.$element());const e=(0,n.default)("<div>").appendTo(this.$element());this._contextMenuInstance=this._createComponent(e,h,{isTouchBarMode:this._isTouchBarMode(),cssClass:this._isTouchBarMode()?"dx-diagram-touchbar":r.default.getContextMenuCssClass(),hideOnOutsideClick:!1,showEvent:"",focusStateEnabled:!1,items:this._commands,position:this._isTouchBarMode()?{my:{x:"center",y:"bottom"},at:{x:"center",y:"top"},of:this._$contextMenuTargetElement}:{},itemTemplate:function(e,t,i){r.default.getContextMenuItemTemplate(this,e,t,i)},onItemClick:e=>{let{itemData:t}=e;return this._onItemClick(t)},onShowing:e=>{!0!==this._inOnShowing&&(this._inOnShowing=!0,this._onVisibilityChangingAction({visible:!0,component:this}),e.component.option("items",e.component.option("items")),delete this._inOnShowing)}})}_show(e,t,i){if(this._contextMenuInstance.hide(),this._isTouchBarMode()){this._$contextMenuTargetElement.show(),i||(i={x:e,y:t,width:0,height:0});const n=i.width>800?0:(800-i.width)/2;this._$contextMenuTargetElement.css({left:i.x-n,top:i.y-32,width:i.width+2*n,height:i.height+64}),this._contextMenuInstance.show()}else this._contextMenuInstance.option("position",{offset:e+" "+t}),this._contextMenuInstance.show()}_hide(){this._$contextMenuTargetElement.hide(),this._contextMenuInstance.hide()}_isTouchBarMode(){const{Browser:e}=(0,d.getDiagram)();return e.TouchUI}_onItemClick(e){let t=!1;this._onItemClickAction&&(t=this._onItemClickAction(e)),t||(r.default.onContextMenuItemClick(this,e,this._executeCommand.bind(this)),this._contextMenuInstance.hide())}_executeCommand(e,t,i){"number"==typeof e?this.bar.raiseBarCommandExecuted(e,i):"string"==typeof e&&this._onInternalCommandAction({command:e}),void 0!==t&&this._onCustomCommandAction({name:t})}_createOnInternalCommand(){this._onInternalCommandAction=this._createActionByOption("onInternalCommand")}_createOnCustomCommand(){this._onCustomCommandAction=this._createActionByOption("onCustomCommand")}_getCommands(){return s.default.getContextMenuCommands(this.option("commands"))}_fillCommandToIndexMap(e,t){e.forEach(((e,i)=>{const n=t.concat([i]);void 0!==e.command&&(this._commandToIndexMap[e.command]=n),Array.isArray(e.items)&&this._fillCommandToIndexMap(e.items,n)}))}_setItemEnabled(e,t){this._setItemVisible(e,t)}_setItemVisible(e,t){const i=r.default.getItemOptionText(this._contextMenuInstance,this._commandToIndexMap[e]);r.default.updateContextMenuItemVisible(this._contextMenuInstance,i,t)}_setItemValue(e,t){const i=r.default.getItemOptionText(this._contextMenuInstance,this._commandToIndexMap[e]);r.default.updateContextMenuItemValue(this._contextMenuInstance,i,e,t)}_setItemSubItems(e,t){const i=r.default.getItemOptionText(this._contextMenuInstance,this._commandToIndexMap[e]);r.default.updateContextMenuItems(this._contextMenuInstance,i,e,t)}_setEnabled(e){this._contextMenuInstance.option("disabled",!e)}isVisible(){return this._inOnShowing}_createOnVisibilityChangingAction(){this._onVisibilityChangingAction=this._createActionByOption("onVisibilityChanging")}_createOnItemClickAction(){this._onItemClickAction=this._createActionByOption("onItemClick")}_optionChanged(e){switch(e.name){case"onVisibilityChanging":this._createOnVisibilityChangingAction();break;case"onInternalCommand":this._createOnInternalCommand();break;case"onCustomCommand":this._createOnCustomCommand();break;case"onItemClick":this._createOnItemClickAction();break;case"commands":this._invalidate();break;case"export":break;default:super._optionChanged(e)}}}class h extends a.default{_renderContextMenuOverlay(){super._renderContextMenuOverlay(),this._overlay&&this.option("isTouchBarMode")&&this._overlay&&this._overlay.option("onShown",(()=>{(0,n.default)(this._overlay.$content()).parent().addClass("dx-diagram-touchbar-overlay")}))}}class p extends l.default{constructor(e){super(e)}getCommandKeys(){return this._getKeys(this._owner._commands)}setItemValue(e,t){this._owner._setItemValue(e,t)}setItemEnabled(e,t){this._owner._setItemEnabled(e,t)}setItemVisible(e,t){this._owner._setItemVisible(e,t)}setItemSubItems(e,t){this._owner._setItemSubItems(e,t)}setEnabled(e){this._owner._setEnabled(e)}isVisible(){return this._owner.isVisible()}}t.default={DiagramContextMenuWrapper:c,DiagramContextMenu:h};e.exports=t.default,e.exports.default=t.default},13815:function(e,t,i){t.default=void 0;var n=l(i(64553)),o=l(i(11118)),a=l(i(98894)),s=i(11744),r=i(3104);function l(e){return e&&e.__esModule?e:{default:e}}const d="dx-diagram-context-toolbox-content",u=150;class c extends o.default{_init(){super._init(),this._onShownAction=this._createActionByOption("onShown");const e=(0,r.getWindow)();this._popoverPositionData=[{my:{x:"center",y:"top"},at:{x:"center",y:"bottom"},offset:{x:0,y:5},calcMaxHeight:t=>Math.max(u,e.innerHeight-t.bottom-6)},{my:{x:"right",y:"center"},at:{x:"left",y:"center"},offset:{x:-5,y:0},calcMaxHeight:t=>Math.max(u,2*Math.min(t.top,e.innerHeight-t.bottom)-2)},{my:{x:"center",y:"bottom"},at:{x:"center",y:"top"},offset:{x:0,y:-5},calcMaxHeight:e=>Math.max(u,e.top-6)},{my:{x:"left",y:"center"},at:{x:"right",y:"center"},offset:{x:5,y:0},calcMaxHeight:t=>Math.max(u,2*Math.min(t.top,e.innerHeight-t.bottom)-2)}]}_initMarkup(){super._initMarkup(),this._$popoverTargetElement=(0,n.default)("<div>").addClass("dx-diagram-context-toolbox-target").appendTo(this.$element());const e=(0,n.default)("<div>").addClass("dx-diagram-context-toolbox").appendTo(this.$element());this._isTouchMode()&&e.addClass("dx-diagram-touch-context-toolbox"),this._popoverInstance=this._createComponent(e,a.default,{hideOnOutsideClick:!1,container:this.$element()})}_isTouchMode(){const{Browser:e}=(0,s.getDiagram)();return e.TouchUI}_show(e,t,i,o,a){this._popoverInstance.hide(),this._$popoverTargetElement.css({left:e+this._popoverPositionData[i].offset.x,top:t+this._popoverPositionData[i].offset.y}).show();const s=(0,r.getWindow)(),l=this._$popoverTargetElement.get(0);this._$popoverTargetElement.css({left:l.offsetLeft-(l.getBoundingClientRect().left+s.scrollX-l.offsetLeft),top:l.offsetTop-(l.getBoundingClientRect().top+s.scrollY-l.offsetTop)});const u=l.getBoundingClientRect();this._popoverInstance.option({maxHeight:this._popoverPositionData[i].calcMaxHeight(u),width:void 0!==this.option("toolboxWidth")?this.option("toolboxWidth"):void 0,position:{my:this._popoverPositionData[i].my,at:this._popoverPositionData[i].at,of:this._$popoverTargetElement},contentTemplate:()=>(0,n.default)("<div>").append((0,n.default)("<div>").addClass(d)).dxScrollView({width:"100%",height:"100%"}),onContentReady:()=>{const e=this.$element().find("."+d);this._onShownAction({category:o,callback:a,$element:e,hide:()=>this._popoverInstance.hide()})}}),this._popoverInstance.show()}_hide(){this._$popoverTargetElement.hide(),this._popoverInstance.hide()}}t.default=c;e.exports=t.default,e.exports.default=t.default},57846:function(e,t,i){t.default=void 0;var n=l(i(64553)),o=i(11744),a=l(i(4671)),s=l(i(26980)),r=i(3104);function l(e){return e&&e.__esModule?e:{default:e}}const d={getConfigurations:function(){const{DiagramCommand:e}=(0,o.getDiagram)();return this.dialogList||(this.dialogList=[{command:e.InsertShapeImage,title:a.default.format("dxDiagram-dialogInsertShapeImageTitle"),onGetContent:this.getChangeImageDialogContent},{command:e.EditShapeImage,title:a.default.format("dxDiagram-dialogEditShapeImageTitle"),onGetContent:this.getChangeImageDialogContent}])},getChangeImageDialogContent:function(e){const t=(0,n.default)("<div>");return e.component._createComponent(t,s.default,{selectButtonText:a.default.format("dxDiagram-dialogEditShapeImageSelectButton"),accept:"image/*",uploadMode:"useForm",onValueChanged:function(t){const i=new((0,r.getWindow)().FileReader);i.onload=function(t){e.component._commandParameter=t.target.result},i.readAsDataURL(t.value[0])}}),t},getDialogParameters(e){const t=this.getConfigurations().map((e=>e.command)).indexOf(e);return t>=0?this.getConfigurations()[t]:null}};t.default=d;e.exports=t.default,e.exports.default=t.default},55485:function(e,t,i){t.default=void 0;var n=l(i(64553)),o=l(i(11118)),a=l(i(4671)),s=l(i(10720)),r=i(52576);function l(e){return e&&e.__esModule?e:{default:e}}class d extends o.default{_init(){super._init(),this._command=void 0,this._isShown=!1,this._createOnGetContentOption(),this._createOnHiddenOption()}_initMarkup(){super._initMarkup(),this._command=this.option("command"),this._$popupElement=(0,n.default)("<div>").appendTo(this.$element()),this._popup=this._createComponent(this._$popupElement,s.default,{title:this.option("title"),maxWidth:this.option("maxWidth"),height:this.option("height"),toolbarItems:this.option("toolbarItems"),onHidden:this._onHiddenAction})}_clean(){delete this._popup,this._$popupElement&&this._$popupElement.remove()}_getDefaultOptions(){return(0,r.extend)(super._getDefaultOptions(),{title:"",maxWidth:500,height:"auto",toolbarItems:this._getToolbarItems()})}_getToolbarItems(){return[this._getOkToolbarItem(),this._getCancelToolbarItem()]}_getOkToolbarItem(){return{widget:"dxButton",location:"after",toolbar:"bottom",options:{text:a.default.format("dxDiagram-dialogButtonOK"),onClick:function(){this._command.execute(this._commandParameter),this._hide()}.bind(this)}}}_getCancelToolbarItem(){return{widget:"dxButton",location:"after",toolbar:"bottom",options:{text:a.default.format("dxDiagram-dialogButtonCancel"),onClick:this._hide.bind(this)}}}_optionChanged(e){switch(e.name){case"title":case"maxWidth":case"height":case"toolbarItems":this._popup.option(e.name,e.value);break;case"command":this._command=e.value;break;case"onGetContent":this._createOnGetContentOption();break;case"onHidden":this._createOnHiddenOption();break;default:super._optionChanged(e)}}_createOnGetContentOption(){this._onGetContentAction=this._createActionByOption("onGetContent")}_createOnHiddenOption(){this._onHiddenAction=this._createActionByOption("onHidden")}_hide(){this._popup.hide(),this._isShown=!1}_show(){this._popup.$content().empty().append(this._onGetContentAction()),this._popup.show(),this._isShown=!0}isVisible(){return this._isShown}}t.default=d;e.exports=t.default,e.exports.default=t.default},80209:function(e,t,i){t.default=void 0;var n=i(57653),o=d(i(64553)),a=i(52576),s=i(3104),r=d(i(10720)),l=d(i(29738));function d(e){return e&&e.__esModule?e:{default:e}}const u="dx-diagram-mobile-popup";class c extends l.default{_init(){super._init(),this._createOnVisibilityChangingAction(),this._createOnVisibilityChangedAction()}isVisible(){return this.option("isVisible")}isMobileView(){return this.option("isMobileView")}_initMarkup(){super._initMarkup();const e=this.$element(),t=(0,o.default)("<div>").addClass(this._getPopupClass()).addClass(this.isMobileView()&&u).appendTo(e);this._popup=this._createComponent(t,r.default,this._getPopupOptions()),this._updatePopupVisible()}show(){this.option("isVisible",!0)}hide(){this.option("isVisible",!1)}toggle(){this.option("isVisible",!this.isVisible())}repaint(){this._popup.repaint()}_getPopupContent(){return this._popup.content()}_getPopupTitle(){return(0,o.default)(this._getPopupContent()).parent().find(".dx-popup-title")}_getPointerUpElements(){return[this._getPopupContent(),this._getPopupTitle()]}_getVerticalPaddingsAndBorders(){const e=(0,o.default)(this._getPopupContent());return(0,n.getOuterHeight)(e)-(0,n.getHeight)(e)}_getHorizontalPaddingsAndBorders(){const e=(0,o.default)(this._getPopupContent());return(0,n.getOuterWidth)(e)-(0,n.getWidth)(e)}_getPopupClass(){return""}_getPopupWidth(){return this.option("width")||"auto"}_getPopupMaxWidth(){return this.option("maxWidth")}_getPopupMinWidth(){return this.option("minWidth")}_getPopupHeight(){return this.option("height")||"auto"}_getPopupMaxHeight(){return this.option("maxHeight")}_getPopupMinHeight(){return this.option("minHeight")}_getPopupPosition(){return{}}_getPopupContainer(){return this.option("container")}_getPopupSlideAnimationObject(e){return(0,a.extend)({type:"slide",start:()=>{(0,o.default)("body").css("overflow","hidden")},complete:()=>{(0,o.default)("body").css("overflow","")}},e)}_getPopupAnimation(){return{hide:{type:"fadeOut"},show:{type:"fadeIn"}}}_getPopupOptions(){const e=this;let t=this._getPopupClass();return this.isMobileView()&&(t+=` ${u}`),{animation:(0,s.hasWindow)()?this._getPopupAnimation():null,shading:!1,showTitle:!1,focusStateEnabled:!1,container:this._getPopupContainer(),width:this._getPopupWidth(),height:this._getPopupHeight(),maxWidth:this._getPopupMaxWidth(),maxHeight:this._getPopupMaxHeight(),minWidth:this._getPopupMinWidth(),minHeight:this._getPopupMinHeight(),position:this._getPopupPosition(),showCloseButton:!0,wrapperAttr:{class:t},onContentReady:function(){e._renderPopupContent(e._popup.content())},onShowing:()=>{this._onVisibilityChangingAction({visible:!0,component:this})},onShown:()=>{this.option("isVisible",!0),this._onVisibilityChangedAction({visible:!0,component:this})},onHiding:()=>{this._onVisibilityChangingAction({visible:!1,component:this})},onHidden:()=>{this.option("isVisible",!1),this._onVisibilityChangedAction({visible:!1,component:this})}}}_renderPopupContent(e){}_updatePopupVisible(){this._popup.option("visible",this.isVisible())}_createOnVisibilityChangingAction(){this._onVisibilityChangingAction=this._createActionByOption("onVisibilityChanging")}_createOnVisibilityChangedAction(){this._onVisibilityChangedAction=this._createActionByOption("onVisibilityChanged")}_optionChanged(e){switch(e.name){case"onVisibilityChanging":this._createOnVisibilityChangingAction();break;case"onVisibilityChanged":this._createOnVisibilityChangedAction();break;case"container":this._popup.option("container",this._getPopupContainer());break;case"width":this._popup.option("width",this._getPopupWidth());break;case"height":this._popup.option("height",this._getPopupHeight());break;case"maxWidth":this._popup.option("maxWidth",this._getPopupMaxWidth());break;case"maxHeight":this._popup.option("maxHeight",this._getPopupMaxHeight());break;case"minWidth":this._popup.option("minWidth",this._getPopupMinWidth());break;case"minHeight":this._popup.option("minHeight",this._getPopupMinHeight());break;case"isMobileView":this._invalidate();break;case"isVisible":this._updatePopupVisible();break;default:super._optionChanged(e)}}_getDefaultOptions(){return(0,a.extend)(super._getDefaultOptions(),{isVisible:!0,isMobileView:!1,offsetX:0,offsetY:0})}}t.default=c;e.exports=t.default,e.exports.default=t.default},98580:function(e,t,i){t.default=void 0;var n=a(i(29339)),o=a(i(43304));function a(e){return e&&e.__esModule?e:{default:e}}class s extends n.default{_getCommands(){return o.default.getHistoryToolbarCommands(this.option("commands"),this._getExcludeCommands())}_getExcludeCommands(){const e=[].concat(this.option("excludeCommands"));return this.option("isMobileView")||e.push(o.default.SHOW_TOOLBOX_COMMAND_NAME),e}}t.default=s;e.exports=t.default,e.exports.default=t.default},14006:function(e,t,i){t.default=void 0;var n=i(57653),o=H(i(64553)),a=H(i(11118)),s=H(i(11979)),r=H(i(92848)),l=i(52576),d=i(11528),u=i(31e3),c=H(i(3030)),h=i(11744),p=i(3104),g=i(61404),_=H(i(92774)),f=i(98834),m=H(i(4671)),v=H(i(52771)),C=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=F(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(84893)),y=H(i(89132)),b=H(i(29339)),x=H(i(41499)),w=H(i(98580)),S=H(i(89771)),D=H(i(81567)),I=H(i(48941)),E=H(i(13815)),T=H(i(55485)),A=H(i(4559)),O=H(i(74611)),P=H(i(50427)),k=H(i(27574)),M=H(i(79892)),R=H(i(57846)),L=H(i(43304)),B=H(i(96221)),V=H(i(73360));function F(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(F=function(e){return e?i:t})(e)}function H(e){return e&&e.__esModule?e:{default:e}}const N="dx-diagram",z=N+"-toolbar-wrapper",W=N+"-content-wrapper",$=N+"-content",G=N+"-scroll-view",j=N+"-floating-toolbar-container",U=N+"-properties-panel-toolbar-container",K=N+"-loading-indicator",Z=12,q="in",Y="disabled",X="portrait",Q="#ffffff",J="dxDiagramEvent",ee=(0,f.addNamespace)("fullscreenchange",J),te=(0,f.addNamespace)("msfullscreenchange",J),ie=(0,f.addNamespace)("webkitfullscreenchange",J),ne=(0,f.addNamespace)("mozfullscreenchange",J);class oe extends a.default{_init(){this._updateDiagramLockCount=0,this.toggleFullscreenLock=0,this._toolbars=[],super._init(),this._initDiagram(),this._createCustomCommand()}_initMarkup(){super._initMarkup(),this._toolbars=[],delete this._isMobileScreenSize;const e=!(0,p.hasWindow)();this.$element().addClass(N),delete this._mainToolbar,this.option("mainToolbar.visible")&&this._renderMainToolbar();const t=(0,o.default)("<div>").addClass(W).appendTo(this.$element());if(delete this._historyToolbar,delete this._historyToolbarResizeCallback,this._isHistoryToolbarVisible()&&this._renderHistoryToolbar(t),delete this._propertiesToolbar,delete this._propertiesToolbarResizeCallback,this._isPropertiesPanelEnabled()&&this._renderPropertiesToolbar(t),delete this._viewToolbar,delete this._viewToolbarResizeCallback,this.option("viewToolbar.visible")&&this._renderViewToolbar(t),delete this._toolbox,delete this._toolboxResizeCallback,this._isToolboxEnabled()&&this._renderToolbox(t),delete this._propertiesPanel,delete this._propertiesPanelResizeCallback,this._isPropertiesPanelEnabled()&&this._renderPropertiesPanel(t),this._$content=(0,o.default)("<div>").addClass($).appendTo(t),delete this._contextMenu,this._diagramInstance.settings.contextMenuEnabled=this.option("contextMenu.enabled"),this._diagramInstance.settings.contextMenuEnabled&&this._renderContextMenu(t),delete this._contextToolbox,this.option("contextToolbox.enabled")&&this._renderContextToolbox(t),this._renderDialog(t),!e){const e=(0,o.default)("<div>").addClass(G).appendTo(this._$content);this._createComponent(e,A.default,{useNativeScrolling:this.option("useNativeScrolling"),onCreateDiagram:e=>{this._diagramInstance.createDocument(e.$parent[0],e.scrollView,t[0])}})}this._setCustomCommandChecked(L.default.SHOW_PROPERTIES_PANEL_COMMAND_NAME,this._isPropertiesPanelVisible()),this._setCustomCommandChecked(L.default.SHOW_TOOLBOX_COMMAND_NAME,this._isToolboxVisible()),this._createOptionsUpdateBar()}_dimensionChanged(){this._isMobileScreenSize=void 0,this._processDiagramResize()}_visibilityChanged(e){e&&(this._bindDiagramData(),this.repaint())}_processDiagramResize(){this._diagramInstance.onDimensionChanged(),this._historyToolbarResizeCallback&&this._historyToolbarResizeCallback.call(this),this._propertiesToolbarResizeCallback&&this._propertiesToolbarResizeCallback.call(this),this._propertiesPanelResizeCallback&&this._propertiesPanelResizeCallback.call(this),this._viewToolbarResizeCallback&&this._viewToolbarResizeCallback.call(this),this._toolboxResizeCallback&&this._toolboxResizeCallback.call(this)}isMobileScreenSize(){return void 0===this._isMobileScreenSize&&(this._isMobileScreenSize=(0,p.hasWindow)()&&(0,n.getOuterWidth)(this.$element())<576),this._isMobileScreenSize}_captureFocus(){this._diagramInstance&&this._diagramInstance.captureFocus()}_captureFocusOnTimeout(){this._captureFocusTimeout=setTimeout((()=>{this._captureFocus(),delete this._captureFocusTimeout}),100)}_killCaptureFocusTimeout(){this._captureFocusTimeout&&(clearTimeout(this._captureFocusTimeout),delete this._captureFocusTimeout)}notifyBarCommandExecuted(){this._captureFocusOnTimeout()}_registerToolbar(e){this._registerBar(e),this._toolbars.push(e)}_registerBar(e){e.bar.onChanged.add(this),this._diagramInstance.registerBar(e.bar)}_getExcludeCommands(){const e=[];return this._isToolboxEnabled()||e.push(L.default.SHOW_TOOLBOX_COMMAND_NAME),this._isPropertiesPanelEnabled()||e.push(L.default.SHOW_PROPERTIES_PANEL_COMMAND_NAME),e}_getToolbarBaseOptions(){return{onContentReady:e=>{let{component:t}=e;return this._registerToolbar(t)},onSubMenuVisibilityChanging:e=>{let{component:t}=e;return this._diagramInstance.updateBarItemsState(t.bar)},onPointerUp:this._onPanelPointerUp.bind(this),export:this.option("export"),excludeCommands:this._getExcludeCommands(),onInternalCommand:this._onInternalCommand.bind(this),onCustomCommand:this._onCustomCommand.bind(this),isMobileView:this.isMobileScreenSize()}}_onInternalCommand(e){switch(e.command){case L.default.SHOW_TOOLBOX_COMMAND_NAME:this._toolbox&&this._toolbox.toggle();break;case L.default.SHOW_PROPERTIES_PANEL_COMMAND_NAME:this._propertiesPanel&&this._propertiesPanel.toggle()}}_onCustomCommand(e){this._customCommandAction({name:e.name})}_renderMainToolbar(){const e=(0,o.default)("<div>").addClass(z).appendTo(this.$element());this._mainToolbar=this._createComponent(e,x.default,(0,l.extend)(this._getToolbarBaseOptions(),{commands:this.option("mainToolbar.commands"),skipAdjustSize:!0}))}_isHistoryToolbarVisible(){return this.option("historyToolbar.visible")&&!this.isReadOnlyMode()}_renderHistoryToolbar(e){const t=(0,o.default)("<div>").addClass(j).appendTo(e);this._historyToolbar=this._createComponent(t,w.default,(0,l.extend)(this._getToolbarBaseOptions(),{commands:this.option("historyToolbar.commands"),locateInMenu:"never"})),this._updateHistoryToolbarPosition(),this._historyToolbarResizeCallback=()=>{this._historyToolbar.option("isMobileView",this.isMobileScreenSize())}}_updateHistoryToolbarPosition(){(0,p.hasWindow)()&&c.default.setup(this._historyToolbar.$element(),{my:"left top",at:"left top",of:this._historyToolbar.$element().parent(),offset:"12 12"})}_isToolboxEnabled(){return"disabled"!==this.option("toolbox.visibility")&&!this.isReadOnlyMode()}_isToolboxVisible(){return"visible"===this.option("toolbox.visibility")||"auto"===this.option("toolbox.visibility")&&!this.isMobileScreenSize()}_renderToolbox(e){const t=!(0,p.hasWindow)(),i=(0,o.default)("<div>").appendTo(e),n=this._getToolboxBounds(e,t);this._toolbox=this._createComponent(i,P.default,{isMobileView:this.isMobileScreenSize(),isVisible:this._isToolboxVisible(),container:this.$element(),height:n.height,offsetParent:e,offsetX:n.offsetX,offsetY:n.offsetY,showSearch:this.option("toolbox.showSearch"),toolboxGroups:this._getToolboxGroups(),toolboxWidth:this.option("toolbox.width"),onShapeCategoryRendered:e=>{t||this._diagramInstance.createToolbox(e.$element[0],"texts"===e.displayMode,e.shapes||e.category,{shapeIconSpacing:12,shapeIconCountInRow:this.option("toolbox.shapeIconsPerRow"),shapeIconAttributes:{"data-toggle":e.dataToggle}})},onFilterChanged:e=>{t||this._diagramInstance.applyToolboxFilter(e.text,e.filteringToolboxes)},onVisibilityChanging:e=>{t||(this._setCustomCommandChecked(L.default.SHOW_TOOLBOX_COMMAND_NAME,e.visible),this._propertiesPanel&&e.visible&&this.isMobileScreenSize()&&this._propertiesPanel.hide(),this._historyToolbar&&e.visible&&this.isMobileScreenSize()&&(this._historyToolbarZIndex=C.create(y.default.baseZIndex()),this._historyToolbar.$element().css("zIndex",this._historyToolbarZIndex),this._historyToolbar.$element().css("boxShadow","none")),this._viewToolbar&&(this._viewToolbar.$element().css("opacity",e.visible&&this.isMobileScreenSize()?"0":"1"),this._viewToolbar.$element().css("pointerEvents",e.visible&&this.isMobileScreenSize()?"none":"")))},onVisibilityChanged:e=>{e.visible||this._textInputStarted||this._captureFocus(),t||this._historyToolbar&&!e.visible&&this.isMobileScreenSize()&&this._historyToolbarZIndex&&(C.remove(this._historyToolbarZIndex),this._historyToolbar.$element().css("zIndex",""),this._historyToolbar.$element().css("boxShadow",""),this._historyToolbarZIndex=void 0)},onPointerUp:this._onPanelPointerUp.bind(this)}),this._toolbox._popup.option("propagateOutsideClick",!this.option("fullScreen")),this._toolboxResizeCallback=()=>{const i=this._getToolboxBounds(e,t);this._toolbox.option("height",i.height);this._toolbox.option("isMobileView")!==this.isMobileScreenSize()&&(this._toolbox.option({isMobileView:this.isMobileScreenSize(),isVisible:this._isToolboxVisible()}),this._setCustomCommandChecked(L.default.SHOW_TOOLBOX_COMMAND_NAME,this._isToolboxVisible())),this._toolbox.updateMaxHeight()}}_getToolboxBounds(e,t){const i={offsetX:Z,offsetY:Z,height:t?0:(0,n.getHeight)(e)-24};return this._historyToolbar&&!t&&(i.offsetY+=(0,n.getOuterHeight)(this._historyToolbar.$element())+Z,i.height-=(0,n.getOuterHeight)(this._historyToolbar.$element())+Z),this._viewToolbar&&!t&&(i.height-=(0,n.getOuterHeight)(this._viewToolbar.$element())+this._getViewToolbarYOffset(t)),i}_renderViewToolbar(e){const t=!(0,p.hasWindow)(),i=(0,o.default)("<div>").addClass(j).appendTo(e);this._viewToolbar=this._createComponent(i,S.default,(0,l.extend)(this._getToolbarBaseOptions(),{commands:this.option("viewToolbar.commands"),locateInMenu:"never"})),this._updateViewToolbarPosition(i,e,t),this._viewToolbarResizeCallback=()=>{this._updateViewToolbarPosition(i,e,t)}}_getViewToolbarYOffset(e){if(e)return;let t=Z;return this._viewToolbar&&this._propertiesToolbar&&(t+=((0,n.getOuterHeight)(this._propertiesToolbar.$element())-(0,n.getOuterHeight)(this._viewToolbar.$element()))/2),t}_updateViewToolbarPosition(e,t,i){i||c.default.setup(e,{my:"left bottom",at:"left bottom",of:t,offset:"12 -"+this._getViewToolbarYOffset(i)})}_isPropertiesPanelEnabled(){return"disabled"!==this.option("propertiesPanel.visibility")&&!this.isReadOnlyMode()}_isPropertiesPanelVisible(){return"visible"===this.option("propertiesPanel.visibility")}_renderPropertiesToolbar(e){const t=!(0,p.hasWindow)(),i=(0,o.default)("<div>").addClass(j).addClass(U).appendTo(e);this._propertiesToolbar=this._createComponent(i,D.default,(0,l.extend)(this._getToolbarBaseOptions(),{buttonStylingMode:"contained",buttonType:"default",locateInMenu:"never"})),this._updatePropertiesToolbarPosition(i,e,t),this._propertiesToolbarResizeCallback=()=>{this._updatePropertiesToolbarPosition(i,e,t)}}_updatePropertiesToolbarPosition(e,t,i){i||c.default.setup(e,{my:"right bottom",at:"right bottom",of:t,offset:"-12 -12"})}_renderPropertiesPanel(e){const t=!(0,p.hasWindow)(),i=(0,o.default)("<div>").appendTo(e),a=24+(t?0:(0,n.getOuterHeight)(this._propertiesToolbar.$element()));this._propertiesPanel=this._createComponent(i,k.default,{isMobileView:this.isMobileScreenSize(),isVisible:this._isPropertiesPanelVisible(),container:this.$element(),offsetParent:e,offsetX:12,offsetY:a,propertyTabs:this.option("propertiesPanel.tabs"),onCreateToolbar:e=>{e.toolbar=this._createComponent(e.$parent,b.default,(0,l.extend)(this._getToolbarBaseOptions(),{commands:e.commands,locateInMenu:"never",editorStylingMode:"outlined"}))},onVisibilityChanging:e=>{t||(this._updatePropertiesPanelGroupBars(e.component),this._setCustomCommandChecked(L.default.SHOW_PROPERTIES_PANEL_COMMAND_NAME,e.visible),this._toolbox&&e.visible&&this.isMobileScreenSize()&&this._toolbox.hide())},onVisibilityChanged:e=>{e.visible||this._textInputStarted||this._captureFocus()},onSelectedGroupChanged:e=>{let{component:t}=e;return this._updatePropertiesPanelGroupBars(t)},onPointerUp:this._onPanelPointerUp.bind(this)}),this._propertiesPanelResizeCallback=()=>{this._propertiesPanel.option("isMobileView")!==this.isMobileScreenSize()&&(this._propertiesPanel.option({isMobileView:this.isMobileScreenSize(),isVisible:this._isPropertiesPanelVisible()}),this._setCustomCommandChecked(L.default.SHOW_PROPERTIES_PANEL_COMMAND_NAME,this._isPropertiesPanelVisible()))}}_updatePropertiesPanelGroupBars(e){e.getActiveToolbars().forEach((e=>{this._diagramInstance.updateBarItemsState(e.bar)}))}_onPanelPointerUp(){this._captureFocusOnTimeout()}_renderContextMenu(e){const t=(0,o.default)("<div>").appendTo(e);this._contextMenu=this._createComponent(t,I.default.DiagramContextMenuWrapper,{commands:this.option("contextMenu.commands"),onContentReady:e=>{let{component:t}=e;return this._registerBar(t)},onVisibilityChanging:e=>{let{component:t}=e;return this._diagramInstance.updateBarItemsState(t.bar)},onItemClick:e=>this._onBeforeCommandExecuted(e.command),export:this.option("export"),excludeCommands:this._getExcludeCommands(),onInternalCommand:this._onInternalCommand.bind(this),onCustomCommand:this._onCustomCommand.bind(this)})}_renderContextToolbox(e){const t=!(0,p.hasWindow)(),i=this.option("contextToolbox.category"),n=this.option("contextToolbox.displayMode"),a=this.option("contextToolbox.shapes"),s=(0,o.default)("<div>").appendTo(e);this._contextToolbox=this._createComponent(s,E.default,{toolboxWidth:this.option("contextToolbox.width"),onShown:e=>{if(t)return;const s=(0,o.default)(e.$element);let r="texts"===n;if(!a&&!i&&!r){const t=this._getToolboxGroups().filter((function(t){return t.category===e.category}))[0];t&&(r="texts"===t.displayMode)}this._diagramInstance.createContextToolbox(s[0],r,a||i||e.category,{shapeIconSpacing:12,shapeIconCountInRow:this.option("contextToolbox.shapeIconsPerRow")},(t=>{e.callback(t),this._captureFocus(),e.hide()}))}})}_setCustomCommandChecked(e,t){this._toolbars.forEach((i=>{i.setCommandChecked(e,t)}))}_onBeforeCommandExecuted(e){const t=R.default.getDialogParameters(e);return t&&this._showDialog(t),!!t}_renderDialog(e){const t=(0,o.default)("<div>").appendTo(e);this._dialogInstance=this._createComponent(t,T.default,{})}_showDialog(e){this._dialogInstance&&(this._dialogInstance.option("onGetContent",e.onGetContent),this._dialogInstance.option("onHidden",function(){this._captureFocus()}.bind(this)),this._dialogInstance.option("command",this._diagramInstance.getCommand(e.command)),this._dialogInstance.option("title",e.title),this._dialogInstance._show())}_showLoadingIndicator(){this._loadingIndicator=(0,o.default)("<div>").addClass(K),this._createComponent(this._loadingIndicator,s.default,{});(this._$content||this.$element()).append(this._loadingIndicator)}_hideLoadingIndicator(){this._loadingIndicator&&(this._loadingIndicator.remove(),this._loadingIndicator=null)}_initDiagram(){const{DiagramControl:e}=(0,h.getDiagram)();if(this._diagramInstance=new e,this._diagramInstance.onChanged=this._raiseDataChangeAction.bind(this),this._diagramInstance.onEdgeInserted=this._raiseEdgeInsertedAction.bind(this),this._diagramInstance.onEdgeUpdated=this._raiseEdgeUpdatedAction.bind(this),this._diagramInstance.onEdgeRemoved=this._raiseEdgeRemovedAction.bind(this),this._diagramInstance.onNodeInserted=this._raiseNodeInsertedAction.bind(this),this._diagramInstance.onNodeUpdated=this._raiseNodeUpdatedAction.bind(this),this._diagramInstance.onNodeRemoved=this._raiseNodeRemovedAction.bind(this),this._diagramInstance.onToolboxDragStart=this._raiseToolboxDragStart.bind(this),this._diagramInstance.onToolboxDragEnd=this._raiseToolboxDragEnd.bind(this),this._diagramInstance.onTextInputStart=this._raiseTextInputStart.bind(this),this._diagramInstance.onTextInputEnd=this._raiseTextInputEnd.bind(this),this._diagramInstance.onToggleFullscreen=this._onToggleFullScreen.bind(this),this._diagramInstance.onShowContextMenu=this._onShowContextMenu.bind(this),this._diagramInstance.onHideContextMenu=this._onHideContextMenu.bind(this),this._diagramInstance.onShowContextToolbox=this._onShowContextToolbox.bind(this),this._diagramInstance.onHideContextToolbox=this._onHideContextToolbox.bind(this),this._diagramInstance.onNativeAction.add({notifyItemClick:this._raiseItemClickAction.bind(this),notifyItemDblClick:this._raiseItemDblClickAction.bind(this),notifySelectionChanged:this._raiseSelectionChanged.bind(this)}),this._diagramInstance.onRequestOperation=this._raiseRequestEditOperation.bind(this),this._updateEventSubscriptionMethods(),this._updateDefaultItemProperties(),this._updateEditingSettings(),this._updateShapeTexts(),this._updateUnitItems(),this._updateFormatUnitsMethod(),this.option("units")!==q&&this._updateUnitsState(),this.isReadOnlyMode()&&this._updateReadOnlyState(),this.option("pageSize")&&(this.option("pageSize.items")&&this._updatePageSizeItemsState(),this.option("pageSize.width")&&this.option("pageSize.height")&&this._updatePageSizeState()),this.option("pageOrientation")!==X&&this._updatePageOrientationState(),this.option("pageColor")!==Q&&this._updatePageColorState(),this.option("viewUnits")!==q&&this._updateViewUnitsState(),this.option("showGrid")||this._updateShowGridState(),this.option("snapToGrid")||this._updateSnapToGridState(),this.option("gridSize")&&this._updateGridSizeState(),1!==this.option("zoomLevel")&&this._updateZoomLevelState(),this.option("simpleView")&&this._updateSimpleViewState(),this.option("autoZoomMode")!==Y&&this._updateAutoZoomState(),this.option("fullScreen")){const e=(0,p.getWindow)();e&&e.self!==e.top?this.option("fullScreen",!1):this._updateFullscreenState()}this._createOptionsUpdateBar(),(0,p.hasWindow)()&&this._diagramInstance.initMeasurer(this.$element()[0]),this._updateCustomShapes(this._getCustomShapes()),this._refreshDataSources()}_createOptionsUpdateBar(){this.optionsUpdateBar||(this.optionsUpdateBar=new M.default(this),this._diagramInstance.registerBar(this.optionsUpdateBar))}_deleteOptionsUpdateBar(){delete this.optionsUpdateBar}_clean(){this._diagramInstance&&(this._diagramInstance.cleanMarkup((e=>{(0,o.default)(e).empty()})),this._deleteOptionsUpdateBar()),super._clean()}_dispose(){this._killCaptureFocusTimeout(),super._dispose(),this._diagramInstance&&(this._diagramInstance.dispose(),this._diagramInstance=void 0)}_executeDiagramCommand(e,t){this._diagramInstance.getCommand(e).execute(t)}getNodeDataSource(){return this._nodesOption&&this._nodesOption.getDataSource()}getEdgeDataSource(){return this._edgesOption&&this._edgesOption.getDataSource()}_refreshDataSources(){this._beginUpdateDiagram(),this._refreshNodesDataSource(),this._refreshEdgesDataSource(),this._endUpdateDiagram()}_refreshNodesDataSource(){this._nodesOption&&(this._nodesOption._disposeDataSource(),delete this._nodesOption),this.option("nodes.dataSource")&&(this._nodesOption=new B.default(this),this._nodesOption.option("dataSource",this.option("nodes.dataSource")),this._nodesOption._refreshDataSource())}_refreshEdgesDataSource(){this._edgesOption&&(this._edgesOption._disposeDataSource(),delete this._edgesOption),this.option("edges.dataSource")&&(this._edgesOption=new V.default(this),this._edgesOption.option("dataSource",this.option("edges.dataSource")),this._edgesOption._refreshDataSource())}_getDiagramData(){let e;const{DiagramCommand:t}=(0,h.getDiagram)();return this._executeDiagramCommand(t.Export,(function(t){e=t})),e}_setDiagramData(e,t){const{DiagramCommand:i}=(0,h.getDiagram)();this._executeDiagramCommand(i.Import,{data:e,keepExistingItems:t})}isReadOnlyMode(){return this.option("readOnly")||this.option("disabled")}_onDataSourceChanged(){this._bindDiagramData()}_getChangesKeys(e){return e.map((e=>(0,d.isDefined)(e.internalKey)?e.internalKey:(0,d.isDefined)(e.key)?e.key:null)).filter((e=>(0,d.isDefined)(e)))}_createOptionGetter(e){const t=this.option(e);return t&&(0,u.compileGetter)(t)}_onRequestUpdateLayout(e){this._requestLayoutUpdateAction||this._createRequestLayoutUpdateAction();const t={changes:e,allowed:!1};return this._requestLayoutUpdateAction(t),t.allowed}_createOptionSetter(e){const t=this.option(e);return(0,d.isFunction)(t)?t:t&&(0,u.compileSetter)(t)}_bindDiagramData(){if(this._updateDiagramLockCount||!this._isBindingMode())return;const{DiagramCommand:e,ConnectorLineOption:t,ConnectorLineEnding:i}=(0,h.getDiagram)();let n,o,a,s,r,l,d,u;const c={nodeDataSource:this._nodesOption&&this._nodesOption.getItems(),edgeDataSource:this._edgesOption&&this._edgesOption.getItems(),nodeDataImporter:{getKey:this._createOptionGetter("nodes.keyExpr"),setKey:this._createOptionSetter("nodes.keyExpr"),getCustomData:this._createOptionGetter("nodes.customDataExpr"),setCustomData:this._createOptionSetter("nodes.customDataExpr"),getLocked:this._createOptionGetter("nodes.lockedExpr"),setLocked:this._createOptionSetter("nodes.lockedExpr"),getStyle:this._createOptionGetter("nodes.styleExpr"),setStyle:this._createOptionSetter("nodes.styleExpr"),getStyleText:this._createOptionGetter("nodes.textStyleExpr"),setStyleText:this._createOptionSetter("nodes.textStyleExpr"),getZIndex:this._createOptionGetter("nodes.zIndexExpr"),setZIndex:this._createOptionSetter("nodes.zIndexExpr"),getType:this._createOptionGetter("nodes.typeExpr"),setType:this._createOptionSetter("nodes.typeExpr"),getText:this._createOptionGetter("nodes.textExpr"),setText:this._createOptionSetter("nodes.textExpr"),getImage:this._createOptionGetter("nodes.imageUrlExpr"),setImage:this._createOptionSetter("nodes.imageUrlExpr"),getLeft:this._createOptionGetter("nodes.leftExpr"),setLeft:this._createOptionSetter("nodes.leftExpr"),getTop:this._createOptionGetter("nodes.topExpr"),setTop:this._createOptionSetter("nodes.topExpr"),getWidth:this._createOptionGetter("nodes.widthExpr"),setWidth:this._createOptionSetter("nodes.widthExpr"),getHeight:this._createOptionGetter("nodes.heightExpr"),setHeight:this._createOptionSetter("nodes.heightExpr"),getParentKey:this._createOptionGetter("nodes.parentKeyExpr"),setParentKey:this._createOptionSetter("nodes.parentKeyExpr"),getItems:this._createOptionGetter("nodes.itemsExpr"),setItems:this._createOptionSetter("nodes.itemsExpr"),getChildren:d=this._createOptionGetter("nodes.containerChildrenExpr"),setChildren:u=this._createOptionSetter("nodes.containerChildrenExpr"),getContainerKey:!d&&!u&&this._createOptionGetter("nodes.containerKeyExpr"),setContainerKey:!d&&!u&&this._createOptionSetter("nodes.containerKeyExpr")},edgeDataImporter:{getKey:this._createOptionGetter("edges.keyExpr"),setKey:this._createOptionSetter("edges.keyExpr"),getCustomData:this._createOptionGetter("edges.customDataExpr"),setCustomData:this._createOptionSetter("edges.customDataExpr"),getLocked:this._createOptionGetter("edges.lockedExpr"),setLocked:this._createOptionSetter("edges.lockedExpr"),getStyle:this._createOptionGetter("edges.styleExpr"),setStyle:this._createOptionSetter("edges.styleExpr"),getStyleText:this._createOptionGetter("edges.textStyleExpr"),setStyleText:this._createOptionSetter("edges.textStyleExpr"),getZIndex:this._createOptionGetter("edges.zIndexExpr"),setZIndex:this._createOptionSetter("edges.zIndexExpr"),getFrom:this._createOptionGetter("edges.fromExpr"),setFrom:this._createOptionSetter("edges.fromExpr"),getFromPointIndex:this._createOptionGetter("edges.fromPointIndexExpr"),setFromPointIndex:this._createOptionSetter("edges.fromPointIndexExpr"),getTo:this._createOptionGetter("edges.toExpr"),setTo:this._createOptionSetter("edges.toExpr"),getToPointIndex:this._createOptionGetter("edges.toPointIndexExpr"),setToPointIndex:this._createOptionSetter("edges.toPointIndexExpr"),getPoints:this._createOptionGetter("edges.pointsExpr"),setPoints:this._createOptionSetter("edges.pointsExpr"),getText:this._createOptionGetter("edges.textExpr"),setText:this._createOptionSetter("edges.textExpr"),getLineOption:(n=this._createOptionGetter("edges.lineTypeExpr"))&&function(e){const t=n(e);return this._getConnectorLineOption(t)}.bind(this),setLineOption:(o=this._createOptionSetter("edges.lineTypeExpr"))&&function(e,i){switch(i){case t.Straight:i="straight";break;case t.Orthogonal:i="orthogonal"}o(e,i)}.bind(this),getStartLineEnding:(a=this._createOptionGetter("edges.fromLineEndExpr"))&&function(e){const t=a(e);return this._getConnectorLineEnding(t)}.bind(this),setStartLineEnding:(s=this._createOptionSetter("edges.fromLineEndExpr"))&&function(e,t){switch(t){case i.Arrow:t="arrow";break;case i.OutlinedTriangle:t="outlinedTriangle";break;case i.FilledTriangle:t="filledTriangle";break;case i.None:t="none"}s(e,t)}.bind(this),getEndLineEnding:(r=this._createOptionGetter("edges.toLineEndExpr"))&&function(e){const t=r(e);return this._getConnectorLineEnding(t)}.bind(this),setEndLineEnding:(l=this._createOptionSetter("edges.toLineEndExpr"))&&function(e,t){switch(t){case i.Arrow:t="arrow";break;case i.OutlinedTriangle:t="outlinedTriangle";break;case i.FilledTriangle:t="filledTriangle";break;case i.None:t="none"}l(e,t)}.bind(this)},layoutParameters:this._getDataBindingLayoutParameters()};c.nodeDataSource&&this._executeDiagramCommand(e.BindDocument,c)}_reloadContentByChanges(e,t){const i=this._getChangesKeys(e),n=this._onRequestUpdateLayout(e);this._reloadContent(i,n,t)}_reloadContent(e,t,i){this._diagramInstance.reloadContent(e,(()=>{let e,t;return this._nodesOption&&i&&(e=this._nodesOption.getItems()),this._edgesOption&&i&&(t=this._edgesOption.getItems()),{nodeDataSource:e,edgeDataSource:t}}),t&&this._getDataBindingLayoutParameters(),i)}_getConnectorLineOption(e){const{ConnectorLineOption:t}=(0,h.getDiagram)();return"straight"===e?t.Straight:t.Orthogonal}_getConnectorLineEnding(e){const{ConnectorLineEnding:t}=(0,h.getDiagram)();switch(e){case"arrow":return t.Arrow;case"outlinedTriangle":return t.OutlinedTriangle;case"filledTriangle":return t.FilledTriangle;default:return t.None}}_getDataBindingLayoutParameters(){const{DataLayoutType:e,DataLayoutOrientation:t}=(0,h.getDiagram)(),i=this.option("nodes.autoLayout")||"off",n=i.type||i,o={};if("off"!==n&&("auto"!==n||!this._hasNodePositionExprs())){if("tree"===n)o.type=e.Tree;else o.type=e.Sugiyama;switch(i.orientation){case"vertical":o.orientation=t.Vertical;break;case"horizontal":o.orientation=t.Horizontal}(this.option("edges.fromPointIndexExpr")||this.option("edges.toPointIndexExpr"))&&(o.skipPointIndices=!0)}return o.autoSizeEnabled=!!this.option("nodes.autoSizeEnabled"),o}_hasNodePositionExprs(){return this.option("nodes.topExpr")&&this.option("nodes.leftExpr")}_getAutoZoomValue(e){const{AutoZoomMode:t}=(0,h.getDiagram)();switch(e){case"fitContent":return t.FitContent;case"fitWidth":return t.FitToWidth;default:return t.Disabled}}_isBindingMode(){return this._nodesOption&&this._nodesOption.hasItems()||this._edgesOption&&this._edgesOption.hasItems()}_beginUpdateDiagram(){this._updateDiagramLockCount++}_endUpdateDiagram(){this._updateDiagramLockCount=Math.max(this._updateDiagramLockCount-1,0),this._updateDiagramLockCount||this._bindDiagramData()}_getCustomShapes(){return this.option("customShapes")||[]}_getToolboxGroups(){return O.default.getGroups(this.option("toolbox.groups"))}_updateAllCustomShapes(){this._diagramInstance.removeAllCustomShapes(),this._updateCustomShapes(this._getCustomShapes())}_updateCustomShapes(e,t){Array.isArray(t)&&this._diagramInstance.removeCustomShapes(t.map((e=>e.type))),Array.isArray(e)&&this._diagramInstance.addCustomShapes(e.map((e=>{const t=e.template||this.option("customShapeTemplate"),i=t&&this._getTemplate(t),n=e.toolboxTemplate||this.option("customShapeToolboxTemplate"),a=n&&this._getTemplate(n);return{category:e.category,type:e.type,baseType:e.baseType,title:e.title,svgUrl:e.backgroundImageUrl,svgToolboxUrl:e.backgroundImageToolboxUrl,svgLeft:e.backgroundImageLeft,svgTop:e.backgroundImageTop,svgWidth:e.backgroundImageWidth,svgHeight:e.backgroundImageHeight,defaultWidth:e.defaultWidth,defaultHeight:e.defaultHeight,toolboxWidthToHeightRatio:e.toolboxWidthToHeightRatio,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,allowResize:e.allowResize,defaultText:e.defaultText,allowEditText:e.allowEditText,textLeft:e.textLeft,textTop:e.textTop,textWidth:e.textWidth,textHeight:e.textHeight,defaultImageUrl:e.defaultImageUrl,allowEditImage:e.allowEditImage,imageLeft:e.imageLeft,imageTop:e.imageTop,imageWidth:e.imageWidth,imageHeight:e.imageHeight,connectionPoints:e.connectionPoints&&e.connectionPoints.map((e=>({x:e.x,y:e.y}))),createTemplate:i&&((e,t)=>{i.render({model:this._nativeItemToDiagramItem(t),container:(0,g.getPublicElement)((0,o.default)(e))})}),createToolboxTemplate:a&&((e,t)=>{a.render({model:this._nativeItemToDiagramItem(t),container:(0,g.getPublicElement)((0,o.default)(e))})}),destroyTemplate:i&&(e=>{(0,o.default)(e).empty()}),templateLeft:e.templateLeft,templateTop:e.templateTop,templateWidth:e.templateWidth,templateHeight:e.templateHeight,keepRatioOnAutoSize:e.keepRatioOnAutoSize}})))}_getViewport(){const e=this.$element().closest(".dx-viewport");return e.length?e:(0,o.default)("body")}_onToggleFullScreen(e){this.toggleFullscreenLock>0||(this._changeNativeFullscreen(e),e?(this._prevParent=this.$element().parent(),this._prevFullScreenZIndex=this.$element().css("zIndex"),this._fullScreenZIndex=C.create(y.default.baseZIndex()),this.$element().css("zIndex",this._fullScreenZIndex),this.$element().appendTo(this._getViewport())):(this.$element().appendTo(this._prevParent),this._fullScreenZIndex&&(C.remove(this._fullScreenZIndex),this.$element().css("zIndex",this._prevFullScreenZIndex))),this.$element().toggleClass("dx-diagram-fullscreen",e),this._processDiagramResize(),this._toolbox&&(this._toolbox.repaint(),this._toolbox._popup.option("propagateOutsideClick",!e)),this._propertiesPanel&&this._propertiesPanel.repaint(),this._historyToolbar&&this._updateHistoryToolbarPosition())}_changeNativeFullscreen(e){const t=(0,p.getWindow)();t.self!==t.top&&e!==this._inNativeFullscreen()&&(e?this._subscribeFullscreenNativeChanged():this._unsubscribeFullscreenNativeChanged(),this._setNativeFullscreen(e))}_setNativeFullscreen(e){const t=(0,p.getWindow)(),i=t.self.document,n=t.self.document.body;e?n.requestFullscreen?n.requestFullscreen():n.mozRequestFullscreen?n.mozRequestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.msRequestFullscreen&&n.msRequestFullscreen():i.exitFullscreen?i.exitFullscreen():i.mozCancelFullscreen?i.mozCancelFullscreen():i.webkitExitFullscreen?i.webkitExitFullscreen():i.msExitFullscreen&&i.msExitFullscreen()}_inNativeFullscreen(){const e=(0,p.getWindow)().document;return!!((e.fullscreenElement||e.msFullscreenElement||e.webkitFullscreenElement)===e.body||e.webkitIsFullscreen)}_subscribeFullscreenNativeChanged(){const e=(0,p.getWindow)().document,t=this._onNativeFullscreenChangeHandler.bind(this);_.default.on(e,ee,t),_.default.on(e,te,t),_.default.on(e,ie,t),_.default.on(e,ne,t)}_unsubscribeFullscreenNativeChanged(){const e=(0,p.getWindow)().document;_.default.off(e,ee),_.default.off(e,te),_.default.off(e,ie),_.default.off(e,ne)}_onNativeFullscreenChangeHandler(){this._inNativeFullscreen()||(this._unsubscribeFullscreenNativeChanged(),this.option("fullScreen",!1))}_executeDiagramFullscreenCommand(e){const{DiagramCommand:t}=(0,h.getDiagram)();this.toggleFullscreenLock++,this._executeDiagramCommand(t.Fullscreen,e),this.toggleFullscreenLock--}_onShowContextMenu(e,t,i){this._contextMenu&&this._contextMenu._show(e,t,i)}_onHideContextMenu(){this._contextMenu&&this._contextMenu._hide()}_onShowContextToolbox(e,t,i,n,o){this._contextToolbox&&this._contextToolbox._show(e,t,i,n,o)}_onHideContextToolbox(){this._contextToolbox&&this._contextToolbox._hide()}_getDiagramUnitValue(e){const{DiagramUnit:t}=(0,h.getDiagram)();switch(e){case"in":default:return t.In;case"cm":return t.Cm;case"px":return t.Px}}_updateReadOnlyState(){const{DiagramCommand:e}=(0,h.getDiagram)(),t=this.isReadOnlyMode();this._executeDiagramCommand(e.ToggleReadOnly,t)}_updateZoomLevelState(){if(this.option("zoomLevel.items")){this._updateZoomLevelItemsState();const e=this.option("zoomLevel.value");if(!e)return;const{DiagramCommand:t}=(0,h.getDiagram)();this._executeDiagramCommand(t.ZoomLevel,e)}else{const e=this.option("zoomLevel.value")||this.option("zoomLevel");if(!e)return;const{DiagramCommand:t}=(0,h.getDiagram)();this._executeDiagramCommand(t.ZoomLevel,e)}}_updateZoomLevelItemsState(){const e=this.option("zoomLevel.items");if(!Array.isArray(e))return;const{DiagramCommand:t}=(0,h.getDiagram)();this._executeDiagramCommand(t.ZoomLevelItems,e)}_updateAutoZoomState(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.SwitchAutoZoom,this._getAutoZoomValue(this.option("autoZoomMode")))}_updateSimpleViewState(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.ToggleSimpleView,this.option("simpleView"))}_updateFullscreenState(){const e=this.option("fullScreen");this._executeDiagramFullscreenCommand(e),this._onToggleFullScreen(e)}_updateShowGridState(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.ShowGrid,this.option("showGrid"))}_updateSnapToGridState(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.SnapToGrid,this.option("snapToGrid"))}_updateGridSizeState(){if(this.option("gridSize.items")){this._updateGridSizeItemsState();const e=this.option("gridSize.value");if(!e)return;const{DiagramCommand:t}=(0,h.getDiagram)();this._executeDiagramCommand(t.GridSize,e)}else{const e=this.option("gridSize.value")||this.option("gridSize");if(!e)return;const{DiagramCommand:t}=(0,h.getDiagram)();this._executeDiagramCommand(t.GridSize,e)}}_updateGridSizeItemsState(){const e=this.option("gridSize.items");if(!Array.isArray(e))return;const{DiagramCommand:t}=(0,h.getDiagram)();this._executeDiagramCommand(t.GridSizeItems,e)}_updateUnitItems(){const{DiagramLocalizationService:e}=(0,h.getDiagram)(),t=this._getUnitItems();this._unitItems!==t&&(this._unitItems=t,e.unitItems=t)}_getUnitItems(){const{DiagramUnit:e}=(0,h.getDiagram)(),t={};return t[e.In]=m.default.format("dxDiagram-unitIn"),t[e.Cm]=m.default.format("dxDiagram-unitCm"),t[e.Px]=m.default.format("dxDiagram-unitPx"),t}_updateFormatUnitsMethod(){const{DiagramLocalizationService:e}=(0,h.getDiagram)();e.formatUnit=function(e){return v.default.format(e)}}_updateViewUnitsState(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.ViewUnits,this._getDiagramUnitValue(this.option("viewUnits")))}_updateUnitsState(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.Units,this._getDiagramUnitValue(this.option("units")))}_updatePageSizeState(){const e=this.option("pageSize");if(!e||!e.width||!e.height)return;const{DiagramCommand:t}=(0,h.getDiagram)();this._executeDiagramCommand(t.PageSize,e)}_updatePageSizeItemsState(){const e=this.option("pageSize.items");if(!Array.isArray(e))return;const{DiagramCommand:t}=(0,h.getDiagram)();this._executeDiagramCommand(t.PageSizeItems,e)}_updatePageOrientationState(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.PageLandscape,"landscape"===this.option("pageOrientation"))}_updatePageColorState(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.PageColor,this.option("pageColor"))}_updateShapeTexts(){const{DiagramLocalizationService:e}=(0,h.getDiagram)(),t=this._getShapeTexts();this._shapeTexts!==t&&(this._shapeTexts=t,e.shapeTexts=t)}_getShapeTexts(){const{ShapeTypes:e}=(0,h.getDiagram)(),t={};return t[e.Text]=m.default.format("dxDiagram-shapeText"),t[e.Rectangle]=m.default.format("dxDiagram-shapeRectangle"),t[e.Ellipse]=m.default.format("dxDiagram-shapeEllipse"),t[e.Cross]=m.default.format("dxDiagram-shapeCross"),t[e.Triangle]=m.default.format("dxDiagram-shapeTriangle"),t[e.Diamond]=m.default.format("dxDiagram-shapeDiamond"),t[e.Heart]=m.default.format("dxDiagram-shapeHeart"),t[e.Pentagon]=m.default.format("dxDiagram-shapePentagon"),t[e.Hexagon]=m.default.format("dxDiagram-shapeHexagon"),t[e.Octagon]=m.default.format("dxDiagram-shapeOctagon"),t[e.Star]=m.default.format("dxDiagram-shapeStar"),t[e.ArrowLeft]=m.default.format("dxDiagram-shapeArrowLeft"),t[e.ArrowUp]=m.default.format("dxDiagram-shapeArrowUp"),t[e.ArrowRight]=m.default.format("dxDiagram-shapeArrowRight"),t[e.ArrowDown]=m.default.format("dxDiagram-shapeArrowDown"),t[e.ArrowUpDown]=m.default.format("dxDiagram-shapeArrowUpDown"),t[e.ArrowLeftRight]=m.default.format("dxDiagram-shapeArrowLeftRight"),t[e.Process]=m.default.format("dxDiagram-shapeProcess"),t[e.Decision]=m.default.format("dxDiagram-shapeDecision"),t[e.Terminator]=m.default.format("dxDiagram-shapeTerminator"),t[e.PredefinedProcess]=m.default.format("dxDiagram-shapePredefinedProcess"),t[e.Document]=m.default.format("dxDiagram-shapeDocument"),t[e.MultipleDocuments]=m.default.format("dxDiagram-shapeMultipleDocuments"),t[e.ManualInput]=m.default.format("dxDiagram-shapeManualInput"),t[e.Preparation]=m.default.format("dxDiagram-shapePreparation"),t[e.Data]=m.default.format("dxDiagram-shapeData"),t[e.Database]=m.default.format("dxDiagram-shapeDatabase"),t[e.HardDisk]=m.default.format("dxDiagram-shapeHardDisk"),t[e.InternalStorage]=m.default.format("dxDiagram-shapeInternalStorage"),t[e.PaperTape]=m.default.format("dxDiagram-shapePaperTape"),t[e.ManualOperation]=m.default.format("dxDiagram-shapeManualOperation"),t[e.Delay]=m.default.format("dxDiagram-shapeDelay"),t[e.StoredData]=m.default.format("dxDiagram-shapeStoredData"),t[e.Display]=m.default.format("dxDiagram-shapeDisplay"),t[e.Merge]=m.default.format("dxDiagram-shapeMerge"),t[e.Connector]=m.default.format("dxDiagram-shapeConnector"),t[e.Or]=m.default.format("dxDiagram-shapeOr"),t[e.SummingJunction]=m.default.format("dxDiagram-shapeSummingJunction"),t[e.Container]=m.default.format("dxDiagram-shapeContainerDefaultText"),t[e.VerticalContainer]=m.default.format("dxDiagram-shapeVerticalContainer"),t[e.HorizontalContainer]=m.default.format("dxDiagram-shapeHorizontalContainer"),t[e.Card]=m.default.format("dxDiagram-shapeCardDefaultText"),t[e.CardWithImageOnLeft]=m.default.format("dxDiagram-shapeCardWithImageOnLeft"),t[e.CardWithImageOnTop]=m.default.format("dxDiagram-shapeCardWithImageOnTop"),t[e.CardWithImageOnRight]=m.default.format("dxDiagram-shapeCardWithImageOnRight"),t}_updateEventSubscriptionMethods(){const{RenderHelper:e}=(0,h.getDiagram)();e.addEventListener=(e,t,i)=>{_.default.on(e,t,i)},e.removeEventListener=(e,t,i)=>{_.default.off(e,t,i)}}_updateDefaultItemProperties(){this.option("defaultItemProperties.style")&&this._diagramInstance.setInitialStyleProperties(this.option("defaultItemProperties.style")),this.option("defaultItemProperties.textStyle")&&this._diagramInstance.setInitialTextStyleProperties(this.option("defaultItemProperties.textStyle")),this._diagramInstance.setInitialConnectorProperties({lineOption:this._getConnectorLineOption(this.option("defaultItemProperties.connectorLineType")),startLineEnding:this._getConnectorLineEnding(this.option("defaultItemProperties.connectorLineStart")),endLineEnding:this._getConnectorLineEnding(this.option("defaultItemProperties.connectorLineEnd"))}),this._diagramInstance.applyShapeSizeSettings({shapeMinWidth:this.option("defaultItemProperties.shapeMinWidth"),shapeMaxWidth:this.option("defaultItemProperties.shapeMaxWidth"),shapeMinHeight:this.option("defaultItemProperties.shapeMinHeight"),shapeMaxHeight:this.option("defaultItemProperties.shapeMaxHeight")})}_updateEditingSettings(){this._diagramInstance.applyOperationSettings({addShape:this.option("editing.allowAddShape"),addShapeFromToolbox:this.option("editing.allowAddShape"),deleteShape:this.option("editing.allowDeleteShape"),deleteConnector:this.option("editing.allowDeleteConnector"),changeConnection:this.option("editing.allowChangeConnection"),changeConnectorPoints:this.option("editing.allowChangeConnectorPoints"),changeShapeText:this.option("editing.allowChangeShapeText"),changeConnectorText:this.option("editing.allowChangeConnectorText"),resizeShape:this.option("editing.allowResizeShape"),moveShape:this.option("editing.allowMoveShape")})}fitToContent(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.FitToScreen)}fitToWidth(){const{DiagramCommand:e}=(0,h.getDiagram)();this._executeDiagramCommand(e.FitToWidth)}focus(){this._captureFocus()}export(){return this._getDiagramData()}exportTo(e,t){const i=this._getDiagramExportToCommand(e);this._executeDiagramCommand(i,t)}_getDiagramExportToCommand(e){const{DiagramCommand:t}=(0,h.getDiagram)();switch(e){case"png":return t.ExportPng;case"jpg":return t.ExportJpg;default:return t.ExportSvg}}import(e,t){this._setDiagramData(e,t),this._raiseDataChangeAction()}updateToolbox(){this._diagramInstance&&this._diagramInstance.refreshToolbox(),this._toolbox&&(this._toolbox.updateTooltips(),this._toolbox.updateFilter(),this._toolbox.updateMaxHeight())}_getDefaultOptions(){return(0,l.extend)(super._getDefaultOptions(),{readOnly:!1,zoomLevel:1,simpleView:!1,autoZoomMode:Y,fullScreen:!1,showGrid:!0,snapToGrid:!0,units:q,viewUnits:q,pageOrientation:X,pageColor:Q,hasChanges:!1,nodes:{dataSource:null,keyExpr:"id",customDataExpr:void 0,lockedExpr:void 0,styleExpr:void 0,textStyleExpr:void 0,zIndexExpr:void 0,typeExpr:"type",textExpr:"text",imageUrlExpr:void 0,parentKeyExpr:void 0,itemsExpr:void 0,leftExpr:void 0,topExpr:void 0,widthExpr:void 0,heightExpr:void 0,containerKeyExpr:"containerKey",containerChildrenExpr:void 0,autoLayout:"auto",autoSizeEnabled:!0},edges:{dataSource:null,keyExpr:"id",customDataExpr:void 0,lockedExpr:void 0,styleExpr:void 0,textStyleExpr:void 0,zIndexExpr:void 0,fromExpr:"from",fromPointIndexExpr:void 0,toExpr:"to",toPointIndexExpr:void 0,pointsExpr:void 0,textExpr:void 0,lineTypeExpr:void 0,fromLineEndExpr:void 0,toLineEndExpr:void 0},customShapes:[],toolbox:{visibility:"auto",shapeIconsPerRow:3,showSearch:!0},mainToolbar:{visible:!1},historyToolbar:{visible:!0},viewToolbar:{visible:!0},contextMenu:{enabled:!0},contextToolbox:{enabled:!0,shapeIconsPerRow:4,width:152},propertiesPanel:{visibility:"auto"},defaultItemProperties:{connectorLineType:"orthogonal",connectorLineStart:"none",connectorLineEnd:"arrow"},editing:{allowAddShape:!0,allowDeleteShape:!0,allowDeleteConnector:!0,allowChangeConnection:!0,allowChangeConnectorPoints:!0,allowChangeShapeText:!0,allowChangeConnectorText:!0,allowResizeShape:!0,allowMoveShape:!0},export:{fileName:"Diagram"},onItemClick:null,onItemDblClick:null,onSelectionChanged:null,onRequestEditOperation:null,onRequestLayoutUpdate:null})}_raiseDataChangeAction(){this._initialized&&this.option("hasChanges",!0)}_raiseEdgeInsertedAction(e,t,i){this._edgesOption&&this._edgesOption.insert(e,t,i)}_raiseEdgeUpdatedAction(e,t,i,n){this._edgesOption&&this._edgesOption.update(e,t,i,n)}_raiseEdgeRemovedAction(e,t,i,n){this._edgesOption&&this._edgesOption.remove(e,t,i,n)}_raiseNodeInsertedAction(e,t,i){this._nodesOption&&this._nodesOption.insert(e,t,i)}_raiseNodeUpdatedAction(e,t,i,n){this._nodesOption&&this._nodesOption.update(e,t,i,n)}_raiseNodeRemovedAction(e,t,i,n){this._nodesOption&&this._nodesOption.remove(e,t,i,n)}_raiseToolboxDragStart(){this._toolbox&&this.isMobileScreenSize()&&(this._toolbox.hide(),this._toolboxDragHidden=!0)}_raiseToolboxDragEnd(){this._toolbox&&this._toolboxDragHidden&&(this._toolbox.show(),delete this._toolboxDragHidden)}_raiseTextInputStart(){this._textInputStarted=!0,this._propertiesPanel&&this.isMobileScreenSize()&&this._propertiesPanel.isVisible()&&(this._propertiesPanel.hide(),this._propertiesPanelTextInputHidden=!0),this._toolbox&&this.isMobileScreenSize()&&this._toolbox.isVisible()&&(this._toolbox.hide(),this._toolboxTextInputHidden=!0)}_raiseTextInputEnd(){this._propertiesPanel&&this._propertiesPanelTextInputHidden&&(this._propertiesPanel.show(),delete this._propertiesPanelTextInputHidden),this._toolbox&&this._toolboxTextInputHidden&&(this._toolbox.show(),delete this._toolboxTextInputHidden),this._textInputStarted=!1}_createItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")}_createItemDblClickAction(){this._itemDblClickAction=this._createActionByOption("onItemDblClick")}_createSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged")}_createRequestEditOperationAction(){this._requestEditOperationAction=this._createActionByOption("onRequestEditOperation")}_createRequestLayoutUpdateAction(){this._requestLayoutUpdateAction=this._createActionByOption("onRequestLayoutUpdate")}_createCustomCommand(){this._customCommandAction=this._createActionByOption("onCustomCommand")}_raiseItemClickAction(e){this._itemClickAction||this._createItemClickAction(),this._itemClickAction({item:this._nativeItemToDiagramItem(e)})}_raiseItemDblClickAction(e){this._itemDblClickAction||this._createItemDblClickAction(),this._itemDblClickAction({item:this._nativeItemToDiagramItem(e)})}_raiseSelectionChanged(e){this._selectionChangedAction||this._createSelectionChangedAction(),this._selectionChangedAction({items:e.map(this._nativeItemToDiagramItem.bind(this))})}_raiseRequestEditOperation(e,t){this._requestEditOperationAction||this._createRequestEditOperationAction();const i=this._getRequestEditOperationEventArgs(e,t);this._requestEditOperationAction(i),t.allowed=i.allowed}_getModelOperation(e){const{DiagramModelOperation:t}=(0,h.getDiagram)();switch(e){case t.AddShape:return"addShape";case t.AddShapeFromToolbox:return"addShapeFromToolbox";case t.DeleteShape:return"deleteShape";case t.DeleteConnector:return"deleteConnector";case t.ChangeConnection:return"changeConnection";case t.ChangeConnectorPoints:return"changeConnectorPoints";case t.BeforeChangeShapeText:return"beforeChangeShapeText";case t.ChangeShapeText:return"changeShapeText";case t.BeforeChangeConnectorText:return"beforeChangeConnectorText";case t.ChangeConnectorText:return"changeConnectorText";case t.ResizeShape:return"resizeShape";case t.MoveShape:return"moveShape"}}_getRequestEditOperationEventArgs(e,t){const{DiagramModelOperation:i,ConnectorPosition:n}=(0,h.getDiagram)(),o={operation:this._getModelOperation(e),allowed:t.allowed,updateUI:t.updateUI,reason:t.updateUI?"checkUIElementAvailability":"modelModification"};switch(e){case i.AddShape:o.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape),position:t.position&&{x:t.position.x,y:t.position.y}};break;case i.AddShapeFromToolbox:o.args={shapeType:t.shapeType};break;case i.DeleteShape:o.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape)};break;case i.DeleteConnector:o.args={connector:t.connector&&this._nativeItemToDiagramItem(t.connector)};break;case i.ChangeConnection:o.args={newShape:t.shape&&this._nativeItemToDiagramItem(t.shape),oldShape:t.oldShape&&this._nativeItemToDiagramItem(t.oldShape),connector:t.connector&&this._nativeItemToDiagramItem(t.connector),connectionPointIndex:t.connectionPointIndex,connectorPosition:t.position===n.Begin?"start":"end"};break;case i.ChangeConnectorPoints:o.args={connector:t.connector&&this._nativeItemToDiagramItem(t.connector),newPoints:t.points&&t.points.map((e=>({x:e.x,y:e.y}))),oldPoints:t.oldPoints&&t.oldPoints.map((e=>({x:e.x,y:e.y})))};break;case i.BeforeChangeShapeText:o.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape)};break;case i.ChangeShapeText:o.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape),text:t.text};break;case i.BeforeChangeConnectorText:o.args={connector:t.connector&&this._nativeItemToDiagramItem(t.connector),index:t.index};break;case i.ChangeConnectorText:o.args={connector:t.connector&&this._nativeItemToDiagramItem(t.connector),index:t.index,text:t.text};break;case i.ResizeShape:o.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape),newSize:t.size&&{width:t.size.width,height:t.size.height},oldSize:t.oldSize&&{width:t.oldSize.width,height:t.oldSize.height}};break;case i.MoveShape:o.args={shape:t.shape&&this._nativeItemToDiagramItem(t.shape),newPosition:t.position&&{x:t.position.x,y:t.position.y},oldPosition:t.oldPosition&&{x:t.oldPosition.x,y:t.oldPosition.y}}}return o}_nativeItemToDiagramItem(e){const{NativeShape:t}=(0,h.getDiagram)(),i=e instanceof t?this._nativeShapeToDiagramShape.bind(this):this._nativeConnectorToDiagramConnector.bind(this);return(0,l.extend)({id:e.id,key:e.key,dataItem:void 0},i(e))}_nativeShapeToDiagramShape(e){return{dataItem:this._nodesOption&&this._nodesOption.findItem(e.key),itemType:"shape",text:e.text,type:e.type,position:{x:e.position.x,y:e.position.y},size:{width:e.size.width,height:e.size.height},attachedConnectorIds:e.attachedConnectorIds,containerId:e.containerId,containerChildItemIds:e.containerChildItemIds,containerExpanded:e.containerExpanded}}_nativeConnectorToDiagramConnector(e){return{dataItem:this._edgesOption&&this._edgesOption.findItem(e.key),itemType:"connector",texts:e.texts,fromKey:e.fromKey,toKey:e.toKey,fromId:e.fromId,fromPointIndex:e.fromPointIndex,toId:e.toId,toPointIndex:e.toPointIndex,points:e.points.map((e=>({x:e.x,y:e.y})))}}getItemByKey(e){const t=this._diagramInstance&&this._diagramInstance.getNativeItemByDataKey(e);return t&&this._nativeItemToDiagramItem(t)}getItemById(e){const t=this._diagramInstance&&this._diagramInstance.getNativeItemByKey(e);return t&&this._nativeItemToDiagramItem(t)}getItems(){return this._diagramInstance.getNativeItems().map((e=>e&&this._nativeItemToDiagramItem(e)))}getSelectedItems(){return this._diagramInstance.getNativeSelectedItems().map((e=>e&&this._nativeItemToDiagramItem(e)))}setSelectedItems(e){return this._diagramInstance.setSelectedItems(e.map((e=>e.id)))}scrollToItem(e){return this._diagramInstance.scrollToItems([e.id])}_invalidateContextMenuCommands(){this._contextMenu&&this._contextMenu.option({commands:this.option("contextMenu.commands")})}_invalidateMainToolbarCommands(){this._mainToolbar&&this._mainToolbar.option({commands:this.option("mainToolbar.commands")})}_invalidateHistoryToolbarCommands(){this._historyToolbar&&this._historyToolbar.option({commands:this.option("historyToolbar.commands")})}_invalidateViewToolbarCommands(){this._viewToolbar&&this._viewToolbar.option({commands:this.option("viewToolbar.commands")})}_invalidateToolboxGroups(){this._toolbox&&this._toolbox.option({toolboxGroups:this._getToolboxGroups()})}_optionChanged(e){if(this.optionsUpdateBar&&!this.optionsUpdateBar.isUpdateLocked()){this.optionsUpdateBar.beginUpdate();try{this._optionChangedCore(e)}finally{this.optionsUpdateBar.endUpdate()}}}_optionChangedCore(e){switch(e.name){case"readOnly":case"disabled":this._updateReadOnlyState(),this._invalidate();break;case"zoomLevel":"zoomLevel"!==e.fullName&&"zoomLevel.items"!==e.fullName&&"zoomLevel.value"!==e.fullName||this._updateZoomLevelState();break;case"autoZoomMode":this._updateAutoZoomState();break;case"simpleView":this._updateSimpleViewState();break;case"useNativeScrolling":case"contextToolbox":case"propertiesPanel":this._invalidate();break;case"fullScreen":this._updateFullscreenState();break;case"showGrid":this._updateShowGridState();break;case"snapToGrid":this._updateSnapToGridState();break;case"gridSize":"gridSize"!==e.fullName&&"gridSize.items"!==e.fullName&&"gridSize.value"!==e.fullName||this._updateGridSizeState();break;case"viewUnits":this._updateViewUnitsState();break;case"units":this._updateUnitsState();break;case"pageSize":"pageSize"!==e.fullName&&"pageSize.items"!==e.fullName||this._updatePageSizeItemsState(),"pageSize"!==e.fullName&&"pageSize.width"!==e.fullName&&"pageSize.height"!==e.fullName||this._updatePageSizeState();break;case"pageOrientation":this._updatePageOrientationState();break;case"pageColor":this._updatePageColorState();break;case"nodes":0===e.fullName.indexOf("nodes.autoLayout")?this._refreshDataSources():this._refreshNodesDataSource();break;case"edges":this._refreshEdgesDataSource();break;case"customShapes":e.fullName!==e.name?this._updateAllCustomShapes():this._updateCustomShapes(e.value,e.previousValue),this._invalidate();break;case"contextMenu":"contextMenu.commands"===e.fullName?this._invalidateContextMenuCommands():this._invalidate();break;case"toolbox":"toolbox.groups"===e.fullName?this._invalidateToolboxGroups():this._invalidate();break;case"mainToolbar":"mainToolbar.commands"===e.fullName?this._invalidateMainToolbarCommands():this._invalidate();break;case"historyToolbar":"historyToolbar.commands"===e.fullName?this._invalidateHistoryToolbarCommands():this._invalidate();break;case"viewToolbar":"viewToolbar.commands"===e.fullName?this._invalidateViewToolbarCommands():this._invalidate();break;case"onItemClick":this._createItemClickAction();break;case"onItemDblClick":this._createItemDblClickAction();break;case"onSelectionChanged":this._createSelectionChangedAction();break;case"onRequestEditOperation":this._createRequestEditOperationAction();break;case"onRequestLayoutUpdate":this._createRequestLayoutUpdateAction();break;case"onCustomCommand":this._createCustomCommand();break;case"defaultItemProperties":this._updateDefaultItemProperties();break;case"editing":this._updateEditingSettings();break;case"export":this._toolbars.forEach((e=>{e.option("export",this.option("export"))})),this._contextMenu&&this._contextMenu.option("export",this.option("export"));break;case"hasChanges":break;default:super._optionChanged(e)}}}(0,r.default)("dxDiagram",oe);t.default=oe;e.exports=t.default,e.exports.default=t.default},41499:function(e,t,i){t.default=void 0;var n=a(i(29339)),o=a(i(43304));function a(e){return e&&e.__esModule?e:{default:e}}class s extends n.default{_getCommands(){return o.default.getMainToolbarCommands(this.option("commands"),this.option("excludeCommands"))}}t.default=s;e.exports=t.default,e.exports.default=t.default},8708:function(e,t,i){t.default=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(69629);const s={getContextMenuItemTemplate(e,t,i,n){const s=(0,o.default)(n);s.empty();const r=void 0!==t.rootCommand?t.rootCommand:-1;if(t.icon&&!t.checked){const e=(0,a.getImageContainer)(t.icon);s.append(e)}else if(e._menuHasCheckedItems&&!0===e._menuHasCheckedItems[r]){const e=(0,a.getImageContainer)("check");e.css("visibility",t.checked?"visible":"hidden"),s.append(e)}s.append('<span class="dx-menu-item-text">'+t.text+"</span>"),Array.isArray(t.items)&&t.items.length>0&&s.append('<span class="dx-menu-item-popout-container"><div class="dx-menu-item-popout"></div></span>')},getContextMenuCssClass:()=>"dx-diagram-contextmenu",onContextMenuItemClick(e,t,i){if(void 0===t.command&&void 0===t.name||Array.isArray(t.items)&&t.items.length){if(void 0!==t.rootCommand&&void 0!==t.value){const n=s.getItemCommandParameter(e,t,t.value);i.call(this,t.rootCommand,void 0,n)}}else{const n=s.getItemCommandParameter(e,t);i.call(this,t.command,t.name,n)}},getItemValue:e=>"object"==typeof e.value?JSON.stringify(e.value):e.value,getItemOptionText(e,t){if(e){t=t.slice();const i=this._getParentItemOptionText(t);e._originalItemsInfo&&e._originalItemsInfo[i]&&(t[t.length-1]+=e._originalItemsInfo[i].indexPathCorrection)}return this._getItemOptionTextCore(t)},_getParentItemOptionText(e){const t=e.slice(0,e.length-1);return this._getItemOptionTextCore(t)},_getItemOptionTextCore:e=>e.reduce(((e,t)=>e+`items[${t}].`),""),getItemCommandParameter:(e,t,i)=>t.getParameter?t.getParameter(e):i,updateContextMenuItems(e,t,i,n){e._originalItemsInfo||(e._originalItemsInfo={}),e._originalItemsInfo[t]||(e._originalItemsInfo[t]={items:e.option(t+"items")||[]}),n=n.map((t=>({value:this.getItemValue(t),text:t.text,checked:t.checked,widget:e,rootCommand:i})));const o=e._originalItemsInfo[t].items;e.option(t+"items",n.concat(o)),e._originalItemsInfo[t]&&o.length&&(e._originalItemsInfo[t].indexPathCorrection=n.length)},updateContextMenuItemVisible(e,t,i){e.option(t+"visible",i)},updateContextMenuItemValue(e,t,i,n){const o=e.option(t+"items");"boolean"!=typeof n||o&&o.length?void 0!==n&&(this._setContextMenuHasCheckedItems(e,i),Array.isArray(o)&&o.forEach(((e,t)=>{e.checked=e.value===n}))):(this._setContextMenuHasCheckedItems(e,-1),e.option(t+"checked",n))},_setContextMenuHasCheckedItems(e,t){e._menuHasCheckedItems||(e._menuHasCheckedItems={}),e._menuHasCheckedItems[t]=!0}};t.default=s;e.exports=t.default,e.exports.default=t.default},29738:function(e,t,i){t.default=void 0;var n=l(i(64553)),o=l(i(11118)),a=l(i(92774)),s=i(98834),r=l(i(89797));function l(e){return e&&e.__esModule?e:{default:e}}const d=(0,s.addNamespace)(r.default.up,"dxDiagramPanel");class u extends o.default{_init(){super._init(),this._createOnPointerUpAction()}_render(){super._render(),this._attachPointerUpEvent()}_getPointerUpElements(){return[this.$element()]}_attachPointerUpEvent(){this._getPointerUpElements().forEach((e=>{a.default.off(e,d),a.default.on(e,d,(e=>{(0,n.default)(e.target).closest(".dx-textbox").length||this._onPointerUpAction()}))}))}_createOnPointerUpAction(){this._onPointerUpAction=this._createActionByOption("onPointerUp")}_optionChanged(e){if("onPointerUp"===e.name)this._createOnPointerUpAction();else super._optionChanged(e)}}t.default=u;e.exports=t.default,e.exports.default=t.default},27574:function(e,t,i){t.default=void 0;var n=i(57653),o=u(i(64553)),a=i(52576),s=u(i(91374)),r=u(i(78175)),l=u(i(80209)),d=u(i(43304));function u(e){return e&&e.__esModule?e:{default:e}}class c extends l.default{_init(){super._init(),this._commandTabs=d.default.getPropertyPanelCommandTabs(this.option("propertyTabs")),this._createOnCreateToolbar(),this._createOnSelectedGroupChanged()}_initMarkup(){this._toolbars=[],this._selectedToolbar=void 0,super._initMarkup()}_getPopupClass(){let e="dx-diagram-properties-popup";return this._hasTabPanel()||(e+=" dx-diagram-properties-popup-notabs"),e}_getPopupWidth(){return this.isMobileView()?"100%":420}_getPopupHeight(){return 340}_getPopupPosition(){const e=this.option("offsetParent");return this.isMobileView()?{my:"left bottom",at:"left bottom",of:e}:{my:"right bottom",at:"right bottom",of:e,offset:"-"+this.option("offsetX")+" -"+this.option("offsetY")}}_getPopupAnimation(){const e=this.option("offsetParent");return this.isMobileView()?{hide:this._getPopupSlideAnimationObject({direction:"bottom",from:{position:{my:"left bottom",at:"left bottom",of:e}},to:{position:{my:"left top",at:"left bottom",of:e}}}),show:this._getPopupSlideAnimationObject({direction:"top",from:{position:{my:"left top",at:"left bottom",of:e}},to:{position:{my:"left bottom",at:"left bottom",of:e}}})}:super._getPopupAnimation()}_getPopupOptions(){return(0,a.extend)(super._getPopupOptions(),{showTitle:this.isMobileView(),showCloseButton:this.isMobileView()})}_renderPopupContent(e){if(!this._commandTabs.length)return;const t=(0,o.default)("<div>").addClass("dx-diagram-properties-panel").appendTo(e);this._hasTabPanel()?this._renderTabPanel(t):this._renderTabContent(t,this._commandTabs[0],0,!0)}_hasTabPanel(){return this._commandTabs.length>1}_renderTabPanel(e){const t=(0,o.default)("<div>").appendTo(e);this._tabPanel=this._createComponent(t,r.default,{focusStateEnabled:!1,dataSource:this._commandTabs,itemTemplate:(e,t,i)=>{this._renderTabContent(i,e,t)},onSelectionChanged:e=>{this._onSelectedGroupChangedAction(),this._onPointerUpAction()},onContentReady:e=>{this._popup.option("height",(0,n.getHeight)(e.component.$element())+this._getVerticalPaddingsAndBorders()),this._firstScrollView&&(this._scrollViewHeight=(0,n.getOuterHeight)(this._firstScrollView.$element()),this._firstScrollView.option("height",this._scrollViewHeight))}})}_renderTabContent(e,t,i,a){const r=(0,o.default)("<div>").appendTo(e),l=this._createComponent(r,s.default,{height:this._scrollViewHeight});this._renderTabInnerContent(l.content(),t,i),a?this._popup.option("height",(0,n.getHeight)(l.$element())+this._getVerticalPaddingsAndBorders()):this._firstScrollView=this._firstScrollView||l}_renderTabInnerContent(e,t,i){t.groups?t.groups.forEach(((t,n)=>{this._renderTabGroupContent(e,i,t.title,t.commands)})):t.commands&&this._renderTabGroupContent(e,i,void 0,t.commands)}_renderTabGroupContent(e,t,i,n){i&&(0,o.default)("<div>").addClass("dx-diagram-properties-panel-group-title").appendTo(e).text(i);const a={$parent:(0,o.default)("<div>").addClass("dx-diagram-properties-panel-group-toolbar").appendTo(e),commands:n};this._onCreateToolbarAction(a),this._toolbars[t]||(this._toolbars[t]=[]),this._toolbars[t].push(a.toolbar),this._selectedToolbar=a.toolbar}getActiveToolbars(){const e=this._tabPanel?this._tabPanel.option("selectedIndex"):0;return this._toolbars[e]}_createOnCreateToolbar(){this._onCreateToolbarAction=this._createActionByOption("onCreateToolbar")}_createOnSelectedGroupChanged(){this._onSelectedGroupChangedAction=this._createActionByOption("onSelectedGroupChanged")}_optionChanged(e){switch(e.name){case"onCreateToolbar":this._createOnCreateToolbar();break;case"onSelectedGroupChanged":this._createOnSelectedGroupChanged();break;case"propertyTabs":this._invalidate();break;default:super._optionChanged(e)}}}t.default=c;e.exports=t.default,e.exports.default=t.default},81567:function(e,t,i){t.default=void 0;var n=a(i(29339)),o=a(i(43304));function a(e){return e&&e.__esModule?e:{default:e}}class s extends n.default{_getCommands(){return o.default.getPropertiesToolbarCommands()}}t.default=s;e.exports=t.default,e.exports.default=t.default},4559:function(e,t,i){t.default=void 0;var n=i(57653),o=d(i(64553)),a=d(i(11118)),s=d(i(91374)),r=i(12062),l=i(11744);function d(e){return e&&e.__esModule?e:{default:e}}class u extends a.default{_init(){super._init();const{EventDispatcher:e}=(0,l.getDiagram)();this.onScroll=new e,this._createOnCreateDiagramAction()}_initMarkup(){super._initMarkup();const e=(0,o.default)("<div>").appendTo(this.$element()),t={direction:"both",bounceEnabled:!1,scrollByContent:!1,onScroll:e=>{let{scrollOffset:t}=e;this._raiseOnScroll(t.left,t.top)}},i=this.option("useNativeScrolling");void 0!==i&&(t.useNative=i),this._scrollView=this._createComponent(e,s.default,t),this._onCreateDiagramAction({$parent:(0,o.default)(this._scrollView.content()),scrollView:this})}setScroll(e,t){this._scrollView.scrollTo({left:e,top:t}),this._raiseOnScrollWithoutPoint()}offsetScroll(e,t){this._scrollView.scrollBy({left:e,top:t}),this._raiseOnScrollWithoutPoint()}getSize(){const{Size:e}=(0,l.getDiagram)(),t=this._scrollView.$element();return new e(Math.floor((0,n.getWidth)(t)),Math.floor((0,n.getHeight)(t)))}getScrollContainer(){return this._scrollView.$element()[0]}getScrollBarWidth(){return this.option("useNativeScrolling")?(0,r.calculateScrollbarWidth)():0}detachEvents(){}_raiseOnScroll(e,t){const{Point:i}=(0,l.getDiagram)();this.onScroll.raise("notifyScrollChanged",(()=>new i(e,t)))}_raiseOnScrollWithoutPoint(){const{Point:e}=(0,l.getDiagram)();this.onScroll.raise("notifyScrollChanged",(()=>new e(this._scrollView.scrollLeft(),this._scrollView.scrollTop())))}_createOnCreateDiagramAction(){this._onCreateDiagramAction=this._createActionByOption("onCreateDiagram")}_optionChanged(e){switch(e.name){case"onCreateDiagram":this._createOnCreateDiagramAction();break;case"useNativeScrolling":break;default:super._optionChanged(e)}}}t.default=u;e.exports=t.default,e.exports.default=t.default},29339:function(e,t,i){t.default=void 0;var n=i(57653),o=p(i(64553)),a=p(i(2850)),s=p(i(34378)),r=p(i(35629)),l=i(52576),d=i(3104),u=p(i(29738)),c=p(i(8708)),h=i(11744);function p(e){return e&&e.__esModule?e:{default:e}}i(60695),i(87928),i(94319);const g="dx-diagram-mobile-toolbar-color-box-opened";class _ extends u.default{_init(){this._commands=[],this._itemHelpers={},this._commandContextMenus={},this._contextMenuList=[],this._valueConverters={},this.bar=new f(this),this._createOnInternalCommand(),this._createOnCustomCommand(),this._createOnSubMenuVisibilityChangingAction(),super._init()}_initMarkup(){super._initMarkup();const e=!(0,d.hasWindow)();this.option("skipAdjustSize")||e||(0,n.setWidth)(this.$element(),""),this._commands=this._getCommands(),this._itemHelpers={},this._commandContextMenus={},this._contextMenuList=[];const t=this._createMainElement();if(this._renderToolbar(t),!this.option("skipAdjustSize")&&!e){const e=this.$element().find(".dx-toolbar-before");(0,n.setWidth)(this.$element(),(0,n.getWidth)(e))}}_createMainElement(){return(0,o.default)("<div>").addClass("dx-diagram-toolbar").appendTo(this._$element)}_getCommands(){return this.option("commands")||[]}_renderToolbar(e){const t=this._commands.filter((e=>-1===["after","center"].indexOf(e.location))),i=this._commands.filter((e=>"center"===e.location)),n=this._commands.filter((e=>"after"===e.location)),o=[].concat(this._prepareToolbarItems(t,"before",this._executeCommand)).concat(this._prepareToolbarItems(i,"center",this._executeCommand)).concat(this._prepareToolbarItems(n,"after",this._executeCommand));this._toolbarInstance=this._createComponent(e,a.default,{dataSource:o})}_prepareToolbarItems(e,t,i){return e.map((e=>(0,l.extend)(!0,{location:t,locateInMenu:this.option("locateInMenu")},this._createItem(e,t,i),this._createItemOptions(e),this._createItemActionOptions(e,i))))}_createItem(e,t,i){return(e.getCommandValue||e.getEditorValue||e.getEditorDisplayValue)&&(this._valueConverters[e.command]={getCommandValue:e.getCommandValue,getEditorValue:e.getEditorValue,getEditorDisplayValue:e.getEditorDisplayValue}),"separator"===e.widget?{template:(e,t,i)=>{(0,o.default)(i).addClass("dx-diagram-toolbar-separator")},menuItemTemplate:(e,t,i)=>{(0,o.default)(i).addClass("dx-diagram-toolbar-menu-separator")}}:{widget:e.widget||"dxButton",cssClass:e.cssClass,options:{stylingMode:this.option("buttonStylingMode"),type:this.option("buttonType"),text:e.text,hint:e.hint,icon:e.icon||e.iconUnchecked||e.iconChecked,iconChecked:e.iconChecked,iconUnchecked:e.iconUnchecked,onInitialized:t=>this._onItemInitialized(t.component,e),onContentReady:t=>this._onItemContentReady(t.component,e,i)}}}_createItemOptions(e){let{widget:t,command:i,items:n,valueExpr:o,displayExpr:a,showText:s,hint:r,icon:l}=e;return"dxSelectBox"===t?this._createSelectBoxItemOptions(i,r,n,o,a):"dxTextBox"===t?this._createTextBoxItemOptions(i,r):"dxColorBox"===t?this._createColorBoxItemOptions(i,r,l):t&&"dxButton"!==t?void 0:{showText:s||"inMenu"}}_createSelectBoxItemOptions(e,t,i,n,a){let s=this._createTextEditorItemOptions(t);s=(0,l.extend)(!0,s,{options:{dataSource:i,displayExpr:a||"text",valueExpr:n||"value"}});const r=i&&i.every((e=>void 0!==e.icon));return r&&(s=(0,l.extend)(!0,s,{options:{fieldTemplate:(e,t)=>{(0,o.default)("<i>").addClass(e&&e.icon||"dx-diagram-i-selectbox-null-icon dx-diagram-i").appendTo(t),(0,o.default)("<div>").dxTextBox({readOnly:!0,stylingMode:"outlined"}).appendTo(t)},itemTemplate:(e,t,i)=>((0,o.default)(i).attr("title",e.hint),`<i class="${e.icon}"></i>`)}})),s}_createTextBoxItemOptions(e,t){let i=this._createTextEditorItemOptions(t);return i=(0,l.extend)(!0,i,{options:{readOnly:!0,focusStateEnabled:!1,hoverStateEnabled:!1,buttons:[{name:"dropDown",location:"after",options:{icon:"spindown",disabled:!1,stylingMode:"text",onClick:t=>{const i=this._commandContextMenus[e];i&&this._toggleContextMenu(i)}}}]}}),i}_createColorBoxItemOptions(e,t,i){let n=this._createTextEditorItemOptions(t);return i&&(n=(0,l.extend)(!0,n,{options:{openOnFieldClick:!0,fieldTemplate:(e,t)=>{(0,o.default)("<i>").addClass(i).css("borderBottomColor",e).appendTo(t),(0,o.default)("<div>").dxTextBox({readOnly:!0,stylingMode:"outlined"}).appendTo(t)}}})),n=(0,l.extend)(!0,n,{options:{onOpened:()=>{this.option("isMobileView")&&(0,o.default)("body").addClass(g)},onClosed:()=>{(0,o.default)("body").removeClass(g)}}}),n}_createTextEditorItemOptions(e){return{options:{stylingMode:this.option("editorStylingMode"),hint:e}}}_createItemActionOptions(e,t){switch(e.widget){case"dxSelectBox":case"dxColorBox":case"dxCheckBox":return{options:{onValueChanged:i=>{const n=c.default.getItemCommandParameter(this,e,i.component.option("value"));t.call(this,e.command,e.name,n)}}};case"dxTextBox":return{};default:return{options:{onClick:i=>{if(e.items){const e=i.component._contextMenu;e&&this._toggleContextMenu(e)}else{const i=c.default.getItemCommandParameter(this,e);t.call(this,e.command,e.name,i)}}}}}}_toggleContextMenu(e){this._contextMenuList.forEach((t=>{e!==t&&t.hide()})),e.toggle()}_onItemInitialized(e,t){this._addItemHelper(t.command,new m(e))}_onItemContentReady(e,t,i){if(("dxButton"===e.NAME||"dxTextBox"===e.NAME)&&t.items){const n=this._isTouchMode(),a=(0,o.default)("<div>").appendTo(this.$element());e._contextMenu=this._createComponent(a,s.default,{items:t.items,target:e.$element(),cssClass:c.default.getContextMenuCssClass(),showEvent:"",hideOnOutsideClick:t=>!n&&0===(0,o.default)(t.target).closest(e._contextMenu._dropDownButtonElement).length,focusStateEnabled:!1,position:{at:"left bottom"},itemTemplate:function(e,t,i){c.default.getContextMenuItemTemplate(this,e,t,i)},onItemClick:e=>{let{component:t,itemData:n}=e;c.default.onContextMenuItemClick(this,n,i.bind(this)),n.items&&n.items.length||t.hide()},onShowing:e=>{this._showingSubMenu||(this._showingSubMenu=e.component,this._onSubMenuVisibilityChangingAction({visible:!0,component:this}),e.component.option("items",e.component.option("items")),delete this._showingSubMenu)},onInitialized:i=>{let{component:n}=i;return this._onContextMenuInitialized(n,t,e)},onDisposing:e=>{let{component:i}=e;return this._onContextMenuDisposing(i,t)}}),n||(e._contextMenu._dropDownButtonElement=e.$element(),"dxTextBox"===e.NAME&&(e._contextMenu._dropDownButtonElement=e.getButton("dropDown").element()))}}_isTouchMode(){const{Browser:e}=(0,h.getDiagram)();return e.TouchUI}_onContextMenuInitialized(e,t,i){this._contextMenuList.push(e),t.command&&(this._commandContextMenus[t.command]=e),this._addContextMenuHelper(t,e,[],i)}_addItemHelper(e,t){if(void 0!==e){if(this._itemHelpers[e])throw new Error("Toolbar cannot contain duplicated commands.");this._itemHelpers[e]=t}}_addContextMenuHelper(e,t,i,n){e.items&&e.items.forEach(((e,o)=>{const a=i.concat(o);this._addItemHelper(e.command,new v(t,a,e.command,n)),this._addContextMenuHelper(e,t,a,n)}))}_onContextMenuDisposing(e,t){this._contextMenuList.splice(this._contextMenuList.indexOf(e),1),delete this._commandContextMenus[t.command]}_executeCommand(e,t,i){if(!this._updateLocked){if("number"==typeof e){const t=this._valueConverters[e];t&&t.getCommandValue&&(i=t.getCommandValue(i)),this.bar.raiseBarCommandExecuted(e,i)}else"string"==typeof e&&this._onInternalCommandAction({command:e});void 0!==t&&this._onCustomCommandAction({name:t})}}_createOnInternalCommand(){this._onInternalCommandAction=this._createActionByOption("onInternalCommand")}_createOnCustomCommand(){this._onCustomCommandAction=this._createActionByOption("onCustomCommand")}_setItemEnabled(e,t){if(e in this._itemHelpers){const i=this._itemHelpers[e];i.canUpdate(this._showingSubMenu)&&i.setEnabled(t)}}_setEnabled(e){this._toolbarInstance.option("disabled",!e),this._contextMenuList.forEach((t=>{t.option("disabled",!e)}))}_setItemValue(e,t){try{if(this._updateLocked=!0,e in this._itemHelpers){const i=this._itemHelpers[e];if(i.canUpdate(this._showingSubMenu)){const n=this._valueConverters[e];let o;n&&n.getEditorValue&&(t=n.getEditorValue(t)),n&&n.getEditorDisplayValue&&(o=n.getEditorDisplayValue(t));const a=this._commandContextMenus[e];i.setValue(t,o,a,a&&e)}}}finally{this._updateLocked=!1}}_setItemSubItems(e,t){if(this._updateLocked=!0,e in this._itemHelpers){const i=this._itemHelpers[e];if(i.canUpdate(this._showingSubMenu)){const n=this._commandContextMenus[e];i.setItems(t,n,n&&e)}}this._updateLocked=!1}_createOnSubMenuVisibilityChangingAction(){this._onSubMenuVisibilityChangingAction=this._createActionByOption("onSubMenuVisibilityChanging")}_optionChanged(e){switch(e.name){case"isMobileView":(0,o.default)("body").removeClass(g),this._invalidate();break;case"onSubMenuVisibilityChanging":this._createOnSubMenuVisibilityChangingAction();break;case"onInternalCommand":this._createOnInternalCommand();break;case"onCustomCommand":this._createOnCustomCommand();break;case"container":case"commands":this._invalidate();break;case"export":break;default:super._optionChanged(e)}}_getDefaultOptions(){return(0,l.extend)(super._getDefaultOptions(),{isMobileView:!1,export:{fileName:"Diagram"},locateInMenu:"auto",buttonStylingMode:"text",buttonType:"normal",editorStylingMode:"filled",skipAdjustSize:!1})}setCommandChecked(e,t){this._setItemValue(e,t)}setCommandEnabled(e,t){this._setItemEnabled(e,t)}}class f extends r.default{getCommandKeys(){return this._getKeys(this._owner._commands)}setItemValue(e,t){this._owner._setItemValue(e,t)}setItemEnabled(e,t){this._owner._setItemEnabled(e,t)}setEnabled(e){this._owner._setEnabled(e)}setItemSubItems(e,t){this._owner._setItemSubItems(e,t)}}class m{constructor(e){this._widget=e}canUpdate(e){return void 0===e}setEnabled(e){this._widget.option("disabled",!e)}setValue(e,t,i,n){"value"in this._widget.option()?this._updateEditorValue(e,t):void 0!==e&&this._updateButtonValue(e),i&&this._updateContextMenuItemValue(i,"",n,e)}setItems(e,t,i){t?this._updateContextMenuItems(t,"",i,e):this._updateEditorItems(e)}_updateContextMenuItems(e,t,i,n){c.default.updateContextMenuItems(e,t,i,n)}_updateEditorItems(e){"items"in this._widget.option()&&this._widget.option("items",e.map((e=>({value:c.default.getItemValue(e),text:e.text}))))}_updateEditorValue(e,t){this._widget.option("value",e),!this._widget.option("selectedItem")&&t&&this._widget.option("value",t)}_updateButtonValue(e){this._widget.option("iconChecked")&&this._widget.option("iconUnchecked")?this._widget.option("icon",e?this._widget.option("iconChecked"):this._widget.option("iconUnchecked")):this._widget.$element().toggleClass("dx-format-active",e)}_updateContextMenuItemValue(e,t,i,n){c.default.updateContextMenuItemValue(e,t,i,n)}}class v extends m{constructor(e,t,i,n){super(e),this._indexPath=t,this._rootCommandKey=i,this._rootWidget=n}canUpdate(e){return super.canUpdate(e)||e===this._widget}setEnabled(e){this._widget.option(this._getItemOptionText()+"disabled",!e);const t=this._hasEnabledCommandItems(this._widget.option("items"));this._rootWidget.option("disabled",!t)}_hasEnabledCommandItems(e){return!!e&&e.some((e=>void 0!==e.command&&!e.disabled||this._hasEnabledCommandItems(e.items)))}setValue(e){this._updateContextMenuItemValue(this._widget,this._getItemOptionText(),this._rootCommandKey,e)}setItems(e){this._updateContextMenuItems(this._widget,this._getItemOptionText(),this._rootCommandKey,e)}_getItemOptionText(){return c.default.getItemOptionText(this._widget,this._indexPath)}}t.default=_;e.exports=t.default,e.exports.default=t.default},50427:function(e,t,i){t.default=void 0;var n=i(57653),o=_(i(64553)),a=i(52576),s=i(3104),r=i(87739),l=_(i(4671)),d=_(i(20780)),u=_(i(30543)),c=_(i(91374)),h=_(i(93370)),p=i(11744),g=_(i(80209));function _(e){return e&&e.__esModule?e:{default:e}}const f="shape-toolbox-tooltip";class m extends g.default{_init(){super._init(),this._toolboxes=[],this._filterText="",this._createOnShapeCategoryRenderedAction(),this._createOnFilterChangedAction()}_getPopupClass(){return"dx-diagram-toolbox-popup"}_getPopupHeight(){return this.isMobileView()?"100%":super._getPopupHeight()}_getPopupMaxHeight(){return this.isMobileView()?"100%":super._getPopupMaxHeight()}_getPopupMinHeight(){return 130}_getPopupPosition(){const e={my:"left top",at:"left top",of:this.option("offsetParent")};return this.isMobileView()?e:(0,a.extend)(e,{offset:this.option("offsetX")+" "+this.option("offsetY")})}_getPopupAnimation(){const e=this.option("offsetParent");return this.isMobileView()?{hide:this._getPopupSlideAnimationObject({direction:"left",from:{position:{my:"left top",at:"left top",of:e}},to:{position:{my:"right top",at:"left top",of:e}}}),show:this._getPopupSlideAnimationObject({direction:"right",from:{position:{my:"right top",at:"left top",of:e}},to:{position:{my:"left top",at:"left top",of:e}}})}:super._getPopupAnimation()}_getPopupOptions(){const e=super._getPopupOptions();return this.isMobileView()?e:(0,a.extend)(e,{showTitle:!0,toolbarItems:[{widget:"dxButton",location:"center",options:{activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,icon:"diagram-toolbox-drag",stylingMode:"outlined",type:"normal"}}]})}_renderPopupContent(e){let t="100%";if(this.option("showSearch")){const i=(0,o.default)("<div>").addClass("dx-diagram-toolbox-input-container").appendTo(e);this._updateElementWidth(i),this._renderSearchInput(i),(0,s.hasWindow)()&&(t="calc(100% - "+(0,n.getHeight)(this._searchInput.$element())+"px)")}const i=(0,o.default)("<div>").addClass("dx-diagram-toolbox-panel").appendTo(e);(0,n.setHeight)(i,t),this._updateElementWidth(i),this._renderScrollView(i)}_updateElementWidth(e){void 0!==this.option("toolboxWidth")&&e.css("width",this.option("toolboxWidth"))}updateMaxHeight(){if(this.isMobileView())return;let e=6;if(this._popup){const t=this._getPopupTitle();e+=(0,n.getOuterHeight)(t)}this._accordion&&(e+=(0,n.getOuterHeight)(this._accordion.$element())),this._searchInput&&(e+=(0,n.getOuterHeight)(this._searchInput.$element())),this.option("maxHeight",e)}_renderSearchInput(e){const t=(0,o.default)("<div>").addClass("dx-diagram-toolbox-input").appendTo(e);this._searchInput=this._createComponent(t,d.default,{stylingMode:"outlined",placeholder:l.default.format("dxDiagram-uiSearch"),onValueChanged:e=>{this._onInputChanged(e.value)},valueChangeEvent:"keyup",buttons:[{name:"search",location:"after",options:{activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,icon:"search",stylingMode:"outlined",type:"normal",onClick:()=>{this._searchInput.focus()}}}]})}_renderScrollView(e){const t=(0,o.default)("<div>").appendTo(e);this._scrollView=this._createComponent(t,c.default);const i=this._scrollView._moveIsAllowed.bind(this._scrollView);this._scrollView._moveIsAllowed=e=>{for(let e=0;e<this._toolboxes.length;e++){const t=this._toolboxes[e];if((0,o.default)(t).children(".dxdi-tb-start-drag-flag").length)return!1}return i(e)};const n=(0,o.default)("<div>").appendTo(this._scrollView.content());this._updateElementWidth(n),this._renderAccordion(n)}_getAccordionDataSource(){const e=[],t=this.option("toolboxGroups");for(let i=0;i<t.length;i++){const n=t[i].category,a={category:n,title:t[i].title||n,expanded:t[i].expanded,displayMode:t[i].displayMode,shapes:t[i].shapes,onTemplate:(e,t,i)=>{const n=(0,o.default)(t);this._onShapeCategoryRenderedAction({category:i.category,displayMode:i.displayMode,dataToggle:f,shapes:i.shapes,$element:n}),this._toolboxes.push(n),""!==this._filterText&&this._onFilterChangedAction({text:this._filterText,filteringToolboxes:this._toolboxes.length-1}),this._createTooltips(n)}};e.push(a)}return e}_createTooltips(e){if(this._isTouchMode())return;const t=e.find('[data-toggle="'+f+'"]'),i=this.$element();t.each(((e,t)=>{const n=(0,o.default)(t),a=n.attr("title");if(a){const e=(0,o.default)("<div>").text(a).appendTo(i);this._createComponent(e,h.default,{target:n.get(0),showEvent:"mouseenter",hideEvent:"mouseleave",position:"top",animation:{show:{type:"fade",from:0,to:1,delay:500},hide:{type:"fade",from:1,to:0,delay:100}}})}}))}_isTouchMode(){const{Browser:e}=(0,p.getDiagram)();return e.TouchUI}_renderAccordion(e){this._accordion=this._createComponent(e,u.default,{multiple:!0,animationDuration:0,activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,collapsible:!0,displayExpr:"title",dataSource:this._getAccordionDataSource(),disabled:this.option("disabled"),itemTemplate:(e,t,i)=>{e.onTemplate(this,i,e)},onSelectionChanged:e=>{this._updateScrollAnimateSubscription(e.component)},onContentReady:e=>{e.component.option("selectedItems",[]);const t=e.component.option("dataSource");for(let i=0;i<t.length;i++)!1===t[i].expanded?e.component.collapseItem(i):!0===t[i].expanded&&e.component.expandItem(i);t.length&&void 0===t[0].expanded&&e.component.expandItem(0),this._updateScrollAnimateSubscription(e.component)}})}_updateScrollAnimateSubscription(e){e._deferredAnimate=new r.Deferred,e._deferredAnimate.done((()=>{this.updateMaxHeight(),this._scrollView.update(),this._updateScrollAnimateSubscription(e)}))}_onInputChanged(e){this._filterText=e,this._onFilterChangedAction({text:this._filterText,filteringToolboxes:this._toolboxes.map(((e,t)=>t))}),this.updateTooltips(),this.updateMaxHeight(),this._scrollView.update()}updateFilter(){this._onInputChanged(this._filterText)}updateTooltips(){this._toolboxes.forEach((e=>{const t=(0,o.default)(e);this._createTooltips(t)}))}_createOnShapeCategoryRenderedAction(){this._onShapeCategoryRenderedAction=this._createActionByOption("onShapeCategoryRendered")}_createOnFilterChangedAction(){this._onFilterChangedAction=this._createActionByOption("onFilterChanged")}_optionChanged(e){switch(e.name){case"onShapeCategoryRendered":this._createOnShapeCategoryRenderedAction();break;case"onFilterChanged":this._createOnFilterChangedAction();break;case"showSearch":case"toolboxWidth":this._invalidate();break;case"toolboxGroups":this._accordion.option("dataSource",this._getAccordionDataSource());break;default:super._optionChanged(e)}}}t.default=m;e.exports=t.default,e.exports.default=t.default},89771:function(e,t,i){t.default=void 0;var n=a(i(29339)),o=a(i(43304));function a(e){return e&&e.__esModule?e:{default:e}}class s extends n.default{_getCommands(){return o.default.getViewToolbarCommands(this.option("commands"),this.option("excludeCommands"))}}t.default=s;e.exports=t.default,e.exports.default=t.default},35757:function(e,t,i){Object.defineProperty(t,"alert",{enumerable:!0,get:function(){return n.alert}}),Object.defineProperty(t,"confirm",{enumerable:!0,get:function(){return n.confirm}}),Object.defineProperty(t,"custom",{enumerable:!0,get:function(){return n.custom}});var n=i(84719)},5298:function(e,t,i){t.default=void 0;var n,o=(n=i(89983))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},7968:function(e,t,i){t.default=void 0;var n,o=(n=i(13768))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},74417:function(e,t,i){t.default=void 0;var n,o=(n=i(41163))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},56582:function(e,t,i){t.default=void 0;var n,o=(n=i(73096))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},99142:function(e,t,i){t.default=void 0;var n,o=(n=i(28906))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},38571:function(e,t,i){t.default=void 0;var n,o=(n=i(20287))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},78694:function(e,t,i){t.default=void 0;var n,o=(n=i(41996))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},7632:function(e,t,i){t.default=void 0;var n,o=(n=i(42006))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},14247:function(e,t,i){t.default=void 0;var n,o=(n=i(85186))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},27018:function(e,t,i){t.OPERATIONS=t.FileItemsController=void 0;var n=m(i(65266)),o=m(i(53093)),a=m(i(76856)),s=m(i(80175)),r=m(i(85096)),l=m(i(46327)),d=m(i(54950)),u=i(56536),c=i(57011),h=i(87739),p=i(52576),g=i(17781),_=i(11528),f=m(i(19427));function m(e){return e&&e.__esModule?e:{default:e}}const v="Files",C=t.OPERATIONS={NAVIGATION:"navigation",REFRESH:"refresh"};t.FileItemsController=class{constructor(e){e=e||{},this._options=(0,p.extend)({},e),this._isInitialized=!1,this._dataLoading=!1,this._dataLoadingDeferred=null,this._rootDirectoryInfo=this._createRootDirectoryInfo(e.rootText),this._currentDirectoryInfo=this._rootDirectoryInfo,this._defaultIconMap=this._createDefaultIconMap(),this.startSingleLoad(),this._setSecurityController(),this._setProvider(e.fileProvider),this._initialize()}_initialize(){const e=this._options.currentPathKeys&&this._options.currentPathKeys.length?this.setCurrentPathByKeys(this._options.currentPathKeys):this.setCurrentPath(this._options.currentPath),t=()=>{this._isInitialized=!0,this._raiseInitialized()};e?(0,h.when)(e).always(t):t()}_setSecurityController(){this._securityController=new y({allowedFileExtensions:this._options.allowedFileExtensions,maxFileSize:this._options.uploadMaxFileSize}),this._resetState()}setAllowedFileExtensions(e){(0,_.isDefined)(e)&&(this._options.allowedFileExtensions=e),this._setSecurityController(),this.refresh()}setUploadOptions(e){let{maxFileSize:t,chunkSize:i}=e;(0,_.isDefined)(i)&&(this._options.uploadChunkSize=i),(0,_.isDefined)(t)&&(this._options.uploadMaxFileSize=t,this._setSecurityController(),this.refresh())}_setProvider(e){this._fileProvider=this._createFileProvider(e),this._resetState()}updateProvider(e,t){return(0,_.isDefined)(t)?(0,h.when)(this._getDirectoryByPathParts(this._rootDirectoryInfo,t,!0)).then((t=>{t!==this._rootDirectoryInfo&&this._resetCurrentDirectory(),this._setProvider(e)})).then((()=>this.setCurrentPathByKeys(t))):this._updateProviderOnly(e)}_updateProviderOnly(e){return this._resetCurrentDirectory(),this._setProvider(e),(0,h.when)(this.refresh())}_createFileProvider(e){if(e||(e=[]),Array.isArray(e))return new a.default({data:e});if(e instanceof n.default)return e;switch(e.type){case"remote":return new s.default(e);case"custom":return new r.default(e)}return new a.default(e)}setCurrentPath(e){const t=(0,u.getPathParts)(e),i=(0,u.pathCombine)(...t);return this.getCurrentDirectory().fileItem.relativeName===i?(new h.Deferred).resolve().promise():this._setCurrentDirectoryByPathParts(t)}setCurrentPathByKeys(e){return(0,g.equalByValue)(this.getCurrentDirectory().fileItem.pathKeys,e)?(new h.Deferred).resolve().promise():this._setCurrentDirectoryByPathParts(e,!0)}getCurrentPath(){let e="",t=this.getCurrentDirectory();for(;t&&!t.fileItem.isRoot();){const i=(0,u.getEscapedFileName)(t.fileItem.name);e=(0,u.pathCombine)(i,e),t=t.parentDirectory}return e}getCurrentPathKeys(){return this.getCurrentDirectory().fileItem.pathKeys}getCurrentDirectory(){return this._currentDirectoryInfo}setCurrentDirectory(e,t){if(!e)return;if(t&&(e=this._getActualDirectoryInfo(e)),this._currentDirectoryInfo&&this._currentDirectoryInfo===e)return void this._raisePathPotentiallyChanged();const i=this._currentDirectoryInfo.fileItem.key!==e.fileItem.key;this._currentDirectoryInfo=e,i&&this._isInitialized&&(this._dataLoading||this._raiseDataLoading(C.NAVIGATION),this._raiseSelectedDirectoryChanged(e))}_resetCurrentDirectory(){this._currentDirectoryInfo=this._rootDirectoryInfo}getCurrentItems(e){return this._dataLoadingDeferred?this._dataLoadingDeferred.then((()=>this._getCurrentItemsInternal(e))):this._getCurrentItemsInternal(e)}_getCurrentItemsInternal(e){const t=this.getCurrentDirectory();return this.getDirectoryContents(t).then((i=>{const n=this._separateItemsByType(i);return t.fileItem.hasSubDirectories=!!n.folders.length,e?n.files:i}))}getDirectories(e,t){return this.getDirectoryContents(e,t).then((e=>e.filter((e=>e.fileItem.isDirectory))))}_separateItemsByType(e){const t=[],i=[];return e.forEach((e=>e.fileItem.isDirectory?t.push(e):i.push(e))),{folders:t,files:i}}getDirectoryContents(e,t){if(!e)return(new h.Deferred).resolve([this._rootDirectoryInfo]).promise();if(e.itemsLoaded)return(new h.Deferred).resolve(e.items).promise();if(this._singleOperationLockId&&e.itemsSingleLoadErrorId===this._singleOperationLockId)return this._changeDirectoryOnError(e,t,!0),(new h.Deferred).reject().promise();const i=e.getInternalKey();let n=this._loadedItems[i];return n||(n=this._getFileItems(e,t).then((t=>(t=t||[],e.items=t.map((t=>t.isDirectory&&this._createDirectoryInfo(t,e)||this._createFileInfo(t,e))),e.itemsLoaded=!0,e.items)),(()=>(this._singleOperationLockId&&e.itemsSingleLoadErrorId!==this._singleOperationLockId&&(e.itemsSingleLoadErrorId=this._singleOperationLockId),[]))),this._loadedItems[i]=n,n.always((()=>{delete this._loadedItems[i]})),n)}_getFileItems(e,t){let i=null;try{i=this._fileProvider.getItems(e.fileItem)}catch(i){return this._handleItemLoadError(e,i,t)}return(0,h.when)(i).then((e=>this._securityController.getAllowedItems(e)),(i=>this._handleItemLoadError(e,i,t)))}createDirectory(e,t){const i=e.fileItem,n=this._createDirInfoByName(t,e),o=this._createEditActionInfo("create",n,e);return this._processEditAction(o,(e=>{e.parentDirectory=i,e.name=t,this._editingEvents.onDirectoryCreating(e)}),(()=>this._fileProvider.createDirectory(i,t).done((e=>(i.isRoot()||(i.hasSubDirectories=!0),e)))),(()=>{const e={parentDirectory:i,name:t};this._editingEvents.onDirectoryCreated(e)}),(()=>this._resetDirectoryState(e,!0)))}renameItem(e,t){const i=e.fileItem.createClone(),n=this._createEditActionInfo("rename",e,e.parentDirectory,{itemNewName:t});return this._processEditAction(n,((e,n)=>{n.fileItem.isDirectory||this._securityController.validateExtension(t),e.item=i,e.newName=t,this._editingEvents.onItemRenaming(e)}),(e=>this._fileProvider.renameItem(e,t)),(()=>{const e={sourceItem:i,itemName:t};this._editingEvents.onItemRenamed(e)}),(()=>{const t=this._getActualDirectoryInfo(e.parentDirectory);this._resetDirectoryState(t),this.setCurrentDirectory(t)}))}moveItems(e,t){const i=this._createEditActionInfo("move",e,t);return this._processEditAction(i,((e,i)=>{e.item=i.fileItem,e.destinationDirectory=t.fileItem,this._editingEvents.onItemMoving(e)}),(e=>this._fileProvider.moveItems([e],t.fileItem)),(e=>{const i={sourceItem:e.fileItem,parentDirectory:t.fileItem,itemName:e.fileItem.name,itemPath:(0,u.pathCombine)(t.fileItem.path,e.fileItem.name)};this._editingEvents.onItemMoved(i)}),(i=>{e.forEach((e=>this._resetDirectoryState(e.parentDirectory,!0))),i&&(this._resetDirectoryState(t),this.setCurrentPathByKeys(t.fileItem.pathKeys),t.expanded=!0)}))}copyItems(e,t){const i=this._createEditActionInfo("copy",e,t);return this._processEditAction(i,((e,i)=>{e.item=i.fileItem,e.destinationDirectory=t.fileItem,this._editingEvents.onItemCopying(e)}),(e=>this._fileProvider.copyItems([e],t.fileItem)),(e=>{const i={sourceItem:e.fileItem,parentDirectory:t.fileItem,itemName:e.fileItem.name,itemPath:(0,u.pathCombine)(t.fileItem.path,e.fileItem.name)};this._editingEvents.onItemCopied(i)}),(e=>{e&&(t=this._getActualDirectoryInfo(t),this._resetDirectoryState(t),this.setCurrentDirectory(t),t.expanded=!0)}))}deleteItems(e){const t=e.length>0?e[0].parentDirectory:null,i=this._createEditActionInfo("delete",e,t);return this._processEditAction(i,((e,t)=>{e.item=t.fileItem,this._editingEvents.onItemDeleting(e)}),(e=>this._fileProvider.deleteItems([e])),(e=>this._editingEvents.onItemDeleted({item:e.fileItem})),(()=>{e.forEach((e=>{const t=this._getActualDirectoryInfo(e.parentDirectory);this._resetDirectoryState(t),this.setCurrentDirectory(t)}))}))}processUploadSession(e,t){const i=this._getItemInfosForUploaderFiles(e.files,t),n=this._createEditActionInfo("upload",i,t,{sessionInfo:e});return this._processEditAction(n,(()=>{}),((t,i)=>e.deferreds[i]),(()=>{}),(()=>this._resetDirectoryState(t,!0)))}uploadFileChunk(e,t,i){let n=null;0===t.chunkIndex?(this._securityController.validateMaxFileSize(e.size),this._securityController.validateExtension(e.name),n=this._processBeforeItemEditAction((t=>{t.fileData=e,t.destinationDirectory=i,this._editingEvents.onFileUploading(t)}))):n=(new h.Deferred).resolve().promise();let o=n.then((()=>this._fileProvider.uploadFileChunk(e,t,i)));return t.chunkIndex===t.chunkCount-1&&(o=o.done((()=>{const t={fileData:e,parentDirectory:i};this._editingEvents.onFileUploaded(t)}))),o}abortFileUpload(e,t,i){return(0,h.when)(this._fileProvider.abortFileUpload(e,t,i))}getFileUploadChunkSize(){const e=this._options.uploadChunkSize;return e&&e>0?e:this._fileProvider.getFileUploadChunkSize()}downloadItems(e){const t=e.map((e=>this._processBeforeItemEditAction((t=>{t.item=e.fileItem,this._editingEvents.onItemDownloading(t)}),e)));return(0,h.when)(...t).then((()=>{const t=e.map((e=>e.fileItem));return(0,h.when)(this._getItemActionResult(this._fileProvider.downloadItems(t))).then((()=>{}),(t=>{this._raiseDownloadItemsError(e,e[0].parentDirectory,t)}))}),(t=>{this._raiseDownloadItemsError(e,e[0].parentDirectory,t)}))}getItemContent(e){const t=e.map((e=>e.fileItem));return(0,h.when)(this._fileProvider.getItemsContent(t))}_handleItemLoadError(e,t,i){return e=this._getActualDirectoryInfo(e),this._raiseGetItemsError(e,t),this._changeDirectoryOnError(e,i),(new h.Deferred).reject().promise()}_raiseGetItemsError(e,t){const i=this._createEditActionInfo("getItems",e,e);this._raiseEditActionStarting(i),this._raiseEditActionResultAcquired(i),this._raiseEditActionError(i,{errorCode:t.errorCode,errorText:t.errorText,fileItem:e.fileItem,index:0})}_raiseDownloadItemsError(e,t,i){const n=this._createEditActionInfo("download",e,t),o=e.length;n.singleRequest=1===o,this._raiseEditActionStarting(n),this._raiseEditActionResultAcquired(n);for(let t=0;t<o-1;t++)this._raiseEditActionItemError(n,{errorCode:i.errorCode,errorText:i.errorText,fileItem:e[t].fileItem,index:t});this._raiseEditActionError(n,{errorCode:i.errorCode,errorText:i.errorText,fileItem:e[o-1].fileItem,index:o-1})}_changeDirectoryOnError(e,t,i){i&&(e=this._getActualDirectoryInfo(e)),this._resetDirectoryState(e),e.expanded=!1,t||this.setCurrentDirectory(e.parentDirectory)}_getItemActionResult(e){return Array.isArray(e)?e[0]:e}_processEditAction(e,t,i,n,o){let a=!1;this._raiseEditActionStarting(e);const s=e.itemInfos.map(((e,o)=>this._processBeforeItemEditAction(t,e).then((()=>this._getItemActionResult(i(e.fileItem,o)).done((()=>n(e)))))));return e.singleRequest=1===s.length,this._raiseEditActionResultAcquired(e),(0,c.whenSome)(s,(t=>{a=!0,this._raiseCompleteEditActionItem(e,t)}),(t=>this._raiseEditActionItemError(e,t))).then((()=>{o(a),this._raiseCompleteEditAction(e)}))}_createEditActionInfo(e,t,i,n){n=n||{};const o=(t=Array.isArray(t)?t:[t]).map((e=>e.fileItem));return{name:e,itemInfos:t,items:o,directory:i,customData:n,singleRequest:!0}}_processBeforeItemEditAction(e,t){const i=new h.Deferred,n=this._createBeforeActionArgs();try{e(n,t)}catch(e){return i.reject(e).promise()}if(n.cancel){if(!0===n.cancel)return i.reject({errorText:n.errorText,errorCode:n.errorCode});(0,_.isPromise)(n.cancel)&&(0,h.when)(n.cancel).then((e=>{!0===e?i.reject():(0,_.isObject)(e)&&!0===e.cancel&&i.reject({errorText:e.errorText,errorCode:e.errorCode}),i.resolve()}),i.resolve)}else i.resolve();return i.promise()}_createBeforeActionArgs(){return{errorCode:void 0,errorText:"",cancel:!1}}_getItemInfosForUploaderFiles(e,t){const i=this._getPathInfo(t),n=[];for(let a=0;a<e.length;a++){const s=e[a],r=new o.default(i,s.name,!1),l=this._createFileInfo(r,t);n.push(l)}return n}refresh(){return this._lockRefresh?this._refreshDeferred:(this._lockRefresh=!0,this._executeDataLoad((()=>this._refreshDeferred=this._refreshInternal()),C.REFRESH))}startSingleLoad(){this._singleOperationLockId=(new f.default).toString()}endSingleLoad(){delete this._singleOperationLockId}_refreshInternal(){const e={items:this._rootDirectoryInfo.items},t=this._getDirectoryPathKeyParts(this.getCurrentDirectory());return this._resetDirectoryState(this._rootDirectoryInfo),this._loadItemsRecursive(this._rootDirectoryInfo,e).then((()=>{const e=this._findDirectoryByPathKeyParts(t);this.setCurrentDirectory(e),delete this._lockRefresh}))}_loadItemsRecursive(e,t){return this.getDirectories(e).then((e=>{const i=[];for(let n=0;n<e.length;n++){const o=t.items.find((t=>e[n].fileItem.key===t.fileItem.key));o&&(e[n].expanded=o.expanded,e[n].expanded&&i.push(this._loadItemsRecursive(e[n],o)))}return(0,c.whenSome)(i)}),(()=>null))}_setCurrentDirectoryByPathParts(e,t){return this._executeDataLoad((()=>this._setCurrentDirectoryByPathPartsInternal(e,t)),C.NAVIGATION)}_setCurrentDirectoryByPathPartsInternal(e,t){return this._getDirectoryByPathParts(this._rootDirectoryInfo,e,t).then((e=>{for(let t=e.parentDirectory;t;t=t.parentDirectory)t.expanded=!0;this.setCurrentDirectory(e)}),(()=>{this._raisePathPotentiallyChanged()}))}_executeDataLoad(e,t){return this._dataLoadingDeferred?this._dataLoadingDeferred.then((()=>this._executeDataLoad(e,t))):(this._dataLoading=!0,this._dataLoadingDeferred=new h.Deferred,this._isInitialized&&this._raiseDataLoading(t),e().always((()=>{const e=this._dataLoadingDeferred;this._dataLoadingDeferred=null,this._dataLoading=!1,e.resolve()})))}_getDirectoryByPathParts(e,t,i){if(t.length<1)return(new h.Deferred).resolve(e).promise();const n=i?"key":"name";return this.getDirectories(e).then((e=>{const o=e.find((e=>e.fileItem[n]===t[0]));if(!o)return(new h.Deferred).reject().promise();const a=[...t].splice(1);return this._getDirectoryByPathParts(o,a,i)}))}_getDirectoryPathKeyParts(e){const t=[];for(;e&&e.parentDirectory;)t.unshift(e.fileItem.key),e=e.parentDirectory;return t}_findDirectoryByPathKeyParts(e){let t=this._rootDirectoryInfo;if(0===e.length)return t;let i=0,n=t;for(;n&&i<e.length;)n=t.items.find((t=>t.fileItem.key===e[i])),n&&(t=n),i++;return t}_getActualDirectoryInfo(e){const t=this._getDirectoryPathKeyParts(e);return this._findDirectoryByPathKeyParts(t)}_createDirInfoByName(e,t){const i=this._getPathInfo(t),n=new o.default(i,e,!0);return this._createDirectoryInfo(n,t)}_createDirectoryInfo(e,t){return(0,p.extend)(this._createFileInfo(e,t),{icon:"folder",expanded:e.isRoot(),items:[]})}_createFileInfo(e,t){return{fileItem:e,parentDirectory:t,icon:this._getFileItemDefaultIcon(e),getInternalKey(){return`FIK_${this.fileItem.key}`},getDisplayName(){return this.displayName||this.fileItem.name}}}_resetDirectoryState(e,t){t&&(e=this._getActualDirectoryInfo(e)),e.itemsLoaded=!1,e.items=[]}_getFileItemDefaultIcon(e){if(e.isDirectory)return"folder";const t=e.getFileExtension();return this._defaultIconMap[t]||"doc"}_createDefaultIconMap(){const e={".txt":"txtfile",".rtf":"rtffile",".doc":"docfile",".docx":"docxfile",".xls":"xlsfile",".xlsx":"xlsxfile",".ppt":"pptfile",".pptx":"pptxfile",".pdf":"pdffile"};return[".png",".gif",".jpg",".jpeg",".ico",".bmp"].forEach((t=>{e[t]="image"})),e}_createRootDirectoryInfo(e){const t=new o.default(null,"",!0),i=this._createDirectoryInfo(t,null);return i.displayName=e||v,i}setRootText(e){this._rootDirectoryInfo.displayName=e||v}_raiseInitialized(){this._tryCallAction("onInitialized",{controller:this})}_raiseDataLoading(e){this._tryCallAction("onDataLoading",{operation:e})}_raiseSelectedDirectoryChanged(e){this._tryCallAction("onSelectedDirectoryChanged",{selectedDirectoryInfo:e})}_raiseEditActionStarting(e){this._tryCallAction("onEditActionStarting",e)}_raiseEditActionResultAcquired(e){this._tryCallAction("onEditActionResultAcquired",e)}_raiseEditActionError(e,t){this._tryCallAction("onEditActionError",e,t)}_raiseEditActionItemError(e,t){this._tryCallAction("onEditActionItemError",e,t)}_raiseCompleteEditActionItem(e,t){this._tryCallAction("onCompleteEditActionItem",e,t)}_raiseCompleteEditAction(e){this._tryCallAction("onCompleteEditAction",e)}_raisePathPotentiallyChanged(){this._tryCallAction("onPathPotentiallyChanged")}_tryCallAction(e){const t=Array.prototype.slice.call(arguments,1);this._isInitialized&&this._options[e]&&this._options[e](...t)}_resetState(){this._selectedDirectory=null,this._rootDirectoryInfo.items=[],this._rootDirectoryInfo.itemsLoaded=!1,this._loadedItems={}}_getPathInfo(e){const t=[];for(let i=e;i&&!i.fileItem.isRoot();i=i.parentDirectory)t.unshift({key:i.fileItem.key,name:i.fileItem.name});return t}on(e,t){const i=`on${e}`;this._options[i]=t}get _editingEvents(){return this._options.editingEvents}};class y{constructor(e){this._options=(0,p.extend)({allowedFileExtensions:[],maxFileSize:0},e),this._extensionsMap={},this._allowedFileExtensions.forEach((e=>{this._extensionsMap[e.toUpperCase()]=!0}))}getAllowedItems(e){return 0===this._allowedFileExtensions.length?e:e.filter((e=>e.isDirectory||this._isValidExtension(e.name)))}validateExtension(e){if(!this._isValidExtension(e))throw new l.default(d.default.WrongFileExtension,null)}validateMaxFileSize(e){if(this._maxFileSize&&e>this._maxFileSize)throw new l.default(d.default.MaxFileSizeExceeded,null)}_isValidExtension(e){if(0===this._allowedFileExtensions.length)return!0;const t=(0,u.getFileExtension)(e).toUpperCase();return this._extensionsMap[t]}get _allowedFileExtensions(){return this._options.allowedFileExtensions}get _maxFileSize(){return this._options.maxFileSize}}},74327:function(e,t,i){t.default=void 0;var n=i(57653),o=c(i(64553)),a=i(52576),s=i(11528),r=i(3104),l=c(i(11118)),d=c(i(7968)),u=c(i(47744));function c(e){return e&&e.__esModule?e:{default:e}}const h=(0,r.getWindow)(),p="dx-filemanager-adaptivity-drawer-panel",g="dx-drawer-panel-content-initial";class _ extends l.default{_initMarkup(){super._initMarkup(),this._initActions(),this._isInAdaptiveState=!1;const e=(0,o.default)("<div>").appendTo(this.$element());(0,o.default)("<div>").addClass(p).appendTo(e),this._drawer=this._createComponent(e,d.default),this._drawer.option({opened:!0,template:this._createDrawerTemplate.bind(this)}),(0,o.default)(this._drawer.content()).addClass(g);const t=e.find(`.${p}`).first(),i=this.option("contentTemplate");(0,s.isFunction)(i)&&i(t),this._updateDrawerMaxSize()}_createDrawerTemplate(e){this.option("drawerTemplate")(e),this._splitter=this._createComponent("<div>",u.default,{container:this.$element(),leftElement:(0,o.default)(this._drawer.content()),rightElement:(0,o.default)(this._drawer.viewContent()),onApplyPanelSize:this._onApplyPanelSize.bind(this),onActiveStateChanged:this._onActiveStateChanged.bind(this)}),this._splitter.$element().appendTo(e),this._splitter.disableSplitterCalculation(!0)}_render(){super._render(),this._checkAdaptiveState()}_onApplyPanelSize(e){(0,r.hasWindow)()&&(this._splitter.isSplitterMoved()?((0,o.default)(this._drawer.content()).removeClass(g),this._setDrawerWidth(e.leftPanelWidth)):this._setDrawerWidth(""))}_onActiveStateChanged(e){let{isActive:t}=e;this._splitter.disableSplitterCalculation(!t),!t&&this._splitter.$element().css("left","auto")}_setDrawerWidth(e){(0,o.default)(this._drawer.content()).css("width",e),this._updateDrawerMaxSize(),this._drawer.resizeViewContent()}_updateDrawerMaxSize(){this._drawer.option("maxSize",this._drawer.getRealPanelWidth())}_dimensionChanged(e){e&&"height"===e||this._checkAdaptiveState()}_checkAdaptiveState(){const e=this._isInAdaptiveState;this._isInAdaptiveState=this._isSmallScreen(),e!==this._isInAdaptiveState&&(this.toggleDrawer(!this._isInAdaptiveState,!0),(0,o.default)(this._drawer.content()).toggleClass("dx-drawer-panel-content-adaptive",this._isInAdaptiveState),this._raiseAdaptiveStateChanged(this._isInAdaptiveState)),this._isInAdaptiveState&&this._isDrawerOpened()&&this._updateDrawerMaxSize()}_isSmallScreen(){return(0,n.getWidth)(h)<=573}_isDrawerOpened(){return this._drawer.option("opened")}_initActions(){this._actions={onAdaptiveStateChanged:this._createActionByOption("onAdaptiveStateChanged")}}_raiseAdaptiveStateChanged(e){this._actions.onAdaptiveStateChanged({enabled:e})}_getDefaultOptions(){return(0,a.extend)(super._getDefaultOptions(),{drawerTemplate:null,contentTemplate:null,onAdaptiveStateChanged:null})}_optionChanged(e){const t=e.name;switch(t){case"drawerTemplate":case"contentTemplate":this.repaint();break;case"onAdaptiveStateChanged":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}isInAdaptiveState(){return this._isInAdaptiveState}toggleDrawer(e,t){this._updateDrawerMaxSize(),this._drawer.option("animationEnabled",!t),this._drawer.toggle(e);const i=this._isDrawerOpened()&&!this.isInAdaptiveState();this._splitter.toggleDisabled(!i)}getSplitterElement(){return this._splitter.getSplitterBorderElement().get(0)}}t.default=_;e.exports=t.default,e.exports.default=t.default},81606:function(e,t,i){t.default=void 0;var n=r(i(64553)),o=i(52576),a=r(i(11118)),s=r(i(1614));function r(e){return e&&e.__esModule?e:{default:e}}const l="dx-filemanager-breadcrumbs",d=l+"-parent-folder-item",u=l+"-separator-item",c=l+"-path-separator-item";class h extends a.default{_init(){super._init(),this._currentDirectory=null}_initMarkup(){super._initMarkup(),this._initActions(),this._currentDirectory&&this._renderMenu(),this.$element().addClass(l)}setCurrentDirectory(e){this._areDirsEqual(this._currentDirectory,e)||(this._currentDirectory=e,this.repaint())}_renderMenu(){const e=(0,n.default)("<div>").appendTo(this.$element());this._menu=this._createComponent(e,s.default,{dataSource:this._getMenuItems(),onItemClick:this._onItemClick.bind(this),onItemRendered:this._onItemRendered.bind(this)})}_getMenuItems(){const e=this._getParentDirsLine(),t=[{icon:"arrowup",directory:this._currentDirectory.parentDirectory,isPathItem:!0,cssClass:d},{text:"\xa0",cssClass:u}];return e.forEach(((i,n)=>{t.push({text:i.getDisplayName(),directory:i,isPathItem:!0}),n!==e.length-1&&t.push({icon:"spinnext",cssClass:c})})),t}_onItemClick(e){let{itemData:t}=e;if(!t.isPathItem)return;const i=t.directory;this._areDirsEqual(i,this._currentDirectory)||this._raiseCurrentDirectoryChanged(i)}_onItemRendered(e){let{itemElement:t,itemData:i}=e;i.cssClass&&(0,n.default)(t).addClass(i.cssClass)}_getParentDirsLine(){let e=this._currentDirectory;const t=[];for(;e;)t.unshift(e),e=e.parentDirectory;return t}_areDirsEqual(e,t){return e&&t&&e===t&&e.fileItem.key===t.fileItem.key}_initActions(){this._actions={onCurrentDirectoryChanging:this._createActionByOption("onCurrentDirectoryChanging")}}_raiseCurrentDirectoryChanged(e){this._actions.onCurrentDirectoryChanging({currentDirectory:e})}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{rootFolderDisplayName:"Files",onCurrentDirectoryChanging:null})}_optionChanged(e){const t=e.name;switch(t){case"rootFolderDisplayName":this.repaint();break;case"onCurrentDirectoryChanging":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}}t.default=h;e.exports=t.default,e.exports.default=t.default},59393:function(e,t,i){t.defaultPermissions=t.FileManagerCommandManager=void 0;var n,o=i(52576),a=i(21274),s=i(11528),r=(n=i(4671))&&n.__esModule?n:{default:n};const l=t.defaultPermissions={create:!1,copy:!1,move:!1,delete:!1,rename:!1,upload:!1,download:!1};t.FileManagerCommandManager=class{constructor(e){this._actions={},this._permissions=e||{},this._initCommands()}_initCommands(){this._commands=[{name:"create",text:r.default.format("dxFileManager-commandCreate"),icon:"newfolder",enabled:this._permissions.create,noFileItemRequired:!0},{name:"rename",text:r.default.format("dxFileManager-commandRename"),icon:"rename",enabled:this._permissions.rename,isSingleFileItemCommand:!0},{name:"move",text:r.default.format("dxFileManager-commandMove"),icon:"movetofolder",enabled:this._permissions.move},{name:"copy",text:r.default.format("dxFileManager-commandCopy"),icon:"copy",enabled:this._permissions.copy},{name:"delete",text:r.default.format("dxFileManager-commandDelete"),icon:"trash",enabled:this._permissions.delete},{name:"download",text:r.default.format("dxFileManager-commandDownload"),icon:"download",enabled:this._permissions.download},{name:"upload",text:r.default.format("dxFileManager-commandUpload"),icon:"upload",enabled:this._permissions.upload,noFileItemRequired:!0},{name:"refresh",text:r.default.format("dxFileManager-commandRefresh"),icon:"dx-filemanager-i dx-filemanager-i-refresh",enabled:!0,noFileItemRequired:!0},{name:"thumbnails",text:r.default.format("dxFileManager-commandThumbnails"),icon:"mediumiconslayout",enabled:!0,noFileItemRequired:!0},{name:"details",text:r.default.format("dxFileManager-commandDetails"),icon:"detailslayout",enabled:!0,noFileItemRequired:!0},{name:"clearSelection",text:r.default.format("dxFileManager-commandClearSelection"),icon:"remove",enabled:!0},{name:"showNavPane",hint:r.default.format("dxFileManager-commandShowNavPane"),icon:"menu",enabled:!1,noFileItemRequired:!0}],this._commandMap={},this._commands.forEach((e=>{this._commandMap[e.name]=e}))}registerActions(e){this._actions=(0,o.extend)(this._actions,e)}executeCommand(e,t){const i=(0,s.isString)(e)?e:e.name,n=this._actions[i];if(n)return n(t)}updatePermissions(e){const t=(0,o.extend)({},l,e);this._permissions=t,(0,a.each)(this._permissions,(e=>{this._commandMap[e].enabled=this._permissions[e]}))}setCommandEnabled(e,t){const i=this.getCommandByName(e);i&&(i.enabled=t)}getCommandByName(e){return this._commandMap[e]}isCommandAvailable(e,t){const i=this.getCommandByName(e);if(!i||!i.enabled)return!1;if(i.noFileItemRequired)return!0;const n=t&&t.length||0;return 0!==n&&!t.some((e=>e.fileItem.isRoot()||e.fileItem.isParentFolder))&&("download"===e?t.every((e=>!e.fileItem.isDirectory)):!i.isSingleFileItemCommand||1===n)}}},57011:function(e,t,i){t.whenSome=t.getMapFromObject=t.getDisplayFileSize=t.findItemsByKeys=t.extendAttributes=void 0;var n=i(87739),o=i(52576),a=i(17781),s=i(11528);t.whenSome=function(e,t,i){t=t||a.noop,i=i||a.noop,Array.isArray(e)||(e=[e]);const o=e.map(((e,o)=>(0,n.when)(e).then((i=>((0,s.isFunction)(t)&&t({item:e,index:o,result:i}),i)),(e=>(e||(e={}),e.index=o,(0,s.isFunction)(i)&&i(e),(new n.Deferred).resolve().promise())))));return n.when.apply(null,o)};t.getDisplayFileSize=function(e){const t=["B","KB","MB","GB","TB"];let i=0,n=e;for(;n>=1024&&i<=t.length-1;)n/=1024,i++;return n=Math.round(10*n)/10,`${n} ${t[i]}`};t.extendAttributes=function(e,t,i){return i.forEach((i=>{(0,o.extend)(!0,e,(0,s.isDefined)(t[i])?{[i]:t[i]}:{})})),e};t.findItemsByKeys=(e,t)=>{const i={};t.forEach((e=>{i[e]=null})),e.forEach((e=>{const t=e.fileItem.key;Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=e)}));const n=[];return t.forEach((e=>{const t=i[e];t&&n.push(t)})),n};t.getMapFromObject=function(e){const t=Object.keys(e),i=[];return t.forEach((t=>i.push(e[t]))),{keys:t,values:i}}},40729:function(e,t,i){t.default=void 0;var n=u(i(64553)),o=i(52576),a=i(11528),s=i(17781),r=u(i(11118)),l=u(i(34378)),d=i(57011);function u(e){return e&&e.__esModule?e:{default:e}}const c={create:{},upload:{},download:{},rename:{},move:{},copy:{},delete:{},refresh:{beginGroup:!0}},h=["beginGroup","closeMenuOnClick","disabled","icon","selectable","selected","text","visible"];class p extends r.default{_initMarkup(){this._initActions(),this._isVisible=!1;const e=(0,n.default)("<div>").appendTo(this.$element());this._contextMenu=this._createComponent(e,l.default,{cssClass:"dx-filemanager-context-menu",showEvent:"",onItemClick:e=>this._onContextMenuItemClick(e.itemData.name,e),onShowing:e=>this._onContextMenuShowing(e),onShown:()=>this._onContextMenuShown(),onHidden:()=>this._onContextMenuHidden()}),super._initMarkup()}showAt(e,t,i,n){const{itemData:o,itemElement:a,isActionButton:s=!1}=n;this._isVisible&&this._onContextMenuHidden(),this._menuShowingContext={targetElement:a,itemData:o,fileItems:e,event:i,isActionButton:s};const r={of:t,at:"top left",my:"top left",offset:""};i?r.offset=i.offsetX+" "+i.offsetY:(r.my="left top",r.at="left bottom",r.boundaryOffset="1"),this._contextMenu.option({target:t,position:r}),this._contextMenu.show()}createContextMenuItems(e,t,i){this._targetFileItems=e,this._targetFileItem=(0,a.isDefined)(i)?i:null==e?void 0:e[0];const n=[];return(t||this.option("items")).forEach((t=>{const i=(0,a.isString)(t)?t:t.name,o=this._configureItemByCommandName(i,t,e,this._targetFileItem);this._isContextMenuItemAvailable(o,e)&&n.push(o)})),n}_isContextMenuItemAvailable(e,t){return this._isDefaultItem(e.name)&&e._autoHide?!(this._isIsolatedCreationItemCommand(e.name)&&t&&t.length)&&this._commandManager.isCommandAvailable(e.name,t):(0,s.ensureDefined)(e.visible,!0)}_isIsolatedCreationItemCommand(e){return("create"===e||"upload"===e)&&this.option("isolateCreationItemCommands")}_isDefaultItem(e){return!!c[e]}_configureItemByCommandName(e,t,i,n){if(!this._isDefaultItem(e)){const a=(0,o.extend)(!0,{},t);return a.originalItemData=t,this._addItemClickHandler(e,a),Array.isArray(t.items)&&(a.items=this.createContextMenuItems(i,t.items,n)),a}const s=this._createMenuItemByCommandName(e),r=c[e];return(0,o.extend)(s,r),s.originalItemData=t,(0,d.extendAttributes)(s,t,h),(0,a.isDefined)(s.visible)||(s._autoHide=!0),e&&!s.name&&(0,o.extend)(s,{name:e}),s}_createMenuItemByCommandName(e){const{text:t,icon:i}=this._commandManager.getCommandByName(e),n={name:e,text:t,icon:i};return this._addItemClickHandler(e,n),n}_addItemClickHandler(e,t){t.onItemClick=t=>this._onContextMenuItemClick(e,t)}_onContextMenuItemClick(e,t){var i;const n=(0,o.extend)(!0,{},t);if(n.itemData=t.itemData.originalItemData,n.fileSystemItem=null===(i=this._targetFileItem)||void 0===i?void 0:i.fileItem,n.viewArea=this.option("viewArea"),this._actions.onItemClick(n),this._isDefaultItem(e)){const t=this._isIsolatedCreationItemCommand(e)?null:this._targetFileItems;this._commandManager.executeCommand(e,t)}}_initActions(){this._actions={onContextMenuHidden:this._createActionByOption("onContextMenuHidden"),onContextMenuShowing:this._createActionByOption("onContextMenuShowing"),onItemClick:this._createActionByOption("onItemClick")}}_onContextMenuShowing(e){if(this._isVisible&&this._onContextMenuHidden(!0),e=(0,o.extend)(e,this._menuShowingContext,{options:this.option(),cancel:!1}),this._actions.onContextMenuShowing(e),!e.cancel){const e=this.createContextMenuItems(this._menuShowingContext.fileItems,null,this._menuShowingContext.fileSystemItem);this._contextMenu.option("dataSource",e)}}tryUpdateVisibleContextMenu(){if(this._isVisible){const e=this.createContextMenuItems(this._targetFileItems);this._contextMenu.option("dataSource",e)}}_onContextMenuShown(){this._isVisible=!0}_onContextMenuHidden(e){this._isVisible=!1,e||(this._menuShowingContext={}),this._contextMenu.option("visible",!1),this._raiseContextMenuHidden()}_raiseContextMenuHidden(){this._actions.onContextMenuHidden()}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{commandManager:null,onContextMenuHidden:null,onItemClick:null})}_optionChanged(e){const t=e.name;switch(t){case"commandManager":this.repaint();break;case"items":this.tryUpdateVisibleContextMenu();break;case"onItemClick":case"onContextMenuShowing":case"onContextMenuHidden":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}get _commandManager(){return this.option("commandManager")}}t.default=p;e.exports=t.default,e.exports.default=t.default},45295:function(e,t,i){t.default=void 0;var n=l(i(64553)),o=i(52576),a=l(i(4671)),s=l(i(91374)),r=l(i(47666));function l(e){return e&&e.__esModule?e:{default:e}}class d extends r.default{show(e){let{itemName:t,itemCount:i}=e;const n=1===i?a.default.format("dxFileManager-dialogDeleteItemSingleItemConfirmation",t):a.default.format("dxFileManager-dialogDeleteItemMultipleItemsConfirmation",i);this._$text?this._$text.text(n):this._initialText=n,super.show()}_getDialogOptions(){return(0,o.extend)(super._getDialogOptions(),{title:a.default.format("dxFileManager-dialogDeleteItemTitle"),buttonText:a.default.format("dxFileManager-dialogDeleteItemButtonText"),contentCssClass:"dx-filemanager-dialog-delete-item",popupCssClass:"dx-filemanager-dialog-delete-item-popup",height:"auto",maxHeight:"80vh"})}_createContentTemplate(e){super._createContentTemplate(e),this._$text=(0,n.default)("<div>").text(this._initialText).appendTo(this._$contentElement),this._createComponent(this._$contentElement,s.default,{width:"100%",height:"100%"})}_getDialogResult(){return{}}}t.default=d;e.exports=t.default,e.exports.default=t.default},27356:function(e,t,i){t.default=void 0;var n=d(i(64553)),o=i(52576),a=d(i(4671)),s=i(57011),r=d(i(47666)),l=d(i(82724));function d(e){return e&&e.__esModule?e:{default:e}}class u extends r.default{show(){var e;this._setSelectedDirInfo(null),null===(e=this._filesTreeView)||void 0===e||e.refresh(),super.show()}switchToCopyDialog(e){this._targetItemInfos=e,this._setTitle(a.default.format("dxFileManager-dialogDirectoryChooserCopyTitle")),this._setApplyButtonOptions({text:a.default.format("dxFileManager-dialogDirectoryChooserCopyButtonText"),disabled:!0})}switchToMoveDialog(e){this._targetItemInfos=e,this._setTitle(a.default.format("dxFileManager-dialogDirectoryChooserMoveTitle")),this._setApplyButtonOptions({text:a.default.format("dxFileManager-dialogDirectoryChooserMoveButtonText"),disabled:!0})}_getDialogOptions(){return(0,o.extend)(super._getDialogOptions(),{contentCssClass:"dx-filemanager-dialog-folder-chooser",popupCssClass:"dx-filemanager-dialog-folder-chooser-popup"})}_createContentTemplate(e){super._createContentTemplate(e),this._filesTreeView=this._createComponent((0,n.default)("<div>"),l.default,{getDirectories:this.option("getDirectories"),getCurrentDirectory:()=>this._getDialogSelectedDirectory(),onDirectoryClick:e=>this._onFilesTreeViewDirectoryClick(e),onFilesTreeViewContentReady:()=>this._toggleUnavailableLocationsDisabled(!0)}),this._$contentElement.append(this._filesTreeView.$element())}_getDialogResult(){const e=this._getDialogSelectedDirectory();return e?{folder:e}:e}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{getItems:null})}_getDialogSelectedDirectory(){return this._selectedDirectoryInfo}_onFilesTreeViewDirectoryClick(e){let{itemData:t}=e;this._setSelectedDirInfo(t),this._filesTreeView.updateCurrentDirectory()}_setSelectedDirInfo(e){this._selectedDirectoryInfo=e,this._setApplyButtonOptions({disabled:!e})}_onPopupShown(){this._toggleUnavailableLocationsDisabled(!0),super._onPopupShown()}_onPopupHiding(){this._toggleUnavailableLocationsDisabled(!1),super._onPopupHiding()}_toggleUnavailableLocationsDisabled(e){if(!this._filesTreeView)return;const t=this._getLocationsToProcess(e);this._filesTreeView.toggleDirectoryExpandedStateRecursive(t.locationsToExpand[0],e).then((()=>this._filesTreeView.toggleDirectoryLineExpandedState(t.locationsToCollapse,!e).then((()=>t.locationKeysToDisable.forEach((t=>this._filesTreeView.toggleNodeDisabledState(t,e)))))))}_getLocationsToProcess(e){const t={},i={};this._targetItemInfos.forEach((e=>{e.parentDirectory&&(t[e.parentDirectory.getInternalKey()]=e.parentDirectory),e.fileItem.isDirectory&&(i[e.getInternalKey()]=e)}));const n=(0,s.getMapFromObject)(t),o=(0,s.getMapFromObject)(i);return{locationsToExpand:e?n.values:[],locationsToCollapse:e?o.values:[],locationKeysToDisable:n.keys.concat(...o.keys)}}}t.default=u;e.exports=t.default,e.exports.default=t.default},47666:function(e,t,i){t.default=void 0;var n=d(i(64553)),o=i(52576),a=i(11528),s=d(i(4671)),r=d(i(11118)),l=d(i(10720));function d(e){return e&&e.__esModule?e:{default:e}}class u extends r.default{_initMarkup(){super._initMarkup(),this._createOnClosedAction();const e=this._getDialogOptions(),t=(0,n.default)("<div>").appendTo(this.$element()),i={showTitle:!0,title:e.title,visible:!1,hideOnOutsideClick:!0,contentTemplate:this._createContentTemplate.bind(this),toolbarItems:[{widget:"dxButton",toolbar:"bottom",location:"after",options:{text:e.buttonText,onClick:this._applyDialogChanges.bind(this)}},{widget:"dxButton",toolbar:"bottom",location:"after",options:{text:s.default.format("dxFileManager-dialogButtonCancel"),onClick:this._closeDialog.bind(this)}}],onInitialized:e=>{let{component:t}=e;t.registerKeyHandler("enter",this._applyDialogChanges.bind(this))},onHiding:this._onPopupHiding.bind(this),onShown:this._onPopupShown.bind(this),_wrapperClassExternal:`dx-filemanager-dialog-popup ${e.popupCssClass??""}`};(0,a.isDefined)(e.height)&&(i.height=e.height),(0,a.isDefined)(e.maxHeight)&&(i.maxHeight=e.maxHeight),this._popup=this._createComponent(t,l.default,i)}show(){this._dialogResult=null,this._popup.show()}_getDialogOptions(){return{title:"Title",buttonText:"ButtonText",contentCssClass:"",popupCssClass:""}}_createContentTemplate(e){this._$contentElement=(0,n.default)("<div>").appendTo(e).addClass("dx-filemanager-dialog");const t=this._getDialogOptions().contentCssClass;t&&this._$contentElement.addClass(t)}_getDialogResult(){return null}_applyDialogChanges(){const e=this._getDialogResult();e&&(this._dialogResult=e,this._closeDialog())}_closeDialog(){this._popup.hide()}_onPopupHiding(){this._onClosedAction({dialogResult:this._dialogResult})}_onPopupShown(){}_createOnClosedAction(){this._onClosedAction=this._createActionByOption("onClosed")}_setTitle(e){this._popup.option("title",e)}_setApplyButtonOptions(e){this._popup.option("toolbarItems[0].options",e)}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{onClosed:null})}_optionChanged(e){if("onClosed"===e.name)this._createOnPathChangedAction();else super._optionChanged(e)}}t.default=u;e.exports=t.default,e.exports.default=t.default},52625:function(e,t,i){t.default=void 0;var n=r(i(64553)),o=i(52576),a=r(i(20780)),s=r(i(47666));function r(e){return e&&e.__esModule?e:{default:e}}class l extends s.default{show(e){e=e||"",this._nameTextBox?this._nameTextBox.option("value",e):this._initialNameValue=e,super.show()}_onPopupShown(){if(!this._nameTextBox)return;const e=this._nameTextBox._input();e.length&&e[0].select(),this._nameTextBox.focus()}_getDialogOptions(){return(0,o.extend)(super._getDialogOptions(),{title:this.option("title"),buttonText:this.option("buttonText"),contentCssClass:"dx-filemanager-dialog-name-editor",popupCssClass:"dx-filemanager-dialog-name-editor-popup"})}_createContentTemplate(e){super._createContentTemplate(e),this._nameTextBox=this._createComponent((0,n.default)("<div>"),a.default,{value:this._initialNameValue,onEnterKey:()=>this._hasCompositionJustEnded&&this._applyDialogChanges(),onKeyDown:e=>this._checkCompositionEnded(e)}),this._$contentElement.append(this._nameTextBox.$element())}_checkCompositionEnded(e){let{event:t}=e;this._hasCompositionJustEnded=229!==t.which}_getDialogResult(){const e=this._nameTextBox.option("value");return e?{name:e}:null}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{title:"",buttonText:""})}}t.default=l;e.exports=t.default,e.exports.default=t.default},57834:function(e,t,i){t.default=void 0;var n=d(i(64553)),o=i(52576),a=d(i(4671)),s=d(i(52625)),r=d(i(27356)),l=d(i(45295));function d(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(e,t){this._$element=e,this._options=t;const i={onClosed:this._options.onDialogClosed,rtlEnabled:this._options.rtlEnabled},d=(0,n.default)("<div>").appendTo(this._$element);this._chooseDirectoryDialog=new r.default(d,(0,o.extend)(i,this._options.chooseDirectoryDialog));const u=(0,n.default)("<div>").appendTo(this._$element);this._renameItemDialog=new s.default(u,(0,o.extend)(i,{title:a.default.format("dxFileManager-dialogRenameItemTitle"),buttonText:a.default.format("dxFileManager-dialogRenameItemButtonText")}));const c=(0,n.default)("<div>").appendTo(this._$element);this._createItemDialog=new s.default(c,(0,o.extend)(i,{title:a.default.format("dxFileManager-dialogCreateDirectoryTitle"),buttonText:a.default.format("dxFileManager-dialogCreateDirectoryButtonText")}));const h=(0,n.default)("<div>").appendTo(this._$element);this._deleteItemDialog=new l.default(h,i)}getCopyDialog(e){return this._chooseDirectoryDialog.switchToCopyDialog(e),this._chooseDirectoryDialog}getMoveDialog(e){return this._chooseDirectoryDialog.switchToMoveDialog(e),this._chooseDirectoryDialog}getRenameItemDialog(){return this._renameItemDialog}getCreateItemDialog(){return this._createItemDialog}getDeleteItemDialog(){return this._deleteItemDialog}updateDialogRtl(e){[this._chooseDirectoryDialog,this._renameItemDialog,this._createItemDialog,this._deleteItemDialog].forEach((t=>{t.option("rtlEnabled",e)}))}};e.exports=t.default,e.exports.default=t.default},9516:function(e,t,i){t.default=void 0;var n=g(i(64553)),o=i(52576),a=i(87739),s=i(21274),r=i(54497),l=i(11528),d=g(i(4671)),u=g(i(11118)),c=g(i(57834)),h=g(i(9953)),p=i(7702);function g(e){return e&&e.__esModule?e:{default:e}}class _ extends u.default{_initMarkup(){super._initMarkup(),this._initActions(),this._controller=this.option("controller"),this._controller.on("EditActionStarting",this._onEditActionStarting.bind(this)),this._controller.on("EditActionResultAcquired",this._onEditActionResultAcquired.bind(this)),this._controller.on("EditActionItemError",this._onEditActionItemError.bind(this)),this._controller.on("EditActionError",this._onEditActionError.bind(this)),this._controller.on("CompleteEditActionItem",this._onCompleteEditActionItem.bind(this)),this._controller.on("CompleteEditAction",this._onCompleteEditAction.bind(this)),this._model=this.option("model"),this._uploadOperationInfoMap={},this._dialogManager=new c.default(this.$element(),{chooseDirectoryDialog:{provider:this._controller._fileProvider,getDirectories:this._controller.getDirectories.bind(this._controller),getCurrentDirectory:this._controller.getCurrentDirectory.bind(this._controller)},rtlEnabled:this.option("rtlEnabled"),onDialogClosed:this._onDialogClosed.bind(this)}),this._fileUploader=this._createFileUploader();const e=this.option("notificationControl");e&&this._initNotificationControl(e),this._createMetadataMap()}_initNotificationControl(e){this._notificationControl=e,this._notificationControl.option({onOperationCanceled:e=>{let{info:t}=e;return this._onCancelUploadSession(t)},onOperationItemCanceled:e=>{let{item:t,itemIndex:i}=e;return this._onCancelFileUpload(t,i)}})}_getFileUploaderComponent(){return h.default}_createFileUploader(){const e=(0,n.default)("<div>").appendTo(this.$element());return this._createComponent(e,this._getFileUploaderComponent(),{getController:this._getFileUploaderController.bind(this),dropZonePlaceholderContainer:this.option("uploadDropZonePlaceholderContainer"),onUploadSessionStarted:e=>this._onUploadSessionStarted(e),onUploadProgress:e=>this._onUploadProgress(e),onUploadFinished:e=>this._onUploadFinished(e)})}setUploaderDropZone(e){this._fileUploader.option("dropZone",e)}setUploaderSplitterElement(e){this._fileUploader.option("splitterElement",e)}_getFileUploaderController(){const e=this.uploadDirectoryInfo.fileItem;return{chunkSize:this._controller.getFileUploadChunkSize(),uploadFileChunk:(t,i)=>this._controller.uploadFileChunk(t,i,e),abortFileUpload:(t,i)=>this._controller.abortFileUpload(t,i,e)}}_createMetadataMap(){this._metadataMap={create:{action:e=>this._tryCreate(e),affectsAllItems:!0,singleItemProcessingMessage:d.default.format("dxFileManager-editingCreateSingleItemProcessingMessage"),singleItemSuccessMessage:d.default.format("dxFileManager-editingCreateSingleItemSuccessMessage"),singleItemErrorMessage:d.default.format("dxFileManager-editingCreateSingleItemErrorMessage"),commonErrorMessage:d.default.format("dxFileManager-editingCreateCommonErrorMessage")},rename:{action:e=>this._tryRename(e),singleItemProcessingMessage:d.default.format("dxFileManager-editingRenameSingleItemProcessingMessage"),singleItemSuccessMessage:d.default.format("dxFileManager-editingRenameSingleItemSuccessMessage"),singleItemErrorMessage:d.default.format("dxFileManager-editingRenameSingleItemErrorMessage"),commonErrorMessage:d.default.format("dxFileManager-editingRenameCommonErrorMessage")},delete:{action:e=>this._tryDelete(e),singleItemProcessingMessage:d.default.format("dxFileManager-editingDeleteSingleItemProcessingMessage"),multipleItemsProcessingMessage:d.default.format("dxFileManager-editingDeleteMultipleItemsProcessingMessage"),singleItemSuccessMessage:d.default.format("dxFileManager-editingDeleteSingleItemSuccessMessage"),multipleItemsSuccessMessage:d.default.format("dxFileManager-editingDeleteMultipleItemsSuccessMessage"),singleItemErrorMessage:d.default.format("dxFileManager-editingDeleteSingleItemErrorMessage"),multipleItemsErrorMessage:d.default.format("dxFileManager-editingDeleteMultipleItemsErrorMessage"),commonErrorMessage:d.default.format("dxFileManager-editingDeleteCommonErrorMessage")},move:{action:e=>this._tryMove(e),singleItemProcessingMessage:d.default.format("dxFileManager-editingMoveSingleItemProcessingMessage"),multipleItemsProcessingMessage:d.default.format("dxFileManager-editingMoveMultipleItemsProcessingMessage"),singleItemSuccessMessage:d.default.format("dxFileManager-editingMoveSingleItemSuccessMessage"),multipleItemsSuccessMessage:d.default.format("dxFileManager-editingMoveMultipleItemsSuccessMessage"),singleItemErrorMessage:d.default.format("dxFileManager-editingMoveSingleItemErrorMessage"),multipleItemsErrorMessage:d.default.format("dxFileManager-editingMoveMultipleItemsErrorMessage"),commonErrorMessage:d.default.format("dxFileManager-editingMoveCommonErrorMessage")},copy:{action:e=>this._tryCopy(e),singleItemProcessingMessage:d.default.format("dxFileManager-editingCopySingleItemProcessingMessage"),multipleItemsProcessingMessage:d.default.format("dxFileManager-editingCopyMultipleItemsProcessingMessage"),singleItemSuccessMessage:d.default.format("dxFileManager-editingCopySingleItemSuccessMessage"),multipleItemsSuccessMessage:d.default.format("dxFileManager-editingCopyMultipleItemsSuccessMessage"),singleItemErrorMessage:d.default.format("dxFileManager-editingCopySingleItemErrorMessage"),multipleItemsErrorMessage:d.default.format("dxFileManager-editingCopyMultipleItemsErrorMessage"),commonErrorMessage:d.default.format("dxFileManager-editingCopyCommonErrorMessage")},upload:{action:e=>this._tryUpload(e),allowCancel:!0,allowItemProgress:!0,singleItemProcessingMessage:d.default.format("dxFileManager-editingUploadSingleItemProcessingMessage"),multipleItemsProcessingMessage:d.default.format("dxFileManager-editingUploadMultipleItemsProcessingMessage"),singleItemSuccessMessage:d.default.format("dxFileManager-editingUploadSingleItemSuccessMessage"),multipleItemsSuccessMessage:d.default.format("dxFileManager-editingUploadMultipleItemsSuccessMessage"),singleItemErrorMessage:d.default.format("dxFileManager-editingUploadSingleItemErrorMessage"),multipleItemsErrorMessage:d.default.format("dxFileManager-editingUploadMultipleItemsErrorMessage"),canceledMessage:d.default.format("dxFileManager-editingUploadCanceledMessage")},download:{action:e=>this._download(e),singleItemProcessingMessage:"",multipleItemsProcessingMessage:"",singleItemErrorMessage:d.default.format("dxFileManager-editingDownloadSingleItemErrorMessage"),multipleItemsErrorMessage:d.default.format("dxFileManager-editingDownloadMultipleItemsErrorMessage")},getItemContent:{action:e=>this._getItemContent(e)},getItems:{singleItemProcessingMessage:"",singleItemErrorMessage:d.default.format("dxFileManager-errorDirectoryOpenFailed"),commonErrorMessage:d.default.format("dxFileManager-errorDirectoryOpenFailed")}}}getCommandActions(){const e={};return(0,s.each)(this._metadataMap,(t=>{Object.prototype.hasOwnProperty.call(this._metadataMap,t)&&(e[t]=e=>this._executeAction(t,e))})),e}_executeAction(e,t){const i=this._metadataMap[e];return i?i.action(t):null}_onCancelUploadSession(e){this._fileUploader.cancelUpload(e.uploadSessionId)}_onCancelFileUpload(e,t){this._fileUploader.cancelFileUpload(e.info.uploadSessionId,t)}_onUploadProgress(e){let{sessionId:t,fileIndex:i,commonValue:n,fileValue:o}=e;const{operationInfo:a}=this._uploadOperationInfoMap[t];this._notificationControl.updateOperationItemProgress(a,i,100*o,100*n)}_onUploadFinished(e){let{sessionId:t,commonValue:i}=e;const{operationInfo:n}=this._uploadOperationInfoMap[t];this._notificationControl.finishOperation(n,100*i),this._scheduleUploadSessionDisposal(t,"uploader")}_onUploadSessionStarted(e){let{sessionInfo:t}=e;this._controller.processUploadSession(t,this.uploadDirectoryInfo)}_onEditActionStarting(e){const t=this._metadataMap[e.name],i=new f(t,e.itemInfos,e.directory),n=this._notificationControl.addOperation(i.processingMessage,t.allowCancel,!t.allowItemProgress);switch((0,o.extend)(e.customData,{context:i,operationInfo:n}),e.name){case"upload":{const t=e.customData.sessionInfo.sessionId;n.uploadSessionId=t,this._uploadOperationInfoMap[t]={operationInfo:n}}break;case"rename":e.customData.context.itemNewName=e.customData.itemNewName}}_onEditActionResultAcquired(e){const{context:t,operationInfo:i}=e.customData;t.singleRequest=e.singleRequest;const n=t.itemInfos.map((e=>this._getItemProgressDisplayInfo(e)));this._notificationControl.addOperationDetails(i,n,t.actionMetadata.allowCancel)}_onEditActionError(e,t){const{context:i,operationInfo:n}=e.customData;i.singleRequest=e.singleRequest,this._handleActionError(n,i,t),this._completeAction(n,i)}_onEditActionItemError(e,t){const{context:i,operationInfo:n}=e.customData;this._handleActionError(n,i,t)}_onCompleteEditActionItem(e,t){const{context:i,operationInfo:n}=e.customData;t.result&&t.result.canceled||(i.completeOperationItem(t.index),this._notificationControl.completeOperationItem(n,t.index,i.commonProgress))}_onCompleteEditAction(e){const{context:t,operationInfo:i}=e.customData;this._completeAction(i,t),"upload"===e.name&&this._scheduleUploadSessionDisposal(e.customData.sessionInfo.sessionId,"controller")}_scheduleUploadSessionDisposal(e,t){(0,l.isDefined)(this._uploadOperationInfoMap[e].requester)&&this._uploadOperationInfoMap[e].requester!==t?delete this._uploadOperationInfoMap[e]:this._uploadOperationInfoMap[e].requester=t}_tryCreate(e){const t=e&&e[0]||this._getCurrentDirectory(),i=d.default.format("dxFileManager-newDirectoryName");return this._showDialog(this._dialogManager.getCreateItemDialog(),i).then((e=>{let{name:i}=e;return this._controller.createDirectory(t,i)}))}_tryRename(e){const t=e&&e[0]||this._model.getMultipleSelectedItems()[0];return t?this._showDialog(this._dialogManager.getRenameItemDialog(),t.fileItem.name).then((e=>{let{name:i}=e;return this._controller.renameItem(t,i)})):(new a.Deferred).reject().promise()}_tryDelete(e){if(0===(e=e||this._model.getMultipleSelectedItems()).length)return(new a.Deferred).reject().promise();const t=e[0].fileItem.name,i=e.length;return this._showDialog(this._dialogManager.getDeleteItemDialog(),{itemName:t,itemCount:i}).then((()=>this._controller.deleteItems(e)))}_tryMove(e){return 0===(e=e||this._model.getMultipleSelectedItems()).length?(new a.Deferred).reject().promise():this._showDialog(this._dialogManager.getMoveDialog(e)).then((t=>{let{folder:i}=t;return this._controller.moveItems(e,i)}))}_tryCopy(e){return 0===(e=e||this._model.getMultipleSelectedItems()).length?(new a.Deferred).reject().promise():this._showDialog(this._dialogManager.getCopyDialog(e)).then((t=>{let{folder:i}=t;return this._controller.copyItems(e,i)}))}_tryUpload(e){this._uploadDirectoryInfo=null==e?void 0:e[0],this._fileUploader.tryUpload()}_download(e){return 0===(e=e||this._model.getMultipleSelectedItems()).length?(new a.Deferred).reject().promise():this._controller.downloadItems(e)}_getItemContent(e){return e=e||this._model.getMultipleSelectedItems(),this._controller.getItemContent(e)}_completeAction(e,t){this._notificationControl.completeOperation(e,t.completionMessage,!t.success,t.statusText),t.hasModifiedItems()&&this._raiseOnSuccess(t.onlyFiles)}_handleActionError(e,t,i){e.hasError=!0,t.singleRequest?this._handleSingleRequestActionError(e,t,i):this._handleMultipleRequestActionError(e,t,i)}_handleSingleRequestActionError(e,t,i){const n=t.getItemForSingleRequestError(),o=t.getItemName(i.errorCode),a=this._getErrorText(i,n,o);t.processSingleRequestError(a);const s=this._getOperationErrorInfo(t);this._notificationControl.completeSingleOperationWithError(e,s),t.multipleItems&&this._raiseOnSuccess(t.onlyFiles)}_handleMultipleRequestActionError(e,t,i){const n=t.getItemForMultipleRequestError(i.index),o=t.getItemName(i.errorCode,i.index),a=this._getErrorText(i,n,o);t.processMultipleRequestError(i.index,a);const s=this._getOperationErrorInfo(t);this._notificationControl.addOperationDetailsError(e,s)}_getOperationErrorInfo(e){const t=e.errorState.currentDetailError;return{commonErrorText:e.errorState.commonErrorText,item:t.itemInfo?this._getItemProgressDisplayInfo(t.itemInfo):null,itemIndex:t.itemIndex,detailErrorText:t.errorText}}_getErrorText(e,t,i){const n=e.errorText||p.FileManagerMessages.get(e.errorCode,i),o={fileSystemItem:null==t?void 0:t.fileItem,errorCode:e.errorCode,errorText:n};return this._raiseOnError(o),o.errorText}_getItemProgressDisplayInfo(e){return{commonText:e.fileItem.name,imageUrl:this._getItemThumbnail(e)}}_showDialog(e,t){return this._dialogDeferred=new a.Deferred,e.show(t),this._dialogDeferred.promise()}_onDialogClosed(e){const t=e.dialogResult;t?this._dialogDeferred.resolve(t):this._dialogDeferred.reject()}updateDialogRtl(e){this._dialogManager.updateDialogRtl(e)}_getItemThumbnail(e){const t=this.option("getItemThumbnail");if(!t)return null;const i=t(e);return i?i.thumbnail:null}_initActions(){this._actions={onSuccess:this._createActionByOption("onSuccess"),onError:this._createActionByOption("onError")}}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{model:{getMultipleSelectedItems:null},notificationControl:null,getItemThumbnail:null,onSuccess:null,onError:null})}_optionChanged(e){const t=e.name;switch(t){case"model":this.repaint();break;case"notificationControl":this._initNotificationControl(e.value);break;case"getItemThumbnail":break;case"uploadDropZonePlaceholderContainer":this._fileUploader.option("dropZonePlaceholderContainer",e.value);break;case"onSuccess":case"onError":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}_raiseOnSuccess(e){this._actions.onSuccess({updatedOnlyFiles:e})}_raiseOnError(e){this._actions.onError(e)}_getCurrentDirectory(){return this._controller.getCurrentDirectory()}get uploadDirectoryInfo(){return this._uploadDirectoryInfo||this._getCurrentDirectory()}}class f{constructor(e,t,i){this._actionMetadata=e,this._itemInfos=t,this._onlyFiles=!this._actionMetadata.affectsAllItems&&this._itemInfos.every((e=>!e.fileItem.isDirectory)),this._items=this._itemInfos.map((e=>e.fileItem)),this._multipleItems=this._items.length>1,this._location=i.getDisplayName(),this._singleRequest=!0,this._completedItems=[],this._commonProgress=0,this._errorState={failedCount:0},this._itemNewName=""}completeOperationItem(e){if(this._singleRequest)this._completedItems=[...this._items];else{const t=this._items[e];this._completedItems.push(t)}this._actionMetadata.allowItemProgress||(this._commonProgress=this._completedItems.length/this._items.length*100)}processSingleRequestError(e){this._errorState.failedCount=1,this._errorState.commonErrorText=this._multipleItems?this._actionMetadata.commonErrorMessage:this._actionMetadata.singleItemErrorMessage;const t=this._multipleItems?-1:1,i=this.getItemForSingleRequestError();this._setCurrentDetailError(t,i,e)}processMultipleRequestError(e,t){this._errorState.failedCount++,this._errorState.commonErrorText=this._errorState.failedCount>1?(0,r.format)(this._actionMetadata.multipleItemsErrorMessage,this._errorState.failedCount):this._actionMetadata.singleItemErrorMessage;const i=this.getItemForMultipleRequestError(e);this._setCurrentDetailError(e,i,t)}hasModifiedItems(){return this._hasCompletedItems()||this._singleRequest&&!this.success&&this._multipleItems}getItemForSingleRequestError(){return this._multipleItems?null:this._itemInfos[0]}getItemForMultipleRequestError(e){return this._itemInfos[e]}getItemName(e,t){const i=this.singleRequest?this.getItemForSingleRequestError():this.getItemForMultipleRequestError(t);let n=null==i?void 0:i.fileItem.name;return this.itemNewName&&this._isItemExistsErrorCode(e)&&(n=this.itemNewName),n}_isItemExistsErrorCode(e){return e===p.ErrorCode.DirectoryExists||e===p.ErrorCode.FileExists}_setCurrentDetailError(e,t,i){this._errorState.currentDetailError={itemIndex:e,itemInfo:t,errorText:i}}_hasCompletedItems(){return this._completedItems.length>0}get actionMetadata(){return this._actionMetadata}get itemInfos(){return this._itemInfos}get itemNewName(){return this._itemNewName}set itemNewName(e){this._itemNewName=e}get errorState(){return this._errorState}get singleRequest(){return this._singleRequest}set singleRequest(e){this._singleRequest=e}get multipleItems(){return this._multipleItems}get onlyFiles(){return this._onlyFiles}get processingMessage(){return this._multipleItems?(0,r.format)(this._actionMetadata.multipleItemsProcessingMessage,this._items.length,this._location):(0,r.format)(this._actionMetadata.singleItemProcessingMessage,this._location)}get successMessage(){return this._hasCompletedItems()?this._multipleItems?(0,r.format)(this._actionMetadata.multipleItemsSuccessMessage,this._completedItems.length,this._location):(0,r.format)(this._actionMetadata.singleItemSuccessMessage,this._location):this._multipleItems?(0,r.format)(this._actionMetadata.multipleItemsErrorMessage,this._items.length):this._actionMetadata.singleItemErrorMessage}get completionMessage(){return this.success?this.successMessage:this.errorState.commonErrorText}get statusText(){return this.success&&!this._hasCompletedItems()?this._actionMetadata.canceledMessage:void 0}get commonProgress(){return this._commonProgress}get success(){return!this._errorState.failedCount}}t.default=_;e.exports=t.default,e.exports.default=t.default},9787:function(e,t,i){t.default=void 0;var n=r(i(64553)),o=i(52576),a=r(i(11118)),s=r(i(64973));function r(e){return e&&e.__esModule?e:{default:e}}class l extends a.default{_initMarkup(){this._createClickAction();const e=(0,n.default)("<div>");this.$element().append(e).addClass("dx-filemanager-file-actions-button"),this._button=this._createComponent(e,s.default,{icon:"overflow",stylingMode:"text",onClick:e=>this._raiseClick(e)}),super._initMarkup()}_createClickAction(){this._clickAction=this._createActionByOption("onClick")}_raiseClick(e){this._clickAction(e)}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{cssClass:"",onClick:null})}_optionChanged(e){switch(e.name){case"cssClass":this.repaint();break;case"onClick":this._createClickAction();break;default:super._optionChanged(e)}}setActive(e){this.$element().toggleClass("dx-filemanager-file-actions-button-activated",e),setTimeout((()=>this._button.$element().toggleClass("dx-state-active",e)))}}t.default=l;e.exports=t.default,e.exports.default=t.default},9953:function(e,t,i){t.default=void 0;var n=i(57653),o=h(i(64553)),a=i(52576),s=i(87739),r=i(3104),l=h(i(19427)),d=h(i(11118)),u=h(i(26980)),c=i(57011);function h(e){return e&&e.__esModule?e:{default:e}}class p extends d.default{_initMarkup(){this._initActions(),this.$element().addClass("dx-filemanager-fileuploader"),this._uploaderInfos=[],this._createInternalFileUploader(),this._createDropZonePlaceholder(),this._setDropZonePlaceholderVisible(!1),super._initMarkup()}_createInternalFileUploader(){const e=this._getController().chunkSize,t=(0,o.default)("<div>").appendTo(this.$element()),i=this._createComponent(t,u.default,{name:"file",multiple:!0,showFileList:!1,activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,labelText:"",readyToUploadMessage:"",accept:"*",chunkSize:e,dropZone:this.option("dropZone"),onValueChanged:e=>this._onFileUploaderValueChanged(e),onProgress:e=>this._onFileUploaderProgress(e),onUploaded:e=>this._onFileUploaderUploaded(e),onFilesUploaded:e=>this._onFileUploaderAllFilesUploaded(e),onUploadAborted:e=>this._onFileUploaderUploadAborted(e),onUploadError:e=>this._onFileUploaderUploadError(e),onDropZoneEnter:()=>this._setDropZonePlaceholderVisible(!0),onDropZoneLeave:()=>this._setDropZonePlaceholderVisible(!1)});i.option({uploadChunk:(e,t)=>this._fileUploaderUploadChunk(i,e,t),abortUpload:(e,t)=>this._fileUploaderAbortUpload(i,e,t)}),i._shouldRaiseDragLeaveBase=i._shouldRaiseDragLeave,i._shouldRaiseDragLeave=e=>this._shouldRaiseDragLeave(e,i);const n={fileUploader:i};this._uploaderInfos.push(n)}tryUpload(){const e=this._findAndUpdateAvailableUploaderInfo();e&&e.fileUploader._selectButtonClickHandler()}cancelUpload(e){this._cancelUpload(e)}cancelFileUpload(e,t){this._cancelUpload(e,t)}_cancelUpload(e,t){const{fileUploader:i}=this._findUploaderInfoBySessionId(e);i.abortUpload(t)}_fileUploaderUploadChunk(e,t,i){const{session:n,fileIndex:o}=this._findSessionByFile(e,t),a=n.controller;return i.fileIndex=o,a.uploadFileChunk(t,i)}_fileUploaderAbortUpload(e,t,i){const{session:n,fileIndex:o}=this._findSessionByFile(e,t),a=n.controller;return i.fileIndex=o,a.abortFileUpload(t,i)}_onFileUploaderValueChanged(e){let{component:t,value:i}=e;if(0===i.length)return;const n=i.slice(),o=this._findUploaderInfo(t);this._uploadFiles(o,n),setTimeout((()=>{this._findAndUpdateAvailableUploaderInfo()||this._createInternalFileUploader()}))}_onFileUploaderProgress(e){let{component:t,file:i,bytesLoaded:n,bytesTotal:o}=e;const{session:a,fileIndex:s}=this._findSessionByFile(t,i),r=0!==o?n/o:1,l=t.option("progress")/100,d={sessionId:a.id,fileIndex:s,commonValue:l,fileValue:r};this._raiseUploadProgress(d)}_onFileUploaderAllFilesUploaded(e){let{component:t}=e;const{session:i}=this._findSessionByFile(t,t._files[0].value);this._raiseUploadFinished({sessionId:i.id,commonValue:t.option("progress")/100})}_onFileUploaderUploaded(e){let{component:t,file:i}=e;this._getDeferredForFile(t,i).resolve()}_onFileUploaderUploadAborted(e){let{component:t,file:i}=e;this._getDeferredForFile(t,i).resolve({canceled:!0})}_onFileUploaderUploadError(e){let{component:t,file:i,error:n}=e;this._getDeferredForFile(t,i).reject(n)}_createDropZonePlaceholder(){this._$dropZonePlaceholder=(0,o.default)("<div>").addClass("dx-filemanager-fileuploader-dropzone-placeholder").appendTo(this.option("dropZonePlaceholderContainer"))}_adjustDropZonePlaceholder(){const e=this.option("dropZone");if(!(0,r.hasWindow)()||0===e.length)return;const t=parseFloat(this._$dropZonePlaceholder.css("borderTopWidth")),i=parseFloat(this._$dropZonePlaceholder.css("borderLeftWidth")),o=this.option("dropZonePlaceholderContainer"),a=parseFloat(o.css("borderBottomWidth")),s=parseFloat(o.css("borderLeftWidth")),l=(0,n.getInnerHeight)(o),d=o.offset(),u=e.offset();this._$dropZonePlaceholder.css({top:u.top-d.top-l-a,left:u.left-d.left-s}),(0,n.setHeight)(this._$dropZonePlaceholder,e.get(0).offsetHeight-2*t),(0,n.setWidth)(this._$dropZonePlaceholder,e.get(0).offsetWidth-2*i)}_setDropZonePlaceholderVisible(e){e?(this._adjustDropZonePlaceholder(),this._$dropZonePlaceholder.css("display","")):this._$dropZonePlaceholder.css("display","none")}_shouldRaiseDragLeave(e,t){return t.isMouseOverElement(e,this.option("splitterElement"))||t._shouldRaiseDragLeaveBase(e,!0)}_uploadFiles(e,t){this._setDropZonePlaceholderVisible(!1);const i=(new l.default).toString(),n=this._getController(),o=t.map((()=>new s.Deferred)),a={id:i,controller:n,files:t,deferreds:o};e.session=a;const r={sessionId:i,deferreds:o,files:t};return this._raiseUploadSessionStarted(r),(0,c.whenSome)(o).always((()=>setTimeout((()=>{e.fileUploader.clear(),e.session=null}))))}_getDeferredForFile(e,t){const{session:i,fileIndex:n}=this._findSessionByFile(e,t);return i.deferreds[n]}_findSessionByFile(e,t){const i=this._findUploaderInfo(e).session,n=i.files.indexOf(t);return{session:i,fileIndex:n}}_findUploaderInfoBySessionId(e){for(let t=0;t<this._uploaderInfos.length;t++){const i=this._uploaderInfos[t],n=i.session;if(n&&n.id===e)return i}return null}_findAndUpdateAvailableUploaderInfo(){var e;let t=null;for(let e=0;e<this._uploaderInfos.length;e++){const i=this._uploaderInfos[e];i.fileUploader.option("dropZone",""),t||i.session||(t=i)}return null===(e=t)||void 0===e||e.fileUploader.option("dropZone",this.option("dropZone")),t}_findUploaderInfo(e){for(let t=0;t<this._uploaderInfos.length;t++){const i=this._uploaderInfos[t];if(i.fileUploader===e)return i}return null}_getController(){return this.option("getController")()}_raiseUploadSessionStarted(e){this._actions.onUploadSessionStarted({sessionInfo:e})}_raiseUploadProgress(e){this._actions.onUploadProgress(e)}_raiseUploadFinished(e){this._actions.onUploadFinished(e)}_initActions(){this._actions={onUploadSessionStarted:this._createActionByOption("onUploadSessionStarted"),onUploadProgress:this._createActionByOption("onUploadProgress"),onUploadFinished:this._createActionByOption("onUploadFinished")}}_getDefaultOptions(){return(0,a.extend)(super._getDefaultOptions(),{getController:null,onUploadSessionStarted:null,onUploadProgress:null,onUploadFinished:null,splitterElement:null})}_optionChanged(e){const t=e.name;switch(t){case"getController":this.repaint();break;case"onUploadSessionStarted":case"onUploadProgress":case"onUploadFinished":this._actions[t]=this._createActionByOption(t);break;case"dropZone":this._findAndUpdateAvailableUploaderInfo(),this._adjustDropZonePlaceholder();break;case"dropZonePlaceholderContainer":this._$dropZonePlaceholder.detach(),this._$dropZonePlaceholder.appendTo(e.value);break;case"splitterElement":break;default:super._optionChanged(e)}}}t.default=p;e.exports=t.default,e.exports.default=t.default},82724:function(e,t,i){t.default=void 0;var n=p(i(64553)),o=i(52576),a=i(69629),s=i(17781),r=p(i(11118)),l=p(i(4313)),d=p(i(9787)),u=i(87739),c=i(3104),h=i(11528);function p(e){return e&&e.__esModule?e:{default:e}}const g="dx-filemanager-focused-item";class _ extends r.default{_initMarkup(){this._initActions(),this._getCurrentDirectory=this.option("getCurrentDirectory"),this._createFileActionsButton=s.noop,this._storeExpandedState=this.option("storeExpandedState")||!1;const e=(0,n.default)("<div>").addClass("dx-filemanager-dirs-tree").appendTo(this.$element()),t={dataStructure:"plain",rootValue:"",createChildren:this._onFilesTreeViewCreateSubDirectories.bind(this),itemTemplate:this._createFilesTreeViewItemTemplate.bind(this),keyExpr:"getInternalKey",parentIdExpr:"parentDirectory.getInternalKey",displayExpr:e=>e.getDisplayName(),hasItemsExpr:"fileItem.hasSubDirectories",onItemClick:e=>this._actions.onDirectoryClick(e),onItemExpanded:e=>this._onFilesTreeViewItemExpanded(e),onItemCollapsed:e=>this._onFilesTreeViewItemCollapsed(e),onItemRendered:e=>this._onFilesTreeViewItemRendered(e),onContentReady:()=>this._actions.onFilesTreeViewContentReady()};this._contextMenu&&(this._contextMenu.option("onContextMenuHidden",(()=>this._onContextMenuHidden())),t.onItemContextMenu=e=>this._onFilesTreeViewItemContextMenu(e),this._createFileActionsButton=(e,t)=>this._createComponent(e,d.default,t)),this._filesTreeView=this._createComponent(e,l.default,t)}_initActions(){this._actions={onDirectoryClick:this._createActionByOption("onDirectoryClick"),onFilesTreeViewContentReady:this._createActionByOption("onFilesTreeViewContentReady")}}_render(){super._render();const e=this;setTimeout((()=>{e._updateFocusedElement()}))}_onFilesTreeViewCreateSubDirectories(e){const t=this.option("getDirectories"),i=e&&e.itemData||null;return t&&t(i,!0)}_onFilesTreeViewItemRendered(e){let{itemData:t}=e;const i=this._getCurrentDirectory();i&&i.fileItem.equals(t.fileItem)&&(this._updateFocusedElement(),this._restoreScrollTopPosition())}_onFilesTreeViewItemExpanded(e){let{itemData:t}=e;this._storeExpandedState&&(t.expanded=!0)}_onFilesTreeViewItemCollapsed(e){let{itemData:t}=e;this._storeExpandedState&&(t.expanded=!1)}_createFilesTreeViewItemTemplate(e,t,i){const o=(0,n.default)(i);o.closest(this._filesTreeViewItemSelector).data("item",e);const s=(0,a.getImageContainer)(e.icon),r=(0,n.default)("<span>").text(e.getDisplayName()).addClass("dx-filemanager-dirs-tree-item-text"),l=(0,n.default)("<div>");o.append(s,r,l),this._createFileActionsButton(l,{onClick:e=>this._onFileItemActionButtonClick(e)})}_onFilesTreeViewItemContextMenu(e){let{itemElement:t,event:i}=e;i.preventDefault(),i.stopPropagation();const o=(0,n.default)(t).data("item");this._contextMenu.showAt([o],t,i,{itemData:o,itemElement:t})}_onFileItemActionButtonClick(e){let{component:t,element:i,event:n}=e;n.stopPropagation();const o=t.$element().closest(this._filesTreeViewItemSelector),a=o.data("item"),s={itemData:a,itemElement:o,isActionButton:!0};this._contextMenu.showAt([a],i,n,s),this._activeFileActionsButton=t,this._activeFileActionsButton.setActive(!0)}_onContextMenuHidden(){this._activeFileActionsButton&&this._activeFileActionsButton.setActive(!1)}toggleNodeDisabledState(e,t){const i=this._getNodeByKey(e);if(!i)return;const n=this._filesTreeView.option("items").map((e=>e.getInternalKey())).indexOf(i.getInternalKey());-1!==n&&this._filesTreeView.option(`items[${n}].disabled`,t)}_saveScrollTopPosition(){(0,c.hasWindow)()&&(this._scrollTopPosition=this._filesTreeView.getScrollable().scrollTop())}_restoreScrollTopPosition(){(0,c.hasWindow)()&&(0,h.isNumeric)(this._scrollTopPosition)&&setTimeout((()=>this._filesTreeView.getScrollable().scrollTo(this._scrollTopPosition)))}_updateFocusedElement(){const e=this._getCurrentDirectory(),t=this._getItemElementByKey(null==e?void 0:e.getInternalKey());this._$focusedElement&&this._$focusedElement.toggleClass(g,!1),this._$focusedElement=t||(0,n.default)(),this._$focusedElement.toggleClass(g,!0)}_getNodeByKey(e){var t;return null===(t=this._filesTreeView)||void 0===t?void 0:t._getNode(e)}_getPublicNode(e){var t;const i=[...null===(t=this._filesTreeView)||void 0===t?void 0:t.getNodes()];for(;i.length;){const t=i.shift();if(t.itemData.getInternalKey()===e)return t;t.children.length&&i.push(...t.children)}}_getItemElementByKey(e){const t=this._getNodeByKey(e);if(t){const e=this._filesTreeView._getNodeElement(t);if(e)return e.children(this._filesTreeViewItemSelector)}return null}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{storeExpandedState:!1,initialFolder:null,contextMenu:null,getItems:null,getCurrentDirectory:null,onDirectoryClick:null})}_optionChanged(e){const t=e.name;switch(t){case"storeExpandedState":this._storeExpandedState=this.option(t);break;case"getItems":case"rootFolderDisplayName":case"initialFolder":case"contextMenu":this.repaint();break;case"getCurrentDirectory":this.getCurrentDirectory=this.option(t);break;case"onDirectoryClick":case"onFilesTreeViewContentReady":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}get _filesTreeViewItemSelector(){return".dx-treeview-item"}get _contextMenu(){return this.option("contextMenu")}toggleDirectoryExpandedState(e,t){const i=new u.Deferred,n=this._getPublicNode(null==e?void 0:e.getInternalKey());if(!n)return i.reject().promise();if(n.expanded===t||n.itemsLoaded&&!n.itemData.fileItem.hasSubDirectories)return i.resolve().promise();const o=t?"expandItem":"collapseItem";return this._filesTreeView[o](e.getInternalKey())}refresh(){this._$focusedElement=null,this._saveScrollTopPosition(),this._filesTreeView.option("dataSource",[])}updateCurrentDirectory(){this._disposed||(this._updateFocusedElement(),this._storeExpandedState&&this._updateExpandedStateToCurrentDirectory())}_updateExpandedStateToCurrentDirectory(){return this.toggleDirectoryExpandedStateRecursive(this._getCurrentDirectory().parentDirectory,!0)}toggleDirectoryExpandedStateRecursive(e,t){const i=[];for(let t=e;t;t=t.parentDirectory)i.unshift(t);return this.toggleDirectoryLineExpandedState(i,t)}toggleDirectoryLineExpandedState(e,t){return e.length?this.toggleDirectoryExpandedState(e.shift(),t).then((()=>this.toggleDirectoryLineExpandedState(e,t))):(new u.Deferred).resolve().promise()}}t.default=_;e.exports=t.default,e.exports.default=t.default},17772:function(e,t,i){t.default=void 0;var n=p(i(64553)),o=i(52576),a=i(57011),s=i(11528),r=p(i(4671)),l=p(i(4920)),d=p(i(84368)),u=p(i(9787)),c=i(87739),h=i(27018);function p(e){return e&&e.__esModule?e:{default:e}}const g={thumbnail:{caption:"",calculateSortValue:"isDirectory",width:36,alignment:"center",cssClass:"dx-filemanager-details-item-is-directory"},name:{caption:r.default.format("dxFileManager-listDetailsColumnCaptionName")},dateModified:{caption:r.default.format("dxFileManager-listDetailsColumnCaptionDateModified"),width:110,hidingPriority:1},size:{caption:r.default.format("dxFileManager-listDetailsColumnCaptionFileSize"),width:90,alignment:"right",hidingPriority:0},isParentFolder:{caption:"isParentFolder",visible:!1,sortIndex:0,sortOrder:"asc"}};class _ extends d.default{_initMarkup(){this._itemCount=0,this._focusedItem=null,this._hasParentDirectoryItem=!1,this._parentDirectoryItemKey=null,this._selectAllCheckBox=null,this._selectAllCheckBoxUpdating=!1,this.$element().addClass("dx-filemanager-details"),this._createFilesView(),this._contextMenu.option("onContextMenuHidden",(()=>this._onContextMenuHidden())),super._initMarkup()}_createFilesView(){const e=(0,n.default)("<div>").appendTo(this.$element()),t=this._isMultipleSelectionMode()?"multiple":"none";this._filesView=this._createComponent(e,l.default,{dataSource:this._createDataSource(),hoverStateEnabled:!0,selection:{mode:t,showCheckBoxesMode:this._isDesktop()?"onClick":"none"},selectedRowKeys:this.option("selectedItemKeys"),focusedRowKey:this.option("focusedItemKey"),focusedRowEnabled:!0,allowColumnResizing:!0,scrolling:{mode:"virtual"},sorting:{mode:"single",showSortIndexes:!1},loadPanel:{shading:!0},showColumnLines:!1,showRowLines:!1,columnHidingEnabled:!1,columns:this._createColumns(),onEditorPreparing:this._onEditorPreparing.bind(this),onRowPrepared:this._onRowPrepared.bind(this),onContextMenuPreparing:this._onContextMenuPreparing.bind(this),onSelectionChanged:this._onFilesViewSelectionChanged.bind(this),onFocusedRowChanged:this._onFilesViewFocusedRowChanged.bind(this),onOptionChanged:this._onFilesViewOptionChanged.bind(this),onContentReady:this._onContentReady.bind(this)})}_createColumns(){let e=this.option("detailColumns");e=e.slice(0),e=e.map((e=>{let t=e;return(0,s.isString)(e)&&(t={dataField:e}),this._getPreparedColumn(t)}));const t=this.option("customizeDetailColumns");return(0,s.isFunction)(t)&&(e=t(e)),e.push(this._getPreparedColumn({dataField:"isParentFolder"})),e.forEach((e=>this._updateColumnDataField(e))),e}_getPreparedColumn(e){const t={};let i="";if(this._isDefaultColumn(e.dataField)){const n=(0,o.extend)(!0,{},g[e.dataField]);switch(i=n.cssClass||"",e.dataField){case"thumbnail":n.cellTemplate=this._createThumbnailColumnCell.bind(this),n.calculateSortValue=`fileItem.${n.calculateSortValue}`;break;case"name":n.cellTemplate=this._createNameColumnCell.bind(this),n.caption=r.default.format("dxFileManager-listDetailsColumnCaptionName");break;case"size":n.calculateCellValue=this._calculateSizeColumnCellValue.bind(this),n.caption=r.default.format("dxFileManager-listDetailsColumnCaptionFileSize"),n.calculateSortValue=e=>e.fileItem.isDirectory?-1:e.fileItem.size;break;case"dateModified":n.caption=r.default.format("dxFileManager-listDetailsColumnCaptionDateModified")}(0,o.extend)(!0,t,n)}return(0,a.extendAttributes)(t,e,["alignment","caption","dataField","dataType","hidingPriority","sortIndex","sortOrder","visible","visibleIndex","width"]),e.cssClass&&(i=`${i} ${e.cssClass}`),i&&(t.cssClass=i),t}_updateColumnDataField(e){const t=this._isDefaultColumn(e.dataField)?"":"dataItem.";return e.dataField="fileItem."+t+e.dataField,e}_isDefaultColumn(e){return!!g[e]}_onFileItemActionButtonClick(e){let{component:t,element:i,event:n}=e;n.stopPropagation();const o=t.$element().closest(this._getItemSelector()),a=o.data("item");this._selectItem(a);const s={itemData:a,itemElement:o,isActionButton:!0},r=this._getFileItemsForContextMenu(a);this._showContextMenu(r,i,n,s),this._activeFileActionsButton=t,this._activeFileActionsButton.setActive(!0)}_onContextMenuHidden(){this._activeFileActionsButton&&this._activeFileActionsButton.setActive(!1)}_getItemThumbnailCssClass(){return"dx-filemanager-details-item-thumbnail"}_getItemSelector(){return".dx-data-row"}_onItemDblClick(e){const t=(0,n.default)(e.currentTarget).data("item");this._raiseSelectedItemOpened(t)}_isAllItemsSelected(){const e=this._hasParentDirectoryItem?this._itemCount-1:this._itemCount,t=this._filesView.option("selectedRowKeys");return!!t.length&&(t.length>=e||void 0)}_onEditorPreparing(e){let{component:t,command:i,row:n,parentType:o,editorOptions:a}=e;this._filesView||(this._filesView=t),"select"===i&&n?this._isParentDirectoryItem(n.data)&&(a.disabled=!0):"headerRow"===o&&(a.onInitialized=e=>{let{component:t}=e;this._selectAllCheckBox=t},a.value=this._isAllItemsSelected(),a.onValueChanged=e=>this._onSelectAllCheckBoxValueChanged(e))}_onSelectAllCheckBoxValueChanged(e){let{event:t,previousValue:i,value:n}=e;t?this._isAllItemsSelected()!==n&&(n?this._filesView.selectAll():this._filesView.deselectAll(),t.preventDefault()):i&&!this._selectAllCheckBoxUpdating&&this._selectAllCheckBox&&this._selectAllCheckBox.option("value",i)}_onRowPrepared(e){let{rowType:t,rowElement:i,data:o}=e;if("data"===t){const e=(0,n.default)(i);e.data("item",o),this._isParentDirectoryItem(o)&&e.addClass("dx-filemanager-parent-directory-item")}}_onContextMenuPreparing(e){if(!this._isDesktop())return;let t=null,i={};e.row&&"data"===e.row.rowType&&(i=e.row.data,this._selectItem(i),t=this._getFileItemsForContextMenu(i));const n=(0,o.extend)({},{targetElement:"content"===e.target&&(0,s.isDefined)(e.row)?this._filesView.getRowElement(e.rowIndex):void 0,itemData:i,options:this._contextMenu.option(),event:e.event,isActionButton:!1,cancel:!1});this._raiseContextMenuShowing(n),e.items=n.cancel?[]:this._contextMenu.createContextMenuItems(t,null,i)}_onFilesViewSelectionChanged(e){let{component:t,selectedRowsData:i,selectedRowKeys:n,currentSelectedRowKeys:o,currentDeselectedRowKeys:a}=e;this._filesView=this._filesView||t,this._selectAllCheckBox&&(this._selectAllCheckBoxUpdating=!0,this._selectAllCheckBox.option("value",this._isAllItemsSelected()),this._selectAllCheckBoxUpdating=!1);const s=i.map((e=>e.fileItem));this._tryRaiseSelectionChanged({selectedItemInfos:i,selectedItems:s,selectedItemKeys:n,currentSelectedItemKeys:o,currentDeselectedItemKeys:a})}_onFilesViewFocusedRowChanged(e){var t,i;this._isMultipleSelectionMode()||this._selectItemSingleSelection(null===(i=e.row)||void 0===i?void 0:i.data);const n=(null===(t=e.row)||void 0===t?void 0:t.data.fileItem)||null;this._onFocusedItemChanged({item:n,itemKey:null==n?void 0:n.key,itemElement:e.rowElement})}_onFilesViewOptionChanged(e){let{fullName:t}=e;t.indexOf("sortOrder")>-1&&this._filesView.columnOption("isParentFolder",{sortOrder:"asc",sortIndex:0})}_resetFocus(){this._setFocusedItemKey(void 0)}_createThumbnailColumnCell(e,t){this._getItemThumbnailContainer(t.data).appendTo(e)}_createNameColumnCell(e,t){const i=(0,n.default)("<div>"),o=(0,n.default)("<span>").text(t.data.fileItem.name).addClass("dx-filemanager-details-item-name"),a=(0,n.default)("<div>").append(o,i).addClass("dx-filemanager-details-item-name-wrapper");(0,n.default)(e).append(a),this._createComponent(i,u.default,{onClick:e=>this._onFileItemActionButtonClick(e)})}_calculateSizeColumnCellValue(e){return e.fileItem.isDirectory?"":(0,a.getDisplayFileSize)(e.fileItem.size)}_selectItem(e){(this._isMultipleSelectionMode()?this._selectItemMultipleSelection:this._selectItemSingleSelection).call(this,e)}_deselectItem(e){this._filesView.deselectRows([e.fileItem.key])}_selectItemSingleSelection(e){if(!this._focusedItem||!e||this._focusedItem.fileItem.key!==e.fileItem.key){const t=this._focusedItem;this._focusedItem=e;const i=[];t&&i.push(t.fileItem.key);const n=[],o=[];e&&!this._isParentDirectoryItem(e)&&(n.push(e.fileItem),o.push(e.fileItem.key)),this._raiseSelectionChanged({selectedItems:n,selectedItemKeys:o,currentSelectedItemKeys:[...o],currentDeselectedItemKeys:i})}}_selectItemMultipleSelection(e){let{fileItem:t}=e;if(!this._filesView.isRowSelected(t.key)){const e=this._filesView.getController("selection").isSelectionWithCheckboxes();this._filesView.selectRows([t.key],e)}}_setSelectedItemKeys(e){this._filesView.option("selectedRowKeys",e)}_setFocusedItemKey(e){var t;null===(t=this._filesView)||void 0===t||t.option("focusedRowKey",e)}clearSelection(){this._isMultipleSelectionMode()?this._filesView.clearSelection():this._filesView.option("focusedRowIndex",-1)}refresh(e,t){const i={dataSource:this._createDataSource()};e&&Object.prototype.hasOwnProperty.call(e,"focusedItemKey")&&((0,s.isDefined)(e.focusedItemKey)?i.focusedRowKey=e.focusedItemKey:i.focusedRowIndex=-1);return!(0,s.isDefined)(i.focusedRowKey)&&-1===i.focusedRowIndex&&t===h.OPERATIONS.NAVIGATION&&(i.paging={pageIndex:0},this._needResetScrollPosition=!0),this._filesView.option(i),this._refreshDeferred=new c.Deferred,this._refreshDeferred.promise()}_getScrollable(){return this._filesView.getScrollable()}getSelectedItems(){return this._isMultipleSelectionMode()?this._filesView.getSelectedRowsData():this._focusedItem&&!this._isParentDirectoryItem(this._focusedItem)?[this._focusedItem]:[]}}t.default=_;e.exports=t.default,e.exports.default=t.default},84368:function(e,t,i){t.default=void 0;var n=i(52576),o=i(87739),a=i(3104),s=i(5636),r=i(98834),l=p(i(92774)),d=i(69629),u=p(i(65951)),c=i(63326),h=p(i(11118));function p(e){return e&&e.__esModule?e:{default:e}}class g extends h.default{_init(){this._initActions(),this._lockFocusedItemProcessing=!1,this._focusedItemKey=this.option("focusedItemKey"),super._init()}_initMarkup(){this._needResetScrollPosition=!1,this.$element().addClass("dx-filemanager-files-view");const e=(0,r.addNamespace)(s.name,"dxFileManager_open");l.default.on(this.$element(),e,this._getItemSelector(),this._onItemDblClick.bind(this)),super._initMarkup()}_initActions(){this._actions={onError:this._createActionByOption("onError"),onSelectionChanged:this._createActionByOption("onSelectionChanged"),onFocusedItemChanged:this._createActionByOption("onFocusedItemChanged"),onSelectedItemOpened:this._createActionByOption("onSelectedItemOpened"),onContextMenuShowing:this._createActionByOption("onContextMenuShowing"),onItemListDataLoaded:this._createActionByOption("onItemListDataLoaded")}}_getDefaultOptions(){return(0,n.extend)(super._getDefaultOptions(),{selectionMode:"single",selectedItemKeys:[],focusedItemKey:void 0,contextMenu:null,getItems:null,getItemThumbnail:null,onError:null,onSelectionChanged:null,onFocusedItemChanged:null,onSelectedItemOpened:null,onContextMenuShowing:null})}_optionChanged(e){const t=e.name;switch(t){case"selectionMode":case"contextMenu":case"getItems":case"getItemThumbnail":this.repaint();break;case"selectedItemKeys":this._setSelectedItemKeys(e.value);break;case"focusedItemKey":this._lockFocusedItemProcessing||this._setFocusedItemKey(e.value);break;case"onError":case"onSelectedItemOpened":case"onSelectionChanged":case"onFocusedItemChanged":case"onContextMenuShowing":case"onItemListDataLoaded":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}_getItems(){return this._getItemsInternal().done((e=>{this._itemCount=e.length,0===this._itemCount&&this._resetFocus();const t=this._findParentDirectoryItem(e);this._hasParentDirectoryItem=!!t,this._parentDirectoryItemKey=t?t.fileItem.key:null})).always((()=>{this._onDataLoaded()}))}_getItemsInternal(){const e=this.option("getItems"),t=e?e():[];return(0,o.when)(t)}_raiseOnError(e){this._actions.onError({error:e})}_raiseSelectionChanged(e){this._actions.onSelectionChanged(e)}_raiseFocusedItemChanged(e){this._actions.onFocusedItemChanged(e)}_raiseSelectedItemOpened(e){this._actions.onSelectedItemOpened({fileItemInfo:e})}_raiseContextMenuShowing(e){this._actions.onContextMenuShowing(e)}_raiseItemListDataLoaded(){this._actions.onItemListDataLoaded()}_onDataLoaded(){var e;this._raiseItemListDataLoaded(),null===(e=this._refreshDeferred)||void 0===e||e.resolve()}_onContentReady(){this._needResetScrollPosition&&(this._resetScrollTopPosition(),this._needResetScrollPosition=!1)}_tryRaiseSelectionChanged(e){let{selectedItemInfos:t,selectedItems:i,selectedItemKeys:n,currentSelectedItemKeys:o,currentDeselectedItemKeys:a}=e;const s=this._findParentDirectoryItem(this.getSelectedItems());s&&this._deselectItem(s);let r=!this._hasParentDirectoryItem;r=r||this._hasValidKeys(o)||this._hasValidKeys(a),r&&(t=this._filterOutItemByPredicate(t,(e=>e.fileItem.key===this._parentDirectoryItemKey)),i=this._filterOutParentDirectory(i),n=this._filterOutParentDirectoryKey(n,!0),o=this._filterOutParentDirectoryKey(o,!0),a=this._filterOutParentDirectoryKey(a,!0),this._raiseSelectionChanged({selectedItemInfos:t,selectedItems:i,selectedItemKeys:n,currentSelectedItemKeys:o,currentDeselectedItemKeys:a}))}_onFocusedItemChanged(e){this._focusedItemKey!==e.itemKey&&(this._focusedItemKey=e.itemKey,this._lockFocusedItemProcessing=!0,this.option("focusedItemKey",e.itemKey),this._lockFocusedItemProcessing=!1,this._raiseFocusedItemChanged(e))}_resetFocus(){}_resetScrollTopPosition(){(0,a.hasWindow)()&&setTimeout((()=>{var e;return null===(e=this._getScrollable())||void 0===e?void 0:e.scrollTo(0)}))}_getScrollable(){}_getItemThumbnail(e){const t=this.option("getItemThumbnail");return t?t(e):{thumbnail:""}}_getItemThumbnailContainer(e){const{thumbnail:t,cssClass:i}=this._getItemThumbnail(e),n=(0,d.getImageContainer)(t).addClass(this._getItemThumbnailCssClass());return i&&n.addClass(i),n}_getItemThumbnailCssClass(){return""}_getItemSelector(){}_onItemDblClick(e){}_isDesktop(){return"desktop"===u.default.real().deviceType}_showContextMenu(e,t,i,n){this._contextMenu.showAt(e,t,i,n)}get _contextMenu(){return this.option("contextMenu")}_findParentDirectoryItem(e){for(let t=0;t<e.length;t++){const i=e[t];if(this._isParentDirectoryItem(i))return i}return null}_getFileItemsForContextMenu(e){const t=this.getSelectedItems();return this._isParentDirectoryItem(e)&&t.push(e),t}_isParentDirectoryItem(e){return e.fileItem.isParentFolder}_hasValidKeys(e){return e.length>1||1===e.length&&e[0]!==this._parentDirectoryItemKey}_filterOutParentDirectory(e,t){return this._filterOutItemByPredicate(e,(e=>e.key===this._parentDirectoryItemKey),t)}_filterOutParentDirectoryKey(e,t){return this._filterOutItemByPredicate(e,(e=>e===this._parentDirectoryItemKey),t)}_filterOutItemByPredicate(e,t,i){let n=e,o=-1;for(let i=0;i<e.length;i++)if(t(e[i])){o=i;break}return-1!==o&&(i&&(n=[...e]),n.splice(o,1)),n}_isMultipleSelectionMode(){return"multiple"===this.option("selectionMode")}_deselectItem(e){}_setSelectedItemKeys(e){}_setFocusedItemKey(e){}_createDataSource(){return{store:new c.CustomStore({key:"fileItem.key",load:this._getItems.bind(this)})}}getSelectedItems(){}clearSelection(){}selectItem(){}refresh(e,t){}}t.default=g;e.exports=t.default,e.exports.default=t.default},65485:function(e,t,i){t.default=void 0;var n=_(i(64553)),o=i(52576),a=i(11528),s=i(87739),r=_(i(92774)),l=i(98834),d=i(80248),u=i(57011),c=_(i(4671)),h=_(i(42530)),p=_(i(84368)),g=i(27018);function _(e){return e&&e.__esModule?e:{default:e}}class f extends p.default{_initMarkup(){super._initMarkup(),this.$element().addClass("dx-filemanager-thumbnails");const e=(0,l.addNamespace)(d.name,"dxFileManager_thumbnails");r.default.on(this.$element(),e,this._onContextMenu.bind(this)),this._createItemList()}_createItemList(){const e=this._isMultipleSelectionMode()?"multiple":"single",t=(0,n.default)("<div>").appendTo(this.$element());this._itemList=this._createComponent(t,h.default,{dataSource:this._createDataSource(),selectionMode:e,selectedItemKeys:this.option("selectedItemKeys"),focusedItemKey:this.option("focusedItemKey"),activeStateEnabled:!0,hoverStateEnabled:!0,loopItemFocus:!1,focusStateEnabled:!0,onItemEnterKeyPressed:this._tryOpen.bind(this),itemThumbnailTemplate:this._getItemThumbnailContainer.bind(this),getTooltipText:this._getTooltipText.bind(this),onSelectionChanged:this._onItemListSelectionChanged.bind(this),onFocusedItemChanged:this._onItemListFocusedItemChanged.bind(this),onContentReady:this._onContentReady.bind(this)})}_onContextMenu(e){if(e.preventDefault(),e.stopPropagation(),!this._isDesktop())return;let t=null;const i=(0,n.default)(e.target).closest(this._getItemSelector());let o=null;i.length>0&&(o=this._itemList.getItemByItemElement(i),this._itemList.selectItem(o),t=this._getFileItemsForContextMenu(o));const a={itemData:o,itemElement:i.length?i:void 0};this._showContextMenu(t,e.target,e,a)}_getItemThumbnailCssClass(){return"dx-filemanager-thumbnails-item-thumbnail"}_getItemSelector(){return".dx-filemanager-thumbnails-item"}_getTooltipText(e){const t=e.fileItem;if(t.tooltipText)return t.tooltipText;let i=`${t.name}\r\n`;return t.isDirectory||(i+=`${c.default.format("dxFileManager-listThumbnailsTooltipTextSize")}: ${(0,u.getDisplayFileSize)(t.size)}\r\n`),i+=`${c.default.format("dxFileManager-listThumbnailsTooltipTextDateModified")}: ${t.dateModified}`,i}_onItemDblClick(e){const t=(0,n.default)(e.currentTarget),i=this._itemList.getItemByItemElement(t);this._tryOpen(i)}_tryOpen(e){e&&this._raiseSelectedItemOpened(e)}_getItemsInternal(){return super._getItemsInternal().then((e=>{const t=new s.Deferred;return setTimeout((()=>t.resolve(e))),t.promise()}))}_disableDragging(){return!1}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{focusStateEnabled:!0})}_onItemListSelectionChanged(e){let{addedItemKeys:t,removedItemKeys:i}=e;const n=this.getSelectedItems(),o=n.map((e=>e.fileItem)),a=o.map((e=>e.key));this._tryRaiseSelectionChanged({selectedItemInfos:n,selectedItems:o,selectedItemKeys:a,currentSelectedItemKeys:t,currentDeselectedItemKeys:i})}_onItemListFocusedItemChanged(e){let{item:t,itemElement:i}=e;this._isMultipleSelectionMode()||this._selectItemSingleSelection(t);const n=(null==t?void 0:t.fileItem)||null;this._onFocusedItemChanged({item:n,itemKey:null==n?void 0:n.key,itemElement:i||void 0})}_getScrollable(){return this._itemList.getScrollable()}_setSelectedItemKeys(e){this._itemList.option("selectedItemKeys",e)}_setFocusedItemKey(e){this._itemList.option("focusedItemKey",e)}refresh(e,t){const i={dataSource:this._createDataSource()};return e&&Object.prototype.hasOwnProperty.call(e,"focusedItemKey")&&(i.focusedItemKey=e.focusedItemKey),e&&Object.prototype.hasOwnProperty.call(e,"selectedItemKeys")&&(i.selectedItemKeys=e.selectedItemKeys),(0,a.isDefined)(i.focusedItemKey)||t!==g.OPERATIONS.NAVIGATION||(this._needResetScrollPosition=!0),this._itemList.option(i),this._refreshDeferred=new s.Deferred,this._refreshDeferred.promise()}_deselectItem(e){const t=this._itemList.getItemElementByItem(e);this._itemList.unselectItem(t)}_selectItemSingleSelection(e){e?this._itemList.selectItem(e):this._itemList.clearSelection()}clearSelection(){this._itemList.clearSelection()}getSelectedItems(){return this._itemList.getSelectedItems()}}t.default=f;e.exports=t.default,e.exports.default=t.default},42530:function(e,t,i){t.default=void 0;var n=i(57653),o=_(i(64553)),a=i(52576),s=i(11528),r=i(87739),l=_(i(68095)),d=i(98834),u=_(i(92774)),c=i(27286),h=_(i(91374)),p=_(i(7607)),g=_(i(53544));function _(e){return e&&e.__esModule?e:{default:e}}const f=(0,d.addNamespace)(l.default.name,"dxFileManagerThumbnailsListBox");class m extends p.default{_initMarkup(){this._initActions(),this._lockFocusedItemProcessing=!1,this.$element().addClass("dx-filemanager-thumbnails-view-port"),this._renderScrollView(),this._renderItemsContainer(),this._createScrollViewControl(),super._initMarkup(),this.onFocusedItemChanged=this._onFocusedItemChanged.bind(this),this._layoutUtils=new v(this._scrollView,this.$element(),this._$itemContainer,this.itemElements().first()),this._syncFocusedItemKey()}_initActions(){this._actions={onItemEnterKeyPressed:this._createActionByOption("onItemEnterKeyPressed"),onFocusedItemChanged:this._createActionByOption("onFocusedItemChanged")}}_initTemplates(){super._initTemplates(),this._itemThumbnailTemplate=this.option("itemThumbnailTemplate"),this._getTooltipText=this.option("getTooltipText"),this._templateManager.addDefaultTemplates({item:new c.BindableTemplate(function(e,t,i){const n=this._getDefaultItemTemplate(i,e);e.append(n)}.bind(this),["fileItem"],this.option("integrationOptions.watchMethod"))})}_createScrollViewControl(){this._scrollView||(this._scrollView=this._createComponent(this._$scrollView,h.default,{scrollByContent:!0,scrollByThumb:!0,useKeyboard:!1,showScrollbar:"onHover"}))}_renderScrollView(){this._$scrollView||(this._$scrollView=(0,o.default)("<div>").appendTo(this.$element()))}getScrollable(){return this._scrollView}_renderItemsContainer(){this._$itemContainer||(this._$itemContainer=(0,o.default)("<div>").addClass("dx-filemanager-thumbnails-container").appendTo(this._$scrollView))}_render(){super._render(),this._detachEventHandlers(),this._attachEventHandlers()}_clean(){this._detachEventHandlers(),super._clean()}_supportedKeys(){return(0,a.extend)(super._supportedKeys(),{upArrow(e){this._beforeKeyProcessing(e),this._processArrowKeys(-1,!1,e)},downArrow(e){this._beforeKeyProcessing(e),this._processArrowKeys(1,!1,e)},home(e){this._beforeKeyProcessing(e),this._processHomeEndKeys(0,!0,e)},end(e){this._beforeKeyProcessing(e),this._processHomeEndKeys(this._getItemsLength()-1,!0,e)},pageUp(e){this._beforeKeyProcessing(e),this._processPageChange(!0,e)},pageDown(e){this._beforeKeyProcessing(e),this._processPageChange(!1,e)},enter(e){this._beforeKeyProcessing(e),this._actions.onItemEnterKeyPressed(this._getFocusedItem())},A(e){this._beforeKeyProcessing(e),(0,d.isCommandKeyPressed)(e)&&this.selectAll()}})}_beforeKeyProcessing(e){e.preventDefault(),this._layoutUtils.reset()}_processArrowKeys(e,t,i){const n=this._getFocusedItem();if(n){if(!t){const t=this._layoutUtils.getLayoutModel();if(!t)return;e*=t.itemPerRowCount}const o=this._getIndexByItem(n)+e;this._focusItemByIndex(o,!0,i)}}_processHomeEndKeys(e,t,i){this._focusItemByIndex(e,t,i)}_processPageChange(e,t){const i=this._getFocusedItem();if(!i)return;const n=this._layoutUtils.getLayoutModel();if(!n)return;const o=this._layoutUtils.createItemLayoutModel(this._getIndexByItem(i)),a=e?n.rowPerPageRate:-n.rowPerPageRate,s=o.itemRowIndex-a;let r=(e?Math.ceil:Math.floor)(s)*n.itemPerRowCount+o.itemColumnIndex;r<0?r=0:r>=this._getItemsLength()&&(r=this._getItemsLength()-1),this._focusItemByIndex(r,!0,t)}_processLongTap(e){const t=this._closestItemElement((0,o.default)(e.target)),i=this._getIndexByItemElement(t);this._selection.changeItemSelection(i,{control:!0})}_attachEventHandlers(){"multiple"===this.option("selectionMode")&&u.default.on(this._itemContainer(),f,`.${this._itemContentClass()}`,(e=>{this._processLongTap(e),e.stopPropagation()})),u.default.on(this._itemContainer(),"mousedown selectstart",(e=>{e.shiftKey&&e.preventDefault()}))}_detachEventHandlers(){u.default.off(this._itemContainer(),f),u.default.off(this._itemContainer(),"mousedown selectstart")}_itemContainer(){return this._$itemContainer}_itemClass(){return"dx-filemanager-thumbnails-item"}_itemDataKey(){return"dxFileManagerItemData"}_getDefaultItemTemplate(e,t){t.attr("title",this._getTooltipText(e));const i=this._itemThumbnailTemplate(e),n=(0,o.default)("<div>").addClass("dx-filemanager-thumbnails-item-spacer"),a=(0,o.default)("<div>").addClass("dx-filemanager-thumbnails-item-name").text(e.fileItem.name);t.append(i,n,a)}_itemSelectHandler(e){let t={};"multiple"===this.option("selectionMode")&&(this._isPreserveSelectionMode||(this._isPreserveSelectionMode=(0,d.isCommandKeyPressed)(e)||e.shiftKey),t={control:this._isPreserveSelectionMode,shift:e.shiftKey});const i=this._getIndexByItemElement(e.currentTarget);this._selection.changeItemSelection(i,t)}_initSelectionModule(){super._initSelectionModule();const e=(0,a.extend)(this._selection.options,{selectedKeys:this.option("selectedItemKeys"),onSelectionChanged:e=>{this.option("selectedItems",this._getItemsByKeys(e.selectedItemKeys,e.selectedItems)),this._updateSelectedItems(e)}});this._selection=new g.default(e)}_updateSelectedItems(e){const t=e.addedItemKeys,i=e.removedItemKeys;if(this._rendered&&(t.length||i.length)){const n=this._selectionChangePromise;if(!this._rendering){const e=[];let n;const o=[];this._editStrategy.beginCache();for(let e=0;e<i.length;e++)n=this._getIndexByKey(i[e]),o.push(n),this._removeSelection(n);for(let i=0;i<t.length;i++)n=this._getIndexByKey(t[i]),e.push(n),this._addSelection(n);this._editStrategy.endCache(),this._updateSelection(e,o)}(0,r.when)(n).done((()=>this._fireSelectionChangeEvent(e)))}}_fireSelectionChangeEvent(e){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})(e)}_updateSelection(e,t){0===this.getSelectedItems().length&&(this._isPreserveSelectionMode=!1)}_normalizeSelectedItems(){const e=this._getKeysByItems(this.option("selectedItems")),t=this._selection.getSelectedItemKeys();return this._compareKeys(t,e)||this._selection.setSelection(e),(new r.Deferred).resolve().promise()}_focusOutHandler(){}_getItems(){return this.option("items")||[]}_getItemsLength(){return this._getItems().length}_getIndexByItemElement(e){return this._editStrategy.getNormalizedIndex(e)}_getItemByIndex(e){return this._getItems()[e]}_getFocusedItem(){return this.getItemByItemElement(this.option("focusedElement"))}_focusItem(e,t){this.option("focusedElement",this.getItemElementByItem(e)),t&&this._layoutUtils.scrollToItem(this._getIndexByItem(e))}_focusItemByIndex(e,t,i){if(e>=0&&e<this._getItemsLength()){const n=this._getItemByIndex(e);this._focusItem(n,t,i)}}_syncFocusedItemKey(){this._syncFocusedItemKeyDeferred||(this._syncFocusedItemKeyDeferred=new r.Deferred);const e=this._syncFocusedItemKeyDeferred;if(this._dataSource&&this._dataSource.isLoading())return e.promise();const t=this.option("focusedItemKey");if((0,s.isDefined)(t)){const i=this.option("items").find((e=>this.keyOf(e)===t));i?(this._focusItem(i,!0),e.resolve()):(this.option("focusedItemKey",void 0),e.reject())}else e.resolve();return this._syncFocusedItemKeyDeferred=null,e.promise()}_onFocusedItemChanged(){const e=this._getFocusedItem(),t=this.keyOf(e);t!==this.option("focusedItemKey")&&(this._lockFocusedItemProcessing=!0,this.option("focusedItemKey",t),this._lockFocusedItemProcessing=!1,this._raiseFocusedItemChanged(e))}_raiseFocusedItemChanged(e){const t={item:e,itemElement:this.option("focusedElement")};this._actions.onFocusedItemChanged(t)}_changeItemSelection(e,t){if(this.isItemSelected(e)===t)return;const i=this.getItemElementByItem(e),n=this._getIndexByItemElement(i);this._selection.changeItemSelection(n,{control:this._isPreserveSelectionMode})}_chooseSelectOption(){return"selectedItemKeys"}getSelectedItems(){return this._selection.getSelectedItems()}getItemElementByItem(e){return this._editStrategy.getItemElement(e)}getItemByItemElement(e){return this._getItemByIndex(this._getIndexByItemElement(e))}selectAll(){"multiple"===this.option("selectionMode")&&(this._selection.selectAll(),this._isPreserveSelectionMode=!0)}selectItem(e){this._changeItemSelection(e,!0)}deselectItem(e){this._changeItemSelection(e,!1)}clearSelection(){this._selection.deselectAll()}_optionChanged(e){switch(e.name){case"items":this._layoutUtils&&this._layoutUtils.updateItems(this.itemElements().first()),super._optionChanged(e);break;case"focusedItemKey":if(this._lockFocusedItemProcessing)break;(0,s.isDefined)(e.value)?this._syncFocusedItemKey().done((()=>{const e=this._getFocusedItem();this._raiseFocusedItemChanged(e)})):(this.option("focusedElement",null),this._raiseFocusedItemChanged(null));break;case"onItemEnterKeyPressed":case"onFocusedItemChanged":this._actions[e.name]=this._createActionByOption(e.name);break;default:super._optionChanged(e)}}}class v{constructor(e,t,i,n){this._layoutModel=null,this._scrollView=e,this._$viewPort=t,this._$itemContainer=i,this._$item=n}updateItems(e){this._$item=e}reset(){this._layoutModel=null}getLayoutModel(){return this._layoutModel||(this._layoutModel=this._createLayoutModel()),this._layoutModel}_createLayoutModel(){if(!this._$item)return null;const e=(0,n.getOuterWidth)(this._$item,!0);if(0===e)return null;const t=(0,n.getOuterHeight)(this._$item,!0),i=(0,n.getInnerWidth)(this._$itemContainer),o=(0,n.getInnerHeight)(this._$viewPort),a=this._scrollView.scrollTop();return{itemWidth:e,itemHeight:t,viewPortWidth:i,viewPortHeight:o,viewPortScrollTop:a,viewPortScrollBottom:a+o,itemPerRowCount:Math.floor(i/e),rowPerPageRate:o/t}}createItemLayoutModel(e){const t=this.getLayoutModel();if(!t)return null;const i=Math.floor(e/t.itemPerRowCount),n=e%t.itemPerRowCount,o=i*t.itemHeight;return{itemRowIndex:i,itemColumnIndex:n,itemTop:o,itemBottom:o+t.itemHeight}}scrollToItem(e){const t=this.getLayoutModel();if(!t)return;const i=Math.floor(e/t.itemPerRowCount)*t.itemHeight,n=i+t.itemHeight;let o=t.viewPortScrollTop;i<t.viewPortScrollTop?o=i:n>t.viewPortScrollBottom&&(o=n-t.viewPortHeight),this._scrollView.scrollTo(o)}}t.default=m;e.exports=t.default,e.exports.default=t.default},85186:function(e,t,i){t.default=void 0;var n=I(i(64553)),o=i(52576),a=i(11528),s=i(87739),r=i(17781),l=I(i(4671)),d=I(i(92848)),u=I(i(11118)),c=I(i(93380)),h=i(57011),p=i(27018),g=i(59393),_=I(i(40729)),f=I(i(82724)),m=I(i(17772)),v=I(i(65485)),C=I(i(59679)),y=I(i(44313)),b=I(i(9516)),x=I(i(81606)),w=I(i(74327)),S=i(53904),D=i(60648);function I(e){return e&&e.__esModule?e:{default:e}}const E="dx-filemanager",T=E+"-wrapper",A=E+"-container",O=E+"-dirs-panel",P=E+"-editing-container",k=E+"-items-panel",M=E+"-item-custom-thumbnail",R="navPane",L="itemView";class B extends u.default{_initTemplates(){}_init(){super._init(),this._initActions(),this._providerUpdateDeferred=null,this._lockCurrentPathProcessing=!1,this._wasRendered=!1,this._controller=new p.FileItemsController({currentPath:this.option("currentPath"),currentPathKeys:this.option("currentPathKeys"),rootText:this.option("rootFolderName"),fileProvider:this.option("fileSystemProvider"),allowedFileExtensions:this.option("allowedFileExtensions"),uploadMaxFileSize:this.option("upload").maxFileSize,uploadChunkSize:this.option("upload").chunkSize,onInitialized:this._onControllerInitialized.bind(this),onDataLoading:this._onDataLoading.bind(this),onSelectedDirectoryChanged:this._onSelectedDirectoryChanged.bind(this),onPathPotentiallyChanged:this._checkPathActuality.bind(this),editingEvents:this._actions.editing})}_initMarkup(){super._initMarkup(),this._firstItemViewLoad=!0,this._lockSelectionProcessing=!1,this._lockFocusedItemProcessing=!1,this._itemKeyToFocus=void 0,this._loadedWidgets=[],this._commandManager=new g.FileManagerCommandManager(this.option("permissions")),this.$element().addClass(E),this._wasRendered?this._prepareToLoad():this._wasRendered=!0,this._createNotificationControl(),this._initCommandManager()}_createNotificationControl(){const e=(0,n.default)("<div>").addClass("dx-filemanager-notification-container").appendTo(this.$element());this._notificationControl=this._createComponent(e,y.default,{progressPanelContainer:this.$element(),contentTemplate:(e,t)=>this._createWrapper(e,t),onActionProgress:e=>this._onActionProgress(e),positionTarget:`.${A}`,showProgressPanel:this.option("notifications.showPanel"),showNotificationPopup:this.option("notifications.showPopup")})}_createWrapper(e,t){this._$wrapper=(0,n.default)("<div>").addClass(T).appendTo(e),this._createEditing(t);const i=(0,n.default)("<div>").appendTo(this._$wrapper);this._toolbar=this._createComponent(i,C.default,{commandManager:this._commandManager,generalItems:this.option("toolbar.items"),fileItems:this.option("toolbar.fileSelectionItems"),itemViewMode:this.option("itemView").mode,onItemClick:e=>this._actions.onToolbarItemClick(e)}),this._createAdaptivityControl()}_createAdaptivityControl(){const e=(0,n.default)("<div>").addClass(A).appendTo(this._$wrapper);this._adaptivityControl=this._createComponent(e,w.default,{drawerTemplate:e=>this._createFilesTreeView(e),contentTemplate:e=>this._createItemsPanel(e),onAdaptiveStateChanged:e=>this._onAdaptiveStateChanged(e)}),this._editing.setUploaderSplitterElement(this._adaptivityControl.getSplitterElement())}_createEditing(e){const t=(0,n.default)("<div>").addClass(P).appendTo(this.$element());this._editing=this._createComponent(t,b.default,{controller:this._controller,model:{getMultipleSelectedItems:this._getSelectedItemInfos.bind(this)},getItemThumbnail:this._getItemThumbnailInfo.bind(this),notificationControl:e,uploadDropZonePlaceholderContainer:this.$element(),rtlEnabled:this.option("rtlEnabled"),onSuccess:e=>{let{updatedOnlyFiles:t}=e;return this._redrawComponent(t)},onError:e=>this._onEditingError(e)})}_createItemsPanel(e){this._$itemsPanel=(0,n.default)("<div>").addClass(k).appendTo(e),this._createBreadcrumbs(this._$itemsPanel),this._createItemView(this._$itemsPanel),this._updateUploadDropZone()}_updateUploadDropZone(){const e=this._commandManager.isCommandAvailable("upload")?this._$itemsPanel:(0,n.default)();this._editing.setUploaderDropZone(e)}_createFilesTreeView(e){this._filesTreeViewContextMenu=this._createContextMenu(!1,R);const t=(0,n.default)("<div>").addClass(O).appendTo(e);this._filesTreeView=this._createComponent(t,f.default,{storeExpandedState:!0,contextMenu:this._filesTreeViewContextMenu,getDirectories:this.getDirectories.bind(this),getCurrentDirectory:this._getCurrentDirectory.bind(this),onDirectoryClick:e=>{let{itemData:t}=e;return this._setCurrentDirectory(t)},onItemListDataLoaded:()=>this._tryEndLoading(R)}),this._filesTreeView.updateCurrentDirectory()}_createItemView(e,t){this._itemViewContextMenu=this._createContextMenu(!0,L);const i=this.option("itemView"),o={selectionMode:this.option("selectionMode"),selectedItemKeys:this.option("selectedItemKeys"),focusedItemKey:this.option("focusedItemKey"),contextMenu:this._itemViewContextMenu,getItems:this._getItemViewItems.bind(this),onError:e=>{let{error:t}=e;return this._showError(t)},onSelectionChanged:this._onItemViewSelectionChanged.bind(this),onFocusedItemChanged:this._onItemViewFocusedItemChanged.bind(this),onSelectedItemOpened:this._onSelectedItemOpened.bind(this),onContextMenuShowing:e=>this._onContextMenuShowing(L,e),onItemListItemsLoaded:()=>this._tryEndLoading(L),getItemThumbnail:this._getItemThumbnailInfo.bind(this),customizeDetailColumns:this.option("customizeDetailColumns"),detailColumns:this.option("itemView.details.columns")},a=(0,n.default)("<div>").appendTo(e),s="thumbnails"===(t=t||i.mode)?v.default:m.default;this._itemView=this._createComponent(a,s,o)}_createBreadcrumbs(e){const t=(0,n.default)("<div>").appendTo(e);this._breadcrumbs=this._createComponent(t,x.default,{rootFolderDisplayName:this.option("rootFolderName"),onCurrentDirectoryChanging:e=>{let{currentDirectory:t}=e;return this._setCurrentDirectory(t,!0)}}),this._breadcrumbs.setCurrentDirectory(this._getCurrentDirectory())}_createContextMenu(e,t){const i=(0,n.default)("<div>").appendTo(this._$wrapper);return this._createComponent(i,_.default,{commandManager:this._commandManager,items:this.option("contextMenu.items"),onItemClick:e=>this._actions.onContextMenuItemClick(e),onContextMenuShowing:e=>this._onContextMenuShowing(t,e),isolateCreationItemCommands:e,viewArea:t})}_initCommandManager(){const e=(0,o.extend)(this._editing.getCommandActions(),{refresh:()=>this._refreshAndShowProgress(),thumbnails:()=>this.option("itemView.mode","thumbnails"),details:()=>this.option("itemView.mode","details"),clearSelection:()=>this._clearSelection(),showNavPane:()=>this._adaptivityControl.toggleDrawer()});this._commandManager.registerActions(e)}_onItemViewSelectionChanged(e){let{selectedItemInfos:t,selectedItems:i,selectedItemKeys:n,currentSelectedItemKeys:o,currentDeselectedItemKeys:a}=e;this._lockSelectionProcessing=!0,this.option("selectedItemKeys",n),this._lockSelectionProcessing=!1,this._actions.onSelectionChanged({selectedItems:i,selectedItemKeys:n,currentSelectedItemKeys:o,currentDeselectedItemKeys:a}),this._updateToolbar(t)}_onItemViewFocusedItemChanged(e){this._lockFocusedItemProcessing=!0,this.option("focusedItemKey",e.itemKey),this._lockFocusedItemProcessing=!1,this._actions.onFocusedItemChanged({item:e.item,itemElement:e.itemElement})}_onAdaptiveStateChanged(e){let{enabled:t}=e;this._commandManager.setCommandEnabled("showNavPane",t),this._updateToolbar()}_onActionProgress(e){let{message:t,status:i}=e;this._toolbar.updateRefreshItem(t,i),this._updateToolbar()}_onEditingError(e){const t=(0,h.extendAttributes)({},e,["errorCode","errorText","fileSystemItem"]);this._actions.onErrorOccurred(t),e.errorText=t.errorText}_refreshAndShowProgress(){return this._prepareToLoad(),(0,s.when)(this._notificationControl.tryShowProgressPanel(),this._controller.refresh()).then((()=>this._filesTreeView.refresh()))}_isAllWidgetsLoaded(){return 2===this._loadedWidgets.length&&-1!==this._loadedWidgets.indexOf(R)&&-1!==this._loadedWidgets.indexOf(L)}_tryEndLoading(e){this._loadedWidgets.push(e),this._isAllWidgetsLoaded()&&this._controller.endSingleLoad()}_prepareToLoad(){this._loadedWidgets=[],this._controller.startSingleLoad()}_updateToolbar(e){const t=e||this._getSelectedItemInfos();this._toolbar.option("contextItems",(0,r.ensureDefined)(t,[]))}_switchView(e){this._disposeWidget(this._itemView.option("contextMenu")),this._disposeWidget(this._itemView),this._createItemView(this._$itemsPanel,e),this._toolbar.option({itemViewMode:e})}_disposeWidget(e){e.dispose(),e.$element().remove()}_clearSelection(){this._itemView.clearSelection()}_showError(e){this._showNotification(e,!1)}_showNotification(e,t){(0,c.default)({message:e,width:450},t?"success":"error",5e3)}_redrawComponent(e){this._itemView.refresh().then((()=>!e&&this._filesTreeView.refresh()))}_getItemViewItems(){const e=this.option("itemView").showFolders;let t=this._controller.getCurrentItems(!e);return this._updateToolbarWithSelectionOnFirstLoad(t),this.option("itemView.showParentFolder")&&(t=(0,s.when)(t).then((e=>this._getPreparedItemViewItems(e)))),t}_updateToolbarWithSelectionOnFirstLoad(e){if(!this._firstItemViewLoad)return;this._firstItemViewLoad=!1;const t=this.option("selectedItemKeys");t.length>0&&(0,s.when)(e).done((e=>{const i=(0,h.findItemsByKeys)(e,t);i.length>0&&this._updateToolbar(i)}))}_getPreparedItemViewItems(e){const t=this._getCurrentDirectory();if(t.fileItem.isRoot())return e;const i=t.fileItem.createClone();i.isParentFolder=!0,i.name="..",i.relativeName="..",i.key=`[*DXPDK*]$40F96F03-FBD8-43DF-91BE-F55F4B8BA871$${t.fileItem.key}`;const n=[...e];return n.unshift({fileItem:i,icon:"parentfolder"}),n}_onContextMenuShowing(e,t){var i;let n=(0,h.extendAttributes)({},t,["targetElement","cancel","event"]);n=(0,o.extend)(n,{viewArea:e,fileSystemItem:null===(i=t.itemData)||void 0===i?void 0:i.fileItem,_isActionButton:t.isActionButton}),this._actions.onContextMenuShowing(n),t.cancel=(0,r.ensureDefined)(n.cancel,!1)}_getItemThumbnailInfo(e){const t=this.option("customizeThumbnail"),i=(0,a.isFunction)(t)?t(e.fileItem):e.fileItem.thumbnail;return i?{thumbnail:i,cssClass:M}:{thumbnail:e.icon}}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{fileSystemProvider:null,currentPath:"",currentPathKeys:[],rootFolderName:l.default.format("dxFileManager-rootDirectoryName"),selectionMode:"multiple",selectedItemKeys:[],focusedItemKey:void 0,toolbar:{items:["showNavPane","create","upload","switchView",{name:"separator",location:"after"},"refresh"],fileSelectionItems:["download","separator","move","copy","rename","separator","delete","clearSelection",{name:"separator",location:"after"},"refresh"]},contextMenu:{items:["create","upload","rename","move","copy","delete","refresh","download"]},itemView:{details:{columns:["thumbnail","name","dateModified","size"]},mode:"details",showFolders:!0,showParentFolder:!0},customizeThumbnail:null,customizeDetailColumns:null,onContextMenuItemClick:null,onContextMenuShowing:null,onCurrentDirectoryChanged:null,onSelectedFileOpened:null,onSelectionChanged:null,onFocusedItemChanged:null,onToolbarItemClick:null,onErrorOccurred:null,onDirectoryCreating:null,onDirectoryCreated:null,onItemRenaming:null,onItemRenamed:null,onItemDeleting:null,onItemDeleted:null,onItemCopying:null,onItemCopied:null,onItemMoving:null,onItemMoved:null,onFileUploading:null,onFileUploaded:null,onItemDownloading:null,allowedFileExtensions:[],upload:{maxFileSize:0,chunkSize:2e5},permissions:(0,o.extend)({},g.defaultPermissions),notifications:{showPanel:!0,showPopup:!0}})}option(e,t){const i=(0,S.normalizeOptions)(e,t),n=arguments.length<2&&"object"!==(0,a.type)(e),o=e=>(0,a.isDefined)(i[e]),r=e=>{if(!o(e))return!1;const t=this.option(e),n=i[e];return!(0,D.equals)(t,n)};return!n&&o("fileSystemProvider")&&(this._providerUpdateDeferred=new s.Deferred,(r("currentPath")||r("currentPathKeys"))&&(this._lockCurrentPathProcessing=!0)),super.option(...arguments)}_optionChanged(e){const t=e.name;switch(t){case"currentPath":{const t=()=>(this._lockCurrentPathProcessing=!1,this._controller.setCurrentPath(e.value));this._lockCurrentPathProcessing=!0,this._providerUpdateDeferred?this._providerUpdateDeferred.then(t):t()}break;case"currentPathKeys":{const t=()=>(this._lockCurrentPathProcessing=!1,this._controller.setCurrentPathByKeys(e.value));this._lockCurrentPathProcessing=!0,this._providerUpdateDeferred?this._providerUpdateDeferred.then(t):t()}break;case"selectedItemKeys":!this._lockSelectionProcessing&&this._itemView&&this._itemView.option("selectedItemKeys",e.value);break;case"focusedItemKey":!this._lockFocusedItemProcessing&&this._itemView&&this._itemView.option("focusedItemKey",e.value);break;case"rootFolderName":this._controller.setRootText(e.value),this._invalidate();break;case"fileSystemProvider":{this._lockCurrentPathProcessing||(this._providerUpdateDeferred=new s.Deferred);const t=this._lockCurrentPathProcessing?void 0:this.option("currentPathKeys");this._controller.updateProvider(e.value,t).then((()=>this._providerUpdateDeferred.resolve())).always((()=>{this._providerUpdateDeferred=null,this.repaint()}));break}case"allowedFileExtensions":this._controller.setAllowedFileExtensions(e.value),this._invalidate();break;case"upload":this._controller.setUploadOptions(this.option("upload")),this._invalidate();break;case"permissions":this._commandManager.updatePermissions(this.option("permissions")),this._filesTreeViewContextMenu.tryUpdateVisibleContextMenu(),this._itemViewContextMenu.tryUpdateVisibleContextMenu(),this._toolbar.updateItemPermissions(),this._updateUploadDropZone();break;case"selectionMode":case"customizeThumbnail":case"customizeDetailColumns":this._invalidate();break;case"itemView":"itemView.mode"===e.fullName?this._switchView(e.value):this._invalidate();break;case"toolbar":{const t={};"toolbar"===e.fullName&&(e.value.items&&(t.generalItems=e.value.items),e.value.fileSelectionItems&&(t.fileItems=e.value.fileSelectionItems)),0===e.fullName.indexOf("toolbar.items")&&(t.generalItems=this.option("toolbar.items")),0===e.fullName.indexOf("toolbar.fileSelectionItems")&&(t.fileItems=this.option("toolbar.fileSelectionItems")),this._toolbar.option(t)}break;case"contextMenu":if("contextMenu"===e.fullName&&e.value.items||0===e.fullName.indexOf("contextMenu.items")){const e=this.option("contextMenu.items");this._filesTreeViewContextMenu.option("items",e),this._itemViewContextMenu.option("items",e)}break;case"notifications":this._notificationControl.option("showProgressPanel",this.option("notifications.showPanel")),this._notificationControl.option("showNotificationPopup",this.option("notifications.showPopup"));break;case"onContextMenuItemClick":case"onContextMenuShowing":case"onCurrentDirectoryChanged":case"onSelectedFileOpened":case"onSelectionChanged":case"onFocusedItemChanged":case"onToolbarItemClick":case"onErrorOccurred":this._actions[t]=this._createActionByOption(t);break;case"onDirectoryCreating":case"onDirectoryCreated":case"onItemRenaming":case"onItemRenamed":case"onItemDeleting":case"onItemDeleted":case"onItemCopying":case"onItemCopied":case"onItemMoving":case"onItemMoved":case"onFileUploading":case"onFileUploaded":case"onItemDownloading":this._actions.editing[t]=this._createActionByOption(t);break;case"rtlEnabled":this._editing.updateDialogRtl(e.value),super._optionChanged(e);break;default:super._optionChanged(e)}}_initActions(){this._actions={onContextMenuItemClick:this._createActionByOption("onContextMenuItemClick"),onContextMenuShowing:this._createActionByOption("onContextMenuShowing"),onCurrentDirectoryChanged:this._createActionByOption("onCurrentDirectoryChanged"),onSelectedFileOpened:this._createActionByOption("onSelectedFileOpened"),onSelectionChanged:this._createActionByOption("onSelectionChanged"),onFocusedItemChanged:this._createActionByOption("onFocusedItemChanged"),onToolbarItemClick:this._createActionByOption("onToolbarItemClick"),onErrorOccurred:this._createActionByOption("onErrorOccurred"),editing:{onDirectoryCreating:this._createActionByOption("onDirectoryCreating"),onDirectoryCreated:this._createActionByOption("onDirectoryCreated"),onItemRenaming:this._createActionByOption("onItemRenaming"),onItemRenamed:this._createActionByOption("onItemRenamed"),onItemDeleting:this._createActionByOption("onItemDeleting"),onItemDeleted:this._createActionByOption("onItemDeleted"),onItemCopying:this._createActionByOption("onItemCopying"),onItemCopied:this._createActionByOption("onItemCopied"),onItemMoving:this._createActionByOption("onItemMoving"),onItemMoved:this._createActionByOption("onItemMoved"),onFileUploading:this._createActionByOption("onFileUploading"),onFileUploaded:this._createActionByOption("onFileUploaded"),onItemDownloading:this._createActionByOption("onItemDownloading")}}}executeCommand(e){return this._commandManager.executeCommand(e)}_setCurrentDirectory(e,t){this._controller.setCurrentDirectory(e,t)}_getCurrentDirectory(){return this._controller.getCurrentDirectory()}_onControllerInitialized(e){let{controller:t}=e;this._controller=this._controller||t,this._syncToCurrentDirectory()}_onDataLoading(e){let{operation:t}=e,i=null;t===p.OPERATIONS.NAVIGATION&&(i={focusedItemKey:this._itemKeyToFocus,selectedItemKeys:this.option("selectedItemKeys")},this._itemKeyToFocus=void 0),this._itemView.refresh(i,t)}_onSelectedDirectoryChanged(){const e=this._getCurrentDirectory();this._syncToCurrentDirectory(),this._actions.onCurrentDirectoryChanged({directory:e.fileItem})}_syncToCurrentDirectory(){const e=this._getCurrentDirectory();this._filesTreeView&&this._filesTreeView.updateCurrentDirectory(),this._breadcrumbs&&this._breadcrumbs.setCurrentDirectory(e),this._checkPathActuality()}_checkPathActuality(){if(this._lockCurrentPathProcessing)return;const e=this._controller.getCurrentPath(),t=this._controller.getCurrentPathKeys(),i={};this.option("currentPath")!==e&&(i.currentPath=e),(0,r.equalByValue)(this.option("currentPathKeys"),t)||(i.currentPathKeys=t),(0,a.isEmptyObject)(i)||this.option(i)}getDirectories(e,t){return this._controller.getDirectories(e,t)}_getSelectedItemInfos(){return this._itemView?this._itemView.getSelectedItems():[]}refresh(){return this.executeCommand("refresh")}getCurrentDirectory(){const e=this._getCurrentDirectory();return e&&e.fileItem||null}getSelectedItems(){return this._getSelectedItemInfos().map((e=>e.fileItem))}_onSelectedItemOpened(e){let{fileItemInfo:t}=e;const i=t.fileItem;if(!i.isDirectory)return void this._actions.onSelectedFileOpened({file:i});i.isParentFolder&&(this._itemKeyToFocus=this._getCurrentDirectory().fileItem.key);const n=i.isParentFolder?this._getCurrentDirectory().parentDirectory:t;this._setCurrentDirectory(n),n&&this._filesTreeView.toggleDirectoryExpandedState(n.parentDirectory,!0)}}(0,d.default)("dxFileManager",B);t.default=B;e.exports=t.default,e.exports.default=t.default},7702:function(e,t,i){Object.defineProperty(t,"ErrorCode",{enumerable:!0,get:function(){return o.default}}),t.FileManagerMessages=void 0;var n=a(i(4671)),o=a(i(54950));function a(e){return e&&e.__esModule?e:{default:e}}t.FileManagerMessages={get:(e,t)=>{switch(e){case o.default.NoAccess:return n.default.format("dxFileManager-errorNoAccess");case o.default.FileExists:return n.default.format("dxFileManager-errorFileExistsFormat",t);case o.default.FileNotFound:return n.default.format("dxFileManager-errorFileNotFoundFormat",t);case o.default.DirectoryExists:return n.default.format("dxFileManager-errorDirectoryExistsFormat",t);case o.default.DirectoryNotFound:return n.default.format("dxFileManager-errorDirectoryNotFoundFormat",t);case o.default.WrongFileExtension:return n.default.format("dxFileManager-errorWrongFileExtension");case o.default.MaxFileSizeExceeded:return n.default.format("dxFileManager-errorMaxFileSizeExceeded");case o.default.InvalidSymbols:return n.default.format("dxFileManager-errorInvalidSymbols")}return n.default.format("dxFileManager-errorDefault")}}},44313:function(e,t,i){t.default=void 0;var n=i(57653),o=p(i(64553)),a=i(52576),s=i(11528),r=i(87739),l=i(3104),d=p(i(11118)),u=p(i(10720)),c=p(i(7968)),h=i(88989);function p(e){return e&&e.__esModule?e:{default:e}}const g=(0,l.getWindow)(),_="dx-filemanager-notification",f=`${_}-drawer`,m=`${f}-panel`,v=`${_}-popup`,C=`${_}-popup-error`,y=`${_}-common`,b=`${_}-separator`,x=`${_}-details`,w=`${_}-common-no-item`;class S extends d.default{_initMarkup(){super._initMarkup(),this._initActions(),this._isInAdaptiveState=this._isSmallScreen(),this._managerMap={},this._notificationManagerStubId=null,this._setNotificationManager();const e=this.option("progressPanelContainer"),t=(0,o.default)("<div>").addClass(f).appendTo(e);(0,o.default)("<div>").addClass(m).appendTo(t);const i=(0,a.extend)({opened:!1,position:"right",template:e=>this._ensureProgressPanelCreated(e)},this._getProgressDrawerAdaptiveOptions());this._progressDrawer=this._createComponent(t,c.default,i);const n=t.find(`.${m}`).first(),r=this.option("contentTemplate");(0,s.isFunction)(r)&&r(n,this)}_setNotificationManager(e){if(e=(0,a.extend)({onActionProgressStatusChanged:this._raiseActionProgress.bind(this)},e),!this._notificationManagerStubId){const t=new h.NotificationManagerStub(e);this._notificationManagerStubId=t.getId(),this._managerMap[this._notificationManagerStubId]=t}if(!this._isProgressDrawerDisabled()){const t=this._getProgressManagerComponent();e.isActual=!0;const i=new t(e);this._managerMap[i.getId()]=i}}_getNotificationManager(e){const t=(null==e?void 0:e[h.MANAGER_ID_NAME])||this._getActualNotificationManagerId();return this._managerMap[t]||this._managerMap[this._notificationManagerStubId]}_clearManagerMap(){const e=this._managerMap[this._notificationManagerStubId];delete this._managerMap,this._managerMap={[this._notificationManagerStubId]:e}}_getActualNotificationManagerId(){return Object.keys(this._managerMap).filter((e=>this._managerMap[e].isActual()))[0]}tryShowProgressPanel(){const e=new r.Deferred,t=this._getNotificationManager();return t.isActionProgressStatusDefault()||this._isProgressDrawerOpened()||this._isProgressDrawerDisabled()?e.resolve().promise():(setTimeout((()=>{this._progressDrawer.show().done(e.resolve),this._hidePopup(),t.tryHideActionProgress()})),e.promise())}addOperation(e,t,i){return this._getNotificationManager().addOperation(e,t,i)}addOperationDetails(e,t,i){this._getNotificationManager(e).addOperationDetails(e,t,i)}updateOperationItemProgress(e,t,i,n){this._getNotificationManager(e).updateOperationItemProgress(e,t,i,n)}completeOperationItem(e,t,i){this._getNotificationManager(e).completeOperationItem(e,t,i)}finishOperation(e,t){this._getNotificationManager(e).finishOperation(e,t)}completeOperation(e,t,i,n){const o=this._getNotificationManager(e);i||this._showPopup(t),o.completeOperation(e,t,i,n),this._isProgressDrawerOpened()&&o.hasNoOperations()?o.tryHideActionProgress():o.updateActionProgressStatus(e)}completeSingleOperationWithError(e,t){this._getNotificationManager(e).completeSingleOperationWithError(e,t),this._showPopupError(t)}addOperationDetailsError(e,t){this._getNotificationManager(e).addOperationDetailsError(e,t),this._showPopupError(t)}_hideProgressPanel(){setTimeout((()=>this._progressDrawer.hide()))}_isSmallScreen(){return!!(0,l.hasWindow)()&&(0,n.getWidth)(g)<=1e3}_dimensionChanged(e){e&&"height"===e||this._checkAdaptiveState()}_checkAdaptiveState(){const e=this._isInAdaptiveState;if(this._isInAdaptiveState=this._isSmallScreen(),e!==this._isInAdaptiveState&&this._progressDrawer){if(this._getNotificationManager().handleDimensionChanged()){const e=this._getProgressDrawerAdaptiveOptions();this._progressDrawer.option(e)}}}_getProgressDrawerAdaptiveOptions(){return this._isInAdaptiveState?{openedStateMode:"overlap",shading:!0,hideOnOutsideClick:!0}:{openedStateMode:"shrink",shading:!1,hideOnOutsideClick:!1}}_ensureProgressPanelCreated(e){this._getNotificationManager().ensureProgressPanelCreated(e,{onOperationCanceled:e=>{let{info:t}=e;return this._raiseOperationCanceled(t)},onOperationItemCanceled:e=>{let{item:t,itemIndex:i}=e;return this._raiseOperationItemCanceled(t,i)},onPanelClosed:()=>this._hideProgressPanel()})}_getProgressManagerComponent(){return h.NotificationManager}_isProgressDrawerDisabled(){return!this.option("showProgressPanel")}_isProgressDrawerOpened(){return this._progressDrawer.option("opened")}_hidePopup(e){(this.option("showNotificationPopup")||e)&&this._getNotificationPopup().hide()}_showPopup(e,t){!this._isProgressDrawerOpened()&&this.option("showNotificationPopup")&&(this._getNotificationPopup().$wrapper().toggleClass(C,!!t),this._getNotificationPopup().option("contentTemplate",e),this._getNotificationPopup().option("visible")||this._getNotificationPopup().show())}_showPopupError(e){if(!this.option("showNotificationPopup"))return;const t=this._getNotificationManager(),i=(0,o.default)("<div>"),n=(0,o.default)("<div>").addClass(y).text(e.commonErrorText),a=(0,o.default)("<div>").addClass(b);(0,o.default)("<div>").appendTo(a);const s=(0,o.default)("<div>").addClass(x);e.item?t.createErrorDetailsProgressBox(s,e.item,e.detailErrorText):(n.addClass(w),t.renderError(s,e.detailErrorText)),i.append(n,a,s),this._showPopup(i,!0)}_getNotificationPopup(){if(!this._notificationPopup){const e=(0,o.default)("<div>").appendTo(this.$element());this._notificationPopup=this._createComponent(e,u.default,{container:this.$element(),width:"auto",height:"auto",showTitle:!1,dragEnabled:!1,shading:!1,visible:!1,hideOnOutsideClick:!0,animation:{duration:0},position:{my:"right top",at:"right top",of:this.option("positionTarget"),offset:"-10 -5"},_wrapperClassExternal:v})}return this._notificationPopup}_raiseActionProgress(e,t){this._actions.onActionProgress({message:e,status:t})}_raiseOperationCanceled(e){this._actions.onOperationCanceled({info:e})}_raiseOperationItemCanceled(e,t){this._actions.onOperationItemCanceled({item:e,itemIndex:t})}_initActions(){this._actions={onActionProgress:this._createActionByOption("onActionProgress"),onOperationCanceled:this._createActionByOption("onOperationCanceled"),onOperationItemCanceled:this._createActionByOption("onOperationItemCanceled")}}_getDefaultOptions(){return(0,a.extend)(super._getDefaultOptions(),{progressPanelContainer:null,contentTemplate:null,onActionProgress:null,onOperationCanceled:null,onOperationItemCanceled:null,showProgressPanel:!0,showNotificationPopup:!0})}_optionChanged(e){const t=e.name;switch(t){case"progressPanelContainer":case"contentTemplate":break;case"showProgressPanel":this._setNotificationManager(),this._getNotificationManager().updateActionProgressStatus(),e.value||(this._hideProgressPanel(),this._clearManagerMap()),this._progressDrawer.repaint();break;case"showNotificationPopup":e.value||this._hidePopup(!0);break;case"onActionProgress":case"onOperationCanceled":case"onOperationItemCanceled":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}}t.default=S,e.exports=t.default,e.exports.default=t.default},51965:function(e,t,i){t.default=void 0;var n=h(i(64553)),o=i(52576),a=i(17781),s=i(69629),r=h(i(4671)),l=h(i(11118)),d=h(i(58436)),u=h(i(64973)),c=h(i(91374));function h(e){return e&&e.__esModule?e:{default:e}}const p="dx-filemanager-progress-panel",g=`${p}-container`,_=`${p}-title`,f=`${p}-title-text`,m=`${p}-close-button`,v=`${p}-infos-container`,C=`${p}-separator`,y=`${p}-info`,b=`${p}-common`,x=`${p}-info-with-details`,w=`${p}-details`,S="dx-filemanager-progress-box",D=`${S}-error`,I=`${S}-without-close-button`,E=`${S}-image`,T=`${S}-wrapper`,A=`${S}-common`,O=`${S}-progress-bar`,P=`${S}-close-button`;class k extends l.default{_initMarkup(){super._initMarkup(),this._initActions(),this._operationCount=0,this.$element().addClass(p);const e=(0,n.default)("<div>").appendTo(this.$element()),t=(0,n.default)("<div>").addClass(g).appendTo(e);this._scrollView=this._createComponent(e,c.default,{scrollByContent:!0,scrollByThumb:!0,showScrollbar:"onScroll"});const i=(0,n.default)("<div>").addClass(_).appendTo(t);(0,n.default)("<div>").text(r.default.format("dxFileManager-notificationProgressPanelTitle")).addClass(f).appendTo(i);const o=(0,n.default)("<div>").addClass(m).appendTo(i);this._createComponent(o,u.default,{icon:"close",stylingMode:"text",onClick:()=>this._raisePanelClosed()}),this._$infosContainer=(0,n.default)("<div>").addClass(v).appendTo(t),this._renderEmptyListText()}_getDefaultOptions(){return(0,o.extend)(super._getDefaultOptions(),{onOperationClosed:null,onOperationCanceled:null,onOperationItemCanceled:null,onPanelClosed:null})}_initActions(){this._actions={onOperationClosed:this._createActionByOption("onOperationClosed"),onOperationCanceled:this._createActionByOption("onOperationCanceled"),onOperationItemCanceled:this._createActionByOption("onOperationItemCanceled"),onPanelClosed:this._createActionByOption("onPanelClosed")}}_optionChanged(e){const t=e.name;switch(t){case"test":break;case"onOperationClosed":case"onOperationCanceled":case"onOperationItemCanceled":this._actions[t]=this._createActionByOption(t);break;default:super._optionChanged(e)}}addOperation(e,t,i){this._operationCount?(0,n.default)("<div>").addClass(C).prependTo(this._$infosContainer):this._$infosContainer.empty(),this._operationCount++;const o={customCloseHandling:t,allowProgressAutoUpdate:(0,a.ensureDefined)(i,!0)},s=(0,n.default)("<div>").addClass(y).prependTo(this._$infosContainer);o.$info=s;const r=(0,n.default)("<div>").addClass(b).appendTo(s);return o.common=this._createProgressBox(r,{commonText:e,showCloseButton:!0,showCloseButtonAlways:t,onCloseButtonClick:()=>this._closeOperation(o)}),o}addOperationDetails(e,t,i){e.$info.addClass(x);const o=(0,n.default)("<div>").addClass(w).appendTo(e.$info);e.details=t.map(((t,n)=>(t.info=e,this._createDetailsItem(o,t,n,!1,i))))}_createDetailsItem(e,t,i,o,a){const s=(0,n.default)("<div>").appendTo(e);return-1!==i&&s.addClass("dx-card"),this._createProgressBox(s,{commonText:t.commonText,imageUrl:t.imageUrl,skipProgressBox:o,showCloseButton:a,showCloseButtonAlways:a,onCloseButtonClick:()=>this._cancelOperationItem(t,i)})}completeOperationItem(e,t,i){e.allowProgressAutoUpdate&&this.updateOperationItemProgress(e,t,100,i),this._setCloseButtonVisible(e.details[t],!1)}updateOperationItemProgress(e,t,i,n){if(this.updateOperationCommonProgress(e,n),e.details){e.details[t].progressBar.option("value",i)}}updateOperationCommonProgress(e,t){var i;null===(i=e.common.progressBar)||void 0===i||i.option("value",t)}completeOperation(e,t,i,n){e.completed=!0,e.common.$commonText.text(t),i?this._removeProgressBar(e.common):e.allowProgressAutoUpdate&&this.updateOperationCommonProgress(e,100),n&&this._setProgressBarText(e.common,n),this._setCloseButtonVisible(e.common,!0)}completeSingleOperationWithError(e,t){var i;const n=null===(i=e.details)||void 0===i?void 0:i[0];e.completed=!0,this._renderOperationError(n||e.common,t),this._setCloseButtonVisible(e.common,!0),n&&this._setCloseButtonVisible(n,!1)}addOperationDetailsError(e,t,i){const n=e.details[t];this._renderOperationError(n,i),this._setCloseButtonVisible(n,!1)}_renderError(e,t,i){(0,n.default)("<div>").text(i).addClass(D).appendTo(e)}_renderEmptyListText(){this._$infosContainer.text(r.default.format("dxFileManager-notificationProgressPanelEmptyListText"))}_renderOperationError(e,t){this._removeProgressBar(e),this._renderError(e.$wrapper,e.$commonText,t)}_removeProgressBar(e){e.progressBar&&(e.progressBar.dispose(),e.progressBar.$element().remove(),e.progressBar=null)}_createProgressBox(e,t){e.addClass(S),t.showCloseButtonAlways||e.addClass(I),t.imageUrl&&(0,s.getImageContainer)(t.imageUrl).addClass(E).appendTo(e);const i=(0,n.default)("<div>").addClass(T).appendTo(e),o=(0,n.default)("<div>").addClass(A).text(t.commonText).appendTo(i);let a=null;if(!t.skipProgressBox){const e=(0,n.default)("<div>").addClass(O).appendTo(i);a=this._createComponent(e,d.default,{min:0,max:100,width:"100%",validationMessageMode:"always",statusFormat:(e,t)=>this._getStatusString(e,t)})}let r=null;if(t.showCloseButton){const i=(0,n.default)("<div>").addClass(P).appendTo(e);r=this._createComponent(i,u.default,{icon:"dx-filemanager-i dx-filemanager-i-cancel",stylingMode:"text",visible:t.showCloseButtonAlways,onClick:t.onCloseButtonClick})}return{$commonText:o,progressBar:a,$element:e,$wrapper:i,closeButton:r}}_setCloseButtonVisible(e,t){e.closeButton&&(e.$element.toggleClass(I,!t),e.closeButton.option("visible",t))}_setProgressBarText(e,t){e.progressBar.option("statusFormat",(()=>t))}_closeOperation(e){e.customCloseHandling&&!e.completed?(this._raiseOperationCanceled(e),this._setCloseButtonVisible(e.common,!1),e.details.forEach((e=>this._displayClosedOperationItem(e)))):(this._raiseOperationClosed(e),e.$info.next(`.${C}`).remove(),e.$info.remove(),this._operationCount--,this._operationCount||this._renderEmptyListText())}_cancelOperationItem(e,t){this._raiseOperationItemCanceled(e,t);const i=e.info.details[t];this._displayClosedOperationItem(i)}_displayClosedOperationItem(e){this._setProgressBarText(e,r.default.format("dxFileManager-notificationProgressPanelOperationCanceled")),this._setCloseButtonVisible(e,!1)}_getStatusString(e,t){return 1===e?r.default.format("Done"):Math.round(100*e)+"%"}_raiseOperationClosed(e){this._actions.onOperationClosed({info:e})}_raiseOperationCanceled(e){this._actions.onOperationCanceled({info:e})}_raiseOperationItemCanceled(e,t){this._actions.onOperationItemCanceled({item:e,itemIndex:t})}_raisePanelClosed(){this._actions.onPanelClosed()}}t.default=k;e.exports=t.default,e.exports.default=t.default},88989:function(e,t,i){t.NotificationManagerStub=t.NotificationManager=t.MANAGER_ID_NAME=void 0;var n=l(i(19427)),o=l(i(64553)),a=i(52576),s=i(69629),r=l(i(51965));function l(e){return e&&e.__esModule?e:{default:e}}const d="dx-filemanager-progress-box",u=`${d}-error`,c=`${d}-image`,h=`${d}-wrapper`,p=`${d}-common`,g=t.MANAGER_ID_NAME="__operationInfoManager",_="default",f="progress",m="error",v="success";class C{constructor(e){let{onActionProgressStatusChanged:t,isActual:i}=e;this._id=(new n.default).toString(),this._isActual=i||!1,this._actionProgressStatus=_,this._raiseActionProgress=t}getId(){return this._id}isActual(){return this._isActual}createErrorDetailsProgressBox(e,t,i){const n=this._createDetailsItem(e,t);this.renderError(n.$wrapper,i)}renderError(e,t){(0,o.default)("<div>").text(t).addClass(u).appendTo(e)}isActionProgressStatusDefault(){return this._actionProgressStatus===_}_createDetailsItem(e,t){const i=(0,o.default)("<div>").appendTo(e);return this._createProgressBox(i,{commonText:t.commonText,imageUrl:t.imageUrl})}_createProgressBox(e,t){e.addClass(d),t.imageUrl&&(0,s.getImageContainer)(t.imageUrl).addClass(c).appendTo(e);const i=(0,o.default)("<div>").addClass(h).appendTo(e);return{$commonText:(0,o.default)("<div>").addClass(p).text(t.commonText).appendTo(i),$element:e,$wrapper:i}}}t.NotificationManagerStub=class extends C{addOperation(){return{[g]:this._id}}addOperationDetails(){}updateOperationItemProgress(){}completeOperationItem(){}finishOperation(){}completeOperation(){}completeSingleOperationWithError(){}addOperationDetailsError(){}handleDimensionChanged(){return!1}ensureProgressPanelCreated(){}tryHideActionProgress(){this._updateActionProgress("",_)}updateActionProgressStatus(){this._updateActionProgress("",_)}_updateActionProgress(e,t){t!==_&&t!==f||(this._actionProgressStatus=t,this._raiseActionProgress(e,t))}hasNoOperations(){return!0}get _operationInProgressCount(){return 0}set _operationInProgressCount(e){}get _failedOperationCount(){return 0}set _failedOperationCount(e){}};t.NotificationManager=class extends C{constructor(e){super(e),this._failedOperationCount=0,this._operationInProgressCount=0}addOperation(e,t,i){this._operationInProgressCount++;const n=this._progressPanel.addOperation(e,t,i);return n[g]=this._id,this._updateActionProgress(e,f),n}addOperationDetails(e,t,i){this._progressPanel.addOperationDetails(e,t,i)}updateOperationItemProgress(e,t,i,n){this._progressPanel.updateOperationItemProgress(e,t,i,n)}completeOperationItem(e,t,i){this._progressPanel.completeOperationItem(e,t,i)}finishOperation(e,t){this._progressPanel.updateOperationCommonProgress(e,t)}completeOperation(e,t,i,n){this._operationInProgressCount--,i&&this._failedOperationCount++,this._progressPanel.completeOperation(e,t,i,n)}completeSingleOperationWithError(e,t){this._progressPanel.completeSingleOperationWithError(e,t.detailErrorText),this._notifyError(t)}addOperationDetailsError(e,t){this._progressPanel.addOperationDetailsError(e,t.itemIndex,t.detailErrorText),this._notifyError(t)}handleDimensionChanged(){return this._progressPanel&&this._progressPanel.$element().detach(),!0}ensureProgressPanelCreated(e,t){if(this._progressPanel)this._progressPanel.$element().appendTo(e);else{const i=(0,o.default)("<div>").appendTo(e),n=this._getProgressPanelComponent();this._progressPanel=new n(i,(0,a.extend)({},t,{onOperationClosed:e=>{let{info:t}=e;return this._onProgressPanelOperationClosed(t)}}))}}_getProgressPanelComponent(){return r.default}_onProgressPanelOperationClosed(e){e.hasError&&(this._failedOperationCount--,this.tryHideActionProgress())}tryHideActionProgress(){this.hasNoOperations()&&this._updateActionProgress("",_)}updateActionProgressStatus(e){if(e){const e=0===this._failedOperationCount?v:m;this._updateActionProgress("",e)}}_notifyError(e){const t=this.hasNoOperations()?_:m;this._updateActionProgress(e.commonErrorText,t)}_updateActionProgress(e,t){this._actionProgressStatus=t,this._raiseActionProgress(e,t)}hasNoOperations(){return 0===this._operationInProgressCount&&0===this._failedOperationCount}get _operationInProgressCount(){return this._operationInProgressCountInternal}set _operationInProgressCount(e){this._operationInProgressCountInternal=e}get _failedOperationCount(){return this._failedOperationCountInternal}set _failedOperationCount(e){this._failedOperationCountInternal=e}}},59679:function(e,t,i){t.default=void 0;var n=i(57653),o=p(i(64553)),a=i(52576),s=i(11528),r=i(17781),l=p(i(4671)),d=i(57011),u=i(52071),c=p(i(11118)),h=p(i(2850));function p(e){return e&&e.__esModule?e:{default:e}}i(56582);const g="dx-filemanager-toolbar",_="dx-filemanager-general-toolbar",f=g+"-separator-item",m=g+"-viewmode-item",v={showNavPane:{location:"before"},create:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},upload:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},refresh:{location:"after",showText:"inMenu",cssClass:g+"-has-large-icon",compactMode:{showText:"inMenu",locateInMenu:"auto"}},switchView:{location:"after"},download:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},move:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},copy:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},rename:{location:"before",compactMode:{showText:"inMenu",locateInMenu:"auto"}},delete:{location:"before",compactMode:{showText:"inMenu"}},clearSelection:{location:"after",locateInMenu:"never",compactMode:{showText:"inMenu"}},separator:{location:"before"}},C=["visible","location","locateInMenu","disabled","showText"],y=["accessKey","elementAttr","height","hint","icon","stylingMode","tabIndex","text","width"],b=["separator","switchView"],x={default:"dx-filemanager-i dx-filemanager-i-refresh",progress:"dx-filemanager-i dx-filemanager-i-progress",success:"dx-filemanager-i dx-filemanager-i-done",error:"dx-filemanager-i dx-filemanager-i-danger"};class w extends c.default{_init(){super._init(),this._generalToolbarVisible=!0,this._refreshItemState={message:"",status:"default"}}_initMarkup(){this._createItemClickedAction(),this._$viewSwitcherPopup=(0,o.default)("<div>").addClass("dx-filemanager-view-switcher-popup"),this._generalToolbar=this._createToolbar(this.option("generalItems"),!this._generalToolbarVisible),this._fileToolbar=this._createToolbar(this.option("fileItems"),this._generalToolbarVisible),this._$viewSwitcherPopup.appendTo(this.$element()),this.$element().addClass(g+" "+_)}_render(){super._render();const e=this._getVisibleToolbar();this._checkCompactMode(e)}_clean(){delete this._commandManager,delete this._itemClickedAction,delete this._$viewSwitcherPopup,delete this._generalToolbar,delete this._fileToolbar,super._clean()}_dimensionChanged(e){if(!e||"height"!==e){const e=this._getVisibleToolbar();this._checkCompactMode(e)}}_getVisibleToolbar(){return this._generalToolbarVisible?this._generalToolbar:this._fileToolbar}_createToolbar(e,t){const i=this._getPreparedItems(e),n=(0,o.default)("<div>").appendTo(this.$element()),a=this._createComponent(n,h.default,{items:i,visible:!t,onItemClick:e=>this._raiseItemClicked(e)});return a.compactMode=!1,a}_getPreparedItems(e){return e=e.map((e=>{let t=e;(0,s.isString)(e)&&(t={name:e});const i=t.name,n=this._configureItemByCommandName(i,t);return n.originalItemData=e,"separator"!==i&&this._setItemVisibleAvailable(n),n})),this._updateSeparatorsVisibility(e),e}_updateSeparatorsVisibility(e,t){let i=!1;const n=this._getMenuItems(t),o={before:!1,center:!1,after:!1},a={before:this._getItemsInGroup(e,n,"before"),center:this._getItemsInGroup(e,n,"center"),after:this._getItemsInGroup(e,n,"after")};return e.forEach(((e,t)=>{const s=e.location;if("separator"===e.name){const t=o[s]&&this._groupHasItemsAfter(a[s]);e.visible!==t&&(i=!0,e.visible=t),o[s]=!1}else this._isItemInMenu(n,e)||(o[s]=o[s]||e.visible),a[s].shift()})),t&&i&&t.repaint(),i}_getMenuItems(e){return(e?e._getMenuItems():[]).map((e=>e.originalItemData))}_isItemInMenu(e,t){return!!e.length&&"never"!==(0,r.ensureDefined)(t.locateInMenu,"never")&&-1!==e.indexOf(t.originalItemData)}_getItemsInGroup(e,t,i){return e.filter((e=>e.location===i&&!this._isItemInMenu(t,e)))}_groupHasItemsAfter(e){for(let t=0;t<e.length;t++)if("separator"!==e[t].name&&e[t].visible)return!0;return!1}_configureItemByCommandName(e,t){var i;let n={};const o=this._commandManager.getCommandByName(e);switch(o&&(n=this._createCommandItem(o)),e){case"separator":n=this._createSeparatorItem();break;case"switchView":n=this._createViewModeItem()}if(this._isDefaultItem(e)){const i=v[e];(0,a.extend)(!0,n,i);let o=n.cssClass||"";(0,d.extendAttributes)(n,t,C),(0,s.isDefined)(t.options)&&(0,d.extendAttributes)(n.options,t.options,y),(0,d.extendAttributes)(n.options,t,["text","icon"]),t.cssClass&&(o=`${o} ${t.cssClass}`),o&&(n.cssClass=o),(0,s.isDefined)(t.visible)||(n._autoHide=!0),"dxButton"===n.widget&&("inMenu"!==n.showText||(0,s.isDefined)(n.options.hint)||(n.options.hint=n.options.text),n.compactMode&&!(0,s.isDefined)(n.options.hint)&&this._configureHintForCompactMode(n))}else(0,a.extend)(!0,n,t),n.widget||(n.widget="dxButton"),"dxButton"===n.widget&&!n.compactMode&&!n.showText&&n.options&&n.options.icon&&n.options.text&&(n.compactMode={showText:"inMenu"});return e&&!n.name&&(0,a.extend)(n,{name:e}),n.location=(0,r.ensureDefined)(n.location,"before"),(0,s.isDefined)(null===(i=n.options)||void 0===i?void 0:i.stylingMode)||("dxButton"===n.widget&&(0,a.extend)(!0,n,{options:{stylingMode:"text"}}),"dxSelectBox"===n.widget&&(0,a.extend)(!0,n,{options:{stylingMode:"filled"}})),n}_isDefaultItem(e){return!!v[e]}_createCommandItem(e){return{widget:"dxButton",options:{text:e.text,hint:e.hint,commandText:e.text,icon:e.icon,stylingMode:"text",onClick:t=>this._executeCommand(e)}}}_createSeparatorItem(){return{template:(e,t,i)=>{(0,o.default)(i).addClass(f)}}}_createViewModeItem(){const e=["details","thumbnails"].map((e=>{const{text:t,icon:i}=this._commandManager.getCommandByName(e);return{name:e,text:t,icon:i}})),t="thumbnails"===this.option("itemViewMode")?1:0,i={container:this._$viewSwitcherPopup};return(0,u.isMaterial)()?i.width=(0,u.isCompact)()?28:36:(0,u.isFluent)()&&(i.width=(0,u.isCompact)()?34:40),{cssClass:m,widget:"dxDropDownButton",options:{items:e,keyExpr:"name",selectedItemKey:this.option("itemViewMode"),displayExpr:" ",hint:e[t].text,stylingMode:"text",showArrowIcon:!1,useSelectMode:!0,dropDownOptions:i,onItemClick:e=>this._executeCommand(e.itemData.name)}}}_configureHintForCompactMode(e){e.options.hint="",e.compactMode.options=e.compactMode.options||{},e.compactMode.options.hint=e.options.text}_checkCompactMode(e){e.compactMode&&this._toggleCompactMode(e,!1);const t=this._toolbarHasItemsOverflow(e);e.compactMode!==t?(e.compactMode||this._toggleCompactMode(e,t),e.compactMode=t):e.compactMode&&this._toggleCompactMode(e,!0)}_toolbarHasItemsOverflow(e){return(0,n.getWidth)(e.$element())<e._getItemsWidth()}_toggleCompactMode(e,t){let i=!1;const n=e.option("items");n.forEach((e=>{if(e.compactMode){let n=null;t?(e.saved=this._getCompactModeOptions(e,e._available),n=e.compactMode):n=e.saved;const o=this._getCompactModeOptions(n,e._available);(0,a.extend)(!0,e,o),i=!0}})),i=this._updateSeparatorsVisibility(n)||i,i&&e.repaint(),this._updateSeparatorsVisibility(n,e)}_getCompactModeOptions(e,t){let{showText:i,locateInMenu:n,options:o}=e;return{visible:t,showText:(0,r.ensureDefined)(i,"always"),locateInMenu:(0,r.ensureDefined)(n,"never"),options:{hint:null==o?void 0:o.hint}}}_ensureAvailableCommandsVisible(e){let t=!1;const i=e.option("items");i.forEach((e=>{if("separator"!==e.name){const i=e._available;this._setItemVisibleAvailable(e),e._available!==i&&(t=!0)}})),t=this._updateSeparatorsVisibility(i)||t,t&&e.repaint(),this._updateSeparatorsVisibility(i,e)}_setItemVisibleAvailable(e){var t;const i=null===(t=e.originalItemData)||void 0===t?void 0:t.visible;e._available=this._isToolbarItemAvailable(e),e.visible=(0,s.isDefined)(i)?i:e._available}_fileToolbarHasEffectiveItems(){return this._fileToolbar.option("items").some((e=>this._isFileToolbarItemAvailable(e)))}_executeCommand(e){this._commandManager.executeCommand(e)}_isToolbarItemAvailable(e){return this._isDefaultItem(e.name)&&e._autoHide?"refresh"===e.name?this._generalToolbarVisible||!!this._isRefreshVisibleInFileToolbar:b.indexOf(e.name)>-1||this._isCommandAvailable(e.name):(0,r.ensureDefined)(e.visible,!0)}_isFileToolbarItemAvailable(e){let{name:t,visible:i}=e;return!this._isDefaultItem(t)&&(0,r.ensureDefined)(i,!0)||"clearSelection"!==t&&"refresh"!==t&&this._isCommandAvailable(t)}_isCommandAvailable(e){return this._commandManager.isCommandAvailable(e,this.option("contextItems"))}_updateItemInToolbar(e,t,i){e.beginUpdate();const n=e.option("items");for(let o=0;o<n.length;o++){if(n[o].name===t){e.option(`items[${o}]`,i);break}}e.endUpdate()}_raiseItemClicked(e){const t=(0,a.extend)(!0,{},e);t.itemData=e.itemData.originalItemData,this._itemClickedAction(t)}_createItemClickedAction(){this._itemClickedAction=this._createActionByOption("onItemClick")}_getDefaultOptions(){return(0,a.extend)(super._getDefaultOptions(),{commandManager:null,generalItems:[],fileItems:[],contextItems:[],itemViewMode:"details",onItemClick:null})}_optionChanged(e){const t=e.name;switch(t){case"commandManager":case"itemViewMode":case"generalItems":case"fileItems":this.repaint();break;case"contextItems":this._update();break;case"onItemClick":this._itemClickedAction=this._createActionByOption(t);break;default:super._optionChanged(e)}}updateItemPermissions(){this.repaint(),this._restoreRefreshItemState()}_restoreRefreshItemState(){this.updateRefreshItem(this._refreshItemState.message,this._refreshItemState.status)}updateRefreshItem(e,t){let i=null,n=l.default.format("dxFileManager-commandRefresh"),o="inMenu";this._isRefreshVisibleInFileToolbar=!1,this._refreshItemState={message:e,status:t},"default"===t?i={options:{icon:x.default}}:(i={options:{icon:x[t]}},this._isRefreshVisibleInFileToolbar=!0,n=e,o="always");const s=(0,a.extend)({},i,{visible:this._isRefreshVisibleInFileToolbar});this._applyRefreshItemOptions(i,s),this._refreshItemTextTimeout=this._updateRefreshItemText("progress"===t,n,o)}_updateRefreshItemText(e,t,i){const n={showText:i,options:{text:t}};return e?setTimeout((()=>{this._applyRefreshItemOptions(n),this._refreshItemTextTimeout=void 0}),500):(this._refreshItemTextTimeout&&clearTimeout(this._refreshItemTextTimeout),void this._applyRefreshItemOptions(n))}_applyRefreshItemOptions(e,t){t||(t=(0,a.extend)({},e)),this._updateItemInToolbar(this._generalToolbar,"refresh",e),this._updateItemInToolbar(this._fileToolbar,"refresh",t)}_update(){const e=0===this.option("contextItems").length||!this._fileToolbarHasEffectiveItems();this._generalToolbarVisible!==e&&(this._generalToolbar.option("visible",e),this._fileToolbar.option("visible",!e),this._generalToolbarVisible=e,this.$element().toggleClass(_,e),this.$element().toggleClass("dx-filemanager-file-toolbar",!e));const t=this._getVisibleToolbar();this._ensureAvailableCommandsVisible(t),this._checkCompactMode(t)}get _commandManager(){return this.option("commandManager")}}t.default=w;e.exports=t.default,e.exports.default=t.default},26980:function(e,t,i){t.default=void 0;var n,o=(n=i(22354))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},35299:function(e,t,i){t.default=void 0;var n,o=(n=i(26005))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},74075:function(e,t,i){t.default=void 0;var n,o=(n=i(37610))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},37610:function(e,t,i){t.default=void 0;var n,o=(n=i(67350))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},89987:function(e,t,i){t.default=void 0;var n,o=(n=i(88017))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},16075:function(e,t,i){t.default=void 0;var n,o=(n=i(9264))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},43895:function(e,t,i){t.getGanttViewCore=function(){if(!o.default)throw n.default.Error("E1041","devexpress-gantt");return o.default};var n=a(i(35185)),o=a(i(1990));function a(e){return e&&e.__esModule?e:{default:e}}},28997:function(e,t,i){t.GanttActionsManager=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(61404),s=i(52576);const r="onContextMenuPreparing",l="onCustomCommand",d="onDependencyDeleted",u="onDependencyDeleting",c="onDependencyInserted",h="onDependencyInserting",p="onResourceAssigned",g="onResourceAssigning",_="onResourceDeleted",f="onResourceDeleting",m="onResourceInserted",v="onResourceInserting",C="onResourceManagerDialogShowing",y="onResourceUnassigned",b="onResourceUnassigning",x="onSelectionChanged",w="onTaskClick",S="onTaskDblClick",D="onTaskDeleted",I="onTaskDeleting",E="onTaskEditDialogShowing",T="onTaskInserted",A="onTaskInserting",O="onTaskMoving",P="onTaskUpdated",k="onTaskUpdating",M="onScaleCellPrepared",R="tasks",L="dependencies",B="resources",V="resourceAssignments";t.GanttActionsManager=class{constructor(e){this._gantt=e,this._mappingHelper=e._mappingHelper,this._customFieldsManager=e._customFieldsManager}_createActionByOption(e){return this._gantt._createActionByOption(e)}_getTaskData(e){return this._gantt.getTaskData(e)}_convertCoreToMappedData(e,t){return this._mappingHelper.convertCoreToMappedData(e,t)}_convertMappedToCoreData(e,t){return this._mappingHelper.convertMappedToCoreData(e,t)}_convertMappedToCoreFields(e,t){return this._mappingHelper.convertMappedToCoreFields(e,t)}_convertCoreToMappedFields(e,t){return this._mappingHelper.convertCoreToMappedFields(e,t)}_saveCustomFieldsDataToCache(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._customFieldsManager.saveCustomFieldsDataToCache(e,t,i,n)}createTaskDblClickAction(){this._taskDblClickAction=this._createActionByOption(S)}taskDblClickAction(e){this._taskDblClickAction||this.createTaskDblClickAction(),this._taskDblClickAction(e)}raiseTaskDblClickAction(e,t){const i={cancel:!1,data:this._getTaskData(e),event:t,key:e};return this.taskDblClickAction(i),!i.cancel}createTaskClickAction(){this._taskClickAction=this._createActionByOption(w)}taskClickAction(e){this._taskClickAction||this.createTaskClickAction(),this._taskClickAction(e)}raiseTaskClickAction(e,t){const i={key:e,event:t,data:this._getTaskData(e)};this.taskClickAction(i)}createSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption(x)}selectionChangedAction(e){this._selectionChangedAction||this.createSelectionChangedAction(),this._selectionChangedAction(e)}raiseSelectionChangedAction(e){this.selectionChangedAction({selectedRowKey:e})}createCustomCommandAction(){this._customCommandAction=this._createActionByOption(l)}customCommandAction(e){this._customCommandAction||this.createCustomCommandAction(),this._customCommandAction(e)}raiseCustomCommand(e){this.customCommandAction({name:e})}createContextMenuPreparingAction(){this._contextMenuPreparingAction=this._createActionByOption(r)}contextMenuPreparingAction(e){this._contextMenuPreparingAction||this.createContextMenuPreparingAction(),this._contextMenuPreparingAction(e)}raiseContextMenuPreparing(e){this.contextMenuPreparingAction(e)}_getInsertingAction(e){switch(e){case R:return this._getTaskInsertingAction();case L:return this._getDependencyInsertingAction();case B:return this._getResourceInsertingAction();case V:return this._getResourceAssigningAction()}return()=>{}}raiseInsertingAction(e,t){const i=this._getInsertingAction(e);if(i){const n={cancel:!1,values:this._convertCoreToMappedData(e,t.values)};i(n),t.cancel=n.cancel,(0,s.extend)(t.values,this._convertMappedToCoreData(e,n.values)),e===R&&this._saveCustomFieldsDataToCache("gantt_new_task_key",n.values)}}createTaskInsertingAction(){this._taskInsertingAction=this._createActionByOption(A)}taskInsertingAction(e){this._getTaskInsertingAction()(e)}_getTaskInsertingAction(){return this._taskInsertingAction||this.createTaskInsertingAction(),this._taskInsertingAction}createDependencyInsertingAction(){this._dependencyInsertingAction=this._createActionByOption(h)}dependencyInsertingAction(e){this._getDependencyInsertingAction()(e)}_getDependencyInsertingAction(){return this._dependencyInsertingAction||this.createDependencyInsertingAction(),this._dependencyInsertingAction}createResourceInsertingAction(){this._resourceInsertingAction=this._createActionByOption(v)}resourceInsertingAction(e){this._getResourceInsertingAction()(e)}_getResourceInsertingAction(){return this._resourceInsertingAction||this.createResourceInsertingAction(),this._resourceInsertingAction}createResourceAssigningAction(){this._resourceAssigningAction=this._createActionByOption(g)}resourceAssigningAction(e){this._getResourceAssigningAction()(e)}_getResourceAssigningAction(){return this._resourceAssigningAction||this.createResourceAssigningAction(),this._resourceAssigningAction}_getInsertedAction(e){switch(e){case R:return this._getTaskInsertedAction();case L:return this._getDependencyInsertedAction();case B:return this._getResourceInsertedAction();case V:return this._getResourceAssignedAction()}return()=>{}}raiseInsertedAction(e,t,i){const n=this._getInsertedAction(e);if(n){n({values:t,key:i})}}createTaskInsertedAction(){this._taskInsertedAction=this._createActionByOption(T)}taskInsertedAction(e){this._getTaskInsertedAction()(e)}_getTaskInsertedAction(){return this._taskInsertedAction||this.createTaskInsertedAction(),this._taskInsertedAction}createDependencyInsertedAction(){this._dependencyInsertedAction=this._createActionByOption(c)}dependencyInsertedAction(e){this._getDependencyInsertedAction()(e)}_getDependencyInsertedAction(){return this._dependencyInsertedAction||this.createDependencyInsertedAction(),this._dependencyInsertedAction}createResourceInsertedAction(){this._resourceInsertedAction=this._createActionByOption(m)}resourceInsertedAction(e){this._getResourceInsertedAction()(e)}_getResourceInsertedAction(){return this._resourceInsertedAction||this.createResourceInsertedAction(),this._resourceInsertedAction}createResourceAssignedAction(){this._resourceAssignedAction=this._createActionByOption(p)}resourceAssignedAction(e){this._getResourceAssignedAction()(e)}_getResourceAssignedAction(){return this._resourceAssignedAction||this.createResourceAssignedAction(),this._resourceAssignedAction}_getDeletingAction(e){switch(e){case R:return this._getTaskDeletingAction();case L:return this._getDependencyDeletingAction();case B:return this._getResourceDeletingAction();case V:return this._getResourceUnassigningAction()}return()=>{}}raiseDeletingAction(e,t){const i=this._getDeletingAction(e);if(i){const n={cancel:!1,key:t.key,values:this._convertCoreToMappedData(e,t.values)};i(n),t.cancel=n.cancel}}createTaskDeletingAction(){this._taskDeletingAction=this._createActionByOption(I)}taskDeletingAction(e){this._getTaskDeletingAction()(e)}_getTaskDeletingAction(){return this._taskDeletingAction||this.createTaskDeletingAction(),this._taskDeletingAction}createDependencyDeletingAction(){this._dependencyDeletingAction=this._createActionByOption(u)}dependencyDeletingAction(e){this._getDependencyDeletingAction()(e)}_getDependencyDeletingAction(){return this._dependencyDeletingAction||this.createDependencyDeletingAction(),this._dependencyDeletingAction}createResourceDeletingAction(){this._resourceDeletingAction=this._createActionByOption(f)}resourceDeletingAction(e){this._getResourceDeletingAction()(e)}_getResourceDeletingAction(){return this._resourceDeletingAction||this.createResourceDeletingAction(),this._resourceDeletingAction}createResourceUnassigningAction(){this._resourceUnassigningAction=this._createActionByOption(b)}resourceUnassigningAction(e){this._getResourceUnassigningAction()(e)}_getResourceUnassigningAction(){return this._resourceUnassigningAction||this.createResourceUnassigningAction(),this._resourceUnassigningAction}_getDeletedAction(e){switch(e){case R:return this._getTaskDeletedAction();case L:return this._getDependencyDeletedAction();case B:return this._getResourceDeletedAction();case V:return this._getResourceUnassignedAction()}return()=>{}}raiseDeletedAction(e,t,i){const n=this._getDeletedAction(e);if(n){n({key:t,values:i})}}createTaskDeletedAction(){this._taskDeletedAction=this._createActionByOption(D)}taskDeletedAction(e){this._getTaskDeletedAction()(e)}_getTaskDeletedAction(){return this._taskDeletedAction||this.createTaskDeletedAction(),this._taskDeletedAction}createDependencyDeletedAction(){this._dependencyDeletedAction=this._createActionByOption(d)}dependencyDeletedAction(e){this._getDependencyDeletedAction()(e)}_getDependencyDeletedAction(){return this._dependencyDeletedAction||this.createDependencyDeletedAction(),this._dependencyDeletedAction}createResourceDeletedAction(){this._resourceDeletedAction=this._createActionByOption(_)}resourceDeletedAction(e){this._getResourceDeletedAction()(e)}_getResourceDeletedAction(){return this._resourceDeletedAction||this.createResourceDeletedAction(),this._resourceDeletedAction}createResourceUnassignedAction(){this._resourceUnassignedAction=this._createActionByOption(y)}resourceUnassignedAction(e){this._getResourceUnassignedAction()(e)}_getResourceUnassignedAction(){return this._resourceUnassignedAction||this.createResourceUnassignedAction(),this._resourceUnassignedAction}_getUpdatingAction(e){return e===R?this._getTaskUpdatingAction():()=>{}}raiseUpdatingAction(e,t,i){if(i=i||this._getUpdatingAction(e)){const n=e===R,o={cancel:!1,key:t.key,newValues:this._convertCoreToMappedData(e,t.newValues),values:n?this._getTaskData(t.key):this._convertCoreToMappedData(e,t.values)};if(n&&this._customFieldsManager.cache.hasData(o.key)&&this._customFieldsManager.addCustomFieldsDataFromCache(o.key,o.newValues),i(o),t.cancel=o.cancel,(0,s.extend)(t.newValues,this._convertMappedToCoreData(e,o.newValues)),n)if(o.cancel)this._customFieldsManager.resetCustomFieldsDataCache(o.key);else{const e=!Object.keys(t.newValues).length;this._saveCustomFieldsDataToCache(o.key,o.newValues,e)}}}createTaskUpdatingAction(){this._taskUpdatingAction=this._createActionByOption(k)}taskUpdatingAction(e){this._getTaskUpdatingAction()(e)}_getTaskUpdatingAction(){return this._taskUpdatingAction||this.createTaskUpdatingAction(),this._taskUpdatingAction}_getUpdatedAction(e){return e===R?this._getTaskUpdatedAction():()=>{}}raiseUpdatedAction(e,t,i){const n=this._getUpdatedAction(e);if(n){n({values:t,key:i})}}createTaskUpdatedAction(){this._taskUpdatedAction=this._createActionByOption(P)}taskUpdatedAction(e){this._getTaskUpdatedAction()(e)}_getTaskUpdatedAction(){return this._taskUpdatedAction||this.createTaskUpdatedAction(),this._taskUpdatedAction}createTaskEditDialogShowingAction(){this._taskEditDialogShowingAction=this._createActionByOption(E)}taskEditDialogShowingAction(e){this._getTaskEditDialogShowingAction()(e)}_getTaskEditDialogShowingAction(){return this._taskEditDialogShowingAction||this.createTaskEditDialogShowingAction(),this._taskEditDialogShowingAction}raiseTaskEditDialogShowingAction(e){const t=this._getTaskEditDialogShowingAction();if(t){const i={cancel:!1,key:e.key,values:this._convertCoreToMappedData(R,e.values),readOnlyFields:this._convertCoreToMappedFields(R,e.readOnlyFields),hiddenFields:this._convertCoreToMappedFields(R,e.hiddenFields)};t(i),e.cancel=i.cancel,(0,s.extend)(e.values,this._convertMappedToCoreData(R,i.values)),e.readOnlyFields=this._convertMappedToCoreFields(R,i.readOnlyFields),e.hiddenFields=this._convertMappedToCoreFields(R,i.hiddenFields)}}createResourceManagerDialogShowingAction(){this._resourceManagerDialogShowingAction=this._createActionByOption(C)}resourceManagerDialogShowingAction(e){this._getResourceManagerDialogShowingAction()(e)}_getResourceManagerDialogShowingAction(){return this._resourceManagerDialogShowingAction||this.createResourceManagerDialogShowingAction(),this._resourceManagerDialogShowingAction}raiseResourceManagerDialogShowingAction(e){const t=this._getResourceManagerDialogShowingAction();if(t){const i={cancel:!1,values:e.values.resources.items.map((e=>this._convertMappedToCoreData(B,e)))};t(i),e.cancel=i.cancel}}createTaskMovingAction(){this._taskMovingAction=this._createActionByOption(O)}taskMovingAction(e){this.getTaskMovingAction()(e)}getTaskMovingAction(){return this._taskMovingAction||this.createTaskMovingAction(),this._taskMovingAction}getScaleCellPreparedAction(){return this._scaleCellPreparedAction||this.createScaleCellPreparedAction(),this._scaleCellPreparedAction}createScaleCellPreparedAction(){this._scaleCellPreparedAction=this._createActionByOption(M)}raiseScaleCellPreparedAction(e){const t=this.getScaleCellPreparedAction();if(t){t({scaleIndex:e.scaleIndex,scaleType:this._getScaleType(e.scaleType),scaleElement:(0,a.getPublicElement)((0,o.default)(e.scaleElement)),separatorElement:(0,a.getPublicElement)((0,o.default)(e.separatorElement)),startDate:new Date(e.start),endDate:new Date(e.end)})}}_getScaleType(e){switch(e){case 0:return"minutes";case 1:return"hours";case 2:return"sixHours";case 3:return"days";case 4:return"weeks";case 5:return"months";case 6:return"quarters";case 7:return"years";case 8:return"fiveYears";default:return}}}},68962:function(e,t,i){t.GanttToolbar=t.GanttContextMenuBar=void 0;var n=l(i(64553)),o=l(i(2850)),a=l(i(34378)),s=l(i(4671)),r=i(52576);function l(e){return e&&e.__esModule?e:{default:e}}const d=0,u=1,c=2,h=3,p=4,g=5,_=6,f=7,m=8,v=9,C=10,y=11,b=12,x=13,w=14,S=15;class D{constructor(e,t){this._element=e,this._owner=t,this._items=[],this._createControl()}createItems(e){this._cache=null,this._items=this._createItemsCore(e),this._menu.option("items",this._items)}_createItemsCore(e){return e.map((e=>{let t;return t="string"==typeof e?this._createItemByText(e):e.name?(0,r.extend)(this._createItemByText(e.name),e):(0,r.extend)(this._getDefaultItemOptions(),e),e.items&&(t.items=this._createItemsCore(e.items)),t}))}_createItemByText(e){switch(e.toLowerCase()){case"separator":return this._createSeparator();case"undo":return this._createDefaultItem(_,s.default.format("dxGantt-undo"),this._getIcon("undo"));case"redo":return this._createDefaultItem(f,s.default.format("dxGantt-redo"),this._getIcon("redo"));case"expandall":return this._createDefaultItem(b,s.default.format("dxGantt-expandAll"),this._getIcon("expand"));case"collapseall":return this._createDefaultItem(y,s.default.format("dxGantt-collapseAll"),this._getIcon("collapse"));case"addtask":return this._createDefaultItem(d,s.default.format("dxGantt-addNewTask"),this._getIcon("add"));case"addsubtask":return this._createDefaultItem(u,s.default.format("dxGantt-contextMenuNewSubtask"),this._getIcon("add-sub-task"));case"deletetask":return this._createDefaultItem(c,s.default.format("dxGantt-deleteSelectedTask"),this._getIcon("delete"));case"deletedependency":return this._createDefaultItem(h,s.default.format("dxGantt-contextMenuDeleteDependency"),this._getIcon("delete-dependency"));case"zoomin":return this._createDefaultItem(m,s.default.format("dxGantt-zoomIn"),this._getIcon("zoom-in"));case"zoomout":return this._createDefaultItem(v,s.default.format("dxGantt-zoomOut"),this._getIcon("zoom-out"));case"fullscreen":return this._createDefaultItem(C,s.default.format("dxGantt-fullScreen"),this._getIcon("full-screen"));case"taskdetails":return this._createDefaultItem(p,s.default.format("dxGantt-dialogTaskDetailsTitle")+"...",this._getIcon("task-details"));case"resourcemanager":return this._createDefaultItem(x,s.default.format("dxGantt-dialogResourceManagerTitle"),this._getIcon("resource-manager"));case"showresources":return this._createDefaultItem(w,s.default.format("dxGantt-showResources"),this._getIcon("toggle-resources"));case"showdependencies":return this._createDefaultItem(S,s.default.format("dxGantt-showDependencies"),this._getIcon("toggle-dependencies"));default:return(0,r.extend)(this._getDefaultItemOptions(),{options:{text:e}})}}_getDefaultItemOptions(){return{}}_getItemsCache(){return this._cache||(this._cache={},this._fillCache(this._items)),this._cache}_fillCache(e){e.forEach((e=>{const t=e.commandId;void 0!==t&&(this._cache[t]||(this._cache[t]=[]),this._cache[t].push(e)),e.items&&this._fillCache(e.items)}))}_getIcon(e){return"dx-gantt-i dx-gantt-i-"+e}getCommandKeys(){const e=this._getItemsCache(),t=[];for(const i in e)t.push(parseInt(i));return t}setItemEnabled(e,t){this._getItemsCache()[e].forEach((e=>{e.disabled=!t}))}setItemVisible(e,t){this._getItemsCache()[e].forEach((e=>{e.visible=t}))}setItemValue(e,t){}setEnabled(e){this._menu.option("disabled",!e)}updateItemsList(){}isVisible(){return!0}isContextMenu(){return!1}completeUpdate(){}}t.GanttToolbar=class extends D{_createControl(){this._menu=this._owner._createComponent(this._element,o.default,{onItemClick:e=>{void 0!==e.itemData.commandId&&this._executeCommand(e.itemData.commandId)}})}_executeCommand(e){switch(e){case w:this._owner.option("showResources",!this._owner.option("showResources"));break;case S:this._owner.option("showDependencies",!this._owner.option("showDependencies"));break;default:this._owner._executeCoreCommand(e)}}_createDefaultItem(e,t,i){return{commandId:e,disabled:!0,widget:"dxButton",location:"before",options:{icon:i,stylingMode:"text",hint:t}}}_createSeparator(){return{location:"before",template:(e,t,i)=>{(0,n.default)(i).addClass("dx-gantt-toolbar-separator")}}}_getDefaultItemOptions(){return{location:"before",widget:"dxButton"}}completeUpdate(){this._menu.option("items",this._items)}};t.GanttContextMenuBar=class extends D{_createControl(){this._menu=this._owner._createComponent(this._element,a.default,{showEvent:void 0,onItemClick:e=>{void 0!==e.itemData.commandId?this._owner._executeCoreCommand(e.itemData.commandId):void 0!==e.itemData.name&&this._owner._actionsManager.raiseCustomCommand(e.itemData.name)}})}createItems(e){e&&0!==e.length||(e=this._getDefaultItems()),super.createItems(e)}_getDefaultItems(){return[{text:s.default.format("dxGantt-dialogButtonAdd"),commandId:g,icon:this._getIcon("add"),items:[{text:s.default.format("dxGantt-contextMenuNewTask"),commandId:d,icon:this._getIcon("add-task")},{text:s.default.format("dxGantt-contextMenuNewSubtask"),commandId:u,icon:this._getIcon("add-sub-task")}]},{text:s.default.format("dxGantt-dialogTaskDetailsTitle")+"...",commandId:p,icon:this._getIcon("task-details")},{text:s.default.format("dxGantt-contextMenuDeleteTask"),commandId:c,icon:this._getIcon("delete")},{text:s.default.format("dxGantt-contextMenuDeleteDependency"),commandId:h,icon:this._getIcon("delete-dependency")}]}_createDefaultItem(e,t,i){return{commandId:e,text:t,icon:i}}show(e,t){this._menu.option("items",t||this._items),this._menu.option("position.offset",{x:e.x,y:e.y}),this._menu.option("position.collision","fit"),this._menu.show()}hide(){this._menu.hide()}isContextMenu(){return!0}}},26344:function(e,t,i){t.GanttDataCache=void 0;var n=i(52576);t.GanttDataCache=class{constructor(){this._cache={},this._timers={}}saveData(e,t,i){if(t){this._clearTimer(e);const o=this._getCache(e,!0);(0,n.extendFromObject)(o,t,!0),i&&this._setExpireTimer(e,i)}}pullDataFromCache(e,t){const i=this._getCache(e);i&&(0,n.extendFromObject)(t,i),this._onKeyExpired(e)}hasData(e){return!!this._cache[e]}resetCache(e){this._onKeyExpired(e)}_getCache(e,t){return!this._cache[e]&&t&&(this._cache[e]={}),this._cache[e]}_setExpireTimer(e,t){this._timers[e]=setTimeout((()=>{t(e,this._getCache(e)),this._onKeyExpired(e)}),200)}_onKeyExpired(e){this._clearCache(e),this._clearTimer(e)}_clearCache(e){delete this._cache[e]}_clearTimer(e){const t=this._timers;t&&t[e]&&(clearTimeout(t[e]),delete t[e])}}},57967:function(e,t,i){t.GanttCustomFieldsManager=void 0;var n=i(31e3),o=i(26344),a=i(34376);const s="tasks";t.GanttCustomFieldsManager=class{constructor(e){this._gantt=e,this._mappingHelper=e._mappingHelper,this.cache=new o.GanttDataCache}_getTaskCustomFields(){const e=this._gantt.option("columns"),t=e&&e.map((e=>e.dataField)),i=this._mappingHelper.getTaskMappedFieldNames();return t?t.filter((e=>i.indexOf(e)<0)):[]}_getCustomFieldsData(e){return this._getTaskCustomFields().reduce(((t,i)=>(e&&void 0!==e[i]&&(t[i]=e[i]),t)),{})}addCustomFieldsData(e,t){if(t){const i=this._gantt._tasksOption&&this._gantt._tasksOption._getItems(),o=(0,n.compileGetter)(this._gantt.option(`${s}.keyExpr`)),a=i&&i.filter((t=>o(t)===e))[0],r=this._getTaskCustomFields();if(a)for(let e=0;e<r.length;e++){const i=r[e];Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])}}}appendCustomFields(e){const t=this._gantt._tasksOption&&this._gantt._tasksOption._getItems(),i=this._gantt._getTaskKeyGetter(),n=a.GanttHelper.getInvertedData(t,i);return e.reduce(((e,t)=>{const o=i(t),a=n[o];if(a){const i={};for(const e in a)i[e]=Object.prototype.hasOwnProperty.call(t,e)?t[e]:a[e];e.push(i)}else e.push(t);return e}),[])}addCustomFieldsDataFromCache(e,t){this.cache.pullDataFromCache(e,t)}saveCustomFieldsDataToCache(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=this._getCustomFieldsData(t);if(Object.keys(o).length>0){const t=(e,t)=>{const i=this._gantt[`_${s}Option`];i&&t&&i.update(e,t,((e,t)=>{const o={};this.addCustomFieldsData(t,o),i._reloadDataSource().done((e=>{this._gantt._ganttTreeList.updateDataSource(e??i._dataSource,!1,n)}));const a=this._gantt.option("selectedRowKey");this._gantt._ganttView._selectTask(a),this._gantt._actionsManager.raiseUpdatedAction(s,o,t)}))};this.cache.saveData(e,o,i?t:null)}}resetCustomFieldsDataCache(e){this.cache.resetCache(e)}}},9121:function(e,t,i){t.default=void 0;var n,o=i(17863),a=(n=i(75990))&&n.__esModule?n:{default:n};class s extends o.Component{constructor(e,t,i){super(),this._optionName=e,this._getLoadPanel=t,this._dataSourceChangedCallback=i}insert(e,t,i){this._showLoadPanel(),this._getStore().insert(e).done((e=>{t&&t(e),this._hideLoadPanel()})).fail((e=>{i&&i(e),this._hideLoadPanel()}))}update(e,t,i,n){this._showLoadPanel(),this._getStore().update(e,t).done(((e,t)=>{i&&i(e,t),this._hideLoadPanel()})).fail((e=>{n&&n(e),this._hideLoadPanel()}))}remove(e,t,i){this._showLoadPanel(),this._getStore().remove(e).done((e=>{t&&t(e),this._hideLoadPanel()})).fail((e=>{i&&i(e),this._hideLoadPanel()}))}_dataSourceChangedHandler(e,t){this._dataSourceChangedCallback(this._optionName,e)}_dataSourceOptions(){return{paginate:!1}}_dataSourceLoadingChangedHandler(e){e&&!this._dataSource.isLoaded()?this._showLoadPanel():this._hideLoadPanel()}_showLoadPanel(){var e;null===(e=this._getLoadPanel())||void 0===e||e.show()}_hideLoadPanel(){var e;null===(e=this._getLoadPanel())||void 0===e||e.hide()}_getStore(){return this._dataSource.store()}_getItems(){return this._getStore()._array||this._dataSource.items()}_reloadDataSource(){return this._dataSource.load()}dispose(){this._disposeDataSource()}_optionChanged(e){e.name}}s.include(a.default);t.default=s;e.exports=t.default,e.exports.default=t.default},15337:function(e,t){t.GanttDataChangesProcessingHelper=void 0;t.GanttDataChangesProcessingHelper=class{constructor(){this._waitingForGanttViewReady=!1,this._waitingForTreeListReady=!1,this._completionActions=[]}onGanttViewReady(){this._stopWaitForGanttViewReady(),this.executeActionsIfPossible()}onTreeListReady(){this._stopWaitForTreeListReady(),this.executeActionsIfPossible()}addCompletionAction(e,t,i){e&&(t&&this._startWaitForGanttViewReady(),i&&this._startWaitForTreeListReady(),this._completionActions.push(e))}executeActionsIfPossible(){this._canExecuteActions()&&(this._completionActions.forEach((e=>e())),this._completionActions=[])}_startWaitForGanttViewReady(){this._waitingForGanttViewReady=!0}_stopWaitForGanttViewReady(){this._waitingForGanttViewReady=!1}_startWaitForTreeListReady(){this._waitingForTreeListReady=!0}_stopWaitForTreeListReady(){this._waitingForTreeListReady=!1}_canExecuteActions(){return!(this._waitingForGanttViewReady||this._waitingForTreeListReady)}}},51695:function(e,t,i){t.GanttDialog=void 0;var n=r(i(10720)),o=r(i(74075));i(4575),i(84798);var a=r(i(38662)),s=r(i(4671));function r(e){return e&&e.__esModule?e:{default:e}}i(80070),i(14128);t.GanttDialog=class{constructor(e,t){this._popupInstance=e._createComponent(t,n.default),this.infoMap={TaskEdit:d,Resources:u,Confirmation:c,ConstraintViolation:h}}_apply(){if(this._dialogInfo.isValidated()){const e=this._dialogInfo.getResult();this._callback(e),this.hide()}}show(e,t,i,n,o){if(this._callback=i,this._afterClosing=n,!this.infoMap[e])return;const a=this._popupInstance._isVisible()&&this._dialogInfo&&this._dialogInfo instanceof this.infoMap[e];this._dialogInfo=new this.infoMap[e](t,this._apply.bind(this),this.hide.bind(this),o),this._popupInstance.option({showTitle:!!this._dialogInfo.getTitle(),title:this._dialogInfo.getTitle(),toolbarItems:this._dialogInfo.getToolbarItems(),maxWidth:this._dialogInfo.getMaxWidth(),height:this._dialogInfo.getHeight(),contentTemplate:this._dialogInfo.getContentTemplate()}),this._afterClosing&&this._popupInstance.option("onHidden",this._afterClosing),a||this._popupInstance.show()}hide(){this._popupInstance.hide(),this._afterClosing&&this._afterClosing()}};class l{constructor(e,t,i,n){this._parameters=e,this._applyAction=t,this._hideAction=i,this._editingOptions=n}_getFormItems(){return{}}_getFormCssClass(){return""}_getFormData(){return this._parameters}_updateParameters(){}_getOkToolbarItem(){return this._getToolbarItem("OK",this._applyAction)}_getCancelToolbarItem(){return this._getToolbarItem("Cancel",this._hideAction)}_getYesToolbarItem(){return this._getToolbarItem("Yes",this._applyAction)}_getNoToolbarItem(){return this._getToolbarItem("No",this._hideAction)}_getToolbarItem(e,t){return{widget:"dxButton",toolbar:"bottom",options:{text:s.default.format(e),onClick:t}}}getTitle(){return""}getToolbarItems(){return this._editingOptions.enabled?[this._getOkToolbarItem(),this._getCancelToolbarItem()]:[this._getCancelToolbarItem()]}getMaxWidth(){return 400}getHeight(){return"auto"}getContentTemplate(){return e=>(this._form=new o.default(e,{formData:this._getFormData(),items:this._getFormItems(),elementAttr:{class:this._getFormCssClass()},rtlEnabled:!1}),e)}getResult(){const e=this.getFormData();return this._updateParameters(e),this._parameters}getFormData(){return this._form&&this._form.option("formData")}isValidated(){return!0}}class d extends l{getTitle(){return s.default.format("dxGantt-dialogTaskDetailsTitle")}_getFormItems(){const e=!this._editingOptions.enabled||!this._editingOptions.allowTaskUpdating,t=e||!this._parameters.enableRangeEdit;return[{dataField:"title",editorType:"dxTextBox",label:{text:s.default.format("dxGantt-dialogTitle")},editorOptions:{readOnly:e||this._isReadOnlyField("title")},visible:!this._isHiddenField("title")},{dataField:"start",editorType:"dxDateBox",label:{text:s.default.format("dxGantt-dialogStartTitle")},editorOptions:{type:"datetime",width:"100%",readOnly:t||this._isReadOnlyField("start")},visible:!this._isHiddenField("start"),validationRules:[{type:"required",message:s.default.format("validation-required-formatted",s.default.format("dxGantt-dialogStartTitle"))},{type:"custom",validationCallback:e=>{if(this._parameters.isValidationRequired){const t=this._parameters.getCorrectDateRange(this._parameters.id,e.value,this._parameters.end);if(t.start.getTime()!==e.value.getTime())return e.rule.message=this._getValidationMessage(!0,t.start),!1}return!0}}]},{dataField:"end",editorType:"dxDateBox",label:{text:s.default.format("dxGantt-dialogEndTitle")},editorOptions:{type:"datetime",width:"100%",readOnly:t||this._isReadOnlyField("end")},visible:!this._isHiddenField("end"),validationRules:[{type:"required",message:s.default.format("validation-required-formatted",s.default.format("dxGantt-dialogEndTitle"))},{type:"custom",validationCallback:e=>{if(this._parameters.isValidationRequired){const t=this._parameters.getCorrectDateRange(this._parameters.id,this._parameters.start,e.value);if(t.end.getTime()!==e.value.getTime())return e.rule.message=this._getValidationMessage(!1,t.end),!1}return!0}}]},{dataField:"progress",editorType:"dxNumberBox",label:{text:s.default.format("dxGantt-dialogProgressTitle")},editorOptions:{showSpinButtons:!0,min:0,max:1,format:"#0%",step:.01,readOnly:t||this._isReadOnlyField("progress")},visible:!this._isHiddenField("progress")},{dataField:"assigned.items",editorType:"dxTagBox",label:{text:s.default.format("dxGantt-dialogResourcesTitle")},editorOptions:{readOnly:e||!this._editingOptions.allowTaskResourceUpdating,dataSource:this._parameters.resources.items,displayExpr:"text",buttons:[{name:"editResources",location:"after",options:{disabled:!this._editingOptions.allowResourceAdding&&!this._editingOptions.allowResourceDeleting,text:"...",hint:s.default.format("dxGantt-dialogEditResourceListHint"),onClick:()=>{this._parameters.showResourcesDialogCommand.execute((()=>{this._parameters.showTaskEditDialogCommand.execute()}))}}}]}}]}_getValidationMessage(e,t){return e?s.default.format("dxGantt-dialogStartDateValidation",this._getFormattedDateText(t)):s.default.format("dxGantt-dialogEndDateValidation",this._getFormattedDateText(t))}_getFormattedDateText(e){return e?a.default.format(e,"shortDateShortTime"):""}_isReadOnlyField(e){return this._parameters.readOnlyFields.indexOf(e)>-1}_isHiddenField(e){return this._parameters.hiddenFields.indexOf(e)>-1}_getFormData(){const e={};for(const t in this._parameters)e[t]="progress"===t?this._parameters[t]/100:this._parameters[t];return e}_updateParameters(e){this._parameters.title=e.title,this._parameters.start=e.start,this._parameters.end=e.end,this._parameters.progress=100*e.progress,this._parameters.assigned=e.assigned}isValidated(){var e;const t=null===(e=this._form)||void 0===e?void 0:e.validate();return null==t?void 0:t.isValid}}class u extends l{getTitle(){return s.default.format("dxGantt-dialogResourceManagerTitle")}_getFormItems(){return[{label:{visible:!1},dataField:"resources.items",editorType:"dxList",editorOptions:{allowItemDeleting:this._editingOptions.enabled&&this._editingOptions.allowResourceDeleting,itemDeleteMode:"static",selectionMode:"none",items:this._parameters.resources.items,height:250,noDataText:s.default.format("dxGantt-dialogEditNoResources"),onInitialized:e=>{this.list=e.component},onItemDeleted:e=>{this._parameters.resources.remove(e.itemData)}}},{label:{visible:!1},editorType:"dxTextBox",editorOptions:{readOnly:!this._editingOptions.enabled||!this._editingOptions.allowResourceAdding,onInitialized:e=>{this.textBox=e.component},onInput:e=>{const t=e.component.getButton("addResource"),i=e.component.option("text");t.option("disabled",0===i.length)},buttons:[{name:"addResource",location:"after",options:{text:s.default.format("dxGantt-dialogButtonAdd"),disabled:!0,onClick:e=>{const t=this._parameters.resources.createItem();t.text=this.textBox.option("text"),this._parameters.resources.add(t),this.list.option("items",this._parameters.resources.items),this.list.scrollToItem(t),this.textBox.clear(),e.component.option("disabled",!0)}}}]}}]}}class c extends l{getContentTemplate(){return e=>this._getConfirmMessage()}_getConfirmMessage(){switch(this._parameters.type){case 0:return s.default.format("dxGantt-dialogTaskDeleteConfirmation");case 1:return s.default.format("dxGantt-dialogDependencyDeleteConfirmation");case 2:return s.default.format("dxGantt-dialogResourcesDeleteConfirmation",this._parameters.message);default:return""}}getToolbarItems(){return[this._getYesToolbarItem(),this._getNoToolbarItem()]}}class h extends l{_getFormItems(){const e=this._parameters.hasCriticalErrors,t=this._parameters.errorsCount>1,i=[],n=t?"dxGantt-dialogDeleteDependenciesMessage":"dxGantt-dialogDeleteDependencyMessage",o=t?"dxGantt-dialogMoveTaskAndKeepDependenciesMessage":"dxGantt-dialogMoveTaskAndKeepDependencyMessage";let a;return a=e?t?"dxGantt-dialogConstraintCriticalViolationSeveralTasksMessage":"dxGantt-dialogConstraintCriticalViolationMessage":t?"dxGantt-dialogConstraintViolationSeveralTasksMessage":"dxGantt-dialogConstraintViolationMessage",i.push({text:s.default.format("dxGantt-dialogCancelOperationMessage"),value:0}),i.push({text:s.default.format(n),value:1}),e||i.push({text:s.default.format(o),value:2}),[{template:s.default.format(a)},{cssClass:"dx-cv-dialog-row",dataField:"option",label:{visible:!1},editorType:"dxRadioGroup",editorOptions:{items:i,valueExpr:"value",value:0}}]}_getFormCssClass(){return"dx-cv-dialog"}_updateParameters(e){this._parameters.option=e.option}}},51237:function(e,t,i){t.GanttExportHelper=void 0;var n=i(3104),o=l(i(53226)),a=i(11528),s=l(i(38662)),r=l(i(52771));function l(e){return e&&e.__esModule?e:{default:e}}const d=(0,n.getWindow)();t.GanttExportHelper=class{constructor(e){this._gantt=e,this._treeList=e._treeList,this._cache={}}reset(){this._cache={}}getTreeListTableStyle(){const e=this._getTreeListTable(),t=d.getComputedStyle(e);return{color:t.color,backgroundColor:t.backgroundColor,fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontStyle:t.fontStyle,textAlign:"left",verticalAlign:"middle"}}getTreeListColCount(){return this._getHeaderView().getColumnWidths().filter((e=>e>0)).length}getTreeListHeaderInfo(e){const t=this._getHeaderElement(e);if(!t)return null;const i=d.getComputedStyle(t),n={color:i.color,padding:i.padding,paddingLeft:i.paddingLeft,paddingTop:i.paddingTop,paddingRight:i.paddingRight,paddingBottom:i.paddingBottom,verticalAlign:i.verticalAlign,width:this._getColumnWidth(e)};return{content:t.textContent,styles:n}}getTreeListCellInfo(e,t){const i=this._treeList.getNodeByKey(e),n=this._treeList.getRowIndexByKey(e),o=n>-1?this._getDataCell(n,t):null,a=o?d.getComputedStyle(o):this._getColumnCellStyle(t),s={color:a.color,padding:a.padding,paddingLeft:a.paddingLeft,paddingTop:a.paddingTop,paddingRight:a.paddingRight,paddingBottom:a.paddingBottom,width:this._getColumnWidth(t)};return 0===t&&(s.extraLeftPadding=this._getEmptySpaceWidth(i.level)),{content:(null==o?void 0:o.textContent)??this._getDisplayText(e,t),styles:s}}getTreeListEmptyDataCellInfo(){return{content:this._treeList.option("noDataText")}}_ensureColumnWidthCache(e){var t;if((t=this._cache)["columnWidths"]??(t.columnWidths={}),!this._cache.columnWidths[e]){const t=this._getHeaderElement(e);this._cache.columnWidths[e]=(null==t?void 0:t.clientWidth)??0}}_getColumnWidth(e){this._ensureColumnWidthCache(e);const t=this._cache.columnWidths;return t&&t[e]}_getEmptySpaceWidth(e){if(!this._cache.emptyWidth){var t;const e=this._getTreeListElement("dx-treelist-empty-space");(t=this._cache)["emptyWidth"]??(t.emptyWidth=e.offsetWidth??0)}return this._cache.emptyWidth*(e+1)}_getColumnCellStyle(e){return this._ensureColumnCellStyleCache(e),this._cache.columnStyles[e]}_ensureColumnCellStyleCache(e){var t;if((t=this._cache)["columnStyles"]??(t.columnStyles={}),!this._cache.columnStyles[e]){const t=this._getDataCell(0,e);this._cache.columnStyles[e]=d.getComputedStyle(t)}}_getTask(e){return this._ensureTaskCache(e),this._cache.tasks[e]}_ensureTaskCache(e){var t,i;(t=this._cache)["tasks"]??(t.tasks={}),(i=this._cache.tasks)[e]??(i[e]=this._gantt._findTaskByKey(e))}_getTreeListTable(){return this._getTreeListElement("dx-treelist-table")}_getTreeListElement(e){return this._treeList._$element.find("."+e).get(0)}_getDataCell(e,t){const i=this._treeList.getCellElement(e,t);return i&&i.length?i[0]:i}_getHeaderElement(e){return this._getHeaderView().getHeaderElement(e).get(0)}_getHeaderView(){return this._treeList._views.columnHeadersView}_getDisplayText(e,t){const i=this._getTask(e);return i&&this._getGridDisplayText(t,i)}_getGridDisplayText(e,t){const i=this._treeList.getController("columns").getColumns()[e],n=null==i?void 0:i.dataField,l=null==i?void 0:i.format,d=o.default.getDisplayValue(i,t[n],t,"data");if((0,a.isDefined)(l)){if("date"===(null==i?void 0:i.dataType)||"datetime"===(null==i?void 0:i.dataType)){const e=(0,a.isDate)(d)?d:new Date(d);return s.default.format(e,l)}if((0,a.isNumeric)(d))return r.default.format(d,l)}return"string"==typeof d?d:null==d?void 0:d.toString()}}},34376:function(e,t,i){t.GanttHelper=void 0;var n,o=i(31e3),a=i(11528),s=(n=i(4671))&&n.__esModule?n:{default:n};const r=t.GanttHelper={prepareMapHandler:e=>t=>Object.keys(e).reduce(((i,n)=>(i["key"===n?"id":n]=e[n](t),i)),{}),prepareSetterMapHandler:e=>t=>Object.keys(e).reduce(((i,n)=>{const o="key"===n?"id":n;return e[n](i,t[o]),i}),{}),compileGettersByOption(e){const t={};for(const i in e){const n=i.match(/(\w*)Expr/);n&&(t[n[1]]=(0,o.compileGetter)(e[n[0]]))}return t},compileSettersByOption(e){const t={};for(const i in e){const n=i.match(/(\w*)Expr/);n&&!(0,a.isFunction)(e[n[0]])&&(t[n[1]]=(0,o.compileSetter)(e[n[0]]))}return t},compileFuncSettersByOption(e){const t={};for(const i in e){const n=i.match(/(\w*)Expr/);n&&(0,a.isFunction)(e[n[0]])&&(t[n[1]]=e[n[0]])}return t},getStoreObject(e,t){const i=r.compileSettersByOption(e);return Object.keys(i).reduce(((e,n)=>("key"!==n&&i[n](e,t[n]),e)),{})},getInvertedData(e,t){const i={};if(e)for(let n=0;n<e.length;n++){const o=e[n];i[t(o)]=o}return i},getArrayFromOneElement:e=>null==e?[]:[e],getSelectionMode:e=>e?"single":"none",convertTreeToList(e,t){null!=e&&e.data&&null!=e&&e.visible&&t.push(e.data);for(let n=0;n<(null===(i=e.children)||void 0===i?void 0:i.length);n++){var i;const o=e.children[n];r.convertTreeToList(o,t)}},getAllParentNodesKeys(e,t){var i;null!=e&&e.data&&t.push(e.key),null!=e&&null!==(i=e.parent)&&void 0!==i&&i.data&&r.getAllParentNodesKeys(e.parent,t)},getDefaultOptions:()=>({tasks:{dataSource:null,keyExpr:"id",parentIdExpr:"parentId",startExpr:"start",endExpr:"end",progressExpr:"progress",titleExpr:"title",colorExpr:"color"},dependencies:{dataSource:null,keyExpr:"id",predecessorIdExpr:"predecessorId",successorIdExpr:"successorId",typeExpr:"type"},resources:{dataSource:null,keyExpr:"id",textExpr:"text",colorExpr:"color"},resourceAssignments:{dataSource:null,keyExpr:"id",taskIdExpr:"taskId",resourceIdExpr:"resourceId"},columns:void 0,taskListWidth:300,showResources:!0,showDependencies:!0,taskTitlePosition:"inside",firstDayOfWeek:void 0,selectedRowKey:void 0,onSelectionChanged:null,onTaskClick:null,onTaskDblClick:null,onTaskInserting:null,onTaskInserted:null,onTaskDeleting:null,onTaskDeleted:null,onTaskUpdating:null,onTaskUpdated:null,onTaskMoving:null,onTaskEditDialogShowing:null,onDependencyInserting:null,onDependencyInserted:null,onDependencyDeleting:null,onDependencyDeleted:null,onResourceInserting:null,onResourceInserted:null,onResourceDeleting:null,onResourceDeleted:null,onResourceAssigning:null,onResourceAssigned:null,onResourceUnassigning:null,onResourceUnassigned:null,onCustomCommand:null,onContextMenuPreparing:null,allowSelection:!0,showRowLines:!0,stripLines:void 0,scaleType:"auto",scaleTypeRange:{min:"minutes",max:"years"},editing:{enabled:!1,allowTaskAdding:!0,allowTaskDeleting:!0,allowTaskUpdating:!0,allowDependencyAdding:!0,allowDependencyDeleting:!0,allowResourceAdding:!0,allowResourceDeleting:!0,allowResourceUpdating:!0,allowTaskResourceUpdating:!0},validation:{validateDependencies:!1,autoUpdateParentTasks:!1,enablePredecessorGap:!1},toolbar:null,contextMenu:{enabled:!0,items:void 0},taskTooltipContentTemplate:null,taskProgressTooltipContentTemplate:null,taskTimeTooltipContentTemplate:null,taskContentTemplate:null,rootValue:0,sorting:{ascendingText:s.default.format("dxGantt-sortingAscendingText"),descendingText:s.default.format("dxGantt-sortingDescendingText"),clearText:s.default.format("dxGantt-sortingClearText"),mode:"single",showSortIndexes:!1},filterRow:void 0,headerFilter:void 0,rtlEnabled:!1})}},9264:function(e,t,i){t.default=void 0;var n=i(57653),o=T(i(64553)),a=i(31e3),s=i(52576),r=i(3104),l=i(11528),d=i(70136),u=T(i(9121)),c=T(i(31876)),h=T(i(92848)),p=T(i(47744)),g=T(i(11118)),_=i(28997),f=i(57967),m=i(51695),v=i(51237),C=i(34376),y=i(86235),b=i(3116),x=i(41141),w=i(68962),S=i(95736),D=i(79669),I=i(15337),E=T(i(53226));function T(e){return e&&e.__esModule?e:{default:e}}const A=(0,r.getWindow)(),O="tasks",P="dependencies",k="resources",M="resourceAssignments",R="gantt_new_task_key";class L extends g.default{_init(){super._init(),E.default.logHeaderFilterDeprecatedWarningIfNeed(this),this._initGantt(),this._isGanttRendered=!1,this._initHelpers()}_initGantt(){this._refreshDataSources()}_initMarkup(){super._initMarkup(),this.$element().addClass("dx-gantt"),this._$toolbarWrapper=(0,o.default)("<div>").addClass("dx-gantt-toolbar-wrapper").appendTo(this.$element()),this._$toolbar=(0,o.default)("<div>").appendTo(this._$toolbarWrapper),this._$mainWrapper=(0,o.default)("<div>").addClass("dx-gantt-main-wrapper").appendTo(this.$element()),this._$treeListWrapper=(0,o.default)("<div>").addClass("dx-gantt-treelist-wrapper").appendTo(this._$mainWrapper),this._$treeList=(0,o.default)("<div>").appendTo(this._$treeListWrapper),this._$splitter=(0,o.default)("<div>").appendTo(this._$mainWrapper),this._$ganttView=(0,o.default)("<div>").addClass("dx-gantt-view").appendTo(this._$mainWrapper),this._$dialog=(0,o.default)("<div>").appendTo(this.$element()),this._$loadPanel=(0,o.default)("<div>").appendTo(this.$element()),this._$contextMenu=(0,o.default)("<div>").appendTo(this.$element())}_clean(){var e,t;this._savedGanttViewState=null===(e=this._ganttView)||void 0===e?void 0:e.getVisualStateToRestore(),null===(t=this._ganttView)||void 0===t||t._ganttViewCore.cleanMarkup(),delete this._ganttView,delete this._dialogInstance,delete this._loadPanel,delete this._exportHelper,super._clean()}_refresh(){this._isGanttRendered=!1,this._contentReadyRaised=!1,super._refresh()}_fireContentReadyAction(){this._contentReadyRaised||super._fireContentReadyAction(),this._contentReadyRaised=!0}_dimensionChanged(){var e;null===(e=this._ganttView)||void 0===e||e._onDimensionChanged()}_visibilityChanged(e){e&&this._refreshGantt()}_refreshGantt(){this._refreshDataSources(),this._refresh()}_refreshDataSources(){this._refreshDataSource(O),this._refreshDataSource(P),this._refreshDataSource(k),this._refreshDataSource(M)}_renderContent(){this._isMainElementVisible=this.$element().is(":visible"),this._isMainElementVisible&&!this._isGanttRendered&&(this._isGanttRendered=!0,this._renderBars(),this._renderTreeList(),this._renderSplitter())}_renderTreeList(){this._ganttTreeList=new S.GanttTreeList(this),this._treeList=this._ganttTreeList.getTreeList(),this._ganttTreeList.onAfterTreeListCreate()}_renderSplitter(){this._splitter=this._createComponent(this._$splitter,p.default,{container:this.$element(),leftElement:this._$treeListWrapper,rightElement:this._$ganttView,onApplyPanelSize:e=>{this._sizeHelper.onApplyPanelSize(e)}}),this._splitter.option("initialLeftPanelWidth",this.option("taskListWidth"))}_renderBars(){this._bars=[],this._toolbar=new w.GanttToolbar(this._$toolbar,this),this._updateToolbarContent(),this._bars.push(this._toolbar),this._contextMenuBar=new w.GanttContextMenuBar(this._$contextMenu,this),this._updateContextMenu(),this._bars.push(this._contextMenuBar)}_initHelpers(){this._mappingHelper=new y.GanttMappingHelper(this),this._customFieldsManager=new f.GanttCustomFieldsManager(this),this._actionsManager=new _.GanttActionsManager(this),this._ganttTemplatesManager=new x.GanttTemplatesManager(this),this._sizeHelper=new b.GanttSizeHelper(this),this._dataProcessingHelper=new I.GanttDataChangesProcessingHelper}_initGanttView(){this._ganttView||(this._ganttView=this._createComponent(this._$ganttView,D.GanttView,{width:"100%",height:this._ganttTreeList.getOffsetHeight(),rowHeight:this._ganttTreeList.getRowHeight(),headerHeight:this._ganttTreeList.getHeaderHeight(),tasks:this._tasks,dependencies:this._dependencies,resources:this._resources,resourceAssignments:this._resourceAssignments,allowSelection:this.option("allowSelection"),selectedRowKey:this.option("selectedRowKey"),showResources:this.option("showResources"),showDependencies:this.option("showDependencies"),startDateRange:this.option("startDateRange"),endDateRange:this.option("endDateRange"),taskTitlePosition:this.option("taskTitlePosition"),firstDayOfWeek:this.option("firstDayOfWeek"),showRowLines:this.option("showRowLines"),scaleType:this.option("scaleType"),scaleTypeRange:this.option("scaleTypeRange"),editing:this.option("editing"),validation:this.option("validation"),stripLines:this.option("stripLines"),bars:this._bars,mainElement:this.$element(),onSelectionChanged:e=>{this._ganttTreeList.selectRows(C.GanttHelper.getArrayFromOneElement(e.id))},onViewTypeChanged:e=>{this._onViewTypeChanged(e.type)},onScroll:e=>{this._ganttTreeList.scrollBy(e.scrollTop)},onDialogShowing:this._showDialog.bind(this),onPopupMenuShowing:this._showPopupMenu.bind(this),onPopupMenuHiding:this._hidePopupMenu.bind(this),onExpandAll:this._expandAll.bind(this),onCollapseAll:this._collapseAll.bind(this),modelChangesListener:d.ModelChangesListener.create(this),exportHelper:this._getExportHelper(),taskTooltipContentTemplate:this._ganttTemplatesManager.getTaskTooltipContentTemplateFunc(this.option("taskTooltipContentTemplate")),taskProgressTooltipContentTemplate:this._ganttTemplatesManager.getTaskProgressTooltipContentTemplateFunc(this.option("taskProgressTooltipContentTemplate")),taskTimeTooltipContentTemplate:this._ganttTemplatesManager.getTaskTimeTooltipContentTemplateFunc(this.option("taskTimeTooltipContentTemplate")),taskContentTemplate:this._ganttTemplatesManager.getTaskContentTemplateFunc(this.option("taskContentTemplate")),onTaskClick:e=>{this._ganttTreeList.onRowClick(e)},onTaskDblClick:e=>{this._ganttTreeList.onRowDblClick(e)},onAdjustControl:()=>{this._sizeHelper.onAdjustControl()},onContentReady:this._onGanttViewContentReady.bind(this),visualState:this._savedGanttViewState}),delete this._savedGanttViewState)}_onGanttViewContentReady(e){this._isParentAutoUpdateMode()||this._fireContentReadyAction()}_isParentAutoUpdateMode(){return this.option("validation.autoUpdateParentTasks")}_onTreeListContentReady(e){this._isParentAutoUpdateMode()&&this._treeListParentRecalculatedDataUpdating&&this._fireContentReadyAction(),delete this._treeListParentRecalculatedDataUpdating,this._dataProcessingHelper.onTreeListReady()}_onViewTypeChanged(e){this.option("scaleType",this._actionsManager._getScaleType(e))}_refreshDataSource(e){let t=this[`_${e}Option`];t&&(t.dispose(),delete this[`_${e}Option`],delete this[`_${e}`]),t=new u.default(e,this._getLoadPanel.bind(this),((e,t)=>{this._dataSourceChanged(e,t)})),t.option("dataSource",this._getSpecificDataSourceOption(e)),t._refreshDataSource(),this[`_${e}Option`]=t}_getSpecificDataSourceOption(e){const t=this.option(`${e}.dataSource`);return!t||Array.isArray(t)?{store:{type:"array",data:t??[],key:this.option(`${e}.keyExpr`)}}:t}_dataSourceChanged(e,t){const i=C.GanttHelper.compileGettersByOption(this.option(e)),n=this._validateSourceData(e,t),o=n.map(C.GanttHelper.prepareMapHandler(i));if(this[`_${e}`]=o,this._setGanttViewOption(e,o),e===O){var a,s,r;this._tasksRaw=n;const e=!(null!==(a=this._ganttTreeList)&&void 0!==a&&a.getDataSource()||this._ganttView);null===(s=this._ganttTreeList)||void 0===s||s.saveExpandedKeys(),null===(r=this._ganttTreeList)||void 0===r||r.updateDataSource(n,e)}}_validateSourceData(e,t){return t&&e===O?this._validateTaskData(t):t}_validateTaskData(e){const t=(0,a.compileGetter)(this.option(`${O}.keyExpr`)),i=(0,a.compileGetter)(this.option(`${O}.parentIdExpr`)),n=this.option("rootValue")??"dx_dxt_gantt_default_root_value",o={};for(let a=0;a<e.length;a++){const s=e[a];if(s){const e=t(s),a=e===n,r=o[e]??(o[e]={key:e,children:[]});if(!a){const e=i(s)??n,t=o[e]??(o[e]={key:e,children:[]});t.children.push(r),r.parent=t}}}const s=[n];return this._appendChildKeys(o[n],s),e.filter((e=>s.indexOf(t(e))>-1))}_appendChildKeys(e,t){const i=null==e?void 0:e.children;for(let e=0;e<(null==i?void 0:i.length);e++){const n=i[e];t.push(n.key),this._appendChildKeys(n,t)}}_onRecordInserted(e,t,i){const n=this[`_${e}Option`];if(n){const o=C.GanttHelper.getStoreObject(this.option(e),t),s=e===O;s&&this._customFieldsManager.addCustomFieldsDataFromCache(R,o),n.insert(o,(r=>{const l=(0,a.compileGetter)(this.option(`${e}.keyExpr`))(r);i(l),this._executeFuncSetters(e,t,l),this._dataProcessingHelper.addCompletionAction((()=>{this._actionsManager.raiseInsertedAction(e,o,l)}),!0,s),this._ganttTreeList.saveExpandedKeys(),n._reloadDataSource().done((e=>{s&&this._ganttTreeList.onTaskInserted(l,t.parentId)}))}))}}_onRecordUpdated(e,t,i){const n=this[`_${e}Option`],o=e===O;if(n){const a=this._mappingHelper.convertCoreToMappedData(e,i);o&&this._customFieldsManager.cache.hasData(t)&&this._customFieldsManager.addCustomFieldsDataFromCache(t,a),n.update(t,a,(()=>{this._executeFuncSetters(e,i,t),this._ganttTreeList.saveExpandedKeys(),this._dataProcessingHelper.addCompletionAction((()=>{this._actionsManager.raiseUpdatedAction(e,a,t)}),!0,o),n._reloadDataSource()}))}}_onRecordRemoved(e,t,i){const n=this[`_${e}Option`];n&&n.remove(t,(()=>{this._ganttTreeList.saveExpandedKeys(),this._dataProcessingHelper.addCompletionAction((()=>{this._actionsManager.raiseDeletedAction(e,t,this._mappingHelper.convertCoreToMappedData(e,i))}),!0,e===O),n._reloadDataSource()}))}_onParentTaskUpdated(e){const t=this.getTaskDataByCoreData(e);this._actionsManager.raiseUpdatedAction(O,t,e.id)}_onParentTasksRecalculated(e){if(!this.isSieving){const t=C.GanttHelper.compileSettersByOption(this.option(O)),i=this._customFieldsManager.appendCustomFields(e.map(C.GanttHelper.prepareSetterMapHandler(t)));setTimeout((()=>{var e;this._treeListParentRecalculatedDataUpdating=!0,null===(e=this._ganttTreeList)||void 0===e||e.setDataSource(i)}))}this.isSieving=!1}_onGanttViewCoreUpdated(){this._dataProcessingHelper.onGanttViewReady()}_executeFuncSetters(e,t,i){const n=C.GanttHelper.compileFuncSettersByOption(this.option(e)),o=Object.keys(n).filter((e=>(0,l.isDefined)(t[e])));if(o.length>0){const a=this._getDataSourceItem(e,i);o.forEach((e=>{(0,n[e])(a,t[e])}))}}_sortAndFilter(){var e,t,i;const n=this._treeList,o=n.getVisibleColumns(),a=o.filter((e=>e.sortIndex>-1)),s=a.map((e=>({sortIndex:e.sortIndex,sortOrder:e.sortOrder}))),r=!this._compareSortedState(null===(e=this._savedSortFilterState)||void 0===e?void 0:e.sort,s),d=n.option("filterValue"),u=n.option("expandNodesOnFiltering")&&d!==(null===(t=this._savedSortFilterState)||void 0===t?void 0:t.filter),c=a[0]||o.filter((e=>{var t;return(0,l.isDefined)(e.filterValue)||(null===(t=e.filterValues)||void 0===t?void 0:t.length)}))[0],h=(null===(i=this._savedSortFilterState)||void 0===i?void 0:i.sieveColumn)&&!c;if(c||h){const e=c&&{sievedItems:this._ganttTreeList.getSievedItems(),sieveColumn:c,expandTasks:u||d&&r};this.isSieving=!h,this._setGanttViewOption("sieve",e)}this._savedSortFilterState={sort:s,filter:d,sieveColumn:c}}_compareSortedState(e,t){return!(!e||!t||e.length!==t.length)&&e.every(((e,i)=>e.sortIndex===t[i].sortIndex&&e.sortOrder===t[i].sortOrder))}_getToolbarItems(){const e=this.option("toolbar.items");return e||[]}_updateToolbarContent(){const e=this._getToolbarItems();e.length?this._$toolbarWrapper.show():this._$toolbarWrapper.hide(),this._toolbar&&this._toolbar.createItems(e),this._updateBarItemsState()}_updateContextMenu(){const e=this.option("contextMenu");e.enabled&&this._contextMenuBar&&(this._contextMenuBar.createItems(e.items),this._updateBarItemsState())}_updateBarItemsState(){this._ganttView&&this._ganttView.updateBarItemsState()}_showDialog(e){this._dialogInstance||(this._dialogInstance=new m.GanttDialog(this,this._$dialog)),this._dialogInstance.show(e.name,e.parameters,e.callback,e.afterClosing,this.option("editing"))}_showPopupMenu(e){if(this.option("contextMenu.enabled")){this._ganttView.getBarManager().updateContextMenu();const t={cancel:!1,event:e.event,targetType:e.type,targetKey:e.key,items:(0,s.extend)(!0,[],this._contextMenuBar._items),data:"task"===e.type?this.getTaskData(e.key):this.getDependencyData(e.key)};this._actionsManager.raiseContextMenuPreparing(t),t.cancel||this._contextMenuBar.show(e.position,t.items)}}_hidePopupMenu(){this._contextMenuBar.hide()}_getLoadPanel(){return this._loadPanel||(this._loadPanel=this._createComponent(this._$loadPanel,c.default,{position:{of:this.$element()}})),this._loadPanel}_getTaskKeyGetter(){return this._getDataSourceItemKeyGetter(O)}_findTaskByKey(e){return this._getDataSourceItem(O,e)}_getDataSourceItem(e,t){const i=this[`_${e}Option`],n=this._getDataSourceItemKeyGetter(e);return(null==i?void 0:i._getItems()).find((e=>n(e)===t))}_getDataSourceItemKeyGetter(e){return(0,a.compileGetter)(this.option(`${e}.keyExpr`))}_setGanttViewOption(e,t){this._ganttView&&this._ganttView.option(e,t)}_getGanttViewOption(e,t){var i;return null===(i=this._ganttView)||void 0===i?void 0:i.option(e)}_getExportHelper(){return this._exportHelper??(this._exportHelper=new v.GanttExportHelper(this)),this._exportHelper}_executeCoreCommand(e){this._ganttView.executeCoreCommand(e)}_expandAll(){this._changeExpandAll(!0)}_collapseAll(){this._changeExpandAll(!1)}_onTreeListRowExpandChanged(e,t){this._lockRowExpandEvent||(this._ganttView.changeTaskExpanded(e.key,t),this._sizeHelper.adjustHeight())}_changeExpandAll(e,t,i){var n;const o=[],a=[];if(this._treeList.forEachNode((e=>{var t;null!==(t=e.children)&&void 0!==t&&t.length&&o.push(e)})),i){const e=this._treeList.getNodeByKey(i);C.GanttHelper.getAllParentNodesKeys(e,a)}let s;this._lockRowExpandEvent=o.length>0;const r=o.reduce(((n,r,l)=>{i?e=a.includes(r.key):t&&(e=r.level<t),n[r.key]=e;const d=e?this._treeList.expandRow:this._treeList.collapseRow;return l===o.length-1?s=d(r.key):d(r.key),n}),{});null===(n=s)||void 0===n||n.then((()=>{this._ganttView.applyTasksExpandedState(r),this._sizeHelper.adjustHeight(),delete this._lockRowExpandEvent}))}getTaskResources(e){if(!(0,l.isDefined)(e))return null;return this._ganttView._ganttViewCore.getTaskResources(e).map((e=>this._mappingHelper.convertCoreToMappedData(k,e)))}getVisibleTaskKeys(){return this._ganttView._ganttViewCore.getVisibleTaskKeys()}getVisibleDependencyKeys(){return this._ganttView._ganttViewCore.getVisibleDependencyKeys()}getVisibleResourceKeys(){return this._ganttView._ganttViewCore.getVisibleResourceKeys()}getVisibleResourceAssignmentKeys(){return this._ganttView._ganttViewCore.getVisibleResourceAssignmentKeys()}getTaskData(e){if(!(0,l.isDefined)(e))return null;const t=this._ganttView._ganttViewCore.getTaskData(e);return this.getTaskDataByCoreData(t)}getTaskDataByCoreData(e){const t=e?this._mappingHelper.convertCoreToMappedData(O,e):null;return this._customFieldsManager.addCustomFieldsData(e.id,t),t}insertTask(e){this._customFieldsManager.saveCustomFieldsDataToCache(R,e),this._ganttView._ganttViewCore.insertTask(this._mappingHelper.convertMappedToCoreData(O,e))}deleteTask(e){this._ganttView._ganttViewCore.deleteTask(e)}updateTask(e,t){const i=this._mappingHelper.convertMappedToCoreData(O,t),n=!Object.keys(i).length;if(this._customFieldsManager.saveCustomFieldsDataToCache(e,t,!0,n),n){const i=this._customFieldsManager._getCustomFieldsData(t);Object.keys(i).length>0&&this._actionsManager.raiseUpdatingAction(O,{cancel:!1,key:e,newValues:{}})}else this._ganttView._ganttViewCore.updateTask(e,i)}getDependencyData(e){if(!(0,l.isDefined)(e))return null;const t=this._ganttView._ganttViewCore.getDependencyData(e);return t?this._mappingHelper.convertCoreToMappedData(P,t):null}insertDependency(e){this._ganttView._ganttViewCore.insertDependency(this._mappingHelper.convertMappedToCoreData(P,e))}deleteDependency(e){this._ganttView._ganttViewCore.deleteDependency(e)}getResourceData(e){const t=this._ganttView._ganttViewCore.getResourceData(e);return t?this._mappingHelper.convertCoreToMappedData(k,t):null}deleteResource(e){this._ganttView._ganttViewCore.deleteResource(e)}insertResource(e,t){this._ganttView._ganttViewCore.insertResource(this._mappingHelper.convertMappedToCoreData(k,e),t)}getResourceAssignmentData(e){const t=this._ganttView._ganttViewCore.getResourceAssignmentData(e);return t?this._mappingHelper.convertCoreToMappedData(M,t):null}assignResourceToTask(e,t){this._ganttView._ganttViewCore.assignResourceToTask(e,t)}unassignResourceFromTask(e,t){this._ganttView._ganttViewCore.unassignResourceFromTask(e,t)}unassignAllResourcesFromTask(e){this._ganttView._ganttViewCore.unassignAllResourcesFromTask(e)}updateDimensions(){this._sizeHelper.onAdjustControl()}scrollToDate(e){this._ganttView._ganttViewCore.scrollToDate(e)}showResourceManagerDialog(){this._ganttView._ganttViewCore.showResourcesDialog()}showTaskDetailsDialog(e){this._ganttView._ganttViewCore.showTaskDetailsDialog(e)}exportToPdf(e){return this._exportToPdf(e)}_exportToPdf(e){var t;this._exportHelper.reset();const i=(0,s.extend)({},e);return i.createDocumentMethod&&(i.docCreateMethod=i.createDocumentMethod),i.pdfDocument??(i.pdfDocument=i.jsPDFDocument),i.docCreateMethod??(i.docCreateMethod=(null===(t=A.jspdf)||void 0===t?void 0:t.jsPDF)??A.jsPDF),i.format??(i.format="a4"),new Promise((e=>{var t;e(null===(t=this._ganttView)||void 0===t?void 0:t._ganttViewCore.exportToPdf(i))}))}refresh(){return new Promise(((e,t)=>{try{this._refreshGantt(),e()}catch(e){t(e.message)}}))}expandAll(){this._expandAll()}collapseAll(){this._collapseAll()}expandAllToLevel(e){this._changeExpandAll(!1,e)}expandToTask(e){var t;const i=this._treeList.getNodeByKey(e);this._changeExpandAll(!1,0,null==i||null===(t=i.parent)||void 0===t?void 0:t.key)}collapseTask(e){this._treeList.collapseRow(e)}expandTask(e){this._treeList.expandRow(e)}showResources(e){this.option("showResources",e)}showDependencies(e){this.option("showDependencies",e)}zoomIn(){this._ganttView._ganttViewCore.zoomIn()}zoomOut(){this._ganttView._ganttViewCore.zoomOut()}_getDefaultOptions(){return(0,s.extend)(super._getDefaultOptions(),C.GanttHelper.getDefaultOptions())}_optionChanged(e){var t,i,o,a,s,r,l,d,u,c,h,p,g,_,f,m,v,y,b,x,w,S,D,I,E,T,A,R,L,B,V,F,H,N,z,W,$,G,j,U,K,Z;switch(e.name){case"tasks":this._refreshDataSource(O);break;case"dependencies":this._refreshDataSource(P);break;case"resources":this._refreshDataSource(k);break;case"resourceAssignments":this._refreshDataSource(M);break;case"columns":null===(t=this._ganttTreeList)||void 0===t||t.setOption("columns",this._ganttTreeList.getColumns());break;case"taskListWidth":null===(i=this._sizeHelper)||void 0===i||i.setInnerElementsWidth();break;case"showResources":this._setGanttViewOption("showResources",e.value);break;case"showDependencies":this._setGanttViewOption("showDependencies",e.value);break;case"taskTitlePosition":this._setGanttViewOption("taskTitlePosition",e.value);break;case"firstDayOfWeek":this._setGanttViewOption("firstDayOfWeek",e.value);break;case"startDateRange":this._setGanttViewOption("startDateRange",e.value);break;case"endDateRange":this._setGanttViewOption("endDateRange",e.value);break;case"selectedRowKey":null===(o=this._ganttTreeList)||void 0===o||o.selectRows(C.GanttHelper.getArrayFromOneElement(e.value));break;case"onSelectionChanged":null===(a=this._actionsManager)||void 0===a||a.createSelectionChangedAction();break;case"onTaskClick":null===(s=this._actionsManager)||void 0===s||s.createTaskClickAction();break;case"onTaskDblClick":null===(r=this._actionsManager)||void 0===r||r.createTaskDblClickAction();break;case"onTaskInserting":null===(l=this._actionsManager)||void 0===l||l.createTaskInsertingAction();break;case"onTaskInserted":null===(d=this._actionsManager)||void 0===d||d.createTaskInsertedAction();break;case"onTaskDeleting":null===(u=this._actionsManager)||void 0===u||u.createTaskDeletingAction();break;case"onTaskDeleted":null===(c=this._actionsManager)||void 0===c||c.createTaskDeletedAction();break;case"onTaskUpdating":null===(h=this._actionsManager)||void 0===h||h.createTaskUpdatingAction();break;case"onTaskUpdated":null===(p=this._actionsManager)||void 0===p||p.createTaskUpdatedAction();break;case"onTaskMoving":null===(g=this._actionsManager)||void 0===g||g.createTaskMovingAction();break;case"onTaskEditDialogShowing":null===(_=this._actionsManager)||void 0===_||_.createTaskEditDialogShowingAction();break;case"onResourceManagerDialogShowing":null===(f=this._actionsManager)||void 0===f||f.createResourceManagerDialogShowingAction();break;case"onDependencyInserting":null===(m=this._actionsManager)||void 0===m||m.createDependencyInsertingAction();break;case"onDependencyInserted":null===(v=this._actionsManager)||void 0===v||v.createDependencyInsertedAction();break;case"onDependencyDeleting":null===(y=this._actionsManager)||void 0===y||y.createDependencyDeletingAction();break;case"onDependencyDeleted":null===(b=this._actionsManager)||void 0===b||b.createDependencyDeletedAction();break;case"onResourceInserting":null===(x=this._actionsManager)||void 0===x||x.createResourceInsertingAction();break;case"onResourceInserted":null===(w=this._actionsManager)||void 0===w||w.createResourceInsertedAction();break;case"onResourceDeleting":null===(S=this._actionsManager)||void 0===S||S.createResourceDeletingAction();break;case"onResourceDeleted":null===(D=this._actionsManager)||void 0===D||D.createResourceDeletedAction();break;case"onResourceAssigning":null===(I=this._actionsManager)||void 0===I||I.createResourceAssigningAction();break;case"onResourceAssigned":null===(E=this._actionsManager)||void 0===E||E.createResourceAssignedAction();break;case"onResourceUnassigning":null===(T=this._actionsManager)||void 0===T||T.createResourceUnassigningAction();break;case"onResourceUnassigned":null===(A=this._actionsManager)||void 0===A||A.createResourceUnassignedAction();break;case"onCustomCommand":null===(R=this._actionsManager)||void 0===R||R.createCustomCommandAction();break;case"onContextMenuPreparing":null===(L=this._actionsManager)||void 0===L||L.createContextMenuPreparingAction();break;case"onScaleCellPrepared":null===(B=this._actionsManager)||void 0===B||B.createScaleCellPreparedAction();break;case"allowSelection":null===(V=this._ganttTreeList)||void 0===V||V.setOption("selection.mode",C.GanttHelper.getSelectionMode(e.value)),this._setGanttViewOption("allowSelection",e.value);break;case"showRowLines":null===(F=this._ganttTreeList)||void 0===F||F.setOption("showRowLines",e.value),this._setGanttViewOption("showRowLines",e.value);break;case"stripLines":this._setGanttViewOption("stripLines",e.value);break;case"scaleType":this._setGanttViewOption("scaleType",e.value);break;case"scaleTypeRange":this._setGanttViewOption("scaleTypeRange",this.option(e.name));break;case"editing":this._setGanttViewOption("editing",this.option(e.name));break;case"validation":this._setGanttViewOption("validation",this.option(e.name));break;case"toolbar":this._updateToolbarContent();break;case"contextMenu":this._updateContextMenu();break;case"taskTooltipContentTemplate":this._setGanttViewOption("taskTooltipContentTemplate",null===(H=this._ganttTemplatesManager)||void 0===H?void 0:H.getTaskTooltipContentTemplateFunc(e.value));break;case"taskProgressTooltipContentTemplate":this._setGanttViewOption("taskProgressTooltipContentTemplate",null===(N=this._ganttTemplatesManager)||void 0===N?void 0:N.getTaskProgressTooltipContentTemplateFunc(e.value));break;case"taskTimeTooltipContentTemplate":this._setGanttViewOption("taskTimeTooltipContentTemplate",null===(z=this._ganttTemplatesManager)||void 0===z?void 0:z.getTaskTimeTooltipContentTemplateFunc(e.value));break;case"taskContentTemplate":this._setGanttViewOption("taskContentTemplate",null===(W=this._ganttTemplatesManager)||void 0===W?void 0:W.getTaskContentTemplateFunc(e.value));break;case"rootValue":null===($=this._ganttTreeList)||void 0===$||$.setOption("rootValue",e.value);break;case"width":super._optionChanged(e),null===(G=this._sizeHelper)||void 0===G||G.updateGanttWidth();break;case"height":super._optionChanged(e),null===(j=this._sizeHelper)||void 0===j||j.setGanttHeight((0,n.getHeight)(this._$element));break;case"sorting":null===(U=this._ganttTreeList)||void 0===U||U.setOption("sorting",this.option(e.name));break;case"filterRow":null===(K=this._ganttTreeList)||void 0===K||K.setOption("filterRow",this.option(e.name));break;case"headerFilter":null===(Z=this._ganttTreeList)||void 0===Z||Z.setOption("headerFilter",this.option(e.name));break;default:super._optionChanged(e)}}}(0,h.default)("dxGantt",L);t.default=L;e.exports=t.default,e.exports.default=t.default},86235:function(e,t,i){t.GanttMappingHelper=void 0;var n=i(11528),o=i(31e3);const a=/(\w*)Expr/;t.GanttMappingHelper=class{constructor(e){this._gantt=e}_getMappedFieldName(e,t){let i=t;return"id"===t&&(i="key"),this._gantt.option(`${e}.${i}Expr`)}getTaskMappedFieldNames(){const e=[],t=this._gantt.option("tasks");for(const i in t){const n=i.match(a),o=n&&t[n[0]];o&&e.push(o)}return e}convertCoreToMappedData(e,t){return Object.keys(t).reduce(((i,a)=>{const s=this._getMappedFieldName(e,a);if(s&&!(0,n.isFunction)(s)){(0,o.compileSetter)(s)(i,t[a])}return i}),{})}convertMappedToCoreData(e,t){const i={};if(t){const n=this._gantt.option(e);for(const e in n){const s=e.match(a),r=s&&n[s[0]];if(r&&void 0!==t[r]){const e=(0,o.compileGetter)(r);i[s[1]]=e(t)}}}return i}convertCoreToMappedFields(e,t){return t.reduce(((t,i)=>{const n=this._getMappedFieldName(e,i);return n&&t.push(n),t}),[])}convertMappedToCoreFields(e,t){const i=[],n=this._gantt.option(e);for(const e in n){const o=e.match(a),s=o&&n[o[0]];if(s&&t.indexOf(s)>-1){const e=o[1];i.push(e)}}return i}}},70136:function(e,t){t.ModelChangesListener=void 0;const i="tasks",n="dependencies",o="resources",a="resourceAssignments";t.ModelChangesListener={create:e=>({NotifyTaskCreated:(t,n,o)=>{e._onRecordInserted(i,t,n)},NotifyTaskRemoved:(t,n,o)=>{e._onRecordRemoved(i,t,o)},NotifyTaskUpdated:(t,n,o)=>{e._onRecordUpdated(i,t,n)},NotifyParentTaskUpdated:(t,i)=>{e._onParentTaskUpdated(t)},NotifyDependencyInserted:(t,i,o)=>{e._onRecordInserted(n,t,i)},NotifyDependencyRemoved:(t,i,o)=>{e._onRecordRemoved(n,t,o)},NotifyResourceCreated:(t,i,n)=>{e._onRecordInserted(o,t,i)},NotifyResourceRemoved:(t,i,n)=>{e._onRecordRemoved(o,t,n)},NotifyResourceAssigned:(t,i,n)=>{e._onRecordInserted(a,t,i)},NotifyResourceUnassigned:(t,i,n)=>{e._onRecordRemoved(a,t,n)},NotifyParentDataRecalculated:t=>{e._onParentTasksRecalculated(t)},NotifyTaskCreating:t=>{e._actionsManager.raiseInsertingAction(i,t)},NotifyTaskRemoving:t=>{e._actionsManager.raiseDeletingAction(i,t)},NotifyTaskUpdating:t=>{e._actionsManager.raiseUpdatingAction(i,t)},NotifyTaskMoving:t=>{e._actionsManager.raiseUpdatingAction(i,t,e._actionsManager.getTaskMovingAction())},NotifyTaskEditDialogShowing:t=>{e._actionsManager.raiseTaskEditDialogShowingAction(t)},NotifyResourceManagerDialogShowing:t=>{e._actionsManager.raiseResourceManagerDialogShowingAction(t)},NotifyDependencyInserting:t=>{e._actionsManager.raiseInsertingAction(n,t)},NotifyDependencyRemoving:t=>{e._actionsManager.raiseDeletingAction(n,t)},NotifyResourceCreating:t=>{e._actionsManager.raiseInsertingAction(o,t)},NotifyResourceRemoving:t=>{e._actionsManager.raiseDeletingAction(o,t)},NotifyResourceAssigning:t=>{e._actionsManager.raiseInsertingAction(a,t)},NotifyResourceUnassigning:t=>{e._actionsManager.raiseDeletingAction(a,t)},NotifyScaleCellPrepared:t=>{e._actionsManager.raiseScaleCellPreparedAction(t)},NotifyGanttViewUpdated:()=>{e._onGanttViewCoreUpdated()}})}},3116:function(e,t,i){t.GanttSizeHelper=void 0;var n=i(57653),o=i(3104);t.GanttSizeHelper=class{constructor(e){this._gantt=e}_setTreeListDimension(e,t){var i;const o="width"===e?n.setWidth:n.setHeight,a="width"===e?n.getWidth:n.getHeight;o(this._gantt._$treeListWrapper,t),null===(i=this._gantt._ganttTreeList)||void 0===i||i.setOption(e,a(this._gantt._$treeListWrapper))}_setGanttViewDimension(e,t){const i="width"===e?n.setWidth:n.setHeight,o="width"===e?n.getWidth:n.getHeight;i(this._gantt._$ganttView,t),this._gantt._setGanttViewOption(e,o(this._gantt._$ganttView))}_getPanelsWidthByOption(){var e,t;const i=(0,n.getWidth)(this._gantt._$element),o=this._gantt.option("taskListWidth");let a;return isNaN(o)?(null===(e=o.indexOf)||void 0===e?void 0:e.call(o,"px"))>0?a=i-parseInt(o.replace("px",""))+"px":(null===(t=o.indexOf)||void 0===t?void 0:t.call(o,"%"))>0&&(a=100-parseInt(o.replace("%",""))+"%"):a=i-parseInt(o),{leftPanelWidth:o,rightPanelWidth:a}}onAdjustControl(){const e=(0,n.getHeight)(this._gantt._$element);this.updateGanttWidth(),this.setGanttHeight(e)}onApplyPanelSize(e){this.setInnerElementsWidth(e),this.updateGanttRowHeights()}updateGanttRowHeights(){const e=this._gantt._ganttTreeList.getRowHeight();var t;this._gantt._getGanttViewOption("rowHeight")!==e&&(this._gantt._setGanttViewOption("rowHeight",e),null===(t=this._gantt._ganttView)||void 0===t||t._ganttViewCore.updateRowHeights(e))}adjustHeight(){this._gantt._hasHeight||(this._gantt._setGanttViewOption("height",0),this._gantt._setGanttViewOption("height",this._gantt._ganttTreeList.getOffsetHeight()))}setInnerElementsWidth(e){if(!(0,o.hasWindow)())return;const t=!e;t&&(e=this._getPanelsWidthByOption(),this._setTreeListDimension("width",0),this._setGanttViewDimension("width",0)),this._setTreeListDimension("width",e.leftPanelWidth),this._setGanttViewDimension("width",e.rightPanelWidth),t&&this._gantt._splitter._setSplitterPositionLeft()}updateGanttWidth(){this._gantt._splitter._dimensionChanged()}setGanttHeight(e){var t;const i=e-this._gantt._$toolbarWrapper.get(0).offsetHeight;this._setTreeListDimension("height",i),this._setGanttViewDimension("height",i),null===(t=this._gantt._ganttView)||void 0===t||t._ganttViewCore.resetAndUpdate()}}},45471:function(e,t,i){t.TaskAreaContainer=void 0;var n,o=(n=i(91374))&&n.__esModule?n:{default:n};t.TaskAreaContainer=class{constructor(e,t){this._element=e,this._scrollView=t._createComponent(this._element,o.default,{scrollByContent:!1,scrollByThumb:!0,showScrollbar:"onHover",direction:"both",onScroll:()=>{t.updateView()}})}get scrollTop(){return this._scrollView.scrollTop()}set scrollTop(e){const t=e-this._scrollView.scrollTop();0!==t&&this._scrollView.scrollBy({left:0,top:t})}get scrollLeft(){return this._scrollView.scrollLeft()}set scrollLeft(e){const t=e-this._scrollView.scrollLeft();0!==t&&this._scrollView.scrollBy({left:t,top:0})}get scrollWidth(){return this._scrollView.scrollWidth()}get scrollHeight(){return this._scrollView.scrollHeight()}get isExternal(){return!0}getWidth(){return this._element.offsetWidth}getHeight(){return this._element.offsetHeight}getElement(){return this._element}}},41141:function(e,t,i){t.GanttTemplatesManager=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(61404);t.GanttTemplatesManager=class{constructor(e){this._gantt=e}getTaskTooltipContentTemplateFunc(e){const t=e&&this._gantt._getTemplate(e);return t&&((e,i,n)=>(t.render({model:this._gantt.getTaskDataByCoreData(i),container:(0,a.getPublicElement)((0,o.default)(e)),onRendered:()=>{n()}}),true))}getTaskProgressTooltipContentTemplateFunc(e){const t=e&&this._gantt._getTemplate(e);return t&&((e,i,n)=>(t.render({model:i,container:(0,a.getPublicElement)((0,o.default)(e)),onRendered:()=>{n()}}),true))}getTaskTimeTooltipContentTemplateFunc(e){const t=e&&this._gantt._getTemplate(e);return t&&((e,i,n)=>(t.render({model:i,container:(0,a.getPublicElement)((0,o.default)(e)),onRendered:()=>{n()}}),true))}getTaskContentTemplateFunc(e){const t=e&&this._gantt._getTemplate(e);return t&&((e,i,n,s)=>(i.taskData=this._gantt.getTaskDataByCoreData(i.taskData),t.render({model:i,container:(0,a.getPublicElement)((0,o.default)(e)),onRendered:()=>{n(e,s)}}),true))}}},95736:function(e,t,i){t.GanttTreeList=void 0;var n=i(57653),o=p(i(64553)),a=p(i(21872)),s=i(41639),r=i(11528),l=i(34376),d=p(i(14479)),u=p(i(80556)),c=i(31e3),h=i(19701);function p(e){return e&&e.__esModule?e:{default:e}}const g="tasks";t.GanttTreeList=class{constructor(e){this._gantt=e,this._$treeList=this._gantt._$treeList}getTreeList(){const{keyExpr:e,parentIdExpr:t}=this._gantt.option(g);return this._treeList=this._gantt._createComponent(this._$treeList,a.default,{dataSource:this.createDataSource(this._gantt._tasksRaw,e),keyExpr:e,filterSyncEnabled:!0,parentIdExpr:t,columns:this.getColumns(),columnResizingMode:"nextColumn",height:this._getHeight(),width:this._gantt.option("taskListWidth"),selection:{mode:l.GanttHelper.getSelectionMode(this._gantt.option("allowSelection"))},selectedRowKeys:l.GanttHelper.getArrayFromOneElement(this._gantt.option("selectedRowKey")),sorting:this._gantt.option("sorting"),filterRow:this._gantt.option("filterRow"),headerFilter:this._gantt.option("headerFilter"),scrolling:{showScrollbar:"onHover",mode:"virtual"},allowColumnResizing:!0,autoExpandAll:!0,showRowLines:this._gantt.option("showRowLines"),rootValue:this._gantt.option("rootValue"),onContentReady:e=>{this._onContentReady(e)},onSelectionChanged:e=>{this._onSelectionChanged(e)},onRowCollapsed:e=>{this._onRowCollapsed(e)},onRowExpanded:e=>{this._onRowExpanded(e)},onRowPrepared:e=>{this._onRowPrepared(e)},onContextMenuPreparing:e=>{this._onContextMenuPreparing(e)},onRowClick:e=>{this.onRowClick(e)},onRowDblClick:e=>{this.onRowDblClick(e)},onNodesInitialized:e=>{this._onNodesInitialized(e)},_disableDeprecationWarnings:!0}),this._treeList}onAfterTreeListCreate(){this._postponedGanttInitRequired&&(this._initGanttOnContentReady({component:this._treeList}),delete this._postponedGanttInitRequired)}_onContentReady(e){!!this._treeList?this._initGanttOnContentReady(e):this._postponedGanttInitRequired=!0,this._gantt._onTreeListContentReady(e)}_initGanttOnContentReady(e){e.component.getDataSource()&&(this._gantt._initGanttView(),this._initScrollSync(e.component)),this._gantt._sortAndFilter(),this._gantt._sizeHelper.updateGanttRowHeights()}_onSelectionChanged(e){const t=e.currentSelectedRowKeys[0];this._gantt._setGanttViewOption("selectedRowKey",t),this._gantt._setOptionWithoutOptionChange("selectedRowKey",t),this._gantt._actionsManager.raiseSelectionChangedAction(t)}_onRowCollapsed(e){this._gantt._onTreeListRowExpandChanged(e,!1)}_onRowExpanded(e){this._gantt._onTreeListRowExpandChanged(e,!0)}_onRowPrepared(e){"data"===e.rowType&&e.node.children.length>0&&(0,o.default)(e.rowElement).addClass("dx-gantt-collapsable-row")}_onContextMenuPreparing(e){var t,i;if("header"===e.target)return;"data"===(null===(t=e.row)||void 0===t?void 0:t.rowType)&&this.setOption("selectedRowKeys",[e.row.data[this._gantt.option("tasks.keyExpr")]]),e.items=[];const n={cancel:!1,event:e.event,type:"task",key:null===(i=e.row)||void 0===i?void 0:i.key,position:{x:e.event.pageX,y:e.event.pageY}};this._gantt._showPopupMenu(n)}_getHeight(){return(0,n.getHeight)(this._$treeList)?(0,n.getHeight)(this._$treeList):(this._gantt._hasHeight=(0,r.isDefined)(this._gantt.option("height"))&&""!==this._gantt.option("height"),this._gantt._hasHeight?"100%":"")}_initScrollSync(e){const t=e.getScrollable();t&&(t.off("scroll"),t.on("scroll",(e=>{this._onScroll(e)})))}_onScroll(e){const t=this._gantt._ganttView.getTaskAreaContainer();t.scrollTop!==e.component.scrollTop()&&(t.scrollTop=e.component.scrollTop())}_correctRowsViewRowHeight(e){const t=this._treeList._views&&this._treeList._views.rowsView;(null==t?void 0:t._rowHeight)!==e&&(t._rowHeight=e)}_skipUpdateTreeListDataSource(){return this._gantt.option("validation.autoUpdateParentTasks")}selectRows(e){this.setOption("selectedRowKeys",e)}scrollBy(e){const t=this._treeList.getScrollable();if(t){const i=e-t.scrollTop();Math.abs(i)>=2&&t.scrollBy({left:0,top:i})}}updateDataSource(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this._skipUpdateTreeListDataSource()||t)this.setDataSource(e);else if(i){const e=this._treeList.option("dataSource");this._gantt._onParentTasksRecalculated(e)}}setDataSource(e){this.setOption("dataSource",this.createDataSource(e))}createDataSource(e,t){return e&&new d.default({store:new u.default({data:e,key:t||this.getOption("keyExpr")})})}onRowClick(e){this._gantt._actionsManager.raiseTaskClickAction(e.key,e.event)}onRowDblClick(e){this._gantt._actionsManager.raiseTaskDblClickAction(e.key,e.event)&&this._gantt._ganttView._ganttViewCore.showTaskEditDialog()}saveExpandedKeys(){const e=this._treeList,t=null==e?void 0:e.getVisibleRows().length;if(t>0){const e=this.getAllNodes(),i=this.getOption("expandedRowKeys");if(i&&e.length!==t){const t=this.getNodesState();t.applyNodes(e,this.getOption("rootValue")),t.saveExpandedState(i)}}}_onNodesInitialized(e){const t=this.getNodesState(),i=t.getExpandedKeys(),n=this.getAllNodes();t.applyNodes(n,this.getOption("rootValue"));const o=t.getExpandedKeys();if(o&&this.setOption("expandedRowKeys",o),this.isExpandedStateChanged(i,o)){const e=n.reduce(((e,t)=>(e[t.key]=!o||o.includes(t.key),e)),{});this._gantt._ganttView.applyTasksExpandedState(e)}t.clear()}getNodesState(){return this._nodeState||(this._nodeState=new h.GanttTreeListNodesState),this._nodeState}getAllNodes(){var e,t;const i=null===(e=this._treeList)||void 0===e||null===(e=e.getDataSource())||void 0===e?void 0:e.store();if(!i||null===(t=this._treeList)||void 0===t||!t.getNodeByKey)return[];const n=(0,c.compileGetter)(i.key());return i._array.map((e=>this._treeList.getNodeByKey(n(e)))).filter((e=>!!e))}isExpandedStateChanged(e,t){return(null!==e||null!==t)&&((null==e?void 0:e.length)!==(null==t?void 0:t.length)||e.some(((e,i)=>e!==t[i])))}getOffsetHeight(){return this._gantt._treeList._$element.get(0).offsetHeight}getRowHeight(){const e=this._treeList._$element.find(".dx-data-row");let t=e.length?(0,s.getBoundingRect)(e.last().get(0)).height:34;return t||(t=34),this._correctRowsViewRowHeight(t),t}getHeaderHeight(){return(0,s.getBoundingRect)(this._treeList._$element.find(".dx-treelist-headers").get(0)).height}getColumns(){const e=this._gantt.option("columns");if(e)for(let t=0;t<e.length;t++){const i=e[t];(i.dataField===this._gantt.option(`${g}.keyExpr`)||i.dataField===this._gantt.option(`${g}.parentIdExpr`))&&!i.dataType&&(i.dataType="object")}return e}getSievedItems(){const e=this._treeList.getRootNode();if(!e)return;const t=[];l.GanttHelper.convertTreeToList(e,t);const i=l.GanttHelper.compileGettersByOption(this._gantt.option(g));return this._gantt._validateSourceData(g,t).map(l.GanttHelper.prepareMapHandler(i))}setOption(e,t){this._treeList&&this._treeList.option(e,t)}getOption(e){var t;return null===(t=this._treeList)||void 0===t?void 0:t.option(e)}onTaskInserted(e,t){if((0,r.isDefined)(t)){const e=this.getOption("expandedRowKeys");-1===e.indexOf(t)&&(e.push(t),this.setOption("expandedRowKeys",e))}this.selectRows(l.GanttHelper.getArrayFromOneElement(e)),this.setOption("focusedRowKey",e)}getDataSource(){var e;return null===(e=this._treeList)||void 0===e?void 0:e.getDataSource()}}},19701:function(e,t){t.GanttTreeListNodesState=t.GanttTreeListNodeState=void 0;class i{constructor(e){var t;this.collapsed=!1,this.key=e.key,this.children=e.children.map((e=>e.key)),this.parentKey=null===(t=e.parent)||void 0===t?void 0:t.key}hasChildren(){return this.children.length>0}removeChild(e){const t=this.children.indexOf(e.key);t>-1&&(this.children=this.children.splice(t,1))}equal(e){return!(!e||e.key!==this.key||e.parentKey!==this.parentKey)&&(this.children.length===e.children.length&&!this.children.some(((t,i)=>t!==e.children[i])))}}t.GanttTreeListNodeState=i;t.GanttTreeListNodesState=class{constructor(){this._resetHash()}clear(){this._resetHash()}applyNodes(e,t){this._rootValue!==t&&(this._resetHash(),this._rootValue=t),this._removeNonExistentNodes(e.map((e=>e.key))),e.forEach((e=>this._applyNode(e))),this._validateHash()}saveExpandedState(e){this._hasCollapsed=!1,this._forEachState((t=>{t.hasChildren()&&!e.includes(t.key)&&(t.collapsed=!0,this._hasCollapsed=!0)}))}getExpandedKeys(){if(this._hasCollapsed){const e=[];return this._forEachState((t=>{t.hasChildren()&&!t.collapsed&&e.push(t.key)})),e}return null}_resetHash(){this._nodeHash={},this._hasCollapsed=!1}_getNodeState(e){return this._nodeHash[e]}_removeNonExistentNodes(e){e&&this._forEachState((t=>{e.includes(t.key)||this._removeStateWithChildren(t)}))}_removeStateWithChildren(e){const t=this._getNodeState(e);if(t){t.children.forEach((e=>this._removeStateWithChildren(e)));const i=this._getNodeState(t.parentKey);i&&i.removeChild(t),delete this._nodeHash[e]}}_applyNode(e){const t=new i(e),n=this._getNodeState(e.key);null!=n&&n.equal(t)||(this._nodeHash[e.key]=t,this._expandTreelineToNode(e.key))}_expandTreelineToNode(e){const t=this._getNodeState(e);let i=this._getNodeState(null==t?void 0:t.parentKey);for(;i;)i.collapsed=!1,i=this._getNodeState(i.parentKey)}_validateHash(){Object.keys(this._nodeHash).forEach((e=>{const t=this._getNodeState(e),i=null==t?void 0:t.parentKey;i===this._rootValue||this._getNodeState(i)||this._removeStateWithChildren(e)}))}_forEachState(e){Object.keys(this._nodeHash).forEach((t=>{const i=this._nodeHash[t];i&&e(i)}))}}},79669:function(e,t,i){t.GanttView=void 0;var n=p(i(64553)),o=p(i(11118)),a=i(43895),s=i(45471),r=p(i(38662)),l=i(11528),d=p(i(4671)),u=i(54497),c=p(i(84109)),h=i(84096);function p(e){return e&&e.__esModule?e:{default:e}}const g="fullScreen";class _ extends o.default{_init(){super._init(),this._onSelectionChanged=this._createActionByOption("onSelectionChanged"),this._onViewTypeChanged=this._createActionByOption("onViewTypeChanged"),this._onScroll=this._createActionByOption("onScroll"),this._onDialogShowing=this._createActionByOption("onDialogShowing"),this._onPopupMenuShowing=this._createActionByOption("onPopupMenuShowing"),this._onPopupMenuHiding=this._createActionByOption("onPopupMenuHiding"),this._expandAll=this._createActionByOption("onExpandAll"),this._collapseAll=this._createActionByOption("onCollapseAll"),this._taskClick=this._createActionByOption("onTaskClick"),this._taskDblClick=this._createActionByOption("onTaskDblClick"),this._onAdjustControl=this._createActionByOption("onAdjustControl")}_initMarkup(){const e=(0,a.getGanttViewCore)();this._ganttViewCore=new e(this.$element().get(0),this,{showResources:this.option("showResources"),showDependencies:this.option("showDependencies"),taskTitlePosition:this._getTaskTitlePosition(this.option("taskTitlePosition")),firstDayOfWeek:this._getFirstDayOfWeek(this.option("firstDayOfWeek")),allowSelectTask:this.option("allowSelection"),startDateRange:this.option("startDateRange"),endDateRange:this.option("endDateRange"),editing:this._parseEditingSettings(this.option("editing")),validation:this.option("validation"),stripLines:{stripLines:this.option("stripLines")},areHorizontalBordersEnabled:this.option("showRowLines"),areAlternateRowsEnabled:!1,viewType:this._getViewTypeByScaleType(this.option("scaleType")),viewTypeRange:this._parseViewTypeRangeSettings(this.option("scaleTypeRange")),cultureInfo:this._getCultureInfo(),taskTooltipContentTemplate:this.option("taskTooltipContentTemplate"),taskProgressTooltipContentTemplate:this.option("taskProgressTooltipContentTemplate"),taskTimeTooltipContentTemplate:this.option("taskTimeTooltipContentTemplate"),taskContentTemplate:this.option("taskContentTemplate"),sieve:this.option("sieve")}),this._selectTask(this.option("selectedRowKey")),this.updateBarItemsState();const t=this.option("visualState");t&&(this._restoreStateFrameId=(0,h.requestAnimationFrame)((()=>this._restoreVisualState(t))))}_dispose(){super._dispose(),(0,h.cancelAnimationFrame)(this._restoreStateFrameId)}_restoreVisualState(e){e[g]&&this._ganttViewCore.setFullScreenMode()}_getFirstDayOfWeek(e){return(0,l.isDefined)(e)?e:r.default.firstDayOfWeekIndex()}getTaskAreaContainer(){return this._ganttViewCore.getTaskAreaContainer()}getBarManager(){return this._ganttViewCore.barManager}executeCoreCommand(e){const t=this._ganttViewCore.getCommandByKey(e);t&&t.execute()}changeTaskExpanded(e,t){this._ganttViewCore.changeTaskExpanded(e,t)}updateView(){var e;null===(e=this._ganttViewCore)||void 0===e||e.updateView()}updateBarItemsState(){this._ganttViewCore.barManager.updateItemsState([])}setWidth(e){this._ganttViewCore.setWidth(e)}_onDimensionChanged(){this._ganttViewCore.onBrowserWindowResize()}_selectTask(e){this._ganttViewCore.selectTaskById(e)}_update(e){var t;null===(t=this._ganttViewCore)||void 0===t||t.updateWithDataReload(e)}_getCultureInfo(){return{monthNames:r.default.getMonthNames("wide"),dayNames:r.default.getDayNames("wide"),abbrMonthNames:r.default.getMonthNames("abbreviated"),abbrDayNames:r.default.getDayNames("abbreviated"),quarterNames:this._getQuarterNames(),amText:this._getAmText(),pmText:this._getPmText(),start:d.default.format("dxGantt-dialogStartTitle"),end:d.default.format("dxGantt-dialogEndTitle"),progress:d.default.format("dxGantt-dialogProgressTitle")}}_getAmText(){return this._hasAmPM()?r.default.getPeriodNames()[0]:""}_getPmText(){return this._hasAmPM()?r.default.getPeriodNames()[1]:""}_hasAmPM(){const e=new Date(Date.UTC(2012,11,12,3,0,0));return e.toLocaleTimeString(c.default.locale()).match(/am|pm/i)||e.toString().match(/am|pm/i)}_getQuarterNames(){const e=d.default.format("dxGantt-quarter");return e?[(0,u.format)(e,1),(0,u.format)(e,2),(0,u.format)(e,3),(0,u.format)(e,4)]:r.default.getQuarterNames()}_getTaskTitlePosition(e){switch(e){case"outside":return 1;case"none":return 2;default:return 0}}_getViewTypeByScaleType(e){switch(e){case"minutes":return 0;case"hours":return 1;case"sixHours":return 2;case"days":return 3;case"weeks":return 4;case"months":return 5;case"quarters":return 6;case"years":return 7;default:return}}_parseEditingSettings(e){return{enabled:e.enabled,allowDependencyDelete:e.allowDependencyDeleting,allowDependencyInsert:e.allowDependencyAdding,allowTaskDelete:e.allowTaskDeleting,allowTaskInsert:e.allowTaskAdding,allowTaskUpdate:e.allowTaskUpdating,allowResourceDelete:e.allowResourceDeleting,allowResourceInsert:e.allowResourceAdding,allowResourceUpdate:e.allowResourceUpdating,allowTaskResourceUpdate:e.allowTaskResourceUpdating}}_parseViewTypeRangeSettings(e){return{min:this._getViewTypeByScaleType(e.min),max:this._getViewTypeByScaleType(e.max)}}_optionChanged(e){switch(e.name){case"width":super._optionChanged(e),this._ganttViewCore.setWidth(e.value);break;case"height":this._ganttViewCore.setHeight(e.value);break;case"tasks":case"dependencies":case"resources":case"resourceAssignments":this._sieveOptions=void 0,this._update(!0);break;case"showResources":this._ganttViewCore.setShowResources(e.value);break;case"showDependencies":this._ganttViewCore.setShowDependencies(e.value);break;case"taskTitlePosition":this._ganttViewCore.setTaskTitlePosition(this._getTaskTitlePosition(e.value));break;case"firstDayOfWeek":this._ganttViewCore.setFirstDayOfWeek(this._getFirstDayOfWeek(e.value));break;case"startDateRange":this._ganttViewCore.setStartDateRange(e.value);break;case"endDateRange":this._ganttViewCore.setEndDateRange(e.value);break;case"allowSelection":this._ganttViewCore.setAllowSelection(e.value);break;case"selectedRowKey":this._selectTask(e.value);break;case"editing":this._ganttViewCore.setEditingSettings(this._parseEditingSettings(e.value));break;case"validation":this._ganttViewCore.setValidationSettings(e.value),this._update(!0);break;case"showRowLines":this._ganttViewCore.setRowLinesVisible(e.value);break;case"scaleType":this._ganttViewCore.setViewType(this._getViewTypeByScaleType(e.value));break;case"scaleTypeRange":this._ganttViewCore.setViewTypeRange(this._getViewTypeByScaleType(e.value.min),this._getViewTypeByScaleType(e.value.max));break;case"stripLines":this._ganttViewCore.setStripLines({stripLines:e.value});break;case"taskTooltipContentTemplate":this._ganttViewCore.setTaskTooltipContentTemplate(e.value);break;case"taskProgressTooltipContentTemplate":this._ganttViewCore.setTaskProgressTooltipContentTemplate(e.value);break;case"taskTimeTooltipContentTemplate":this._ganttViewCore.setTaskTimeTooltipContentTemplate(e.value);break;case"taskContentTemplate":this._ganttViewCore.setTaskContentTemplate(e.value);break;case"sieve":this._sortAndFilter(e.value);break;default:super._optionChanged(e)}}get bars(){return this.option("bars")}getRowHeight(){return this.option("rowHeight")}getHeaderHeight(){return this.option("headerHeight")}getGanttTasksData(){const e=this.option("tasks"),t=this.getSieveOptions();return null!=t&&t.sievedItems&&null!=t&&t.sieveColumn?t.sievedItems:e}_sortAndFilter(e){this._sieveOptions=e,this._update(!(null!=e&&e.expandTasks));const t=this.option("selectedRowKey");this._selectTask(t)}getSieveOptions(){return this._sieveOptions}getGanttDependenciesData(){return this.option("dependencies")}getGanttResourcesData(){return this.option("resources")}getGanttResourceAssignmentsData(){return this.option("resourceAssignments")}getGanttWorkTimeRules(){return null}getExternalTaskAreaContainer(e){return this._taskAreaContainer||(this._taskAreaContainer=new s.TaskAreaContainer(e,this)),this._taskAreaContainer}prepareExternalTaskAreaContainer(e,t){null!=t&&t.height&&this._taskAreaContainer._scrollView.option("height",t.height)}changeGanttTaskSelection(e,t){this._onSelectionChanged({id:e,selected:t})}onGanttScroll(e){this._onScroll({scrollTop:e})}showDialog(e,t,i,n){this._onDialogShowing({name:e,parameters:t,callback:i,afterClosing:n})}getModelChangesListener(){return this.option("modelChangesListener")}getExportInfo(){return this.option("exportInfo")}showPopupMenu(e){this._onPopupMenuShowing(e)}hidePopupMenu(e){this._onPopupMenuHiding(e)}getMainElement(){return this.option("mainElement").get(0)}adjustControl(){this._onAdjustControl()}getRequireFirstLoadParentAutoCalc(){return this.option("validation.autoUpdateParentTasks")}collapseAll(){this._collapseAll()}expandAll(){this._expandAll()}onTaskClick(e,t){return this._taskClick({key:e,event:t}),!0}onTaskDblClick(e,t){return this._taskDblClick({key:e,event:t})}onGanttViewContextMenu(e,t,i){return!0}getFormattedDateText(e){let t="";if(e){const i=r.default.format(e,"shortDate"),n=this._hasAmPM()?"hh:mm a":"HH:mm";t=i+" "+r.default.format(e,n)}return t}destroyTemplate(e){(0,n.default)(e).empty()}onTaskAreaSizeChanged(e){const t=this._taskAreaContainer._scrollView;if((0,l.isDefined)(null==e?void 0:e.height)){const i=(null==e?void 0:e.height)>this._taskAreaContainer.getHeight()?"both":"horizontal";t.option("direction",i)}}updateGanttViewType(e){this._onViewTypeChanged({type:e})}getTreeListTableStyle(){return this.callExportHelperMethod("getTreeListTableStyle")}getTreeListColCount(){return this.callExportHelperMethod("getTreeListColCount")}getTreeListHeaderInfo(e){return this.callExportHelperMethod("getTreeListHeaderInfo",e)}getTreeListCellInfo(e,t,i){return this.callExportHelperMethod("getTreeListCellInfo",i,t)}getTreeListEmptyDataCellInfo(){return this.callExportHelperMethod("getTreeListEmptyDataCellInfo")}callExportHelperMethod(e){const t=this.option("exportHelper");for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return t[e](...n)}applyTasksExpandedState(e){var t;null===(t=this._ganttViewCore)||void 0===t||t.applyTasksExpandedState(e)}getVisualStateToRestore(){var e,t;return{[g]:null===(e=this._ganttViewCore)||void 0===e||null===(t=e.isInFullScreenMode)||void 0===t?void 0:t.call(e)}}}t.GanttView=_},52891:function(e,t,i){t.default=void 0;var n,o=(n=i(16383))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},16802:function(e,t,i){t.default=void 0;var n,o=(n=i(4414))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},4414:function(e,t,i){t.default=void 0;var n,o=(n=i(44300))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},3121:function(e,t,i){t.default=void 0;var n,o=(n=i(80070))&&n.__esModule?n:{default:n};i(44804),i(14128),i(27721),i(79269),i(18928);t.default=o.default;e.exports=t.default,e.exports.default=t.default},80070:function(e,t,i){t.default=void 0;var n=o(i(21978));function o(e){return e&&e.__esModule?e:{default:e}}(0,o(i(92848)).default)("dxList",n.default);t.default=n.default;e.exports=t.default,e.exports.default=t.default},11979:function(e,t,i){t.default=void 0;var n,o=(n=i(52621))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},31876:function(e,t,i){t.default=void 0;var n,o=(n=i(14474))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},99203:function(e,t,i){t.default=void 0;var n,o=(n=i(67825))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},55211:function(e,t,i){t.default=void 0;var n,o=(n=i(16028))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},1614:function(e,t,i){t.default=void 0;var n,o=(n=i(54572))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},24150:function(e,t,i){t.default=void 0;var n,o=(n=i(95916))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},93380:function(e,t,i){t.default=void 0;var n,o=(n=i(93666))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},48042:function(e,t,i){t.default=void 0;var n,o=(n=i(42284))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},89132:function(e,t,i){t.default=void 0;var n,o=(n=i(68632))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},38389:function(e,t,i){t.default=void 0;var n=a(i(76988)),o=a(i(92848));function a(e){return e&&e.__esModule?e:{default:e}}t.default=n.default;(0,o.default)("dxPagination",n.default),e.exports=t.default,e.exports.default=t.default},49344:function(e,t,i){t.default=void 0;var n,o=(n=i(49406))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},55067:function(e,t,i){t.default=void 0;var n=i(87993);t.default=n.PivotGridDataSource;e.exports=t.default,e.exports.default=t.default},35982:function(e,t,i){t.default=void 0;var n=i(62989);t.default=n.FieldChooser;e.exports=t.default,e.exports.default=t.default},49406:function(e,t,i){t.default=void 0;var n=i(16508);t.default=n.PivotGrid;e.exports=t.default,e.exports.default=t.default},80445:function(e,t,i){t.default=void 0;var n=i(48063);t.default=n.XmlaStore;e.exports=t.default,e.exports.default=t.default},55633:function(e,t,i){t.default=void 0;var n,o=(n=i(35982))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},46184:function(e,t,i){t.default=void 0;var n,o=(n=i(82383))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},82383:function(e,t,i){t.default=void 0;var n,o=(n=i(22085))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},98894:function(e,t,i){t.default=void 0;var n,o=(n=i(7784))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},97643:function(e,t,i){t.default=void 0;var n,o=(n=i(92861))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},92861:function(e,t,i){t.default=void 0;var n,o=(n=i(53973))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},10720:function(e,t,i){t.default=void 0;var n,o=(n=i(43864))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},58436:function(e,t,i){t.default=void 0;var n,o=(n=i(74538))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},84798:function(e,t,i){t.default=void 0;var n,o=(n=i(60266))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},86657:function(e,t,i){t.default=void 0;var n,o=(n=i(49167))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},60266:function(e,t,i){t.default=void 0;var n,o=(n=i(72076))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},80790:function(e,t,i){t.default=void 0;var n,o=(n=i(49824))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},28416:function(e,t,i){t.default=void 0;var n,o=(n=i(27560))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},43597:function(e,t,i){t.default=void 0;var n,o=(n=i(33979))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},17636:function(e,t,i){t.default=void 0;var n,o=(n=i(21155))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},91374:function(e,t,i){t.default=void 0;var n,o=(n=i(97972))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},20876:function(e,t,i){t.default=void 0;var n,o=(n=i(94790))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},60695:function(e,t,i){t.default=void 0;var n,o=(n=i(30149))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},16191:function(e,t,i){t.hiddenFocus=function(e,t){v=!0,e.focus({preventScroll:t}),v=!1},t.registerKeyboardAction=function(e,t,i,s,r,d){if(t.option("useLegacyKeyboardNavigation"))return l.noop;const c=()=>(0,n.default)(t.element()),h=i=>function(e,t,i,n,o,s){const r=function(e,t,i){const n={event:t,handled:!1};i?i(n):e._createActionByOption("onKeyDown")(n);return n.handled}(t,i.originalEvent,s);if(r)return;const l=(0,a.normalizeKeyName)(i);"enter"===l||"space"===l?(y(i.target,t),n&&n({event:i})):"tab"===l?o.addClass(u):S(e,t,i)}(e,t,i,r,c(),d),p=()=>{m=!0,c().removeClass(u)},g=()=>{!m&&!v&&c().addClass(u),m=!1};return o.default.on(i,"keydown",s,h),o.default.on(i,"mousedown",s,p),o.default.on(i,"focusin",s,g),()=>{o.default.off(i,"keydown",s,h),o.default.off(i,"mousedown",s,p),o.default.off(i,"focusin",s,g)}},t.restoreFocus=function(e){if(!e.option("useLegacyKeyboardNavigation")&&C){const e=C.viewInstance;if(e){const t=b(C.ariaLabel,e.element()).eq(C.index);C=null,o.default.trigger(t,"focus")}}},t.saveFocusedElementInfo=y,t.selectView=S,t.setTabIndex=function(e,t){e.option("useLegacyKeyboardnavigation")||t.attr("tabindex",e.option("tabindex")||0)},t.subscribeVisibilityChange=function(){o.default.on(r.default.getDocument(),"visibilitychange",w)},t.unsubscribeVisibilityChange=function(){o.default.off(r.default.getDocument(),"visibilitychange",w)};var n=d(i(64553)),o=d(i(92774)),a=i(98834),s=i(52576),r=d(i(64960)),l=i(17781);function d(e){return e&&e.__esModule?e:{default:e}}const u="dx-state-focused",c="dx-cell-focus-disabled",h=".dx-datagrid-rowsview .dx-row",p=`${h} > td`,g=".dx-treelist-rowsview .dx-row",_=`${g} > td`,f={groupPanel:[".dx-datagrid-group-panel .dx-group-panel-item[tabindex]"],columnHeaders:[".dx-datagrid-headers .dx-header-row > td.dx-datagrid-action",".dx-treelist-headers .dx-header-row > td.dx-treelist-action"],filterRow:[".dx-datagrid-headers .dx-datagrid-filter-row .dx-editor-cell .dx-texteditor-input",".dx-treelist-headers .dx-treelist-filter-row .dx-editor-cell .dx-texteditor-input"],rowsView:[".dx-row-focused",`${h}[tabindex]`,`${p}[tabindex]`,`${p}`,`${g}[tabindex]`,`${_}[tabindex]`,`${_}`],footer:[".dx-datagrid-total-footer .dx-datagrid-summary-item",".dx-treelist-total-footer .dx-treelist-summary-item"],filterPanel:[".dx-datagrid-filter-panel .dx-icon-filter",".dx-treelist-filter-panel .dx-icon-filter"],pager:[".dx-datagrid-pager [tabindex]",".dx-treelist-pager [tabindex]"]};let m=!1,v=!1,C=null;function y(e,t){const i=(0,n.default)(e),o=i.attr("aria-label"),a=b(o,t.element()).index(i);C=(0,s.extend)({},{ariaLabel:o,index:a},{viewInstance:t})}function b(e,t){const i=(0,n.default)(t);let o;if(e){const t=null==e?void 0:e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');o=i.find(`[aria-label="${t}"][tabindex]`)}else o=i.find("[tabindex]");return o}function x(e,t){const i=(null==t?void 0:t.getRootNode())||r.default.getDocument();for(const t in e){const o=e[t],a=(0,n.default)(i).find(o).first();if(a.length)return a}}function w(){v="visible"===r.default.getDocument().visibilityState}function S(e,t,i){const n=(0,a.normalizeKeyName)(i);if(i.ctrlKey&&("upArrow"===n||"downArrow"===n)){const a=Object.keys(f);let s=a.indexOf(e);for(;s>=0&&s<a.length;){s="upArrow"===n?--s:++s;const e=a[s],r=x(f[e],i.target);if(r&&r.length){r.attr("tabindex",t.option("tabindex")||0),o.default.trigger(r,"focus"),r.removeClass(c);break}}}}},56417:function(e,t,i){t.default=void 0;var n=i(11528),o=i(21274);const a=["year","month","day"],s=["year","month","day","hour","minute"],r=function(e){return"date"===e||"datetime"===e},l=function(e){let t,i=[];const o=["year","month","day","hour","minute","second"],l=e.headerFilter&&e.headerFilter.groupInterval,d="quarter"===l?"month":l;return r(e.dataType)&&null!==l?(i="datetime"===e.dataType?s:a,t=o.indexOf(d),t>=0?(i=o.slice(0,t),i.push(l),i):i):(0,n.isDefined)(l)?Array.isArray(l)?l:[l]:void 0};t.default=function(){const e=function(e,t){let i=e.dataField||e.selector;return"search"===t&&(i=e.displayField||e.calculateDisplayValue||i),i},t=function(t,i){const o=this;let a,s,l;const d=e(o,i);if(Array.isArray(t)&&(0,n.isDefined)(t[0])&&(0,n.isDefined)(t[1]))return s=[d,">=",t[0]],l=[d,"<=",t[1]],r(o.dataType)&&(u=t[1]).getHours()+u.getMinutes()+u.getSeconds()+u.getMilliseconds()<1&&(a=new Date(t[1].getTime()),"date"===o.dataType&&a.setDate(t[1].getDate()+1),l=[d,"<",a]),[s,"and",l];var u},i=function(t,i,a){const s=this;let r,d,u;const c=(h=t,(0,n.isDate)(h)?[h.getFullYear(),h.getMonth(),h.getDate(),h.getHours(),h.getMinutes(),h.getSeconds()]:(0,o.map)((""+h).split("/"),(function(e,t){return 1===t?Number(e)-1:Number(e)})));var h;const p=e(s,a);switch("headerFilter"===a?u=l(s)[c.length-1]:"datetime"===s.dataType&&(u="minute"),u){case"year":r=new Date(c[0],0,1),d=new Date(c[0]+1,0,1);break;case"month":r=new Date(c[0],c[1],1),d=new Date(c[0],c[1]+1,1);break;case"quarter":r=new Date(c[0],3*c[1],1),d=new Date(c[0],3*c[1]+3,1);break;case"hour":r=new Date(c[0],c[1],c[2],c[3]),d=new Date(c[0],c[1],c[2],c[3]+1);break;case"minute":r=new Date(c[0],c[1],c[2],c[3],c[4]),d=new Date(c[0],c[1],c[2],c[3],c[4]+1);break;case"second":r=new Date(c[0],c[1],c[2],c[3],c[4],c[5]),d=new Date(c[0],c[1],c[2],c[3],c[4],c[5]+1);break;default:r=new Date(c[0],c[1],c[2]),d=new Date(c[0],c[1],c[2]+1)}switch(i){case"<":return[p,"<",r];case"<=":return[p,"<",d];case">":return[p,">=",d];case">=":return[p,">=",r];case"<>":return[[p,"<",r],"or",[p,">=",d]];default:return[[p,">=",r],"and",[p,"<",d]]}},a=function(t,i,o){const a=e(this,o),s=l(this);if("headerFilter"===o&&s&&(0,n.isDefined)(t)){const e=(""+t).split("/"),i=Number(e[e.length-1]);return[[a,">=",i],"and",[a,"<",i+s[e.length-1]]]}return[a,i||"=",t]};return{defaultCalculateFilterExpression:function(o,s,l){const d=this,u=e(d,l),c=d.calculateDisplayValue&&"search"===l,h=c&&d.lookup&&d.lookup.dataType||d.dataType;let p=null;if("headerFilter"!==l&&"filterBuilder"!==l||null!==o)if("string"!==h||d.lookup&&!c){if("between"===s)return t.apply(d,[o,l]);if(r(h)&&(0,n.isDefined)(o))return i.apply(d,arguments);if("number"===h)return a.apply(d,arguments);p=[u,s||"=",o]}else p=[u,s||"contains",o];else p=[u,s||"=",null],"string"===h&&(p=[p,"="===s?"or":"and",[u,s||"=",""]]);return p},getGroupInterval:l}}();e.exports=t.default,e.exports.default=t.default},87093:function(e,t,i){t.default=void 0;var n=g(i(64553)),o=g(i(92774)),a=i(11528),s=g(i(40216)),r=i(31e3),l=g(i(48314)),d=i(52576),u=g(i(65951)),c=i(61404),h=i(97169),p=i(98834);function g(e){return e&&e.__esModule?e:{default:e}}i(20780),i(48042),i(94319),i(60695),i(2739);const{isWrapped:_}=s.default,f=function(e,t){return(0,d.extend)(e,{readOnly:t.readOnly,placeholder:t.placeholder,inputAttr:{id:t.id,"aria-labelledby":t["aria-labelledby"]},tabIndex:t.tabIndex},t.editorOptions)},m=function(){return l.default.mozilla||u.default.real().ios},v=function(e){const t={},i=m(),s=e.sharedData||t;return f({placeholder:e.placeholder,width:e.width,value:e.value,onValueChanged:function(i){const n="filterRow"===e.parentType||"searchPanel"===e.parentType,o=i.event&&("input"===i.event.type||"keyup"===i.event.type),r=function(t,i){e&&e.setValue(t.value,i)};clearTimeout(t.valueChangeTimeout),o&&n?s.valueChangeTimeout=t.valueChangeTimeout=setTimeout((function(){r(i,t.valueChangeTimeout!==s.valueChangeTimeout)}),(0,a.isDefined)(e.updateValueTimeout)?e.updateValueTimeout:0):r(i)},onKeyDown:function(e){i&&"enter"===(0,p.normalizeKeyName)(e.event)&&o.default.trigger((0,n.default)(e.component._input()),"change")},valueChangeEvent:"change"+("filterRow"===e.parentType?" keyup input":"")},e)},C=function(e){e.editorName="dxDateBox",e.editorOptions=f({value:e.value,onValueChanged:function(t){e.setValue(t.value)},onKeyDown:function(e){let{component:t,event:i}=e;const n=t.option("useMaskBehavior");(m()||n)&&"enter"===(0,p.normalizeKeyName)(i)&&(t.blur(),t.focus())},displayFormat:e.format,type:e.dataType,dateSerializationFormat:null,width:"filterBuilder"===e.parentType?void 0:"auto"},e)},y=function(e){const t=v(e),i="searchPanel"===e.parentType;var n;e.editorType&&"dxTextBox"!==e.editorType?t.value=e.value:t.value=(n=e.value,(0,a.isDefined)(n)?n.toString():""),t.valueChangeEvent+=i?" keyup input search":"",t.mode=t.mode||(i?"search":"text"),e.editorName="dxTextBox",e.editorOptions=t},b=function(e){const t=v(e);t.value=(0,a.isDefined)(e.value)?e.value:null,e.editorName="dxNumberBox",e.editorOptions=t};function x(e){const t=e.lookup;let i,n,o;const s="filterRow"===e.parentType;if(t){i=(0,r.compileGetter)(t.displayExpr),n=t.dataSource,(0,a.isFunction)(n)&&!_(n)&&(n=n(e.row||{}),function(e){if(e.row&&e.row.watch&&"dataRow"===e.parentType){const t=e.editorOptions||{};let i;e.editorOptions=t;const n=t.onInitialized;let o;t.onInitialized=function(e){n&&n.apply(this,arguments),i=e.component,i.on("disposing",a)};const a=e.row.watch((()=>(o=e.lookup.dataSource(e.row),o&&o.filter)),(()=>{i.option("dataSource",o)}),(t=>{e.row=t}))}}(e)),((0,a.isObject)(n)||Array.isArray(n))&&(n=(0,h.normalizeDataSourceOptions)(n),s&&(o=n.postProcess,n.postProcess=function(e){return 0===this.pageIndex()&&(e=e.slice(0)).unshift(null),o?o.call(this,e):e}));const l=Boolean(t.allowClearing&&!s);e.editorName=e.editorType??"dxSelectBox",e.editorOptions=f({searchEnabled:!0,value:e.value,valueExpr:e.lookup.valueExpr,searchExpr:e.lookup.searchExpr||e.lookup.displayExpr,allowClearing:l,showClearButton:l,displayExpr:function(t){return null===t?e.showAllText:i(t)},dataSource:n,onValueChanged:function(t){const i=[t.value];!s&&i.push(t.component.option("text")),e.setValue.apply(this,i)}},e)}}function w(e){e.editorName="dxCheckBox",e.editorOptions=f({elementAttr:{id:e.id},value:(0,a.isDefined)(e.value)?e.value:void 0,hoverStateEnabled:!e.readOnly,focusStateEnabled:!e.readOnly,activeStateEnabled:!1,onValueChanged:function(t){e.setValue&&e.setValue(t.value,t)}},e)}const S=e=>{e.editorName=e.editorType,e.editorOptions=f({value:e.value,onValueChanged:function(t){e.setValue(t.value)}},e)},D=e=>{const t={dxDateBox:C,dxCheckBox:w,dxNumberBox:b,dxTextBox:y};if(e.lookup)x(e);else if(e.editorType)(t[e.editorType]??S)(e);else switch(e.dataType){case"date":case"datetime":C(e);break;case"boolean":!function(e){"filterRow"===e.parentType||"filterBuilder"===e.parentType?x((0,d.extend)(e,{lookup:{displayExpr:function(t){return!0===t?e.trueText||"true":!1===t?e.falseText||"false":void 0},dataSource:[!0,!1]}})):w(e)}(e);break;case"number":b(e);break;default:y(e)}};t.default=e=>class extends e{createEditor(e,t){t.cancel=!1,t.editorElement=(0,c.getPublicElement)(e),(0,a.isDefined)(t.tabIndex)||(t.tabIndex=this.option("tabIndex")),D(t),this.executeAction("onEditorPreparing",t),t.cancel||("dataRow"!==t.parentType||t.isOnForm||(0,a.isDefined)(t.editorOptions.showValidationMark)||(t.editorOptions.showValidationMark=!1),function(e,t){const i=(0,n.default)(t.editorElement);if(t.editorName&&t.editorOptions&&i[t.editorName]){if("dxCheckBox"!==t.editorName&&"dxSwitch"!==t.editorName||t.isOnForm||(i.addClass(e.addWidgetPrefix("checkbox-size")),i.parent().addClass("dx-editor-inline-block")),e._createComponent(i,t.editorName,t.editorOptions),"dxDateBox"===t.editorName){const e=i.dxDateBox("instance"),t=e._supportedKeys().enter;e.registerKeyHandler("enter",(i=>(e.option("opened")&&t(i),!0)))}"dxTextArea"===t.editorName&&i.dxTextArea("instance").registerKeyHandler("enter",(function(e){"enter"!==(0,p.normalizeKeyName)(e)||e.ctrlKey||e.shiftKey||e.stopPropagation()}))}}(this,t),this.executeAction("onEditorPrepared",t))}};e.exports=t.default,e.exports.default=t.default},56220:function(e,t,i){t.default=void 0;var n,o=(n=i(8532))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},95305:function(e,t,i){t.default=void 0;var n,o=(n=i(96334))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},67924:function(e,t,i){t.default=void 0;var n,o=(n=i(16616))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},92725:function(e,t,i){t.default=void 0;var n,o=(n=i(24251))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},78254:function(e,t,i){t.default=void 0;var n,o=(n=i(32364))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},47744:function(e,t,i){t.default=void 0;var n=c(i(64553)),o=c(i(11118)),a=c(i(64960)),s=c(i(92774)),r=c(i(89797)),l=i(3104),d=i(98834),u=c(i(19427));function c(e){return e&&e.__esModule?e:{default:e}}const h=(0,l.getWindow)(),p="dx-splitter-inactive",g="dx-splitter-initial",_="dx-state-disabled",f="dxSplitterResizing";class m extends o.default{_init(){super._init();const e=(new u.default).toString();this.SPLITTER_POINTER_DOWN_EVENT_NAME=(0,d.addNamespace)(r.default.down,f+e),this.SPLITTER_POINTER_MOVE_EVENT_NAME=(0,d.addNamespace)(r.default.move,f+e),this.SPLITTER_POINTER_UP_EVENT_NAME=(0,d.addNamespace)(r.default.up,f+e)}_initMarkup(){super._initMarkup(),this._initActions(),this._$container=this.option("container"),this._$leftElement=this.option("leftElement"),this._$rightElement=this.option("rightElement"),this.$element().addClass("dx-splitter-wrapper").addClass(g),this._$splitterBorder=(0,n.default)("<div>").addClass("dx-splitter-border").appendTo(this.$element()),this._$splitter=(0,n.default)("<div>").addClass("dx-splitter-bar").addClass(p).appendTo(this._$splitterBorder)}_initActions(){this._actions={onApplyPanelSize:this._createActionByOption("onApplyPanelSize"),onActiveStateChanged:this._createActionByOption("onActiveStateChanged")}}_render(){super._render(),this._detachEventHandlers(),this._attachEventHandlers()}_clean(){this._detachEventHandlers(),super._clean()}_attachEventHandlers(){const e=a.default.getDocument();s.default.on(this._$splitterBorder,this.SPLITTER_POINTER_DOWN_EVENT_NAME,this._onMouseDownHandler.bind(this)),s.default.on(e,this.SPLITTER_POINTER_MOVE_EVENT_NAME,this._onMouseMoveHandler.bind(this)),s.default.on(e,this.SPLITTER_POINTER_UP_EVENT_NAME,this._onMouseUpHandler.bind(this))}_detachEventHandlers(){const e=a.default.getDocument();s.default.off(this._$splitterBorder,this.SPLITTER_POINTER_DOWN_EVENT_NAME),s.default.off(e,this.SPLITTER_POINTER_MOVE_EVENT_NAME),s.default.off(e,this.SPLITTER_POINTER_UP_EVENT_NAME)}_dimensionChanged(e){e&&"height"===e||(this._containerWidth=this._$container.get(0).clientWidth,this._setSplitterPositionLeft({needUpdatePanels:!0,usePercentagePanelsWidth:!0}))}_onMouseDownHandler(e){e.preventDefault(),this._offsetX=e.pageX-this._$splitterBorder.offset().left<=this._getSplitterBorderWidth()?e.pageX-this._$splitterBorder.offset().left:0,this._containerWidth=this._$container.get(0).clientWidth,this.$element().removeClass(g),this._toggleActive(!0),this._setSplitterPositionLeft({needUpdatePanels:!0})}_onMouseMoveHandler(e){this._isSplitterActive&&this._setSplitterPositionLeft({splitterPositionLeft:this._getNewSplitterPositionLeft(e),needUpdatePanels:!0})}_onMouseUpHandler(){this._isSplitterActive&&(this._leftPanelPercentageWidth=null,this._toggleActive(!1),this._setSplitterPositionLeft({needUpdatePanels:!0,usePercentagePanelsWidth:!0}))}_getNewSplitterPositionLeft(e){let t=e.pageX-this._getContainerLeftOffset()-this._offsetX;return t=Math.max(0-this._getSplitterOffset(),t),t=Math.min(this._containerWidth-this._getSplitterOffset()-this._getSplitterWidth(),t),t}_getContainerLeftOffset(){let e=this._$container.offset().left;if(h){const t=h.getComputedStyle(this._$container.get(0));e+=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.borderLeftWidth)||0)}return e}_getSplitterOffset(){return(this._getSplitterBorderWidth()-this._getSplitterWidth())/2}_getSplitterWidth(){return this._$splitter.get(0).clientWidth}_getSplitterBorderWidth(){return this._$splitterBorder.get(0).clientWidth}_getLeftPanelWidth(){return this._$leftElement.get(0).clientWidth}getSplitterBorderElement(){return this._$splitterBorder}_toggleActive(e){this.$element().toggleClass(p,!e),this._$splitter.toggleClass(p,!e),this._isSplitterActive=e,this._actions.onActiveStateChanged({isActive:e})}toggleDisabled(e){this.$element().toggleClass(_,e),this._$splitter.toggleClass(_,e)}isSplitterMoved(){return!this.$element().hasClass(g)}disableSplitterCalculation(e){this._isSplitterCalculationDisabled=e}_setSplitterPositionLeft(){let{splitterPositionLeft:e=null,needUpdatePanels:t=!1,usePercentagePanelsWidth:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=e||this._getLeftPanelWidth()-this._getSplitterOffset();const n=e+this._getSplitterOffset(),o=this._containerWidth-n;this._isSplitterCalculationDisabled||this.$element().css("left",e),this._leftPanelPercentageWidth=this._leftPanelPercentageWidth||this._convertToPercentage(n);const a=this._convertToPercentage(this._containerWidth-this._convertToPixels(this._leftPanelPercentageWidth));t&&this._actions.onApplyPanelSize({leftPanelWidth:i?`${this._leftPanelPercentageWidth}%`:n,rightPanelWidth:i?`${a}%`:o})}_optionChanged(e){switch(e.name){case"initialLeftPanelWidth":this._leftPanelPercentageWidth=this._convertToPercentage(e.value),this._dimensionChanged();break;case"leftElement":this.repaint();break;case"onActiveStateChanged":case"onApplyPanelSize":this._actions[e.name]=this._createActionByOption(e.name);break;default:super._optionChanged(e)}}_convertToPercentage(e){return e/this._$container.get(0).clientWidth*100}_convertToPixels(e){return e/100*this._$container.get(0).clientWidth}}t.default=m,e.exports=t.default,e.exports.default=t.default},91029:function(e,t,i){t.default=void 0;var n,o=(n=i(94723))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},78175:function(e,t,i){t.default=void 0;var n,o=(n=i(1664))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},94385:function(e,t,i){t.default=void 0;var n,o=(n=i(11474))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},4575:function(e,t,i){t.default=void 0;var n,o=(n=i(24341))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},23116:function(e,t,i){t.default=void 0;var n,o=(n=i(36234))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},20780:function(e,t,i){t.default=void 0;var n,o=(n=i(20098))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},20098:function(e,t,i){t.default=void 0;var n,o=(n=i(85968))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},55790:function(e,t,i){t.default=void 0;var n,o=(n=i(37932))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},52071:function(e,t,i){t.attachCssClasses=H,t.current=V,t.default=void 0,t.detachCssClasses=N,t.init=B,t.initialized=J,t.isCompact=Z,t.isDark=K,t.isFluent=j,t.isGeneric=U,t.isMaterial=G,t.isMaterialBased=$,t.isPendingThemeLoaded=L,t.isWebFontLoaded=q,t.ready=z,t.resetTheme=Q,t.setDefaultTimeout=ee,t.waitForThemeLoad=R,t.waitWebFont=Y;var n=i(57653),o=_(i(65951)),a=_(i(64960)),s=_(i(64553)),r=i(87739),l=i(23563),d=i(21274),u=_(i(3122)),c=i(55355),h=i(3104),p=i(88737),g=_(i(35185));function _(e){return e&&e.__esModule?e:{default:e}}const f=(0,h.getWindow)(),m=u.default.add,v=c.value,C=c.changeCallback;let y=new r.Deferred;const b="link[rel=dx-theme]",x="data-theme",w="data-active",S="dx-hairlines",D="any";let I,E,T,A,O,P=15e3;const k="dx.";function M(){if(!(0,h.hasWindow)())return null;const e=(0,s.default)("<div>",I).addClass("dx-theme-marker").appendTo(I.documentElement);let t;try{return t=f.getComputedStyle(e.get(0)).fontFamily,t?(t=t.replace(/["']/g,""),t.substr(0,k.length)!==k?null:t.substr(k.length)):null}finally{e.remove()}}function R(e){let t,i,n=!0;function o(){O=null,clearInterval(i),n=!0,p.themeReadyCallback.fire(),p.themeReadyCallback.empty(),y.resolve()}if(O=e,L()||!P)o();else{if(!n)return void(O&&(O=e));t=Date.now(),n=!1,i=setInterval((function(){const e=L(),i=!e&&Date.now()-t>P;i&&g.default.log("W0004",O),(e||i)&&o()}),10)}}function L(){if(!O)return!0;const e=O===D;if("resolved"===y.state()&&e)return!0;const t=M();return!(!t||!e)||t===O}function B(e){(function(e){try{e!==I&&(T=null)}catch(e){T=null}I=e})((e=e||{}).context||a.default.getDocument()),I&&(!function(){const e=(0,s.default)(b,I);e.length&&(T={},E=(0,s.default)((0,l.parseHTML)("<link rel=stylesheet>"),I),e.each((function(){const e=(0,s.default)(this,I),t=e.attr(x),i=e.attr("href"),n="true"===e.attr(w);T[t]={url:i,isActive:n}})),e.last().after(E),e.remove())}(),A=void 0,V(e))}function V(e){if(!arguments.length)return A=A||M(),A;N(v()),"string"==typeof(e=e||{})&&(e={theme:e});const t=e._autoInit,i=e.loadCallback;let n;if(A=function(e){const t=e?e.split("."):[];let i=null;if(T){if(e in T)return e;(0,d.each)(T,(function(e,n){const o=e.split(".");if(!(t[0]&&o[0]!==t[0]||t[1]&&t[1]!==o[1]||t[2]&&t[2]!==o[2]))return i&&!n.isActive||(i=e),!n.isActive&&void 0}))}return i}(e.theme||A),A&&(n=T[A]),i&&p.themeReadyCallback.add(i),n)E.attr("href",T[A].url),(p.themeReadyCallback.has()||"resolved"!==y.state()||e._forceTimeout)&&R(A);else{if(!t)throw g.default.Error("E0021",A);(0,h.hasWindow)()&&R(D),p.themeReadyCallback.fire(),p.themeReadyCallback.empty()}y.done((()=>H((0,c.originalViewPort)(),A)))}let F;function H(e,t){F=function(e){const t=[],i=(e=e||V())&&e.split(".");return i&&(t.push("dx-theme-"+i[0],"dx-theme-"+i[0]+"-typography"),i.length>1&&t.push("dx-color-scheme-"+i[1]+($(e)?"-"+i[2]:""))),t}(t).join(" "),(0,s.default)(e).addClass(F);!function(){const t=(0,h.hasWindow)()&&f.devicePixelRatio;if(!t||t<2)return;const i=(0,s.default)("<div>");i.css("border",".5px solid transparent"),(0,s.default)("body").append(i),1===(0,n.getOuterHeight)(i)&&((0,s.default)(e).addClass(S),F+=" "+S),i.remove()}()}function N(e){(0,s.default)(e).removeClass(F)}function z(e){p.themeReadyCallback.add(e)}function W(e,t){return t||(t=A||M()),new RegExp(e).test(t)}function $(e){return G(e)||j(e)}function G(e){return W("material",e)}function j(e){return W("fluent",e)}function U(e){return W("generic",e)}function K(e){return W("dark",e)}function Z(e){return W("compact",e)}function q(e,t){const i=a.default.getDocument(),n=i.createElement("span");n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.style.visibility="hidden",n.style.fontFamily="Arial",n.style.fontSize="250px",n.style.fontWeight=t,n.innerHTML=e,i.body.appendChild(n);const o=n.offsetWidth;n.style.fontFamily="Roboto, RobotoFallback, Arial";const s=n.offsetWidth;return n.parentNode.removeChild(n),o!==s}function Y(e,t){return new Promise((i=>{const n=()=>{clearInterval(o),clearTimeout(a),i()},o=setInterval((()=>{q(e,t)&&n()}),15),a=setTimeout(n,2e3)}))}function X(){if(B({_autoInit:!0,_forceTimeout:!0}),(0,s.default)(b,I).length)throw g.default.Error("E0022")}function Q(){E&&E.attr("href","about:blank"),A=null,O=null,y=new r.Deferred}function J(e){y.done(e)}function ee(e){P=e}(0,h.hasWindow)()?X():m(X),C.add((function(e,t){y.done((function(){N(t),H(e)}))})),o.default.changed.add((function(){B({_autoInit:!0})}));t.default={setDefaultTimeout:ee,initialized:J,resetTheme:Q,ready:z,waitWebFont:Y,isWebFontLoaded:q,isCompact:Z,isDark:K,isGeneric:U,isMaterial:G,isFluent:j,isMaterialBased:$,detachCssClasses:N,attachCssClasses:H,current:V,waitForThemeLoad:R,isPendingThemeLoaded:L}},88737:function(e,t,i){t.themeReadyCallback=void 0;var n,o=(n=i(84718))&&n.__esModule?n:{default:n};t.themeReadyCallback=(0,o.default)()},96993:function(e,t,i){t.default=void 0;var n,o=(n=i(9635))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},36574:function(e,t,i){t.default=void 0;var n,o=(n=i(11100))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},41792:function(e,t,i){t.default=void 0;var n,o=(n=i(57250))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},2850:function(e,t,i){t.default=void 0;var n,o=(n=i(8062))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},21667:function(e,t,i){t.default=void 0;var n,o=(n=i(30577))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},8062:function(e,t,i){t.default=void 0;var n,o=(n=i(56044))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},93370:function(e,t,i){t.default=void 0;var n,o=(n=i(3504))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},76256:function(e,t,i){t.default=void 0;var n,o=(n=i(37062))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},21872:function(e,t,i){t.default=void 0;var n,o=(n=i(62514))&&n.__esModule?n:{default:n};i(35551);t.default=o.default;e.exports=t.default,e.exports.default=t.default},35551:function(e,t,i){t.default=void 0;var n,o=(n=i(7444))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},4313:function(e,t,i){t.default=void 0;var n,o=(n=i(66592))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},19391:function(e,t,i){t.default=void 0;var n,o=(n=i(79697))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},16390:function(e,t,i){t.default=void 0;var n,o=(n=i(89172))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},59098:function(e,t,i){t.default=void 0;var n,o=(n=i(22864))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},10585:function(e,t,i){t.default=void 0;var n,o=(n=i(31139))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},71775:function(e,t,i){t.default=void 0;var n,o=(n=i(71449))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},35944:function(e,t,i){t.tabbable=t.focused=t.focusable=void 0;var n=a(i(64553)),o=a(i(64960));function a(e){return e&&e.__esModule?e:{default:e}}const s=function(e,t){if(!function(e){const t=(0,n.default)(e);return t.is(":visible")&&"hidden"!==t.css("visibility")&&"hidden"!==t.parents().css("visibility")}(e))return!1;const i=e.nodeName.toLowerCase(),o=!isNaN(t),a=e.disabled,s=/^(input|select|textarea|button|object|iframe)$/.test(i),r="a"===i;let l;const d=e.isContentEditable;return l=s||d?!a:r&&e.href||o,l};t.focusable=function(e,t){return s(t,(0,n.default)(t).attr("tabIndex"))};t.tabbable=function(e,t){const i=(0,n.default)(t).attr("tabIndex");return(isNaN(i)||i>=0)&&s(t,i)};t.focused=function(e){const t=(0,n.default)(e).get(0);return o.default.getActiveElement(t)===t}},5080:function(e,t,i){t.default=void 0;var n,o=(n=i(64553))&&n.__esModule?n:{default:n},a=i(55355);const s="dx-swatch-";t.default={getSwatchContainer:e=>{const t=(0,o.default)(e).closest(`[class^="${s}"], [class*=" ${s}"]`),i=(0,a.value)();if(!t.length)return i;const n=new RegExp(`(\\s|^)(${s}.*?)(\\s|$)`),r=t[0].className.match(n)[2];let l=i.children("."+r);return l.length||(l=(0,o.default)("<div>").addClass(r).appendTo(i)),l}};e.exports=t.default,e.exports.default=t.default},35185:function(e,t,i){t.default=void 0;var n=a(i(67264)),o=a(i(87129));function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,n.default)(o.default.ERROR_MESSAGES,{E1001:"Module '{0}'. Controller '{1}' is already registered",E1002:"Module '{0}'. Controller '{1}' does not inherit from DevExpress.ui.dxDataGrid.Controller",E1003:"Module '{0}'. View '{1}' is already registered",E1004:"Module '{0}'. View '{1}' does not inherit from DevExpress.ui.dxDataGrid.View",E1005:"Public method '{0}' is already registered",E1006:"Public method '{0}.{1}' does not exist",E1007:"State storing cannot be provided due to the restrictions of the browser",E1010:"The template does not contain the TextBox widget",E1011:'Items cannot be deleted from the List. Implement the "remove" function in the data store',E1012:"Editing type '{0}' with the name '{1}' is unsupported",E1016:"Unexpected type of data source is provided for a lookup column",E1018:"The 'collapseAll' method cannot be called if you use a remote data source",E1019:"Search mode '{0}' is unavailable",E1020:"The type cannot be changed after initialization",E1021:"{0} '{1}' you are trying to remove does not exist",E1022:'The "markers" option is given an invalid value. Assign an array instead',E1023:'The "routes" option is given an invalid value. Assign an array instead',E1025:"This layout is too complex to render",E1026:'The "calculateCustomSummary" function is missing from a field whose "summaryType" option is set to "custom"',E1031:"Unknown subscription in the Scheduler widget: '{0}'",E1032:"Unknown start date in an appointment: '{0}'",E1033:"Unknown step in the date navigator: '{0}'",E1034:"The browser does not implement an API for saving files",E1035:"The editor cannot be created: {0}",E1037:"Invalid structure of grouped data",E1038:"The browser does not support local storages for local web pages",E1039:"A cell's position cannot be calculated",E1040:"The '{0}' key value is not unique within the data array",E1041:"The '{0}' script is referenced after the DevExtreme scripts or not referenced at all",E1042:"{0} requires the key field to be specified",E1043:"Changes cannot be processed due to the incorrectly set key",E1044:"The key field specified by the keyExpr option does not match the key field specified in the data store",E1045:"Editing requires the key field to be specified in the data store",E1046:"The '{0}' key field is not found in data objects",E1047:'The "{0}" field is not found in the fields array',E1048:'The "{0}" operation is not found in the filterOperations array',E1049:"Column '{0}': filtering is allowed but the 'dataField' or 'name' option is not specified",E1050:"The validationRules option does not apply to third-party editors defined in the editCellTemplate",E1052:'{0} should have the "dataSource" option specified',E1053:'The "buttons" option accepts an array that contains only objects or string values',E1054:"All text editor buttons must have names",E1055:'One or several text editor buttons have invalid or non-unique "name" values',E1056:'The {0} widget does not support buttons of the "{1}" type',E1058:'The "startDayHour" and "endDayHour" options must be integers in the [0, 24] range, with "endDayHour" being greater than "startDayHour".',E1059:"The following column names are not unique: {0}",E1060:"All editable columns must have names",E1061:'The "offset" option must be an integer in the [-1440, 1440] range, divisible by 5 without a remainder.',E1062:'The "cellDuration" must be a positive integer, evenly dividing the ("endDayHour" - "startDayHour") interval into minutes.',W1001:'The "key" option cannot be modified after initialization',W1002:"An item with the key '{0}' does not exist",W1003:"A group with the key '{0}' in which you are trying to select items does not exist",W1004:"The item '{0}' you are trying to select in the group '{1}' does not exist",W1005:"Due to column data types being unspecified, data has been loaded twice in order to apply initial filter settings. To resolve this issue, specify data types for all grid columns.",W1006:"The map service returned the following error: '{0}'",W1007:"No item with key {0} was found in the data source, but this key was used as the parent key for item {1}",W1008:"Cannot scroll to the '{0}' date because it does not exist on the current view",W1009:"Searching works only if data is specified using the dataSource option",W1010:"The capability to select all items works with source data of plain structure only",W1011:'The "keyExpr" option is not applied when dataSource is not an array',W1012:"The '{0}' key field is not found in data objects",W1013:'The "message" field in the dialog component was renamed to "messageHtml". Change your code correspondingly. In addition, if you used HTML code in the message, make sure that it is secure',W1014:"The Floating Action Button exceeds the recommended speed dial action count. If you need to display more speed dial actions, increase the maxSpeedDialActionCount option value in the global config.",W1016:"The '{0}' field in the HTML Editor toolbar item configuration was renamed to '{1}'. Please make a corresponding change in your code.",W1017:"The 'key' property is not specified for a lookup data source. Please specify it to prevent requests for the entire dataset when users filter data.",W1018:"Infinite scrolling may not work properly with multiple selection. To use these features together, set 'selection.deferred' to true or set 'selection.selectAllMode' to 'page'.",W1019:"Filter query string exceeds maximum length limit of {0} characters.",W1020:"hideEvent is ignored when the shading property is true",W1021:"The '{0}' is not rendered because none of the DOM elements match the value of the \"container\" property.",W1022:"{0} JSON parsing error: '{1}'",W1023:"Appointments require unique keys. Otherwise, the agenda view may not work correctly.",W1024:"The client-side export is enabled. Implement the 'onExporting' function.",W1025:"'scrolling.mode' is set to 'virtual' or 'infinite'. Specify the height of the component."});e.exports=t.default,e.exports.default=t.default},44690:function(e,t,i){t.default=void 0;var n=l(i(64553)),o=i(52576),a=l(i(4671)),s=l(i(35185)),r=i(87739);function l(e){return e&&e.__esModule?e:{default:e}}let d=(0,i(45479).stubComponent)("TextBox");t.default={_getDefaultOptions:function(){return(0,o.extend)(this.callBase(),{searchMode:"",searchExpr:null,searchValue:"",searchEnabled:!1,searchEditorOptions:{}})},_initMarkup:function(){this._renderSearch(),this.callBase()},_renderSearch:function(){const e=this.$element(),t=this.option("searchEnabled"),i=this._addWidgetPrefix("search"),o=this._addWidgetPrefix("with-search");if(!t)return e.removeClass(o),void this._removeSearchBox();const a=this._getSearchEditorOptions();this._searchEditor?this._searchEditor.option(a):(e.addClass(o),this._$searchEditorElement=(0,n.default)("<div>").addClass(i).prependTo(e),this._searchEditor=this._createComponent(this._$searchEditorElement,d,a))},_removeSearchBox:function(){this._$searchEditorElement&&this._$searchEditorElement.remove(),delete this._$searchEditorElement,delete this._searchEditor},_getSearchEditorOptions:function(){const e=this,t=e.option("searchEditorOptions"),i=a.default.format("Search");return(0,o.extend)({mode:"search",placeholder:i,tabIndex:e.option("tabIndex"),value:e.option("searchValue"),valueChangeEvent:"input",inputAttr:{"aria-label":i},onValueChanged:function(t){const i=e.option("searchTimeout");e._valueChangeDeferred=new r.Deferred,clearTimeout(e._valueChangeTimeout),e._valueChangeDeferred.done(function(){this.option("searchValue",t.value)}.bind(e)),t.event&&"input"===t.event.type&&i?e._valueChangeTimeout=setTimeout((function(){e._valueChangeDeferred.resolve()}),i):e._valueChangeDeferred.resolve()}},t)},_getAriaTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.callBase()},_focusTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.callBase()},_updateFocusState:function(e,t){this.option("searchEnabled")&&this._toggleFocusClass(t,this.$element()),this.callBase(e,t)},getOperationBySearchMode:function(e){return"equals"===e?"=":e},_optionChanged:function(e){switch(e.name){case"searchEnabled":case"searchEditorOptions":this._invalidate();break;case"searchExpr":case"searchMode":case"searchValue":if(!this._dataSource)return void s.default.log("W1009");"searchMode"===e.name?this._dataSource.searchOperation(this.getOperationBySearchMode(e.value)):this._dataSource[e.name](e.value),this._dataSource.load();break;case"searchTimeout":break;default:this.callBase(e)}},focus:function(){this.option("focusedElement")||!this.option("searchEnabled")?this.callBase():this._searchEditor&&this._searchEditor.focus()},_cleanAria:function(){const e=this.$element();this.setAria({role:null,activedescendant:null},e),e.attr("tabIndex",null)},_clean(){this.callBase(),this._cleanAria()},_refresh:function(){this._valueChangeDeferred&&this._valueChangeDeferred.resolve(),this.callBase()},setEditorClass:function(e){d=e}};e.exports=t.default,e.exports.default=t.default},11118:function(e,t,i){t.default=void 0;var n,o=(n=i(89275))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},63322:function(e,t,i){t.hideWave=v,t.render=t.initConfig=void 0,t.showWave=g;var n,o=i(57653),a=(n=i(64553))&&n.__esModule?n:{default:n};const s="dx-inkripple",r="dx-inkripple-wave",l="dx-inkripple-showing",d="dx-inkripple-hiding",u=0,c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{useHoldAnimation:t,waveSizeCoefficient:i,isCentered:n,wavesNumber:o}=e;return{waveSizeCoefficient:i||2,isCentered:n||!1,wavesNumber:o||1,durations:f(t??!0)}};t.initConfig=c;t.render=function(e){const t=c(e);return{showWave:g.bind(this,t),hideWave:v.bind(this,t)}};const h=function(e,t){const i=function(e){let t=e.children("."+s);return 0===t.length&&(t=(0,a.default)("<div>").addClass(s).appendTo(e)),t}((0,a.default)(e)),n=i.children("."+r).toArray();for(let e=n.length;e<t;e++){const e=(0,a.default)("<div>").appendTo(i).addClass(r);n.push(e[0])}return(0,a.default)(n)},p=function(e,t){const i=(0,a.default)(t.element),n=(0,o.getOuterWidth)(i),s=(0,o.getOuterHeight)(i),r=parseInt(Math.sqrt(n*n+s*s)),l=Math.min(4e3,parseInt(r*e.waveSizeCoefficient));let d,u;if(e.isCentered)d=(n-l)/2,u=(s-l)/2;else{const e=t.event,n=i.offset();d=e.pageX-n.left-l/2,u=e.pageY-n.top-l/2}return{left:d,top:u,height:l,width:l}};function g(e,t){const i=h(t.element,e.wavesNumber).eq(t.wave||u);e.hidingTimeout&&clearTimeout(e.hidingTimeout),m(i),i.css(p(e,t)),e.showingTimeout=setTimeout(_.bind(this,e,i),0)}function _(e,t){const i=e.durations.showingScale+"ms";t.addClass(l).css("transitionDuration",i)}function f(e){return{showingScale:e?1e3:300,hidingScale:300,hidingOpacity:300}}function m(e){e.removeClass(d).css("transitionDuration","")}function v(e,t){e.showingTimeout&&clearTimeout(e.showingTimeout);const i=h(t.element,t.wavesNumber).eq(t.wave||u),n=e.durations,o=n.hidingScale+"ms, "+n.hidingOpacity+"ms";i.addClass(d).removeClass(l).css("transitionDuration",o);const a=Math.max(n.hidingScale,n.hidingOpacity);e.hidingTimeout=setTimeout(m.bind(this,i),a)}},63885:function(e,t,i){t.default=void 0;var n=i(28779);t.default={logarithmic:"logarithmic",discrete:"discrete",numeric:"numeric",left:"left",right:"right",top:"top",bottom:"bottom",center:"center",horizontal:"horizontal",vertical:"vertical",convertTicksToValues:function(e){return(0,n.map)(e||[],(function(e){return e.value}))},validateOverlappingMode:function(e){return"ignore"===e||"none"===e?e:"hide"},getTicksCountInRange:function(e,t,i){let n=1;if(e.length>1)for(;n<e.length&&!(Math.abs(e[n].coords[t]-e[0].coords[t])>=i);n++);return n},areLabelsOverlap:function(e,t,i,n){const o=e.x>t.x,a=e.y>t.y;let s=e.x,r=t.x;const l=e.width,d=t.width;"left"===n?(s+=l/2,r+=d/2):"right"===n&&(s-=l/2,r-=d/2);const u=o?r+d+i>s:s+l+i>r,c=a?t.y+t.height>e.y:e.y+e.height>t.y;return u&&c}};e.exports=t.default,e.exports.default=t.default},86017:function(e,t){t.measureLabels=t.calculateCanvasMargins=void 0;const i=Math.max;t.calculateCanvasMargins=function(e,t){const n=t.left,o=t.top,a=t.width-t.right,s=t.height-t.bottom;return e.reduce((function(e,t){return!t||t.isEmpty?e:{left:i(e.left,n-t.x),top:i(e.top,o-t.y),right:i(e.right,t.x+t.width-a),bottom:i(e.bottom,t.y+t.height-s)}}),{left:0,right:0,top:0,bottom:0})};t.measureLabels=function(e){e.forEach((function(e){const t=e.getContentContainer();e.labelBBox=t?t.getBBox():{x:0,y:0,width:0,height:0}}))}},99091:function(e,t,i){t.Axis=void 0;var n=i(38528),o=i(28779),a=i(11528),s=D(i(63885)),r=i(52576),l=D(i(2082)),d=i(60976),u=i(64449),c=i(64174),h=i(99857),p=i(99043),g=i(50254),_=D(i(87129)),f=D(i(41380)),m=i(17781),v=D(i(9441)),C=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=S(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(75014)),y=D(i(21259)),b=D(i(38922)),x=i(87739),w=i(86017);function S(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(S=function(e){return e?i:t})(e)}function D(e){return e&&e.__esModule?e:{default:e}}const I=s.default.convertTicksToValues,E=Math,T=E.abs,A=E.max,O=E.min,P=Array.isArray,k=s.default.top,M=s.default.bottom,R=s.default.left,L=s.default.right,B=s.default.center,V="keep",F="shift",H="reset",N="rotate",z=864e5,W=6048e5;function $(e,t,i,n,o,a){var s;let{allowNegatives:r,linearThreshold:l}=a;return(0,u.tickGenerator)({axisType:e.type,dataType:e.dataType,logBase:e.logarithmBase,allowNegatives:r,linearThreshold:l,axisDivisionFactor:o(e.axisDivisionFactor||50),minorAxisDivisionFactor:o(e.minorAxisDivisionFactor||15),numberMultipliers:e.numberMultipliers,calculateMinors:e.minorTick.visible||e.minorGrid.visible||e.calculateMinors,allowDecimals:e.allowDecimals,endOnTick:e.endOnTick,incidentOccurred:t,firstDayOfWeek:null===(s=e.workWeek)||void 0===s?void 0:s[0],skipTickGeneration:i,skipCalculationLimits:e.skipCalculationLimits,generateExtraTick:e.generateExtraTick,minTickInterval:e.minTickInterval,rangeIsEmpty:n})}function G(e,t,i){const n=e.getOptions();return(0,p.tick)(e,t,n.tick,n.grid,i,!1)}function j(e,t){const i=e.getOptions();return(0,p.tick)(e,t,i.minorTick,i.minorGrid)}function U(e,t,i){const n=e.getOptions();return(0,p.tick)(e,t,(0,r.extend)({},n.tick,{visible:n.showCustomBoundaryTicks}),n.grid,void 0,!1,i?-1:1)}function K(e,t,i,n){(e||[]).forEach((e=>e[t](i,n)))}function Z(e){K(e,"initCoords")}function q(e,t){K(e,"drawMark",t)}function Y(e,t){K(e,"drawGrid",t)}function X(e,t,i){K(e,"updateTickPosition",t,i)}function Q(e,t){K(e,"updateGridPosition",t)}function J(e){let t=e.length-1;for(;t>=0&&ee(e,t);t--);for(t=0;t<e.length&&ee(e,t);t++)t--}function ee(e,t){return(null===e[t].coords.x||null===e[t].coords.y)&&(e.splice(t,1),!0)}function te(e,t){return 180*E.asin((e[0].height+t.minSpacing)/(e[1].x-e[0].x))/E.PI<45?-45:-90}function ie(e,t,i){e.forEach((function(e,n){e.getContentContainer()&&(n%t!=0?e.removeLabel():i&&i(e,n))}))}function ne(e,t){return void 0===e?t:null===e?void 0:e}const oe=function(e){const t=this;t._renderer=e.renderer,t._incidentOccurred=e.incidentOccurred,t._eventTrigger=e.eventTrigger,t._stripsGroup=e.stripsGroup,t._stripLabelAxesGroup=e.stripLabelAxesGroup,t._labelsAxesGroup=e.labelsAxesGroup,t._constantLinesGroup=e.constantLinesGroup,t._scaleBreaksGroup=e.scaleBreaksGroup,t._axesContainerGroup=e.axesContainerGroup,t._gridContainerGroup=e.gridGroup,t._axisCssPrefix=e.widgetClass+"-"+(e.axisClass?e.axisClass+"-":""),t._setType(e.axisType,e.drawingType),t._createAxisGroups(),t._translator=t._createTranslator(),t.isArgumentAxis=e.isArgumentAxis,t._viewport={},t._prevDataInfo={},t._firstDrawing=!0,t._initRange={},t._getTemplate=e.getTemplate};t.Axis=oe,oe.prototype={constructor:oe,_drawAxis(){const e=this._options;e.visible&&(this._axisElement=this._createAxisElement(),this._updateAxisElementPosition(),this._axisElement.attr({"stroke-width":e.width,stroke:e.color,"stroke-opacity":e.opacity}).sharp(this._getSharpParam(!0),this.getAxisSharpDirection()).append(this._axisLineGroup))},_createPathElement(e,t,i){return this.sharp(this._renderer.path(e,"line").attr(t),i)},sharp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.sharp(this._getSharpParam(),t)},customPositionIsAvailable:()=>!1,getOrthogonalAxis:m.noop,getCustomPosition:m.noop,getCustomBoundaryPosition:m.noop,resolveOverlappingForCustomPositioning:m.noop,hasNonBoundaryPosition:()=>!1,customPositionIsBoundaryOrthogonalAxis:()=>!1,getResolvedBoundaryPosition(){return this.getOptions().position},getAxisSharpDirection(){const e=this.getResolvedBoundaryPosition();return this.hasNonBoundaryPosition()||e!==M&&e!==L?1:-1},getSharpDirectionByCoords(e){const t=this._getCanvasStartEnd(),i=Math.max(t.start,t.end);return this.getRadius?0:i!==e[this._isHorizontal?"x":"y"]?1:-1},_getGridLineDrawer:function(){const e=this;return function(t,i){const n=e._getGridPoints(t.coords);return n.points?e._createPathElement(n.points,i,e.getSharpDirectionByCoords(t.coords)):null}},_getGridPoints:function(e){const t=this,i=this._isHorizontal,n=i?"x":"y",o=this._orthogonalPositions,a=o.start,s=o.end,r=t.borderOptions,l=i?R:k,d=i?L:M,u=t.getCanvas(),c={left:u.left,right:u.width-u.right,top:u.top,bottom:u.height-u.bottom},h=4+(r.visible&&r[l]?c[l]:void 0),p=(r.visible&&r[d]?c[d]:void 0)-4;return t.areCoordsOutsideAxis(e)||void 0===e[n]||e[n]<h||e[n]>p?{points:null}:{points:i?null!==e[n]?[e[n],a,e[n],s]:null:null!==e[n]?[a,e[n],s,e[n]]:null}},_getConstantLinePos:function(e,t,i){const n=this._getTranslatedCoord(e);if(!(!(0,a.isDefined)(n)||n<O(t,i)||n>A(t,i)))return n},_getConstantLineGraphicAttributes:function(e){const t=this._orthogonalPositions.start,i=this._orthogonalPositions.end;return{points:this._isHorizontal?[e,t,e,i]:[t,e,i,e]}},_createConstantLine:function(e,t){return this._createPathElement(this._getConstantLineGraphicAttributes(e).points,t,(i=e,n=this._getCanvasStartEnd(),Math.max(n.start,n.end)!==i?1:-1));var i,n},_drawConstantLineLabelText:function(e,t,i,n,a){let{font:s,cssClass:l}=n;return this._renderer.text(e,t,i).css((0,o.patchFontOptions)((0,r.extend)({},this._options.label.font,s))).attr({align:"center",class:l}).append(a)},_drawConstantLineLabels:function(e,t,i,n){const o=this;let a=t.text;const s=o._options.label;o._checkAlignmentConstantLineLabels(t),a=a??o.formatLabel(e,s);const r=o._getConstantLineLabelsCoords(i,t);return o._drawConstantLineLabelText(a,r.x,r.y,t,n)},_getStripPos:function(e,t,i,n,o){const s=!(!o.minVisible&&!o.maxVisible),r=(o.categories||[]).reduce((function(e,t){return e.push(t.valueOf()),e}),[]);let l,d,u,c,h;if(!s&&(0,a.isDefined)(e)&&(0,a.isDefined)(t)){const i=this.parser(e),n=this.parser(t);if(c=r.indexOf((null==i?void 0:i.valueOf())??void 0),h=r.indexOf((null==n?void 0:n.valueOf())??void 0),-1===c||-1===h)return{from:0,to:0,outOfCanvas:!0};c>h&&(u=t,t=e,e=u)}(0,a.isDefined)(e)?(e=this.validateUnit(e,"E2105","strip"),l=this._getTranslatedCoord(e,-1)):l=i,(0,a.isDefined)(t)?(t=this.validateUnit(t,"E2105","strip"),d=this._getTranslatedCoord(t,1)):d=n;const p=l<d?{from:l,to:d}:{from:d,to:l},g=this.getVisibleArea();return(p.from<=g[0]&&p.to<=g[0]||p.from>=g[1]&&p.to>=g[1])&&(p.outOfCanvas=!0),p},_getStripGraphicAttributes:function(e,t){let i,n,o,a;const s=this._orthogonalPositions,r=s.start,l=s.end;return this._isHorizontal?(i=e,n=O(r,l),o=t-e,a=T(r-l)):(i=O(r,l),n=e,o=T(r-l),a=T(e-t)),{x:i,y:n,width:o,height:a}},_createStrip:function(e){return this._renderer.rect(e.x,e.y,e.width,e.height)},_adjustStripLabels:function(){const e=this;this._strips.forEach((function(t){t.label&&t.label.attr(e._getAdjustedStripLabelCoords(t))}))},_adjustLabelsCoord(e,t,i){const n=n=>this._getLabelAdjustedCoord(n,e+(n.labelOffset||0),t,i);this._majorTicks.forEach((function(e){e.label?(e.updateMultilineTextAlignment(),e.label.attr(n(e))):e.templateContainer&&e.templateContainer.attr(n(e))}))},_adjustLabels:function(e){const t=this,i=t.getOptions(),n=i.position===i.label.position,a=t._majorTicks.reduce((function(e,t){if(!t.getContentContainer())return e;const i=t.labelRotationAngle?(0,o.rotateBBox)(t.labelBBox,[t.labelCoords.x,t.labelCoords.y],-t.labelRotationAngle):t.labelBBox;return{width:A(e.width||0,i.width),height:A(e.height||0,i.height),offset:A(e.offset||0,t.labelOffset||0)}}),{}),s=n?t._isHorizontal?a.height:a.width:0;return t._adjustLabelsCoord(e,a.width),e+s+(s&&t._options.label.indentFromAxis)+(n?a.offset:0)},_getLabelAdjustedCoord:function(e,t,i){t=t||0;const n=this,a=n._options,s=e.templateContainer&&e.templateContainer.getBBox()||(0,o.rotateBBox)(e.labelBBox,[e.labelCoords.x,e.labelCoords.y],-e.labelRotationAngle||0),r=e.labelAlignment||a.label.alignment,l="discrete"===n._options.type,d=e.labelRotationAngle%90==0,u=a.label.indentFromAxis,c=a.label.position,h=n._axisPosition,p=e.labelCoords,g=p.x;let _,f;return n._isHorizontal?(f=c===M?h+u-s.y+t:h-u-(s.y+s.height)-t,_=r===L?l&&d?e.coords.x-(s.x+s.width):g-s.x-s.width:r===R?l&&d?g-s.x-(e.coords.x-g):g-s.x:g-s.x-s.width/2):(f=p.y-s.y-s.height/2,c===R?(_=r===R?h-u-i-s.x:r===B?h-u-i/2-s.x-s.width/2:h-u-s.x-s.width,_-=t):(_=r===L?h+u+i-s.x-s.width:r===B?h+u+i/2-s.x-s.width/2:h+u-s.x,_+=t)),{translateX:_,translateY:f}},_createAxisConstantLineGroups:function(){const e=this._renderer,t=this._axisCssPrefix+"constant-lines",i=e.g().attr({class:t}),n=e.g().attr({class:t}),o=e.g().attr({class:t});return{inside:i,outside1:n,left:n,top:n,outside2:o,right:o,bottom:o,remove:function(){this.inside.remove(),this.outside1.remove(),this.outside2.remove()},clear:function(){this.inside.clear(),this.outside1.clear(),this.outside2.clear()}}},_createAxisGroups:function(){const e=this,t=e._renderer,i=e._axisCssPrefix;e._axisGroup=t.g().attr({class:i+"axis"}).enableLinks(),e._axisStripGroup=t.g().attr({class:i+"strips"}),e._axisGridGroup=t.g().attr({class:i+"grid"}),e._axisElementsGroup=t.g().attr({class:i+"elements"}),e._axisLineGroup=t.g().attr({class:i+"line"}).linkOn(e._axisGroup,"axisLine").linkAppend(),e._axisTitleGroup=t.g().attr({class:i+"title"}).append(e._axisGroup),e._axisConstantLineGroups={above:e._createAxisConstantLineGroups(),under:e._createAxisConstantLineGroups()},e._axisStripLabelGroup=t.g().attr({class:i+"axis-labels"})},_clearAxisGroups:function(){const e=this;e._axisGroup.remove(),e._axisStripGroup.remove(),e._axisStripLabelGroup.remove(),e._axisConstantLineGroups.above.remove(),e._axisConstantLineGroups.under.remove(),e._axisGridGroup.remove(),e._axisTitleGroup.clear(),e._options.label.template&&e.isRendered()||(e._axisElementsGroup.remove(),e._axisElementsGroup.clear()),e._axisLineGroup&&e._axisLineGroup.clear(),e._axisStripGroup&&e._axisStripGroup.clear(),e._axisGridGroup&&e._axisGridGroup.clear(),e._axisConstantLineGroups.above.clear(),e._axisConstantLineGroups.under.clear(),e._axisStripLabelGroup&&e._axisStripLabelGroup.clear()},_getLabelFormatObject:function(e,t,i,o,a,s){i=i||this._getViewportRange();const r={value:e,valueText:(0,n.smartFormatter)(e,{labelOptions:t,ticks:s||I(this._majorTicks),tickInterval:a??this._tickInterval,dataType:this._options.dataType,logarithmBase:this._options.logarithmBase,type:this._options.type,showTransition:!this._options.marker.visible,point:o})||"",min:i.minVisible,max:i.maxVisible};return o&&(r.point=o),r},formatLabel:function(e,t,i,n,o,s){const r=this._getLabelFormatObject(e,t,i,n,o,s);return(0,a.isFunction)(t.customizeText)?t.customizeText.call(r,r):r.valueText},formatHint:function(e,t,i){const n=this._getLabelFormatObject(e,t,i);return(0,a.isFunction)(t.customizeHint)?t.customizeHint.call(n,n):void 0},formatRange(e,t,i,o){return(0,n.formatRange)({startValue:e,endValue:t,tickInterval:i,argumentFormat:o,axisOptions:this.getOptions()})},_setTickOffset:function(){const e=this._options.discreteAxisDivisionMode;this._tickOffset=+("crossLabels"!==e||!e)},aggregatedPointBetweenTicks(){return"crossTicks"===this._options.aggregatedPointsPosition},resetApplyingAnimation:function(e){this._resetApplyingAnimation=!0,e&&(this._firstDrawing=!0)},isFirstDrawing(){return this._firstDrawing},getMargins:function(){const e=this,{position:t,offset:i,customPosition:n,placeholderSize:o,grid:s,tick:r,crosshairMargin:l}=e._options,d=(0,a.isDefined)(n),u=e.getResolvedBoundaryPosition(),c=e.getCanvas(),h=c.left,p=c.top,g=c.width-c.right,_=c.height-c.bottom,f=A(s.visible&&s.width||0,r.visible&&r.width||0),m=e._axisConstantLineGroups.above,v=e._axisConstantLineGroups.under,C=[e._axisElementsGroup,m.outside1,m.outside2,v.outside1,v.outside2,e._axisLineGroup].map((e=>e&&e.getBBox())).concat(function(t){const i=t&&t.getBBox();return!i||i.isEmpty||(e._isHorizontal?(i.x=h,i.width=g-h):(i.y=p,i.height=_-p)),i}(e._axisTitleGroup)),y=(0,w.calculateCanvasMargins)(C,c);if(y[t]+=l,e.hasNonBoundaryPosition()&&d&&(y[u]=0),o&&(y[t]=o),f&&(e._isHorizontal&&c.right<f&&y.right<f&&(y.right=f),!e._isHorizontal&&c.bottom<f&&y.bottom<f&&(y.bottom=f)),!d&&(0,a.isDefined)(i)){const t=e.customPositionIsBoundary()&&(i>0&&(u===R||u===k)||i<0&&(u===L||u===M));y[u]-=t?i:0}return y},validateUnit:function(e,t,i){const n=this;return void 0===(e=n.parser(e))&&t&&n._incidentOccurred(t,[i]),e},_setType:function(e,t){let i;switch(e){case"xyAxes":i=v.default;break;case"polarAxes":i=C}(0,r.extend)(this,i[t])},_getSharpParam:function(){return!0},_disposeBreaksGroup:m.noop,dispose:function(){const e=this;[e._axisElementsGroup,e._axisStripGroup,e._axisGroup].forEach((function(e){e.dispose()})),e._strips=e._title=null,e._axisStripGroup=e._axisConstantLineGroups=e._axisStripLabelGroup=e._axisBreaksGroup=null,e._axisLineGroup=e._axisElementsGroup=e._axisGridGroup=null,e._axisGroup=e._axisTitleGroup=null,e._axesContainerGroup=e._stripsGroup=e._constantLinesGroup=e._labelsAxesGroup=null,e._renderer=e._options=e._textOptions=e._textFontStyles=null,e._translator=null,e._majorTicks=e._minorTicks=null,e._disposeBreaksGroup(),e._templatesRendered&&e._templatesRendered.reject()},getOptions:function(){return this._options},setPane:function(e){this.pane=e,this._options.pane=e},setTypes:function(e,t,i){this._options.type=e||this._options.type,this._options[i]=t||this._options[i],this._updateTranslator()},resetTypes:function(e){this._options.type=this._initTypes.type,this._options[e]=this._initTypes[e]},getTranslator:function(){return this._translator},updateOptions:function(e){const t=this,i=e.label;!function(e){const t=e.label;let i=e.position;const n=e.isHorizontal?M:R,o=e.isHorizontal?k:L;let a=t.position;i!==n&&i!==o&&(i=n),a&&"outside"!==a?"inside"===a&&(a={[k]:M,[M]:k,[R]:L,[L]:R}[i]):a=i,a!==n&&a!==o&&(a=i),t.alignment===B||t.userAlignment||(t.alignment={[k]:B,[M]:B,[R]:L,[L]:R}[a]),e.position=i,t.position=a,e.hoverMode=e.hoverMode?e.hoverMode.toLowerCase():"none",t.minSpacing=t.minSpacing??5,e.type&&(e.type=e.type.toLowerCase()),e.argumentType&&(e.argumentType=e.argumentType.toLowerCase()),e.valueType&&(e.valueType=e.valueType.toLowerCase())}(e),function(e,t){e&&"shift"===t.visualRangeUpdateMode&&_.default.log("W0016","valueAxis.visualRangeUpdateMode","shift","23.1","Specify another value")}(!t.isArgumentAxis,e),t._options=e,e.tick=e.tick||{},e.minorTick=e.minorTick||{},e.grid=e.grid||{},e.minorGrid=e.minorGrid||{},e.title=e.title||{},e.marker=e.marker||{},t._initTypes={type:e.type,argumentType:e.argumentType,valueType:e.valueType},t._setTickOffset(),t._isHorizontal=e.isHorizontal,t.pane=e.pane,t.name=e.name,t.priority=e.priority,t._hasLabelFormat=""!==i.format&&(0,a.isDefined)(i.format),t._textOptions={opacity:i.opacity,align:"center",class:i.cssClass},t._textFontStyles=(0,o.patchFontOptions)(i.font),e.type===s.default.logarithmic&&e.logarithmBaseError&&(t._incidentOccurred("E2104"),delete e.logarithmBaseError),t._updateTranslator(),t._createConstantLines(),t._strips=(e.strips||[]).map((e=>(0,b.default)(t,e))),t._majorTicks=t._minorTicks=null,t._firstDrawing=!0},calculateInterval:function(e,t){const i=this._options;if(!i||i.type!==s.default.logarithmic)return T(e-t);const{allowNegatives:n,linearThreshold:a}=new h.Range(this.getTranslator().getBusinessRange());return T((0,o.getLogExt)(e,i.logarithmBase,n,a)-(0,o.getLogExt)(t,i.logarithmBase,n,a))},getCanvasRange(){const e=this._translator;return{startValue:e.from(e.translate("canvas_position_start")),endValue:e.from(e.translate("canvas_position_end"))}},_processCanvas:function(e){return e},updateCanvas:function(e,t){if(t)this._orthogonalPositions=null;else{const t=this._orthogonalPositions={start:this._isHorizontal?e.top:e.left,end:this._isHorizontal?e.height-e.bottom:e.width-e.right};t.center=t.start+(t.end-t.start)/2}this._canvas=e,this._translator.updateCanvas(this._processCanvas(e)),this._initAxisPositions()},getCanvas:function(){return this._canvas},getAxisShift(){return this._axisShift||0},hideTitle:function(){const e=this;e._options.title.text&&(e._incidentOccurred("W2105",[e._isHorizontal?"horizontal":"vertical"]),e._axisTitleGroup.clear())},getTitle:function(){return this._title},hideOuterElements:function(){const e=this;!e._options.label.visible&&!e._outsideConstantLines.length||e._translator.getBusinessRange().isEmpty()||(e._incidentOccurred("W2106",[e._isHorizontal?"horizontal":"vertical"]),e._axisElementsGroup.clear(),K(e._outsideConstantLines,"removeLabel"))},_resolveLogarithmicOptionsForRange(e){const t=this._options;t.type===s.default.logarithmic&&(e.addRange({allowNegatives:void 0!==t.allowNegatives?t.allowNegatives:e.min<=0}),isNaN(t.linearThreshold)||(e.linearThreshold=t.linearThreshold))},adjustViewport(e){const t=this,i=t._options,n=i.type===s.default.discrete;let r=t._seriesData&&t._seriesData.categories||[];const l=t.adjustRange((0,o.getVizRangeObject)(i.wholeRange)),d=t.getViewport()||{},u=new h.Range(e);t._addConstantLinesToRange(u);let c=(0,a.isDefined)(d.startValue),p=(0,a.isDefined)(d.endValue);n||(c=c&&(!(0,a.isDefined)(l.endValue)||d.startValue<l.endValue),p=p&&(!(0,a.isDefined)(l.startValue)||d.endValue>l.startValue));const g=c?d.startValue:u.minVisible,_=p?d.endValue:u.maxVisible;if(n){r=(0,o.getCategoriesInfo)(r,l.startValue,l.endValue).categories,u.categories=r}else u.min=l.startValue??u.min,u.max=l.endValue??u.max;const f=(0,o.adjustVisualRange)({axisType:i.type,dataType:i.dataType,base:i.logarithmBase},{startValue:c?d.startValue:void 0,endValue:p?d.endValue:void 0,length:d.length},{categories:r,min:l.startValue,max:l.endValue},{categories:r,min:g,max:_});return u.minVisible=f.startValue,u.maxVisible=f.endValue,!(0,a.isDefined)(u.min)&&(u.min=u.minVisible),!(0,a.isDefined)(u.max)&&(u.max=u.maxVisible),u.addRange({}),t._resolveLogarithmicOptionsForRange(u),u},adjustRange(e){e=e||{};const t=this._options.type===s.default.discrete,i=this._options.type===s.default.logarithmic,n=!1===this._options.allowNegatives;if(i&&(e.startValue=n&&e.startValue<=0?null:e.startValue,e.endValue=n&&e.endValue<=0?null:e.endValue),!t&&(0,a.isDefined)(e.startValue)&&(0,a.isDefined)(e.endValue)&&e.startValue>e.endValue){const t=e.endValue;e.endValue=e.startValue,e.startValue=t}return e},_getVisualRangeUpdateMode(e,t,i){let n=this._options.visualRangeUpdateMode;const o=this._translator,r=this._seriesData,l=this._prevDataInfo;if(l.isEmpty&&!l.containsConstantLine)return V;if(!this.isArgumentAxis){const e=this.getViewport();if(!(0,a.isDefined)(e.startValue)&&!(0,a.isDefined)(e.endValue)&&!(0,a.isDefined)(e.length)){const e=this.visualRange();if(!(0,a.isDefined)(e.startValue)&&!(0,a.isDefined)(e.endValue))return H}}if(this.isArgumentAxis){if(-1===[F,V,H].indexOf(n)){if(r.axisType===s.default.discrete){const e=r.categories,i=t.categories,o=this.visualRange();n=e&&i&&e.length&&-1!==i.map((e=>e.valueOf())).join(",").indexOf(e.map((e=>e.valueOf())).join(","))&&(o.startValue.valueOf()!==e[0].valueOf()||o.endValue.valueOf()!==e[e.length-1].valueOf())?V:H}else{const t=o.translate(r.min),i=o.translate(e.startValue),a=o.translate(r.max),s=o.translate(e.endValue);n=t===i&&a===s?H:t!==i&&a===s?F:V}n===V&&l.isEmpty&&l.containsConstantLine&&(n=H)}}else-1===[V,H].indexOf(n)&&(n=i===V?V:H);return n},_handleBusinessRangeChanged(e,t,i){const n=this,o=this.visualRange();if(t||n._translator.getBusinessRange().isEmpty())return;const a=n._lastVisualRangeUpdateMode=n._getVisualRangeUpdateMode(o,i,e);a===V?n._setVisualRange([o.startValue,o.endValue]):a===H?n._setVisualRange([null,null]):a===F&&n._setVisualRange({length:n.getVisualRangeLength()})},getVisualRangeLength(e){const t=e||this._translator.getBusinessRange(),{type:i}=this._options;let n;if(i===s.default.logarithmic)n=(0,g.adjust)(this.calculateInterval(t.maxVisible,t.minVisible));else if(i===s.default.discrete){n=(0,o.getCategoriesInfo)(t.categories,t.minVisible,t.maxVisible).categories.length}else n=t.maxVisible-t.minVisible;return n},getVisualRangeCenter(e,t){const i=this.getTranslator(),n=i.getBusinessRange(),l=t?(0,r.extend)(!0,{},n,e||{}):e||n,{type:d,logarithmBase:u}=this._options;let c;if((0,a.isDefined)(l.minVisible)&&(0,a.isDefined)(l.maxVisible)){if(d===s.default.logarithmic){const{allowNegatives:e,linearThreshold:t,minVisible:i,maxVisible:n}=l;c=(0,o.raiseToExt)((0,g.adjust)((0,o.getLogExt)(n,u,e,t)+(0,o.getLogExt)(i,u,e,t))/2,u,e,t)}else if(d===s.default.discrete){const e=(0,o.getCategoriesInfo)(l.categories,l.minVisible,l.maxVisible),t=Math.ceil(e.categories.length/2)-1;c=n.categories.indexOf(e.categories[t])}else c=i.toValue((l.maxVisible.valueOf()+l.minVisible.valueOf())/2);return c}},setBusinessRange(e,t,i,n){const o=this,r=o._options,l=r.type===s.default.discrete;o._handleBusinessRangeChanged(i,t,e),o._seriesData=new h.Range(e);const d=o._seriesData.isEmpty(),u=new h.Range(o._seriesData);if(o._addConstantLinesToRange(u),o._prevDataInfo={isEmpty:d,containsConstantLine:u.containsConstantLine},o._seriesData.addRange({categories:r.categories,dataType:r.dataType,axisType:r.type,base:r.logarithmBase,invert:r.inverted}),o._resolveLogarithmicOptionsForRange(o._seriesData),!l){if(!(0,a.isDefined)(o._seriesData.min)&&!(0,a.isDefined)(o._seriesData.max)){const e=o.getViewport();e&&o._seriesData.addRange({min:e.startValue,max:e.endValue})}const e=r.synchronizedValue;(0,a.isDefined)(e)&&o._seriesData.addRange({min:e,max:e})}o._seriesData.minVisible=o._seriesData.minVisible??o._seriesData.min,o._seriesData.maxVisible=o._seriesData.maxVisible??o._seriesData.max,!o.isArgumentAxis&&r.showZero&&o._seriesData.correctValueZeroLevel(),o._seriesData.sortCategories(o.getCategoriesSorter(n)),o._seriesData.userBreaks=o._seriesData.isEmpty()?[]:o._getScaleBreaks(r,o._seriesData,o._series,o.isArgumentAxis),o._translator.updateBusinessRange(o._getViewportRange())},_addConstantLinesToRange(e){this._outsideConstantLines.concat(this._insideConstantLines||[]).forEach((t=>{if(t.options.extendAxis){const i=t.getParsedValue();e.addRange({containsConstantLine:!0,minVisible:i,maxVisible:i,min:(0,a.isDefined)(e.min)?e.min:i,max:(0,a.isDefined)(e.max)?e.max:i})}}))},setGroupSeries:function(e){this._series=e},getLabelsPosition:function(){const e=this,t=e._options,i=t.position,n=t.label.indentFromAxis+(e._axisShift||0)+e._constantLabelOffset,o=e._axisPosition;return i===k||i===R?o-n:o+n},getFormattedValue:function(e,t,i){const n=this._options.label;return(0,a.isDefined)(e)?this.formatLabel(e,(0,r.extend)(!0,{},n,t),void 0,i):null},_getBoundaryTicks:function(e,t){const i=this,n=e.length,o=i._options,r=o.customBoundTicks,l=t.minVisible,d=t.maxVisible,u=o.showCustomBoundaryTicks?i._boundaryTicksVisibility:{};let c=[];return o.type===s.default.discrete?i._tickOffset&&0!==e.length&&(c=[e[0],e[e.length-1]]):r?(u.min&&(0,a.isDefined)(r[0])&&c.push(r[0]),u.max&&(0,a.isDefined)(r[1])&&c.push(r[1])):(u.min&&(0===n||e[0]>l)&&c.push(l),u.max&&(0===n||e[n-1]<d)&&c.push(d)),c},setPercentLabelFormat:function(){this._hasLabelFormat||(this._options.label.format="percent")},resetAutoLabelFormat:function(){this._hasLabelFormat||delete this._options.label.format},getMultipleAxesSpacing:function(){return this._options.multipleAxesSpacing||0},getTicksValues:function(){return{majorTicksValues:I(this._majorTicks),minorTicksValues:I(this._minorTicks)}},estimateTickInterval:function(e){const t=this;return t.updateCanvas(e),t._tickInterval!==t._getTicks(t._getViewportRange(),m.noop,!0).tickInterval},setTicks:function(e){const t=e.majorTicks||[];this._majorTicks=t.map(G(this,this._renderer,this._getSkippedCategory(t))),this._minorTicks=(e.minorTicks||[]).map(j(this,this._renderer)),this._isSynchronized=!0},_adjustDivisionFactor:function(e){return e},_getTicks:function(e,t,i){const n=this,o=n._options,a=o.customTicks,s=o.customMinorTicks;return $(o,t||n._incidentOccurred,i,n._translator.getBusinessRange().isEmpty(),n._adjustDivisionFactor.bind(n),e)({min:e.minVisible,max:e.maxVisible,categories:e.categories,isSpacedMargin:e.isSpacedMargin},n._getScreenDelta(),o.tickInterval,"ignore"===o.label.overlappingBehavior||o.forceUserTickInterval,{majors:a,minors:s},o.minorTickInterval,o.minorTickCount,n._initialBreaks)},_createTicksAndLabelFormat:function(e,t){const i=this._options,n=this._getTicks(e,t,!1);return e.isEmpty()||i.type!==s.default.discrete||"datetime"!==i.dataType||this._hasLabelFormat||!n.ticks.length||(i.label.format=l.default.getDateFormatByTicks(n.ticks)),n},getAggregationInfo(e,t){var i;const n=this,l=n._options,d=n._marginOptions,u=new h.Range(n.getTranslator().getBusinessRange()).addRange(t),c=n.getViewport(),p=(null==c?void 0:c.startValue)??u.minVisible,g=(null==c?void 0:c.endValue)??u.maxVisible;let _=[];if(l.type===s.default.discrete&&l.aggregateByCategory)return{aggregateByCategory:!0};const v=l.aggregationInterval;let C=l.aggregationGroupWidth;!C&&d&&(d.checkInterval&&(C=l.axisDivisionFactor),d.sizePointNormalState&&(C=Math.min(d.sizePointNormalState,l.axisDivisionFactor)));const y=!l.aggregationGroupWidth&&!v&&t.interval,b=function(e,t,i,n,o){const s=(0,r.extend)({},e,{endOnTick:!0,axisDivisionFactor:t,skipCalculationLimits:!0,generateExtraTick:!0,minTickInterval:o});return function(e,t,o,r,l){return $(s,m.noop,t,i.isEmpty(),(e=>e),i)({min:o,max:r,categories:i.categories,isSpacedMargin:i.isSpacedMargin},n,e,(0,a.isDefined)(e),void 0,void 0,void 0,l)}}(l,C,u,n._getScreenDelta(),y),x=b(v,!0,p,g,null===(i=n._seriesData)||void 0===i?void 0:i.breaks).tickInterval;if(l.type!==s.default.discrete){const t=e?u.min:p,i=e?u.max:g;if((0,a.isDefined)(t)&&(0,a.isDefined)(i)){const s=(0,o.getAddFunction)({base:l.logarithmBase,axisType:l.type,dataType:l.dataType},!1);let r=t,d=i;if(!e&&(0,a.isDefined)(x)){const e=Math.max(n.calculateInterval(i,t),"datetime"===l.dataType?f.default.dateToMilliseconds(x):x);r=s(t,e,-1),d=s(i,e)}r=r<u.min?u.min:r,d=d>u.max?u.max:d;const c=n._getScaleBreaks(l,{minVisible:r,maxVisible:d},n._series,n.isArgumentAxis);_=b(x,!1,r,d,n._filterBreaks(c,{minVisible:r,maxVisible:d},l.breakStyle)).ticks}}return n._aggregationInterval=x,{interval:x,ticks:_}},getTickInterval(){return this._tickInterval},getAggregationInterval(){return this._aggregationInterval},createTicks:function(e){const t=this,i=t._renderer,n=t._options;if(!e)return;t._isSynchronized=!1,t.updateCanvas(e);const s=t._getViewportRange();t._initialBreaks=s.breaks=this._seriesData.breaks=t._filterBreaks(this._seriesData.userBreaks,s,n.breakStyle),t._estimatedTickInterval=t._getTicks(t.adjustViewport(this._seriesData),m.noop,!0).tickInterval;const r=this._calculateValueMargins();s.addRange({minVisible:r.minValue,maxVisible:r.maxValue,isSpacedMargin:r.isSpacedMargin});const l=t._createTicksAndLabelFormat(s),d=t._getBoundaryTicks(l.ticks,t._getViewportRange());n.showCustomBoundaryTicks&&d.length?(t._boundaryTicks=[d[0]].map(U(t,i,!0)),d.length>1&&(t._boundaryTicks=t._boundaryTicks.concat([d[1]].map(U(t,i,!1))))):t._boundaryTicks=[];const u=(l.minorTicks||[]).filter((function(e){return!d.some((function(t){return(0,o.valueOf)(t)===(0,o.valueOf)(e)}))}));t._tickInterval=l.tickInterval,t._minorTickInterval=l.minorTickInterval;const c=t._majorTicks||[],h=c.reduce(((e,t)=>(e[t.value.valueOf()]=t,e)),{}),p=(0,a.type)(l.ticks[0])===(0,a.type)(c[0]&&c[0].value),g=t._getSkippedCategory(l.ticks),_=l.ticks.map((e=>{const n=h[e.valueOf()];return n&&p?(delete h[e.valueOf()],n.setSkippedCategory(g),n):G(t,i,g)(e)}));t._majorTicks=_;const f=t._minorTicks||[];t._minorTicks=u.map(((e,n)=>{const o=f[n];return o?(o.updateValue(e),o):j(t,i)(e)})),t._ticksToRemove=Object.keys(h).map((e=>h[e])).concat(f.slice(t._minorTicks.length,f.length)),t._ticksToRemove.forEach((e=>{var t;return null===(t=e.label)||void 0===t?void 0:t.removeTitle()})),l.breaks&&(t._seriesData.breaks=l.breaks),t._reinitTranslator(t._getViewportRange())},_reinitTranslator:function(e){const t=this._translator;this._isSynchronized||t.updateBusinessRange(e)},_getViewportRange(){return this.adjustViewport(this._seriesData)},setMarginOptions:function(e){this._marginOptions=e},getMarginOptions(){return this._marginOptions??{}},_calculateRangeInterval:function(e){const t="datetime"===this._options.dataType,i=[],n=function(e){(0,a.isDefined)(e)&&i.push(t?f.default.dateToMilliseconds(e):e)};return n(this._tickInterval),n(this._estimatedTickInterval),(0,a.isDefined)(e)&&i.push(e),n(this._aggregationInterval),this._calculateWorkWeekInterval(O.apply(this,i))},_calculateWorkWeekInterval(e){const t=this._options;if("datetime"===t.dataType&&t.workdaysOnly&&e){const i=t.workWeek.length*z,n=W-i;if(i!==e&&n<e){e-=n*Math.ceil(e/W)}else n>=e&&e>z&&(e=z)}return e},_getConvertIntervalCoefficient(e,t){const i=this._translator.ratioOfCanvasRange();return i/(i*t/(e+t))},_calculateValueMargins(e){this._resetMargins();const t=this,i=t.getMarginOptions(),n=(i.size||0)/2,r=t._options,l=t._getViewportRange(),d=t.getViewport(),u=t._getScreenDelta(),c=-1!==(r.type||"").indexOf(s.default.discrete),h=r.valueMarginsEnabled&&!c&&!t.customPositionIsBoundaryOrthogonalAxis(),p=t._translator,g=r.minValueMargin,_=r.maxValueMargin;let f,m,v,C=0,y=0,b=0;if(l.stubData||!u)return{startPadding:0,endPadding:0};if(t.isArgumentAxis&&i.checkInterval){f=t._calculateRangeInterval(l.interval);const e=p.getInterval(f);isFinite(e)?b=Math.ceil(e/(2*t._getConvertIntervalCoefficient(e,u))):f=0}const x=.8*u/2;h&&((0,a.isDefined)(g)?m=isFinite(g)?g:0:!t.isArgumentAxis&&i.checkInterval&&(0,o.valueOf)(l.minVisible)>0&&(0,o.valueOf)(l.minVisible)===(0,o.valueOf)(l.min)?C=5:(C=Math.max(n,b),C=Math.min(x,C)),(0,a.isDefined)(_)?v=isFinite(_)?_:0:!t.isArgumentAxis&&i.checkInterval&&(0,o.valueOf)(l.maxVisible)<0&&(0,o.valueOf)(l.maxVisible)===(0,o.valueOf)(l.max)?y=5:(y=Math.max(n,b),y=Math.min(x,y)));i.percentStick&&!this.isArgumentAxis&&(1===T(l.max)&&(y=0),1===T(l.min)&&(C=0));const w=t._getCanvasStartEnd(),S=(u-C-y)/(1+(m||0)+(v||0))||u;let D,I;if(void 0===m&&void 0===v||(void 0!==m&&(C=S*m),void 0!==v&&(y=S*v)),r.type!==s.default.discrete&&e&&e.length>1&&!r.skipViewportExtending&&!d.action&&!1!==r.endOnTick){const i=e.length,n=p.translate(e[0].value),o=p.translate(e[i-1].value),a=n>o?-1:1,s=A(a*(w.start-n),0),r=A(a*(o-w.end),0);if(s>C||r>y){const n=r+s,o=t._getConvertIntervalCoefficient(n,u);s>=C&&(D=e[0].value),r>=y&&(I=e[i-1].value),C=A(s,C)/o,y=A(r,y)/o}}m=void 0===m?C/S:m,v=void 0===v?y/S:v,c||(this._translator.isInverted()?(D=D??p.from(w.start+u*m,-1),I=I??p.from(w.end-u*v,1)):(D=D??p.from(w.start-u*m,-1),I=I??p.from(w.end+u*v,1)));const{correctedMin:E,correctedMax:O,start:P,end:k}=t.getCorrectedValuesToZero(D,I);return C=P??C,y=k??y,{startPadding:p.isInverted()?y:C,endPadding:p.isInverted()?C:y,minValue:E??D,maxValue:O??I,interval:f,isSpacedMargin:C===y&&0!==C}},getCorrectedValuesToZero(e,t){const i=this,n=i._translator,o=i._getCanvasStartEnd(),a=i._getViewportRange(),s=i._getScreenDelta(),r=i._options;let l,d,u,c;const h=(e,t)=>{const n=T(o.start-e),a=T(o.end-t),r=i._getConvertIntervalCoefficient(n+a,s);l=n/r,d=a/r};return i.isArgumentAxis||"datetime"===r.dataType||(e*a.min<=0&&e*a.minVisible<=0&&(h(n.translate(0),n.translate(t)),u=0),t*a.max<=0&&t*a.maxVisible<=0&&(h(n.translate(e),n.translate(0)),c=0)),{start:isFinite(l)?l:null,end:isFinite(d)?d:null,correctedMin:u,correctedMax:c}},applyMargins(){if(this._isSynchronized)return;const e=this._calculateValueMargins(this._majorTicks),t=(0,r.extend)({},this._canvas,{startPadding:e.startPadding,endPadding:e.endPadding});if(this._translator.updateCanvas(this._processCanvas(t)),isFinite(e.interval)){const t=this._translator.getBusinessRange();t.addRange({interval:e.interval}),this._translator.updateBusinessRange(t)}},_resetMargins:function(){this._reinitTranslator(this._getViewportRange()),this._canvas&&this._translator.updateCanvas(this._processCanvas(this._canvas))},_createConstantLines(){const e=(this._options.constantLines||[]).map((e=>(0,y.default)(this,e)));this._outsideConstantLines=e.filter((e=>"outside"===e.labelPosition)),this._insideConstantLines=e.filter((e=>"inside"===e.labelPosition))},draw:function(e,t){const i=this,n=this._options;i.borderOptions=t||{visible:!1},i._resetMargins(),i.createTicks(e),i.applyMargins(),i._clearAxisGroups(),Z(i._majorTicks),Z(i._minorTicks),Z(i._boundaryTicks),i._axisGroup.append(i._axesContainerGroup),i._drawAxis(),i._drawTitle(),q(i._majorTicks,n.tick),q(i._minorTicks,n.minorTick),q(i._boundaryTicks,n.tick);const o=i._getGridLineDrawer();Y(i._majorTicks,o),Y(i._minorTicks,o),K(i._majorTicks,"drawLabel",i._getViewportRange(),i._getTemplate(n.label.template)),i._templatesRendered&&i._templatesRendered.reject(),i._templatesRendered=new x.Deferred,i._majorTicks.forEach((function(e){e.labelRotationAngle=0,e.labelAlignment=void 0,e.labelOffset=0})),K(i._outsideConstantLines.concat(i._insideConstantLines),"draw"),K(i._strips,"draw"),i._dateMarkers=i._drawDateMarkers()||[],i._stripLabelAxesGroup&&i._axisStripLabelGroup.append(i._stripLabelAxesGroup),i._gridContainerGroup&&i._axisGridGroup.append(i._gridContainerGroup),i._stripsGroup&&i._axisStripGroup.append(i._stripsGroup),i._labelsAxesGroup&&i._axisElementsGroup.append(i._labelsAxesGroup),i._constantLinesGroup&&(i._axisConstantLineGroups.above.inside.append(i._constantLinesGroup.above),i._axisConstantLineGroups.above.outside1.append(i._constantLinesGroup.above),i._axisConstantLineGroups.above.outside2.append(i._constantLinesGroup.above),i._axisConstantLineGroups.under.inside.append(i._constantLinesGroup.under),i._axisConstantLineGroups.under.outside1.append(i._constantLinesGroup.under),i._axisConstantLineGroups.under.outside2.append(i._constantLinesGroup.under)),i._measureTitle(),(0,w.measureLabels)(i._majorTicks),!n.label.template&&i._applyWordWrap(),(0,w.measureLabels)(i._outsideConstantLines),(0,w.measureLabels)(i._insideConstantLines),(0,w.measureLabels)(i._strips),(0,w.measureLabels)(i._dateMarkers),i._adjustConstantLineLabels(i._insideConstantLines),i._adjustStripLabels();let a=i._constantLabelOffset=i._adjustConstantLineLabels(i._outsideConstantLines);i._translator.getBusinessRange().isEmpty()||(i._setLabelsPlacement(),a=i._adjustLabels(a)),x.when.apply(this,i._majorTicks.map((e=>e.getTemplateDeferred()))).done((()=>{i._templatesRendered.resolve()})),a=i._adjustDateMarkers(a),i._adjustTitle(a)},getTemplatesDef(){return this._templatesRendered},setRenderedState(e){this._drawn=e},isRendered(){return this._drawn},_applyWordWrap(){const e=this;let t,i,n;const o=this._options,s=e._tickInterval;(0,a.isDefined)(s)&&(t=e.getTranslator().getInterval("datetime"===o.dataType?f.default.dateToMilliseconds(s):s));const r=e._validateDisplayMode(o.label.displayMode),l=e._validateOverlappingMode(o.label.overlappingBehavior,r),d=o.label.wordWrap||"none",u=o.label.textOverflow||"none";if(("none"!==d||"none"!==u)&&r!==N&&l!==N&&"auto"!==l){const s=(0,a.isDefined)(o.placeholderSize)?o.placeholderSize-o.label.indentFromAxis:void 0;e._isHorizontal?(i=t,n=s):(i=s,n=t);let r=!1,l=!1;i&&e._majorTicks.some((e=>e.labelBBox.width>i))&&(r=!0),n&&e._majorTicks.some((e=>e.labelBBox.height>n))&&(l=!0),(r||l)&&(e._majorTicks.forEach((e=>{e.label&&e.label.setMaxSize(i,n,o.label)})),(0,w.measureLabels)(e._majorTicks))}},_measureTitle:m.noop,animate(){K(this._majorTicks,"animateLabels")},updateSize(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=this;n.updateCanvas(e),i&&(n._checkTitleOverflow(),n._measureTitle(),n._updateTitleCoords()),n._reinitTranslator(n._getViewportRange()),n.applyMargins();const o=!n._firstDrawing&&t,a=n._options;Z(n._majorTicks),Z(n._minorTicks),Z(n._boundaryTicks),n._resetApplyingAnimation&&!n._firstDrawing&&n._resetStartCoordinates(),J(n._majorTicks),J(n._minorTicks),J(n._boundaryTicks),n._axisElement&&n._updateAxisElementPosition(),X(n._majorTicks,a.tick,o),X(n._minorTicks,a.minorTick,o),X(n._boundaryTicks,a.tick),K(n._majorTicks,"updateLabelPosition",o),n._outsideConstantLines.concat(n._insideConstantLines||[]).forEach((e=>e.updatePosition(o))),K(n._strips,"updatePosition",o),Q(n._majorTicks,o),Q(n._minorTicks,o),o&&K(n._ticksToRemove||[],"fadeOutElements"),n.prepareAnimation(),n._ticksToRemove=null,n._translator.getBusinessRange().isEmpty()||(n._firstDrawing=!1),n._resetApplyingAnimation=!1,n._updateLabelsPosition()},_updateLabelsPosition:m.noop,prepareAnimation(){const e=this,t="saveCoords";K(e._majorTicks,t),K(e._minorTicks,t),K(e._insideConstantLines,t),K(e._outsideConstantLines,t),K(e._strips,t)},_resetStartCoordinates(){const e=this,t="resetCoordinates";K(e._majorTicks,t),K(e._minorTicks,t),K(e._insideConstantLines,t),K(e._outsideConstantLines,t),K(e._strips,t)},applyClipRects:function(e,t){this._axisGroup.attr({"clip-path":t}),this._axisStripGroup.attr({"clip-path":e}),this._axisElementsGroup.attr({"clip-path":t})},_validateVisualRange(e){const t=(0,o.getVizRangeObject)(e);return void 0!==t.startValue&&(t.startValue=this.validateUnit(t.startValue)),void 0!==t.endValue&&(t.endValue=this.validateUnit(t.endValue)),(0,o.convertVisualRangeObject)(t,!P(e))},_validateOptions(e){e.wholeRange=this._validateVisualRange(e.wholeRange),e.visualRange=e._customVisualRange=this._validateVisualRange(e._customVisualRange),this._setVisualRange(e._customVisualRange)},validate(){const e=this,t=e._options,i=e.isArgumentAxis?t.argumentType:t.valueType,n=i?(0,d.getParser)(i):function(e){return e};e.parser=n,t.dataType=i,e._validateOptions(t)},resetVisualRange(e){this._seriesData.minVisible=this._seriesData.min,this._seriesData.maxVisible=this._seriesData.max,this.handleZooming([null,null],{start:!!e,end:!!e})},_setVisualRange(e,t){const i=this.adjustRange((0,o.getVizRangeObject)(e));t?((0,a.isDefined)(i.startValue)&&(this._viewport.startValue=i.startValue),(0,a.isDefined)(i.endValue)&&(this._viewport.endValue=i.endValue)):this._viewport=i},_applyZooming(e,t){const i=this;i._resetVisualRangeOption(),i._setVisualRange(e,t);const n=i.getViewport();i._seriesData.userBreaks=i._getScaleBreaks(i._options,{minVisible:n.startValue,maxVisible:n.endValue},i._series,i.isArgumentAxis),i._translator.updateBusinessRange(i._getViewportRange())},getZoomStartEventArg(e,t){return{axis:this,range:this.visualRange(),cancel:!1,event:e,actionType:t}},_getZoomEndEventArg(e,t,i,n,o){const a=this.visualRange();return{axis:this,previousRange:e,range:a,cancel:!1,event:t,actionType:i,zoomFactor:n,shift:o,rangeStart:a.startValue,rangeEnd:a.endValue}},getZoomBounds(){const e=(0,o.getVizRangeObject)(this._options.wholeRange),t=this.getTranslator().getBusinessRange(),i={startValue:ne(this._initRange.startValue,t.min),endValue:ne(this._initRange.endValue,t.max)};return{startValue:ne(e.startValue,i.startValue),endValue:ne(e.endValue,i.endValue)}},setInitRange(){this._initRange={},0===Object.keys(this._options.wholeRange||{}).length&&(this._initRange=this.getZoomBounds())},_resetVisualRangeOption(){this._options._customVisualRange={}},getTemplatesGroups(){return this._majorTicks?this._majorTicks.map((e=>e.templateContainer)).filter((e=>(0,a.isDefined)(e))):[]},setCustomVisualRange(e){this._options._customVisualRange=e},visualRange(){const e=this,t=arguments;let i;if(0===t.length){const t=e._getAdjustedBusinessRange();let i=t.minVisible,n=t.maxVisible;return e._options.type===s.default.discrete?(i=i??t.categories[0],n=n??t.categories[t.categories.length-1],{startValue:i,endValue:n,categories:(0,o.getCategoriesInfo)(t.categories,i,n).categories}):{startValue:i,endValue:n}}i=P(t[0])?t[0]:(0,a.isPlainObject)(t[0])?(0,r.extend)({},t[0]):[t[0],t[1]];const n=e.handleZooming(i,t[1]);n.isPrevented||e._visualRange(e,n)},handleZooming(e,t,i,n){const o=this;t=t||{},(0,a.isDefined)(e)&&((e=o._validateVisualRange(e)).action=n);const s=o.getZoomStartEventArg(i,n),r=s.range;!t.start&&o._eventTrigger("zoomStart",s);const l={isPrevented:s.cancel,skipEventRising:t.skipEventRising,range:e||s.range};return s.cancel||((0,a.isDefined)(e)&&o._applyZooming(e,t.allowPartialUpdate),(0,a.isDefined)(o._storedZoomEndParams)||(o._storedZoomEndParams={startRange:r,type:this.getOptions().type}),o._storedZoomEndParams.event=i,o._storedZoomEndParams.action=n,o._storedZoomEndParams.prevent=!!t.end),l},handleZoomEnd(){const e=this;if((0,a.isDefined)(e._storedZoomEndParams)&&!e._storedZoomEndParams.prevent){const t=e._storedZoomEndParams.startRange,i=e._storedZoomEndParams.event,n=e._storedZoomEndParams.action,o={minVisible:t.startValue,maxVisible:t.endValue,categories:t.categories},a=e.getOptions().type===e._storedZoomEndParams.type,s=a?(0,g.adjust)(e.getVisualRangeCenter()-e.getVisualRangeCenter(o,!1)):NaN,r=a?+(Math.round(e.getVisualRangeLength(o)/(e.getVisualRangeLength()||1)+"e+2")+"e-2"):NaN,l=e._getZoomEndEventArg(t,i,n,r,s);l.cancel=e.checkZoomingLowerLimitOvercome(1===r?"pan":"zoom",r).stopInteraction,e._eventTrigger("zoomEnd",l),l.cancel&&e._restorePreviousVisualRange(t),e._storedZoomEndParams=null}},_restorePreviousVisualRange(e){const t=this;t._storedZoomEndParams=null,t._applyZooming(e),t._visualRange(t,e)},checkZoomingLowerLimitOvercome(e,t,i){const n=this,s=n._options,r=n._translator;let l,d=s.minVisualRangeLength,u=i,c="zoom"===e&&t>=1;const h=r.getBusinessRange();i&&(l=n.adjustRange((0,o.getVizRangeObject)(i)),l={minVisible:l.startValue,maxVisible:l.endValue,categories:h.categories});const p=n.getVisualRangeLength(h),g=n.getVisualRangeLength(l);if((0,a.isDefined)(d)||"discrete"===s.type)d=r.convert(d),l&&d<p&&d>=g?(u=(0,o.getVizRangeObject)(r.getRangeByMinZoomValue(d,l)),c=!1):c&=d>g;else{const e=n._translator.canvasLength,t={minVisible:h.min,maxVisible:h.max,categories:h.categories};c&=n.getVisualRangeLength(t)/e>=g}return{stopInteraction:!!c,correctedRange:u}},isExtremePosition(e){let t,i;"discrete"===this._options.type?(i=this._translator.getBusinessRange(),t=e?i.categories[i.categories.length-1]:i.categories[0]):(i=this.getZoomBounds(),t=e?i.endValue:i.startValue);const n=this.getTranslator(),o=n.translate(t),a=this.visualRange(),s=e?n.translate(a.endValue):n.translate(a.startValue);return T(s-o)<5},getViewport(){return this._viewport},getFullTicks:function(){const e=this._majorTicks||[];return this._options.type===s.default.discrete?I(e):I(e.concat(this._minorTicks,this._boundaryTicks)).sort((function(e,t){return(0,o.valueOf)(e)-(0,o.valueOf)(t)}))},measureLabels:function(e,t){const i=this,n=i._options,o=n.visible?n.width:0;let a;const s=t?n.label.indentFromAxis+.5*n.tick.length:0;let r;const l=i._getViewportRange();if(l.isEmpty()||!n.label.visible||!i._axisElementsGroup)return{height:o,width:o,x:0,y:0};i._majorTicks?a=I(i._majorTicks):(i.updateCanvas(e),a=i._createTicksAndLabelFormat(l,m.noop),r=a.tickInterval,a=a.ticks);const d=a.reduce((function(e,t,o){const s=i.formatLabel(t,n.label,l,void 0,r,a);return e.length<s.length?s:e}),i.formatLabel(a[0],n.label,l,void 0,r,a)),u=i._renderer.text(d,0,0).css(i._textFontStyles).attr(i._textOptions).append(i._renderer.root),c=u.getBBox();return u.remove(),{x:c.x,y:c.y,width:c.width+s,height:c.height+s}},_setLabelsPlacement:function(){if(!this._options.label.visible)return;const e=this,t=e._options.label,i=e._validateDisplayMode(t.displayMode),n=e._validateOverlappingMode(t.overlappingBehavior,i),o="none"===n||"ignore"===n,a={rotationAngle:t.rotationAngle,staggeringSpacing:t.staggeringSpacing};let s;const r=e._majorTicks.map((function(e){return e.labelBBox}));let l=e._getStep(r);switch(i){case N:o&&(s=!0,l=1),e._applyLabelMode(i,l,r,t,s);break;case"stagger":o&&(l=2),e._applyLabelMode(i,A(l,2),r,t);break;default:e._applyLabelOverlapping(r,n,l,a)}},_applyLabelOverlapping:function(e,t,i,n){const o=this,a=o._options.label,r=o._majorTicks;if("none"===t||"ignore"===t)return;i>1&&e.some((function(e,t,i){return 0!==t&&s.default.areLabelsOverlap(e,i[t-1],a.minSpacing,a.alignment)}))&&o._applyLabelMode(t,i,e,n),o._checkBoundedLabelsOverlapping(r,e,t),o._checkShiftedLabels(r,e,a.minSpacing,a.alignment)},_applyLabelMode:function(e,t,i,n,o){const a=this,s=a._majorTicks,r=a._options.label,l=n.rotationAngle;let d,u,c;switch(e){case N:r.userAlignment||(u=l<0?L:R,l%90==0&&(u=B)),c=function(e){const t=e.getContentContainer();t&&(t.rotate(l),e.labelRotationAngle=l,u&&(e.labelAlignment=u))},ie(s,t=o?t:a._getStep(i,l),c);break;case"stagger":d=a._getMaxLabelHeight(i,n.staggeringSpacing),c=function(e,i){i/(t-1)%2!=0&&(e.labelOffset=d)},ie(s,t-1,c);break;case"auto":case"_auto":2===t?a._applyLabelMode("stagger",t,i,n):a._applyLabelMode(N,t,i,{rotationAngle:te(i,r)});break;default:ie(s,t)}},getMarkerTrackers:m.noop,_drawDateMarkers:m.noop,_adjustDateMarkers:m.noop,coordsIn:m.noop,areCoordsOutsideAxis:m.noop,_getSkippedCategory:m.noop,_initAxisPositions:m.noop,_drawTitle:m.noop,_updateTitleCoords:m.noop,_adjustConstantLineLabels:m.noop,_createTranslator:function(){return new c.Translator2D({},{},{})},_updateTranslator:function(){const e=this._translator;e.update(e.getBusinessRange(),this._canvas||{},this._getTranslatorOptions())},_getTranslatorOptions:function(){var e,t;const i=this._options;return{isHorizontal:this._isHorizontal,shiftZeroValue:!this.isArgumentAxis,interval:i.semiDiscreteInterval,firstDayOfWeek:null===(e=i.workWeek)||void 0===e?void 0:e[0],stick:this._getStick(),breaksSize:(null===(t=i.breakStyle)||void 0===t?void 0:t.width)??0}},getVisibleArea(){const e=this._getCanvasStartEnd();return[e.start,e.end].sort(((e,t)=>e-t))},_getCanvasStartEnd:function(){const e=this._isHorizontal,t=this._canvas||{},i=this._translator.getBusinessRange().invert,n=e?[t.left,t.width-t.right]:[t.height-t.bottom,t.top];return i&&n.reverse(),{start:n[0],end:n[1]}},_getScreenDelta:function(){const e=this,t=e._getCanvasStartEnd(),i=e._seriesData&&e._seriesData.breaks||[],n=i.length;return T(t.start-t.end)-(n?i[n-1].cumulativeWidth:0)},_getScaleBreaks:function(){return[]},_filterBreaks:function(){return[]},_adjustTitle:m.noop,_checkTitleOverflow:m.noop,getSpiderTicks:m.noop,setSpiderTicks:m.noop,_checkBoundedLabelsOverlapping:m.noop,_checkShiftedLabels:m.noop,drawScaleBreaks:m.noop,_visualRange:m.noop,_rotateConstantLine:m.noop,applyVisualRangeSetter(e){this._visualRange=e},getCategoriesSorter(e){let t;if(this.isArgumentAxis)t=e;else{t=this._options.categoriesSortingMethod??this._options.categories}return t},_getAdjustedBusinessRange(){return this.adjustViewport(this._translator.getBusinessRange())}}},21259:function(e,t,i){t.default=function(e,t){const i=t.label||{},o=i.position||"inside";let a,s,r,l=!1;return e._checkAlignmentConstantLineLabels(i),{options:t,labelOptions:i,labelPosition:o,label:null,line:null,getParsedValue:()=>(l||(a=e.validateUnit(t.value,"E2105","constantLine"),l=!0),a),draw(){if(!(0,n.isDefined)(t.value)||e._translator.getBusinessRange().isEmpty())return this;const a=e._getCanvasStartEnd(),s=this.getParsedValue();this.coord=e._getConstantLinePos(s,a.start,a.end);const r=t.displayBehindSeries?e._axisConstantLineGroups.under:e._axisConstantLineGroups.above;let l=r[o];if(!l){l=r[e._isHorizontal?i.verticalAlignment:i.horizontalAlignment]}if(!(0,n.isDefined)(this.coord))return this;const d=e._createConstantLine(this.coord,{stroke:t.color,"stroke-width":t.width,dashStyle:t.dashStyle});return this.line=d.append(r.inside),this.label=i.visible?e._drawConstantLineLabels(s,i,this.coord,l):null,this.updatePosition(),this},getContentContainer(){return this.label},removeLabel(){this.label&&this.label.remove()},updatePosition(t){const i=e._getCanvasStartEnd(),o=e._getConstantLinePos(this.getParsedValue(),i.start,i.end);(0,n.isDefined)(o)&&(this.coord=o,t&&r?(this.label&&this.label.attr(e._getConstantLineLabelsCoords(r,this.labelOptions)),this.line&&this.line.attr(e._getConstantLineGraphicAttributes(r)),this.label&&this.label.animate(e._getConstantLineLabelsCoords(this.coord,this.labelOptions)),this.line&&this.line.animate(e._getConstantLineGraphicAttributes(this.coord))):(this.label&&this.label.attr(e._getConstantLineLabelsCoords(this.coord,this.labelOptions)),this.line&&this.line.attr(e._getConstantLineGraphicAttributes(this.coord)),e._rotateConstantLine(this.line,this.coord)))},saveCoords(){s=r,r=this.coord},resetCoordinates(){r=s}}};var n=i(11528);e.exports=t.default,e.exports.default=t.default},61914:function(e,t,i){t.generateDateBreaks=function(e,t,i,n,d){const u=function(e){const t=(i=e,a.filter((function(e){return!i.some((function(t){return t===e}))})));var i;if(t.length<7)for(;s(t[t.length-1])===t[0];)t.unshift(t.pop());return t}(i),c=function(e,t,i){let n=e.getDate();const a=[],d=i.reduce((function(e,t){let i=e[1];return void 0===i.start?(i={start:t,end:s(t)},e[0].push(i),[e[0],i]):i.end===t?(i.end=s(t),e):(i={start:t,end:s(t)},e[0].push(i),[e[0],i])}),[[],{}]);return d[0].forEach((function(i){let s=new Date(e);for(s=o.default.trimTime(s);s<t;){n=s.getDay();const e=s.getDate();if(r(i,n)){const t=new Date(s);s.setDate(e+l(n,i.end));const o=new Date(s);a.push({from:t,to:o})}s.setDate(s.getDate()+1)}})),a}(e,t,u);return c.push.apply(c,function(e,t,i,n){let a;const s=function(e){return e===a},r=o.default.trimTime(e),l=o.default.trimTime(t);return l.setDate(t.getDate()+1),i.reduce((function(e,t){let i,d;return t=new Date(t),a=t.getDay(),!n.some(s)&&t>=r&&t<=l&&(i=o.default.trimTime(t),d=new Date(i),d.setDate(i.getDate()+1),e.push({from:i,to:d})),e}),[])}(e,t,d||[],u)),function(e){return e.map((function(e){return{from:e.from,to:e.to,gapSize:o.default.convertMillisecondsToDateUnits(e.to-e.from)}}))}(function(e,t){const i=e.slice();let n;const a=function(e){if(e=o.default.trimTime(new Date(e)),i[n].from<=e&&i[n].to>e){const t=function(e,t){const i=[],n=new Date(t);n.setDate(t.getDate()+1),t>e.from&&i.push({from:e.from,to:t});n<e.to&&i.push({from:n,to:e.to});return i}(i[n],e);2===t.length?i.splice(n,1,t[0],t[1]):1===t.length?i.splice(n,1,t[0]):i.splice(n,1)}};for(n=0;n<i.length;n++)t.forEach(a);return i}(c,n||[]))};var n,o=(n=i(41380))&&n.__esModule?n:{default:n};const a=[0,1,2,3,4,5,6];function s(e){return(e+1)%7}function r(e,t){let i=e.start;const n=e.end;for(;i!==n;){if(i===t)return!0;i=s(i)}return!1}function l(e,t){let i=0;for(;e!==t;)e=s(e),i++;return i}},75014:function(e,t,i){t.linearSpider=t.linear=t.circularSpider=t.circular=void 0;var n=i(28779),o=i(11528),a=i(52576),s=c(i(63885)),r=c(i(9441)),l=i(99043),d=i(86017),u=i(17781);function c(e){return e&&e.__esModule?e:{default:e}}const{PI:h,abs:p,atan:g,round:_}=Math,f=Math.min,m=Math.max,v=r.default.linear,C=90;function y(e){let t;return(e=(0,n.normalizeAngle)(e))>=315&&e<=360||e<45&&e>=0?t=1:e>=45&&e<135?t=2:e>=135&&e<225?t=3:e>=225&&e<315&&(t=4),t}const b={_calculateValueMargins(e){let{minVisible:t,maxVisible:i}=this._getViewportRange();return e&&e.length>1&&(t=t<e[0].value?t:e[0].value,i=t>e[e.length-1].value?i:e[e.length-1].value),{minValue:t,maxValue:i}},applyMargins(){const e=this._calculateValueMargins(this._majorTicks),t=this._translator.getBusinessRange();t.addRange({minVisible:e.minValue,maxVisible:e.maxValue,interval:this._calculateRangeInterval(t.interval)}),this._translator.updateBusinessRange(t)},_getTranslatorOptions:function(){return{isHorizontal:!0,conversionValue:!0,addSpiderCategory:this._getSpiderCategoryOption(),stick:this._getStick()}},getCenter:function(){return this._center},getRadius:function(){return this._radius},getAngles:function(){const e=this._options;return[e.startAngle,e.endAngle]},_updateRadius(e){const t=f(e.width-e.left-e.right,e.height-e.top-e.bottom)/2;this._radius=t<0?0:t},_updateCenter:function(e){this._center={x:e.left+(e.width-e.right-e.left)/2,y:e.top+(e.height-e.top-e.bottom)/2}},_processCanvas:function(e){return this._updateRadius(e),this._updateCenter(e),{left:0,right:0,width:this._getScreenDelta()}},_createAxisElement:function(){return this._renderer.circle()},_updateAxisElementPosition:function(){const e=this.getCenter();this._axisElement.attr({cx:e.x,cy:e.y,r:this.getRadius()})},_boundaryTicksVisibility:{min:!0},_getSpiderCategoryOption:function(){return this._options.firstPointOnStartAngle},_validateOptions(e){const t=this;let i=e.originValue;const a=e.wholeRange={},r=e.period;(0,o.isDefined)(i)&&(i=t.validateUnit(i)),r>0&&e.argumentType===s.default.numeric&&(i=i||0,a.endValue=i+r,t._viewport=(0,n.getVizRangeObject)([i,a.endValue])),(0,o.isDefined)(i)&&(a.startValue=i)},getMargins(){const e=this._options.tick,t=m(e.visible?e.length/2+e.shift:0,0),i=this.getRadius(),{x:n,y:o}=this._center,s=this._majorTicks.map((e=>e.label&&e.label.getBBox())).filter((e=>e)),r=(0,a.extend)({},this._canvas,{left:n-i,top:o-i,right:this._canvas.width-(n+i),bottom:this._canvas.height-(o+i)}),l=(0,d.calculateCanvasMargins)(s,r);return Object.keys(l).forEach((e=>l[e]=l[e]<t?t:l[e])),l},_updateLabelsPosition(){const e=this;(0,d.measureLabels)(e._majorTicks),e._adjustLabelsCoord(0,0,!0),e._checkBoundedLabelsOverlapping(this._majorTicks,this._majorTicks.map((e=>e.labelBBox)))},_setVisualRange:u.noop,applyVisualRangeSetter:u.noop,_getStick:function(){return this._options.firstPointOnStartAngle||this._options.type!==s.default.discrete},_getTranslatedCoord:function(e,t){return this._translator.translate(e,t)-C},_getCanvasStartEnd:function(){return{start:-90,end:270}},_getStripGraphicAttributes:function(e,t){const i=this.getCenter(),n=this.getAngles()[0],o=this.getRadius();return{x:i.x,y:i.y,innerRadius:0,outerRadius:o,startAngle:-t-n,endAngle:-e-n}},_createStrip:function(e){return this._renderer.arc(e.x,e.y,e.innerRadius,e.outerRadius,e.startAngle,e.endAngle)},_getStripLabelCoords:function(e,t){const i=this,o=i._getStripGraphicAttributes(e,t),a=o.startAngle+(o.endAngle-o.startAngle)/2,r=(0,n.getCosAndSin)(a),l=i.getRadius()/2,d=i.getCenter();return{x:_(d.x+l*r.cos),y:_(d.y-l*r.sin),align:s.default.center}},_getConstantLineGraphicAttributes:function(e){const t=this.getCenter(),i=this.getRadius();return{points:[t.x,t.y,t.x+i,t.y]}},_createConstantLine:function(e,t){return this._createPathElement(this._getConstantLineGraphicAttributes(e).points,t)},_rotateConstantLine(e,t){const{x:i,y:n}=this.getCenter();e.rotate(t+this.getAngles()[0],i,n)},_getConstantLineLabelsCoords:function(e){const t=this,i=(0,n.getCosAndSin)(-e-t.getAngles()[0]),o=t.getRadius()/2,a=t.getCenter();return{x:_(a.x+o*i.cos),y:_(a.y-o*i.sin)}},_checkAlignmentConstantLineLabels:u.noop,_adjustDivisionFactor:function(e){return 180*e/(this.getRadius()*h)},_getScreenDelta:function(){const e=this.getAngles();return p(e[0]-e[1])},_getTickMarkPoints:function(e,t,i){let{shift:n=0}=i;const o=this.getCenter(),a=this.getRadius()+t*{inside:-1,center:-.5,outside:0}[this._options.tickOrientation||"center"];return[o.x+a+n,o.y,o.x+a+t+n,o.y]},_getLabelAdjustedCoord:function(e,t,i,o){const a=this,s=e.labelCoords,r=s.y,l=s.angle,d=(0,n.getCosAndSin)(l),u=d.cos,c=d.sin,h=e.labelBBox,p=h.width/2,g=h.height/2,_=a._options.label.indentFromAxis||0,f=s.x+_*u,m=r+(r-h.y-g)+_*c;let v=0,C=0;switch(y(l)){case 1:v=p,C=g*c;break;case 2:v=p*u,C=g;break;case 3:v=-p,C=g*c;break;case 4:v=p*u,C=-g}if(o){const e=a._canvas,t=f-s.x+v,i=m-s.y+C;h.x+t<e.originalLeft&&(v-=h.x+t-e.originalLeft),h.x+h.width+t>e.width-e.originalRight&&(v-=h.x+h.width+t-(e.width-e.originalRight)),h.y+i<e.originalTop&&(C-=h.y+i-e.originalTop),h.y+h.height+i>e.height-e.originalBottom&&(C-=h.y+h.height+i-(e.height-e.originalBottom))}return{x:f+v,y:m+C}},_getGridLineDrawer:function(){const e=this;return function(t,i){const n=e.getCenter();return e._createPathElement(e._getGridPoints().points,i).rotate(t.coords.angle,n.x,n.y)}},_getGridPoints:function(){const e=this.getRadius(),t=this.getCenter();return{points:[t.x,t.y,t.x+e,t.y]}},_getTranslatedValue:function(e,t){const i=this.getAngles()[0],o=this._translator.translate(e,-t),a=(0,n.convertPolarToXY)(this.getCenter(),i,o,this.getRadius());return{x:a.x,y:a.y,angle:this.getTranslatedAngle(o)}},_getAdjustedStripLabelCoords:function(e){const t=e.labelBBox;return{translateY:e.label.attr("y")-t.y-t.height/2}},coordsIn:function(e,t){return(0,n.convertXYToPolar)(this.getCenter(),e,t).r>this.getRadius()},_rotateTick:function(e,t){const i=this.getCenter();e.rotate(t.angle,i.x,i.y)},_validateOverlappingMode:function(e){return s.default.validateOverlappingMode(e)},_validateDisplayMode:function(){return"standard"},_getStep:function(e){const t=this,i=t.getRadius()+(t._options.label.indentFromAxis||0),n=e.reduce((function(e,t){const i=e;return e.width<t.width&&(i.width=t.width),e.height<t.height&&(i.height=t.height),i}),{width:0,height:0}),o=p(2*g(n.height/(2*i-n.width))*180/h),a=p(2*g(n.width/(2*i-n.height))*180/h);return s.default.getTicksCountInRange(t._majorTicks,"angle",m(o,a))},_checkBoundedLabelsOverlapping:function(e,t,i){const n=this._options.label;if("hide"!==(i=i||this._validateOverlappingMode(n.overlappingBehavior)))return;const o=e.reduce(((e,t,i)=>t.label?i:e),null);o&&s.default.areLabelsOverlap(t[0],t[o],n.minSpacing,s.default.center)&&("first"===n.hideFirstOrLast?e[0].removeLabel():e[o].removeLabel())},shift:function(e){this._axisGroup.attr({translateX:e.right,translateY:e.bottom}),this._axisElementsGroup.attr({translateX:e.right,translateY:e.bottom})},getTranslatedAngle(e){return e+this.getAngles()[0]-C}},x=(t.circular=b,t.circularSpider=(0,a.extend)({},b,{_createAxisElement:function(){return this._renderer.path([],"area")},_updateAxisElementPosition:function(){this._axisElement.attr({points:(0,n.map)(this.getSpiderTicks(),(function(e){return{x:e.coords.x,y:e.coords.y}}))})},_getStick:function(){return!0},_getSpiderCategoryOption:function(){return!0},getSpiderTicks:function(){const e=this,t=e.getFullTicks();return e._spiderTicks=t.map((0,l.tick)(e,e.renderer,{},{},e._getSkippedCategory(t),!0)),e._spiderTicks.forEach((function(e){e.initCoords()})),e._spiderTicks},_getStripGraphicAttributes:function(e,t){const i=this.getCenter(),n=this.getSpiderTicks();let o,a,s,r;const l=[];let d=0;const u=n.length;for(;d<u;)r=n[d].coords,r.angle>=e&&r.angle<=t&&(o||(o=(n[d-1]||n[n.length-1]).coords,l.push((r.x+o.x)/2,(r.y+o.y)/2)),l.push(r.x,r.y),s=(n[d+1]||n[0]).coords,a={x:(r.x+s.x)/2,y:(r.y+s.y)/2}),d++;return l.push(a.x,a.y),l.push(i.x,i.y),{points:l}},_createStrip:function(e){let{points:t}=e;return this._renderer.path(t,"area")},_getTranslatedCoord:function(e,t){return this._translator.translate(e,t)-C},_setTickOffset:function(){this._tickOffset=!1}})),w=t.linear={_resetMargins(){this._reinitTranslator(this._getViewportRange())},_getStick:v._getStick,_getSpiderCategoryOption:u.noop,_getTranslatorOptions:function(){return{isHorizontal:!0,stick:this._getStick()}},getRadius:b.getRadius,getCenter:b.getCenter,getAngles:b.getAngles,_updateRadius:b._updateRadius,_updateCenter:b._updateCenter,_processCanvas(e){return this._updateRadius(e),this._updateCenter(e),{left:0,right:0,startPadding:e.startPadding,endPadding:e.endPadding,width:this.getRadius()}},_createAxisElement:v._createAxisElement,_updateAxisElementPosition:function(){const e=this.getCenter();this._axisElement.attr({points:[e.x,e.y,e.x+this.getRadius(),e.y]}).rotate(this.getAngles()[0]-C,e.x,e.y)},_getScreenDelta:function(){return this.getRadius()},_getTickMarkPoints:function(e,t){return[e.x-t/2,e.y,e.x+t/2,e.y]},_getLabelAdjustedCoord:function(e){const t=e.labelCoords,i=t.y,o=(0,n.getCosAndSin)(t.angle),a=this._options.label.indentFromAxis||0,s=e.labelBBox;return{x:t.x-p(a*o.sin)+p(s.width/2*o.cos)-s.width/2,y:i+(i-s.y)-p(s.height/2*o.sin)+p(a*o.cos)}},_getGridLineDrawer:function(){const e=this;return function(t,i){const n=e._getGridPoints(t.coords);return e._renderer.circle(n.cx,n.cy,n.r).attr(i).sharp()}},_getGridPoints:function(e){const t=this.getCenter(),i=(0,n.getDistance)(t.x,t.y,e.x,e.y);return i>this.getRadius()?{cx:null,cy:null,r:null}:{cx:t.x,cy:t.y,r:i}},_getTranslatedValue:function(e,t){const i=this.getAngles()[0],o=(0,n.convertPolarToXY)(this.getCenter(),i,0,this._translator.translate(e,t));return{x:o.x,y:o.y,angle:i-C}},_getTranslatedCoord:function(e,t){return this._translator.translate(e,t)},_getCanvasStartEnd(){const e=this.getTranslator().getBusinessRange().invert,t=[0,this.getRadius()];return e&&t.reverse(),{start:t[0],end:t[1]}},_getStripGraphicAttributes:function(e,t){const i=this.getCenter();return{x:i.x,y:i.y,innerRadius:e,outerRadius:t}},_createStrip:function(e){return this._renderer.arc(e.x,e.y,e.innerRadius,e.outerRadius,0,360)},_getAdjustedStripLabelCoords:b._getAdjustedStripLabelCoords,_getStripLabelCoords:function(e,t){const i=e+(t-e)/2,n=this.getCenter(),o=_(n.y-i);return{x:n.x,y:o,align:s.default.center}},_getConstantLineGraphicAttributes:function(e){const t=this.getCenter();return{cx:t.x,cy:t.y,r:e}},_createConstantLine:function(e,t){const i=this._getConstantLineGraphicAttributes(e);return this._renderer.circle(i.cx,i.cy,i.r).attr(t).sharp()},_getConstantLineLabelsCoords:function(e){const t=this.getCenter(),i=_(t.y-e);return{x:t.x,y:i}},_checkAlignmentConstantLineLabels:u.noop,_rotateTick:function(e,t,i){!i&&e.rotate(t.angle+C,t.x,t.y)},_validateOverlappingMode:b._validateOverlappingMode,_validateDisplayMode:b._validateDisplayMode,_getStep:function(e){const t=y(this.getAngles()[0]),i=this._options.label.minSpacing,n=2===t||4===t?function(e){return e.width+i}:function(e){return e.height},o=e.reduce(((e,t)=>m(e,n(t))),0);return s.default.getTicksCountInRange(this._majorTicks,2===t||4===t?"x":"y",o)}};t.linearSpider=(0,a.extend)({},w,{_createPathElement:function(e,t){return this._renderer.path(e,"area").attr(t).sharp()},setSpiderTicks:function(e){this._spiderTicks=e},_getGridLineDrawer:function(){const e=this;return function(t,i){return e._createPathElement(e._getGridPoints(t.coords).points,i)}},_getGridPoints:function(e){const t=this.getCenter(),i=(0,n.getDistance)(t.x,t.y,e.x,e.y);return this._getGridPointsByRadius(i)},_getGridPointsByRadius:function(e){const t=this.getCenter();return e>this.getRadius()?{points:null}:{points:(0,n.map)(this._spiderTicks,(function(i){const o=(0,n.getCosAndSin)(i.coords.angle);return{x:_(t.x+e*o.cos),y:_(t.y+e*o.sin)}}))}},_getStripGraphicAttributes:function(e,t){const i=this._getGridPointsByRadius(t).points;return{points:[this._getGridPointsByRadius(e).points,i.reverse()]}},_createStrip:x._createStrip,_getConstantLineGraphicAttributes:function(e){return this._getGridPointsByRadius(e)},_createConstantLine:function(e,t){return this._createPathElement(this._getConstantLineGraphicAttributes(e).points,t)}})},38528:function(e,t,i){t.formatRange=function(e){let{startValue:t,endValue:i,tickInterval:s,argumentFormat:r,axisOptions:{dataType:l,type:u,logarithmBase:c}}=e;if("discrete"===u)return"";if("datetime"===l)return function(e,t,i){const o=f(e,t),s=a.default.getDateFormatByTickInterval(i),r=b(n.default.getDateFormatByDifferences(o,s)),l=[];if(i in o){const o=function(e,t){let i=!1;for(const n in e)i?e[n]=!1:n===t?i=!0:e[n]=!0;return b(n.default.getDateFormatByDifferences(e))}(f(e,t),i),a=d(e,o);a&&l.push(a)}else{const i=function(e){let t=!1;for(const i in e)!0===e[i]||"hour"===i||t?(e[i]=!1,t=!0):!1===e[i]&&(e[i]=!0);return b(n.default.getDateFormatByDifferences(e))}(f(e,t)),o=d(e,i);o&&l.push(o),l.push(`${d(e,r)} - ${d(t,r)}`)}return l.join(", ")}(t,i,function(e){if((0,o.isObject)(e)){const t=Object.keys(e);if(1===t.reduce(((t,i)=>e[i]+t),0)){const i=t.filter((t=>1===e[t]))[0];return i.slice(0,i.length-1)}}return e}(s));const h={ticks:[],type:u,dataType:l,tickInterval:s,logarithmBase:c,labelOptions:{format:r}};return`${w(t,h)} - ${w(i,h)}`},t.smartFormatter=w;var n=l(i(2082)),o=i(11528),a=l(i(41380)),s=i(50254),r=i(28779);function l(e){return e&&e.__esModule?e:{default:e}}const d=n.default.format,{abs:u,floor:c}=Math,h="exponential",p=["fixedPoint","thousands","millions","billions","trillions",h],g=["millisecond","second","minute","hour","day","month","year"],_={week:"day",quarter:"month",shorttime:"hour",longtime:"second"};function f(e,t,i,n){n=_[n]||n;const o=g.indexOf(n);if(i){const e=a.default.getDatesDifferences(t,i);return e[n]&&function(e,t){for(let i=t;i<g.length-1;i++){const n=g[i];if(i===t){v(e,t+(e.millisecond?2:1));break}if(e[n]&&e.count>1){m(e,i);break}}}(e,o),e}{const i=a.default.getDatesDifferences(e,t),n=function(e,t){let i=!1;for(let n=g.length-1;n>=t;n--)if(e[g[n]]&&n-t>1){for(let n=0;n<=t;n++)m(e,n),i=!0;break}return i}(i,o);return n||1!==i.count||v(i,o),i}}function m(e,t){const i=g[t];e[i]&&(e[i]=!1,e.count--)}function v(e,t){const i=g[t];!1===e[i]&&(e[i]=!0,e.count++)}function C(e,t){let i,n,o,a=0;for(o=u(t-e[0]),i=1;i<e.length;i++)n=u(t-e[i]),n<o&&(o=n,a=i);return a}function y(e){return e.toString().split(".")}function b(e){let t;return(0,o.isFunction)(e)&&(t=e,e=null),{type:e,formatter:t}}function x(e,t){const i=u(e).toString();return(0,o.isExponential)(e)?Math.max(u((0,s.getExponent)(e)-(0,s.getExponent)(t)),u((0,s.getPrecision)(e)-(0,s.getPrecision)(t))):u((n=i.split(".")[1]).length-parseInt(n).toString().length-(0,s.getExponent)(t)+1);var n}function w(e,t){let i=t.tickInterval;const l=u(e).toString();let g=t.labelOptions.format;const _=t.ticks,m="logarithmic"===t.type;if(1!==_.length||0!==_.indexOf(e)||(0,o.isDefined)(i)||(i=u(e)>=1?1:(0,s.adjust)(1-u(e),e)),Object.is(e,-0)&&(e=0),!(0,o.isDefined)(g)&&"discrete"!==t.type&&e&&(10===t.logarithmBase||!m))if("datetime"!==t.dataType&&(0,o.isDefined)(i)){if(_.length&&-1===_.indexOf(e)){const t=C(_,e);i=(0,s.adjust)(u(e-_[t]),e)}if(m)return function(e){const t=(0,r.getAdjustedLog10)(u(e));let i;if(t>0)i=p[c(t/3)]||h;else{if(!(t<-4))return d((0,s.adjust)(e));i=h}return d(e,{type:i,precision:0})}(e);{let t=y(i);t<2&&(t=y(e)),g=t.length>1&&!(0,o.isExponential)(i)?{type:p[0],precision:t[1].length}:(0,o.isExponential)(i)&&(-1!==l.indexOf(".")||(0,o.isExponential)(e))?{type:h,precision:x(e,i)}:function(e,t){const i=c((0,r.getAdjustedLog10)(t));let n,o=0,a=n=c((0,r.getAdjustedLog10)(u(e)));n-i>=2&&(a=i);let s=c(a/3);const l=3*s;s<0&&(s=0);const d=p[s]||p[p.length-1];if(l>0){const e=y(t/Math.pow(10,l));e[1]&&(o=e[1].length)}return{precision:o,type:d}}(e,i)}}else"datetime"===t.dataType&&(g=function(e,t){let i,o,{showTransition:s,ticks:r,tickInterval:l}=t,d=a.default.getDateFormatByTickInterval(l);if(s&&r.length){const t=r.map(Number).indexOf(+e);if(1===r.length&&0===t)d=n.default.getDateFormatByTicks(r);else{-1===t?i=C(r,e):(i=0===t?r.length-1:t-1,o=0===t?1:-1);const a=f(r[i],e,r[o],d);d=n.default.getDateFormatByDifferences(a,d)}}return b(d)}(e,t));return d(e,g)}},38922:function(e,t,i){t.default=function(e,t){let i,s;const r=t.label||{};return{options:t,label:null,rect:null,_getCoord(){const i=e._getCanvasStartEnd(),n=e._translator.getBusinessRange();return e._getStripPos(t.startValue,t.endValue,i.start,i.end,n)},_drawLabel:t=>e._renderer.text(r.text,t.x,t.y).css((0,o.patchFontOptions)((0,a.extend)({},e.getOptions().label.font,r.font))).attr({align:"center",class:r.cssClass}).append(e._axisStripLabelGroup),draw(){if(!e._translator.getBusinessRange().isEmpty()&&((0,n.isDefined)(t.startValue)||(0,n.isDefined)(t.endValue))&&(0,n.isDefined)(t.color)){const i=this._getCoord();if(this.labelCoords=r.text?e._getStripLabelCoords(i.from,i.to,r):null,i.outOfCanvas||!(0,n.isDefined)(i.to)||!(0,n.isDefined)(i.from))return;this.rect=e._createStrip(e._getStripGraphicAttributes(i.from,i.to)).attr({fill:t.color}).append(e._axisStripGroup),this.label=r.text?this._drawLabel(this.labelCoords):null}},getContentContainer(){return this.label},removeLabel(){},updatePosition(n){const o=this._getCoord();n&&i?(this.label&&this.label.attr(e._getStripLabelCoords(i.from,i.to,t.label)),this.rect&&this.rect.attr(e._getStripGraphicAttributes(i.from,i.to)),this.label&&this.label.animate(e._getStripLabelCoords(o.from,o.to,t.label)),this.rect&&this.rect.animate(e._getStripGraphicAttributes(o.from,o.to))):(this.label&&this.label.attr(e._getStripLabelCoords(o.from,o.to,t.label)),this.rect&&this.rect.attr(e._getStripGraphicAttributes(o.from,o.to)))},saveCoords(){s=i,i=this._getCoord()},resetCoordinates(){i=s}}};var n=i(11528),o=i(28779),a=i(52576);e.exports=t.default,e.exports.default=t.default},99043:function(e,t,i){t.tick=function(e,t,i,r,l,d,u){const c=u||e._tickOffset,h=e._axisLineGroup,p=e._axisElementsGroup,g=s(i),_=s(r),f=/^\s+$/,m=e.getOptions().label,v=e._textOptions;function C(t){let i=e._textFontStyles;const n=m.customizeColor;return n&&n.call&&(i=(0,o.extend)({},e._textFontStyles,{fill:n.call(t,t)})),i}function y(t,i){const o=e.formatHint(t.value,m,i);(0,n.isDefined)(o)&&""!==o&&t.getContentContainer().setTitle(o)}return function(o){const s={value:o,updateValue(e){this.value=o=e},initCoords:function(){this.coords=e._getTranslatedValue(o,c),this.labelCoords=e._getTranslatedValue(o)},saveCoords(){this._lastStoredCoordinates={coords:this._storedCoords,labelCoords:this._storedLabelsCoords},this._storedCoords=this.coords,this._storedLabelsCoords=this.templateContainer?this._getTemplateCoords():this.labelCoords},resetCoordinates(){this._lastStoredCoordinates&&(this._storedCoords=this._lastStoredCoordinates.coords,this._storedLabelsCoords=this._lastStoredCoordinates.labelCoords)},drawMark(t){i.visible&&l!==o&&(e.areCoordsOutsideAxis(this.coords)||(this.mark?(this.mark.append(h),e.sharp(this.mark,e.getSharpDirectionByCoords(this.coords)),this.updateTickPosition(t)):(this.mark=e._createPathElement([],g,e.getSharpDirectionByCoords(this.coords)).append(h),this.updateTickPosition(t))))},setSkippedCategory(e){l=e},_updateLine(t,i,n,o,a){t&&(null!==i.points&&null!==i.r?(o&&n&&null!==n.points?(i.opacity=1,t.attr(n),t.animate(i)):(i.opacity=o?0:1,t.attr(i),o&&t.animate({opacity:1},{delay:.5,partitionDuration:.5})),this.coords.angle&&e._rotateTick(t,this.coords,a)):t.remove())},updateTickPosition:function(t,n){this._updateLine(this.mark,{points:e._getTickMarkPoints(s.coords,i.length,t)},this._storedCoords&&{points:e._getTickMarkPoints(s._storedCoords,i.length,t)},n,!1)},drawLabel:function(i,s){if(this.templateContainer&&e.isRendered())return void this.updateLabelPosition();if(!(m.visible&&!d&&!e.getTranslator().getBusinessRange().isEmpty()&&!e.areCoordsOutsideAxis(this.labelCoords)))return void(this.label&&this.removeLabel());const r=m.template,l=e.formatLabel(o,m,i);if(this.label)return this.label.attr({text:l,rotate:0}).append(p),y(this,i),void this.updateLabelPosition();r?(this.templateContainer=t.g().append(p),this._templateDef&&this._templateDef.reject(),this._templateDef=new a.Deferred,s.render({model:{valueText:l,value:this.value,labelFontStyle:C(this),labelStyle:v},container:this.templateContainer.element,onRendered:()=>{this.updateLabelPosition(),this._templateDef&&this._templateDef.resolve()}})):(0,n.isDefined)(l)&&""!==l&&!f.test(l)&&(this.label=t.text(l).css(C(this)).attr(v).append(p),this.updateLabelPosition(),y(this,i));const u=this.getContentContainer();u&&u.data("chart-data-argument",this.value),this.templateContainer&&y(this,i)},getTemplateDeferred(){return this._templateDef},getContentContainer(){return this.templateContainer||this.label},fadeOutElements(){const t={opacity:1},i={opacity:0},n={partitionDuration:.5};this.getContentContainer()&&this._fadeOutLabel(),this.grid&&this.grid.append(e._axisGridGroup).attr(t).animate(i,n),this.mark&&this.mark.append(e._axisLineGroup).attr(t).animate(i,n)},_fadeInLabel(){const t=e._renderer.g().attr({opacity:0}).append(e._axisElementsGroup).animate({opacity:1},{delay:.5,partitionDuration:.5});this.getContentContainer().append(t)},_fadeOutLabel(){const t=e._renderer.g().attr({opacity:1}).animate({opacity:0},{partitionDuration:.5}).append(e._axisElementsGroup).toBackground();this.getContentContainer().append(t)},_getTemplateCoords(){return e._getLabelAdjustedCoord(this,(e._constantLabelOffset||0)+(s.labelOffset||0))},updateLabelPosition:function(e){const t=this.templateContainer;if(this.getContentContainer())if(e&&this._storedLabelsCoords)if(t){t.attr(this._storedLabelsCoords);const e=this._getTemplateCoords();t.animate(e)}else this.label.attr({x:this._storedLabelsCoords.x,y:this._storedLabelsCoords.y}),this.label.animate({x:this.labelCoords.x,y:this.labelCoords.y});else{if(t){const e=this._getTemplateCoords();t.attr(e)}else this.label.attr({x:this.labelCoords.x,y:this.labelCoords.y});e&&this._fadeInLabel()}},updateMultilineTextAlignment(){!m.template&&this.label&&this.label.attr({textsAlignment:this.labelAlignment||e.getOptions().label.alignment})},drawGrid:function(t){r.visible&&l!==this.value&&(this.grid?(this.grid.append(e._axisGridGroup),e.sharp(this.grid,e.getSharpDirectionByCoords(this.coords)),this.updateGridPosition()):(this.grid=t(this,_),this.grid&&this.grid.append(e._axisGridGroup)))},updateGridPosition:function(t){this._updateLine(this.grid,e._getGridPoints(s.coords),this._storedCoords&&e._getGridPoints(this._storedCoords),t,!0)},removeLabel(){const e=this.getContentContainer();e&&e.remove(),this._templateDef&&this._templateDef.reject(),this._templateDef=this.templateContainer=this.label=null}};return s}};var n=i(11528),o=i(52576),a=i(87739);function s(e){return{stroke:e.color,"stroke-width":e.width,"stroke-opacity":e.opacity,opacity:1}}},64449:function(e,t,i){t.tickGenerator=void 0;var n,o=i(28779),a=(n=i(41380))&&n.__esModule?n:{default:n},s=i(11528),r=i(50254),l=i(52576);const d=a.default.convertDateUnitToMilliseconds,u=a.default.dateToMilliseconds,c=Math,h=c.abs,p=c.floor,g=c.ceil,_=c.pow,f=[1,2,2.5,5],m=[1,2,3,5],v={millisecond:[1,2,5,10,25,50,100,250,500],second:[1,2,3,5,10,15,20,30],minute:[1,2,3,5,10,15,20,30],hour:[1,2,3,4,6,8,12],day:[1,2],week:[1,2],month:[1,2,3,6]},C=(0,l.extend)({},v,{day:[1]}),y={millisecond:[1,2,5,10,25,50,100,250,500],second:[1,2,3,5,10,15,20,30],minute:[1,2,3,5,10,15,20,30],hour:[1,2,3,4,6,8,12],day:[1,2,3,7,14],month:[1,2,3,6]},b=[2,4,5,8,10];const x=e=>e,w=(e,t,i)=>n=>(0,o.getLogExt)(n,e,t,i),S=(e,t,i)=>(n,o)=>(0,r.adjust)(e(t((0,r.adjust)(i(n)/o))*o));function D(e,t,i,n){return(0,s.isDefined)(n)?n?e:t:function(n,o,a,r){const l=e(n,o);return n-l==0||!(0,s.isDefined)(a)||i(n,l,o,a)||r?l:t(n,o)}}function I(e,t,i,n){const a=i-h(t-e),s=c.max(g(n.businessDelta/i),2),r=n.screenDelta/(s*i),l=c.round(r*a),d=(0,o.getLogExt)(r*i/n.axisDivisionFactor,2)+1,u=(n.isSpacedMargin?2:1)*d,p=c.round(3*u);return n.businessDelta>n.interval&&l>=p}function E(e){return function(t,i,n,a){return I((0,o.getLogExt)(t,e),(0,o.getLogExt)(i,e),n,a)}}function T(e,t,i,n){return I(e.valueOf(),t.valueOf(),u(i),n)}function A(e,t){let i=0;return t&&(i=t.reduce(((e,t)=>e+(t.to-t.from)),0)),h(e.max-e.min-i)}function O(e,t,i,n){let o=t/i-(n||0);return o=o<1?1:o,e/o}function P(e,t){return _(10,p((0,o.getLogExt)(e,10))+(t||0))}function k(e,t,i,n,o,a,s,r,l,d){const u=O(e,t,o,r);let c=1;const h=!1===s;return n&&i||((u>=1||!h&&u>0)&&(c=M(u,a,h)),(!i||!n&&i<c)&&(i=c)),!n&&d&&(d=M(d,a,h))>i&&(i=d),i}function M(e,t,i){const n=P(e,-1);let o=1;return t=t||f,e>0&&(e/=n,o=t.concat(10*t[0]).map((e=>10*e)).reduce(((t,o)=>.1===n&&i&&25===o?t:t<e?o:t),0),o=(0,r.adjust)(o*n,n)),o}function R(e,t,i,n){const o=O(e,t,n);return i||b.reduce(((t,i)=>{const n=e/i;return n>=o?n:t}),0)}function L(e){return function(t,i){let n=P(t);return!e&&n<1&&(n=1),(i=i||m).concat(10*i[0]).reduce(((e,i)=>e<t?i*n:e),0)}}function B(e,t){return function(i,n){return!i&&e<=d(t,n)&&((i={})[t+"s"]=n),i}}function V(e,t){return function(i,n){const o=t*n;return!i&&e<=d("year",o)&&2.5!==o&&(i={years:o}),i}}function F(e,t,i,n,o,a,s,r,l,d){if(!n||!i){const s=H(O(e,t,o),a,null,l);(!i||!n&&u(i)<=u(s))&&(i=s)}return!n&&d&&(d=H(d,a,null,l),u(d)>u(i)&&(i=d)),i}function H(e,t,i,n){let o;t=t||function(e){return e&&e>2?C:v}(n);for(const i in t)if(o=t[i].reduce(B(e,i),o),o)break;if(!o)for(let t=1;o=f.reduce(V(e,t),o),!o;t*=10);return o}function N(e,t,i,n){return F(e,t,i,!0,n,y)}function z(e,t){return i=>i&&t(h((0,r.adjust)(e(i[1])-e(i[0]))))||void 0}function W(e,t,i){return a.default.addInterval(e,t,i)}function $(e,t,i){return W(e,t,i)}function G(e,t,i){return t=t.filter((e=>!e.gapSize)),function(n,o,a){let s;return n=e(n,o,a),t.every((t=>(n>=e(t.from,o)&&e(n,o)<t.to&&(s=t.to-t.from-2*(e(t.from,o)-t.from)),!s)))||(n=i(e(n,s),o)),n}}function j(e,t,i,n){return function(o,a,r,l,d,u,c,h,p){const g=function(e,t){return function(i){let n;return t.every((e=>(i>=e.from&&i<e.to&&(n=e.gapSize),!n)))||(i=e(i,n)),i}}(e,l),_=o.min,f=o.max,m={screenDelta:c,businessDelta:u,axisDivisionFactor:h,isSpacedMargin:o.isSpacedMargin,interval:a};let v=t(_,a,m);const C=[];let y;for(null!=d&&d.length&&(e=G(e,d,t)),v>f&&(v=t(_,i(u/2),m),v>f&&(v=t(_,a,m,r=!0))),v=g(v);v<f&&v!==y||p&&v<=f;)C.push(v),y=v,v=g(e(v,a));return(r||v-f==0||!(0,s.isDefined)(r)&&n(f,v,a,m))&&C.push(v),C}}function U(e,t,i,n,o){return function(a,s,r,l,d,u,c){const h=d/l,p=r[r.length-1],g=r[0];let _=c-1;if(null!=u&&u.length&&(t=G(t,u,i)),0===(l=e(l,g,g,h)))return[];let f=n(i(a,d,a),l);l=e(l,g,f,h);let m=[];for(;f<g&&(!_||_>0);)f>=a&&m.push(f),_--,f=t(f,l);const v=r.reduce(((i,o)=>{if(_=c-1,null===i.prevTick)return i.prevTick=o,i;l=e(l,o,i.prevTick,h);let a=n(i.prevTick,l);for(;a<o&&(!_||_>0);)a!==i.prevTick&&i.minors.push(a),_--,a=t(a,l);return i.prevTick=o,i}),{prevTick:null,minors:[]});m=m.concat(v.minors);const C=o(s,d,a);let y;for(l=e(l,C,C,h),f=n(p,l);f<s&&f!==y;)m.push(f),y=f,f=t(f,l);return p-s!=0&&f-s==0&&m.push(f),m}}function K(e,t){if(t.length){const i=t.reduce(((t,i)=>{const n=[];let o;for(o=t[1];o<e.length;o++){const t=e[o];if(t<i.from&&n.push(t),t>=i.to)break}return[t[0].concat(n),o]}),[[],0]);return i[0].concat(e.slice(i[1]))}return e}function Z(e,t,i,n,o,a,s,r,l,d){function u(t,i,n){return t&&i/s(t)>=n+1&&(e.incidentOccurred("W2003"),t=void 0),t}return function(c,h,p,g,_,f,m,v){_=_||{};const C=t(c,v);let y=function(e){return{tickInterval:o(e.majors),ticks:e.majors||[],minorTickInterval:a(e.minors),minorTicks:e.minors||[]}}(_);return isNaN(C)||(0!==C||_.majors?(y=function(t,n,o,a,s,l,c,h){if(c.majors)return t.breaks=h,t;const p=h.filter((e=>e.gapSize));let g;return s=e.skipCalculationLimits?s:u(s,o,a),s=i(o,a,s,l,e.axisDivisionFactor,e.numberMultipliers,e.allowDecimals,h.length,p[0]&&p[0].gapSize.days,e.minTickInterval),e.skipTickGeneration||(g=r(n,s,e.endOnTick,p,h,o,a,e.axisDivisionFactor,e.generateExtraTick),g=K(g,h=d(h,g,s)),t.breaks=h,t.ticks=t.ticks.concat(g)),t.tickInterval=s,t}(y,c,C,h,p,g,_,v||[]),!e.skipTickGeneration&&C>0&&(y=function(t,i,o,r,d,c,h){if(!e.calculateMinors)return t;if(h.minors)return t;const p=s(t.tickInterval),g=r*p/o,_=t.breaks;return!d&&c?d=a([p/(c+1),p/(c+1)*2]):c=void 0,d=u(d,p,g),d=n(p,g,d,e.minorAxisDivisionFactor),t.minorTicks=K(t.minorTicks.concat(l(i.min,i.max,t.ticks,d,t.tickInterval,_,c)),_),t.minorTickInterval=d,t}(y,c,C,h,f,m,_))):y.ticks=[c.min]),y}}function q(e,t,i,n){let[o,a]=t;return(!(0,s.isDefined)(o)||h(n(e)-n(o))/i>.25)&&((0,s.isDefined)(a)&&h(n(a)-n(o))/i<2?o=a:(0,s.isDefined)(o)||(o=e)),o}function Y(e,t,i){return function(n,o,a){const s=e(a),r=.5*s;return n.reduce(((e,n)=>{let a=o.filter((e=>e<=n.from));const l=i(q(n.from,[].concat(a[a.length-1],o[a.length]),s,t),r);a=o.filter((e=>e>=n.to));const d=i(q(n.to,[].concat(a[0],o[o.length-a.length-1]),s,t),-r);return t(d)-t(l)<s&&!n.gapSize?e:n.gapSize?e.concat([n]):e.concat([{from:l,to:d,cumulativeWidth:n.cumulativeWidth}])}),[])}}const X=(e,t,i)=>(n,o)=>(0,r.sign)(n)*(0,r.adjust)(e(t(n)((0,r.adjust)(i(n)/o))*o));function Q(e){const t=e.logBase,i=((e,t,i)=>n=>(0,o.raiseToExt)(n,e,t,i))(t,e.allowNegatives,e.linearThreshold),n=w(t,e.allowNegatives,e.linearThreshold),a=(e=>t=>0===t?0:(0,o.getLog)(h(t),e))(t),s=(e=>t=>(0,o.raiseTo)(t,e))(t),r=X(s,(e=>e<0?g:p),a),l=X(s,(e=>e<0?p:g),a),d=S(x,g,x);return Z(e,function(e,t,i){const n=w(e,t,i);return function(e,t){let i=0;return t&&(i=t.reduce(((e,t)=>e+h(n(t.to/t.from))),0)),g(h(n(e.max)-n(e.min))-i)}}(t,e.allowNegatives,e.linearThreshold),(u=e.skipCalculationLimits,function(e,t,i,n,o,a,s,r,l,d){const c=O(e,t,o);let h=0;const p=L(u);return n&&i||(c>0&&(h=p(c,a)),(!i||!n&&i<h)&&(i=h)),!n&&d&&(d=p(d,a))>i&&(i=d),i}),R,z(n,x),z(x,x),x,j(function(e,t){return(i,n,o)=>t(W(e(i),n,o))}(n,i),D(r,l,E(t),e.endOnTick),L(e.skipCalculationLimits),E(t)),U(((e,t,i,n)=>Math.max(Math.abs(t),Math.abs(i))/n),W,r,d,l),Y(x,n,((e,t)=>i(n(e)+t))));var u}t.tickGenerator=function(e){let t;return t=e.rangeIsEmpty?function(e){return function(t,i,n,o){let a=p(i/e.axisDivisionFactor);a=a<1?1:a;const s=i/a;return{ticks:s>0?Array.apply(null,new Array(a+1)).map(((e,t)=>s*t)):[],tickInterval:s}}}(e):"discrete"===e.axisType?function(e){return function(t,i,n,a){const s=(0,o.getCategoriesInfo)(t.categories,t.min,t.max).categories;return{ticks:s,tickInterval:g(s.length*e.axisDivisionFactor/i)}}}(e):"logarithmic"===e.axisType?Q(e):"datetime"===e.dataType?function(e){function t(t,i){const n=S(x,p,x);let o=(0,s.isString)(i)?a.default.getDateIntervalByString(i.toLowerCase()):i;const r=u(i);(o.days%7==0||i.quarters)&&(o=H(r));const l=t=>a.default.correctDateWithUnitBeginning(t,o,null,e.firstDayOfWeek),d=e=>new Date(p((e.getTime()-6e4*e.getTimezoneOffset())/r)*r+6e4*e.getTimezoneOffset());return t=l(t),"years"in o?t.setFullYear(n(t.getFullYear(),o.years)):"quarters"in o?t=l(d(t)):"months"in o?t.setMonth(n(t.getMonth(),o.months)):"weeks"in o||"days"in o?t=l(d(t)):"hours"in o?t.setHours(n(t.getHours(),o.hours)):"minutes"in o?t.setMinutes(n(t.getMinutes(),o.minutes)):"seconds"in o?t.setSeconds(n(t.getSeconds(),o.seconds)):"milliseconds"in o&&(t=d(t)),t}const i=z(x,a.default.convertMillisecondsToDateUnits);return Z(e,A,F,N,i,i,u,j($,D(t,(function(e,i){let n=t(e,i);for(;e-n>0;)n=$(n,i);return n}),T,e.endOnTick),H,T),U(x,$,t,$,x),Y(u,x,((e,t)=>new Date(e.getTime()+t))))}(e):function(e){const t=S(x,p,x),i=S(x,g,x),n=z(x,x);return Z(e,A,k,R,n,n,x,j(W,D(t,i,I,e.endOnTick),M,I),U(x,W,t,W,x),Y(x,x,((e,t)=>e+t)))}(e),t}},9441:function(e,t,i){t.default=void 0;var n=i(99857),o=h(i(2082)),a=h(i(41380)),s=i(52576),r=i(61914),l=i(17781),d=i(28779),u=i(11528),c=h(i(63885));function h(e){return e&&e.__esModule?e:{default:e}}const p=a.default.getNextDateUnit,g=a.default.correctDateWithUnitBeginning,_=Math,f=_.max,m=c.default.top,v=c.default.bottom,C=c.default.left,y=c.default.right,b=c.default.center,x={left:-1,top:-1,right:0,bottom:0,center:-.5};function w(e){return e.sort((function(e,t){return e.from-t.from}))}function S(e,t,i,n){let s=n;const r=t&&a.default.getDatesDifferences(t,e);return t&&"year"!==i&&(!function(e,t){let i,n;if("week"===t&&(t="day"),"quarter"===t&&(t="month"),e[t])for(n=0;n<a.default.dateUnitIntervals.length&&(i=a.default.dateUnitIntervals[n],e[i]&&(e[i]=!1,e.count--),i!==t);n++);}(r,i),s=o.default.getDateFormatByDifferences(r)),s}function D(e,t){return t.reduce((function(t,i){return f(t,e(i))}),0)}function I(e,t,i){return e.some((function(e){return e.label.verticalAlignment===t}))&&i||0}function E(e){return _.abs(e.x)||0}function T(e){return _.abs(e.width-_.abs(e.x))||0}t.default={linear:{_getStep:function(e,t){const i=this._options.label.minSpacing;let n=D(this._isHorizontal?function(e){return e.width+i}:function(e){return e.height},e);return t&&(n=function(e,t){const i=(t=(t=_.abs(t))%180>=90?90-t%90:t%90)*(_.PI/180);return i>=_.atan(e.height/e.width)?e.height/_.abs(_.sin(i)):e.width}({width:n,height:this._getMaxLabelHeight(e,0)},t)),c.default.getTicksCountInRange(this._majorTicks,this._isHorizontal?"x":"y",n)},_getMaxLabelHeight:function(e,t){return D((function(e){return e.height}),e)+t},_validateOverlappingMode:function(e,t){return this._isHorizontal&&("rotate"===t||"stagger"===t)||!this._isHorizontal?c.default.validateOverlappingMode(e):e},_validateDisplayMode:function(e){return this._isHorizontal?e:"standard"},getMarkerTrackers:function(){return this._markerTrackers},_getSharpParam:function(e){return this._isHorizontal^e?"h":"v"},_createAxisElement:function(){return this._renderer.path([],"line")},_updateAxisElementPosition:function(){const e=this._axisPosition,t=this._getCanvasStartEnd();this._axisElement.attr({points:this._isHorizontal?[t.start,e,t.end,e]:[e,t.start,e,t.end]})},_getTranslatedCoord:function(e,t){return this._translator.translate(e,t)},_initAxisPositions(){const e=this;e.customPositionIsAvailable()&&(e._customBoundaryPosition=e.getCustomBoundaryPosition()),!e.customPositionIsAvailable()||e.customPositionIsBoundary()?e._axisPosition=e.getPredefinedPosition(e.getResolvedBoundaryPosition()):e._axisPosition=e.getCustomPosition()},_getTickMarkPoints(e,t,i){const n=this._isHorizontal,o=this._options.tickOrientation,a=this._options.label.position;let s;if((0,u.isDefined)(o))s=x[o]*t;else{let e=i.shift||0;(!n&&a===C||n&&a!==v)&&(e=-e),s=e+this.getTickStartPositionShift(t)}return[e.x+(n?0:s),e.y+(n?s:0),e.x+(n?0:s+t),e.y+(n?s+t:0)]},getTickStartPositionShift(e){const t=this._options.width,i=this.getResolvedBoundaryPosition();return e%2==1?(t%2!=0||i!==C&&i!==m)&&(t%2!=1||i!==y&&i!==v||this.hasNonBoundaryPosition())?-Math.floor(e/2):Math.floor(-e/2):-e/2+(t%2==0?0:i===v||i===y?-1:1)},_getTitleCoords:function(){const e=this,t=e._isHorizontal;let i=e._axisPosition,n=e._axisPosition;const o=e._options.title.alignment,a=e._getCanvasStartEnd(),s=t||e._options.position===C,r=s?a.start:a.end,l=s?a.end:a.start,d=o===C?r:o===y?l:a.start+(a.end-a.start)/2;return t?i=d:n=d,{x:i,y:n}},_drawTitleText:function(e,t){const i=this._options,n=i.title,o={opacity:n.opacity,align:n.alignment,class:n.cssClass};if(!n.text||!e)return;t=t||this._getTitleCoords(),this._isHorizontal||(o.rotate=i.position===C?270:90);const a=this._renderer.text(n.text,t.x,t.y).css((0,d.patchFontOptions)(n.font)).attr(o).append(e);return this._checkTitleOverflow(a),a},_updateTitleCoords:function(){this._title&&this._title.element.attr(this._getTitleCoords())},_drawTitle:function(){const e=this._drawTitleText(this._axisTitleGroup);e&&(this._title={element:e})},_measureTitle:function(){this._title&&(this._title.bBox&&!this._title.originalSize&&(this._title.originalSize=this._title.bBox),this._title.bBox=this._title.element.getBBox())},_drawDateMarker:function(e,t,i){const n=this,o=n._options.marker,a=n._translator.getBusinessRange().invert,s=o.width+o.textLeftIndent;let r;if(null===t.x)return;t.withoutStick||(r=n._renderer.path([t.x,t.y,t.x,t.y+o.separatorHeight],"line").attr({"stroke-width":o.width,stroke:o.color,"stroke-opacity":o.opacity,sharp:"h"}).append(n._axisElementsGroup));const l=String(n.formatLabel(e,t.labelOptions,i));return{date:e,x:t.x,y:t.y,cropped:t.withoutStick,label:n._renderer.text(l,t.x,t.y).css((0,d.patchFontOptions)(o.label.font)).append(n._axisElementsGroup),line:r,getContentContainer(){return this.label},getEnd:function(){return this.x+(a?-1:1)*(s+this.labelBBox.width)},setTitle:function(){this.title=l},hideLabel:function(){this.label.dispose(),this.label=null,this.title=l},hide:function(){r&&(r.dispose(),r=null),this.label.dispose(),this.label=null,this.hidden=!0}}},_drawDateMarkers:function(){const e=this,t=e._options,i=e._translator,n=e._getViewportRange(),o=n.minVisible;let s,r=[];function l(t,o,a){return e._drawDateMarker(t,{x:i.translate(t),y:d,labelOptions:e._getLabelFormatOptions(o),withoutStick:a},n)}if(n.isEmpty()||!t.marker.visible||"datetime"!==t.argumentType||"discrete"===t.type||e._majorTicks.length<=1)return[];const d=e._axisPosition+t.marker.topIndent,u=a.default.getDateUnitInterval(this._tickInterval),c=function(e){let t=p(e);return"quarter"===t&&(t=p(t)),t}(u),h=function(e,t,i){const n=e;let o;return e=g(e,i),t=g(t,i),o=a.default.getSequenceByInterval(e,t,i),o.length&&n>o[0]&&(o=o.slice(1)),o}(o,n.maxVisible,c);return(h.length>1||1===h.length&&o<h[0])&&(r=h.reduce((function(e,t,i,n){const a=l(t,S(t,n[i-1]||o<t&&o,u,c));return a&&e.push(a),e}),[]),o<h[0]&&(s=l(o,S(o,h[0],u,c),!0),s&&r.unshift(s))),r},_adjustDateMarkers:function(e){e=e||0;const t=this,i=this._options.marker,n=i.width+i.textLeftIndent,o=this._translator.getBusinessRange().invert,a=t._getCanvasStartEnd(),s=this._dateMarkers;if(!s.length)return e;let r;return s[0].cropped&&(this._checkMarkersPosition(o,s[1],s[0])||s[0].hideLabel()),s.forEach((function(e,i,n){e.cropped||((o?e.getEnd()<a.end:e.getEnd()>a.end)?e.hideLabel():t._checkMarkersPosition(o,e,r)?r=e:e.hide())})),this._dateMarkers.forEach((function(t){if(t.label){const a=t.labelBBox,s=t.y+i.textTopIndent-a.y;t.label.attr({translateX:o?t.x-n-a.x-a.width:t.x+n-a.x,translateY:s+e})}t.line&&t.line.attr({translateY:e})})),t._initializeMarkersTrackers(e),e+i.topIndent+i.separatorHeight},_checkMarkersPosition:function(e,t,i){return void 0===i||(e?t.x<i.getEnd():t.x>i.getEnd())},_initializeMarkersTrackers:function(e){const t=this,i=t._options.marker.separatorHeight,n=t._renderer,o=this._translator.getBusinessRange(),a=t._getCanvasStartEnd(),s=t._axisElementsGroup;t._markerTrackers=this._dateMarkers.filter((function(e){return!e.hidden})).map((function(t,r,l){const d=l[r+1]||{x:a.end,date:o.max},u=t.x,c=t.y+e,h=n.path([u,c,u,c+i,d.x,c+i,d.x,c,u,c],"area").attr({"stroke-width":1,stroke:"grey",fill:"grey",opacity:1e-4}).append(s);return h.data("range",{startValue:t.date,endValue:d.date}),t.title&&h.setTitle(t.title),h}))},_getLabelFormatOptions:function(e){const t=this;let i=t._markerLabelOptions;return i||(t._markerLabelOptions=i=(0,s.extend)(!0,{},t._options.marker.label)),(0,u.isDefined)(t._options.marker.label.format)||(i.format=e),i},_adjustConstantLineLabels:function(e){const t=this,i=t._options.position,n=t.getCanvas(),o=n.left,a=n.width-n.right,s=n.top,r=n.height-n.bottom,l=s+(r-s)/2,d=o+(a-o)/2;let u=0;return e.forEach((function(e){const n=t._isHorizontal,c=e.options,h=c.paddingTopBottom,p=c.paddingLeftRight,g=c.label,_=g.verticalAlignment,m=g.horizontalAlignment,x="inside"===g.position,w=e.label,S=e.labelBBox;let D,I;if(null!==w&&!S.isEmpty){if(n)if(x)switch(D=m===C?e.coord-p-S.x-S.width:e.coord+p-S.x,_){case b:I=l-S.y-S.height/2;break;case v:I=r-h-S.y-S.height;break;default:I=s+h-S.y}else i===_&&(u=f(u,S.height+h)),D=e.coord-S.x-S.width/2,I=_===v?r+h-S.y:s-h-S.y-S.height;else if(x)switch(I=_===v?e.coord+h-S.y:e.coord-h-S.y-S.height,m){case b:D=d-S.x-S.width/2;break;case y:D=a-p-S.x-S.width;break;default:D=o+p-S.x}else i===m&&(u=f(u,S.width+p)),I=e.coord-S.y-S.height/2,D=m===y?a+p-S.x:o-p-S.x-S.width;w.attr({translateX:D,translateY:I})}})),u},_drawConstantLinesForEstimating:function(e){const t=this,i=this._renderer,n=i.g();return e.forEach((function(e){t._drawConstantLineLabelText(e.label.text,0,0,e.label,n).attr({align:"center"})})),n.append(i.root)},_estimateLabelHeight:function(e,t){let i=e.height;const n=t.drawingType;if("stagger"!==this._validateDisplayMode(n)&&"stagger"!==this._validateOverlappingMode(t.overlappingBehavior,n)||(i=2*i+t.staggeringSpacing),"rotate"===this._validateDisplayMode(n)||"rotate"===this._validateOverlappingMode(t.overlappingBehavior,n)){const n=(0,d.getCosAndSin)(t.rotationAngle);i=i*n.cos+e.width*n.sin}return i&&(i+t.indentFromAxis||0)||0},estimateMargins:function(e){this.updateCanvas(e);const{position:t,placeholderSize:i}=this._options,n=this,o=n._getViewportRange(),a=this._createTicksAndLabelFormat(o),s=a.ticks,r=a.tickInterval,l=this._options,d=n._outsideConstantLines.filter((e=>e.labelOptions.visible)).map((e=>e.options)),u=n._renderer.root,c=l.label.visible&&!o.isEmpty()&&s.length,h=c&&n.formatLabel(s[s.length-1],l.label,void 0,void 0,r,s),p=c&&n._renderer.text(h,0,0).css(n._textFontStyles).attr(n._textOptions).append(u),g=n._drawTitleText(u,{x:0,y:0}),_=n._drawConstantLinesForEstimating(d),m=!l.label.template&&p&&p.getBBox()||{x:0,y:0,width:0,height:0},v=g&&g.getBBox()||{x:0,y:0,width:0,height:0},C=_.getBBox(),y=v.height?v.height+l.title.margin:0,b=n._estimateLabelHeight(m,l.label),x=C.height?C.height+d.reduce((function(e,t){return f(e,t.paddingTopBottom)}),0):0;const w=b+y,S={left:f(E(m),E(C)),right:f(T(m),T(C)),top:("top"===l.position?w:0)+I(d,"top",x),bottom:("top"!==l.position?w:0)+I(d,"bottom",x)};return i&&(S[t]=i),p&&p.remove(),g&&g.remove(),_&&_.remove(),S},_checkAlignmentConstantLineLabels:function(e){const t=e.position;let i=(e.verticalAlignment||"").toLowerCase(),n=(e.horizontalAlignment||"").toLowerCase();this._isHorizontal?"outside"===t?(i=i===v?v:m,n=b):(i=i===b?b:i===v?v:m,n=n===C?C:y):"outside"===t?(i=b,n=n===C?C:y):(i=i===v?v:m,n=n===y?y:n===b?b:C),e.verticalAlignment=i,e.horizontalAlignment=n},_getConstantLineLabelsCoords:function(e,t){const i=this;let n=e,o=e;return i._isHorizontal?o=i._orthogonalPositions["top"===t.verticalAlignment?"start":"end"]:n=i._orthogonalPositions["right"===t.horizontalAlignment?"end":"start"],{x:n,y:o}},_getAdjustedStripLabelCoords:function(e){const t=e.options,i=t.paddingTopBottom,n=t.paddingLeftRight,o=t.label.horizontalAlignment,a=t.label.verticalAlignment,s=e.labelBBox,r=s.height,l=s.width,d=e.labelCoords;let u=d.y-s.y,c=d.x-s.x;return a===m?u+=i:a===b?u-=r/2:a===v&&(u-=i+r),o===C?c+=n:o===b?c-=l/2:o===y&&(c-=n+l),{translateX:c,translateY:u}},_adjustTitle:function(e){if(e=e||0,!this._title)return;const t=this,i=t._options,n=i.position,o=i.title.margin,a=t._title,s=a.bBox,r=s.x,l=s.y,d=s.width,u=s.height,c=t._axisPosition,h=c-o-e,p=c+o+e,g={};t._isHorizontal?g.translateY=n===m?h-(l+u):p-l:g.translateX=n===C?h-(r+d):p-r,a.element.attr(g)},_checkTitleOverflow:function(e){if(!this._title&&!e)return;const t=this._getScreenDelta(),i=e?{bBox:e.getBBox(),element:e}:this._title,n=this._options.title,o=i.bBox;if((this._isHorizontal?o.width:o.height)>t)i.element.setMaxSize(t,void 0,{wordWrap:n.wordWrap||"none",textOverflow:n.textOverflow||"ellipsis"}),this._wrapped=n.wordWrap&&"none"!==n.wordWrap;else{const e=i.originalSize&&t>(this._isHorizontal?i.originalSize.width:i.originalSize.height);!this._wrapped&&e&&i.element.restoreText()}},coordsIn:function(e,t){const i=this.getCanvas(),n=this._options.isHorizontal,o=this._options.position,a=n?t:e;return!(n&&(e<i.left||e>i.width-i.right)||!n&&(t<i.top||t>i.height-i.bottom))&&(n&&o===c.default.top||!n&&o===c.default.left?a<i[o]:a>i[n?"height":"width"]-i[o])},_boundaryTicksVisibility:{min:!0,max:!0},adjust(){const e=this,t=e._seriesData,i=e._series.filter((e=>e.isVisible())).reduce(((e,t)=>{const i=t.getViewport();return e.min=(0,u.isDefined)(i.min)?e.min<i.min?e.min:i.min:e.min,e.max=(0,u.isDefined)(i.max)?e.max>i.max?e.max:i.max:e.max,t.showZero&&(e=new n.Range(e)).correctValueZeroLevel(),e}),{});(0,u.isDefined)(i.min)&&(0,u.isDefined)(i.max)&&(t.minVisible=i.min,t.maxVisible=i.max),t.userBreaks=e._getScaleBreaks(e._options,{minVisible:t.minVisible,maxVisible:t.maxVisible},e._series,e.isArgumentAxis),e._translator.updateBusinessRange(e._getViewportRange())},hasWrap(){return this._wrapped},getAxisPosition(){return this._axisPosition},_getStick:function(){return!this._options.valueMarginsEnabled},_getStripLabelCoords:function(e,t,i){const n=this._orthogonalPositions,o=this._isHorizontal,a=i.horizontalAlignment,s=i.verticalAlignment;let r,l;return o?(a===b?r=e+(t-e)/2:a===C?r=e:a===y&&(r=t),l=n[function(e){let t="start";return"center"===e&&(t="center"),"bottom"===e&&(t="end"),t}(s)]):(r=n[function(e){let t="start";return"center"===e&&(t="center"),"right"===e&&(t="end"),t}(a)],s===m?l=e:s===b?l=t+(e-t)/2:s===v&&(l=t)),{x:r,y:l}},_getTranslatedValue:function(e,t){let i;"semidiscrete"===this._options.type&&(i=this._options.tickInterval);const n=this._translator.translate(e,t,!1,i),o=this._axisPosition,a=this._isHorizontal;return{x:a?n:o,y:a?o:n}},areCoordsOutsideAxis:function(e){const t=this._isHorizontal?e.x:e.y,i=this.getVisibleArea();return t<i[0]||t>i[1]},_getSkippedCategory:function(e){let t;return this._options.type===c.default.discrete&&this._tickOffset&&0!==e.length&&(t=e[e.length-1]),t},_filterBreaks:function(e,t,i){const n=t.minVisible,o=t.maxVisible,s=i?i.width:0;return e.reduce((function(e,t){let i=t.from,r=t.to;const l=e[e.length-1];let d;return(0,u.isDefined)(i)&&(0,u.isDefined)(r)?(i>r&&(r=[i,i=r][0]),e.length&&i<l.to?r>l.to&&(l.to=r>o?o:r,l.gapSize&&(l.gapSize=void 0,l.cumulativeWidth+=s)):(i>=n&&i<o||r<=o&&r>n)&&(i=i>=n?i:n,r=r<=o?r:o,r-i<o-n&&(d={from:i,to:r,cumulativeWidth:((null==l?void 0:l.cumulativeWidth)??0)+s},t.gapSize&&(d.gapSize=a.default.convertMillisecondsToDateUnits(r-i),d.cumulativeWidth=(null==l?void 0:l.cumulativeWidth)??0),e.push(d))),e):e}),[])},_getScaleBreaks:function(e,t,i,n){const o=this;let a=(e.breaks||[]).map((function(e){return{from:o.parser(e.startValue),to:o.parser(e.endValue)}}));return"discrete"!==e.type&&"datetime"===e.dataType&&e.workdaysOnly&&(a=a.concat((0,r.generateDateBreaks)(t.minVisible,t.maxVisible,e.workWeek,e.singleWorkdays,e.holidays))),!n&&"discrete"!==e.type&&"datetime"!==e.dataType&&e.autoBreaksEnabled&&0!==e.maxAutoBreakCount&&(a=a.concat(function(e,t,i){let{logarithmBase:n,type:o,maxAutoBreakCount:a}=e,{minVisible:s,maxVisible:r}=i;const l=[],c="logarithmic"===o?(e,t)=>(0,d.getLog)(t/e,n):(e,t)=>t-e;let h=c(s,r);const p=t.reduce(((e,t)=>{const i=t.getPointsInViewPort();return e[0]=e[0].concat(i[0]),e[1]=e[1].concat(i[1]),e}),[[],[]]);let g=.3*h;const f=function(e,t,i){let n,o,a=null;const s=[];let r,l,d;for(n=1,o=e.length;n<o;n++)r=e[n],l=e[n-1],d=i(r,l),t.indexOf(r)>=0?(!a||d>a.length)&&(a={start:r,end:l,length:d}):(a&&d<a.length?s.push(a):s.push({start:r,end:l,length:d}),a=null);return a&&s.push(a),s}(p[0].concat(p[1]).sort(((e,t)=>t-e)),p[1].filter((e=>p[0].indexOf(e)<0)),c).sort(((e,t)=>t.length-e.length)),m=_.min.apply(null,f.map((e=>e.length)))/1e3,v=(0,u.isDefined)(a)?_.min(a,f.length):f.length;for(let e=0;e<v&&f[e].length>=g&&!(h<=f[e].length);e++)h-=f[e].length,(h>m||h<-m)&&(l.push({from:f[e].start,to:f[e].end}),g=.3*h);return w(l),l}(e,i,t))),w(a)},_drawBreak:function(e,t,i,n,o,a){const s=this,r=e-(s._translator.isInverted()?0:n+1),l={"stroke-width":1,stroke:o.borderColor,sharp:o.isWaved?void 0:o.isHorizontal?"h":"v"},d={stroke:o.color,"stroke-width":n},u=s._isHorizontal?O:function(e){return e},c=A(s._renderer,a,u,t,r,i,o.isWaved);c(n/2,d),c(0,l),c(n,l)},_createBreakClipRect:function(e,t){const i=this,n=i._canvas,o=t-e;let a;return a=i._isHorizontal?i._renderer.clipRect(n.left,e,n.width,o):i._renderer.clipRect(e,n.top,o,n.height),i._breaksElements=i._breaksElements||[],i._breaksElements.push(a),a.id},_createBreaksGroup:function(e,t){const i=this,n=i._renderer.g().attr({class:i._axisCssPrefix+"breaks","clip-path":i._createBreakClipRect(e,t)}).append(i._scaleBreaksGroup);return i._breaksElements=i._breaksElements||[],i._breaksElements.push(n),n},_disposeBreaksGroup:function(){(this._breaksElements||[]).forEach((function(e){e.dispose()})),this._breaksElements=null},drawScaleBreaks:function(e){const t=this,i=t._options,n=i.breakStyle,o=i.position;let a,s;const r=t._translator.getBusinessRange().breaks||[];let l,d,u;if(t._disposeBreaksGroup(),!r||!r.length)return;const c={color:t._options.containerColor,borderColor:n.color,isHorizontal:t._isHorizontal,isWaved:"straight"!==n.line.toLowerCase()};e?(a=e.start,s=e.end):(a=t._orthogonalPositions.start-(!i.visible||t._axisShift||o!==C&&o!==m?0:3),s=t._orthogonalPositions.end+(!i.visible||o!==y&&o!==v?0:3));const h=t._createBreaksGroup(a,s);t._axisShift&&i.visible&&(d=t._axisPosition-t._axisShift-3,u=d+6,l=t._createBreaksGroup(d,u)),r.forEach((function(e){if(!e.gapSize){const o=t._getTranslatedCoord(e.to);t._drawBreak(o,a,s,n.width,c,h),t._axisShift&&i.visible&&t._drawBreak(o,d,u,n.width,c,l)}}))},_getSpiderCategoryOption:l.noop,shift:function(e){const t=this,i=t._options,n=i.isHorizontal,o=t.getMultipleAxesSpacing(),a=t._axisConstantLineGroups;function s(t,i){const a={translateX:0,translateY:0},s=e[t]?e[t]+o:0;return a[n?"translateY":"translateX"]=(t===C||t===m?-1:1)*s,(i[t]||i).attr(a),s}t._axisShift=s(i.position,t._axisGroup),s(i.position,t._axisElementsGroup),(n?[m,v]:[C,y]).forEach((e=>{s(e,a.above),s(e,a.under)}))},getCustomPosition(e){const t=this,i=t.getOrthogonalAxis(),n=e??t.getResolvedPositionOption(),o=t.getOptions().offset,a=i.getTranslator(),s=i.getOptions().type;let r,l=i.validateUnit(n);return"discrete"===s&&(!a._categories||a._categories.indexOf(l)<0)&&(l=void 0),r=t.positionIsBoundary(n)?t.getPredefinedPosition(n):(0,u.isDefined)(l)?a.to(l,-1):t.getPredefinedPosition(t.getOptions().position),isFinite(r)&&isFinite(o)&&(r+=o),r},getCustomBoundaryPosition(e){const t=this,{customPosition:i,offset:n}=t.getOptions(),o=e??t.getResolvedPositionOption(),a=t.getOrthogonalAxis(),s=a.getTranslator(),r=s.getCanvasVisibleArea();if(!(0,u.isDefined)(a._orthogonalPositions)||0===s.canvasLength)return;const l=t.getCustomPosition(o);if(!(0,u.isDefined)(l))return t.getResolvedBoundaryPosition();if((0,u.isDefined)(i)){if(l<=r.min)return t._isHorizontal?m:C;if(l>=r.max)return t._isHorizontal?v:y}else if((0,u.isDefined)(n)){if(l<=t._orthogonalPositions.start)return t._isHorizontal?m:C;if(l>=t._orthogonalPositions.end)return t._isHorizontal?v:y}return l},getResolvedPositionOption(){const e=this.getOptions();return e.customPosition??e.position},customPositionIsAvailable(){const e=this.getOptions();return(0,u.isDefined)(this.getOrthogonalAxis())&&((0,u.isDefined)(e.customPosition)||isFinite(e.offset))},hasNonBoundaryPosition(){return this.customPositionIsAvailable()&&!this.customPositionIsBoundary()},getResolvedBoundaryPosition(){return this.customPositionIsBoundary()?this._customBoundaryPosition:this.getOptions().position},customPositionEqualsToPredefined(){return this.customPositionIsBoundary()&&this._customBoundaryPosition===this.getOptions().position},customPositionIsBoundary(){return this.positionIsBoundary(this._customBoundaryPosition)},positionIsBoundary:e=>[m,C,v,y].indexOf(e)>=0,getPredefinedPosition(e){var t;return null===(t=this._orthogonalPositions)||void 0===t?void 0:t[e===m||e===C?"start":"end"]},resolveOverlappingForCustomPositioning(e){const t=this;if(!t.hasNonBoundaryPosition()&&!t.customPositionIsBoundary()&&!e.some((e=>e.hasNonBoundaryPosition())))return;const i={axes:[],ticks:[]};e.filter((e=>e.pane===t.pane)).forEach((e=>{for(let n=0;n<t._majorTicks.length;n++){const o=t._majorTicks[n],a=o.label;if(a){i.axes.indexOf(e)<0&&t._detectElementsOverlapping(a,e._axisElement)&&(i.axes.push(e),t._shiftThroughOrthogonalAxisOverlappedTick(a,e));for(let s=0;s<e._majorTicks.length;s++){const r=e._majorTicks[s].label;if(r&&t._detectElementsOverlapping(a,r)){i.ticks.push(o),t._shiftThroughAxisOverlappedTick(o),n=t._majorTicks.length;break}}}o.mark&&i.ticks.indexOf(o)<0&&(t._isHorizontal&&o.mark.attr("translateY")?o.mark.attr({translateY:0}):!t._isHorizontal&&o.mark.attr("translateX")&&o.mark.attr({translateX:0}))}}))},_shiftThroughOrthogonalAxisOverlappedTick(e,t){const i=this,n=e.getBBox(),o=t.getAxisPosition(),a=t.getOptions().label,s=a.position,r=a.indentFromAxis/2,l=i._isHorizontal?"translateX":"translateY",d=i._isHorizontal?C:m,u=e.attr(l),c=(i._isHorizontal?n.x:n.y)+u,h=o-c,p=c+(i._isHorizontal?n.width:n.height)-o,g={};g[l]=u,h>0&&p>0&&(p-h>1?g[l]+=h+r:h-p>1?g[l]-=p+r:g[l]+=s===d?h+r:-(p+r),e.attr(g))},_shiftThroughAxisOverlappedTick(e){var t;const i=this,n=e.label;if(!n)return;const o=n.getBBox(),a=null===(t=e.mark)||void 0===t?void 0:t.getBBox(),s=i.getAxisPosition(),r=i.getOptions().label,l=r.indentFromAxis,d=r.position,u=i._isHorizontal?m:C,c=i._isHorizontal?"translateY":"translateX",h=n.attr(c),p=(i._isHorizontal?o.y:o.x)+h,g=i._isHorizontal?o.height:o.width,_={};if(_[c]=h+(d===u?s-p+l:-(p-s+g+l)),n.attr(_),e.mark){const t=i._isHorizontal?a.height:a.width,n=d===u?1:-1;_[c]=n*(t-1),e.mark.attr(_)}},_detectElementsOverlapping(e,t){if(!e||!t)return!1;const i=e.getBBox(),n=i.x+e.attr("translateX"),o=i.y+e.attr("translateY"),a=t.getBBox(),s=a.x+t.attr("translateX"),r=a.y+t.attr("translateY");return(s>=n&&s<=n+i.width||n>=s&&n<=s+a.width)&&(r>=o&&r<=o+i.height||o>=r&&o<=r+a.height)}}};function A(e,t,i,n,o,a,s){const r=s?"bezier":"line",l=e.g().append(t);return function(t,d){e.path(i(function(e,t,i,n,o){if(!o)return[e,t+n,i,t+n];let a;t+=n;const s=t+0,r=t+2,l=t+4,d=[[e,r]];for(a=e;a<i+24;a+=24)d.push([a+6,s,a+6,s,a+12,r,a+18,l,a+18,l,a+24,r]);return[].concat.apply([],d)}(n,o,a,t,s)),r).attr(d).append(l)}}function O(e){const t=[];let i;for(i=0;i<e.length;i+=2)t.push(e[i+1]),t.push(e[i]);return t}e.exports=t.default,e.exports.default=t.default},84601:function(e,t,i){t.default=void 0;var n=i(15060);t.default=n.dxBarGauge;e.exports=t.default,e.exports.default=t.default},75954:function(e,t,i){t.default=void 0;var n,o=(n=i(92633))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},26408:function(e,t,i){t.default=void 0;var n,o=(n=i(3830))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},63512:function(e,t,i){t.Crosshair=f,t.getMargins=function(){return{x:u,y:c}};var n=i(28779),o=i(52576);const a=Math,s=a.abs,r=a.min,l=a.max,d=a.floor,u=8,c=4,h="right",p="bottom";function g(e){return{x:e.x-u,y:e.y-c,width:e.width+2*u,height:e.height+2*c}}function _(e,t,i,n){const o=i?["x","width","y","height",t,0]:["y","height","x","width",e,1];return function(e,t,a){const s={x:a.x,y:a.y},r=g(e),l=i?a.y-e.y-e.height/2:a.y-e.y;return s.y=i||!i&&t===p?a.y+l:a.y,r[o[0]]<0?s[o[0]]-=r[o[0]]:r[o[0]]+r[o[1]]+l*o[5]>n[o[1]]&&(s[o[0]]-=r[o[0]]+r[o[1]]+l*o[5]-n[o[1]]),o[4]-r[o[3]]/2<0?s[o[2]]-=o[4]-r[o[3]]/2:o[4]+r[o[3]]/2>n[o[3]]&&(s[o[2]]-=o[4]+r[o[3]]/2-n[o[3]]),s}}function f(e,t,i,n){const o=this;o._renderer=e,o._crosshairGroup=n,o._options={},o.update(t,i)}f.prototype={constructor:f,update:function(e,t){const i=this,n=t.canvas;i._canvas={top:n.top,bottom:n.height-n.bottom,left:n.left,right:n.width-n.right,width:n.width,height:n.height},i._axes=t.axes,i._panes=t.panes,i._prepareOptions(e,"horizontal"),i._prepareOptions(e,"vertical")},dispose:function(){const e=this;e._renderer=e._crosshairGroup=e._options=e._axes=e._canvas=e._horizontalGroup=e._verticalGroup=e._horizontal=e._vertical=e._circle=e._panes=null},_prepareOptions:function(e,t){const i=e[t+"Line"];this._options[t]={visible:i.visible,line:{stroke:i.color||e.color,"stroke-width":i.width||e.width,dashStyle:i.dashStyle||e.dashStyle,opacity:i.opacity||e.opacity,"stroke-linecap":"butt"},label:(0,o.extend)(!0,{},e.label,i.label)}},_createLines:function(e,t,i){const n=[],o=this._canvas,a=[o.left,o.top,o.left,o.top];for(let o=0;o<2;o++)n.push(this._renderer.path(a,"line").attr(e).sharp(t).append(i));return n},render:function(){const e=this,t=e._renderer,i=e._options,n=i.vertical,o=i.horizontal,a=o.visible?o.line:n.line,s={stroke:a.stroke,"stroke-width":a["stroke-width"],dashStyle:a.dashStyle,opacity:a.opacity},r=e._canvas;e._horizontal={},e._vertical={},e._circle=t.circle(r.left,r.top,0).attr(s).append(e._crosshairGroup),e._horizontalGroup=t.g().append(e._crosshairGroup),e._verticalGroup=t.g().append(e._crosshairGroup),n.visible&&(e._vertical.lines=e._createLines(n.line,"h",e._verticalGroup),e._vertical.labels=e._createLabels(e._axes[0],n,!1,e._verticalGroup)),o.visible&&(e._horizontal.lines=e._createLines(o.line,"v",e._horizontalGroup),e._horizontal.labels=e._createLabels(e._axes[1],o,!0,e._horizontalGroup)),e.hide()},_createLabels:function(e,t,i,o){const a=this._canvas,s=this._renderer;let r,l,d;const u=[];let c,g;const _=t.label;return _.visible&&e.forEach((function(e){const f=e.getOptions().position;if(e.getTranslator().getBusinessRange().isEmpty())return;g=e.getLabelsPosition(),i?(l=a.top,r=g):(r=a.left,l=g);const m="top"===f||f===p?"center":f===h?"left":h;c=s.rect(0,0,0,0).attr({fill:_.backgroundColor||t.line.stroke}).append(o),d=s.text("0",0,0).css((0,n.patchFontOptions)(t.label.font)).attr({align:m,class:_.cssClass}).append(o),u.push({text:d,background:c,axis:e,options:_,pos:{coord:g,side:f},startXY:{x:r,y:l}})})),u},_updateText:function(e,t,i,n,o){const a=this;i.forEach((function(i){const s=i.axis,r=i.startXY,l=i.text,d=i.background;let u="";s.name&&s.name!==t||(u=s.getFormattedValue(e,i.options,n)),u?(l.attr({text:u,x:r.x,y:r.y}),l.attr(o(l.getBBox(),i.pos.side,r)),a._updateLinesCanvas(i),d.attr(g(l.getBBox()))):(l.attr({text:""}),d.attr({x:0,y:0,width:0,height:0}))}))},hide:function(){this._crosshairGroup.attr({visibility:"hidden"})},_updateLinesCanvas:function(e){const t=e.pos.side,i=e.pos.coord,n=this._linesCanvas,o=this._canvas;n[t]=n[t]!==o[t]&&s(n[t]-o[t])<s(i-o[t])?n[t]:i},_updateLines:function(e,t,i,n,o){const a=this._linesCanvas,s=this._canvas,d=o?[[r(t-n,a.left),s.top,t-n,s.top],[t+n,s.top,l(a.right,t+n),s.top]]:[[s.left,r(a.top,i-n),s.left,i-n],[s.left,i+n,s.left,l(a.bottom,i+n)]];for(let n=0;n<2;n++)e[n].attr({points:d[n]}).sharp(o?"v":"h",o?i===s.bottom?-1:1:t===s.right?-1:1)},_resetLinesCanvas:function(){const e=this._canvas;this._linesCanvas={left:e.left,right:e.right,top:e.top,bottom:e.bottom}},_getClipRectForPane:function(e,t){const i=this._panes;let n,o;for(n=0;n<i.length;n++)if(o=i[n].coords,o.left<=e&&o.right>=e&&o.top<=t&&o.bottom>=t)return i[n].clipRect;return{id:null}},show:function(e){const t=this,i=e.point,n=i.getCrosshairData(e.x,e.y),o=i.getPointRadius(),a=t._horizontal,s=t._vertical,r=o?o+3:0,l=t._canvas,u=d(n.x),c=d(n.y);u>=l.left&&u<=l.right&&c>=l.top&&c<=l.bottom?(t._crosshairGroup.attr({visibility:"visible"}),t._resetLinesCanvas(),t._circle.attr({cx:u,cy:c,r:r,"clip-path":t._getClipRectForPane(u,c).id}),a.lines&&(t._updateText(n.yValue,n.axis,a.labels,i,_(u,c,!0,l)),t._updateLines(a.lines,u,c,r,!0),t._horizontalGroup.attr({translateY:c-l.top})),s.lines&&(t._updateText(n.xValue,n.axis,s.labels,i,_(u,c,!1,l)),t._updateLines(s.lines,u,c,r,!1),t._verticalGroup.attr({translateX:u-l.left}))):t.hide()}}},14580:function(e,t,i){t.LayoutManager=v;var n,o=i(11528),a=(n=i(7377))&&n.__esModule?n:{default:n},s=i(77461);const{floor:r,sqrt:l}=Math,d=Math.min,u=Math.max,c=a.default.radialLabelIndent;function h(e,t,i){let n;return n=i<e?e:t<i?t:i,n}function p(e){if(e._label.isVisible()&&"inside"!==e._label.getLayoutOptions().position)return e._label.getBoundingRect()}function g(e,t,i,n,o){return e.some((function(e){return e.getVisiblePoints().reduce((function(e,a){const s=p(a);if(s){const a=h(s.x,s.x+s.width,t),r=h(s.y,s.y+s.height,i);n=d(u(function(e,t,i,n){return l((e-i)*(e-i)+(t-n)*(t-n))}(a,r,t,i)-c,o),n),e=!0}return e}),!1)})),n}function _(e){return e.reduce((function(e,t){let i=t.getVisiblePoints().reduce((function(e,t){const i=p(t);return i&&i.width>e&&(e=i.width),e}),0),n=i;return i&&(e.outerLabelsCount++,e.outerLabelsCount>1&&(i+=a.default.pieLabelSpacing),n+=a.default.pieLabelSpacing),e.sizes.push(i),e.rSizes.push(n),e.common+=i,e}),{sizes:[],rSizes:[],common:0,outerLabelsCount:0})}function f(e,t,i,n,o,a){let s,l,d=0;const u=e.sizes,c=e.rSizes;for(l=0;l<i.length;l++)0!==u[l]?(s=r(s?s+c[l-1]:t),i[l].correctLabelRadius(s),d+=o||u[l],c[l]=o||c[l],i[l].setVisibleArea({left:r(a-t-d),right:r(n.width-(a+t+d)),top:n.top,bottom:n.bottom,width:n.width,height:n.height})):s&&(s+=c[l-1])}function m(e){let{type:t,innerRadius:i}=e;return"pie"===t?0:(0,o.isNumeric)(i)?Number(i):.5}function v(){}function C(e,t,i,n){return(e-t-c-i.left)/n.outerLabelsCount}function y(e,t,i,n,o,a){const s=_(i);let r;const l=function(e,t,i){return e-t.left-(i.outerLabelsCount>0?i.common+c:0)}(o,t,s);return l<n?r=C(o,e=n,t,s):e=d(g(i,o,a,e,n),l),f(s,e+c,i,t,r,o),e}function b(e){return new s.WrapperLayoutElement(null,{x:e.left,y:e.top,width:e.width-e.left-e.right,height:e.height-e.top-e.bottom})}v.prototype={constructor:v,setOptions:function(e){this._options=e},applyPieChartSeriesLayout:function(e,t,i){const n=e.height-e.top-e.bottom,a=e.width-e.left-e.right,s=a/2+e.left,l=n/2+e.top,u=this._options.piePercentage;let c,h;return(0,o.isNumeric)(u)?c=h=u*d(e.height,e.width)/2:(c=d(a,n)/2,h=this._options.minPiePercentage*c),i||(c=y(c,e,t,h,s,l)),{centerX:r(s),centerY:r(l),radiusInner:r(c*m(t[0])),radiusOuter:r(c)}},applyEqualPieChartLayout:function(e,t){const i=t.radius;return{centerX:r(t.x),centerY:r(t.y),radiusInner:r(i*m(e[0])),radiusOuter:r(i)}},correctPieLabelRadius:function(e,t,i){const n=_(e);let o;const a=t.radiusOuter+c,s=t.centerX-i.left-a;n.common+c>s&&(o=C(t.centerX,t.radiusOuter,i,n)),f(n,a,e,i,o,t.centerX)},needMoreSpaceForPanesCanvas(e,t,i){const n=this._options,a=n.width,s=n.height,r=n.piePercentage,l=(0,o.isNumeric)(r);let c=0,h=0;return e.forEach((e=>{const n=e.canvas,o=l?d(n.width,n.height)*r:void 0,p=i?i(e):{width:!1,height:!1},g=p.width?0:(l?o:a)-(n.width-n.left-n.right),_=p.height?0:(l?o:s)-(n.height-n.top-n.bottom);t?(c+=g>0?g:0,h=u(_>0?_:0,h)):(c=u(g>0?g:0,c),h+=_>0?_:0)})),(c>0||h>0)&&{width:c,height:h}},layoutInsideLegend:function(e,t){const i=e.getLayoutOptions();if(!i)return;const n=i.position,o=i.cutSide,a={horizontal:n.horizontal,vertical:n.vertical};t[i.cutLayoutSide]+="horizontal"===i.cutSide?i.width:i.height,a[o]={left:"right",right:"left",top:"bottom",bottom:"top",center:"center"}[a[o]],e.position({of:b(t),my:a,at:n})}}},57568:function(e,t,i){t.default=void 0;i(31951);var n=i(11528),o=i(21274),a=i(28779),s=i(50254);const r=Math,l=r.floor,d=r.max,u=r.abs;const c=e=>({transform:function(t,i){return(0,s.adjust)((0,a.getLogExt)(t,i,e.allowNegatives,e.linearThreshold))},getTicks:function(e,t,i){const n=[];let o=this.transform(t[0],i);for(;n.length<t.length;)n.push(o),o=(0,s.adjust)(o+e);return n}}),h=e=>({transform:function(t,i){return(0,s.adjust)((0,a.raiseToExt)(t,i,e.allowNegatives,e.linearThreshold))},getTicks:function(e,t,i){const n=[];let o;for(let e=0;e<t.length;e+=1)o=this.transform(t[e],i),n.push(o);return n}});function p(e,t){if(!e.isLogarithmic)return;const i=e.logarithmicBase,n=e.tickValues;e.minValue=t.transform(e.minValue,i),e.oldMinValue=t.transform(e.oldMinValue,i),e.maxValue=t.transform(e.maxValue,i),e.oldMaxValue=t.transform(e.oldMaxValue,i),e.tickInterval=r.round(e.tickInterval),e.tickInterval<1&&(e.tickInterval=1);const o=t.getTicks(e.tickInterval,n,i);o.tickInterval=e.tickInterval,e.tickValues=o}function g(e){return e.maxValue-e.minValue||1}function _(e){for(let t=0;t<e.length;t++)if(!e[t].stubData)return e[t];return null}const f={synchronize:function(e){(0,o.each)(function(e){const t={};return e.forEach((e=>{const i=e.pane;t[i]||(t[i]=[]),t[i].push(e)})),t}(e),(function(e,t){let i,o;if(t.length>1){if(i=function(e){return e.reduce((function(e,t){const i=t.getTicksValues(),o=i.majorTicksValues,a=t.getOptions(),s=t.getTranslator().getBusinessRange(),r=t.getVisibleArea();let l,d=t._tickInterval;const h=a.synchronizedValue,g=t.getViewport().action;if(o&&o.length>0&&(0,n.isNumeric)(o[0])&&"discrete"!==a.type&&!s.isEmpty()&&(!s.breaks||!s.breaks.length)&&"zoom"!==g&&"pan"!==g){t.applyMargins();const g=t.getTranslator().from(r[0]),_=t.getTranslator().from(r[1]);let f=g<_?g:_,m=g<_?_:g;f===m&&(0,n.isDefined)(h)&&(d=u(o[0]-h)||1,f=o[0]-d,m=o[0]+d),l={axis:t,isLogarithmic:"logarithmic"===a.type,logarithmicBase:s.base,tickValues:o,minorValues:i.minorTicksValues,minorTickInterval:t._minorTickInterval,minValue:f,oldMinValue:f,maxValue:m,oldMaxValue:m,inverted:s.invert,tickInterval:d,synchronizedValue:h},p(l,c(t.getTranslator().getBusinessRange())),e.push(l)}return e}),[])}(t),i.length<2||!_(i))return;!function(e){const t=e.reduce(((e,t)=>d(e,t.tickValues.length)),0);e.forEach((e=>{let i,o,a=0;const r=e.synchronizedValue,d=e.tickValues,u=e.tickInterval;if((0,n.isDefined)(r))e.baseTickValue=e.invertedBaseTickValue=r,e.tickValues=[e.baseTickValue];else{if(d.length>1&&u){for(i=l((t+1)/d.length),o=i>1?l((t+1)/i):t,a=l((o-d.length)/2);a>0&&0!==d[0];)d.unshift((0,s.adjust)(d[0]-u)),a--;for(;d.length<o;)d.push((0,s.adjust)(d[d.length-1]+u));e.tickInterval=u/i}e.baseTickValue=d[0],e.invertedBaseTickValue=d[d.length-1]}}))}(i),function(e){const t=_(e),i=t.tickInterval;e.forEach((e=>{let o,a,s,r;e!==t&&(i&&e.tickInterval&&(e.stubData&&(0,n.isDefined)(e.synchronizedValue)&&(e.oldMinValue=e.minValue=e.baseTickValue-(t.baseTickValue-t.minValue)/i*e.tickInterval,e.oldMaxValue=e.maxValue=e.baseTickValue-(t.baseTickValue-t.maxValue)/i*e.tickInterval),o=i/g(t)/e.tickInterval*g(e),e.maxValue=e.minValue+g(e)/o),s=t.inverted&&!e.inverted||!t.inverted&&e.inverted?t.maxValue-t.invertedBaseTickValue:t.baseTickValue-t.minValue,r=g(e),a=(s/g(t)-(e.baseTickValue-e.minValue)/r)*r,e.minValue-=a,e.maxValue-=a)}))}(i),o=function(e){let t,i,n=0,o=0;return e.forEach((e=>{const a=e.inverted;t=e.minValue>e.oldMinValue?(e.minValue-e.oldMinValue)/g(e):0,i=e.maxValue<e.oldMaxValue?(e.oldMaxValue-e.maxValue)/g(e):0,n=d(n,a?i:t),o=d(o,a?t:i)})),{start:n,end:o}}(i),o=function(e,t){return function(e){let t=!0,i=!0;return e.forEach((e=>{(e.oldMinValue>0||e.oldMaxValue>0)&&(i=!1),(e.oldMinValue<0||e.oldMaxValue<0)&&(t=!1)})),t||i}(e)?e.reduce(((e,t)=>{const i=t.inverted,{start:o,end:a}=t.axis.getCorrectedValuesToZero(t.minValue,t.maxValue);return(0,n.isDefined)(o)||(0,n.isDefined)(a)?i?{start:e.start,end:Math.min(e.end,a)}:{start:Math.min(e.start,o),end:e.end}:e}),t):t}(i,o),function(e,t){e.forEach((e=>{const i=g(e),n=e.inverted;e.minValue=(0,s.adjust)(e.minValue-t[n?"end":"start"]*i),e.maxValue=(0,s.adjust)(e.maxValue+t[n?"start":"end"]*i)}))}(i,o),function(e){const t=[];let i;e.forEach((e=>{e.oldMaxValue-e.oldMinValue==0?t.push(e):(0,n.isDefined)(i)||(0,n.isDefined)(e.synchronizedValue)||(i=u((e.maxValue-e.minValue)/(e.tickValues[l(e.tickValues.length/2)]-e.minValue||e.maxValue)))})),(0,n.isDefined)(i)&&t.forEach((e=>{const t=e.tickValues[0],n=t*i;t>0?(e.maxValue=n,e.minValue=0):t<0&&(e.minValue=n,e.maxValue=0)}))}(i),function(e){let t=!1;e.forEach((e=>{t=t||(0,n.isDefined)(e.synchronizedValue)})),e.forEach((e=>{const i=e.tickInterval,n=e.tickValues,o=e.maxValue,a=e.minValue;let r;if(t&&i){for(;(r=(0,s.adjust)(n[0]-i))>=a;)n.unshift(r);for(r=n[n.length-1];(r=(0,s.adjust)(r+i))<=o;)n.push(r)}for(;n[0]+i/10<a;)n.shift();for(;n[n.length-1]-i/10>o;)n.pop()}))}(i),function(e){e.forEach((function(e){if(!e.minorTickInterval)return;const t=[],i=e.minorTickInterval,n=e.tickInterval/i-1;for(let o=1;o<e.tickValues.length;o++){let a=e.tickValues[o-1];for(let e=0;e<n;e++)a+=i,t.push(a)}e.minorValues=t}))}(i),i.forEach((e=>{p(e,h(e.axis.getTranslator().getBusinessRange()))})),function(e){e.forEach((e=>{const t=e.axis,i=t.getTranslator().getBusinessRange();i.min===i.minVisible&&(i.min=e.minValue),i.max===i.maxVisible&&(i.max=e.maxValue),i.minVisible=e.minValue,i.maxVisible=e.maxValue,i.min>i.minVisible&&(i.min=i.minVisible),i.max<i.maxVisible&&(i.max=i.maxVisible),t.getTranslator().updateBusinessRange(i),t.setTicks({majorTicks:e.tickValues,minorTicks:e.minorValues})}))}(i)}}))}};t.default=f;e.exports=t.default,e.exports.default=t.default},68817:function(e,t,i){t.ScrollBar=void 0;var n,o=(n=i(92774))&&n.__esModule?n:{default:n},a=i(98834),s=i(52576),r=i(64174),l=i(11528),d=i(17781),u=i(59144);const c=Math.min,h=Math.max,p=function(e,t){this._translator=new r.Translator2D({},{},{}),this._scroll=e.rect().append(t),this._addEvents()};function g(e,t,i,n){let o=0;return"right"===t?o=e.width-e.right+i:"left"===t&&(o=e.left-i-n),o}function _(e,t,i,n){let o=0;return"top"===t?o=e.top-i:"bottom"===t&&(o=e.height-e.bottom+n+i),o}t.ScrollBar=p,p.prototype={_addEvents:function(){const e=this._scroll.element;o.default.on(e,u.start,(t=>{(0,a.fireEvent)({type:"dxc-scroll-start",originalEvent:t,target:e})})),o.default.on(e,u.move,(t=>{const i=-t.offset.x*this._scale,n=-t.offset.y*this._scale,o=this._offset-(this._layoutOptions.vertical?n:i)/this._scale;this._applyPosition(o,o+this._translator.canvasLength/this._scale),(0,a.fireEvent)({type:"dxc-scroll-move",originalEvent:t,target:e,offset:{x:i,y:n}})})),o.default.on(e,u.end,(t=>{(0,a.fireEvent)({type:"dxc-scroll-end",originalEvent:t,target:e,offset:{x:-t.offset.x*this._scale,y:-t.offset.y*this._scale}})}))},update:function(e){const t=this;let i=e.position;const n=e.rotated,o=n?"right":"top";return i!==o&&i!==(n?"left":"bottom")&&(i=o),t._scroll.attr({rotate:e.rotated?0:-90,rotateX:0,rotateY:0,fill:e.color,width:e.width,opacity:e.opacity}),t._layoutOptions={width:e.width,offset:e.offset,vertical:n,position:i},t},init:function(e,t){const i=this,n="discrete"===e.axisType;return i._translateWithOffset=n&&!t?1:0,i._translator.update((0,s.extend)({},e,{minVisible:null,maxVisible:null,visibleCategories:null},n&&{min:null,max:null}||{}),i._canvas,{isHorizontal:!i._layoutOptions.vertical,stick:t}),i},getOptions:function(){return this._layoutOptions},setPane:function(e){const t=this._layoutOptions.position;let i;return i="left"===t||"top"===t?e[0]:e[e.length-1],this.pane=i.name,this},updateSize:function(e){this._canvas=(0,s.extend)({},e);const t=this._layoutOptions,i=t.position,n=t.offset,o=t.width;this._scroll.attr({translateX:g(e,i,n,o),translateY:_(e,i,n,o)})},getMultipleAxesSpacing:function(){return 0},estimateMargins:function(){return this.getMargins()},getMargins:function(){const e=this._layoutOptions,t={left:0,top:0,right:0,bottom:0};return t[e.position]=e.width+e.offset,t},shift:function(e){const t=this,i=t._layoutOptions,n=i.position,o=i.vertical,a={translateX:t._scroll.attr("translateX")??0,translateY:t._scroll.attr("translateY")??0},s=e[n];a[o?"translateX":"translateY"]+=("left"===n||"top"===n?-1:1)*s,t._scroll.attr(a)},hideTitle:d.noop,hideOuterElements:d.noop,setPosition:function(e,t){const i=this,n=i._translator,o=(0,l.isDefined)(e)?n.translate(e,-i._translateWithOffset):n.translate("canvas_position_start"),a=(0,l.isDefined)(t)?n.translate(t,i._translateWithOffset):n.translate("canvas_position_end");i._offset=c(o,a),i._scale=n.getScale(e,t),i._applyPosition(c(o,a),h(o,a))},customPositionIsAvailable:()=>!1,dispose:function(){this._scroll.dispose(),this._scroll=this._translator=null},_applyPosition:function(e,t){const i=this._translator.getCanvasVisibleArea();e=h(e,i.min),e=c(e,i.max),t=c(t,i.max),t=h(t,i.min);const n=Math.abs(t-e);this._scroll.attr({y:e,height:n<2?2:n})}}},3023:function(e,t,i){t.default=void 0;var n=i(59144);const o=".shutter-zoom",a=n.start+o,s=n.move+o,r=n.end+o;function l(e,t,i,n){let o=Math.floor(i?n.pageY-e.top:n.pageX-e.left);const a=i?t.y1:t.x1,s=i?t.y2:t.x2;return o<a?o=a:o>s&&(o=s),o}function d(e){const t=e.chart,i=e.renderer,n=e.rotated,d=i.rect(0,0,0,0).attr(e.shutterOptions),u={rect:d,root:i.root,rotated:n,triggerStart:function(){t._eventTrigger("zoomStart")},triggerEnd:function(){const e=t._argumentAxes[0].getTranslator(),i=Math.min(this.startCoord,this.curCoord),n=Math.max(this.startCoord,this.curCoord);t._eventTrigger("zoomEnd",{rangeStart:e.from(i),rangeEnd:e.from(n)})},dispose:function(){i.root.off(o),d.dispose()},getRootOffset:function(){return i.getRootOffset()},getCanvas:function(){const e=t._canvas,i=t.panes,n=i[0].canvas,o=i[i.length-1].canvas;return{x1:n.left,y1:n.top,x2:e.width-o.right,y2:e.height-o.bottom,width:e.width-n.left-o.right,height:e.height-n.top-o.bottom}}};var c;return i.root.off(o).on(a,{direction:n?"vertical":"horizontal",immediate:!0},(c=u,function(e){const t=c.getRootOffset(),i=c.getCanvas();!function(e,t,i){const n=i.pageX-e.left,o=i.pageY-e.top;return n>=t.x1&&n<=t.x2&&o>=t.y1&&o<=t.y2}(t,i,e)?e.cancel=!0:(c.rootOffset=t,c.canvas=i,c.startCoord=l(t,i,c.rotated,e),c.triggerStart(),c.rect.attr({x:i.x1,y:i.y1,width:i.width,height:i.height}).append(c.root))})).on(s,function(e){return function(t){const i=l(e.rootOffset,e.canvas,e.rotated,t),n={};e.curCoord=i,n[e.rotated?"y":"x"]=Math.min(e.startCoord,i),n[e.rotated?"height":"width"]=Math.abs(e.startCoord-i),e.rect.attr(n)}}(u)).on(r,function(e){return function(t){e.triggerEnd(),e.rect.remove()}}(u)),u}t.default={name:"shutter_zoom",init:function(){const e=this.option("shutterZoom")||{};e.enabled&&(this._shutterZoom=d({chart:this,renderer:this._renderer,rotated:this.option("rotated"),shutterOptions:e}))},dispose:function(){this._shutterZoom&&this._shutterZoom.dispose()}};e.exports=t.default,e.exports.default=t.default},45912:function(e,t,i){t.PieTracker=t.ChartTracker=void 0;var n=_(i(64960)),o=_(i(92774)),a=i(64044),s=i(52576),r=i(21274),l=_(i(7377)),d=i(28779),u=_(i(89797)),c=i(98834),h=i(11528),p=i(17781),g=_(i(87129));function _(e){return e&&e.__esModule?e:{default:e}}const f=Math.floor,m=l.default.events,v=l.default.states,C=v.hoverMark,y=v.normalMark,b="dxChartTracker",x="."+b,w=(0,c.addNamespace)([u.default.down,u.default.move],b),S="legendClick",D="seriesClick",I="pointClick",E="chart-data-point",T="chart-data-series",A="chart-data-argument",O="none",P="allargumentpoints",k="includepoints",M=[k,"excludepoints",O];function R(e,t,i){const n=e.target;if("tspan"===n.tagName)return n.parentNode[t];const o=n[t];if(i&&!(0,h.isDefined)(o)){const e=function(i){if(i.parentNode)return(0,h.isDefined)(i.parentNode[t])?i.parentNode[t]:e(i.parentNode)};return e(n)}return o}function L(e,t,i){let{event:n,cancel:o}=e;const a=n.cancel,s=o||a;return a&&g.default.log("W0003",`${i}Click handler argument`,"event.cancel","22.1","Use the 'cancel' field instead"),s||!t.getOptions()}function B(e){const t=e.getOptions().hoverMode;return t===O?t:P}const V={ctor:function(e){const t=this,i={tracker:t};t._renderer=e.renderer,t._legend=e.legend,t._tooltip=e.tooltip,t._eventTrigger=e.eventTrigger,t._seriesGroup=e.seriesGroup,e.seriesGroup.off(x).on((0,c.addNamespace)(m.showPointTooltip,b),i,t._showPointTooltip).on((0,c.addNamespace)(m.hidePointTooltip,b),i,t._hidePointTooltip),t._renderer.root.off(x).on(w,i,t._pointerHandler).on((0,c.addNamespace)(u.default.up,b),(()=>clearTimeout(t._holdTimer))).on((0,c.addNamespace)(a.name,b),i,t._clickHandler)},update:function(e){this._chart=e.chart},updateSeries(e,t){const i=this,n=!(null!=e&&e.some((e=>e===i.hoveredSeries))||i._hoveredPoint&&i._hoveredPoint.series);i._storedSeries!==e&&(i._storedSeries=e||[]),n&&(i._clean(),i._renderer.initDefsElements()),t&&(i.clearSelection(),n||(i._hideTooltip(i.pointAtShownTooltip),i.clearHover()))},setCanvases:function(e,t){this._mainCanvas=e,this._canvases=t},repairTooltip:function(){const e=this.pointAtShownTooltip;e&&e.series&&e.isVisible()?this._showTooltip(e):this._hideTooltip(e,!0)},_setHoveredPoint:function(e){e!==this._hoveredPoint&&(this._releaseHoveredPoint(),e.hover(),this._hoveredPoint=e)},_releaseHoveredPoint:function(e){this._hoveredPoint&&this._hoveredPoint.getOptions()&&(this._hoveredPoint.clearHover(),this._hoveredPoint=null,this._tooltip.isEnabled()&&this._hideTooltip(this._hoveredPoint,!1,e))},_setHoveredSeries:function(e,t){this._releaseHoveredSeries(),this._releaseHoveredPoint(),e.hover(t),this.hoveredSeries=e},_releaseHoveredSeries(){this.hoveredSeries&&(this.hoveredSeries.clearHover(),this.hoveredSeries=null)},clearSelection(){this._storedSeries.forEach((e=>{e&&(e.clearSelection(),e.getPoints().forEach((e=>e.clearSelection())))}))},_clean:function(){const e=this;e.hoveredPoint=e.hoveredSeries=e._hoveredArgumentPoints=null,e._hideTooltip(e.pointAtShownTooltip)},clearHover:function(e){this._resetHoveredArgument(),this._releaseHoveredSeries(),this._releaseHoveredPoint(e)},_hideTooltip:function(e,t,i){const n=this;!n._tooltip||e&&n.pointAtShownTooltip!==e||(!t&&n.pointAtShownTooltip&&(n.pointAtShownTooltip=null),n._tooltip.hide(!!i))},_showTooltip:function(e){const t=this;let i;const n={target:e};if(null!=e&&e.getOptions()){if(i=e.getTooltipFormatObject(t._tooltip,t._tooltip.isShared()&&t._chart.getStackedPoints(e)),!(0,h.isDefined)(i.valueText)&&!i.points||!e.isVisible())return;const o=e.getTooltipParams(t._tooltip.getLocation()),a=t._renderer.getRootOffset();o.x+=a.left,o.y+=a.top;const s=i=>{i&&(t.pointAtShownTooltip=e)};s(t._tooltip.show(i,o,n,void 0,s))}},_showPointTooltip:function(e,t){const i=e.data.tracker,n=i.pointAtShownTooltip;n&&n!==t&&i._hideTooltip(n),i._showTooltip(t)},_hidePointTooltip:function(e,t){e.data.tracker._hideTooltip(t,!1,!0)},_enableOutHandler:function(){if(this._outHandler)return;const e=this,t=function(t){const i=e._renderer.getRootOffset(),n=f(t.pageX-i.left),o=f(t.pageY-i.top);(0,d.pointInCanvas)(e._mainCanvas,n,o)||e._isCursorOnTooltip(t)||(e._pointerOut(),e._disableOutHandler())};o.default.on(n.default.getDocument(),w,t),this._outHandler=t},_isCursorOnTooltip:function(e){return this._tooltip.isEnabled()&&this._tooltip.isCursorOnTooltip(e.pageX,e.pageY)},_disableOutHandler:function(){this._outHandler&&o.default.off(n.default.getDocument(),w,this._outHandler),this._outHandler=null},stopCurrentHandling:function(){this._pointerOut(!0)},_pointerOut:function(e){this.clearHover(!0),(e||this._tooltip.isEnabled())&&this._hideTooltip(this.pointAtShownTooltip,!1,!0)},_triggerLegendClick:function(e,t){const i=this._eventTrigger;i(S,e,(function(){!L(e,e.target,"legend")&&i(t,e)}))},_hoverLegendItem:function(e,t){const i=this,n=i._legend.getItemByCoord(e,t);let o;const a=(s=i._legend.getOptions().hoverMode,M.indexOf(s)>-1?s:k);var s;n?(o=i._storedSeries[n.id],o.isHovered()&&o.lastHoverMode===a||i._setHoveredSeries(o,a),i._tooltip.isEnabled()&&i._hideTooltip(i.pointAtShownTooltip)):i.clearHover()},_hoverArgument:function(e,t){const i=this,n=i._getArgumentHoverMode();(0,h.isDefined)(e)&&(i._releaseHoveredPoint(),i._hoveredArgument=e,i._argumentIndex=t,i._notifySeries({action:"pointHover",notifyLegend:i._notifyLegendOnHoverArgument,target:{argument:e,fullState:C,argumentIndex:t,getOptions:function(){return{hoverMode:n}}}}))},_resetHoveredArgument:function(){const e=this;let t;(0,h.isDefined)(e._hoveredArgument)&&(t=e._getArgumentHoverMode(),e._notifySeries({action:"clearPointHover",notifyLegend:e._notifyLegendOnHoverArgument,target:{fullState:y,argumentIndex:e._argumentIndex,argument:e._hoveredArgument,getOptions:function(){return{hoverMode:t}}}}),e._hoveredArgument=null)},_notifySeries:function(e){this._storedSeries.forEach((function(t){t.notify(e)}))},_pointerHandler:function(e){var t;const i=e.data.tracker,n=i._renderer.getRootOffset(),o=f(e.pageX-n.left),a=f(e.pageY-n.top),s=i._getCanvas(o,a);let r=R(e,T),l=R(e,E)||(null===(t=r)||void 0===t?void 0:t.getPointByCoord(o,a));if(i._isHolding=!1,clearTimeout(i._holdTimer),e.type===u.default.down&&(i._holdTimer=setTimeout((()=>i._isHolding=!0),300)),l&&!l.getMarkerVisibility()&&(l=void 0),i._enableOutHandler(),i._legend.coordsIn(o,a))i._hoverLegendItem(o,a);else if(i.hoveredSeries&&i.hoveredSeries!==i._stuckSeries&&i._releaseHoveredSeries(),!i._hoverArgumentAxis(o,a,e)&&(i._isPointerOut(s,l)&&i._pointerOut(),s||l)){if(r&&!l){if(l=r.getNeighborPoint(o,a),i._stickyHovering||!l||l.coordsIn(o,a)||(l=null),r!==i.hoveredSeries)return void i._setTimeout((function(){i._setHoveredSeries(r),i._setStuckSeries(e,r,o,a),i._pointerComplete(l,o,a)}),r)}else{if(l){if(e.type!==u.default.move&&"touch"!==e.pointerType)return;return void(i.hoveredSeries?i._setTimeout((()=>i._pointerOnPoint(l,o,a,e)),l):i._pointerOnPoint(l,o,a,e))}var d;i._setStuckSeries(e,void 0,o,a)&&i._stickyHovering?(r=i._stuckSeries,l=r.getNeighborPoint(o,a),i._releaseHoveredSeries(),(null===(d=l)||void 0===d?void 0:d.getMarkerVisibility())&&i._setHoveredPoint(l)):i._stickyHovering||i._pointerOut()}i._pointerComplete(l,o,a)}},_pointerOnPoint:function(e,t,i){this._resetHoveredArgument(),this._setHoveredPoint(e),this._pointerComplete(e,t,i)},_pointerComplete:function(e){this.pointAtShownTooltip!==e&&this._tooltip.isEnabled()&&this._showTooltip(e)},_clickHandler:function(e){var t;const i=e.data.tracker;if(i._isHolding)return;const n=i._renderer.getRootOffset(),o=f(e.pageX-n.left),a=f(e.pageY-n.top);let s=R(e,E);const r=i._stuckSeries||R(e,T)||(null===(t=s)||void 0===t?void 0:t.series),l=i._argumentAxis;if(i._legend.coordsIn(o,a)){const t=i._legend.getItemByCoord(o,a);t&&i._legendClick(t,e)}else if(null!=l&&l.coordsIn(o,a)){const t=R(e,A,!0);(0,h.isDefined)(t)&&i._eventTrigger("argumentAxisClick",{argument:t,event:e})}else if(r){var d;s=s||r.getPointByCoord(o,a),null!==(d=s)&&void 0!==d&&d.getMarkerVisibility()?i._pointClick(s,e):R(e,T)&&i._eventTrigger(D,{target:r,event:e})}},dispose:function(){const e=this;e._disableOutHandler(),e._renderer.root.off(x),e._seriesGroup.off(x)}},F=function(e){this.ctor(e)};t.ChartTracker=F,(0,s.extend)(F.prototype,V,{_pointClick:function(e,t){const i=this._eventTrigger,n=e.series,o={target:e,event:t};i(I,o,(function(){!L(o,n,"point")&&i(D,{target:n,event:t})}))},update:function(e){const t=this;V.update.call(this,e),t._argumentAxis=e.argumentAxis||{},t._axisHoverEnabled=t._argumentAxis&&(0,d.normalizeEnum)(t._argumentAxis.getOptions().hoverMode)===P,t._rotated=e.rotated,t._crosshair=e.crosshair,t._stickyHovering=e.stickyHovering},_getCanvas:function(e,t){const i=this._canvases||[];for(let n=0;n<i.length;n++){const o=i[n];if((0,d.pointInCanvas)(o,e,t))return o}return null},_isPointerOut:function(e){return!e&&this._stuckSeries},_hideCrosshair:function(){var e;null===(e=this._crosshair)||void 0===e||e.hide()},_moveCrosshair:function(e,t,i){this._crosshair&&null!=e&&e.isVisible()&&this._crosshair.show({point:e,x:t,y:i})},_clean:function(){const e=this;V._clean.call(e),e._resetTimer(),e._stuckSeries=null},_getSeriesForShared:function(e,t){var i;const n=this,o=[];let a=null,s=1/0;return n._tooltip.isShared()&&!n.hoveredSeries&&((0,r.each)(n._storedSeries,(function(i,n){const a=n.getNeighborPoint(e,t);a&&o.push(a)})),(0,r.each)(o,(function(i,n){const o=n.getCrosshairData(e,t),r=(0,d.getDistance)(e,t,o.x,o.y);r<s&&(a=n,s=r)}))),null===(i=a)||void 0===i?void 0:i.series},_setTimeout:function(e,t){const i=this;i._timeoutKeeper!==t&&(i._resetTimer(),i._hoverTimeout=setTimeout((function(){e(),i._timeoutKeeper=null}),100),i._timeoutKeeper=t)},_resetTimer:function(){clearTimeout(this._hoverTimeout),this._timeoutKeeper=this._hoverTimeout=null},_stopEvent:function(e){(0,h.isDefined)(e.cancelable)&&!e.cancelable||(e.preventDefault(),e.stopPropagation())},_setStuckSeries:function(e,t,i,n){return"mouse"!==e.pointerType?this._stuckSeries=null:this._stuckSeries=t||this._stuckSeries||this._getSeriesForShared(i,n),!!this._stuckSeries},_pointerOut:function(){const e=this;e._stuckSeries=null,e._hideCrosshair(),e._resetTimer(),V._pointerOut.apply(e,arguments)},_hoverArgumentAxis:function(e,t,i){const n=this;if(n._resetHoveredArgument(),n._axisHoverEnabled&&n._argumentAxis.coordsIn(e,t))return n._hoverArgument(R(i,A,!0)),!0},_pointerComplete:function(e,t,i){const n=this;n.hoveredSeries&&n.hoveredSeries.updateHover(t,i),n._resetTimer(),n._moveCrosshair(e,t,i),V._pointerComplete.call(n,e)},_legendClick:function(e,t){const i=this._storedSeries[e.id];this._triggerLegendClick({target:i,event:t},D)},_hoverLegendItem:function(e,t){this._stuckSeries=null,this._hideCrosshair(),V._hoverLegendItem.call(this,e,t)},_pointerOnPoint:function(e,t,i,n){this._setStuckSeries(n,e.series,t,i),this._releaseHoveredSeries(),V._pointerOnPoint.call(this,e,t,i,n)},_notifyLegendOnHoverArgument:!1,_getArgumentHoverMode:function(){return B(this._argumentAxis)},dispose:function(){this._resetTimer(),V.dispose.call(this)}});const H=function(e){this.ctor(e)};t.PieTracker=H,(0,s.extend)(H.prototype,V,{_isPointerOut:function(e,t){return!t},_legendClick:function(e,t){const i=[];this._storedSeries.forEach((t=>i.push.apply(i,t.getPointsByKeys(e.argument,e.argumentIndex)))),this._eventTrigger(S,{target:e.argument,points:i,event:t})},_pointClick:function(e,t){this._eventTrigger(I,{target:e,event:t})},_hoverLegendItem:function(e,t){const i=this,n=i._legend.getItemByCoord(e,t);n&&i._hoveredArgument!==n.argument?(i._resetHoveredArgument(),i._hoverArgument(n.argument,n.argumentIndex)):n||i.clearHover()},_getArgumentHoverMode:function(){return B(this._legend)},_hoverArgumentAxis:p.noop,_setStuckSeries:p.noop,_getCanvas:p.noop,_notifyLegendOnHoverArgument:!0})},37195:function(e,t,i){t.default=void 0;var n=i(11528),o=i(52576),a=i(28779),s=i(37373),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=d(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(37008)),l=i(59144);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(d=function(e){return e?i:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},u.apply(null,arguments)}const c=".zoomAndPanNS",h=l.start+c,p=l.move+c,g=l.end+c,_=r.pinchstart+c,f=r.pinch+c,m=r.pinchend+c,v="dxc-scroll-start"+c,C="dxc-scroll-move"+c,y="dxc-scroll-end"+c,b=Math.min,x=Math.max,w=Math.abs;function S(e){return{x:e.left,y:e.top,width:e.width-e.left-e.right,height:e.height-e.top-e.bottom}}function D(e,t){const i=t.x,n=t.y;return i>=e.x&&i<=e.width+e.x&&n>=e.y&&n<=e.height+e.y}function I(e){return e.filter((e=>!e.getTranslator().getBusinessRange().isEmpty()))}function E(e){return e.some((e=>!e.isExtremePosition(!1)||!e.isExtremePosition(!0)))}function T(e,t,i,n,o,a,s){const r=t&&e!==t,l=i(e),{stopInteraction:d,correctedRange:u}=e.checkZoomingLowerLimitOvercome(o,a,l),c=e.handleZooming(d?null:u,n(r),s,o);return d&&e.handleZoomEnd(),{stopInteraction:d,result:c}}function A(e,t,i,n,o,a){t=function(e,t){return t&&(e=e.sort(((e,i)=>e===t?-1:i===t?1:0))),e}(t,a);let s=!1;const r=e=>({start:!!e,end:!!e});return I(t).some((t=>{const l=t.getTranslator(),d=l.getMinScale(n),{stopInteraction:c,result:h}=T(t,a,i(u({scale:d,translator:l,axis:t},o)),r,"zoom",d,e);return s=!c,a&&h.isPrevented})),s}function O(e){e.originalEvent&&O(e.originalEvent),!1!==e.cancelable&&(e.cancel=!0)}t.default={name:"zoom_and_pan",init:function(){const e=this,t=this._renderer;function i(t,i){let n=[];const o=t.options,a=t.actionData;return o.argumentAxis[i]&&n.push(e.getArgumentAxis()),o.valueAxis[i]&&(n=n.concat(a.valueAxes)),n}function r(e,t,n){I(i(e,t)).some((e=>e.handleZooming(null,{end:!0},n,t).isPrevented))&&O(n)}function l(t,i,s,r,l){function d(e,t,s,l,d){let u={zoomed:!1};return t&&I(e).forEach((e=>{const t=e.getOptions(),c=e.visualRange(),h=e.getTranslator().getEventScale(l),p=-r(l,d,s,h);u=(0,o.extend)(!0,u,e.getTranslator().zoom(p,h,e.getZoomBounds()));const g=e.adjustRange((0,a.getVizRangeObject)([u.min,u.max])),{stopInteraction:_,correctedRange:f}=e.checkZoomingLowerLimitOvercome(i,h,g);if((0,n.isDefined)(c)&&c.startValue.valueOf()===f.startValue.valueOf()&&c.endValue.valueOf()===f.endValue.valueOf()){if("touch"===l.pointerType&&"discrete"===t.type){const i=e.isExtremePosition(!1),n=e.isExtremePosition(!0),o=h>1&&!_,a=h<1&&(!i||!n),s=1===h&&!(i&&(p<0&&!t.inverted||p>0&&t.inverted)||n&&(p>0&&!t.inverted||p<0&&t.inverted));u.enabled=o||a||s}}else e.handleZooming(_?null:f,{start:!0,end:!0},l,i),_||(u.zoomed=!0,u.deltaTranslate=p-u.translate)})),u}function u(e,t,i,n){i.zoomed&&(t.offset[n]=(e.offset?e.offset[n]:t.offset[n])+i.deltaTranslate)}function c(e,t,i,n){i.zoomed&&(t.center[n]=e[n]+i.deltaTranslate)}const h=e.option("rotated"),p=t.actionData,g=t.options;let _={},f={};p.fallback||(_=d(e._argumentAxes,g.argumentAxis[i],h?"y":"x",s,p),f=d(p.valueAxes,g.valueAxis[i],h?"x":"y",s,p),e._requestChange(["VISUAL_RANGE"]),u(s,p,_,h?"y":"x"),u(s,p,f,h?"x":"y"));const m=l(s);return c(m,p,_,h?"y":"x"),c(m,p,f,h?"x":"y"),_.zoomed||f.zoomed||(p.center=m),_.zoomed||f.zoomed||p.fallback||_.enabled||f.enabled}function d(t,n,o,a){function s(e,t,i,s){let r=!1;const l=o.scale||1,d=e=>{const n=e.getTranslator().zoom(-a(o,i,t,l),l,e.getZoomBounds());return{startValue:n.min,endValue:n.max}},u=e=>({start:!0,end:e});return I(e).forEach((e=>{r=!T(e,s,d,u,n,l,o).stopInteraction})),r}const r=e.option("rotated"),l=t.actionData,d=t.options;let u=!0;if(l.fallback)u&=d.argumentAxis[n]&&s(e._argumentAxes,r?"y":"x",l,e.getArgumentAxis()),u|=d.valueAxis[n]&&s(l.valueAxes,r?"x":"y",l);else{const e=i(t,n);I(e).forEach((e=>{e.handleZooming(null,{start:!0},o,n)})),u=e.length}u&&e._requestChange(["VISUAL_RANGE"])}function u(t,i){const o=e._argumentAxes.filter((e=>D(S(e.getCanvas()),t)));return{fallback:e._lastRenderingTime>300,cancel:!o.length||!(0,n.isDefined)(i),action:i,curAxisRect:o.length&&S(o[0].getCanvas()),valueAxes:o.length&&e._valueAxes.filter((e=>D(S(e.getCanvas()),t))),offset:{x:0,y:0},center:t,startCenter:t}}function P(e,i){const n=t.getRootOffset();return{x:b(x(i.pageX-n.left,e.x),e.width+e.x),y:b(x(i.pageY-n.top,e.y),e.height+e.y)}}function k(e){const i=t.getRootOffset(),n=e.pointers[0].pageX,o=e.pointers[1].pageX,a=e.pointers[0].pageY,s=e.pointers[1].pageY;return{x:b(n,o)+w(o-n)/2-i.left,y:b(a,s)+w(s-a)/2-i.top}}function M(e){const i=t.getRootOffset();return{x:e.pageX-i.left,y:e.pageY-i.top}}function R(e,t,i){return e.offset[i]-t.offset[i]}function L(t){!1!==t.cancelable&&(t.preventDefault(),t.stopPropagation()),e._stopCurrentHandling()}const B={dragStartHandler:function(e){const i=B.options,o="touch"===e.pointerType,s=i.argumentAxis.pan||i.valueAxis.pan,l=i.argumentAxis.zoom||i.valueAxis.zoom,d=(0,n.isDefined)(i.panKey)&&e[(0,a.normalizeEnum)(i.panKey)+"Key"],c=i.dragToZoom;let h;if(e._cancelPreventDefault=!0,o){if(i.allowTouchGestures&&s){h=!B.panningVisualRangeEnabled()||B.skipEvent?null:"pan"}}else c&&s&&d||!c&&s?h="pan":c&&l&&(h="zoom");const p=u(M(e),h);if(p.cancel)return B.skipEvent=!1,void(!1!==e.cancelable&&(e.cancel=!0));B.actionData=p,"zoom"===h?(p.startCoords=P(p.curAxisRect,e),p.rect=t.rect(0,0,0,0).attr(i.dragBoxStyle).append(t.root)):r(B,"pan",e)},dragHandler:function(t){const i=e.option("rotated"),n=B.options,o=B.actionData,a="touch"===t.pointerType;if(t._cancelPreventDefault=!0,o&&(!a||B.panningVisualRangeEnabled()))if("zoom"===o.action){L(t);const e=o.curAxisRect,a=o.startCoords,s=P(e,t),r=n.argumentAxis.zoom,l=n.valueAxis.zoom,d={x:b(a.x,s.x),y:b(a.y,s.y),width:w(a.x-s.x),height:w(a.y-s.y)};r&&l||(!r&&!i||!l&&i?(d.x=e.x,d.width=e.width):(d.y=e.y,d.height=e.height)),o.rect.attr(d)}else if("pan"===o.action){l(B,"pan",t,R,(e=>e.offset));const e=Math.abs(t.offset.y-o.offset.y),i=Math.abs(t.offset.x-o.offset.x);if(a&&(e>5&&e>Math.abs(o.offset.x)||i>5&&i>Math.abs(o.offset.y)))return;L(t)}},dragEndHandler:function(t){const i=e.option("rotated"),n=B.options,o=B.actionData,a="touch"===t.pointerType,s=e=>{let{translator:t,startCoord:i,curCoord:n}=e;return()=>[t.from(i),t.from(n)]},r=(e,t,i)=>({curCoord:e[i],startCoord:t[i]}),l=(e,t)=>e.zoom&&w(t.curCoord-t.startCoord)>5,u=o&&"pan"===o.action&&!o.fallback&&0===o.offset.x&&0===o.offset.y;if(o&&(!a||B.panningVisualRangeEnabled())&&!u){if(!a&&L(t),"zoom"===o.action){const a=P(o.curAxisRect,t),d=r(a,o.startCoords,i?"y":"x"),u=r(a,o.startCoords,i?"x":"y"),c=l(n.argumentAxis,d)&&A(t,e._argumentAxes,s,!0,d,e.getArgumentAxis());(l(n.valueAxis,u)&&A(t,o.valueAxes,s,!0,u)||c)&&e._requestChange(["VISUAL_RANGE"]),o.rect.dispose()}else"pan"===o.action&&d(B,"pan",t,R);B.actionData=null}},pinchStartHandler:function(e){const t=u(k(e),"zoom");t.cancel?O(e):(B.actionData=t,r(B,"zoom",e))},pinchHandler:function(e){B.actionData&&(l(B,"zoom",e,((e,t,i,n)=>k(e)[i]-t.center[i]+(t.center[i]-t.center[i]*n)),k),L(e))},pinchEndHandler:function(e){B.actionData&&(d(B,"zoom",e,((e,t,i,n)=>t.center[i]-t.startCenter[i]+(t.startCenter[i]-t.startCenter[i]*n))),B.actionData=null)},mouseWheelHandler:function(t){const i=B.options,n=e.option("rotated"),o=e=>{let{translator:t,coord:i,scale:n,axis:o}=e;return()=>{const e=t.zoom(-(i-i*n),n,o.getZoomBounds());return{startValue:e.min,endValue:e.max}}},a=M(t);let s,r=!1;if(i.valueAxis.zoom){if(s=e._valueAxes.filter((e=>D(S(e.getCanvas()),a))),0===s.length){const t=e._valueAxes.reduce(((e,t)=>(!e&&t.coordsIn(a.x,a.y)&&(e=t.getCanvas()),e)),null);t&&(s=e._valueAxes.filter((e=>D(S(e.getCanvas()),{x:t.left,y:t.top}))))}r|=A(t,s,o,t.delta>0,{coord:n?a.x:a.y})}if(i.argumentAxis.zoom){r|=e._argumentAxes.some((e=>!(!D(S(e.getCanvas()),a)&&!e.coordsIn(a.x,a.y))))&&A(t,e._argumentAxes,o,t.delta>0,{coord:n?a.y:a.x},e.getArgumentAxis())}r&&(e._requestChange(["VISUAL_RANGE"]),(s&&E(s)||!s&&B.panningVisualRangeEnabled())&&L(t))},cleanup:function(){t.root.off(c),B.actionData&&B.actionData.rect&&B.actionData.rect.dispose(),B.actionData=null,t.root.css({"touch-action":""})},setup:function(e){B.cleanup(),e.argumentAxis.pan||t.root.on(v,O),e.argumentAxis.none&&e.valueAxis.none||(B.options=e,(e.argumentAxis.zoom||e.valueAxis.zoom)&&e.allowMouseWheel&&t.root.on(s.name+c,B.mouseWheelHandler),(e.argumentAxis.zoom||e.valueAxis.zoom)&&e.allowTouchGestures&&t.root.on(_,{passive:!1},B.pinchStartHandler).on(f,{passive:!1},B.pinchHandler).on(m,B.pinchEndHandler),t.root.on(h,{immediate:!0,passive:!1},B.dragStartHandler).on(p,{immediate:!0,passive:!1},B.dragHandler).on(g,B.dragEndHandler),t.root.on(v,(function(e){B.actionData={valueAxes:[],offset:{x:0,y:0},center:{x:0,y:0}},L(e),r(B,"pan",e)})).on(C,(function(e){L(e),l(B,"pan",e,R,(e=>e.offset))})).on(y,(function(e){L(e),d(B,"pan",e,R),B.actionData=null})))},panningVisualRangeEnabled:function(){return E(e._valueAxes)||E(e._argumentAxes)}};this._zoomAndPan=B},members:{_setupZoomAndPan:function(){this._zoomAndPan.setup(this._themeManager.getOptions("zoomAndPan"))}},dispose:function(){this._zoomAndPan.cleanup()},customize:function(e){e.addChange({code:"ZOOM_AND_PAN",handler:function(){this._setupZoomAndPan()},isThemeDependent:!0,isOptionChange:!0,option:"zoomAndPan"})}};e.exports=t.default,e.exports.default=t.default},89463:function(e,t,i){t.default=void 0;var n,o=(n=i(59248))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},45647:function(e,t,i){t.ThemeManager=void 0;var n=i(17781),o=i(11528),a=i(52576),s=i(71671),r=i(28779);t.ThemeManager=s.BaseThemeManager.inherit(function(){const e=function(e){return e?((e=(0,a.extend)(!0,{},e)).title=(t=e.title,(0,o.isString)(t)?{text:t}:t),("logarithmic"===e.type&&e.logarithmBase<=0||e.logarithmBase&&!(0,o.isNumeric)(e.logarithmBase))&&(e.logarithmBase=void 0,e.logarithmBaseError=!0),e.label&&e.label.alignment&&(e.label.userAlignment=!0),e):{};var t},t=function(t,i,n){const s=this._theme,r=n^"valueAxis"===t?"verticalAxis":"horizontalAxis",l=e(i),d=e(this._userOptions.commonAxisSettings),u=(0,a.extend)(!0,{},s.commonAxisSettings,s[r],s[t],d,l);return u.workWeek=l.workWeek||s[t].workWeek,u.forceUserTickInterval|=(0,o.isDefined)(l.tickInterval)&&!(0,o.isDefined)(l.axisDivisionFactor),u},i=function(e,t){t=t||this._userOptions[e];const i=this._theme[e];let n=this._mergedSettings[e];return n||(n=(0,o.isPlainObject)(i)&&(0,o.isPlainObject)(t)?(0,a.extend)(!0,{},i,t):(0,o.isDefined)(t)?t:i,this._mergedSettings[e]=n,n)},s={base:i,argumentAxis:t,valueAxisRangeSelector:function(){return i.call(this,"valueAxis")},valueAxis:t,series:function(e,t,i){const n=this,o=n._theme;let l=n._userOptions.commonSeriesSettings||{};const d=o.commonSeriesSettings,u=n._themeSection.split(".").slice(-1)[0],c=(0,r.normalizeEnum)(t.type||l.type||d.type||"pie"===u&&o.type),h=n.palette,p=~c.indexOf("bar"),g=~c.indexOf("line"),_=~c.indexOf("area"),f="bubble"===c;let m;const v=n.getOptions("resolveLabelsOverlapping"),C=n.getOptions("containerBackgroundColor"),y=s.seriesTemplate.call(this);let b;(p||f)&&(b=(t=(0,a.extend)(!0,{},l,l[c],t)).visible,l={type:{}},(0,a.extend)(!0,t,t.point),t.visible=b);const x=(0,a.extend)(!0,{aggregation:{}},d,d[c],l,l[c],t);return x.aggregation.enabled="chart"===u&&!!x.aggregation.enabled,x.type=c,x.widgetType=u,x.containerBackgroundColor=C,m="pie"!==u?(0,r.extractColor)(x.color,!0)||h.getNextColor(i):function(e,t,i){const o=`${e}-${t}`;return n._multiPieColors[o]||(n._multiPieColors[o]=h.getNextColor(i)),n._multiPieColors[o]},x.mainSeriesColor=m,x.resolveLabelsOverlapping=v,x.label&&(g||_&&"rangearea"!==c||"scatter"===c)&&(x.label.position="outside"),y&&(x.nameField=y.nameField),x},animation:function(e){let t=this._userOptions[e];return t=(0,o.isPlainObject)(t)?t:(0,o.isDefined)(t)?{enabled:!!t}:{},i.call(this,e,t)},seriesTemplate(){const e=i.call(this,"seriesTemplate");return e&&(e.nameField=e.nameField||"series"),e},zoomAndPan(){function e(e){const t="pan"===(e=(0,r.normalizeEnum)(e))||"both"===e,i="zoom"===e||"both"===e;return{pan:t,zoom:i,none:!t&&!i}}const t=i.call(this,"zoomAndPan");return{valueAxis:e(t.valueAxis),argumentAxis:e(t.argumentAxis),dragToZoom:!!t.dragToZoom,dragBoxStyle:{class:"dxc-shutter",fill:t.dragBoxStyle.color,opacity:t.dragBoxStyle.opacity},panKey:t.panKey,allowMouseWheel:!!t.allowMouseWheel,allowTouchGestures:!!t.allowTouchGestures}}};return{_themeSection:"chart",ctor:function(e){const t=this;t.callBase.apply(t,arguments);const i=e.options||{};t._userOptions=i,t._mergeAxisTitleOptions=[],t._multiPieColors={},t._callback=n.noop},dispose:function(){const e=this;return e.palette&&e.palette.dispose(),e.palette=e._userOptions=e._mergedSettings=e._multiPieColors=null,e.callBase.apply(e,arguments)},resetPalette:function(){this.palette.reset(),this._multiPieColors={}},getOptions:function(e){return(s[e]||s.base).apply(this,arguments)},refresh:function(){return this._mergedSettings={},this.callBase.apply(this,arguments)},_initializeTheme:function(){const e=this;e.callBase.apply(e,arguments),e.updatePalette()},resetOptions:function(e){this._mergedSettings[e]=null},update:function(e){this._userOptions=e},updatePalette:function(){const e=this;e.palette=e.createPalette(e.getOptions("palette"),{useHighlight:!0,extensionMode:e.getOptions("paletteExtensionMode")})}}}())},7377:function(e,t){t.default=void 0;t.default={events:{mouseover:"mouseover",mouseout:"mouseout",mousemove:"mousemove",touchstart:"touchstart",touchmove:"touchmove",touchend:"touchend",mousedown:"mousedown",mouseup:"mouseup",click:"click",selectSeries:"selectseries",deselectSeries:"deselectseries",selectPoint:"selectpoint",deselectPoint:"deselectpoint",showPointTooltip:"showpointtooltip",hidePointTooltip:"hidepointtooltip"},states:{hover:"hover",normal:"normal",selection:"selection",normalMark:0,hoverMark:1,selectedMark:2,applyHover:"applyHover",applySelected:"applySelected",resetItem:"resetItem"},radialLabelIndent:30,pieLabelSpacing:10,pieSeriesSpacing:4};e.exports=t.default,e.exports.default=t.default},39104:function(e,t,i){t.validateData=function(e,t,i,o){e=function(e,t){const i=[],o=(0,n.isDefined)(e);let a,s,r,l,d=o&&!m(e);if(o&&!d)for(a=0,s=e.length,r=0;a<s;++a)l=e[a],(0,n.isObject)(l)?i[r++]=l:l&&(d=!0);d&&t("E2001");return i}(e,i),t.argumentType=t.argumentAxisType=null,s=t.groups,void s.forEach((function(e){e.valueType=e.valueAxisType=null,e.series.forEach((function(e){e.updateDataType({})})),e.valueAxis&&e.valueAxis.resetTypes(g)})),a=t.argumentAxes,void(a&&a.forEach((function(e){e.resetTypes(_)}))),function(e,t,i){const n=[],o=[],a=t.argumentOptions&&f(t.argumentOptions.argumentType);let s;t.groups.forEach((function(e){if(!e.series.length)return;const i=e.valueOptions&&f(e.valueOptions.valueType);e.valueType=i,t.argumentType=a,!i&&n.push(e),!a&&o.push(e)})),(n.length||o.length)&&(s=n.map((function(e,t){return t})),e.some((function(e){let a;if(n.forEach((function(t,i){(function(e,t){return e.series.forEach((function(i){i.getValueFields().forEach((function(i){e.valueType=b(t[i],e.valueType)}))})),e.valueType})(t,e)&&s.indexOf(i)>=0&&s.splice(i,1)})),a||o.forEach((function(i){a=function(e,t,i){return e.forEach((function(e){i.argumentType=b(t[e.getArgumentField()],i.argumentType)})),i.argumentType}(i.series,e,t)})),!i&&a&&0===s.length)return!0})))}(e,t,o.checkTypeForAllData),function(e,t){const i=e.argumentOptions||{},n=i&&i.categories||[],o=x(e.argumentType,i.type,!!n.length,t);e.groups.forEach((function(i){const n=i.valueOptions||{},a=n.categories||[],s=x(i.valueType,n.type,!!a.length,t);i.series.forEach((function(t){const a={};a.argumentAxisType=o,a.valueAxisType=s,e.argumentAxisType=e.argumentAxisType||a.argumentAxisType,i.valueAxisType=i.valueAxisType||a.valueAxisType,a.argumentType=e.argumentType,a.valueType=i.valueType,a.showZero=n.showZero,t.updateDataType(a)})),i.valueAxisType=i.valueAxisType||s,i.valueAxis&&(i.valueAxis.setTypes(i.valueAxisType,i.valueType,g),i.valueAxis.validate())})),e.argumentAxisType=e.argumentAxisType||o,e.argumentAxes&&e.argumentAxes.forEach((function(t){t.setTypes(e.argumentAxisType,e.argumentType,_),t.validate()}))}(t,i),o.convertToAxisDataType&&(e=function(e,t){const i=[];let n;const o=e.length;for(i.length=o,n=0;n<o;++n)i[n]=S(e[n],t);return i}(e,function(e,t){const i=w(e.argumentType,e.argumentAxisType,t);let n,o;const a=[i],s={},r=[];e.groups.forEach((function(e,r){e.series.forEach((function(d){o=w(e.valueType,e.valueAxisType,t),n=w(l,h,t),s[d.getArgumentField()]=i,d.getValueFields().forEach((function(e){a[r+1]=o,s[e]=o})),d.getSizeField()&&(s[d.getSizeField()]=n)}))}));for(const e in s)r.push([e,s[e]]);return r.length&&function(e,t){const i=e.argumentOptions&&e.argumentOptions.categories;e.groups.forEach((function(e,i){const n=e.valueOptions&&e.valueOptions.categories;n&&(e.valueOptions.categories=C(n,t[i+1]))})),i&&(e.argumentOptions.categories=C(i,t[0]))}(e,a),r}(t,i)));var a;var s;!function(e,t){const i=t.groups[0]&&t.groups[0].series[0];if(!i||"pie"!==i.type&&"doughnut"!==i.type&&"donut"!==i.type)return;t.groups.forEach((function(t){t.series.forEach((function(t){!function(e,t,i,o){const a=(o=o||{}).mode,s={};if(!a||"none"===a)return;s[t]=String(o.groupName||"others"),s[i]=0;const r=v(e.slice(),!1,(function(e){return e[i]}));(function(e,t,i,o){o>=0&&e.slice(o).forEach((function(e){(0,n.isDefined)(e[i])&&(t[i]+=e[i],e[i]=void 0)}))})(r,s,i,"smallValueThreshold"===a?function(e,t,i){let o;const a=e.length;let s;for(o=0;o<a&&(s=e[o][t],!((0,n.isDefined)(s)&&i>s));++o);return o}(r,i,o.threshold):o.topCount),s[i]&&e.push(s)}(e,t.getArgumentField(),t.getValueFields()[0],t.getOptions().smallValuesGrouping)}))}))}(e,t);return function(e,t,i,o){const a={},s=t.argumentAxisType===u,l=s&&t.argumentOptions&&t.argumentOptions.categories;let d=function(e){return e};const c=i.sortingMethod;let h;!l&&(0,n.isFunction)(c)&&(e=function(e,t){return e.slice().sort(t)}(e,c));s&&(t.categories=function(e,t,i){const o=i?i.slice():[];return t.forEach((function(t){e.forEach((function(e){const i=e[t];(0,n.isDefined)(i)&&function(e,t){return-1===e.map((function(e){return e.valueOf()})).indexOf(t.valueOf())}(o,i)&&o.push(i)}))})),o}(e,o,l));l||!(0,n.isFunction)(c)&&t.argumentType===r&&!i._skipArgumentSorting?d=function(e){const t={};return e.forEach((function(e,i){t[e]=i})),function(e,i){return v(e.slice(),!0,(function(e){return t[e[i]]}))}}(t.categories):!0===c&&t.argumentType!==r&&(d=I,h=s);o.forEach((function(t){a[t]=d(e,t)})),h&&(t.categories=t.categories.sort(D));return a}(e,t,o,function(e){const t=[],i={};return e.groups.forEach((function(e){e.series.forEach((function(e){var n,o,a;n=e.getArgumentField(),o=t,(a=i)[n]||(o.push(n),a[n]=!0)}))})),t}(t))};var n=i(11528),o=i(52576),a=i(28779),s=i(60976);const r="string",l="numeric",d="datetime",u="discrete",c="semidiscrete",h="continuous",p="logarithmic",g="valueType",_="argumentType",f=(0,a.enumParser)([r,l,d]),m=Array.isArray;function v(e,t,i){const o=t?function(e,t){return e-t}:function(e,t){return t-e};return e.sort((function(e,t){const a=i(e),s=i(t),r=(0,n.isDefined)(a)?1:0,l=(0,n.isDefined)(s)?1:0;return r&&l?o(a,s):o(r,l)})),e}function C(e,t){const i=[];return e.forEach((function(e){const n=t(e);void 0!==n&&i.push(n)})),i}function y(e){return e}function b(e,t){let i=t;return t===r||(0,n.isString)(e)?i=r:t===d||(0,n.isDate)(e)?i=d:(0,n.isNumeric)(e)&&(i=l),i}function x(e,t,i,n){return e!==r||t!==h&&t!==p&&t!==c||n("E2002"),t===p?p:i||t===u||e===r?u:t===c?c:h}function w(e,t,i){const o=e?(0,s.getParser)(e):y,a=t!==u?function(e){return isFinite(e)||void 0===e?e:null}:y;return function(e,t){const s=a(o(e));return void 0===s&&function(e,t,i){e&&i((0,n.isNumeric)(e)||(0,n.isDate)(e)||(0,n.isString)(e)?"E2004":"E2003",[t])}(e,t,i),s}}function S(e,t){let i;const n=t.length,a=(0,o.extend)({},e);let s,r;for(i=0;i<n;++i)s=t[i][0],r=e[s],a[s]=t[i][1](r,s);return a}function D(e,t){const i=e-t;return isNaN(i)?(0,n.isDefined)(e)?(0,n.isDefined)(t)?0:-1:1:i}function I(e,t){return e.slice().sort((function(e,i){return D(e[t],i[t])}))}},67056:function(e,t,i){t.plugin=t.Legend=void 0;var n=i(28779),o=i(52576),a=i(77461),s=i(11528),r=i(16216),l=i(22263),d=i(17781),u=i(63022),c=i(87739);const h=Number,p=Math,g=p.round,_=p.max,f=p.min,m=p.ceil,v=s.isDefined,C=s.isFunction,y=n.enumParser,b=n.normalizeEnum,x=o.extend,w="center",S="right",D="left",I="top",E="bottom",T="horizontal",A="vertical",O="inside",P="outside",k="none",M="height",R="width",L=y([D,w,S]),B=y([I,E]),V=y([A,T]),F=y([D,S,I,E]),H=y([P,O]),N=y([D,w,S]);function z(e,t,i){if(!e)return;const n=e.fill;return(0,o.extend)({},{state:i,fill:n===k?t:n,opacity:e.opacity,filter:e.filter,hatching:x({},e.hatching,{step:5,width:2})})}function W(e,t,i){const n=(0,u.processHatchingAttrs)(e,t);return n.fill&&0===n.fill.indexOf("DevExpress")&&(n.fill=(0,u.getFuncIri)(n.fill)),n.opacity=n.opacity>=0?n.opacity:1,(0,o.extend)({},n,{size:i})}function $(e,t,i,n){const o=t&&i[t[e]];o&&o.renderMarker(o.states[n])}function G(e,t,i){return e?(function(e){let t=e.margin;t>=0?(t=h(e.margin),t={top:t,bottom:t,left:t,right:t}):t={top:t.top>=0?h(t.top):10,bottom:t.bottom>=0?h(t.bottom):10,left:t.left>=0?h(t.left):10,right:t.right>=0?h(t.right):10},e.margin=t}(e),e.horizontalAlignment=L(e.horizontalAlignment,S),e.verticalAlignment=B(e.verticalAlignment,e.horizontalAlignment===w?E:I),e.orientation=V(e.orientation,e.horizontalAlignment===w?T:A),e.itemTextPosition=F(e.itemTextPosition,e.orientation===T?E:S),e.position=i?H(e.position,P):P,e.itemsAlignment=N(e.itemsAlignment,null),e.hoverMode=b(e.hoverMode),e.customizeText=C(e.customizeText)?e.customizeText:function(){return this[t]},e.customizeHint=C(e.customizeHint)?e.customizeHint:d.noop,e._incidentOccurred=e._incidentOccurred||d.noop,e):null}function j(e,t){return e.rect(0,0,t,t)}function U(e,t){return e.circle(t/2,t/2,t/2)}function K(e,t,i){return t>=e.left&&t<=e.right&&i>=e.top&&i<=e.bottom}function Z(e,t,i,n){const o={x:0,y:0};let a=0,s=0,r=0;if(r="y"===t.direction?n.top+n.bottom:n.left+n.right,e.forEach((function(e,i){const n=e[0],r=e.length;e.forEach((function(e,i){const n=e.offset||t.spacing;o[t.direction]+=e[t.measure]+(i!==r-1?n:0),a=_(a,o[t.direction])})),o[t.direction]=0,o[t.altDirection]+=n[t.altMeasure]+n.altOffset||t.altSpacing,s=_(s,o[t.altDirection])})),a+r>t.length)return t.countItem=function(e,t){return e.altCountItem++,m(t/e.altCountItem)}(t,i),!0}function q(e,t){return e.reduce(((e,i)=>{const n=i.offset||t.spacing;return e+i[t.measure]+n}),0)}function Y(e){switch(e.itemTextPosition){case E:return{horizontal:w,vertical:I};case I:return{horizontal:w,vertical:E};case D:return{horizontal:S,vertical:w};case S:return{horizontal:D,vertical:w}}}function X(e,t){const i=e.reduce(((e,i)=>{const n=i?i[t]:e;return _(e,n)}),0);e.forEach((e=>{e&&(e[t]=i)}))}function Q(e){const t=e.length,i=e[0].length;let n,o;const a=[];for(n=0;n<i;n++)for(a[n]=[],o=0;o<t;o++)a[n][o]=e[o][n];return a}let J=function(e){return function(e){return"circle"===b(e)}(e)?U:j};let ee=function(e){const t=this;t._renderer=e.renderer,t._legendGroup=e.group,t._backgroundClass=e.backgroundClass,t._itemGroupClass=e.itemGroupClass,t._textField=e.textField,t._getCustomizeObject=e.getFormatObject,t._titleGroupClass=e.titleGroupClass,t._allowInsidePosition=e.allowInsidePosition,t._widget=e.widget,t._updated=!1};t.Legend=ee;const te=ee,ie=te.prototype=(0,l.clone)(a.LayoutElement.prototype);(0,o.extend)(ie,{constructor:te,getOptions:function(){return this._options},update:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this;t=n._options=G(t,n._textField,n._allowInsidePosition)||{};const o=t.markerSize;var a;(this._updated=!0,this._data=e.map((e=>(e.size=h(e.size>0?e.size:o),e.marker=W(e,e.states.normal),Object.defineProperty(e.marker,"size",{get:()=>e.size,set(t){e.size=t}}),Object.defineProperty(e.marker,"opacity",{get:()=>e.states.normal.opacity,set(t){e.states.normal.opacity=e.states.hover.opacity=e.states.selection.opacity=t}}),e))),t.customizeItems&&(n._data=t.customizeItems(e.slice())||e),n._boundingRect={width:0,height:0,x:0,y:0},n.isVisible())&&(null===(a=n._title)||void 0===a||a.dispose(),n._title=new r.Title({renderer:n._renderer,cssClass:n._titleGroupClass,root:n._legendGroup}));if(n._title){const e=t.title;i.horizontalAlignment=function(e){return e.horizontalAlignment===w?w:e.itemTextPosition===S?D:e.itemTextPosition===D?S:w}(t),n._title.update(i,e)}return this.erase(),n},isVisible:function(){return this._options&&this._options.visible},draw:function(e,t){const i=this,n=i._getItemData();if(i.erase(),!(i.isVisible()&&n&&n.length))return i;if(i._insideLegendGroup=i._renderer.g().enableLinks().append(i._legendGroup),i._title.changeLink(i._insideLegendGroup),i._createBackground(),i._title.hasText()){const n=i._background?2*i._options.paddingLeftRight:0;i._title.draw(e-n,t)}return i._markersGroup=i._renderer.g().attr({class:i._itemGroupClass}).append(i._insideLegendGroup),i._createItems(n),i._updateElementsPosition(e,t),i},_measureElements:function(){const e=this._options;let t=0;this._items.forEach((i=>{const n=i.label.getBBox(),o=i.marker.getBBox();i.markerBBox=o,i.markerSize=Math.max(o.width,o.height);const a=function(e,t,i){let n,o;switch(e.itemTextPosition){case D:case S:n=t.width+7+i.width,o=_(t.height,i.height);break;case I:case E:n=_(t.width,i.width),o=t.height+4+i.height}return{width:n,height:o}}(e,o,n);i.labelBBox=n,i.bBox=a,t=_(t,a.height)})),e.equalRowHeight&&this._items.forEach((e=>e.bBox.height=t))},_updateElementsPosition:function(e,t){const i=this,n=i._options;this._size={width:e,height:t},i._measureElements(),i._locateElements(n),i._finalUpdate(n);const o=i.getLayoutOptions();(o.width>e||o.height>t)&&i.freeSpace()},_createItems:function(e){const t=this,i=t._options,a=t._renderer,s=J(i.markerShape);t._markersId={};const r=i.markerTemplate?i.markerTemplate:(e,t)=>{const i=e.marker;s(a,i.size).attr({fill:i.fill,opacity:i.opacity,filter:i.filter}).append({element:t})},l=t._widget._getTemplate(r),d=t._markersGroup;d.css((0,n.patchFontOptions)(i.font)),t._deferredItems=[],t._templatesGroups=[],t._items=(e||[]).map(((e,n)=>{const s=e.states,r=s.normal,u=r.fill;e.size=e.marker.size;const h={normal:(0,o.extend)(r,{fill:u||i.markerColor||i.defaultColor,state:"normal"}),hover:z(s.hover,u,"hovered"),selection:z(s.selection,u,"selected")};e.states=h;const p=a.g().append(d),g=a.g().attr({class:"dxl-marker"}).append(p);t._deferredItems[n]=new c.Deferred,t._templatesGroups.push(g);const _={label:t._createLabel(e,p),marker:g,renderer:a,group:p,tracker:{id:e.id,argument:e.argument,argumentIndex:e.argumentIndex},states:h,itemTextPosition:i.itemTextPosition,markerOffset:0,bBoxes:[],renderMarker(i){e.marker=W(_,i,e.size),g.clear(),l.render({model:e,container:g.element,onRendered:t._deferredItems[n].resolve})}};return _.renderMarker(h.normal),t._createHint(e,p),void 0!==e.id&&(t._markersId[e.id]=n),_}))},getTemplatesGroups:function(){return this._templatesGroups||[]},getTemplatesDef:function(){return this._deferredItems||[]},_getItemData:function(){let e=this._data||[];return(this._options||{}).inverted&&(e=e.slice().reverse()),e.filter((e=>e.visible))},_finalUpdate:function(e){this._adjustBackgroundSettings(e),this._setBoundingRect(e.margin)},erase:function(){const e=this,t=e._insideLegendGroup;return t&&t.dispose(),e._insideLegendGroup=e._markersGroup=e._x1=e._x2=e._y2=e._y2=null,e},_locateElements:function(e){this._moveInInitialValues(),this._locateRowsColumns(e)},_moveInInitialValues:function(){const e=this;e._title.hasText()&&e._title.move([0,0]),e._legendGroup&&e._legendGroup.move(0,0),e._background&&e._background.attr({x:0,y:0,width:0,height:0})},applySelected:function(e){return $(e,this._markersId,this._items,"selection"),this},applyHover:function(e){return $(e,this._markersId,this._items,"hover"),this},resetItem:function(e){return $(e,this._markersId,this._items,"normal"),this},_createLabel:function(e,t){const i=this._getCustomizeObject(e),o=this._options,a=function(e){switch(e){case I:case E:return w;case D:return S;case S:return D}}(o.itemTextPosition),s=o.customizeText.call(i,i),r=v(e.textOpacity)?{color:o.font.color,opacity:e.textOpacity}:{};return this._renderer.text(s,0,0).css((0,n.patchFontOptions)(r)).attr({align:a,class:o.cssClass}).append(t)},_createHint:function(e,t){const i=this._getCustomizeObject(e),n=this._options.customizeHint.call(i,i);v(n)&&""!==n&&t.setTitle(n)},_createBackground:function(){const e=this,t=e._options.position===O,i=e._options.backgroundColor,n=i||(t?e._options.containerBackgroundColor:k);(e._options.border.visible||(t||i)&&i!==k)&&(e._background=e._renderer.rect(0,0,0,0).attr({fill:n,class:e._backgroundClass}).append(e._insideLegendGroup))},_locateRowsColumns:function(e){const t=this;let i=0;const n=t._getItemsLayoutOptions(),o=t._items.length;let a;do{a=[],t._createLines(a,n),t._alignLines(a,n),i++}while(Z(a,n,o,e.margin)&&i<o);t._applyItemPosition(a,n)},_createLines:function(e,t){this._items.forEach(((i,n)=>{const o=function(e,t,i){const n={};return i%t.countItem==0&&(t.markerOffset?e.push([],[]):e.push([])),t.markerOffset?(n.firstLine=e[e.length-1],n.secondLine=e[e.length-2]):n.firstLine=n.secondLine=e[e.length-1],n}(e,t,n),a={width:i.labelBBox.width,height:i.labelBBox.height,element:i.label,bBox:i.labelBBox,pos:Y(t),itemIndex:n},s={width:i.markerBBox.width,height:i.markerBBox.height,element:i.marker,pos:{horizontal:w,vertical:w},bBox:{width:i.markerBBox.width,height:i.markerBBox.height,x:i.markerBBox.x,y:i.markerBBox.y},itemIndex:n};let r,l;const d=t.markerOffset?"altOffset":"offset";t.inverseLabelPosition?(r=a,l=s):(r=s,l=a),r[d]=t.labelOffset,o.secondLine.push(r),o.firstLine.push(l)}))},_alignLines:function(e,t){let i,n=t.altMeasure;if(e.forEach((e=>X(e,n))),n=t.measure,t.itemsAlignment){if(t.markerOffset)for(i=0;i<e.length;)Q([e[i++],e[i++]]).forEach(o)}else Q(e).forEach(o);function o(e){X(e,n)}},_applyItemPosition:function(e,t){const i=this,n={x:0,y:0},o=function(e,t){return e.reduce(((e,i)=>_(e,q(i,t))),0)}(e,t);e.forEach((e=>{const s=e[0],r=s.altOffset||t.altSpacing;n[t.direction]=function(e,t,i){const n=q(e,t);let o;switch(t.itemsAlignment){case S:o=i-n;break;case w:o=(i-n)/2;break;default:o=0}return o}(e,t,o),e.forEach((e=>{const o=e.offset||t.spacing,s=new a.WrapperLayoutElement(e.element,e.bBox),r={x:n.x,y:n.y,width:e.width,height:e.height},l=new a.WrapperLayoutElement(null,r),d=i._items[e.itemIndex];s.position({of:l,my:e.pos,at:e.pos}),d.bBoxes.push(l),n[t.direction]+=e[t.measure]+o})),n[t.altDirection]+=s[t.altMeasure]+r})),this._items.forEach((e=>{const t=function(e,t){const i={};return i.left=f(e.x,t.x),i.top=f(e.y,t.y),i.right=_(e.x+e.width,t.x+t.width),i.bottom=_(e.y+e.height,t.y+t.height),i}(e.bBoxes[0].getLayoutOptions(),e.bBoxes[1].getLayoutOptions()),n=i._options.columnItemSpacing/2,o=i._options.rowItemSpacing/2;e.tracker.left=t.left-n,e.tracker.right=t.right+n,e.tracker.top=t.top-o,e.tracker.bottom=t.bottom+o}))},_getItemsLayoutOptions:function(){const e=this,t=e._options,i=t.orientation,n={itemsAlignment:t.itemsAlignment,orientation:t.orientation},o=e._size.width-(e._background?2*t.paddingLeftRight:0),a=e._size.height-(e._background?2*t.paddingTopBottom:0);return i===T?(n.length=o,n.spacing=t.columnItemSpacing,n.direction="x",n.measure=R,n.altMeasure=M,n.altDirection="y",n.altSpacing=t.rowItemSpacing,n.countItem=t.columnCount,n.altCountItem=t.rowCount,n.marginTextLabel=4,n.labelOffset=7,t.itemTextPosition!==E&&t.itemTextPosition!==I||(n.labelOffset=4,n.markerOffset=!0)):(n.length=a,n.spacing=t.rowItemSpacing,n.direction="y",n.measure=M,n.altMeasure=R,n.altDirection="x",n.altSpacing=t.columnItemSpacing,n.countItem=t.rowCount,n.altCountItem=t.columnCount,n.marginTextLabel=7,n.labelOffset=4,t.itemTextPosition!==S&&t.itemTextPosition!==D||(n.labelOffset=7,n.markerOffset=!0)),n.countItem||(n.altCountItem?n.countItem=m(e._items.length/n.altCountItem):n.countItem=e._items.length),t.itemTextPosition!==I&&t.itemTextPosition!==D||(n.inverseLabelPosition=!0),n.itemTextPosition=t.itemTextPosition,n.altCountItem=n.altCountItem||m(e._items.length/n.countItem),n},_adjustBackgroundSettings:function(e){if(!this._background)return;const t=e.border,i=this._calculateTotalBox(),n={x:g(i.x-e.paddingLeftRight),y:g(i.y-e.paddingTopBottom),width:g(i.width)+2*e.paddingLeftRight,height:g(i.height),opacity:e.backgroundOpacity};t.visible&&t.width&&t.color&&t.color!==k&&(n["stroke-width"]=t.width,n.stroke=t.color,n["stroke-opacity"]=t.opacity,n.dashStyle=t.dashStyle,n.rx=t.cornerRadius||0,n.ry=t.cornerRadius||0),this._background.attr(n)},_setBoundingRect:function(e){if(!this._insideLegendGroup)return;const t=this._calculateTotalBox();t.height+=e.top+e.bottom,t.widthWithoutMargins=t.width,t.width+=e.left+e.right,t.x-=e.left,t.y-=e.top,this._boundingRect=t},_calculateTotalBox:function(){const e=this._markersGroup.getBBox(),t=this._title.getCorrectedLayoutOptions(),i=this._insideLegendGroup.getBBox(),n=this._background?2*this._options.paddingTopBottom:0;return i.height=e.height+t.height+n,t.width>i.width&&(i.width=t.width),i},getActionCallback:function(e){const t=this;return t._options.visible?function(i){t[i](e.index)}:d.noop},getLayoutOptions:function(){const e=this._options,t=this._insideLegendGroup?this._boundingRect:{width:0,height:0,x:0,y:0};return e?(t.verticalAlignment=e.verticalAlignment,t.horizontalAlignment=e.horizontalAlignment,e.orientation===T||e.horizontalAlignment===w?(t.cutLayoutSide=e.verticalAlignment,t.cutSide="vertical"):(t.cutLayoutSide=e.horizontalAlignment,t.cutSide="horizontal"),t.position={horizontal:e.horizontalAlignment,vertical:e.verticalAlignment},t):null},shift:function(e,t){const i=this;let n={};return i._insideLegendGroup&&i._insideLegendGroup.attr({translateX:e-i._boundingRect.x,translateY:t-i._boundingRect.y}),i._title&&i._shiftTitle(i._boundingRect.widthWithoutMargins),i._markersGroup&&i._shiftMarkers(),i._insideLegendGroup&&(n=i._legendGroup.getBBox()),i._x1=n.x,i._y1=n.y,i._x2=n.x+n.width,i._y2=n.y+n.height,i},_shiftTitle:function(e){const t=this,i=t._title,n=i.getCorrectedLayoutOptions();if(!n||!i.hasText())return;const o=e-(t._background?2*t._options.paddingLeftRight:0),a=i.getOptions();let s=n.y+a.margin.top,r=0;a.verticalAlignment===E&&t._markersGroup&&(s+=t._markersGroup.getBBox().height),a.horizontalAlignment===S?r=o-n.width:a.horizontalAlignment===w&&(r=(o-n.width)/2),i.shift(r,s)},_shiftMarkers:function(){const e=this._title.getLayoutOptions(),t=this._markersGroup.getBBox(),i=this._title.getOptions()||{};let n=0,o=0;e.width>t.width&&this._options.horizontalAlignment===w&&(n=e.width/2-t.width/2),i.verticalAlignment===I&&(o=e.height),0===n&&0===o||(this._markersGroup.attr({translateX:n,translateY:o}),this._items.forEach((e=>{e.tracker.left+=n,e.tracker.right+=n,e.tracker.top+=o,e.tracker.bottom+=o})))},getPosition:function(){return this._options.position},coordsIn:function(e,t){return e>=this._x1&&e<=this._x2&&t>=this._y1&&t<=this._y2},getItemByCoord:function(e,t){const i=this._items,n=this._insideLegendGroup;e-=n.attr("translateX"),t-=n.attr("translateY");for(let n=0;n<i.length;n++)if(K(i[n].tracker,e,t))return i[n].tracker;return null},dispose:function(){const e=this;return e._title&&e._title.dispose(),e._legendGroup=e._insideLegendGroup=e._title=e._renderer=e._options=e._data=e._items=null,e},layoutOptions:function(){if(!this.isVisible())return null;const e=this.getLayoutOptions();return{horizontalAlignment:this._options.horizontalAlignment,verticalAlignment:this._options.verticalAlignment,side:e.cutSide,priority:1,position:this.getPosition()}},measure:function(e){this._updated||!this._insideLegendGroup?(this.draw(e[0],e[1]),this._updated=!1):(this._items.forEach((e=>{e.bBoxes=[]})),this._updateElementsPosition(e[0],e[1]));const t=this.getLayoutOptions();return[t.width,t.height]},move:function(e){this.shift(e[0],e[1])},freeSpace:function(){this._options._incidentOccurred("W2104"),this.erase()}});t.plugin={name:"legend",init:function(){const e=this,t=this._renderer.g().attr({class:this._rootClassPrefix+"-legend"}).enableLinks().append(e._renderer.root);e._legend=new ee({renderer:e._renderer,group:t,widget:this,itemGroupClass:this._rootClassPrefix+"-item",titleGroupClass:this._rootClassPrefix+"-title",textField:"text",getFormatObject:function(e){return{item:e.item,text:e.text}}}),e._layout.add(e._legend)},extenders:{_applyTilesAppearance:function(){const e=this;this._items.forEach((function(t){e._applyLegendItemStyle(t.id,t.getState())}))},_buildNodes:function(){this._createLegendItems()}},members:{_applyLegendItemStyle:function(e,t){const i=this._legend;switch(t){case"hover":i.applyHover(e);break;case"selection":i.applySelected(e);break;default:i.resetItem(e)}},_createLegendItems:function(){this._legend.update(this._getLegendData(),this._getOption("legend"),this._themeManager.theme("legend").title)&&this._requestChange(["LAYOUT"])}},dispose:function(){this._legend.dispose()},customize:function(e){e.prototype._proxyData.push((function(e,t){if(this._legend.coordsIn(e,t)){const i=this._legend.getItemByCoord(e,t);if(i)return{id:i.id,type:"legend"}}})),e.addChange({code:"LEGEND",handler:function(){this._createLegendItems()},isThemeDependent:!0,option:"legend",isOptionChange:!0})}}},60976:function(e,t,i){t.correctValueType=l,t.getParser=void 0;var n,o=i(17781),a=(n=i(71051))&&n.__esModule?n:{default:n},s=i(11528);const r={string:function(e){return(0,s.isDefined)(e)?""+e:e},numeric:function(e){if(!(0,s.isDefined)(e))return e;let t=Number(e);return isNaN(t)&&(t=void 0),t},datetime:function(e){if(!(0,s.isDefined)(e))return e;let t;const i=Number(e);return t=isNaN(i)?a.default.deserializeDate(e):new Date(i),isNaN(Number(t))&&(t=void 0),t}};function l(e){return"numeric"===e||"datetime"===e||"string"===e?e:""}t.getParser=function(e){return r[l(e)]||o.noop}},16197:function(e,t,i){t.Tracker=c;var n=i(98834),o=l(i(64960)),a=i(64044),s=l(i(89797)),r=l(i(92774));function l(e){return e&&e.__esModule?e:{default:e}}const d=s.default.down,u=s.default.move;function c(e){this._initHandlers(e)}c.prototype={constructor:c,_initHandlers:function(e){const t=o.default.getDocument();function i(t){!function(e,t){const i=t.getData(e);i>=0&&t.click({node:t.getNode(i),coords:t.getCoords(e),event:e})}(t,e)}e.getCoords=function(t){const i=(0,n.eventData)(t),o=e.widget._renderer.getRootOffset();return[i.x-o.left,i.y-o.top]},e.root.on(a.name,i),e.root.on(d,l),r.default.on(t,d,l),r.default.on(t,u,c),this._disposeHandlers=function(){e.root.off(a.name,i),e.root.off(d,l),r.default.off(t,d,l),r.default.off(t,u,c)};let s=!1;function l(t){s?s=!1:(void 0!==e.getData(t)&&(s=!0),c(t))}function c(t){!function(e,t){const i=t.getData(e);i>=0?t.getNode(i).setHover():t.widget.clearHover()}(t,e),e.widget._getOption("tooltip").enabled&&function(e,t){const i=t.getData(e,!0);let o;i>=0?(o=(0,n.eventData)(e),t.getNode(i).showTooltip([o.x,o.y])):t.widget.hideTooltip()}(t,e)}},dispose:function(){this._disposeHandlers()}}},97808:function(e,t,i){t.plugins=t.createAnnotations=void 0;var n=p(i(64960)),o=i(11528),a=i(23277),s=i(52576),r=i(28779),l=i(87040),d=p(i(89797)),u=i(59144),c=i(98834),h=p(i(92774));function p(e){return e&&e.__esModule?e:{default:e}}const g=n.default.getDocument,_="annotations",f="."+_,m=(0,c.addNamespace)([d.default.down,d.default.move],_),v=(0,c.addNamespace)(d.default.up,_),C=u.start+f,y=u.move+f,b=u.end+f;function x(e){return"string"==typeof e?{url:e}:e}let w=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const d=x(i.image);return t.reduce(((t,u)=>{const c=x(u.image),h=(0,o.isFunction)(n)?n(u):{};h&&(h.image=x(h.image));const p=(0,s.extend)(!0,{},i,u,{image:d},{image:c},h),g=function(e,t){let i;return"text"===e.type?i=function(e,i){const n=t._renderer.text(e.text).attr({class:e.cssClass}).append({element:i});(e.width>0||e.height>0)&&n.setMaxSize(e.width,e.height,{wordWrap:e.wordWrap,textOverflow:e.textOverflow})}:"image"===e.type?i=function(e,i){const{width:n,height:o,url:a,location:s}=e.image||{},{width:r,height:l}=e,d=r>0?Math.min(n,r):n,u=l>0?Math.min(o,l):o;t._renderer.image(0,0,d,u,a,s||"center").append({element:i})}:"custom"===e.type&&(i=e.template),i}(p,e),_=g&&(0,s.extend)(!0,a(p),function(e,t){return{draw:function(i,n){const o=i._renderer.g().append(n).css((0,r.patchFontOptions)(e.font));this.plaque&&this.plaque.clear(),this.plaque=new l.Plaque((0,s.extend)(!0,{},e,{cornerRadius:(e.border||{}).cornerRadius}),i,o,t,i._isAnnotationBounded(e)),this.plaque.draw(i._getAnnotationCoords(this)),e.allowDragging&&o.on(C,{immediate:!0},(e=>{this._dragOffsetX=this.plaque.x-e.pageX,this._dragOffsetY=this.plaque.y-e.pageY})).on(y,(e=>{this.plaque.move(e.pageX+this._dragOffsetX,e.pageY+this._dragOffsetY)})).on(b,(e=>{this.offsetX=(this.offsetX||0)+e.offset.x,this.offsetY=(this.offsetY||0)+e.offset.y}))},hitTest(e,t){return this.plaque.hitTest(e,t)},showTooltip(e,t){let{x:i,y:n}=t;const o=this,a=o.options;if(e.annotation!==o){e.setTemplate(a.tooltipTemplate);const t=t=>{t&&(e.annotation=o)};t(e.show(a,{x:i,y:n},{target:a},a.customizeTooltip,t))}else e.isCursorOnTooltip(i,n)||e.move(i,n)}}}(p,e._getTemplate(g)));return _&&t.push(_),t}),[])};t.createAnnotations=w;const S={name:"annotations_chart",init(){},dispose(){},members:{_getAnnotationCoords(e){var t,i;const n={offsetX:e.offsetX,offsetY:e.offsetY},a=this._options.silent("rotated")?"y":"x",s=this._options.silent("rotated")?"x":"y",r=this.getArgumentAxis(),l=r.validateUnit(e.argument);let d,u=this.getValueAxis(e.axis),c=null===(t=u)||void 0===t?void 0:t.pane;var h;e.series&&(d=this.series.filter((t=>t.name===e.series))[0],u=null===(h=d)||void 0===h?void 0:h.getValueAxis(),(0,o.isDefined)(u)&&(c=u.pane));if((0,o.isDefined)(l)){if(d){const e=d.getPointCenterByArg(l);e&&(n[a]=e[a])}else n[a]=r.getTranslator().translate(l);!(0,o.isDefined)(c)&&(c=r.pane)}const p=null===(i=u)||void 0===i?void 0:i.validateUnit(e.value);var g,_;(0,o.isDefined)(p)&&(n[s]=null===(g=u)||void 0===g?void 0:g.getTranslator().translate(p),!(0,o.isDefined)(c)&&(0,o.isDefined)(u)&&(c=u.pane));(n.canvas=this._getCanvasForPane(c),(0,o.isDefined)(n[a])&&!(0,o.isDefined)(p))&&((0,o.isDefined)(u)||(0,o.isDefined)(d)?(0,o.isDefined)(u)&&!(0,o.isDefined)(d)?n[s]=this._argumentAxes.filter((e=>e.pane===u.pane))[0].getAxisPosition():null!==(_=d)&&void 0!==_&&_.checkSeriesViewportCoord(r,n[a])&&(n[s]=d.getSeriesPairCoord(n[a],!0)):n[s]=r.getAxisPosition());return!(0,o.isDefined)(l)&&(0,o.isDefined)(n[s])&&((0,o.isDefined)(u)&&!(0,o.isDefined)(d)?n[a]=u.getAxisPosition():(0,o.isDefined)(d)&&d.checkSeriesViewportCoord(u,n[s])&&(n[a]=d.getSeriesPairCoord(n[s],!1))),n},_annotationsPointerEventHandler(e){if(this._disposed)return;const t=e.originalEvent||{},i=t.touches&&t.touches[0]||{},n=this._renderer.getRootOffset(),o={x:i.pageX||t.pageX||e.pageX,y:i.pageY||t.pageY||e.pageY},a=this._annotations.items.filter((e=>e.hitTest(o.x-n.left,o.y-n.top)))[0];a&&a.options.tooltipEnabled?(this._clear(),a.options.allowDragging&&e.type===d.default.down&&(this._annotations._hideToolTipForDrag=!0),this._annotations._hideToolTipForDrag||(a.showTooltip(this._annotations.tooltip,o),e.stopPropagation())):this._annotations.hideTooltip()},_isAnnotationBounded:e=>(0,o.isDefined)(e.value)||(0,o.isDefined)(e.argument),_pullOptions:e=>({type:e.type,name:e.name,x:e.x,y:e.y,value:e.value,argument:e.argument,axis:e.axis,series:e.series,options:e,offsetX:e.offsetX,offsetY:e.offsetY}),_forceAnnotationRender(){this._change(["FORCE_RENDER"])},_clear(){this.hideTooltip(),this.clearHover()}}},D={name:"annotations_polar_chart",init(){},dispose(){},members:{_getAnnotationCoords(e){const t={offsetX:e.offsetX,offsetY:e.offsetY,canvas:this._calcCanvas()},i=this.getArgumentAxis();let n=i.validateUnit(e.argument);const a=this.getValueAxis().validateUnit(e.value),r=e.radius,l=e.angle;let d,u;return e.series&&(u=this.series.filter((t=>t.name===e.series))[0]),(0,s.extend)(!0,t,this.getXYFromPolar(l,r,n,a)),(0,o.isDefined)(u)&&(!(0,o.isDefined)(t.angle)||(0,o.isDefined)(a)||(0,o.isDefined)(r)?!(0,o.isDefined)(t.radius)||(0,o.isDefined)(n)||(0,o.isDefined)(l)||(d=u.getSeriesPairCoord({radius:t.radius},!1)):((0,o.isDefined)(n)||(n=i.getTranslator().from(isFinite(l)?this.getActualAngle(l):t.angle)),d=u.getSeriesPairCoord({argument:n,angle:-t.angle},!0)),(0,o.isDefined)(d)&&(t.x=d.x,t.y=d.y)),e.series&&!(0,o.isDefined)(d)&&(t.x=t.y=void 0),t},_annotationsPointerEventHandler:S.members._annotationsPointerEventHandler,_isAnnotationBounded:S.members._isAnnotationBounded,_pullOptions(e){const t=(0,s.extend)({},{radius:e.radius,angle:e.angle},S.members._pullOptions(e));return delete t.axis,t},_forceAnnotationRender:S.members._forceAnnotationRender,_clear:S.members._clear}},I={name:"annotations_vector_map",init(){},dispose(){this._annotations._offTracker(),this._annotations._offTracker=null},members:{_getAnnotationCoords(e){const t={offsetX:e.offsetX,offsetY:e.offsetY};if(t.canvas=this._projection.getCanvas(),e.coordinates){const i=this._projection.toScreenPoint(e.coordinates);t.x=i[0],t.y=i[1]}return t},_annotationsPointerEventHandler:S.members._annotationsPointerEventHandler,_isAnnotationBounded:e=>(0,o.isDefined)(e.coordinates),_pullOptions(e){const t=(0,s.extend)({},{coordinates:e.coordinates},S.members._pullOptions(e));return delete t.axis,delete t.series,delete t.argument,delete t.value,t},_forceAnnotationRender(){this._change(["EXTRA_ELEMENTS"])},_getAnnotationStyles:()=>({"text-anchor":"start"}),_clear(){}},extenders:{_prepareExtraElements(){const e=this,t=()=>{e._renderExtraElements()};e._annotations._offTracker=e._tracker.on({move:t,zoom:t,end:t})}}},E={name:"annotations_pie_chart",init(){},dispose(){},members:{_getAnnotationCoords(e){let t;const i={offsetX:e.offsetX,offsetY:e.offsetY,canvas:this._canvas};if(e.argument){t=e.series?this.getSeriesByName(e.series):this.series[0];const n=t.getPointsByArg(e.argument)[0],{x:o,y:a}=n.getAnnotationCoords(e.location);i.x=o,i.y=a}return i},_isAnnotationBounded:e=>e.argument,_annotationsPointerEventHandler:S.members._annotationsPointerEventHandler,_pullOptions(e){const t=(0,s.extend)({},{location:e.location},S.members._pullOptions(e));return delete t.axis,t},_clear:S.members._clear,_forceAnnotationRender:S.members._forceAnnotationRender}},T={name:"annotations_core",init(){this._annotations={items:[],_hideToolTipForDrag:!1,tooltip:new a.Tooltip({cssClass:`${this._rootClassPrefix}-annotation-tooltip`,eventTrigger:this._eventTrigger,widgetRoot:this.element(),widget:this}),hideTooltip(){this.tooltip.annotation=null,this.tooltip.hide()},clearItems(){this.items.forEach((e=>e.plaque.clear())),this.items=[]}},this._annotations.tooltip.setRendererOptions(this._getRendererOptions())},dispose(){this._annotationsGroup.linkRemove().linkOff(),h.default.off(g(),f),this._annotationsGroup.off(f),this._annotations.tooltip&&this._annotations.tooltip.dispose()},extenders:{_createHtmlStructure(){this._annotationsGroup=this._renderer.g().attr({class:`${this._rootClassPrefix}-annotations`}).css(this._getAnnotationStyles()).linkOn(this._renderer.root,"annotations").linkAppend(),h.default.on(g(),m,(e=>{this._disposed||this._annotations.tooltip.isCursorOnTooltip(e.pageX,e.pageY)||this._annotations.hideTooltip()})),h.default.on(g(),v,(e=>{this._annotations._hideToolTipForDrag=!1,this._annotationsPointerEventHandler(e)})),this._annotationsGroup.on(m,this._annotationsPointerEventHandler.bind(this))},_renderExtraElements(){this._annotationsGroup.clear(),this._annotations.items.forEach((e=>e.draw(this,this._annotationsGroup)))},_stopCurrentHandling(){this._annotations.hideTooltip()}},members:{_buildAnnotations(){this._annotations.clearItems();const e=this._getOption("annotations",!0);null!=e&&e.length&&(this._annotations.items=w(this,e,this._getOption("commonAnnotationSettings"),this._getOption("customizeAnnotation",!0),this._pullOptions))},_setAnnotationTooltipOptions(){const e=(0,s.extend)({},this._getOption("tooltip"));e.contentTemplate=e.customizeTooltip=void 0,this._annotations.tooltip.update(e)},_getAnnotationCoords:()=>({}),_pullOptions:()=>({}),_getAnnotationStyles:()=>({})},customize(e){e.addChange({code:"ANNOTATIONITEMS",handler(){this._requestChange(["ANNOTATIONS"])},isOptionChange:!0,option:"annotations"}),e.addChange({code:"ANNOTATIONSSETTINGS",handler(){this._requestChange(["ANNOTATIONS"])},isOptionChange:!0,option:"commonAnnotationSettings"}),e.addChange({code:"ANNOTATIONS",handler(){this._buildAnnotations(),this._setAnnotationTooltipOptions(),this._forceAnnotationRender()},isThemeDependent:!0,isOptionChange:!0})},fontFields:["commonAnnotationSettings.font"]};t.plugins={core:T,chart:S,polarChart:D,vectorMap:I,pieChart:E}},71671:function(e,t,i){t.BaseThemeManager=void 0;var n,o=(n=i(55620))&&n.__esModule?n:{default:n},a=i(52576),s=i(11528),r=i(21274),l=i(9735),d=i(28779),u=i(84560);const c=u.getTheme,h=u.addCacheItem,p=u.removeCacheItem,g=a.extend,_=r.each;function f(e,t){let i=e;return t&&_(t.split("."),(function(e,t){return i=i[t]})),i}t.BaseThemeManager=o.default.inherit({ctor:function(e){this._themeSection=e.themeSection,this._fontFields=e.fontFields||[],h(this)},dispose:function(){const e=this;return p(e),e._callback=e._theme=e._font=null,e},setCallback:function(e){return this._callback=e,this},setTheme:function(e,t){return this._current=e,this._rtl=t,this.refresh()},refresh:function(){const e=this,t=e._current||{};let i=c(t.name||t);return e._themeName=i.name,e._defaultPalette=i.defaultPalette,e._font=g({},i.font,t.font),e._themeSection&&_(e._themeSection.split("."),(function(e,t){i=g(!0,{},i[t])})),e._theme=g(!0,{},i,(0,s.isString)(t)?{}:t),e._initializeTheme(),(0,d.parseScalar)(e._rtl,e._theme.rtlEnabled)&&g(!0,e._theme,e._theme._rtl),e._callback(),e},theme:function(e){return f(this._theme,e)},themeName:function(){return this._themeName},createPalette:function(e,t){return(0,l.createPalette)(e,t,this._defaultPalette)},createDiscretePalette:function(e,t){return(0,l.getDiscretePalette)(e,t,this._defaultPalette)},createGradientPalette:function(e){return(0,l.getGradientPalette)(e,this._defaultPalette)},getAccentColor:function(e){return(0,l.getAccentColor)(e,this._defaultPalette)},_initializeTheme:function(){const e=this;_(e._fontFields||[],(function(t,i){e._initializeFont(f(e._theme,i))}))},_initializeFont:function(e){g(e,this._font,g({},e))}})},95943:function(e,t,i){t.createEventTrigger=function(e,t){let i,n={};return(0,s.each)(e,(function(e,t){t.name&&o(e)})),a.change=function(t){const n=e[t];return n&&((i=i||{})[t]=n),!!n},a.applyChanges=function(){i&&((0,s.each)(i,(function(e,t){o(t.newName||e)})),i=null)},a.dispose=function(){e=t=n=null},a;function o(i){const o=e[i];n[o.name]=t(i,o.actionSettings)}function a(e,t,i){n[e](t),i&&i()}},t.createIncidentOccurred=void 0,t.createResizeHandler=function(e,t,i){let n;const o=(a=i,(e,t)=>{const{handler:i,dispose:n}=function(e,t){let i;const n=function(){clearTimeout(i),i=setTimeout(e,100)};return{handler:n,dispose(){clearTimeout(i),t(n)}}}(a,t);return e(i),n});var a;"windowonly"===(0,d.normalizeEnum)(t)?n=o((e=>r.default.add(e)),(e=>r.default.remove(e))):!0===t&&(n=o((t=>l.default.observe(e,t)),(()=>l.default.unobserve(e))));return n};var n=i(1956),o=i(54497),a=u(i(38355)),s=i(21274),r=u(i(63283)),l=u(i(11787)),d=i(28779);function u(e){return e&&e.__esModule?e:{default:e}}const c=a.default.ERROR_MESSAGES;t.createIncidentOccurred=function(e,t){return function(i,a){t("incidentOccurred",{target:{id:i,type:"E"===i[0]?"error":"warning",args:a,text:o.format.apply(null,[c[i]].concat(a||[])),widget:e,version:n.version}})}}},94618:function(e,t,i){t.plugins=void 0;var n=i(28779),o=i(17781);const a={name:"center_template_pie_chart",init:o.noop,dispose:function(){this._centerTemplateGroup.linkOff().dispose()},extenders:{_createHtmlStructure(){const e=(0,n.patchFontOptions)(this._themeManager._font);this._centerTemplateGroup=this._renderer.g().attr({class:"dxc-hole-template"}).linkOn(this._renderer.root,"center-template").css(e).linkAppend()},_renderExtraElements(){this._requestChange(["CENTER_TEMPLATE"])}},members:{_renderCenterTemplate(){const e=this.option("centerTemplate"),t=this._centerTemplateGroup.clear();if(!e)return;t.attr({visibility:"hidden"});const i=this._getCenter();this._getTemplate(e).render({model:this,container:t.element,onRendered:()=>{const e=t,n=e.getBBox(),o=n.x+n.width/2,a=n.y+n.height/2;e.move(i.x-o,i.y-a),e.attr({visibility:"visible"})}})}},customize(e){e.addChange({code:"CENTER_TEMPLATE",handler:function(){this._renderCenterTemplate()},option:"centerTemplate"})}},s={name:"center_template_gauge",init:o.noop,dispose:a.dispose,extenders:{_initCore(){this._createCenterTemplateGroup()},_renderContent(){const e=(0,n.patchFontOptions)(this._themeManager._font);this._centerTemplateGroup.css(e),this._requestChange(["CENTER_TEMPLATE"])},_updateExtraElements(){this._requestChange(["CENTER_TEMPLATE"])}},members:{_renderCenterTemplate:a.members._renderCenterTemplate,_createCenterTemplateGroup(){this._centerTemplateGroup=this._renderer.g().attr({class:"dxg-hole-template"}).linkOn(this._renderer.root,"center-template").linkAppend()}},customize:a.customize};t.plugins={pieChart:a,gauge:s}},25058:function(e,t,i){t.plugin=void 0;var n,o=i(17781),a=(n=i(75990))&&n.__esModule?n:{default:n};const s=a.default.postCtor;let r;const l={_dataSourceLoadErrorHandler:function(){this._dataSourceChangedHandler()},_dataSourceOptions:function(){return{paginate:!1}},_updateDataSource:function(){this._refreshDataSource(),this.option("dataSource")||this._dataSourceChangedHandler()},_dataIsLoaded:function(){return!this._dataSource||this._dataSource.isLoaded()},_dataSourceItems:function(){return this._dataSource&&this._dataSource.items()}};for(r in a.default)"postCtor"!==r&&(l[r]=a.default[r]);t.plugin={name:"data_source",init:function(){s.call(this)},dispose:o.noop,members:l}},38355:function(e,t,i){t.default=void 0;var n=a(i(67264)),o=a(i(87129));function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,n.default)(o.default.ERROR_MESSAGES,{E2001:"Invalid data source",E2002:"Axis type and data type are incompatible",E2003:'The "{0}" data source field contains data of unsupported type',E2004:'The "{0}" data source field is inconsistent',E2005:'The value field "{0}" is absent in the data source or all its values are negative',E2006:"A cycle is detected in provided data",E2007:'The value field "{0}" is absent in the data source',E2008:'The value field "{0}" must be a string',E2009:'The value field "{0}" must be a positive numeric value',E2101:"Unknown series type: {0}",E2102:"Ambiguity occurred between two value axes with the same name",E2103:'The "{0}" option is given an invalid value. Assign a function instead',E2104:"Invalid logarithm base",E2105:'Invalid value of a "{0}"',E2202:"Invalid {0} scale value",E2203:"The range you are trying to set is invalid",W2002:"The {0} series cannot be drawn because the {1} data field is missing",W2003:"Tick interval is too small",W2101:'The "{0}" pane does not exist; the last pane is used by default',W2102:'A value axis with the "{0}" name was created automatically',W2103:"The chart title was hidden due to the container size",W2104:"The legend was hidden due to the container size",W2105:'The title of the "{0}" axis was hidden due to the container size',W2106:'The labels of the "{0}" axis were hidden due to the container size',W2107:"The export menu was hidden due to the container size",W2108:"The browser does not support exporting images to {0} format.",W2301:"Invalid value range"});e.exports=t.default,e.exports.default=t.default},74754:function(e,t,i){t.plugin=t.getMarkup=t.exportWidgets=t.exportFromMarkup=t.combineMarkups=t.ExportMenu=void 0;var n=i(52576),o=i(3104),a=i(28779),s=i(47420),r=i(73549),l=m(i(4671)),d=i(11528),u=i(84560),c=i(638),h=m(i(89797)),p=i(31951),g=i(57653),_=i(63022),f=m(i(64553));function m(e){return e&&e.__esModule?e:{default:e}}const v=[h.default.down,h.default.move].join(" "),C=35,y=[[9,12,26,12,26,14,9,14],[9,17,26,17,26,19,9,19],[9,22,26,22,26,24,9,24]],b=120,x=30,w="PNG",S=[w,"JPEG","GIF"],D=["PDF","SVG"],I="dx-export-menu",E="21cm",T="export-element-type",A="export-element-format",O=/data-backgroundcolor="([^"]*)"/;function P(){const e=r.image.testFormats(S);return{unsupported:e.unsupported,supported:e.supported.concat(D)}}function k(e,t,i){if(i=i||P(),e=String(e).toUpperCase(),-1!==i.supported.indexOf(e))return e;-1!==i.unsupported.indexOf(e)&&t&&t("W2108",[e])}function M(e){return"SVG"===e?r.svg.getData:"PDF"===e?r.pdf.getData:r.image.getData}function R(e,t){const i=(0,o.getWindow)().document,n=i.createElement("iframe");n.onload=function(e,t){return function(){let i=this.contentWindow;const n=i.document.createElement("img");i.document.body.appendChild(n);const o=function(e){e.style.width=E;const t=(0,g.getWidth)(e);return e.style.width="",t}(i.document.body)/t.width;o<1&&(i.document.body.style.transform=`scale(${o})`,i.document.body.style["transform-origin"]="0 0");const a=()=>{this.parentElement.removeChild(this)};n.addEventListener("load",(()=>{i.focus(),i.print()})),n.addEventListener("error",a),i.addEventListener("afterprint",(()=>{setTimeout(a,0)})),n.src=e}}(e,t),n.style.position="fixed",n.style.width="0",n.style.height="0",n.style.right="0",n.style.bottom="0",i.body.appendChild(n)}function L(e,t,i){const n={},o=i.type,s=i.format,r=function(e,t,i){const n=40+i*x,o={rect:{width:118,height:x,x:-84,y:n},text:{x:(e.rtl?105:15)-85,y:n+x-8}};return"printing"===t&&(o.separator={stroke:e.button.default.borderColor,"stroke-width":1,cursor:"pointer",sharp:"v",d:"M -85 "+(n+x-1)+" L 35 "+(n+x-1)}),o}(t,o,i.itemIndex),l=(0,a.patchFontOptions)(t.font);l["pointer-events"]="none";const d=e.g().attr({class:I+"-list-item"});n[T]=o,s&&(n[A]=s);const u=e.rect();u.attr(r.rect).css({cursor:"pointer","pointer-events":"all"}).data(n),u.on(c.start+".export",(()=>u.attr({fill:t.button.hover.backgroundColor}))).on(c.end+".export",(()=>u.attr({fill:null}))),u.append(d);const h=e.text(i.text).css(l).attr(r.text).append(d);return"printing"===o&&e.path(null,"line").attr(r.separator).append(d),{g:d,rect:u,resetState:()=>u.attr({fill:null}),fixPosition:()=>{const e=h.getBBox();h.move(r.text.x-e.x-(t.rtl?e.width:0))}}}const B=function(e,t){t.format=k(t.format)||w,t.fileName=t.fileName||"file",t.exportingAction=t.onExporting,t.exportedAction=t.onExported,t.fileSavingAction=t.onFileSaving,t.margin=(0,d.isDefined)(t.margin)?t.margin:10,t.backgroundColor=(0,d.isDefined)(t.backgroundColor)?t.backgroundColor:function(e){const t=O.exec(e);return null==t?void 0:t[1]}(e)||(0,u.getTheme)().backgroundColor,(0,r.export)(e,t,M(t.format))};t.exportFromMarkup=B;t.getMarkup=e=>V(e).root.outerHTML;t.exportWidgets=function(e,t){const i=V(e,{gridLayout:(t=t||{}).gridLayout,verticalAlignment:t.verticalAlignment,horizontalAlignment:t.horizontalAlignment});t.width=i.width,t.height=i.height,B(i.root,t)};let V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Array.isArray(e)?Array.isArray(e[0])||(e=e.map((e=>[e]))):e=[[e]];const i=!t.gridLayout,n=e.reduce(((e,t,n)=>{const o=t.reduce(((e,t,i)=>{const o=t.getSize(),a=t.option("backgroundColor")||(0,u.getTheme)(t.option("theme")).backgroundColor,s=t.element().find("svg").get(0).cloneNode(!0);return a&&-1===e.backgroundColors.indexOf(a)&&e.backgroundColors.push(a),e.hOffset=e.width,e.width+=o.width,e.height=Math.max(e.height,o.height),e.itemWidth=Math.max(e.itemWidth,o.width),e.items.push({node:s,width:o.width,height:o.height,c:i,r:n,hOffset:e.hOffset}),e}),{items:[],height:0,itemWidth:0,hOffset:0,width:0,backgroundColors:e.backgroundColors});return e.rowOffsets.push(e.totalHeight),e.rowHeights.push(o.height),e.totalHeight+=o.height,e.items=e.items.concat(o.items),e.itemWidth=Math.max(e.itemWidth,o.itemWidth),e.maxItemLen=Math.max(e.maxItemLen,o.items.length),e.totalWidth=i?Math.max(e.totalWidth,o.width):e.maxItemLen*e.itemWidth,e}),{items:[],rowOffsets:[],rowHeights:[],itemWidth:0,totalHeight:0,maxItemLen:0,totalWidth:0,backgroundColors:[]}),o=`${1===n.backgroundColors.length?n.backgroundColors[0]:""}`,{totalWidth:a,totalHeight:s}=n,r=function(e,t,i,n){let{exportItems:o,options:a,compactView:s}=n;const r=function(e,t,i){const n=(0,f.default)("<div>").get(0),o=new _.Renderer({container:n});return o.resize(e,t),o.root.element.setAttribute("data-backgroundcolor",i),{createGroup:()=>o.g(),getRootContent:()=>o.root.element.cloneNode(!0),dispose(){o.dispose(),n.remove()}}}(e,t,i),l=e=>{const t=a.verticalAlignment,i=o.rowHeights[e.r]-e.height;return o.rowOffsets[e.r]+("bottom"===t?i:"center"===t?i/2:0)},d=e=>{if(s)return e.hOffset;const t=a.horizontalAlignment,i=o.itemWidth,n=i-e.width;return e.c*i+("right"===t?n:"center"===t?n/2:0)};o.items.forEach((e=>{const t=r.createGroup();t.attr({translateX:d(e),translateY:l(e)}),t.element.appendChild(e.node),t.append()}));const u=r.getRootContent();return r.dispose(),u}(a,s,o,{options:t,exportItems:n,compactView:i});return{root:r,width:a,height:s}};t.combineMarkups=V;let F=function(e){const t=this._renderer=e.renderer;this._incidentOccurred=e.incidentOccurred,this._exportTo=e.exportTo,this._print=e.print,this._shadow=t.shadowFilter("-50%","-50%","200%","200%",2,6,3),this._shadow.attr({opacity:.8}),this._group=t.g().attr({class:I,[s.HIDDEN_FOR_EXPORT]:!0}).linkOn(t.root,{name:"export-menu",after:"peripheral"}),this._buttonGroup=t.g().attr({class:I+"-button"}).append(this._group),this._listGroup=t.g().attr({class:I+"-list"}).append(this._group),this._overlay=t.rect(-85,39,b,0),this._overlay.attr({"stroke-width":1,cursor:"pointer",rx:4,ry:4,filter:this._shadow.id}),this._overlay.data({"export-element-type":"list"}),this.validFormats=P(),this._subscribeEvents()};function H(e,t,i,n){(n||t.format)&&(n=k(n||t.format,e._incidentOccurred));const{width:o,height:a}=e.getSize();return{format:n||w,fileName:i||t.fileName||"file",backgroundColor:t.backgroundColor,width:o,height:a,margin:t.margin,svgToCanvas:t.svgToCanvas,exportingAction:e._createActionByOption("onExporting",{excludeValidators:["disabled"]}),exportedAction:e._createActionByOption("onExported",{excludeValidators:["disabled"]}),fileSavingAction:e._createActionByOption("onFileSaving",{excludeValidators:["disabled"]})}}t.ExportMenu=F,(0,n.extend)(F.prototype,{getLayoutOptions(){if(this._hiddenDueToLayout)return{width:0,height:0,cutSide:"vertical",cutLayoutSide:"top"};const e=this._buttonGroup.getBBox();return e.cutSide="vertical",e.cutLayoutSide="top",e.height+=10,e.position={vertical:"top",horizontal:"right"},e.verticalAlignment="top",e.horizontalAlignment="right",e},shift(e,t){this._group.attr({translateY:this._group.attr("translateY")+t})},draw(e,t,i){this._group.move(e-C-2-3+i.left,Math.floor(t/2-17.5));const n=this.getLayoutOptions();return(n.width>e||n.height>t)&&this.freeSpace(),this},show(){this._group.linkAppend()},hide(){this._group.linkRemove()},setOptions(e){this._options=e,e.formats?e.formats=e.formats.reduce(((e,t)=>((t=k(t,this._incidentOccurred,this.validFormats))&&e.push(t),e)),[]):e.formats=this.validFormats.supported.slice(),e.printingEnabled=void 0===e.printingEnabled||e.printingEnabled,e.enabled&&(e.formats.length||e.printingEnabled)?(this.show(),this._updateButton(),this._updateList(),this._hideList()):this.hide()},dispose(){this._unsubscribeEvents(),this._group.linkRemove().linkOff(),this._group.dispose(),this._shadow.dispose()},layoutOptions(){return this._options.enabled&&{horizontalAlignment:"right",verticalAlignment:"top",weak:!0}},measure(){this._fillSpace();const e=this._options.button.margin;return[C+e.left+e.right,C+e.top+e.bottom]},move(e){const t=this._options.button.margin;this._group.attr({translateX:Math.round(e[0])+t.left,translateY:Math.round(e[1])+t.top})},_fillSpace(){this._hiddenDueToLayout=!1,this.show()},freeSpace(){this._incidentOccurred("W2107"),this._hiddenDueToLayout=!0,this.hide()},_hideList(){this._listGroup.remove(),this._listShown=!1,this._setButtonState("default"),this._menuItems.forEach((e=>e.resetState()))},_showList(){this._listGroup.append(this._group),this._listShown=!0,this._menuItems.forEach((e=>e.fixPosition()))},_setButtonState(e){const t=this._options.button[e];this._button.attr({stroke:t.borderColor,fill:t.backgroundColor}),this._icon.attr({fill:t.color})},_subscribeEvents(){this._renderer.root.on(h.default.up+".export",(e=>{const t=e.target[T];t?"button"===t?this._listShown?(this._setButtonState("default"),this._hideList()):(this._setButtonState("focus"),this._showList()):"printing"===t?(this._print(),this._hideList()):"exporting"===t&&(this._exportTo(e.target[A]),this._hideList()):this._button&&this._hideList()})),this._listGroup.on(v,(e=>e.stopPropagation())),this._buttonGroup.on(h.default.enter,(()=>this._setButtonState("hover"))),this._buttonGroup.on(h.default.leave,(()=>this._setButtonState(this._listShown?"focus":"default"))),this._buttonGroup.on(h.default.down+".export",(()=>this._setButtonState("active")))},_unsubscribeEvents(){this._renderer.root.off(".export"),this._listGroup.off(),this._buttonGroup.off()},_updateButton(){const e=this._renderer,t=this._options,i={"export-element-type":"button"};this._button||(this._button=e.rect(0,0,C,C).append(this._buttonGroup),this._button.attr({rx:4,ry:4,fill:t.button.default.backgroundColor,stroke:t.button.default.borderColor,"stroke-width":1,cursor:"pointer"}),this._button.data(i),this._icon=e.path(y).append(this._buttonGroup),this._icon.attr({fill:t.button.default.color,cursor:"pointer"}),this._icon.data(i),this._buttonGroup.setTitle(l.default.format("vizExport-titleMenuText")))},_updateList(){const e=this._options,t=e.button.default,i=this._listGroup,n=function(e,t){let i=[];return t.printingEnabled&&i.push(L(e,t,{type:"printing",text:l.default.format("vizExport-printingButtonText"),itemIndex:i.length})),i=t.formats.reduce(((i,n)=>(i.push(L(e,t,{type:"exporting",text:l.default.getFormatter("vizExport-exportButtonText")(n),format:n,itemIndex:i.length})),i)),i),i}(this._renderer,e);this._shadow.attr({color:e.shadowColor}),this._overlay.attr({height:n.length*x+2,fill:t.backgroundColor,stroke:t.borderColor}),i.clear(),this._overlay.append(i),n.forEach((e=>e.g.append(i))),this._menuItems=n}});t.plugin={name:"export",init(){this._exportMenu=new F({renderer:this._renderer,incidentOccurred:this._incidentOccurred,print:()=>this.print(),exportTo:e=>this.exportTo(void 0,e)}),this._layout.add(this._exportMenu)},dispose(){this._exportMenu.dispose()},members:{_getExportMenuOptions(){return(0,n.extend)({},this._getOption("export"),{rtl:this._getOption("rtlEnabled",!0)})},_disablePointerEvents(){const e=this._renderer.root.attr("pointer-events");return this._renderer.root.attr({"pointer-events":"none"}),e},exportTo(e,t){const i=this._exportMenu,n=H(this,this._getOption("export")||{},e,t);i&&i.hide();const o=this._disablePointerEvents(),a=(0,r.export)(this._renderer.root.element,n,M(n.format)).fail(p.logger.error).always((()=>{this._renderer.root.attr({"pointer-events":o})}));return i&&i.show(),a},print(){const e=this._exportMenu,t=H(this,this._getOption("export")||{});t.exportingAction=null,t.exportedAction=null,t.margin=0,t.format="PNG",t.useBase64=!0,t.fileSavingAction=e=>{R(`data:image/png;base64,${e.data}`,{width:t.width,__test:t.__test}),e.cancel=!0};const i=this._disablePointerEvents();e&&e.hide();const n=(0,r.export)(this._renderer.root.element,t,M(t.format)).fail(p.logger.error).always((()=>{this._renderer.root.attr({"pointer-events":i})}));return e&&e.show(),n}},customize(e){const t=e.prototype;e.addChange({code:"EXPORT",handler(){this._exportMenu.setOptions(this._getExportMenuOptions()),this._change(["LAYOUT"])},isThemeDependent:!0,isOptionChange:!0,option:"export"}),t._optionChangesMap.onExporting="EXPORT",t._optionChangesMap.onExported="EXPORT",t._optionChangesMap.onFileSaving="EXPORT"},fontFields:["export.font"]}},71115:function(e,t,i){t.changes=function(){return new r},t.expand=p,t.replaceInherit=void 0;var n=i(52576),o=i(3104),a=i(17781);const s=!(0,o.hasWindow)();function r(){this.reset()}function l(e,t){return e!==t?(0,n.extend)({},e,t):(0,n.extend)({},e)}function d(e,t){return e!==t?e.concat(t):e.slice()}function u(e){e._totalChangesOrder=e._optionChangesOrder.concat(e._layoutChangesOrder,e._customChangesOrder)}function c(e){const t=this.prototype,i=e.code;t["_change_"+i]=e.handler,e.isThemeDependent&&t._themeDependentChanges.push(i),e.option&&(t._optionChangesMap[e.option]=i),(e.isOptionChange?t._optionChangesOrder:t._customChangesOrder).push(i),u(t)}function h(){const e=function(){let t;const i=e._chain.length;let n;for(t=0;t<i;++t)n=e._chain[t].apply(this,arguments);return n};return e._chain=[],e.add=function(t){e._chain.push(t)},e.copy=function(t){e._chain=t._chain.slice()},e}function p(e,t,i){let n=e[t];n?n.add?(!1===Object.prototype.hasOwnProperty.call(e,t)&&(n=h(),n.copy(e[t])),n.add(i)):(n=h(),n.add(e[t]),n.add(i)):n=i,e[t]=n}function g(e){const t=this.prototype;t._plugins.push(e),e.fontFields&&t._fontFields.push.apply(t._fontFields,e.fontFields),e.members&&(0,n.extend)(this.prototype,e.members),e.customize&&e.customize(this),e.extenders&&Object.keys(e.extenders).forEach((function(i){const n=e.extenders[i];p(t,i,n)}),this)}r.prototype={constructor:r,add:function(e){let t;const i=e.length,n=this._flags;for(t=0;t<i;++t)n[e[t]]=1},has:function(e){return this._flags[e]>0},count:function(){return Object.keys(this._flags).length},reset:function(){this._flags={}}};t.replaceInherit=s?function(e){const t=e.inherit;e.inherit=function(){const e=t.apply(this,arguments),i=e.prototype;return["_plugins","_eventsMap","_initialChanges","_themeDependentChanges","_optionChangesMap","_optionChangesOrder","_layoutChangesOrder","_customChangesOrder","_totalChangesOrder"].forEach((function(e){i[e]={}})),e.addPlugin=a.noop,e},e.addChange=a.noop,e.addPlugin=a.noop}:function(e){const t=e.inherit;e.inherit=function(){let e=this.prototype;const i=e._plugins,n=e._fontFields,o=e._eventsMap,a=e._initialChanges,s=e._themeDependentChanges,r=e._optionChangesMap,c=e._partialOptionChangesMap,h=e._partialOptionChangesPath,p=e._optionChangesOrder,_=e._layoutChangesOrder,f=e._customChangesOrder,m=t.apply(this,arguments);return e=m.prototype,e._plugins=d(i,e._plugins),e._fontFields=d(n,e._fontFields),e._eventsMap=l(o,e._eventsMap),e._initialChanges=d(a,e._initialChanges),e._themeDependentChanges=d(s,e._themeDependentChanges),e._optionChangesMap=l(r,e._optionChangesMap),e._partialOptionChangesMap=l(c,e._partialOptionChangesMap),e._partialOptionChangesPath=l(h,e._partialOptionChangesPath),e._optionChangesOrder=d(p,e._optionChangesOrder),e._layoutChangesOrder=d(_,e._layoutChangesOrder),e._customChangesOrder=d(f,e._customChangesOrder),u(e),m.addPlugin=g,m},e.prototype._plugins=[],e.prototype._fontFields=[],e.addChange=c,e.addPlugin=g}},48874:function(e,t,i){t.default=void 0;var n=i(28779);const o=Math.min,a=Math.max,s=Math.round,r={left:0,center:1,right:2},l={top:0,center:1,bottom:2},d={horizontal:0,vertical:1},u={};function c(e,t,i){const o=(0,n.normalizeEnum)(e);return o in t?t[o]:i}function h(e){const t=c(e.side,d,1),i=[c(e.horizontalAlignment,r,1),c(e.verticalAlignment,l,0)];return{side:t,primary:(n=i[t],n<2?0:2),secondary:i[1-t],weak:e.weak,priority:e.priority||0,header:e.header,position:e.position};var n}function p(e,t){return(e>0?-1:1)*t}function g(e,t,i){const n=e.side,o=e.element.measure([t[2]-t[0],t[3]-t[1]]),a="indside"===e.position?0:i[n],s=o[n]<t[2+n]-t[n]-a;return s&&("inside"!==e.position&&(t[e.primary+n]+=p(e.primary,o[n])),e.size=o),s}function _(e,t,i){const n=e.side,o=1-n;const a=[],r=(l=e.secondary,d=i[o],c=i[2+o],h=e.size[o],u[l](d,c,h));var l,d,c,h;return a[n]=s(a[2+n]=t[e.primary+n]+("inside"===e.position?p(e.primary,e.size[n]):0)),a[e.primary+n]=s(t[e.primary+n]-p(e.primary,e.size[n])),"inside"!==e.position&&(t[e.primary+n]=a[e.primary+n]),a[o]=s(r[0]),a[2+o]=s(r[1]),a}function f(e,t,i,n,o,a){const s=_(e,t,i),r=_(e,n,n);o[e.side]>0?(o[e.side]-=e.size[e.side],a[e.primary+e.side]=s[e.primary+e.side],e.element.freeSpace()):e.element.move(s,r)}function m(){this._targets=[]}function v(e,t){const i=t.slice(),n=_(e,i,i);return n[e.side]=t[e.side],n[2+e.side]=t[2+e.side],n}function C(e,t){const i=e.side,n=e.primary,o=e.secondary;return{side:i,primary:n,secondary:o,priority:0,element:{measure:function(o){const a=o.slice(),s=t.element.measure(o.slice());o[n]-=s[n];const r=e.element.measure(o.slice());return a[i]=s[i]=r[i]=Math.max(r[i],s[i]),t.size=s,e.size=r,a},move:function(i,n){if(n[2]-n[0]<e.size[0]+t.size[0]-2)return void this.freeSpace();const o=v(t,n);n[2+t.primary]=o[t.primary];const a=v(e,n);n[2+t.primary]<i[2+t.primary]&&e.size[e.primary]>i[2+e.primary]-i[e.primary]&&(i[2+t.primary]=n[2+t.primary]);let s=v(e,i);s[2+t.primary]>n[2+t.primary]&&(i[2+t.primary]=n[2+t.primary],s=v(e,i)),t.element.move(o),e.element.move(s,a)},freeSpace:function(){e.element.freeSpace(),t.element.freeSpace()}}}}u[0]=function(e,t,i){return[e,o(t,e+i)]},u[1]=function(e,t,i){return[a(e,(e+t-i)/2),o(t,(e+t+i)/2)]},u[2]=function(e,t,i){return[a(e,t-i),t]},m.prototype={constructor:m,dispose:function(){this._targets=null},add:function(e){this._targets.push(e)},forward:function(e,t){const i=e.slice(),n=function(e){let t;const i=e.length;let n,o=[];for(t=0;t<i;++t)n=e[t].layoutOptions(),n&&(n=h(n),n.element=e[t],o.push(n));return o.sort((function(e,t){return t.side-e.side||e.priority-t.priority})),o=function(e){const t=e.filter((function(e){return!0===e.weak}))[0];let i;t&&(i=e.filter((function(e){return t.primary===e.primary&&e.side===t.side&&e!==t}))[0]);if(t&&i)return[C(i,t)].concat(e.filter((function(e){return!(e===i||e===t)})));return e}(o),o}(this._targets);let o;const a=n.length,s=[];for(o=0;o<a;++o)g(n[o],i,t)?s.push(n[o]):n[o].element.freeSpace();return this._cache=s.reverse(),i},backward:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0],n=e.slice();const o=e.slice(),a=this._cache;let s,r,l=0;const d=a.length;for(r=0;r<d;++r)s=a[r],s.side!==l&&(n=e.slice()),f(s,n,t,o,i,e),l=s.side;return i}};t.default=m;e.exports=t.default,e.exports.default=t.default},77461:function(e,t,i){t.LayoutElement=l,t.WrapperLayoutElement=d;var n=i(17781),o=i(22263);const a=Math.round,s={horizontal:0,vertical:0},r={center:.5,right:1,bottom:1,left:0,top:0};function l(e){this._options=e}function d(e,t){this._renderElement=e,this._cacheBBox=t}l.prototype={constructor:l,position:function(e){const t=e.of.getLayoutOptions(),i=this.getLayoutOptions(),n=e.at,o=e.my,l=e.offset||s,d=-r[o.horizontal]*i.width+t.x+r[n.horizontal]*t.width+parseInt(l.horizontal),u=-r[o.vertical]*i.height+t.y+r[n.vertical]*t.height+parseInt(l.vertical);this.shift(a(d),a(u))},getLayoutOptions:n.noop};const u=d.prototype=(0,o.clone)(l.prototype);u.constructor=d,u.getLayoutOptions=function(){return this._cacheBBox||this._renderElement.getBBox()},u.shift=function(e,t){const i=this.getLayoutOptions();this._renderElement.move(a(e-i.x),a(t-i.y))}},92528:function(e,t,i){t.plugin=t.LoadingIndicator=void 0;var n=i(28779);const o="loadingIndicatorReady";let a=function(e){const t=this,i=e.renderer;t._group=i.g().attr({class:"dx-loading-indicator"}).linkOn(i.root,{name:"loading-indicator",after:"peripheral"}),t._rect=i.rect().attr({opacity:0}).append(t._group),t._text=i.text().attr({align:"center"}).append(t._group),t._createStates(e.eventTrigger,t._group,i.root,e.notify)};t.LoadingIndicator=a,a.prototype={constructor:a,_createStates:function(e,t,i,n){this._states=[{opacity:0,start:function(){n(!1)},complete:function(){t.linkRemove(),i.css({"pointer-events":""}),e(o)}},{opacity:.85,start:function(){t.linkAppend(),i.css({"pointer-events":"none"}),n(!0)},complete:function(){e(o)}}],this._state=0},setSize:function(e){const t=e.width,i=e.height;this._rect.attr({width:t,height:i}),this._text.attr({x:t/2,y:i/2})},setOptions:function(e){this._rect.attr({fill:e.backgroundColor}),this._text.css((0,n.patchFontOptions)(e.font)).attr({text:e.text,class:e.cssClass}),this[e.show?"show":"hide"]()},dispose:function(){const e=this;e._group.linkRemove().linkOff(),e._group=e._rect=e._text=e._states=null},_transit:function(e){const t=this;let i;t._state!==e&&(t._state=e,t._isHiding=!1,i=t._states[e],t._rect.stopAnimation().animate({opacity:i.opacity},{complete:i.complete,easing:"linear",duration:400,unstoppable:!0}),t._noHiding=!0,i.start(),t._noHiding=!1)},show:function(){this._transit(1)},hide:function(){this._transit(0)},scheduleHiding:function(){this._noHiding||(this._isHiding=!0)},fulfillHiding:function(){this._isHiding&&this.hide()}};t.plugin={name:"loading_indicator",init:function(){const e=this;e._loadingIndicator=new a({eventTrigger:e._eventTrigger,renderer:e._renderer,notify:function(t){e._skipLoadingIndicatorOptions=!0,e.option("loadingIndicator",{show:t}),e._skipLoadingIndicatorOptions=!1,t&&e._stopCurrentHandling()}}),e._scheduleLoadingIndicatorHiding()},dispose:function(){this._loadingIndicator.dispose(),this._loadingIndicator=null},members:{_scheduleLoadingIndicatorHiding:function(){this._loadingIndicator.scheduleHiding()},_fulfillLoadingIndicatorHiding:function(){this._loadingIndicator.fulfillHiding()},showLoadingIndicator:function(){this._loadingIndicator.show()},hideLoadingIndicator:function(){this._loadingIndicator.hide()},_onBeginUpdate:function(){this._optionChangedLocker||this._scheduleLoadingIndicatorHiding()}},extenders:{_dataSourceLoadingChangedHandler(e){e&&(this._options.silent("loadingIndicator")||{}).enabled&&this._loadingIndicator.show()},_setContentSize(){this._loadingIndicator.setSize(this._canvas)},endUpdate(){this._initialized&&this._dataIsReady()&&this._fulfillLoadingIndicatorHiding()}},customize:function(e){const t=e.prototype;if(t._dataSourceChangedHandler){const e=t._dataSourceChangedHandler;t._dataSourceChangedHandler=function(){this._scheduleLoadingIndicatorHiding(),e.apply(this,arguments)}}e.addChange({code:"LOADING_INDICATOR",handler:function(){this._skipLoadingIndicatorOptions||this._loadingIndicator.setOptions(this._getOption("loadingIndicator")),this._scheduleLoadingIndicatorHiding()},isThemeDependent:!0,option:"loadingIndicator",isOptionChange:!0}),t._eventsMap.onLoadingIndicatorReady={name:"loadingIndicatorReady"};const i=t._drawn;t._drawn=function(){i.apply(this,arguments),this._dataIsReady()&&this._fulfillLoadingIndicatorHiding()}},fontFields:["loadingIndicator.font"]}},87040:function(e,t,i){t.Plaque=void 0;var n=i(52576),o=i(11528);const a=["x","y","canvas","offsetX","offsetY","offset"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}const r=Math,l=r.round,d=r.max,u=r.min,c=r.sin,h=r.cos,p=r.asin,g=r.PI,_=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.join("")};function f(e,t,i){return`a ${e} ${e} 0 0 1 ${t*e} ${i*e}`}function m(e,t,i){return`A ${e} ${e} 0 0 1 ${t} ${i}`}function v(e,t,i,n,o){return(e-n)*l(h(i))+(t-o)*l(c(i))+n}function C(e,t,i,n,o){return-(e-n)*l(c(i))+(t-o)*l(h(i))+o}function y(e,t,i,n,o){let{width:a,height:s}=e;const r=a/2,l=s/2,d=Math.ceil(t+r),u=Math.floor(t-r),c=Math.floor(i-l),h=Math.ceil(i+l);return n<u&&o<c||n>=u&&n<=d&&o<c?270:n>d&&o>h||n>=u&&n<=d&&o>h?90:n<u&&o>h||n<u&&o>=c&&o<=h?180:0}function b(e,t,i,n,o,a,s){let{width:r,height:l}=e,{arrowWidth:v,cornerRadius:C=0}=a;const y=v/2,b=r/2,x=l/2,w=Math.ceil(t+b),S=Math.floor(t-b),D=Math.floor(i-x),I=Math.ceil(i+x),E=[S,D],T=[w,D],A=[w,I],O=[S,I],P=n<=S?S:w<=n?w:n,k=o<=D?D:I<=o?I:o,M=u(k+y,I),R=d(k-y,D),L=d(P-y,S);let B;if(C=Math.min(r/2,l/2,C),E[1]+=C,T[0]-=C,A[1]-=C,O[0]+=C,!s||S<=n&&n<=w&&D<=o&&o<=I)B=_(E,f(C,1,-1),"L",T,f(C,1,1),"L",A,f(C,-1,1),"L",O,f(C,-1,-1));else if(n>w&&o<D){const e=v/C||0,t=g/4+e/2,i=g/4-e/2,a=T[0]+h(i)*C,s=T[1]+(1-c(i))*C;let r=_("L",T,f(C,h(t),1-c(t)),"L",[n,o,a,s],m(C,T[0]+C,T[1]+C));Math.abs(t)>g/2&&(r=_("L",[L,D,n,o,w,M])),B=_(E,f(C,1,-1),r,"L",A,f(C,-1,1),"L",O,f(C,-1,-1))}else if(n>w&&o>=D&&o<=I){let e;if(R>=T[1]+C&&M<=A[1])e=_(f(C,1,1),"L",[w,R,n,o,w,M],"L",A,f(C,-1,1));else if(R<T[1]+C&&M>=T[1]+C&&M<=A[1]){const t=(T[1]+C-R)/C,i=T[0]+h(t)*C,a=T[1]+(1-c(t))*C;e=_(f(C,h(t),1-c(t)),"L",[i,a,n,o,w,M],"L",A,f(C,-1,1))}else if(R<T[1]+C&&M<T[1]+C){const t=(T[1]+C-R)/C,i=T[0]+h(t)*C,a=T[1]+(1-c(t))*C,s=Math.sin((T[1]+C-M)/C),r=T[0]+C*h(s),l=T[1]+C*(1-c(s));e=_(f(C,h(t),1-c(t)),"L",[i,a,n,o,r,l],m(C,T[0]+C,T[1]+C),"L",A,f(C,-1,1))}else if(R<=T[1]+C&&M>=A[1]){const t=p((T[1]+C-R)/C),i=T[0]+C*h(t),a=T[1]+C*(1-c(t)),s=p((M-A[1])/C),r=A[0]+C*(h(s)-1),l=A[1]+C*c(s);e=_(f(C,h(t),1-c(t)),"L",[i,a,n,o,r,l],m(C,A[0]-C,A[1]+C))}else if(R>T[1]+C&&R<=A[1]&&M>A[1]){const t=p((M-A[1])/C),i=A[0]+C*(h(t)-1),a=A[1]+C*c(t);e=_(f(C,1,1),"L",[w,R,n,o,i,a],m(C,A[0]-C,A[1]+C))}else if(R>T[1]+C&&M>A[1]){const t=p((M-A[1])/C),i=A[0]+C*(h(t)-1),a=A[1]+C*c(t),s=p((R-A[1])/C),r=A[0]+C*(h(s)-1),l=A[1]+C*c(s);e=_(f(C,1,1),"L",A,f(C,h(s)-1,c(s)),"L",[r,l,n,o,i,a],m(C,A[0]-C,A[1]+C))}B=_(E,f(C,1,-1),"L",T,e,"L",O,f(C,-1,-1))}return _("M",B,"Z")}t.Plaque=class{constructor(e,t,i,n){let o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:(e,t)=>t.getBBox(),s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:(e,t,i,n)=>t.move(i,n);this.widget=t,this.options=e,this.root=i,this.contentTemplate=n,this.bonded=o,this.measureContent=a,this.moveContentGroup=s}draw(e){let{x:t,y:i,canvas:r={},offsetX:c,offsetY:h,offset:p=0}=e,g=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}(e,a);const _=this.options;let{x:f,y:m}=_;const v=r.left,C=r.width-r.right,y=r.width-r.right-r.left,b=r.top,x=r.height-r.bottom,w=r.height-r.bottom-r.top;if(!((0,o.isDefined)(t)&&(0,o.isDefined)(i)||(0,o.isDefined)(f)&&(0,o.isDefined)(m)))return!1;if((0,o.isDefined)(t)&&(t<v||C<t||i<b||x<i))return!1;this._root||this._draw();const S=(0,n.extend)({x:"-50%",y:"-50%",width:"200%",height:"200%"},_.shadow),D=_.width>0?_.width:null,I=_.height>0?_.height:null,E=()=>{var e;const n=this._contentBBox=this.measureContent(this.widget,this._contentGroup),a=this._size={width:d(D,n.width)+2*_.paddingLeftRight,height:d(I,n.height)+2*_.paddingTopBottom,offset:p},s=S.offsetX,r=S.offsetY,g=2*S.blur+1,E=d(g-s,0),T=d(g+s,0),A=d(g-r,0),O=d(g+r,0);if(this.margins={lm:E,rm:T,tm:A,bm:O},(0,o.isDefined)(f)?(f+=c||0,(0,o.isDefined)(t)||(t=f)):f=(0,o.isDefined)(c)?t+c:y<a.width?l(v+y/2):u(d(t,Math.ceil(v+a.width/2+E)),Math.floor(C-a.width/2-T)),(0,o.isDefined)(m))m+=h||0,(0,o.isDefined)(i)||(i=m+a.height/2);else if((0,o.isDefined)(h))m=i+h;else{const e=i-_.arrowLength-a.height/2-p,t=i+_.arrowLength+a.height/2+p;w<a.height+_.arrowLength?m=l(b+a.height/2):e-a.height/2-A<b?t+a.height/2+O<x?(m=t,i+=p):m=l(b+a.height/2):(m=e,i-=p)}this.anchorX=t,this.anchorY=i,this.move(f,m),null===(e=this._root)||void 0===e||e.append(this.root)};return this.contentTemplate.render?(this.contentTemplate.render({model:_,container:this._contentGroup.element,onRendered:E}),!0):this.contentTemplate(s({group:this._contentGroup,onRender:E},g))}_draw(){const e=this.widget._renderer,t=this.options,i=(0,n.extend)({x:"-50%",y:"-50%",width:"200%",height:"200%"},t.shadow),o=this._shadow=e.shadowFilter().attr(i),a={opacity:t.opacity,"stroke-width":0,fill:t.color},s=t.border||{};s.visible&&(0,n.extend)(a,{"stroke-width":s.width,stroke:s.color,"stroke-opacity":s.opacity,dashStyle:s.dashStyle});const r=this._root=e.g().append(this.root);t.type&&r.attr({class:`dxc-${t.type}-annotation`});const l=e.g().attr({filter:o.id}).append(r);this._cloud=e.path([],"area").attr(a).sharp().append(l),this._contentGroup=e.g().append(r)}getBBox(){const e=this._size||{},t=this.margins||{},i=y(e,this.x,this.y,this.anchorX,this.anchorY);return{x:Math.floor(this.x-e.width/2-t.lm),y:Math.floor(this.y-e.height/2-t.tm-(270===i?this.options.arrowLength:0)),width:e.width+t.lm+t.rm,height:e.height+t.tm+t.bm+(90===i||270===i?this.options.arrowLength:0)}}clear(){return this._root&&(this._root.remove(),this._shadow.remove(),this._root=null),this}customizeCloud(e){this._cloud&&this._cloud.attr(e)}moveRoot(e,t){this._root&&this._root.move(e,t)}move(e,t){e=l(e),t=l(t),this.x=e,this.y=t;const i=y(this._size,e,t,this.anchorX,this.anchorY),n=i*g/180;var o,a;this._cloud.attr({d:b((o=this._size,a=i,a%90==0&&a%180!=0?{width:o.height,height:o.width}:o),e,t,v(this.anchorX,this.anchorY,n,e,t),C(this.anchorX,this.anchorY,n,e,t),this.options,this.bonded)}).rotate(i,e,t),this.moveContentGroup(this.widget,this._contentGroup,e-this._contentBBox.x-this._contentBBox.width/2,t-this._contentBBox.y-this._contentBBox.height/2)}hitTest(e,t){const{width:i,height:n}=this._size||{};return Math.abs(e-this.x)<=i/2&&Math.abs(t-this.y)<=n/2}}},35523:function(e,t,i){t.AnimationController=c,t.easingFunctions=t.animationSvgStep=void 0;var n=i(84096);const o=function(){},a=t.easingFunctions={easeOutCubic:function(e,t,i){return 1===e?i:(1-Math.pow(1-e,3))*(i-t)+ +t},linear:function(e,t,i){return 1===e?i:e*(i-t)+ +t}},s=t.animationSvgStep={segments:function(e,t,i,n,o){const a=t.from,s=t.to;let r,l,d,u;const c=[];for(d=0;d<a.length;d++){if(r=a[d],l=[r[0]],r.length>1)for(u=1;u<r.length;u++)l.push(n(i,r[u],s[d][u]));c.push(l)}o.segments=t.end&&1===i?t.end:c,e.attr({segments:c})},arc:function(e,t,i,n){const o=t.from,a=t.to,s={};for(const e in o)s[e]=n(i,o[e],a[e]);e.attr(s)},transform:function(e,t,i,n,o){const a=t.from,s=t.to,r={};for(const e in a)r[e]=o[e]=n(i,a[e],s[e]);e.attr(r)},base:function(e,t,i,n,o,a){const s={};s[a]=o[a]=n(i,t.from,t.to),e.attr(s)},_:o,complete:function(e,t){e.attr(t)}};function r(e){const t=this,i=t._animateStep;let n;for(n in t._progress=t._calcProgress(e),t.params){(i[n]||i.base)(t.element,t.params[n],t._progress,t._easing,t._currentParams,n)}return t.options.step&&t.options.step(t._easing(t._progress,0,1),t._progress),1!==t._progress||t.stop()}function l(e){return e-this._startTime>=this.delay&&(this.tick=r),!0}function d(e){return this._startTime=e,this.tick=this.delay?l:r,!0}function u(e,t,i){const n=this;n._progress=0,n.element=e,n.params=t,n.options=i,n.duration=i.partitionDuration?i.duration*i.partitionDuration:i.duration,n.delay=i.delay&&i.duration*i.delay||0,n._animateStep=i.animateStep||s,n._easing=a[i.easing]||a.easeOutCubic,n._currentParams={},n.tick=d}function c(e){const t=this;t._animationCount=0,t._timerId=null,t._animations={},t.element=e}u.prototype={_calcProgress:function(e){return Math.min(1,(e-this.delay-this._startTime)/this.duration)},stop:function(e){const t=this,i=t.options,n=t._animateStep;t.stop=t.tick=o,n.complete&&n.complete(t.element,t._currentParams),i.complete&&!e&&i.complete()}},c.prototype={_loop:function(){const e=this,t=e._animations;let i=0;const o=(new Date).getTime();let a;const s=e._endAnimation;for(a in t)t[a].tick(o)||delete t[a],i++;if(0===i)return e.stop(),void(e._endAnimationTimer=s&&setTimeout((function(){0===e._animationCount&&(s(),e._endAnimation=null)})));e._timerId=n.requestAnimationFrame.call(null,(function(){e._loop()}),e.element)},addAnimation:function(e){const t=this;t._animations[t._animationCount++]=e,clearTimeout(t._endAnimationTimer),t._timerId||(clearTimeout(t._startDelay),t._startDelay=setTimeout((function(){t._timerId=1,t._loop()}),0))},animateElement:function(e,t,i){e&&t&&i&&(e.animation&&e.animation.stop(),this.addAnimation(e.animation=new u(e,t,i)))},onEndAnimation:function(e){this._animationCount?this._endAnimation=e:e()},dispose:function(){this.stop(),this.element=null},stop:function(){const e=this;e._animations={},e._animationCount=0,(0,n.cancelAnimationFrame)(e._timerId),clearTimeout(e._startDelay),clearTimeout(e._endAnimationTimer),e._timerId=null},lock:function(){let e;const t=this._animations;let i,n;for(e in t)i=t[e].options.unstoppable,n=n||i,i||(t[e].stop(!0),delete t[e]);!n&&this.stop()}}},63022:function(e,t,i){t.RectSvgElement=t.PathSvgElement=t.ArcSvgElement=void 0,t.Renderer=xe,t.TextSvgElement=t.SvgElement=void 0,t.getFuncIri=M,t.processHatchingAttrs=B,t.refreshPaths=void 0;var n=h(i(64553)),o=h(i(64960)),a=i(3104),s=h(i(13630)),r=h(i(92774)),l=i(47420),d=i(35523),u=i(28779),c=i(11528);function h(e){return e&&e.__esModule?e:{default:e}}const p=(0,a.getWindow)(),{max:g,round:_}=Math,f={"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,widows:!0,"z-index":!0,zoom:!0},m="text",v="stroke",C="stroke-width",y="stroke-opacity",b="font-size",x="font-style",w="font-weight",S="text-decoration",D="textsAlignment",I="none",E="...",T=Object.create?function(e){return Object.create(e)}:function(e){const t=function(){};return t.prototype=e,new t},A={scaleX:1,scaleY:1,"pointer-events":null},O=(0,s.default)((function(){const e=o.default.createElement("div");return e.style.left="-9999px",e.style.position="absolute",{backupContainer:e,backupCounter:0}}));function P(e){return e&&"string"!=typeof e}function k(e){return o.default.createElementNS("http://www.w3.org/2000/svg",e)}function M(e,t){return null!==e?"url("+(t?p.location.href.split("#")[0]:"")+"#"+e+")":e}function R(e,t){let i;for(i in t)e[i]=t[i];return e}const L={full:I,lefttop:"xMinYMin",leftcenter:"xMinYMid",leftbottom:"xMinYMax",centertop:"xMidYMin",center:"xMidYMid",centerbottom:"xMidYMax",righttop:"xMaxYMin",rightcenter:"xMaxYMid",rightbottom:"xMaxYMax"};function B(e,t){return t.hatching&&"none"!==(0,u.normalizeEnum)(t.hatching.direction)?((t=R({},t)).fill=e._hatching=e.renderer.lockDefsElements({color:t.fill,hatching:t.hatching},e._hatching,"pattern"),delete t.filter):e._hatching?(e.renderer.releaseDefsElements(e._hatching),e._hatching=null,delete t.filter):t.filter?(t=R({},t)).filter=e._filter=e.renderer.lockDefsElements({},e._filter,"filter"):e._filter&&(e.renderer.releaseDefsElements(e._filter),e._filter=null),delete t.hatching,t}const V=function(e,t,i,n,o,a,s,r,l,d){return["M",(e+n*o).toFixed(5),(t-n*a).toFixed(5),"A",n.toFixed(5),n.toFixed(5),0,d,0,(e+n*s).toFixed(5),(t-n*r).toFixed(5),l?"M":"L",(e+i*s).toFixed(5),(t-i*r).toFixed(5),"A",i.toFixed(5),i.toFixed(5),0,d,1,(e+i*o).toFixed(5),(t-i*a).toFixed(5),"Z"].join(" ")};function F(e,t){let i=[["M",0,0]];switch(t){case"line":i=H(e);break;case"area":i=H(e,!0);break;case"bezier":i=N(e);break;case"bezierarea":i=N(e,!0)}return i}function H(e,t){return z(e,W,t)}function N(e,t){return z(e,$,t)}function z(e,t,i){var n;let o,a;const s=[];if(null!==(n=e[0])&&void 0!==n&&n.length)for(o=0,a=e.length;o<a;++o)t(e[o],i,s);else t(e,i,s);return s}function W(e,t,i){let n=0;const o=i.length;let a=o;const s=(e||[]).length;if(s){if(void 0!==e[0].x)for(;n<s;)i[a++]=["L",e[n].x,e[n++].y];else for(;n<s;)i[a++]=["L",e[n++],e[n++]];i[o][0]="M"}else i[a]=["M",0,0];return t&&i.push(["Z"]),i}function $(e,t,i){let n,o=i.length;const a=(e||[]).length;if(a)if(void 0!==e[0].x)for(i[o++]=["M",e[0].x,e[0].y],n=1;n<a;)i[o++]=["C",e[n].x,e[n++].y,e[n].x,e[n++].y,e[n].x,e[n++].y];else for(i[o++]=["M",e[0],e[1]],n=2;n<a;)i[o++]=["C",e[n++],e[n++],e[n++],e[n++],e[n++],e[n++]];else i[o]=["M",0,0];return t&&i.push(["Z"]),i}function G(e,t){const i=e[e.length-2],n=e[e.length-1];switch(t){case"line":case"area":e[0]="L";break;case"bezier":case"bezierarea":e[0]="C",e[1]=e[3]=e[5]=i,e[2]=e[4]=e[6]=n}}function j(e,t,i){const n=e[e.length-1].slice();let o=e.length;for(G(n,i);o<t.length;o++)e[o]=n.slice(0)}function U(e,t,i){let n,o;const a=e.length,s=t.length;let r,l;if((a-1)%2==0&&(s-1)%2==0){n=(a-1)/2-1,o=e.slice(0,n+1),r=o[o.length-1].slice(0),l=e.slice(n+1)[0].slice(0),G(r,i),G(l,i);for(let t=n;t<(s-1)/2-1;t++)e.splice(t+1,0,r),e.splice(t+3,0,l)}}function K(e,t){const i=e._styles;let n,o;for(n in t=t||{})o=t[n],(0,c.isDefined)(o)&&(o+="number"!=typeof o||f[n]?"":"px",i[n]=""!==o?o:null);for(n in i)o=i[n],o?e.element.style[n]=o:null===o&&(e.element.style[n]="");return e}function Z(e,t){const i=e.element,n=e.attr(t);n&&-1!==n.indexOf("DevExpress")&&(i.removeAttribute(t),i.setAttribute(t,M(n,e.renderer.pathModified)))}function q(e,t){t=t||{};const i=e._settings,n={};let o,a;const s=e.element,r=e.renderer,l=r.rtl;let d,c,h,p;if(!P(t))return t in i?i[t]:t in A?A[t]:0;for(o in R(n,t),n)if(a=n[o],void 0!==a){if(i[o]=a,"align"===o)o="text-anchor",a={left:l?"end":"start",center:"middle",right:l?"start":"end"}[a]||null;else{if("dashStyle"===o){c=!0;continue}if(o===C)c=!0;else if(!a||"fill"!==o&&"clip-path"!==o&&"filter"!==o||0!==a.indexOf("DevExpress")){if(/^(translate(X|Y)|rotate[XY]?|scale(X|Y)|sharp|sharpDirection)$/i.test(o)){d=!0;continue}/^(x|y|d)$/i.test(o)&&(d=!0)}else e._addFixIRICallback(),a=M(a,r.pathModified)}null===a?s.removeAttribute(o):s.setAttribute(o,a)}if(c&&"dashStyle"in i)if(a=i.dashStyle,h=("_originalSW"in e?e._originalSW:i[C])||1,o="stroke-dasharray",a=null===a?"":(0,u.normalizeEnum)(a),""===a||"solid"===a||a===I)e.element.removeAttribute(o);else{for(a=a.replace(/longdash/g,"8,3,").replace(/dash/g,"4,3,").replace(/dot/g,"1,3,").replace(/,$/,"").split(","),p=a.length;p--;)a[p]=parseInt(a[p])*h;e.element.setAttribute(o,a.join(","))}return d&&e._applyTransformation(),e}function Y(e,t,i,n,a){let s,r,l,d,u;if(void 0!==i.wholeText)e.push({value:i.wholeText,style:n,className:a,line:t,height:n[b]||0});else if("BR"===i.tagName)++t;else if(o.default.isElementNode(i)){switch(R(s={},n),i.tagName){case"B":case"STRONG":s[w]="bold";break;case"I":case"EM":s[x]="italic";break;case"U":s[S]="underline"}for(r=i.style,r.color&&(s.fill=r.color),r.fontSize&&(s[b]=r.fontSize),r.fontStyle&&(s[x]=r.fontStyle),r.fontWeight&&(s[w]=r.fontWeight),r.textDecoration&&(s[S]=r.textDecoration),l=0,u=i.childNodes,d=u.length;l<d;++l)t=Y(e,t,u[l],s,i.className||a)}return t}function X(e,t,i){let n,a,s;for(n=0,a=e.length;n<a;++n)s=e[n],s[i]=k("tspan"),s[i].appendChild(o.default.createTextNode(s.value)),s.style&&K({element:s[i],_styles:{}},s.style),s.className&&s[i].setAttribute("class",s.className),t.appendChild(s[i])}function Q(){this._hasEllipsis&&this.attr({text:this._settings.text})}function J(e){let t;return e&&(t=e.cloneNode(),t.removeAttribute("y"),t.removeAttribute("x")),t||e}function ee(e){const t=o.default.querySelectorAll(e,"title");for(let i=0;i<t.length;i++)e.removeChild(t[i]);return t}function te(e,t,i,n){let o,a;if(i<=t&&n>t)for(o=1,a=e.value.length;o<=a;++o)if(i+e.tspan.getSubStringLength(0,o)>t)return o-1}function ie(e){return e.value.length?e.tspan.getSubStringLength(0,e.value.length):0}function ne(e,t){let{hideOverflowEllipsis:i}=t;return i&&0===e?"":E}function oe(e,t,i){const n=ne(t,i);if(e.value.length&&e.tspan.parentNode)for(let i=e.value.length-1;i>=1;i--){if(e.startBox+e.tspan.getSubStringLength(0,i)<t){se(e,i,n);break}1===i&&se(e,0,n)}}function ae(e,t,i,n,o){const a=e.value;let s;"none"!==n.wordWrap&&(s="normal"===n.wordWrap?function(e,t){const i=e.startBox>0?[0]:[],n=e.value.split("").reduce(((e,t,i)=>(" "===t&&e.push(i),e)),i);let o=0;for(;void 0!==n[o+1]&&e.startBox+e.tspan.getSubStringLength(0,n[o+1])<t;)o++;return n[o]}(e,t):function(e,t){for(let i=0;i<e.value.length-1;i++)if(e.startBox+e.tspan.getSubStringLength(0,i+1)>t)return i}(e,t));let r,l=[];if(isFinite(s)&&(0!==o||0!==s)){se(e,s,"");const o=" "===a[s]?1:0,d=a.slice(s+o);if(d.length){const o=J(e.tspan);if(o.textContent=d,e.tspan.parentNode.appendChild(o),r=R(R({},e),{value:d,startBox:0,height:0,tspan:o,stroke:J(e.stroke),endBox:o.getSubStringLength(0,d.length)}),r.stroke&&(r.stroke.textContent=d),r.endBox>t&&(l=ae(r,t,i,n,s),!l.length))return[]}}if(e.value.length){if("ellipsis"===n.textOverflow&&e.tspan.getSubStringLength(0,e.value.length)>t&&oe(e,i,n),"hide"===n.textOverflow&&e.tspan.getSubStringLength(0,e.value.length)>t)return[]}else e.tspan.parentNode.removeChild(e.tspan);const d=[];return r&&d.push(r),[{commonLength:a.length,parts:d}].concat(l)}function se(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;const n=e.value.substr(0,t)+i;e.value=e.tspan.textContent=n,e.stroke&&(e.stroke.textContent=n),i===E&&(e.hasEllipsis=!0)}function re(e){e.tspan.parentNode&&e.tspan.parentNode.removeChild(e.tspan),e.stroke&&e.stroke.parentNode&&e.stroke.parentNode.removeChild(e.stroke)}function le(e,t,i){e.tspan.setAttribute(t,i),e.stroke&&e.stroke.setAttribute(t,i)}function de(e,t){return e.inherits?ce(e.height,t):e.height||t}function ue(e){if(!e._texts)return;const t=e._texts,i=e._settings.x,n=e._getLineHeight();let o,a,s=t[0];for(le(s,"x",i),le(s,"y",e._settings.y),o=1,a=t.length;o<a;++o)if(s=t[o],parseFloat(s.height)>=0){le(s,"x",i);le(s,"dy",de(s,n))}}function ce(e,t){const i=parseFloat(e),n=parseFloat(t),o=i||12,a=n||12;return o>a?isNaN(i)?o:e:isNaN(n)?a:t}function he(e,t,i,n){let o,a;i=i||{};const s=e.renderer,r=e._settings,l={},d={translateX:0,translateY:0,scaleX:1,scaleY:1,rotate:0,rotateX:0,rotateY:0};if(n&&(i.complete=n),s.animationEnabled()){for(o in t)a=t[o],/^(translate(X|Y)|rotate[XY]?|scale(X|Y))$/i.test(o)?(l.transform=l.transform||{from:{},to:{}},l.transform.from[o]=o in r?Number(r[o].toFixed(3)):d[o],l.transform.to[o]=a):l[o]="arc"===o||"segments"===o?a:{from:o in r?r[o]:parseFloat(e.element.getAttribute(o)||0),to:a};s.animateElement(e,l,R(R({},s._animation),i))}else i.step&&i.step.call(e,1,1),i.complete&&i.complete.call(e),e.attr(t);return e}function pe(e,t){const i={is:!1,name:t.name||t,after:t.after};return e?i.to=e:i.virtual=!0,i}let ge=function(e,t,i){const n=this;n.renderer=e,n.element=k(t),n._settings={},n._styles={},"path"===t&&(n.type=i||"line")};function _e(e){we.remove(e)}t.SvgElement=ge,ge.prototype={constructor:ge,_getJQElement:function(){return this._$element||(this._$element=(0,n.default)(this.element))},_addFixIRICallback:function(){const e=this,t=function(){Z(e,"fill"),Z(e,"clip-path"),Z(e,"filter")};e.element._fixFuncIri=t,t.renderer=e.renderer,we.add(t),e._addFixIRICallback=function(){}},_clearChildrenFuncIri:function(){const e=function(t){let i;for(i=0;i<t.childNodes.length;i++)_e(t.childNodes[i]._fixFuncIri),e(t.childNodes[i])};e(this.element)},dispose:function(){return _e(this.element._fixFuncIri),this._clearChildrenFuncIri(),this._getJQElement().remove(),this},append:function(e){return(e||this.renderer.root).element.appendChild(this.element),this},remove:function(){const e=this.element;return e.parentNode&&e.parentNode.removeChild(e),this},enableLinks:function(){return this._links=[],this},virtualLink:function(e){return be({_link:pe(null,e)},this),this},linkAfter:function(e){return this._linkAfter=e,this},linkOn:function(e,t){return this._link=pe(e,t),be(this,e),this},linkOff:function(){return function(e){let t;const i=e._link.to._links;for(t=0;i[t]!==e;++t);i.splice(t,1),ye(i,t)}(this),this._link=null,this},linkAppend:function(){const e=this._link,t=e.to._links;let i,n;for(i=e.i+1;(n=t[i])&&!n._link.is;++i);return this._insert(e.to,n),e.is=!0,this},_insert:function(e,t){e.element.insertBefore(this.element,t?t.element:null)},linkRemove:function(){return this.remove(),this._link.is=!1,this},clear:function(){return this._clearChildrenFuncIri(),this._getJQElement().empty(),this},toBackground:function(){const e=this.element,t=e.parentNode;return t&&t.insertBefore(e,t.firstChild),this},toForeground:function(){const e=this.element,t=e.parentNode;return t&&t.appendChild(e),this},attr:function(e){return q(this,e)},smartAttr:function(e){return this.attr(B(this,e))},css:function(e){return K(this,e)},animate:function(e,t,i){return he(this,e,t,i)},sharp(e,t){return this.attr({sharp:e||!0,sharpDirection:t})},_applyTransformation(){const e=this._settings;let t,i;const n=[],o=e.sharp,a=e.sharpDirection||1,s=e[C]%2,r=!s||"h"!==o&&!0!==o?0:.5*a,l=!s||"v"!==o&&!0!==o?0:.5*a;n.push("translate("+((e.translateX||0)+r)+","+((e.translateY||0)+l)+")"),e.rotate&&(t="rotateX"in e?e.rotateX:e.x,i="rotateY"in e?e.rotateY:e.y,n.push("rotate("+e.rotate+","+(t||0)+","+(i||0)+")"));const d=(0,c.isDefined)(e.scaleX),u=(0,c.isDefined)(e.scaleY);(d||u)&&n.push("scale("+(d?e.scaleX:1)+","+(u?e.scaleY:1)+")"),n.length&&this.element.setAttribute("transform",n.join(" "))},move:function(e,t,i,n){const o={};return(0,c.isDefined)(e)&&(o.translateX=e),(0,c.isDefined)(t)&&(o.translateY=t),i?this.animate(o,n):this.attr(o),this},rotate:function(e,t,i,n,o){const a={rotate:e||0};return(0,c.isDefined)(t)&&(a.rotateX=t),(0,c.isDefined)(i)&&(a.rotateY=i),n?this.animate(a,o):this.attr(a),this},_getElementBBox:function(){const e=this.element;let t;try{t=e.getBBox&&e.getBBox()}catch(e){}return t||{x:0,y:0,width:e.offsetWidth||0,height:e.offsetHeight||0}},getBBox:function(){const e=this._settings;let t=this._getElementBBox();return t=e.rotate?(0,u.rotateBBox)(t,[("rotateX"in e?e.rotateX:e.x)||0,("rotateY"in e?e.rotateY:e.y)||0],-e.rotate):(0,u.normalizeBBox)(t),t},markup:function(){return(0,l.getSvgMarkup)(this.element)},getOffset:function(){return this._getJQElement().offset()},stopAnimation:function(e){const t=this.animation;return t&&t.stop(e),this},setTitle:function(e){const t=k("title");t.textContent=e||"",this.element.appendChild(t)},removeTitle(){ee(this.element)},data:function(e,t){const i=this.element;let n;if(void 0!==t)i[e]=t;else for(n in e)i[n]=e[n];return this},on:function(){const e=[this._getJQElement()];return e.push.apply(e,arguments),r.default.on.apply(r.default,e),this},off:function(){const e=[this._getJQElement()];return e.push.apply(e,arguments),r.default.off.apply(r.default,e),this},trigger:function(){const e=[this._getJQElement()];return e.push.apply(e,arguments),r.default.trigger.apply(r.default,e),this}};let fe=function(e,t){ge.call(this,e,"path",t)};t.PathSvgElement=fe,R(fe.prototype=T(ge.prototype),{constructor:fe,attr:function(e){const t=this;let i;return P(e)&&(i=(e=R({},e)).segments,"points"in e&&(i=F(e.points,t.type),delete e.points),i&&(e.d=function(e){const t=[];let i,n=0;const o=e.length;let a,s,r;for(i=0;i<o;++i)for(a=e[i],s=0,r=a.length;s<r;++s)t[n++]=a[s];return t.join(" ")}(i),t.segments=i,delete e.segments)),q(t,e)},animate:function(e,t,i){const n=this,o=n.segments||[];let a,s;return n.renderer.animationEnabled()&&"points"in e&&(a=F(e.points,n.type),s=function(e,t,i){const n=e.length,o=t.length;let a,s;const r=-1!==i.indexOf("area")?U:j;if(0===n)for(a=0;a<o;a++)e.push(t[a].slice(0));else n<o?r(e,t,i):n>o&&(s=t.slice(0),r(t,e,i));return s}(o,a,n.type),e.segments={from:o,to:a,end:s},delete e.points),he(n,e,t,i)}});let me=function(e){ge.call(this,e,"path","arc")};t.ArcSvgElement=me,R(me.prototype=T(ge.prototype),{constructor:me,attr:function(e){const t=this._settings;let i,n,o,a,s,r;return P(e)&&("x"in(e=R({},e))||"y"in e||"innerRadius"in e||"outerRadius"in e||"startAngle"in e||"endAngle"in e)&&(t.x=i="x"in e?e.x:t.x,delete e.x,t.y=n="y"in e?e.y:t.y,delete e.y,t.innerRadius=o="innerRadius"in e?e.innerRadius:t.innerRadius,delete e.innerRadius,t.outerRadius=a="outerRadius"in e?e.outerRadius:t.outerRadius,delete e.outerRadius,t.startAngle=s="startAngle"in e?e.startAngle:t.startAngle,delete e.startAngle,t.endAngle=r="endAngle"in e?e.endAngle:t.endAngle,delete e.endAngle,e.d=V.apply(null,(0,u.normalizeArcParams)(i,n,o,a,s,r))),q(this,e)},animate:function(e,t,i){const n=this,o=n._settings,a={from:{},to:{}};return n.renderer.animationEnabled()&&("x"in e||"y"in e||"innerRadius"in e||"outerRadius"in e||"startAngle"in e||"endAngle"in e)&&(a.from.x=o.x||0,a.from.y=o.y||0,a.from.innerRadius=o.innerRadius||0,a.from.outerRadius=o.outerRadius||0,a.from.startAngle=o.startAngle||0,a.from.endAngle=o.endAngle||0,a.to.x="x"in e?e.x:o.x,delete e.x,a.to.y="y"in e?e.y:o.y,delete e.y,a.to.innerRadius="innerRadius"in e?e.innerRadius:o.innerRadius,delete e.innerRadius,a.to.outerRadius="outerRadius"in e?e.outerRadius:o.outerRadius,delete e.outerRadius,a.to.startAngle="startAngle"in e?e.startAngle:o.startAngle,delete e.startAngle,a.to.endAngle="endAngle"in e?e.endAngle:o.endAngle,delete e.endAngle,e.arc=a),he(n,e,t,i)}});let ve=function(e){ge.call(this,e,"rect")};t.RectSvgElement=ve,R(ve.prototype=T(ge.prototype),{constructor:ve,attr:function(e){const t=this;let i,n,o,a,s,r,l;return P(e)&&(void 0===(e=R({},e)).x&&void 0===e.y&&void 0===e.width&&void 0===e.height&&void 0===e[C]||(i=void 0!==e.x?t._originalX=e.x:t._originalX||0,n=void 0!==e.y?t._originalY=e.y:t._originalY||0,o=void 0!==e.width?t._originalWidth=e.width:t._originalWidth||0,a=void 0!==e.height?t._originalHeight=e.height:t._originalHeight||0,s=void 0!==e[C]?t._originalSW=e[C]:t._originalSW,r=~~((o<a?o:a)/2),l=(s||0)<r?s||0:r,e.x=i+l/2,e.y=n+l/2,e.width=o-l,e.height=a-l,((s||0)!==l||0!==l||void 0!==s)&&(e[C]=l)),"sharp"in e&&delete e.sharp),q(t,e)}});let Ce=function(e){ge.call(this,e,"text"),this.css({"white-space":"pre"})};function ye(e,t){let i,n;for(i=t;n=e[i];++i)n._link.i=i}function be(e,t){const i=t._links,n=e._link.after=e._link.after||t._linkAfter;let o,a;if(n){for(o=0;(a=i[o])&&a._link.name!==n;++o);if(a)for(++o;(a=i[o])&&a._link.after===n;++o);}else o=i.length;i.splice(o,0,e),ye(i,o)}function xe(e){const t=this;t.root=t._createElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",fill:I,stroke:I,"stroke-width":0}).attr({class:e.cssClass}).css({"line-height":"normal","-moz-user-select":I,"-webkit-user-select":I,"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)",display:"block",overflow:"hidden"}),t._init(),t.pathModified=!!e.pathModified,t._$container=(0,n.default)(e.container),t.root.append({element:e.container}),t._locker=0,t._backed=!1}t.TextSvgElement=Ce,R(Ce.prototype=T(ge.prototype),{constructor:Ce,attr:function(e){const t=this;let i;if(!P(e))return q(t,e);e=R({},e);const n=t._settings,a=(0,c.isDefined)(n[v])&&(0,c.isDefined)(n[C]);void 0!==e[m]&&(n[m]=e[m],delete e[m],i=!0),void 0!==e[v]&&(n[v]=e[v],delete e[v]),void 0!==e[C]&&(n[C]=e[C],delete e[C]),void 0!==e[y]&&(n[y]=e[y],delete e[y]),void 0!==e[D]&&(!function(e,t){if(!e._texts||"center"===t)return;const i=e._texts,n="left"===t?-1:1,o=Math.max.apply(Math,i.map((e=>ie(e))));for(let e=0;e<i.length;e++){const t=i[e],a=ie(t);0!==o&&o!==a&&le(t,"dx",n*_((o-a)/2*10)/10)}}(t,e[D]),delete e[D]);const s=(0,c.isDefined)(n[v])&&(0,c.isDefined)(n[C]);return q(t,e),i=i||s!==a&&n[m],i&&(!function(e,t,i){let n,a;if(e._texts=null,e.clear(),null===t)return;t=""+t,e.renderer.encodeHtml||!/<[a-z][\s\S]*>/i.test(t)&&-1===t.indexOf("&")?/\n/g.test(t)?n=function(e){const t=e.replace(/\r/g,"").split(/\n/g);let i=0;const n=[];for(;i<t.length;i++)n.push({value:t[i].trim(),height:0,line:i});return n}(t):i&&(n=[{value:t.trim(),height:0}]):(a=function(e){const t=/(?:(<[a-z0-9]+\s*))([\s\S]*?)(>|\/>)/gi,i=/(style|class)\s*=\s*(["'])(?:(?!\2).)*\2\s?/gi;return e.replace(t,(function(e,t,n,o){return t+(n=(n&&n.match(i)||[]).map((function(e){return e})).join(" "))+o}))}(t),n=function(e){const t=[],i=o.default.createElement("div");return i.innerHTML=e.replace(/\r/g,"").replace(/\n/g,"<br/>").replace(/style=/g,"data-style="),i.querySelectorAll("[data-style]").forEach((e=>{e.style=e.getAttribute("data-style"),e.removeAttribute("data-style")})),Y(t,0,i,{},""),function(e){let t,i,n,o=e[0];for(t=1,i=e.length;t<i;++t)n=e[t],n.line===o.line?(o.height=ce(o.height,n.height),o.inherits=o.inherits||0===parseFloat(n.height),n.height=NaN):o=n}(t),t}(a));n?n.length&&(e._texts=n,i&&X(n,e.element,v),X(n,e.element,"tspan")):e.element.appendChild(o.default.createTextNode(t))}(t,n.text,s),t._hasEllipsis=!1),(i||void 0!==e.x||void 0!==e.y)&&ue(t),s&&function(e){if(!e._texts)return;const t=e._texts,i=e._settings[v],n=e._settings[C],o=e._settings[y]||1;let a,s,r;for(s=0,r=t.length;s<r;++s)a=t[s].stroke,a.setAttribute(v,i),a.setAttribute(C,n),a.setAttribute(y,o),a.setAttribute("stroke-linejoin","round")}(t),t},css:function(e){return K(this,e=e||{}),b in e&&ue(this),this},applyEllipsis:function(e){const t=this;let i,n,o,a,s,r,l,d=!1;Q.call(t);const u=t.renderer.text(E).attr(t._styles).append(t.renderer.root),h=u.getBBox().width;if(t._getElementBBox().width>e)for(e-h<0?e=0:e-=h,i=function(e,t,i){let n,o,a,s,r,l=[];if(t)for(n=0,o=t.length;n<o;++n)a=t[n],l[a.line]?(a.startBox=s,l[a.line].parts.push(a),l[a.line].commonLength+=a.value.length):(a.startBox=s=0,l.push({commonLength:a.value.length,parts:[a]})),r=s+a.tspan.getSubStringLength(0,a.value.length),a.endIndex=te(a,i,s,r),s=r;else a={value:e.textContent,tspan:e},a.startBox=s=0,r=s+ie(a),a.endIndex=te(a,i,s,r),l=[{commonLength:e.textContent.length,parts:[a]}];return l}(t.element,t._texts,e),n=0,o=i.length;n<o;++n)if(a=i[n].parts,1!==i[n].commonLength)for(s=0,r=a.length;s<r;++s)l=a[s],(0,c.isDefined)(l.endIndex)?(se(l,l.endIndex),d=!0):l.startBox>e&&re(l);return u.remove(),t._hasEllipsis=d,d},setMaxSize:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this;let o=[],a=!1,s=!1,r=e;Q.call(n);const l=function(e){const t=ee(e);return()=>{for(let i=0;i<t.length;i++)e.appendChild(t[i])}}(this.element),d=n.renderer.text(E).attr(n._styles).append(n.renderer.root),u=d.getBBox().width,{width:h,height:p}=n._getElementBBox();return(h||p)&&(h>e||t&&p>t)&&(e-u<0?r=0:r-=u,o=function(e,t,i,n,o){if(!t){const i={value:e.textContent,height:0,line:0};e.textContent="",X([i],e,"tspan"),t=[i]}return t.reduce(((e,t)=>{let[a,s,r,l,d]=e;const u=a[a.length-1];if(l)return[a,s,r,l];if(u&&t.line===d){if(t.startBox=s,s>n&&"none"===o.wordWrap&&"ellipsis"===o.textOverflow)return re(t),[a,s,r,l,d];u.parts.push(t),u.commonLength+=t.value.length}else t.startBox=s=0,a.push({commonLength:t.value.length,parts:[t]});if(t.endBox=r=s+ie(t),s=r,(0,c.isDefined)(i)&&r>i){const e=ae(t,i,n,o);e.length?a=a.concat(e.filter((e=>e.parts.length>0))):(a=[],l=!0)}return[a,s,r,l,t.line]}),[[],0,0,!1,0])[0]}(n.element,n._texts,e,r,i),o=function(e,t,i,n,o){const a=i.textOverflow;if(!isFinite(n)||0===Number(n)||"none"===a)return e;const s=e.reduce(((e,s,r,l)=>{let[d,u]=e;const c=function(e,t){return e.parts.reduce(((e,i)=>g(e,de(i,t))),0)}(s,o);if(u+=c,u<n)d.push(s);else if(s.parts.forEach((e=>{re(e)})),"ellipsis"===a){const e=l[r-1];if(e){const n=e.parts[e.parts.length-1];n.hasEllipsis||(0===t||n.endBox<t?se(n,n.value.length,ne(t,i)):oe(n,t,i))}}return[d,u]}),[[],0]);if("hide"===a&&s[1]>n)return s[0].forEach((e=>{e.parts.forEach((e=>{re(e)}))})),[];return s[0]}(o,r,i,t,parseFloat(this._getLineHeight())),this._texts=o.reduce(((e,t)=>e.concat(t.parts)),[]).filter((e=>""!==e.value)).map((e=>(e.stroke&&e.tspan.parentNode.appendChild(e.stroke),e))).map((e=>(e.tspan.parentNode.appendChild(e.tspan),e))),!this._texts.length&&(this._texts=null),a=!0,this._texts?ue(this):(this.element.textContent="",s=!0)),d.remove(),n._hasEllipsis=a,l(),{rowCount:o.length,textChanged:a,textIsEmpty:s}},restoreText:Q,_getLineHeight(){return isNaN(parseFloat(this._styles[b]))?12:this._styles[b]}}),xe.prototype={constructor:xe,_init:function(){const e=this;e._defs=e._createElement("defs").append(e.root),e._animationController=new d.AnimationController(e.root.element),e._animation={enabled:!0,duration:1e3,easing:"easeOutCubic"}},setOptions:function(e){const t=this;return t.rtl=!!e.rtl,t.encodeHtml=!!e.encodeHtml,t.updateAnimationOptions(e.animation||{}),t.root.attr({direction:t.rtl?"rtl":"ltr"}),t},_createElement:function(e,t,i){const n=new ge(this,e,i);return t&&n.attr(t),n},lock:function(){const e=this;var t;return 0===e._locker&&(e._backed=!e._$container.is(":visible"),e._backed&&(t=e.root,0===O().backupCounter&&o.default.getBody().appendChild(O().backupContainer),++O().backupCounter,t.append({element:O().backupContainer}))),++e._locker,e},unlock:function(){const e=this;var t,i;return--e._locker,0===e._locker&&(e._backed&&(t=e.root,i=e._$container[0],t.append({element:i}),--O().backupCounter,0===O().backupCounter&&o.default.getBody().removeChild(O().backupContainer)),e._backed=!1),e},resize:function(e,t){return e>=0&&t>=0&&this.root.attr({width:e,height:t}),this},dispose:function(){const e=this;let t;for(t in e.root.dispose(),e._defs.dispose(),e._animationController.dispose(),we.removeByRenderer(e),e)e[t]=null;return e},animationEnabled:function(){return!!this._animation.enabled},updateAnimationOptions:function(e){return R(this._animation,e),this},stopAllAnimations:function(e){return this._animationController[e?"lock":"stop"](),this},animateElement:function(e,t,i){return this._animationController.animateElement(e,t,i),this},svg:function(){return this.root.markup()},getRootOffset:function(){return this.root.getOffset()},onEndAnimation:function(e){this._animationController.onEndAnimation(e)},rect:function(e,t,i,n){return new ve(this).attr({x:e||0,y:t||0,width:i||0,height:n||0})},simpleRect:function(){return this._createElement("rect")},circle:function(e,t,i){return this._createElement("circle",{cx:e||0,cy:t||0,r:i||0})},g:function(){return this._createElement("g")},image:function(e,t,i,n,o,a){const s=this._createElement("image",{x:e||0,y:t||0,width:i||0,height:n||0,preserveAspectRatio:L[(0,u.normalizeEnum)(a)]||I});return s.element.setAttributeNS("http://www.w3.org/1999/xlink","href",o||""),s},path:function(e,t){return new fe(this,t).attr({points:e||[]})},arc:function(e,t,i,n,o,a){return new me(this).attr({x:e||0,y:t||0,innerRadius:i||0,outerRadius:n||0,startAngle:o||0,endAngle:a||0})},text:function(e,t,i){return new Ce(this).attr({text:e,x:t||0,y:i||0})},linearGradient:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,u.getNextDefsSvgId)(),i=arguments.length>2?arguments[2]:void 0;const n=this._createElement("linearGradient",{id:t,gradientTransform:`rotate(${i||0})`}).append(this._defs);return n.id=t,this._createGradientStops(e,n),n},radialGradient:function(e,t){const i=this._createElement("radialGradient",{id:t}).append(this._defs);return this._createGradientStops(e,i),i},_createGradientStops:function(e,t){e.forEach((e=>{this._createElement("stop",{offset:e.offset,"stop-color":e["stop-color"]??e.color,"stop-opacity":e.opacity}).append(t)}))},pattern:function(e,t,i){const n=this,o=(t=t||{}).step||6,a=o/2,s=1.5*o,r=i||(0,u.getNextDefsSvgId)(),l="right"===(0,u.normalizeEnum)(t.direction)?"M "+a+" "+-a+" L "+-a+" "+a+" M 0 "+o+" L "+o+" 0 M "+s+" "+a+" L "+a+" "+s:"M 0 0 L "+o+" "+o+" M "+-a+" "+a+" L "+a+" "+s+" M "+a+" "+-a+" L "+s+" "+a,d=n._createElement("pattern",{id:r,width:o,height:o,patternUnits:"userSpaceOnUse"}).append(n._defs);d.id=r;n.rect(0,0,o,o).attr({fill:e,opacity:t.opacity}).append(d),new fe(this).attr({d:l,"stroke-width":t.width||1,stroke:e}).append(d);return d},customPattern:function(e,t,i,n){const o={id:e,width:i,height:n,patternContentUnits:"userSpaceOnUse",patternUnits:this._getPatternUnits(i,n)},a=this._createElement("pattern",o).append(this._defs);return t.render({container:a.element}),a},_getPatternUnits:function(e,t){if(Number(e)&&Number(t))return"userSpaceOnUse"},_getPointsWithYOffset:function(e,t){return e.map((function(e,i){return i%2!=0?e+t:e}))},clipShape:function(e,t){const i=this,n=(0,u.getNextDefsSvgId)();let o=i._createElement("clipPath",{id:n}).append(i._defs);const a=e.apply(i,t).append(o);return a.id=n,a.remove=function(){throw"Not implemented"},a.dispose=function(){return o.dispose(),o=null,this},a},clipRect(e,t,i,n){return this.clipShape(this.rect,arguments)},clipCircle(e,t,i){return this.clipShape(this.circle,arguments)},shadowFilter:function(e,t,i,n,o,a,s,r,l){const d=this,c=(0,u.getNextDefsSvgId)(),h=d._createElement("filter",{id:c,x:e||0,y:t||0,width:i||0,height:n||0}).append(d._defs),p=d._createElement("feGaussianBlur",{in:"SourceGraphic",result:"gaussianBlurResult",stdDeviation:s||0}).append(h),g=d._createElement("feOffset",{in:"gaussianBlurResult",result:"offsetResult",dx:o||0,dy:a||0}).append(h),_=d._createElement("feFlood",{result:"floodResult","flood-color":r||"","flood-opacity":l}).append(h),f=d._createElement("feComposite",{in:"floodResult",in2:"offsetResult",operator:"in",result:"compositeResult"}).append(h),m=d._createElement("feComposite",{in:"SourceGraphic",in2:"compositeResult",operator:"over"}).append(h);return h.id=c,h.gaussianBlur=p,h.offset=g,h.flood=_,h.composite=f,h.finalComposite=m,h.attr=function(e){const t=this,i={},n={},o={};return"x"in e&&(i.x=e.x),"y"in e&&(i.y=e.y),"width"in e&&(i.width=e.width),"height"in e&&(i.height=e.height),q(t,i),"blur"in e&&t.gaussianBlur.attr({stdDeviation:e.blur}),"offsetX"in e&&(n.dx=e.offsetX),"offsetY"in e&&(n.dy=e.offsetY),t.offset.attr(n),"color"in e&&(o["flood-color"]=e.color),"opacity"in e&&(o["flood-opacity"]=e.opacity),t.flood.attr(o),t},h},brightFilter:function(e,t){const i=this,n=(0,u.getNextDefsSvgId)(),o=i._createElement("filter",{id:n}).append(i._defs),a=i._createElement("feComponentTransfer").append(o),s={type:e,slope:t};return o.id=n,i._createElement("feFuncR",s).append(a),i._createElement("feFuncG",s).append(a),i._createElement("feFuncB",s).append(a),o},getGrayScaleFilter:function(){if(this._grayScaleFilter)return this._grayScaleFilter;const e=this,t=(0,u.getNextDefsSvgId)(),i=e._createElement("filter",{id:t}).append(e._defs);return e._createElement("feColorMatrix").attr({type:"matrix",values:"0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 0.6 0"}).append(i),i.id=t,e._grayScaleFilter=i,i},lightenFilter:function(e){const t=this._createElement("filter",{id:e}).append(this._defs);return this._createElement("feColorMatrix",{type:"matrix",values:"1.3 0 0 0 0 0 1.3 0 0 0 0 0 1.3 0 0 0 0 0 1 0"}).append(t),t.id=e,t},initDefsElements:function(){const e=this._defsElementsStorage=this._defsElementsStorage||{byHash:{},baseId:(0,u.getNextDefsSvgId)()},t=e.byHash;let i;for(i in t)t[i].pattern.dispose();e.byHash={},e.refToHash={},e.nextId=0},drawPattern:function(e,t,i){let{color:n,hatching:o}=e;return this.pattern(n,o,`${t}-hatching-${i++}`)},drawFilter:function(e,t,i){return this.lightenFilter(`${t}-lightening-${i++}`)},lockDefsElements:function(e,t,i){const n=this._defsElementsStorage;let o;const a="pattern"===i?function(e){let{color:t,hatching:i}=e;return"@"+t+"::"+i.step+":"+i.width+":"+i.opacity+":"+i.direction}(e):"@filter::lightening",s="pattern"===i?this.drawPattern:this.drawFilter;let r;return n.refToHash[t]!==a&&(t&&this.releaseDefsElements(t),o=n.byHash[a],o||(r=s.call(this,e,n.baseId,n.nextId++),o=n.byHash[a]={pattern:r,count:0},n.refToHash[r.id]=a),++o.count,t=o.pattern.id),t},releaseDefsElements:function(e){const t=this._defsElementsStorage,i=t.refToHash[e],n=t.byHash[i];n&&0==--n.count&&(n.pattern.dispose(),delete t.byHash[i],delete t.refToHash[e])}};const we=function(){let e=[];return{add:function(t){e.push(t)},remove:function(t){e=e.filter((function(e){return e!==t}))},removeByRenderer:function(t){e=e.filter((function(e){return e.renderer!==t}))},fire:function(){e.forEach((function(e){e()}))}}}();t.refreshPaths=function(){we.fire()}},11348:function(e,t,i){t.SeriesFamily=M;var n,o=i(11528),a=i(52576),s=i(21274),r=i(50254),l=i(17781),d=i(28779),u=(n=i(41380))&&n.__esModule?n:{default:n};const{round:c,abs:h,pow:p,sqrt:g}=Math,_=Math.min,f=.3;function m(e,t,i,n,a,r,l){e.forEach((function(e){const d=l(t.indexOf(n),t.length),u=e.getPointsByArg(i,!0),c=function(e){return e<0||e>1?void 0:e}(e.getOptions().barPadding),h=e.getOptions().barWidth;let p,g=b(d,a),_=a.width;-1!==d&&(((0,o.isDefined)(c)||(0,o.isDefined)(h))&&(p=y(r,t.length,1-c,h),_=p.width,e.getBarOverlapGroup()||(g=b(d,p))),function(e,t,i){(0,s.each)(e,(function(e,n){n.correctCoordinates({width:t,offset:i})}))}(u,_,g))}))}function v(e){return e.getStackName()||e.getBarOverlapGroup()}function C(e,t,i){var n,o;const a=[],s=[],r={},l=t.barGroupWidth,d=null===(n=e[0])||void 0===n?void 0:n.getArgumentAxis();let c;if(null!==(o=e[0])&&void 0!==o&&o.useAggregation()){var h;const t="datetime"===(null===(h=e[0])||void 0===h?void 0:h.argumentType);let i=d.getTickInterval(),n=d.getAggregationInterval();i=t?u.default.dateToMilliseconds(i):i,n=t?u.default.dateToMilliseconds(n):n,c=n<i?n:i}c=null==d?void 0:d.getTranslator().getInterval(c);const p=l?c>l?l:c:c*(1-((g=t.barGroupPadding)<0||g>1?f:g));var g;e.forEach((function(e,t){const i=v(e)||t.toString();let n;for(n in e.pointsByArgument)-1===s.indexOf(n.valueOf())&&s.push(n.valueOf());-1===a.indexOf(i)&&(a.push(i),r[i]=[]),r[i].push(e)})),s.forEach((function(e){const t=a.reduce(((t,i)=>(function(e,t){return e.some((function(e){return!e.getOptions().ignoreEmptyPoints||e.getPointsByArg(t,!0).some((function(e){return e.hasValue()}))}))}(r[i],e)&&t.push(i),t)),[]),n=y(p,t.length);a.forEach((o=>{m(r[o],t,e,o,n,p,i)}))}))}function y(e,t,i,n){let a,s;return n?(s=_(n,e/t),a=t>1?c((e-c(s)*t)/(t-1)):0):(0,o.isDefined)(i)?(s=e*i/t,a=t>1?c((e-e*i)/(t-1)):0):(a=c(e/t*.2),s=(e-a*(t-1))/t),{width:s>1?c(s):1,spacing:a,middleIndex:t/2,rawWidth:s}}function b(e,t){const i=t.rawWidth<1?t.rawWidth:t.width;return(e-t.middleIndex+.5)*i-(t.middleIndex-e-.5)*t.spacing}function x(e){return e.series.filter((function(e){return e.isVisible()}))}function w(e,t,i){return((e.positive[t]||{})[i]||0)+(-(e.negative[t]||{})[i]||0)}function S(e){return e?function(e,t){return t-e-1}:function(e){return e}}function D(e){return e[0]&&e[0].getArgumentAxis().getTranslator().isInverted()}function I(){const e=x(this);C(e,this._options,S(D(e)))}function E(){const e=this,t=e._options.negativesAsZeroes,i=x(e),n={positive:{},negative:{}},o={left:{},right:{}},s={},l={};i.forEach((function(e){const i=v(e);let d=!1;const u=function(e){const t=e.getPoints();let i;for(let e=0;e<t.length;e++){const n=t[e];if(i=n.initialValue&&n.initialValue.valueOf(),h(i)>0)break}return(0,r.sign)(i)}(e)<0?l:s;e._prevSeries=u[i],u[i]=e,e.holes=(0,a.extend)(!0,{},o),e.getPoints().forEach((function(a,s,r){let l=a.initialValue&&a.initialValue.valueOf(),u=a.argument.valueOf(),c=l>=0?n.positive:n.negative;const h="bar"!==e.type;t&&l<0&&(c=n.positive,l=0,a.resetValue()),c[i]=c[i]||{};const p=c[i];if(p[u]?(h&&a.correctValue(p[u]),p[u]+=l):(p[u]=l,h&&a.resetCorrection()),a.hasValue())d&&(d=!1,o.left[u]=(o.left[u]||0)+(a.value.valueOf()-(isFinite(a.minValue)?a.minValue.valueOf():0)),a._skipSetLeftHole=!0);else{const e=r[s-1];!d&&e&&e.hasValue()&&(u=e.argument.valueOf(),e._skipSetRightHole=!0,o.right[u]=(o.right[u]||0)+(e.value.valueOf()-(isFinite(e.minValue)?e.minValue.valueOf():0))),d=!0}}))})),i.forEach((function(e){const t=e.holes;e.getPoints().forEach((function(e){const i=e.argument.valueOf();e.resetHoles(),!e._skipSetLeftHole&&e.setHole(t.left[i]||o.left[i]&&0,"left"),!e._skipSetRightHole&&e.setHole(t.right[i]||o.right[i]&&0,"right"),e._skipSetLeftHole=null,e._skipSetRightHole=null}))})),e._stackKeepers=n,i.forEach((function(e){e.getPoints().forEach((function(t){const i=t.argument.valueOf(),a=v(e),s=w(n,a,i),r=function(e,t,i){return((e.positive[t]||{})[i]||0)+((e.negative[t]||{})[i]||0)}(n,a,i);t.setPercentValue(s,r,o.left[i],o.right[i])}))}))}function T(){const e=this,t=x(e),i=e._stackKeepers,n={positive:{},negative:{}};(0,s.each)(t,(function(t,o){const a=o.getOptions().minBarSize,r=o.getValueAxis().getTranslator(),l=a&&r.getMinBarSize(a),d=o.getStackName();(0,s.each)(o.getPoints(),(function(t,o){if(!o.hasValue())return;let a=o.initialValue&&o.initialValue.valueOf();const s=o.argument.valueOf();e.fullStacked&&(a=a/w(i,d,s)||0);const u=r.checkMinBarSize(a,l,o.value),c=function(e){return e>=0?"positive":"negative"}(u),h=n[c][d]=n[c][d]||{};h[s]?(o.minValue=h[s],h[s]+=u):h[s]=u,o.value=h[s]}))})),e.fullStacked&&function(e,t){(0,s.each)(e,(function(e,i){const n=i.getStackName?i.getStackName():"default";(0,s.each)(i.getPoints(),(function(e,i){const a=w(t,n,i.argument.valueOf());0!==a&&(i.value=i.value/a,(0,o.isNumeric)(i.minValue)&&(i.minValue=i.minValue/a))}))}))}(t,n)}function A(){const e=x(this);(0,s.each)(e,(function(e,t){const i=t.getOptions().minBarSize,n=t.getValueAxis().getTranslator(),o=i&&n.getMinBarSize(i);o&&(0,s.each)(t.getPoints(),(function(e,t){t.hasValue()&&t.value.valueOf()-t.minValue.valueOf()<o&&(t.value=n.toValue(t.value.valueOf()+o/2),t.minValue=n.toValue(t.minValue.valueOf()-o/2))}))}))}function O(){(0,s.each)(this.series,(function(e,t){const i=t.getOptions().minBarSize,n=t.getValueAxis().getTranslator(),o=i&&n.getMinBarSize(i);o&&(0,s.each)(t.getPoints(),(function(e,t){t.hasValue()&&(t.value=n.checkMinBarSize(t.initialValue,o))}))}))}function P(){const e=x(this);C(e,{barGroupPadding:.3},S(D(e)))}function k(){const e=x(this);if(!e.length)return;const t=this._options,i=e[0].getArgumentAxis().getVisibleArea(),n=e[0].getValueAxis().getVisibleArea(),o=_(i[1]-i[0],n[1]-n[0]),a=p(t.minBubbleSize,2),r=p(o*t.maxBubbleSize,2),l=(o*t.maxBubbleSize+t.minBubbleSize)/2;let d,u,f,m=1/0,v=-1/0;(0,s.each)(e,(function(e,t){(0,s.each)(t.getPoints(),(function(e,t){v=v>t.size?v:t.size,m=m<t.size?m:t.size}))}));const C=v-m,y=h(r-a);(0,s.each)(e,(function(e,t){(0,s.each)(t.getPoints(),(function(e,t){v===m?d=c(l):(f=h(t.size-m)/C,u=y*f+a,d=c(g(u))),t.correctCoordinates(d)}))}))}function M(e){const t=this;switch(t.type=(0,d.normalizeEnum)(e.type),t.pane=e.pane,t.series=[],t.updateOptions(e),t.type){case"bar":t.adjustSeriesDimensions=I,t.updateSeriesValues=O,t.adjustSeriesValues=E;break;case"rangebar":t.adjustSeriesDimensions=I,t.updateSeriesValues=A;break;case"fullstackedbar":t.fullStacked=!0,t.adjustSeriesDimensions=I,t.adjustSeriesValues=E,t.updateSeriesValues=T;break;case"stackedbar":t.adjustSeriesDimensions=I,t.adjustSeriesValues=E,t.updateSeriesValues=T;break;case"fullstackedarea":case"fullstackedline":case"fullstackedspline":case"fullstackedsplinearea":t.fullStacked=!0,t.adjustSeriesValues=E;break;case"stackedarea":case"stackedsplinearea":case"stackedline":case"stackedspline":t.adjustSeriesValues=E;break;case"candlestick":case"stock":t.adjustSeriesDimensions=P;break;case"bubble":t.adjustSeriesDimensions=k}}M.prototype={constructor:M,adjustSeriesDimensions:l.noop,adjustSeriesValues:l.noop,updateSeriesValues:l.noop,updateOptions:function(e){this._options=e},dispose:function(){this.series=null},add:function(e){const t=this.type;this.series=(0,d.map)(e,(e=>e.type===t?e:null))}}},16216:function(e,t,i){t.plugin=t.Title=void 0;var n=i(11528),o=i(52576),a=i(28779),s=i(77461);const r=Number,l=(0,a.enumParser)(["left","center","right"]),d=(0,a.enumParser)(["top","bottom"]);function u(e){return!!(e&&String(e).length>0)}function c(e,t,i,n,o){e.attr({text:t}).setMaxSize(i,o,n).textChanged&&e.setTitle(t)}function h(e){return e>=0?r(e):10}let p=function(e){this._params=e,this._group=e.renderer.g().attr({class:e.cssClass}).linkOn(e.root||e.renderer.root,"title"),this._hasText=!1};t.Title=p,(0,o.extend)(p.prototype,s.LayoutElement.prototype,{dispose:function(){const e=this;e._group.linkRemove(),e._group.linkOff(),e._titleElement&&(e._clipRect.dispose(),e._titleElement=e._subtitleElement=e._clipRect=null),e._params=e._group=e._options=null},_updateOptions:function(e){this._options=e,this._options.horizontalAlignment=l(e.horizontalAlignment,"center"),this._options.verticalAlignment=d(e.verticalAlignment,"top"),this._options.margin=function(e){let t;return t=e>=0?{left:r(e),top:r(e),right:r(e),bottom:r(e)}:{left:h((e=e||{}).left),top:h(e.top),right:h(e.right),bottom:h(e.bottom)},t}(e.margin)},_updateStructure:function(){const e=this,t=e._params.renderer,i=e._group,n=e._options,o=n.horizontalAlignment;e._titleElement||(e._titleElement=t.text().append(i),e._subtitleElement=t.text(),e._clipRect=t.clipRect(),i.attr({"clip-path":e._clipRect.id})),e._titleElement.attr({align:o,class:n.cssClass}),e._subtitleElement.attr({align:o,class:n.subtitle.cssClass}),i.linkAppend(),u(n.subtitle.text)?e._subtitleElement.append(i):e._subtitleElement.remove()},_updateTexts:function(){const e=this,t=e._options,i=t.subtitle,n=e._titleElement,o=e._subtitleElement;let s;n.attr({text:"A",y:0}).css((0,a.patchFontOptions)(t.font)),s=n.getBBox(),e._baseLineCorrection=s.height+s.y,n.attr({text:t.text}),s=n.getBBox();const r=-s.y;n.attr({y:r}),u(i.text)&&o.attr({text:i.text,y:0}).css((0,a.patchFontOptions)(i.font))},_shiftSubtitle(){const e=this,t=e._titleElement.getBBox(),i=e._subtitleElement,n=e._options.subtitle.offset;i.move(0,t.y+t.height-i.getBBox().y-n)},_updateBoundingRectAlignment:function(){const e=this._boundingRect,t=this._options;e.verticalAlignment=t.verticalAlignment,e.horizontalAlignment=t.horizontalAlignment,e.cutLayoutSide=t.verticalAlignment,e.cutSide="vertical",e.position={horizontal:t.horizontalAlignment,vertical:t.verticalAlignment}},hasText:function(){return this._hasText},update:function(e,t){const i=this,a=(0,o.extend)(!0,{},e,function(e){const t=(0,n.isString)(e)?{text:e}:e||{};return t.subtitle=(0,n.isString)(t.subtitle)?{text:t.subtitle}:t.subtitle||{},t}(t)),s=u(a.text),r=s||s!==i._hasText;return i._baseLineCorrection=0,i._updateOptions(a),i._boundingRect={},s?(i._updateStructure(),i._updateTexts()):i._group.linkRemove(),i._updateBoundingRect(),i._updateBoundingRectAlignment(),i._hasText=s,r},draw:function(e,t){const i=this;return i._hasText&&(i._group.linkAppend(),i._correctTitleLength(e),i._group.getBBox().height>t&&this.freeSpace()),i},_correctTitleLength:function(e){const t=this,i=t._options,n=i.margin,o=e-n.left-n.right;let a=i.placeholderSize;c(t._titleElement,i.text,o,i,a),t._subtitleElement&&(r(a)>0&&(a-=t._titleElement.getBBox().height),c(t._subtitleElement,i.subtitle.text,o,i.subtitle,a),t._shiftSubtitle()),t._updateBoundingRect();const{x:s,y:l,height:d}=this.getCorrectedLayoutOptions();this._clipRect.attr({x:s,y:l,width:e,height:d})},getLayoutOptions:function(){return this._boundingRect||null},shift:function(e,t){const i=this,n=i.getLayoutOptions();return i._group.move(e-n.x,t-n.y),i},_updateBoundingRect:function(){const e=this,t=e._options,i=t.margin,n=e._boundingRect,o=e._hasText?e._group.getBBox():{width:0,height:0,x:0,y:0,isEmpty:!0};o.isEmpty||(o.height+=i.top+i.bottom-e._baseLineCorrection,o.width+=i.left+i.right,o.x-=i.left,o.y+=e._baseLineCorrection-i.top),t.placeholderSize>0&&(o.height=t.placeholderSize),n.height=o.height,n.width=o.width,n.x=o.x,n.y=o.y},getCorrectedLayoutOptions(){const e=this.getLayoutOptions(),t=this._baseLineCorrection;return(0,o.extend)({},e,{y:e.y-t,height:e.height+t})},layoutOptions:function(){return this._hasText?{horizontalAlignment:this._boundingRect.horizontalAlignment,verticalAlignment:this._boundingRect.verticalAlignment,priority:0}:null},measure:function(e){return this.draw(e[0],e[1]),[this._boundingRect.width,this._boundingRect.height]},move:function(e,t){!function(e,t){return e[2]-e[0]<t.width||e[3]-e[1]<t.height}(e,this._boundingRect)?this.shift(Math.round(e[0]),Math.round(e[1])):this.shift(t[0],t[1])},freeSpace:function(){const e=this;e._params.incidentOccurred("W2103"),e._group.linkRemove(),e._boundingRect.width=e._boundingRect.height=0},getOptions:function(){return this._options},changeLink:function(e){this._group.linkRemove(),this._group.linkOn(e,"title")}});t.plugin={name:"title",init:function(){const e=this;e._title=new p({renderer:e._renderer,cssClass:e._rootClassPrefix+"-title",incidentOccurred:e._incidentOccurred}),e._layout.add(e._title)},dispose:function(){this._title.dispose(),this._title=null},customize:function(e){e.addChange({code:"TITLE",handler:function(){this._title.update(this._themeManager.theme("title"),this.option("title"))&&this._change(["LAYOUT"])},isThemeDependent:!0,option:"title",isOptionChange:!0})},fontFields:["title.font","title.subtitle.font"]}},23277:function(e,t,i){t.plugin=t.Tooltip=void 0;var n=i(57653),o=_(i(64960)),a=i(3104),s=i(86858),r=i(53124),l=_(i(64553)),d=i(63022),u=i(11528),c=i(52576),h=i(28779),p=_(i(2082)),g=i(87040);function _(e){return e&&e.__esModule?e:{default:e}}const f=p.default.format,m=Math.ceil,v=Math.max,C=Math.min,y=(0,a.getWindow)();function b(e){e.css({left:"-9999px"}).detach()}function x(){return(0,l.default)("<div>").css({position:"relative",display:"inline-block",padding:0,margin:0,border:"0px solid transparent"})}let w=function(e){const t=this;t._eventTrigger=e.eventTrigger,t._widgetRoot=e.widgetRoot,t._widget=e.widget,t._textHtmlContainers=[],t._wrapper=(0,l.default)("<div>").css({position:"absolute",overflow:"hidden",pointerEvents:"none"}).addClass(e.cssClass);const i=t._renderer=new d.Renderer({pathModified:e.pathModified,container:t._wrapper[0]});i.root.attr({"pointer-events":"none"}),t._text=i.text(void 0,0,0),t._textGroupHtml=(0,l.default)("<div>").css({position:"absolute",padding:0,margin:0,border:"0px solid transparent"}).appendTo(t._wrapper),t._textHtml=x().appendTo(t._textGroupHtml)};t.Tooltip=w,w.prototype={constructor:w,dispose:function(){this._wrapper.remove(),this._renderer.dispose(),this._options=this._widgetRoot=null},_getContainer:function(){const e=this._options;let t=(0,l.default)(this._widgetRoot).closest(e.container);return 0===t.length&&(t=(0,l.default)(e.container)),(t.length?t:(0,l.default)("body")).get(0)},setTemplate(e){this._template=e?this._widget._getTemplate(e):null},setOptions:function(e){e=e||{};const t=this;t._options=e,t._textFontStyles=(0,h.patchFontOptions)(e.font),t._textFontStyles.color=t._textFontStyles.fill,t._wrapper.css({zIndex:e.zIndex}),t._customizeTooltip=e.customizeTooltip;const i=t._textGroupHtml;this.plaque&&this.plaque.clear(),this.setTemplate(e.contentTemplate);const o=e.interactive?"auto":"none";e.interactive&&this._renderer.root.css({"-moz-user-select":"auto","-webkit-user-select":"auto"});return this.plaque=new g.Plaque({opacity:t._options.opacity,color:t._options.color,border:t._options.border,paddingLeftRight:t._options.paddingLeftRight,paddingTopBottom:t._options.paddingTopBottom,arrowLength:t._options.arrowLength,arrowWidth:20,shadow:t._options.shadow,cornerRadius:t._options.cornerRadius},t,t._renderer.root,(a=>{let{group:r,onRender:l,eventData:d,isMoving:u,templateCallback:c=()=>{}}=a;const h=t._state;if(!u){const a=t._template,u=a&&!h.formatObject.skipTemplate;if(h.html||u){if(i.css({color:h.textColor,width:3e3,pointerEvents:o}),u){const e=t._textHtmlContainers,i=x().appendTo(t._textGroupHtml);return e.push(i),void a.render({model:h.formatObject,container:i,onRendered:()=>{if(e.splice(0,e.length-1).forEach((e=>e.remove())),t._textHtml=(0,s.replaceWith)(t._textHtml,i),h.html=t._textHtml.html(),0===(0,n.getWidth)(t._textHtml)&&0===(0,n.getHeight)(t._textHtml))return this.plaque.clear(),void c(!1);l(),t._riseEvents(d),t._moveWrapper(),t.plaque.customizeCloud({fill:h.color,stroke:h.borderColor,"pointer-events":o}),c(!0),t._textHtmlContainers=[]}})}t._text.attr({text:""}),t._textHtml.html(h.html)}else t._text.css({fill:h.textColor}).attr({text:h.text,class:e.cssClass,"pointer-events":o}).append(r.attr({align:e.textAlignment}));t._riseEvents(d),t.plaque.customizeCloud({fill:h.color,stroke:h.borderColor,"pointer-events":o})}return l(),t._moveWrapper(),!0}),!0,((e,i)=>{if(e._state.html){let e=y.getComputedStyle(t._textHtml.get(0));return e={x:0,y:0,width:m(parseFloat(e.width)),height:m(parseFloat(e.height))},e}return i.getBBox()}),((e,i,n,o)=>{e._state.html?t._textGroupHtml.css({left:n,top:o}):i.move(n,o)})),t},_riseEvents:function(e){const t=this;t._eventData&&t._eventTrigger("tooltipHidden",t._eventData),t._eventData=e,t._eventTrigger("tooltipShown",t._eventData)},setRendererOptions:function(e){return this._renderer.setOptions(e),this._textGroupHtml.css({direction:e.rtl?"rtl":"ltr"}),this},update:function(e){const t=this;t.setOptions(e),b(t._wrapper);const i={};for(const e in t._textFontStyles)i[(0,r.camelize)(e)]=t._textFontStyles[e];return t._textGroupHtml.css(i),t._text.css(t._textFontStyles),t._eventData=null,t},_prepare:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._customizeTooltip;const n=this._options;let o={};return(0,u.isFunction)(i)&&(o=i.call(e,e),o=(0,u.isPlainObject)(o)?o:{},"text"in o&&(t.text=(0,u.isDefined)(o.text)?String(o.text):""),"html"in o&&(t.html=(0,u.isDefined)(o.html)?String(o.html):"")),"text"in t||"html"in t||(t.text=e.valueText||e.description||""),t.color=o.color||n.color,t.borderColor=o.borderColor||(n.border||{}).color,t.textColor=o.fontColor||(this._textFontStyles||{}).color,!!t.text||!!t.html||!!this._template},show:function(e,t,i,n,o){const a=this;if(a._options.forceEvents)return i.x=t.x,i.y=t.y-t.offset,a._riseEvents(i),!0;const s={formatObject:e,eventData:i,templateCallback:o};if(!a._prepare(e,s,n))return!1;a._state=s,a._wrapper.appendTo(a._getContainer()),a._clear();const r=(0,c.extend)({},a._options,{canvas:a._getCanvas()},s,{x:t.x,y:t.y,offset:t.offset});return this.plaque.clear().draw(r)},isCursorOnTooltip:function(e,t){if(this._options.interactive){const i=this.plaque.getBBox();return e>i.x&&e<i.x+i.width&&t>i.y&&t<i.y+i.height}return!1},hide:function(e){const t=this;b(t._wrapper),t._eventData&&(t._eventTrigger("tooltipHidden",t._options.forceEvents?(0,c.extend)({isPointerOut:e},t._eventData):t._eventData),t._clear(),t._eventData=null)},_clear(){this._textHtml.empty()},move:function(e,t,i){this.plaque.draw({x:e,y:t,offset:i,canvas:this._getCanvas(),isMoving:!0})},_moveWrapper:function(){const e=this,t=this.plaque.getBBox();e._renderer.resize(t.width,t.height);const i=e._wrapper.css({left:0,top:0}).offset(),o=t.x,a=t.y;e._wrapper.css({left:o-i.left,top:a-i.top}),this.plaque.moveRoot(-o,-a),this._state.html&&(e._textHtml.css({left:-o,top:-a}),e._textGroupHtml.css({width:m((0,n.getWidth)(e._textHtml))}))},formatValue:function(e,t){const i=t?function(e,t){let i=e;switch(t){case"argument":i={format:e.argumentFormat};break;case"percent":i={format:{type:"percent",precision:e.format&&e.format.percentPrecision}}}return i}(this._options,t):this._options;return f(e,i.format)},getOptions(){return this._options},getLocation:function(){return(0,h.normalizeEnum)(this._options.location)},isEnabled:function(){return!!this._options.enabled||!!this._options.forceEvents},isShared:function(){return!!this._options.shared},_getCanvas:function(){const e=this._getContainer(),t=e.getBoundingClientRect(),i=o.default.getDocumentElement(),n=o.default.getDocument();let a=y.pageXOffset||i.scrollLeft||0,s=y.pageYOffset||i.scrollTop||0;const r={left:a,top:s,width:v(i.clientWidth,n.body.clientWidth)+a,height:v(n.body.scrollHeight,i.scrollHeight,n.body.offsetHeight,i.offsetHeight,n.body.clientHeight,i.clientHeight),right:0,bottom:0};return e!==o.default.getBody()&&(a=v(r.left,r.left+t.left),s=v(r.top,r.top+t.top),r.width=C(t.width,r.width)+a+r.left,r.height=C(t.height,r.height)+s+r.top,r.left=a,r.top=s),r}};t.plugin={name:"tooltip",init:function(){this._initTooltip()},dispose:function(){this._disposeTooltip()},members:{_initTooltip:function(){this._tooltip=new w({cssClass:this._rootClassPrefix+"-tooltip",eventTrigger:this._eventTrigger,pathModified:this.option("pathModified"),widgetRoot:this.element(),widget:this})},_disposeTooltip:function(){this._tooltip.dispose(),this._tooltip=null},_setTooltipRendererOptions:function(){this._tooltip.setRendererOptions(this._getRendererOptions())},_setTooltipOptions:function(){this._tooltip.update(this._getOption("tooltip"))}},extenders:{_stopCurrentHandling(){this._tooltip&&this._tooltip.hide()}},customize:function(e){const t=e.prototype;t._eventsMap.onTooltipShown={name:"tooltipShown"},t._eventsMap.onTooltipHidden={name:"tooltipHidden"},e.addChange({code:"TOOLTIP_RENDERER",handler:function(){this._setTooltipRendererOptions()},isThemeDependent:!0,isOptionChange:!0}),e.addChange({code:"TOOLTIP",handler:function(){this._setTooltipOptions()},isThemeDependent:!0,isOptionChange:!0,option:"tooltip"})},fontFields:["tooltip.font"]}},28779:function(e,t,i){t.PANE_PADDING=void 0,t.adjustVisualRange=function(e,t,i,n){const a=(0,o.isDefined)(t.startValue),s=(0,o.isDefined)(t.endValue),r="discrete"!==e.axisType;n=n||i;const l=q(e,!1);let d=a?t.startValue:n.min,u=s?t.endValue:n.max,c=t.length;const h=n.categories;if(r&&!(0,o.isDefined)(d)&&!(0,o.isDefined)(u))return{startValue:d,endValue:u};if((0,o.isDefined)(c))if(r)"datetime"!==e.dataType||(0,o.isNumeric)(c)||(c=D(c)),s&&!a||!s&&!a?((0,o.isDefined)(i.max)&&(u=u>i.max?i.max:u),d=l(u,c,-1)):a&&!s&&((0,o.isDefined)(i.min)&&(d=d<i.min?i.min:d),u=l(d,c));else if(c=parseInt(c),!isNaN(c)&&isFinite(c))if(c--,s||a){if(a&&!s){u=K(h,d,void 0).categories[c]}else if(!a&&s){const e=K(h,void 0,u);d=e.categories[e.categories.length-1-c]}}else u=h[h.length-1],d=h[h.length-1-c];r&&((0,o.isDefined)(i.max)&&u>i.max&&(u=i.max),(0,o.isDefined)(i.min)&&d<i.min&&(d=i.min));return{startValue:d,endValue:u}},t.convertAngleToRendererSpace=void 0,t.convertPolarToXY=function(e,t,i,n){const a=n>0?n:0;i=(0,o.isDefined)(i)?i+t-90:0;const s=B(i);return{x:S(e.x+a*s.cos),y:S(e.y+a*s.sin)}},t.convertVisualRangeObject=function(e,t){if(t)return e;return[e.startValue,e.endValue]},t.enumParser=t.degreesToRadians=t.decreaseGaps=t.convertXYToPolar=void 0,t.extractColor=function(e,t){return(0,o.isString)(e)||!e?e:t?e.base:e.fillId||e.base},t.getAddFunction=q,t.getLog=t.getDistance=t.getDecimalOrder=t.getCosAndSin=t.getCategoriesInfo=t.getAppropriateFormat=t.getAdjustedLog10=void 0,t.getLogExt=Y,t.getVerticallyShiftedAngularCoords=t.getPower=t.getNextDefsSvgId=void 0,t.getVizRangeObject=function(e){return Array.isArray(e)?{startValue:e[0],endValue:e[1]}:e||{}},t.isRelativeHeightPane=Z,t.map=N,t.mergeMarginOptions=function(e,t){return{checkInterval:e.checkInterval||t.checkInterval,size:b(e.size||0,t.size||0),percentStick:e.percentStick||t.percentStick,sizePointNormalState:b(e.sizePointNormalState||0,t.sizePointNormalState||0)}},t.normalizeAngle=void 0,t.normalizeArcParams=function(e,t,i,n,o,a){let s,r=!0;const l=H(a,3)-H(o,3);l&&(p(l)%360==0&&(o=0,a=360,s=!0,a-=.01),o>360&&(o%=360),a>360&&(a%=360),o>a&&(o-=360),r=!1);return o*=E,a*=E,[e,t,Math.min(n,i),Math.max(n,i),Math.cos(o),Math.sin(o),Math.cos(a),Math.sin(a),s,_(p(a-o)/c)%2?"1":"0",r]},t.normalizeBBox=U,t.normalizeEnum=$,t.normalizePanesHeight=function(e){e.forEach((e=>{const t=e.height;let i=0,n=parseFloat(t)||void 0;((0,o.isString)(t)&&t.indexOf("px")>-1||(0,o.isNumeric)(t)&&t>1)&&(n=S(n),i=1),!i&&n&&((0,o.isString)(t)&&t.indexOf("%")>-1?(n/=100,i=2):n<0&&(n=n<-1?1:p(n))),e.height=n,e.unit=i}));const t=e.filter(Z),i=t.reduce(((e,t)=>e+(t.height||0)),0),n=t.length,a=t.filter((e=>!e.height)),s=a.length;if(i<1&&s)a.forEach((e=>e.height=(1-i)/s));else if(i>1||i<1&&!s||1===i&&s){if(s){const e=i/n,o=s*e;t.filter((e=>e.height)).forEach((e=>e.height*=(i-o)/i)),a.forEach((t=>t.height=e))}t.forEach((e=>e.height*=1/i))}},t.patchFontOptions=t.parseScalar=void 0,t.pointInCanvas=function(e,t,i){return t>=e.left&&t<=e.right&&i>=e.top&&i<=e.bottom},t.raiseTo=t.processSeriesTemplate=void 0,t.raiseToExt=X,t.rangesAreEqual=function(e,t){return Array.isArray(t)?e.length===t.length&&e.every(((e,i)=>Q(e)===Q(t[i]))):Q(e.startValue)===Q(t.startValue)&&Q(e.endValue)===Q(t.endValue)},t.rotateBBox=function(e,t,i){const n=A(x(i*E).toFixed(3)),o=A(w(i*E).toFixed(3)),a=e.width/2,s=e.height/2,r=e.x+a,l=e.y+s,d=p(a*n)+p(s*o),u=p(a*o)+p(s*n),c=t[0]+(r-t[0])*n+(l-t[1])*o,h=t[1]-(r-t[0])*o+(l-t[1])*n;return U({x:c-d,y:h-u,width:2*d,height:2*u})},t.roundValue=void 0,t.setCanvasValues=G,t.unique=void 0,t.updatePanesCanvases=function(e,t,i){let n=0;const o=P,s=i?t.width-t.left-t.right:t.height-t.top-t.bottom,r=e.reduce(((e,t)=>e+(Z(t)?0:t.height)),0),l=s-o*(e.length-1)-r,d=i?"left":"top",u=i?"right":"bottom";e.forEach((e=>{const i=Z(e)?S(e.height*l):e.height;e.canvas=e.canvas||{},(0,a.extend)(e.canvas,t),e.canvas[d]=t[d]+n,e.canvas[u]=t[u]+(s-i-n),n=n+i+o,G(e.canvas)}))},t.valueOf=Q;var n=i(17781),o=i(11528),a=i(52576),s=i(21274),r=i(50254),l=u(i(41380)),d=u(i(43101));function u(e){return e&&e.__esModule?e:{default:e}}const{PI:c,LN10:h,abs:p,log:g,floor:_,ceil:f,pow:m,sqrt:v,atan2:C}=Math,y=Math.min,b=Math.max,x=Math.cos,w=Math.sin,S=Math.round,D=l.default.dateToMilliseconds,I=1e10,E=c/180,T=isNaN,A=Number;let O=1;const P=t.PANE_PADDING=10,k=function(e,t){return e?g(e)/g(t):NaN};t.getLog=k;t.getAdjustedLog10=function(e){return(0,r.adjust)(k(e,10))};const M=function(e,t){return m(t,e)};t.raiseTo=M;const R=function(e){return(e%360+360)%360};t.normalizeAngle=R;t.convertAngleToRendererSpace=function(e){return 90-e};const L=function(e){return c*e/180};t.degreesToRadians=L;const B=function(e){const t=L(e);return{cos:x(t),sin:w(t)}};t.getCosAndSin=B;const V=function(e,t,i,n){const o=i-e,a=n-t;return v(a*a+o*o)};t.getDistance=V;const F=function(e){let t,i=p(e);return T(i)?NaN:i>0?(i=g(i)/h,t=f(i),t-i<1e-14?t:_(i)):0};t.getDecimalOrder=F;t.getAppropriateFormat=function(e,t,i){const n=b(F(e),F(t));let o,a=-F(p(t-e)/i);return T(n)||T(a)?null:(p(n)<=4?(o="fixedPoint",a<0&&(a=0),a>4&&(a=4)):(o="exponential",a+=n-1,a>3&&(a=3)),{type:o,precision:a})};const H=function(e,t){if(t>20&&(t=20),(0,o.isNumeric)(e))return(0,o.isExponential)(e)?A(e.toExponential(t)):A(e.toFixed(t))};t.roundValue=H;function N(e,t){let i=0;const n=e.length,o=[];let a;for(;i<n;)a=t(e[i],i),null!==a&&o.push(a),i++;return o}function z(e,t){return N(t,(t=>e[t]?e[t]:null))}function W(e,t,i,n){let o=n;return(0,s.each)(t,((t,n)=>{e[n]&&(e[n]-=i,o-=i)})),o}function $(e){return String(e).toLowerCase()}function G(e){return e&&(e.originalTop=e.top,e.originalBottom=e.bottom,e.originalLeft=e.left,e.originalRight=e.right),e}function j(e){return-I<e&&e<+I?e:0}function U(e){const t=j(_(e.x)),i=j(_(e.y)),n={x:t,y:i,width:j(f(e.width+e.x))-t,height:j(f(e.height+e.y))-i};return n.isEmpty=!(n.x||n.y||n.width||n.height),n}t.getPower=function(e){return e.toExponential().split("e")[1]};t.decreaseGaps=function(e,t,i){let n;do{n=z(e,t),n.push(f(i/n.length)),i=W(e,t,y.apply(null,n),i)}while(i>0&&n.length>1);return i};t.parseScalar=function(e,t){return void 0!==e?e:t};t.enumParser=function(e){const t={};let i,n;for(i=0,n=e.length;i<n;++i)t[$(e[i])]=1;return function(e,i){const n=$(e);return t[n]?n:i}};t.patchFontOptions=function(e){const t={};return(0,s.each)(e||{},(function(i,n){if(/^(cursor)$/i.test(i));else if("opacity"===i)n=null;else if("color"===i){if(i="fill","opacity"in e){const t=new d.default(n);n=`rgba(${t.r},${t.g},${t.b},${e.opacity})`}}else i="font-"+i;t[i]=n})),t};t.convertXYToPolar=function(e,t,i){const n=V(e.x,e.y,t,i),o=C(i-e.y,t-e.x);return{phi:S(R(180*o/c)),r:S(n)}};t.processSeriesTemplate=function(e,t){const i=(0,o.isFunction)(e.customizeSeries)?e.customizeSeries:n.noop,s=e.nameField,r={},l=[];let d,u,c,h=0;for(u=(t=t||[]).length;h<u;h++)c=t[h],s in c&&(d=r[c[s]],d||(d=r[c[s]]={name:c[s],nameFieldValue:c[s]},l.push(d.name)));return N(l,(function(e){const t=r[e];return(0,a.extend)(t,i.call(null,t.name))}))};const K=function(e,t,i){if(0===e.length)return{categories:[]};t=(0,o.isDefined)(t)?t:e[0],i=(0,o.isDefined)(i)?i:e[e.length-1];const n=N(e,(e=>null==e?void 0:e.valueOf()));let a,s=n.indexOf(t.valueOf()),r=n.indexOf(i.valueOf()),l=!1;s<0&&(s=0),r<0&&(r=e.length-1),r<s&&(a=r,r=s,s=a,l=!0);const d=e.slice(s,r+1),u=d.length-1;return{categories:d,start:d[l?u:0],end:d[l?0:u],inverted:l}};function Z(e){return!(e.unit%2)}t.getCategoriesInfo=K;t.unique=function(e){const t={};return N(e,(function(e){const i=t[e]?null:e;return t[e]=!0,i}))};function q(e,t){return"datetime"===e.dataType?function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return new Date(e.getTime()+i*t)}:"logarithmic"===e.axisType?function(t,i){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return X(Y(t,e.base)+n*i,e.base)}:function(e,i){const n=e+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1)*i;return t&&n*e<=0?0:n}}function Y(e,t){let i=arguments.length>3?arguments[3]:void 0;if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2]))return k(e,t);if(0===e)return 0;const n=k(p(e),t)-(i-1);return n<0?0:(0,r.adjust)((0,r.sign)(e)*n,Number(m(t,i-1).toFixed(p(i))))}function X(e,t){let i=arguments.length>3?arguments[3]:void 0;if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2]))return M(e,t);if(0===e)return 0;const n=M(p(e)+(i-1),t);return n<0?0:(0,r.adjust)((0,r.sign)(e)*n,Number(m(t,i).toFixed(p(i))))}function Q(e){return e&&e.valueOf()}t.getVerticallyShiftedAngularCoords=function(e,t,i){const n=e.x+e.width/2>=i.x,o=(n?e.x:e.x+e.width)-i.x,a=e.y-i.y,s=a+t,r=S(v(o*o+a*a-s*s)),l=(n?+r:-r)||o;return{x:i.x+(n?l:l-e.width),y:e.y+t}};t.getNextDefsSvgId=()=>"DevExpress_"+O++},88168:function(e,t,i){var n=i(74754);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},61434:function(e,t,i){t.default=void 0;var n,o=(n=i(52725))&&n.__esModule?n:{default:n},a=i(18943),s=i(74754),r=i(16216),l=i(67056),d=i(11805),u=i(13853),c=i(92528);o.default.addPlugin(a.plugin),o.default.addPlugin(s.plugin),o.default.addPlugin(r.plugin),o.default.addPlugin(l.plugin),o.default.addPlugin(d.plugin),o.default.addPlugin(u.plugin),o.default.addPlugin(c.plugin);t.default=o.default;e.exports=t.default,e.exports.default=t.default},52725:function(e,t,i){t.default=void 0;var n=i(43858),o=c(i(66194)),a=c(i(59327)),s=i(17781),r=c(i(34506)),l=c(i(92848)),d=c(i(5810)),u=i(25058);function c(e){return e&&e.__esModule?e:{default:e}}const h="NODES_CREATE";function p(e){return{fill:e.fill,hatching:e.hatching}}(0,n.addAlgorithm)("dynamicslope",o.default,!0),(0,n.addAlgorithm)("dynamicheight",a.default);const g=r.default.inherit({_rootClass:"dxf-funnel",_rootClassPrefix:"dxf",_proxyData:[],_optionChangesMap:{dataSource:"DATA_SOURCE",neckWidth:h,neckHeight:h,inverted:h,algorithm:h,item:h,valueField:h,argumentField:h,colorField:h,palette:h,paletteExtensionMode:h,sortData:h},_themeDependentChanges:[h],_getDefaultSize:function(){return{width:400,height:400}},_themeSection:"funnel",_fontFields:["legend.title.font","legend.title.subtitle.font","legend.font"],_optionChangesOrder:["DATA_SOURCE"],_initialChanges:["DATA_SOURCE"],_initCore:function(){this._group=this._renderer.g().append(this._renderer.root),this._items=[]},_eventsMap:{onHoverChanged:{name:"hoverChanged"},onSelectionChanged:{name:"selectionChanged"}},_disposeCore:s.noop,_applySize:function(e){return this._rect=e.slice(),this._change(["TILING"]),this._rect},_getAlignmentRect:function(){return this._rect},_change_TILING:function(){const e=this,t=e._items,i=e._rect,n=function(e,t){const n=t%2;return i[0+n]+(i[2+n]-i[0+n])*e};this._group.clear(),t.forEach((function(t,i){const o=t.figure.map(n),a=e._renderer.path([],"area").attr({points:o}).append(e._group);t.coords=o,t.element=a})),this._requestChange(["TILES"])},_customChangesOrder:[h,"LAYOUT","TILING","TILES","DRAWN"],_dataSourceChangedHandler:function(){this._requestChange([h])},_change_DRAWN:function(){this._drawn()},_change_DATA_SOURCE:function(){this._change(["DRAWN"]),this._updateDataSource()},_change_NODES_CREATE:function(){this._buildNodes()},_change_TILES:function(){this._applyTilesAppearance()},_suspend:function(){this._applyingChanges||this._suspendChanges()},_resume:function(){this._applyingChanges||this._resumeChanges()},_applyTilesAppearance:function(){this._items.forEach((function(e){const t=e.getState();e.element.smartAttr(e.states[t])}))},_hitTestTargets:function(e,t){const i=this;let n;return this._proxyData.some((function(o){if(n=o.call(i,e,t),n)return!0})),n},clearHover:function(){this._suspend(),this._items.forEach((function(e){e.isHovered()&&e.hover(!1)})),this._resume()},clearSelection:function(){this._suspend(),this._items.forEach((function(e){e.isSelected()&&e.select(!1)})),this._resume()},_getData:function(){const e=this,t=e._dataSourceItems()||[],i=e._getOption("valueField",!0),n=e._getOption("argumentField",!0),o=e._getOption("colorField",!0),a=t.reduce((function(e,t){const a=Number(t[i]);return a>=0&&(e[0].push({value:a,color:t[o],argument:t[n],dataItem:t}),e[1]+=a),e}),[[],0]),s=a[0];return t.length>0&&0===s.length&&e._incidentOccurred("E2005",i),a[1]?(e._getOption("sortData",!0)&&s.sort((function(e,t){return t.value-e.value})),s):[]},_buildNodes:function(){const e=this,t=e._getData(),i=(0,n.getAlgorithm)(e._getOption("algorithm",!0)),o=i.normalizeValues(t),a=e._getOption("item"),s=i.getFigures(o,e._getOption("neckWidth",!0),e._getOption("neckHeight",!0)),r=e._themeManager.createPalette(e._getOption("palette",!0),{useHighlight:!0,extensionMode:e._getOption("paletteExtensionMode",!0),count:s.length});e._items=s.map((function(i,n){const s=t[n];return new d.default(e,{figure:i,data:s,percent:o[n],id:n,color:s.color||r.getNextColor(),itemOptions:a})})),e._getOption("inverted",!0)&&e._items.forEach((function(e){e.figure=e.figure.map((function(e,t){return t%2?1-e:e}))})),e._renderer.initDefsElements(),e._change(["TILING","DRAWN"])},_showTooltip:s.noop,hideTooltip:s.noop,getAllItems:function(){return this._items.slice()},_getLegendData(){return this._items.map((e=>{const t=e.states;return{id:e.id,visible:!0,text:e.argument,item:e,states:{normal:p(t.normal),hover:p(t.hover),selection:p(t.selection)}}}))},_getMinSize:function(){const e=this._getOption("adaptiveLayout");return[e.width,e.height]}});(0,l.default)("dxFunnel",g);t.default=g;g.addPlugin(u.plugin),e.exports=t.default,e.exports.default=t.default},5810:function(e,t,i){t.default=void 0;var n=i(11528);const o=["normal","hover","selection","selection"];function a(e,t,i){const o=t.border,a=i.border,s=(0,n.isDefined)(o.visible)?o.visible:a.visible,r=(0,n.isDefined)(o.width)?o.width:a.width;return{fill:e,hatching:t.hatching,stroke:o.color||a.color,"stroke-width":s?r:0}}function s(e,t){const i=this,n=t.data;i.code=0,i.widget=e,i.figure=t.figure,i.argument=n.argument,i.value=n.value,i.data=n.dataItem,i.percent=t.percent,i.id=t.id,i.color=t.color,i.states={normal:a(t.color,t.itemOptions,t.itemOptions),hover:a(t.color,t.itemOptions.hoverStyle,t.itemOptions),selection:a(t.color,t.itemOptions.selectionStyle,t.itemOptions)}}s.prototype={getState:function(){return o[this.code]},getNormalStyle:function(){return this.states.normal},setHover:function(){this.hover(!0)},hover:function(e){this.widget._getOption("hoverEnabled",!0)&&e!==this.isHovered()&&(this.widget._suspend(),e&&this.widget.clearHover(),this.setState(1,e),this.widget._eventTrigger("hoverChanged",{item:this}),this.widget._resume())},setState:function(e,t){t?this.code|=e:this.code&=~e,this.widget._applyTilesAppearance()},select:function(e){const t=this.widget._getOption("selectionMode",!0);"none"!==t&&e!==this.isSelected()&&(this.widget._suspend(),e&&"multiple"!==t&&this.widget.clearSelection(),this.setState(2,e),this.widget._eventTrigger("selectionChanged",{item:this}),this.widget._resume())},showTooltip:function(e){this.widget._showTooltip(this.id,e)},getColor:function(){return this.color},isHovered:function(){return!!(1&this.code)},isSelected:function(){return!!(2&this.code)}};t.default=s;e.exports=t.default,e.exports.default=t.default},18943:function(e,t,i){t.plugin=void 0;var n=i(70576),o=i(28779),a=i(52576),s=i(17781);const r="outside",l="inside";function d(e){return(e=(0,o.normalizeEnum)(e))===r||e!==l}function u(e,t,i){return i?e-t.height:e}function c(e,t,i,n){return{x:e[2]+i.horizontalOffset+5,y:u(e[3]+i.verticalOffset,t,n)}}function h(e,t,i,n){return{x:e[0]-t.width-i.horizontalOffset-5,y:u(e[1]+i.verticalOffset,t,n)}}function p(e,t,i){const n=e[2]-e[0],o=e[7]-e[1];return{x:e[0]+n/2+i.horizontalOffset-t.width/2,y:e[1]+i.verticalOffset+o/2-t.height/2}}t.plugin={name:"lables",init:s.noop,dispose:s.noop,extenders:{_initCore:function(){this._labelsGroup=this._renderer.g().attr({class:this._rootClassPrefix+"-labels"}).append(this._renderer.root),this._labels=[]},_applySize:function(){const e=this._getOption("label"),t=this._getOption("adaptiveLayout"),i=this._rect;let n=0;const a=i[2]-i[0];if(this._labelRect=i.slice(),!this._labels.length||!d(e.position))return void((0,o.normalizeEnum)("none"!==this._getOption("resolveLabelOverlapping",!0))&&this._labels.forEach((e=>!e.isVisible()&&e.draw(!0))));const s=this._labels.map((function(e){return e.resetEllipsis(),e.getBoundingRect().width})).reduce((function(e,t){return Math.max(e,t)}),0);var u;n=s+e.horizontalOffset+(u=e.position,(u=(0,o.normalizeEnum)(u))===r?5:u===l?0:20),!t.keepLabels&&a-n<t.width?this._labels.forEach((function(e){e.draw(!1)})):(a-n<t.width&&(n=a-t.width,n=n>0?n:0),this._labels.forEach((function(e){e.draw(!0)})),"left"===e.horizontalAlignment?i[0]+=n:i[2]-=n)},_buildNodes:function(){this._createLabels()},_change_TILING:function(){const e=this,t=e._getOption("label");let i=p;const n=e._getOption("inverted",!0);let a;d(t.position)&&((0,o.normalizeEnum)(t.position)===r?i="left"===t.horizontalAlignment?h:c:(a=this._defaultLabelTextAlignment(),i="left"===t.horizontalAlignment?function(e,t,i){return function(n,o,a,s){return{x:"left"===i?e[0]:t[0]-o.width-a.horizontalOffset-20,y:u(n[3]+a.verticalOffset,o,s)}}}(this._labelRect,this._rect,a):function(e,t,i){return function(n,o,a,s){return{x:"left"===i?t[2]+a.horizontalOffset+20:e[2]-o.width,y:u(n[3]+a.verticalOffset,o,s)}}}(this._labelRect,this._rect,a))),e._labels.forEach((function(o,a){const s=e._items[a],r=s.getNormalStyle()["stroke-width"],l=n?r/2:-r/2,u=l?s.coords.map((function(e,t){return 1===t||3===t?e-l:2===t?e-r:0===t?e+r:e})):s.coords;if(!t.showForZeroValues&&0===s.value)return void o.draw(!1);d(t.position)&&e._correctLabelWidth(o,s.coords,t);const c=o.getBoundingRect(),h=function(e,t,i){return e.x<i[0]&&(e.x=i[0]),e.x+t.width>i[2]&&(e.x=i[2]-t.width),e.y<i[1]&&(e.y=i[1]),e.y+t.height>i[3]&&(e.y=i[3]-t.height),e}(i(u,c,t,n),c,e._labelRect);o.setFigureToDrawConnector(u),o.shift(h.x,h.y)})),e._resolveLabelOverlapping()}},members:{_resolveLabelOverlapping(){const e=this,t=(0,o.normalizeEnum)(e._getOption("resolveLabelOverlapping",!0)),i=this._getOption("inverted",!0)?e._labels.slice().reverse():e._labels;if("hide"===t)i.reduce(((e,t)=>(t.getBoundingRect().y<e?t.hide():e=t.getBoundingRect().y+t.getBoundingRect().height,e)),0);else if("shift"===t){const t=this._labelRect[3];i.filter((e=>e.isVisible())).reduce(((i,n,o,a)=>{let[s,r]=i;const l=n.getBoundingRect();let d=l.y;return l.y<s&&(n.shift(l.x,s),d=s),d-s>0&&(r+=d-s),d+l.height>t?r&&r>d+l.height-t?(!function(e,t,i){e.reduce(((e,t,n,o)=>{const a=o[n+1];if(e>0){const s=t.getBoundingRect(),r=a?a.getBoundingRect().y+a.getBoundingRect().height:i,l=s.y-r,d=Math.min(l,e);o.slice(0,n+1).forEach((e=>{const t=e.getBoundingRect();e.shift(t.x,t.y-d)})),e-=d}return e}),t)}(a.slice(0,o).reverse(),d+l.height-t,e._labelRect[1]),r-=d+l.height-t,n.shift(l.x,d-(d+l.height-t)),s=d-(d+l.height-t)+l.height):n.hide():s=d+l.height,[s,r]}),[this._labelRect[1],0])}},_defaultLabelTextAlignment:function(){return this._getOption("rtlEnabled",!0)?"right":"left"},_correctLabelWidth:function(e,t,i){const n="left"===i.horizontalAlignment,o=n?this._labelRect[0]:t[2],a=(n?t[0]:this._labelRect[2])-o;e.getBoundingRect().width>a&&e.fit(a)},_createLabels:function(){const e=this,t=e._getOption("label"),i=function(e,t){const i="left"===e.horizontalAlignment,n=i?4:-4,o=t?-1:0;function a(e){return i?[e[0]+1,e[1]+o]:[e[2]-1,e[3]+o]}return{isLabelInside:function(){return!d(e.position)},getFigureCenter:a,prepareLabelPoints:function(e){const t=e.x+n,i=e.y,o=t+e.width;return[...Array(e.height+1)].map(((e,n)=>[t,i+n])).concat([...Array(e.height+1)].map(((e,t)=>[o,i+t])))},isHorizontal:function(){return!0},findFigurePoint:function(e){return a(e)},adjustPoints:function(e){return e.map(Math.round)}}}(t,e._getOption("inverted",!0));this._labelsGroup.clear(),t.visible&&(this._labels=e._items.map((function(s){const r=new n.Label({renderer:e._renderer,labelsGroup:e._labelsGroup,strategy:i});return r.setOptions(function(e,t,i){const n=e||{},s=(0,a.extend)({},n.font)||{},r=n.border||{},l=n.connector||{},u={fill:n.backgroundColor||t,"stroke-width":r.visible&&r.width||0,stroke:r.visible&&r.width?r.color:"none",dashStyle:r.dashStyle},c={stroke:l.visible&&l.width?l.color||t:"none","stroke-width":l.visible&&l.width||0,opacity:l.opacity};return s.color="none"===n.backgroundColor&&"#ffffff"===(0,o.normalizeEnum)(s.color)&&"inside"!==n.position?t:s.color,{format:n.format,textAlignment:n.textAlignment||(d(n.position)?i:"center"),customizeText:n.customizeText,attributes:{font:s},visible:0!==s.size&&n.visible,showForZeroValues:n.showForZeroValues,horizontalOffset:n.horizontalOffset,verticalOffset:n.verticalOffset,background:u,connector:c,wordWrap:e.wordWrap,textOverflow:e.textOverflow}}(t,s.color,e._defaultLabelTextAlignment())),r.setData({item:s,value:s.value,percent:s.percent}),r.draw(!0),r})),this._labels.length&&d(t.position)&&this._requestChange(["LAYOUT"]))}},customize:function(e){e.prototype._proxyData.push((function(e,t){const i=this;let n;return i._labels.forEach((function(o,a){const s=o.getBoundingRect();if(e>=s.x&&e<=s.x+s.width&&t>=s.y&&t<=s.y+s.height){const e=d(i._getOption("label").position)?"outside":"inside";return n={id:a,type:e+"-label"},!0}})),n})),["label","resolveLabelOverlapping"].forEach((t=>{e.addChange({code:t.toUpperCase(),handler:function(){this._createLabels(),this._requestChange(["LAYOUT"])},isThemeDependent:!0,isOptionChange:!0,option:t})}))},fontFields:["label.font"]}},66194:function(e,t){t.default=void 0;const i=.5;t.default={getFigures:function(e){const t=1/e.length;return e.map((function(e,n,o){const a=o[n+1]?o[n+1]:o[n];return[i-e/2,t*n,i+e/2,t*n,i+a/2,t*(n+1),i-a/2,t*(n+1)]}))},normalizeValues:function(e){const t=e.reduce((function(e,t){return Math.max(t.value,e)}),e[0]&&e[0].value||0);return e.map((function(e){return e.value/t}))}};e.exports=t.default,e.exports.default=t.default},43858:function(e,t,i){t.addAlgorithm=function(e,t,i){o[e]=t,i&&(a=o[e])},t.getAlgorithm=function(e){return o[(0,n.normalizeEnum)(e)]||a};var n=i(28779);const o={};let a},59327:function(e,t){t.default=void 0;t.default={getFigures:function(e,t,i){let n=0,o=0,a=0,s=0;const r=t/2,l=.5-r,d=1-i,u=.5-r,c=.5+r;return e.map((function(e){return a=s,o=n,n+=e,s=l*n/d,o<=d&&n<=d?[a,o,1-a,o,1-s,n,0+s,n]:o<=d&&n>d?[a,o,1-a,o,c,d,c,n,u,n,u,d]:[u,o,c,o,c,n,u,n]}))},normalizeValues:function(e){const t=e.reduce((function(e,t){return e+t.value}),0);return e.map((function(e){return e.value/t}))}};e.exports=t.default,e.exports.default=t.default},13853:function(e,t,i){t.plugin=void 0;var n=i(17781),o=i(23277);function a(e,t,i){const n=i.getRootOffset();return e||t&&[(t[0]+t[2])/2+n.left,(t[1]+t[5])/2+n.top]||[-1e3,-1e3]}t.plugin={name:"funnel-tooltip",init:n.noop,dispose:n.noop,extenders:{_buildNodes:function(){this.hideTooltip()},_change_TILING:function(){this._tooltipIndex>=0&&this._moveTooltip(this._items[this._tooltipIndex])}},members:{hideTooltip:function(){this._tooltipIndex>=0&&(this._tooltipIndex=-1,this._tooltip.hide())},_moveTooltip:function(e,t){const i=a(t,e.coords,this._renderer);this._tooltip.move(i[0],i[1],0)},_showTooltip:function(e,t){const i=this,n=i._tooltip,o=i._items[e];if(i._tooltipIndex===e)return void i._moveTooltip(o,t);const s=t=>{void 0!==t&&(t||n.hide(),i._tooltipIndex=t?e:-1)},r=a(t,o.coords,this._renderer);s(n.show({value:o.value,valueText:n.formatValue(o.value),percentText:n.formatValue(o.percent,"percent"),percent:o.percent,item:o},{x:r[0],y:r[1],offset:0},{item:o},void 0,s))}},customize:function(e){e.addPlugin(o.plugin)}}},11805:function(e,t,i){t.plugin=void 0;var n,o=(n=i(52725))&&n.__esModule?n:{default:n},a=i(16197),s=i(11528);let r=0;const l=o.default.prototype;l._eventsMap.onItemClick={name:"itemClick"},l._eventsMap.onLegendClick={name:"legendClick"};t.plugin={name:"tracker",init:function(){const e=this,t="__funnel_data_"+r++,i=function(t){const i=e._renderer.getRootOffset(),n=Math.floor(t.pageX-i.left),o=Math.floor(t.pageY-i.top);return e._hitTestTargets(n,o)};e._tracker=new a.Tracker({widget:e,root:e._renderer.root,getData:function(e,n){const o=e.target[t];if((0,s.isDefined)(o))return o;const a=i(e);return n&&a&&"inside-label"!==a.type?void 0:a&&a.id},getNode:function(t){return e._items[t]},click:function(t){const n=i(t.event),o="legend"===(n&&n.type)?"legendClick":"itemClick";e._eventTrigger(o,{item:t.node,event:t.event})}}),this._dataKey=t},dispose:function(){this._tracker.dispose()},extenders:{_change_TILING:function(){const e=this._dataKey;this._items.forEach((function(t,i){t.element.data(e,i)}))}}}},15060:function(e,t,i){t.dxBarGauge=void 0;var n=g(i(92848)),o=i(22263),a=i(17781),s=i(9410),r=i(52576),l=i(28779),d=i(5600),u=g(i(59248)),c=i(67056),h=i(94618),p=i(50254);function g(e){return e&&e.__esModule?e:{default:e}}const _=Math.PI/180,f=Math.abs,m=Math.round,v=Math.floor,C=Math.min,y=Math.max,b=d.getSampleText,x=d.formatValue,w=d.compareArrays,S=Array.isArray,D=l.convertAngleToRendererSpace,I=l.getCosAndSin,E=l.patchFontOptions,T=Number,A=isFinite,O=a.noop,P=r.extend,k="values";let M;const R=t.dxBarGauge=d.BaseGauge.inherit({_rootClass:"dxbg-bar-gauge",_themeSection:"barGauge",_fontFields:["label.font","legend.font","legend.title.font","legend.title.subtitle.font"],_initCore:function(){const e=this;e.callBase.apply(e,arguments),e._barsGroup=e._renderer.g().attr({class:"dxbg-bars"}).linkOn(e._renderer.root,"bars"),e._values=[],e._context={renderer:e._renderer,translator:e._translator,tracker:e._tracker,group:e._barsGroup},e._animateStep=function(t){const i=e._bars;let n,o;for(n=0,o=i.length;n<o;++n)i[n].animate(t)},e._animateComplete=function(){e._bars.forEach((e=>e.endAnimation())),e._checkOverlap()}},_disposeCore:function(){const e=this;e._barsGroup.linkOff(),e._barsGroup=e._values=e._context=e._animateStep=e._animateComplete=null,e.callBase.apply(e,arguments)},_setupDomainCore:function(){const e=this;let t=e.option("startValue"),i=e.option("endValue");A(t)||(t=0),A(i)||(i=100),e._translator.setDomain(t,i),e._baseValue=e._translator.adjust(e.option("baseValue")),A(e._baseValue)||(e._baseValue=t<i?t:i)},_getDefaultSize:function(){return{width:300,height:300}},_setupCodomain:u.default.prototype._setupCodomain,_getApproximateScreenRange:function(){const e=this,t=e._area.sides,i=e._canvas.width/(t.right-t.left),n=e._canvas.height/(t.down-t.up),o=i<n?i:n;return-e._translator.getCodomainRange()*o*_},_setupAnimationSettings:function(){const e=this;e.callBase.apply(e,arguments),e._animationSettings&&(e._animationSettings.step=e._animateStep,e._animationSettings.complete=e._animateComplete)},_cleanContent:function(){const e=this;e._barsGroup.linkRemove(),e._animationSettings&&e._barsGroup.stopAnimation(),e._barsGroup.clear()},_renderContent:function(){const e=this;let t=e.option("label");const i=e._context;if(e._barsGroup.linkAppend(),i.textEnabled=void 0===t||t&&(!("visible"in t)||t.visible),i.textEnabled){var n,o;i.fontStyles=E(P({},e._themeManager.theme().label.font,null===(n=t)||void 0===n?void 0:n.font,{color:(null===(o=t)||void 0===o||null===(o=o.font)||void 0===o?void 0:o.color)||null})),t=P(!0,{},e._themeManager.theme().label,t),i.formatOptions={format:void 0!==t.format?t.format:e._defaultFormatOptions,customizeText:t.customizeText},i.textOptions={align:"center"},e._textIndent=t.indent>0?T(t.indent):0,i.lineWidth=t.connectorWidth>0?T(t.connectorWidth):0,i.lineColor=t.connectorColor||null;const a=e._renderer.text(b(e._translator,i.formatOptions),0,0).attr(i.textOptions).css(i.fontStyles).append(e._barsGroup),s=a.getBBox();a.remove(),i.textY=s.y,i.textWidth=s.width,i.textHeight=s.height}u.default.prototype._applyMainLayout.call(e),e._renderBars()},_measureMainElements:function(){const e={maxRadius:this._area.radius};return this._context.textEnabled&&(e.horizontalMargin=this._context.textWidth,e.verticalMargin=this._context.textHeight,e.inverseHorizontalMargin=this._context.textWidth/2,e.inverseVerticalMargin=this._context.textHeight/2),e},_renderBars:function(){const e=this,t=P({},e._themeManager.theme(),e.option());let i;const n=e._area,o=t.relativeInnerRadius>0&&t.relativeInnerRadius<1?T(t.relativeInnerRadius):.1;i=n.radius,e._context.textEnabled&&(e._textIndent=m(C(e._textIndent,i/2)),i-=e._textIndent),e._outerRadius=v(i),e._innerRadius=v(i*o),e._barSpacing=t.barSpacing>0?T(t.barSpacing):0,P(e._context,{backgroundColor:t.backgroundColor,x:n.x,y:n.y,startAngle:n.startCoord,endAngle:n.endCoord,baseAngle:e._translator.translate(e._baseValue)}),e._arrangeBars()},_arrangeBars:function(){const e=this;let t=e._outerRadius-e._innerRadius;const i=e._context;let n;const o=e._bars.length;e._beginValueChanging(),i.barSize=o>0?y((t-(o-1)*e._barSpacing)/o,1):0;const a=o>1?y(C((t-o*i.barSize)/(o-1),e._barSpacing),0):0,s=C(v((t+a)/i.barSize),o);e._setBarsCount(o),t=e._outerRadius,i.textRadius=t,i.textIndent=e._textIndent,e._palette.reset();const r=i.barSize+a,l=e._palette.generateColors(s);for(n=0;n<s;++n,t-=r)e._bars[n].arrange({radius:t,color:l[n]});for(let t=s;t<o;t++)e._bars[t].hide();e._animationSettings&&!e._noAnimation?e._animateBars():e._updateBars(),e._endValueChanging()},_setBarsCount:function(){const e=this;e._bars.length>0?e._dummyBackground&&(e._dummyBackground.dispose(),e._dummyBackground=null):(e._dummyBackground||(e._dummyBackground=e._renderer.arc().attr({"stroke-linejoin":"round"})),e._dummyBackground.attr({x:e._context.x,y:e._context.y,outerRadius:e._outerRadius,innerRadius:e._innerRadius,startAngle:e._context.endAngle,endAngle:e._context.startAngle,fill:e._context.backgroundColor}).append(e._barsGroup))},_getCenter:function(){return{x:this._context.x,y:this._context.y}},_updateBars:function(){this._bars.forEach((e=>e.applyValue())),this._checkOverlap()},_checkOverlap:function(){const e=this,t=(0,l.normalizeEnum)(e._getOption("resolveLabelOverlapping",!0));function i(t,i){return(0,l.getVerticallyShiftedAngularCoords)(t,-i,e._context)}if("none"!==t)if("shift"===t){const t=e._dividePoints();s.overlapping.resolveLabelOverlappingInOneDirection(t.left,e._canvas,!1,!1,i),s.overlapping.resolveLabelOverlappingInOneDirection(t.right,e._canvas,!1,!1,i),e._clearLabelsCrossTitle(),e._drawConnector()}else e._clearOverlappingLabels()},_drawConnector(){const e=this,t=e._bars,{connectorWidth:i}=e._getOption("label");t.forEach((t=>{if(!t._isLabelShifted)return;const n=t._bar.attr("x"),o=t._bar.attr("y"),a=t._bar.attr("innerRadius"),s=t._bar.attr("outerRadius"),r=t._bar.attr("startAngle"),d=t._bar.attr("endAngle"),u=V.apply(null,(0,l.normalizeArcParams)(n,o,a,s,r,d)),{cos:c,sin:h}=I(t._angle),g=u.x-h*i/2-c,_=u.y-c*i/2+h,f=t._text.getBBox(),m=t._text._lastCoords,v=e._context.textWidth/2,C=[g,_,f.x+f.width/2+m.x,f.y+m.y];if(t._angle>90?C[2]+=v:C[2]-=v,t._angle<=180&&t._angle>0&&(C[3]+=f.height),i%2){const e=-h/2,i=-c/2;t._angle>180?(C[0]-=e,C[1]-=i):t._angle>0&&t._angle<=90&&(C[0]+=e,C[1]+=i)}const y=C.map((e=>(0,p.roundFloatPart)(e,4)));t._line.attr({points:y}),t._line.rotate(0),t._isLabelShifted=!1}))},_dividePoints(){return this._bars.reduce((function(e,t){const i=(0,l.normalizeAngle)(t._angle),n=i<=90||i>=270;t._text._lastCoords={x:0,y:0};return(n?e.right:e.left).push({series:{isStackedSeries:()=>!1,isFullStackedSeries:()=>!1},getLabels:()=>[{isVisible:()=>!0,getBoundingRect:()=>{const{height:e,width:i,x:n,y:o}=t._text.getBBox(),a=t._text._lastCoords;return{x:n+a.x,y:o+a.y,width:i,height:e}},shift:(e,i)=>{const n=t._text.getBBox();t._text._lastCoords={x:e-n.x,y:i-n.y},t._text.attr({translateX:e-n.x,translateY:i-n.y}),t._isLabelShifted=!0},draw:()=>t.hideLabel(),getData:()=>({value:t.getValue()}),hideInsideLabel:()=>!1}]}),e}),{left:[],right:[]})},_clearOverlappingLabels(){let e=0,t=1;const i=this._bars.concat().sort(((e,t)=>e.getValue()-t.getValue()));for(;e<i.length&&t<i.length;){const n=i[e],o=i[t];n.checkIntersect(o)?(o.hideLabel(),t++):(e=t,t=e+1)}},_clearLabelsCrossTitle(){const e=this._bars,t=this._title.getLayoutOptions()||{x:0,y:0,height:0,width:0},i=t.y+t.height;e.forEach((e=>{const t=e._text.getBBox(),n=e._text._lastCoords;i>t.y+n.y&&e.hideLabel()}))},_animateBars:function(){const e=this;let t;const i=e._bars.length;if(i>0){for(t=0;t<i;++t)e._bars[t].beginAnimation();e._barsGroup.animate({_:0},e._animationSettings)}},_buildNodes(){const e=this,t=e._options.silent();e._palette=e._themeManager.createPalette(t.palette,{useHighlight:!0,extensionMode:t.paletteExtensionMode}),e._palette.reset(),e._bars=e._bars||[],e._animationSettings&&e._barsGroup.stopAnimation();const i=e._values.filter(A),n=i.length;if(e._bars.length>n){const t=e._bars.length;for(let i=n;i<t;++i)e._bars[i].dispose();e._bars.splice(n,t-n)}else if(e._bars.length<n)for(let t=e._bars.length;t<n;++t)e._bars.push(new M(t,e._context));e._bars.forEach(((t,o)=>{t.update({color:e._palette.getNextColor(n),value:i[o]})}))},_updateValues:function(e){const t=this,i=S(e)&&e||A(e)&&[e]||[];let n;const o=i.length;let a;for(t._values.length=o,n=0;n<o;++n)a=i[n],t._values[n]=T(A(a)?a:t._values[n]);t._resizing||w(t._values,t.option(k))||t.option(k,t._values.slice()),this._change(["NODES"])},values:function(e){return void 0!==e?(this._updateValues(e),this):this._values.slice(0)},_optionChangesMap:{backgroundColor:"MOSTLY_TOTAL",relativeInnerRadius:"MOSTLY_TOTAL",barSpacing:"MOSTLY_TOTAL",label:"MOSTLY_TOTAL",resolveLabelOverlapping:"MOSTLY_TOTAL",palette:"MOSTLY_TOTAL",paletteExtensionMode:"MOSTLY_TOTAL",values:"VALUES"},_change_VALUES:function(){this._updateValues(this.option(k))},_factory:(0,o.clone)(d.BaseGauge.prototype._factory),_optionChangesOrder:["VALUES","NODES"],_initialChanges:["VALUES"],_change_NODES(){this._buildNodes()},_change_MOSTLY_TOTAL:function(){this._change(["NODES"]),this.callBase()},_proxyData:[],_getLegendData(){const e=this,t={},i=e._options.silent(),n=(i.label||{}).format,o=(i.legend||{}).itemTextFormat;return t.format=o||(n||e._defaultFormatOptions),(this._bars||[]).map((e=>({id:e.index,item:{value:e.getValue(),color:e.getColor(),index:e.index},text:x(e.getValue(),t),visible:!0,states:{normal:{fill:e.getColor()}}})))}});function L(e,t,i){e.startAngle=t<i?t:i,e.endAngle=t<i?i:t}function B(e,t){return f(e-t)<1e-4}function V(e,t,i,n,o,a){return{x:(e+n*o).toFixed(5),y:(t-n*a).toFixed(5)}}M=function(e,t){const i=this;i._context=t,i._tracker=t.renderer.arc().attr({"stroke-linejoin":"round"}),i.index=e},P(M.prototype,{dispose:function(){const e=this;return e._background.dispose(),e._bar.dispose(),e._context.textEnabled&&(e._line.dispose(),e._text.dispose()),e._context.tracker.detach(e._tracker),e._context=e._settings=e._background=e._bar=e._line=e._text=e._tracker=null,e},arrange:function(e){const t=this,i=t._context;return this._visible=!0,i.tracker.attach(t._tracker,t,{index:t.index}),t._background=i.renderer.arc().attr({"stroke-linejoin":"round",fill:i.backgroundColor}).append(i.group),t._settings=t._settings||{x:i.x,y:i.y,startAngle:i.baseAngle,endAngle:i.baseAngle},t._bar=i.renderer.arc().attr(P({"stroke-linejoin":"round"},t._settings)).append(i.group),i.textEnabled&&(t._line=i.renderer.path([],"line").attr({"stroke-width":i.lineWidth}).append(i.group),t._text=i.renderer.text().css(i.fontStyles).attr(i.textOptions).append(i.group)),t._angle=isFinite(t._angle)?t._angle:i.baseAngle,t._settings.outerRadius=e.radius,t._settings.innerRadius=e.radius-i.barSize,t._settings.x=i.x,t._settings.y=i.y,t._background.attr(P({},t._settings,{startAngle:i.endAngle,endAngle:i.startAngle,fill:t._context.backgroundColor})),t._bar.attr({x:i.x,y:i.y,outerRadius:t._settings.outerRadius,innerRadius:t._settings.innerRadius,fill:t._color}),t._tracker.attr(t._settings),i.textEnabled&&(t._line.attr({points:[i.x,i.y-t._settings.innerRadius,i.x,i.y-i.textRadius-i.textIndent],stroke:i.lineColor||t._color}).sharp(),t._text.css({fill:i.fontStyles.fill||t._color})),t},getTooltipParameters:function(){const e=this,t=I((e._angle+e._context.baseAngle)/2);return{x:m(e._context.x+(e._settings.outerRadius+e._settings.innerRadius)/2*t.cos),y:m(e._context.y-(e._settings.outerRadius+e._settings.innerRadius)/2*t.sin),offset:0,color:e._color,value:e._value}},setAngle:function(e){const t=this,i=t._context,n=t._settings;let o;if(t._angle=e,L(n,i.baseAngle,e),t._bar.attr(n),t._tracker.attr(n),i.textEnabled){o=I(e);const n=i.textIndent,a=i.textRadius+n;let s=i.x+a*o.cos,r=i.y-a*o.sin;const l=.5*i.textWidth,d=i.textHeight,u=i.textY;f(s-i.x)>n&&(s+=s<i.x?-l:l),f(r-i.y)<=n?r-=u+.5*d:r-=r<i.y?u+d:u;const c=x(t._value,i.formatOptions,{index:t.index}),h=""===c?"hidden":null;t._text.attr({text:c,x:s,y:r,visibility:h}),t._line.attr({visibility:h}),t._line.rotate(D(e),i.x,i.y)}return t},hideLabel:function(){this._text.attr({visibility:"hidden"}),this._line.attr({visibility:"hidden"})},checkIntersect:function(e){const t=this.calculateLabelCoords(),i=e.calculateLabelCoords();if(!t||!i)return!1;return Math.max(0,Math.min(t.bottomRight.x,i.bottomRight.x)-Math.max(t.topLeft.x,i.topLeft.x))*Math.max(0,Math.min(t.bottomRight.y,i.bottomRight.y)-Math.max(t.topLeft.y,i.topLeft.y))!=0},calculateLabelCoords:function(){if(!this._text)return;const e=this._text.getBBox();return{topLeft:{x:e.x,y:e.y},bottomRight:{x:e.x+e.width,y:e.y+e.height}}},_processValue:function(e){return this._context.translator.translate(this._context.translator.adjust(e))},applyValue(){return this._visible?this.setAngle(this._processValue(this.getValue())):this},update(e){let{color:t,value:i}=e;this._color=t,this._value=i},hide(){this._visible=!1},getColor(){return this._color},getValue(){return this._value},beginAnimation:function(){if(!this._visible)return this;const e=this,t=this._processValue(this.getValue());B(e._angle,t)?(e.animate=O,e.setAngle(e._angle)):(e._start=e._angle,e._delta=t-e._angle,e._tracker.attr({visibility:"hidden"}),e._context.textEnabled&&(e._line.attr({visibility:"hidden"}),e._text.attr({visibility:"hidden"})))},animate:function(e){if(!this._visible)return this;const t=this;t._angle=t._start+t._delta*e,L(t._settings,t._context.baseAngle,t._angle),t._bar.attr(t._settings)},endAnimation:function(){const e=this;void 0!==e._delta?B(e._angle,e._start+e._delta)&&(e._tracker.attr({visibility:null}),e.setAngle(e._angle)):delete e.animate,delete e._start,delete e._delta}}),(0,n.default)("dxBarGauge",R),R.addPlugin(c.plugin),R.addPlugin(h.plugins.gauge)},5600:function(e,t,i){t.BaseGauge=void 0,t.compareArrays=function(e,t){return e&&t&&e.length===t.length&&function(e,t){let i;const n=e.length;let o,a;for(i=0;i<n;++i)if(o=e[i]!=e[i],a=t[i]!=t[i],!(o&&a||e[i]===t[i]))return!1;return!0}(e,t)},t.getSampleText=t.formatValue=void 0;var n=i(28779),o=i(52576),a=i(14393),s=_(i(34506)),r=_(i(20056)),l=_(i(72973)),d=_(i(2082)),u=i(74754),c=i(16216),h=i(23277),p=i(92528),g=i(17781);function _(e){return e&&e.__esModule?e:{default:e}}const f=Number,m=o.extend,v=d.default.format,C=t.BaseGauge=s.default.inherit({_rootClassPrefix:"dxg",_themeSection:"gauge",_createThemeManager:function(){return new r.default.ThemeManager(this._getThemeManagerOptions())},_initCore:function(){const e=this,t=e._renderer.root;e._valueChangingLocker=0,e._translator=e._factory.createTranslator(),e._tracker=e._factory.createTracker({renderer:e._renderer,container:t}),e._setTrackerCallbacks()},_beginValueChanging:function(){this._resetIsReady(),this._onBeginUpdate(),++this._valueChangingLocker},_endValueChanging:function(){0==--this._valueChangingLocker&&this._drawn()},_setTrackerCallbacks:function(){const e=this,t=e._renderer,i=e._tooltip;e._tracker.setCallbacks({"tooltip-show":function(e,n,o){const a=e.getTooltipParameters(),s=t.getRootOffset(),r=m({value:a.value,valueText:i.formatValue(a.value),color:a.color},n);return i.show(r,{x:a.x+s.left,y:a.y+s.top,offset:a.offset},{target:n},void 0,o)},"tooltip-hide":function(){return i.hide()}})},_dispose:function(){this._cleanCore(),this.callBase.apply(this,arguments)},_disposeCore:function(){const e=this;e._themeManager.dispose(),e._tracker.dispose(),e._translator=e._tracker=null},_cleanCore:function(){this._tracker.deactivate(),this._cleanContent()},_renderCore:function(){const e=this;e._isValidDomain&&(e._renderContent(),e._renderGraphicObjects(),e._tracker.setTooltipState(e._tooltip.isEnabled()),e._tracker.activate(),e._noAnimation=!1)},_applyChanges:function(){this.callBase.apply(this,arguments),this._resizing=this._noAnimation=!1},_setContentSize:function(){const e=this;e._resizing=e._noAnimation=2===e._changes.count(),e.callBase.apply(e,arguments)},_applySize:function(e){const t=this;t._innerRect={left:e[0],top:e[1],right:e[2],bottom:e[3]};const i=t._layout._cache;return t._cleanCore(),t._renderCore(),t._layout._cache=t._layout._cache||i,[e[0],t._innerRect.top,e[2],t._innerRect.bottom]},_initialChanges:["DOMAIN"],_themeDependentChanges:["DOMAIN"],_optionChangesMap:{subtitle:"MOSTLY_TOTAL",indicator:"MOSTLY_TOTAL",geometry:"MOSTLY_TOTAL",animation:"MOSTLY_TOTAL",startValue:"DOMAIN",endValue:"DOMAIN"},_optionChangesOrder:["DOMAIN","MOSTLY_TOTAL"],_change_DOMAIN:function(){this._setupDomain()},_change_MOSTLY_TOTAL:function(){this._applyMostlyTotalChange()},_updateExtraElements:g.noop,_setupDomain:function(){const e=this;e._setupDomainCore(),e._isValidDomain=isFinite(1/(e._translator.getDomain()[1]-e._translator.getDomain()[0])),e._isValidDomain||e._incidentOccurred("W2301"),e._change(["MOSTLY_TOTAL"])},_applyMostlyTotalChange:function(){const e=this;e._setupCodomain(),e._setupAnimationSettings(),e._setupDefaultFormat(),e._change(["LAYOUT"])},_setupAnimationSettings:function(){const e=this;let t=e.option("animation");e._animationSettings=null,(void 0===t||t)&&(t=m({enabled:!0,duration:1e3,easing:"easeOutCubic"},t),t.enabled&&t.duration>0&&(e._animationSettings={duration:f(t.duration),easing:t.easing})),e._containerBackgroundColor=e.option("containerBackgroundColor")||e._themeManager.theme().containerBackgroundColor},_setupDefaultFormat:function(){const e=this._translator.getDomain();this._defaultFormatOptions=(0,n.getAppropriateFormat)(e[0],e[1],this._getApproximateScreenRange())},_setupDomainCore:null,_calculateSize:null,_cleanContent:null,_renderContent:null,_setupCodomain:null,_getApproximateScreenRange:null,_factory:{createTranslator:function(){return new a.Translator1D},createTracker:function(e){return new l.default(e)}}}),y=function(e,t,i){Object.is(e,-0)&&(e=0);const n=v(e,(t=t||{}).format);let o;return"function"==typeof t.customizeText?(o=m({value:e,valueText:n},i),String(t.customizeText.call(o,o))):n};t.formatValue=y;t.getSampleText=function(e,t){const i=y(e.getDomainStart(),t),n=y(e.getDomainEnd(),t);return i.length>=n.length?i:n},C.addPlugin(u.plugin),C.addPlugin(c.plugin),C.addPlugin(h.plugin),C.addPlugin(p.plugin);const b=C.prototype._setTooltipOptions;C.prototype._setTooltipOptions=function(){b.apply(this,arguments),this._tracker&&this._tracker.setTooltipState(this._tooltip.isEnabled())}},93473:function(e,t,i){t.BaseTextCloudMarker=t.BaseRangeBar=t.BaseIndicator=t.BaseElement=void 0;var n,o=i(17781),a=i(21274),s=i(5600),r=i(28779),l=i(52576),d=(n=i(55620))&&n.__esModule?n:{default:n};const u=isFinite,c=Number,h=Math.round,p=s.formatValue,g=s.getSampleText,_=t.BaseElement=d.default.inherit({ctor:function(e){const t=this;(0,a.each)(e,(function(e,i){t["_"+e]=i})),t._init()},dispose:function(){const e=this;return e._dispose(),(0,a.each)(e,(function(t){e[t]=null})),e},getOffset:function(){return c(this._options.offset)||0}}),f=t.BaseIndicator=_.inherit({_init:function(){const e=this;e._rootElement=e._createRoot().linkOn(e._owner,{name:"value-indicator",after:"core"}),e._trackerElement=e._createTracker()},_dispose:function(){this._rootElement.linkOff()},_setupAnimation:function(){const e=this;e._options.animation&&(e._animation={step:function(t){e._actualValue=e._animation.start+e._animation.delta*t,e._actualPosition=e._translator.translate(e._actualValue),e._move()},duration:e._options.animation.duration>0?c(e._options.animation.duration):0,easing:e._options.animation.easing})},_runAnimation:function(e){const t=this,i=t._animation;i.start=t._actualValue,i.delta=e-t._actualValue,t._rootElement.animate({_:0},{step:i.step,duration:i.duration,easing:i.easing})},_createRoot:function(){return this._renderer.g().attr({class:this._className})},_createTracker:function(){return this._renderer.path([],"area")},_getTrackerSettings:o.noop,clean:function(){const e=this;return e._animation&&e._rootElement.stopAnimation(),e._rootElement.linkRemove().clear(),e._clear(),e._tracker.detach(e._trackerElement),e._options=e.enabled=e._animation=null,e},render:function(e){const t=this;return t.type=e.type,t._options=e,t._actualValue=t._currentValue=t._translator.adjust(t._options.currentValue),t.enabled=t._isEnabled(),t.enabled&&(t._setupAnimation(),t._rootElement.attr({fill:(0,r.extractColor)(t._options.color)}).linkAppend(),t._tracker.attach(t._trackerElement,t,t._trackerInfo)),t},resize:function(e){const t=this;return t._rootElement.clear(),t._clear(),t.visible=t._isVisible(e),t.visible&&((0,l.extend)(t._options,e),t._actualPosition=t._translator.translate(t._actualValue),t._render(),t._trackerElement.attr(t._getTrackerSettings()),t._move()),t},value:function(e,t){const i=this;let n;const o=this._rootElement;let a=null;return void 0===e?i._currentValue:(null===e?(a="hidden",i._currentValue=e):(n=i._translator.adjust(e),i._currentValue!==n&&u(n)&&(i._currentValue=n,i.visible&&(i._animation&&!t?i._runAnimation(n):(i._actualValue=n,i._actualPosition=i._translator.translate(n),i._move())))),o.attr({visibility:a}),i)},_isEnabled:null,_isVisible:null,_render:null,_clear:null,_move:null}),m={};m["right-bottom"]=m.rb=[0,-1,-1,0,0,1,1,0],m["bottom-right"]=m.br=[-1,0,0,-1,1,0,0,1],m["left-bottom"]=m.lb=[0,-1,1,0,0,1,-1,0],m["bottom-left"]=m.bl=[1,0,0,-1,-1,0,0,1],m["left-top"]=m.lt=[0,1,1,0,0,-1,-1,0],m["top-left"]=m.tl=[1,0,0,1,-1,0,0,-1],m["right-top"]=m.rt=[0,1,-1,0,0,-1,1,0],m["top-right"]=m.tr=[-1,0,0,1,1,0,0,-1];t.BaseTextCloudMarker=f.inherit({_move:function(){const e=this,t=e._options,i=e._getTextCloudOptions(),n=p(e._actualValue,t.text);e._text.attr({text:n});const o=e._text.getBBox(),a=i.x,s=i.y,r=(o.width||n.length*e._textUnitWidth)+2*t.horizontalOffset,l=(o.height||e._textHeight)+2*t.verticalOffset,d=function(e){let t=e.x,i=e.y;const n=m[e.type],o=e.cloudWidth,a=e.cloudHeight;let s,r;const l=t,d=i;return s=r=e.tailLength,1&n[0]?r=Math.min(r,a/3):s=Math.min(s,o/3),{cx:h(l+n[0]*s+(n[0]+n[2])*o/2),cy:h(d+n[1]*r+(n[1]+n[3])*a/2),points:[h(t),h(i),h(t+=n[0]*(o+s)),h(i+=n[1]*(a+r)),h(t+=n[2]*o),h(i+=n[3]*a),h(t+=n[4]*o),h(i+=n[5]*a),h(t+=n[6]*(o-s)),h(i+=n[7]*(a-r))]}}({x:a,y:s,cloudWidth:r,cloudHeight:l,tailLength:t.arrowLength,type:e._correctCloudType(i.type,{x:a,y:s},{width:r,height:l})});e._text.attr({x:d.cx,y:d.cy+e._textVerticalOffset}),e._cloud.attr({points:d.points}),e._trackerElement&&e._trackerElement.attr({points:d.points})},_measureText:function(){const e=this;let t,i,n,o;e._textVerticalOffset||(t=e._createRoot().append(e._owner),o=g(e._translator,e._options.text),i=e._renderer.text(o,0,0).attr({align:"center"}).css((0,r.patchFontOptions)(e._options.text.font)).append(t),n=i.getBBox(),t.remove(),e._textVerticalOffset=-n.y-n.height/2,e._textWidth=n.width,e._textHeight=n.height,e._textUnitWidth=e._textWidth/o.length,e._textFullWidth=e._textWidth+2*e._options.horizontalOffset,e._textFullHeight=e._textHeight+2*e._options.verticalOffset)},_render:function(){const e=this;e._measureText(),e._cloud=e._cloud||e._renderer.path([],"area").append(e._rootElement),e._text=e._text||e._renderer.text().append(e._rootElement),e._text.attr({align:"center"}).css((0,r.patchFontOptions)(e._options.text.font))},_clear:function(){delete this._cloud,delete this._text},getTooltipParameters:function(){const e=this._getTextCloudOptions();return{x:e.x,y:e.y,value:this._currentValue,color:this._options.color}},_correctCloudType:e=>e}),t.BaseRangeBar=f.inherit({_measureText:function(){const e=this;let t,i,n;e._hasText=e._isTextVisible(),e._hasText&&!e._textVerticalOffset&&(t=e._createRoot().append(e._owner),i=e._renderer.text(g(e._translator,e._options.text),0,0).attr({class:"dxg-text",align:"center"}).css((0,r.patchFontOptions)(e._options.text.font)).append(t),n=i.getBBox(),t.remove(),e._textVerticalOffset=-n.y-n.height/2,e._textWidth=n.width,e._textHeight=n.height)},_move:function(){const e=this;e._updateBarItemsPositions(),e._hasText&&(e._text.attr({text:p(e._actualValue,e._options.text)}),e._updateTextPosition(),e._updateLinePosition())},_updateBarItems:function(){const e=this,t=e._options;let i;const n=e._translator;e._setBarSides(),e._startPosition=n.translate(n.getDomainStart()),e._endPosition=n.translate(n.getDomainEnd()),e._basePosition=n.translate(t.baseValue),e._space=e._getSpace();const o=t.backgroundColor||"none";"none"!==o&&e._space>0?i=t.containerBackgroundColor||"none":(e._space=0,i="none"),e._backItem1.attr({fill:o}),e._backItem2.attr({fill:o}),e._spaceItem1.attr({fill:i}),e._spaceItem2.attr({fill:i})},_getSpace:function(){return 0},_updateTextItems:function(){const e=this;e._hasText?(e._line=e._line||e._renderer.path([],"line").attr({class:"dxg-main-bar","stroke-linecap":"square"}).append(e._rootElement),e._text=e._text||e._renderer.text("",0,0).attr({class:"dxg-text"}).append(e._rootElement),e._text.attr({align:e._getTextAlign()}).css(e._getFontOptions()),e._setTextItemsSides()):(e._line&&(e._line.remove(),delete e._line),e._text&&(e._text.remove(),delete e._text))},_isTextVisible:function(){return!1},_getTextAlign:function(){return"center"},_getFontOptions:function(){const e=this._options;let t=e.text.font;return t&&t.color||(t=(0,l.extend)({},t,{color:e.color})),(0,r.patchFontOptions)(t)},_updateBarItemsPositions:function(){const e=this,t=e._getPositions();e._backItem1.attr(e._buildItemSettings(t.start,t.back1)),e._backItem2.attr(e._buildItemSettings(t.back2,t.end)),e._spaceItem1.attr(e._buildItemSettings(t.back1,t.main1)),e._spaceItem2.attr(e._buildItemSettings(t.main2,t.back2)),e._mainItem.attr(e._buildItemSettings(t.main1,t.main2)),e._trackerElement&&e._trackerElement.attr(e._buildItemSettings(t.main1,t.main2))},_render:function(){const e=this;e._measureText(),e._backItem1||(e._backItem1=e._createBarItem(),e._backItem1.attr({class:"dxg-back-bar"})),e._backItem2||(e._backItem2=e._createBarItem(),e._backItem2.attr({class:"dxg-back-bar"})),e._spaceItem1||(e._spaceItem1=e._createBarItem(),e._spaceItem1.attr({class:"dxg-space-bar"})),e._spaceItem2||(e._spaceItem2=e._createBarItem(),e._spaceItem2.attr({class:"dxg-space-bar"})),e._mainItem||(e._mainItem=e._createBarItem(),e._mainItem.attr({class:"dxg-main-bar"})),e._updateBarItems(),e._updateTextItems()},_clear:function(){const e=this;delete e._backItem1,delete e._backItem2,delete e._spaceItem1,delete e._spaceItem2,delete e._mainItem,delete e._hasText,delete e._line,delete e._text},getTooltipParameters:function(){const e=this._getTooltipPosition();return{x:e.x,y:e.y,value:this._currentValue,color:this._options.color,offset:0}}})},24286:function(e,t,i){t.default=void 0;var n=i(21274),o=i(93473),a=i(11528),s=i(28779);const r=Number,l=Array.isArray,d=isFinite,u=o.BaseElement.inherit({_init:function(){this._root=this._renderer.g().attr({class:"dxg-range-container"}).linkOn(this._container,"range-container")},_dispose:function(){this._root.linkOff()},clean:function(){return this._root.linkRemove().clear(),this._options=this.enabled=null,this},_getRanges:function(){const e=this,t=e._options,i=e._translator,o=i.getDomain()[0],u=i.getDomain()[1],p=u-o,f=p>=0?g:_,m=p>=0?c:h;let v=[],C=[],y=[{start:o,end:u}];const b=(0,s.extractColor)(t.backgroundColor)||"none",x=t.width||{},w=r(x>0?x:x.start),S=r(x>0?x:x.end),D=S-w;if(void 0!==t.ranges&&!l(t.ranges))return null;if(!(w>=0&&S>=0&&w+S>0))return null;v=(l(t.ranges)?t.ranges:[]).reduce(((e,t,n)=>{t=t||{};const o=i.adjust(t.startValue),a=i.adjust(t.endValue);return d(o)&&d(a)&&f(o,a,t)&&e.push({start:o,end:a,color:(0,s.extractColor)(t.color),classIndex:n}),e}),[]);const I=e._themeManager.createPalette(t.palette,{type:"indicatingSet",extensionMode:t.paletteExtensionMode,keepLastColorInEnd:!0,count:v.length});return(0,n.each)(v,(function(e,t){const i=I.getNextColor();t.color=(0,a.isString)(t.color)&&t.color||i||"none",t.className="dxg-range dxg-range-"+t.classIndex,delete t.classIndex})),(0,n.each)(v,(function(e,t){let i,n,o,a,s;const r=[],l=[];for(i=0,n=C.length;i<n;++i)s=C[i],a=m(s.start,s.end,t.start,t.end),(o=a[0])&&(o.color=s.color)&&(o.className=s.className)&&r.push(o),(o=a[1])&&(o.color=s.color)&&(o.className=s.className)&&r.push(o);for(r.push(t),C=r,i=0,n=y.length;i<n;++i)s=y[i],a=m(s.start,s.end,t.start,t.end),(o=a[0])&&l.push(o),(o=a[1])&&l.push(o);y=l})),(0,n.each)(y,(function(e,t){t.color=b,t.className="dxg-range dxg-background-range",C.push(t)})),(0,n.each)(C,(function(e,t){t.startWidth=(t.start-o)/p*D+w,t.endWidth=(t.end-o)/p*D+w})),C},render:function(e){const t=this;return t._options=e,t._processOptions(),t._ranges=t._getRanges(),t._ranges&&(t.enabled=!0,t._root.linkAppend()),t},resize:function(e){const t=this;return t._root.clear(),t._isVisible(e)&&(0,n.each)(t._ranges,(function(i,n){t._createRange(n,e).attr({fill:n.color,class:n.className}).append(t._root)})),t},_processOptions:null,_isVisible:null,_createRange:null,getColorForValue:function(e){let t=null;return(0,n.each)(this._ranges,(function(i,n){if(n.start<=e&&e<=n.end||n.start>=e&&e>=n.end)return t=n.color,!1})),t}});function c(e,t,i,n){let o;return i>e&&n<t?o=[{start:e,end:i},{start:n,end:t}]:i>=t||n<=e?o=[{start:e,end:t}]:i<=e&&n>=t?o=[]:i>e?o=[{start:e,end:i}]:n<t&&(o=[{start:n,end:t}]),o}function h(e,t,i,n){let o;return i<e&&n>t?o=[{start:e,end:i},{start:n,end:t}]:i<=t||n>=e?o=[{start:e,end:t}]:i>=e&&n<=t?o=[]:i<e?o=[{start:e,end:i}]:n>t&&(o=[{start:n,end:t}]),o}function p(e,t,i){let{startValue:n,endValue:o}=i;return o===n&&n===e&&t===e}function g(e,t,i){return t-e>0||p(e,t,i)}function _(e,t,i){return e-t>0||p(e,t,i)}t.default=u;e.exports=t.default,e.exports.default=t.default},59248:function(e,t,i){t.default=void 0;var n=g(i(92848)),o=i(22263),a=i(52576),s=i(21274),r=i(5600),l=i(73488),d=i(28779),u=i(94618),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=p(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(26737)),h=g(i(1678));function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(p=function(e){return e?i:t})(e)}function g(e){return e&&e.__esModule?e:{default:e}}const _=isFinite,f=d.normalizeAngle,m=d.getCosAndSin,v=Math.abs,C=Math.max,y=Math.min,b=Math.round,x=s.each,w=Math.PI;const S=l.dxGauge.inherit({_rootClass:"dxg-circular-gauge",_factoryMethods:{rangeContainer:"createCircularRangeContainer",indicator:"createCircularIndicator"},_gridSpacingFactor:17,_scaleTypes:{type:"polarAxes",drawingType:"circular"},_getThemeManagerOptions(){const e=this.callBase.apply(this,arguments);return e.subTheme="_circular",e},_updateScaleTickIndent:function(e){const t=e.label.indentFromTick,i=e.tick.visible?e.tick.length:0,n=this._scale.measureLabels((0,a.extend)({},this._canvas)),o=e.orientation,s=i;let r=t;if(t>=0)"outside"===o?r+=s:"center"===o&&(r+=s/2);else{r-=C(n.width,n.height),"inside"===o?r-=s:"center"===o&&(r-=s/2)}e.label.indentFromAxis=r,this._scale.updateOptions(e)},_setupCodomain:function(){const e=this,t=e.option("geometry")||{};let i,n=t.startAngle,o=t.endAngle;n=_(n)?f(n):225,o=_(o)?f(o):-45,v(n-o)<1?(o-=360,i={left:-1,up:-1,right:1,down:1}):(n<o&&(o-=360),i=function(e,t){const i=m(e),n=m(t),o=i.cos,a=i.sin,s=n.cos,r=n.sin;return{left:a<=0&&r>=0||a<=0&&r<=0&&o<=s||a>=0&&r>=0&&o>=s?-1:y(o,s,0),right:a>=0&&r<=0||a>=0&&r>=0&&o>=s||a<=0&&r<=0&&o<=s?1:C(o,s,0),up:o<=0&&s>=0||o<=0&&s<=0&&a>=r||o>=0&&s>=0&&a<=r?-1:-C(a,r,0),down:o>=0&&s<=0||o>=0&&s>=0&&a<=r||o<=0&&s<=0&&a>=r?1:-y(a,r,0)}}(n,o)),e._area={x:0,y:0,radius:100,startCoord:n,endCoord:o,sides:i},e._translator.setCodomain(n,o)},_getCenter:function(){return this._getElementLayout()},_shiftScale:function(e){const t=this._scale,i=t.getCanvas();i.width=i.height=2*e.radius,t.draw(i);const n=t.getCenter();t.shift({right:e.x-n.x,bottom:e.y-n.y})},_getScaleLayoutValue:function(){return this._area.radius},_getTicksOrientation:function(e){return e.orientation},_getTicksCoefficients:function(e){const t={inner:0,outer:1};return"inside"===e.orientation?(t.inner=1,t.outer=0):"center"===e.orientation&&(t.inner=t.outer=.5),t},_correctScaleIndents:function(e,t,i){t>=0?(e.horizontalOffset=t+i.width,e.verticalOffset=t+i.height):(e.horizontalOffset=e.verticalOffset=0,e.min-=-t+C(i.width,i.height)),e.inverseHorizontalOffset=i.width/2,e.inverseVerticalOffset=i.height/2},_measureMainElements:function(e,t){const i=this._area.radius;let n=0,o=1/0,a=0,s=0,r=0,l=0;const d=this._scale;return x(e.concat(d),(function(e,d){const u=d.measure?d.measure({radius:i-d.getOffset()}):t;u.min>0&&(o=y(o,u.min)),u.max>0&&(n=C(n,u.max)),u.horizontalOffset>0&&(a=C(a,u.max+u.horizontalOffset)),u.verticalOffset>0&&(s=C(s,u.max+u.verticalOffset)),u.inverseHorizontalOffset>0&&(r=C(r,u.inverseHorizontalOffset)),u.inverseVerticalOffset>0&&(l=C(l,u.inverseVerticalOffset))})),a=C(a-n,0),s=C(s-n,0),{minRadius:o,maxRadius:n,horizontalMargin:a,verticalMargin:s,inverseHorizontalMargin:r,inverseVerticalMargin:l}},_applyMainLayout:function(e,t){const i=this._measureMainElements(e,t),n=this._area,o=n.sides,s={left:(o.left<-.1?i.horizontalMargin:i.inverseHorizontalMargin)||0,right:(o.right>.1?i.horizontalMargin:i.inverseHorizontalMargin)||0,top:(o.up<-.1?i.verticalMargin:i.inverseVerticalMargin)||0,bottom:(o.down>.1?i.verticalMargin:i.inverseVerticalMargin)||0},r=function(e,t,i){const n=(0,a.extend)({},e);let o,s=0,r=0;i=i||{},t>0&&(n.left+=i.left||0,n.right-=i.right||0,n.top+=i.top||0,n.bottom-=i.bottom||0,D(n)>0&&I(n)>0?(o=I(n)/D(n),o>1?t<o?s=D(n):r=I(n):t>o?r=I(n):s=D(n),s>0||(s=r/t),r>0||(r=s*t),s=(D(n)-s)/2,r=(I(n)-r)/2,n.left+=s,n.right-=s,n.top+=r,n.bottom-=r):(n.left=n.right=(n.left+n.right)/2,n.top=n.bottom=(n.top+n.bottom)/2));return n}(this._innerRect,(o.down-o.up)/(o.right-o.left),s);let l=y(D(r)/(o.right-o.left),I(r)/(o.down-o.up));l=l-i.maxRadius+n.radius;const d=r.left-D(r)*o.left/(o.right-o.left),u=r.top-I(r)*o.up/(o.down-o.up);n.x=b(d),n.y=b(u),n.radius=l,r.left-=s.left,r.right+=s.right,r.top-=s.top,r.bottom+=s.bottom,this._innerRect=r},_getElementLayout:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{x:this._area.x,y:this._area.y,radius:b(this._area.radius-e)}},_getApproximateScreenRange:function(){const e=this,t=e._area;let i=y(e._canvas.width/(t.sides.right-t.sides.left),e._canvas.height/(t.sides.down-t.sides.up));return i>t.totalRadius&&(i=t.totalRadius),i*=.8,-e._translator.getCodomainRange()*i*w/180},_getDefaultSize:function(){return{width:300,height:300}},_factory:(0,o.clone)(r.BaseGauge.prototype._factory)});function D(e){return e.right-e.left}function I(e){return e.bottom-e.top}const E=S.prototype._factory.indicators={};S.prototype._factory.createIndicator=(0,l.createIndicatorCreator)(E),E._default=c._default,E.rectangleneedle=c.rectangleneedle,E.triangleneedle=c.triangleneedle,E.twocolorneedle=c.twocolorneedle,E.trianglemarker=c.trianglemarker,E.textcloud=c.textcloud,E.rangebar=c.rangebar,S.prototype._factory.RangeContainer=h.default,(0,n.default)("dxCircularGauge",S),S.addPlugin(u.plugins.gauge);t.default=S;e.exports=t.default,e.exports.default=t.default},26737:function(e,t,i){t.twocolorneedle=t.triangleneedle=t.trianglemarker=t.textcloud=t.rectangleneedle=t.rangebar=t._default=void 0;var n=i(93473),o=i(28779);const a=Number,s=o.getCosAndSin,r=o.convertAngleToRendererSpace;function l(e,t){return e&&e.radius-t<=0&&(e.radius=t+1),e}const d=n.BaseIndicator.inherit({_move:function(){const e=this,t=e._options,i=r(e._actualPosition);e._rootElement.rotate(i,t.x,t.y),e._trackerElement&&e._trackerElement.rotate(i,t.x,t.y)},_isEnabled:function(){return this._options.width>0},_isVisible:function(e){return e.radius-a(this._options.indentFromCenter)>0},_getTrackerSettings:function(){const e=this._options,t=this._getRadius(),i=this._getIndentFromCenter(),n=e.x,o=e.y-(t+i)/2;let a=e.width/2,s=(t-i)/2;return a>10||(a=10),s>10||(s=10),{points:[n-a,o-s,n-a,o+s,n+a,o+s,n+a,o-s]}},_render:function(){this._renderPointer()},_clearPointer:function(){delete this._element},_clear:function(){this._clearPointer()},_getIndentFromCenter:function(e){return Number(this._options.indentFromCenter)||0},_getRadius:function(){return 0},measure:function(e){const t={max:e.radius};return this._options.indentFromCenter<0&&(t.inverseHorizontalOffset=t.inverseVerticalOffset=-a(this._options.indentFromCenter)),t},getTooltipParameters:function(){const e=this._options,t=s(this._actualPosition),i=(this._getRadius()+this._getIndentFromCenter())/2;return{x:e.x+t.cos*i,y:e.y-t.sin*i,value:this._currentValue,color:e.color,offset:e.width/2}}}),u=d.inherit({_isVisible:function(e){const t=this._adjustOffset(Number(this._options.indentFromCenter),e.radius),i=this._adjustOffset(Number(this._options.offset),e.radius);return e.radius-t-i>0},getOffset:function(){return 0},_adjustOffset:function(e,t){const i=t/Number(this._options.beginAdaptingAtRadius);return i<1&&(e=Math.floor(e*i)),e||0},_getIndentFromCenter:function(e){return this._adjustOffset(Number(this._options.indentFromCenter),this._options.radius)},_getRadius:function(){const e=this._options;return e.radius-this._adjustOffset(Number(e.offset),e.radius)},_renderSpindle:function(){const e=this,t=e._options,i=t.radius,n=2*this._adjustOffset(a(t.spindleSize)/2,i);let o=2*this._adjustOffset(a(t.spindleGapSize)/2,i)||0;o>0&&(o=o<=n?o:n),n>0&&(e._spindleOuter=e._spindleOuter||e._renderer.circle().append(e._rootElement),e._spindleInner=e._spindleInner||e._renderer.circle().append(e._rootElement),e._spindleOuter.attr({class:"dxg-spindle-border",cx:t.x,cy:t.y,r:n/2}),e._spindleInner.attr({class:"dxg-spindle-hole",cx:t.x,cy:t.y,r:o/2,fill:t.containerBackgroundColor}))},_render:function(){this.callBase(),this._renderSpindle()},_clear:function(){this.callBase(),delete this._spindleOuter,delete this._spindleInner}});t.rectangleneedle=t._default=u.inherit({_renderPointer:function(){const e=this,t=e._options,i=t.y-this._getRadius(),n=t.y-this._getIndentFromCenter(),o=t.x-t.width/2,s=o+a(t.width);e._element=e._element||e._renderer.path([],"area").append(e._rootElement),e._element.attr({points:[o,n,o,i,s,i,s,n]})}}),t.triangleneedle=u.inherit({_renderPointer:function(){const e=this,t=e._options,i=t.y-this._getRadius(),n=t.y-this._getIndentFromCenter(),o=t.x-t.width/2,a=t.x+t.width/2;e._element=e._element||e._renderer.path([],"area").append(e._rootElement),e._element.attr({points:[o,n,t.x,i,a,n]})}}),t.twocolorneedle=u.inherit({_renderPointer:function(){const e=this,t=e._options,i=t.x-t.width/2,n=t.x+t.width/2,o=t.y-this._getRadius(),s=t.y-this._getIndentFromCenter(),r=a(t.secondFraction)||0;let l,d;r>=1?l=d=s:r<=0?l=d=o:(d=o+(s-o)*r,l=d+a(t.space)),e._firstElement=e._firstElement||e._renderer.path([],"area").append(e._rootElement),e._spaceElement=e._spaceElement||e._renderer.path([],"area").append(e._rootElement),e._secondElement=e._secondElement||e._renderer.path([],"area").append(e._rootElement),e._firstElement.attr({points:[i,s,i,l,n,l,n,s]}),e._spaceElement.attr({points:[i,l,i,d,n,d,n,l],class:"dxg-hole",fill:t.containerBackgroundColor}),e._secondElement.attr({points:[i,d,i,o,n,o,n,d],class:"dxg-part",fill:t.secondColor})},_clearPointer:function(){delete this._firstElement,delete this._secondElement,delete this._spaceElement}}),t.trianglemarker=d.inherit({_isEnabled:function(){return this._options.length>0&&this._options.width>0},_isVisible:e=>!0,resize(e){return this.callBase(l(e,0))},_render:function(){const e=this,t=e._options,i=t.x,n=t.y-t.radius,o=t.width/2||0,s=n-a(t.length);e._element=e._element||e._renderer.path([],"area").append(e._rootElement);const r={points:[i,n,i-o,s,i+o,s],stroke:"none","stroke-width":0,"stroke-linecap":"square"};t.space>0&&(r["stroke-width"]=Math.min(t.space,t.width/4)||0,r.stroke=r["stroke-width"]>0&&t.containerBackgroundColor||"none"),e._element.attr(r).sharp()},_clear:function(){delete this._element},_getTrackerSettings:function(){const e=this._options,t=e.x,i=e.y-e.radius-e.length/2;let n=e.width/2,o=e.length/2;return n>10||(n=10),o>10||(o=10),{points:[t-n,i-o,t-n,i+o,t+n,i+o,t+n,i-o]}},measure:function(e){return{min:e.radius,max:e.radius+a(this._options.length)}},getTooltipParameters:function(){const e=this._options,t=s(this._actualPosition),i=e.radius+e.length/2,n=this.callBase();return n.x=e.x+t.cos*i,n.y=e.y-t.sin*i,n.offset=e.length/2,n}}),t.textcloud=n.BaseTextCloudMarker.inherit({_isEnabled:function(){return!0},_isVisible:e=>!0,resize(e){return this.callBase(l(e,0))},_getTextCloudOptions:function(){const e=this,t=s(e._actualPosition),i=(0,o.normalizeAngle)(e._actualPosition);return{x:e._options.x+t.cos*e._options.radius,y:e._options.y-t.sin*e._options.radius,type:i>270?"left-top":i>180?"top-right":i>90?"right-bottom":"bottom-left"}},measure:function(e){const t=this,i=a(t._options.arrowLength)||0;t._measureText();const n=t._textFullHeight+i,o=t._textFullWidth+i;return{min:e.radius,max:e.radius,horizontalOffset:o,verticalOffset:n,inverseHorizontalOffset:o,inverseVerticalOffset:n}}}),t.rangebar=n.BaseRangeBar.inherit({_isEnabled:function(){return this._options.size>0},_isVisible:e=>!0,resize(e){return this.callBase(l(e,a(this._options.size)))},_createBarItem:function(){return this._renderer.arc().attr({"stroke-linejoin":"round"}).append(this._rootElement)},_createTracker:function(){return this._renderer.arc().attr({"stroke-linejoin":"round"})},_setBarSides:function(){const e=this;e._maxSide=e._options.radius,e._minSide=e._maxSide-a(e._options.size)},_getSpace:function(){const e=this._options;return e.space>0?180*e.space/e.radius/Math.PI:0},_isTextVisible:function(){return(this._options.text||{}).indent>0},_setTextItemsSides:function(){const e=this,t=e._options,i=a(t.text.indent);e._lineFrom=t.y-t.radius,e._lineTo=e._lineFrom-i,e._textRadius=t.radius+i},_getPositions:function(){const e=this,t=e._basePosition,i=e._actualPosition;let n,o;return t>=i?(n=t,o=i):(n=i,o=t),{start:e._startPosition,end:e._endPosition,main1:n,main2:o,back1:Math.min(n+e._space,e._startPosition),back2:Math.max(o-e._space,e._endPosition)}},_buildItemSettings:function(e,t){const i=this;return{x:i._options.x,y:i._options.y,innerRadius:i._minSide,outerRadius:i._maxSide,startAngle:t,endAngle:e}},_updateTextPosition:function(){const e=this,t=s(e._actualPosition);let i=e._options.x+e._textRadius*t.cos,n=e._options.y-e._textRadius*t.sin;i+=t.cos*e._textWidth*.6,n-=t.sin*e._textHeight*.6,e._text.attr({x:i,y:n+e._textVerticalOffset})},_updateLinePosition:function(){const e=this,t=e._options.x;let i,n;e._basePosition>e._actualPosition?(i=t-2,n=t):e._basePosition<e._actualPosition?(i=t,n=t+2):(i=t-1,n=t+1),e._line.attr({points:[i,e._lineFrom,i,e._lineTo,n,e._lineTo,n,e._lineFrom]}).rotate(r(e._actualPosition),t,e._options.y).sharp()},_getTooltipPosition:function(){const e=this,t=s((e._basePosition+e._actualPosition)/2),i=(e._minSide+e._maxSide)/2;return{x:e._options.x+t.cos*i,y:e._options.y-t.sin*i}},measure:function(e){const t=this,i={min:e.radius-a(t._options.size),max:e.radius};return t._measureText(),t._hasText&&(i.max+=a(t._options.text.indent),i.horizontalOffset=t._textWidth,i.verticalOffset=t._textHeight),i}})},1678:function(e,t,i){t.default=void 0;var n,o=(n=i(24286))&&n.__esModule?n:{default:n},a=i(28779);const s=Number,r=Math.max,l=o.default.inherit({_processOptions:function(){const e=this;switch(e._inner=e._outer=0,(0,a.normalizeEnum)(e._options.orientation)){case"inside":e._inner=1;break;case"center":e._inner=e._outer=.5;break;default:e._outer=1}},_isVisible:function(e){let t=this._options.width;return t=s(t)||r(s(t.start),s(t.end)),e.radius-this._inner*t>0},_createRange:function(e,t){const i=this,n=(e.startWidth+e.endWidth)/2;return i._renderer.arc(t.x,t.y,t.radius-i._inner*n,t.radius+i._outer*n,i._translator.translate(e.end),i._translator.translate(e.start)).attr({"stroke-linejoin":"round"})},measure:function(e){let t=this._options.width;return t=s(t)||r(s(t.start),s(t.end)),{min:e.radius-this._inner*t,max:e.radius+this._outer*t}}});t.default=l;e.exports=t.default,e.exports.default=t.default},73488:function(e,t,i){t.createIndicatorCreator=function(e){return function(t,i,n){const o=e[(0,r.normalizeEnum)(i)]||!n&&e._default;return o?new o(t):null}},t.dxGauge=void 0;var n=i(5600),o=i(11528),a=i(52576),s=i(99091),r=i(28779),l=i(17781);const d=Array.isArray,u=isFinite,c=Number,h=Math.min,p=Math.max,g=a.extend,_="value",f="subvalues",m=[1,2,5];function v(e,t){return null===e?e:u(e)?c(e):t}function C(e){return d(e)?e:(0,o.isNumeric)(e)?[e]:null}t.dxGauge=n.BaseGauge.inherit({_initCore:function(){const e=this,t=e._renderer;var i;e._setupValue(e.option(_)),e.__subvalues=C(e.option(f)),e._setupSubvalues(e.__subvalues),void 0===(i=e).option(_)&&void 0===i.option(f)&&void 0!==i.option("valueIndicators")&&(function(e){e.value=e.subvalues=l.noop,e._setupValue=e._setupSubvalues=e._updateValueIndicator=e._updateSubvalueIndicators=null}(i),function(e){e._indicatorValues=[],b(e,"_indicatorValues",e.option("valueIndicators")),e._valueIndicators=[];const t=e._applyMostlyTotalChange;e._applyMostlyTotalChange=function(){b(this,"_indicatorValues",this.option("valueIndicators")),t.call(this)},e._updateActiveElements=x,e._prepareValueIndicators=w,e._disposeValueIndicators=S,e._cleanValueIndicators=D,e.indicatorValue=I}(i)),e.callBase.apply(e,arguments),e._rangeContainer=new e._factory.RangeContainer({renderer:t,container:t.root,translator:e._translator,themeManager:e._themeManager}),e._initScale(),e._subvalueIndicatorContainer=e._renderer.g().attr({class:"dxg-subvalue-indicators"}).linkOn(e._renderer.root,"valueIndicator").enableLinks()},_fontFields:["scale.label.font","valueIndicators.rangebar.text.font","valueIndicators.textcloud.text.font","indicator.text.font"],_initScale:function(){const e=this;e._scaleGroup=e._renderer.g().attr({class:"dxg-scale"}).linkOn(e._renderer.root,"scale"),e._labelsAxesGroup=e._renderer.g().attr({class:"dxg-scale-elements"}).linkOn(e._renderer.root,"scale-elements"),e._scale=new s.Axis({incidentOccurred:e._incidentOccurred,renderer:e._renderer,axesContainerGroup:e._scaleGroup,labelsAxesGroup:e._labelsAxesGroup,axisType:e._scaleTypes.type,drawingType:e._scaleTypes.drawingType,widgetClass:"dxg",getTemplate(){}})},_disposeCore:function(){const e=this;e.callBase.apply(e,arguments),e._scale.dispose(),e._scaleGroup.linkOff(),e._labelsAxesGroup.linkOff(),e._rangeContainer.dispose(),e._disposeValueIndicators(),e._subvalueIndicatorContainer.linkOff(),e._scale=e._scaleGroup=e._labelsAxesGroup=e._rangeContainer=null},_disposeValueIndicators:function(){const e=this;e._valueIndicator&&e._valueIndicator.dispose(),e._subvalueIndicatorsSet&&e._subvalueIndicatorsSet.dispose(),e._valueIndicator=e._subvalueIndicatorsSet=null},_setupDomainCore:function(){const e=this,t=e.option("scale")||{};let i=e.option("startValue"),n=e.option("endValue");i=(0,o.isNumeric)(i)?c(i):(0,o.isNumeric)(t.startValue)?c(t.startValue):0,n=(0,o.isNumeric)(n)?c(n):(0,o.isNumeric)(t.endValue)?c(t.endValue):100,e._baseValue=i<n?i:n,e._translator.setDomain(i,n)},_cleanContent:function(){this._rangeContainer.clean(),this._cleanValueIndicators()},_measureScale:function(e){const t=this,i=e.tick,n=i.visible&&i.length>0&&i.width>0,o=e.minorTick,s=o.visible&&o.length>0&&o.width>0,r=e.label,l=Number(r.indentFromTick);if(!n&&!s&&!r.visible)return{};const d=t._scale.measureLabels((0,a.extend)({},t._canvas)),u=t._getScaleLayoutValue(),c={min:u,max:u},g=t._getTicksCoefficients(e),_=g.inner,f=g.outer;return n&&(c.min=h(c.min,u-_*i.length),c.max=p(c.max,u+f*i.length)),s&&(c.min=h(c.min,u-_*o.length),c.max=p(c.max,u+f*o.length)),r.visible&&t._correctScaleIndents(c,l,d),c},_renderContent:function(){const e=this,t=e._prepareScaleSettings();e._rangeContainer.render(g(e._getOption("rangeContainer"),{vertical:e._area.vertical})),e._renderScale(t),e._subvalueIndicatorContainer.linkAppend();const i=(0,r.map)([e._rangeContainer].concat(e._prepareValueIndicators()),(function(e){return e&&e.enabled?e:null}));e._applyMainLayout(i,e._measureScale(t)),i.forEach((t=>t.resize(e._getElementLayout(t.getOffset())))),e._shiftScale(e._getElementLayout(0),t),e._beginValueChanging(),e._updateActiveElements(),e._endValueChanging()},_prepareScaleSettings:function(){const e=this,t=e.option("scale"),i=(0,a.extend)(!0,{},e._themeManager.theme("scale"),t);return i.label.indentFromAxis=0,i.isHorizontal=!e._area.vertical,i.forceUserTickInterval|=(0,o.isDefined)(t)&&(0,o.isDefined)(t.tickInterval)&&!(0,o.isDefined)(t.scaleDivisionFactor),i.axisDivisionFactor=i.scaleDivisionFactor||e._gridSpacingFactor,i.minorAxisDivisionFactor=i.minorScaleDivisionFactor||5,i.numberMultipliers=m,i.tickOrientation=e._getTicksOrientation(i),i.label.useRangeColors&&(i.label.customizeColor=function(){return e._rangeContainer.getColorForValue(this.value)}),i},_renderScale:function(e){const t=this,i=t._translator.getDomain(),n=i[0],o=i[1],s=t._translator.getCodomain(),r=!!(n>o^e.inverted),l=h(n,o),d=p(n,o);e.min=l,e.max=d,e.startAngle=90-s[0],e.endAngle=90-s[1],e.skipViewportExtending=!0,e.inverted=r,t._scale.updateOptions(e),t._scale.setBusinessRange({axisType:"continuous",dataType:"numeric",min:l,max:d,invert:r}),t._updateScaleTickIndent(e),t._scaleGroup.linkAppend(),t._labelsAxesGroup.linkAppend(),t._scale.draw((0,a.extend)({},t._canvas))},_updateIndicatorSettings:function(e){const t=this;e.currentValue=e.baseValue=u(t._translator.translate(e.baseValue))?c(e.baseValue):t._baseValue,e.vertical=t._area.vertical,e.text&&!e.text.format&&(e.text.format=t._defaultFormatOptions)},_prepareIndicatorSettings:function(e,t){const i=this,n=i._themeManager.theme("valueIndicators"),o=(0,r.normalizeEnum)(e.type||i._themeManager.theme(t)),a=g(!0,{},n._default,n[o],e);return a.type=o,a.animation=i._animationSettings,a.containerBackgroundColor=i._containerBackgroundColor,i._updateIndicatorSettings(a),a},_cleanValueIndicators:function(){this._valueIndicator&&this._valueIndicator.clean(),this._subvalueIndicatorsSet&&this._subvalueIndicatorsSet.clean()},_prepareValueIndicators:function(){const e=this;return e._prepareValueIndicator(),null!==e.__subvalues&&e._prepareSubvalueIndicators(),[e._valueIndicator,e._subvalueIndicatorsSet]},_updateActiveElements:function(){this._updateValueIndicator(),this._updateSubvalueIndicators()},_prepareValueIndicator:function(){const e=this;let t=e._valueIndicator;const i=e._prepareIndicatorSettings(e.option("valueIndicator")||{},"valueIndicatorType");t&&t.type!==i.type&&(t.dispose(),t=null),t||(t=e._valueIndicator=e._createIndicator(i.type,e._renderer.root,"dxg-value-indicator","value-indicator")),t.render(i)},_createSubvalueIndicatorsSet:function(){const e=this,t=e._subvalueIndicatorContainer;return new E({createIndicator:function(i,n){return e._createIndicator(i,t,"dxg-subvalue-indicator","subvalue-indicator",n)},createPalette:function(t){return e._themeManager.createPalette(t)}})},_prepareSubvalueIndicators:function(){const e=this;let t=e._subvalueIndicatorsSet;const i=e._prepareIndicatorSettings(e.option("subvalueIndicator")||{},"subvalueIndicatorType");t||(t=e._subvalueIndicatorsSet=e._createSubvalueIndicatorsSet());const n=i.type!==t.type;t.type=i.type;const o=e._createIndicator(i.type,e._renderer.root);o&&(o.dispose(),t.render(i,n))},_setupValue:function(e){this.__value=v(e,this.__value)},_setupSubvalues:function(e){const t=void 0===e?this.__subvalues:C(e);let i,n,o;if(null!==t){for(i=0,n=t.length,o=[];i<n;++i)o.push(v(t[i],this.__subvalues[i]));this.__subvalues=o}},_updateValueIndicator:function(){const e=this;e._valueIndicator&&e._valueIndicator.value(e.__value,e._noAnimation)},_updateSubvalueIndicators:function(){const e=this;e._subvalueIndicatorsSet&&e._subvalueIndicatorsSet.values(e.__subvalues,e._noAnimation)},value:function(e){return void 0!==e?(this._changeValue(e),this):this.__value},subvalues:function(e){return void 0!==e?(this._changeSubvalues(e),this):null!==this.__subvalues?this.__subvalues.slice():void 0},_changeValue:function(e){this._setupValue(e),this._beginValueChanging(),this._updateValueIndicator(),this._updateExtraElements(),this.__value!==this.option(_)&&this.option(_,this.__value),this._endValueChanging()},_changeSubvalues:function(e){null!==this.__subvalues?(this._setupSubvalues(e),this._beginValueChanging(),this._updateSubvalueIndicators(),this._updateExtraElements(),this._endValueChanging()):(this.__subvalues=C(e),this._setContentSize(),this._renderContent()),(0,n.compareArrays)(this.__subvalues,this.option(f))||this.option(f,this.__subvalues)},_optionChangesMap:{scale:"DOMAIN",rangeContainer:"MOSTLY_TOTAL",valueIndicator:"MOSTLY_TOTAL",subvalueIndicator:"MOSTLY_TOTAL",containerBackgroundColor:"MOSTLY_TOTAL",value:"VALUE",subvalues:"SUBVALUES",valueIndicators:"MOSTLY_TOTAL"},_customChangesOrder:["VALUE","SUBVALUES"],_change_VALUE:function(){this._changeValue(this.option(_))},_change_SUBVALUES:function(){this._changeSubvalues(this.option(f))},_applyMainLayout:null,_getElementLayout:null,_createIndicator:function(e,t,i,n,o,a){const s=this,r=s._factory.createIndicator({renderer:s._renderer,translator:s._translator,owner:t,tracker:s._tracker,className:i},e,a);return r&&(r.type=e,r._trackerInfo={type:n,index:o}),r},_getApproximateScreenRange:null});function y(e){return e?e.value:null}function b(e,t,i){const n=e[t],o=d(i)?(0,r.map)(i,y):[];let a=0;const s=o.length,l=[];for(;a<s;++a)l.push(v(o[a],n[a]));e[t]=l}function x(){const e=this;e._valueIndicators.forEach((t=>{t.value(e._indicatorValues[t.index],e._noAnimation)}))}function w(){const e=this,t=e._valueIndicators||[],i=e.option("valueIndicators"),n=[];let o,a=0;for(o=d(i)?i.length:0;a<o;++a)n.push(i[a]);for(o=t.length;a<o;++a)n.push(null);const s=[];return n.forEach(((i,n)=>{let o=t[n];if(!i)return void(o&&o.dispose());const a=e._prepareIndicatorSettings(i,"valueIndicatorType");o&&o.type!==a.type&&(o.dispose(),o=null),o||(o=e._createIndicator(a.type,e._renderer.root,"dxg-value-indicator","value-indicator",n,!0)),o&&(o.index=n,o.render(a),s.push(o))})),e._valueIndicators=s,e._valueIndicators}function S(){this._valueIndicators.forEach((e=>e.dispose())),this._valueIndicators=null}function D(){this._valueIndicators.forEach((e=>e.clean()))}function I(e,t){return function(e,t,i,n,o){return void 0!==o?(void 0!==i[n]&&(i[n]=v(o,i[n]),t[n]&&t[n].value(i[n])),e):i[n]}(this,this._valueIndicators,this._indicatorValues,e,t)}function E(e){this._parameters=e,this._indicators=[]}E.prototype={constructor:E,dispose:function(){const e=this;return e._indicators.forEach((e=>e.dispose())),e._parameters=e._options=e._indicators=e._colorPalette=e._palette=null,e},clean:function(){const e=this;return e._sample&&e._sample.clean().dispose(),e._indicators.forEach((e=>e.clean())),e._sample=e._options=e._palette=null,e},render:function(e,t){const i=this;return i._options=e,i._sample=i._parameters.createIndicator(i.type),i._sample.render(e),i.enabled=i._sample.enabled,i._palette=(0,o.isDefined)(e.palette)?i._parameters.createPalette(e.palette):null,i.enabled&&(i._generatePalette(i._indicators.length),i._indicators=(0,r.map)(i._indicators,(function(e,n){return t&&(e.dispose(),e=i._parameters.createIndicator(i.type,n)),e.render(i._getIndicatorOptions(n)),e}))),i},getOffset:function(){return this._sample.getOffset()},resize:function(e){const t=this;return t._layout=e,t._indicators.forEach((t=>t.resize(e))),t},measure:function(e){return this._sample.measure(e)},_getIndicatorOptions:function(e){let t=this._options;return this._colorPalette&&(t=g({},t,{color:this._colorPalette[e]})),t},_generatePalette:function(e){const t=this;let i=null;t._palette&&(t._palette.reset(),i=t._palette.generateColors(e,{repeat:!0})),t._colorPalette=i},_adjustIndicatorsCount:function(e){const t=this,i=t._indicators;let n,o,a;const s=i.length;if(s>e){for(n=e,o=s;n<o;++n)i[n].clean().dispose();t._indicators=i.slice(0,e),t._generatePalette(i.length)}else if(s<e)for(t._generatePalette(e),n=s,o=e;n<o;++n)a=t._parameters.createIndicator(t.type,n),a.render(t._getIndicatorOptions(n)).resize(t._layout),i.push(a)},values:function(e,t){const i=this;if(i.enabled)return void 0!==e?(d(e)||(e=u(e)?[Number(e)]:null),e&&(i._adjustIndicatorsCount(e.length),i._indicators.forEach(((i,n)=>i.value(e[n],t)))),i):(0,r.map)(i._indicators,(function(e){return e.value()}))}}},38452:function(e,t,i){t.default=void 0;var n=i(21274),o=p(i(92848)),a=i(52576),s=i(22263),r=i(5600),l=i(73488),d=i(28779),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=h(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(30621)),c=p(i(95946));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(h=function(e){return e?i:t})(e)}function p(e){return e&&e.__esModule?e:{default:e}}const g=Math.max,_=Math.min,f=Math.round,m=l.dxGauge.inherit({_rootClass:"dxg-linear-gauge",_factoryMethods:{rangeContainer:"createLinearRangeContainer",indicator:"createLinearIndicator"},_gridSpacingFactor:25,_scaleTypes:{type:"xyAxes",drawingType:"linear"},_getTicksOrientation:function(e){return e.isHorizontal?e.verticalOrientation:e.horizontalOrientation},_getThemeManagerOptions(){const e=this.callBase.apply(this,arguments);return e.subTheme="_linear",e},_getInvertedState(){return!this._area.vertical&&this.option("rtlEnabled")},_prepareScaleSettings:function(){const e=this.callBase();return e.inverted=this._getInvertedState(),e},_updateScaleTickIndent:function(e){const t=e.label.indentFromTick,i=e.tick.length,n=this._scale.measureLabels((0,a.extend)({},this._canvas)),o=e.isHorizontal?n.height+n.y:0,s=t>0;let r,l,d;e.isHorizontal?(r=s?{center:.5,top:0,bottom:1}:{center:.5,top:1,bottom:0},d=i*r[e.verticalOrientation],l=n.y):(r=s?{center:.5,left:0,right:1}:{center:.5,left:1,right:0},d=i*r[e.horizontalOrientation],l=-n.width),e.label.indentFromAxis=-t+(s?-d+l:d-o),this._scale.updateOptions(e)},_shiftScale:function(e,t){const i=this,n=(0,a.extend)({},i._canvas),o=t.isHorizontal,s=i._scale;n[o?"left":"top"]=i._area[o?"startCoord":"endCoord"],n[o?"right":"bottom"]=n[o?"width":"height"]-i._area[o?"endCoord":"startCoord"],s.draw(n),s.shift({left:-e.x,top:-e.y})},_setupCodomain:function(){const e=this,t=e.option("geometry")||{},i="vertical"===(0,d.normalizeEnum)(t.orientation);e._area={vertical:i,x:0,y:0,startCoord:-100,endCoord:100},e._rangeContainer.vertical=i,e._translator.setInverted(e._getInvertedState()),e._translator.setCodomain(-100,100)},_getScaleLayoutValue:function(){return this._area[this._area.vertical?"x":"y"]},_getTicksCoefficients:function(e){const t={inner:0,outer:1};return this._area.vertical?"left"===e.horizontalOrientation?(t.inner=1,t.outer=0):"center"===e.horizontalOrientation&&(t.inner=t.outer=.5):"top"===e.verticalOrientation?(t.inner=1,t.outer=0):"center"===e.verticalOrientation&&(t.inner=t.outer=.5),t},_correctScaleIndents:function(e,t,i){const n=this._area.vertical;t>=0?e.max+=t+i[n?"width":"height"]:e.min-=-t+i[n?"width":"height"],e.indent=i[n?"height":"width"]/2},_measureMainElements:function(e,t){const i=this,o=i._area.x,a=i._area.y;let s=1e3,r=0,l=0;const d=i._scale;return(0,n.each)(e.concat(d),(function(e,i){const n=i.measure?i.measure({x:o+i.getOffset(),y:a+i.getOffset()}):t;void 0!==n.max&&(r=g(r,n.max)),void 0!==n.min&&(s=_(s,n.min)),n.indent>0&&(l=g(l,n.indent))})),{minBound:s,maxBound:r,indent:l}},_applyMainLayout:function(e,t){const i=this,n=i._measureMainElements(e,t),o=i._area;let a,s;o.vertical?(a=v(i._innerRect,{width:n.maxBound-n.minBound}),s=(a.left+a.right)/2-(n.minBound+n.maxBound)/2,o.startCoord=a.bottom-n.indent,o.endCoord=a.top+n.indent,o.x=f(o.x+s)):(a=v(i._innerRect,{height:n.maxBound-n.minBound}),s=(a.top+a.bottom)/2-(n.minBound+n.maxBound)/2,o.startCoord=a.left+n.indent,o.endCoord=a.right-n.indent,o.y=f(o.y+s)),i._translator.setCodomain(o.startCoord,o.endCoord),i._innerRect=a},_getElementLayout:function(e){return{x:f(this._area.x+e),y:f(this._area.y+e)}},_getApproximateScreenRange:function(){const e=this,t=e._area;let i=t.vertical?e._canvas.height:e._canvas.width;return i>t.totalSize&&(i=t.totalSize),i*=.8,i},_getDefaultSize:function(){return"vertical"===(this.option("geometry")||{}).orientation?{width:100,height:300}:{width:300,height:100}},_factory:(0,s.clone)(r.BaseGauge.prototype._factory)});function v(e,t,i){const n=(0,a.extend)({},e);let o;return i=i||{},t&&(n.left+=i.left||0,n.right-=i.right||0,n.top+=i.top||0,n.bottom-=i.bottom||0,t.width>0&&(o=(n.right-n.left-t.width)/2,o>0&&(n.left+=o,n.right-=o)),t.height>0&&(o=(n.bottom-n.top-t.height)/2,o>0&&(n.top+=o,n.bottom-=o))),n}const C=m.prototype._factory.indicators={};m.prototype._factory.createIndicator=(0,l.createIndicatorCreator)(C),C._default=u._default,C.rectangle=u.rectangle,C.rhombus=u.rhombus,C.circle=u.circle,C.trianglemarker=u.trianglemarker,C.textcloud=u.textcloud,C.rangebar=u.rangebar,m.prototype._factory.RangeContainer=c.default,(0,o.default)("dxLinearGauge",m);t.default=m;e.exports=t.default,e.exports.default=t.default},30621:function(e,t,i){t.trianglemarker=t.textcloud=t.rhombus=t.rectangle=t.rangebar=t.circle=t._default=void 0;var n=i(93473),o=i(28779);const a=Number,s=n.BaseIndicator.inherit({_move:function(){const e=this,t=e._actualPosition-e._zeroPosition;e._rootElement.move(e.vertical?0:t,e.vertical?t:0),e._trackerElement&&e._trackerElement.move(e.vertical?0:t,e.vertical?t:0)},_isEnabled:function(){return this.vertical=this._options.vertical,this._options.length>0&&this._options.width>0},_isVisible:function(){return!0},_getTrackerSettings:function(){const e=this._options;let t,i,n,o,a=e.width/2,s=e.length/2;const r=this._zeroPosition;return a>10||(a=10),s>10||(s=10),this.vertical?(t=e.x-s,i=e.x+s,n=r+a,o=r-a):(t=r-a,i=r+a,n=e.y+s,o=e.y-s),{points:[t,n,t,o,i,o,i,n]}},_render:function(){this._zeroPosition=this._translator.getCodomainStart()},_clear:function(){delete this._element},measure:function(e){const t=this.vertical?e.x:e.y;return{min:t-this._options.length/2,max:t+this._options.length/2}},getTooltipParameters:function(){const e=this,t=e._options,i=e._actualPosition,n={x:i,y:i,value:e._currentValue,color:t.color,offset:t.width/2};return e.vertical?n.x=t.x:n.y=t.y,n}});t.rectangle=s.inherit({_render:function(){const e=this,t=e._options;let i,n,o,a;e.callBase();const s=e._zeroPosition;e.vertical?(i=t.x-t.length/2,n=t.x+t.length/2,o=s+t.width/2,a=s-t.width/2):(i=s-t.width/2,n=s+t.width/2,o=t.y+t.length/2,a=t.y-t.length/2),e._element=e._element||e._renderer.path([],"area").append(e._rootElement),e._element.attr({points:[i,o,i,a,n,a,n,o]})}}),t.rhombus=s.inherit({_render:function(){const e=this,t=e._options;let i,n,o,a;e.callBase(),e.vertical?(i=t.x,n=e._zeroPosition,o=t.length/2||0,a=t.width/2||0):(i=e._zeroPosition,n=t.y,o=t.width/2||0,a=t.length/2||0),e._element=e._element||e._renderer.path([],"area").append(e._rootElement),e._element.attr({points:[i-o,n,i,n-a,i+o,n,i,n+a]})}}),t.circle=s.inherit({_render:function(){const e=this,t=e._options;let i,n;e.callBase(),e.vertical?(i=t.x,n=e._zeroPosition):(i=e._zeroPosition,n=t.y);const o=t.length/2||0;e._element=e._element||e._renderer.circle().append(e._rootElement),e._element.attr({cx:i,cy:n,r:o})}}),t.trianglemarker=s.inherit({_isEnabled:function(){const e=this;return e.vertical=e._options.vertical,e._inverted=e.vertical?"right"===(0,o.normalizeEnum)(e._options.horizontalOrientation):"bottom"===(0,o.normalizeEnum)(e._options.verticalOrientation),e._options.length>0&&e._options.width>0},_isVisible:function(){return!0},_render:function(){const e=this,t=e._options;let i,n,o,s;const r={stroke:"none","stroke-width":0,"stroke-linecap":"square"};e.callBase(),e.vertical?(i=t.x,o=e._zeroPosition,n=i+a(e._inverted?t.length:-t.length),r.points=[i,o,n,o-t.width/2,n,o+t.width/2]):(o=t.y,i=e._zeroPosition,s=o+a(e._inverted?t.length:-t.length),r.points=[i,o,i-t.width/2,s,i+t.width/2,s]),t.space>0&&(r["stroke-width"]=Math.min(t.space,t.width/4)||0,r.stroke=r["stroke-width"]>0&&t.containerBackgroundColor||"none"),e._element=e._element||e._renderer.path([],"area").append(e._rootElement),e._element.attr(r).sharp()},_getTrackerSettings:function(){const e=this,t=e._options;let i,n,o,s,r,l=t.width/2,d=a(t.length);return l>10||(l=10),d>20||(d=20),e.vertical?(i=t.x,n=i+(e._inverted?d:-d),o=e._zeroPosition+l,s=e._zeroPosition-l,r=[i,o,n,o,n,s,i,s]):(o=t.y,s=o+(e._inverted?d:-d),i=e._zeroPosition-l,n=e._zeroPosition+l,r=[i,o,i,s,n,s,n,o]),{points:r}},measure:function(e){const t=this,i=a(t._options.length);let n,o;return t.vertical?(n=o=e.x,t._inverted?o=n+i:n=o-i):(n=o=e.y,t._inverted?o=n+i:n=o-i),{min:n,max:o}},getTooltipParameters:function(){const e=this,t=e._options,i=(e._inverted?t.length:-t.length)/2,n=e.callBase();return e.vertical?n.x+=i:n.y+=i,n.offset=t.length/2,n}}),t.textcloud=n.BaseTextCloudMarker.inherit({_isEnabled:function(){const e=this;return e.vertical=e._options.vertical,e._inverted=e.vertical?"right"===(0,o.normalizeEnum)(e._options.horizontalOrientation):"bottom"===(0,o.normalizeEnum)(e._options.verticalOrientation),!0},_isVisible:function(){return!0},_getTextCloudOptions:function(){const e=this;let t,i=e._actualPosition,n=e._actualPosition;return e.vertical?(i=e._options.x,t=e._inverted?"top-left":"top-right"):(n=e._options.y,t=e._inverted?"right-top":"right-bottom"),{x:i,y:n,type:t}},measure:function(e){const t=this;let i,n;const o=a(t._options.arrowLength)||0;return t._measureText(),t.vertical?t._inverted?(i=e.x,n=e.x+o+t._textFullWidth):(i=e.x-o-t._textFullWidth,n=e.x):t._inverted?(i=e.y,n=e.y+o+t._textFullHeight):(i=e.y-o-t._textFullHeight,n=e.y),{min:i,max:n,indent:0}},_correctCloudType(e,t,i){let{x:n,y:o}=t,{width:a,height:s}=i;return"right-top"===e||"right-bottom"===e?n-a<this._translator.getCodomainStart()&&(e=`left-${e.split("-")[1]}`):"top-left"!==e&&"top-right"!==e||o+s>this._translator.getCodomainStart()&&(e=`bottom-${e.split("-")[1]}`),e}}),t.rangebar=t._default=n.BaseRangeBar.inherit({_isEnabled:function(){const e=this;return e.vertical=e._options.vertical,e._inverted=e.vertical?"right"===(0,o.normalizeEnum)(e._options.horizontalOrientation):"bottom"===(0,o.normalizeEnum)(e._options.verticalOrientation),e._options.size>0},_isVisible:function(){return!0},_createBarItem:function(){return this._renderer.path([],"area").append(this._rootElement)},_createTracker:function(){return this._renderer.path([],"area")},_setBarSides:function(){const e=this,t=e._options,i=a(t.size);let n,o;e.vertical?e._inverted?(n=t.x,o=t.x+i):(n=t.x-i,o=t.x):e._inverted?(n=t.y,o=t.y+i):(n=t.y-i,o=t.y),e._minSide=n,e._maxSide=o,e._minBound=n,e._maxBound=o},_getSpace:function(){const e=this._options;return e.space>0?a(e.space):0},_isTextVisible:function(){const e=this._options.text||{};return e.indent>0||e.indent<0},_getTextAlign:function(){return this.vertical?this._options.text.indent>0?"left":"right":"center"},_setTextItemsSides:function(){const e=this,t=a(e._options.text.indent);t>0?(e._lineStart=e._maxSide,e._lineEnd=e._maxSide+t,e._textPosition=e._lineEnd+(e.vertical?2:e._textHeight/2),e._maxBound=e._textPosition+(e.vertical?e._textWidth:e._textHeight/2)):t<0&&(e._lineStart=e._minSide,e._lineEnd=e._minSide+t,e._textPosition=e._lineEnd-(e.vertical?2:e._textHeight/2),e._minBound=e._textPosition-(e.vertical?e._textWidth:e._textHeight/2))},_getPositions:function(){const e=this,t=e._startPosition,i=e._endPosition,n=e._space,o=e._basePosition,a=e._actualPosition;let s,r,l,d;return t<i?(o<a?(s=o,r=a):(s=a,r=o),l=s-n,d=r+n):(o>a?(s=o,r=a):(s=a,r=o),l=s+n,d=r-n),{start:t,end:i,main1:s,main2:r,back1:l,back2:d}},_buildItemSettings:function(e,t){const i=this,n=i._minSide,o=i._maxSide;return{points:i.vertical?[n,e,n,t,o,t,o,e]:[e,n,e,o,t,o,t,n]}},_updateTextPosition:function(){const e=this;e._text.attr(e.vertical?{x:e._textPosition,y:e._actualPosition+e._textVerticalOffset}:{x:e._actualPosition,y:e._textPosition+e._textVerticalOffset})},_updateLinePosition:function(){const e=this,t=e._actualPosition;let i,n,o;e.vertical?(e._basePosition>=t?(i=t,n=t+2):(i=t-2,n=t),o=[e._lineStart,i,e._lineStart,n,e._lineEnd,n,e._lineEnd,i]):(e._basePosition<=t?(i=t-2,n=t):(i=t,n=t+2),o=[i,e._lineStart,i,e._lineEnd,n,e._lineEnd,n,e._lineStart]),e._line.attr({points:o}).sharp()},_getTooltipPosition:function(){const e=this,t=(e._minSide+e._maxSide)/2,i=(e._basePosition+e._actualPosition)/2;return e.vertical?{x:t,y:i}:{x:i,y:t}},measure:function(e){const t=this,i=a(t._options.size),n=a(t._options.text.indent);let o,s,r;return t._measureText(),t.vertical?(o=s=e.x,t._inverted?s+=i:o-=i,t._hasText&&(r=t._textHeight/2,n>0&&(s+=n+t._textWidth),n<0&&(o+=n-t._textWidth))):(o=s=e.y,t._inverted?s+=i:o-=i,t._hasText&&(r=t._textWidth/2,n>0&&(s+=n+t._textHeight),n<0&&(o+=n-t._textHeight))),{min:o,max:s,indent:r}}})},95946:function(e,t,i){t.default=void 0;var n,o=(n=i(24286))&&n.__esModule?n:{default:n},a=i(28779);const s=Number,r=Math.max,l=o.default.inherit({_processOptions:function(){const e=this;if(e.vertical=e._options.vertical,e._inner=e._outer=0,e.vertical)switch((0,a.normalizeEnum)(e._options.horizontalOrientation)){case"left":e._inner=1;break;case"center":e._inner=e._outer=.5;break;default:e._outer=1}else switch((0,a.normalizeEnum)(e._options.verticalOrientation)){case"top":e._inner=1;break;case"center":e._inner=e._outer=.5;break;default:e._outer=1}},_isVisible:function(){return!0},_createRange:function(e,t){const i=this,n=i._inner,o=i._outer,a=i._translator.translate(e.start),s=i._translator.translate(e.end);let r;const l=t.x,d=t.y,u=e.startWidth,c=e.endWidth;return r=i.vertical?[l-u*n,a,l-c*n,s,l+c*o,s,l+u*o,a]:[a,d+u*o,a,d-u*n,s,d-c*n,s,d+c*o],i._renderer.path(r,"area")},measure:function(e){const t={};let i;return t.min=t.max=e[this.vertical?"x":"y"],i=this._options.width,i=s(i)||r(s(i.start),s(i.end)),t.min-=this._inner*i,t.max+=this._outer*i,t}});t.default=l;e.exports=t.default,e.exports.default=t.default},20056:function(e,t,i){t.default=void 0;var n=i(52576),o=i(71671);const a=n.extend,s=o.BaseThemeManager.inherit({ctor(e){this.callBase.apply(this,arguments),this._subTheme=e.subTheme},_initializeTheme:function(){const e=this;let t;e._subTheme&&(t=a(!0,{},e._theme[e._subTheme],e._theme),a(!0,e._theme,t)),e.callBase.apply(e,arguments)}});t.default={ThemeManager:s};e.exports=t.default,e.exports.default=t.default},72973:function(e,t,i){t.default=void 0;var n=u(i(92774)),o=u(i(55620)),a=u(i(64960)),s=i(37373),r=u(i(3122)),l=i(98834),d=u(i(89797));function u(e){return e&&e.__esModule?e:{default:e}}const c="gauge-tooltip",h=r.default.add,p=o.default.inherit({ctor:function(e){const t=this;t._element=e.renderer.g().attr({class:"dxg-tracker",stroke:"none","stroke-width":0,fill:"#000000",opacity:1e-4}).linkOn(e.container,{name:"tracker",after:"peripheral"}),t._showTooltipCallback=function(){const e=t._tooltipEvent.target,i=e["gauge-data-target"],n=e["gauge-data-info"];if(t._targetEvent=null,t._tooltipTarget!==e){const o=i=>{i&&(t._tooltipTarget=e)};o(t._callbacks["tooltip-show"](i,n,o))}},t._hideTooltipCallback=function(){t._hideTooltipTimeout=null,t._targetEvent=null,t._tooltipTarget&&(t._callbacks["tooltip-hide"](),t._tooltipTarget=null)},t._dispose=function(){clearTimeout(t._hideTooltipTimeout),t._showTooltipCallback=t._hideTooltipCallback=t._dispose=null}},dispose:function(){const e=this;return e._dispose(),e.deactivate(),e._element.off("."+c),e._element.linkOff(),e._element=e._context=e._callbacks=null,e},activate:function(){return this._element.linkAppend(),this},deactivate:function(){return this._element.linkRemove().clear(),this},attach:function(e,t,i){return e.data({"gauge-data-target":t,"gauge-data-info":i}).append(this._element),this},detach:function(e){return e.remove(),this},setTooltipState:function(e){const t=this;if(t._element.off("."+c),e){const e={tracker:t};t._element.on((0,l.addNamespace)([d.default.move],c),e,_).on((0,l.addNamespace)([d.default.out],c),e,f).on((0,l.addNamespace)([d.default.down],c),e,v).on((0,l.addNamespace)([d.default.up],c),e,C).on((0,l.addNamespace)([s.name],c),e,m)}return t},setCallbacks:function(e){return this._callbacks=e,this},_showTooltip:function(e){const t=this;clearTimeout(t._hideTooltipTimeout),t._hideTooltipTimeout=null,t._tooltipTarget!==e.target&&(t._tooltipEvent=e,t._showTooltipCallback())},_hideTooltip:function(e){const t=this;clearTimeout(t._hideTooltipTimeout),e?t._hideTooltipTimeout=setTimeout(t._hideTooltipCallback,e):t._hideTooltipCallback()}});let g=null;function _(e){const t=e.data.tracker;t._x=e.pageX,t._y=e.pageY,t._showTooltip(e)}function f(e){e.data.tracker._hideTooltip(100)}function m(e){e.data.tracker._hideTooltip()}function v(e){(g=e.data.tracker)._touch=!0,_(e)}function C(){g._touch=!1}function y(e){const t=g;t&&!t._touch&&(t._hideTooltip(100),g=null)}h((function(){n.default.subscribeGlobal(a.default.getDocument(),(0,l.addNamespace)([d.default.down],c),y)}));t.default=p;e.exports=t.default,e.exports.default=t.default},4655:function(e,t,i){t.default=void 0;var n,o=(n=i(38452))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},9735:function(e,t,i){t.createPalette=b,t.currentPalette=_,t.generateColors=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{keepLastColorInEnd:!1};return i.type=i.baseColorSet,i.extensionMode=i.paletteExtensionMode,b(e,i).generateColors(t)},t.getAccentColor=function(e,t){return(e=f(e,{themeDefault:t})).accentColor||e[0]},t.getDiscretePalette=function(e,t,i){const n=t>0?function(e,t){const i=t-1,n=e.length-1,o=[],a=[];let r;function u(e){const t=n*e,i=l(t),s=d(t);a.push(o[i].blend(o[s],t-i).toHex())}for(r=0;r<=n;++r)o.push(new s.default(e[r]));if(i>0)for(r=0;r<=i;++r)u(r/i);else u(.5);return a}(f(e,{type:"gradientSet",themeDefault:i}),t):[];return{getColor:function(e){return n[e]||null}}},t.getGradientPalette=function(e,t){const i=f(e,{type:"gradientSet",themeDefault:t}),n=new s.default(i[0]),o=new s.default(i[1]);return{getColor:function(e){return 0<=e&&e<=1?n.blend(o,e).toHex():null}}},t.getPalette=f,t.registerPalette=function(e,t){const i={};let n;u(t)?i.simpleSet=t.slice(0):t&&(i.simpleSet=u(t.simpleSet)?t.simpleSet.slice(0):void 0,i.indicatingSet=u(t.indicatingSet)?t.indicatingSet.slice(0):void 0,i.gradientSet=u(t.gradientSet)?t.gradientSet.slice(0):void 0,i.accentColor=t.accentColor);i.accentColor||(i.accentColor=i.simpleSet&&i.simpleSet[0]);(i.simpleSet||i.indicatingSet||i.gradientSet)&&(n=(0,o.normalizeEnum)(e),(0,a.extend)(p[n]=p[n]||{},i))};var n,o=i(28779),a=i(52576),s=(n=i(43101))&&n.__esModule?n:{default:n},r=i(11528);const l=Math.floor,d=Math.ceil,u=Array.isArray,c=50,h="material",p={[h]:{simpleSet:["#1db2f5","#f5564a","#97c95c","#ffc720","#eb3573","#a63db8"],indicatingSet:["#97c95c","#ffc720","#f5564a"],gradientSet:["#1db2f5","#97c95c"],accentColor:"#1db2f5"},office:{simpleSet:["#5f8b95","#ba4d51","#af8a53","#955f71","#859666","#7e688c"],indicatingSet:["#a3b97c","#e1b676","#ec7f83"],gradientSet:["#5f8b95","#ba4d51"],accentColor:"#ba4d51"},"harmony light":{simpleSet:["#fcb65e","#679ec5","#ad79ce","#7abd5c","#e18e92","#b6d623","#b7abea","#85dbd5"],indicatingSet:["#b6d623","#fcb65e","#e18e92"],gradientSet:["#7abd5c","#fcb65e"],accentColor:"#679ec5"},"soft pastel":{simpleSet:["#60a69f","#78b6d9","#6682bb","#a37182","#eeba69","#90ba58","#456c68","#7565a4"],indicatingSet:["#90ba58","#eeba69","#a37182"],gradientSet:["#78b6d9","#eeba69"],accentColor:"#60a69f"},pastel:{simpleSet:["#bb7862","#70b3a1","#bb626a","#057d85","#ab394b","#dac599","#153459","#b1d2c6"],indicatingSet:["#70b3a1","#dac599","#bb626a"],gradientSet:["#bb7862","#70b3a1"],accentColor:"#bb7862"},bright:{simpleSet:["#70c92f","#f8ca00","#bd1550","#e97f02","#9d419c","#7e4452","#9ab57e","#36a3a6"],indicatingSet:["#70c92f","#f8ca00","#bd1550"],gradientSet:["#e97f02","#f8ca00"],accentColor:"#e97f02"},soft:{simpleSet:["#cbc87b","#9ab57e","#e55253","#7e4452","#e8c267","#565077","#6babac","#ad6082"],indicatingSet:["#9ab57e","#e8c267","#e55253"],gradientSet:["#9ab57e","#e8c267"],accentColor:"#565077"},ocean:{simpleSet:["#75c099","#acc371","#378a8a","#5fa26a","#064970","#38c5d2","#00a7c6","#6f84bb"],indicatingSet:["#c8e394","#7bc59d","#397c8b"],gradientSet:["#acc371","#38c5d2"],accentColor:"#378a8a"},vintage:{simpleSet:["#dea484","#efc59c","#cb715e","#eb9692","#a85c4c","#f2c0b5","#c96374","#dd956c"],indicatingSet:["#ffe5c6","#f4bb9d","#e57660"],gradientSet:["#efc59c","#cb715e"],accentColor:"#cb715e"},violet:{simpleSet:["#d1a1d1","#eeacc5","#7b5685","#7e7cad","#a13d73","#5b41ab","#e287e2","#689cc1"],indicatingSet:["#d8e2f6","#d0b2da","#d56a8a"],gradientSet:["#eeacc5","#7b5685"],accentColor:"#7b5685"},carmine:{simpleSet:["#fb7764","#73d47f","#fed85e","#d47683","#dde392","#757ab2"],indicatingSet:["#5cb85c","#f0ad4e","#d9534f"],gradientSet:["#fb7764","#73d47f"],accentColor:"#f05b41"},"dark moon":{simpleSet:["#4ddac1","#f4c99a","#80dd9b","#f998b3","#4aaaa0","#a5aef1"],indicatingSet:["#59d8a4","#f0ad4e","#f9517e"],gradientSet:["#4ddac1","#f4c99a"],accentColor:"#3debd3"},"soft blue":{simpleSet:["#7ab8eb","#97da97","#facb86","#e78683","#839bda","#4db7be"],indicatingSet:["#5cb85c","#f0ad4e","#d9534f"],gradientSet:["#7ab8eb","#97da97"],accentColor:"#7ab8eb"},"dark violet":{simpleSet:["#9c63ff","#64c064","#eead51","#d2504b","#4b6bbf","#2da7b0"],indicatingSet:["#5cb85c","#f0ad4e","#d9534f"],gradientSet:["#9c63ff","#64c064"],accentColor:"#9c63ff"},"green mist":{simpleSet:["#3cbab2","#8ed962","#5b9d95","#efcc7c","#f1929f","#4d8dab"],indicatingSet:["#72d63c","#ffc852","#f74a5e"],gradientSet:["#3cbab2","#8ed962"],accentColor:"#3cbab2"}};let g;function _(e){if(void 0===e)return g||h;e=(0,o.normalizeEnum)(e),g=e in p?e:void 0}function f(e,t){let i;t=t||{},e=e||(void 0===g?t.themeDefault:_());const n=t.type;return u(e)?e.slice(0):((0,r.isString)(e)&&(i=p[(0,o.normalizeEnum)(e)]),i||(i=p[_()]),n?i[n].slice(0):i)}function m(e){let t=0;this.next=function(){const i=e[t++];return t===e.length&&this.reset(),i},this.reset=function(){t=0}}function v(e,t){const i=t.useHighlight?c:0,n=new m([0,i,-i]);let o=[];function a(){const t=n.next();o=t?function(e,t){const i=[];let n;const o=e.length;for(n=0;n<o;++n)i.push(x(e[n],t));return i}(e,t):e.slice(0)}return{getColor:function(t){const i=o[t%e.length];return t%e.length==e.length-1&&a(),i},generateColors:function(e){const i=[];e=e||t.count;for(let t=0;t<e;t++)i.push(this.getColor(t));return i},reset:function(){n.reset(),a()}}}function C(e,t){return{getColor:function(t,i){const n=e.length,o=l((i-1)/n+1),a=e[t%n];return o>1?function(e,t,i){const n=new s.default(e).hsl;let o=n.l/100;const a=i-1/i;let r=o-.5*a,l=o+.5*a;const d=(i-1)/2,u=t-d;return r<Math.min(.5,.9*o)&&(r=Math.min(.5,.9*o)),l>Math.max(.8,o+.15*(1-o))&&(l=Math.max(.8,o+.15*(1-o))),u<0?o-=(r-o)*u/d:o+=u/d*(l-o),n.l=100*o,s.default.prototype.fromHSL(n).toHex()}(a,l(t/n),o):a},generateColors:function(e){const i=[];e=e||t.count;for(let t=0;t<e;t++)i.push(this.getColor(t,e));return i},reset:function(){}}}function y(e,t){const i=e.length;let n=[];function o(e,t,i,n){const o=Math.floor(e/t);let a,s,r=e-t*o,l=i;for(;l<i+e;)s=o,r>0&&(s+=1,r--),a=s>2?Math.floor(s/2):0,n.push(l+a),l+=s;return n.sort((function(e,t){return e-t}))}function a(e,t,i){let n=0;for(let o=t=(i+t)%i;o<2*i;o+=1){const t=(i+o)%i;if(e[t])return[e[t],n];n++}}function r(n){if(n<=i)return e;let r=[];const l=i-2;let d=0,u=[];u=t.keepLastColorInEnd?o(n-2,l,1,[0,n-1]):o(n-1,i-1,1,[0]);for(let t=0;t<n;t++)u.indexOf(t)>-1&&(r[t]=e[d++]);return r=function(e,t){for(let i=0;i<t;i++)if(!e[i]){let n=e[i-1];if(!n)continue;{const o=a(e,i,t),r=new s.default(o[0]);n=new s.default(n);for(let t=0;t<o[1];t++,i++)e[i]=n.blend(r,(t+1)/(o[1]+1)).toHex()}}return e}(r,n),r}return{getColor:function(e,o){return o=o||t.count||i,n.length!==o&&(n=r(o)),n[e%o]},generateColors:function(e,n){if(e=e||t.count||i,n&&e>i){const t=r(i);for(let n=0;n<e-i;n++)t.push(t[n]);return t}return i>0?r(e).slice(0,e):[]},reset:function(){}}}function b(e,t,i){const n={dispose(){this._extensionStrategy=null},getNextColor(e){return this._extensionStrategy.getColor(this._currentColor++,e)},generateColors(e,t){return this._extensionStrategy.generateColors(e,(t||{}).repeat)},reset(){return this._currentColor=0,this._extensionStrategy.reset(),this}},o=((t=t||{}).extensionMode||"").toLowerCase(),a=f(e,{type:t.type||"simpleSet",themeDefault:i});return n._extensionStrategy="alternate"===o?v(a,t):"extrapolate"===o?C(a,t):y(a,t),n.reset(),n}function x(e,t){let i=new s.default(e).alter(t);const n=.3*(o=i).r+.59*o.g+.11*o.b;var o;return(n>200||n<55)&&(i=new s.default(e).alter(-t/2)),i.toHex()}},4381:function(e,t,i){t.default=void 0;var n,o=(n=i(98895))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},11247:function(e,t,i){t.default=void 0;var n,o=(n=i(52769))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},30185:function(e,t,i){t.default=void 0;var n,o=(n=i(61080))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},62381:function(e,t,i){t.utils=t.formatValue=t.consts=t.HEIGHT_COMPACT_MODE=void 0;var n=i(38528),o=i(11528);t.HEIGHT_COMPACT_MODE=24,t.utils={trackerSettings:{fill:"grey",stroke:"grey",opacity:1e-4},animationSettings:{duration:250}},t.consts={emptySliderMarkerText:". . .",pointerSize:4};t.formatValue=function(e,t,i,a,s,r){const l={value:e,valueText:(0,n.smartFormatter)(e,{labelOptions:t,ticks:i?i.ticks:[],tickInterval:i?i.tickInterval:void 0,dataType:a,type:s,logarithmBase:r})};return String((0,o.isFunction)(t.customizeText)?t.customizeText.call(l,l):l.valueText)}},61080:function(e,t,i){t.default=void 0;var n=I(i(92848)),o=i(11528),a=i(52576),s=i(21274),r=i(28779),l=I(i(41380)),d=i(50254),u=i(99857),c=i(99091),h=i(60976),p=I(i(2082)),g=i(62381),_=i(9331),f=i(9358),m=i(34735),v=i(68006),C=i(64449),y=I(i(63885)),b=I(i(34506)),x=i(74754),w=i(16216),S=i(92528),D=i(25058);function I(e){return e&&e.__esModule?e:{default:e}}const E=Math.max,T=Math.ceil,A=Math.floor,O="startValue",P="datetime",k="value",M="discrete",R="semidiscrete",L="string",B=k+"Changed",V="containerBackgroundColor",F="logarithmic",H="keep",N="shift",z="reset";function W(e,t,i){const n=X(e,void 0===t?g.consts.emptySliderMarkerText:(0,g.formatValue)(t,i),i.font);return T(n.height)+2*i.paddingTopBottom+g.consts.pointerSize}function $(e,t,i,n){const o=X(e,(0,g.formatValue)(t,i.label,n,i.valueType,i.type,i.logarithmBase),i.label.font);return T(o.width/2)}function G(e,t){const i=(0,o.type)(e),n=(0,o.type)(t),a=function(e){return i===e||n===e};return a("date")?P:a("number")?"numeric":a(L)?L:""}function j(e){return e.valueType===P&&e.marker.visible}function U(e,t,i){if(!e)return;const n=e.logarithmBase;e.type===F&&n<=0||n&&!(0,o.isNumeric)(n)?(e.logarithmBase=t,i("E2104")):e.type!==F&&(e.logarithmBase=void 0)}function K(e,t,i,n){const o=t.label,a=t.marker,s=t.placeholderHeight,r="semidiscrete"===t.type?t.customTicks:n.ticks,l=(0,g.formatValue)(r[0],o);return s||(o.visible?o.topIndent+X(e,l,o.font).height:0)+(i?a.topIndent+a.separatorHeight:0)}function Z(e,t,i){return e?i?e=l.default.getNextDateUnit(e):e+=t:e=t,e}function q(e,t,i,n){let a;const s=(0,o.isDefined)(n.minVisible)?n.minVisible:n.min,r=(0,o.isDefined)(n.maxVisible)?n.maxVisible:n.max,d=e._categoriesInfo;let u,c;const h={};return e.type===R?a=function(e,t,i,n){const o=e.minorTickInterval;let a,s=e.tickInterval;const r="datetime"===e.valueType,d=e.axisDivisionFactor||{};let u,c;if(!s)do{if(a=Z(s,o,r),s===a)break;s=a,r&&(a=l.default.dateToMilliseconds(s)),u=T((i-t)/a),c=A(n/(d[s]||50))||1}while(a&&u>c);return{tickInterval:s,minorTickInterval:o,bounds:{minVisible:t,maxVisible:i},ticks:[]}}(e,s,r,t):(u=(0,C.tickGenerator)({axisType:e.type,dataType:e.valueType,logBase:e.logarithmBase,allowNegatives:!0,linearThreshold:Math.abs(e.linearThreshold||0),axisDivisionFactor:e.axisDivisionFactor,minorAxisDivisionFactor:e.minorAxisDivisionFactor,calculateMinors:!0,allowDecimals:e.allowDecimals,endOnTick:e.endOnTick,incidentOccurred:i,rangeIsEmpty:n.isEmpty()})({min:s,max:r,categories:(0,o.isDefined)(d)?d.categories:[]},t,e.tickInterval,e.forceUserTickInterval,void 0,e.minorTickInterval,e.minorTickCount),c=u.ticks.length,h.minVisible=u.ticks[0]<s?u.ticks[0]:s,h.maxVisible=u.ticks[c-1]>r?u.ticks[c-1]:r,a={tickInterval:u.tickInterval,minorTickInterval:0===e.minorTickInterval?0:u.minorTickInterval,bounds:h,ticks:u.ticks}),a}function Y(e){var t;return null===(t=e.workWeek)||void 0===t?void 0:t[0]}function X(e,t,i){const n=e.text(t,-1e3,-1e3).css((0,r.patchFontOptions)(i)).append(e.root),o=n.getBBox();return n.remove(),o}function Q(e,t,i,n,a){let s,r;const d=e._categoriesInfo;let u;const c=e.valueType===P;var h,g;!t||t.isEmpty()||i.isEmpty()||(s=n.bounds,i.addRange(s),e.startValue=i.invert?s.maxVisible:s.minVisible,e.endValue=i.invert?s.minVisible:s.maxVisible),e.marker.visible=a(c&&-1===e.type.indexOf(M),e.marker.visible,e.startValue,e.endValue,n.tickInterval),d&&(e.startValue=d.start,e.endValue=d.end),-1===e.type.indexOf(M)&&(r=(0,o.isDate)(e.startValue)&&(0,o.isDate)(e.endValue)&&e.startValue.getTime()===e.endValue.getTime()||e.startValue===e.endValue),e.isEmpty=(h=e.startValue,g=e.endValue,!(0,o.isDefined)(h)||!(0,o.isDefined)(g)||r),e.isEmpty?e.startValue=e.endValue=void 0:(e.minorTickInterval=n.minorTickInterval,e.tickInterval=n.tickInterval,c&&(!(0,o.isDefined)(e.label.format)||e.type===R&&e.minorTickInterval!==e.tickInterval)&&(e.type===M?e.label.format=p.default.getDateFormatByTicks(n.ticks):e.marker.visible?e.label.format=l.default.getDateFormatByTickInterval(e.tickInterval):e.label.format=p.default.getDateFormatByTickInterval(e.startValue,e.endValue,e.tickInterval))),e.type===R&&(u=function(e){let t=e.startValue,i=e.endValue;const n="datetime"===e.valueType,a=Y(e),s=e.tickInterval,r={intervals:[]};if(!(0,o.isDefined)(t)||!(0,o.isDefined)(i))return r;r.intervals=l.default.getSequenceByInterval(t,i,e.minorTickInterval),s!==e.minorTickInterval&&(r.altIntervals=r.intervals,t=J(t,n,s,a),i=J(i,n,s,a),r.intervals=l.default.getSequenceByInterval(t,i,s),r.intervals[0]=r.altIntervals[0]);return r}(e),e.customMinorTicks=u.altIntervals,e.customTicks=u.intervals,e.customBoundTicks=[e.customTicks[0]])}function J(e,t,i,n){return(0,o.isDefined)(e)&&(e=t?l.default.correctDateWithUnitBeginning(new Date(e),i,null,n):(0,d.adjust)(A((0,d.adjust)(e/i))*i)),e}function ee(e,t,i){const n=Math.abs(t-e)/i,o=n-A(n);return o>0?T(Math.abs((0,d.adjust)((0,r.getLog)(o,10)))):0}const te=b.default.inherit({_toggleParentsScrollSubscription(){},_eventsMap:{onValueChanged:{name:B}},_rootClassPrefix:"dxrs",_rootClass:"dxrs-range-selector",_dataIsReady:function(){return this._dataIsLoaded()},_initialChanges:["DATA_SOURCE","VALUE"],_themeDependentChanges:["MOSTLY_TOTAL"],_themeSection:"rangeSelector",_fontFields:["scale.label.font","sliderMarker.font"],_setDeprecatedOptions(){this.callBase(),(0,a.extend)(this._deprecatedOptions,{"behavior.callValueChanged":{since:"23.1",message:'Use the "behavior.valueChangeMode" property instead'},"scale.aggregateByCategory":{since:"23.1",message:"Use the aggregation.enabled property"}})},_initCore:function(){const e=this,t=e._renderer,i=t.root;i.css({"touch-action":"pan-y"}),e._clipRect=t.clipRect();const n=t.g().attr({class:"dxrs-view"}).append(i),a=t.g().attr({class:"dxrs-slidersContainer","clip-path":e._clipRect.id}).append(i),s=t.g().attr({class:"dxrs-scale","clip-path":e._clipRect.id}).append(i),l=t.g().attr({class:"dxrs-scale-elements","clip-path":e._clipRect.id}).append(i),d=t.g().attr({class:"dxrs-scale-breaks"}).append(i),u=t.g().attr({class:"dxrs-trackers"}).append(i);e._axis=new ae({renderer:t,root:s,scaleBreaksGroup:d,labelsAxesGroup:l,updateSelectedRange:function(t,i){e.setValue((0,r.convertVisualRangeObject)(t),i)},incidentOccurred:e._incidentOccurred}),e._rangeView=new m.RangeView({renderer:t,root:n,translator:e._axis.getTranslator()}),e._slidersController=new _.SlidersController({renderer:t,root:a,trackersGroup:u,updateSelectedRange:function(t,i,n){e._rangeOption||e.option(k,(0,r.convertVisualRangeObject)(t,(0,o.isPlainObject)(e._options.silent(k)))),e._eventTrigger(B,{value:(0,r.convertVisualRangeObject)(t),previousValue:(0,r.convertVisualRangeObject)(i),event:n})},axis:e._axis,translator:e._axis.getTranslator()}),e._tracker=new f.Tracker({renderer:t,controller:e._slidersController})},_getDefaultSize:function(){return{width:400,height:160}},_disposeCore:function(){this._axis.dispose(),this._slidersController.dispose(),this._tracker.dispose()},_applySize:function(e){this._clientRect=e.slice(),this._change(["MOSTLY_TOTAL"])},_optionChangesMap:{scale:"SCALE",value:"VALUE",dataSource:"DATA_SOURCE"},_optionChangesOrder:["SCALE","DATA_SOURCE"],_change_SCALE:function(){this._change(["MOSTLY_TOTAL"])},_setValueByDataSource(){const e=this,t=e._options.silent(),i=e._axis;if(t.dataSource){let n=e.option("selectedRangeUpdateMode");const a=e.getValue(),s=(0,o.isDefined)(a[0])&&(0,o.isDefined)(a[1]);if((0,o.isDefined)(n)?(n=(0,r.normalizeEnum)(n),e.__skipAnimation=!0):s&&!e._dataSourceIsAsync&&(n=z),"auto"===n&&s){const e=i.allScaleSelected(a);n=e.startValue&&e.endValue?z:e.endValue?N:H}if(n===z)t[k]=null;else if(n===N&&s){const n=e.getValue();e.__skipAnimation=!0,t[k]={length:i.getVisualRangeLength({minVisible:n[0],maxVisible:n[1]})}}else n===H&&(e.__skipAnimation=!0)}e._dataSourceIsAsync=void 0},_change_DATA_SOURCE:function(){this._options.silent("dataSource")&&this._updateDataSource()},_customChangesOrder:["MOSTLY_TOTAL","VALUE","SLIDER_SELECTION"],_change_MOSTLY_TOTAL:function(){this._applyMostlyTotalChange()},_change_SLIDER_SELECTION:function(){const e=this._options.silent(k);this._slidersController.setSelectedRange(e&&(0,r.getVizRangeObject)(e))},_change_VALUE:function(){const e=this,t=e._rangeOption;e._dataSourceIsAsync=!e._dataIsReady(),t&&(e._options.silent(k,t),e.setValue(t))},_validateRange:function(e,t){const i=e=>(0,o.isDefined)(e)&&!this._axis.getTranslator().isValid(e);this._dataIsReady()&&(i(e)||i(t))&&this._incidentOccurred("E2203")},_applyChanges:function(){const e=this,t=e._options.silent(k);e._changes.has("VALUE")&&t&&(e._rangeOption=t),e.callBase.apply(e,arguments),e._rangeOption=null,e.__isResizing=e.__skipAnimation=!1},_applyMostlyTotalChange:function(){const e=this,t=e._renderer,i=e._clientRect;let n;const o={left:i[0],top:i[1],width:i[2]-i[0],height:i[3]-i[1]};(e.__isResizing||e.__skipAnimation)&&(n=t.animationEnabled(),t.updateAnimationOptions({enabled:!1})),e._clipRect.attr({x:i[0],y:i[1],width:i[2]-i[0],height:i[3]-i[1]}),e._axis.getTranslator().update(new u.Range,o,{isHorizontal:!0}),e._updateContent({left:i[0],top:i[1],width:i[2]-i[0],height:i[3]-i[1]}),(e.__isResizing||e.__skipAnimation)&&t.updateAnimationOptions({enabled:n}),e._drawn()},_dataSourceChangedHandler:function(){this._setValueByDataSource(),this._requestChange(["MOSTLY_TOTAL"])},_completeSeriesDataSourceCreation(e,t){const i=this._clientRect,n={left:i[0],top:i[1],width:i[2]-i[0],height:i[3]-i[1]};this._axis.updateOptions((0,a.extend)({},e,{isHorizontal:!0,label:{}})),t.isShowChart()&&this._axis.setMarginOptions(t.getMarginOptions(n)),this._axis.updateCanvas(n),t.createPoints()},_updateContent:function(e){const t=this,i=t.option("chart"),n=t._createSeriesDataSource(i),a=!(n&&n.isShowChart()||t.option("background.image.url")),s=function(e,t,i,n){let a=0,s=(0,h.correctValueType)((0,r.normalizeEnum)(e.valueType));const l=function(t,n){const s=t===O?"start":"end";(0,o.isDefined)(e[t])&&(a=n(e[t]),(0,o.isDefined)(a)?e[t]=a:(e[t]=void 0,i("E2202",[s])))};s=t||s,s||(s=G(e.startValue,e.endValue)||"numeric"),(s===L||e.categories)&&(e.type=M,s=L),e.containerColor=n,e.valueType=s,e.dataType=s;const d=(0,h.getParser)(s);return l(O,d),l("endValue",d),U(e,10,i),e.type||(e.type="continuous"),e.parser=d,e.type===R&&(e.minorTick.visible=!1,e.minorTickInterval=e.minRange,e.marker.visible=!1,e.maxRange=void 0),e.forceUserTickInterval|=(0,o.isDefined)(e.tickInterval)&&!(0,o.isDefined)(e.axisDivisionFactor),e.axisDivisionFactor=(0,o.isDefined)(e.axisDivisionFactor)?e.axisDivisionFactor:30,e.minorAxisDivisionFactor=(0,o.isDefined)(e.minorAxisDivisionFactor)?e.minorAxisDivisionFactor:15,e}(t._getOption("scale"),n&&n.getCalculatedValueType(),t._incidentOccurred,this._getOption("containerBackgroundColor",!0));n&&t._completeSeriesDataSourceCreation(s,n);const d=function(e,t){let i,n,a,s,l,d=!1,c=t.startValue,h=t.endValue,p=e?e.getBoundRange().arg:new u.Range;const g="datetime"===t.valueType,_=Y(t),f=t.minRange;return t.type===M&&(l=new u.Range({minVisible:c,maxVisible:h}),l.addRange(p),p=l,a=e?e.argCategories:t.categories||c&&h&&[c,h],a=a||[],t._categoriesInfo=s=(0,r.getCategoriesInfo)(a,c,h)),t.type===R&&(c=t.startValue=J(t.startValue,g,f,_),h=t.endValue=J(t.endValue,g,f,_),p.minVisible=J(p.minVisible,g,f,_),p.maxVisible=J(p.maxVisible,g,f,_),p.min=J(p.min,g,f,_),p.max=J(p.max,g,f,_)),(0,o.isDefined)(c)&&(0,o.isDefined)(h)?(d=s?s.inverted:c>h,i=s?s.start:d?h:c,n=s?s.end:d?c:h):(0,o.isDefined)(c)||(0,o.isDefined)(h)?(i=c,n=h):s&&(i=s.start,n=s.end),p.addRange({invert:d,min:i,max:n,minVisible:i,maxVisible:n,dataType:t.valueType}),p.addRange({categories:e?void 0:a,base:t.logarithmBase,axisType:t.type,dataType:t.valueType}),e&&p.sortCategories(a),p}(n,s),c=q(s,e.width,t._incidentOccurred,d),p=n&&n.isShowChart()&&n.getThemeManager();var _;p&&U(i&&i.valueAxis,p.getOptions("valueAxis").logarithmBase,t._incidentOccurred),Q(s,n,d,c,(_=e.width,function(e,t,i,n,a){return t&&e&&(!(0,o.isDefined)(a)||a.years||a.months>=6||_/50<T((n-i)/l.default.dateToMilliseconds("year"))+1)&&(t=!1),t})),function(e,t){let i=t.minorTickInterval||t.tickInterval;"datetime"===t.valueType&&(i=l.default.dateToMilliseconds(i)),e.addRange({interval:i})}(d,s);const f=t._prepareSliderMarkersOptions(s,e.width,c,d),m=function(e,t,i,n,a){let s,r,l,d,u,c=0,h=0;const p="semidiscrete"===t.type?t.customTicks:a.ticks;let g,_;return l=(n=n||{}).left,d=n.right,u=i.placeholderHeight,i.visible&&(s=W(e,t.startValue,i),r=W(e,t.endValue,i),void 0===u&&(u=E(s,r))),t.label.visible&&(g=(0,o.isDefined)(t.startValue)?p[0]:void 0,_=(0,o.isDefined)(t.endValue)?p[p.length-1]:void 0,c=$(e,g,t,a),h=$(e,_,t,a)),l=void 0!==l?l:c,d=(void 0!==d?d:h)||1,{left:l,right:d,top:u||0,bottom:0}}(t._renderer,s,f,t.option("indent"),c),v={left:e.left+m.left,top:e.top+m.top,width:e.left+m.left+E(e.width-m.left-m.right,1),height:E(a?g.HEIGHT_COMPACT_MODE:e.height-m.top-m.bottom-K(t._renderer,s,j(s),c),0),right:0,bottom:0};t._axis.update(s,a,v,d,n),s.minorTickInterval=s.isEmpty?0:s.minorTickInterval,t._updateElements(s,f,a,v,n),p&&p.dispose()},_updateElements:function(e,t,i,n,o){const a=this,s=a._getOption("behavior"),r=a._getOption("shutter"),l=e.type!==R;r.color=r.color||a._getOption(V,!0),a._rangeView.update(a.option("background"),a._themeManager.theme("background"),n,i,s.animationEnabled&&a._renderer.animationEnabled(),o),a._isUpdating=!0,a._slidersController.update([n.top,n.top+n.height],s,i,a._getOption("sliderHandle"),t,r,{minRange:l?a.option("scale.minRange"):void 0,maxRange:l?a.option("scale.maxRange"):void 0},a._axis.getFullTicks(),a._getOption("selectedRangeColor",!0)),a._requestChange(["SLIDER_SELECTION"]),a._isUpdating=!1,a._tracker.update(!a._axis.getTranslator().getBusinessRange().isEmpty(),s)},_createSeriesDataSource:function(e){const t=this;let i;const n=t._dataSourceItems(),o=t._getOption("scale"),s=o.valueType||G(o.startValue,o.endValue),l=new c.Axis({renderer:t._renderer,axisType:"xyAxes",drawingType:"linear"});return l.updateOptions({isHorizontal:!1,label:{},categoriesSortingMethod:t._getOption("chart").valueAxis.categoriesSortingMethod}),(n||e&&e.series)&&(e=(0,a.extend)({},e,{theme:t.option("theme")}),i=new v.SeriesDataSource({renderer:t._renderer,dataSource:n,valueType:(0,r.normalizeEnum)(s),axisType:o.type,chart:e,dataSourceField:t.option("dataSourceField"),incidentOccurred:t._incidentOccurred,categories:o.categories,argumentAxis:t._axis,valueAxis:l})),i},_prepareSliderMarkersOptions:function(e,t,i,n){const a=this,s=i.minorTickInterval,r=i.tickInterval;let d=r;const u=e.endValue,c=e.startValue,h=a._getOption("sliderMarker"),g=!a._getOption("behavior").snapToTicks,_=e.type===M,f=e.valueType===P;return h.borderColor=a._getOption(V,!0),h.format||n.isEmpty()||(g&&(0,o.isNumeric)(e.startValue)&&(h.format={type:"fixedPoint",precision:ee(c,u,t)}),f&&!_&&((0,o.isDefined)(s)&&0!==s&&(d=function(e,t,i){let n=l.default.getDateUnitInterval(t);const o=l.default.getDateUnitInterval(e),a=l.default.dateUnitIntervals.indexOf(n);return i&&n===o&&a>0&&(n=l.default.dateUnitIntervals[a-1]),n}(r,s,g)),e.marker.visible?h.format=l.default.getDateFormatByTickInterval(d):(0,o.isDefined)(c)&&(0,o.isDefined)(u)&&(h.format=p.default.getDateFormatByTickInterval(c,u,d))),f&&_&&i.ticks.length&&(h.format=p.default.getDateFormatByTicks(i.ticks))),h},getValue:function(){return(0,r.convertVisualRangeObject)(this._slidersController.getSelectedRange())},setValue:function(e,t){const i=(0,r.getVizRangeObject)(e);!this._isUpdating&&e&&(this._validateRange(i.startValue,i.endValue),!(0,r.rangesAreEqual)(i,this._slidersController.getSelectedRange())&&this._slidersController.setSelectedRange(i,t))},_setContentSize:function(){this.__isResizing=2===this._changes.count(),this.callBase.apply(this,arguments)}});function ie(){return 1}function ne(e){return e%2==1?-A(e/2):-e/2}function oe(e,t,i,n){function o(o){2===o.length&&y.default.areLabelsOverlap(t[o[0]],t[o[1]],i,n)&&e[o[0]].removeLabel()}function a(t){const i=[];for(let n=t;i.length<2&&n<e.length;n++)e[n].label&&i.push(n);return i}e.length<3||(o(a(0)),o(a(e.length-2).reverse()))}function ae(e){const t=this;t._axis=new c.Axis({renderer:e.renderer,axesContainerGroup:e.root,scaleBreaksGroup:e.scaleBreaksGroup,labelsAxesGroup:e.labelsAxesGroup,incidentOccurred:e.incidentOccurred,axisType:"xyAxes",drawingType:"linear",widgetClass:"dxrs",axisClass:"range-selector",isArgumentAxis:!0,getTemplate(){}}),t._updateSelectedRangeCallback=e.updateSelectedRange,t._axis.getAxisSharpDirection=t._axis.getSharpDirectionByCoords=ie,t._axis.getTickStartPositionShift=ne,t._axis._checkShiftedLabels=oe}(0,s.each)(["selectedRangeColor","containerBackgroundColor","sliderMarker","sliderHandle","shutter","background","behavior","chart","indent"],(function(e,t){te.prototype._optionChangesMap[t]="MOSTLY_TOTAL"})),ae.prototype={constructor:ae,update:function(e,t,i,n,o){const a=this._axis;a.updateOptions(function(e,t,i,n){return e.marker.label.font=e.label.font,e.color=e.marker.color=e.tick.color,e.opacity=e.marker.opacity=e.tick.opacity,e.width=e.marker.width=e.tick.width,e.placeholderSize=(e.placeholderHeight||0)+n,e.argumentType=e.valueType,e.visible=t,e.isHorizontal=!0,e.calculateMinors=!0,e.semiDiscreteInterval=e.minRange,t||(e.minorTick.length=e.tick.length=i),e.label.indentFromAxis=e.label.topIndent+n,e}(e,t,i.height,i.height/2-T(e.width/2))),a.validate(),a.setBusinessRange(n,!0),void 0!==o&&o.isShowChart()&&a.setMarginOptions(o.getMarginOptions(i)),a.draw(i),a.shift({left:0,bottom:-i.height/2+i.top}),a.getMarkerTrackers()&&function(e,t,i){function n(t){const n=t.target.range,o=e.minRange?l.default.addInterval(n.startValue,e.minRange):void 0,a=e.maxRange?l.default.addInterval(n.startValue,e.maxRange):void 0;o&&o>n.endValue||a&&a<n.endValue||i(n,t)}(0,s.each)(t,(function(e,t){t.on("dxpointerdown",n)}))}(e,a.getMarkerTrackers(),this._updateSelectedRangeCallback),a.drawScaleBreaks({start:i.top,end:i.top+i.height})},visualRange:function(){},getViewport:function(){return{}},allScaleSelected(e){const{startValue:t,endValue:i}=this._axis.visualRange();return{startValue:e[0].valueOf()===t.valueOf(),endValue:e[1].valueOf()===i.valueOf()}},getOptions(){return this._axis.getOptions()||{}}},(0,s.each)(c.Axis.prototype,(e=>{"constructor"!==e&&"_"!==e[0]&&(0,o.isFunction)(c.Axis.prototype[e])&&!(e in ae.prototype)&&(ae.prototype[e]=function(){const t=this._axis;return t[e].apply(t,arguments)})})),(0,n.default)("dxRangeSelector",te);t.default=te;te.addPlugin(x.plugin),te.addPlugin(w.plugin),te.addPlugin(S.plugin),te.addPlugin(D.plugin),e.exports=t.default,e.exports.default=t.default},34735:function(e,t){function i(e,t){return void 0!==e?e:t}function n(e){this._params=e,this._clipRect=e.renderer.clipRect(),e.root.attr({"clip-path":this._clipRect.id})}t.RangeView=n,n.prototype={constructor:n,update:function(e,t,n,o,a,s){const r=this._params.renderer,l=this._params.root,d=n.width-n.left;let u;e=e||{},l.clear(),this._clipRect.attr({x:n.left,y:n.top,width:d,height:n.height}),o||(i(e.visible,t.visible)&&(e.color&&r.rect(n.left,n.top,d+1,n.height).attr({fill:i(e.color,t.color),class:"dx-range-selector-background"}).append(l),e.image&&e.image.url&&r.image(n.left,n.top,d+1,n.height,e.image.url,i(e.image.location,t.image.location)).append(l)),s&&s.isShowChart()&&(u=r.g().attr({class:"dxrs-series-group"}).append(l),function(e,t,i,n){const o=t.getSeries();if(!o.length)return;const a=o[0].getValueAxis();a.updateCanvas({top:i.top,bottom:0,height:i.height+i.top}),t.adjustSeriesDimensions();const s=t.getBoundRange().val;s.sortCategories(a.getCategoriesSorter()),a.setBusinessRange(s),o.forEach((t=>{t._extGroups.seriesGroup=t._extGroups.labelsGroup=e,t.draw(n)}))}(u,s,n,a)))}}},68006:function(e,t,i){t.SeriesDataSource=void 0;var n=i(66151),o=i(11348),a=i(11528),s=i(52576),r=i(21274),l=i(28779),d=i(99857),u=i(39104),c=i(45647);const h=function(e){const t=this,i=t._themeManager=(n=e.chart,new c.ThemeManager({options:n,themeSection:"rangeSelector.chart",fontFields:["commonSeriesSettings.label.font"]}));var n;i.setTheme(e.chart.theme);const o=i.getOptions("topIndent"),a=i.getOptions("bottomIndent");t._indent={top:o>=0&&o<1?o:0,bottom:a>=0&&a<1?a:0},t._valueAxis=i.getOptions("valueAxisRangeSelector")||{},t._hideChart=!1,t._series=t._calculateSeries(e),t._seriesFamilies=[]};t.SeriesDataSource=h,h.prototype={constructor:h,_calculateSeries:function(e){const t=this,i=[];let o,a;const r=e.dataSource||[];let d;const c=t._themeManager,h=c.getOptions("seriesTemplate");let p,g=h?(0,l.processSeriesTemplate)(h,r):e.chart.series;const _=t._valueAxis;let f,m,v;for(e.dataSource&&!g&&(p=e.dataSourceField||"arg",g={argumentField:p,valueField:p},t._hideChart=!0),g=Array.isArray(g)?g:g?[g]:[],f=0;f<g.length;f++)o=(0,s.extend)(!0,{},g[f]),o.rotated=!1,a=c.getOptions("series",o,g.length),a.argumentField=a.argumentField||e.dataSourceField,a.name||(a.name="Series "+(f+1).toString()),r&&r.length>0&&(m=new n.Series({renderer:e.renderer,argumentAxis:e.argumentAxis,valueAxis:e.valueAxis,incidentOccurred:e.incidentOccurred},a),i.push(m));if(i.length)for(v={groups:[{series:i,valueAxis:e.valueAxis,valueOptions:{type:_.type,valueType:p?e.valueType:_.valueType}}],argumentOptions:{categories:e.categories,argumentType:e.valueType,type:e.axisType}},d=(0,u.validateData)(r,v,e.incidentOccurred,c.getOptions("dataPrepareSettings")),t.argCategories=v.categories,f=0;f<i.length;f++)i[f].updateData(d[i[f].getArgumentField()]);return i},createPoints(){if(0===this._series.length)return;const e=this._series,t=new d.Range,i=e[0].getArgumentAxis(),n=this._themeManager,s=n.getOptions("negativesAsZeroes"),l=n.getOptions("negativesAsZeros");e.forEach((function(e){t.addRange(e.getArgumentRange())})),i.getTranslator().updateBusinessRange(t),e.forEach((function(e){e.createPoints()})),this._seriesFamilies=function(e,t,i,n,a){const s=[],l=[];return(0,r.each)(e,(function(e,t){l.includes(t.type)||l.push(t.type)})),(0,r.each)(l,(function(r,l){const d=new o.SeriesFamily({type:l,minBubbleSize:t,maxBubbleSize:i,barGroupPadding:n.barGroupPadding,barGroupWidth:n.barGroupWidth,negativesAsZeroes:a});d.add(e),d.adjustSeriesValues(),s.push(d)})),s}(e,n.getOptions("minBubbleSize"),n.getOptions("maxBubbleSize"),{barGroupPadding:n.getOptions("barGroupPadding"),barGroupWidth:n.getOptions("barGroupWidth")},(0,a.isDefined)(s)?s:l)},adjustSeriesDimensions:function(){(0,r.each)(this._seriesFamilies,(function(e,t){t.adjustSeriesDimensions()}))},getBoundRange:function(){const e=this;let t;const i=e._valueAxis,n=new d.Range({min:i.min,minVisible:i.min,max:i.max,maxVisible:i.max,axisType:i.type,base:i.logarithmBase}),o=new d.Range({});let s,l,u,c;return(0,r.each)(e._series,(function(e,i){t=i.getRangeData(),n.addRange(t.val),o.addRange(t.arg)})),n.isEmpty()||o.isEmpty()||(u=i.inverted?e._indent.top:e._indent.bottom,c=i.inverted?e._indent.bottom:e._indent.top,s=n.max-n.min,l=((0,a.isNumeric)(n.maxVisible)?n.maxVisible:n.max)-((0,a.isNumeric)(n.minVisible)?n.minVisible:n.min),(0,a.isDate)(n.min)?n.min=new Date(n.min.valueOf()-s*u):n.min-=s*u,(0,a.isDate)(n.max)?n.max=new Date(n.max.valueOf()+s*c):n.max+=s*c,(0,a.isNumeric)(l)&&(n.maxVisible=n.maxVisible?n.maxVisible+l*c:void 0,n.minVisible=n.minVisible?n.minVisible-l*u:void 0),n.invert=i.inverted),{arg:o,val:n}},getMarginOptions:function(e){const t=Math.min(e.width,e.height)*this._themeManager.getOptions("maxBubbleSize");return this._series.reduce((function(e,i){const n=i.getMarginOptions();return!0===n.processBubbleSize&&(n.size=t),(0,l.mergeMarginOptions)(e,n)}),{})},getSeries:function(){return this._series},isEmpty:function(){return 0===this.getSeries().length},isShowChart:function(){return!this._hideChart},getCalculatedValueType:function(){const e=this._series[0];return null==e?void 0:e.argumentType},getThemeManager:function(){return this._themeManager}}},79421:function(e,t,i){t.default=void 0;var n=i(62381),o=s(i(67518)),a=s(i(85991));function s(e){return e&&e.__esModule?e:{default:e}}const r=n.utils.animationSettings;function l(e,t){const i=this;i._translator=e.translator,i._sliderGroup=e.renderer.g().attr({class:"slider"}).append(e.root),i._line=e.renderer.path(null,"line").append(i._sliderGroup),i._marker=new o.default(e.renderer,i._sliderGroup,1===t),i._tracker=e.renderer.rect().attr({class:"slider-tracker",fill:"#000000",opacity:1e-4}).css({cursor:"w-resize"}).append(e.trackersGroup)}l.prototype={constructor:l,cancelAnimation:function(){this._sliderGroup.stopAnimation(),this._tracker.stopAnimation()},applyPosition:function(e){const t=this,i=t._sliderGroup,n=t._tracker,o={translateX:t._position};t._marker.setPosition(t._position),e?(i.animate(o,r),n.animate(o,r)):(i.attr(o),n.attr(o))},_setValid:function(e){this._marker.setValid(e),this._line.attr({stroke:this._colors[Number(e)]})},_setText:function(e){this._marker.setText(e)},update:function(e,t,i){const n=this;n._formatOptions={format:i.format,customizeText:i.customizeText},n._marker.applyOptions(i,n._translator.getScreenRange()),n._colors=[i.invalidRangeColor,t.color],n._sliderGroup.attr({translateY:e[0]}),n._line.attr({"stroke-width":t.width,stroke:t.color,"stroke-opacity":t.opacity,sharp:"h",points:[0,0,0,e[1]-e[0]]});const o=(s=t.width,a.default.touchEvents||a.default.pointerEvents?20:8<s?s:8);var s;n._tracker.attr({x:-o/2,y:0,width:o,height:e[1]-e[0],translateY:e[0]})},toForeground:function(){this._sliderGroup.toForeground()},getSliderTracker:function(){return this._tracker},getPosition:function(){return this._position},setDisplayValue:function(e){this._value=e,this._setText((0,n.formatValue)(e,this._formatOptions))},setOverlapped:function(e){this._marker.setOverlapped(e)},getValue:function(){return this._value},on:function(e,t){this._tracker.on(e,t),this._marker.getTracker().on(e,t)},getCloudBorder:function(){return this._marker.getBorderPosition()},dispose:function(){this._marker.dispose()}};t.default=l;e.exports=t.default,e.exports.default=t.default},67518:function(e,t,i){t.default=void 0;var n=i(28779);const o=i(62381).consts.pointerSize;function a(e,t,i){const n=this;n._isLeftPointer=i,n._isOverlapped=!1,n._group=e.g().attr({class:"slider-marker"}).append(t),n._area=e.path(null,"area").append(n._group),n._label=e.text().attr({align:"left"}).append(n._group),n._tracker=e.rect().attr({class:"slider-marker-tracker",fill:"#000000",opacity:1e-4}).css({cursor:"pointer"}).append(n._group),n._border=e.rect(0,0,1,0)}a.prototype={constructor:a,_getRectSize:function(e){return{width:Math.round(2*this._paddingLeftRight+e.width),height:Math.round(2*this._paddingTopBottom+e.height)}},_getTextSize:function(){const e=this._label.getBBox();return!this._textHeight&&isFinite(e.height)&&(this._textHeight=e.height),{width:e.width,height:this._textHeight,y:e.y}},_getAreaPointsInfo:function(e){const t=this,i=t._getRectSize(e),n=i.width,a=i.height;let s=-n,r=0,l=o,d=0,u=-o;const c=t._position,h=t._isLeftPointer,p=function(){s++,r++,l++,d++,u++},g=function(){l>r?l=r:u<s&&(u=s),h&&p()};let _=c;return h?c>t._range[1]-n?(r=-c+t._range[1],s=r-n,g(),_+=s):(s=u=0,r=n):c-t._range[0]<n?(s=-(c-t._range[0]),r=s+n,g(),_+=r):(l=0,p()),t._borderPosition=_,{offset:s,isCut:(!h||d!==u)&&(h||d!==l),points:[s,0,r,0,r,a,l,a,d,a+o,u,a,s,a]}},_update:function(){const e=this;let t;clearTimeout(e._timeout),e._label.attr({text:e._text||""});const i=e._getTextSize(),n=e._getRectSize(i);function a(t,i){i=i||e._getRectSize(t),e._group.attr({translateY:-(i.height+o)});const n=e._getAreaPointsInfo(t),a=n.points,s=n.offset;e._area.attr({points:a}),e._border.attr({x:e._isLeftPointer?a[0]-1:a[2],height:n.isCut?i.height:i.height+o}),e._tracker.attr({translateX:s,width:i.width,height:i.height+o}),e._label.attr({translateX:e._paddingLeftRight+s,translateY:i.height/2-(t.y+t.height/2)})}t=e._textSize||i,t=e._textSize=i.width>t.width||i.height>t.height?i:t,e._timeout=setTimeout((function(){a(i,n),e._textSize=i}),75),a(t)},setText:function(e){this._text=e},setPosition:function(e){this._position=e,this._update()},applyOptions:function(e,t){const i=this;i._range=t,i._paddingLeftRight=e.paddingLeftRight,i._paddingTopBottom=e.paddingTopBottom,i._textHeight=null,i._colors=[e.invalidRangeColor,e.color],i._area.attr({fill:e.color}),i._border.attr({fill:e.borderColor}),i._label.css((0,n.patchFontOptions)(e.font)),i._update()},getTracker:function(){return this._tracker},setValid:function(e){this._area.attr({fill:this._colors[Number(e)]})},setColor:function(e){this._area.attr({fill:e})},dispose:function(){clearTimeout(this._timeout)},setOverlapped:function(e){const t=this;t._isOverlapped!==e&&(e?t._border.append(t._group):t._isOverlapped&&t._border.remove(),t._isOverlapped=e)},getBorderPosition:function(){return this._borderPosition}};t.default=a;e.exports=t.default,e.exports.default=t.default},9331:function(e,t,i){t.SlidersController=m;var n,o=i(17781),a=i(62381),s=(n=i(79421))&&n.__esModule?n:{default:n},r=i(28779),l=i(11528),d=i(50254);const u=a.utils.animationSettings,c=a.consts.emptySliderMarkerText;function h(e,t,i,n){return[e,t,i,t,i,n,e,n]}function p(e,t){return e<t}function g(e,t){return e>t}function _(e,t){let i,n=0,o=t?t.length-1:0,a=e;for(;o-n>1;){if(i=n+o>>1,a=t[i],a===e)return e;e<a?o=i:n=i}return t&&(a=t[e-t[n]<=t[o]-e?n:o]),a}function f(){this._lastSelectedRange=this.getSelectedRange(),delete this._processSelectionChanged}function m(e){const t=this,i={renderer:e.renderer,root:e.root,trackersGroup:e.trackersGroup,translator:e.translator};t._params=e,t._areaTracker=e.renderer.path(null,"area").attr({class:"area-tracker",fill:"#000000",opacity:1e-4}).append(e.trackersGroup),t._selectedAreaTracker=e.renderer.path(null,"area").attr({class:"selected-area-tracker",fill:"#000000",opacity:1e-4}).append(e.trackersGroup),t._shutter=e.renderer.path(null,"area").append(e.root),t._sliders=[new s.default(i,0),new s.default(i,1)],t._processSelectionChanged=f}m.prototype={constructor:m,dispose:function(){this._sliders[0].dispose(),this._sliders[1].dispose()},getTrackerTargets:function(){return{area:this._areaTracker,selectedArea:this._selectedAreaTracker,sliders:this._sliders}},_processSelectionChanged:function(e){const t=this,i=t.getSelectedRange();(0,r.rangesAreEqual)(i,t._lastSelectedRange)||(t._params.updateSelectedRange(i,t._lastSelectedRange,e),t._lastSelectedRange=i)},update:function(e,t,i,n,o,a,s,l,d){const u=this,c=u._params.translator.getScreenRange();u._verticalRange=e,u._minRange=s.minRange,u._maxRange=s.maxRange,u._animationEnabled=t.animationEnabled&&u._params.renderer.animationEnabled(),u._allowSlidersSwap=t.allowSlidersSwap,u._sliders[0].update(e,n,o),u._sliders[1].update(e,n,o),u._sliders[0]._position=u._sliders[1]._position=c[0],u._values=!u._params.translator.isValueProlonged&&t.snapToTicks?l:null,u._areaTracker.attr({points:h(c[0],e[0],c[1],e[1])}),u._isCompactMode=i,u._shutterOffset=n.width/2,u._updateSelectedView(a,d),u._isOnMoving="onhandlemove"===(0,r.normalizeEnum)(t.valueChangeMode)||"onmoving"===(0,r.normalizeEnum)(t.callValueChanged),u._updateSelectedRange(),u._applyTotalPosition(!1)},_updateSelectedView:function(e,t){const i={fill:null,"fill-opacity":null,stroke:null,"stroke-width":null};this._isCompactMode?(i.stroke=t,i["stroke-width"]=3,i.sharp="v"):(i.fill=e.color,i["fill-opacity"]=e.opacity),this._shutter.attr(i)},_updateSelectedRange:function(){const e=this,t=e._sliders;var i;t[0].cancelAnimation(),t[1].cancelAnimation(),e._shutter.stopAnimation(),e._params.translator.getBusinessRange().isEmpty()?(t[0]._setText(c),t[1]._setText(c),t[0]._value=t[1]._value=void 0,t[0]._position=e._params.translator.getScreenRange()[0],t[1]._position=e._params.translator.getScreenRange()[1],e._applyTotalPosition(!1),(i=e).setSelectedRange=o.noop,i._processSelectionChanged===f&&i._processSelectionChanged()):function(e){delete e.setSelectedRange}(e)},_applyTotalPosition:function(e){const t=this._sliders;e=this._animationEnabled&&e,t[0].applyPosition(e),t[1].applyPosition(e);const i=t[0].getCloudBorder()>t[1].getCloudBorder();t[0].setOverlapped(i),t[1].setOverlapped(i),this._applyAreaTrackersPosition(),this._applySelectedRangePosition(e)},_applyAreaTrackersPosition:function(){const e=this,t=e._sliders[0].getPosition(),i=e._sliders[1].getPosition();e._selectedAreaTracker.attr({points:h(t,e._verticalRange[0],i,e._verticalRange[1])}).css({cursor:Math.abs(e._params.translator.getScreenRange()[1]-e._params.translator.getScreenRange()[0]-i+t)<.001?"default":"pointer"})},_applySelectedRangePosition:function(e){const t=this,i=t._verticalRange,n=t._sliders[0].getPosition(),o=t._sliders[1].getPosition();let a,s;t._isCompactMode?s=[n+Math.ceil(t._shutterOffset),(i[0]+i[1])/2,o-Math.floor(t._shutterOffset),(i[0]+i[1])/2]:(a=t._params.axis.getVisibleArea(),s=[h(a[0],i[0],Math.max(n-Math.floor(t._shutterOffset),a[0]),i[1]),h(a[1],i[0],Math.min(o+Math.ceil(t._shutterOffset),a[1]),i[1])]),e?t._shutter.animate({points:s},u):t._shutter.attr({points:s})},getSelectedRange:function(){return{startValue:this._sliders[0].getValue(),endValue:this._sliders[1].getValue()}},setSelectedRange:function(e,t){e=e||{};const i=this,n=i._params.translator,o=n.getBusinessRange(),a="discrete"===o.axisType?function(e,t){return e<t}:function(e,t){return e<=t};let{startValue:s,endValue:u}=(0,r.adjustVisualRange)({dataType:o.dataType,axisType:o.axisType,base:o.base},{startValue:n.isValid(e.startValue)?n.getCorrectValue(e.startValue,1):void 0,endValue:n.isValid(e.endValue)?n.getCorrectValue(e.endValue,-1):void 0,length:e.length},{min:o.minVisible,max:o.maxVisible,categories:o.categories});s=(0,l.isNumeric)(s)?(0,d.adjust)(s):s,u=(0,l.isNumeric)(u)?(0,d.adjust)(u):u;const c=a(n.to(s,-1),n.to(u,1))?[s,u]:[u,s];i._sliders[0].setDisplayValue(c[0]),i._sliders[1].setDisplayValue(c[1]),i._sliders[0]._position=n.to(c[0],-1),i._sliders[1]._position=n.to(c[1],1),i._applyTotalPosition(!0),i._processSelectionChanged(t)},beginSelectedAreaMoving:function(e){const t=this,i=t._sliders,n=(i[0].getPosition()+i[1].getPosition())/2-e;let o=e;return a.complete=function(e){t._dockSelectedArea(e)},a;function a(e,a){e!==o&&e>o==e>(i[0].getPosition()+i[1].getPosition())/2-n&&t._moveSelectedArea(e+n,!1,a),o=e}},_dockSelectedArea:function(e){const t=this._params.translator,i=this._sliders;i[0]._position=t.to(i[0].getValue(),-1),i[1]._position=t.to(i[1].getValue(),1),this._applyTotalPosition(!0),this._processSelectionChanged(e)},moveSelectedArea:function(e,t){this._moveSelectedArea(e,!0,t),this._dockSelectedArea(t)},_moveSelectedArea:function(e,t,i){const n=this,o=n._params.translator,a=n._sliders,s=a[1].getPosition()-a[0].getPosition();let r=e-s/2,l=e+s/2;r<o.getScreenRange()[0]&&(r=o.getScreenRange()[0],l=r+s),l>o.getScreenRange()[1]&&(l=o.getScreenRange()[1],r=l-s);const d=_(o.from(r,-1),n._values);a[0].setDisplayValue(d),a[1].setDisplayValue(_(o.from(o.to(d,-1)+s,1),n._values)),a[0]._position=r,a[1]._position=l,n._applyTotalPosition(t),n._isOnMoving&&n._processSelectionChanged(i)},placeSliderAndBeginMoving:function(e,t,i){const n=this,o=n._params.translator,a=n._sliders,s=e<t?0:1,r=s>0?1:-1,l=s>0?g:p,d=s>0?p:g;let u;const c=[],h=[];h[s]=o.from(e,r),h[1-s]=o.from(t,-r),c[1-s]=t,o.isValueProlonged&&(l(e,o.to(h[s],r))&&(h[s]=o.from(e,-r)),l(t,o.to(h[s],-r))&&(h[1-s]=h[s])),n._minRange&&(u=o.to(o.add(_(h[s],n._values),n._minRange,-r),-r),l(t,u)&&(h[1-s]=o.add(h[s],n._minRange,-r)),u=o.to(o.add(o.getRange()[1-s],n._minRange,r),-r),d(e,u)&&(h[1-s]=o.getRange()[1-s],h[s]=o.add(h[1-s],n._minRange,r),c[1-s]=e)),h[0]=_(h[0],n._values),h[1]=_(h[1],n._values),c[s]=o.to(h[s],r),a[0].setDisplayValue(h[0]),a[1].setDisplayValue(h[1]),a[0]._position=c[0],a[1]._position=c[1],n._applyTotalPosition(!0),n._isOnMoving&&n._processSelectionChanged(i);const f=n.beginSliderMoving(1-s,t);return a[1-s]._sliderGroup.stopAnimation(),n._shutter.stopAnimation(),f(t),f},beginSliderMoving:function(e,t){const i=this,n=i._params.translator,o=i._sliders,a=n.getScreenRange()[0],s=n.getScreenRange()[1];let r=e;const d=o[1-r].getPosition();let u=t,c=r>0?1:-1,h=r>0?p:g,f=r>0?g:p,m=o[r].getPosition()-t,v=h(o[r].getPosition(),t)?-m:m;return C.complete=function(e){o[r]._setValid(!0),i._dockSelectedArea(e)},C;function C(e,t){let p,g,C,y,b;if(e!==u&&(h(e+v,d)&&(p=i._allowSlidersSwap,p&&!n.isValueProlonged&&i._minRange&&(p=n.isValid(n.add(o[1-r].getValue(),i._minRange,-c))),p&&(i._changeMovingSlider(r),r=1-r,c=-c,g=h,h=f,f=g,m=-c*Math.abs(m),v=-m)),f(e+m,d))){let d;y=o[r],b=o[1-r].getValue(),C=Math.max(Math.min(e+m,s),a),p=!n.isValueProlonged||!h(C,n.to(b,c)),p&&i._minRange&&(p=!h(C,n.to(n.add(b,i._minRange,c),c)),p||(d=n.add(b,i._minRange,c))),p&&i._maxRange&&(p=!f(C,n.to(n.add(b,i._maxRange,c),c)),p||(d=n.add(b,i._maxRange,c))),y._setValid(p),y.setDisplayValue(p?_(n.from(C,c),i._values):(0,l.isDefined)(d)?d:y.getValue()),y._position=C,i._applyTotalPosition(!1),y.toForeground(),i._isOnMoving&&i._processSelectionChanged(t)}u=e}},_changeMovingSlider:function(e){const t=this,i=t._params.translator,n=t._sliders,o=n[1-e].getPosition(),a=e>0?1:-1;let s;n[e].setDisplayValue(_(i.from(o,a),t._values)),s=i.from(o,-a),i.isValueProlonged?s=i.from(o,a):t._minRange&&(s=i.add(s,t._minRange,-a)),n[1-e].setDisplayValue(_(s,t._values)),n[e]._setValid(!0),n[e]._marker._update(),n[0]._position=n[1]._position=o},foregroundSlider:function(e){this._sliders[e].toForeground()}}},9358:function(e,t,i){t.Tracker=b;var n=d(i(92774)),o=d(i(89797)),a=i(3104),s=d(i(64960)),r=i(21274),l=i(4785);function d(e){return e&&e.__esModule?e:{default:e}}const u=10,c=(0,a.getWindow)();function h(e){const t=e||c.event,i=t.originalEvent,n=t.touches,o=!!i&&i.pointerType,a=!!i&&i.touches,s=i&&void 0!==o&&(o===(i.MSPOINTER_TYPE_TOUCH||"touch")||o===(i.MSPOINTER_TYPE_MOUSE||"mouse")&&1===i.buttons),r=n&&n.length>0||a&&a.length>0;return 1===t.which||s||r}function p(e){const t=e.originalEvent,i=e.touches,n=t&&t.touches;return i&&i.length>1||n&&n.length>1||null}function g(e){p(e)||e.preventDefault()}function _(e){p(e)||(e.stopPropagation(),e.preventDefault())}function f(e){return e&&e.type&&0===e.type.indexOf("touch")}function m(e){const t=e.originalEvent;let i=0;return e.pageX?i=e.pageX:t&&t.pageX&&(i=t.pageX),t&&t.touches&&(t.touches.length>0?i=t.touches[0].pageX:t.changedTouches.length>0&&(i=t.changedTouches[0].pageX)),i}function v(e,t,i,n){let a,s,r=!1,l=null;const d={[o.default.move](t){let o,d;a===f(t)&&(h(t)||c(t),r&&(o=m(t),d=n(),l?l(o-d,t):i.manualRangeSelectionEnabled&&Math.abs(s-o)>=u&&(l=e.placeSliderAndBeginMoving(s-d,o-d,t))))},[o.default.up](t){let o;r&&(o=m(t),!l&&i.moveSelectedRangeByClick&&Math.abs(s-o)<u&&e.moveSelectedArea(o-n(),t),c(t))}};function c(e){r&&(r=!1,l&&(l.complete(e),l=null))}return t.on(o.default.down,(function(e){i.enabled&&h(e)&&!r&&(r=!0,a=f(e),s=m(e))})),d}function C(e,t,i,n){let a,s=!1,r=null;const l={[o.default.move](e){a===f(e)&&(h(e)||d(e),s&&(g(e),r(m(e)-n(),e)))},[o.default.up]:d};function d(e){s&&(s=!1,r.complete(e),r=null)}return t.on(o.default.down,(function(t){i.enabled&&h(t)&&!s&&(s=!0,a=f(t),r=e.beginSelectedAreaMoving(m(t)-n()),_(t))})),l}function y(e,t,i,n){let a,s=!1,l=null;const d={[o.default.move](e){a===f(e)&&(h(e)||u(e),s&&(g(e),l(m(e)-n(),e)))},[o.default.up]:u};function u(e){s&&(s=!1,l.complete(e),l=null)}return(0,r.each)(t,(function(t,r){r.on({[o.default.down](o){i.enabled&&h(o)&&!s&&(s=!0,a=f(o),l=e.beginSliderMoving(t,m(o)-n()),_(o))},[o.default.move](){l||e.foregroundSlider(t)}})})),d}function b(e){const t=this._state={},i=e.controller.getTrackerTargets();function o(){return e.renderer.getRootOffset().left}l.pointerEvents&&e.renderer.root.css({msTouchAction:"pinch-zoom"}),this._docEvents=[C(e.controller,i.selectedArea,t,o),v(e.controller,i.area,t,o),y(e.controller,i.sliders,t,o)],(0,r.each)(this._docEvents,(function(e,t){n.default.on(s.default.getDocument(),t)}))}b.prototype={constructor:b,dispose:function(){(0,r.each)(this._docEvents,(function(e,t){n.default.off(s.default.getDocument(),t)}))},update:function(e,t){const i=this._state;i.enabled=e,i.moveSelectedRangeByClick=t.moveSelectedRangeByClick,i.manualRangeSelectionEnabled=t.manualRangeSelectionEnabled}}},37755:function(e,t,i){t.default=void 0;var n,o=(n=i(78839))&&n.__esModule?n:{default:n},a=i(24339),s=i(74754),r=i(16216),l=i(85476),d=i(23277),u=i(92528);o.default.addPlugin(s.plugin),o.default.addPlugin(r.plugin),o.default.addPlugin(l.plugin),o.default.addPlugin(u.plugin),o.default.addPlugin(d.plugin),(0,a.setTooltipCustomOptions)(o.default);t.default=o.default;e.exports=t.default,e.exports.default=t.default},92585:function(e,t){t.COLOR_MODE_TARGET=t.COLOR_MODE_SOURCE=t.COLOR_MODE_NONE=t.COLOR_MODE_GRADIENT=void 0;t.COLOR_MODE_GRADIENT="gradient",t.COLOR_MODE_SOURCE="source",t.COLOR_MODE_TARGET="target",t.COLOR_MODE_NONE="none"},69359:function(e,t,i){t.default=void 0;var n,o=(n=i(2792))&&n.__esModule?n:{default:n};const a={validate:function(e,t){let i=null;return this._hasCycle(e)&&(i="E2006",t("E2006")),i},_hasCycle:function(e){return o.default.struct.hasCycle(e)}};t.default=a;e.exports=t.default,e.exports.default=t.default},2792:function(e,t){t.default=void 0;const i="white",n="gray",o={maxOfArray:function(e,t){let i=0,n=e=>e;t&&(n=t);for(let t=0;t<e.length;t++)n(e[t])>i&&(i=n(e[t]));return i}},a=function(e){const t=[];return e.forEach((e=>{-1===t.indexOf(e[0])&&t.push(e[0]),-1===t.indexOf(e[1])&&t.push(e[1])})),t},s=function(e,t){const i=[];return e.forEach((e=>{e[0]===t&&-1===i.indexOf(e[1])&&i.push(e[1])})),i},r=function(e,t){const i=[];return e.forEach((e=>{e[1]===t&&-1===i.indexOf(e[0])&&i.push(e[0])})),i},l={_hasCycle:!1,_sortedList:[],hasCycle:function(e){this._hasCycle=!1,this._sortedList=[];const t={},n=a(e);return n.forEach((e=>{t[e]={color:i}})),n.forEach((n=>{t[n].color===i&&this._depthFirstSearch(e,t,n)})),this._sortedList.reverse(),this._hasCycle},_depthFirstSearch:function(e,t,o){t[o].color=n;const a=s(e,o);for(let o=0;o<a.length;o++)t[a[o]].color===i?this._depthFirstSearch(e,t,a[o]):t[a[o]].color===n&&(this._hasCycle=!0);this._sortedList.push({name:o,lp:null,incoming:r(e,o),outgoing:s(e,o)}),t[o].color="black"},computeLongestPaths(e){const t=this._sortedList;return t.forEach((i=>{const n=r(e,i.name);if(0===n.length)i.lp=0;else{const e=[];n.forEach((i=>{e.push(t.filter((e=>e.name===i))[0].lp)})),i.lp=o.maxOfArray(e)+1}})),this._sortedList}};t.default={struct:l,routines:o,getVertices:a,getAdjacentVertices:s,getReverseAdjacentVertices:r};e.exports=t.default,e.exports.default=t.default},58864:function(e,t,i){t.layout=void 0;var n=a(i(2792)),o=a(i(69359));function a(e){return e&&e.__esModule?e:{default:e}}const s="center",r=s;t.layout={_weightPerPixel:null,_getCascadeIdx:function(e,t){const i=t.filter((t=>t.name===e))[0];return i.outgoing.length>0?i.lp:n.default.routines.maxOfArray(t.map((e=>e.lp)))},_getInWeightForNode:function(e,t){let i=0;return t.forEach((t=>{t[1]===e&&(i+=t[2])})),i},_getOutWeightForNode:function(e,t){let i=0;return t.forEach((t=>{t[0]===e&&(i+=t[2])})),i},_computeCascades:function(e){const t=n.default.struct.computeLongestPaths(e),i=n.default.routines.maxOfArray(t.map((e=>e.lp))),o=[];for(let e=0;e<i+1;e++)o.push({});return e.forEach((e=>{let i=o[this._getCascadeIdx(e[0],t)];i[e[0]]||(i[e[0]]={nodeTitle:e[0]}),i=o[this._getCascadeIdx(e[1],t)],i[e[1]]||(i[e[1]]={nodeTitle:e[1]})})),o.forEach((t=>{Object.keys(t).forEach((i=>{const n=t[i];n.inWeight=this._getInWeightForNode(n.nodeTitle,e),n.outWeight=this._getOutWeightForNode(n.nodeTitle,e),n.maxWeight=Math.max(n.inWeight,n.outWeight)}))})),o},_getWeightForCascade:function(e,t){let i=0;const n=e[t];return Object.keys(n).forEach((e=>{i+=Math.max(n[e].inWeight,n[e].outWeight)})),i},_getMaxWeightThroughCascades:function(e){const t=[];return e.forEach((e=>{let i=0;Object.keys(e).forEach((t=>{const n=e[t];i+=Math.max(n.inWeight,n.outWeight)})),t.push(i)})),n.default.routines.maxOfArray(t)},_computeNodes:function(e,t){const i=[],o=this._getMaxWeightThroughCascades(e),a=n.default.routines.maxOfArray(e.map((e=>Object.keys(e).length)));let l=t.nodePadding,d=t.height-l*(a-1);d<0&&(l=0,d=t.height-l*(a-1)),this._weightPerPixel=o/d;let u=0;return e.forEach((n=>{const a=[];let c=0;const h=Object.keys(n).length,p=this._getWeightForCascade(e,u)/this._weightPerPixel+l*(h-1);let g;g=Array.isArray(t.nodeAlign)?u<t.nodeAlign.length?t.nodeAlign[u]:r:t.nodeAlign,"bottom"===g?c=t.height-p:g===s&&(c=.5*(t.height-p)),c=Math.round(c),Object.keys(n).forEach((e=>{n[e].sort=this._sort&&Object.prototype.hasOwnProperty.call(this._sort,e)?this._sort[e]:1})),Object.keys(n).sort(((e,t)=>n[e].sort-n[t].sort)).forEach((i=>{const s=n[i],r=Math.floor(d*s.maxWeight/o),h=Math.round(u*t.width/(e.length-1))-(0===u?0:t.nodeWidth),p={};p._name=i,p.width=t.nodeWidth,p.height=r,p.x=h+t.x,p.y=c+t.y,c+=r+l,a.push(p)})),u++,i.push(a)})),i},_findRectByName:function(e,t){for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)if(t===e[i][n]._name)return e[i][n];return null},_findIndexByName:function(e,t){let i=0;for(let n=0;n<e.length;n++)for(let o=0;o<e[n].length;o++){if(t===e[n][o]._name)return i;i++}return null},_computeLinks:function(e,t,i){const n={},o=[],a=[];return i.forEach((e=>{Object.keys(e).forEach((e=>{n[e]={in:0,out:0}}))})),t.forEach((i=>{i.forEach((i=>{const a=i._name,s=this._findRectByName(t,a),r=e.filter((e=>e[0]===a));r.forEach((e=>{e.sort=this._findIndexByName(t,e[1])})),r.sort(((e,t)=>e.sort-t.sort)).forEach((e=>{const i=this._findRectByName(t,e[1]),a=Math.round(e[2]/this._weightPerPixel),r=n[e[0]].out,l=n[e[1]].in,d=n[e[0]].out+a>s.height?s.height-n[e[0]].out:a,u=n[e[1]].in+a>i.height?i.height-n[e[1]].in:a;o.push({from:{x:s.x,y:s.y+r,width:s.width,height:d,node:s,weight:e[2]},to:{x:i.x,y:i.y+l,width:i.width,height:u,node:i}}),n[e[0]].out+=a,n[e[1]].in+=a}))}))})),o.forEach((e=>{const t={d:this._spline(e.from,e.to),_boundingRect:{x:e.from.x+e.from.width,y:Math.min(e.from.y,e.to.y),width:e.to.x-(e.from.x+e.from.width),height:Math.max(e.from.x+e.from.height,e.to.y+e.to.height)-Math.min(e.from.y,e.to.y)},_weight:e.from.weight,_from:e.from.node,_to:e.to.node};a.push(t)})),this._fitAllNodesHeight(t,o),a},_fitNodeHeight:function(e,t,i){const n=this._findRectByName(t,e);let o=0,a=0;i.forEach((function(t){t.from.node._name===e&&(a+=t.from.height),t.to.node._name===e&&(o+=t.to.height)})),n.height=Math.max(o,a)},_fitAllNodesHeight:function(e,t){for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)this._fitNodeHeight(e[i][n]._name,e,t)},_spline:function(e,t){const i=e.x+e.width,n=e.y,o=e.x+e.width,a=e.y+e.height,s=t.x,r=t.y,l=t.x,d=t.y+t.height,u=.3*(s-i);return`M ${i} ${n} C ${i+u} ${n} ${s-u} ${r} ${s} ${r} L ${l} ${d} C ${l-u} ${d} ${o+u} ${a} ${o} ${a} Z`},computeLayout:function(e,t,i,n){this._sort=t;const a={},s=o.default.validate(e,n);return s?a.error=s:(a.cascades=this._computeCascades(e),a.nodes=this._computeNodes(a.cascades,{width:i.availableRect.width,height:i.availableRect.height,x:i.availableRect.x,y:i.availableRect.y,nodePadding:i.nodePadding,nodeWidth:i.nodeWidth,nodeAlign:i.nodeAlign}),a.links=this._computeLinks(e,a.nodes,a.cascades)),a},overlap:function(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>=e.y+e.height||t.y+t.height<=e.y)}}},32150:function(e,t,i){t.default=void 0;var n=i(92585),o=i(11528);const a=["normal","adjacentNodeHover","hover"];function s(e,t,i,a){const s=t.border,r=i.border,l=(0,o.isDefined)(s.visible)?s.visible:r.visible,d=(0,o.isDefined)(s.width)?s.width:r.width,u=(0,o.isDefined)(s.opacity)?s.opacity:(0,o.isDefined)(r.opacity)?r.opacity:1,c=(0,o.isDefined)(t.opacity)?t.opacity:(0,o.isDefined)(i.opacity)?i.opacity:1;let h=t.color||e;return i.colorMode===n.COLOR_MODE_TARGET||i.colorMode===n.COLOR_MODE_SOURCE?h=e:i.colorMode===n.COLOR_MODE_GRADIENT&&a&&(0,o.isDefined)(a.id)&&(h=a.id),{fill:h,"stroke-width":l?d:0,stroke:t.border.color||i.border.color,"stroke-opacity":u,opacity:c,hatching:t.hatching}}function r(e,t){const i=this,n=e._renderer.getRootOffset();i.code=0,i.widget=e,i.color=t.color,i.connection=t.connection,i.d=t.d,i.options=t.options,i.boundingRect=t.boundingRect,i.coords={x:t.boundingRect.x+t.boundingRect.width/2+n.left,y:t.boundingRect.y+t.boundingRect.height/2+n.top},i.states={normal:s(i.color,i.options,i.options,t.gradient),adjacentNodeHover:s(i.color,{opacity:0,border:{}},i.options,t.gradient),hover:s(i.color,{opacity:0,border:{}},i.options,t.gradient)},i.overlayStates={normal:s(i.color,{opacity:0,border:{}},i.options),adjacentNodeHover:s(i.color,i.options.hoverStyle,i.options),hover:s(i.color,i.options.hoverStyle,i.options)}}r.prototype={getState:function(){return a[this.code]},isHovered:function(){return 2===this.code},isAdjacentNodeHovered:function(){return 1===this.code},setState:function(e,t){t?this.code=e:(this.code=0,this.hideTooltip()),this.widget._applyLinksAppearance()},setHover:function(){this.hover(!0)},hover:function(e){this.widget._getOption("hoverEnabled",!0)&&e!==this.isHovered()&&(this.widget._suspend(),e&&this.widget.clearHover(),this.setState(2,e),this.widget._eventTrigger("linkHoverChanged",{target:this}),this.widget._resume())},adjacentNodeHover:function(e){this.widget._getOption("hoverEnabled",!0)&&e!==this.isAdjacentNodeHovered()&&(this.widget._suspend(),this.setState(1,e),this.widget._resume())},setAdjacentNodeHover:function(){this.adjacentNodeHover(!0)},showTooltip:function(e){this.widget._getOption("hoverEnabled",!0)&&this.widget._tooltip&&this.widget._tooltip.show({type:"link",info:{source:this.connection.source,target:this.connection.target,weight:this.connection.weight}},void 0!==e?{x:e[0],y:e[1]}:this.coords)},hideTooltip:function(){this.widget._tooltip&&this.widget._tooltip.hide()}};t.default=r;e.exports=t.default,e.exports.default=t.default},4442:function(e,t,i){t.default=void 0;var n=i(11528),o=i(28779);const a=["normal","hover"];function s(e,t,i){const o=t.border,a=i.border,s=(0,n.isDefined)(o.visible)?o.visible:a.visible,r=(0,n.isDefined)(o.width)?o.width:a.width,l=(0,n.isDefined)(o.opacity)?o.opacity:(0,n.isDefined)(a.opacity)?a.opacity:1,d=(0,n.isDefined)(t.opacity)?t.opacity:(0,n.isDefined)(i.opacity)?i.opacity:1;return{fill:t.color||e,"stroke-width":s?r:0,stroke:t.border.color||i.border.color,"stroke-opacity":l,opacity:d,hatching:t.hatching}}function r(e,t){const i=this,n=e._renderer.getRootOffset();i.code=0,i.widget=e,i.color=t.color,i.options=t.options,i.rect=t.rect,i.label=i.title=t.rect._name,i.coords={x:t.rect.x+t.rect.width/2+n.left,y:t.rect.y+t.rect.height/2+n.top},i.id=t.id,i.linksIn=t.linksIn,i.linksOut=t.linksOut,this.states={normal:s(this.color,i.options,i.options),hover:s(this.color,i.options.hoverStyle,i.options)}}r.prototype={compileAttrs:function(){return s(this.color,this.options)},getState:function(){return a[this.code]},isHovered:function(){return!!(1&this.code)},setState:function(e,t){t?this.code|=e:this.code&=~e,t?this.linksIn.concat(this.linksOut).forEach((e=>{this.widget._links[e.index].setAdjacentNodeHover(!0)})):(this.widget._links.forEach((function(e){e.isAdjacentNodeHovered()&&e.adjacentNodeHover(!1)})),this.hideTooltip()),this.widget._applyNodesAppearance(),this.widget._applyLinksAppearance()},hover:function(e){this.widget._getOption("hoverEnabled",!0)&&e!==this.isHovered()&&(this.widget._suspend(),e&&this.widget.clearHover(),this.setState(1,e),this.widget._eventTrigger("nodeHoverChanged",{target:this}),this.widget._resume())},setHover:function(){this.hover(!0)},showTooltip:function(e){this.widget._getOption("hoverEnabled",!0)&&this.widget._tooltip&&this.widget._tooltip.show({type:"node",info:{label:this.label,title:this.label,weightIn:this.linksIn.reduce((function(e,t){return e+t.weight}),0),weightOut:this.linksOut.reduce((function(e,t){return e+t.weight}),0)}},void 0!==e?{x:e[0],y:e[1]}:this.coords)},hideTooltip:function(){this.widget._tooltip&&this.widget._tooltip.hide()},getLabelAttributes:function(e,t){return function(e,t,i){const a=o.patchFontOptions;e.useNodeColors&&(e.font.color=i.color);const s=!!(0,n.isDefined)(e.border.visible)&&e.border.visible,r=(0,n.isDefined)(e.border.width)?e.border.width:0,l=(0,n.isDefined)(e.border.color)?e.border.color:e.font.color,d=(0,n.isDefined)(e.border.opacity)?e.border.opacity:1,u={filter:t};return s&&r&&(u.stroke=l,u["stroke-width"]=s?r:0,u["stroke-opacity"]=d),{attr:u,css:a(e.font)}}(e,t,this)}};t.default=r;e.exports=t.default,e.exports.default=t.default},78839:function(e,t,i){t.default=void 0;var n=i(92585),o=i(17781),a=h(i(4442)),s=h(i(32150)),r=i(58864),l=i(11528),d=h(i(34506)),u=h(i(92848)),c=i(25058);function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t,i){const n=[],o="in"===i?"_to":"_from",a="in"===i?"_from":"_to";return e.links.map((e=>e[o]._name===t)).forEach(((t,i)=>{t&&n.push({index:i,weight:e.links[i]._weight,node:e.links[i][a]._name})})),n}const g=d.default.inherit({_rootClass:"dxs-sankey",_rootClassPrefix:"dxs",_proxyData:[],_optionChangesMap:{dataSource:"DATA_SOURCE",sortData:"DATA_SOURCE",alignment:"DATA_SOURCE",node:"BUILD_LAYOUT",label:"LABELS",link:"BUILD_LAYOUT",palette:"BUILD_LAYOUT",paletteExtensionMode:"BUILD_LAYOUT"},_themeDependentChanges:["BUILD_LAYOUT"],_getDefaultSize:function(){return{width:400,height:400}},_themeSection:"sankey",_fontFields:["label.font"],_optionChangesOrder:["DATA_SOURCE"],_initialChanges:["DATA_SOURCE"],_initCore:function(){this._groupLinks=this._renderer.g().append(this._renderer.root),this._groupNodes=this._renderer.g().append(this._renderer.root),this._groupLabels=this._renderer.g().attr({class:this._rootClassPrefix+"-labels"}).append(this._renderer.root),this._drawLabels=!0,this._nodes=[],this._links=[],this._gradients=[]},_disposeCore:o.noop,_applySize:function(e){this._rect=e.slice();const t=this._getOption("adaptiveLayout");return t.keepLabels||this._rect[2]-this._rect[0]>t.width?this._drawLabels=!0:this._drawLabels=!1,this._change(["BUILD_LAYOUT"]),this._rect},_eventsMap:{onNodeHoverChanged:{name:"nodeHoverChanged"},onLinkHoverChanged:{name:"linkHoverChanged"}},_customChangesOrder:["BUILD_LAYOUT","NODES_DRAW","LINKS_DRAW","LABELS","DRAWN"],_dataSourceChangedHandler:function(){this._requestChange(["BUILD_LAYOUT"])},_change_DRAWN:function(){this._drawn()},_change_DATA_SOURCE:function(){this._change(["DRAWN"]),this._updateDataSource()},_change_LABELS:function(){this._applyLabelsAppearance()},_change_BUILD_LAYOUT:function(){this._groupNodes.clear(),this._groupLinks.clear(),this._groupLabels.clear(),this._buildLayout()},_change_NODES_DRAW:function(){const e=this;e._nodes.forEach((function(t,i){const n=e._renderer.rect().attr(t.rect).append(e._groupNodes);t.element=n})),this._applyNodesAppearance()},_change_LINKS_DRAW:function(){const e=this;e._links.forEach((function(t,i){const n=e._renderer.g().attr({class:"link","data-link-idx":i}).append(e._groupLinks);t.overlayElement=e._renderer.path([],"area").attr({d:t.d}).append(n),t.element=e._renderer.path([],"area").attr({d:t.d}).append(n)})),this._applyLinksAppearance()},_suspend:function(){this._applyingChanges||this._suspendChanges()},_resume:function(){this._applyingChanges||this._resumeChanges()},_showTooltip:o.noop,hideTooltip:o.noop,clearHover:function(){this._suspend(),this._nodes.forEach((function(e){e.isHovered()&&e.hover(!1)})),this._links.forEach((function(e){e.isHovered()&&e.hover(!1),e.isAdjacentNodeHovered()&&e.adjacentNodeHover(!1)})),this._resume()},_applyNodesAppearance:function(){this._nodes.forEach((function(e){const t=e.getState();e.element.smartAttr(e.states[t])}))},_applyLinksAppearance:function(){this._links.forEach((function(e){const t=e.getState();e.element.smartAttr(e.states[t]),e.overlayElement.smartAttr(e.overlayStates[t])}))},_hitTestTargets:function(e,t){const i=this;let n;return this._proxyData.some((function(o){if(n=o.call(i,e,t),n)return!0})),n},_getData:function(){const e=this,t=e._dataSourceItems()||[],i=e._getOption("sourceField",!0),n=e._getOption("targetField",!0),o=e._getOption("weightField",!0),a=[];return t.forEach((function(t){const s=Object.prototype.hasOwnProperty.bind(t);s(i)?s(n)?s(o)?(0,l.isString)(t[i])?(0,l.isString)(t[n])?!(0,l.isNumeric)(t[o])||t[o]<=0?e._incidentOccurred("E2009",o):a.push([t[i],t[n],t[o]]):e._incidentOccurred("E2008",n):e._incidentOccurred("E2008",i):e._incidentOccurred("E2007",o):e._incidentOccurred("E2007",n):e._incidentOccurred("E2007",i)})),a},_buildLayout:function(){const e=this,t=e._getData(),i=this._rect,o=e._getOption("node"),l=e._getOption("sortData"),d=e._getOption("layoutBuilder",!0)||r.layout,u={x:i[0],y:i[1],width:i[2]-i[0],height:i[3]-i[1]},c=d.computeLayout(t,l,{availableRect:u,nodePadding:o.padding,nodeWidth:o.width,nodeAlign:e._getOption("alignment",!0)},e._incidentOccurred);if(e._layoutMap=c,!Object.prototype.hasOwnProperty.call(c,"error")){const t={};let i=0;const r=e._getOption("link"),l=c.nodes.map((e=>e.length)).reduce(((e,t)=>e+t),0),d=e._themeManager.createPalette(e._getOption("palette",!0),{useHighlight:!0,extensionMode:e._getOption("paletteExtensionMode",!0),count:l});e._nodes=[],e._links=[],e._gradients.forEach((e=>{e.dispose()})),e._gradients=[],e._shadowFilter&&e._shadowFilter.dispose(),c.nodes.forEach((n=>{n.forEach((n=>{const s=o.color||d.getNextColor(),r=new a.default(e,{id:i,color:s,rect:n,options:o,linksIn:p(c,n._name,"in"),linksOut:p(c,n._name,"out")});e._nodes.push(r),i++,t[n._name]=s}))})),c.links.forEach((i=>{let o=null;r.colorMode===n.COLOR_MODE_GRADIENT&&(o=e._renderer.linearGradient([{offset:"0%","stop-color":t[i._from._name]},{offset:"100%","stop-color":t[i._to._name]}]),this._gradients.push(o));let a=r.color;r.colorMode===n.COLOR_MODE_SOURCE?a=t[i._from._name]:r.colorMode===n.COLOR_MODE_TARGET&&(a=t[i._to._name]);const l=new s.default(e,{d:i.d,boundingRect:i._boundingRect,color:a,options:r,connection:{source:i._from._name,target:i._to._name,weight:i._weight},gradient:o});e._links.push(l)})),e._renderer.initDefsElements(),e._change(["NODES_DRAW","LINKS_DRAW","LABELS"])}e._change(["DRAWN"])},_applyLabelsAppearance:function(){const e=this,t=e._getOption("label"),i=e._rect[2]-e._rect[0],n=e._getOption("node");if(e._shadowFilter=e._renderer.shadowFilter("-50%","-50%","200%","200%").attr(t.shadow),e._groupLabels.clear(),e._drawLabels&&t.visible){const o=(i-(n.width+t.horizontalOffset)-e._layoutMap.cascades.length*n.width)/(e._layoutMap.cascades.length-1)-t.horizontalOffset;e._nodes.forEach((function(i){e._createLabel(i,t,e._shadowFilter.id),function(e,t,i,n){e._label.getBBox().width>i&&e.labelText.applyEllipsis(i);const o=e._label.getBBox(),a=t.verticalOffset,s=t.horizontalOffset;let r=Math.round(e.rect.y+e.rect.height/2-o.y-o.height/2)+a,l=e.rect.x+s+e.rect.width-o.x;l+o.width>=n[2]-n[0]&&(l=e.rect.x-s-o.x-o.width),r>=n[3]&&(r=n[3]),r-o.height<n[1]&&(r=e.rect.y-o.y+a),e.labelText.attr({translateX:l,translateY:r})}(i,t,o,e._rect)})),"none"!==t.overlappingBehavior&&e._nodes.forEach((function(i){const n=i._label.getBBox();e._nodes.forEach((function(e){const o=e._label.getBBox();i.id!==e.id&&r.layout.overlap(n,o)&&("ellipsis"===t.overlappingBehavior?i.labelText.applyEllipsis(o.x-n.x):"hide"===t.overlappingBehavior&&i.labelText.remove())}))}))}},_createLabel:function(e,t,i){const n=t.customizeText(e),o=e.getLabelAttributes(t,i);n&&(e._label=this._renderer.g().append(this._groupLabels),e.labelText=this._renderer.text(n).attr(o.attr).css(o.css),e.labelText.append(e._label))},_getMinSize:function(){const e=this._getOption("adaptiveLayout");return[e.width,e.height]},getAllNodes:function(){return this._nodes.slice()},getAllLinks:function(){return this._links.slice()}});(0,u.default)("dxSankey",g);t.default=g;g.addPlugin(c.plugin),e.exports=t.default,e.exports.default=t.default},24339:function(e,t,i){t.setTooltipCustomOptions=function(e){e.prototype._setTooltipOptions=function(){const e=this._tooltip,t=e&&this._getOption("tooltip");let i,o;t.linkTooltipTemplate&&(i=this._getTemplate(t.linkTooltipTemplate)),t.nodeTooltipTemplate&&(o=this._getTemplate(t.nodeTooltipTemplate)),e&&e.update((0,n.extend)({},t,{customizeTooltip:function(n){i&&"link"===n.type||o&&"node"===n.type||(n.skipTemplate=!0);const l=t=>e.formatValue(t);return"node"===n.type?r(t.customizeNodeTooltip,s(l))(n.info):"link"===n.type?r(t.customizeLinkTooltip,a(l))(n.info):{}},contentTemplate(e,t){const n={model:e.info,container:t};return i&&"link"===e.type?i.render(n):o&&"node"===e.type?o.render(n):void 0},enabled:t.enabled}))},e.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()}};var n=i(52576),o=i(11528);const a=e=>function(t){return{html:`<strong>${t.source} > ${t.target}</strong><br/>Weight: ${e(t.weight)}`}},s=e=>function(t){return{html:`<strong>${t.label}</strong><br/>Incoming weight: ${e(t.weightIn)}<br/>Outgoing weight: ${e(t.weightOut)}`}},r=function(e,t){return function(i){let a=(0,o.isFunction)(e)?e.call(i,i):{};const s=Object.prototype.hasOwnProperty.bind(a);return s("html")||s("text")||(a=(0,n.extend)(a,t.call(i,i))),a}}},85476:function(e,t,i){t.plugin=void 0;var n,o=(n=i(78839))&&n.__esModule?n:{default:n},a=i(16197);const s=o.default.prototype;let r=0;s._eventsMap.onNodeClick={name:"nodeClick"},s._eventsMap.onLinkClick={name:"linkClick"};t.plugin={name:"tracker",init:function(){const e=this,t="__sankey_data_"+r++;e._tracker=new a.Tracker({widget:e,root:e._renderer.root,getData:function(e){return e.target[t]},getNode:function(t){return t<e._nodes.length?e._nodes[t]:e._links[t-e._nodes.length]},click:function(t){const i=this.getData(t.event)<e._nodes.length?"nodeClick":"linkClick";e._eventTrigger(i,{target:t.node,event:t.event})}}),this._dataKey=t},dispose:function(){this._tracker.dispose()},extenders:{_change_LINKS_DRAW:function(){const e=this._dataKey;this._nodes.concat(this._links).forEach((function(t,i){t.element.data(e,i)}))}}}},46283:function(e,t,i){t.polar=t.chart=void 0;var n=i(22263),o=i(52576),a=i(24008),s=i(85854),r=i(28779);const l=s.chart.line,d=s.polar.line,u=o.extend,c=s.chart.spline._calculateBezierPoints,h=t.chart={},p=t.polar={},g={_createBorderElement:l._createMainElement,_createLegendState:function(e,t){return{fill:(0,r.extractColor)(e.color)||t,opacity:e.opacity,hatching:e.hatching,filter:e.highlight}},_getColorId:function(e){var t;return null===(t=e.color)||void 0===t?void 0:t.fillId},getValueRangeInitialValue:function(){return"logarithmic"!==this.valueAxisType&&"datetime"!==this.valueType&&!1!==this.showZero?0:a.chart.getValueRangeInitialValue.call(this)},_getDefaultSegment:function(e){const t=l._getDefaultSegment(e);return t.area=t.line.concat(t.line.slice().reverse()),t},_updateElement:function(e,t,i,n){const o={points:t.line},a={points:t.area},s=e.line;i?(s&&s.animate(o),e.area.animate(a,{},n)):(s&&s.attr(o),e.area.attr(a))},_removeElement:function(e){e.line&&e.line.remove(),e.area.remove()},_drawElement:function(e){return{line:this._bordersGroup&&this._createBorderElement(e.line,{"stroke-width":this._styles.normal.border["stroke-width"]}).append(this._bordersGroup),area:this._createMainElement(e.area).append(this._elementsGroup)}},_applyStyle:function(e){const t=this;t._elementsGroup&&t._elementsGroup.smartAttr(e.elements),t._bordersGroup&&t._bordersGroup.attr(e.border),(t._graphics||[]).forEach((function(t){t.line&&t.line.attr({"stroke-width":e.border["stroke-width"]}).sharp()}))},_parseStyle:function(e,t,i){const n=e.border||{},o=l._parseLineOptions(n,i);return o.stroke=n.visible&&o["stroke-width"]?o.stroke:"none",o["stroke-width"]=o["stroke-width"]||1,{border:o,elements:{stroke:"none",fill:(0,r.extractColor)(e.color)||t,hatching:e.hatching,opacity:e.opacity,filter:e.highlight??null}}},_areBordersVisible:function(){const e=this._options;return e.border.visible||e.hoverStyle.border.visible||e.selectionStyle.border.visible},_createMainElement:function(e,t){return this._renderer.path(e,"area").attr(t)},_getTrackerSettings:function(e){return{"stroke-width":e.singlePointSegment?this._defaultTrackerWidth:0}},_getMainPointsFromSegment:function(e){return e.area}};const _=h.area=u({},l,g,{_prepareSegment(e,t){const i=this._processSinglePointsAreaSegment(e,t),n=function(e){return(0,r.map)(e,(function(e){return e.getCoords()})).concat((0,r.map)(e.slice().reverse(),(function(e){return e.getCoords(!0)})))}(i),o=this.getArgumentAxis();if(o.getAxisPosition){const i=o.getAxisPosition(),a=o.getOptions(),s=(t?1:-1)*Math.round(a.width/2);a.visible&&n.forEach(((a,r)=>{if(a){const l=1===e.length?0:r<e.length?r:n.length-1-r;t&&a.x===e[l].defaultX&&a.x===i-o.getAxisShift()&&(a.x+=s),!t&&a.y===e[l].defaultY&&a.y===i-o.getAxisShift()&&(a.y+=s)}}))}return{line:i,area:n,singlePointSegment:i!==e}},_processSinglePointsAreaSegment:function(e,t){if(e&&1===e.length){const i=e[0],o=(0,n.clone)(i);return o[t?"y":"x"]+=1,o.argument=null,[i,o]}return e}});p.area=u({},d,g,{_prepareSegment:function(e,t,i){return i&&d._closeSegment.call(this,e),_._prepareSegment.call(this,e)},_processSinglePointsAreaSegment:function(e){return s.polar.line._prepareSegment.call(this,e).line}}),h.steparea=u({},_,{_prepareSegment:function(e,t){const i=s.chart.stepline;return e=_._processSinglePointsAreaSegment(e,t),_._prepareSegment.call(this,i._calculateStepLinePoints.call(this,e),t)},getSeriesPairCoord:s.chart.stepline.getSeriesPairCoord}),h.splinearea=u({},_,{_areaPointsToSplineAreaPoints:function(e){const t=e[e.length/2-1],i=e[e.length/2];e.splice(e.length/2,0,{x:t.x,y:t.y},{x:i.x,y:i.y})},_prepareSegment:function(e,t){const i=_._processSinglePointsAreaSegment(e,t),n=_._prepareSegment.call(this,c(i,t));return this._areaPointsToSplineAreaPoints(n.area),n.singlePointSegment=i!==e,n},_getDefaultSegment:function(e){const t=_._getDefaultSegment(e);return this._areaPointsToSplineAreaPoints(t.area),t},_createMainElement:function(e,t){return this._renderer.path(e,"bezierarea").attr(t)},_createBorderElement:s.chart.spline._createMainElement,getSeriesPairCoord:s.chart.spline.getSeriesPairCoord,_getNearestPoints:s.chart.spline._getNearestPoints,_getBezierPoints:s.chart.spline._getBezierPoints,obtainCubicBezierTCoef:s.chart.spline.obtainCubicBezierTCoef})},91449:function(e,t,i){t.polar=t.chart=void 0;var n=i(52576),o=i(21274),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=d(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}(i(24008)),s=i(46283),r=i(28779),l=i(11528);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(d=function(e){return e?i:t})(e)}const u=s.chart.area,c=a.chart,h=a.polar,p=n.extend,g=o.each,_=t.chart={},f=t.polar={},m={_createLegendState:function(e,t){return{fill:(0,r.extractColor)(e.color)||t,hatching:e.hatching,filter:e.highlight}},_getColorId:u._getColorId,_parsePointStyle:function(e,t,i){const n=(0,r.extractColor)(e.color)||t,o=c._parsePointStyle.call(this,e,n,i);return o.fill=n,o.hatching=e.hatching,o.filter=e.highlight,o.dashStyle=e.border&&e.border.dashStyle||"solid",delete o.r,o},_applyMarkerClipRect:function(e){e["clip-path"]=null},_setGroupsSettings:function(e,t){let i={};c._setGroupsSettings.apply(this,arguments),e&&t?i=this._getAffineCoordOptions():e||(i={scaleX:1,scaleY:1,translateX:0,translateY:0}),this._markersGroup.attr(i)},_drawPoint:function(e){e.hasAnimation=e.hasAnimation&&!e.firstDrawing,e.firstDrawing=!1,c._drawPoint.call(this,e)},_getMainColor:function(){return this._options.mainSeriesColor},_createPointStyles:function(e){var t;const i=this,n=(0,r.extractColor)(e.color,!0)||i._getMainColor(),o=null===(t=e.color)||void 0===t?void 0:t.fillId,a=e.hoverStyle||{},s=e.selectionStyle||{};return o&&i._turnOffHatching(a,s),{labelColor:n,normal:i._parsePointStyle(e,n,n),hover:i._parsePointStyle(a,o||n,n),selection:i._parsePointStyle(s,o||n,n)}},_updatePointsVisibility:function(){const e=this._options.visible;(0,o.each)(this._points,(function(t,i){i._options.visible=e}))},_getOptionsForPoint:function(){return this._options},_animate:function(e){const t=this;t._animatePoints(e,(function(){t._animateComplete()}),(function(e,t){const i=e.length-1;g(e||[],(function(e,n){n.animate(e===i?t:void 0,n.getMarkerCoords())}))}))},getValueRangeInitialValue:u.getValueRangeInitialValue,_patchMarginOptions:function(e){var t;return e.checkInterval=!this.useAggregation()||(null===(t=this.getArgumentAxis())||void 0===t?void 0:t.aggregatedPointBetweenTicks()),e},_defaultAggregator:"sum",_defineDrawingState(){},usePointsToDefineAutoHiding:()=>!1};_.bar=p({},c,m,{_getAffineCoordOptions:function(){const e=this._options.rotated,t={scaleX:e?.001:1,scaleY:e?1:.001};return t["translate"+(e?"X":"Y")]=this.getValueAxis().getTranslator().translate("canvas_position_default"),t},_animatePoints:function(e,t,i){const n=this;n._markersGroup.animate({scaleX:1,scaleY:1,translateY:0,translateX:0},void 0,t),e||i(n._drawnPoints,t)},checkSeriesViewportCoord(e,t){if(!c.checkSeriesViewportCoord.call(this))return!1;if(e.isArgumentAxis)return!0;const i=e.getTranslator(),n=this.getViewport(),o=i.translate(n.categories?n.categories[0]:n.min),a=i.translate(n.categories?n.categories[n.categories.length-1]:n.max),s=this.getOptions().rotated,r=e.getOptions().inverted;return s&&!r||!s&&r?t>=o&&t<=a:t>=a&&t<=o},getSeriesPairCoord(e,t){let i=null;const{rotated:n}=this._options,o=!t&&!n||t&&n,a=o?"vy":"vx",s=o?"vx":"vy",r=this.getPoints();for(let n=0;n<r.length;n++){const o=r[n];let l;if(l=t?o.getCenterCoord()[a[1]]===e?o[s]:void 0:o[a]===e?o[s]:void 0,this._checkAxisVisibleAreaCoord(!t,l)){i=l;break}}return i}}),f.bar=p({},h,m,{_animatePoints:function(e,t,i){i(this._drawnPoints,t)},_setGroupsSettings:c._setGroupsSettings,_drawPoint:function(e,t,i){c._drawPoint.call(this,e,t,i)},_parsePointStyle:function(e){const t=m._parsePointStyle.apply(this,arguments);return t.opacity=e.opacity,t},_createGroups:c._createGroups,_setMarkerGroupSettings:function(){const e=this,t=e._createPointStyles(e._getMarkerGroupOptions()).normal;t.class="dxc-markers",e._applyMarkerClipRect(t);const i=p({},t);delete i.opacity,e._markersGroup.attr(i)},getSeriesPairCoord(e,t){let i=null;const n=t?"argument":"radius",o=this.getVisiblePoints(),a=this.getArgumentAxis(),s=a.getAngles()[0];for(let t=0;t<o.length;t++){const d=o[t],u=(0,l.isDefined)(d[n])&&(0,l.isDefined)(e[n])&&d[n].valueOf()===e[n].valueOf()?(0,r.convertPolarToXY)(a.getCenter(),s,-a.getTranslatedAngle(d.angle),d.radius):void 0;if((0,l.isDefined)(u)){i=u;break}}return i},_createLegendState:u._createLegendState})},66151:function(e,t,i){t.Series=q,t.mixins=void 0;var n=i(11528),o=i(52576),a=i(21274),s=i(31656),r=i(28779),l=i(17781),d=x(i(7377)),u=x(i(34685)),c=b(i(24008)),h=b(i(85854)),p=b(i(46283)),g=b(i(91449)),_=i(16665),f=i(85526),m=b(i(64708)),v=b(i(72259)),C=b(i(33277));function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(y=function(e){return e?i:t})(e)}function b(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=y(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}function x(e){return e&&e.__esModule?e:{default:e}}const w={},S=d.default.states,D="discrete",I=S.selectedMark,E=S.hoverMark,T=S.hover,A=S.normal,O=S.selection,P=S.applySelected,k=S.applyHover,M=S.resetItem,R="none",L="seriesSelectionChanged",B="pointSelectionChanged",V="seriesHoverChanged",F="pointHoverChanged",H="allseriespoints",N="allargumentpoints",z="pointHover",W="clearPointHover",$="seriesSelect",G="pointSelect",j="pointDeselect";function U(e,t,i){e&&e.trigger(t,i)}function K(e){return"includepoints"===(e=(0,r.normalizeEnum)(e))||e===H}function Z(e,t){const i=(0,o.extend)({},e,t);return i.border=(0,o.extend)({},e&&e.border,t&&t.border),i}function q(e,t){const i=this;i.fullState=0,i._extGroups=e,i._renderer=e.renderer,i._group=e.renderer.g().attr({class:"dxc-series"}),i._eventTrigger=e.eventTrigger,i._eventPipe=e.eventPipe,i._incidentOccurred=e.incidentOccurred,i._legendCallback=l.noop,i.updateOptions(t,e)}function Y(e){return e.data}function X(e,t){return t&&"logarithmic"===e&&!1===t.getOptions().allowNegatives?e=>e>0:()=>!0}w.mixins={chart:{},pie:{},polar:{}},w.mixins.chart.scatter=c.chart,w.mixins.polar.scatter=c.polar,(0,o.extend)(w.mixins.pie,m),(0,o.extend)(w.mixins.chart,h.chart,p.chart,g.chart,_.chart,f.chart,v,C.chart),(0,o.extend)(w.mixins.polar,h.polar,p.polar,g.polar,C.polar),q.prototype={constructor:q,_createLegendState:l.noop,getLegendStyles:function(){return this._styles.legendStyles},_createStyles:function(e){const t=this,i=e.mainSeriesColor,n=this._getColorId(e),o=e.hoverStyle||{},a=e.selectionStyle||{};n&&t._turnOffHatching(o,a),t._styles={labelColor:i,normal:t._parseStyle(e,i,i),hover:t._parseStyle(o,n||i,i),selection:t._parseStyle(a,n||i,i),legendStyles:{normal:t._createLegendState(e,n||i),hover:t._createLegendState(o,n||i),selection:t._createLegendState(a,n||i)}}},setClippingParams(e,t,i){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this._paneClipRectID=e,this._widePaneClipRectID=t,this._forceClipping=i,this._clipLabels=n},applyClip:function(){this._group.attr({"clip-path":this._paneClipRectID})},resetClip:function(){this._group.attr({"clip-path":null})},getTagField:function(){return this._options.tagField||"tag"},getValueFields:l.noop,getSizeField:l.noop,getArgumentField:l.noop,getPoints:function(){return this._points},getPointsInViewPort:function(){return u.default.getPointsInViewPort(this)},_createPoint:function(e,t,i){e.index=t;const n=this,o=n.pointsByArgument,a=n._getCreatingPointOptions(e),r=e.argument.valueOf();let l=i;l?l.update(e,a):(l=new s.Point(n,e,a),n.isSelected()&&K(n.lastSelectionMode)&&l.setView(O));const d=o[r];return d?d.push(l):o[r]=[l],l.hasValue()&&n.customizePoint(l,e),l},getRangeData:function(){return this._visible?this._getRangeData():{arg:{},val:{}}},getArgumentRange:function(){return this._visible?u.default.getArgumentRange(this):{arg:{},val:{}}},getViewport:function(){return u.default.getViewport(this)},_deleteGroup:function(e){const t=this[e];t&&(t.dispose(),this[e]=null)},updateOptions(e,t){const i=this,n=e.widgetType,o=i.type,a=e.type;if(i.type=a&&(0,r.normalizeEnum)(a.toString()),!i._checkType(n)||i._checkPolarBarType(n,e))return i.dispose(),void(i.isUpdated=!1);o!==i.type?(i._firstDrawing=!0,i._resetType(o,n),i._setType(i.type,n)):i._defineDrawingState(),i._options=e,i._pointOptions=null,i.name=e.name,i.pane=e.pane,i.tag=e.tag,t&&(i._seriesModes=t.commonSeriesModes||i._seriesModes,i._valueAxis=t.valueAxis||i._valueAxis,i.axis=i._valueAxis&&i._valueAxis.name,i._argumentAxis=t.argumentAxis||i._argumentAxis),i._createStyles(e),i._stackName=null,i._updateOptions(e),i._visible=e.visible,i.isUpdated=!0,i.stack=e.stack,i.barOverlapGroup=e.barOverlapGroup,i._createGroups(),i._processEmptyValue=e.ignoreEmptyPoints?e=>null===e?void 0:e:e=>e},_defineDrawingState(){this._firstDrawing=!0},_disposePoints:function(e){(0,a.each)(e||[],(function(e,t){t.dispose()}))},updateDataType:function(e){const t=this;return t.argumentType=e.argumentType,t.valueType=e.valueType,t.argumentAxisType=e.argumentAxisType,t.valueAxisType=e.valueAxisType,t.showZero=e.showZero,this._argumentChecker=X(e.argumentAxisType,t.getArgumentAxis()),this._valueChecker=X(e.valueAxisType,t.getValueAxis()),t},_argumentChecker:function(){return!0},_valueChecker:function(){return!0},getOptions:function(){return this._options},_getOldPoint:function(e,t,i){const n=e.argument&&e.argument.valueOf(),o=(t[n]||[])[0];return o&&t[n].splice(0,1),o},updateData:function(e){const t=this,i=t._options,o=i.nameField;(e=e||[]).length&&(t._canRenderCompleteHandle=!0);const a=this._getPointDataSelector();let s=0;t._data=e.reduce(((e,t,r)=>{const l=a(t);return(0,n.isDefined)(l.argument)?o&&t[o]!==i.nameFieldValue||(l.index=r,e.push(l)):s++,e}),[]),s&&s===e.length&&t._incidentOccurred("W2002",[t.name,t.getArgumentField()]),t._endUpdateData()},_getData(){let e=this._data||[];if(this.useAggregation()){const t=this.argumentAxisType!==D?this.getArgumentRange():{},i=this.getArgumentAxis().getAggregationInfo(this._useAllAggregatedPoints,t);e=this._resample(i,e)}return e},useAggregation:function(){const e=this.getOptions().aggregation;return e&&e.enabled},autoHidePointMarkersEnabled:l.noop,usePointsToDefineAutoHiding:l.noop,createPoints(e){this._normalizeUsingAllAggregatedPoints(e),this._createPoints()},_normalizeUsingAllAggregatedPoints:function(e){this._useAllAggregatedPoints=this.useAggregation()&&(this.argumentAxisType===D||(this._data||[]).length>1&&!!e)},_createPoints:function(){const e=this,t=e.pointsByArgument||{},i=e._getData();e.pointsByArgument={},e._calculateErrorBars(i);const n={},o=i.reduce(((i,o)=>{if(e._checkData(o,n)){const n=i.length,a=e._getOldPoint(o,t,n),s=e._createPoint(o,n,a);i.push(s)}return i}),[]);for(const t in n)n[t]===i.length&&e._incidentOccurred("W2002",[e.name,t]);Object.keys(t).forEach((i=>e._disposePoints(t[i]))),e._points=o},_removeOldSegments:function(){const e=this,t=e._segments.length;(0,a.each)(e._graphics.splice(t,e._graphics.length)||[],(function(t,i){e._removeElement(i)})),e._trackers&&(0,a.each)(e._trackers.splice(t,e._trackers.length)||[],(function(e,t){t.remove()}))},_prepareSegmentsPosition(){const e=this._points||[],t=e[0]&&e[0].hasValue()&&this._options.closed,i=e.reduce((function(e,t){const i=e.at(-1);return t.translated||t.setDefaultCoords(),t.hasValue()&&t.hasCoords()?i.push(t):!t.hasValue()&&i.length&&e.push([]),e}),[[]]);this._drawSegments(i,t,!1)},_drawElements(e,t){const i=this,n=i._points||[],o=n[0]&&n[0].hasValue()&&i._options.closed,a={markers:i._markersGroup,errorBars:i._errorBarGroup};i._drawnPoints=[],i._graphics=i._graphics||[],i._segments=[];const s=n.reduce((function(n,o){const s=n.at(-1);return o.hasValue()&&o.hasCoords()?(i._drawPoint({point:o,groups:a,hasAnimation:e,firstDrawing:t}),s.push(o)):o.hasValue()?o.setInvisibility():s.length&&n.push([]),n}),[[]]);i._drawSegments(s,o,e),i._firstDrawing=!n.length,i._removeOldSegments(),e&&i._animate(t)},_drawSegments(e,t,i){e.forEach(((n,o)=>{if(n.length){const a=t&&o===e.length-1;this._drawSegment(n,i,o,a)}}))},draw(e,t,i){const n=this,o=n._firstDrawing;n._legendCallback=i||n._legendCallback,n._visible?(n._appendInGroup(),n._isAllPointsTranslated||n.prepareCoordinatesForPoints(),n._setGroupsSettings(e,o),!o&&!n._resetApplyingAnimation&&n._prepareSegmentsPosition(),n._drawElements(e,o),t&&n.hideLabels(),n.isSelected()?n._changeStyle(n.lastSelectionMode,void 0,!0):n.isHovered()?n._changeStyle(n.lastHoverMode,void 0,!0):n._applyStyle(n._styles.normal),n._isAllPointsTranslated=!1,n._resetApplyingAnimation=!1):n._group.remove()},_translatePoints(){(this._points??[]).forEach((e=>{e.translate()}))},prepareCoordinatesForPoints(){this._applyVisibleArea(),this._translatePoints(),this._isAllPointsTranslated=!0},_setLabelGroupSettings:function(e){const t={class:"dxc-labels","pointer-events":"none"};this._clipLabels&&this._applyElementsClipRect(t),this._applyClearingSettings(t),e&&(t.opacity=.001),this._labelsGroup.attr(t).append(this._extGroups.labelsGroup)},_checkType:function(e){return!!w.mixins[e][this.type]},_checkPolarBarType:function(e,t){return"polar"===e&&t.spiderWidget&&-1!==this.type.indexOf("bar")},_resetType:function(e,t){let i,n;if(e)for(i in n=w.mixins[t][e],n)delete this[i]},_setType:function(e,t){let i;const n=w.mixins[t][e];for(i in n)this[i]=n[i]},_setPointsView:function(e,t){this.getPoints().forEach((function(i){t!==i&&i.setView(e)}))},_resetPointsView:function(e,t){this.getPoints().forEach((function(i){t!==i&&i.resetView(e)}))},_resetNearestPoint:function(){const e=this;e._nearestPoint&&null!==e._nearestPoint.series&&e._nearestPoint.resetView(T),e._nearestPoint=null},_setSelectedState:function(e){const t=this;t.lastSelectionMode=(0,r.normalizeEnum)(e||t._options.selectionMode),t.fullState=t.fullState|I,t._resetNearestPoint(),t._changeStyle(t.lastSelectionMode),t.lastSelectionMode!==R&&t.isHovered()&&K(t.lastHoverMode)&&t._resetPointsView(T)},_releaseSelectedState:function(){const e=this;e.fullState=e.fullState&~I,e._changeStyle(e.lastSelectionMode,O),e.lastSelectionMode!==R&&e.isHovered()&&K(e.lastHoverMode)&&e._setPointsView(T)},isFullStackedSeries:function(){return 0===this.type.indexOf("fullstacked")},isStackedSeries:function(){return 0===this.type.indexOf("stacked")},resetApplyingAnimation:function(e){this._resetApplyingAnimation=!0,e&&(this._firstDrawing=!0)},isFinancialSeries:function(){return"stock"===this.type||"candlestick"===this.type},_canChangeView:function(){return!this.isSelected()&&(0,r.normalizeEnum)(this._options.hoverMode)!==R},_changeStyle:function(e,t,i){const n=this;let o=n.fullState;const a=[A,T,O,O];"none"===n.lastHoverMode&&(o&=~E),"none"===n.lastSelectionMode&&(o&=~I),K(e)&&!i&&(t?n._resetPointsView(t):n._setPointsView(a[o])),n._legendCallback([M,k,P,P][o]),n._applyStyle(n._styles[a[o]])},updateHover:function(e,t){const i=this,n=i._nearestPoint,o=i.isHovered()&&"nearestpoint"===i.lastHoverMode&&i.getNeighborPoint(e,t);o===n||i.isSelected()&&i.lastSelectionMode!==R||(i._resetNearestPoint(),o&&(o.setView(T),i._nearestPoint=o))},_getMainAxisName:function(){return this._options.rotated?"X":"Y"},areLabelsVisible:function(){return!(0,n.isDefined)(this._options.maxLabelCount)||this._points.length<=this._options.maxLabelCount},getLabelVisibility:function(){return this.areLabelsVisible()&&this._options.label&&this._options.label.visible},customizePoint:function(e,t){const i=this,a=i._options,s=a.customizePoint;let r,l,d,u;const c=a.customizeLabel;let h,p;c&&c.call&&(r=(0,o.extend)({seriesName:i.name},t),r.series=i,d=c.call(r,r),h=d&&!(0,n.isEmptyObject)(d),d=h?(0,o.extend)(!0,{},a.label,d):null),s&&s.call&&(r=r||(0,o.extend)({seriesName:i.name},t),r.series=i,u=s.call(r,r),p=u&&!(0,n.isEmptyObject)(u)),(h||p)&&(l=i._parsePointOptions(i._preparePointOptions(u),d||a.label,t,e),l.styles.useLabelCustomOptions=h,l.styles.usePointCustomOptions=p,e.updateOptions(l))},show:function(){this._visible||this._changeVisibility(!0)},hide:function(){this._visible&&this._changeVisibility(!1)},_changeVisibility:function(e){const t=this;t._visible=t._options.visible=e,t._updatePointsVisibility(),t.hidePointTooltip(),t._options.visibilityChanged(t)},_updatePointsVisibility:l.noop,hideLabels:function(){(0,a.each)(this._points,(function(e,t){t._label.draw(!1)}))},_turnOffHatching(e,t){e.hatching&&(e.hatching.direction="none"),t.hatching&&(t.hatching.direction="none")},_parsePointOptions:function(e,t,i,a){const s=this,l=s._options,d=s._createPointStyles(e,i,a),u=(0,o.extend)({},e,{type:l.type,rotated:l.rotated,styles:d,widgetType:l.widgetType,visibilityChanged:l.visibilityChanged});return u.label=function(e,t){const i=e||{},a=(0,o.extend)({},i.font)||{},s=i.border||{},l=i.connector||{},d={fill:i.backgroundColor||t,"stroke-width":s.visible&&s.width||0,stroke:s.visible&&s.width?s.color:"none",dashStyle:s.dashStyle},u={stroke:l.visible&&l.width?l.color||t:"none","stroke-width":l.visible&&l.width||0};return a.color="none"===i.backgroundColor&&"#ffffff"===(0,r.normalizeEnum)(a.color)&&"inside"!==i.position?t:a.color,{alignment:i.alignment,format:i.format,argumentFormat:i.argumentFormat,customizeText:(0,n.isFunction)(i.customizeText)?i.customizeText:void 0,attributes:{font:a},visible:0!==a.size&&i.visible,showForZeroValues:i.showForZeroValues,horizontalOffset:i.horizontalOffset,verticalOffset:i.verticalOffset,radialOffset:i.radialOffset,background:d,position:i.position,connector:u,rotationAngle:i.rotationAngle,wordWrap:i.wordWrap,textOverflow:i.textOverflow,cssClass:i.cssClass,displayFormat:i.displayFormat}}(t,d.labelColor),s.areErrorBarsVisible()&&(u.errorBars=l.valueErrorBar),u},_preparePointOptions:function(e){const t=this._getOptionsForPoint();return e?function(e,t){const i=Z(e,t);return i.image=(0,o.extend)(!0,{},e.image,t.image),i.selectionStyle=Z(e.selectionStyle,t.selectionStyle),i.hoverStyle=Z(e.hoverStyle,t.hoverStyle),i}(t,e):t},_getMarkerGroupOptions:function(){return(0,o.extend)(!1,{},this._getOptionsForPoint(),{hoverStyle:{},selectionStyle:{}})},_getAggregationMethod:function(e,t){const i=this.getOptions().aggregation,n=(0,r.normalizeEnum)(i.method),o="custom"===n&&i.calculate;let a;return a=e&&!t?e=>{let{data:t}=e;return t[0]}:this._aggregators[n]||this._aggregators[this._defaultAggregator],o||a},_resample(e,t){let{interval:i,ticks:n,aggregateByCategory:o}=e;const a=this,s=a.argumentAxisType===D||a.valueAxisType===D;let r=0;const l=this._getPointDataSelector(),d=a.getOptions(),u=(e,t,i)=>{if(!t)return;const n=t=>{const n=t&&l(t,d);n&&a._checkData(n)&&(n.aggregationInfo=i,e.push(n))};Array.isArray(t)?t.forEach(n):n(t)},c=this._getAggregationMethod(s,o);if(s){if(o){const e=this.getArgumentAxis().getTranslator().getBusinessRange().categories,i=e.reduce(((e,t)=>(e[t.valueOf()]=[],e)),{});return t.forEach((e=>{i[e.argument.valueOf()].push(e)})),e.reduce(((e,t)=>(u(e,c({aggregationInterval:null,intervalStart:t,intervalEnd:t,data:i[t.valueOf()].map(Y)},a)),e)),[])}return t.reduce(((e,t,n,o)=>{if(e[1].push(t),n===o.length-1||(n+1)%i==0){const t=e[1],n={aggregationInterval:i,data:t.map(Y)};u(e[0],c(n,a)),e[1]=[]}return e}),[[],[]])[0]}const h=[];if(1===n.length){const e={intervalStart:n[0],intervalEnd:n[0],aggregationInterval:null,data:t.map(Y)};u(h,c(e,a),e)}else for(let e=1;e<n.length;e++){const o=n[e],s=n[e-1],l=[];for(;t[r]&&t[r].argument<o;)t[r].argument>=s&&l.push(t[r]),r++;const d={intervalStart:s,intervalEnd:o,aggregationInterval:i,data:l.map(Y)};u(h,c(d,a),d)}return a._endUpdateData(),h},canRenderCompleteHandle:function(){const e=this._canRenderCompleteHandle;return delete this._canRenderCompleteHandle,!!e},isHovered:function(){return!!(1&this.fullState)},isSelected:function(){return!!(2&this.fullState)},isVisible:function(){return this._visible},getAllPoints:function(){return this._createAllAggregatedPoints(),(this._points||[]).slice()},getPointByPos:function(e){return this._createAllAggregatedPoints(),(this._points||[])[e]},getVisiblePoints:function(){return(this._drawnPoints||[]).slice()},selectPoint:function(e){e.isSelected()||(!function(e,t){e.fullState|=I,e.applyView(t)}(e,this._legendCallback),this._eventPipe({action:G,target:e}),this._eventTrigger(B,{target:e}))},deselectPoint:function(e){e.isSelected()&&(!function(e,t){e.fullState&=~I,e.applyView(t)}(e,this._legendCallback),this._eventPipe({action:j,target:e}),this._eventTrigger(B,{target:e}))},hover:function(e){const t=this,i=t._eventTrigger;t.isHovered()||(t.lastHoverMode=(0,r.normalizeEnum)(e||t._options.hoverMode),t.fullState=t.fullState|E,t._changeStyle(t.lastHoverMode,void 0,t.isSelected()&&t.lastSelectionMode!==R),i(V,{target:t}))},clearHover:function(){const e=this,t=e._eventTrigger;e.isHovered()&&(e._resetNearestPoint(),e.fullState=e.fullState&~E,e._changeStyle(e.lastHoverMode,T,e.isSelected()&&e.lastSelectionMode!==R),t(V,{target:e}))},hoverPoint:function(e){const t=this;e.isHovered()||(e.clearHover(),function(e,t){e.fullState|=E,e.applyView(t)}(e,t._legendCallback),t._canChangeView()&&t._applyStyle(t._styles.hover),t._eventPipe({action:z,target:e}),t._eventTrigger(F,{target:e}))},clearPointHover:function(){const e=this;e.getPoints().some((function(t){return!!t.isHovered()&&(i=t,n=e._legendCallback,i.fullState&=~E,i.applyView(n),i.releaseHoverState(),e._canChangeView()&&e._applyStyle(e._styles.normal),e._eventPipe({action:W,target:t}),e._eventTrigger(F,{target:t}),!0);var i,n}))},showPointTooltip:function(e){U(this._extGroups.seriesGroup,"showpointtooltip",e)},hidePointTooltip:function(e){U(this._extGroups.seriesGroup,"hidepointtooltip",e)},select:function(){const e=this;e.isSelected()||(e._setSelectedState(e._options.selectionMode),e._eventPipe({action:$,target:e}),e._group.toForeground(),e._eventTrigger(L,{target:e}))},clearSelection:function(){const e=this;e.isSelected()&&(e._releaseSelectedState(),e._eventTrigger(L,{target:e}))},getPointsByArg:function(e,t){const i=this,n=e.valueOf();let o=i.pointsByArgument[n];return o||t||!i._createAllAggregatedPoints()||(o=i.pointsByArgument[n]),o||[]},_createAllAggregatedPoints:function(){return!(!this.useAggregation()||this._useAllAggregatedPoints)&&(this.createPoints(!0),!0)},getPointsByKeys:function(e){return this.getPointsByArg(e)},notify:function(e){const t=this,i=e.action,n=t._seriesModes,o=e.target,a=o.getOptions(),s=(0,r.normalizeEnum)(a.hoverMode),l=(0,r.normalizeEnum)(a.selectionMode);i===z?t._hoverPointHandler(o,s,e.notifyLegend):i===W?t._clearPointHoverHandler(o,s,e.notifyLegend):i===$?o!==t&&"single"===n.seriesSelectionMode&&t.clearSelection():i===G?("single"===n.pointSelectionMode&&t.getPoints().some((function(e){return!(e===o||!e.isSelected())&&(t.deselectPoint(e),!0)})),t._selectPointHandler(o,l)):i===j&&t._deselectPointHandler(o,l)},_selectPointHandler:function(e,t){const i=this;t===H?e.series===i&&i._setPointsView(O,e):t===N&&i.getPointsByKeys(e.argument,e.argumentIndex).forEach((function(t){t!==e&&t.setView(O)}))},_deselectPointHandler:function(e,t){t===H?e.series===this&&this._resetPointsView(O,e):t===N&&this.getPointsByKeys(e.argument,e.argumentIndex).forEach((function(t){t!==e&&t.resetView(O)}))},_hoverPointHandler:function(e,t,i){const n=this;e.series!==n&&t===N?(n.getPointsByKeys(e.argument,e.argumentIndex).forEach((function(e){e.setView(T)})),i&&n._legendCallback(e)):t===H&&e.series===n&&n._setPointsView(T,e)},_clearPointHoverHandler:function(e,t,i){const n=this;t===N?(e.series!==n&&n.getPointsByKeys(e.argument,e.argumentIndex).forEach((function(e){e.resetView(T)})),i&&n._legendCallback(e)):t===H&&e.series===n&&n._resetPointsView(T,e)},_deletePoints:function(){const e=this;e._disposePoints(e._points),e._points=e._drawnPoints=null},_deleteTrackers:function(){const e=this;(0,a.each)(e._trackers||[],(function(e,t){t.remove()})),e._trackersGroup&&e._trackersGroup.dispose(),e._trackers=e._trackersGroup=null},dispose:function(){const e=this;e._deletePoints(),e._group.dispose(),e._labelsGroup&&e._labelsGroup.dispose(),e._errorBarGroup&&e._errorBarGroup.dispose(),e._deleteTrackers(),e._group=e._extGroups=e._markersGroup=e._elementsGroup=e._bordersGroup=e._labelsGroup=e._errorBarGroup=e._graphics=e._rangeData=e._renderer=e._styles=e._options=e._pointOptions=e._drawnPoints=e.pointsByArgument=e._segments=e._prevSeries=null},correctPosition:l.noop,drawTrackers:l.noop,getNeighborPoint:l.noop,areErrorBarsVisible:l.noop,_getColorId:l.noop,getMarginOptions:function(){return this._patchMarginOptions({percentStick:this.isFullStackedSeries()})},getColor:function(){return this.getLegendStyles().normal.fill},getOpacity:function(){return this._options.opacity},getStackName:function(){return this._stackName},getBarOverlapGroup:function(){return this._options.barOverlapGroup},getPointByCoord:function(e,t){const i=this.getNeighborPoint(e,t);return null!=i&&i.coordsIn(e,t)?i:null},getValueAxis:function(){return this._valueAxis},getArgumentAxis:function(){return this._argumentAxis},getMarkersGroup(){return this._markersGroup},getRenderer(){return this._renderer},removePointElements(){this._markersGroup&&((0,a.each)(this._points,((e,t)=>t.deleteMarker())),this._markersGroup.dispose(),this._markersGroup=null)},removeGraphicElements(){const e=this;e._elementsGroup&&(e._elementsGroup.dispose(),e._elementsGroup=null),(0,a.each)(e._graphics||[],((t,i)=>{e._removeElement(i)})),e._graphics=null},removeBordersGroup(){this._bordersGroup&&(this._bordersGroup.dispose(),this._bordersGroup=null)}};t.mixins=w.mixins},85526:function(e,t,i){t.chart=void 0;var n=i(85854),o=i(24008),a=i(46283),s=i(91449),r=i(52576),l=i(21274),d=i(17781);const u=n.chart.line,c=a.chart.area,h=s.chart.bar,p=s.polar.bar,g=r.extend,_=l.each,f=d.noop;(t.chart={}).bubble=g({},o.chart,{_calculateErrorBars:f,_getMainColor:h._getMainColor,_createPointStyles:h._createPointStyles,_updatePointsVisibility:h._updatePointsVisibility,_getOptionsForPoint:h._getOptionsForPoint,_applyMarkerClipRect:u._applyElementsClipRect,_parsePointStyle:p._parsePointStyle,_createLegendState:c._createLegendState,_getColorId:c._getColorId,_setMarkerGroupSettings:p._setMarkerGroupSettings,areErrorBarsVisible:f,_createErrorBarGroup:f,_checkData:function(e,t){return o.chart._checkData.call(this,e,t,{value:this.getValueFields()[0],size:this.getSizeField()})},_getPointDataSelector:function(e,t){const i=this.getSizeField(),n=o.chart._getPointDataSelector.call(this);return e=>{const t=n(e);return t.size=e[i],t}},_aggregators:{avg(e,t){let{data:i,intervalStart:n,intervalEnd:o}=e;if(!i.length)return;const a=t.getValueFields()[0],s=t.getSizeField(),r=i.reduce(((e,t)=>(e[0]+=t[a],e[1]+=t[s],e[2]++,e)),[0,0,0]);return{[a]:r[0]/r[2],[s]:r[1]/r[2],[t.getArgumentField()]:t._getIntervalCenter(n,o)}}},getValueFields:function(){return[this._options.valueField||"val"]},getSizeField:function(){return this._options.sizeField||"size"},_animate:function(){const e=this,t=e._drawnPoints.length-1,i=e._labelsGroup,n=function(){i&&i.animate({opacity:1},{duration:e._defaultDuration})};_(e._drawnPoints||[],(function(e,i){i.animate(e===t?n:void 0,{r:i.bubbleSize,translateX:i.x,translateY:i.y})}))},_patchMarginOptions:function(e){return e.processBubbleSize=!0,e}})},72259:function(e,t,i){t.stock=t.candlestick=void 0;var n=i(24008),o=i(91449),a=i(52576),s=i(11528),r=i(28779),l=i(17781);const d=o.chart.bar,u=t.stock=(0,a.extend)({},n.chart,{_animate:l.noop,_applyMarkerClipRect:function(e){e["clip-path"]=this._forceClipping?this._paneClipRectID:this._widePaneClipRectID},_updatePointsVisibility:d._updatePointsVisibility,_getOptionsForPoint:d._getOptionsForPoint,_createErrorBarGroup:l.noop,areErrorBarsVisible:l.noop,_createGroups:n.chart._createGroups,_setMarkerGroupSettings:function(){const e=this,t=e._markersGroup,i=e._createPointStyles(e._getMarkerGroupOptions()),n=(0,a.extend)(i.normal,{class:"default-markers"}),o=(0,a.extend)(i.positive.normal,{class:"default-positive-markers"}),s=(0,a.extend)(i.reduction.normal,{class:"reduction-markers"}),r=(0,a.extend)(i.reductionPositive.normal,{class:"reduction-positive-markers"}),l={class:"dxc-markers"};e._applyMarkerClipRect(l),t.attr(l),e._createGroup("defaultMarkersGroup",t,t,n),e._createGroup("reductionMarkersGroup",t,t,s),e._createGroup("defaultPositiveMarkersGroup",t,t,o),e._createGroup("reductionPositiveMarkersGroup",t,t,r)},_setGroupsSettings:function(){n.chart._setGroupsSettings.call(this,!1)},_getCreatingPointOptions:function(){const e=this;let t,i=e._predefinedPointOptions;return i||(t=this._getPointOptions(),e._predefinedPointOptions=i=(0,a.extend)(!0,{styles:{}},t),i.styles.normal=i.styles.positive.normal=i.styles.reduction.normal=i.styles.reductionPositive.normal={"stroke-width":t.styles&&t.styles.normal&&t.styles.normal["stroke-width"]}),i},_checkData:function(e,t){const i=this.getValueFields();return n.chart._checkData.call(this,e,t,{openValue:i[0],highValue:i[1],lowValue:i[2],closeValue:i[3]})&&e.highValue==e.highValue&&e.lowValue==e.lowValue},_getPointDataSelector:function(e,t){const i=this;let n;const o=i.getValueFields(),a=i.getArgumentField(),l=o[0],d=o[1],u=o[2],c=o[3];switch(i.level=i._options.reduction.level,(0,r.normalizeEnum)(i.level)){case"open":n=l;break;case"high":n=d;break;case"low":n=u;break;default:n=c,i.level="close"}let h;return e=>{const t=e[n];let o=!1;return(0,s.isDefined)(t)&&((0,s.isDefined)(h)&&(o=t<h),h=t),{argument:e[a],highValue:this._processEmptyValue(e[d]),lowValue:this._processEmptyValue(e[u]),closeValue:this._processEmptyValue(e[c]),openValue:this._processEmptyValue(e[l]),reductionValue:t,tag:e[i.getTagField()],isReduction:o,data:e}}},_parsePointStyle:function(e,t,i){const n=(0,r.extractColor)(e.color,!0);return{stroke:n||t,"stroke-width":e.width,fill:n||i}},_getDefaultStyle:function(e){const t=this,i=(0,r.extractColor)(e.color,!0)||t._options.mainSeriesColor;return{normal:t._parsePointStyle(e,i,i),hover:t._parsePointStyle(e.hoverStyle,i,i),selection:t._parsePointStyle(e.selectionStyle,i,i)}},_getReductionStyle:function(e){const t=this,i=e.reduction.color;return{normal:t._parsePointStyle({color:i,width:e.width,hatching:e.hatching},i,i),hover:t._parsePointStyle(e.hoverStyle,i,i),selection:t._parsePointStyle(e.selectionStyle,i,i)}},_createPointStyles:function(e){const t=this,i=t._options.innerColor,n=t._getDefaultStyle(e),o=(0,a.extend)(!0,{},n),s=t._getReductionStyle(e),r=(0,a.extend)(!0,{},s);return o.normal.fill=o.hover.fill=o.selection.fill=i,r.normal.fill=r.hover.fill=r.selection.fill=i,n.positive=o,n.reduction=s,n.reductionPositive=r,n.labelColor=t._options.mainSeriesColor,n},_endUpdateData:function(){delete this._predefinedPointOptions},_defaultAggregator:"ohlc",_aggregators:{ohlc:(e,t)=>{let{intervalStart:i,intervalEnd:n,data:o}=e;if(!o.length)return;let a={};const s=t.getValueFields(),r=s[1],l=s[2];return a[r]=-1/0,a[l]=1/0,a=o.reduce((function(e,t){return null!==t[r]&&(e[r]=Math.max(e[r],t[r])),null!==t[l]&&(e[l]=Math.min(e[l],t[l])),e}),a),a[s[0]]=o[0][s[0]],a[s[3]]=o[o.length-1][s[3]],isFinite(a[r])||(a[r]=null),isFinite(a[l])||(a[l]=null),a[t.getArgumentField()]=t._getIntervalCenter(i,n),a}},getValueFields:function(){const e=this._options;return[e.openValueField||"open",e.highValueField||"high",e.lowValueField||"low",e.closeValueField||"close"]},getArgumentField:function(){return this._options.argumentField||"date"},_patchMarginOptions:function(e){const t=this._getCreatingPointOptions().styles,i=[t.normal,t.hover,t.selection].reduce((function(e,t){return Math.max(e,t["stroke-width"])}),0);return e.size=10+i,e.sizePointNormalState=10,e},getSeriesPairCoord(e,t){let i=null;const n=this.getVisiblePoints();for(let o=0;o<n.length;o++){const a=n[o];let s;if(t)s=a.vx===e?(a.openY+a.closeY)/2:void 0;else{const t=[Math.min(a.lowY,a.highY),Math.max(a.lowY,a.highY)];s=e>=t[0]&&e<=t[1]?a.vx:void 0}if(this._checkAxisVisibleAreaCoord(!t,s)){i=s;break}}return i},usePointsToDefineAutoHiding:()=>!1});t.candlestick=(0,a.extend)({},u,{_parsePointStyle:function(e,t,i){const n=(0,r.extractColor)(e.color,!0)||i,o=u._parsePointStyle.call(this,e,t,n);return o.fill=n,o.hatching=e.hatching,o}})},82e3:function(e,t,i){t.processDisplayFormat=function(e,t){let i=e,n=!0;for(;n;){const e=i.indexOf(o),s=i.indexOf(a);if(e>=0&&s>0){const n=r(i.substring(e+1,s),t);i=i.substr(0,e)+n+i.substr(s+1)}else n=!1}return i};var n=i(49077);const o="{",a="}",s=":";function r(e,t){let i="";const o=e.indexOf(s);return o>0&&(i=e.substr(o+1),e=e.substr(0,o)),function(e,t){if(t){if(e instanceof Date)return(0,n.formatDate)(e,t);if("number"==typeof e)return(0,n.formatNumber)(e,t)}return e}(t[e],i)}},34685:function(e,t,i){t.default=void 0;var n=i(28779),o=i(11528),a=i(17781);const s="discrete",{abs:r,floor:l,ceil:d,min:u}=Math;function c(e,t,i){e.min=e.min<t?e.min:t,e.max=e.max>i?e.max:i}function h(e,t){if("logarithmic"!==e)return null;const i=t.getOptions().logarithmBase;return e=>{const t=(0,n.getLog)(r(e),i);return(t<0?l:d)(t)}}function p(e,t,i){let n=c;return e===s?n=function(e,t,i){t!==i&&e.categories.push(i),e.categories.push(t)}:t&&(n=function(e,i){const n=t.calculateInterval(i,e.prevValue),o=e.interval;e.interval=(o<n?o:n)||o,e.prevValue=i,c(e,i,i)}),i?(e,t,o)=>{const a=[];n(e,t,o),0!==t&&a.push(i(t)),0!==o&&a.push(i(o));const s=u.apply(null,a);e.linearThreshold=e.linearThreshold<s?e.linearThreshold:s}:n}function g(e,t,i){const n={axisType:e,dataType:t};return e===s?n.categories=[]:(n.min=(0,o.isObject)(i)?i.min:i,n.max=(0,o.isObject)(i)?i.max:i),n}function _(e){return e.categories&&(e.categories=(0,n.unique)(e.categories)),e}function f(e,t,i,n,a){const s=function(e,t,i,n){if(t&&(0,o.isDefined)(t.value)){const o=e.value,a=t.value,s=e.argument,r=(i-s)*(a-o)/(t.argument-s)+o.valueOf();return"datetime"===n.dataType?new Date(r):r}return e.value}(i,n,a,t);e(t,s,s)}function m(e){return e.type.toLowerCase().indexOf("line")>=0||e.type.toLowerCase().indexOf("area")>=0}function v(e){const t=p(e.valueAxisType),i=e.getArgumentAxis(),s=i&&e.getArgumentAxis().visualRange()||{},r=m(e)?f:a.noop;if(i&&i.getMarginOptions().checkInterval){const t=e.getArgumentAxis().getTranslator().getBusinessRange(),i=(0,n.getAddFunction)(t,!1),a=t.interval;isFinite(a)&&(0,o.isDefined)(s.startValue)&&(0,o.isDefined)(s.endValue)&&(s.startValue=i(s.startValue,a,-1),s.endValue=i(s.endValue,a))}const l=C(s);return function(e,i,n,a){const d=i.argument;return i.hasValue()?(l(d)?(e.startCalc||(e.startCalc=!0,r(t,e,i,a[n-1],s.startValue)),t(e,i.getMinValue(),i.getMaxValue())):!s.categories&&(0,o.isDefined)(s.startValue)&&d>s.startValue&&(e.startCalc||r(t,e,i,a[n-1],s.startValue),e.endCalc=!0,r(t,e,i,a[n-1],s.endValue)),e):e}}function C(e){if(e.categories){const t=e.categories.reduce(((e,t)=>(e[t.valueOf()]=!0,e)),{});return e=>(0,o.isDefined)(e)&&t[e.valueOf()]}return(0,o.isDefined)(e.startValue)||(0,o.isDefined)(e.endValue)?(0,o.isDefined)(e.endValue)?(0,o.isDefined)(e.startValue)?t=>t>=e.startValue&&t<=e.endValue:t=>t<=e.endValue:t=>t>=e.startValue:()=>!0}t.default={getViewPortFilter:C,getArgumentRange:function(e){const t=e._data||[];let i={};if(t.length)if(e.argumentAxisType===s)i={categories:t.map((e=>e.argument))};else{let n;if(t.length>1){const i=e.getArgumentAxis().calculateInterval(t[0].argument,t[1].argument),o=e.getArgumentAxis().calculateInterval(t[t.length-1].argument,t[t.length-2].argument);n=u(i,o)}i={min:t[0].argument,max:t[t.length-1].argument,interval:n}}return _(i)},getRangeData:function(e){const t=e.getPoints(),i=e.useAggregation(),n=e.getArgumentAxis(),a=p(e.argumentAxisType,t.length>1&&n,h(e.argumentAxisType,n)),r=p(e.valueAxisType,null,h(e.valueAxisType,e.getValueAxis())),l=v(e),d=t.reduce((function(e,t,i,n){const o=t.argument;return t.isArgumentCorrect()?(a(e.arg,o,o),t.hasValue()&&(r(e.val,t.getMinValue(),t.getMaxValue()),l(e.viewport,t,i,n)),e):e}),{arg:g(e.argumentAxisType,e.argumentType,null!=n&&n.aggregatedPointBetweenTicks()?void 0:e.getArgumentRangeInitialValue()),val:g(e.valueAxisType,e.valueType,t.length?e.getValueRangeInitialValue():void 0),viewport:g(e.valueAxisType,e.valueType,t.length?e.getValueRangeInitialValue():void 0)});if(i){const t=this.getArgumentRange(e);if(e.argumentAxisType===s)d.arg=t;else{const e=n.getViewport();((0,o.isDefined)(e.startValue)||(0,o.isDefined)(e.length))&&a(d.arg,t.min,t.min),((0,o.isDefined)(e.endValue)||(0,o.isDefined)(e.length)&&(0,o.isDefined)(e.startValue))&&a(d.arg,t.max,t.max)}}return _(d.arg),_(d.val),d},getViewport:function(e){const t=e.getPoints();let i={};const n=v(e);return i=g(e.valueAxisType,e.valueType,t.length?e.getValueRangeInitialValue():void 0),t.some((function(e,o){return n(i,e,o,t),i.endCalc})),i},getPointsInViewPort:function(e){const t=C(e.getArgumentAxis().visualRange()||{}),i=e.getValueAxis().visualRange()||{},n=C(i),o=e.getPoints(),s=function(e,t,o){const a=t.getMinValue(),s=t.getMaxValue(),r=n(a),l=n(s);r&&e.push(a),s!==a&&l&&e.push(s),!o||r||l||(e.length?e.push(i.endValue):e.push(i.startValue))},r=m(e)?function(e,i,n){const o=i[n],a=i[n-1],r=i[n+1];r&&t(r.argument)&&s(e[1],o,!0),a&&t(a.argument)&&s(e[1],o,!0)}:a.noop;return o.reduce((function(e,i,n){return t(i.argument)?s(e[0],i):r(e,o,n),e}),[[],[]])}};e.exports=t.default,e.exports.default=t.default},85854:function(e,t,i){t.polar=t.chart=void 0;var n=i(24008),o=i(22263),a=i(52576),s=i(21274),r=i(28779),l=i(50254);const d="discrete",{round:u,sqrt:c,pow:h,min:p,max:g,abs:_}=Math,f=t.chart={},m=t.polar={};function v(e,t,i,n){const a=(0,o.clone)(e);return a.x=t,a.y=i,a.angle=n,a}function C(e,t,i,n,o){const a=e.angle+o,s=(0,r.getCosAndSin)(a);return v(t,i.x+(e.radius+n*o)*s.cos,i.y-(e.radius+n*o)*s.sin,a)}function y(e,t,i,n,o){const a=t-e,s=3*i-3*t,r=3*n-6*i+3*t,d=o-3*n+3*i-t;return(0,l.solveCubicEquation)(d,r,s,a)}const b={autoHidePointMarkersEnabled:()=>!0,_applyGroupSettings:function(e,t,i){t=(0,a.extend)(t,e),this._applyElementsClipRect(t),i.attr(t)},_setGroupsSettings:function(e){const t=this,i=t._styles.normal;t._applyGroupSettings(i.elements,{class:"dxc-elements"},t._elementsGroup),t._bordersGroup&&t._applyGroupSettings(i.border,{class:"dxc-borders"},t._bordersGroup),n.chart._setGroupsSettings.call(t,e),e&&t._markersGroup&&t._markersGroup.attr({opacity:.001})},_createGroups:function(){const e=this;e._createGroup("_elementsGroup",e,e._group),e._areBordersVisible()&&e._createGroup("_bordersGroup",e,e._group),n.chart._createGroups.call(e)},_areBordersVisible:function(){return!1},_getDefaultSegment:function(e){return{line:(0,r.map)(e.line||[],(function(e){return e.getDefaultCoords()}))}},_prepareSegment:function(e){return{line:e}},_parseLineOptions:function(e,t){return{stroke:(0,r.extractColor)(e.color,!0)||t,"stroke-width":e.width,dashStyle:e.dashStyle||"solid"}},_parseStyle:function(e,t){return{elements:this._parseLineOptions(e,t)}},_applyStyle:function(e){const t=this;t._elementsGroup&&t._elementsGroup.attr(e.elements),(0,s.each)(t._graphics||[],(function(t,i){i.line&&i.line.attr({"stroke-width":e.elements["stroke-width"]}).sharp()}))},_drawElement:function(e,t){return{line:this._createMainElement(e.line,{"stroke-width":this._styles.normal.elements["stroke-width"]}).append(t)}},_removeElement:function(e){e.line.remove()},_updateElement:function(e,t,i,n){const o={points:t.line},a=e.line;i?a.animate(o,{},n):a.attr(o)},_animateComplete:function(){const e=this;n.chart._animateComplete.call(e),e._markersGroup&&e._markersGroup.animate({opacity:1},{duration:e._defaultDuration})},_animate:function(){const e=this,t=e._graphics.length-1;(0,s.each)(e._graphics||[],(function(i,n){let o;i===t&&(o=function(){e._animateComplete()}),e._updateElement(n,e._segments[i],!0,o)}))},_drawPoint:function(e){n.chart._drawPoint.call(this,{point:e.point,groups:e.groups})},_createMainElement:function(e,t){return this._renderer.path(e,"line").attr(t)},_sortPoints:function(e,t){return t?e.sort((function(e,t){return t.y-e.y})):e.sort((function(e,t){return e.x-t.x}))},_drawSegment:function(e,t,i,n){const o=this,a=o._options.rotated,s=o._prepareSegment(e,a,n);o._segments.push(s),o._graphics[i]?t||o._updateElement(o._graphics[i],s):o._graphics[i]=o._drawElement(t?o._getDefaultSegment(s):s,o._elementsGroup)},_getTrackerSettings:function(){const e=this._defaultTrackerWidth,t=this._styles.normal.elements["stroke-width"];return{"stroke-width":t>e?t:e,fill:"none"}},_getMainPointsFromSegment:function(e){return e.line},_drawTrackerElement:function(e){return this._createMainElement(this._getMainPointsFromSegment(e),this._getTrackerSettings(e))},_updateTrackerElement:function(e,t){const i=this._getTrackerSettings(e);i.points=this._getMainPointsFromSegment(e),t.attr(i)},checkSeriesViewportCoord(e,t){if(!n.chart.checkSeriesViewportCoord.call(this))return!1;const i=e.isArgumentAxis?this.getArgumentRange():this.getViewport(),o=e.getTranslator().translate(i.categories?i.categories[0]:i.min),a=e.getTranslator().translate(i.categories?i.categories[i.categories.length-1]:i.max),s=this.getOptions().rotated,r=e.getOptions().inverted;return e.isArgumentAxis&&(!s&&!r||s&&r)||!e.isArgumentAxis&&(s&&!r||!s&&r)?t>=o&&t<=a:t>=a&&t<=o}},x=f.line=(0,a.extend)({},n.chart,b,{getPointCenterByArg(e){const t=this.getArgumentAxis().getTranslator().translate(e);return{x:t,y:t}},getSeriesPairCoord(e,t){let i=null;const n=this._getNearestPointsByCoord(e,t),o=t&&!this._options.rotated||!t&&this._options.rotated;for(let a=0;a<n.length;a++){const s=n[a],r=(s[1].vy-s[0].vy)/(s[1].vx-s[0].vx),l=s[0].vy-s[0].vx*r;let d;if(d=s[1].vx-s[0].vx==0?o?s[0].vy:s[0].vx:o?r*e+l:(e-l)/r,this._checkAxisVisibleAreaCoord(!t,d)){i=d;break}}return i}});f.stepline=(0,a.extend)({},x,{_calculateStepLinePoints(e){const t=[],i=this._options.rotated?"x":"y";return(0,s.each)(e,(function(e,n){let a;if(!e)return void t.push(n);const s=t[t.length-1][i];s!==n[i]&&(a=(0,o.clone)(n),a[i]=s,t.push(a)),t.push(n)})),t},_prepareSegment:function(e){return x._prepareSegment(this._calculateStepLinePoints(e))},getSeriesPairCoord(e,t){let i;const n=this._options.rotated,o=!t&&!n||t&&n,a=o?"vy":"vx",s=o?"vx":"vy",r=this._getNearestPointsByCoord(e,t);for(let n=0;n<r.length;n++){const o=r[n];let l;if(l=t?e!==o[1][a]?o[0][s]:o[1][s]:e===o[0][a]?o[0][s]:o[1][s],this._checkAxisVisibleAreaCoord(!t,l)){i=l;break}}return i}}),f.spline=(0,a.extend)({},x,{_calculateBezierPoints:function(e,t){const i=[],n=e,o=function(e,t,i){return e>t&&i>e||e<t&&i<e?e:i};return 1!==n.length?n.forEach((function(e,a){let s,r,l,d;const u=n[a-1],c=n[a+1];let h,p,g,_;const f=.5;let m,C,y,b,x,w;if(!a||a===n.length-1)return void i.push(e,e);const S=e.x,D=e.y;h=u.x,p=c.x,g=u.y,_=c.y;if(!!(!t&&(D<=u.y&&D<=c.y||D>=u.y&&D>=c.y)||t&&(S<=u.x&&S<=c.x||S>=u.x&&S>=c.x)))t?(l=s=S,d=(D+c.y)/2,r=(D+u.y)/2):(d=r=D,l=(S+c.x)/2,s=(S+u.x)/2);else{if(m=_-g,C=h-p,y=g*p-h*_,t){if(!m)return void i.push(e,e,e);x=D,b=-1*(C*x+y)/m,w=b-S,h-=w,p-=w}else{if(!C)return void i.push(e,e,e);b=S,x=-1*(m*b+y)/C,w=x-D,g-=w,_-=w}l=(S+f*p)/1.5,d=(D+f*_)/1.5,s=(S+f*h)/1.5,r=(D+f*g)/1.5}t?(s=o(u.x,S,s),l=o(c.x,S,l)):(r=o(u.y,D,r),d=o(c.y,D,d));const I=v(e,s,r),E=v(e,l,d);i.push(I,e,E)})):i.push(n[0]),i},_prepareSegment:function(e,t){return x._prepareSegment(this._calculateBezierPoints(e,t))},_createMainElement:function(e,t){return this._renderer.path(e,"bezier").attr(t)},getSeriesPairCoord(e,t){let i=null;const n=!t&&!this._options.rotated||t&&this._options.rotated,o=n?"vy":"vx",a=n?"y":"x",s=n?"vx":"vy",r=n?"x":"y",l=(t?this.getValueAxis():this.getArgumentAxis()).getVisibleArea(),d=this._getNearestPointsByCoord(e,t);for(let t=0;t<d.length;t++){const n=d[t];if(1===n.length)l[0]<=n[0][s]&&l[1]>=n[0][s]&&(i=n[0][s]);else{y(e,n[0][o],n[1][a],n[2][a],n[3][o]).forEach((e=>{if(e>=0&&e<=1){const t=Math.pow(1-e,3)*n[0][s]+3*Math.pow(1-e,2)*e*n[1][r]+3*(1-e)*e*e*n[2][r]+e*e*e*n[3][s];l[0]<=t&&l[1]>=t&&(i=t)}}))}if(null!==i)break}return i},_getNearestPoints(e,t,i){const n=i.indexOf(e);return[e,i[n+1],i[n+2],t]},_getBezierPoints(){return this._segments.length>0?this._segments.reduce(((e,t)=>e.concat(t.line)),[]):[]}}),m.line=(0,a.extend)({},n.polar,b,{_sortPoints:function(e){return e},_prepareSegment:function(e,t,i){let n=[];const o=this.getValueAxis().getCenter();let a;if(i&&this._closeSegment(e),this.argumentAxisType===d||this.valueAxisType===d)return x._prepareSegment.call(this,e);for(a=1;a<e.length;a++)n=n.concat(this._getTangentPoints(e[a],e[a-1],o,a===e.length-1));return n.length||(n=e),{line:n}},_getRemainingAngle:function(e){const t=(0,r.normalizeAngle)(e);return e>=0?360-t:-t},_closeSegment(e){const t=this._segments.length?this._segments[0].line[0]:e[0];let i=v(t,t.x,t.y,t.angle);i=this._modifyReflectedPoint(i,e.at(-1)),i&&e.push(i)},_modifyReflectedPoint(e,t){if(t.angle!==e.angle){if((0,r.normalizeAngle)(u(t.angle))===(0,r.normalizeAngle)(u(e.angle)))e.angle=t.angle;else{const i=t.angle-e.angle;e.angle=t.angle+this._getRemainingAngle(i)}return e}},_getTangentPoints:function(e,t,i,n){let o=[];const a=Math.round(t.angle-e.angle),s=(t.radius-e.radius)/a;let r;if(0===a)o=[t,e];else if(a>0){for(r=n?a:a-1;r>=0;r--)o.push(C(e,t,i,s,r))}else{const l=n?a:a+1;for(r=0;r>=l;r--)o.push(C(e,t,i,s,a-r))}return o},getSeriesPairCoord(e,t){const i=this,n=i.getArgumentAxis(),o=t?"angle":"radius",a=e[o],s=n.getCenter(),u=(e,t,i)=>{let{x:o,y:a}=i;return c(h((r={x:o,y:a}).x-(l=s).x,2)+h(r.y-l.y,2))<=n.getRadius()&&p(e.x,t.x)<=o&&g(e.x,t.x)>=o&&p(e.y,t.y)<=a&&g(e.y,t.y)>=a;var r,l};let f;const m=i.getNeighborPoints(a,o);if(1===m.length)f=m[0];else if(m.length>1){const e=m[0],n=m[1];if(i.argumentAxisType!==d&&i.valueAxisType!==d){let i,o;t?(i=(e.radius-n.radius)/(e.angle-n.angle),o=a-n.angle):(i=(e.radius-n.radius)/(e.angle-n.angle),o=(a-n.radius)/i),f=C(n,e,s,i,o)}else if(t){const t=(0,r.getCosAndSin)(-a),i=(n.y-e.y)/(n.x-e.x),o=e.y-e.x*i,d=t.sin/t.cos,c=(s.y-d*s.x-o)/(i-d),h=i*c+o;if(u(e,n,{x:c,y:h})){const e=_((0,l.trunc)((360+a)/90)%4);(0===e&&c>=s.x&&h<=s.y||1===e&&c<=s.x&&h<=s.y||2===e&&c<=s.x&&h>=s.y||3===e&&c>=s.x&&h>=s.y)&&(f={x:c,y:h})}}else{const t=(n.y-e.y)/(n.x-e.x),i=e.y-e.x*t,o=1+t*t,r=-2*s.x+2*t*i-2*t*s.y,l=r*r-4*o*(-h(a,2)+h(i-s.y,2)+h(s.x,2));if(l>=0){const a=(-r-c(l))/(2*o),s=(-r+c(l))/(2*o),d=t*a+i,h=t*s+i;f=u(e,n,{x:a,y:d})?{x:a,y:d}:u(e,n,{x:s,y:h})?{x:s,y:h}:void 0}}}return f},getNeighborPoints(e,t){let i=this.getPoints();const n=[];if(this.getOptions().closed){i=(0,a.extend)(!0,[],i);const e=i[i.length-1],t=v(i[0],i[0].x,i[0].y,i[0].angle),n=v(e,e.x,e.y,e.angle),o=this._modifyReflectedPoint(t,e),s=this._modifyReflectedPoint(n,i[0]);s&&i.unshift(s),o&&i.push(o)}for(let o=1;o<i.length&&(i[o-1][t]===e?n.push(i[o-1]):i[o][t]===e?n.push(i[o]):(i[o][t]>e&&i[o-1][t]<e||i[o-1][t]>e&&i[o][t]<e)&&(n.push(i[o-1]),n.push(i[o])),!(n.length>0));o++);return n}})},64708:function(e,t,i){t.pie=t.doughnut=t.donut=void 0;var n=i(17781),o=i(21274),a=i(24008),s=i(28779),r=i(52576),l=i(91449);const d=a.chart,u=l.chart.bar,c=r.extend,h=o.each,p=n.noop,g=s.map,_=isFinite,f=Math.max,m=t.pie=c({},u,{_setGroupsSettings:function(){d._setGroupsSettings.apply(this,arguments),this._labelsGroup.attr({"pointer-events":null})},_createErrorBarGroup:p,_drawPoint:function(e){const t=e.point,i=this._legendCallback;d._drawPoint.call(this,e),!t.isVisible()&&t.setInvisibility(),t.isSelected()&&i()},_getOldPoint:function(e,t,i){const n=(this._points||[])[i];return n&&(t[n.argument.valueOf()]=t[n.argument.valueOf()].filter((e=>e!==n))),n},adjustLabels:function(e){return(this._points||[]).reduce(((t,i)=>{if(i._label.isVisible())return i.setLabelTrackerData(),t=i.applyWordWrap(e)||t,i.updateLabelCoord(e),t}),!1)},_applyElementsClipRect:p,getColor:p,areErrorBarsVisible:p,drawLabelsWOPoints:function(){const e=this;return"inside"!==e._options.label.position&&(e._labelsGroup.append(e._extGroups.labelsGroup),(e._points||[]).forEach((function(e){e.drawLabel()})),!0)},getPointsCount:function(){return this._data.filter((e=>this._checkData(e))).length},setMaxPointsCount:function(e){this._pointsCount=e},_getCreatingPointOptions:function(e,t){return this._getPointOptions(e,t)},_updateOptions:function(e){this.labelSpace=0,this.innerRadius="pie"===this.type?0:e.innerRadius},_checkData:function(e,t){const i=u._checkData.call(this,e,t,{value:this.getValueFields()[0]});return this._options.paintNullPoints?i:i&&null!==e.value},_createGroups:d._createGroups,_setMarkerGroupSettings:function(){this._markersGroup.attr({class:"dxc-markers"})},_getMainColor(e,t){const i=this.getPointsByArg(e.argument),n=t?i.indexOf(t):i.length;return this._options.mainSeriesColor(e.argument,n,this._pointsCount)},_getPointOptions:function(e){return this._parsePointOptions(this._preparePointOptions(),this._options.label,e)},_getRangeData:function(){return this._rangeData},_createPointStyles:function(e,t,i){var n;const o=this,a=(0,s.extractColor)(e.color,!0)||o._getMainColor(t,i),r=null===(n=e.color)||void 0===n?void 0:n.fillId,l=e.hoverStyle||{},d=e.selectionStyle||{};return r&&o._turnOffHatching(l,d),{labelColor:a,normal:o._parsePointStyle(e,a,a),hover:o._parsePointStyle(l,r||a,a),selection:o._parsePointStyle(d,r||a,a),legendStyles:{normal:o._createLegendState(e,a),hover:o._createLegendState(l,r||a),selection:o._createLegendState(d,r||a)}}},_getArrangeMinShownValue:function(e,t){const i=this._options.minSegmentSize;let n=0,o=0;return t=t||e.length,h(e,(function(e,a){a.isVisible()&&(a.normalInitialValue<i*t/360?n+=i:o+=a.normalInitialValue)})),n<360?i*o/(360-n):0},_applyArrangeCorrection:function(e,t,i){const n=this._options,o="anticlockwise"!==n.segmentsDirection,a=_(n.startAngle)?(0,s.normalizeAngle)(n.startAngle):0,r=n.minSegmentSize;let l,d=0,u=0;0===i&&(i=e.filter((function(e){return e.isVisible()})).length,u=1),h(o?e:e.concat([]).reverse(),(function(e,n){const o=n.isVisible()?u||n.normalInitialValue:0;let s;r&&n.isVisible()&&o<t&&(s=t),l=o/i,n.correctValue(d,l,u+(s||0)),n.shiftedAngle=a,d+=s||o})),this._rangeData={val:{min:0,max:d}}},_removePoint:function(e){const t=this.getPointsByArg(e.argument);t.splice(t.indexOf(e),1),e.dispose()},arrangePoints:function(){const e=this,t=e._points||[],i=e._options.minSegmentSize;let n,o=!0,a=0;const s=t.length;for(;a<s&&o;)o=t[a].value<=0,a++;const r=e._points=g(t,(function(t){return null===t.value||!o&&t.value<0?(e._removePoint(t),null):t})),l=r.reduce((function(e,t){return f(e,Math.abs(t.initialValue))}),0);r.forEach((function(e){e.normalInitialValue=e.initialValue/(0!==l?l:1)}));const d=r.reduce((function(e,t){return e+(t.isVisible()?t.normalInitialValue:0)}),0);i&&(n=this._getArrangeMinShownValue(r,d)),e._applyArrangeCorrection(r,n,d)},correctPosition:function(e,t){h(this._points,(function(t,i){i.correctPosition(e)})),this.setVisibleArea(t)},correctRadius:function(e){this._points.forEach((function(t){t.correctRadius(e)}))},correctLabelRadius:function(e){this._points.forEach((function(t){t.correctLabelRadius(e)}))},setVisibleArea:function(e){this._visibleArea={minX:e.left,maxX:e.width-e.right,minY:e.top,maxY:e.height-e.bottom}},_applyVisibleArea:p,_animate:function(e){const t=this,i=t._points,n=i&&i.length,o=function(){t._animateComplete()};let a;a=e?function(e,t){e.animate(t===n-1?o:void 0,.7,(1-.7)*t/(n-1))}:function(e,t){e.animate(t===n-1?o:void 0)},i.forEach(a)},getVisiblePoints:function(){return g(this._points,(function(e){return e.isVisible()?e:null}))},getPointsByKeys:function(e,t){const i=this.getPointsByArg(e);return i[t]&&[i[t]]||[]}});t.doughnut=m,t.donut=m},39678:function(e,t,i){t.default=void 0;var n,o=i(52576),a=(n=i(27589))&&n.__esModule?n:{default:n};const s=o.extend,r=Math,l=r.floor,d=r.abs,u="right",c="top";function h(e){const t=e.initialValue,i=e._getValTranslator().getBusinessRange().invert,n="discrete"===e.series.valueAxisType,o=e.series.isFullStackedSeries();return!n&&(t>=0&&!i||t<0&&i)||n&&!i||o?c:"bottom"}t.default=s({},a.default,{correctCoordinates(e){const t=this,i=l(e.offset-e.width/2);t._options.rotated?(t.height=e.width,t.yCorrection=i,t.xCorrection=null):(t.width=e.width,t.xCorrection=i,t.yCorrection=null)},_calculateVisibility:function(e,t,i,n){const{minX:o,maxX:a,minY:s,maxY:r}=this._getVisibleArea();this.inVisibleArea=o<=e+i&&a>=e&&s<=t+n&&r>=t},_cacheVisibility:function(e,t,i,n){const o=Math.abs(t-i);t=Math.min(t,i),n?this._calculateVisibility(t,e,o,this.height):this._calculateVisibility(e,t,this.width,o)},_getGraphicBBox:function(e){const t={x:this.x,y:this.y,width:this.width,height:this.height};if(e){const i="top"===e;this._options.rotated?(t.x=i?t.x+t.width:t.x,t.width=0):(t.y=i?t.y:t.y+t.height,t.height=0)}return t},_getLabelConnector:function(e){return this._getGraphicBBox(e)},_getLabelPosition:function(){let e=h(this);return this._options.rotated&&(e=e===c?u:"left"),e},_getLabelCoords:function(e){const t=this;let i;return i=0===t.initialValue&&t.series.isFullStackedSeries()?this._options.rotated?t._getLabelCoordOfPosition(e,u):t._getLabelCoordOfPosition(e,c):"inside"===e.getLayoutOptions().position?t._getLabelCoordOfPosition(e,"inside"):a.default._getLabelCoords.call(this,e),i},_drawLabel:function(){this._label.pointPosition="inside"!==this._label.getLayoutOptions().position&&h(this),a.default._drawLabel.call(this)},hideInsideLabel:function(e,t){const i=this._getGraphicBBox(),n=e.getBoundingRect();return!(!this._options.resolveLabelsOverlapping||!(t.y<=i.y&&t.y+n.height>=i.y+i.height||t.x<=i.x&&t.x+n.width>=i.x+i.width)||t.y>i.y+i.height||t.y+n.height<i.y||t.x>i.x+i.width||t.x+n.width<i.x)&&(e.draw(!1),!0)},_showForZeroValues:function(){return this._options.label.showForZeroValues||this.initialValue},_drawMarker(e,t,i){const n=this,o=n._getStyle(),a=n._options.cornerRadius,s=n._options.rotated;let{x:r,y:l,width:d,height:u}=n.getMarkerCoords();i&&(s?(d=0,r=n.defaultX):(u=0,l=n.defaultY)),n.graphic=e.rect(r,l,d,u).attr({rx:a,ry:a}).smartAttr(o).data({"chart-data-point":n}).append(t)},_getSettingsForTracker:function(){const e=this;let t=e.y,i=e.height,n=e.x,o=e.width;return e._options.rotated?1===o&&(o=9,n-=4):1===i&&(i=9,t-=4),{x:n,y:t,width:o,height:i}},getGraphicSettings:function(){const e=this.graphic;return{x:e.attr("x"),y:e.attr("y"),height:e.attr("height"),width:e.attr("width")}},_getEdgeTooltipParams(){const e=this.value>=0;let t,i;const n=this._getValTranslator().getBusinessRange().invert,{x:o,y:a,width:s,height:r}=this;return this._options.rotated?(i=a+r/2,t=n?e?o:o+s:e?o+s:o):(t=o+s/2,i=n?e?a+r:a:e?a:a+r),{x:t,y:i,offset:0}},getTooltipParams:function(e){if("edge"===e)return this._getEdgeTooltipParams();const t=this.getCenterCoord();return t.offset=0,t},getCenterCoord(){const{width:e,height:t,x:i,y:n}=this;return{x:i+e/2,y:n+t/2}},_truncateCoord:function(e,t){return null===e?e:e<t[0]?t[0]:e>t[1]?t[1]:e},_getErrorBarBaseEdgeLength(){return this._options.rotated?this.height:this.width},_translateErrorBars:function(e){a.default._translateErrorBars.call(this),(this._errorBarPos<e[0]||this._errorBarPos>e[1])&&(this._errorBarPos=void 0)},_translate:function(){const e=this,t=e._options.rotated,i=t?"x":"y",n=t?"y":"x",o=t?"width":"height",a=t?"height":"width",s=e._getArgTranslator(),r=e._getValTranslator(),l=e.series.getArgumentAxis().getVisibleArea(),u=e.series.getValueAxis().getVisibleArea();let c=s.translate(e.argument),h=r.translate(e.value,1),p=r.translate(e.minValue,-1);e[n]=c=null===c?c:c+(e[n+"Correction"]||0),e["v"+i]=h,e["v"+n]=c+e[a]/2,this._cacheVisibility(c,h,p,t),h=e._truncateCoord(h,u),p=e._truncateCoord(p,u),e[o]=d(h-p),h=h<p?h:p,e[i]=null===h?h:h+(e[i+"Correction"]||0),e["min"+i.toUpperCase()]=null===p?p:p+(e[i+"Correction"]||0),e["default"+i.toUpperCase()]=r.translate("canvas_position_default"),e._translateErrorBars(l),e.inVisibleArea&&null!==e[n]&&(e[n]<l[0]&&(e[a]=e[a]-(l[0]-e[n]),e[n]=l[0]),e[n]+e[a]>l[1]&&(e[a]=l[1]-e[n]))},_updateMarker:function(e,t){this.graphic.smartAttr(s({},t,e?{}:this.getMarkerCoords()))},getMarkerCoords:function(){const e=this;let t=e.x;const i=e.y;let n=e.width,o=e.height;const a=e.series.getArgumentAxis(),s=e._options.rotated;if(a.getAxisPosition){const i=a.getOptions(),r=Math.round(i.width/2),l=a.getAxisPosition();if(i.visible)if(s){const i=e.minX===e.defaultX&&e.minX===l-a.getAxisShift();t+=i?r:0,n-=i?r:0,n<0&&(n=0)}else o-=e.minY===e.defaultY&&e.minY===l-a.getAxisShift()?r:0,o<0&&(o=0)}return{x:t,y:i,width:n,height:o}},coordsIn:function(e,t){const i=this;return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}});e.exports=t.default,e.exports.default=t.default},31656:function(e,t,i){t.Point=R;var n=m(i(7377)),o=m(i(27589)),a=m(i(39678)),s=m(i(49787)),r=m(i(78641)),l=m(i(66779)),d=m(i(81660)),u=m(i(95208)),c=m(i(14185)),h=i(9619),p=i(28779),g=i(52576),_=i(11528),f=i(17781);function m(e){return e&&e.__esModule?e:{default:e}}const v={},C=g.extend,y=n.default.states,b="symbolPoint",x="polarSymbolPoint",w="barPoint",S="polarBarPoint",D="piePoint",I=y.selectedMark,E=y.hoverMark,T=y.normalMark,A=y.hover,O=y.normal,P=y.selection,k={chart:{scatter:b,line:b,spline:b,stepline:b,stackedline:b,fullstackedline:b,stackedspline:b,fullstackedspline:b,stackedsplinearea:b,fullstackedsplinearea:b,area:b,splinearea:b,steparea:b,stackedarea:b,fullstackedarea:b,rangearea:"rangeSymbolPoint",bar:w,stackedbar:w,fullstackedbar:w,rangebar:"rangeBarPoint",bubble:"bubblePoint",stock:"stockPoint",candlestick:"candlestickPoint"},pie:{pie:D,doughnut:D,donut:D},polar:{scatter:x,line:x,area:x,bar:S,stackedbar:S}};function M(e){return"none"===(0,p.normalizeEnum)(e)}function R(e,t,i){this.fullState=T,this.series=e,this.update(t,i),this._viewCounters={hover:0,selection:0},this._emptySettings={fill:null,stroke:null,dashStyle:null,filter:null}}v.symbolPoint=o.default,v.barPoint=a.default,v.bubblePoint=s.default,v.piePoint=r.default,v.rangeSymbolPoint=l.default,v.rangeBarPoint=d.default,v.candlestickPoint=u.default,v.stockPoint=c.default,v.polarSymbolPoint=h.polarSymbolPoint,v.polarBarPoint=h.polarBarPoint,R.prototype={constructor:R,getColor:function(){return this.hasValue()||this._styles.usePointCustomOptions||this.series.customizePoint(this,this._dataItem),this._styles.normal.fill||this.series.getColor()},_getStyle:function(){return this._styles[this._currentStyle||"normal"]},update:function(e,t){this.updateOptions(t),this.updateData(e)},updateData:function(e){const t=this,i=t.argument!==e.argument;t.argument=t.initialArgument=t.originalArgument=e.argument,t.tag=e.tag,t.index=e.index,t._dataItem=e,t.data=e.data,t.lowError=e.lowError,t.highError=e.highError,t.aggregationInfo=e.aggregationInfo,t._updateData(e,i),!t.hasValue()&&t.setInvisibility(),t._fillStyle(),t._updateLabelData()},deleteMarker:function(){const e=this;e.graphic&&e.graphic.dispose(),e.graphic=null},draw:function(e,t,i,n){const o=this;return(o._needDeletingOnDraw||o.series.autoHidePointMarkers&&!o.isSelected())&&(o.deleteMarker(),o._needDeletingOnDraw=!1),o._needClearingOnDraw&&(o.clearMarker(),o._needClearingOnDraw=!1),o._hasGraphic()?o._updateMarker(i,this._getStyle(),t.markers):o.getMarkerVisibility()&&!o.series.autoHidePointMarkers&&o._drawMarker(e,t.markers,i,n),o._drawLabel(),o._drawErrorBar(e,t.errorBars,i),o},_getViewStyle:function(){let e=T,t=this.fullState;const i=[O,A,P,P];return this._viewCounters.hover&&(e|=E),this._viewCounters.selection&&(e|=I),M(this.getOptions().selectionMode)&&(t&=~I),M(this.getOptions().hoverMode)&&(t&=~E),e|=t,i[e]},applyView:function(e){const t=this,i=t._getViewStyle();t._currentStyle=i,t.graphic||!t.getMarkerVisibility()||!t.series.autoHidePointMarkers||i!==P&&i!==A||t._drawMarker(t.series.getRenderer(),t.series.getMarkersGroup()),t.graphic&&(t.series.autoHidePointMarkers&&i!==P&&i!==A?t.deleteMarker():("normal"===i?t.clearMarker():t.graphic.toForeground(),t._updateMarker(!0,t._styles[i],void 0,e)))},setView:function(e){this._viewCounters[e]++,this.applyView()},resetView:function(e){const t=this._viewCounters;--t[e],t[e]<0&&(t[e]=0),this.applyView()},releaseHoverState:function(){const e=this;e.graphic&&!e.isSelected()&&e.graphic.toBackground()},select:function(){this.series.selectPoint(this)},clearSelection:function(){this.series.deselectPoint(this)},hover:function(){this.series.hoverPoint(this)},clearHover:function(){this.series.clearPointHover()},showTooltip:function(){this.series.showPointTooltip(this)},hideTooltip:function(){this.series.hidePointTooltip(this)},_checkLabelsChanging:function(e,t){const i=~t.indexOf("range"),n=~e.indexOf("range");return n&&!i||!n&&i},updateOptions:function(e){if(!e)return;const t=this,i=t._options,n=e.widgetType,o=i&&i.type,a=e.type,s=k[n][a];o!==a?(t._needDeletingOnDraw=!0,t._needClearingOnDraw=!1,o&&(t._checkLabelsChanging(o,a)&&t.deleteLabel(),t._resetType(v[k[o]])),t._setType(v[s])):(t._needDeletingOnDraw=t._checkSymbol(i,e),t._needClearingOnDraw=t._checkCustomize(i,e)),t._options=e,t._fillStyle(),t._updateLabelOptions(s)},translate:function(){this.hasValue()&&(this._translate(),this.translated=!0)},_checkCustomize:function(e,t){return e.styles.usePointCustomOptions&&!t.styles.usePointCustomOptions},_getCustomLabelVisibility:function(){return this._styles.useLabelCustomOptions?!!this._options.label.visible:null},getBoundingRect:function(){return this._getGraphicBBox()},_resetType:function(e){for(const t in e)delete this[t]},_setType:function(e){for(const t in e)this[t]=e[t]},isInVisibleArea:function(){return this.inVisibleArea},isSelected:function(){return!!(this.fullState&I)},isHovered:function(){return!!(this.fullState&E)},getOptions:function(){return this._options},animate:function(e,t,i){this.graphic?this.graphic.animate(t,{partitionDuration:i},e):e&&e()},getCoords:function(e){const t=this;return e?t._options.rotated?{x:t.minX-(t.x-t.minX?0:1),y:t.y}:{x:t.x,y:t.minY+(t.y-t.minY?0:1)}:{x:t.x,y:t.y}},getDefaultCoords:function(){const e=this;return e._options.rotated?{x:e.defaultX,y:e.y}:{x:e.x,y:e.defaultY}},setDefaultCoords(){const e=this.getDefaultCoords();this.x=e.x,this.y=e.y},_getVisibleArea:function(){return this.series.getVisibleArea()},_getArgTranslator:function(){return this.series.getArgumentAxis().getTranslator()},_getValTranslator:function(){return this.series.getValueAxis().getTranslator()},isArgumentCorrect(){return this.series._argumentChecker(this.argument)},isValueCorrect(){const e=this.series._valueChecker;return e(this.getMinValue())&&e(this.getMaxValue())},hasValue:function(){return null!==this.value&&null!==this.minValue&&this.isArgumentCorrect()&&this.isValueCorrect()},hasCoords:f.noop,correctPosition:f.noop,correctRadius:f.noop,correctLabelRadius:f.noop,getCrosshairData:f.noop,getPointRadius:f.noop,_populatePointShape:f.noop,_checkSymbol:f.noop,getMarkerCoords:f.noop,hide:f.noop,show:f.noop,hideMarker:f.noop,setInvisibility:f.noop,clearVisibility:f.noop,isVisible:f.noop,resetCorrection:f.noop,correctValue:f.noop,resetValue:f.noop,setPercentValue:f.noop,correctCoordinates:f.noop,coordsIn:f.noop,getTooltipParams:f.noop,applyWordWrap:f.noop,setLabelTrackerData:f.noop,updateLabelCoord:f.noop,drawLabel:f.noop,correctLabelPosition:f.noop,getMinValue:f.noop,getMaxValue:f.noop,_drawErrorBar:f.noop,getMarkerVisibility:f.noop,dispose:function(){const e=this;e.deleteMarker(),e.deleteLabel(),e._errorBar&&this._errorBar.dispose(),e._options=e._styles=e.series=e._errorBar=null},getTooltipFormatObject:function(e,t){const i=this,n=i._getFormatObject(e),o=[],a=[];t&&(t.forEach((t=>{if(!t.isVisible())return;const i=t._getFormatObject(e);a.push(i),o.push(i.seriesName+": "+i.valueText)})),C(n,{points:a,valueText:o.join("\n"),stackName:i.series.getStackName()||null}));const s=i.aggregationInfo;if(s){const t=i.series.getArgumentAxis().formatRange(s.intervalStart,s.intervalEnd,s.aggregationInterval,e.getOptions().argumentFormat);t&&(n.valueText+=`\n${t}`)}return n},setHole:function(e,t){const i=this,n=isFinite(i.minValue)?i.minValue:0;(0,_.isDefined)(e)&&("left"===t?(i.leftHole=i.value-e,i.minLeftHole=n-e):(i.rightHole=i.value-e,i.minRightHole=n-e))},resetHoles:function(){this.leftHole=null,this.minLeftHole=null,this.rightHole=null,this.minRightHole=null},getLabel:function(){return this._label},getLabels:function(){return[this._label]},getCenterCoord(){return{x:this.x,y:this.y}}}},49787:function(e,t,i){t.default=void 0;var n,o=i(52576),a=(n=i(27589))&&n.__esModule?n:{default:n};const s=o.extend;t.default=s({},a.default,{correctCoordinates:function(e){this.bubbleSize=e/2},_drawMarker:function(e,t,i){const n=this,o=s({translateX:n.x,translateY:n.y},n._getStyle());n.graphic=e.circle(0,0,i?0:n.bubbleSize).smartAttr(o).data({"chart-data-point":n}).append(t)},getTooltipParams:function(e){const t=this,i=t.graphic;if(!i)return;const n=i.getBBox().height;return{x:t.x,y:t.y,offset:n<20||"edge"===e?n/2:0}},_getLabelFormatObject:function(){const e=a.default._getLabelFormatObject.call(this);return e.size=this.initialSize,e},_updateData:function(e){a.default._updateData.call(this,e),this.size=this.initialSize=e.size},_getGraphicBBox:function(){const e=this;return e._getSymbolBBox(e.x,e.y,e.bubbleSize)},_updateMarker:function(e,t){const i=this;e||(t=s({r:i.bubbleSize,translateX:i.x,translateY:i.y},t)),i.graphic.smartAttr(t)},_getFormatObject:function(e){const t=a.default._getFormatObject.call(this,e);return t.sizeText=e.formatValue(this.initialSize),t},_storeTrackerR:function(){return this.bubbleSize},_getLabelCoords:function(e){let t;return t="inside"===e.getLayoutOptions().position?this._getLabelCoordOfPosition(e,"inside"):a.default._getLabelCoords.call(this,e),t}});e.exports=t.default,e.exports.default=t.default},95208:function(e,t,i){t.default=void 0;var n=i(52576),o=s(i(27589)),a=s(i(39678));function s(e){return e&&e.__esModule?e:{default:e}}const r=Math,l=r.abs,d=r.min,u=r.max,c=r.round;t.default=(0,n.extend)({},a.default,{_calculateVisibility:o.default._calculateVisibility,_getContinuousPoints:function(e,t){const i=this,n=i.x,o=i._options.rotated?function(e,t){return[t,e]}:function(e,t){return[e,t]},a=i.width,s=i.highY,r=l(s-e)<l(s-t)?e:t,d=r===t?e:t;let u;return u=d===r?[].concat(o(n,i.highY)).concat(o(n,i.lowY)).concat(o(n,i.closeY)).concat(o(n-a/2,i.closeY)).concat(o(n+a/2,i.closeY)).concat(o(n,i.closeY)):[].concat(o(n,i.highY)).concat(o(n,r)).concat(o(n+a/2,r)).concat(o(n+a/2,d)).concat(o(n,d)).concat(o(n,i.lowY)).concat(o(n,d)).concat(o(n-a/2,d)).concat(o(n-a/2,r)).concat(o(n,r)),u},_getCrockPoints:function(e){const t=this,i=t.x,n=t._options.rotated?function(e,t){return[t,e]}:function(e,t){return[e,t]};return[].concat(n(i,t.highY)).concat(n(i,t.lowY)).concat(n(i,e)).concat(n(i-t.width/2,e)).concat(n(i+t.width/2,e)).concat(n(i,e))},_getPoints:function(){const e=this;let t;const i=e.closeY,n=e.openY;return t=null!==i&&null!==n?e._getContinuousPoints(n,i):n===i?[e.x,e.highY,e.x,e.lowY]:e._getCrockPoints(null!==n?n:i),t},getColor:function(){const e=this;return e._isReduction?e._options.reduction.color:e._styles.normal.stroke||e.series.getColor()},_drawMarkerInGroup:function(e,t,i){const n=this;n.graphic=i.path(n._getPoints(),"area").attr({"stroke-linecap":"square"}).attr(t).data({"chart-data-point":n}).sharp().append(e)},_fillStyle:function(){const e=this,t=e._options.styles;e._isReduction&&e._isPositive?e._styles=t.reductionPositive:e._isReduction?e._styles=t.reduction:e._isPositive?e._styles=t.positive:e._styles=t},_getMinTrackerWidth:function(){return 2+2*this._styles.normal["stroke-width"]},correctCoordinates:function(e){const t=this._getMinTrackerWidth();let i=e.width;i=i<t?t:i>10?10:i,this.width=i+i%2,this.xCorrection=e.offset},_getMarkerGroup:function(e){const t=this;let i;return i=t._isReduction&&t._isPositive?e.reductionPositiveMarkersGroup:t._isReduction?e.reductionMarkersGroup:t._isPositive?e.defaultPositiveMarkersGroup:e.defaultMarkersGroup,i},_drawMarker:function(e,t){this._drawMarkerInGroup(this._getMarkerGroup(t),this._getStyle(),e)},_getSettingsForTracker:function(){const e=this;let t=e.highY,i=e.lowY;const n=e._options.rotated;let o,a,s,r;return t===i&&(t=n?t+2:t-2,i=n?i-2:i+2),n?(o=d(i,t),a=e.x-e.width/2,s=l(i-t),r=e.width):(o=e.x-e.width/2,a=d(i,t),s=e.width,r=l(i-t)),{x:o,y:a,width:s,height:r}},_getGraphicBBox:function(e){const t=this,i=t._options.rotated,n=t.x,o=t.width;let a=t.lowY,s=t.highY;if(e){const e=t.series.getValueAxis().getVisibleArea();s=t._truncateCoord(s,e),a=t._truncateCoord(a,e)}const r={x:i?a:n-c(o/2),y:i?n-c(o/2):s,width:i?s-a:o,height:i?o:a-s};if(e){const t="top"===e;this._options.rotated?(r.x=t?r.x+r.width:r.x,r.width=0):(r.y=t?r.y:r.y+r.height,r.height=0)}return r},getTooltipParams:function(e){const t=this;if(t.graphic){const i=d(t.lowY,t.highY),n=u(t.lowY,t.highY),o=t._getVisibleArea(),a=t._options.rotated,s=a?o.minX:o.minY,r=a?o.maxX:o.maxY,l=u(s,i),c=d(r,n),h=t.getCenterCoord();return"edge"===e&&(h[a?"x":"y"]=a?c:l),h.offset=0,h}},getCenterCoord(){if(this.graphic){const e=this;let t,i;const n=d(e.lowY,e.highY),o=u(e.lowY,e.highY),a=e._getVisibleArea(),s=e._options.rotated,r=s?a.minX:a.minY,l=s?a.maxX:a.maxY,c=u(r,n),h=c+(d(l,o)-c)/2;return s?(i=e.x,t=h):(t=e.x,i=h),{x:t,y:i}}},hasValue:function(){return null!==this.highValue&&null!==this.lowValue},hasCoords:function(){return null!==this.x&&null!==this.lowY&&null!==this.highY},_translate:function(){const e=this,t=e._options.rotated,i=e._getValTranslator(),n=e._getArgTranslator().translate(e.argument);e.vx=e.vy=e.x=null===n?n:n+(e.xCorrection||0),e.openY=null!==e.openValue?i.translate(e.openValue):null,e.highY=i.translate(e.highValue),e.lowY=i.translate(e.lowValue),e.closeY=null!==e.closeValue?i.translate(e.closeValue):null;const o=d(e.lowY,e.highY)+l(e.lowY-e.highY)/2;e._calculateVisibility(t?o:e.x,t?e.x:o)},getCrosshairData:function(e,t){const i=this,n=i._options.rotated,o=n?e:t;let a;const s=i.argument;let r,d="low";return l(i.lowY-o)<l(i.closeY-o)?a=i.lowY:(a=i.closeY,d="close"),l(a-o)>=l(i.openY-o)&&(a=i.openY,d="open"),l(a-o)>=l(i.highY-o)&&(a=i.highY,d="high"),r=n?{y:i.vy,x:a,xValue:i[d+"Value"],yValue:s}:{x:i.vx,y:a,xValue:s,yValue:i[d+"Value"]},r.axis=i.series.axis,r},_updateData:function(e){const t=this,i=t._label,n=this._options.reduction.color;t.value=t.initialValue=e.reductionValue,t.originalValue=e.value,t.lowValue=t.originalLowValue=e.lowValue,t.highValue=t.originalHighValue=e.highValue,t.openValue=t.originalOpenValue=e.openValue,t.closeValue=t.originalCloseValue=e.closeValue,t._isPositive=e.openValue<e.closeValue,t._isReduction=e.isReduction,t._isReduction&&i.setColor(n)},_updateMarker:function(e,t,i){const n=this,o=n.graphic;o.attr({points:n._getPoints()}).smartAttr(t).sharp(),i&&o.append(n._getMarkerGroup(i))},_getLabelFormatObject:function(){const e=this;return{openValue:e.openValue,highValue:e.highValue,lowValue:e.lowValue,closeValue:e.closeValue,reductionValue:e.initialValue,argument:e.initialArgument,value:e.initialValue,seriesName:e.series.name,originalOpenValue:e.originalOpenValue,originalCloseValue:e.originalCloseValue,originalLowValue:e.originalLowValue,originalHighValue:e.originalHighValue,originalArgument:e.originalArgument,point:e}},_getFormatObject:function(e){const t=this,i=e.formatValue(t.highValue),a=e.formatValue(t.openValue),s=e.formatValue(t.closeValue),r=e.formatValue(t.lowValue),l=o.default._getFormatObject.call(t,e);return(0,n.extend)({},l,{valueText:"h: "+i+(""!==a?" o: "+a:"")+(""!==s?" c: "+s:"")+" l: "+r,highValueText:i,openValueText:a,closeValueText:s,lowValueText:r})},getMaxValue:function(){return this.highValue},getMinValue:function(){return this.lowValue}});e.exports=t.default,e.exports.default=t.default},70576:function(e,t,i){t.Label=w;var n,o=(n=i(2082))&&n.__esModule?n:{default:n},a=i(28779),s=i(21274),r=i(52576),l=i(82e3);const d=o.default.format,u=Math,c=u.round,h=u.floor,p=u.abs;function g(e,t){let i,n=1/0;return(0,s.each)(t,(function(t,o){const a=e[0]-o[0],s=e[1]-o[1],r=a*a+s*s;r<n&&(n=r,i=o)})),[h(i[0]),h(i[1])]}function _(e,t,i){return(t-e[0+i])/(e[2+i]-e[0+i])*(e[3-i]-e[1-i])+e[1-i]}const f={isLabelInside:function(e,t){const i=e.x+e.width/2,n=e.y+e.height/2;return t.x<=i&&i<=t.x+t.width&&t.y<=n&&n<=t.y+t.height},prepareLabelPoints:function(e,t,i,n,o){const a=t.x,s=a+t.width/2,r=a+t.width-1,l=t.y,d=l+t.height/2,u=l+t.height-1;let c;const h=p(n)%90==0;return c=o[0]>a&&o[0]<r?h?[[o[0],p(o[1]-l)<p(o[1]-u)?l:u]]:[[o[0],_([a,l,r,u],o[0],0)]]:o[1]>l&&o[1]<u?h?[[p(o[0]-a)<p(o[0]-r)?a:r,o[1]]]:[[_([a,l,r,u],o[1],1),o[1]]]:h?[[a,l],[i?a:s,i?d:l],[r,l],[a,u],[i?r:s,i?d:u],[r,u]]:[[s,d]],c},isHorizontal:function(e,t){return e.x>t.x+t.width||e.x+e.width<t.x},getFigureCenter:function(e){return[h(e.x+e.width/2),h(e.y+e.height/2)]},findFigurePoint:function(e,t){const i=f.getFigureCenter(e);return g(t,[[e.x,i[1]],[i[0],e.y+e.height],[e.x+e.width,i[1]],[i[0],e.y]])},adjustPoints:function(e){const t=p(e[1]-e[3])<=1;return p(e[0]-e[2])<=1&&(e[0]=e[2]),t&&(e[1]=e[3]),e}},m={isLabelInside:function(){return!1},prepareLabelPoints:f.prepareLabelPoints,isHorizontal:function(e,t){return e.x>t.x+t.r||e.x+e.width<t.x-t.r},getFigureCenter:function(e){return[e.x,e.y]},findFigurePoint:function(e,t){const i=Math.atan2(e.y-t[1],t[0]-e.x);return[c(e.x+e.r*Math.cos(i)),c(e.y-e.r*Math.sin(i))]},adjustPoints:f.adjustPoints},v={isLabelInside:function(e,t,i){return!i},prepareLabelPoints:function(e,t,i,n){const o=e.x,s=o+e.width,r=o+c(e.width/2),l=e.y,d=l+e.height,u=l+c(e.height/2);let h=[[[o,l],[s,l]],[[s,l],[s,d]],[[s,d],[o,d]],[[o,d],[o,l]]];const p=(0,a.getCosAndSin)(n);return h=0===n?i?[[o,u],[s,u]]:[[r,l],[r,d]]:h.map((function(e){return e.map((function(e){return[c((e[0]-r)*p.cos+(e[1]-u)*p.sin+r),c(-(e[0]-r)*p.sin+(e[1]-u)*p.cos+u)]}))})).reduce((function(e,t){const n=t[0][0],o=t[0][1],a=t[1][0],s=t[1][1];return i?(o>=u&&u>=s||o<=u&&u<=s)&&e.push([(u-o)*(a-n)/(s-o)+n,u]):(n>=r&&r>=a||n<=r&&r<=a)&&e.push([r,(r-n)*(s-o)/(a-n)+o]),e}),[]),h},isHorizontal:function(e,t){return e.x>t.x||t.x>e.x+e.width},getFigureCenter:m.getFigureCenter,findFigurePoint:function(e,t,i){if(!i)return[e.x,e.y];const n=t[0],o=c(e.x+(e.y-t[1])/Math.tan((0,a.degreesToRadians)(e.angle)));let s=[e.x,e.y,o,t[1]];return e.x<=o&&o<=n||n<=o&&o<=e.x||(p(e.x-n)<12?s=[e.x,e.y]:e.x<=n?s[2]=e.x+12:s[2]=e.x-12),s},adjustPoints:function(e){return e}};function C(e){return void 0!==e.angle&&v||void 0!==e.r&&m||f}function y(e,t){e[t]&&e[t].dispose(),e[t]=null}function b(e){return e&&(e.fill&&"none"!==e.fill||e["stroke-width"]>0&&e.stroke&&"none"!==e.stroke)}function x(e){return e&&e["stroke-width"]>0&&e.stroke&&"none"!==e.stroke}function w(e){this._renderer=e.renderer,this._container=e.labelsGroup,this._point=e.point,this._strategy=e.strategy,this._rowCount=1}w.prototype={constructor:w,setColor:function(e){this._color=e},setOptions:function(e){this._options=e},setData:function(e){this._data=e},setDataField:function(e,t){this._data=this._data||{},this._data[e]=t},getData:function(){return this._data},setFigureToDrawConnector:function(e){this._figure=e},dispose:function(){const e=this;y(e,"_group"),e._data=e._options=e._textContent=e._visible=e._insideGroup=e._text=e._background=e._connector=e._figure=null},_setVisibility:function(e,t){this._group&&this._group.attr({visibility:e}),this._visible=t},isVisible:function(){return this._visible},hide:function(e){this._holdVisibility=!!e,this._hide()},_hide:function(){this._setVisibility("hidden",!1)},show:function(e){const t=!this._drawn;this._point.hasValue()&&(this._holdVisibility=!!e,this._show(),t&&this._point.correctLabelPosition(this))},_show:function(){const e=this,t=e._renderer,i=e._container,n=e._options||{},o=e._textContent=function(e,t){const i=t.format;return e.valueText=d(e.value,i),e.argumentText=d(e.argument,t.argumentFormat),void 0!==e.percent&&(e.percentText=d(e.percent,{type:"percent",precision:i&&i.percentPrecision})),void 0!==e.total&&(e.totalText=d(e.total,i)),void 0!==e.openValue&&(e.openValueText=d(e.openValue,i)),void 0!==e.closeValue&&(e.closeValueText=d(e.closeValue,i)),void 0!==e.lowValue&&(e.lowValueText=d(e.lowValue,i)),void 0!==e.highValue&&(e.highValueText=d(e.highValue,i)),void 0!==e.reductionValue&&(e.reductionValueText=d(e.reductionValue,i)),t.customizeText?t.customizeText.call(e,e):t.displayFormat?(0,l.processDisplayFormat)(t.displayFormat,e):e.valueText}(e._data,n)||null;o?(e._group||(e._group=t.g().append(i),e._insideGroup=t.g().append(e._group),e._text=t.text("",0,0).append(e._insideGroup)),e._text.css(n.attributes?(0,a.patchFontOptions)(n.attributes.font):{}),b(n.background)?(e._background=e._background||t.rect().append(e._insideGroup).toBackground(),e._background.attr(n.background),e._color&&e._background.attr({fill:e._color})):y(e,"_background"),x(n.connector)?(e._connector=e._connector||t.path([],"line").sharp().append(e._group).toBackground(),e._connector.attr(n.connector),e._color&&e._connector.attr({stroke:e._color})):y(e,"_connector"),e._text.attr({text:o,align:n.textAlignment,class:n.cssClass}),e._updateBackground(e._text.getBBox()),e._setVisibility("visible",!0),e._drawn=!0):e._hide()},_getLabelVisibility:function(e){return this._holdVisibility?this.isVisible():e},draw:function(e){return this._getLabelVisibility(e)?(this._show(),this._point&&this._point.correctLabelPosition(this)):(this._drawn=!1,this._hide()),this},_updateBackground:function(e){const t=this;t._background&&(e.x-=8,e.y-=4,e.width+=16,e.height+=8,t._background.attr(e)),t._bBoxWithoutRotation=(0,r.extend)({},e);const i=t._options.rotationAngle||0;t._insideGroup.rotate(i,e.x+e.width/2,e.y+e.height/2),e=(0,a.rotateBBox)(e,[e.x+e.width/2,e.y+e.height/2],-i),t._bBox=e},getFigureCenter(){const e=this._figure;return(this._strategy||C(e)).getFigureCenter(e)},_getConnectorPoints:function(){const e=this,t=e._figure,i=e._options,n=e._strategy||C(t),o=e._shiftBBox(e._bBoxWithoutRotation),a=e.getBoundingRect();let s,r,l=[];if(!n.isLabelInside(o,t,"inside"!==i.position)){r=n.isHorizontal(o,t);const d=e.getFigureCenter();l=n.prepareLabelPoints(o,a,r,-i.rotationAngle||0,d),s=g(d,l),l=n.findFigurePoint(t,s,r),l=l.concat(s)}return n.adjustPoints(l)},fit:function(e){const t=this._background?16:0;let i=!1;if(this._text){const n=this._text.setMaxSize(e-t,void 0,this._options);let o=n.rowCount;0===o&&(o=1),o!==this._rowCount&&(i=!0,this._rowCount=o),n.textIsEmpty&&y(this,"_background")}return this._updateBackground(this._text.getBBox()),i},resetEllipsis:function(){this._text&&this._text.restoreText(),this._updateBackground(this._text.getBBox())},setTrackerData:function(e){this._text.data({"chart-data-point":e}),this._background&&this._background.data({"chart-data-point":e})},hideInsideLabel:function(e){return this._point.hideInsideLabel(this,e)},getPoint(){return this._point},shift:function(e,t){const i=this;return i._textContent&&(i._insideGroup.attr({translateX:i._x=c(e-i._bBox.x),translateY:i._y=c(t-i._bBox.y)}),i._connector&&i._connector.attr({points:i._getConnectorPoints()})),i},getBoundingRect:function(){return this._shiftBBox(this._bBox)},_shiftBBox:function(e){return this._textContent?{x:e.x+this._x,y:e.y+this._y,width:e.width,height:e.height}:{}},getLayoutOptions:function(){const e=this._options;return{alignment:e.alignment,background:b(e.background),horizontalOffset:e.horizontalOffset,verticalOffset:e.verticalOffset,radialOffset:e.radialOffset,position:e.position,connectorOffset:(x(e.connector)?12:0)+(b(e.background)?8:0)}}}},78641:function(e,t,i){t.default=void 0;var n=i(52576),o=l(i(27589)),a=i(28779),s=i(11528),r=l(i(7377));function l(e){return e&&e.__esModule?e:{default:e}}const d=n.extend,u=Math.round,c=Math.sqrt,h=Math.acos,p=180/Math.PI,g=Math.abs,_=r.default.radialLabelIndent;t.default=d({},o.default,{_updateData:function(e,t){const i=this;o.default._updateData.call(this,e),!t&&(0,s.isDefined)(i._visible)||(i._visible=!0),i.minValue=i.initialMinValue=i.originalMinValue=(0,s.isDefined)(e.minValue)?e.minValue:0},animate:function(e,t,i){const n=this;n.graphic.animate({x:n.centerX,y:n.centerY,outerRadius:n.radiusOuter,innerRadius:n.radiusInner,startAngle:n.toAngle,endAngle:n.fromAngle},{delay:i,partitionDuration:t},e)},correctPosition:function(e){const t=this;t.correctRadius(e),t.correctLabelRadius(e.radiusOuter+_),t.centerX=e.centerX,t.centerY=e.centerY},correctRadius:function(e){this.radiusInner=e.radiusInner,this.radiusOuter=e.radiusOuter},correctLabelRadius:function(e){this.radiusLabels=e},correctValue:function(e,t,i){const n=this;n.value=(i||n.normalInitialValue)+e,n.minValue=e,n.percent=t,n._label.setDataField("percent",t)},_updateLabelData:function(){this._label.setData(this._getLabelFormatObject())},_getShiftLabelCoords:function(){const e=this,t=e._label.getBoundingRect(),i=e._getLabelCoords(e._label),n=e._getVisibleArea();return e._isLabelDrawingWithoutPoints?e._checkLabelPosition(i,t,n):e._getLabelExtraCoord(i,e._checkVerticalLabelPosition(i,t,n),t)},_getLabelPosition:function(e){return e.position},getAnnotationCoords:function(e){return this._getElementCoords("edge"!==e?"inside":"outside",this.radiusOuter,0)},_getElementCoords:function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{x:0,y:0,width:0,height:0};const o=this,s=(0,a.getCosAndSin)(o.middleAngle),r=o.radiusInner,l=o.radiusOuter,d="columns"===e;let c,h;return"inside"===e?(c=r+(l-r)/2+i,h=o.centerX+c*s.cos-n.width/2):(c=t+i,h=s.cos>.1||d&&s.cos>=0?o.centerX+c*s.cos:s.cos<-.1||d&&s.cos<0?o.centerX+c*s.cos-n.width:o.centerX+c*s.cos-n.width/2),{x:h,y:u(o.centerY-c*s.sin-n.height/2)}},_getLabelCoords:function(e){const t=this,i=e.getBoundingRect(),n=e.getLayoutOptions(),o=t._getLabelPosition(n);return t._getElementCoords(o,t.radiusLabels,n.radialOffset,i)},_correctLabelCoord:function(e,t){const i=this,n=i._label,o=n.getBoundingRect().width,s=n.getLayoutOptions(),r=i._getVisibleArea(),l=r.maxX-o,d=r.minX,u=(0,a.normalizeAngle)(i.middleAngle),c=i.centerX,h=s.connectorOffset;let p=e.x;return"columns"===s.position?(p=u<=90||u>=270?l:d,e.x=p):"inside"!==s.position&&t&&(u<=90||u>=270?p-h<c&&(p=c+h):p+o+h>c&&(p=c-o-h),e.x=p),e},drawLabel:function(){this.translate(),this._isLabelDrawingWithoutPoints=!0,this._drawLabel(),this._isLabelDrawingWithoutPoints=!1},updateLabelCoord:function(e){const t=this,i=t._label.getBoundingRect();let n=t._correctLabelCoord(i,e);n=t._checkHorizontalLabelPosition(n,i,t._getVisibleArea()),t._label.shift(u(n.x),u(i.y))},_checkVerticalLabelPosition:function(e,t,i){const n=e.x;let o=e.y;return e.y+t.height>i.maxY?o=i.maxY-t.height:e.y<i.minY&&(o=i.minY),{x:n,y:o}},_getLabelExtraCoord:function(e,t,i){return e.y!==t.y?(0,a.getVerticallyShiftedAngularCoords)({x:e.x,y:e.y,width:i.width,height:i.height},t.y-e.y,{x:this.centerX,y:this.centerY}):e},_checkHorizontalLabelPosition:function(e,t,i){let n=e.x;const o=e.y;return e.x+t.width>i.maxX?n=i.maxX-t.width:e.x<i.minX&&(n=i.minX),{x:n,y:o}},applyWordWrap:function(e){const t=this,i=t._label,n=i.getBoundingRect(),o=t._getVisibleArea(),a=i.getLayoutOptions().position;let s=n.width,r=!1;return"columns"===a&&t.series.index>0?s=o.maxX-t.centerX-t.radiusLabels:"inside"===a?s>o.maxX-o.minX&&(s=o.maxX-o.minX):e&&n.x<t.centerX&&n.width+n.x>t.centerX?s=Math.floor((o.maxX-o.minX)/2):n.x+s>o.maxX?s=o.maxX-n.x:n.x<o.minX&&(s=n.x+s-o.minX),s<n.width&&(r=i.fit(s)),r},setLabelTrackerData:function(){this._label.setTrackerData(this)},_checkLabelPosition:function(e,t,i){return e=this._checkHorizontalLabelPosition(e,t,i),this._checkVerticalLabelPosition(e,t,i)},_getLabelConnector:function(){const e=this,t=e.radiusOuter,i=e._options.styles.normal,n=i["stroke-width"]/2,o=e.series.getOptions().containerBackgroundColor===i.stroke?u(n):u(-n),s=(0,a.getCosAndSin)(u(e.middleAngle));return{x:u(e.centerX+(t-o)*s.cos),y:u(e.centerY-(t-o)*s.sin),angle:e.middleAngle}},_drawMarker:function(e,t,i,n){const o=this;let a=o.radiusOuter,s=o.radiusInner,r=o.fromAngle,l=o.toAngle;i&&(s=a=0,n||(r=l=o.shiftedAngle)),o.graphic=e.arc(o.centerX,o.centerY,s,a,l,r).attr({"stroke-linejoin":"round"}).smartAttr(o._getStyle()).data({"chart-data-point":o}).sharp().append(t)},getTooltipParams:function(){const e=this,t=(0,a.getCosAndSin)(e.middleAngle),i=e.radiusInner,n=e.radiusOuter;return{x:e.centerX+(i+(n-i)/2)*t.cos,y:e.centerY-(i+(n-i)/2)*t.sin,offset:0}},_translate:function(){const e=this,t=e.shiftedAngle||0,i=e.value,n=e.minValue,o=e._getValTranslator();e.fromAngle=o.translate(n)+t,e.toAngle=o.translate(i)+t,e.middleAngle=o.translate((i-n)/2+n)+t,e.isVisible()||(e.middleAngle=e.toAngle=e.fromAngle=e.fromAngle||t)},getMarkerVisibility:function(){return!0},_updateMarker:function(e,t,i,n){const o=this;e||(t=d({x:o.centerX,y:o.centerY,outerRadius:o.radiusOuter,innerRadius:o.radiusInner,startAngle:o.toAngle,endAngle:o.fromAngle},t)),o.graphic.smartAttr(t).sharp(),n&&n()},getLegendStyles:function(){return this._styles.legendStyles},isInVisibleArea:function(){return!0},hide:function(){const e=this;e._visible&&(e._visible=!1,e.hideTooltip(),e._options.visibilityChanged())},show:function(){const e=this;e._visible||(e._visible=!0,e._options.visibilityChanged())},setInvisibility:function(){this._label.draw(!1)},isVisible:function(){return this._visible},_getFormatObject:function(e){const t=o.default._getFormatObject.call(this,e),i=this.percent;return t.percent=i,t.percentText=e.formatValue(i,"percent"),t},getColor:function(){return this._styles.normal.fill},coordsIn:function(e,t){const i=this,n=e-i.centerX,o=t-i.centerY,a=c(n*n+o*o),s=i.fromAngle%360,r=i.toAngle%360;let l;return!(a<i.radiusInner||a>i.radiusOuter||0===a)&&(l=h(n/a)*p*(o>0?-1:1),l<0&&(l+=360),s===r&&g(i.toAngle-i.fromAngle)>1e-4||(s>=r?l<=s&&l>=r:!(l>=s&&l<=r)))}});e.exports=t.default,e.exports.default=t.default},9619:function(e,t,i){t.polarSymbolPoint=t.polarBarPoint=void 0;var n=i(52576),o=u(i(27589)),a=u(i(39678)),s=u(i(78641)),r=i(11528),l=i(28779),d=u(i(7377));function u(e){return e&&e.__esModule?e:{default:e}}const c=n.extend,h=Math,p=h.max,g=d.default.radialLabelIndent,_="canvas_position_start",f="canvas_position_end",m="canvas_position_default",v=t.polarSymbolPoint=c({},o.default,{_getLabelCoords:s.default._getLabelCoords,_getElementCoords:s.default._getElementCoords,_moveLabelOnCanvas:function(e,t,i){let n=e.x,o=e.y;return t.minX>n&&(n=t.minX),t.maxX<n+i.width&&(n=t.maxX-i.width),t.minY>o&&(o=t.minY),t.maxY<o+i.height&&(o=t.maxY-i.height),{x:n,y:o}},_getLabelPosition:function(){return"outside"},_getCoords:function(e,t){const i=this.series.getValueAxis(),n=i.getAngles()[0],o=this._getArgTranslator().translate(e),a=this._getValTranslator().translate(t),s=(0,l.convertPolarToXY)(i.getCenter(),i.getAngles()[0],o,a);return s.angle=o+n-90,s.radius=a,s},_translate(){const e=this,t=e.series.getValueAxis().getCenter(),i=e._getCoords(e.argument,e.value),n=e._getValTranslator(),o=n.isInverted()?n.translate(_):n.translate(f),a=(0,r.isDefined)(i.radius)&&i.radius>=0?i.radius:null;e.vx=(0,l.normalizeAngle)(i.angle),e.vy=e.radiusOuter=e.radiusLabels=a,e.radiusLabels+=g,e.radius=a,e.middleAngle=-i.angle,e.angle=-i.angle,e.x=i.x,e.y=i.y,e.defaultX=e.centerX=t.x,e.defaultY=e.centerY=t.y,e._translateErrorBars(),e.inVisibleArea=e._checkRadiusForVisibleArea(a,o)},_checkRadiusForVisibleArea:(e,t)=>(0,r.isDefined)(e)&&e<=t,_translateErrorBars:function(){const e=this,t=e._options.errorBars,i=e._getValTranslator();t&&((0,r.isDefined)(e.lowError)&&(e._lowErrorCoord=e.centerY-i.translate(e.lowError)),(0,r.isDefined)(e.highError)&&(e._highErrorCoord=e.centerY-i.translate(e.highError)),e._errorBarPos=e.centerX,e._baseErrorBarPos="stdDeviation"===t.type?e._lowErrorCoord+(e._highErrorCoord-e._lowErrorCoord)/2:e.centerY-e.radius)},_getTranslates:function(e){return e?this.getDefaultCoords():{x:this.x,y:this.y}},getDefaultCoords:function(){const e=(0,l.getCosAndSin)(-this.angle),t=this._getValTranslator().translate(m);return{x:this.defaultX+t*e.cos,y:this.defaultY+t*e.sin}},_addLabelAlignmentAndOffset:function(e,t){return t},_checkLabelPosition:function(e,t){const i=this,n=i._getVisibleArea(),o=i._getGraphicBBox();return i._isPointInVisibleArea(n,o)&&(t=i._moveLabelOnCanvas(t,n,e.getBoundingRect())),t},_getErrorBarSettings:function(e,t){const i=o.default._getErrorBarSettings.call(this,e,t);return i.rotate=90-this.angle,i.rotateX=this.centerX,i.rotateY=this.centerY,i},getCoords:function(e){return e?this.getDefaultCoords():{x:this.x,y:this.y}}});t.polarBarPoint=c({},a.default,{_translateErrorBars:v._translateErrorBars,_getErrorBarSettings:v._getErrorBarSettings,_moveLabelOnCanvas:v._moveLabelOnCanvas,_getLabelCoords:s.default._getLabelCoords,_getElementCoords:s.default._getElementCoords,_getLabelConnector:s.default._getLabelConnector,getTooltipParams:s.default.getTooltipParams,_getLabelPosition:s.default._getLabelPosition,_getCoords:v._getCoords,_translate(){const e=this,t=e._getValTranslator(),i=t.getBusinessRange(),n=t.isInverted()?t.translate(_):t.translate(f);e.radiusInner=t.translate(e.minValue),v._translate.call(e),null===e.radiusInner?e.radiusInner=e.radius=n:null===e.radius?e.radius=e.value>=i.minVisible?n:0:e.radius>n&&(e.radius=n),e.radiusOuter=e.radiusLabels=p(e.radiusInner,e.radius),e.radiusLabels+=g,e.radiusInner=e.defaultRadius=h.min(e.radiusInner,e.radius),e.middleAngle=e.angle=-(0,l.normalizeAngle)(e.middleAngleCorrection-e.angle)},_checkRadiusForVisibleArea(e){return(0,r.isDefined)(e)||this._getValTranslator().translate(this.minValue)>0},_getErrorBarBaseEdgeLength(){const e=this.getMarkerCoords();return h.PI*e.outerRadius*h.abs(e.startAngle-e.endAngle)/180},getMarkerCoords:function(){return{x:this.centerX,y:this.centerY,outerRadius:this.radiusOuter,innerRadius:this.defaultRadius,startAngle:this.middleAngle-this.interval/2,endAngle:this.middleAngle+this.interval/2}},_drawMarker:function(e,t,i){const n=this,o=n._getStyle(),a=n.getMarkerCoords();let s=a.innerRadius,r=a.outerRadius;const l=n._getCoords(n.argument,m);let d=a.x,u=a.y;i&&(s=0,r=0,d=l.x,u=l.y),n.graphic=e.arc(d,u,s,r,a.startAngle,a.endAngle).attr(o).data({"chart-data-point":n}).append(t)},_checkLabelPosition:function(e,t){const i=this,n=i._getVisibleArea(),o=(0,l.getCosAndSin)(i.middleAngle),a=i.centerX+i.defaultRadius*o.cos,s=i.centerY-i.defaultRadius*o.sin;return a>n.minX&&a<n.maxX&&s>n.minY&&s<n.maxY&&(t=i._moveLabelOnCanvas(t,n,e.getBoundingRect())),t},_addLabelAlignmentAndOffset:function(e,t){return t},correctCoordinates:function(e){this.middleAngleCorrection=e.offset,this.interval=e.width},coordsIn:function(e,t){const i=(0,l.convertXYToPolar)(this.series.getValueAxis().getCenter(),e,t),n=this.getMarkerCoords(),o=n.startAngle<n.endAngle?-i.phi>=n.startAngle&&-i.phi<=n.endAngle:-i.phi<=n.startAngle&&-i.phi>=n.endAngle;return i.r>=n.innerRadius&&i.r<=n.outerRadius&&o}})},81660:function(e,t,i){t.default=void 0;var n=i(17781),o=i(52576),a=r(i(39678)),s=r(i(66779));function r(e){return e&&e.__esModule?e:{default:e}}const l=o.extend;t.default=l({},a.default,{deleteLabel:s.default.deleteLabel,_getFormatObject:s.default._getFormatObject,clearVisibility:function(){const e=this.graphic;e&&e.attr("visibility")&&e.attr({visibility:null})},setInvisibility:function(){const e=this.graphic;e&&"hidden"!==e.attr("visibility")&&e.attr({visibility:"hidden"}),this._topLabel.draw(!1),this._bottomLabel.draw(!1)},getTooltipParams:function(e){const t=this,i="edge"===e;let n,o;return t._options.rotated?(n=i?t.x+t.width:t.x+t.width/2,o=t.y+t.height/2):(n=t.x+t.width/2,o=i?t.y:t.y+t.height/2),{x:n,y:o,offset:0}},_translate:function(){const e=this;a.default._translate.call(e),e._options.rotated?e.width=e.width||1:e.height=e.height||1},hasCoords:s.default.hasCoords,_updateData:s.default._updateData,_getLabelPosition:s.default._getLabelPosition,_getLabelMinFormatObject:s.default._getLabelMinFormatObject,_updateLabelData:s.default._updateLabelData,_updateLabelOptions:s.default._updateLabelOptions,getCrosshairData:s.default.getCrosshairData,_createLabel:s.default._createLabel,_checkOverlay:s.default._checkOverlay,_checkLabelsOverlay:s.default._checkLabelsOverlay,_getOverlayCorrections:s.default._getOverlayCorrections,_drawLabel:s.default._drawLabel,_getLabelCoords:s.default._getLabelCoords,getLabel:s.default.getLabel,getLabels:s.default.getLabels,getBoundingRect:n.noop,getMinValue:s.default.getMinValue,getMaxValue:s.default.getMaxValue});e.exports=t.default,e.exports.default=t.default},66779:function(e,t,i){t.default=void 0;var n,o=i(21274),a=i(52576),s=i(17781),r=i(70576),l=(n=i(27589))&&n.__esModule?n:{default:n},d=i(11528);const u=a.extend,c=Math,h=c.abs,p=c.min,g=c.max,_=c.round;t.default=u({},l.default,{deleteLabel:function(){const e=this;e._topLabel.dispose(),e._topLabel=null,e._bottomLabel.dispose(),e._bottomLabel=null},hideMarker:function(e){const t=this.graphic,i=t&&t[e+"Marker"],n=this["_"+e+"Label"];i&&"hidden"!==i.attr("visibility")&&i.attr({visibility:"hidden"}),n.draw(!1)},setInvisibility:function(){this.hideMarker("top"),this.hideMarker("bottom")},clearVisibility:function(){const e=this.graphic,t=e&&e.topMarker,i=e&&e.bottomMarker;t&&t.attr("visibility")&&t.attr({visibility:null}),i&&i.attr("visibility")&&i.attr({visibility:null})},clearMarker:function(){const e=this.graphic,t=e&&e.topMarker,i=e&&e.bottomMarker,n=this._emptySettings;t&&t.attr(n),i&&i.attr(n)},_getLabelPosition:function(e){let t;const i="inside"===this._options.label.position;return t=this._options.rotated?"top"===e^i?"right":"left":"top"===e^i?"top":"bottom",t},_getLabelMinFormatObject:function(){const e=this;return{index:0,argument:e.initialArgument,value:e.initialMinValue,seriesName:e.series.name,originalValue:e.originalMinValue,originalArgument:e.originalArgument,point:e}},_updateLabelData:function(){const e=this._getLabelFormatObject();e.index=1,this._topLabel.setData(e),this._bottomLabel.setData(this._getLabelMinFormatObject())},_updateLabelOptions:function(){const e=this,t=this._options.label;(!e._topLabel||!e._bottomLabel)&&e._createLabel(),e._topLabel.setOptions(t),e._bottomLabel.setOptions(t)},_createLabel:function(){const e={renderer:this.series._renderer,labelsGroup:this.series._labelsGroup,point:this};this._topLabel=new r.Label(e),this._bottomLabel=new r.Label(e)},_getGraphicBBox:function(e){const t=this._options,i=this._getImage(t.image),n="top"===e?this._checkImage(i.top):this._checkImage(i.bottom);let o;const a=this._getPositionFromLocation(e);return o=t.visible?n?this._getImageBBox(a.x,a.y):this._getSymbolBBox(a.x,a.y,t.styles.normal.r):{x:a.x,y:a.y,width:0,height:0},o},_getPositionFromLocation:function(e){let t,i;const n="top"===e;return this._options.rotated?(t=n?g(this.x,this.minX):p(this.x,this.minX),i=this.y):(t=this.x,i=n?p(this.y,this.minY):g(this.y,this.minY)),{x:t,y:i}},_checkOverlay:function(e,t,i){return e<t+i},_getOverlayCorrections:function(e,t){const i=this._options.rotated,n=i?"x":"y",o=i?"width":"height",a=this.series.getValueAxis().getVisibleArea(),s=a[0],r=a[1];let l=_((e[n]+e[o]-t[n])/2),d=e[n]-l,u=t[n]+l;return d<s?(l=s-d,d+=l,u+=l):u+t[o]>r&&(l=r-u-t[o],d+=l,u+=l),{coord1:d,coord2:u}},_checkLabelsOverlay:function(e){const t=this,i=t._topLabel.getBoundingRect(),n=t._bottomLabel.getBoundingRect();let o={};t._options.rotated?"top"===e?this._checkOverlay(i.x,n.x,n.width)&&(o=this._getOverlayCorrections(n,i),t._topLabel.shift(o.coord2,i.y),t._bottomLabel.shift(o.coord1,n.y)):this._checkOverlay(n.x,i.x,i.width)&&(o=this._getOverlayCorrections(i,n),t._topLabel.shift(o.coord1,i.y),t._bottomLabel.shift(o.coord2,n.y)):"top"===e?this._checkOverlay(n.y,i.y,i.height)&&(o=this._getOverlayCorrections(i,n),t._topLabel.shift(i.x,o.coord1),t._bottomLabel.shift(n.x,o.coord2)):this._checkOverlay(i.y,n.y,n.height)&&(o=this._getOverlayCorrections(n,i),t._topLabel.shift(i.x,o.coord2),t._bottomLabel.shift(n.x,o.coord1))},_drawLabel:function(){const e=this,t=[],i=e._options.rotated?e.x>=e.minX:e.y<e.minY,n=e._getCustomLabelVisibility(),a=e._topLabel,s=e._bottomLabel;a.pointPosition=i?"top":"bottom",s.pointPosition=i?"bottom":"top",(e.series.getLabelVisibility()||n)&&e.hasValue()&&!1!==n?(!1!==e.visibleTopMarker&&t.push(a),!1!==e.visibleBottomMarker&&t.push(s),(0,o.each)(t,(function(e,t){t.draw(!0)})),e._checkLabelsOverlay(e._topLabel.pointPosition)):(a.draw(!1),s.draw(!1))},_getImage:function(e){const t={};return(0,d.isDefined)(e)&&("string"==typeof e?t.top=t.bottom=e:(t.top={url:"string"==typeof e.url?e.url:e.url&&e.url.rangeMaxPoint,width:"number"==typeof e.width?e.width:e.width&&e.width.rangeMaxPoint,height:"number"==typeof e.height?e.height:e.height&&e.height.rangeMaxPoint},t.bottom={url:"string"==typeof e.url?e.url:e.url&&e.url.rangeMinPoint,width:"number"==typeof e.width?e.width:e.width&&e.width.rangeMinPoint,height:"number"==typeof e.height?e.height:e.height&&e.height.rangeMinPoint})),t},_checkSymbol:function(e,t){const i=this,n=e.symbol,o=t.symbol,a="circle"===n&&"circle"!==o||"circle"!==n&&"circle"===o,s=i._getImage(e.image),r=i._getImage(t.image),l=i._checkImage(s.top)!==i._checkImage(r.top),d=i._checkImage(s.bottom)!==i._checkImage(r.bottom);return a||l||d},_getSettingsForTwoMarkers:function(e){const t=this,i=t._options,n={},o=i.rotated?p(t.x,t.minX):t.x,a=i.rotated?t.y:p(t.y,t.minY),s=e.r,r=t._populatePointShape(i.symbol,s);return n.top=u({translateX:o+t.width,translateY:a,r:s},e),n.bottom=u({translateX:o,translateY:a+t.height,r:s},e),r&&(n.top.points=n.bottom.points=r),n},_hasGraphic:function(){return this.graphic&&this.graphic.topMarker&&this.graphic.bottomMarker},_drawOneMarker:function(e,t,i,n){const o=this,a=o.graphic;a[t]?o._updateOneMarker(t,n):a[t]=o._createMarker(e,a,i,n)},_drawMarker:function(e,t,i,n,o){const a=this,s=a._getSettingsForTwoMarkers(o||a._getStyle()),r=a._getImage(a._options.image);a._checkImage(r.top)&&(s.top=a._getImageSettings(s.top,r.top)),a._checkImage(r.bottom)&&(s.bottom=a._getImageSettings(s.bottom,r.bottom)),a.graphic=a.graphic||e.g().append(t),a.visibleTopMarker&&a._drawOneMarker(e,"topMarker",r.top,s.top),a.visibleBottomMarker&&a._drawOneMarker(e,"bottomMarker",r.bottom,s.bottom)},_getSettingsForTracker:function(e){const t=this,i=t._options.rotated;return{translateX:i?p(t.x,t.minX)-e:t.x-e,translateY:i?t.y-e:p(t.y,t.minY)-e,width:t.width+2*e,height:t.height+2*e}},isInVisibleArea:function(){const e=this,t=e._options.rotated,i=t?e.y:e.x,n=t?g(e.minX,e.x):g(e.minY,e.y),o=t?p(e.minX,e.x):p(e.minY,e.y);let a,s,r,l=!0;const d=e.series.getArgumentAxis().getVisibleArea(),u=e.series.getValueAxis().getVisibleArea(),c=d[1]<i||d[0]>i,h=u[0]>o&&u[0]>n||u[1]<o&&u[1]<n;return c||h?s=r=l=!1:(s=u[0]<=o&&u[1]>o,r=u[0]<n&&u[1]>=n,t&&(a=s,s=r,r=a)),e.visibleTopMarker=s,e.visibleBottomMarker=r,l},getTooltipParams:function(){const e=this;let t,i;const n=e._options.rotated,o=n?p(e.x,e.minX):p(e.y,e.minY),a=n?"width":"height",s=e._getVisibleArea(),r=n?s.minX:s.minY,l=n?s.maxX:s.maxY,d=g(r,o),u=p(l,o+e[a]);return n?(i=e.y,t=d+(u-d)/2):(t=e.x,i=d+(u-d)/2),{x:t,y:i,offset:0}},_translate:function(){const e=this,t=e._options.rotated;l.default._translate.call(e),e.height=t?0:h(e.minY-e.y),e.width=t?h(e.x-e.minX):0},hasCoords:function(){return l.default.hasCoords.call(this)&&!(null===this.minX||null===this.minY)},_updateData:function(e){const t=this;l.default._updateData.call(t,e),t.minValue=t.initialMinValue=t.originalMinValue=e.minValue},_getImageSettings:function(e,t){return{href:t.url||t.toString(),width:t.width||20,height:t.height||20,translateX:e.translateX,translateY:e.translateY}},getCrosshairData:function(e,t){const i=this,n=i._options.rotated,o=i.minX,a=i.minY,s=i.vx,r=i.vy,l=i.value,d=i.minValue,u=i.argument,c={axis:i.series.axis,x:s,y:r,yValue:l,xValue:u};return n?(c.yValue=u,h(s-e)<h(o-e)?c.xValue=l:(c.x=o,c.xValue=d)):h(r-t)>=h(a-t)&&(c.y=a,c.yValue=d),c},_updateOneMarker:function(e,t){this.graphic&&this.graphic[e]&&this.graphic[e].attr(t)},_updateMarker:function(e,t){this._drawMarker(void 0,void 0,!1,!1,t)},_getFormatObject:function(e){const t=this,i=t.initialMinValue,n=t.initialValue,o=t.initialArgument,a=e.formatValue(i),s=e.formatValue(n);return{argument:o,argumentText:e.formatValue(o,"argument"),valueText:a+" - "+s,rangeValue1Text:a,rangeValue2Text:s,rangeValue1:i,rangeValue2:n,seriesName:t.series.name,point:t,originalMinValue:t.originalMinValue,originalValue:t.originalValue,originalArgument:t.originalArgument}},getLabel:function(){return[this._topLabel,this._bottomLabel]},getLabels:function(){return[this._topLabel,this._bottomLabel]},getBoundingRect:s.noop,coordsIn:function(e,t){const i=this._storeTrackerR(),n=e>=this.x-i&&e<=this.x+i,o=t>=this.y-i&&t<=this.y+i;return this._options.rotated?o&&(n||e>=this.minX-i&&e<=this.minX+i):n&&(o||t>=this.minY-i&&t<=this.minY+i)},getMaxValue:function(){return"discrete"!==this.series.valueAxisType&&this.minValue>this.value?this.minValue:this.value},getMinValue:function(){return"discrete"!==this.series.valueAxisType?this.minValue<this.value?this.minValue:this.value:this.minValue}});e.exports=t.default,e.exports.default=t.default},14185:function(e,t,i){t.default=void 0;var n,o=i(52576),a=i(11528),s=(n=i(95208))&&n.__esModule?n:{default:n};const r=o.extend,l=a.isNumeric;t.default=r({},s.default,{_getPoints:function(){const e=this,t=e._options.rotated?function(e,t){return[t,e]}:function(e,t){return[e,t]},i=l(e.openY),n=l(e.closeY),o=e.x,a=e.width;let s=[].concat(t(o,e.highY));return i&&(s=s.concat(t(o,e.openY))),i&&(s=s.concat(t(o-a/2,e.openY))),i&&(s=s.concat(t(o,e.openY))),n&&(s=s.concat(t(o,e.closeY))),n&&(s=s.concat(t(o+a/2,e.closeY))),n&&(s=s.concat(t(o,e.closeY))),s=s.concat(t(o,e.lowY)),s},_drawMarkerInGroup:function(e,t,i){this.graphic=i.path(this._getPoints(),"line").attr({"stroke-linecap":"square"}).attr(t).data({"chart-data-point":this}).sharp().append(e)},_getMinTrackerWidth:function(){const e=2+this._styles.normal["stroke-width"];return e+e%2}});e.exports=t.default,e.exports.default=t.default},27589:function(e,t,i){t.default=void 0;var n=i(52576),o=i(21274),a=i(17781),s=i(3104),r=i(70576),l=i(11528),d=i(28779);const u=(0,s.getWindow)(),c=n.extend,h=Math,p=h.round,g=h.floor,_=h.ceil,f="canvas_position_default";t.default={deleteLabel:function(){this._label.dispose(),this._label=null},_hasGraphic:function(){return this.graphic},clearVisibility:function(){const e=this.graphic;e&&e.attr("visibility")&&e.attr({visibility:null})},isVisible:function(){return this.inVisibleArea&&this.series.isVisible()},setInvisibility:function(){const e=this,t=e.graphic;t&&"hidden"!==t.attr("visibility")&&t.attr({visibility:"hidden"}),e._errorBar&&e._errorBar.attr({visibility:"hidden"}),e._label.draw(!1)},clearMarker:function(){const e=this.graphic;e&&e.attr(this._emptySettings)},_createLabel:function(){this._label=new r.Label({renderer:this.series._renderer,labelsGroup:this.series._labelsGroup,point:this})},_calculateVisibility:function(e,t){const{minX:i,maxX:n,minY:o,maxY:a}=this._getVisibleArea();this.inVisibleArea=i<=e&&n>=e&&o<=t&&a>=t},_updateLabelData:function(){this._label.setData(this._getLabelFormatObject())},_updateLabelOptions:function(){!this._label&&this._createLabel(),this._label.setOptions(this._options.label)},_checkImage:function(e){return(0,l.isDefined)(e)&&("string"==typeof e||(0,l.isDefined)(e.url))},_fillStyle:function(){this._styles=this._options.styles},_checkSymbol:function(e,t){const i=e.symbol,n=t.symbol,o="circle"===i&&"circle"!==n||"circle"!==i&&"circle"===n,a=this._checkImage(e.image)!==this._checkImage(t.image);return!(!o&&!a)},_populatePointShape:function(e,t){switch(e){case"square":return function(e){return[-e,-e,e,-e,e,e,-e,e,-e,-e]}(t);case"polygon":return function(e){const t=_(e);return[-t,0,0,-t,t,0,0,t,-t,0]}(t);case"triangle":case"triangleDown":return function(e){return[-e,-e,e,-e,0,e,-e,-e]}(t);case"triangleUp":return function(e){return[-e,e,e,e,0,-e,-e,e]}(t);case"cross":return function(e){const t=_(e),i=g(t/2),n=_(t/2);return[-t,-i,-i,-t,0,-n,i,-t,t,-i,n,0,t,i,i,t,0,n,-i,t,-t,i,-n,0]}(t)}},hasCoords:function(){return null!==this.x&&null!==this.y},correctValue:function(e){const t=this,i=t.series.getValueAxis();t.hasValue()&&(t.value=t.properValue=i.validateUnit(t.initialValue.valueOf()+e.valueOf()),t.minValue=i.validateUnit(e))},resetCorrection:function(){this.value=this.properValue=this.initialValue,this.minValue=f},resetValue:function(){const e=this;e.hasValue()&&(e.value=e.properValue=e.initialValue=0,e.minValue=0,e._label.setDataField("value",e.value))},_getTranslates:function(e){let t=this.x,i=this.y;return e&&(this._options.rotated?t=this.defaultX:i=this.defaultY),{x:t,y:i}},_createImageMarker:function(e,t,i){const n=i.width||20,o=i.height||20;return e.image(-p(.5*n),-p(.5*o),n,o,i.url?i.url.toString():i.toString(),"center").attr({translateX:t.translateX,translateY:t.translateY,visibility:t.visibility})},_createSymbolMarker:function(e,t){let i;const n=this._options.symbol;return"circle"===n?(delete t.points,i=e.circle().attr(t)):"square"!==n&&"polygon"!==n&&"triangle"!==n&&"triangleDown"!==n&&"triangleUp"!==n&&"cross"!==n||(i=e.path([],"area").attr(t).sharp()),i},_createMarker:function(e,t,i,n){const o=this,a=o._checkImage(i)?o._createImageMarker(e,n,i):o._createSymbolMarker(e,n);return a&&a.data({"chart-data-point":o}).append(t),a},_getSymbolBBox:function(e,t,i){return{x:e-i,y:t-i,width:2*i,height:2*i}},_getImageBBox:function(e,t){const i=this._options.image,n=i.width||20,o=i.height||20;return{x:e-p(n/2),y:t-p(o/2),width:n,height:o}},_getGraphicBBox:function(){const e=this,t=e._options,i=e.x,n=e.y;let o;return o=t.visible?e._checkImage(t.image)?e._getImageBBox(i,n):e._getSymbolBBox(i,n,t.styles.normal.r):{x:i,y:n,width:0,height:0},o},hideInsideLabel:a.noop,_getShiftLabelCoords:function(e){const t=this._addLabelAlignmentAndOffset(e,this._getLabelCoords(e));return this._checkLabelPosition(e,t)},_drawLabel:function(){const e=this,t=e._getCustomLabelVisibility(),i=e._label,n=e._showForZeroValues()&&e.hasValue()&&!1!==t&&(e.series.getLabelVisibility()||t);i.draw(!!n)},correctLabelPosition:function(e){const t=this,i=t._getShiftLabelCoords(e);t.hideInsideLabel(e,i)||(e.setFigureToDrawConnector(t._getLabelConnector(e.pointPosition)),e.shift(p(i.x),p(i.y)))},_showForZeroValues:function(){return!0},_getLabelConnector:function(e){const t=this._getGraphicBBox(e),i=t.width/2,n=t.height/2;return{x:t.x+i,y:t.y+n,r:this._options.visible?Math.max(i,n):0}},_getPositionFromLocation:function(){return{x:this.x,y:this.y}},_isPointInVisibleArea:function(e,t){return e.minX<=t.x+t.width&&e.maxX>=t.x&&e.minY<=t.y+t.height&&e.maxY>=t.y},_checkLabelPosition:function(e,t){const i=this,n=i._getVisibleArea(),o=e.getBoundingRect(),a=i._getGraphicBBox(e.pointPosition),s=i._getGraphicBBox(),r="inside"===e.getLayoutOptions().position;return i._isPointInVisibleArea(n,s)&&(i._options.rotated?(n.minX>t.x&&(t.x=r?n.minX:a.x+a.width+10),n.maxX<t.x+o.width&&(t.x=r?n.maxX-o.width:a.x-10-o.width),n.minY>t.y&&(t.y=n.minY),n.maxY<t.y+o.height&&(t.y=n.maxY-o.height)):(n.minX>t.x&&(t.x=n.minX),n.maxX<t.x+o.width&&(t.x=n.maxX-o.width),n.minY>t.y&&(t.y=r?n.minY:a.y+a.height+10),n.maxY<t.y+o.height&&(t.y=r?n.maxY-o.height:a.y-o.height-10))),t},_addLabelAlignmentAndOffset:function(e,t){const i=e.getBoundingRect(),n=e.getLayoutOptions();return this._options.rotated||("left"===n.alignment?t.x+=i.width/2:"right"===n.alignment&&(t.x-=i.width/2)),t.x+=n.horizontalOffset,t.y+=n.verticalOffset,t},_getLabelCoords:function(e){return this._getLabelCoordOfPosition(e,this._getLabelPosition(e.pointPosition))},_getLabelCoordOfPosition:function(e,t){const i=e.getBoundingRect(),n=this._getGraphicBBox(e.pointPosition),o=n.height/2-i.height/2,a=n.width/2-i.width/2;let s=n.x,r=n.y;switch(t){case"left":s-=i.width+10,r+=o;break;case"right":s+=n.width+10,r+=o;break;case"top":s+=a,r-=i.height+10;break;case"bottom":s+=a,r+=n.height+10;break;case"inside":s+=a,r+=o}return{x:s,y:r}},_drawMarker:function(e,t,i){const n=this,o=n._options,a=n._getTranslates(i),s=n._getStyle();n.graphic=n._createMarker(e,t,o.image,c({translateX:a.x,translateY:a.y,points:n._populatePointShape(o.symbol,s.r)},s))},_getErrorBarSettings:function(){return{visibility:"visible"}},_getErrorBarBaseEdgeLength(){return 2*this.getPointRadius()},_drawErrorBar:function(e,t){if(!this._options.errorBars)return;const i=this,n=i._options,a=n.errorBars,s=[];let r;const u=i._errorBarPos;let c=i._highErrorCoord,h=i._lowErrorCoord;const p=(0,d.normalizeEnum)(a.displayMode),_="high"===p,f="low"===p,m=(_||!(0,l.isDefined)(h))&&(0,l.isDefined)(c)&&!f,v=(f||!(0,l.isDefined)(c))&&(0,l.isDefined)(h)&&!_;let C=a.edgeLength;C<=1&&C>0&&(C=this._getErrorBarBaseEdgeLength()*a.edgeLength),C=g(parseInt(C)/2),m&&(h=i._baseErrorBarPos),v&&(c=i._baseErrorBarPos),"none"!==p&&(0,l.isDefined)(c)&&(0,l.isDefined)(h)&&(0,l.isDefined)(u)?(!v&&s.push([u-C,c,u+C,c]),s.push([u,c,u,h]),!m&&s.push([u+C,h,u-C,h]),n.rotated&&(0,o.each)(s,(function(e,t){t.reverse()})),r=i._getErrorBarSettings(a),i._errorBar?(r.points=s,i._errorBar.attr(r)):i._errorBar=e.path(s,"line").attr(r).append(t)):i._errorBar&&i._errorBar.attr({visibility:"hidden"})},getTooltipParams:function(){const e=this,t=e.graphic;return{x:e.x,y:e.y,offset:t?t.getBBox().height/2:0}},setPercentValue:function(e,t,i,n){const o=this,a=o.value/e||0,s=o.minValue/e||0,r=a-s;o._label.setDataField("percent",r),o._label.setDataField("total",t),o.series.isFullStackedSeries()&&o.hasValue()&&(o.leftHole&&(o.leftHole/=e-i,o.minLeftHole/=e-i),o.rightHole&&(o.rightHole/=e-n,o.minRightHole/=e-n),o.value=o.properValue=a,o.minValue=s||o.minValue)},_storeTrackerR:function(){const e=this;let t=u.navigator;const i=e._options.styles.normal.r,n=(0,s.hasProperty)("ontouchstart")||t.msPointerEnabled&&t.msMaxTouchPoints||t.pointerEnabled&&t.maxTouchPoints?20:6;return e._options.trackerR=i<n?n:i,e._options.trackerR},_translateErrorBars:function(){const e=this,t=e._options,i=t.rotated,n=t.errorBars,o=e._getValTranslator();n&&((0,l.isDefined)(e.lowError)&&(e._lowErrorCoord=o.translate(e.lowError)),(0,l.isDefined)(e.highError)&&(e._highErrorCoord=o.translate(e.highError)),e._errorBarPos=g(i?e.vy:e.vx),e._baseErrorBarPos="stdDeviation"===n.type?e._lowErrorCoord+(e._highErrorCoord-e._lowErrorCoord)/2:i?e.vx:e.vy)},_translate:function(){const e=this,t=e._getValTranslator(),i=e._getArgTranslator();e._options.rotated?(e.vx=e.x=t.translate(e.value,void 0,!0),e.vy=e.y=i.translate(e.argument,void 0,!0),e.minX=t.translate(e.minValue,void 0,!0),e.defaultX=t.translate(f)):(e.vy=e.y=t.translate(e.value,void 0,!0),e.vx=e.x=i.translate(e.argument,void 0,!0),e.minY=t.translate(e.minValue,void 0,!0),e.defaultY=t.translate(f)),e._translateErrorBars(),e._calculateVisibility(e.x,e.y)},_updateData:function(e){const t=this;t.value=t.properValue=t.initialValue=t.originalValue=e.value,t.minValue=t.initialMinValue=t.originalMinValue=(0,l.isDefined)(e.minValue)?e.minValue:f},_getImageSettings:function(e){return{href:e.url||e.toString(),width:e.width||20,height:e.height||20}},getCrosshairData:function(){const e=this,t=e._options.rotated,i=e.properValue,n=e.argument;return{x:e.vx,y:e.vy,xValue:t?i:n,yValue:t?n:i,axis:e.series.axis}},getPointRadius:function(){const e=this._getStyle(),t=this._options,i=e.r;let n;const o=t.symbol,a="square"===o,s="triangle"===o||"triangleDown"===o||"triangleUp"===o;return t.visible&&!t.image&&i?(n=e["stroke-width"]/2,(a||s?1.4*i:i)+n):0},_updateMarker:function(e,t){const i=this,n=i._options;let o;const a=n.image,s=i.isVisible()?{}:{visibility:"hidden"};o=i._checkImage(a)?c({},{visibility:t.visibility},s,i._getImageSettings(a)):c({},t,s,{points:i._populatePointShape(n.symbol,t.r)}),e||(o.translateX=i.x,o.translateY=i.y),i.graphic.attr(o).sharp()},_getLabelFormatObject:function(){const e=this;return{argument:e.initialArgument,value:e.initialValue,originalArgument:e.originalArgument,originalValue:e.originalValue,seriesName:e.series.name,lowErrorValue:e.lowError,highErrorValue:e.highError,point:e}},_getLabelPosition:function(){const e=this._options.rotated;return this.initialValue>0?e?"right":"top":e?"left":"bottom"},_getFormatObject:function(e){const t=this,i=t._label.getData();return c({},i,{argumentText:e.formatValue(t.initialArgument,"argument"),valueText:e.formatValue(t.initialValue)},(0,l.isDefined)(i.percent)?{percentText:e.formatValue(i.percent,"percent")}:{},(0,l.isDefined)(i.total)?{totalText:e.formatValue(i.total)}:{})},getMarkerVisibility:function(){return this._options.visible},coordsIn:function(e,t){const i=this._storeTrackerR();return e>=this.x-i&&e<=this.x+i&&t>=this.y-i&&t<=this.y+i},getMinValue:function(e){const t=this._options.errorBars;if(t&&!e){const e=t.displayMode,i="high"!==e&&(0,l.isDefined)(this.lowError)?this.lowError:this.value,n="low"!==e&&(0,l.isDefined)(this.highError)?this.highError:this.value;return i<n?i:n}return this.value},getMaxValue:function(e){const t=this._options.errorBars;if(t&&!e){const e=t.displayMode,i="high"!==e&&(0,l.isDefined)(this.lowError)?this.lowError:this.value,n="low"!==e&&(0,l.isDefined)(this.highError)?this.highError:this.value;return i>n?i:n}return this.value}};e.exports=t.default,e.exports.default=t.default},16665:function(e,t,i){t.chart=void 0;var n=i(52576),o=i(11528),a=i(28779),s=i(17781),r=i(24008),l=i(91449),d=i(46283);const u=n.extend,c=l.chart.bar,h=d.chart.area,p=t.chart={},g={areErrorBarsVisible:s.noop,_createErrorBarGroup:s.noop,_checkData:function(e,t){const i=this.getValueFields();return r.chart._checkData.call(this,e,t,{minValue:i[0],value:i[1]})&&e.minValue==e.minValue},getValueRangeInitialValue:r.chart.getValueRangeInitialValue,_getPointDataSelector:function(e){const t=this.getValueFields(),i=t[0],n=t[1],o=this.getTagField(),a=this.getArgumentField();return e=>({tag:e[o],minValue:this._processEmptyValue(e[i]),value:this._processEmptyValue(e[n]),argument:e[a],data:e})},_defaultAggregator:"range",_aggregators:{range(e,t){let{intervalStart:i,intervalEnd:n,data:a}=e;if(!a.length)return;const s=t.getValueFields(),r=s[0],l=s[1],d=a.reduce(((e,t)=>{const i=t[r],n=t[l];return(0,o.isDefined)(i)&&(0,o.isDefined)(n)?(e[r]=Math.min(e[r],Math.min(i,n)),e[l]=Math.max(e[l],Math.max(i,n)),e):e}),{[r]:1/0,[l]:-1/0,[t.getArgumentField()]:t._getIntervalCenter(i,n)});if(!isFinite(d[r])||!isFinite(d[l])){if(a.filter((e=>null===e[r]&&null===e[l])).length!==a.length)return;d[r]=d[l]=null}return d}},getValueFields:function(){return[this._options.rangeValue1Field||"val1",this._options.rangeValue2Field||"val2"]},getSeriesPairCoord(e,t){let i=null;const{rotated:n}=this._options,o=!t&&!n||t&&n,a=o?"vy":"vx",s=n?"minX":"minY",r=o?"vx":"vy",l=this.getPoints();for(let n=0;n<l.length;n++){const o=l[n];let d;if(t)d=o.getCenterCoord()[a[1]]===e?o[r]:void 0;else{const t=[Math.min(o[a],o[s]),Math.max(o[a],o[s])];d=e>=t[0]&&e<=t[1]?o[r]:void 0}if(this._checkAxisVisibleAreaCoord(!t,d)){i=d;break}}return i}};p.rangebar=u({},c,g),p.rangearea=u({},h,{_drawPoint:function(e){const t=e.point;t.isInVisibleArea()?(t.clearVisibility(),t.draw(this._renderer,e.groups),this._drawnPoints.push(t),t.visibleTopMarker||t.hideMarker("top"),t.visibleBottomMarker||t.hideMarker("bottom")):t.setInvisibility()},_prepareSegment:function(e,t){const i=this._processSinglePointsAreaSegment(e,t),n=(0,a.map)(i,(function(e){return e.getCoords(!0)}));return{line:i,bottomLine:n,area:(0,a.map)(i,(function(e){return e.getCoords()})).concat(n.slice().reverse()),singlePointSegment:i!==e}},_getDefaultSegment:function(e){const t=h._getDefaultSegment.call(this,e);return t.bottomLine=t.line,t},_removeElement:function(e){h._removeElement.call(this,e),e.bottomLine&&e.bottomLine.remove()},_drawElement:function(e,t){const i=this,n=h._drawElement.call(i,e,t);return n.bottomLine=i._bordersGroup&&i._createBorderElement(e.bottomLine,{"stroke-width":i._styles.normal.border["stroke-width"]}).append(i._bordersGroup),n},_applyStyle:function(e){const t=this,i=t._elementsGroup,n=t._bordersGroup;i&&i.smartAttr(e.elements),n&&n.attr(e.border),(t._graphics||[]).forEach((function(t){t.line&&t.line.attr({"stroke-width":e.border["stroke-width"]}),t.bottomLine&&t.bottomLine.attr({"stroke-width":e.border["stroke-width"]})}))},_updateElement:function(e,t,i,n){const o={points:t.bottomLine},a=e.bottomLine;h._updateElement.apply(this,arguments),a&&(i?a.animate(o):a.attr(o))}},g)},24008:function(e,t,i){t.polar=t.chart=void 0;var n,o=i(52576),a=i(21274),s=(n=i(34685))&&n.__esModule?n:{default:n},r=i(11528),l=i(28779),d=i(17781);const u=Math,c=u.abs,h=u.sqrt,p=u.max,g="highError",_="lowError",f="variance",m="stddeviation",v="stderror",C="percent",y="fixed";let b=t.chart={},x=t.polar={};function w(e){let t=0;return(0,a.each)(e,(function(e,i){t+=i})),t}function S(e,t){return w((0,l.map)(e,(function(e){return(e-t)*(e-t)})))/e.length}function D(e){return(t,i)=>{let{intervalStart:n,intervalEnd:a,data:s}=t;const r=i.getValueFields()[0];let l=s[0];return l=s.reduce(((t,i)=>{const n=i[r];return null===t[r]&&(t=i),null!==n&&e(n,t[r])?i:t}),l),(0,o.extend)({},l,{[i.getArgumentField()]:i._getIntervalCenter(n,a)})}}const I={_defaultDuration:400,_defaultTrackerWidth:12,_applyStyle:d.noop,_updateOptions:d.noop,_parseStyle:d.noop,_prepareSegment:d.noop,_drawSegment:d.noop,_appendInGroup:function(){this._group.append(this._extGroups.seriesGroup)},_createLegendState:function(e,t){return{fill:(0,l.extractColor)(e.color,!0)||t,hatching:e.hatching?(0,o.extend)({},e.hatching,{direction:"right"}):void 0}},_getColorId:d.noop,_applyElementsClipRect:function(e){e["clip-path"]=this._paneClipRectID},_applyMarkerClipRect:function(e){e["clip-path"]=this._forceClipping?this._paneClipRectID:null},_createGroup:function(e,t,i,n){const o=t[e]=t[e]||this._renderer.g();i&&o.append(i),n&&o.attr(n)},_applyClearingSettings:function(e){e.opacity=null,e.scale=null,this._options.rotated?e.translateX=null:e.translateY=null},_createGroups:function(){const e=this;e._createGroup("_markersGroup",e,e._group),e._createGroup("_labelsGroup",e)},_setMarkerGroupSettings:function(){const e=this,t=e._createPointStyles(e._getMarkerGroupOptions()).normal;t.class="dxc-markers",t.opacity=1,e._applyMarkerClipRect(t),e._markersGroup.attr(t)},getVisibleArea:function(){return this._visibleArea},areErrorBarsVisible:function(){const e=this._options.valueErrorBar;return e&&this._errorBarsEnabled()&&"none"!==e.displayMode&&(t=(0,l.normalizeEnum)(e.type),[y,C,f,m,v].includes(t)||(0,r.isDefined)(e.lowValueField)||(0,r.isDefined)(e.highValueField));var t},groupPointsByCoords(e){const t=[];return(0,a.each)(this.getVisiblePoints(),(function(i,n){const o=parseInt(e?n.vy:n.vx);t[o]?Array.isArray(t[o])?t[o].push(n):t[o]=[t[o],n]:t[o]=n})),t},_createErrorBarGroup:function(e){const t=this,i=t._options.valueErrorBar;let n;t.areErrorBarsVisible()&&(n={class:"dxc-error-bars",stroke:i.color,"stroke-width":i.lineWidth,opacity:e?.001:i.opacity||1,"stroke-linecap":"square",sharp:!0,"clip-path":t._forceClipping?t._paneClipRectID:t._widePaneClipRectID},t._createGroup("_errorBarGroup",t,t._group,n))},_setGroupsSettings:function(e){const t=this;t._setMarkerGroupSettings(),t._setLabelGroupSettings(e),t._createErrorBarGroup(e)},_getCreatingPointOptions:function(){const e=this;let t,i,n=e._predefinedPointOptions;return n||(t=e._getPointOptions(),e._predefinedPointOptions=n=(0,o.extend)(!0,{styles:{}},t),i=t.styles&&t.styles.normal||{},n.styles=n.styles||{},n.styles.normal={"stroke-width":i["stroke-width"],r:i.r,opacity:i.opacity}),n},_getPointOptions:function(){return this._parsePointOptions(this._preparePointOptions(),this._options.label)},_getOptionsForPoint:function(){return this._options.point},_parsePointStyle:function(e,t,i,n){const o=e.border||{},a=void 0!==e.size?e.size:n;return{fill:(0,l.extractColor)(e.color,!0)||t,stroke:o.color||i,"stroke-width":o.visible?o.width:0,r:a/2+(o.visible&&0!==a&&~~(o.width/2)||0)}},_createPointStyles:function(e){const t=this,i=(0,l.extractColor)(e.color,!0)||t._options.mainSeriesColor,n=t._options.containerBackgroundColor,o=t._parsePointStyle(e,i,i);return o.visibility=e.visible?"visible":"hidden",{labelColor:i,normal:o,hover:t._parsePointStyle(e.hoverStyle,n,i,e.size),selection:t._parsePointStyle(e.selectionStyle,n,i,e.size)}},_checkData:function(e,t,i){return(i=i||{value:this.getValueFields()[0]}).argument=this.getArgumentField(),function(e,t,i){let n=!0;for(const o in t){const a="argument"===o;if(a||"size"===o?!(0,r.isDefined)(e[o]):void 0===e[o]){const e=t[o];a||(i[e]=(i[e]||0)+1),n=!1}}return n}(e,i,t||{})&&e.value==e.value},getArgumentRangeInitialValue(){const e=this.getPoints();var t,i;if(this.useAggregation()&&e.length)return{min:null===(t=e[0].aggregationInfo)||void 0===t?void 0:t.intervalStart,max:null===(i=e[e.length-1].aggregationInfo)||void 0===i?void 0:i.intervalEnd}},getValueRangeInitialValue:function(){},_getRangeData:function(){return s.default.getRangeData(this)},_getPointDataSelector:function(){const e=this.getValueFields()[0],t=this.getArgumentField(),i=this.getTagField(),n=this.areErrorBarsVisible();let o,a;if(n){const e=this._options.valueErrorBar;o=e.lowValueField||_,a=e.highValueField||g}return s=>{const r={value:this._processEmptyValue(s[e]),argument:s[t],tag:s[i],data:s};return n&&(r.lowError=s[o],r.highError=s[a]),r}},_errorBarsEnabled:function(){return"discrete"!==this.valueAxisType&&"logarithmic"!==this.valueAxisType&&"datetime"!==this.valueType},_drawPoint:function(e){const t=e.point;t.isInVisibleArea()?(t.clearVisibility(),t.draw(this._renderer,e.groups,e.hasAnimation,e.firstDrawing),this._drawnPoints.push(t)):t.setInvisibility()},_animateComplete:function(){const e=this,t={duration:e._defaultDuration};e._labelsGroup&&e._labelsGroup.animate({opacity:1},t),e._errorBarGroup&&e._errorBarGroup.animate({opacity:e._options.valueErrorBar.opacity||1},t)},_animate:function(){const e=this,t=e._drawnPoints.length-1;(0,a.each)(e._drawnPoints||[],(function(i,n){n.animate(i===t?function(){e._animateComplete()}:void 0,{translateX:n.x,translateY:n.y})}))},_getIntervalCenter(e,t){const i=this.getArgumentAxis(),n=i.getOptions();return i.aggregatedPointBetweenTicks()?e:"discrete"!==n.type?i.getVisualRangeCenter({minVisible:e,maxVisible:t},!0):e},_defaultAggregator:"avg",_aggregators:{avg(e,t){let{data:i,intervalStart:n,intervalEnd:o}=e;if(!i.length)return;const a=t.getValueFields()[0],s=i.reduce(((e,t)=>{const i=t[a];return(0,r.isDefined)(i)?(e[0]+=i,e[1]++):null===i&&e[2]++,e}),[0,0,0]);return function(e,t,i){const n=i.getOptions().valueErrorBar,o=i.getValueFields()[0],a=n.lowValueField||_,s=n.highValueField||g;if(i.areErrorBarsVisible()&&void 0===n.type){const i=t.reduce((function(e,t){return(0,r.isDefined)(t[a])&&(e[0]+=t[o]-t[a],e[1]++),(0,r.isDefined)(t[s])&&(e[2]+=t[s]-t[o],e[3]++),e}),[0,0,0,0]);i[1]&&(e[a]=e[o]-i[0]/i[1]),i[2]&&(e[s]=e[o]+i[2]/i[3])}return e}({[a]:s[2]===i.length?null:s[0]/s[1],[t.getArgumentField()]:t._getIntervalCenter(n,o)},i,t)},sum(e,t){let{intervalStart:i,intervalEnd:n,data:o}=e;if(!o.length)return;const a=t.getValueFields()[0],s=o.reduce(((e,t)=>{const i=t[a];return void 0!==i&&(e[0]+=i),null===i?e[1]++:void 0===i&&e[2]++,e}),[0,0,0]);let r=s[0];return s[1]===o.length&&(r=null),s[2]!==o.length?function(e,t,i){const n=i.getOptions().valueErrorBar,o=n.lowValueField||_,a=n.highValueField||g;return i.areErrorBarsVisible()&&void 0===n.type&&(e[o]=0,e[a]=0,e=t.reduce((function(e,t){return e[o]+=t[o],e[a]+=t[a],e}),e)),e}({[a]:r,[t.getArgumentField()]:t._getIntervalCenter(i,n)},o,t):void 0},count(e,t){let{data:i,intervalStart:n,intervalEnd:o}=e;const a=t.getValueFields()[0];return{[t.getArgumentField()]:t._getIntervalCenter(n,o),[a]:i.filter((e=>void 0!==e[a])).length}},min:D(((e,t)=>e<t)),max:D(((e,t)=>e>t))},_endUpdateData:function(){delete this._predefinedPointOptions},getArgumentField:function(){return this._options.argumentField||"arg"},getValueFields:function(){const e=this._options,t=e.valueErrorBar,i=[e.valueField||"val"];let n,o;return t&&(n=t.lowValueField,o=t.highValueField,(0,r.isString)(n)&&i.push(n),(0,r.isString)(o)&&i.push(o)),i},_calculateErrorBars:function(e){if(!this.areErrorBarsVisible())return;const t=this._options.valueErrorBar,i=(0,l.normalizeEnum)(t.type);let n=parseFloat(t.value);const o=this.getValueFields()[0];let s;const d=t.lowValueField||_,u=t.highValueField||g;let c,p,b,x;const D=function(e,t){s=t.value,t.lowError=s-n,t.highError=s+n};switch(i){case y:x=D;break;case C:x=function(e,t){s=t.value;const i=s*n/100;t.lowError=s-i,t.highError=s+i};break;case"undefined":x=function(e,t){t.lowError=t.data[d],t.highError=t.data[u]};break;default:switch(c=(0,l.map)(e,(function(e){return(0,r.isDefined)(e.data[o])?e.data[o]:null})),p=c.length,n=n||1,i){case f:n=S(c,w(c)/p)*n,x=D;break;case m:b=w(c)/p,n=h(S(c,b))*n,x=function(e,t){t.lowError=b-n,t.highError=b+n};break;case v:n=h(S(c,w(c)/p)/p)*n,x=D}}x&&(0,a.each)(e,x)},_patchMarginOptions:function(e){const t=this._getCreatingPointOptions(),i=t.styles,n=[i.normal,i.hover,i.selection].reduce((function(e,t){return p(e,2*t.r+t["stroke-width"])}),0);return e.size=t.visible?n:0,e.sizePointNormalState=t.visible?2*i.normal.r+i.normal["stroke-width"]:2,e},usePointsToDefineAutoHiding:()=>!0};t.chart=b=(0,o.extend)({},I,{drawTrackers:function(){const e=this;let t,i;const n=e._segments||[],o=e._options.rotated;e.isVisible()&&(n.length&&(t=e._trackers=e._trackers||[],i=e._trackersGroup=(e._trackersGroup||e._renderer.g().attr({fill:"gray",opacity:.001,stroke:"gray",class:"dxc-trackers"})).attr({"clip-path":this._paneClipRectID||null}).append(e._group),(0,a.each)(n,(function(n,o){t[n]?e._updateTrackerElement(o,t[n]):t[n]=e._drawTrackerElement(o).data({"chart-data-series":e}).append(i)}))),e._trackersTranslator=e.groupPointsByCoords(o))},_checkAxisVisibleAreaCoord(e,t){const i=(e?this.getArgumentAxis():this.getValueAxis()).getVisibleArea();return(0,r.isDefined)(t)&&i[0]<=t&&i[1]>=t},checkSeriesViewportCoord(e,t){return this.getPoints().length&&this.isVisible()},getSeriesPairCoord(e,t){let i=null;const n=!t&&!this._options.rotated||t&&this._options.rotated,o=n?"vy":"vx",a=n?"vx":"vy",s=this.getVisiblePoints();for(let n=0;n<s.length;n++){const r=s[n],l=r[o]===e?r[a]:void 0;if(this._checkAxisVisibleAreaCoord(!t,l)){i=l;break}}return i},_getNearestPoints:(e,t)=>[e,t],_getBezierPoints:()=>[],_getNearestPointsByCoord(e,t){const i=this,n=i.getOptions().rotated,o=!t&&!n||t&&n?"vy":"vx",a=i.getPoints(),s=i._getBezierPoints(),r=[];return a.length>1?a.forEach(((t,n)=>{const l=a[n+1];l&&(t[o]<=e&&l[o]>=e||t[o]>=e&&l[o]<=e)&&r.push(i._getNearestPoints(t,l,s))})):r.push([a[0],a[0]]),r},getNeighborPoint:function(e,t){let i=this._options.rotated?t:e,n=i;const o=this._trackersTranslator;let s,r=null;const l=this._options.rotated?e:t,d=this._options.rotated?"vx":"vy";if(this.isVisible()&&o){r=o[i];do{r=o[n]||o[i],i--,n++}while((i>=0||n<o.length)&&!r);Array.isArray(r)&&(s=c(r[0][d]-l),(0,a.each)(r,(function(e,t){const i=c(t[d]-l);s>=i&&(s=i,r=t)})))}return r},_applyVisibleArea:function(){const e=this,t=e._options.rotated,i=(t?e.getValueAxis():e.getArgumentAxis()).getVisibleArea(),n=(t?e.getArgumentAxis():e.getValueAxis()).getVisibleArea();e._visibleArea={minX:i[0],maxX:i[1],minY:n[0],maxY:n[1]}},getPointCenterByArg(e){const t=this.getPointsByArg(e)[0];return t?t.getCenterCoord():void 0}}),t.polar=x=(0,o.extend)({},I,{drawTrackers:function(){b.drawTrackers.call(this);const e=this._trackersTranslator;let t;this.isVisible()&&((0,a.each)(e,(function(e,i){if(i)return t=e,!1})),e[t+360]=e[t])},getNeighborPoint:function(e,t){const i=(0,l.convertXYToPolar)(this.getValueAxis().getCenter(),e,t);return b.getNeighborPoint.call(this,i.phi,i.r)},_applyVisibleArea:function(){const e=this.getValueAxis().getCanvas();this._visibleArea={minX:e.left,maxX:e.width-e.right,minY:e.top,maxY:e.height-e.bottom}},getSeriesPairCoord(e,t){let i=null;const n=t?"argument":"radius",o=this.getVisiblePoints();for(let t=0;t<o.length;t++){const a=o[t],s=(0,r.isDefined)(a[n])&&(0,r.isDefined)(e[n])&&a[n].valueOf()===e[n].valueOf()?{x:a.x,y:a.y}:void 0;if((0,r.isDefined)(s)){i=s;break}}return i}})},33277:function(e,t,i){t.polar=t.chart=void 0;var n=i(17781),o=i(52576),a=i(21274),s=i(46283),r=i(91449),l=i(85854),d=i(28779),u=i(22263);const c=s.chart.area,h=r.chart.bar,p={_calculateErrorBars:n.noop,_updateOptions:function(e){this._stackName="axis_"+(e.axis||"default")}},g=t.chart={},_=t.polar={};g.stackedline=(0,o.extend)({},l.chart.line,p,{}),g.stackedspline=(0,o.extend)({},l.chart.spline,p,{}),g.fullstackedline=(0,o.extend)({},l.chart.line,p,{getValueRangeInitialValue:s.chart.area.getValueRangeInitialValue}),g.fullstackedspline=(0,o.extend)({},l.chart.spline,p,{getValueRangeInitialValue:s.chart.area.getValueRangeInitialValue});const f=g.stackedbar=(0,o.extend)({},h,p,{_updateOptions:function(e){p._updateOptions.call(this,e),this._stackName=this._stackName+"_stack_"+(e.stack||"default")}});function m(e,t,i,n){return(e=(0,u.clone)(e)).value=t,e.minValue=i,e.translate(),e.argument=e.argument+n,e}function v(e){let t,i=0;const n=[];let o;const a=e.length;for(;i<a;)t=e[i],o=[t],t.leftHole&&(o=[m(t,t.leftHole,t.minLeftHole,"left"),t]),t.rightHole&&o.push(m(t,t.rightHole,t.minRightHole,"right")),n.push(o),i++;return[].concat.apply([],n)}g.fullstackedbar=(0,o.extend)({},h,p,{_updateOptions:f._updateOptions}),g.stackedarea=(0,o.extend)({},c,p,{_prepareSegment:function(e,t){return c._prepareSegment.call(this,v(e),t)},_appendInGroup:function(){this._group.append(this._extGroups.seriesGroup).toBackground()}}),g.stackedsplinearea=(0,o.extend)({},s.chart.splinearea,p,{_prepareSegment:function(e,t){const i=this;let n;if(e=v(e),this._prevSeries&&1!==e.length){const o=l.chart.spline._calculateBezierPoints(e,t);let s=(0,d.map)(e,(function(e){const t=e.getCoords(!0);return t.argument=e.argument,t})),r=[];const u={};let c=0;const h=i._prevSeries._segments.length;for(;c<h;)r=r.concat(i._prevSeries._segments[c].line),c++;(0,a.each)(r,(function(e,t){if(null!==t.argument){const e=t.argument.valueOf();u[e]?u[e].push(t):u[e]=[t]}})),i._prevSeries._segmentByArg=u,s=l.chart.spline._calculateBezierPoints(s,t),(0,a.each)(s,(function(e,t){const n=t.argument.valueOf();let o;e%3==0&&(o=u[n]||function(e,t){let i;for(;!i&&e;)i=e._segmentByArg&&e._segmentByArg[t],e=e._prevSeries;return i}(i._prevSeries,n),o&&(s[e-1]&&o[0]&&(s[e-1]=o[0]),s[e+1]&&(s[e+1]=o[2]||t)))})),n={line:o,area:o.concat(s.reverse())},i._areaPointsToSplineAreaPoints(n.area)}else n=s.chart.splinearea._prepareSegment.call(this,e,t);return n},_appendInGroup:g.stackedarea._appendInGroup}),g.fullstackedarea=(0,o.extend)({},c,p,{_prepareSegment:g.stackedarea._prepareSegment,_appendInGroup:g.stackedarea._appendInGroup}),g.fullstackedsplinearea=(0,o.extend)({},s.chart.splinearea,p,{_prepareSegment:g.stackedsplinearea._prepareSegment,_appendInGroup:g.stackedarea._appendInGroup}),_.stackedbar=(0,o.extend)({},r.polar.bar,p,{_updateOptions:function(e){p._updateOptions.call(this,e),this._stackName=this._stackName+"_stack_"+(e.stack||"default")}})},71871:function(e,t,i){t.default=void 0;var n,o=(n=i(47206))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},55676:function(e,t,i){t.default=void 0;var n=f(i(92774)),o=f(i(64960)),a=i(11528),s=f(i(34506)),r=i(52576),l=i(98834),d=f(i(89797)),u=i(28779),c=f(i(64553)),h=i(64174),p=i(17781),g=i(23277),_=i(74754);function f(e){return e&&e.__esModule?e:{default:e}}const m="sparkline-tooltip",v=(0,l.addNamespace)([d.default.down,d.default.move],m),C=r.extend,y=Math.floor;function b(e){let{data:t}=e;const i=t.widget;i._enableOutHandler(),i._showTooltip()}function x(e){const t=new h.Translator2D({},{},{shiftZeroValue:!e,isHorizontal:!!e});return{getTranslator:function(){return t},update:function(e,i,n){t.update(e,i,n)},getVisibleArea(){const e=t.getCanvasVisibleArea();return[e.min,e.max]},visualRange:p.noop,calculateInterval:p.noop,getMarginOptions:()=>({}),aggregatedPointBetweenTicks:()=>!1}}let w;const S=s.default.inherit({_getLayoutItems:p.noop,_useLinks:!1,_themeDependentChanges:["OPTIONS"],_initCore:function(){const e=this;e._tooltipTracker=e._renderer.root,e._tooltipTracker.attr({"pointer-events":"visible"}),e._createHtmlElements(),e._initTooltipEvents(),e._argumentAxis=x(!0),e._valueAxis=x()},_getDefaultSize:function(){return this._defaultSize},_disposeCore:function(){this._disposeWidgetElements(),this._disposeTooltipEvents(),this._ranges=null},_optionChangesOrder:["OPTIONS"],_change_OPTIONS:function(){this._prepareOptions(),this._change(["UPDATE"])},_customChangesOrder:["UPDATE"],_change_UPDATE:function(){this._update()},_update:function(){const e=this;e._tooltipShown&&(e._tooltipShown=!1,e._tooltip.hide()),e._cleanWidgetElements(),e._updateWidgetElements(),e._drawWidgetElements()},_updateWidgetElements:function(){const e=this._getCorrectCanvas();this._updateRange(),this._argumentAxis.update(this._ranges.arg,e,this._getStick()),this._valueAxis.update(this._ranges.val,e)},_getStick:function(){},_applySize:function(e){this._allOptions.size={width:e[2]-e[0],height:e[3]-e[1]},this._change(["UPDATE"])},_setupResizeHandler:p.noop,_prepareOptions:function(){return C(!0,{},this._themeManager.theme(),this.option())},_getTooltipCoords:function(){const e=this._canvas,t=this._renderer.getRootOffset();return{x:e.width/2+t.left,y:e.height/2+t.top}},_initTooltipEvents(){const e={widget:this};this._renderer.root.off("."+m).on(v,e,b)},_showTooltip(){const e=this;let t;e._tooltipShown||(e._tooltipShown=!0,t=e._getTooltip(),t.isEnabled()&&e._tooltip.show(e._getTooltipData(),e._getTooltipCoords(),{}))},_hideTooltip(){this._tooltipShown&&(this._tooltipShown=!1,this._tooltip.hide())},_stopCurrentHandling(){this._hideTooltip()},_enableOutHandler(){const e=this;if(e._outHandler)return;const t=t=>{let{pageX:i,pageY:n}=t;const{left:o,top:a}=e._renderer.getRootOffset(),s=y(i-o),r=y(n-a);(function(e,t,i){let{width:n,height:o}=e;return(0,u.pointInCanvas)({left:0,top:0,right:n,bottom:o,width:n,height:o},t,i)})(e._canvas,s,r)||(e._hideTooltip(),e._disableOutHandler())};n.default.on(o.default.getDocument(),v,t),this._outHandler=t},_disableOutHandler(){this._outHandler&&n.default.off(o.default.getDocument(),v,this._outHandler),this._outHandler=null},_disposeTooltipEvents:function(){this._tooltipTracker.off(),this._disableOutHandler(),this._renderer.root.off("."+m)},_getTooltip:function(){const e=this;return e._tooltip||(w.apply(this,arguments),e._setTooltipRendererOptions(e._tooltipRendererOptions),e._tooltipRendererOptions=null,e._setTooltipOptions()),e._tooltip}});t.default=S;S.addPlugin(g.plugin),w=S.prototype._initTooltip,S.prototype._initTooltip=p.noop;const D=S.prototype._disposeTooltip;S.prototype._disposeTooltip=function(){this._tooltip&&D.apply(this,arguments)},S.prototype._setTooltipRendererOptions=function(){const e=this._getRendererOptions();this._tooltip?this._tooltip.setRendererOptions(e):this._tooltipRendererOptions=e},S.prototype._setTooltipOptions=function(){if(this._tooltip){const e=this._getOption("tooltip"),t=this._getDefaultTooltipTemplate(e),i=C(t?{contentTemplate:t}:{},e,{enabled:e.enabled&&this._isTooltipEnabled()});this._tooltip.update(i)}},S.prototype._getDefaultTooltipTemplate=function(e){let t=!0;const i=this.option("rtlEnabled")?"left":"right";if((0,a.isFunction)(e.customizeTooltip)){this._tooltip.update(e);const i=this._getTooltipData(),n=e.customizeTooltip.call(i,i)??{};t=!("html"in n)&&!("text"in n)}return t&&function(e,t){let{lineSpacing:i,size:n}=e;const o=`${(i??2)+n}px`;return function(e,i){let{valueText:n}=e;const a=(0,c.default)("<table>").css({borderSpacing:0,lineHeight:o});for(let e=0;e<n.length;e+=2){const i=(0,c.default)("<tr>");(0,c.default)("<td>").text(n[e]).appendTo(i),(0,c.default)("<td>").css({width:15}).appendTo(i),(0,c.default)("<td>").css({textAlign:t}).text(n[e+1]).appendTo(i),a.append(i)}i.append(a)}}(e.font,i)};const I=(0,r.extend)(!0,{},_.plugin,{init:p.noop,dispose:p.noop,customize:null,members:{_getExportMenuOptions:null}});S.addPlugin(I),e.exports=t.default,e.exports.default=t.default},92633:function(e,t,i){t.default=void 0;var n=i(21274),o=s(i(55676)),a=s(i(92848));function s(e){return e&&e.__esModule?e:{default:e}}const r=Number,l=isFinite,d=o.default.inherit({_rootClassPrefix:"dxb",_rootClass:"dxb-bullet",_themeSection:"bullet",_defaultSize:{width:300,height:30,left:1,right:1,top:2,bottom:2},_disposeWidgetElements:function(){delete this._zeroLevelPath,delete this._targetPath,delete this._barValuePath},_cleanWidgetElements:function(){this._zeroLevelPath.remove(),this._targetPath.remove(),this._barValuePath.remove()},_drawWidgetElements:function(){this._drawBullet(),this._drawn()},_createHtmlElements:function(){const e=this._renderer;this._zeroLevelPath=e.path(void 0,"line").attr({class:"dxb-zero-level","stroke-linecap":"square"}),this._targetPath=e.path(void 0,"line").attr({class:"dxb-target","stroke-linecap":"square"}),this._barValuePath=e.path(void 0,"line").attr({class:"dxb-bar-value","stroke-linecap":"square"})},_prepareOptions:function(){const e=this;let t,i,n,o,a,s;e._allOptions=t=e.callBase();const l=void 0===e._allOptions.value,d=void 0===e._allOptions.target;e._tooltipEnabled=!(l&&d),l&&(e._allOptions.value=0),d&&(e._allOptions.target=0),t.value=a=r(t.value),t.target=s=r(t.target),void 0===e._allOptions.startScaleValue&&(e._allOptions.startScaleValue=s<a?s:a,e._allOptions.startScaleValue=e._allOptions.startScaleValue<0?e._allOptions.startScaleValue:0),void 0===e._allOptions.endScaleValue&&(e._allOptions.endScaleValue=s>a?s:a),t.startScaleValue=i=r(t.startScaleValue),t.endScaleValue=n=r(t.endScaleValue),n<i&&(o=n,e._allOptions.endScaleValue=i,e._allOptions.startScaleValue=o,e._allOptions.inverted=!0)},_updateRange:function(){const e=this._allOptions;this._ranges={arg:{invert:e.rtlEnabled?!e.inverted:e.inverted,min:e.startScaleValue,max:e.endScaleValue,axisType:"continuous",dataType:"numeric"},val:{min:0,max:1,axisType:"continuous",dataType:"numeric"}}},_drawBullet:function(){const e=this._allOptions,t=e.startScaleValue!==e.endScaleValue,i=l(e.startScaleValue),n=l(e.endScaleValue),o=l(e.value),a=l(e.target);t&&n&&i&&a&&o&&(this._drawBarValue(),this._drawTarget(),this._drawZeroLevel())},_getTargetParams:function(){const e=this,t=e._allOptions,i=e._valueAxis.getTranslator(),n=e._argumentAxis.getTranslator().translate(t.target);return{points:[n,i.translate(.02),n,i.translate(.98)],stroke:t.targetColor,"stroke-width":t.targetWidth}},_getBarValueParams:function(){const e=this,t=e._allOptions,i=e._argumentAxis.getTranslator(),n=e._valueAxis.getTranslator(),o=t.startScaleValue,a=t.endScaleValue,s=t.value,r=n.translate(.1),l=n.translate(.9);let d,u;return s>0?(d=o<=0?0:o,u=s>=a?a:s<d?d:s):(d=a>=0?0:a,u=s<o?o:s>d?d:s),d=i.translate(d),u=i.translate(u),{points:[d,l,u,l,u,r,d,r],fill:t.color}},_getCorrectCanvas:function(){return this._canvas},_getZeroLevelParams:function(){const e=this,t=e._valueAxis.getTranslator(),i=e._argumentAxis.getTranslator().translate(0);return{points:[i,t.translate(.02),i,t.translate(.98)],stroke:e._allOptions.targetColor,"stroke-width":1}},_drawZeroLevel:function(){const e=this,t=e._allOptions;0>t.endScaleValue||0<t.startScaleValue||!t.showZeroLevel||e._zeroLevelPath.attr(e._getZeroLevelParams()).sharp().append(e._renderer.root)},_drawTarget:function(){const e=this,t=e._allOptions,i=t.target;i>t.endScaleValue||i<t.startScaleValue||!t.showTarget||e._targetPath.attr(e._getTargetParams()).sharp().append(e._renderer.root)},_drawBarValue:function(){this._barValuePath.attr(this._getBarValueParams()).append(this._renderer.root)},_getTooltipCoords:function(){const e=this._canvas,t=this._renderer.getRootOffset(),i=this._barValuePath.getBBox();return{x:i.x+i.width/2+t.left,y:e.height/2+t.top}},_getTooltipData:function(){const e=this._tooltip,t=this._allOptions,i=t.value,n=t.target,o=e.formatValue(i),a=e.formatValue(n);return{originalValue:i,originalTarget:n,value:o,target:a,valueText:["Actual Value:",o,"Target Value:",a]}},_isTooltipEnabled:function(){return this._tooltipEnabled}});(0,n.each)(["color","targetColor","targetWidth","showTarget","showZeroLevel","value","target","startScaleValue","endScaleValue"],(function(e,t){d.prototype._optionChangesMap[t]="OPTIONS"})),(0,a.default)("dxBullet",d);t.default=d;e.exports=t.default,e.exports.default=t.default},47206:function(e,t,i){t.default=void 0;var n=u(i(55676)),o=i(39104),a=i(66151),s=i(28779),r=i(11528),l=u(i(92848)),d=i(25058);function u(e){return e&&e.__esModule?e:{default:e}}const c={line:!0,spline:!0,stepline:!0,area:!0,steparea:!0,splinearea:!0,bar:!0,winloss:!0},h=Math,p=h.abs,g=h.round,_=h.max,f=h.min,m=isFinite,v=Number,C=String;function y(e,t,i,n){return i!==n.first&&i!==n.last||(e=t.firstLastColor),(n.min||[]).indexOf(i)>=0&&(e=t.minColor),(n.max||[]).indexOf(i)>=0&&(e=t.maxColor),e}const b=n.default.inherit({_rootClassPrefix:"dxsl",_rootClass:"dxsl-sparkline",_themeSection:"sparkline",_defaultSize:{width:250,height:30},_initCore:function(){this.callBase(),this._createSeries()},_initialChanges:["DATA_SOURCE"],_dataSourceChangedHandler:function(){this._requestChange(["UPDATE"])},_updateWidgetElements:function(){this._updateSeries(),this.callBase()},_disposeWidgetElements:function(){const e=this;e._series&&e._series.dispose(),e._series=e._seriesGroup=e._seriesLabelGroup=null},_cleanWidgetElements:function(){this._seriesGroup.remove(),this._seriesLabelGroup.remove(),this._seriesGroup.clear(),this._seriesLabelGroup.clear(),this._series.removeGraphicElements(),this._series.removePointElements(),this._series.removeBordersGroup()},_drawWidgetElements:function(){this._dataIsLoaded()&&(this._drawSeries(),this._drawn())},_getCorrectCanvas:function(){const e=this._allOptions,t=this._canvas,i=e.pointSize&&Math.ceil(e.pointSize/2)+2,n=e.type;return"bar"!==n&&"winloss"!==n&&(e.showFirstLast||e.showMinMax)?{width:t.width,height:t.height,left:t.left+i,right:t.right+i,top:t.top+i,bottom:t.bottom+i}:t},_prepareOptions:function(){const e=this;e._allOptions=e.callBase(),e._allOptions.type=(0,s.normalizeEnum)(e._allOptions.type),c[e._allOptions.type]||(e._allOptions.type="line")},_createHtmlElements:function(){this._seriesGroup=this._renderer.g().attr({class:"dxsl-series"}),this._seriesLabelGroup=this._renderer.g().attr({class:"dxsl-series-labels"})},_createSeries:function(){this._series=new a.Series({renderer:this._renderer,seriesGroup:this._seriesGroup,labelsGroup:this._seriesLabelGroup,argumentAxis:this._argumentAxis,valueAxis:this._valueAxis,incidentOccurred:this._incidentOccurred},{widgetType:"chart",type:"line"})},_updateSeries:function(){const e=this,t=e._series;e._prepareDataSource();const i=e._prepareSeriesOptions();t.updateOptions(i);const n={groups:[{series:[t]}]};n.argumentOptions={type:"bar"===i.type?"discrete":void 0},e._simpleDataSource=(0,o.validateData)(e._simpleDataSource,n,e._incidentOccurred,{checkTypeForAllData:!1,convertToAxisDataType:!0,sortingMethod:!0})[t.getArgumentField()],i.customizePoint=e._getCustomizeFunction(),t.updateData(e._simpleDataSource),t.createPoints(),e._groupsDataCategories=n.categories},_optionChangesMap:{dataSource:"DATA_SOURCE"},_optionChangesOrder:["DATA_SOURCE"],_change_DATA_SOURCE:function(){this._updateDataSource()},_prepareDataSource:function(){const e=this,t=e._allOptions,i=t.argumentField,n=t.valueField,o=function(e,t,i,n){return(0,s.map)(e,(function(e,o){let a,s,r=null;return void 0!==e&&(r={},a=m(e),r[t]=a?C(o):e[t],s=a?e:e[i],r[i]=null===s?n?void 0:s:v(s),r=void 0!==r[t]&&void 0!==r[i]?r:null),r}))}(e._dataSourceItems()||[],i,n,e.option("ignoreEmptyPoints"));"winloss"===t.type?(e._winlossDataSource=o,e._simpleDataSource=function(e,t,i,n){return(0,s.map)(e,(function(e){const o={};return o[t]=e[t],p(e[i]-n)<1e-4?o[i]=0:e[i]>n?o[i]=1:o[i]=-1,o}))}(o,i,n,t.winlossThreshold)):e._simpleDataSource=o},_prepareSeriesOptions:function(){const e=this._allOptions,t="winloss"===e.type?"bar":e.type;return{visible:!0,argumentField:e.argumentField,valueField:e.valueField,color:e.lineColor,width:e.lineWidth,widgetType:"chart",name:"",type:t,opacity:-1!==t.indexOf("area")?this._allOptions.areaOpacity:void 0,point:{size:e.pointSize,symbol:e.pointSymbol,border:{visible:!0,width:2},color:e.pointColor,visible:!1,hoverStyle:{border:{}},selectionStyle:{border:{}}},border:{color:e.lineColor,width:e.lineWidth,visible:"bar"!==t}}},_getCustomizeFunction:function(){const e=this,t=e._allOptions,i=e._winlossDataSource||e._simpleDataSource,n=e._getExtremumPointsIndexes(i);let o;return o="winloss"===t.type||"bar"===t.type?function(e,t,i){return function(){const n=this.index,o="winloss"===t.type,a=o?t.winlossThreshold:0,s=o?i[n][t.valueField]:this.value,r=o?t.winColor:t.barPositiveColor,l=o?t.lossColor:t.barNegativeColor;return{color:y(s>=a?r:l,t,n,e)}}}(n,t,e._winlossDataSource):function(e,t){return function(){const i=y(void 0,t,this.index,e);return i?{visible:!0,border:{color:i}}:{}}}(n,t),o},_getExtremumPointsIndexes:function(e){const t=this,i=t._allOptions,n=e.length-1,o={};return t._minMaxIndexes=function(e,t){const i=(e[0]||{})[t]||0;let n=i,o=i,a=[0],s=[0];const r=e.length;let l,d;for(d=1;d<r;d++)l=e[d][t],l<n?(n=l,a=[d]):l===n&&a.push(d),l>o?(o=l,s=[d]):l===o&&s.push(d);return o===n&&(a=s=[]),{minIndexes:a,maxIndexes:s}}(e,i.valueField),i.showFirstLast&&(o.first=0,o.last=n),i.showMinMax&&(o.min=t._minMaxIndexes.minIndexes,o.max=t._minMaxIndexes.maxIndexes),o},_getStick:function(){return{stick:"bar"!==this._series.type}},_updateRange:function(){const e=this,t=e._series,i=t.type,n="bar"===i,o="winloss"===i,a=t.getRangeData(),s=e._allOptions.minValue,l=(0,r.isDefined)(s)&&m(s),d=e._allOptions.maxValue,u=(0,r.isDefined)(d)&&m(d);let c;const h=.15*(a.val.max-a.val.min);n||o||"area"===i?(0!==a.val.min&&(a.val.min-=h),0!==a.val.max&&(a.val.max+=h)):(a.val.min-=h,a.val.max+=h),(l||u)&&(l&&u?(a.val.minVisible=f(s,d),a.val.maxVisible=_(s,d)):(a.val.minVisible=l?v(s):void 0,a.val.maxVisible=u?v(d):void 0),o&&(a.val.minVisible=l?_(a.val.minVisible,-1):void 0,a.val.maxVisible=u?f(a.val.maxVisible,1):void 0)),t.getPoints().length>1&&n&&(c=.1*(a.arg.max-a.arg.min),a.arg.min=a.arg.min-c,a.arg.max=a.arg.max+c),a.arg.categories=e._groupsDataCategories,e._ranges=a},_getBarWidth:function(e){const t=this._canvas,i=4*e,n=t.width-t.left-t.right-i;let o=g(n/e);return o<1&&(o=1),o>50&&(o=50),o},_correctPoints:function(){const e=this,t=e._allOptions.type,i=e._series.getPoints(),n=i.length;let o,a;if("bar"===t||"winloss"===t)for(o=e._getBarWidth(n),a=0;a<n;a++)i[a].correctCoordinates({width:o,offset:0})},_drawSeries:function(){const e=this;e._simpleDataSource.length>0&&(e._correctPoints(),e._series.draw(),e._seriesGroup.append(e._renderer.root))},_isTooltipEnabled:function(){return!!this._simpleDataSource.length},_getTooltipData:function(){const e=this,t=e._allOptions,i=e._winlossDataSource||e._simpleDataSource,n=e._tooltip;if(0===i.length)return{};const o=e._minMaxIndexes,a=t.valueField,s=i[0][a],l=i[i.length-1][a],d=(0,r.isDefined)(o.minIndexes[0])?i[o.minIndexes[0]][a]:s,u=(0,r.isDefined)(o.maxIndexes[0])?i[o.maxIndexes[0]][a]:s,c=n.formatValue(s),h=n.formatValue(l),p=n.formatValue(d),g=n.formatValue(u),_={firstValue:c,lastValue:h,minValue:p,maxValue:g,originalFirstValue:s,originalLastValue:l,originalMinValue:d,originalMaxValue:u,valueText:["Start:",c,"End:",h,"Min:",p,"Max:",g]};return"winloss"===t.type&&(_.originalThresholdValue=t.winlossThreshold,_.thresholdValue=n.formatValue(t.winlossThreshold)),_}});(0,s.map)(["lossColor","lineColor","lineWidth","areaOpacity","minColor","maxColor","barPositiveColor","barNegativeColor","winColor","lessColor","firstLastColor","pointSymbol","pointColor","pointSize","type","argumentField","valueField","winlossThreshold","showFirstLast","showMinMax","ignoreEmptyPoints","minValue","maxValue"],(function(e){b.prototype._optionChangesMap[e]="OPTIONS"})),(0,l.default)("dxSparkline",b);t.default=b;b.addPlugin(d.plugin),e.exports=t.default,e.exports.default=t.default},84560:function(e,t,i){t.addCacheItem=function(e){const t=++S;e._cache=t,D[t]=e},t.currentTheme=T,t.getTheme=I,t.refreshTheme=function(){return Object.keys(D).forEach((e=>{D[e].refresh()})),this},t.registerTheme=A,t.registerThemeSchemeAlias=function(e,t){y[e]=t},t.removeCacheItem=function(e){delete D[e._cache]};var n=i(52576),o=i(28779),a=i(52071),s=i(11528),r=m(i(4702)),l=m(i(58208)),d=m(i(52541)),u=m(i(2611)),c=m(i(9940)),h=m(i(26374)),p=m(i(29431)),g=m(i(56829)),_=m(i(55073)),f=m(i(12638));function m(e){return e&&e.__esModule?e:{default:e}}const v={},C={},y={},b=n.extend;let x,w=null,S=0;const D={};function I(e){const t=(0,o.normalizeEnum)(e);return v[t]||v[C[t]||T()]}function E(e,t){const i=`${e}.${t}`;return C[i]||y[i]||C[e]}function T(e,t){if(!arguments.length)return w||E((0,a.current)())||x;const i=(0,o.normalizeEnum)(t);return w=(null!=e&&e.platform?function(e,t,i){return E(e+t,i)||E(e,i)}((0,o.normalizeEnum)(e.platform),e.version,i):E((0,o.normalizeEnum)(e),i))||w,this}function A(e,t){const i=(0,o.normalizeEnum)(e&&e.name);i&&(e.isDefault&&(x=i),function(e,t){const i=function(e,t){const i=e.indexOf(t);return i>0?{name:e.substring(0,i),scheme:e.substring(i+1)}:null}(e,".")||{name:e},n=i.name,o=i.scheme;if(o){const e=`${n}.${o}`;C[n]=C[n]||t,C[e]=t}else C[n]=t}(i,i),v[i]=b(!0,{},I(t),function(e){return e=b(!0,{loadingIndicator:{font:{}},export:{font:{}},legend:{font:{},border:{}},title:{font:{}},tooltip:{font:{}},"chart:common":{},"chart:common:axis":{grid:{},minorGrid:{},tick:{},minorTick:{},title:{font:{}},label:{font:{}}},"chart:common:annotation":{font:{},border:{}},chart:{commonSeriesSettings:{candlestick:{}}},pie:{},polar:{},gauge:{scale:{tick:{},minorTick:{},label:{font:{}}}},barGauge:{},funnel:{},sankey:{},map:{background:{}},treeMap:{tile:{selectionStyle:{border:{}}},group:{border:{},selectionStyle:{border:{}},label:{font:{}}}},rangeSelector:{scale:{tick:{},minorTick:{},label:{font:{}}},chart:{}},sparkline:{},bullet:{}},e),O(e.loadingIndicator,"backgroundColor",e),O(e.chart.commonSeriesSettings.candlestick,"innerColor",null,e.backgroundColor),O(e.map.background,"color",null,e.backgroundColor),O(e.title.font,"color",null,e.primaryTitleColor),P(e.title,"subtitle",null,e.title),O(e.legend.font,"color",null,e.secondaryTitleColor),O(e.legend.border,"color",null,e.gridColor),function(e){const t=e["chart:common:axis"],i="color";[t.grid,t.minorGrid].forEach((t=>{O(t,i,null,e.gridColor)})),[t,t.tick,t.minorTick,t.label.font].forEach((t=>{O(t,i,null,e.axisColor)})),O(t.title.font,i,null,e.secondaryTitleColor),O(e.gauge.scale.label.font,i,null,e.axisColor),O(e.gauge.scale.tick,i,null,e.backgroundColor),O(e.gauge.scale.minorTick,i,null,e.backgroundColor),O(e.rangeSelector.scale.label.font,i,null,e.axisColor)}(e),["chart","pie","polar","gauge","barGauge","map","treeMap","funnel","rangeSelector","sparkline","bullet","sankey"].forEach((t=>{O(e[t],"redrawOnResize",e),O(e[t],"containerBackgroundColor",null,e.backgroundColor),P(e[t],"tooltip",e),P(e[t],"export",e)})),["chart","pie","polar","gauge","barGauge","map","treeMap","funnel","rangeSelector","sankey"].forEach((t=>{P(e[t],"loadingIndicator",e),P(e[t],"legend",e),P(e[t],"title",e)})),["chart","pie","polar"].forEach((t=>{P(e,t,null,e["chart:common"])})),["chart","polar"].forEach((t=>{e[t]=e[t]||{},P(e[t],"commonAxisSettings",null,e["chart:common:axis"])})),["chart","polar","map","pie"].forEach((t=>{e[t]=e[t]||{},P(e[t],"commonAnnotationSettings",null,e["chart:common:annotation"])})),P(e.rangeSelector.chart,"commonSeriesSettings",e.chart),P(e.rangeSelector.chart,"dataPrepareSettings",e.chart),O(e.treeMap.group.border,"color",null,e.gridColor),O(e.treeMap.tile.selectionStyle.border,"color",null,e.primaryTitleColor),O(e.treeMap.group.selectionStyle.border,"color",null,e.primaryTitleColor),O(e.map.legend,"backgroundColor",e),function(e){const t=e.map;["area","line","marker"].forEach((e=>{P(t,"layer:"+e,null,t.layer)})),["dot","bubble","pie","image"].forEach((e=>{P(t,"layer:marker:"+e,null,t["layer:marker"])}))}(e),e}(e)))}function O(e,t,i,n){const o=(null==i?void 0:i[t])??n;void 0!==o&&void 0===e[t]&&(e[t]=o)}function P(e,t,i,n){const o=(null==i?void 0:i[t])??n;void 0!==o&&(e[t]=b(!0,{},o,e[t]))}(0,s.isEmptyObject)(v)&&(0,s.isEmptyObject)(C)&&!x&&[].concat(r.default,l.default,d.default,u.default,c.default,h.default,p.default,g.default,_.default,f.default).forEach((e=>{A(e.theme,e.baseThemeName)}))},37279:function(e,t,i){t.default=void 0;var n=i(11528),o=i(50254);const a=Math.round;function s(e){return e}t.default={translate:function(e,t){const i=this,o=i._canvasOptions,s=i._categoriesToPoints[null==e?void 0:e.valueOf()],r=i.translateSpecialCase(e),l=o.startPointIndex||0,d=i._options.stick?0:.5;if((0,n.isDefined)(r))return a(r);if(!s&&0!==s)return null;const u=s+d-l+.5*(t=t||0);return a(i._calculateProjection(o.interval*u))},getInterval:function(){return this._canvasOptions.interval},getEventScale:function(e){return 1-(1-(e.deltaScale||1))/(.75+this.visibleCategories.length/this._categories.length)},zoom:function(e,t){const i=this,n=i._categories,a=i._canvasOptions,s=i._options.stick,r=a.invert,l=a.interval*t,d=e/l,u=(i.visibleCategories||[]).length;let c=parseInt((a.startPointIndex||0)+d+.5);const h=parseInt((0,o.adjust)(a.canvasLength/l)+(s?1:0))||1;let p;r&&(c=parseInt((a.startPointIndex||0)+u-d+.5)-h),c<0&&(c=0),p=c+h,p>n.length&&(p=n.length,c=p-h,c<0&&(c=0));const g=n.slice(parseInt(c),parseInt(p)),_=i._getDiscreteInterval(g.length,a);return t=_/a.interval,e=i.translate(r?g[g.length-1]:g[0])*t-(a.startPoint+(s?0:_/2)),{min:g[0],max:g[g.length-1],translate:e,scale:t}},getMinScale:function(e){const t=this,i=t._canvasOptions;let n=(t.visibleCategories||t._categories).length;return n+=(parseInt(.1*n)||1)*(e?-2:2),i.canvasLength/(Math.max(n,1)*i.interval)},getScale:function(e,t){const i=this,o=i._canvasOptions,a=i.getCanvasVisibleArea(),s=!i._options.stick&&1;let r=(0,n.isDefined)(e)?i.translate(e,-s):null,l=(0,n.isDefined)(t)?i.translate(t,+s):null;return null===r&&(r=o.invert?a.max:a.min),null===l&&(l=o.invert?a.min:a.max),i.canvasLength/Math.abs(l-r)},isValid:function(e){return!!(0,n.isDefined)(e)&&this._categoriesToPoints[e.valueOf()]>=0},getCorrectValue:s,to:function(e,t){const i=this._canvasOptions,n=this._categoriesToPoints[null==e?void 0:e.valueOf()],o=i.startPointIndex||0,s=n+(this._options.stick?0:.5)-o+(this._businessRange.invert?-1:1)*t*.5;return a(this._calculateProjection(i.interval*s))},from:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=this._canvasOptions,n=i.startPoint,o=this.visibleCategories||this._categories,s=o.length,r=this._options.stick?.5:0;let l=a((e-n)/i.interval+r-.5-.5*t);return l>=s&&(l=s-1),l<0&&(l=0),i.invert&&(l=s-l-1),o[l]},_add:function(){return NaN},toValue:s,isValueProlonged:!0,getRangeByMinZoomValue(e,t){const i=this._categories,n=i.indexOf(t.minVisible)+e-1,o=i.indexOf(t.maxVisible)-e+1;return i[n]?[t.minVisible,i[n]]:[i[o],t.maxVisible]}};e.exports=t.default,e.exports.default=t.default},77296:function(e,t,i){t.default=void 0;var n,o=(n=i(41380))&&n.__esModule?n:{default:n};function a(e){return null!==e?new Date(e):e}t.default={fromValue:a,toValue:a,_add:o.default.addDateInterval,convert:o.default.dateToMilliseconds};e.exports=t.default,e.exports.default=t.default},24136:function(e,t,i){t.default=void 0;var n,o=i(11528),a=(n=i(41380))&&n.__esModule?n:{default:n},s=i(50254);const r=Math.floor;t.default={_intervalize:function(e,t){if((0,o.isDefined)(e))return"datetime"===this._businessRange.dataType?(e=(0,o.isNumeric)(e)?new Date(e):new Date(e.getTime()),e=a.default.correctDateWithUnitBeginning(e,t,null,this._options.firstDayOfWeek)):e=(0,s.adjust)(r((0,s.adjust)(e/t))*t,t),e},translate:function(e,t,i,n){const a=this,s=a.translateSpecialCase(e);return(0,o.isDefined)(s)?Math.round(s):(n=n||a._options.interval,a.isValid(e,n)?a.to(e,t,i,n):null)},getInterval:function(){return Math.round(this._canvasOptions.ratioOfCanvasRange*(this._businessRange.interval||Math.abs(this._canvasOptions.rangeMax-this._canvasOptions.rangeMin)))},zoom:function(){},getMinScale:function(){},getScale:function(){},_parse:function(e){return"datetime"===this._businessRange.dataType?new Date(e):Number(e)},fromValue:function(e){return this._parse(e)},toValue:function(e){return this._parse(e)},isValid:function(e,t){const i=this,n=i._canvasOptions;let s=n.rangeMin,r=n.rangeMax;return t=t||i._options.interval,null!==e&&!isNaN(e)&&(e="datetime"===i._businessRange.dataType&&(0,o.isNumeric)(e)?new Date(e):e,t!==i._options.interval&&(s=i._intervalize(s,t),r=i._intervalize(r,t)),!(e.valueOf()<s||e.valueOf()>=a.default.addInterval(r,t)))},to:function(e,t,i,n){const o=this;n=n||o._options.interval;const s=o._intervalize(e,n),l=a.default.addInterval(s,n);let d=o._to(s,i);const u=o._to(l,i);return t?t>0&&(d=u):d=r((d+u)/2),d},_to:function(e,t){const i=this._canvasOptions,n=i.rangeMinVisible,o=i.rangeMaxVisible;let s=e-n;e<n?s=0:e>o&&(s=a.default.addInterval(o,this._options.interval)-n);const r=this._calculateProjection(s*this._canvasOptions.ratioOfCanvasRange);return this._conversionValue(r,t)},from:function(e,t){const i=this,n=i._options.interval;let o=n;const s=i._canvasOptions,r=s.rangeMinVisible,l=s.rangeMaxVisible;let d;return"datetime"===i._businessRange.dataType&&(o=a.default.dateToMilliseconds(n)),d=i._calculateUnProjection((e-i._canvasOptions.startPoint)/i._canvasOptions.ratioOfCanvasRange),d=i._intervalize(a.default.addInterval(d,o/2,t>0),n),d<r?d=r:d>l&&(d=l),d},_add:function(){return NaN},isValueProlonged:!0};e.exports=t.default,e.exports.default=t.default},19444:function(e,t,i){t.default=void 0;var n=i(28779),o=i(11528);t.default={fromValue:function(e){return null!==e?(0,n.getLogExt)(e,this._canvasOptions.base,this._businessRange.allowNegatives,this._businessRange.linearThreshold):e},toValue:function(e){return null!==e?(0,n.raiseToExt)(e,this._canvasOptions.base,this._businessRange.allowNegatives,this._businessRange.linearThreshold):e},getMinBarSize:function(e){const t=this.getCanvasVisibleArea(),i=this.from(t.min+e),n=this._canvasOptions,o=this.fromValue(this.from(t.min)),a=this.fromValue(i??this.from(t.max)),s=Math.abs(o-a);return Math.pow(n.base,s)},checkMinBarSize:function(e,t,i){const n=this._canvasOptions,a=i?i-e:0,s=this.constructor.prototype.checkMinBarSize;let r,l;return(0,o.isDefined)(t)&&a>0?(r=s(this.fromValue(i/a),this.fromValue(t)-n.rangeMinVisible),l=Math.pow(n.base,this.fromValue(a)+r)-a):l=s(e,t),l}};e.exports=t.default,e.exports.default=t.default},99857:function(e,t,i){t.Range=void 0;var n=i(11528),o=i(52576),a=i(28779);const s=n.isDefined,r=n.isDate,l=n.isFunction,d="min",u="max",c="minVisible",h="maxVisible",p="base",g="axisType";function _(e,t){return t<e}function f(e,t){return t>e}function m(e,t,i,n){const o=s(t);s(e)?o&&n(e,t)&&i(t):o&&i(t)}const v=function(e){e&&(0,o.extend)(this,e)};t.Range=v;const C=v;C.prototype={constructor:C,addRange:function(e){const t=this,i=t.categories,n=e.categories,o="discrete"===t[g],r=function(i,n){m(t[i],e[i],(function(e){t[i]=e}),n)},l=function(e,i,n){m(t[e],t[i],(function(i){s(t[e])&&(t[e]=i)}),n)},v=function(i){t[i]=t[i]||e[i]};return v("invert"),v("containsConstantLine"),v(g),v("dataType"),v("isSpacedMargin"),"logarithmic"===t[g]?v(p):t[p]=void 0,r(d,_),r(u,f),o?(v(c),v(h)):(r(c,_),r(h,f)),r("interval",_),o||(l(d,c,_),l(d,h,_),l(u,h,f),l(u,c,f)),t.categories=void 0===i?n:n?(0,a.unique)(i.concat(n)):i,"logarithmic"===t[g]&&(v("allowNegatives"),r("linearThreshold",_)),t},isEmpty:function(){return!(s(this[d])&&s(this[u])||this.categories&&0!==this.categories.length)},correctValueZeroLevel:function(){const e=this;if(r(e[u])||r(e[d]))return e;function t(t,i){e[t]<0&&e[i]<0&&(e[i]=0),e[t]>0&&e[i]>0&&(e[t]=0)}return t(d,u),t(c,h),e},sortCategories(e){if(!1!==e&&this.categories)if(Array.isArray(e)){const t=e.map((e=>e.valueOf())),i=this.categories.filter((e=>-1===t.indexOf(e.valueOf())));this.categories=e.concat(i)}else{const t=!l(e);t&&"string"!==this.dataType?e=(e,t)=>e.valueOf()-t.valueOf():t&&(e=!1),e&&this.categories.sort(e)}}}},14393:function(e,t){t.Translator1D=n;const i=Number;function n(){this.setDomain(arguments[0],arguments[1]).setCodomain(arguments[2],arguments[3]).setInverted(!1)}n.prototype={constructor:n,setDomain:function(e,t){const n=this;return n._domain1=i(e),n._domain2=i(t),n._domainDelta=n._domain2-n._domain1,n},setCodomain:function(e,t){const n=this;return n._codomain1=i(e),n._codomain2=i(t),n._codomainDelta=n._codomain2-n._codomain1,n},setInverted(e){this.inverted=e},getDomain:function(){return[this._domain1,this._domain2]},getCodomain:function(){return[this._codomain1,this._codomain2]},getDomainStart:function(){return this._domain1},getDomainEnd:function(){return this._domain2},getCodomainStart:function(){return this._codomain1},getCodomainEnd:function(){return this._codomain2},getDomainRange:function(){return this._domainDelta},getCodomainRange:function(){return this._codomainDelta},translate:function(e){let t=(i(e)-this._domain1)/this._domainDelta;return this.inverted&&(t=1-t),0<=t&&t<=1?this._codomain1+t*this._codomainDelta:NaN},adjust:function(e){const t=(i(e)-this._domain1)/this._domainDelta;let n=NaN;return t<0?n=this._domain1:t>1?n=this._domain2:0<=t&&t<=1&&(n=i(e)),n}}},64174:function(e,t,i){t.Translator2D=void 0;var n=i(52576),o=i(21274),a=i(99857),s=g(i(37279)),r=g(i(24136)),l=g(i(77296)),d=g(i(19444)),u=i(28779),c=i(11528),h=i(50254),p=g(i(41380));function g(e){return e&&e.__esModule?e:{default:e}}const _=Math.abs,f=["width","height","left","top","bottom","right"],m={to(e){const t=this._canvasOptions.startPoint+(this._options.conversionValue?e:Math.round(e));return t>this._canvasOptions.endPoint?this._canvasOptions.endPoint:t},from(e){return e-this._canvasOptions.startPoint}},v=function(e){return(0,o.each)(f,(function(t,i){e[i]=parseInt(e[i])||0})),e};function C(e){return{isStartSide:e?function(e,t,i,n){return e<=t[t.length-1][n]}:function(e,t,i,n){return e<t[0][i]},isEndSide:e?function(e,t,i,n){return e>t[0][i]}:function(e,t,i,n){return e>=t[t.length-1][n]},isInBreak:e?function(e,t,i,n){return e>t[n]&&e<=t[i]}:function(e,t,i,n){return e>=t[i]&&e<t[n]},isBetweenBreaks:e?function(e,t,i,n,o){return e>=t[o]&&e<i[n]}:function(e,t,i,n,o){return e<t[n]&&e>=i[o]},getLength:e?function(e,t){return t.length-e.length}:function(e){return e.length},getBreaksSize:e?function(e,t){return t.cumulativeWidth-e.cumulativeWidth}:function(e){return e.cumulativeWidth}}}const y=function(e,t,i){this.update(e,t,i)};t.Translator2D=y,y.prototype={constructor:y,reinit:function(){const e=this,t=e._options,i=e._businessRange,o=i.categories||[];let a={};const c=e._prepareCanvasOptions(),h=(0,u.getCategoriesInfo)(o,i.minVisible,i.maxVisible).categories,g=h.length;if(i.isEmpty())a=m;else switch(i.axisType){case"logarithmic":a=d.default;break;case"semidiscrete":a=r.default,c.ratioOfCanvasRange=c.canvasLength/(p.default.addInterval(c.rangeMaxVisible,t.interval)-c.rangeMinVisible);break;case"discrete":a=s.default,e._categories=o,c.interval=e._getDiscreteInterval(t.addSpiderCategory?g+1:g,c),e._categoriesToPoints=function(e){const t={};return e.forEach((function(e,i){t[e.valueOf()]=i})),t}(o),g&&(c.startPointIndex=e._categoriesToPoints[h[0].valueOf()],e.visibleCategories=h);break;default:"datetime"===i.dataType&&(a=l.default)}(e._oldMethods||[]).forEach((function(t){delete e[t]})),e._oldMethods=Object.keys(a),(0,n.extend)(e,a),e._conversionValue=t.conversionValue?e=>e:(e,t)=>t?e:Math.round(e),e.sc={},e._checkingMethodsAboutBreaks=[C(!1),C(e.isInverted())],e._translateBreaks(),e._calculateSpecialValues()},_translateBreaks:function(){const e=this._breaks,t=this._options.breaksSize;let i,n,o,a;if(void 0!==e)for(i=0,a=e.length;i<a;i++)n=e[i],o=this.translate(n.to),n.end=o,n.start=n.gapSize?o:this.isInverted()?o+t:o-t},_checkValueAboutBreaks:function(e,t,i,n,o){let a,s,r,l,d={length:0,breaksSize:void 0,inBreak:!1};const u=e[e.length-1];if(o.isStartSide(t,e,i,n))return d;if(o.isEndSide(t,e,i,n))return{length:u.length,breaksSize:u.cumulativeWidth,inBreak:!1};for(a=0,s=e.length;a<s;a++){if(r=e[a],l=e[a-1],o.isInBreak(t,r,i,n)){d.inBreak=!0,d.break=r;break}if(l&&o.isBetweenBreaks(t,r,l,i,n)){d={length:o.getLength(l,u),breaksSize:o.getBreaksSize(l,u),inBreak:!1};break}}return d},isInverted:function(){return!(this._options.isHorizontal^this._businessRange.invert)},_getDiscreteInterval:function(e,t){const i=e-(this._options.stick?1:0);return i>0?t.canvasLength/i:t.canvasLength},_prepareCanvasOptions(){const e=this,t=e._businessRange,i=e._canvasOptions=function(e){let t=e.min,i=e.max,n=e.minVisible,o=e.maxVisible;return"logarithmic"===e.axisType&&(o=(0,u.getLogExt)(o,e.base,e.allowNegatives,e.linearThreshold),n=(0,u.getLogExt)(n,e.base,e.allowNegatives,e.linearThreshold),t=(0,u.getLogExt)(t,e.base,e.allowNegatives,e.linearThreshold),i=(0,u.getLogExt)(i,e.base,e.allowNegatives,e.linearThreshold)),{base:e.base,rangeMin:t,rangeMax:i,rangeMinVisible:n,rangeMaxVisible:o}}(t),n=e._canvas,o=e._breaks;let a;if(i.startPadding=n.startPadding||0,i.endPadding=n.endPadding||0,e._options.isHorizontal?(i.startPoint=n.left+i.startPadding,a=n.width,i.endPoint=n.width-n.right-i.endPadding,i.invert=t.invert):(i.startPoint=n.top+i.startPadding,a=n.height,i.endPoint=n.height-n.bottom-i.endPadding,i.invert=!t.invert),e.canvasLength=i.canvasLength=i.endPoint-i.startPoint,i.rangeDoubleError=Math.pow(10,(0,u.getPower)(i.rangeMax-i.rangeMin)-(0,u.getPower)(a)-2),i.ratioOfCanvasRange=i.canvasLength/(i.rangeMaxVisible-i.rangeMinVisible),void 0!==o){const e=i.rangeMaxVisible-i.rangeMinVisible-o[o.length-1].length;0!==e&&(i.ratioOfCanvasRange=(i.canvasLength-o[o.length-1].cumulativeWidth)/e)}return i},updateCanvas:function(e){this._canvas=v(e),this.reinit()},updateBusinessRange:function(e){const t=this,i=e.breaks||[];t._userBreaks=e.userBreaks||[],t._businessRange=function(e){function t(t,i){!(0,c.isDefined)(e[t])&&(0,c.isDefined)(e[i])&&(e[t]=e[i])}return e instanceof a.Range||(e=new a.Range(e)),t("minVisible","min"),t("maxVisible","max"),e}(e),t._breaks=i.length?function(e,t){const i="logarithmic"===t.axisType?function(e){return(0,u.getLogExt)(e,t.base)}:function(e){return e},n=[];let o,a,s,r;const l=e.length;let d=0;for(r=0;r<l;r++)o=e[r],a=i(o.from),s=i(o.to),d+=s-a,n.push({trFrom:a,trTo:s,from:o.from,to:o.to,length:d,cumulativeWidth:o.cumulativeWidth});return n}(i,t._businessRange):void 0,t.reinit()},update:function(e,t,i){const o=this;o._options=(0,n.extend)(o._options||{},i),o._canvas=v(t),o.updateBusinessRange(e)},getBusinessRange:function(){return this._businessRange},getEventScale:function(e){return e.deltaScale||1},getCanvasVisibleArea:function(){return{min:this._canvasOptions.startPoint,max:this._canvasOptions.endPoint}},_calculateSpecialValues:function(){const e=this,t=e._canvasOptions,i=t.startPoint-t.startPadding,n=t.endPoint+t.endPadding,o=e._businessRange,a=o.minVisible,s=o.maxVisible,r=i+t.canvasLength/2;let l;if(a<0&&s>0&&a!==s&&(l=e.translate(0,1)),!(0,c.isDefined)(l)){const t=o.invert^(a<0&&s<=0);l=e._options.isHorizontal?t?n:i:t?i:n}e.sc={canvas_position_default:l,canvas_position_left:i,canvas_position_top:i,canvas_position_center:r,canvas_position_middle:r,canvas_position_right:n,canvas_position_bottom:n,canvas_position_start:t.invert?n:i,canvas_position_end:t.invert?i:n}},translateSpecialCase(e){return this.sc[e]},_calculateProjection:function(e){const t=this._canvasOptions;return t.invert?t.endPoint-e:t.startPoint+e},_calculateUnProjection:function(e){const t=this._canvasOptions;return"datetime"===this._businessRange.dataType&&(e=Math.round(e)),t.invert?t.rangeMaxVisible.valueOf()-e:t.rangeMinVisible.valueOf()+e},getMinBarSize:function(e){const t=this.getCanvasVisibleArea(),i=this.from(t.min+e);return _(this.from(t.min)-((0,c.isDefined)(i)?i:this.from(t.max)))},checkMinBarSize:function(e,t){return _(e)<t?e>=0?t:-t:e},translate(e,t,i){const n=this.translateSpecialCase(e);return(0,c.isDefined)(n)?Math.round(n):isNaN(e)?null:this.to(e,t,i)},getInterval:function(e){const t=this._canvasOptions;return(e=e??this._businessRange.interval)?Math.round(t.ratioOfCanvasRange*e):Math.round(t.endPoint-t.startPoint)},zoom(e,t,i){const n=this._canvasOptions;if(n.rangeMinVisible.valueOf()===n.rangeMaxVisible.valueOf()&&0!==e)return this.zoomZeroLengthRange(e,t);const o=n.startPoint,a=n.endPoint,s=this.isInverted();let r=(o+e)/t,l=(a+e)/t;i=i||{};const d=this.to(s?i.endValue:i.startValue),u=this.to(s?i.startValue:i.endValue);let p,g;return d>r&&(l-=r-d,r=d,p=s?i.endValue:i.startValue),u<l&&(r-=l-u,l=u,g=s?i.startValue:i.endValue),u-d<l-r&&(r=d,l=u),t=(o+(e=(a-o)*r/(l-r)-o))/r||1,p=(0,c.isDefined)(p)?p:(0,h.adjust)(this.from(r,1)),g=(0,c.isDefined)(g)?g:(0,h.adjust)(this.from(l,-1)),t<=1&&(p=this._correctValueAboutBreaks(p,1===t?e:-1),g=this._correctValueAboutBreaks(g,1===t?e:1)),p>g?(p=p>i.endValue?i.endValue:p,g=g<i.startValue?i.startValue:g):(p=p<i.startValue?i.startValue:p,g=g>i.endValue?i.endValue:g),{min:p,max:g,translate:(0,h.adjust)(e),scale:(0,h.adjust)(t)}},_correctValueAboutBreaks(e,t){const i=this._userBreaks.filter((t=>e>=t.from&&e<=t.to));return i.length?t>0?i[0].to:i[0].from:e},zoomZeroLengthRange(e,t){const i=this._canvasOptions,n=i.rangeMin,o=i.rangeMax,a=(o.valueOf()!==n.valueOf()?o.valueOf()-n.valueOf():_(i.rangeMinVisible.valueOf()-n.valueOf()))/i.canvasLength,s=(0,c.isDate)(o)||(0,c.isDate)(n),r="logarithmic"===this._businessRange.axisType;let l=i.rangeMinVisible.valueOf()-a,d=i.rangeMaxVisible.valueOf()+a;return l=r?(0,h.adjust)((0,u.raiseToExt)(l,i.base)):s?new Date(l):l,d=r?(0,h.adjust)((0,u.raiseToExt)(d,i.base)):s?new Date(d):d,{min:l,max:d,translate:e,scale:t}},getMinScale:function(e){const{dataType:t,interval:i}=this._businessRange;return"datetime"===t&&1===i?this.getDateTimeMinScale(e):e?1.1:.9},getDateTimeMinScale(e){const t=this._canvasOptions;let i=t.canvasLength/t.ratioOfCanvasRange;return i+=(parseInt(.1*i)||1)*(e?-2:2),t.canvasLength/(Math.max(i,1)*t.ratioOfCanvasRange)},getScale:function(e,t){const i=this._canvasOptions;return i.rangeMax===i.rangeMin?1:(e=(0,c.isDefined)(e)?this.fromValue(e):i.rangeMin,t=(0,c.isDefined)(t)?this.fromValue(t):i.rangeMax,(i.rangeMax-i.rangeMin)/Math.abs(e-t))},isValid:function(e){const t=this._canvasOptions;return null!==(e=this.fromValue(e))&&!isNaN(e)&&e.valueOf()+t.rangeDoubleError>=t.rangeMin&&e.valueOf()-t.rangeDoubleError<=t.rangeMax},getCorrectValue:function(e,t){const i=this,n=i._breaks;let o;return e=i.fromValue(e),i._breaks&&(o=i._checkValueAboutBreaks(n,e,"trFrom","trTo",i._checkingMethodsAboutBreaks[0]),!0===o.inBreak)?i.toValue(t>0?o.break.trTo:o.break.trFrom):i.toValue(e)},to:function(e,t,i){const n=this.getBusinessRange();if((0,c.isDefined)(n.maxVisible)&&(0,c.isDefined)(n.minVisible)&&n.maxVisible.valueOf()===n.minVisible.valueOf())return(0,c.isDefined)(e)&&n.maxVisible.valueOf()===e.valueOf()?this.translateSpecialCase(0===e&&this._options.shiftZeroValue?"canvas_position_default":"canvas_position_middle"):null;e=this.fromValue(e);const o=this,a=o._canvasOptions,s=o._breaks;let r={length:0},l=0;return void 0!==s&&(r=o._checkValueAboutBreaks(s,e,"trFrom","trTo",o._checkingMethodsAboutBreaks[0]),l=(0,c.isDefined)(r.breaksSize)?r.breaksSize:0),!0===r.inBreak?t>0?r.break.start:t<0?r.break.end:null:o._conversionValue(o._calculateProjection((e-a.rangeMinVisible-r.length)*a.ratioOfCanvasRange+l),i)},from:function(e,t){const i=this,n=i._breaks;let o={length:0};const a=i._canvasOptions,s=a.startPoint;let r=0;return void 0!==n&&(o=i._checkValueAboutBreaks(n,e,"start","end",i._checkingMethodsAboutBreaks[1]),r=(0,c.isDefined)(o.breaksSize)?o.breaksSize:0),!0===o.inBreak?t>0?i.toValue(o.break.trTo):t<0?i.toValue(o.break.trFrom):null:i.toValue(i._calculateUnProjection((e-s-r)/a.ratioOfCanvasRange+o.length))},isValueProlonged:!1,getRange:function(){return[this.toValue(this._canvasOptions.rangeMin),this.toValue(this._canvasOptions.rangeMax)]},getScreenRange:function(){return[this._canvasOptions.startPoint,this._canvasOptions.endPoint]},add:function(e,t,i){return this._add(e,t,(this._businessRange.invert?-1:1)*i)},_add:function(e,t,i){return this.toValue(this.fromValue(e)+t*i)},fromValue:function(e){return null!==e?Number(e):null},toValue:function(e){return null!==e?Number(e):null},ratioOfCanvasRange(){return this._canvasOptions.ratioOfCanvasRange},convert:e=>e,getRangeByMinZoomValue(e,t){return t.minVisible+e<=this._businessRange.max?[t.minVisible,t.minVisible+e]:[t.maxVisible-e,t.maxVisible]}}},61015:function(e,t,i){t.default=void 0;var n,o=(n=i(96191))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},81708:function(e,t,i){var n=r(i(91628)),o=r(i(14206)),a=i(52576),s=i(17781);function r(e){return e&&e.__esModule?e:{default:e}}const l=n.default.prototype,d=o.default.prototype;function u(e,t){const i=e.ctx;i.suspend(),i.change(t),i.resume()}function c(e,t){const i=e.nodes;let n;const o=i&&i.length;for(n=0;n<o;++n)t.push(i[n].proxy),c(i[n],t)}l._eventsMap.onNodesInitialized={name:"nodesInitialized"},l._eventsMap.onNodesRendering={name:"nodesRendering"},l._createProxyType=function(){const e=this;let t;function i(e){const t=this;e.proxy=t,t._id=e._id,t.level=e.level,t.index=e.index,t.data=e.data}i.prototype={constructor:i,getParent:function(){return t[this._id].parent.proxy||null},getChild:function(e){const i=t[this._id].nodes;return i?i[e].proxy:null},getChildrenCount:function(){const e=t[this._id].nodes;return e?e.length:0},getAllChildren:function(){const e=t[this._id].nodes;let i;const n=e&&e.length,o=[];for(i=0;i<n;++i)o.push(e[i].proxy);return o},getAllNodes:function(){const e=[];return c(t[this._id],e),e},isLeaf:function(){return!t[this._id].isNode()},isActive:function(){return t[this._id].isActive()},value:function(e){const i=t[this._id];let n;return void 0!==e?(!function(e,t){const i=t-e.value;for(;e;)e.value+=i,e=e.parent}(i,e>0?Number(e):0),u(i,["TILING"]),n=this):n=i.value,n},label:function(e){const i=t[this._id];let n;return void 0!==e?(i.customLabel=e?String(e):null,u(i,["LABELS"]),n=this):n=i.customLabel||i.label,n},customize:function(e){const i=t[this._id];return e&&(i._custom=i._custom||{},(0,a.extend)(!0,i._custom,e),i._partialState=i._partialLabelState=null),u(i,["TILES","LABELS"]),this},resetCustomization:function(){const e=t[this._id];return e._custom=e._partialState=e._partialLabelState=null,u(e,["TILES","LABELS"]),this}},e._extendProxyType(i.prototype),e._handlers.beginBuildNodes=function(){t=e._nodes,new i(e._root)},e._handlers.buildNode=function(e){new i(e)},e._handlers.endBuildNodes=function(){e._eventTrigger("nodesInitialized",{root:e._root.proxy})}},l._extendProxyType=s.noop;const h=l._resetNodes;l._resetNodes=function(){h.call(this),this._eventTrigger("nodesRendering",{node:this._topNode.proxy})};const p=d.updateStyles;d.updateStyles=function(){const e=this;p.call(e),e._custom&&(e._partialState=!e.ctx.forceReset&&e._partialState||e.ctx.calculateState(e._custom),(0,a.extend)(!0,e.state,e._partialState))};const g=d.updateLabelStyle;d.updateLabelStyle=function(){const e=this,t=e._custom;g.call(e),t&&t.label&&(e._partialLabelState=!e.ctx.forceReset&&e._partialLabelState||function(e,t){const i=e.ctx.calculateLabelState(t);"visible"in t&&(i.visible=!!t.visible);return i}(e,t.label),e.labelState=(0,a.extend)(!0,{},e.labelState,e._partialLabelState))},l.getRootNode=function(){return this._root.proxy},l.resetNodes=function(){const e=this._context;return e.suspend(),e.change(["NODES_CREATE"]),e.resume(),this}},53505:function(e,t,i){function n(e,t,i){const n=t.createPalette(e.palette,{useHighlight:!0,extensionMode:e.paletteExtensionMode,count:e.colorizeGroups?s(i):o(i)});return(e.colorizeGroups?r:a)(n,i)}function o(e){const t=e.nodes.slice();let i;const n=t.length;let a,s=0;for(i=0;i<n;++i)a=t[i],a.isNode()?s=Math.max(s,o(a)):s+=1;return s}function a(e){const t=e.generateColors();return function(e){return t[e.index]}}function s(e){const t=e.nodes.slice();let i;const n=t.length;let o,a=0;for(i=0;i<n;++i)o=t[i],o.isNode()&&(a+=s(o)+1);return a}function r(e,t){const i=function(e,t){const i={};let n,o,a=t.nodes.slice(),s=a.length;for(n=0;n<s;++n)o=a[n],o.isNode()?(a=a.concat(o.nodes),s=a.length):i[o.parent._id]||(i[o.parent._id]=e.getNextColor());return i}(e,t);return function(e){return i[e._id]}}t.default=void 0,(0,i(6134).addColorizer)("discrete",n);t.default=n;e.exports=t.default,e.exports.default=t.default},18202:function(e,t,i){t.default=void 0;var n=i(6134);const o=Math.min,a=Math.max;function s(e){return[Number(e[0])||0,e[1]-e[0]||1]}function r(e,t){const i={};return function(n){const r=n.parent;return e(n,i[r._id]||(i[r._id]=function(e,t){let i;const n=e.length,r=[];let l;for(i=0;i<n;++i)l=t(e[i]),isFinite(l)&&r.push(l);return s([o.apply(null,r),a.apply(null,r)])}(r.nodes,t)))}}function l(e,t){const i=t.createGradientPalette(e.palette),o=(0,n.createColorCodeGetter)(e);return"range"in e?function(e,t){return function(i){return e(i,t)}}(a,s(e.range||[])):r(a,o);function a(e,t){return i.getColor((o(e)-t[0])/t[1])}}(0,n.addColorizer)("gradient",l);t.default=l;e.exports=t.default,e.exports.default=t.default},6134:function(e,t,i){t.addColorizer=function(e,t){a[e]=t},t.createColorCodeGetter=function(e){return e.colorCodeField?(t=e.colorCodeField,function(e){return Number(e.data[t])}):d;var t},t.getColorizer=function(e,t,i){const d=(0,n.normalizeEnum)(e.type||s),u=a[d]&&a[d](e,t,i);return u?(e.colorizeGroups?l:r)(u):o.noop},t.setDefaultColorizer=function(e){s=e};var n=i(28779),o=i(17781);const a={};let s;function r(e){return function(t){return t.isNode()?void 0:e(t)}}function l(e){return function(t){const i=!t.isNode()&&t.parent;return i?i._groupColor=i._groupColor||e(i):void 0}}function d(e){return e.value}},70185:function(e,t,i){t.default=void 0;var n=i(6134);function o(e,t){const i=e.range||[],o=t.createDiscretePalette(e.palette,i.length-1),a=(0,n.createColorCodeGetter)(e);return function(e){return o.getColor(function(e,t){let i,n=0,o=t.length-1,a=-1;if(t[n]<=e&&e<=t[o])if(e===t[o])a=o-1;else{for(;o-n>1;)i=n+o>>1,e<t[i]?o=i:n=i;a=n}return a}(a(e),i))}}(0,n.addColorizer)("range",o);t.default=o;e.exports=t.default,e.exports.default=t.default},30211:function(e,t,i){t.buildRectAppearance=function(e){const t=e.border||{};return{fill:e.color,opacity:e.opacity,stroke:t.color,"stroke-width":t.width,"stroke-opacity":t.opacity,hatching:e.hatching}},t.buildTextAppearance=function(e,t){return{attr:{filter:t},css:(0,n.patchFontOptions)(e.font)}};var n=i(28779)},74721:function(e,t,i){var n,o=(n=i(91628))&&n.__esModule?n:{default:n},a=i(71115);i(81708);const s=o.default.prototype;s._eventsMap.onDrill={name:"drill"},(0,a.expand)(s,"_extendProxyType",(function(e){const t=this;e.drillDown=function(){t._drillToNode(this._id)}})),(0,a.expand)(s,"_onNodesCreated",(function(){this._drilldownIndex=-1})),s._drillToNode=function(e){const t=this;let i;t._drilldownIndex!==e&&(i=t._nodes[e]||t._root,i.nodes&&(t._drilldownIndex=e,t._topNode=i,t._context.suspend(),t._context.change(["MAX_DEPTH","NODES_RESET"]),t._context.resume(),t._eventTrigger("drill",{node:i.proxy})))},s.resetDrillDown=function(){return this._drillToNode(-1),this},s.drillUp=function(){return this._drillToNode(this._topNode.parent._id||-1),this},s.getCurrentNode=function(){return this._topNode.proxy}},49774:function(e,t,i){var n=l(i(91628)),o=l(i(14206)),a=i(71115),s=i(30211),r=i(28779);function l(e){return e&&e.__esModule?e:{default:e}}i(81708),i(11140);const d=n.default.prototype,u=o.default.prototype;function c(e,t,i){const n=e.isNode()&&e.nodes;let o;const a=n&&n.length;for(e.setState(t,i),o=0;o<a;++o)c(n[o],t,i)}d._eventsMap.onHoverChanged={name:"hoverChanged"},(0,a.expand)(d._handlers,"calculateAdditionalStates",(function(e,t){e[1]=t.hoverStyle?(0,s.buildRectAppearance)(t.hoverStyle):{}})),n.default.addChange({code:"HOVER_ENABLED",handler:function(){const e=(0,r.parseScalar)(this._getOption("hoverEnabled",!0),!0);e||this.clearHover(),this._hoverEnabled=e},isThemeDependent:!0,isOptionChange:!0,option:"hoverEnabled"}),u.statesMap[1]=1,u.additionalStates.push(1),(0,a.expand)(d,"_extendProxyType",(function(e){const t=this;e.setHover=function(){t._hoverNode(this._id)},e.isHovered=function(){return t._hoverIndex===this._id}})),(0,a.expand)(d,"_onNodesCreated",(function(){this._hoverIndex=-1})),(0,a.expand)(d,"_changeGroupSettings",(function(){const e=this;e._groupHoverEnabled=(0,r.parseScalar)(e._getOption("group").hoverEnabled,!0),e._groupHoverEnabled||e.clearHover()})),d._applyHoverState=function(e,t){c(this._nodes[e],1,t),this._eventTrigger("hoverChanged",{node:this._nodes[e].proxy})},d._hoverNode=function(e){const t=this,i=t._hoverIndex;if(t._hoverEnabled&&i!==e){if(!t._groupHoverEnabled&&e>=0&&t._nodes[e].isNode())return void t.clearHover();t._context.suspend(),t._hoverIndex=-1,i>=0&&t._applyHoverState(i,!1),t._hoverIndex=e,e>=0&&t._applyHoverState(e,!0),t._context.resume()}},d.clearHover=function(){this._hoverNode(-1)}},14206:function(e,t,i){t.default=void 0;var n=i(52576);function o(){}const a=[function(e,t){e.smartAttr(t)},function(e,t){e.outer.attr({stroke:t.stroke,"stroke-width":t["stroke-width"],"stroke-opacity":t["stroke-opacity"]}),e.inner.smartAttr({fill:t.fill,opacity:t.opacity,hatching:t.hatching})}];(0,n.extend)(o.prototype,{value:0,isNode:function(){return!!(this.nodes&&this.level<this.ctx.maxLevel)},isActive:function(){const e=this.ctx;return this.level>=e.minLevel&&this.level<=e.maxLevel},updateStyles:function(){const e=this,t=Number(e.isNode());e.state=e._buildState(e.ctx.settings[t].state,!t&&e.color&&{fill:e.color})},_buildState:function(e,t){const i=(0,n.extend)({},e);return t?(0,n.extend)(i,t):i},updateLabelStyle:function(){const e=this.ctx.settings[Number(this.isNode())];this.labelState=e.labelState,this.labelParams=e.labelParams},_getState:function(){return this.state},applyState:function(){a[Number(this.isNode())](this.tile,this._getState())}});t.default=o;e.exports=t.default,e.exports.default=t.default},34239:function(e,t,i){var n;const o=((n=i(91628))&&n.__esModule?n:{default:n}).default.prototype;function a(e,t){let i,n;const o=e.struct;let s;for(n=0;n<t.length;n++)i=t[n],s=i[e.idField],o[s]&&(i.items=o[s].items,o[s]=null,a(e,i.items))}o._optionChangesMap.idField=o._optionChangesMap.parentField="NODES_CREATE",o._processDataSourceItems=function(e){let t;const i={};let n;const o=this._getOption("idField",!0),s=this._getOption("parentField",!0);let r;const l=[];let d,u;if(!o||!s||0===e.length)return{items:e,isPlain:!1};for(t=0;t<e.length;t++)n=e[t],r=n[s],r?(i[r]=i[r]||{items:[]},d=i[r].items):d=l,d.push(n);for(u in a({struct:i,idField:o},l),i)i[u]&&l.push(i[u]);return{items:l,isPlain:!0}}},98350:function(e,t,i){var n=l(i(91628)),o=l(i(14206)),a=i(71115),s=i(30211),r=i(28779);function l(e){return e&&e.__esModule?e:{default:e}}i(81708),i(11140);const d=n.default.prototype,u=o.default.prototype;d._eventsMap.onSelectionChanged={name:"selectionChanged"},(0,a.expand)(d._handlers,"calculateAdditionalStates",(function(e,t){e[2]=t.selectionStyle?(0,s.buildRectAppearance)(t.selectionStyle):{}})),u.statesMap[2]=u.statesMap[3]=2,u.additionalStates.push(2),(0,a.expand)(d,"_onNodesCreated",(function(){this._selectionList.length=0})),(0,a.expand)(d,"_extendProxyType",(function(e){const t=this;e.select=function(e){t._selectNode(this._id,!!e)},e.isSelected=function(){return t._selectionList.includes(this._id)},t._selectionList=[]})),n.default.addChange({code:"SELECTION_MODE",handler:function(){const e=this,t=(0,r.normalizeEnum)(e._getOption("selectionMode",!0)),i=e._selectionList;let n;const o="none"===t?0:"multiple"===t?2:1;1===o&&i.length>1?(n=i.pop(),e.clearSelection(),i.push(n)):0===o&&e.clearSelection(),e._selectionMode=o},isThemeDependent:!0,isOptionChange:!0,option:"selectionMode"}),(0,a.expand)(d,"_applyTilesAppearance",(function(){this._selectionList.length&&function(e,t){let i;const n=t.length;let o;for(i=0;i<n;++i)o=e[t[i]],c[Number(o.isNode())](o.tile)}(this._nodes,this._selectionList)}));const c=[function(e){e.toForeground()},function(e){e.outer.toForeground(),e.inner.toForeground()}];d._applySelectionState=function(e,t){const i=this._nodes[e];i.setState(2,t),this._eventTrigger("selectionChanged",{node:i.proxy})},d._selectNode=function(e,t){const i=this;let n,o,a;0!==i._selectionMode&&(i._context.suspend(),n=i._selectionList,o=n.indexOf(e),t&&-1===o?(1===i._selectionMode&&n.length&&(a=n.pop(),i._applySelectionState(a,!1)),n.push(e),i._applySelectionState(e,!0)):!t&&o>=0&&(n.splice(o,1),i._applySelectionState(e,!1)),i._context.resume())},d.clearSelection=function(){const e=this,t=e._selectionList;let i;const n=t.length;if(0!==e._selectionMode){for(e._context.suspend(),i=0;i<n;++i)e._applySelectionState(t[i],!1);t.length=0,e._context.resume()}}},11140:function(e,t,i){var n=r(i(91628)),o=r(i(14206)),a=i(17781),s=i(52576);function r(e){return e&&e.__esModule?e:{default:e}}const l=n.default.prototype,d=o.default.prototype,u=l._handlers,c=u.calculateState,h=d._buildState;u.calculateState=function(e){const t={0:c(e)};return u.calculateAdditionalStates(t,e),t},u.calculateAdditionalStates=a.noop,d.code=0,d.statesMap={0:0},d.additionalStates=[],d._buildState=function(e,t){const i={0:h(e[0],t)};return this.additionalStates.length&&function(e,t,i,n){let o;const a=n.length;for(o=0;o<a;++o)e[n[o]]=(0,s.extend)({},t,i[n[o]])}(i,i[0],e,this.additionalStates),i},d._getState=function(){return this.state[this.statesMap[this.code]]},d.setState=function(e,t){t?this.code|=e:this.code&=~e,this.ctx.change(["TILES"])}},17485:function(e,t,i){t.addAlgorithm=function(e,t){s[e]=t},t.buildSidesData=function(e,t,i){const n=void 0!==i?i:d(e),o=1-n,a=t[n],s=t[o],r=l[a],u=l[s];return{staticSide:e[2+n]-e[n],variedSide:e[2+o]-e[o],static1:n+r[0],static2:n+r[1],varied1:o+u[0],varied2:o+u[1],staticDir:a,variedDir:s}},t.calculateRectangles=function(e,t,i,n,o){let s,r;const l=[0,0,0,0],d=n.static1,u=n.static2;let c=i[d];const h=n.staticDir;let p,g,_=n.staticSide,f=o.sum;for(l[n.varied1]=i[n.varied1],l[n.varied2]=i[n.varied1]+n.variedDir*o.side,s=t,r=t+o.count;s<r;++s)p=l.slice(),p[d]=c,g=a(_*e[s].value/f)||0,f-=e[s].value,_-=g,c+=h*g,p[u]=c,e[s].rect=p;i[n.varied1]=l[n.varied2]},t.getAlgorithm=function(e){return s[(0,o.normalizeEnum)(e)]||(0,n.isFunction)(e)&&e||r},t.getStaticSideIndex=void 0,t.setDefaultAlgorithm=function(e){r=s[e]};var n=i(11528),o=i(28779);const a=Math.round,s={};let r;const l={"-1":[2,0],1:[0,2]},d=function(e){return e[2]-e[0]<e[3]-e[1]?0:1};t.getStaticSideIndex=d},10115:function(e,t,i){var n=i(17485);const o=(0,n.getAlgorithm)("sliceanddice");(0,n.addAlgorithm)("rotatedsliceanddice",(function(e){return e.isRotated=!e.isRotated,o.call(this,e)}))},94813:function(e,t,i){t.default=void 0;var n=i(17485);function o(e){const t=e.items,i=(0,n.buildSidesData)(e.rect,e.directions,e.isRotated?1:0);(0,n.calculateRectangles)(t,0,e.rect,i,{sum:e.sum,count:t.length,side:i.variedSide})}(0,n.addAlgorithm)("sliceanddice",o);t.default=o;e.exports=t.default,e.exports.default=t.default},69657:function(e,t,i){t.default=function(e,t,i){const o=e.items,a=o.length;let l;const d={sum:e.sum,rect:e.rect,directions:e.directions,accumulate:t};i&&(d.staticSideIndex=(0,n.getStaticSideIndex)(d.rect));for(o.sort(s),l=0;l<a;)l=r(o,l,d)};var n=i(17485);const o=Math.max,a=Math.round;function s(e,t){return t.value-e.value}function r(e,t,i){const s=(0,n.buildSidesData)(i.rect,i.directions,i.staticSideIndex),r=((l=i.rect)[2]-l[0])*(l[3]-l[1]);var l;const d=r>0?function(e,t,i){let n,s,r,l,d=1/0,u=0;const c=e.length,h=i.areaToValue/i.staticSide;let p;for(r=t;r<c;){for(s=u+e[r].value,p=i.staticSide/h/s,n=0,l=t;l<=r;++l)n=i.accumulate(n,(g=p*e[l].value/s,o(g,1/g)),l-t+1);if(!(n<d))break;d=n,u=s,++r}var g;return{sum:u,count:r-t,side:a(h*u)}}(e,t,{areaToValue:r/i.sum,accumulate:i.accumulate,staticSide:s.staticSide}):{sum:1,side:s.variedSide,count:e.length-t};return(0,n.calculateRectangles)(e,t,i.rect,s,d),i.sum-=d.sum,t+d.count}e.exports=t.default,e.exports.default=t.default},93268:function(e,t,i){t.default=void 0;var n,o=(n=i(69657))&&n.__esModule?n:{default:n},a=i(17485);const s=Math.max;function r(e,t){return s(e,t)}function l(e){return(0,o.default)(e,r,!1)}(0,a.addAlgorithm)("squarified",l);t.default=l;e.exports=t.default,e.exports.default=t.default},2085:function(e,t,i){t.default=void 0;var n,o=(n=i(69657))&&n.__esModule?n:{default:n};function a(e,t,i){return((i-1)*e+t)/i}function s(e){return(0,o.default)(e,a,!0)}(0,i(17485).addAlgorithm)("strip",s);t.default=s;e.exports=t.default,e.exports.default=t.default},60207:function(e,t,i){var n,o=i(71115),a=(n=i(91628))&&n.__esModule?n:{default:n};i(81708);var s=i(23277);const r=a.default.prototype;function l(e,t,i){const n=i.getRootOffset();return e||t&&[(t[0]+t[2])/2+n.left,(t[1]+t[3])/2+n.top]||[-1e3,-1e3]}(0,o.expand)(r,"_extendProxyType",(function(e){const t=this;e.showTooltip=function(e){t._showTooltip(this._id,e)}})),(0,o.expand)(r,"_onNodesCreated",(function(){this._tooltipIndex>=0&&this._tooltip.hide(),this._tooltipIndex=-1})),(0,o.expand)(r,"_onTilingPerformed",(function(){this._tooltipIndex>=0&&this._moveTooltip(this._nodes[this._tooltipIndex])})),r._showTooltip=function(e,t){const i=this,n=i._tooltip,o=i._nodes[e];if(i._tooltipIndex===e)return void i._moveTooltip(o,t);const a=t=>{void 0!==t&&(t||n.hide(),i._tooltipIndex=t?e:-1)},s=l(t,o.rect,this._renderer);a(n.show({value:o.value,valueText:n.formatValue(o.value),node:o.proxy},{x:s[0],y:s[1],offset:0},{node:o.proxy},void 0,a))},r._moveTooltip=function(e,t){const i=l(t,e.rect,this._renderer);this._tooltip.move(i[0],i[1],0)},r.hideTooltip=function(){this._tooltipIndex>=0&&(this._tooltipIndex=-1,this._tooltip.hide())},a.default.addPlugin(s.plugin)},74408:function(e,t,i){var n,o=(n=i(91628))&&n.__esModule?n:{default:n},a=i(16197),s=i(71115),r=i(28779);i(81708),i(49774),i(60207);let l=0;const d=o.default.prototype;d._eventsMap.onClick={name:"click"};(0,s.expand)(d,"_initCore",(function(){const e=this,t="__treemap_data_"+l++,i=function(t){return e._nodes[t].proxy};e._tracker=new a.Tracker({widget:e,root:e._renderer.root,getNode:function(t){const n=i(t);return(0,r.parseScalar)(e._getOption("interactWithGroup",!0))&&n.isLeaf()&&n.getParent().isActive()?n.getParent():n},getData:function(e){const i=e.target;return("tspan"===i.tagName?i.parentNode:i)[t]},getProxy:i,click:function(t){e._eventTrigger("click",t)}}),e._handlers.setTrackerData=function(e,i){i.data(t,e._id)}})),(0,s.expand)(d,"_disposeCore",(function(){this._tracker.dispose()}))},91628:function(e,t,i){t.default=void 0;var n=i(30211),o=h(i(14206)),a=i(17485),s=i(6134),r=i(28779),l=i(17781),d=h(i(34506));i(93268),i(53505);var u=h(i(92848)),c=i(25058);function h(e){return e&&e.__esModule?e:{default:e}}const p=Math.max,g={lefttoprightbottom:[1,1],leftbottomrighttop:[1,-1],righttopleftbottom:[-1,1],rightbottomlefttop:[-1,-1]};function _(e){return e>0?Math.round(e):0}(0,a.setDefaultAlgorithm)("squarified"),(0,s.setDefaultColorizer)("discrete");const f=d.default.inherit({_handlers:{beginBuildNodes:l.noop,buildNode:l.noop,endBuildNodes:l.noop,setTrackerData:l.noop,calculateState:function(e){return(0,n.buildRectAppearance)(e)}},_rootClass:"dxtm-tree-map",_rootClassPrefix:"dxtm",_getDefaultSize:function(){return{width:400,height:400}},_themeSection:"treeMap",_fontFields:["tile.label.font","group.label.font"],_init:function(){const e=this;e._rectOffsets={},e._handlers=Object.create(e._handlers),e._context={suspend:function(){e._applyingChanges||e._suspendChanges()},resume:function(){e._applyingChanges||e._resumeChanges()},change:function(t){e._change(t)},settings:[{},{}],calculateState:e._handlers.calculateState,calculateLabelState:n.buildTextAppearance},e._root=e._topNode={nodes:[]},e.callBase.apply(e,arguments)},_initialChanges:["DATA_SOURCE"],_initCore:function(){const e=this,t=e._renderer;e._createProxyType(),e._tilesGroup=t.g().linkOn(t.root,"tiles").linkAppend(),e._labelsGroup=t.g().linkOn(t.root,"labels").linkAppend()},_createProxyType:l.noop,_disposeCore:function(){const e=this;e._filter&&e._filter.dispose(),e._labelsGroup.linkOff(),e._tilesGroup.linkOff()},_applySize:function(e){this._tilingRect=e.slice(),this._change(["TILING"])},_optionChangesMap:{dataSource:"DATA_SOURCE",valueField:"NODES_CREATE",childrenField:"NODES_CREATE",colorField:"TILES",colorizer:"TILES",labelField:"LABELS",tile:"TILE_SETTINGS",group:"GROUP_SETTINGS",maxDepth:"MAX_DEPTH",layoutAlgorithm:"TILING",layoutDirection:"TILING"},_themeDependentChanges:["TILE_SETTINGS","GROUP_SETTINGS","MAX_DEPTH"],_changeDataSource:function(){const e=this;e._isDataExpected=e._isSyncData=!0,e._updateDataSource(),e._isSyncData=!1,e._isDataExpected&&e._suspendChanges()},_dataSourceChangedHandler:function(){const e=this;e._isDataExpected?(e._isDataExpected=!1,e._change(["NODES_CREATE"]),e._isSyncData||e._resumeChanges()):e._requestChange(["NODES_CREATE"])},_optionChangesOrder:["DATA_SOURCE","TILE_SETTINGS","GROUP_SETTINGS","MAX_DEPTH"],_change_DATA_SOURCE:function(){this._changeDataSource()},_change_TILE_SETTINGS:function(){this._changeTileSettings()},_change_GROUP_SETTINGS:function(){this._changeGroupSettings()},_change_MAX_DEPTH:function(){this._changeMaxDepth()},_customChangesOrder:["NODES_CREATE","NODES_RESET","TILES","LABELS","TILING","LABELS_LAYOUT"],_change_NODES_CREATE:function(){this._buildNodes()},_change_NODES_RESET:function(){this._resetNodes()},_change_TILES:function(){this._applyTilesAppearance()},_change_LABELS:function(){this._applyLabelsAppearance()},_change_TILING:function(){this._performTiling()},_change_LABELS_LAYOUT:function(){this._performLabelsLayout()},_applyChanges:function(){const e=this;e.callBase.apply(e,arguments),e._isDataExpected||e._drawn(),e._context.forceReset=!1},_buildNodes:function(){const e=this,t=e._root=e._topNode=new o.default;t._id=0,t.parent={},t.data={},t.level=t.index=-1,t.ctx=e._context,t.label=null,e._nodes=[t],e._handlers.beginBuildNodes();const i=e._processDataSourceItems(e._dataSourceItems()||[]);m(t,i.items,0,{itemsField:!i.isPlain&&e._getOption("childrenField",!0)||"items",valueField:e._getOption("valueField",!0)||"value",buildNode:e._handlers.buildNode,ctx:e._context,nodes:e._nodes}),e._onNodesCreated(),e._handlers.endBuildNodes(),e._change(["NODES_RESET"])},_onNodesCreated:l.noop,_processDataSourceItems:function(e){return{items:e,isPlain:!1}},_changeTileSettings:function(){const e=this,t=e._getOption("tile"),i=e._rectOffsets,n=_(t.border.width),o=n/2,a=1&n?.5:0,s=t.label,r=e._context.settings[0];e._change(["TILES","LABELS"]),r.state=e._handlers.calculateState(t),e._filter=e._filter||e._renderer.shadowFilter("-50%","-50%","200%","200%"),e._filter.attr(s.shadow),e._calculateLabelSettings(r,s,e._filter.id),i.tileEdge===o&&i.tileInner===a||(i.tileEdge=o,i.tileInner=a,e._change(["TILING"]))},_changeGroupSettings:function(){const e=this,t=e._getOption("group"),i=t.label,n=e._rectOffsets,o=_(t.border.width),a=o/2,s=1&o?.5:0;let r=0;const l=_(t.padding),d=e._context.settings[1];e._change(["TILES","LABELS"]),d.state=e._handlers.calculateState(t),e._calculateLabelSettings(d,i),r=t.headerHeight>=0?_(t.headerHeight):d.labelParams.height+2*_(i.paddingTopBottom),e._headerHeight!==r&&(e._headerHeight=r,e._change(["TILING"])),e._groupPadding!==l&&(e._groupPadding=l,e._change(["TILING"])),n.headerEdge===a&&n.headerInner===s||(n.headerEdge=a,n.headerInner=s,e._change(["TILING"]))},_calculateLabelSettings:function(e,t,i){const o=this._getTextBBox(t.font),a=_(t.paddingLeftRight),s=_(t.paddingTopBottom),r=this._getOption("tile.label"),l=this._getOption("group.label");e.labelState=(0,n.buildTextAppearance)(t,i),e.labelState.visible=!("visible"in t)||!!t.visible,e.labelParams={height:o.height,rtlEnabled:this._getOption("rtlEnabled",!0),paddingTopBottom:s,paddingLeftRight:a,tileLabelWordWrap:r.wordWrap,tileLabelOverflow:r.textOverflow,groupLabelOverflow:l.textOverflow}},_changeMaxDepth:function(){let e=this._getOption("maxDepth",!0);e=e>=1?Math.round(e):1/0,this._maxDepth!==e&&(this._maxDepth=e,this._change(["NODES_RESET"]))},_resetNodes:function(){const e=this;e._tilesGroup.clear(),e._renderer.initDefsElements(),e._context.forceReset=!0,e._context.minLevel=e._topNode.level+1,e._context.maxLevel=e._context.minLevel+e._maxDepth-1,e._change(["TILES","LABELS","TILING"])},_processNodes:function(e,t){v(e,this._topNode,t)},_applyTilesAppearance:function(){const e=this,t=(0,s.getColorizer)(e._getOption("colorizer"),e._themeManager,e._topNode);e._processNodes({renderer:e._renderer,group:e._tilesGroup,setTrackerData:e._handlers.setTrackerData,colorField:e._getOption("colorField",!0)||"color",getColor:t},y)},_applyLabelsAppearance:function(){const e=this;e._labelsGroup.clear(),e._processNodes({renderer:e._renderer,group:e._labelsGroup,setTrackerData:e._handlers.setTrackerData,labelField:e._getOption("labelField",!0)||"name"},b),e._change(["LABELS_LAYOUT"])},_performTiling:function(){const e=this,t={algorithm:(0,a.getAlgorithm)(e._getOption("layoutAlgorithm",!0)),directions:g[String(e._getOption("layoutDirection",!0)).toLowerCase()]||g.lefttoprightbottom,headerHeight:e._headerHeight,groupPadding:e._groupPadding,rectOffsets:e._rectOffsets};e._topNode.innerRect=e._tilingRect,w(t,e._topNode),e._processNodes(t,S),e._change(["LABELS_LAYOUT"]),e._onTilingPerformed()},_onTilingPerformed:l.noop,_performLabelsLayout:function(){this._processNodes(null,T)},_getTextBBox:function(e){const t=this._renderer,i=this._textForCalculations||t.text("0",0,0);this._textForCalculations=i,i.css((0,r.patchFontOptions)(e)).append(t.root);const n=i.getBBox();return i.remove(),n}});function m(e,t,i,n){const a=[],s=n.nodes;let r,l;const d=t.length;let u,c,h=0;for(l=0;l<d;++l){var p;u=t[l],r=new o.default,r._id=s.length,r.ctx=n.ctx,r.parent=e,r.level=i,r.index=a.length,r.data=u,n.buildNode(r),s.push(r),a.push(r),c=u[n.itemsField],null!==(p=c)&&void 0!==p&&p.length&&m(r,c,i+1,n),u[n.valueField]>0&&(r.value=Number(u[n.valueField])),h+=r.value}e.nodes=a,e.value=h}function v(e,t,i){const n=t.nodes;let o,a;const s=n.length;for(a=0;a<s;++a)o=n[a],i(e,o),o.isNode()&&v(e,o,i)}const C=[function(e,t){const i=e.renderer.simpleRect().append(e.group);return e.setTrackerData(t,i),i},function(e,t){const i=e.renderer.simpleRect().append(e.group),n=e.renderer.simpleRect().append(e.group);return e.setTrackerData(t,n),{outer:i,inner:n}}];function y(e,t){t.color=t.data[e.colorField]||e.getColor(t)||t.parent.color,t.updateStyles(),t.tile=!t.ctx.forceReset&&t.tile||C[Number(t.isNode())](e,t),t.applyState()}function b(e,t){t.updateLabelStyle(),t.labelState.visible&&function(e,t,i){let n=t.data[e.labelField];t.label=n?String(n):null,n=t.customLabel||t.label,n&&(t.text=e.renderer.text(n).attr(i.attr).css(i.css).append(e.group),e.setTrackerData(t,t.text))}(e,t,t.labelState,t.labelParams)}const x=[0,0,0,0];function w(e,t){const i=t.nodes,n=[],o=[];let a,s=0;const r=n.length=o.length=i.length;for(a=0;a<r;++a)s+=i[a].value,n[a]={value:i[a].value,i:a};for(s>0&&e.algorithm({items:n.slice(),sum:s,rect:t.innerRect.slice(),isRotated:1&i[0].level,directions:e.directions}),a=0;a<r;++a)o[a]=n[a].rect||x;t.rects=o}function S(e,t){let i=t.parent.rects[t.index];const n=e.rectOffsets;let o;t.isNode()?(E(t.tile.outer,I(i,t.parent.innerRect,n.headerEdge,n.headerInner)),i=D(i,e.groupPadding),o=Math.min(e.headerHeight,i[3]-i[1]),t.rect=[i[0],i[1],i[2],i[1]+o],E(t.tile.inner,D(t.rect,n.headerEdge)),i[1]+=o,t.innerRect=i,w(e,t)):(t.rect=i,E(t.tile,I(i,t.parent.innerRect,n.tileEdge,n.tileInner)))}function D(e,t){return[e[0]+t,e[1]+t,e[2]-t,e[3]-t]}function I(e,t,i,n){return[e[0]+(e[0]===t[0]?i:+n),e[1]+(e[1]===t[1]?i:+n),e[2]-(e[2]===t[2]?i:-n),e[3]-(e[3]===t[3]?i:-n)]}function E(e,t){e.attr({x:t[0],y:t[1],width:p(t[2]-t[0],0),height:p(t[3]-t[1],0)})}function T(e,t){t.text&&t.labelState.visible&&function(e,t){const i=e.rect,n=e.text,o=n.getBBox(),a=t.paddingLeftRight,s=t.paddingTopBottom,r=i[2]-i[0]-2*a;n.setMaxSize(r,i[3]-i[1]-s,e.isNode()?{textOverflow:t.groupLabelOverflow,wordWrap:"none"}:{textOverflow:t.tileLabelOverflow,wordWrap:t.tileLabelWordWrap,hideOverflowEllipsis:!0}),n.move(t.rtlEnabled?i[2]-a-o.x-o.width:i[0]+a-o.x,i[1]+s-o.y)}(t,t.labelParams)}(0,u.default)("dxTreeMap",f);t.default=f;f.addPlugin(c.plugin),e.exports=t.default,e.exports.default=t.default},96191:function(e,t,i){t.default=void 0;var n,o=(n=i(91628))&&n.__esModule?n:{default:n};i(93268),i(2085),i(94813),i(10115),i(53505),i(18202),i(70185),i(81708),i(49774),i(98350),i(60207),i(74408),i(74721),i(34239);var a=i(74754),s=i(16216),r=i(92528);t.default=o.default;o.default.addPlugin(a.plugin),o.default.addPlugin(s.plugin),o.default.addPlugin(r.plugin),e.exports=t.default,e.exports.default=t.default},2225:function(e,t,i){t.prepareSegmentRectPoints=t.floorCanvasDimensions=t.areCanvasesDifferent=void 0,Object.defineProperty(t,"refreshPaths",{enumerable:!0,get:function(){return n.refreshPaths}});var n=i(63022),o=i(21274);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}const{floor:s}=Math;t.prepareSegmentRectPoints=function(e,t,i,n,a){const s=~~((i<n?i:n)/2),r=a.width||0,l=r<s?r:s,d=(e+=l/2)+(i-=l),u=(t+=l/2)+(n-=l);let c,h=[],p=[],g=0,_=0;const f={top:[[e,t],[d,t]],right:[[d,t],[d,u]],bottom:[[d,u],[e,u]],left:[[e,u],[e,t]]};switch((0,o.each)(f,(function(e){const t=!!a[e];g=2*g+~~t})),g){case 13:case 9:c=["left","top","right","bottom"];break;case 11:c=["bottom","left","top","right"];break;default:c=["top","right","bottom","left"]}return(0,o.each)(c,(function(e,t){const i=!!a[t];!_&&p.length&&(h.push(p),p=[]),i&&(0,o.each)(f[t].slice(_),(function(e,t){p=p.concat(t)})),_=~~i})),p.length&&h.push(p),1===h.length&&(h=h[0]),{points:h,pathType:15===g?"area":"line"}};t.areCanvasesDifferent=function(e,t){const i=["width","height"].every((i=>Math.abs(e[i]-t[i])<1)),n=["left","right","top","bottom"].every((i=>e[i]===t[i]));return!(i&&n)};t.floorCanvasDimensions=function(e){return a({},e,{height:s(e.height),width:s(e.width)})}},85148:function(e,t,i){t.default=void 0;var n,o=(n=i(9713))&&n.__esModule?n:{default:n};t.default=o.default;e.exports=t.default,e.exports.default=t.default},77148:function(e,t,i){t.ControlBar=S;var n=i(28779),o=i(16750);const a=Math,s=a.min,r=a.max,l=a.round,d=a.floor,u=a.sqrt,c=(0,n.enumParser)(["left","center","right"]),h=(0,n.enumParser)(["top","bottom"]),p="command-reset",g="command-move-up",_="command-move-right",f="command-move-down",m="command-move-left",v="command-zoom-in",C="command-zoom-out",y="command-zoom-drag",b="control-bar",x={bigCircleSize:58,smallCircleSize:28,buttonSize:10,arrowButtonOffset:20,incDecButtonSize:11,incButtonOffset:66,decButtonOffset:227,sliderLineStartOffset:88.5,sliderLineEndOffset:205.5,sliderLength:20,sliderWidth:8,trackerGap:4};let w={};function S(e){const t=this;t._params=e,t._createElements(e.renderer,e.container,e.dataKey),e.layoutControl.addItem(t),t._subscribeToProjection(e.projection),t._subscribeToTracker(e.tracker),t._createCallbacks(e.projection)}function D(e){delete e._owner,e.update=function(){},e.finish=function(){}}function I(e,t){this._owner=e,this._command=t}function E(e,t,i){this._command=t;let n=null;let o=0,a=0;switch(this._command){case g:a=-10;break;case _:o=10;break;case f:a=10;break;case m:o=-10}this._stop=function(){return clearTimeout(n),e._callbacks.endMove(),this._stop=e=null,this},e._callbacks.beginMove(),function t(){e._callbacks.move([o,a]),n=setTimeout(t,100)}()}function T(e,t){this._owner=e,this._command=t;let i=null;const n=this._command===v?1:-1;this._stop=function(){return clearTimeout(i),this._stop=e=null,this},function t(){e._adjustZoom(e._zoomFactor+n),i=setTimeout(t,150)}()}function A(e,t,i){this._owner=e,this._zoomFactor=e._zoomFactor,this._pos=i.y}w[p]=I,w[g]=w[_]=w[f]=w[m]=E,w[v]=w[C]=T,w[y]=A,S.prototype={constructor:S,_flags:0,dispose:function(){const e=this;e._params.layoutControl.removeItem(e),e._root.linkRemove().linkOff(),e._offProjection(),e._offTracker(),e._params=e._root=e._offProjection=e._offTracker=e._callbacks=null},_subscribeToProjection:function(e){const t=this;function i(){t._adjustZoom(e.getScaledZoom())}t._offProjection=e.on({engine:function(){t._update()},zoom:i,"max-zoom":function(){t._zoomPartition=e.getZoomScalePartition(),t._sliderUnitLength=t._sliderLineLength/t._zoomPartition,i()}})},_subscribeToTracker:function(e){const t=this;let i=!1;t._offTracker=e.on({start:function(e){i=e.data.name===b,i&&t._processStart(e.data.index,e)},move:function(e){i&&t._processMove(e.data.index,e)},end:function(){i&&(t._processEnd(),i=!1)}})},_createCallbacks:function(e){this._callbacks={reset:function(t,i){t&&e.setCenter(null),i&&e.setZoom(null)},beginMove:function(){e.beginMoveCenter()},endMove:function(){e.endMoveCenter()},move:function(t){e.moveCenter(t)},zoom:function(t){e.setScaledZoom(t)}}},_createElements:function(e,t,i){const n=this;n._root=e.g().attr({class:"dxm-control-bar"}).linkOn(t,"control-bar");const a=n._panControl=(0,o.createVisibilityGroup)(e,n._root,"dxm-pan-control"),s=n._zoomBar=(0,o.createVisibilityGroup)(e,n._root,"dxm-zoom-bar"),r=n._trackersPan=(0,o.createTracker)(e,n._root),l=n._trackersZoom=(0,o.createTracker)(e,n._root);n._createTrackersPan(e,i,r),n._createTrackersZoom(e,i,l),n._createPanControl(e,i,a),n._createZoomBar(e,i,s)},_createPanControl:function(e,t,i){const n=x,o=n.buttonSize/2,a=n.arrowButtonOffset-o,s=n.arrowButtonOffset,r={"stroke-linecap":"square",fill:"none"},l="line";e.circle(0,0,n.bigCircleSize/2).append(i),e.circle(0,0,o).attr({fill:"none"}).append(i),e.path([-o,-a,0,-s,o,-a],l).attr(r).append(i),e.path([a,-o,s,0,a,o],l).attr(r).append(i),e.path([o,a,0,s,-o,a],l).attr(r).append(i),e.path([-a,o,-s,0,-a,-o],l).attr(r).append(i)},_createZoomBar:function(e,t,i){const n=this,o=x,a=o.incDecButtonSize/2;e.circle(0,o.incButtonOffset,o.smallCircleSize/2).append(i),e.path([[-a,o.incButtonOffset,a,o.incButtonOffset],[0,o.incButtonOffset-a,0,o.incButtonOffset+a]],"area").append(i),e.circle(0,o.decButtonOffset,o.smallCircleSize/2).append(i),e.path([-a,o.decButtonOffset,a,o.decButtonOffset],"area").append(i),n._zoomLine=e.path([],"line").append(i),n._zoomDrag=e.rect(d(-o.sliderLength/2),d(o.sliderLineEndOffset-o.sliderWidth/2),o.sliderLength,o.sliderWidth).append(i),n._sliderLineLength=o.sliderLineEndOffset-o.sliderLineStartOffset},_createTrackersPan:function(e,t,i){const n=x,o=l((n.arrowButtonOffset-n.trackerGap)/2),a=n.arrowButtonOffset-o,s=l(u(n.bigCircleSize*n.bigCircleSize/4-o*o)),r=s-a;e.rect(-o,-o,2*o,2*o).data(t,{index:p,name:b}).append(i),e.rect(-o,-s,2*o,r).data(t,{index:g,name:b}).append(i),e.rect(a,-o,r,2*o).data(t,{index:_,name:b}).append(i),e.rect(-o,a,2*o,r).data(t,{index:f,name:b}).append(i),e.rect(-s,-o,r,2*o).data(t,{index:m,name:b}).append(i)},_createTrackersZoom:function(e,t,i){const n=x;e.circle(0,n.incButtonOffset,n.smallCircleSize/2).data(t,{index:v,name:b}).append(i),e.circle(0,n.decButtonOffset,n.smallCircleSize/2).data(t,{index:C,name:b}).append(i),e.rect(-2,n.sliderLineStartOffset-2,4,n.sliderLineEndOffset-n.sliderLineStartOffset+4).css({cursor:"default"}).data(t,{index:"command-zoom-drag-line",name:b}).append(i),this._zoomDragTracker=e.rect(-n.sliderLength/2,n.sliderLineEndOffset-n.sliderWidth/2,n.sliderLength,n.sliderWidth).data(t,{index:y,name:b}).append(i)},resize:function(e){this._isActive&&this._root.attr({visibility:null!==e?null:"hidden"})},getLayoutOptions:function(){return this._isActive?this._layoutOptions:null},locate:function(e,t){this._root.attr({translateX:e+this._margin+30.5,translateY:t+this._margin+30.5})},_update:function(){const e=this;e._isActive=e._isEnabled&&e._flags&&e._params.projection.isInvertible();const t=[e._panControl,e._trackersPan],i=[e._zoomBar,e._trackersZoom];e._isActive?(e._root.linkAppend(),(0,o.toggleDisplay)(t,e._isPanVisible),(0,o.toggleDisplay)(i,e._isZoomVisible)):e._root.linkRemove(),e._processEnd(),e.updateLayout()},setInteraction:function(e){const t=this;(0,n.parseScalar)(e.centeringEnabled,!0)?t._flags|=1:t._flags&=-2,(0,n.parseScalar)(e.zoomingEnabled,!0)?t._flags|=2:t._flags&=-3,t._update()},setOptions:function(e){const t=this,i={"stroke-width":e.borderWidth,stroke:e.borderColor,fill:e.color,"fill-opacity":e.opacity};t._isEnabled=!!(0,n.parseScalar)(e.enabled,!0),t._margin=e.margin||0,t._layoutOptions={width:2*t._margin+61,height:2*t._margin+274,horizontalAlignment:c(e.horizontalAlignment,"left"),verticalAlignment:h(e.verticalAlignment,"top")},t._isPanVisible=!!(0,n.parseScalar)(e.panVisible,!0),t._isZoomVisible=!!(0,n.parseScalar)(e.zoomVisible,!0),t._panControl.attr(i),t._zoomBar.attr(i),t._update()},_adjustZoom:function(e){const t=this,i=x.sliderLineStartOffset,n=x.sliderLineEndOffset,o=x.sliderWidth;t._zoomFactor=r(s(l(e),t._zoomPartition),0);const a={translateY:-l(t._zoomFactor*t._sliderUnitLength)},d=n-o/2+a.translateY;t._zoomLine.attr({points:[[0,i,0,r(i,d)],[0,s(n,d+o),0,n]]}),t._zoomDrag.attr(a),t._zoomDragTracker.attr(a)},_applyZoom:function(){this._callbacks.zoom(this._zoomFactor)},_processStart:function(e,t){let i;this._isActive&&(i=w[e],this._command=i&&i.flags&this._flags?new i(this,e,t):null)},_processMove:function(e,t){this._command&&this._command.update(e,t)},_processEnd:function(){this._command&&this._command.finish(),this._command=null}},I.flags=3,I.prototype.update=function(e){e!==this._command&&D(this)},I.prototype.finish=function(){const e=this._owner._flags;this._owner._callbacks.reset(!!(1&e),!!(2&e)),D(this)},E.flags=1,E.prototype.update=function(e){this._command!==e&&this.finish()},E.prototype.finish=function(){D(this._stop())},T.flags=2,T.prototype.update=function(e){this._command!==e&&this.finish()},T.prototype.finish=function(){this._owner._applyZoom(),D(this._stop())},A.flags=2,A.prototype.update=function(e,t){const i=this._owner;i._adjustZoom(this._zoomFactor+i._zoomPartition*(this._pos-t.y)/i._sliderLineLength)},A.prototype.finish=function(){this._owner._applyZoom(),D(this)}},16750:function(e,t){t.toggleDisplay=t.createVisibilityGroup=t.createTracker=void 0;t.createTracker=(e,t)=>e.g().attr({stroke:"none","stroke-width":0,fill:"#000000",opacity:1e-4}).css({cursor:"pointer"}).append(t);t.createVisibilityGroup=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.g().attr({class:i}).append(t)};t.toggleDisplay=(e,t)=>{const i=t?{display:"block"}:{display:"none"};e.map((e=>e.css(i)))}},38409:function(e,t,i){t.DataExchanger=a;var n,o=(n=i(84718))&&n.__esModule?n:{default:n};function a(){this._store={}}a.prototype={constructor:a,dispose:function(){return this._store=null,this},_get:function(e,t){const i=this._store[e]||(this._store[e]={});return i[t]||(i[t]={callbacks:(0,o.default)()})},set:function(e,t,i){const n=this._get(e,t);return n.data=i,n.callbacks.fire(i),this},bind:function(e,t,i){const n=this._get(e,t);return n.callbacks.add(i),n.data&&i(n.data),this},unbind:function(e,t,i){return this._get(e,t).callbacks.remove(i),this}}},20366:function(e,t,i){t.makeEventEmitter=function(e){const t=e.prototype;let i;for(i in a)t[i]=a[i]};var n,o=(n=i(84718))&&n.__esModule?n:{default:n};const a={_initEvents:function(){const e=this._eventNames;let t;const i=e.length,n=this._events={};for(t=0;t<i;++t)n[e[t]]=(0,o.default)()},_disposeEvents:function(){const e=this._events;let t;for(t in e)e[t].empty();this._events=null},on:function(e){const t=this._events;let i;for(i in e)t[i].add(e[i]);return function(){for(i in e)t[i].remove(e[i])}},_fire:function(e,t){this._events[e].fire(t)}}},6695:function(e,t){t.GestureHandler=o;const i=Math.log,n=Math.LN2;function o(e){const t=this;t._projection=e.projection,t._renderer=e.renderer,t._x=t._y=0,t._subscribeToTracker(e.tracker)}o.prototype={constructor:o,dispose:function(){this._offTracker(),this._offTracker=null},_subscribeToTracker:function(e){const t=this;let i=!1;t._offTracker=e.on({start:function(e){i="control-bar"!==e.data.name,i&&t._processStart(e)},move:function(e){i&&t._processMove(e)},end:function(){i&&t._processEnd()},zoom:function(e){t._processZoom(e)}})},setInteraction:function(e){this._processEnd(),this._centeringEnabled=e.centeringEnabled,this._zoomingEnabled=e.zoomingEnabled},_processStart:function(e){this._centeringEnabled&&(this._x=e.x,this._y=e.y,this._projection.beginMoveCenter())},_processMove:function(e){const t=this;t._centeringEnabled&&(t._renderer.root.attr({cursor:"move"}),t._projection.moveCenter([t._x-e.x,t._y-e.y]),t._x=e.x,t._y=e.y)},_processEnd:function(){this._centeringEnabled&&(this._renderer.root.attr({cursor:"default"}),this._projection.endMoveCenter())},_processZoom:function(e){const t=this;let o,a,s;t._zoomingEnabled&&(e.delta?o=e.delta:e.ratio&&(o=i(e.ratio)/n),t._centeringEnabled&&(a=t._renderer.getRootOffset(),a=[e.x-a.left,e.y-a.top],s=t._projection.fromScreenPoint(a)),t._projection.changeScaledZoom(o),t._centeringEnabled&&t._projection.setCenterByPoint(s,a))}}},25217:function(e,t,i){t.LayoutControl=h;var n=i(21274);const o=Math.round,a=Math.min,s=Math.max,r=n.each,l={left:0,center:1,right:2},d={top:0,bottom:1};function u(e,t){const i=(e.right-e.left)/3,n=(e.bottom-e.top)/2,a=e.left,s=o(a+i),u=o(a+i+i),c=e.right,h=e.top,p=o(h+n),g=e.bottom,_=[{rect:[a,h,s,p]},{rect:[s,h,u,p],center:!0},{rect:[u,h,c,p],horInversion:!0},{rect:[a,p,s,g],verInversion:!0},{rect:[s,p,u,g],center:!0,verInversion:!0},{rect:[u,p,c,g],horInversion:!0,verInversion:!0}],f=[[],[],[],[],[],[]];return r(t,(function(e,t){const i=t.getLayoutOptions();i&&f[function(e){return 3*d[e.verticalAlignment]+l[e.horizontalAlignment]}(i)].push({item:t,width:i.width,height:i.height})})),r(_,(function(e,t){f[e].length?t.items=f[e]:(t.center?t.rect[0]=t.rect[2]=(t.rect[0]+t.rect[2])/2:t.rect[t.horInversion?0:2]=t.rect[t.horInversion?2:0],t.rect[t.verInversion?1:3]=t.rect[t.verInversion?3:1])})),_}function c(e,t){let i=!1;return function(e){r([0,1,2,3,4,5],(function(t,i){const n=e[i],o=e[(i+3)%6];n.items&&(o.items||(n.rect[1]=a(n.rect[1],o.rect[3]),n.rect[3]=s(n.rect[3],o.rect[1])))})),r([1,4],(function(t,i){const n=e[i],o=e[i-1],a=e[i+1];let s,r;n.items?o.items||a.items||(s=n.rect[0]-o.rect[2],r=a.rect[0]-n.rect[2],s>r?s/r>=2?(n.rect[0]-=s,n.right=!0):(n.rect[0]-=r,n.rect[2]+=r):r/s>=2?(n.rect[2]+=r,n.center=null):(n.rect[0]-=s,n.rect[2]+=s)):(o.items&&(o.rect[2]=(n.rect[0]+n.rect[2])/2),a.items&&(a.rect[0]=(n.rect[0]+n.rect[2])/2))}))}(e),r(e,(function(e,n){n.items&&(i=function(e,t){const i=e.rect,n=i[2]-i[0],l=i[3]-i[1];let d=0,u=0,c=0,h=i[2],p=i[3],g=i[0],_=i[1];const f=[];let m=!1;r(e.items,(function(o,r){if(r.width>n||r.height>l)return f.push(null),m=!0,t||!1;if(d+r.width>n&&(u+=c,d=c=0),u+r.height>l)return f.push(null),m=!0,t||!1;c=s(c,r.height);const v=e.horInversion?i[2]-r.width-d:i[0]+d,C=e.verInversion?i[3]-r.height-u:i[1]+u;d+=r.width,h=a(h,v),p=a(p,C),g=s(g,v+r.width),_=s(_,C+r.height),f.push([v,C])})),(t||!m)&&(d=0,e.right?d=i[2]-i[0]-g+h:e.center&&(d=o((i[2]-i[0]-g+h)/2)),r(e.items,(function(e,t){const i=f[e];i?t.item.locate(i[0]+d,i[1]):t.item.resize(null)})),e.rect=[h,p,g,_],e.items=null);return m}(n,t)||i)})),i}function h(e){const t=this;t._items=[],t._suspended=0,t._widget=e,t._updateLayout=function(){t._update()}}h.prototype={constructor:h,dispose:function(){this._items=this._updateLayout=null},setSize:function(e){this._canvas=e,this._update()},suspend:function(){++this._suspended},resume:function(){0==--this._suspended&&this._update()},addItem:function(e){this._items.push(e),e.updateLayout=this._updateLayout},removeItem:function(e){const t=this._items.indexOf(e);this._items.splice(t,1),e.updateLayout=null},_update:function(){let e;0===this._suspended&&(e=this._canvas,r(this._items,(function(t,i){i.resize(e)})),this._widget.resolveItemsDeferred(this._items.filter((e=>e.getTemplatesGroups&&e.getTemplatesDef))),function(e,t){const i=u(e,t);c(i)&&c(i,!0)}({left:e.left,top:e.top,right:e.width+e.left,bottom:e.height+e.top},this._items))}}},92746:function(e,t,i){t.LegendsControl=c;var n=i(52576),o=i(21274),a=i(22263),s=i(67056);const r=n.extend,l=o.each,d={category:"UNKNOWN",name:"UNKNOWN"};let u=function(e){const t=this;t._params=e,t._root=e.renderer.g().attr({class:"dxm-legend"}).linkOn(e.container,{name:"legend",after:"legend-base"}).enableLinks().linkAppend(),e.layoutControl.addItem(t),s.Legend.call(t,{renderer:e.renderer,widget:e.widget,group:t._root,backgroundClass:null,itemsGroupClass:null,textField:"text",getFormatObject:function(e){return e}}),t._onDataChanged=function(e){t._updateData(e)}};function c(e){this._params=e,this._items=[],e.container.virtualLink("legend-base")}u.prototype=r((0,a.clone)(s.Legend.prototype),{constructor:u,dispose:function(){const e=this;return e._params.layoutControl.removeItem(e),e._unbindData(),e._root.linkRemove().linkOff(),e._params=e._root=e._onDataChanged=null,s.Legend.prototype.dispose.apply(e,arguments)},resize:function(e){this._params.notifyDirty(),null===e?this.erase():this.draw(e.width,e.height),this._params.notifyReady()},locate:s.Legend.prototype.shift,_updateData:function(e){this._options.defaultColor=e&&e.defaultColor,this.update(e?function(e,t,i){let n;const o=t.length,a=[];let s;for(n=0;n<o;++n)a[n]=s={start:e[n],end:e[n+1],index:n},s[i]=t[n],s.states={normal:{fill:s.color}},s.visible=!0;return a}(e.partition,e.values,this._dataName):[],this._options,this._params.themeManager.theme("legend").title),this.updateLayout()},_unbindData:function(){this._dataCategory&&this._params.dataExchanger.unbind(this._dataCategory,this._dataName,this._onDataChanged)},_bindData:function(e){this._params.dataExchanger.bind(this._dataCategory=e.category,this._dataName=e.name,this._onDataChanged)},setOptions:function(e){const t=this;t.update(t._data,e,this._params.themeManager.theme("legend").title),t._unbindData();const i=e.source;return t._bindData(i?{category:i.layer,name:i.grouping}:d),t.updateLayout(),t}}),c.prototype={constructor:c,dispose:function(){l(this._items,(function(e,t){t.dispose()})),this._params=this._items=null},setOptions:function(e){const t=e&&e.length?e:[],i=this._items;let n;const o=t.length,a=this._params,s=a.themeManager.theme("legend");for(n=i.length;n<o;++n)i[n]=new u(a);for(n=i.length-1;n>=o;--n)i[n].dispose(),i.splice(n,1);for(a.layoutControl.suspend(),n=0;n<o;++n)i[n].setOptions(r(!0,{},s,t[n]));a.layoutControl.resume()}}},65379:function(e,t,i){t.MapLayerCollection=ce,t.getMaxBound=T;var n,o=i(17781),a=i(52576),s=i(21274),r=(n=i(75990))&&n.__esModule?n:{default:n},l=i(11528),d=i(87739),u=i(28779);const c=o.noop,h=a.extend,p=s.each,g=Array.prototype.concat,_="area",f="line",m="marker",v=[0,1,2,2],C={none:null,single:-1,multiple:NaN},y=Array.isArray,b=Number,x=String,w=Math.abs,S=Math.round,D=Math.min,I=Math.max,E=Math.sqrt;function T(e){return e.reduce(((e,t)=>t?[D(e[0],t[0]),D(e[1],t[1]),I(e[2],t[2]),I(e[3],t[3])]:e),e[0])}function A(e,t){return(e[t]||{}).name}function O(){}function P(e){this.raw=e}function k(e){this.raw=e}function M(e){return y(e.features)}function R(e){e.text.attr({visibility:e.size[0]/e.spaceSize[0]<1&&e.size[1]/e.spaceSize[1]<1?null:"hidden"})}function L(e){e.text.attr({visibility:e.size[0]/e.spaceSize[0]<1||e.size[1]/e.spaceSize[1]<1?null:"hidden"})}function B(e,t){return e.attribute(t)}O.prototype.count=function(){return 0},P.prototype={constructor:P,count:function(){return this.raw.length},item:function(e){return this.raw[e]},geometry:function(e){return{coordinates:e.coordinates}},attributes:function(e){return e.attributes},getBBox:function(e){return 0===arguments.length?void 0:this.raw[e].bbox}},k.prototype={constructor:k,count:function(){return this.raw.features.length},item:function(e){return this.raw.features[e]},geometry:function(e){return e.geometry},attributes:function(e){return e.properties},getBBox:function(e){return 0===arguments.length?this.raw.bbox:this.raw.features[e].bbox}};const V={Point:m,MultiPoint:f,LineString:f,MultiLineString:f,Polygon:_,MultiPolygon:_};function F(e,t){return void 0!==e?e:t}const H={setup:c,reset:c,arrange:c,updateGrouping:c,getDefaultColor:c},N={},z={},W={};let $,G,j=function(e,t){let i,n=(0,u.normalizeEnum)(e.type),o=(0,u.normalizeEnum)(e.elementType);const a=h({},H);return t.count()>0&&(i=t.geometry(t.item(0)),n=N[n]?n:function(e){let t=V[e.type];const i=e.coordinates;return t||(t="number"==typeof i[0]?m:"number"==typeof i[0][0]?f:_),t}(i),h(a,N[n]),a.fullType=a.type=n,z[n]&&h(a,z[n](i)),W[n]&&(o=W[n][o]?o:W[n]._default,h(a,W[n][o]),a.elementType=o,a.fullType+=":"+o)),a};function U(e,t,i,n){e[n].attr(t[n][i])}function K(e,t){const i=[];let n;const o=i.length=t.length;for(n=0;n<o;++n)i[n]=e.project(t[n]);return i}function Z(e,t){return[K(e,t)]}function q(e,t){const i=[];let n;const o=i.length=t.length;for(n=0;n<o;++n)i[n]=K(e,t[n]);return i}function Y(e,t){const i=[];let n;const o=t.length;let a,s=0;for(i.length=2*o,n=0;n<o;++n)a=e.transform(t[n]),i[s++]=a[0],i[s++]=a[1];return i}function X(e,t,i){const n=[];let o;const a=n.length=i.length;for(o=0;o<a;++o)n[o]=Y(t,i[o]);e.root.attr({points:n})}function Q(e,t,i){const n=te(e.settings,i);return function(e,t,i){p(e,(function(e,n){const o=J(n.callback(t,n.field),n.partition);o>=0&&(i[e]=n.values[o])}))}(e.grouping,t,n),void 0===i.color&&i.paletteIndex>=0&&(n.color=n._colors[i.paletteIndex]),n}function J(e,t){let i,n=0,o=t.length-1,a=-1;if(t[n]<=e&&e<=t[o])if(e===t[o])a=o-1;else{for(;o-n>1;)i=n+o>>1,e<t[i]?o=i:n=i;a=n}return a}function ee(e,t,i,n){e.params.eventTrigger(n,{target:t.proxy,state:i})}function te(e,t){const i=h({},e,t);return i.label=h({},e.label,i.label),i.label.font=h({},e.label.font,i.label.font),i}function ie(e,t){return e.attribute(t)}N[_]={projectLabel:function(e){let t;const i=e.length;let n,o,a=0;for(t=0;t<i;++t)n=de(e[t]),n.area>a&&(a=n.area,o=n);return o?[o.center,[E(o.area),E(o.area)]]:[[],[]]},transform:X,transformLabel:function(e,t,i){const n=t.transform(i[0]);e.spaceSize=t.getSquareSize(i[1]),e.text.attr({translateX:n[0],translateY:n[1]}),R(e)},draw:function(e,t,i){t.root=e.renderer.path([],"area").data(e.dataKey,i)},refresh:c,getLabelOffset:function(e){return R(e),[0,0]},getStyles:function(e){const t=e.color||null,i=e.borderColor||null,n=F(e.borderWidth,null),o=F(e.opacity,null);return{root:[{class:"dxm-area",stroke:i,"stroke-width":n,fill:t,opacity:o},{class:"dxm-area dxm-area-hovered",stroke:e.hoveredBorderColor||i,"stroke-width":F(e.hoveredBorderWidth,n),fill:e.hoveredColor||t,opacity:F(e.hoveredOpacity,o)},{class:"dxm-area dxm-area-selected",stroke:e.selectedBorderColor||i,"stroke-width":F(e.selectedBorderWidth,n),fill:e.selectedColor||t,opacity:F(e.selectedOpacity,o)}]}},setState:function(e,t,i){U(e,t,i,"root")},hasLabelsGroup:!0,updateGrouping:function(e){$(e)},getDefaultColor:c},N[f]={projectLabel:function(e){let t;const i=e.length;let n,o,a=0;for(t=0;t<i;++t)n=ue(e[t]),n[2]>a&&(a=n[2],o=n);return o||[[],[]]},transform:X,transformLabel:function(e,t,i){const n=t.transform(i[0]);e.spaceSize=t.getSquareSize(i[1]),e.text.attr({translateX:n[0],translateY:n[1]}),L(e)},draw:function(e,t,i){t.root=e.renderer.path([],"line").data(e.dataKey,i)},refresh:c,getLabelOffset:function(e){return L(e),[0,0]},getStyles:function(e){const t=e.color||e.borderColor||null,i=F(e.borderWidth,null),n=F(e.opacity,null);return{root:[{class:"dxm-line",stroke:t,"stroke-width":i,opacity:n},{class:"dxm-line dxm-line-hovered",stroke:e.hoveredColor||e.hoveredBorderColor||t,"stroke-width":F(e.hoveredBorderWidth,i),opacity:F(e.hoveredOpacity,n)},{class:"dxm-line dxm-line-selected",stroke:e.selectedColor||e.selectedBorderColor||t,"stroke-width":F(e.selectedBorderWidth,i),opacity:F(e.selectedOpacity,n)}]}},setState:function(e,t,i){U(e,t,i,"root")},hasLabelsGroup:!0,updateGrouping:function(e){$(e)},getDefaultColor:c},N[m]={project:function(e,t){return e.project(t)},transform:function(e,t,i){const n=t.transform(i);e.root.attr({translateX:n[0],translateY:n[1]})},draw:function(e,t,i){t.root=e.renderer.g(),this._draw(e,t,i)},refresh:c,hasLabelsGroup:!1,getLabelOffset:function(e,t){return[S((e.size[0]+I(t.size||0,0))/2)+2,0]},getStyles:function(e){const t={root:[{class:"dxm-marker"},{class:"dxm-marker dxm-marker-hovered"},{class:"dxm-marker dxm-marker-selected"}]};return this._getStyles(t,e),t},setState:function(e,t,i){U(e,t,i,"root"),this._setState(e,t,i)},updateGrouping:function(e){$(e),G(e)},getDefaultColor:function(e,t){return e.params.themeManager.getAccentColor(t)}},z[_]=function(e){return{project:(e,t)=>t[0]&&t[0][0]&&t[0][0][0]&&"number"==typeof t[0][0][0][0]?function(e,t){const i=[];let n;const o=i.length=t.length;for(n=0;n<o;++n)i[n]=q(e,t[n]);return g.apply([],i)}(e,t):q(e,t)}},z[f]=function(e){const t=e.coordinates;return{project:t[0]&&t[0][0]&&"number"==typeof t[0][0][0]?q:Z}},W[m]={_default:"dot",dot:{setup:function(e){e.filter=e.renderer.shadowFilter("-40%","-40%","180%","200%",0,1,1,"#000000",.2)},reset:function(e){e.filter.dispose(),e.filter=null},_draw:function(e,t,i){t.back=e.renderer.circle().sharp().data(e.dataKey,i).append(t.root),t.dot=e.renderer.circle().sharp().data(e.dataKey,i).append(t.root)},refresh:function(e,t,i,n,o){t.dot.attr({filter:o.shadow?e.filter.id:null})},_getStyles:function(e,t){const i=t.size>0?b(t.size):0,n=i,o=i+(t.selectedStep>0?b(t.selectedStep):0),a=n+(t.backStep>0?b(t.backStep):0),s=o+(t.backStep>0?b(t.backStep):0),r=t.color||null,l=t.borderColor||null,d=F(t.borderWidth,null),u=F(t.opacity,null),c=t.backColor||null,h=F(t.backOpacity,null);e.dot=[{r:i/2,stroke:l,"stroke-width":d,fill:r,opacity:u},{r:n/2,stroke:t.hoveredBorderColor||l,"stroke-width":F(t.hoveredBorderWidth,d),fill:t.hoveredColor||r,opacity:F(t.hoveredOpacity,u)},{r:o/2,stroke:t.selectedBorderColor||l,"stroke-width":F(t.selectedBorderWidth,d),fill:t.selectedColor||r,opacity:F(t.selectedOpacity,u)}],e.back=[{r:i/2,stroke:"none","stroke-width":0,fill:c,opacity:h},{r:a/2,stroke:"none","stroke-width":0,fill:c,opacity:h},{r:s/2,stroke:"none","stroke-width":0,fill:c,opacity:h}]},_setState:function(e,t,i){U(e,t,i,"dot"),U(e,t,i,"back")}},bubble:{_draw:function(e,t,i){t.bubble=e.renderer.circle().sharp().data(e.dataKey,i).append(t.root)},refresh:function(e,t,i,n,o){t.bubble.attr({r:o.size/2})},_getStyles:function(e,t){const i=t.color||null,n=t.borderColor||null,o=F(t.borderWidth,null),a=F(t.opacity,null);e.bubble=[{stroke:n,"stroke-width":o,fill:i,opacity:a},{stroke:t.hoveredBorderColor||n,"stroke-width":F(t.hoveredBorderWidth,o),fill:t.hoveredColor||t.color,opacity:F(t.hoveredOpacity,a)},{stroke:t.selectedBorderColor||n,"stroke-width":F(t.selectedBorderWidth,o),fill:t.selectedColor||t.color,opacity:F(t.selectedOpacity,a)}]},_setState:function(e,t,i){U(e,t,i,"bubble")},arrange:function(e,t){const i=[];let n;const o=i.length=t.length,a=e.settings,s=a.dataField,r=a.minSize>0?b(a.minSize):0,l=a.maxSize>r?b(a.maxSize):r;if(a.sizeGroups)return;for(n=0;n<o;++n)i[n]=I(B(t[n].proxy,s)||0,0);const d=D.apply(null,i),u=I.apply(null,i)-d||1,c=l-r;for(n=0;n<o;++n)t[n]._settings.size=r+c*(i[n]-d)/u},updateGrouping:function(e){const t=e.settings.dataField;N[m].updateGrouping(e),G(e,(function(e){return B(e,t)}))}},pie:{_draw:function(e,t,i){t.pie=e.renderer.g().append(t.root),t.border=e.renderer.circle().sharp().data(e.dataKey,i).append(t.root)},refresh:function(e,t,i,n,o){const a=B(n,e.settings.dataField)||[],s=o._colors;let r=0;const l=t.pie,d=e.renderer,u=e.dataKey,c=(o.size>0?b(o.size):0)/2;let h=90,p=h,g=!1;r=a.reduce((function(e,t){return e+(t||0)}),0),0===r&&(g=!0,r=360/a.length),a.forEach((function(e,t){h=p,p+=g?r:(e||0)/r*360,d.arc(0,0,0,c,h,p).attr({"stroke-linejoin":"round",fill:s[t]}).data(u,i).append(l)})),t.border.attr({r:c})},_getStyles:function(e,t){const i=F(t.opacity,null),n=t.borderColor||null,o=F(t.borderWidth,null);e.pie=[{opacity:i},{opacity:F(t.hoveredOpacity,i)},{opacity:F(t.selectedOpacity,i)}],e.border=[{stroke:n,"stroke-width":o},{stroke:t.hoveredBorderColor||n,"stroke-width":F(t.hoveredBorderWidth,o)},{stroke:t.selectedBorderColor||n,"stroke-width":F(t.selectedBorderWidth,o)}]},_setState:function(e,t,i){U(e,t,i,"pie"),U(e,t,i,"border")},arrange:function(e,t){let i;const n=t.length,o=e.settings.dataField;let a,s,r=0;for(i=0;i<n;++i)a=B(t[i].proxy,o),a&&a.length>r&&(r=a.length);r>0&&(s=e.params.themeManager.createPalette(e.settings.palette,{useHighlight:!0,extensionMode:"alternate"}),a=s.generateColors(r),e.settings._colors=a,e.grouping.color={callback:c,field:"",partition:[],values:[]},e.params.dataExchanger.set(e.name,"color",{partition:[],values:a}))}},image:{_draw:function(e,t,i){t.image=e.renderer.image(null,null,null,null,null,"center").attr({"pointer-events":"visible"}).data(e.dataKey,i).append(t.root)},refresh:function(e,t,i,n){t.image.attr({href:B(n,e.settings.dataField)})},_getStyles:function(e,t){const i=t.size>0?b(t.size):0,n=i+(t.hoveredStep>0?b(t.hoveredStep):0),o=i+(t.selectedStep>0?b(t.selectedStep):0),a=F(t.opacity,null);e.image=[{x:-i/2,y:-i/2,width:i,height:i,opacity:a},{x:-n/2,y:-n/2,width:n,height:n,opacity:F(t.hoveredOpacity,a)},{x:-o/2,y:-o/2,width:o,height:o,opacity:F(t.selectedOpacity,a)}]},_setState:function(e,t,i){U(e,t,i,"image")}}};let ne,oe=function(e,t,i,n,o){let a;n&&t&&t.length>1&&(a=o(t.length-1),e.grouping[i]={callback:(0,l.isFunction)(n)?n:ie,field:n,partition:t,values:a},e.params.dataExchanger.set(e.name,i,{partition:t,values:a,defaultColor:e.settings.color}))};function ae(e){const t=e.name,i=e.params.dataExchanger;p(e.grouping,(function(e){i.set(t,e,null)})),e.grouping={}}function se(e,t,i){return i?e|=t:e&=~t,e}function re(e,t){return!!(e&t)}$=function(e){oe(e,e.settings.colorGroups,"color",e.settings.colorGroupingField,(function(t){const i=e.params.themeManager.createDiscretePalette(e.settings.palette,t);let n;const o=[];for(n=0;n<t;++n)o.push(i.getColor(n));return o}))},G=function(e,t){const i=e.settings;oe(e,i.sizeGroups,"size",t||i.sizeGroupingField,(function(e){const t=i.minSize>0?b(i.minSize):0,n=i.maxSize>=t?b(i.maxSize):0;let o=0;const a=[];if(e>1)for(o=0;o<e;++o)a.push((t*(e-o-1)+n*o)/(e-1));else 1===e&&a.push((t+n)/2);return a}))};let le=function(e,t,i,n){const o=this;o._params=e,o._onProjection(),o.proxy=function(e,t,i){const n={index:i,name:t,getElements:function(){return e.getProxies()},clearSelection:function(t){return e.clearSelection(t),n},getDataSource:function(){return e.getDataSource()},getBounds:()=>e.getBounds()};return n}(o,i,n),o._context={name:i,layer:o.proxy,renderer:e.renderer,projection:e.projection,params:e,dataKey:e.dataKey,str:H,hover:!1,selection:null,grouping:{},root:e.renderer.g().attr({class:"dxm-layer"}).linkOn(t,i).linkAppend()},o._container=t,o._options={},o._handles=[],o._data=new O,o._dataSourceLoaded=null};function de(e){let t;const i=e.length;let n,o,a=e[i-1],s=0,r=0,l=0,d=1/0,u=-1/0,c=1/0,h=-1/0;for(t=0;t<i;++t)n=a,a=e[t],o=n[0]*a[1]-a[0]*n[1],l+=o,s+=(n[0]+a[0])*o,r+=(n[1]+a[1])*o,d=D(d,a[0]),u=I(u,a[0]),c=D(c,a[1]),h=I(h,a[1]);return{area:w(l)/2,center:[2*s/3/l-(d+u)/2,2*r/3/l-(c+h)/2]}}function ue(e){let t;const i=e.length;let n,o=e[0]||[],a=0;const s=[0];let r=o[0],l=o[0],d=o[1],u=o[1];for(t=1;t<i;++t)n=o,o=e[t],a+=E((n[0]-o[0])*(n[0]-o[0])+(n[1]-o[1])*(n[1]-o[1])),s[t]=a,r=D(r,o[0]),l=I(l,o[0]),d=D(d,o[1]),u=I(u,o[1]);t=J(a/2,s),n=e[t],o=e[t+1];const c=(a/2-s[t])/(s[t+1]-s[t]);return i?[[n[0]*(1-c)+o[0]*c,n[1]*(1-c)+o[1]*c],[l-r,u-d],a]:[]}function ce(e){const t=this,i=e.renderer;t._params=e,t._layers=[],t._layerByName={},t._rect=[0,0,0,0],t._clip=i.clipRect(),t._background=i.rect().attr({class:"dxm-background"}).data(e.dataKey,{name:"background"}).append(i.root),t._container=i.g().attr({class:"dxm-layers","clip-path":t._clip.id}).append(i.root).enableLinks(),t._subscribeToTracker(e.tracker,i,e.eventTrigger),t._dataReady=e.dataReady}le.prototype=h({constructor:le,getDataReadyCallback(){return this._dataSourceLoaded},_onProjection:function(){const e=this;e._removeHandlers=e._params.projection.on({engine:function(){e._project()},screen:function(){e._transform()},center:function(){e._transformCore()},zoom:function(){e._transform()}})},getData(){return this._data},_dataSourceLoadErrorHandler:function(){this._dataSourceChangedHandler()},_dataSourceChangedHandler:function(){const e=this;e._data=function(e){let t;return e&&(M(e)?t=k:1===e.length&&e[0]&&M(e[0])?(t=k,e=e[0]):y(e)&&(t=P)),t=t||O,new t(e)}(e._dataSource&&e._dataSource.items()),e._update(!0)},_dataSourceOptions:function(){return{paginate:!1}},_getSpecificDataSourceOption:function(){return this._specificDataSourceOption},_normalizeDataSource:function(e){const t=e.store();return"raw"===t._loadMode&&(t._loadMode=void 0),e},_offProjection:function(){this._removeHandlers(),this._removeHandlers=null},dispose:function(){const e=this;return e._disposeDataSource(),e._destroyHandles(),ae(e._context),e._context.root.linkRemove().linkOff(),e._context.labelRoot&&e._context.labelRoot.linkRemove().linkOff(),e._context.str.reset(e._context),e._offProjection(),e._params=e._container=e._context=e.proxy=null,e},setOptions:function(e){const t=this;var i;e=t._options=e||{},t._dataSourceLoaded=new d.Deferred,"dataSource"in e&&e.dataSource!==t._options_dataSource?(t._options_dataSource=e.dataSource,t._params.notifyDirty(),t._specificDataSourceOption=(i=e.dataSource)?M(i)?[i]:i:[],t._refreshDataSource()):t._data.count()>0&&(t._params.notifyDirty(),t._update(void 0!==e.type&&e.type!==t._context.str.type||void 0!==e.elementType&&e.elementType!==t._context.str.elementType)),t._transformCore()},_update:function(e){const t=this,i=t._context;e&&(i.str.reset(i),i.root.clear(),i.labelRoot&&i.labelRoot.clear(),t._params.tracker.reset(),t._destroyHandles(),i.str=j(t._options,t._data),i.str.setup(i),t.proxy.type=i.str.type,t.proxy.elementType=i.str.elementType),i.settings=function(e,t){const i=e.params.themeManager,n=e.str,o=te(h({label:{},color:n.getDefaultColor(e,t.palette)},i.theme("layer:"+n.fullType)),t);let a,s,r;if(o.paletteSize>0){for(r=i.createDiscretePalette(o.palette,o.paletteSize),s=0,a=[];s<o.paletteSize;++s)a.push(r.getColor(s));o._colors=a}return o}(i,t._options),i.hasSeparateLabel=!(!i.settings.label.enabled||!i.str.hasLabelsGroup),i.hover=!!(0,u.parseScalar)(i.settings.hoverEnabled,!0),i.selection&&p(i.selection.state,(function(e,t){t&&t.resetSelected()})),i.selection=function(e){let t=(0,u.normalizeEnum)(e);return t=t in C?C[t]:C.single,null!==t&&(t={state:{},single:t}),t}(i.settings.selectionMode),i.hasSeparateLabel?i.labelRoot||(i.labelRoot=i.renderer.g().attr({class:"dxm-layer-labels"}).linkOn(t._container,{name:i.name+"-labels",after:i.name}).linkAppend(),t._transformCore()):i.labelRoot&&(i.labelRoot.linkRemove().linkOff(),i.labelRoot=null),e&&t._createHandles(),ae(i),i.str.arrange(i,t._handles),i.str.updateGrouping(i),t._updateHandles(),t._params.notifyReady(),t._dataSourceLoaded?(t._dataSourceLoaded.resolve(),t._dataSourceLoaded=null):t._params.dataReady()},getBounds(){return T(this._handles.map((e=>{let{proxy:t}=e;return t.coordinates().map((e=>{if(!y(e))return;const t=y(e[0][0])?e.reduce(((e,t)=>e.concat(t)),[]):e,i=t[0];return t.reduce(((e,t)=>[D(e[0],t[0]),D(e[1],t[1]),I(e[2],t[0]),I(e[3],t[1])]),[i[0],i[1],i[0],i[1]])}))})).map(T))},_destroyHandles(){this._handles.forEach((e=>e.dispose())),this._context.selection&&(this._context.selection.state={}),this._handles=[]},_createHandles:function(){const e=this,t=e._handles=[],i=e._data;let n;const o=t.length=i.count(),a=e._context,s=i.geometry,r=i.attributes;let d,u;for(n=0;n<o;++n)u=i.item(n),t[n]=new ne(a,n,s(u),r(u));var c,h,g;for((0,l.isFunction)(e._options.customize)&&(c=e.getProxies(),h=e._options.customize,g=e._params.widget,h.call(g,c)),n=0;n<o;++n)d=t[n],d.project(),d.draw(),d.transform();a.selection&&p(a.selection.state,(function(e,t){t&&t.restoreSelected()}))},_updateHandles:function(){const e=this._handles;let t;const i=e.length;for(t=0;t<i;++t)e[t].refresh();if(this._context.settings.label.enabled){for(t=0;t<i;++t)e[t].measureLabel();for(t=0;t<i;++t)e[t].adjustLabel()}},_transformCore:function(){const e=this._params.projection.getTransform();this._context.root.attr(e),this._context.labelRoot&&this._context.labelRoot.attr(e)},_project:function(){const e=this._handles;let t;const i=e.length;for(t=0;t<i;++t)e[t].project()},_transform:function(){const e=this._handles;let t;const i=e.length;for(this._transformCore(),t=0;t<i;++t)e[t].transform()},getProxies(){return this._handles.map((e=>e.proxy))},getProxy:function(e){return this._handles[e].proxy},raiseClick:function(e,t){this._params.eventTrigger("click",{target:this._handles[e].proxy,event:t})},hoverItem:function(e,t){this._handles[e].setHovered(t)},selectItem:function(e,t,i){this._handles[e].setSelected(t,i)},clearSelection:function(){const e=this._context.selection;e&&(p(e.state,(function(e,t){t&&t.setSelected(!1)})),e.state={})}},r.default),ne=function(e,t,i,n){const o=this,a=o.proxy=function(e,t,i){const n={coordinates:function(){return t},attribute:function(e,t){return arguments.length>1?(i[e]=t,n):arguments.length>0?i[e]:i},selected:function(t,i){return arguments.length>0?(e.setSelected(t,i),n):e.isSelected()},applySettings:function(t){return e.update(t),n}};return n}(o,i.coordinates,h({},n));o._ctx=e,o._index=t,o._fig=o._label=null,o._state=0,o._coordinates=i.coordinates,o._settings={label:{}},a.index=t,a.layer=e.layer,o._data={name:e.name,index:t}},ne.prototype={constructor:ne,dispose:function(){const e=this;return e._ctx=e.proxy=e._settings=e._fig=e._label=e.data=null,e},project:function(){const e=this._ctx;this._projection=e.str.project(e.projection,this._coordinates),e.hasSeparateLabel&&this._label&&this._projectLabel()},_projectLabel:function(){this._labelProjection=this._ctx.str.projectLabel(this._projection)},draw:function(){const e=this,t=this._ctx;t.str.draw(t,e._fig={},e._data),e._fig.root.append(t.root)},transform:function(){const e=this,t=e._ctx;t.str.transform(e._fig,t.projection,e._projection),t.hasSeparateLabel&&e._label&&e._transformLabel()},_transformLabel:function(){this._ctx.str.transformLabel(this._label,this._ctx.projection,this._labelProjection)},refresh:function(){const e=this,t=e._ctx.str,i=Q(e._ctx,e.proxy,e._settings);e._styles=t.getStyles(i),t.refresh(e._ctx,e._fig,e._data,e.proxy,i),e._refreshLabel(i),e._setState()},_refreshLabel:function(e){const t=this,i=t._ctx,n=e.label;let o=t._label;i.settings.label.enabled?(o||(o=t._label={root:i.labelRoot||t._fig.root,text:i.renderer.text().attr({class:"dxm-label"}),size:[0,0]},i.hasSeparateLabel&&(t._projectLabel(),t._transformLabel())),o.value=x(t.proxy.text||t.proxy.attribute(n.dataField)||""),o.value&&(o.text.attr({text:o.value,x:0,y:0}).css((0,u.patchFontOptions)(n.font)).attr({align:"center",stroke:n.stroke,"stroke-width":n["stroke-width"],"stroke-opacity":n["stroke-opacity"]}).data(i.dataKey,t._data).append(o.root),o.settings=e)):o&&(o.text.remove(),t._label=null)},measureLabel:function(){const e=this._label;let t;e.value&&(t=e.text.getBBox(),e.size=[t.width,t.height,-t.y-t.height/2])},adjustLabel:function(){const e=this._label;let t;e.value&&(t=this._ctx.str.getLabelOffset(e,e.settings),e.settings=null,e.text.attr({x:t[0],y:t[1]+e.size[2]}))},update:function(e){const t=this;t._settings=te(t._settings,e),t._fig&&(t.refresh(),t._label&&t._label.value&&(t.measureLabel(),t.adjustLabel()))},_setState:function(){this._ctx.str.setState(this._fig,this._styles,v[this._state])},_setForeground:function(){const e=this._fig.root;this._state?e.toForeground():e.toBackground()},setHovered:function(e){const t=this,i=re(t._state,1),n=!!e;return t._ctx.hover&&i!==n&&(t._state=se(t._state,1,n),t._setState(),t._setForeground(),ee(t._ctx,t,n,"hoverChanged")),t},setSelected:function(e,t){const i=this,n=re(i._state,2),o=!!e,a=i._ctx.selection;let s;a&&n!==o&&(i._state=se(i._state,2,o),s=a.state[a.single],a.state[a.single]=null,s&&s.setSelected(!1),a.state[a.single||i._index]=e?i:null,i._fig&&(i._setState(),i._setForeground(),t||ee(i._ctx,i,o,"selectionChanged")))},isSelected:function(){return re(this._state,2)},resetSelected:function(){this._state=se(this._state,2,!1)},restoreSelected:function(){this._fig.root.toForeground()}},ce.prototype={constructor:ce,dispose:function(){const e=this;e._clip.dispose(),e._layers.forEach((e=>e.dispose())),e._offTracker(),e._params=e._offTracker=e._layers=e._layerByName=e._clip=e._background=e._container=null},_subscribeToTracker:function(e,t,i){const n=this;n._offTracker=e.on({click:function(e){const o=t.getRootOffset(),a=n.byName(e.data.name);e.$event.x=e.x-o.left,e.$event.y=e.y-o.top,a?a.raiseClick(e.data.index,e.$event):"background"===e.data.name&&i("click",{event:e.$event})},"hover-on":function(e){const t=n.byName(e.data.name);t&&t.hoverItem(e.data.index,!0)},"hover-off":function(e){const t=n.byName(e.data.name);t&&t.hoverItem(e.data.index,!1)}})},setOptions(e){const t=this,i=e?y(e)?e:[e]:[];let n=t._layers,o=[];if(i.length!==n.length||n.some(((e,t)=>{const n=A(i,t);return(0,l.isDefined)(n)&&n!==e.proxy.name}))){t._params.tracker.reset(),t._layers.forEach((e=>e.dispose()));const e=t._layerByName={};t._layers=n=[];for(let o=0,a=i.length;o<a;++o){const a=A(i,o)||"map-layer-"+o,s=n[o]=new le(t._params,t._container,a,o);e[a]=s}}n.forEach(((e,t)=>{e.setOptions(i[t])})),o=n.map((e=>e.getDataReadyCallback())),o.length&&d.when.apply(void 0,o).done(t._dataReady)},_updateClip:function(){const e=this._rect,t=this._borderWidth;this._clip.attr({x:e[0]+t,y:e[1]+t,width:I(e[2]-2*t,0),height:I(e[3]-2*t,0)})},setBackgroundOptions:function(e){this._background.attr({stroke:e.borderColor,"stroke-width":e.borderWidth,fill:e.color}),this._borderWidth=I(e.borderWidth,0),this._updateClip()},setRect:function(e){this._rect=e,this._background.attr({x:e[0],y:e[1],width:e[2],height:e[3]}),this._updateClip()},byIndex:function(e){return this._layers[e]},byName:function(e){return this._layerByName[e]},items:function(){return this._layers}}},99094:function(e,t,i){Object.defineProperty(t,"projection",{enumerable:!0,get:function(){return n.projection}});var n=i(2875);const o=Math.min,a=Math.max,s=Math.sin,r=Math.asin,l=Math.tan,d=Math.atan,u=Math.exp,c=Math.log,h=Math.PI,p=h/4,g=180,_=h/180,f=(2*d(u(h))-h/2)/_,m=(2.5*d(u(.8*h))-.625*h)/_;function v(e,t){return a(o(e,+t),-t)}n.projection.add("mercator",(0,n.projection)({aspectRatio:1,to:function(e){return[e[0]/g,c(l(p+v(e[1],f)*_/2))/h]},from:function(e){return[e[0]*g,(2*d(u(e[1]*h))-h/2)/_]}})),n.projection.add("equirectangular",(0,n.projection)({aspectRatio:2,to:function(e){return[e[0]/g,e[1]/90]},from:function(e){return[e[0]*g,90*e[1]]}})),n.projection.add("lambert",(0,n.projection)({aspectRatio:2,to:function(e){return[e[0]/g,s(v(e[1],90)*_)]},from:function(e){return[e[0]*g,r(v(e[1],1))/_]}})),n.projection.add("miller",(0,n.projection)({aspectRatio:1,to:function(e){return[e[0]/g,1.25*c(l(p+v(e[1],m)*_*.4))/h]},from:function(e){return[e[0]*g,(2.5*d(u(.8*e[1]*h))-.625*h)/_]}}))},2875:function(e,t,i){t.projection=t.Projection=void 0;var n=i(52576),o=i(20366);const a=Number,s=Math.min,r=Math.max,l=Math.abs,d=Math.round,u=Math.log,c=Math.pow,h=2/Math.LN2,p=1/3600/180/10,g=[NaN,NaN];function _(e,t){return l(e-t)<1e-8}function f(e,t){return _(e[0],t[0])&&_(e[1],t[1])}function m(e,t,i,n){const o=a(e);return isFinite(o)?s(r(o,t),i):n}function v(e,t,i,n){return[m(e[0],t[0],i[0],n[0]),m(e[1],t[1],i[1],n[1])]}function C(e){return e instanceof S&&e||A.get(e)||A(e)||A.get("mercator")}const y=function(e){const t=this;t._initEvents(),t._params=e,t._engine=C(),t._center=t._engine.center(),t._adjustCenter()};function b(e,t,i,n){const o=(i+n)/2;return l(e-o)>l(t-o)?e:t}function x(e,t,i,n){const o=(i+n)/2;return l(e-o)<l(t-o)?e:t}function w(e,t,i){const{min:n,max:o}=T(t,i);e.min=E(n),e.max=E(o)}t.Projection=y,y.prototype={constructor:y,_minZoom:1,_maxZoom:256,_zoom:1,_center:g,_canvas:{},_scale:[],dispose:function(){this._disposeEvents()},setEngine:function(e){const t=this,i=C(e);t._engine!==i&&(t._engine=i,t._fire("engine"),t._changeCenter(i.center())&&t._triggerCenterChanged(),t._changeZoom(t._minZoom)&&t._triggerZoomChanged(),t._adjustCenter(),t._setupScreen())},setBounds:function(e){void 0!==e&&this.setEngine(this._engine.original().bounds(e))},_setupScreen:function(){const e=this,t=e._canvas,i=t.width,n=t.height,o=e._engine,a=o.ar();e._x0=t.left+i/2,e._y0=t.top+n/2;const d=[e.project([o.min()[0],0])[0],e.project([0,o.min()[1]])[1]],u=[e.project([o.max()[0],0])[0],e.project([0,o.max()[1]])[1]],c=i/n,h=l(u[0]-d[0])/l(u[1]-d[1]);let p;p=isNaN(h)||0===h||s(c,a)<=a*h&&a*h<=r(c,a)?1:h>1?h:1/h,a*h>=c?(e._xRadius=i/2/p,e._yRadius=i/2/(a*p)):(e._xRadius=n/2*(a/p),e._yRadius=n/2/p),e._fire("screen")},setSize:function(e){this._canvas=e,this._setupScreen()},getCanvas:function(){return this._canvas},_toScreen:function(e){return[this._x0+this._xRadius*e[0],this._y0+this._yRadius*e[1]]},_fromScreen:function(e){return[(e[0]-this._x0)/this._xRadius,(e[1]-this._y0)/this._yRadius]},_toTransformed:function(e){return[e[0]*this._zoom+this._xCenter,e[1]*this._zoom+this._yCenter]},_toTransformedFast:function(e){return[e[0]*this._zoom,e[1]*this._zoom]},_fromTransformed:function(e){return[(e[0]-this._xCenter)/this._zoom,(e[1]-this._yCenter)/this._zoom]},_adjustCenter:function(){const e=this,t=e._engine.project(e._center);e._xCenter=-t[0]*e._zoom||0,e._yCenter=-t[1]*e._zoom||0},project:function(e){return this._engine.project(e)},transform:function(e){return this._toScreen(this._toTransformedFast(e))},isInvertible:function(){return this._engine.isInvertible()},getSquareSize:function(e){return[e[0]*this._zoom*this._xRadius,e[1]*this._zoom*this._yRadius]},getZoom:function(){return this._zoom},_changeZoom:function(e){const t=this,i=!_(t._zoom,t._zoom=m(e,t._minZoom,t._maxZoom,t._minZoom));return i&&(t._adjustCenter(),t._fire("zoom")),i},setZoom:function(e){this._engine.isInvertible()&&this._changeZoom(e)&&this._triggerZoomChanged()},getScaledZoom:function(){return d((this._scale.length-1)*u(this._zoom)/u(this._maxZoom))},setScaledZoom:function(e){this.setZoom(this._scale[d(e)])},changeScaledZoom:function(e){this.setZoom(this._scale[r(s(d(this.getScaledZoom()+e),this._scale.length-1),0)])},getZoomScalePartition:function(){return this._scale.length-1},_setupScaling:function(){const e=this,t=r(d(h*u(e._maxZoom)),4),i=c(e._maxZoom,1/t);let n=e._minZoom;e._scale=[n];for(let o=1;o<=t;++o)e._scale.push(n*=i)},setMaxZoom:function(e){const t=this;t._minZoom=1,t._maxZoom=m(e,t._minZoom,a.MAX_VALUE,256),t._setupScaling(),t._zoom>t._maxZoom&&t.setZoom(t._maxZoom),t._fire("max-zoom")},getCenter:function(){return this._center.slice()},setCenter:function(e){this._engine.isInvertible()&&this._changeCenter(e||[])&&this._triggerCenterChanged()},_changeCenter:function(e){const t=this,i=t._engine,n=!f(t._center,t._center=v(e,i.min(),i.max(),i.center()));return n&&(t._adjustCenter(),t._fire("center")),n},_triggerCenterChanged:function(){this._params.centerChanged(this.getCenter())},_triggerZoomChanged:function(){this._params.zoomChanged(this.getZoom())},setCenterByPoint:function(e,t){const i=this,n=i._engine.project(e),o=i._fromScreen(t);i.setCenter(i._engine.unproject([-o[0]/i._zoom+n[0],-o[1]/i._zoom+n[1]]))},beginMoveCenter:function(){this._engine.isInvertible()&&(this._moveCenter=this._center)},endMoveCenter:function(){const e=this;e._moveCenter&&(f(e._moveCenter,e._center)||e._triggerCenterChanged(),e._moveCenter=null)},moveCenter:function(e){const t=this;if(t._moveCenter){const i=t.toScreenPoint(t._center);t._changeCenter(t.fromScreenPoint([i[0]+e[0],i[1]+e[1]]))}},getViewport:function(){const e=this,t=e._engine.unproject,i=t(e._fromTransformed([-1,-1])),n=t(e._fromTransformed([-1,1])),o=t(e._fromTransformed([1,-1])),a=t(e._fromTransformed([1,1])),s=T([b(i[0],n[0],o[0],a[0]),b(i[1],o[1],n[1],a[1])],[b(o[0],a[0],i[0],n[0]),b(n[1],a[1],i[1],o[1])]);return[].concat(s.min[0],s.max[1],s.max[0],s.min[1])},setViewport:function(e){const t=this._engine,i=e?function(e,t,i){const n=e([i[0],i[3]]),o=e([i[0],i[1]]),a=e([i[2],i[3]]),s=e([i[2],i[1]]),d=x(n[0],o[0],a[0],s[0]),u=x(a[0],s[0],n[0],o[0]),c=x(n[1],a[1],o[1],s[1]),h=x(o[1],s[1],n[1],a[1]);return[2/r(l(d-u),l(c-h)),t([(d+u)/2,(c+h)/2])]}(t.project,t.unproject,e):[this._minZoom,t.center()];this.setZoom(i[0]),this.setCenter(i[1])},getTransform:function(){return{translateX:this._xCenter*this._xRadius,translateY:this._yCenter*this._yRadius}},fromScreenPoint:function(e){return this._engine.unproject(this._fromTransformed(this._fromScreen(e)))},toScreenPoint:function(e){return this._toScreen(this._toTransformed(this._engine.project(e)))},_eventNames:["engine","screen","center","zoom","max-zoom"]},(0,o.makeEventEmitter)(y);const S=class{constructor(e){const t=this,i=(o=e.to,e=>D(o(e)));var o;const s=e.from?function(e){return t=>e(D(t))}(e.from):I(g);t.project=i,t.unproject=s,t.original=I(t),t.source=function(){return(0,n.extend)({},e)},t.isInvertible=I(!!e.from),t.ar=I(e.aspectRatio>0?a(e.aspectRatio):1),t.center=E(s([0,0])),w(t,[s([-1,0])[0],s([0,1])[1]],[s([1,0])[0],s([0,-1])[1]])}aspectRatio(e){const t=new S((0,n.extend)(this.source(),{aspectRatio:e}));return t.original=this.original,t.min=this.min,t.max=this.max,t}bounds(e){e=e||[];const t=this.source(),i=this.min(),o=this.max(),a=v([e[0],e[1]],i,o,i),r=v([e[2],e[3]],i,o,o),d=t.to(a),u=t.to(r),c=s(l(u[0]-d[0])>p?l(u[0]-d[0]):2,l(u[1]-d[1])>p?l(u[1]-d[1]):2);c<2&&(0,n.extend)(t,function(e,t,i,n,o){const a=(i[0]+n[0])/2-o/2,s=(i[1]+n[1])/2-o/2,r=2/o;return{to:function(t){const[i,n]=e(t);return[(i-a)*r-1,(n-s)*r-1]},from:function(e){return t([a+(e[0]+1)/r,s+(e[1]+1)/r])}}}(t.to,t.from,d,u,c));const h=new S(t);return h.original=this.original,w(h,a,r),h}};function D(e){return[e[0],-e[1]]}function I(e){return()=>e}function E(e){return()=>e.slice()}function T(e,t){return{min:[s(e[0],t[0]),s(e[1],t[1])],max:[r(e[0],t[0]),r(e[1],t[1])]}}const A=function(e){return e&&e.to?new S(e):null};t.projection=A;const O={};A.get=function(e){return O[e]||null},A.add=function(e,t){return t=t instanceof S&&t||A(t),!O[e]&&t&&(O[e]=t),A}},44561:function(e,t){t.TooltipViewer=i;function i(e){this._subscribeToTracker(e.tracker,e.tooltip,e.layerCollection)}i.prototype={constructor:i,dispose:function(){this._offTracker(),this._offTracker=null},_subscribeToTracker:function(e,t,i){this._offTracker=e.on({"focus-on":function(e){let n,o;if(t.isEnabled()){n=i.byName(e.data.name),o=n&&n.getProxy(e.data.index);const a=t=>{t&&e.done(t)};o&&a(t.show(o,{x:e.x,y:e.y,offset:12},{target:o},void 0,a))}},"focus-move":function(e){t.move(e.x,e.y,12)},"focus-off":function(){t.hide()}})}}},61483:function(e,t,i){t.Tracker=A;var n=u(i(92774)),o=i(3104),a=u(i(64960)),s=i(20366),r=i(98834),l=i(37373),d=i(28779);function u(e){return e&&e.__esModule?e:{default:e}}const c=(0,o.getNavigator)(),h=Math,p=h.abs,g=h.sqrt,_=h.round,f=r.addNamespace,m="dxVectorMap",v="start",C="move",y="zoom",b="hover-on",x="hover-off",w="click",S="focus-on",D="focus-move",I="focus-off";let E,T;function A(e){const t=this;t._root=e.root,t._createEventHandlers(e.dataKey),t._createProjectionHandlers(e.projection),t._initEvents(),t._focus=new T((function(e,i){t._fire(e,i)})),t._attachHandlers()}function O(e,t,i,n){return g((e-i)*(e-i)+(t-n)*(t-n))}function P(e){const t=e.originalEvent.type,i=e.originalEvent.pointerType;return/^touch/.test(t)||/^MSPointer/.test(t)&&4!==i||/^pointer/.test(t)&&"mouse"!==i}function k(e,t){let i=0;const n=e.length;let o;for(;i<n;++i)if(e[i]){o=t[i];break}return f(o||t[i],m)}function M(e){const t=e.originalEvent,i=t.touches&&t.touches[0]||{};return{x:i.pageX||t.pageX||e.pageX,y:i.pageY||t.pageY||e.pageY}}function R(e){return e.originalEvent.pointerId}function L(e,t){let i=e.originalEvent;return i=void 0!==i.pointerId?i.pointerId===t?i:null:i.touches[t],i?{x:i.pageX||e.pageX,y:i.pageY||e.pageY}:null}!function(){let e=[c.pointerEnabled,c.msPointerEnabled,(0,o.hasProperty)("ontouchstart")];E={start:k(e,["pointerdown","MSPointerDown","touchstart mousedown","mousedown"]),move:k(e,["pointermove","MSPointerMove","touchmove mousemove","mousemove"]),end:k(e,["pointerup","MSPointerUp","touchend mouseup","mouseup"]),wheel:f(l.name,m)}}(),A.prototype={constructor:A,dispose:function(){const e=this;e._detachHandlers(),e._disposeEvents(),e._focus.dispose(),e._root=e._focus=e._docHandlers=e._rootHandlers=null},_eventNames:[v,C,"end",y,w,b,x,S,I,D],_startClick:function(e,t){if(!t)return;const i=M(e);this._clickState={x:i.x,y:i.y,threshold:P(e)?20:5,time:Date.now()}},_endClick:function(e,t){const i=this._clickState;let n,o;i&&(t&&Date.now()-i.time<=500&&(n=i.threshold,o=M(e),p(o.x-i.x)<=n&&p(o.y-i.y)<=n&&this._fire(w,{data:t,x:o.x,y:o.y,$event:e})),this._clickState=null)},_startDrag:function(e,t){if(!t)return;const i=M(e),n=this._dragState={x:i.x,y:i.y,data:t};this._fire(v,{x:n.x,y:n.y,data:n.data})},_moveDrag:function(e,t){const i=this._dragState;if(!i)return;const n=M(e),o=P(e)?10:5;(i.active||p(n.x-i.x)>o||p(n.y-i.y)>o)&&(i.x=n.x,i.y=n.y,i.active=!0,i.data=t||{},this._fire(C,{x:i.x,y:i.y,data:i.data}))},_endDrag:function(){const e=this._dragState;e&&(this._dragState=null,this._fire("end",{x:e.x,y:e.y,data:e.data}))},_wheelZoom:function(e,t){if(!t)return;const i=this._wheelLock,n=Date.now();if(n-i.time<=50)return;n-i.dirTime>300&&(i.dir=0);const o=function(e,t){if(0===e)return 0;let i=p(e);const n=_(e/i);if(t.dir&&n!==t.dir)return 0;t.dir=n,i=i<.1?0:i<1?1:i>4?4:_(i);return n*i}(e.delta/120||0,i);if(0===o)return;const a=M(e);this._fire(y,{delta:o,x:a.x,y:a.y}),i.time=i.dirTime=n},_startZoom:function(e,t){if(!P(e)||!t)return;const i=this._zoomState=this._zoomState||{};let n,o;i.pointer1&&i.pointer2||(void 0===i.pointer1&&(i.pointer1=R(e)||0,n=L(e,i.pointer1),i.x1=i.x1_0=n.x,i.y1=i.y1_0=n.y),void 0===i.pointer2&&(o=R(e)||1,o!==i.pointer1&&(n=L(e,o),n&&(i.x2=i.x2_0=n.x,i.y2=i.y2_0=n.y,i.pointer2=o,i.ready=!0,this._endDrag()))))},_moveZoom:function(e){const t=this._zoomState;let i;t&&P(e)&&(void 0!==t.pointer1&&(i=L(e,t.pointer1),i&&(t.x1=i.x,t.y1=i.y)),void 0!==t.pointer2&&(i=L(e,t.pointer2),i&&(t.x2=i.x,t.y2=i.y)))},_endZoom:function(e){const t=this._zoomState;let i,n;t&&P(e)&&(t.ready&&(i=O(t.x1_0,t.y1_0,t.x2_0,t.y2_0),n=O(t.x1,t.y1,t.x2,t.y2),this._fire(y,{ratio:n/i,x:(t.x1_0+t.x2_0)/2,y:(t.y1_0+t.y2_0)/2})),this._zoomState=null)},_startHover:function(e,t){this._doHover(e,t,!0)},_moveHover:function(e,t){this._doHover(e,t,!1)},_doHover:function(e,t,i){const n=this;n._dragState&&n._dragState.active||n._zoomState&&n._zoomState.ready?n._cancelHover():P(e)!==i||n._hoverTarget===e.target||n._hoverState&&n._hoverState.data===t||(n._cancelHover(),t&&(n._hoverState={data:t},n._fire(b,{data:t})),n._hoverTarget=e.target)},_cancelHover:function(){const e=this._hoverState;this._hoverState=this._hoverTarget=null,e&&this._fire(x,{data:e.data})},_startFocus:function(e,t){this._doFocus(e,t,!0)},_moveFocus:function(e,t){this._doFocus(e,t,!1)},_doFocus:function(e,t,i){const n=this;n._dragState&&n._dragState.active||n._zoomState&&n._zoomState.ready?n._cancelFocus():P(e)===i&&(n._focus.turnOff(),t&&n._focus.turnOn(t,M(e)))},_cancelFocus:function(){this._focus.cancel()},_createEventHandlers:function(e){const t=this;function i(t){const i=t.target;return("tspan"===i.tagName?i.parentNode:i)[e]}t._docHandlers={},t._rootHandlers={},t._docHandlers[E.start]=function(e){const n=P(e),o=i(e);n&&!t._isTouchEnabled||(o&&e.preventDefault(),t._startClick(e,o),t._startDrag(e,o),t._startZoom(e,o),t._startHover(e,o),t._startFocus(e,o))},t._docHandlers[E.move]=function(e){const n=P(e),o=i(e);n&&!t._isTouchEnabled||(t._moveDrag(e,o),t._moveZoom(e,o),t._moveHover(e,o),t._moveFocus(e,o))},t._docHandlers[E.end]=function(e){const n=P(e),o=i(e);n&&!t._isTouchEnabled||(t._endClick(e,o),t._endDrag(e,o),t._endZoom(e,o))},t._rootHandlers[E.wheel]=function(e){if(t._cancelFocus(),!t._isWheelEnabled)return;const n=i(e);n&&(e.preventDefault(),e.stopPropagation(),t._wheelZoom(e,n))},t._wheelLock={dir:0}},_createProjectionHandlers:function(e){const t=this;function i(){t._cancelFocus()}e.on({center:i,zoom:i})},reset:function(){const e=this;e._clickState=null,e._endDrag(),e._cancelHover(),e._cancelFocus()},setOptions:function(e){const t=this;t.reset(),t._detachHandlers(),t._isTouchEnabled=!!(0,d.parseScalar)(e.touchEnabled,!0),t._isWheelEnabled=!!(0,d.parseScalar)(e.wheelEnabled,!0),t._attachHandlers()},_detachHandlers:function(){const e=this;e._isTouchEnabled&&e._root.css({"touch-action":"","-webkit-user-select":""}).off(f("MSHoldVisual",m)).off(f("contextmenu",m)),n.default.off(a.default.getDocument(),e._docHandlers),e._root.off(e._rootHandlers)},_attachHandlers:function(){const e=this;e._isTouchEnabled&&e._root.css({"touch-action":"none","-webkit-user-select":"none"}).on(f("MSHoldVisual",m),(function(e){e.preventDefault()})).on(f("contextmenu",m),(function(e){P(e)&&e.preventDefault()})),n.default.on(a.default.getDocument(),e._docHandlers),e._root.on(e._rootHandlers)}},T=function(e){let t,i,n=this,o=null,a=null,s=!1;n.dispose=function(){n.turnOn=n.turnOff=n.cancel=n.dispose=n=e=o=a=null},n.turnOn=function(n,r){function l(e){s=!e,e&&(o=a)}n===a&&s||(s=!1,a=n,o?(t=r.x,i=r.y,a===o?(e(D,{data:a,x:t,y:i}),l(!0)):e(S,{data:a,x:t,y:i,done:l})):(t=r.x,i=r.y,e(S,{data:a,x:t,y:i,done:l})))},n.turnOff=function(){a=null,o&&!s&&(e(I,{data:o}),o=null)},n.cancel=function(){o&&e(I,{data:o}),o=a=null}},(0,s.makeEventEmitter)(A)},9713:function(e,t,i){t.default=void 0;var n=i(28779),o=i(2875),a=i(77148),s=i(6695),r=i(61483),l=i(38409),d=i(92746),u=i(25217),c=i(65379),h=i(44561),p=i(68198);i(99094);var g=b(i(34506)),_=b(i(92848)),f=i(74754),m=i(16216),v=i(23277),C=i(92528),y=i(97808);function b(e){return e&&e.__esModule?e:{default:e}}const x=/^layers/,w=/\.dataSource$/;function S(e,t){return t?[Math.min(t[0],t[2],e[0]),Math.min(t[1],t[3],e[3]),Math.max(t[0],t[2],e[2]),Math.max(t[1],t[3],e[1])]:e}const D=g.default.inherit({_eventsMap:{onClick:{name:"click"},onCenterChanged:{name:"centerChanged"},onZoomFactorChanged:{name:"zoomFactorChanged"},onHoverChanged:{name:"hoverChanged"},onSelectionChanged:{name:"selectionChanged"}},_rootClassPrefix:"dxm",_rootClass:"dxm-vector-map",_themeSection:"map",_fontFields:["layer:area.label.font","layer:marker:dot.label.font","layer:marker:bubble.label.font","layer:marker:pie.label.font","layer:marker:image.label.font","legend.font","legend.title.font","legend.title.subtitle.font"],_initLayerCollection:function(e){const t=this;t._layerCollection=new c.MapLayerCollection({renderer:t._renderer,projection:t._projection,themeManager:t._themeManager,tracker:t._tracker,dataKey:e,eventTrigger:t._eventTrigger,dataExchanger:t._dataExchanger,tooltip:t._tooltip,notifyDirty:t._notifyDirty,notifyReady:t._notifyReady,dataReady(){let e;if(t.option("getBoundsFromData")&&!t.option("bounds")&&(t._preventProjectionEvents(),e=t._getBoundsFromData(),t._projection.setBounds(e),t._allowProjectionEvents()),!t.option("projection")&&(e=e||t._getBoundsFromData(),Math.ceil(e[0])<-180||Math.ceil(e[3])<-90||Math.floor(e[2])>180||Math.floor(e[1])>90)){const i=e[2]-e[0],n=e[1]-e[3];t._projection.setEngine({to:t=>[2*(t[0]-e[0])/i-1,2*(t[1]-e[3])/n-1],from:t=>[(t[0]+1)*i/2+e[0],(t[1]+1)*n/2+e[3]]})}}})},_getBoundsFromData(){let e=this._getBoundingBoxFromDataSource();if(!e){const t=this.getLayers().map((e=>e.getBounds())).filter((e=>void 0!==e)),i=(0,c.getMaxBound)(t);i&&(e=i)}return e=e||[],e=[e[0],e[3],e[2],e[1]],e},_initLegendsControl:function(){const e=this;e._legendsControl=new d.LegendsControl({renderer:e._renderer,container:e._root,widget:e,layoutControl:e._layoutControl,themeManager:e._themeManager,dataExchanger:e._dataExchanger,notifyDirty:e._notifyDirty,notifyReady:e._notifyReady})},_initControlBar:function(e){const t=this;t._controlBar=new a.ControlBar({renderer:t._renderer,container:t._root,layoutControl:t._layoutControl,projection:t._projection,tracker:t._tracker,dataKey:e})},_initElements:function(){const e=this,t=(0,p.generateDataKey)();let i,n=0;e._preventProjectionEvents=function(){i=!0},e._allowProjectionEvents=function(){i=!1},e._notifyDirty=function(){e._resetIsReady(),++n},e._notifyReady=function(){e._allowProjectionEvents(),0==--n&&e._drawn()},e._preventProjectionEvents(),e._dataExchanger=new l.DataExchanger,e._projection=new o.Projection({centerChanged:function(t){i||e._eventTrigger("centerChanged",{center:t})},zoomChanged:function(t){i||e._eventTrigger("zoomFactorChanged",{zoomFactor:t})}}),e._tracker=new r.Tracker({root:e._root,projection:e._projection,dataKey:t}),e._gestureHandler=new s.GestureHandler({projection:e._projection,renderer:e._renderer,tracker:e._tracker}),e._layoutControl=new u.LayoutControl(e),e._layoutControl.suspend(),e._initLayerCollection(t),e._createHtmlStructure(),e._initControlBar(t),e._initLegendsControl(),e._prepareExtraElements(),e._tooltipViewer=new h.TooltipViewer({tracker:e._tracker,tooltip:e._tooltip,layerCollection:e._layerCollection})},_change_RESUME_LAYOUT:function(){this._layoutControl.resume()},_initialChanges:["PROJECTION","RESUME_LAYOUT","LAYOUT_INIT","BOUNDS","MAX_ZOOM_FACTOR","ZOOM_FACTOR","CENTER"],_layoutChangesOrder:["RESUME_LAYOUT","LAYERS"],_customChangesOrder:["EXTRA_ELEMENTS"],_initCore:function(){this._root=this._renderer.root.attr({align:"center",cursor:"default"}),this._initElements()},_disposeCore:function(){const e=this;e._controlBar.dispose(),e._gestureHandler.dispose(),e._tracker.dispose(),e._legendsControl.dispose(),e._layerCollection.dispose(),e._layoutControl.dispose(),e._tooltipViewer.dispose(),e._dataExchanger.dispose(),e._projection.dispose(),e._dataExchanger=e._gestureHandler=e._projection=e._tracker=e._layoutControl=e._root=e._layerCollection=e._controlBar=e._legendsControl=null},_setupInteraction:function(){const e={centeringEnabled:!!(0,n.parseScalar)(this._getOption("panningEnabled",!0),!0),zoomingEnabled:!!(0,n.parseScalar)(this._getOption("zoomingEnabled",!0),!0)};this._gestureHandler.setInteraction(e),this._controlBar.setInteraction(e)},_getDefaultSize:function(){return{width:800,height:400}},_applySize:function(e){const t={left:e[0],top:e[1],width:e[2]-e[0],height:e[3]-e[1],right:0,bottom:0};this._projection.setSize(t),this._layoutControl.setSize(t),this._layerCollection.setRect([t.left,t.top,t.width,t.height]),this._requestChange(["EXTRA_ELEMENTS"])},_optionChanging:function(e,t,i){t&&i&&x.test(e)&&(t.dataSource&&i.dataSource&&t!==i?t.dataSource=null:w.test(e)&&this.option(e,null))},_applyChanges:function(){this._notifyDirty(),this.callBase.apply(this,arguments),this._notifyReady()},_optionChangesMap:{background:"BACKGROUND",layers:"LAYERS",extraElements:"EXTRA_ELEMENTS",controlBar:"CONTROL_BAR",legends:"LEGENDS",touchEnabled:"TRACKER",wheelEnabled:"TRACKER",panningEnabled:"INTERACTION",zoomingEnabled:"INTERACTION",projection:"PROJECTION",bounds:"BOUNDS",maxZoomFactor:"MAX_ZOOM_FACTOR",zoomFactor:"ZOOM_FACTOR",center:"CENTER"},_optionChangesOrder:["PROJECTION","BOUNDS","MAX_ZOOM_FACTOR","ZOOM_FACTOR","CENTER","BACKGROUND","CONTROL_BAR","LEGENDS","TRACKER","INTERACTION"],_change_PROJECTION:function(){this._setProjection()},_change_BOUNDS:function(){this._setBounds()},_change_MAX_ZOOM_FACTOR:function(){this._setMaxZoom()},_change_ZOOM_FACTOR:function(){this._setZoom()},_change_CENTER:function(){this._setCenter()},_change_BACKGROUND:function(){this._setBackgroundOptions()},_change_LAYERS:function(){this._setLayerCollectionOptions()},_change_CONTROL_BAR:function(){this._setControlBarOptions()},_change_EXTRA_ELEMENTS:function(){this._renderExtraElements()},_change_LEGENDS:function(){this._setLegendsOptions()},_change_TRACKER:function(){this._setTrackerOptions()},_change_INTERACTION:function(){this._setupInteraction()},_themeDependentChanges:["BACKGROUND","LAYERS","CONTROL_BAR","LEGENDS","TRACKER","INTERACTION"],_setProjection:function(){this._projection.setEngine(this.option("projection"))},_setBounds:function(){this._projection.setBounds(this.option("bounds"))},_setMaxZoom:function(){this._projection.setMaxZoom(this.option("maxZoomFactor"))},_setZoom:function(){this._projection.setZoom(this.option("zoomFactor"))},_setCenter:function(){this._projection.setCenter(this.option("center"))},_setBackgroundOptions:function(){this._layerCollection.setBackgroundOptions(this._getOption("background"))},_setLayerCollectionOptions:function(){this._layerCollection.setOptions(this.option("layers"))},_getBoundingBoxFromDataSource(){const e=this._layerCollection.items(),t=[1/0,-1/0,-1/0,1/0],i=e&&e.length?e.reduce(((e,t)=>{const i=t.getData(),n=i.count();if(n>0){const t=i.getBBox();if(t)e=S(e,t);else for(let t=0;t<n;t++)e=S(e,i.getBBox(t))}return e}),t):void 0;return i===t?void 0:i},_setControlBarOptions:function(){this._controlBar.setOptions(this._getOption("controlBar"))},_setLegendsOptions:function(){this._legendsControl.setOptions(this.option("legends"))},_setTrackerOptions:function(){this._tracker.setOptions({touchEnabled:this._getOption("touchEnabled",!0),wheelEnabled:this._getOption("wheelEnabled",!0)})},getLayers(){return this._layerCollection.items().map((e=>e.proxy))},getLayerByIndex:function(e){const t=this._layerCollection.byIndex(e);return t?t.proxy:null},getLayerByName:function(e){const t=this._layerCollection.byName(e);return t?t.proxy:null},clearSelection:function(e){const t=this._layerCollection.items();let i;const n=t.length;for(i=0;i<n;++i)t[i].clearSelection(e);return this},center:function(e){const t=this;return void 0===e?t._projection.getCenter():(t._projection.setCenter(e),t)},zoomFactor:function(e){const t=this;return void 0===e?t._projection.getZoom():(t._projection.setZoom(e),t)},viewport:function(e){const t=this;return void 0===e?t._projection.getViewport():(t._projection.setViewport(e),t)},convertCoordinates:function(e){return e=e&&e.length?e:[arguments[0],arguments[1]],this.convertToGeo(e[0],e[1])},convertToGeo:function(e,t){return this._projection.fromScreenPoint([e,t])},convertToXY:function(e,t){return this._projection.toScreenPoint([e,t])}});(0,_.default)("dxVectorMap",D);t.default=D;D.addPlugin(f.plugin),D.addPlugin(m.plugin),D.addPlugin(v.plugin),D.addPlugin(C.plugin),D.addPlugin(y.plugins.core),D.addPlugin(y.plugins.vectorMap),e.exports=t.default,e.exports.default=t.default},68198:function(e,t){t.generateDataKey=function(){return"vectormap-data-"+i++};let i=1},1990:function(e){e.exports=window.DevExpress.Gantt},40765:function(e){e.exports=window.DevExpress.Quill},36761:function(e){e.exports=window.DevExpress.diagram},87626:function(e){e.exports=window.Globalize},87531:function(e){e.exports=window.JSZip},10561:function(e){e.exports=window.jQuery},78117:function(e){e.exports=window.ko}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,i),a.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};i(10195)}();

/*!
* DevExtreme (dx.aspnet.mvc.js)
* Version: 24.2.3
* Build date: Fri Dec 06 2024
*
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
! function(factory) {
    if ("function" === typeof define && define.amd) {
        define((function(require, exports, module) {
            module.exports = factory(require("jquery"), require("./core/templates/template_engine_registry").setTemplateEngine, require("./core/templates/template_base").renderedCallbacks, require("./core/guid"), require("./ui/validation_engine"), require("./core/utils/iterator"), require("./core/utils/dom").extractTemplateMarkup, require("./core/utils/string").encodeHtml, require("./core/utils/ajax"))
        }))
    } else {
        DevExpress.aspnet = factory(window.jQuery, DevExpress.setTemplateEngine, DevExpress.templateRendered, DevExpress.data.Guid, DevExpress.validationEngine, DevExpress.utils.iterator, DevExpress.utils.dom.extractTemplateMarkup, DevExpress.utils.string.encodeHtml, DevExpress.utils.ajax)
    }
}((function($, setTemplateEngine, templateRendered, Guid, validationEngine, iteratorUtils, extractTemplateMarkup, encodeHtml, ajax) {
    var templateCompiler = function() {
        var EXTENDED_OPEN_TAG = /[<[]%/g,
            EXTENDED_CLOSE_TAG = /%[>\]]/g;

        function acceptText(bag, text) {
            if (text) {
                bag.push("_.push(", JSON.stringify(text), ");")
            }
        }

        function acceptCode(bag, code) {
            var encode = "-" === code.charAt(0),
                value = code.substr(1),
                interpolate = "=" === code.charAt(0);
            if (encode || interpolate) {
                bag.push("_.push(");
                var expression = value;
                if (encode) {
                    expression = "encodeHtml((" + value + " !== null && " + value + " !== undefined) ? " + value + ' : "")';
                    if (/^\s*$/.test(value)) {
                        expression = "encodeHtml(" + value + ")"
                    }
                }
                bag.push(expression);
                bag.push(");")
            } else {
                bag.push(code + "\n")
            }
        }
        return function(element) {
            var text = extractTemplateMarkup(element);
            var bag = ["var _ = [];", "with(obj||{}) {"],
                chunks = text.split(EXTENDED_OPEN_TAG);
            acceptText(bag, chunks.shift());
            for (var i = 0; i < chunks.length; i++) {
                var tmp = chunks[i].split(EXTENDED_CLOSE_TAG);
                if (2 !== tmp.length) {
                    throw "Template syntax error"
                }
                acceptCode(bag, tmp[0]);
                acceptText(bag, tmp[1])
            }
            bag.push("}", "return _.join('')");
            var code = bag.join("");
            try {
                return new Function("obj", "encodeHtml", code)
            } catch (e) {
                var src = element[0];
                if ("SCRIPT" === src.tagName) {
                    var funcName = src.id.replaceAll("-", "");
                    var func = "function " + funcName + "(obj,encodeHtml){\n" + code + "\n}";
                    $.globalEval(func, src, window.document);
                    return funcName
                } else {
                    return text
                }
            }
        }
    }();
    var pendingCreateComponentRoutines = [];

    function createComponent(name, options, id, validatorOptions) {
        var selector = "#" + String(id).replace(/[^\w-]/g, "\\$&");
        pendingCreateComponentRoutines.push((function() {
            var $element = $(selector);
            if ($element.length) {
                var $component = $(selector)[name](options);
                if ($.isPlainObject(validatorOptions)) {
                    $component.dxValidator(validatorOptions)
                }
                return true
            }
            return false
        }))
    }
    templateRendered.add((function() {
        var snapshot = pendingCreateComponentRoutines.slice();
        var leftover = [];
        pendingCreateComponentRoutines = [];
        snapshot.forEach((function(func) {
            if (!func()) {
                leftover.push(func)
            }
        }));
        pendingCreateComponentRoutines = pendingCreateComponentRoutines.concat(leftover)
    }));
    return {
        createComponent: createComponent,
        renderComponent: function(name, options, id, validatorOptions) {
            id = id || "dx-" + new Guid;
            createComponent(name, options, id, validatorOptions);
            return '<div id="' + id + '"></div>'
        },
        getEditorValue: function(inputName) {
            var $widget = $("input[name='" + inputName + "']").closest(".dx-widget");
            if ($widget.length) {
                var dxComponents = $widget.data("dxComponents"),
                    widget = $widget.data(dxComponents[0]);
                if (widget) {
                    return widget.option("value")
                }
            }
        },
        setTemplateEngine: function() {
            if (setTemplateEngine) {
                setTemplateEngine({
                    compile: function(element) {
                        return templateCompiler(element)
                    },
                    render: function(template, data) {
                        if (template instanceof Function) {
                            var html = template(data, encodeHtml);
                            var dxMvcExtensionsObj = window.MVCx;
                            if (dxMvcExtensionsObj && !dxMvcExtensionsObj.isDXScriptInitializedOnLoad) {
                                html = html.replace(/(<script[^>]+)id="dxss_.+?"/g, "$1")
                            }
                            return html
                        } else if (window[template] instanceof Function) {
                            return window[template](data, encodeHtml)
                        } else if ("string" === typeof template) {
                            return template
                        } else {
                            throw "Unknown template type"
                        }
                    }
                })
            }
        },
        createValidationSummaryItems: function(validationGroup, editorNames) {
            var groupConfig, items, summary = function(validationGroup) {
                var result;
                $(".dx-validationsummary").each((function(_, element) {
                    var summary = $(element).data("dxValidationSummary");
                    if (summary && summary.option("validationGroup") === validationGroup) {
                        result = summary;
                        return false
                    }
                }));
                return result
            }(validationGroup);
            if (summary) {
                groupConfig = validationEngine.getGroupConfig(validationGroup);
                if (groupConfig) {
                    items = function(validators, editorNames) {
                        var items = [];
                        iteratorUtils.each(validators, (function(_, validator) {
                            var widget = validator.$element().data("dx-validation-target");
                            if (widget && $.inArray(widget.option("name"), editorNames) > -1) {
                                items.push({
                                    text: widget.option("validationError.message"),
                                    validator: validator
                                })
                            }
                        }));
                        return items
                    }(groupConfig.validators, editorNames);
                    items.length && summary.option("items", items)
                }
            }
        },
        sendValidationRequest: function(propertyName, params, url, method, additionalFields) {
            var d = $.Deferred();
            var data = {};
            data[propertyName] = params.value;
            if (additionalFields.length && params.data) {
                additionalFields.forEach((function(field) {
                    data[field] = params.data[field]
                }))
            }
            ajax.sendRequest({
                url: url,
                dataType: "json",
                method: method || "GET",
                data: data
            }).then((function(response) {
                if ("string" === typeof response) {
                    d.resolve({
                        isValid: false,
                        message: response
                    })
                } else {
                    d.resolve(response)
                }
            }), (function(xhr) {
                d.reject({
                    isValid: false,
                    message: xhr.responseText
                })
            }));
            return d.promise()
        }
    }
}));

// Version: 5.0.0
// https://github.com/DevExpress/DevExtreme.AspNet.Data
// Copyright (c) Developer Express Inc.

/* global DevExpress:false, jQuery:false */

(function(factory) {
    "use strict";

    function unwrapESModule(module) {
        return module && module.__esModule && module.default ? module.default : module;
    }

    if(typeof define === "function" && define.amd) {
        define(function(require, exports, module) {
            module.exports = factory(
                unwrapESModule(require("devextreme/core/utils/ajax")),
                require("jquery").Deferred,
                require("jquery").extend,
                unwrapESModule(require("devextreme/data/custom_store")),
                unwrapESModule(require("devextreme/data/utils"))
            );
        });
    } else if (typeof module === "object" && module.exports) {
        module.exports = factory(
            unwrapESModule(require("devextreme/core/utils/ajax")),
            require("jquery").Deferred,
            require("jquery").extend,
            unwrapESModule(require("devextreme/data/custom_store")),
            unwrapESModule(require("devextreme/data/utils"))
        );
    } else {
        DevExpress.data.AspNet = factory(
            DevExpress.utils.ajax || { sendRequest: jQuery.ajax },
            jQuery.Deferred,
            jQuery.extend,
            DevExpress.data.CustomStore,
            DevExpress.data.utils
        );
    }

})(function(ajaxUtility, Deferred, extend, CustomStore, dataUtils) {
    "use strict";

    var CUSTOM_STORE_OPTIONS = [
        "onLoading", "onLoaded",
        "onInserting", "onInserted",
        "onUpdating", "onUpdated",
        "onRemoving", "onRemoved",
        "onModifying", "onModified",
        "onPush",
        "loadMode", "cacheRawData",
        "errorHandler"
    ];

    function createStoreConfig(options) {
        var keyExpr = options.key,
            loadUrl = options.loadUrl,
            loadMethod = options.loadMethod || "GET",
            loadParams = options.loadParams,
            isRawLoadMode = options.loadMode === "raw",
            updateUrl = options.updateUrl,
            insertUrl = options.insertUrl,
            deleteUrl = options.deleteUrl,
            onBeforeSend = options.onBeforeSend,
            onAjaxError = options.onAjaxError;

        function send(operation, requiresKey, ajaxSettings, customSuccessHandler) {
            var d = Deferred(),
                thenable,
                beforeSendResult;

            function sendCore() {
                ajaxUtility.sendRequest(ajaxSettings).then(
                    function(res, textStatus, xhr) {
                        if(customSuccessHandler)
                            customSuccessHandler(d, res, xhr);
                        else
                            d.resolve();
                    },
                    function(xhr, textStatus) {
                        var error = getErrorMessageFromXhr(xhr);

                        if(onAjaxError) {
                            var e = { xhr: xhr, error: error };
                            onAjaxError(e);
                            error = e.error;
                        }

                        if(error)
                            d.reject(error);
                        else
                            d.reject(xhr, textStatus);
                    }
                );
            }

            if(requiresKey && !keyExpr) {
                d.reject(new Error("Primary key is not specified (operation: '" + operation + "', url: '" + ajaxSettings.url + "')"));
            } else {
                if(operation === "load") {
                    ajaxSettings.cache = false;
                    ajaxSettings.dataType = "json";
                } else {
                    ajaxSettings.dataType = "text";
                }

                if(onBeforeSend) {
                    beforeSendResult = onBeforeSend(operation, ajaxSettings);
                    if(beforeSendResult && typeof beforeSendResult.then === "function")
                        thenable = beforeSendResult;
                }

                if(thenable)
                    thenable.then(sendCore, function(error) { d.reject(error); });
                else
                    sendCore();
            }

            return d.promise();
        }

        function filterByKey(keyValue) {
            if(!Array.isArray(keyExpr))
                return [keyExpr, keyValue];

            return keyExpr.map(function(i) {
                return [i, keyValue[i]];
            });
        }

        function loadOptionsToActionParams(options, isCountQuery) {
            var result = {};

            if(isCountQuery)
                result.isCountQuery = isCountQuery;

            if(options) {

                ["skip", "take", "requireTotalCount", "requireGroupCount"].forEach(function(i) {
                    if(options[i] !== undefined)
                        result[i] = options[i];
                });

                var normalizeSorting = dataUtils.normalizeSortingInfo,
                    group = options.group,
                    filter = options.filter,
                    select = options.select;

                if(options.sort)
                    result.sort = JSON.stringify(normalizeSorting(options.sort));

                if(group) {
                    if(!isAdvancedGrouping(group))
                        group = normalizeSorting(group);
                    result.group = JSON.stringify(group);
                }

                if(Array.isArray(filter)) {
                    filter = extend(true, [], filter);
                    stringifyDatesInFilter(filter);
                    result.filter = JSON.stringify(filter);
                }

                if(options.totalSummary)
                    result.totalSummary = JSON.stringify(options.totalSummary);

                if(options.groupSummary)
                    result.groupSummary = JSON.stringify(options.groupSummary);

                if(select) {
                    if(!Array.isArray(select))
                        select = [ select ];
                    result.select = JSON.stringify(select);
                }
            }

            extend(result, loadParams);

            return result;
        }

        function handleInsertUpdateSuccess(d, res, xhr) {
            var mime = xhr.getResponseHeader("Content-Type"),
                isJSON = mime && mime.indexOf("application/json") > -1;
            d.resolve(isJSON ? JSON.parse(res) : res);
        }

        var result = {
            key: keyExpr,
            useDefaultSearch: true,

            load: function(loadOptions) {
                return send(
                    "load",
                    false,
                    {
                        url: loadUrl,
                        method: loadMethod,
                        data: loadOptionsToActionParams(loadOptions)
                    },
                    function(d, res) {
                        processLoadResponse(d, res, function(res) {
                            return [ res.data, createLoadExtra(res) ];
                        });
                    }
                );
            },

            totalCount: !isRawLoadMode && function(loadOptions) {
                return send(
                    "load",
                    false,
                    {
                        url: loadUrl,
                        method: loadMethod,
                        data: loadOptionsToActionParams(loadOptions, true)
                    },
                    function(d, res) {
                        processLoadResponse(d, res, function(res) {
                            return [ res.totalCount ];
                        });
                    }
                );
            },

            byKey: !isRawLoadMode && function(key) {
                return send(
                    "load",
                    true,
                    {
                        url: loadUrl,
                        method: loadMethod,
                        data: loadOptionsToActionParams({ filter: filterByKey(key) })
                    },
                    function(d, res) {
                        processLoadResponse(d, res, function(res) {
                            return [ res.data[0] ];
                        });
                    }
                );
            },

            update: updateUrl && function(key, values) {
                return send(
                    "update",
                    true,
                    {
                        url: updateUrl,
                        method: options.updateMethod || "PUT",
                        data: {
                            key: serializeKey(key),
                            values: JSON.stringify(values)
                        }
                    },
                    handleInsertUpdateSuccess
                );
            },

            insert: insertUrl && function(values) {
                return send(
                    "insert",
                    true,
                    {
                        url: insertUrl,
                        method: options.insertMethod || "POST",
                        data: { values: JSON.stringify(values) }
                    },
                    handleInsertUpdateSuccess
                );
            },

            remove: deleteUrl && function(key) {
                return send("delete", true, {
                    url: deleteUrl,
                    method: options.deleteMethod || "DELETE",
                    data: { key: serializeKey(key) }
                });
            }

        };

        CUSTOM_STORE_OPTIONS.forEach(function(name) {
            var value = options[name];
            if(value !== undefined)
                result[name] = value;
        });

        return result;
    }

    function processLoadResponse(d, res, getResolveArgs) {
        res = expandLoadResponse(res);

        if(!res || typeof res !== "object")
            d.reject(new Error("Unexpected response received"));
        else
            d.resolve.apply(d, getResolveArgs(res));
    }

    function expandLoadResponse(value) {
        if(Array.isArray(value))
            return { data: value };

        if(typeof value === "number")
            return { totalCount: value };

        return value;
    }

    function createLoadExtra(res) {
        return {
            totalCount: "totalCount" in res ? res.totalCount : -1,
            groupCount: "groupCount" in res ? res.groupCount : -1,
            summary: res.summary || null
        };
    }

    function serializeKey(key) {
        if(typeof key === "object")
            return JSON.stringify(key);

        return key;
    }

    function serializeDate(date) {

        function zpad(text, len) {
            text = String(text);
            while(text.length < len)
                text = "0" + text;
            return text;
        }

        var builder = [1 + date.getMonth(), "/", date.getDate(), "/", date.getFullYear()],
            h = date.getHours(),
            m = date.getMinutes(),
            s = date.getSeconds(),
            f = date.getMilliseconds();

        if(h + m + s + f > 0)
            builder.push(" ", zpad(h, 2), ":", zpad(m, 2), ":", zpad(s, 2), ".", zpad(f, 3));

        return builder.join("");
    }

    function stringifyDatesInFilter(crit) {
        crit.forEach(function(v, k) {
            if(Array.isArray(v)) {
                stringifyDatesInFilter(v);
            } else if(Object.prototype.toString.call(v) === "[object Date]") {
                crit[k] = serializeDate(v);
            }
        });
    }

    function isAdvancedGrouping(expr) {
        if(!Array.isArray(expr))
            return false;

        for(var i = 0; i < expr.length; i++) {
            if("groupInterval" in expr[i] || "isExpanded" in expr[i])
                return true;
        }

        return false;
    }

    function getErrorMessageFromXhr(xhr) {
        var mime = xhr.getResponseHeader("Content-Type"),
            responseText = xhr.responseText,
            candidate;

        if(!mime)
            return null;

        if(mime.indexOf("text/plain") === 0)
            return responseText;

        if(mime.indexOf("application/json") === 0) {
            var jsonObj = safeParseJSON(responseText);

            if(typeof jsonObj === "string")
                return jsonObj;

            if(typeof jsonObj === "object") {
                for(var key in jsonObj) {
                    if(typeof jsonObj[key] === "string")
                        return jsonObj[key];
                }
            }

            return responseText;
        }

        if(mime.indexOf("application/problem+json") === 0) {
            var jsonObj = safeParseJSON(responseText);

            var candidate;
            if(typeof jsonObj === "object") {
                candidate = jsonObj.title;
                if(isNonEmptyString(candidate))
                    return candidate;

                candidate = jsonObj.detail;
                if(isNonEmptyString(candidate))
                    return candidate;
            }

            return responseText;
        }

        return null;
    }

    function safeParseJSON(json) {
        try {
            return JSON.parse(json);
        } catch(x) {
            return null;
        }
    }

    function isNonEmptyString(value) {
        return typeof value === "string" && value.length > 0;
    }

    return {
        createStore: function(options) {
            return new CustomStore(createStoreConfig(options));
        }
    };
});

"use strict"

function AddToken(operation, ajaxSettings) {
    var antiForgeryToken = $('input[name=\"__RequestVerificationToken\"]').val();
    if (antiForgeryToken) {
        ajaxSettings.headers = {
            "__RequestVerificationToken": antiForgeryToken
        }; 
        ajaxSettings.data.__RequestVerificationToken = antiForgeryToken;
    };
}